Skip to content
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

Rework handling quoted object names and reserved SQL keywords #6589

Draft
wants to merge 8 commits into
base: 5.0.x
Choose a base branch
from

Conversation

morozov
Copy link
Member

@morozov morozov commented Nov 10, 2024

This is an early draft of an attempt to rework handling quoted object names and eliminate the need to maintain platform-specific keywords in the library.

Q A
Type improvement

It will partially fix #4357.

sp_rename accepts the old name as a qualified name but the new name as
a literal value.

The caller of the stored procedure should be able to qualify the old
name in order to reference a column in some table or a table in some
schema, etc. But it's not necessary for the new name because the
reference to the object being renamed is already established in the
old name.
The pattern used in parseTableCommentFromSQL() was invalid. It would
wrap the value returned by quoteSingleIdentifier() in another set of
quotes. It would only work for unquoted table names, which would be
handled but the pattern that matches an unquoted name.

Before we enforce quoting of all table names, we need to fix the
pattern.
The SQL being used by a component is an implementation detail. It
should be tested in unit tests.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant