From: | Keary Suska <hierophant(at)pcisys(dot)net> |
---|---|
To: | Postgres-Interfaces <pgsql-interfaces(at)postgresql(dot)org> |
Subject: | Re: Libpq and PGConn |
Date: | 2006-03-29 21:18:46 |
Message-ID: | C05047C6.27A3F%hierophant@pcisys.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-interfaces |
on 3/29/06 10:15 AM, tgl(at)sss(dot)pgh(dot)pa(dot)us purportedly said:
> Keary Suska <hierophant(at)pcisys(dot)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"
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2006-03-29 22:09:40 | Re: Libpq and PGConn |
Previous Message | Alistair Bayley | 2006-03-29 20:43:10 | Example libpq program fails when built with mingw ld-2.15.91 on WinXP (but not ld-2.13.90) |