From: | "Brandon Metcalf" <bmetcalf(at)nortel(dot)com> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | [SQL] add column if doesn't exist (fwd) |
Date: | 2005-09-26 21:07:17 |
Message-ID: | Pine.LNX.4.58L.0509261606260.1453@cash.rhiamet.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
I figured pgsql-general would be a more appropriate forum for the
question below.
--
Brandon
---------- Forwarded message ----------
Date: Mon, 26 Sep 2005 15:38:56 -0500 (CDT)
From: "Metcalf, Brandon [SC100:CM21:EXCH]" <bmetcalf(at)americasm01(dot)nt(dot)com>
To: pgsql-sql(at)postgresql(dot)org
Subject: [SQL] add column if doesn't exist
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?
I'm basically looking to do an ALTER TABLE foo ADD COLUMN bar if bar
doesn't exist.
Thanks.
--
Brandon
---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
choose an index scan if your joining column's datatypes do not
match
From | Date | Subject | |
---|---|---|---|
Next Message | TJ O'Donnell | 2005-09-26 21:19:58 | c-language function .h file changes between (major) versions |
Previous Message | Jim C. Nasby | 2005-09-26 21:00:33 | Re: How many insert + update should one transaction handle? |