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 1uolQx-009n3l-Am for pgsql-general@arkaria.postgresql.org; Wed, 20 Aug 2025 16:13:08 +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 1uolQw-009XUC-N0 for pgsql-general@arkaria.postgresql.org; Wed, 20 Aug 2025 16:13:07 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1uolQw-009XU4-Cg for pgsql-general@lists.postgresql.org; Wed, 20 Aug 2025 16:13:07 +0000 Received: from mail-il1-x12e.google.com ([2607:f8b0:4864:20::12e]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1uolQu-000wMT-13 for pgsql-general@lists.postgresql.org; Wed, 20 Aug 2025 16:13:06 +0000 Received: by mail-il1-x12e.google.com with SMTP id e9e14a558f8ab-3e67d83ee4bso32225ab.1 for ; Wed, 20 Aug 2025 09:13:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1755706382; x=1756311182; 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=kpjm0k5s1yLPLPvOvo9ZVyxyfXatTcQhk5vL6mgDbOQ=; b=k/44AxjJ9cT2xrwg9PVg7SEjAuEIQdieewmktVV7wueXEg4/EmiBkeFqtxIZABCJ5q sXiRnocV8MIqinKV0KaPhHAjElPs1adH7B1lwW12ThRIotiXmvZuOoBQd6mGCMeMbioW LXU47MG0AzcFVnoqDrJr+FpRPsFGD9vj1Tp6pboRK8JXpH653MxTQfomSXMWjt5MaGj/ axkDs9xy5ulXJ3tcUCoTcQTqsNAb/zUBVRScOPtQHQ9xD8UHs7RFARAEjUTqA40SIMiV YayhfAYCPisq883y+1Qe5VPY7f2stwGh+nVnDJAzCZSD7GSO3CRQI7i2Ztofs9y/Y5kN OlfQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1755706382; x=1756311182; 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=kpjm0k5s1yLPLPvOvo9ZVyxyfXatTcQhk5vL6mgDbOQ=; b=dJxOkyarMtodDZVMd5EuUFIOgTOTuCke0wbNxSqDKu8SH3zNVMT2d3bv42u+cIxpZp RWMczSGVgFP1BulmJTrRF8X8r6ER9YKhDclufVvjpTFrb+rBYpOv/5dnQJJJITuwLyPk f3IU7JpvtDSL60tQu9UbjIONr5jnnr3PlpFM1HPPgqjBqX+nH4YdD3ImhvX192aHa1D6 cxH2Ain806cPHXJoAyABEkFynBHtAUCo+C31fKml0/6r6s3CyHsEJueuJtSb9glEPdsW Rhp7SczRSgp6WBjmfB+bYHnGiYGeUmcwwDB7rD3BAboiGwCfxZNhPKhQcfNpoqN8D+Gp fw0A== X-Gm-Message-State: AOJu0YwywblpShTtzFK0qBHj+yqZlnYiWHDqpgmE9ujYOpZi/ba+7RWb oZOE2jLOFEc7tSl1gCjh/hwxYSsdKA5doIdee3YVnmETvIJbi3kc5nHGUoO7jL4quAdgigyOerl lTzES0kB4poIKhwhJ696e6SQxJn7GQCg= X-Gm-Gg: ASbGncvTCPHg8OsUP9lWd94dGzKikWF97eYStH3n2WD4TanqW2V0njaiSpydpXTbm+Q rDKZP5vpFXwQmOf32ttoAfzOjI3Fw2MDFyUgrBnEyd2QuZJKrtDL+UDZS6ngnLb2atVQaVZ1FHu JKLqzpv2cr9cploUIu+kdzN+Zi8NMhdCaQuGufJ8jV7c5T8ksgpRs9HneK494rjLcMQJOMqnABZ 78OjfNPohKcG30tf6EFSg8WkEIOXZ8FV0XEj2gUaQ== X-Google-Smtp-Source: AGHT+IH2y3t5gsYoa/sjBb+UcHYnOMZ4OxcDBMe6NboxCrlLE3WE2vhk+5TVz0LzvOohgl/WefNnMybuDRd71xxeARU= X-Received: by 2002:a05:6e02:1528:b0:3e5:7437:9187 with SMTP id e9e14a558f8ab-3e67ca48a60mr65397925ab.23.1755706382239; Wed, 20 Aug 2025 09:13:02 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Greg Sabino Mullane Date: Wed, 20 Aug 2025 12:12:25 -0400 X-Gm-Features: Ac12FXzrdoCMSE6x8ndGypXp3zayoc8NsbvohaAL4QRsPXbRzkfvWU1KIPiV5XA Message-ID: Subject: Re: Domains vs data types To: =?UTF-8?B?RXJ0YW4gS8O8w6fDvGtvZ2x1?= Cc: pgsql-general@lists.postgresql.org Content-Type: multipart/alternative; boundary="0000000000003e4c4c063cce3f66" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --0000000000003e4c4c063cce3f66 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, Aug 20, 2025 at 12:48=E2=80=AFAM Ertan K=C3=BC=C3=A7=C3=BCkoglu wrote: > Does the second table have any technical advantage/disadvantage over plai= n > data type definition? > Less metadata in memory? High metadata in memory? Less/increased disk > space? > Same disk space. No disadvantage other than confusing your users, and any performance differences will be so minor as to be unmeasurable. (my two cents: domains are best when the data type is complex AND shared across multiple tables. Even then I tend to avoid them.) Cheers, Greg -- Crunchy Data - https://www.crunchydata.com Enterprise Postgres Software Products & Tech Support --0000000000003e4c4c063cce3f66 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Wed, Aug 20, 2025 at 12:48=E2=80=AFAM = Ertan K=C3=BC=C3=A7=C3=BCkoglu <ertan.kucukoglu@gmail.com> wrote:
=
Does the second table have any technical advantage/di= sadvantage over plain data type definition?
Less metadata in memo= ry? High metadata in memory? Less/increased disk space?

Same disk space. No disadvantage other than confus= ing your users, and any performance differences will be so minor as to be u= nmeasurable. (my two cents: domains are best when the data type is complex = AND shared across multiple tables. Even then I tend to avoid them.)

Cheers,
Greg

--
Enterprise Postgres Software Products &a= mp; Tech Support

--0000000000003e4c4c063cce3f66--