Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restrict state connection search path #342

Merged
merged 2 commits into from Apr 22, 2024

Conversation

andrew-farries
Copy link
Collaborator

Restrict the search path of the connection used by the state package to only the state schema (the schema that contains the migrations table).

This ensures that any column types that might reside in other schema are always qualified with the schema name in the internal schema representation. Without the restriction of the search path, these type names would be unqualified if they lived in a schema that was on the search path used by the state connection.

The representation (qualified/unqualified) of type names in the internal schema is ultimately due to how the format-type function behaves; types in the search_path of the caller are unqualified, otherwise they are qualified.

Restrict the search path of the connection used by the state package to
only the state schema (the schema that containts the `migrations` table).

This ensures that any column types that might reside in other schema are
always qualified with the schema name in the internal schema
representation. Without the restriction of the search path, these type
names would be unqualified if they lived in a schema that was on the
search path used by the state connection.
@andrew-farries andrew-farries merged commit a444723 into main Apr 22, 2024
44 checks passed
@andrew-farries andrew-farries deleted the restrict-state-connection-search-path branch April 22, 2024 07:38
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.

None yet

2 participants