Re: libpq, PQdescribePrepared -> PQftype, PQfmod, no PQnullable - Mailing list pgsql-hackers

From Merlin Moncure
Subject Re: libpq, PQdescribePrepared -> PQftype, PQfmod, no PQnullable
Date
Msg-id CAHyXU0yV9pe2gYmVSFwQ1xqYTF1eHCMVnOMEm_mT=icbKL_rtw@mail.gmail.com
Whole thread Raw
In response to Re: libpq, PQdescribePrepared -> PQftype, PQfmod, no PQnullable  (Alex Goncharov <alex-goncharov@comcast.net>)
Responses Re: libpq, PQdescribePrepared -> PQftype, PQfmod, no PQnullable  (Florian Pflug <fgp@phlo.org>)
List pgsql-hackers
On Thu, Oct 6, 2011 at 3:22 PM, Alex Goncharov
<alex-goncharov@comcast.net> wrote:
> ,--- I/Alex (Thu, 06 Oct 2011 14:02:14 -0400) ----*
> | My understanding is that libpq does not allow one to find if a result
> | set column is nullable.
> ,--- You/Merlin (Thu, 6 Oct 2011 15:16:18 -0500) ----*
> | why aren't you using PQgetisnull()?
>
> This function is not about the nullability of a column but rather
> about the value in a result set cell:
>
>  PQgetisnull: Tests a field for a null value.
>
>     int PQgetisnull(const PGresult *res, int row_number, int column_number);
>
> Notice the 'row_number'.


right -- get it.  well, your question is doesn't make sense then --
any column can be transformed in ad hoc query, so it only makes sense
to test individual values post query..    btw, if you don't like
querying system catalogs, check out information_schema.columns.

merlin


pgsql-hackers by date:

Previous
From: Alex Goncharov
Date:
Subject: Re: libpq, PQdescribePrepared -> PQftype, PQfmod, no PQnullable
Next
From: Florian Pflug
Date:
Subject: Re: libpq, PQdescribePrepared -> PQftype, PQfmod, no PQnullable