p == peter_e@gmx.net writes:
p> Brandon Metcalf wrote:p> > Is there a way to check for the existence of a column in a tablep> > other than, say,
doinga SELECT on that column name and checking thep> > output?
p> SELECT * FROM information_schema.columns;
p> Customize to taste.
Yes, that's what I'm looking for. Thanks.
Now, is there a way to mix PostgreSQL commands and SQL and do
something like
ALTER TABLE foo ADD COLUMN bar WHERE EXISTS(SELECT * FROM information_schema.columns WHERE ...)
?
--
Brandon