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

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: Alexander Korotkov <aekorotkov(at)gmail(dot)com>
Cc: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, Justin Pryzby <pryzby(at)telsasoft(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: DROP relation IF EXISTS Docs and Tests - Bug Fix
Date: 2020-09-16 22:20:00
Message-ID: CAKFQuwZcmCHD-BZN5O6qnKH5Q6RMarraBWbLV1bcdGOCb0ChnQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Sep 15, 2020 at 3:48 PM Alexander Korotkov <aekorotkov(at)gmail(dot)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.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2020-09-16 22:21:08 Re: Gripes about walsender command processing
Previous Message Alvaro Herrera 2020-09-16 22:14:22 Re: Gripes about walsender command processing