diff --git a/src/interfaces/ecpg/test/expected/sql-sqlda.stderr b/src/interfaces/ecpg/test/expected/sql-sqlda.stderr
index fdddf9e..ab08a5d 100644
--- a/src/interfaces/ecpg/test/expected/sql-sqlda.stderr
+++ b/src/interfaces/ecpg/test/expected/sql-sqlda.stderr
@@ -2,307 +2,335 @@
 [NO_PID]: sqlca: code: 0, state: 00000
 [NO_PID]: ECPGconnect: opening database ecpg1_regression on <DEFAULT> port <DEFAULT>  
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_execute on line 73: query: set datestyle to iso; with 0 parameter(s) on connection regress1
+[NO_PID]: ecpg_execute on line 81: query: set datestyle to iso; with 0 parameter(s) on connection regress1
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_execute on line 73: using PQexec
+[NO_PID]: ecpg_execute on line 81: using PQexec
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_process_output on line 73: OK: SET
+[NO_PID]: ecpg_process_output on line 81: OK: SET
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_execute on line 76: query: create table t1 ( id integer , t text , d1 numeric , d2 float8 , c char ( 10 ) ); with 0 parameter(s) on connection regress1
+[NO_PID]: ecpg_execute on line 84: query: create table t1 ( id integer , t text , d1 numeric , d2 float8 , c char ( 10 ) , big bigint ); with 0 parameter(s) on connection regress1
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_execute on line 76: using PQexec
+[NO_PID]: ecpg_execute on line 84: using PQexec
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_process_output on line 76: OK: CREATE TABLE
+[NO_PID]: ecpg_process_output on line 84: OK: CREATE TABLE
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_execute on line 84: query: insert into t1 values ( 1 , 'a' , 1.0 , 1 , 'a' ) , ( 2 , null , null , null , null ) , ( 4 , 'd' , 4.0 , 4 , 'd' ); with 0 parameter(s) on connection regress1
+[NO_PID]: ecpg_execute on line 93: query: insert into t1 values ( 1 , 'a' , 1.0 , 1 , 'a' , 1111111111111111111 ) , ( 2 , null , null , null , null , null ) , ( 4 , 'd' , 4.0 , 4 , 'd' , 4444444444444444444 ); with 0 parameter(s) on connection regress1
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_execute on line 84: using PQexec
+[NO_PID]: ecpg_execute on line 93: using PQexec
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_process_output on line 84: OK: INSERT 0 3
+[NO_PID]: ecpg_process_output on line 93: OK: INSERT 0 3
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ECPGtrans on line 90: action "commit"; connection "regress1"
+[NO_PID]: ECPGtrans on line 99: action "commit"; connection "regress1"
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: prepare_common on line 97: name st_id1; query: "SELECT * FROM t1"
+[NO_PID]: prepare_common on line 106: name st_id1; query: "SELECT * FROM t1"
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_execute on line 103: query: declare mycur1 cursor for SELECT * FROM t1; with 0 parameter(s) on connection regress1
+[NO_PID]: ecpg_execute on line 112: query: declare mycur1 cursor for SELECT * FROM t1; with 0 parameter(s) on connection regress1
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_execute on line 103: using PQexec
+[NO_PID]: ecpg_execute on line 112: using PQexec
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_process_output on line 103: OK: DECLARE CURSOR
+[NO_PID]: ecpg_process_output on line 112: OK: DECLARE CURSOR
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_execute on line 111: query: fetch 1 from mycur1; with 0 parameter(s) on connection regress1
+[NO_PID]: ecpg_execute on line 120: query: fetch 1 from mycur1; with 0 parameter(s) on connection regress1
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_execute on line 111: using PQexec
+[NO_PID]: ecpg_execute on line 120: using PQexec
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_process_output on line 111: correctly got 1 tuples with 5 fields
+[NO_PID]: ecpg_process_output on line 120: correctly got 1 tuples with 6 fields
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_build_native_sqlda on line 111 sqld = 5
+[NO_PID]: ecpg_build_native_sqlda on line 120 sqld = 6
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_process_output on line 111: new sqlda was built
+[NO_PID]: ecpg_process_output on line 120: new sqlda was built
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_set_native_sqlda on line 111 row 0 col 0 IS NOT NULL
+[NO_PID]: ecpg_set_native_sqlda on line 120 row 0 col 0 IS NOT NULL
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_get_data on line 111: RESULT: 1 offset: -1; array: no
+[NO_PID]: ecpg_get_data on line 120: RESULT: 1 offset: -1; array: no
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_set_native_sqlda on line 111 row 0 col 1 IS NOT NULL
+[NO_PID]: ecpg_set_native_sqlda on line 120 row 0 col 1 IS NOT NULL
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_get_data on line 111: RESULT: a offset: -1; array: no
+[NO_PID]: ecpg_get_data on line 120: RESULT: a offset: -1; array: no
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_set_native_sqlda on line 111 row 0 col 2 IS NOT NULL
+[NO_PID]: ecpg_set_native_sqlda on line 120 row 0 col 2 IS NOT NULL
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_set_native_sqlda on line 111 row 0 col 3 IS NOT NULL
+[NO_PID]: ecpg_set_native_sqlda on line 120 row 0 col 3 IS NOT NULL
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_get_data on line 111: RESULT: 1 offset: -1; array: no
+[NO_PID]: ecpg_get_data on line 120: RESULT: 1 offset: -1; array: no
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_set_native_sqlda on line 111 row 0 col 4 IS NOT NULL
+[NO_PID]: ecpg_set_native_sqlda on line 120 row 0 col 4 IS NOT NULL
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_get_data on line 111: RESULT: a          offset: -1; array: no
+[NO_PID]: ecpg_get_data on line 120: RESULT: a          offset: -1; array: no
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_process_output on line 111: putting result (1 tuple 5 fields) into sqlda descriptor
+[NO_PID]: ecpg_set_native_sqlda on line 120 row 0 col 5 IS NOT NULL
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_execute on line 111: query: fetch 1 from mycur1; with 0 parameter(s) on connection regress1
+[NO_PID]: ecpg_get_data on line 120: RESULT: 1111111111111111111 offset: -1; array: no
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_execute on line 111: using PQexec
+[NO_PID]: ecpg_process_output on line 120: putting result (1 tuple 6 fields) into sqlda descriptor
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_process_output on line 111: correctly got 1 tuples with 5 fields
+[NO_PID]: ecpg_execute on line 120: query: fetch 1 from mycur1; with 0 parameter(s) on connection regress1
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_build_native_sqlda on line 111 sqld = 5
+[NO_PID]: ecpg_execute on line 120: using PQexec
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_process_output on line 111: new sqlda was built
+[NO_PID]: ecpg_process_output on line 120: correctly got 1 tuples with 6 fields
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_set_native_sqlda on line 111 row 0 col 0 IS NOT NULL
+[NO_PID]: ecpg_build_native_sqlda on line 120 sqld = 6
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_get_data on line 111: RESULT: 2 offset: -1; array: no
+[NO_PID]: ecpg_process_output on line 120: new sqlda was built
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_set_native_sqlda on line 111 row 0 col 1 IS NULL
+[NO_PID]: ecpg_set_native_sqlda on line 120 row 0 col 0 IS NOT NULL
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_set_native_sqlda on line 111 row 0 col 2 IS NULL
+[NO_PID]: ecpg_get_data on line 120: RESULT: 2 offset: -1; array: no
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_set_native_sqlda on line 111 row 0 col 3 IS NULL
+[NO_PID]: ecpg_set_native_sqlda on line 120 row 0 col 1 IS NULL
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_set_native_sqlda on line 111 row 0 col 4 IS NULL
+[NO_PID]: ecpg_set_native_sqlda on line 120 row 0 col 2 IS NULL
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_process_output on line 111: putting result (1 tuple 5 fields) into sqlda descriptor
+[NO_PID]: ecpg_set_native_sqlda on line 120 row 0 col 3 IS NULL
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_execute on line 111: query: fetch 1 from mycur1; with 0 parameter(s) on connection regress1
+[NO_PID]: ecpg_set_native_sqlda on line 120 row 0 col 4 IS NULL
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_execute on line 111: using PQexec
+[NO_PID]: ecpg_set_native_sqlda on line 120 row 0 col 5 IS NULL
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_process_output on line 111: correctly got 1 tuples with 5 fields
+[NO_PID]: ecpg_process_output on line 120: putting result (1 tuple 6 fields) into sqlda descriptor
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_build_native_sqlda on line 111 sqld = 5
+[NO_PID]: ecpg_execute on line 120: query: fetch 1 from mycur1; with 0 parameter(s) on connection regress1
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_process_output on line 111: new sqlda was built
+[NO_PID]: ecpg_execute on line 120: using PQexec
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_set_native_sqlda on line 111 row 0 col 0 IS NOT NULL
+[NO_PID]: ecpg_process_output on line 120: correctly got 1 tuples with 6 fields
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_get_data on line 111: RESULT: 4 offset: -1; array: no
+[NO_PID]: ecpg_build_native_sqlda on line 120 sqld = 6
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_set_native_sqlda on line 111 row 0 col 1 IS NOT NULL
+[NO_PID]: ecpg_process_output on line 120: new sqlda was built
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_get_data on line 111: RESULT: d offset: -1; array: no
+[NO_PID]: ecpg_set_native_sqlda on line 120 row 0 col 0 IS NOT NULL
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_set_native_sqlda on line 111 row 0 col 2 IS NOT NULL
+[NO_PID]: ecpg_get_data on line 120: RESULT: 4 offset: -1; array: no
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_set_native_sqlda on line 111 row 0 col 3 IS NOT NULL
+[NO_PID]: ecpg_set_native_sqlda on line 120 row 0 col 1 IS NOT NULL
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_get_data on line 111: RESULT: 4 offset: -1; array: no
+[NO_PID]: ecpg_get_data on line 120: RESULT: d offset: -1; array: no
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_set_native_sqlda on line 111 row 0 col 4 IS NOT NULL
+[NO_PID]: ecpg_set_native_sqlda on line 120 row 0 col 2 IS NOT NULL
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_get_data on line 111: RESULT: d          offset: -1; array: no
+[NO_PID]: ecpg_set_native_sqlda on line 120 row 0 col 3 IS NOT NULL
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_process_output on line 111: putting result (1 tuple 5 fields) into sqlda descriptor
+[NO_PID]: ecpg_get_data on line 120: RESULT: 4 offset: -1; array: no
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_execute on line 111: query: fetch 1 from mycur1; with 0 parameter(s) on connection regress1
+[NO_PID]: ecpg_set_native_sqlda on line 120 row 0 col 4 IS NOT NULL
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_execute on line 111: using PQexec
+[NO_PID]: ecpg_get_data on line 120: RESULT: d          offset: -1; array: no
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_process_output on line 111: correctly got 0 tuples with 5 fields
+[NO_PID]: ecpg_set_native_sqlda on line 120 row 0 col 5 IS NOT NULL
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: raising sqlcode 100 on line 111: no data found on line 111
-[NO_PID]: sqlca: code: 100, state: 02000
-[NO_PID]: ecpg_execute on line 120: query: close mycur1; with 0 parameter(s) on connection regress1
+[NO_PID]: ecpg_get_data on line 120: RESULT: 4444444444444444444 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 120: putting result (1 tuple 6 fields) into sqlda descriptor
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 120: query: fetch 1 from mycur1; with 0 parameter(s) on connection regress1
 [NO_PID]: sqlca: code: 0, state: 00000
 [NO_PID]: ecpg_execute on line 120: using PQexec
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_process_output on line 120: OK: CLOSE CURSOR
+[NO_PID]: ecpg_process_output on line 120: correctly got 0 tuples with 6 fields
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: raising sqlcode 100 on line 120: no data found on line 120
+[NO_PID]: sqlca: code: 100, state: 02000
+[NO_PID]: ecpg_execute on line 129: query: close mycur1; with 0 parameter(s) on connection regress1
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 129: using PQexec
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: deallocate_one on line 123: name st_id1
+[NO_PID]: ecpg_process_output on line 129: OK: CLOSE CURSOR
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: prepare_common on line 132: name st_id2; query: "SELECT * FROM t1"
+[NO_PID]: deallocate_one on line 132: name st_id1
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_execute on line 138: query: declare mycur2 cursor for SELECT * FROM t1; with 0 parameter(s) on connection regress1
+[NO_PID]: prepare_common on line 141: name st_id2; query: "SELECT * FROM t1"
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_execute on line 138: using PQexec
+[NO_PID]: ecpg_execute on line 147: query: declare mycur2 cursor for SELECT * FROM t1; with 0 parameter(s) on connection regress1
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_process_output on line 138: OK: DECLARE CURSOR
+[NO_PID]: ecpg_execute on line 147: using PQexec
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_execute on line 141: query: fetch all from mycur2; with 0 parameter(s) on connection regress1
+[NO_PID]: ecpg_process_output on line 147: OK: DECLARE CURSOR
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_execute on line 141: using PQexec
+[NO_PID]: ecpg_execute on line 150: query: fetch all from mycur2; with 0 parameter(s) on connection regress1
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_process_output on line 141: correctly got 3 tuples with 5 fields
+[NO_PID]: ecpg_execute on line 150: using PQexec
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_build_native_sqlda on line 141 sqld = 5
+[NO_PID]: ecpg_process_output on line 150: correctly got 3 tuples with 6 fields
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_process_output on line 141: new sqlda was built
+[NO_PID]: ecpg_build_native_sqlda on line 150 sqld = 6
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_set_native_sqlda on line 141 row 2 col 0 IS NOT NULL
+[NO_PID]: ecpg_process_output on line 150: new sqlda was built
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_get_data on line 141: RESULT: 4 offset: -1; array: no
+[NO_PID]: ecpg_set_native_sqlda on line 150 row 2 col 0 IS NOT NULL
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_set_native_sqlda on line 141 row 2 col 1 IS NOT NULL
+[NO_PID]: ecpg_get_data on line 150: RESULT: 4 offset: -1; array: no
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_get_data on line 141: RESULT: d offset: -1; array: no
+[NO_PID]: ecpg_set_native_sqlda on line 150 row 2 col 1 IS NOT NULL
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_set_native_sqlda on line 141 row 2 col 2 IS NOT NULL
+[NO_PID]: ecpg_get_data on line 150: RESULT: d offset: -1; array: no
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_set_native_sqlda on line 141 row 2 col 3 IS NOT NULL
+[NO_PID]: ecpg_set_native_sqlda on line 150 row 2 col 2 IS NOT NULL
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_get_data on line 141: RESULT: 4 offset: -1; array: no
+[NO_PID]: ecpg_set_native_sqlda on line 150 row 2 col 3 IS NOT NULL
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_set_native_sqlda on line 141 row 2 col 4 IS NOT NULL
+[NO_PID]: ecpg_get_data on line 150: RESULT: 4 offset: -1; array: no
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_get_data on line 141: RESULT: d          offset: -1; array: no
+[NO_PID]: ecpg_set_native_sqlda on line 150 row 2 col 4 IS NOT NULL
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_process_output on line 141: putting result (1 tuple 5 fields) into sqlda descriptor
+[NO_PID]: ecpg_get_data on line 150: RESULT: d          offset: -1; array: no
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_build_native_sqlda on line 141 sqld = 5
+[NO_PID]: ecpg_set_native_sqlda on line 150 row 2 col 5 IS NOT NULL
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_process_output on line 141: new sqlda was built
+[NO_PID]: ecpg_get_data on line 150: RESULT: 4444444444444444444 offset: -1; array: no
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_set_native_sqlda on line 141 row 1 col 0 IS NOT NULL
+[NO_PID]: ecpg_process_output on line 150: putting result (1 tuple 6 fields) into sqlda descriptor
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_get_data on line 141: RESULT: 2 offset: -1; array: no
+[NO_PID]: ecpg_build_native_sqlda on line 150 sqld = 6
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_set_native_sqlda on line 141 row 1 col 1 IS NULL
+[NO_PID]: ecpg_process_output on line 150: new sqlda was built
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_set_native_sqlda on line 141 row 1 col 2 IS NULL
+[NO_PID]: ecpg_set_native_sqlda on line 150 row 1 col 0 IS NOT NULL
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_set_native_sqlda on line 141 row 1 col 3 IS NULL
+[NO_PID]: ecpg_get_data on line 150: RESULT: 2 offset: -1; array: no
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_set_native_sqlda on line 141 row 1 col 4 IS NULL
+[NO_PID]: ecpg_set_native_sqlda on line 150 row 1 col 1 IS NULL
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_process_output on line 141: putting result (1 tuple 5 fields) into sqlda descriptor
+[NO_PID]: ecpg_set_native_sqlda on line 150 row 1 col 2 IS NULL
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_build_native_sqlda on line 141 sqld = 5
+[NO_PID]: ecpg_set_native_sqlda on line 150 row 1 col 3 IS NULL
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_process_output on line 141: new sqlda was built
+[NO_PID]: ecpg_set_native_sqlda on line 150 row 1 col 4 IS NULL
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_set_native_sqlda on line 141 row 0 col 0 IS NOT NULL
+[NO_PID]: ecpg_set_native_sqlda on line 150 row 1 col 5 IS NULL
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_get_data on line 141: RESULT: 1 offset: -1; array: no
+[NO_PID]: ecpg_process_output on line 150: putting result (1 tuple 6 fields) into sqlda descriptor
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_set_native_sqlda on line 141 row 0 col 1 IS NOT NULL
+[NO_PID]: ecpg_build_native_sqlda on line 150 sqld = 6
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_get_data on line 141: RESULT: a offset: -1; array: no
+[NO_PID]: ecpg_process_output on line 150: new sqlda was built
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_set_native_sqlda on line 141 row 0 col 2 IS NOT NULL
+[NO_PID]: ecpg_set_native_sqlda on line 150 row 0 col 0 IS NOT NULL
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_set_native_sqlda on line 141 row 0 col 3 IS NOT NULL
+[NO_PID]: ecpg_get_data on line 150: RESULT: 1 offset: -1; array: no
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_get_data on line 141: RESULT: 1 offset: -1; array: no
+[NO_PID]: ecpg_set_native_sqlda on line 150 row 0 col 1 IS NOT NULL
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_set_native_sqlda on line 141 row 0 col 4 IS NOT NULL
+[NO_PID]: ecpg_get_data on line 150: RESULT: a offset: -1; array: no
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_get_data on line 141: RESULT: a          offset: -1; array: no
+[NO_PID]: ecpg_set_native_sqlda on line 150 row 0 col 2 IS NOT NULL
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_process_output on line 141: putting result (1 tuple 5 fields) into sqlda descriptor
+[NO_PID]: ecpg_set_native_sqlda on line 150 row 0 col 3 IS NOT NULL
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_execute on line 157: query: close mycur2; with 0 parameter(s) on connection regress1
+[NO_PID]: ecpg_get_data on line 150: RESULT: 1 offset: -1; array: no
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_execute on line 157: using PQexec
+[NO_PID]: ecpg_set_native_sqlda on line 150 row 0 col 4 IS NOT NULL
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_process_output on line 157: OK: CLOSE CURSOR
+[NO_PID]: ecpg_get_data on line 150: RESULT: a          offset: -1; array: no
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: deallocate_one on line 160: name st_id2
+[NO_PID]: ecpg_set_native_sqlda on line 150 row 0 col 5 IS NOT NULL
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: prepare_common on line 182: name st_id3; query: "SELECT * FROM t1 WHERE id = $1"
+[NO_PID]: ecpg_get_data on line 150: RESULT: 1111111111111111111 offset: -1; array: no
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_execute on line 185: query: SELECT * FROM t1 WHERE id = $1; with 1 parameter(s) on connection regress1
+[NO_PID]: ecpg_process_output on line 150: putting result (1 tuple 6 fields) into sqlda descriptor
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_execute on line 185: using PQexecPrepared for "SELECT * FROM t1 WHERE id = $1"
+[NO_PID]: ecpg_execute on line 166: query: close mycur2; with 0 parameter(s) on connection regress1
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_free_params on line 185: parameter 1 = 4
+[NO_PID]: ecpg_execute on line 166: using PQexec
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_process_output on line 185: correctly got 1 tuples with 5 fields
+[NO_PID]: ecpg_process_output on line 166: OK: CLOSE CURSOR
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_build_native_sqlda on line 185 sqld = 5
+[NO_PID]: deallocate_one on line 169: name st_id2
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_process_output on line 185: new sqlda was built
+[NO_PID]: prepare_common on line 191: name st_id3; query: "SELECT * FROM t1 WHERE id = $1"
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_set_native_sqlda on line 185 row 0 col 0 IS NOT NULL
+[NO_PID]: ecpg_execute on line 194: query: SELECT * FROM t1 WHERE id = $1; with 1 parameter(s) on connection regress1
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_get_data on line 185: RESULT: 4 offset: -1; array: no
+[NO_PID]: ecpg_execute on line 194: using PQexecPrepared for "SELECT * FROM t1 WHERE id = $1"
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_set_native_sqlda on line 185 row 0 col 1 IS NOT NULL
+[NO_PID]: ecpg_free_params on line 194: parameter 1 = 4
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_get_data on line 185: RESULT: d offset: -1; array: no
+[NO_PID]: ecpg_process_output on line 194: correctly got 1 tuples with 6 fields
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_set_native_sqlda on line 185 row 0 col 2 IS NOT NULL
+[NO_PID]: ecpg_build_native_sqlda on line 194 sqld = 6
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_set_native_sqlda on line 185 row 0 col 3 IS NOT NULL
+[NO_PID]: ecpg_process_output on line 194: new sqlda was built
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_get_data on line 185: RESULT: 4 offset: -1; array: no
+[NO_PID]: ecpg_set_native_sqlda on line 194 row 0 col 0 IS NOT NULL
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_set_native_sqlda on line 185 row 0 col 4 IS NOT NULL
+[NO_PID]: ecpg_get_data on line 194: RESULT: 4 offset: -1; array: no
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_get_data on line 185: RESULT: d          offset: -1; array: no
+[NO_PID]: ecpg_set_native_sqlda on line 194 row 0 col 1 IS NOT NULL
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_process_output on line 185: putting result (1 tuple 5 fields) into sqlda descriptor
+[NO_PID]: ecpg_get_data on line 194: RESULT: d offset: -1; array: no
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: deallocate_one on line 190: name st_id3
+[NO_PID]: ecpg_set_native_sqlda on line 194 row 0 col 2 IS NOT NULL
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_set_native_sqlda on line 194 row 0 col 3 IS NOT NULL
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 194: RESULT: 4 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_set_native_sqlda on line 194 row 0 col 4 IS NOT NULL
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 194: RESULT: d          offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_set_native_sqlda on line 194 row 0 col 5 IS NOT NULL
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_get_data on line 194: RESULT: 4444444444444444444 offset: -1; array: no
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_process_output on line 194: putting result (1 tuple 6 fields) into sqlda descriptor
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: deallocate_one on line 199: name st_id3
 [NO_PID]: sqlca: code: 0, state: 00000
 [NO_PID]: ECPGconnect: opening database ecpg1_regression on <DEFAULT> port <DEFAULT>  
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: prepare_common on line 219: name st_id4; query: "SELECT * FROM t1 WHERE id = $1"
+[NO_PID]: prepare_common on line 228: name st_id4; query: "SELECT * FROM t1 WHERE id = $1"
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 231: query: SELECT * FROM t1 WHERE id = $1; with 1 parameter(s) on connection con2
+[NO_PID]: sqlca: code: 0, state: 00000
+[NO_PID]: ecpg_execute on line 231: using PQexecPrepared for "SELECT * FROM t1 WHERE id = $1"
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_execute on line 222: query: SELECT * FROM t1 WHERE id = $1; with 1 parameter(s) on connection con2
+[NO_PID]: ecpg_free_params on line 231: parameter 1 = 4
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_execute on line 222: using PQexecPrepared for "SELECT * FROM t1 WHERE id = $1"
+[NO_PID]: ecpg_process_output on line 231: correctly got 1 tuples with 6 fields
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_free_params on line 222: parameter 1 = 4
+[NO_PID]: ecpg_build_native_sqlda on line 231 sqld = 6
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_process_output on line 222: correctly got 1 tuples with 5 fields
+[NO_PID]: ecpg_process_output on line 231: new sqlda was built
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_build_native_sqlda on line 222 sqld = 5
+[NO_PID]: ecpg_set_native_sqlda on line 231 row 0 col 0 IS NOT NULL
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_process_output on line 222: new sqlda was built
+[NO_PID]: ecpg_get_data on line 231: RESULT: 4 offset: -1; array: no
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_set_native_sqlda on line 222 row 0 col 0 IS NOT NULL
+[NO_PID]: ecpg_set_native_sqlda on line 231 row 0 col 1 IS NOT NULL
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_get_data on line 222: RESULT: 4 offset: -1; array: no
+[NO_PID]: ecpg_get_data on line 231: RESULT: d offset: -1; array: no
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_set_native_sqlda on line 222 row 0 col 1 IS NOT NULL
+[NO_PID]: ecpg_set_native_sqlda on line 231 row 0 col 2 IS NOT NULL
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_get_data on line 222: RESULT: d offset: -1; array: no
+[NO_PID]: ecpg_set_native_sqlda on line 231 row 0 col 3 IS NOT NULL
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_set_native_sqlda on line 222 row 0 col 2 IS NOT NULL
+[NO_PID]: ecpg_get_data on line 231: RESULT: 4 offset: -1; array: no
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_set_native_sqlda on line 222 row 0 col 3 IS NOT NULL
+[NO_PID]: ecpg_set_native_sqlda on line 231 row 0 col 4 IS NOT NULL
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_get_data on line 222: RESULT: 4 offset: -1; array: no
+[NO_PID]: ecpg_get_data on line 231: RESULT: d          offset: -1; array: no
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_set_native_sqlda on line 222 row 0 col 4 IS NOT NULL
+[NO_PID]: ecpg_set_native_sqlda on line 231 row 0 col 5 IS NOT NULL
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_get_data on line 222: RESULT: d          offset: -1; array: no
+[NO_PID]: ecpg_get_data on line 231: RESULT: 4444444444444444444 offset: -1; array: no
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_process_output on line 222: putting result (1 tuple 5 fields) into sqlda descriptor
+[NO_PID]: ecpg_process_output on line 231: putting result (1 tuple 6 fields) into sqlda descriptor
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ECPGtrans on line 227: action "commit"; connection "con2"
+[NO_PID]: ECPGtrans on line 236: action "commit"; connection "con2"
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: deallocate_one on line 230: name st_id4
+[NO_PID]: deallocate_one on line 239: name st_id4
 [NO_PID]: sqlca: code: 0, state: 00000
 [NO_PID]: ecpg_finish: connection con2 closed
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_execute on line 241: query: drop table t1; with 0 parameter(s) on connection regress1
+[NO_PID]: ecpg_execute on line 250: query: drop table t1; with 0 parameter(s) on connection regress1
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_execute on line 241: using PQexec
+[NO_PID]: ecpg_execute on line 250: using PQexec
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_process_output on line 241: OK: DROP TABLE
+[NO_PID]: ecpg_process_output on line 250: OK: DROP TABLE
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ECPGtrans on line 244: action "commit"; connection "regress1"
+[NO_PID]: ECPGtrans on line 253: 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
diff --git a/src/interfaces/ecpg/test/expected/sql-sqlda.stdout b/src/interfaces/ecpg/test/expected/sql-sqlda.stdout
index a59c2e3..0600d5a 100644
--- a/src/interfaces/ecpg/test/expected/sql-sqlda.stdout
+++ b/src/interfaces/ecpg/test/expected/sql-sqlda.stdout
@@ -4,45 +4,53 @@ name sqlda descriptor: 't' value 'a'
 name sqlda descriptor: 'd1' value NUMERIC '1.0'
 name sqlda descriptor: 'd2' value 1.000000
 name sqlda descriptor: 'c' value 'a         '
