pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: haiyi_yang@163.com
To: pgsql-bugs@postgresql.org
Subject: BUG #13557: ESQL select issue
Date: Mon, 10 Aug 2015 08:04:39 +0000
Message-ID: <20150810080439.2695.98839@wrigleys.postgresql.org> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-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



view thread (2+ messages)  latest in thread

Message-ID: <20150810080439.2695.98839@wrigleys.postgresql.org>
Permalink:  ../20150810080439.2695.98839@wrigleys.postgresql.org/
Also on:    postgresql.org/message-id/20150810080439.2695.98839@wrigleys.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: haiyi_yang@163.com
  Subject: Re: BUG #13557: ESQL select issue
  In-Reply-To: <20150810080439.2695.98839@wrigleys.postgresql.org>
  References: <20150810080439.2695.98839@wrigleys.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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