Re: Domains vs data types

David G. Johnston <david.g.johnston@gmail.com>

From: "David G. Johnston" <david.g.johnston@gmail.com>
To: Ron Clarke <rclarkeai@gmail.com>
Cc: Greg Sabino Mullane <htamfids@gmail.com>, Ertan Küçükoglu <ertan.kucukoglu@gmail.com>, pgsql-general <pgsql-general@lists.postgresql.org>
Date: 2025-08-20T17:01:30Z
Lists: pgsql-general
On Wed, Aug 20, 2025 at 9:57 AM Ron Clarke <rclarkeai@gmail.com> wrote:

> ...and ensure the same defaults, nulls etc are applied accross tables.
>

Just as a warning - a deviation we have from the SQL Standard regarding
domains and their NOT NULL constraints makes specifying one on a domain a
bit of a potential trap.  Rely on column NOT NULL.

David J.