Re: add column if doesn't exist - Mailing list pgsql-sql

From Peter Eisentraut
Subject Re: add column if doesn't exist
Date
Msg-id 200509270216.05141.peter_e@gmx.net
Whole thread Raw
In response to add column if doesn't exist  ("Brandon Metcalf" <bmetcalf@nortel.com>)
Responses Re: add column if doesn't exist
List pgsql-sql
Brandon Metcalf 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?

SELECT * FROM information_schema.columns;

Customize to taste.

-- 
Peter Eisentraut
http://developer.postgresql.org/~petere/


pgsql-sql by date:

Previous
From: Michael Fuhr
Date:
Subject: Re: Updating cidr column with network operator
Next
From: jeff sacksteder
Date:
Subject: how to do 'deep queries'?