Re: Add column if not exists (CINE)

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: Add column if not exists (CINE)
Дата
Msg-id AANLkTikYIISnDlixySXOXLdAyKn-nJ5xrE49XoqYHlXZ@mail.gmail.com
обсуждение исходный текст
Ответ на Add column if not exists (CINE)  (Kjell Rune Skaaraas <kjella79@yahoo.no>)
Список pgsql-hackers
On Sat, May 1, 2010 at 2:26 PM, Kjell Rune Skaaraas <kjella79@yahoo.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


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Simon Riggs
Дата:
Сообщение: Re: standbycheck was:(Re: [HACKERS] testing hot standby
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: pg_migrator to /contrib in a later 9.0 beta