Re: DROP relation IF EXISTS Docs and Tests - Bug Fix - Mailing list pgsql-hackers

From David G. Johnston
Subject Re: DROP relation IF EXISTS Docs and Tests - Bug Fix
Date
Msg-id CAKFQuwYb+_q+=B63YwdP0w9V2Gt8t3mgakUuNRn8vY8saX06Bg@mail.gmail.com
Whole thread Raw
In response to Re: DROP relation IF EXISTS Docs and Tests - Bug Fix  (Tom Lane <tgl@sss.pgh.pa.us>)
List 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 by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: pgindent vs dtrace on macos
Next
From: Tom Lane
Date:
Subject: Re: pgindent vs dtrace on macos