BUG #13557: ESQL select issue

From: haiyi_yang(at)163(dot)com
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #13557: ESQL select issue
Date: 2015-08-10 08:04:39
Message-ID: 20150810080439.2695.98839@wrigleys.postgresql.org
Views: Raw Message | Whole Thread | Download mbox
Thread:
Lists: pgsql-bugs

The following bug has been logged on the website:

Bug reference: 13557
Logged by: yang
Email address: haiyi_yang(at)163(dot)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(at)192(dot)168(dot)2(dot)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 =

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Bruce Momjian 2015-08-10 12:21:56 Re: [BUGS] PostgreSQL 9.4.4 Solaris 10 i386 download links point to Sparc binaries
Previous Message Haribabu Kommi 2015-08-10 01:41:39 Re: Memory leak with PL/Python trigger