Skip to content

Schema-qualify comparison functions and operators in sync_enum_values#131

Open
dtikhonov wants to merge 1 commit intoPogchamp-company:developfrom
dtikhonov:fix/schema-qualify-comparison-operators
Open

Schema-qualify comparison functions and operators in sync_enum_values#131
dtikhonov wants to merge 1 commit intoPogchamp-company:developfrom
dtikhonov:fix/schema-qualify-comparison-operators

Conversation

@dtikhonov
Copy link
Copy Markdown

Description

The library creates temporary comparison functions (new_old_equals, new_old_not_equals) and operators (=, !=) during enum value sync. Previously these were created with unqualified names, defaulting to the public schema. When the migration user lacks CREATE privileges on the public schema, this caused permission denied errors.

Now the functions and operators are created in the enum's own schema (e.g. "myschema".new_old_equals), which only requires privileges on the schema where the enum already lives.

Checklist

This pull request is:

  • A documentation / typographical / small typing error fix
    • Good to go, no issue or tests are needed
  • A short code fix
    • please include the issue number, and create an issue if none exists, which
      must include a complete example of the issue. one line code fixes without an
      issue and demonstration will not be accepted.
    • Please include: Fixes: #<issue number> in the commit message
    • please include tests. one line code fixes without tests will not be accepted.
  • A new feature implementation
    • please include the issue number, and create an issue if none exists, which must
      include a complete example of how the feature would look.
    • Please include: Fixes: #<issue number> in the commit message
    • please include tests.

The library creates temporary comparison functions (new_old_equals,
new_old_not_equals) and operators (=, !=) during enum value sync.
Previously these were created with unqualified names, defaulting to
the public schema. When the migration user lacks CREATE privileges
on the public schema, this caused permission denied errors.

Now the functions and operators are created in the enum's own schema
(e.g. "myschema".new_old_equals), which only requires privileges
on the schema where the enum already lives.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.

1 participant