Re: [SQL] add column if doesn't exist (fwd)

From: "Qingqing Zhou" <zhouqq(at)cs(dot)toronto(dot)edu>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: [SQL] add column if doesn't exist (fwd)
Date: 2005-09-27 02:16:53
Message-ID: dh9vh2$10ir$1@news.hub.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


""Brandon Metcalf"" <bmetcalf(at)nortel(dot)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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Gnanavel S 2005-09-27 04:15:25 Re: How many insert + update should one transaction handle?
Previous Message Qingqing Zhou 2005-09-27 02:10:07 Re: could not send data to server: Operation not supported