agora inbox for pgsql-docs@postgresql.org
help / color / mirror / Atom feedFrom: PG Doc comments form <noreply@postgresql.org>
To: pgsql-docs@lists.postgresql.org
Cc: jbe-mlist@magnetkern.de
Subject: Parameter NOT NULL to CREATE DOMAIN not the same as CHECK (VALUE IS NOT NULL)
Date: Fri, 03 Jan 2025 13:39:44 +0000
Message-ID: <173591158454.714.7664064332419606037@wrigleys.postgresql.org> (raw)
The following documentation comment has been logged on the website:
Page: https://www.postgresql.org/docs/17/sql-createdomain.html
Description:
The manual claims:
The syntax NOT NULL in this command is a PostgreSQL extension. (A
standard-conforming way to write the same would be CHECK (VALUE IS NOT
NULL). […])
But both variants differ when composite types are involved:
CREATE TYPE complex AS (real float8, imag float8);
CREATE DOMAIN d1 AS complex NOT NULL;
CREATE DOMAIN d2 AS complex CHECK (VALUE IS NOT NULL);
SELECT '(,)'::d1; -- allowed
SELECT '(,)'::d2; -- not allowed
Kind Regards,
Jan Behrens
view thread (6+ messages) latest in thread
Message-ID: <173591158454.714.7664064332419606037@wrigleys.postgresql.org>
Permalink: ../173591158454.714.7664064332419606037@wrigleys.postgresql.org/
Also on: postgresql.org/message-id/173591158454.714.7664064332419606037@wrigleys.postgresql.org
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-docs@postgresql.org
Cc: noreply@postgresql.org, pgsql-docs@lists.postgresql.org, jbe-mlist@magnetkern.de
Subject: Re: Parameter NOT NULL to CREATE DOMAIN not the same as CHECK (VALUE IS NOT NULL)
In-Reply-To: <173591158454.714.7664064332419606037@wrigleys.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox