Skip to content

[codex] fix catalog alias projections#78

Merged
erans merged 1 commit into
mainfrom
codex/fix-catalog-alias-projections
May 18, 2026
Merged

[codex] fix catalog alias projections#78
erans merged 1 commit into
mainfrom
codex/fix-catalog-alias-projections

Conversation

@erans
Copy link
Copy Markdown
Owner

@erans erans commented May 18, 2026

Summary

Fixes field alias handling for qualified catalog queries.

Root Cause

Some catalog handlers were using the displayed alias name as the data lookup key, while others ignored aliased projections or ignored projection entirely. Qualified catalog queries such as pg_catalog.pg_roles, pg_catalog.pg_namespace, pg_catalog.pg_database, and information_schema.schemata could therefore drop aliased columns or return values from the wrong source column.

Changes

  • Keep output column names separate from source columns/indices for affected catalog projections.
  • Make pg_namespace use normal projection handling instead of always returning all columns.
  • Add regression tests for the issue 77 examples.

Fixes #77.

Verification

  • cargo test --test catalog_alias_test --test catalog_test --test information_schema_test --test pg_database_test --test pg_roles_user_test

@erans erans marked this pull request as ready for review May 18, 2026 17:47
@erans erans merged commit 565c433 into main May 18, 2026
1 check passed
@erans erans deleted the codex/fix-catalog-alias-projections branch May 18, 2026 17:47
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.

Field aliases in qualified catalog queries

1 participant