Skip to content

Conversation

@olavloite
Copy link
Collaborator

PostgreSQL supports newline characters in string literals and quoted
identifiers. Trying to execute a statement with a string literal or
quoted identifier that contained a newline character would cause an
'Unclosed string literal' error.

Fixes #1730

PostgreSQL supports newline characters in string literals and quoted
identifiers. Trying to execute a statement with a string literal or
quoted identifier that contained a newline character would cause an
'Unclosed string literal' error.

Fixes #1730
@olavloite olavloite requested review from ansh0l and thiagotnunes March 7, 2022 12:33
@olavloite olavloite requested a review from a team as a code owner March 7, 2022 12:33
@product-auto-label product-auto-label bot added the api: spanner Issues related to the googleapis/java-spanner API. label Mar 7, 2022
@Override
String removeCommentsAndTrimInternal(String sql) {
Preconditions.checkNotNull(sql);
String currentTag = null;
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It might be easier to open the entire file (online or in an IDE) to review it, than to try to do that based on this diff render from GitHub. The parser code has also been compacted a lot, as there was quite a lot of code duplication, and that makes this diff render a lot harder to read.

@olavloite olavloite added automerge Merge the pull request once unit tests and other checks pass. kokoro:force-run Add this label to force Kokoro to re-run the tests. labels Mar 8, 2022
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Mar 8, 2022
@olavloite olavloite merged commit f403d99 into main Mar 8, 2022
@olavloite olavloite deleted the postgresql-newlines-in-quoted branch March 8, 2022 07:23
@gcf-merge-on-green gcf-merge-on-green bot removed the automerge Merge the pull request once unit tests and other checks pass. label Mar 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: spanner Issues related to the googleapis/java-spanner API.

4 participants