From: Jeroen T. Vermeulen <jtv@xs4all.nl>
To: Wei Weng <wweng@kencast.com>
Cc: Matthew Vanecek <mevanecek@yahoo.com>
Cc: pgsql-interfaces@postgresql.org
Subject: Re: debug a mess
Date: Tue, 25 Feb 2003 22:24:26 +0100
Message-ID: <20030225212426.GM7884@xs4all.nl> (raw)
In-Reply-To: <20030225155820.B24120@example.com>
References: <20030225155820.B24120@example.com>
On Tue, Feb 25, 2003 at 03:58:20PM -0500, Wei Weng wrote:
>
> switch( PQresultStatus(res) )
> {
> case ... goto _end;
> case ... goto _end;
> ...
> default ... goto _end;
> }
Why do you call that label "_end"? AFAIK names starting with
underscores are reserved for use by the compiler, the standard
library, etc. Never start your identifiers and such with underscores.
A name like _end in particular could mean something special to the
compiler or linker and screw things up that way. Why not call it
bailout or something?
> This is pretty much the skeleton of the code, as you can see, I treat res
> pretty carefully, PQclear it whenever necessary.
And what are the queries you issue? Do you "begin" a transaction?
Are there any errors before the one you're looking at?
Jeroen
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: jtv@xs4all.nl, wweng@kencast.com, mevanecek@yahoo.com
Subject: Re: debug a mess
In-Reply-To: <20030225212426.GM7884@xs4all.nl>
* 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