diff options
author | Alvaro Herrera <alvherre@alvh.no-ip.org> | 2019-09-18 16:29:55 -0300 |
---|---|---|
committer | Alvaro Herrera <alvherre@alvh.no-ip.org> | 2019-09-18 16:34:34 -0300 |
commit | 9b8e99e905097e104c295bff1c47b6c0d652efdb (patch) | |
tree | 2594c83d00f6551903fd5e2479e628910192777e /src | |
parent | 32200c19dd8f084956d90e3c2cb5c2b8a8b90dfa (diff) | |
download | postgresql-9b8e99e905097e104c295bff1c47b6c0d652efdb.tar.gz postgresql-9b8e99e905097e104c295bff1c47b6c0d652efdb.zip |
Fix testlibpq3
The sample output assumes non-standard-conforming interpretation of
backslashes in input literals, so the actual output didn't match.
Noticed while perusing another patch that touches this file.
Evidently this code is seldom checked, so I'm not going to bother
backpatching this fix.
Diffstat (limited to 'src')
-rw-r--r-- | src/test/examples/testlibpq3.c | 4 | ||||
-rw-r--r-- | src/test/examples/testlibpq3.sql | 5 |
2 files changed, 5 insertions, 4 deletions
diff --git a/src/test/examples/testlibpq3.c b/src/test/examples/testlibpq3.c index c3b524cfdfb..efc3ed3eb0b 100644 --- a/src/test/examples/testlibpq3.c +++ b/src/test/examples/testlibpq3.c @@ -11,8 +11,8 @@ * CREATE SCHEMA testlibpq3; * SET search_path = testlibpq3; * CREATE TABLE test1 (i int4, t text, b bytea); - * INSERT INTO test1 values (1, 'joe''s place', '\\000\\001\\002\\003\\004'); - * INSERT INTO test1 values (2, 'ho there', '\\004\\003\\002\\001\\000'); + * INSERT INTO test1 values (1, 'joe''s place', '\000\001\002\003\004'); + * INSERT INTO test1 values (2, 'ho there', '\004\003\002\001\000'); * * The expected output is: * diff --git a/src/test/examples/testlibpq3.sql b/src/test/examples/testlibpq3.sql index 22133065099..35a95ca347b 100644 --- a/src/test/examples/testlibpq3.sql +++ b/src/test/examples/testlibpq3.sql @@ -1,5 +1,6 @@ CREATE SCHEMA testlibpq3; SET search_path = testlibpq3; +SET standard_conforming_strings = ON; CREATE TABLE test1 (i int4, t text, b bytea); -INSERT INTO test1 values (1, 'joe''s place', '\\000\\001\\002\\003\\004'); -INSERT INTO test1 values (2, 'ho there', '\\004\\003\\002\\001\\000'); +INSERT INTO test1 values (1, 'joe''s place', '\000\001\002\003\004'); +INSERT INTO test1 values (2, 'ho there', '\004\003\002\001\000'); |