pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Slava Gorski <slava_gorski@newmail.ru>
To: pgsql-novice@postgresql.org
Cc: pgsql-sql@postgresql.org
Subject: get diagnostics not supported by ecpg?
Date: Thu, 09 Oct 2003 21:29:03 +0400
Message-ID: <20031009172903.24750.qmail@flock1.newmail.ru> (raw)

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 <stdio.h>

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 -- всегда что-то новое.



view thread (2+ messages)  latest in thread

Message-ID: <20031009172903.24750.qmail@flock1.newmail.ru>
Permalink:  ../20031009172903.24750.qmail@flock1.newmail.ru/
Also on:    postgresql.org/message-id/20031009172903.24750.qmail@flock1.newmail.ru

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: slava_gorski@newmail.ru, pgsql-novice@postgresql.org
  Subject: Re: get diagnostics not supported by ecpg?
  In-Reply-To: <20031009172903.24750.qmail@flock1.newmail.ru>

* 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