Re: CREATE TABLE LIKE x INCLUDING CONSTRAINTS

Поиск
Список
Период
Сортировка
От Greg Stark
Тема Re: CREATE TABLE LIKE x INCLUDING CONSTRAINTS
Дата
Msg-id 871wtj3zhd.fsf@stark.xeocode.com
обсуждение исходный текст
Ответ на Re: CREATE TABLE LIKE x INCLUDING CONSTRAINTS  (Alvaro Herrera <alvherre@commandprompt.com>)
Список pgsql-patches
Alvaro Herrera <alvherre@commandprompt.com> writes:

> Hum, how are you handling the case where I specify
>
> CREATE TABLE LIKE x INCLUDING CONSTRAINTS EXCLUDING CONSTRAINTS ?

I have the last one taking priority. I could make it an error but don't see
much point in doing so. It seems to be making something an error for no
particular gain.

EXCLUDING CONSTRAINTS and EXCLUDING DEFAULTS are both kind of stupid since
they're the defaults. There's not much need for either except that EXCLUDING
DEFAULTS is in the standard and it would be weird not to follow the pattern.

And generally I feel like explaining corner cases like this -- when there's no
useful application of it -- to just clutter up documentation. The closest
analog is command-line options where often script writers want a way to
provide flags and then let a variable override those flags. But people rarely
do that kind of thing with SQL scripts. I suppose it does happen though. Maybe
it would be helpful to know how it will work.

--
greg

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

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: CREATE TABLE LIKE x INCLUDING CONSTRAINTS
Следующее
От: Michael Meskes
Дата:
Сообщение: Re: [PATCH] 4 coverity patches for ECPG