X-Original-To: pgsql-novice-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.130]) by svr1.postgresql.org (Postfix) with ESMTP id 60182D1B4E1 for ; Thu, 9 Oct 2003 17:29:52 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (neptune.hub.org [64.117.224.130]) (amavisd-new, port 10024) with ESMTP id 78914-05 for ; Thu, 9 Oct 2003 14:29:07 -0300 (ADT) Received: from flock1.newmail.ru (flock1.newmail.ru [212.48.140.157]) by svr1.postgresql.org (Postfix) with SMTP id 03374D1B4ED for ; Thu, 9 Oct 2003 14:29:05 -0300 (ADT) Received: (qmail 24751 invoked by alias); 9 Oct 2003 17:29:03 -0000 Message-ID: <20031009172903.24750.qmail@flock1.newmail.ru> From: Slava Gorski To: pgsql-novice@postgresql.org Subject: get diagnostics not supported by ecpg? Cc: pgsql-sql@postgresql.org X-Priority: 3 MIME-Version: 1.0 X-Mailer: DenMail v1.0 by ORC X-Uid: 8365 X-RemoteIP: 213.221.55.67 (unknown) Date: Thu, 09 Oct 2003 21:29:03 +0400 Content-type: text/plain; charset="koi8-r" X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200310/128 X-Sequence-Number: 8565 Hi all, It seems that get diagnostics is not supported by ecpg in postgresql 7.3, I always get the following error when trying to use it: ERROR: parse error at or near "diagnostics" For example, the following code does not compile: #include int main() { EXEC SQL BEGIN DECLARE SECTION; char msg[8191]; int msg_len=0; EXEC SQL END DECLARE SECTION; EXEC SQL connect to 'test'; EXEC SQL get diagnostics :msg_len=ROW_COUNT; fprintf(stderr, "SQL: %d\n", msg_len); EXEC SQL disconnect current; return 0; } same if I use EXEC SQL get diagnostics exception 1 :msg=MESSAGE_TEXT, :msg_len=MESSAGE_LENGTH; What am I doing wrong? Or it's just not supported by ecpg in 7.3? Thanks in advance, Slava __________ www.newmail.ru -- всегда что-то новое.