+name sqlda descriptor: 'big' value '1111111111111111111 '
 FETCH RECORD 2
 name sqlda descriptor: 'id' value 2
 name sqlda descriptor: 't' value NULL'
 name sqlda descriptor: 'd1' value NULL'
 name sqlda descriptor: 'd2' value NULL'
 name sqlda descriptor: 'c' value NULL'
+name sqlda descriptor: 'big' value NULL'
 FETCH RECORD 3
 name sqlda descriptor: 'id' value 4
 name sqlda descriptor: 't' value 'd'
 name sqlda descriptor: 'd1' value NUMERIC '4.0'
 name sqlda descriptor: 'd2' value 4.000000
 name sqlda descriptor: 'c' value 'd         '
+name sqlda descriptor: 'big' value '4444444444444444444 '
 FETCH RECORD 1
 name sqlda descriptor: 'id' value 1
 name sqlda descriptor: 't' value 'a'
 name sqlda descriptor: 'd1' value NUMERIC '1.0'
 name sqlda descriptor: 'd2' value 1.000000
 name sqlda descriptor: 'c' value 'a         '
+name sqlda descriptor: 'big' value '1111111111111111111 '
 FETCH RECORD 2
 name sqlda descriptor: 'id' value 2
 name sqlda descriptor: 't' value NULL'
 name sqlda descriptor: 'd1' value NULL'
 name sqlda descriptor: 'd2' value NULL'
 name sqlda descriptor: 'c' value NULL'
