newsfeeds
pg_newsfeeds · PostgreSQL extension for gathering news
Overview
| ID | Extension | Package | Version | Category | License | Language |
|---|---|---|---|---|---|---|
| 100638 | newsfeeds | pg_newsfeeds | 1.0.0 | FEAT | GPL-2.0 | SQL |
PostgreSQL · 10, 11, 12, 13, 14, 15, 16, 17, 18
| Relationships | |
|---|---|
| Requires | plpgsql |
Usage
Sources:
newsfeeds publishes the database schema and query helpers for a specific news-gathering application. It stores feed scraping rules and collected headlines, builds a weighted full-text vector, returns pending feeds to an external crawler, and exposes headline search as rows or JSON. It does not fetch web pages by itself.
Core Workflow
The intended setup is to create the extension in the application’s schema, register a feed, and let an external worker consume pending_feeds() and populate headlines:
Object Index
newsfeedsstores source URLs, CSS selectors, refresh intervals, and crawler state.headlinesstores collected metadata, content, labels, archive data, and a weightedtsvector; it has a GIN index onfts.clean_query(text)rewrites the application’s search syntax.pending_feeds()returns crawler work as JSON.headlines(...)andheadlines_as_json(...)browse or search collected items.fts()is the trigger function intended to maintain the weighted search vector.
Operational Notes
The published 1.0.0 SQL is application-specific and incomplete as a standalone extension. It contains a questionable column-level FOREIGN KEY (newsfeed) declaration, references title, description, rank_modifier, and reify_url objects not created by the same script, and hard-codes the aggregator schema in helpers despite the control file declaring the extension relocatable. Validate and patch the exact SQL before attempting a fresh installation.
No upstream crawler implementation or supported deployment contract is included. Treat selector execution, URL fetching, content sanitization, retention, and network security as responsibilities of the external worker. The repository provides only a one-line README and no release or compatibility guidance.