Skip to content

Conversation

@taimoorzaeem
Copy link
Collaborator

@taimoorzaeem taimoorzaeem commented Dec 4, 2025

We don't allow accessing schemas "pg_catalog" and "information_schema". Instead of silently failing requests on these schemas, this now adds logging an error on startup when these schemas are found in db-schemas config.

Closes #4359.

  • Implementation
  • Tests
  • Docs

@taimoorzaeem taimoorzaeem marked this pull request as draft December 4, 2025 17:00
@taimoorzaeem
Copy link
Collaborator Author

Where should we document this? I am thinking in schemas.html#restricted-schemas or maybe in the config page?

@steve-chavez
Copy link
Member

Where should we document this? I am thinking in schemas.html#restricted-schemas or maybe in the config page?

Hm, I'm thinking it should be more noticeable, maybe at the begging of https://docs.postgrest.org/en/v14/references/api/schemas.html, likely with an important or warning note.

@taimoorzaeem taimoorzaeem force-pushed the feat/add-warning-db-schmea branch from f8db730 to 7c1fdda Compare December 8, 2025 05:59
@taimoorzaeem taimoorzaeem marked this pull request as ready for review December 8, 2025 06:00
@taimoorzaeem taimoorzaeem added the enhancement a feature, ready for implementation label Dec 8, 2025
@taimoorzaeem taimoorzaeem force-pushed the feat/add-warning-db-schmea branch from 7c1fdda to 64c3af3 Compare December 10, 2025 06:34
@taimoorzaeem taimoorzaeem marked this pull request as draft December 10, 2025 18:45
Copy link
Member

@steve-chavez steve-chavez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Was about to merge but noticed this is marked as draft.

@taimoorzaeem
Copy link
Collaborator Author

taimoorzaeem commented Dec 11, 2025

Was about to merge but noticed this is marked as draft.

Yeah, I wanted to rebase this on top of #4531 to avoid any conflicts in changelog. Opened now.

We don't allow accessing schemas "pg_catalog" and "information_schema".
Instead of silently failing requests on these schemas, this now adds
logging an error on startup when these schemas are found in `db-schemas`
config.

Signed-off-by: Taimoor Zaeem <taimoorzaeem@gmail.com>
@taimoorzaeem taimoorzaeem force-pushed the feat/add-warning-db-schmea branch from 64c3af3 to e4ea40b Compare December 11, 2025 05:28
@taimoorzaeem taimoorzaeem marked this pull request as ready for review December 11, 2025 05:28
@steve-chavez steve-chavez merged commit abad47f into PostgREST:main Dec 11, 2025
33 checks passed
@taimoorzaeem taimoorzaeem deleted the feat/add-warning-db-schmea branch December 12, 2025 07:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement a feature, ready for implementation

Development

Successfully merging this pull request may close these issues.

Emit warning when adding pg_catalog on db-schemas

2 participants