+name sqlda descriptor: 'big' value NULL'
 FETCH RECORD 3
 name sqlda descriptor: 'id' value 4
 name sqlda descriptor: 't' value 'd'
 name sqlda descriptor: 'd1' value NUMERIC '4.0'
 name sqlda descriptor: 'd2' value 4.000000
 name sqlda descriptor: 'c' value 'd         '
+name sqlda descriptor: 'big' value '4444444444444444444 '
 EXECUTE RECORD 4
 name sqlda descriptor: 'id' value 4
 name sqlda descriptor: 't' value 'd'
 name sqlda descriptor: 'd1' value NUMERIC '4.0'
 name sqlda descriptor: 'd2' value 4.000000
 name sqlda descriptor: 'c' value 'd         '
+name sqlda descriptor: 'big' value '4444444444444444444 '
 EXECUTE RECORD 4
 name sqlda descriptor: 'id' value 4
 name sqlda descriptor: 't' value 'd'
 name sqlda descriptor: 'd1' value NUMERIC '4.0'
 name sqlda descriptor: 'd2' value 4.000000
 name sqlda descriptor: 'c' value 'd         '
+name sqlda descriptor: 'big' value '4444444444444444444 '
diff --git a/src/interfaces/ecpg/test/sql/sqlda.pgc b/src/interfaces/ecpg/test/sql/sqlda.pgc
index eaf5c6f..7eff478 100644
--- a/src/interfaces/ecpg/test/sql/sqlda.pgc
+++ b/src/interfaces/ecpg/test/sql/sqlda.pgc
@@ -48,6 +48,13 @@ dump_sqlda(sqlda_t *sqlda)
 				free(val);
 				break;
 			}
+		case ECPGt_long_long:
+			{
+				long long int longlongval;
+				memcpy(&longlongval, sqlda->sqlvar[i].sqldata, sqlda->sqlvar[i].sqllen);
+				printf("name sqlda descriptor: '%s' value '%-20lld'\n", sqlda->sqlvar[i].sqlname.data, longlongval);
+				break;
+			}
 		}
 	}
 }
@@ -78,13 +85,15 @@ exec sql end declare section;
 		t text,
 		d1 numeric,
 		d2 float8,
-		c char(10));
+		c char(10),
+		big bigint
+		);
 
 	strcpy(msg, "insert");
 	exec sql insert into t1 values
-		(1, 'a', 1.0, 1, 'a'),
-		(2, null, null, null, null),
-		(4, 'd', 4.0, 4, 'd');
+		(1, 'a', 1.0, 1, 'a',1111111111111111111),
+		(2, null, null, null, null,null),
+		(4, 'd', 4.0, 4, 'd',4444444444444444444);
 
 	strcpy(msg, "commit");
 	exec sql commit;
