5 messages in org.postgresql.pgsql-interfacesRe: [INTERFACES] Use ecpg
FromSent OnAttachments
Margarita BarvinokJan 28, 1999 7:15 am 
James ThompsonJan 28, 1999 8:36 am 
Michael MeskesJan 28, 1999 10:58 am 
Michael MeskesJan 28, 1999 10:20 pm 
Margarita BarvinokJan 29, 1999 6:37 am 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:Re: [INTERFACES] Use ecpgActions...
From:Michael Meskes (Mich@usa.net)
Date:Jan 28, 1999 10:58:37 am
List:org.postgresql.pgsql-interfaces

On Thu, Jan 28, 1999 at 10:36:30AM -0600, James Thompson wrote:

On Thu, 28 Jan 1999, Margarita Barvinok wrote:

Hello All,

I just began to use postgresql-6.4.2 and ecpg (version: 2.4.4). I try t precompile simple

Strange. For some reason I've never seen the original mail. Seems that's just another of those typical usa.net mail losses. Could someone please forward it to me. Thanks.

/* set error handler to bail out if we can't connect */ EXEC SQL WHENEVER SQLERROR { /* LINE 17 */ printError(); return FAILURE; };

Sorry, but that's incorrect syntax. What you want to do is:

func() { printError(); return FAILURE; }

EXEC SQL WHENEVER SQLERROR DO func();

BTW there is a function defined in libecpg named sqlerror() that prints a clear text error message.

...

For me, the best documentation has been the test progs bundled in the postgresql distro. From memory the location is

postgresql-6.4.2/src/interfaces/ecpg/test

Yup.

Michael