Skip site navigation (1) Skip section navigation (2)

Re: Add column if not exists (CINE)

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Andrew Dunstan <andrew(at)dunslane(dot)net>, Takahiro Itagaki <itagaki(dot)takahiro(at)oss(dot)ntt(dot)co(dot)jp>, Kjell Rune Skaaraas <kjella79(at)yahoo(dot)no>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Add column if not exists (CINE)
Date: 2010-04-28 16:31:09
Message-ID: 13579.1272472269@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-hackers
Robert Haas <robertmhaas(at)gmail(dot)com> writes:
> Actually, that's a good idea.  But how will you handle tables?

Well, tables are a special case, mainly because it's not clear how to
avoid accidentally throwing away data.  (In particular if some column in
the existing table isn't there in the new definition.  It's a bit scary
to just drop the column, IMO.)  I don't see that that argument applies
to doing an automatic ALTER COLUMN, though, especially since the only
column type alterations that will go through without a USING clause are
reasonably straightforward.

			regards, tom lane

In response to

pgsql-hackers by date

Next:From: Robert HaasDate: 2010-04-28 16:38:46
Subject: Re: Add column if not exists (CINE)
Previous:From: Kevin GrittnerDate: 2010-04-28 16:28:39
Subject: Re: Differential backup

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group