Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1ZOoFc-00076S-3j for pgsql-bugs@arkaria.postgresql.org; Mon, 10 Aug 2015 14:40:32 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1ZOoFb-0007Wq-HX for pgsql-bugs@arkaria.postgresql.org; Mon, 10 Aug 2015 14:40:31 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1ZOi5A-0006NF-RQ for pgsql-bugs@postgresql.org; Mon, 10 Aug 2015 08:05:20 +0000 Received: from wrigleys.postgresql.org ([204.145.124.246]) by magus.postgresql.org with esmtp (Exim 4.84) (envelope-from ) id 1ZOi4x-0002Up-Ow for pgsql-bugs@postgresql.org; Mon, 10 Aug 2015 08:05:20 +0000 MIME-Version: 1.0 Subject: BUG #13557: ESQL select issue To: pgsql-bugs@postgresql.org From: haiyi_yang@163.com Date: Mon, 10 Aug 2015 08:04:39 +0000 Message-ID: <20150810080439.2695.98839@wrigleys.postgresql.org> X-Pg-Spam-Score: -1.9 (-) Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org 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