Re: Add column if not exists (CINE) - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Add column if not exists (CINE)
Date
Msg-id 23744.1272463095@sss.pgh.pa.us
Whole thread Raw
In response to Re: Add column if not exists (CINE)  (Andrew Dunstan <andrew@dunslane.net>)
Responses Re: Add column if not exists (CINE)
List pgsql-hackers
Andrew Dunstan <andrew@dunslane.net> writes:
> Takahiro Itagaki wrote:
>> But before developing, we need to decide how to handle an added object
>> that has the same name but has different definitions. 

> The OP explicitly stated that in his opinion nothing should be done in 
> such cases. That's a defensible position, in the case of objects such as 
> tables that must be unique by name (e.g. tables).  But what would we do 
> about objects where the name could be overloaded?

Even if it's defensible, the consensus position so far has been that
it's a bad design.  Every time we've looked at this, we have concluded
that CREATE OR REPLACE semantics are considerably safer to use, because
there is no question what the state of the object is afterwards.  That
argument is just as valid for a column as for anything larger.

AFAICS, the only excuse CINE has for living is that (people think)
it would take less work to implement.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Re: [COMMITTERS] pgsql: Make CheckRequiredParameterValues() depend upon correct
Next
From: "Kevin Grittner"
Date:
Subject: Re: Error handling for ShmemInitStruct and ShmemInitHash