Re: ESQL/C no indicator variables ./. error -213 - Mailing list pgsql-general

From Tom Lane
Subject Re: ESQL/C no indicator variables ./. error -213
Date
Msg-id 1549533.1592492641@sss.pgh.pa.us
Whole thread Raw
In response to Re: ESQL/C no indicator variables ./. error -213  (Matthias Apitz <guru@unixarea.de>)
Responses Re: ESQL/C no indicator variables ./. error -213  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
Matthias Apitz <guru@unixarea.de> 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



pgsql-general by date:

Previous
From: Laurenz Albe
Date:
Subject: Re: autovacuum failing on pg_largeobject and disk usage of thepg_largeobject growing unchecked
Next
From: Tom Lane
Date:
Subject: Re: ESQL/C no indicator variables ./. error -213