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.