From: Michael Meskes <Michael_Meskes@usa.net>
To: James Thompson <jamest@math.ksu.edu>
Cc: Margarita Barvinok <brita@math.lsa.umich.edu>
Cc: pgsql-interfaces@postgreSQL.org
Subject: Re: [INTERFACES] Use ecpg
Date: Thu, 28 Jan 1999 19:58:59 +0100
Message-ID: <19990128195859.B513@gmx.net> (raw)
In-Reply-To: <Pine.GSO.4.05.9901281022280.13734-100000@noether.math.ksu.edu>
References: <Pine.SOL.3.96-4hack.990128091535.15513B-100000@sewerurchin.math.lsa.umich.edu>
<Pine.GSO.4.05.9901281022280.13734-100000@noether.math.ksu.edu>
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
--
Michael Meskes | Go SF 49ers!
Th.-Heuss-Str. 61, D-41812 Erkelenz | Go Rhein Fire!
Tel.: (+49) 2431/72651 | Use Debian GNU/Linux!
Email: Michael.Meskes@gmx.net | Use PostgreSQL!
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-interfaces@postgresql.org
Cc: Michael_Meskes@usa.net, jamest@math.ksu.edu, brita@math.lsa.umich.edu
Subject: Re: [INTERFACES] Use ecpg
In-Reply-To: <19990128195859.B513@gmx.net>
* 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