On Fri, Dec 16, 2005 at 10:01:09PM -0500, Rowan Kerr wrote:
On 12/16/05, Neil Drumm <drumm@delocalizedham.com> wrote:
Postgres: ALTER TABLE {$table} RENAME $column TO $column_old // For compatibility reasons we don't drop columns but rename them
Why do we do this? What compatibility reasons?
It's been a while since I dealt with any of our pg stuff at work, but I think Postgres doesn't actually allow you to drop columns... You would have to create a new table without the column, and then move all the data over.
Could be completely off-base though!
Well, this is not the case in any recent versions of PostgreSQL; DROP COLUMN works fine on all of the installations I have access to (7.4 and 8.0 series). According to the docs[0], 7.3 supported it as well. Could still be true for even older versions, I suppose. Is there a documented minimum requirement? -- Keegan Quinn <keegan@thebasement.org> CEO, Producer the basement productions http://www.thebasement.org [0] http://www.postgresql.org/docs/7.3/interactive/ddl-alter.html#AEN1977