pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
BUG #13557: ESQL select issue
2+ messages / 2 participants
[nested] [flat]

* BUG #13557: ESQL select issue
@ 2015-08-10 08:04 haiyi_yang@163.com
  2015-08-11 08:10 ` Re: BUG #13557: ESQL select issue Michael Meskes <meskes@postgresql.org>
  0 siblings, 1 reply; 2+ messages in thread

From: haiyi_yang@163.com @ 2015-08-10 08:04 UTC (permalink / raw)
  To: pgsql-bugs

The following bug has been logged on the website:

Bug reference:      13557
Logged by:          yang
Email address:      haiyi_yang@163.com
PostgreSQL version: 9.4.0
Operating system:   Linux 6
Description:        

Step:
1. In postgres database create a table and insert a record.
(1). create table ff (a char(20), b numeric(38,0), c date, d char(20));
(2). insert into ff values(NULL, 123, DATE'2011-02-03 04:05:06', 'AAAAAA');
2. Edit ESQL program, use ecpg compile.
EXEC SQL BEGIN DECLARE SECTION;
    char     cv[64];
    char     vcv[64];
    char     ncv[64];
    double   bind;
EXEC SQL END DECLARE SECTIEXEC SQL CONNECT TO
'postgres@192.168.2.119:266666' USER 'postgre' IDENTIFIED BY '123456';
EXEC SQL SELECT a, b, c, d INTO :cv, :bind, :vcv, :ncv FROM ff where b=123;
printf("a = %s, b = %lf, c = %s, d = %s\n", cv, bind, vcv, ncv);
EXEC SQL DISCONNECT ALL;

Output:
a = , b = 0.000000, c = , d = 


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: BUG #13557: ESQL select issue
  2015-08-10 08:04 BUG #13557: ESQL select issue haiyi_yang@163.com
@ 2015-08-11 08:10 ` Michael Meskes <meskes@postgresql.org>
  0 siblings, 0 replies; 2+ messages in thread

From: Michael Meskes @ 2015-08-11 08:10 UTC (permalink / raw)
  To: haiyi_yang@163.com; +Cc: pgsql-bugs

On Mon, Aug 10, 2015 at 08:04:39AM +0000, haiyi_yang@163.com wrote:
> The following bug has been logged on the website:
> ...

And the bug is where?

If you had any error checking in our code you'd have noticed that libecpg
throws an error, namely ECPG_MISSING_INDICATOR. I'm pretty sure your example
will work flawlesly if you either add an indicator or put some value into a.

Michael
-- 
Michael Meskes
Michael at Fam-Meskes dot De, Michael at Meskes dot (De|Com|Net|Org)
Meskes at (Debian|Postgresql) dot Org
Jabber: michael.meskes at gmail dot com
VfL Borussia! Força Barça! Go SF 49ers! Use Debian GNU/Linux, PostgreSQL


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2015-08-11 08:10 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2015-08-10 08:04 BUG #13557: ESQL select issue haiyi_yang@163.com
2015-08-11 08:10 ` Michael Meskes <meskes@postgresql.org>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox