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

fix: preserve unquoted unicode whitespace in array literals #1266

Merged
merged 25 commits into from
Aug 10, 2020
Merged
Changes from 1 commit
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
8281083
fix: don't ignore unquoted non-ascii whitespace
bokken Jul 21, 2018
8b5072d
Revert "fix: don't ignore unquoted non-ascii whitespace"
bokken Jul 21, 2018
e407aaf
Revert "Revert "fix: don't ignore unquoted non-ascii whitespace""
bokken Jul 21, 2018
06c58fb
Revert "Revert "Revert "fix: don't ignore unquoted non-ascii whitespa…
bokken Jul 21, 2018
c1325e2
fix: don't ignore unquoted non-ascii whitespace
bokken Jul 21, 2018
e828d76
fix: don't ignore unquoted non-ascii whitespace
bokken Jul 21, 2018
06837da
fix: don't ignore unquoted non-ascii whitespace
bokken Jul 21, 2018
5fa5dd0
fix: don't ignore unquoted non-ascii whitespace
bokken Jul 22, 2018
c95fd4b
test: fix comment in ArrayTest.testDirectFieldString
vlsi Jul 22, 2018
3bbff4e
fix: revert spaces in array literal
vlsi Jul 22, 2018
c89a54b
add changelog entry
vlsi Jul 22, 2018
aae0d48
fix: don't ignore unquoted non-ascii whitespace
bokken Jul 24, 2018
afdbe46
fix: don't ignore unquoted non-ascii whitespace
bokken Aug 13, 2018
51d9be9
fix: don't ignore unquoted non-ascii whitespace
bokken Jul 21, 2018
86646fa
fix: don't ignore unquoted non-ascii whitespace
bokken Jul 21, 2018
9b952f9
fix: don't ignore unquoted non-ascii whitespace
bokken Jul 21, 2018
aa4aa03
fix: don't ignore unquoted non-ascii whitespace
bokken Jul 22, 2018
5bdf256
test: fix comment in ArrayTest.testDirectFieldString
vlsi Jul 22, 2018
8a3402d
fix: revert spaces in array literal
vlsi Jul 22, 2018
12a83a4
add changelog entry
vlsi Jul 22, 2018
c70db61
fix: don't ignore unquoted non-ascii whitespace
bokken Jul 24, 2018
7560646
fix: don't ignore unquoted non-ascii whitespace
bokken Aug 13, 2018
af3006f
Merge remote-tracking branch 'origin/arrays_whitespace' into arrays_w…
bokken Aug 13, 2018
a13f7f1
Merge remote-tracking branch 'upstream/master' into arrays_whitespace
bokken Apr 15, 2019
047f1a5
Merge remote-tracking branch 'upstream/master' into arrays_whitespace
Aug 6, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -416,8 +416,7 @@ public void testDirectFieldString() throws SQLException {
assertEquals(" \fnew \n ", array[2]);
assertEquals(" ", array[3]);

// this is likely undesired behavior of dropping white spaces mid-value (not
// leading/trailing)
// PostgreSQL drops leading and trailing whitespace, so does the driver
Copy link
Member Author

Choose a reason for hiding this comment

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

This test asserts that the driver is also dropping ascii white space in the middle of an unquoted value.
This is not consistent with the backend. However, the backend should never produce this type of value.

Copy link
Member Author

Choose a reason for hiding this comment

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

@vlsi thoughts?
This is asserting dropping of mid value white spaces, which is probably undesired, but practically a non issue as the backend should never produce such a value.

Copy link
Member

Choose a reason for hiding this comment

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

This is not consistent with the backend

Why do you think so?

Copy link
Member

Choose a reason for hiding this comment

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

Please add a test when the same values get passed to the backend.

Copy link
Member Author

Choose a reason for hiding this comment

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

@vlsi I have added test (aae0d48)

Copy link
Member

Choose a reason for hiding this comment

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

It is still different from testDirectFieldString

assertEquals("unquot\u2001", array[1]);
}

Expand Down