Re: [SQL] add column if doesn't exist (fwd) - Mailing list pgsql-general

From Qingqing Zhou
Subject Re: [SQL] add column if doesn't exist (fwd)
Date
Msg-id dh9vh2$10ir$1@news.hub.org
Whole thread Raw
In response to [SQL] add column if doesn't exist (fwd)  ("Brandon Metcalf" <bmetcalf@nortel.com>)
Responses Re: [SQL] add column if doesn't exist (fwd)
List pgsql-general
""Brandon Metcalf"" <bmetcalf@nortel.com> wrote
>
> Is there a way to check for the existence of a column in a table other
> than, say, doing a SELECT on that column name and checking the output?
>

Take a look at pg_attribute system table.
http://www.postgresql.org/docs/8.0/static/catalog-pg-attribute.html

Regards,
Qingqing



pgsql-general by date:

Previous
From: "Qingqing Zhou"
Date:
Subject: Re: could not send data to server: Operation not supported
Next
From: Tom Lane
Date:
Subject: Re: Can't change language through LC_MESSAGES