Skip to content

pg_client: rename fkrel_ prefix to rel_, reserve csr_rel_ for CSR-backed rels - #65

Open
adsharma wants to merge 2 commits into
mainfrom
pg-client-rel-naming
Open

pg_client: rename fkrel_ prefix to rel_, reserve csr_rel_ for CSR-backed rels#65
adsharma wants to merge 2 commits into
mainfrom
pg-client-rel-naming

Conversation

@adsharma

Copy link
Copy Markdown
Contributor

Aligns the pg_client table-name convention with the cross-extension naming convention:

Prefix Meaning
node_* node tables
rel_* foreign-key-backed, scan-driven relationship tables (RelGroupCatalogEntry + ForeignRelTable)
csr_rel_* reserved for attach-time materialization into a local on-disk CSR RelTable (not implemented yet; routed through the same scan-driven path as rel_*)
  • init() now dispatches on rel_ (FK-backed) and csr_rel_ (CSR intent). The prefixes are disjoint, so branch order is immaterial.
  • Test fixtures (test_pg_client.py, pg_client.test, create_pg_client_test_db.sql) renamed: fkrel_knowsrel_knows, fkrel_works_atrel_works_at; case names ScanFkRelTableScanRelTable, MatchOnFkRelTableMatchOnRelTable; SHOW_TABLES expectations updated.
  • Companion duckdb change to follow separately on the integration branch.

Tests run in CI.

When table name starts with rel_, query foreign keys from the db to
determine src/dst node tables and create a RelGroupCatalogEntry
instead of a NodeTableCatalogEntry.
…ked rels

Align the pg_client naming convention with the cross-extension convention
documented in docs/foreign_rel_table.md:

- rel_*: foreign-key-backed, scan-driven relationship tables
  (RelGroupCatalogEntry + ForeignRelTable)
- csr_rel_*: reserved for attach-time materialization into a local on-disk
  CSR RelTable; not implemented yet, currently routed through the same
  scan-driven path as rel_*

The two prefixes are disjoint (csr_rel_x does not match the "rel_" prefix),
so the branch order in init() is immaterial. Test fixtures, expected
outputs and case names updated accordingly.
adsharma added a commit that referenced this pull request Aug 27, 2026
Match the pg_client naming convention (PR #65): rel_* = foreign-key-backed,
scan-driven relationship tables; csr_rel_* is reserved for attach-time
materialization into a local on-disk CSR RelTable and currently routes
through the same scan-driven path until COPY-based materialization lands.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant