dbTalk Databases Forums  

get diagnostics not supported by ecpg?

comp.databases.postgresql.questions comp.databases.postgresql.questions


Discuss get diagnostics not supported by ecpg? in the comp.databases.postgresql.questions forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Slava Gorski
 
Posts: n/a

Default get diagnostics not supported by ecpg? - 10-09-2003 , 12:24 PM






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

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.