Skip to content

Fix working with separate schemas#62

Merged
bibendi merged 1 commit intobibendi:masterfrom
attilahorvath:fix-separate-schemas
Jun 13, 2024
Merged

Fix working with separate schemas#62
bibendi merged 1 commit intobibendi:masterfrom
attilahorvath:fix-separate-schemas

Conversation

@attilahorvath
Copy link
Copy Markdown
Contributor

Context

PostgreSQL allows working with multiple separate schemas and enum types can be present with the same name across them.

The gem is using the pg_type system catalog to access the different enum types, however this returns all enums from all existing schemas in the DB instead of just the currently selected ones, potentially leading to conflicts. This can be fixed by using the current_schemas(true) function which returns the schemas present in the current search path.

What's inside

  • Change the queries using pg_type to filter for the current schemas only
  • Specs
  • Readme update to run the specs as rake spec doesn't seem to work for me

Checklist:

  • I have added tests
  • I have made corresponding changes to the documentation

@bibendi
Copy link
Copy Markdown
Owner

bibendi commented Jun 13, 2024

Thank you for the fix!

@bibendi bibendi merged commit b9c92a8 into bibendi:master Jun 13, 2024
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.

2 participants