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 1soNL8-00Akbj-Aw for pgsql-general@arkaria.postgresql.org; Wed, 11 Sep 2024 13:24:59 +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 1soNL8-0006Lo-1r for pgsql-general@arkaria.postgresql.org; Wed, 11 Sep 2024 13:24:58 +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 1soNL7-0006Lg-MX for pgsql-general@lists.postgresql.org; Wed, 11 Sep 2024 13:24:57 +0000 Received: from mail-lj1-x22f.google.com ([2a00:1450:4864:20::22f]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1soNL4-000eTJ-7n for pgsql-general@postgresql.org; Wed, 11 Sep 2024 13:24:57 +0000 Received: by mail-lj1-x22f.google.com with SMTP id 38308e7fff4ca-2f74e613a10so18308081fa.1 for ; Wed, 11 Sep 2024 06:24:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1726061094; x=1726665894; darn=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=BQwzZiDGsk+7WrfRKhGGpq0DwFhTwUmLVOxRmrl0rUE=; b=Qdqc3G5mMYupdXGYBNreR2BlOfPOw89DRuwuPE2mNLrS2+rZCKvTBpexl2YFdGCZh4 NrhauBGPSSAYZuvvUh9tmU1JG240RH9sxaNuM25dHfok3M25OnFOHtAbY8Rks5rV/NG6 7qyRFwUlRvEoNhQV0XOe2fmgtKM8+VePOrzGbe85BubCX61ovG7dHiqSkUTzYIXxOTNf sTx60KVFEYVp8QkGv9j+t8L02ZfFCpmlWGTP0GhUtYNMdg2dtKvUZhoYy6JH3KHNTftn +ka8os9qi/tUyEGO3F0wDVuf2wDPAW7FEN36cpgS0SmGAfbJMM8iy408ZbT496LK4h8+ loxg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1726061094; x=1726665894; 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=BQwzZiDGsk+7WrfRKhGGpq0DwFhTwUmLVOxRmrl0rUE=; b=JoswGg/MGCAvUITYZCdLmxAa8oEbTiZLhmsU3C1znHTK2XO1TlsjEY0E0luhvE0kwY f9uccGE3OL4yH9MkfrTQhlBNS/BYeKj+cwPL2C4SZ4Gw5ZnyGqdPUR9qWKqBaxmOcq9p 6QKl7BI2NZap7KJlStDvc3oW97erycFirGlfwGCe1xNHXbAxzSr/CvpmCy3IF3/z2WhA 5iejM0Csk6Ec+GYRQ7g0AqUwigtcCM5iGhHiyzf0Y7z7xEUpA6Zb6Ju+WCbqK641n+JY 2BP9YuUaHQE2jEH/Vr1AfpFW64TGMCdjgW4GTnBKhs249jSLtKg6K0f7eRS9wfm/Mazl IeVA== X-Gm-Message-State: AOJu0Yx0gbwNGbSlk0AsJ4cuqDUXTSonwN5wQjj4XZWWH/jFRsGK8Gsu 1sHD6qUKJ+e60+i30cb/CW/tXxEjrK7pLb6CeQimCxYN/2V78nMeLFZblhbKEr6NCN/tsgIFQqR CA3NVGZlEdF8Y7n5+5naLyvk3VfmD+o7/ X-Google-Smtp-Source: AGHT+IG3Hk/4IaxpjdN7VfK5MZsJ0hRDenmsSd/xhaFkT4ykZhiv2AP5XvD3lNfbSZ4sS/qwni4t76I6xl0flJSA9w0= X-Received: by 2002:a05:651c:2228:b0:2f4:f253:ec7 with SMTP id 38308e7fff4ca-2f75a8d17a3mr151995191fa.0.1726061093946; Wed, 11 Sep 2024 06:24:53 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Greg Sabino Mullane Date: Wed, 11 Sep 2024 09:24:16 -0400 Message-ID: Subject: Re: Database schema for "custom fields" To: Matthias Leisi Cc: pgsql-general@postgresql.org Content-Type: multipart/alternative; boundary="0000000000005d94550621d7ead9" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --0000000000005d94550621d7ead9 Content-Type: text/plain; charset="UTF-8" I'd go with option 2 (jsonb), as it's likely already well supported by your applications, while the other approaches will require a good bit of customization. JSONB can be indexed, so performance should be on par with "traditional" tables. Cheers, Greg --0000000000005d94550621d7ead9 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
I'd go with option 2 (jsonb), as it's likely alrea= dy well supported by your applications, while the other approaches will req= uire a good bit of customization. JSONB can be indexed, so performance shou= ld be on par with "traditional" tables.

Cheers= ,
Greg

--0000000000005d94550621d7ead9--