473,320 Members | 1,831 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

get diagnostics not supported by ecpg?

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
Jul 19 '05 #1
0 2120

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Thierry Missimilly | last post by:
Hi, I'm not sure it's a bug or it's normal, so i don't send it to pgsq-bugs. Well, i have written pgbench in PRO*C to have a common pgbench.pgc source for Postgres and Oracle. However, there...
4
by: Thierry Missimilly | last post by:
Hi, This is the wrong mailing list but I don't sent it to pgsql-bugs with success. ---------------------------(end of broadcast)--------------------------- TIP 7: don't forget to...
3
by: Carmen Gloria Sepulveda Dedes | last post by:
Hello. I have a problem with ecpg precompiler. In a code like: **** main() { .... some calls to EXEC SQL
3
by: Lynn.Tilby | last post by:
I am running 7.1.3... The docs for ecpg in 7.1.3 don't have the -e option in them! YET, ecpg -e WORKS!!! for solving the vacuum problem. Just WHAT does the -e option in ecpg do???? Thanks...
0
by: Lynn.Tilby | last post by:
I am running 7.1.3 at the moment and upgrading in the near future. I am noticing that some cursor declare statements are commented out in the .c after running the ecpg pre-processor with no...
1
by: George Gensure | last post by:
I wanted to ask this on here before going any further. I've got functions that return rowsets, which from the psql shell require me to write selects with AS TBL( ... ) to define the return types....
0
by: Christian Rank | last post by:
Today I ran into problems when combining a C program with SQL statements with the ECPG interface of PostgreSQL: According to the documentation, it should be possible with EXEC SQL WHENEVER NOT...
0
by: Valerie Schneider DSI/DEV | last post by:
Hi, I have a set of libraries and C/C++ programs with embedded access to a PG database. I'm using ecpg. I'm working on a Linux RedHat9 platform. Until now I was in PG 7.4.2 : $ ecpg --version...
1
by: Richard Connamacher | last post by:
I was looking through the docs, ECPG looks like a great tool for developing client applications. Anyone know if it's possible to set it up for use with Objective C in XCode on Mac OS X? XCode...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.