Re: DROP relation IF EXISTS Docs and Tests - Bug Fix

Поиск
Список
Период
Сортировка
От David G. Johnston
Тема Re: DROP relation IF EXISTS Docs and Tests - Bug Fix
Дата
Msg-id CAKFQuwYb+_q+=B63YwdP0w9V2Gt8t3mgakUuNRn8vY8saX06Bg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: DROP relation IF EXISTS Docs and Tests - Bug Fix  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Wed, Sep 16, 2020 at 4:42 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
"David G. Johnston" <david.g.johnston@gmail.com> writes:
> My main point here is that writing "CREATE TYPE typename AS DOMAIN" would
> be expected, with the appropriate sub-specification, similar to "CREATE
> TYPE typename AS RANGE".

Well, that point seems entirely invented.  CREATE DOMAIN is in the
SQL standard:

And I'm writing for the user who sees that both "CREATE DOMAIN" and "CREATE TYPE AS RANGE" exist, and that there is no "CREATE RANGE", and wonders why if domains are simply a variant of a type, like ranges are, why doesn't CREATE TYPE just create those as well - or, rather, are there any material differences.  I choose to include an observation that, no, they are not materially different in terms of being abstract types.

It struck me as odd that it wasn't just CREATE TYPE AS DOMAIN and so in my patch I thought to comment upon the oddity - and in doing so emphasize that the DROP behavior for DOMAINS is no different than the types created by the CREATE TYPE command.

David J.

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

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: pgindent vs dtrace on macos
Следующее
От: Tom Lane
Дата:
Сообщение: Re: pgindent vs dtrace on macos