Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1uomCS-009zU3-96 for pgsql-general@arkaria.postgresql.org; Wed, 20 Aug 2025 17:02:13 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1uomCR-00A5qp-ME for pgsql-general@arkaria.postgresql.org; Wed, 20 Aug 2025 17:02:12 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1uomCR-00A5qP-BE for pgsql-general@lists.postgresql.org; Wed, 20 Aug 2025 17:02:11 +0000 Received: from mail-oo1-xc31.google.com ([2607:f8b0:4864:20::c31]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1uomCO-000sUa-2p for pgsql-general@lists.postgresql.org; Wed, 20 Aug 2025 17:02:11 +0000 Received: by mail-oo1-xc31.google.com with SMTP id 006d021491bc7-61bd4ff762eso59922eaf.3 for ; Wed, 20 Aug 2025 10:02:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1755709329; x=1756314129; darn=lists.postgresql.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=SJNrrHOoSWJpbbLIcSClws6NcITemR+HlYgN4ert6t0=; b=Ho0HiC9EAGwuhCqOOwNzVIpeNrkmYQgB/PJDzipVSqtoazu6kU2eQ8rX935IFl0ssH QefS/hZKBk6ojnKaiaMzYpS2UFKpXRasnMgohSNMQ7SyrCEYB0d8IXxxk52KadlixAl5 99yyTJh5BubJrxQatyl7laNjwJGwJUOqLfpeOpMk0WoVOJs40GJ7N2iXRDmdoQMriSkd MBz0Utgplkb72KLEibkyDi+2HuOa501DejSCnCWIbYIFT0EbvEAHB9H/+6kQj+hT5Ydn NPNWswNiQjRbpeLportC0wK1px198x8uaccaOHwXkXfKDhGs4yZenjNzZKXdx637FGme S9yw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1755709329; x=1756314129; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=SJNrrHOoSWJpbbLIcSClws6NcITemR+HlYgN4ert6t0=; b=v91Bmmr4pau6YTK5WPVpU9KIuZNWNjQ5Oolo+bSS/0WFaatxJVyiFOJ8mTucJoenSR mvT1Pqrb9UYJa7+I4EIUjdnR87bMi7EGpCPYVUD6+vazymdvr+Ki4pIxGLSKHSOH5+cy f82QiEI0S3ZJNxI5GHTDzlV5h+KFjVKxWqfvsjqyFbQanvkErR4RirqrMFYM4ILtITuu JrnmS5/7Vn37NEW/k3m2ObiW8+bVjnyCp/epRMzuNjgbjEIdesjIsAzRM7imLFEfSB+r ccSWOVowTqKKCxlmb7mtbNgYWufz0cbxRijE40uENkIl1kTo7PDQY3fAQRt6SL1LPYoQ n01Q== X-Forwarded-Encrypted: i=1; AJvYcCXDTsnLjC31Vh7rEt8GvdRD7f1b3D2I31H4c/jqJt2eONXHfmfqtxxe1sqISskC4Dxvlf03jryBXuAP9uhf@lists.postgresql.org X-Gm-Message-State: AOJu0YzdTmjC4QsIwz58Ffs9ziGutpgAUunSn96VRCH2zRJyFLqPgtF0 c7hlvNTHXpkEIFLAb6Kb8ckCjuMQm9gONaWWDrYFpsslg9qCQxizHvPRJCQc7paNtICRPgwACRi QgjJC0iuEyf2XyfDYeFeO0F0bGdoZR6P5Ug== X-Gm-Gg: ASbGncuyKGbpOPuSdAHPhQj+/cDGUaZIJLwgNU33OD3JDbQ52WcGdDx/ld5f5Yrq/Ex OTsvzmmZkQxgNq/1ExZhimZCD8vbI8/wTY3gu+nDPoIe3a9mWt06aqHeLWlUEbbZKqTKDWJiYn8 qsL264gA2E06ZAyBPtHR3518hsm1CVgxXajKVd4Ch7v7kNr6HAyrTUIL8NxWRZn1sLg1KImg4gE tQI77ZLBWjoT7oiZNlQ5UNCfpmAMbDnRYsm5Bw= X-Google-Smtp-Source: AGHT+IEr1ThNTVcSt8nwp1VFhGO/8edvkZQ6aJJStBLQXVd5gUsXVLGwnCtdc9FaNOkJbv0jHYxuTkOrwJT+DTKuXz4= X-Received: by 2002:a05:6820:809:b0:61b:9ca6:5beb with SMTP id 006d021491bc7-61d9b61b1e0mr1904460eaf.4.1755709327357; Wed, 20 Aug 2025 10:02:07 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: "David G. Johnston" Date: Wed, 20 Aug 2025 10:01:30 -0700 X-Gm-Features: Ac12FXwtECdGY1BhtIEHTp4Atx0-nxxeCY5nLJTIm8y4Ic1-skBOT7wCSxJQYWU Message-ID: Subject: Re: Domains vs data types To: Ron Clarke Cc: Greg Sabino Mullane , =?UTF-8?B?RXJ0YW4gS8O8w6fDvGtvZ2x1?= , pgsql-general Content-Type: multipart/alternative; boundary="000000000000c93cfd063cceee18" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --000000000000c93cfd063cceee18 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, Aug 20, 2025 at 9:57=E2=80=AFAM Ron Clarke wr= ote: > ...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. --000000000000c93cfd063cceee18 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Wed, Aug 20, 2025 at 9:57=E2=80=AFAM Ron Clarke <rclarkeai@gmail.com> wrote:
...<= /span>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 make= s specifying one on a domain a bit of a potential trap.=C2=A0 Rely on colum= n NOT NULL.

David J.

--000000000000c93cfd063cceee18--