Verify column name length in PostgreSQL and SQL Server#13742
Conversation
4bb1cb8 to
4c10f34
Compare
4c10f34 to
88dae14
Compare
|
@ebyhr can you please rebase? there are conflicts. |
88dae14 to
831a156
Compare
|
Rebased on upstream to resolved conflicts. |
There was a problem hiding this comment.
is it documented? can you link to docs?
There was a problem hiding this comment.
SQLSyntaxErrorException contains invalid column name.
add a code comment
// Note: SQLSyntaxErrorException can be throw also when column name is invalid
BTW do we need this complicated logic?
why not "drop support" for the older MariaDB version and simplify this?
There was a problem hiding this comment.
I think throwing an MariaDB exception without conversion is also fine. Let me handle in a follow-up PR.
There was a problem hiding this comment.
Why aren't these quoted?
(i know they weren't quoted before the refactor)
There was a problem hiding this comment.
Thanks for catching that. Let me fix in a follow-up PR.
There was a problem hiding this comment.
Quote the contents of the columnName in the message besides their length.
It's important for CREATE TABLE statement, where there can be multiple potentially problematic columns in play
There was a problem hiding this comment.
Quote the contents of the columnName in the message besides their length
SQLSyntaxErrorException contains invalid column name.
testRenameColumn was skipped by SUPPORTS_CREATE_TABLE condition.
831a156 to
b01e763
Compare
|
Today while in looking into something related I saw a very disturbing behaviour from postgres. Directly in Postgres: This means that Postgres truncates ALL occurences of long identifiers and the truncated values are treated equivalently. However when selecting from a relation which produces So it seems we're still "safe" in the sense that if for example join pushdown caused truncated identifiers then the worst thing that can happen would be query failure because postgres would complain of ambiguity. |
Description
Fixes #12882
Documentation
(x) No documentation is needed.
Release notes
(x) Release notes entries required with the following suggested text: