Re: CREATE TABLE IF NOT EXISTS AS

Поиск
Список
Период
Сортировка
От Craig Ringer
Тема Re: CREATE TABLE IF NOT EXISTS AS
Дата
Msg-id 528C65EA.7090804@2ndquadrant.com
обсуждение исходный текст
Ответ на Re: CREATE TABLE IF NOT EXISTS AS  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: CREATE TABLE IF NOT EXISTS AS  (Pavel Stehule <pavel.stehule@gmail.com>)
Список pgsql-hackers
On 11/17/2013 08:40 AM, Tom Lane wrote:
> That's an even worse idea than plain CREATE IF NOT EXISTS (which was
> put in over vocal objections from me and some other people).

I'm pretty uncomfortable with CREATE TABLE IF NOT EXISTS too - but it
doesn't hurt someone who doesn't use it and it does have uses.

We have plenty of other features that can be horribly abused too. That
doesn't mean new ones should be added casually, just that it's sometimes
appropriate to accept something that's imperfect when it meets a need
and we don't have a better way to do it.

It'd be great if there was a sane way to implement "CREATE OR REPLACE
TABLE" - since that's what people really want a lot of the time. "Ensure
that at the end of this command the table looks like this". There's just
no sane way to do that for a non-empty table.

-- Craig Ringer                   http://www.2ndQuadrant.com/PostgreSQL Development, 24x7 Support, Training & Services



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

Предыдущее
От: Amit Kapila
Дата:
Сообщение: Re: Extra functionality to createuser
Следующее
От: Ashutosh Bapat
Дата:
Сообщение: Re: Compile and test in netbeans