| From: | "Dann Corbit" <DCorbit(at)connx(dot)com> |
|---|---|
| To: | "Andreas Pflug" <pgadmin(at)pse-consulting(dot)de> |
| Cc: | <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | Re: Dumb question: How do I determine programmatically if a column is nullable? |
| Date: | 2004-01-08 02:18:39 |
| Message-ID: | D90A5A6C612A39408103E6ECDD77B8294CE557@voyager.corporate.connx.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
> -----Original Message-----
> From: Andreas Pflug [mailto:pgadmin(at)pse-consulting(dot)de]
> Sent: Wednesday, January 07, 2004 11:17 AM
> To: Dann Corbit
> Cc: pgsql-hackers(at)postgresql(dot)org
> Subject: Re: [HACKERS] Dumb question: How do I determine
> programmatically if a column is nullable?
>
>
> Dann Corbit wrote:
>
> > What API call can I make to find out if a column is nullable or not?
> >
>
> SELECT attnotnull FROM pg_attribute ...
> see documentation "Internals/System Catalogs"
Is there a way do do it when I have some arbitrary query that returns a
result set?
In other words, I will be passed a SQL query. I don't want to have to
parse it myself.
Rather, I want to know (for the bound columns) if a column is nullable
or not.
Is the functionality available in [for example] libpq?
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tom Lane | 2004-01-08 05:41:50 | Re: Dumb question: How do I determine programmatically if a column is nullable? |
| Previous Message | Alvaro Herrera | 2004-01-08 01:42:36 | Re: [COMMITTERS] pgsql-server/ oc/src/sgml/catalogs.sgml |