Repository navigation
Add PostgresSchema to manage Postgres schemas with - #206
Merged
Merged
Conversation
sewi-cpan
reviewed
Apr 6, 2023
Photonios
force-pushed
the
schema-management
branch
2 times, most recently
from
April 6, 2023 08:43
9d95720 to
b757d69
Compare
Photonios
force-pushed
the
schema-management
branch
2 times, most recently
from
April 10, 2023 12:08
7fe9065 to
4d727a0
Compare
Verify that the table and schema still exists after Postgres refused to drop them.
It's too tricky to get this right. It'll lead to surprises because: 1. It breaks with transaction pooling. 2. Interaction with `SET LOCAL` is strange. A `SET` command after a `SET LOCAL` overrides it. I already shot myself in the foot twice since implementing this.
Photonios
force-pushed
the
schema-management
branch
from
April 11, 2023 06:50
4d727a0 to
cd67898
Compare
Photonios
force-pushed
the
schema-management
branch
from
April 11, 2023 08:50
aa99a20 to
f77fd29
Compare
sewi-cpan
reviewed
Apr 11, 2023
Comment on lines
+164
to
+166
| max_prefix_length = cls.NAME_MAX_LENGTH - len(suffix) | ||
|
|
||
| if len(prefix) > max_prefix_length: |
Contributor
There was a problem hiding this comment.
Assumptions:
- Prefix len 50
- Suffix len 13
max_prefix_lengthwould be63 - 13=50
len(prefix)=50is not> max_prefix_length50.
The calling function does{prefix}_{suffix}which results in 50 + 1 + 13 = 64 chars.
Either remove the seperator from the creation functions or consider it here while calculating.
Contributor
Author
There was a problem hiding this comment.
Oops, forgot about the separator. Taken into account now.
sewi-cpan
approved these changes
Apr 12, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.