-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Fix postgis 12 adscr -> adbin consrc -> conbin #32684
Fix postgis 12 adscr -> adbin consrc -> conbin #32684
Conversation
Will do ASAP, thanks! |
Just noting that it seems we have some copy&paste pattern between dbmanager and the processing tool. Woud be cool factoring that a bit, but likely out of scope of a urgent fix PR |
@rouault yes, I noticed it too. Ideally we should add that kind of information retrieval it to the |
@@ -534,12 +537,15 @@ def getTableConstraints(self, table): | |||
schema, tablename = self.getSchemaTableName(table) | |||
schema_where = u" AND nspname=%s " % self.quoteString(schema) if schema is not None else "" | |||
|
|||
sql = u"""SELECT c.conname, c.contype, c.condeferrable, c.condeferred, array_to_string(c.conkey, ' '), c.consrc, | |||
version_number = int(self.getInfo()[0].split(' ')[1].split('.')[0]) | |||
con_col_name = 'consrc' if version_number < 12 else 'conbin' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you can put <11 here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've not tested 11, I only have 8, 9, 10 and 12 here. Are you sure that 11 does not use consrc
too? Looking here it looks like it does: https://www.postgresql.org/docs/11/catalog-pg-constraint.html
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hello, i'm fairly new to GitHub however i'm encountering the same problem. What does 'postgis 12 adscr -> adbin consrc -> conbin mean as a solution'?
Tested, apparently all OK. |
AFAICT It was still present but deprecated. Anyway, it's irrelevant, you can drop the comment. Thanks. |
Thanks! |
No problems! |
See: #32679
@pcav can you test this patch (with older PG too)?