Skip to content

CP-17816 pgsql referenced schema - #17820

Merged
niden merged 2 commits into
5.0.xfrom
CP-17816-pgsql-referenced-schema
Nov 27, 2026
Merged

niden merged 2 commits into
5.0.xfrom
CP-17816-pgsql-referenced-schema

Conversation

@niden

@niden niden commented Nov 27, 2026

Copy link
Copy Markdown
Member

Hello!

In raising this pull request, I confirm the following:

  • I have read and understood the Contributing Guidelines
  • I have checked that another pull request for this purpose does not exist
  • I wrote some tests for this PR
  • I have updated the relevant CHANGELOG
  • I have created a PR for the documentation about this change

The query of Phalcon\Db\Dialect\Postgresql::describeReferences() now joins the namespace of the referenced table (pg_namespace AS fn) and gives fn.nspname AS REFERENCED_TABLE_SCHEMA. Before, it gave current_database(). Reference::getReferencedSchema() is now the schema of the referenced table (for example public), also for a key to a table in another schema.

The tests that expected the database name now expect public. A new test covers keys to a table in another schema and in the same schema.

This PR is on top of #17819 (#17815). The upgrade note is in the changelog.

Thanks

…escribeReferences()

Assisted-by: Claude Code
Assisted-by: Claude Code
@niden niden added bug A bug report status: medium Medium 5.0 The issues we want to solve in the 5.0 release labels Nov 27, 2026
@niden niden self-assigned this Nov 27, 2026
Base automatically changed from CP-17815-sqlite-referenced-primary-key to 5.0.x November 27, 2026 18:37
@niden
niden merged commit 49cb358 into 5.0.x Nov 27, 2026
120 checks passed
@niden
niden deleted the CP-17816-pgsql-referenced-schema branch November 27, 2026 18:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

5.0 The issues we want to solve in the 5.0 release bug A bug report status: medium Medium

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant