Hi,
If I am retrieving row(s) into a sql descriptor in ECPG, and my last row column is of type timestamp, then I I will consistently receive a segmentation fault as shown below. If I redefine the table so that the timestamp field is not the last field of the table row, the routine runs successfully.
This seems like a bug to me that I will work around by not having a timestamp column as my last column.
I’d put it in the bug category but I am fairly new to postgres so would like to see if there other thoughts on the observation.
I am using ubuntu 10.04 with Postgres V 9.03.
Tnx
Dave
Here is the relavant logic in my ecpg file:
EXEC SQL AT :cid PREPARE ps_registersipusr FROM
"SELECT * FROM RegisterSipUser(?, ?, ?, ?, ?, ?)";
sqlda_t* sqlda = NULL;
97 EXEC SQL AT :cid DECLARE cur_regsip CURSOR FOR ps_registersipusr;
98 EXEC SQL AT :cid OPEN cur_regsip USING :portid, :callid, :contact, :uri, :seq, :expiration;
99 EXEC SQL AT :cid FETCH ALL FROM cur_regsip INTO DESCRIPTOR sqlda;
Here is the distilled down dump received when the expiration/timestamp data type column is my last column in the row.
[21304]: ecpg_execute on line 98: using PQexecParams
..
[21304]: ecpg_execute on line 99: correctly got 2 tuples with 6 fields
[..
[21304]: ecpg_set_native_sqlda on line 99 row 1 col 5 IS NOT NULL
..
[21304]: ecpg_set_native_sqlda on line 99 row 0 col 5 IS NOT NULL
[21304]: ecpg_get_data on line 99: RESULT: 2000-01-01 00:21:56.639667 offset: 0; array: no
[21304]: ecpg_execute on line 99: putting result (1 tuple 6 fields) into sqlda descriptor
*** glibc detected *** /space/dday/av/debug/i686-pc-linux-gnu/bin/dbm: double free or corruption (out):