From 65738490eedfbbaa6d36741b49ac1941a8105b5c Mon Sep 17 00:00:00 2001 From: Hiroshi Inoue Date: Sun, 5 Jan 2020 10:29:49 +0900 Subject: [PATCH] Update the expected result of odbc-escapes regression test for PG12's new floating point output format. Old odbc-escapes.out was renamed odbc-escapes_1.out. --- test/expected/odbc-escapes.out | 8 +- test/expected/odbc-escapes_1.out | 144 +++++++++++++++++++++++++++++++ 2 files changed, 148 insertions(+), 4 deletions(-) create mode 100644 test/expected/odbc-escapes_1.out diff --git a/test/expected/odbc-escapes.out b/test/expected/odbc-escapes.out index 0452adc..64fd927 100644 --- a/test/expected/odbc-escapes.out +++ b/test/expected/odbc-escapes.out @@ -68,8 +68,8 @@ Param 3 is an I-O parameter Param 4: 3.4 Param 5 is an OUT parameter Result set: -6.7999999999999998 7 2017-02-24 11:34:46 -OUT params: 6.7999999999999998 : 7 : 2017-02-24 11:34:46 +6.8 7 2017-02-24 11:34:46 +OUT params: 6.8 : 7 : 2017-02-24 11:34:46 -- TEST using SQLExecDirect @@ -139,6 +139,6 @@ Param 3 is an I-O parameter Param 4: 3.4 Param 5 is an OUT parameter Result set: -6.7999999999999998 7 2017-02-24 11:34:46 -OUT params: 6.7999999999999998 : 7 : 2017-02-24 11:34:46 +6.8 7 2017-02-24 11:34:46 +OUT params: 6.8 : 7 : 2017-02-24 11:34:46 disconnecting diff --git a/test/expected/odbc-escapes_1.out b/test/expected/odbc-escapes_1.out new file mode 100644 index 0000000..0452adc --- /dev/null +++ b/test/expected/odbc-escapes_1.out @@ -0,0 +1,144 @@ +connected + +-- TEST using SQLExecute after SQLPrepare + +Query: SELECT {fn CONCAT(?, ?) } +Param 1: foo +Param 2: bar +Result set: +foobar + +Query: SELECT {fn LOCATE(?, ?, 2) } +Param 1: needle +Param 2: this is a needle in an ol' haystack +Result set: +11 + +Query: SELECT {fn LOCATE({fn SUBSTRING(?, 2, 4)}, {fn SUBSTRING(?, 3)}, 3) } +Param 1: needle +Param 2: this is a needle in an ol' haystack +Result set: +10 + +Query: SELECT 'x' || {fn SPACE(10) } || 'x' +Result set: +x x + +Query: { call length(?) } +Param 1: foobar +Result set: +6 + +Query: { call right(?, ?) } +Param 1: foobar +Param 2: 3 +Result set: +bar + +Query: { ? = call length('foo') } +Param 1 is an OUT parameter +Result set: + +OUT param: 3 + +Query: { ? = call concat(?::text, ?::text) } +Param 1 is an OUT parameter +Param 2: foo +Param 3: bar +Result set: + +OUT param: foobar + +Query: SELECT {d '2014-12-21' } + '1 day'::interval +Result set: +2014-12-22 00:00:00 + +Query: SELECT {t '20:30:40' } + '1 hour 1 minute 1 second'::interval +Result set: +21:31:41 + +Query: SELECT {ts '2014-12-21 20:30:40' } + '1 day 1 hour 1 minute 1 second'::interval +Result set: +2014-12-22 21:31:41 + +Query: {call a_b_c_d_e(?, ?, ?, ?, ?)} +Param 1 is an OUT parameter +Param 2: 2017-02-23 11:34:46 +Param 3 is an I-O parameter +Param 4: 3.4 +Param 5 is an OUT parameter +Result set: +6.7999999999999998 7 2017-02-24 11:34:46 +OUT params: 6.7999999999999998 : 7 : 2017-02-24 11:34:46 + +-- TEST using SQLExecDirect + +Query: SELECT {fn CONCAT(?, ?) } +Param 1: foo +Param 2: bar +Result set: +foobar + +Query: SELECT {fn LOCATE(?, ?, 2) } +Param 1: needle +Param 2: this is a needle in an ol' haystack +Result set: +11 + +Query: SELECT {fn LOCATE({fn SUBSTRING(?, 2, 4)}, {fn SUBSTRING(?, 3)}, 3) } +Param 1: needle +Param 2: this is a needle in an ol' haystack +Result set: +10 + +Query: SELECT 'x' || {fn SPACE(10) } || 'x' +Result set: +x x + +Query: { call length(?) } +Param 1: foobar +Result set: +6 + +Query: { call right(?, ?) } +Param 1: foobar +Param 2: 3 +Result set: +bar + +Query: { ? = call length('foo') } +Param 1 is an OUT parameter +Result set: + +OUT param: 3 + +Query: { ? = call concat(?::text, ?::text) } +Param 1 is an OUT parameter +Param 2: foo +Param 3: bar +Result set: + +OUT param: foobar + +Query: SELECT {d '2014-12-21' } + '1 day'::interval +Result set: +2014-12-22 00:00:00 + +Query: SELECT {t '20:30:40' } + '1 hour 1 minute 1 second'::interval +Result set: +21:31:41 + +Query: SELECT {ts '2014-12-21 20:30:40' } + '1 day 1 hour 1 minute 1 second'::interval +Result set: +2014-12-22 21:31:41 + +Query: {call a_b_c_d_e(?, ?, ?, ?, ?)} +Param 1 is an OUT parameter +Param 2: 2017-02-23 11:34:46 +Param 3 is an I-O parameter +Param 4: 3.4 +Param 5 is an OUT parameter +Result set: +6.7999999999999998 7 2017-02-24 11:34:46 +OUT params: 6.7999999999999998 : 7 : 2017-02-24 11:34:46 +disconnecting -- 2.39.5