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 CAKFQuwZcmCHD-BZN5O6qnKH5Q6RMarraBWbLV1bcdGOCb0ChnQ@mail.gmail.com
Whole thread Raw
In response to Re: DROP relation IF EXISTS Docs and Tests - Bug Fix  (Alexander Korotkov <aekorotkov@gmail.com>)
Responses Re: DROP relation IF EXISTS Docs and Tests - Bug Fix  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Tue, Sep 15, 2020 at 3:48 PM Alexander Korotkov <aekorotkov@gmail.com> wrote:
Hi!

I've skimmed through the thread and checked the patchset.  Everything
looks good, except one paragraph, which doesn't look completely clear.

+  <para>
+   This emulates the functionality provided by
+   <xref linkend="sql-createtype"/> but sets the created object's
+   <glossterm linkend="glossary-type-definition">type definition</glossterm>
+   to domain.
+  </para>

As I get it states that CREATE DOMAIN somehow "emulates" CREATE TYPE.
Could you please, rephrase it?  It looks confusing to me yet.


I'll look at it.

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".  While the syntax wasn't rolled up into "CREATE TYPE" proper "CREATE DOMAIN" effectively does the same thing - creates a type of domain (just ask CREATE TYPE AS RANGE creates a type of range).  I'm calling "a type of something" the type's "type domain".  CREATE DOMAIN emulates the non-existent "CREATE TYPE typename AS DOMAIN" command.

David J.

pgsql-hackers by date:

Previous
From: Peter Geoghegan
Date:
Subject: Re: PG 13 release notes, first draft
Next
From: Tom Lane
Date:
Subject: Re: Gripes about walsender command processing