From: | Robert Haas <robertmhaas(at)gmail(dot)com> |
---|---|
To: | Kjell Rune Skaaraas <kjella79(at)yahoo(dot)no> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Bruce Momjian <bruce(at)momjian(dot)us>, Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>, Andrew Dunstan <andrew(at)dunslane(dot)net>, Takahiro Itagaki <itagaki(dot)takahiro(at)oss(dot)ntt(dot)co(dot)jp>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Add column if not exists (CINE) |
Date: | 2010-05-01 18:58:37 |
Message-ID: | AANLkTikYIISnDlixySXOXLdAyKn-nJ5xrE49XoqYHlXZ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Sat, May 1, 2010 at 2:26 PM, Kjell Rune Skaaraas <kjella79(at)yahoo(dot)no> wrote:
> In other words, pretty much all the hard bits I seem to hear people agree
> on exist still apply to the single column. COR for columns was suggested
> already back in the same thread in 2005:
>
> http://archives.postgresql.org/pgsql-hackers/2005-10/msg00644.php
>
> We're already talking 2010, what I fear is that COR is that shiny goal
> far, far out there but if I come back in 2015 there'll still be neither
> COR or CINE. I really can't understand how CINE can be equally hard to
> implement as COR, since CINE is simply to NOT throw an error.
It's not hard to implement at all; this whole discussion - and all the
ones that have preceded it - are based on the theory that people who
are asking for CINE are too stupid to see that CINE isn't really going
to fix their problem. That comes in several flavors, including:
- 90% of the things you would want to do in real life are way more
complicated anyway, so CINE by itself is no use,
- COR is really what you want but since you're too lazy to implement
that you want CINE instead,
- MySQL has it so it must be a bad idea (even though that was part of
our justification for adopting DIE), and/or
- most people agree that we shouldn't implement CINE.
I am usually very supportive of our community's decision-making
process, but in this case I think we're just being extraordinarily
stubborn, and frankly insulting the intelligence of our end-users,
among whom I number myself.
Q. I ran CREATE IF NOT EXISTS and it didn't magically make my table
match the column list I gave!
A1. Duh.
A2. Did you notice the part where it said:
NOTICE: table "dwiw" already exists, skipping
...and if yes, what did you think the word "skipping" (which also
appears in the similar notice we give for DROP IF EXISTS) meant?
...Robert
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2010-05-01 19:13:05 | Re: pg_migrator to /contrib in a later 9.0 beta |
Previous Message | Kjell Rune Skaaraas | 2010-05-01 18:26:01 | Re: Add column if not exists (CINE) |