pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Keary Suska <hierophant@pcisys.net>
To: Postgres-Interfaces <pgsql-interfaces@postgresql.org>
Subject: Re: Libpq and PGConn
Date: Wed, 29 Mar 2006 14:18:46 -0700
Message-ID: <C05047C6.27A3F%hierophant@pcisys.net> (raw)
In-Reply-To: <22965.1143652556@sss.pgh.pa.us>

on 3/29/06 10:15 AM, tgl@sss.pgh.pa.us purportedly said:

> Keary Suska <hierophant@pcisys.net> writes:
>> What happens if a null pointer is sent to any libpq function for the PGConn
>> parameter?
> 
> AFAIR they all check for that and fail in a reasonably clean fashion.
> Have you found one that doesn't?

Not as of yet. I am building a custom wrapper to libpq and trying to account
for situations such as an attempt to call a libpq function on a PGconn
object that has not been initialized, such as returned from PQconnectdb and
the like. Same goes for PGresult objects.

Is it safe to assume that in these cases--where a PGconn or Pgresult has not
been initialized, but has not been finished() either--that all functions
won't (or shouldn't) choke, will set an error message, and return a defined
value?

Thanks,

Keary Suska
Esoteritech, Inc.
"Demystifying technology for your home or business"




view thread (4+ messages)  latest in thread

Message-ID: <C05047C6.27A3F%hierophant@pcisys.net>
Permalink:  ../C05047C6.27A3F%25hierophant@pcisys.net/
Also on:    postgresql.org/message-id/C05047C6.27A3F%hierophant@pcisys.net

 · 

reply

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: hierophant@pcisys.net
  Subject: Re: Libpq and PGConn
  In-Reply-To: <C05047C6.27A3F%hierophant@pcisys.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