Matthias Apitz <guru@xxxxxxxxxxx> writes: > El día Mittwoch, Juni 17, 2020 a las 01:39:53 -0400, Tom Lane escribió: >> Could you provide a self-contained test case for this? It's hard to >> guess at what the problem might be. > attached is a simple ESQL/C code; > ... > [6485] [18.06.2020 08:26:38:436]: ecpg_execute on line 36: query: select tstchar25 , tstint from dbctest where tstint = 1; with 0 parameter(s) on connection sisis > [6485] [18.06.2020 08:26:38:437]: ecpg_execute on line 36: using PQexec > [6485] [18.06.2020 08:26:38:437]: ecpg_process_output on line 36: correctly got 1 tuples with 2 fields > [6485] [18.06.2020 08:26:38:437]: ecpg_get_data on line 36: RESULT: offset: 80; array: no > [6485] [18.06.2020 08:26:38:437]: raising sqlcode -213 on line 36: null value without indicator on line 36 > [6485] [18.06.2020 08:26:38:438]: ecpg_finish: connection sisis closed Hmm. Trying this here, I get $ ./embedded hostvariable 'tstint' before SELECT tstchar25, tstint INTO :tstchar25, :tstint FROM dbctest: 99 hostvariable 'tstint' after SELECT tstchar25, tstint INTO :tstchar25, :tstint FROM dbctest with -213: 1 ... [1549069]: ecpg_execute on line 38: query: select tstchar25 , tstint from dbctes t where tstint = 1; with 0 parameter(s) on connection sisis [1549069]: ecpg_execute on line 38: using PQexec [1549069]: ecpg_process_output on line 38: correctly got 1 tuples with 2 fields [1549069]: ecpg_get_data on line 38: RESULT: offset: 8 0; array: no [1549069]: ecpg_get_data on line 38: RESULT: 1 offset: 4; array: no [1549069]: ecpg_finish: connection sisis closed which looks like the right thing. I don't pay much attention to ECPG development, but it seems like you must be hitting a bug that's been fixed. Are your ecpg and libecpg up to date? regards, tom lane