diff options
author | Michael Meskes <meskes@postgresql.org> | 2015-02-10 12:00:13 +0100 |
---|---|---|
committer | Michael Meskes <meskes@postgresql.org> | 2015-02-10 12:04:10 +0100 |
commit | 1f393fc923ec77f25fd37e16fd8ccb480df82ebb (patch) | |
tree | e771707dfd308ec99087cdfb601bdb74c07ef032 /src/interfaces/ecpg/test/expected/sql-array.stderr | |
parent | 025c02420de990c15a90e9e3f86fcfbc5b59ee88 (diff) |
Fixed array handling in ecpg.
When ecpg was rewritten to the new protocol version not all variable types
were corrected. This patch rewrites the code for these types to fix that. It
also fixes the documentation to correctly tell the status of array handling.
Diffstat (limited to 'src/interfaces/ecpg/test/expected/sql-array.stderr')
-rw-r--r-- | src/interfaces/ecpg/test/expected/sql-array.stderr | 124 |
1 files changed, 82 insertions, 42 deletions
diff --git a/src/interfaces/ecpg/test/expected/sql-array.stderr b/src/interfaces/ecpg/test/expected/sql-array.stderr index e5d9f8f3017..9ee54d3265a 100644 --- a/src/interfaces/ecpg/test/expected/sql-array.stderr +++ b/src/interfaces/ecpg/test/expected/sql-array.stderr @@ -2,89 +2,129 @@ [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGconnect: opening database regress1 on <DEFAULT> port <DEFAULT> [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGsetcommit on line 29: action "on"; connection "regress1" +[NO_PID]: ECPGsetcommit on line 55: action "on"; connection "regress1" [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGtrans on line 31: action "begin work"; connection "regress1" +[NO_PID]: ECPGtrans on line 57: action "begin work"; connection "regress1" [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_execute on line 33: query: create table test ( f float , i int , a int [ 10 ] , text char ( 10 ) ); with 0 parameter(s) on connection regress1 +[NO_PID]: ecpg_execute on line 59: query: create table test ( f float , i int , a int [ 10 ] , text char ( 10 ) , ts timestamp [ 10 ] , n numeric [ 10 ] , d date [ 10 ] , inter interval [ 10 ] ); with 0 parameter(s) on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_execute on line 33: using PQexec +[NO_PID]: ecpg_execute on line 59: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_process_output on line 33: OK: CREATE TABLE +[NO_PID]: ecpg_process_output on line 59: OK: CREATE TABLE [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_execute on line 35: query: insert into test ( f , i , a , text ) values ( 404.90 , 3 , '{0,1,2,3,4,5,6,7,8,9}' , 'abcdefghij' ); with 0 parameter(s) on connection regress1 +[NO_PID]: ecpg_execute on line 61: query: insert into test ( f , i , a , text , ts , n , d , inter ) values ( 404.90 , 3 , '{0,1,2,3,4,5,6,7,8,9}' , 'abcdefghij' , $1 , $2 , $3 , $4 ); with 4 parameter(s) on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_execute on line 35: using PQexec +[NO_PID]: ecpg_execute on line 61: using PQexecParams [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_process_output on line 35: OK: INSERT 0 1 +[NO_PID]: ecpg_free_params on line 61: parameter 1 = {2000-01-01 00:00:00,2000-01-01 01:00:00,2000-01-01 02:00:00,2000-01-01 03:00:00,2000-01-01 04:00:00,2000-01-01 05:00:00,2000-01-01 06:00:00,2000-01-01 07:00:00,2000-01-01 08:00:00,2000-01-01 09:00:00} [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_execute on line 37: query: insert into test ( f , i , a , text ) values ( 140787.0 , 2 , $1 , $2 ); with 2 parameter(s) on connection regress1 +[NO_PID]: ecpg_free_params on line 61: parameter 2 = {0.0,1.0,2.0,3.0,4.0,5.0,6.0,7.0,8.0,9.0} [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_execute on line 37: using PQexecParams +[NO_PID]: ecpg_free_params on line 61: parameter 3 = {2000-01-10,2000-01-11,2000-01-12,2000-01-13,2000-01-14,2000-01-15,2000-01-16,2000-01-17,2000-01-18,2000-01-19} [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_free_params on line 37: parameter 1 = {9,8,7,6,5,4,3,2,1,0} +[NO_PID]: ecpg_free_params on line 61: parameter 4 = {@ 10 hours,@ 11 hours,@ 12 hours,@ 13 hours,@ 14 hours,@ 15 hours,@ 16 hours,@ 17 hours,@ 18 hours,@ 19 hours} [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_free_params on line 37: parameter 2 = klmnopqrst +[NO_PID]: ecpg_process_output on line 61: OK: INSERT 0 1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_process_output on line 37: OK: INSERT 0 1 +[NO_PID]: ecpg_execute on line 63: query: insert into test ( f , i , a , text , ts , n , d , inter ) values ( 140787.0 , 2 , $1 , $2 , $3 , $4 , $5 , $6 ); with 6 parameter(s) on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_execute on line 39: query: insert into test ( f , i , a , text ) values ( 14.07 , $1 , $2 , $3 ); with 3 parameter(s) on connection regress1 +[NO_PID]: ecpg_execute on line 63: using PQexecParams [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_execute on line 39: using PQexecParams +[NO_PID]: ecpg_free_params on line 63: parameter 1 = {9,8,7,6,5,4,3,2,1,0} [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_free_params on line 39: parameter 1 = 1 +[NO_PID]: ecpg_free_params on line 63: parameter 2 = klmnopqrst [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_free_params on line 39: parameter 2 = {9,8,7,6,5,4,3,2,1,0} +[NO_PID]: ecpg_free_params on line 63: parameter 3 = {2000-01-01 00:00:00,2000-01-01 01:00:00,2000-01-01 02:00:00,2000-01-01 03:00:00,2000-01-01 04:00:00,2000-01-01 05:00:00,2000-01-01 06:00:00,2000-01-01 07:00:00,2000-01-01 08:00:00,2000-01-01 09:00:00} [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_free_params on line 39: parameter 3 = 0123456789 +[NO_PID]: ecpg_free_params on line 63: parameter 4 = {0.0,1.0,2.0,3.0,4.0,5.0,6.0,7.0,8.0,9.0} [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_process_output on line 39: OK: INSERT 0 1 +[NO_PID]: ecpg_free_params on line 63: parameter 5 = {2000-01-10,2000-01-11,2000-01-12,2000-01-13,2000-01-14,2000-01-15,2000-01-16,2000-01-17,2000-01-18,2000-01-19} [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGtrans on line 41: action "commit"; connection "regress1" +[NO_PID]: ecpg_free_params on line 63: parameter 6 = {@ 10 hours,@ 11 hours,@ 12 hours,@ 13 hours,@ 14 hours,@ 15 hours,@ 16 hours,@ 17 hours,@ 18 hours,@ 19 hours} [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGtrans on line 43: action "begin work"; connection "regress1" +[NO_PID]: ecpg_process_output on line 63: OK: INSERT 0 1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_execute on line 45: query: select f , text from test where i = 1; with 0 parameter(s) on connection regress1 +[NO_PID]: ecpg_execute on line 65: query: insert into test ( f , i , a , text , ts , n , d , inter ) values ( 14.07 , $1 , $2 , $3 , $4 , $5 , $6 , $7 ); with 7 parameter(s) on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_execute on line 45: using PQexec +[NO_PID]: ecpg_execute on line 65: using PQexecParams [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_process_output on line 45: correctly got 1 tuples with 2 fields +[NO_PID]: ecpg_free_params on line 65: parameter 1 = 1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_get_data on line 45: RESULT: 14.07 offset: -1; array: no +[NO_PID]: ecpg_free_params on line 65: parameter 2 = {9,8,7,6,5,4,3,2,1,0} [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_get_data on line 45: RESULT: 0123456789 offset: -1; array: no +[NO_PID]: ecpg_free_params on line 65: parameter 3 = 0123456789 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_execute on line 53: query: select a , text from test where f = $1 ; with 1 parameter(s) on connection regress1 +[NO_PID]: ecpg_free_params on line 65: parameter 4 = {2000-01-01 00:00:00,2000-01-01 01:00:00,2000-01-01 02:00:00,2000-01-01 03:00:00,2000-01-01 04:00:00,2000-01-01 05:00:00,2000-01-01 06:00:00,2000-01-01 07:00:00,2000-01-01 08:00:00,2000-01-01 09:00:00} [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_execute on line 53: using PQexecParams +[NO_PID]: ecpg_free_params on line 65: parameter 5 = {0.0,1.0,2.0,3.0,4.0,5.0,6.0,7.0,8.0,9.0} [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_free_params on line 53: parameter 1 = 140787 +[NO_PID]: ecpg_free_params on line 65: parameter 6 = {2000-01-10,2000-01-11,2000-01-12,2000-01-13,2000-01-14,2000-01-15,2000-01-16,2000-01-17,2000-01-18,2000-01-19} [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_process_output on line 53: correctly got 1 tuples with 2 fields +[NO_PID]: ecpg_free_params on line 65: parameter 7 = {@ 10 hours,@ 11 hours,@ 12 hours,@ 13 hours,@ 14 hours,@ 15 hours,@ 16 hours,@ 17 hours,@ 18 hours,@ 19 hours} [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_is_type_an_array on line 53: type (1007); C (5); array (yes) +[NO_PID]: ecpg_process_output on line 65: OK: INSERT 0 1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_get_data on line 53: RESULT: {9,8,7,6,5,4,3,2,1,0} offset: -1; array: yes +[NO_PID]: ECPGtrans on line 67: action "commit"; connection "regress1" [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_get_data on line 53: RESULT: klmnopqrst offset: -1; array: no +[NO_PID]: ECPGtrans on line 75: action "begin work"; connection "regress1" [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_execute on line 63: query: select a from test where f = $1 ; with 1 parameter(s) on connection regress1 +[NO_PID]: ecpg_execute on line 77: query: select f , text from test where i = 1; with 0 parameter(s) on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_execute on line 63: using PQexecParams +[NO_PID]: ecpg_execute on line 77: using PQexec +[NO_PID]: sqlca: code: 0, state: 00000 +[NO_PID]: ecpg_process_output on line 77: correctly got 1 tuples with 2 fields +[NO_PID]: sqlca: code: 0, state: 00000 +[NO_PID]: ecpg_get_data on line 77: RESULT: 14.07 offset: -1; array: no +[NO_PID]: sqlca: code: 0, state: 00000 +[NO_PID]: ecpg_get_data on line 77: RESULT: 0123456789 offset: -1; array: no +[NO_PID]: sqlca: code: 0, state: 00000 +[NO_PID]: ecpg_execute on line 85: query: select a , text , ts , n , d , inter from test where f = $1 ; with 1 parameter(s) on connection regress1 +[NO_PID]: sqlca: code: 0, state: 00000 +[NO_PID]: ecpg_execute on line 85: using PQexecParams +[NO_PID]: sqlca: code: 0, state: 00000 +[NO_PID]: ecpg_free_params on line 85: parameter 1 = 140787 +[NO_PID]: sqlca: code: 0, state: 00000 +[NO_PID]: ecpg_process_output on line 85: correctly got 1 tuples with 6 fields +[NO_PID]: sqlca: code: 0, state: 00000 +[NO_PID]: ecpg_is_type_an_array on line 85: type (1007); C (3); array (yes) +[NO_PID]: sqlca: code: 0, state: 00000 +[NO_PID]: ecpg_get_data on line 85: RESULT: {9,8,7,6,5,4,3,2,1,0} offset: -1; array: yes +[NO_PID]: sqlca: code: 0, state: 00000 +[NO_PID]: ecpg_get_data on line 85: RESULT: klmnopqrst offset: -1; array: no +[NO_PID]: sqlca: code: 0, state: 00000 +[NO_PID]: ecpg_is_type_an_array on line 85: type (1115); C (19); array (yes) +[NO_PID]: sqlca: code: 0, state: 00000 +[NO_PID]: ecpg_get_data on line 85: RESULT: {"Sat Jan 01 00:00:00 2000","Sat Jan 01 01:00:00 2000","Sat Jan 01 02:00:00 2000","Sat Jan 01 03:00:00 2000","Sat Jan 01 04:00:00 2000","Sat Jan 01 05:00:00 2000","Sat Jan 01 06:00:00 2000","Sat Jan 01 07:00:00 2000","Sat Jan 01 08:00:00 2000","Sat Jan 01 09:00:00 2000"} offset: -1; array: yes +[NO_PID]: sqlca: code: 0, state: 00000 +[NO_PID]: ecpg_is_type_an_array on line 85: type (1231); C (16); array (yes) +[NO_PID]: sqlca: code: 0, state: 00000 +[NO_PID]: ecpg_get_data on line 85: RESULT: {0.0,1.0,2.0,3.0,4.0,5.0,6.0,7.0,8.0,9.0} offset: -1; array: yes +[NO_PID]: sqlca: code: 0, state: 00000 +[NO_PID]: ecpg_is_type_an_array on line 85: type (1182); C (18); array (yes) +[NO_PID]: sqlca: code: 0, state: 00000 +[NO_PID]: ecpg_get_data on line 85: RESULT: {01-10-2000,01-11-2000,01-12-2000,01-13-2000,01-14-2000,01-15-2000,01-16-2000,01-17-2000,01-18-2000,01-19-2000} offset: -1; array: yes +[NO_PID]: sqlca: code: 0, state: 00000 +[NO_PID]: ecpg_is_type_an_array on line 85: type (1187); C (20); array (yes) +[NO_PID]: sqlca: code: 0, state: 00000 +[NO_PID]: ecpg_get_data on line 85: RESULT: {"@ 10 hours","@ 11 hours","@ 12 hours","@ 13 hours","@ 14 hours","@ 15 hours","@ 16 hours","@ 17 hours","@ 18 hours","@ 19 hours"} offset: -1; array: yes +[NO_PID]: sqlca: code: 0, state: 00000 +[NO_PID]: ecpg_execute on line 95: query: select a from test where f = $1 ; with 1 parameter(s) on connection regress1 +[NO_PID]: sqlca: code: 0, state: 00000 +[NO_PID]: ecpg_execute on line 95: using PQexecParams [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_free_params on line 63: parameter 1 = 140787 +[NO_PID]: ecpg_free_params on line 95: parameter 1 = 140787 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_process_output on line 63: correctly got 1 tuples with 1 fields +[NO_PID]: ecpg_process_output on line 95: correctly got 1 tuples with 1 fields [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_get_data on line 63: RESULT: {9,8,7,6,5,4,3,2,1,0} offset: -1; array: yes +[NO_PID]: ecpg_get_data on line 95: RESULT: {9,8,7,6,5,4,3,2,1,0} offset: -1; array: yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_execute on line 70: query: drop table test; with 0 parameter(s) on connection regress1 +[NO_PID]: ecpg_execute on line 102: query: drop table test; with 0 parameter(s) on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_execute on line 70: using PQexec +[NO_PID]: ecpg_execute on line 102: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_process_output on line 70: OK: DROP TABLE +[NO_PID]: ecpg_process_output on line 102: OK: DROP TABLE [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGtrans on line 72: action "commit"; connection "regress1" +[NO_PID]: ECPGtrans on line 104: action "commit"; connection "regress1" [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ecpg_finish: connection regress1 closed [NO_PID]: sqlca: code: 0, state: 00000 |