Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ourU3-0006y9-Sk for pgsql-novice@arkaria.postgresql.org; Tue, 15 Nov 2022 08:39:55 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1ourU2-0006QU-Mt for pgsql-novice@arkaria.postgresql.org; Tue, 15 Nov 2022 08:39:54 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ourU2-0006QL-C2 for pgsql-novice@lists.postgresql.org; Tue, 15 Nov 2022 08:39:54 +0000 Received: from lana.depesz.com ([88.198.49.178] helo=depesz.com) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ourTz-00048S-CZ for pgsql-novice@lists.postgresql.org; Tue, 15 Nov 2022 08:39:52 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=depesz.com; s=20170201; h=In-Reply-To:Content-Type:MIME-Version:References:Reply-To: Message-ID:Subject:Cc:To:Sender:From:Date:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=dzUqnGmpqloUdCRleTjHkGB/MttfdUWkhnNr2PNzIbU=; b=tDXcRXTzY1vz7n8Fp+Ao6hAML8 J1STqAu+LVWNEvQiFpzxorowRd0VSOG78gn4Qi+HqY/OjgDVpdsJ1GtoGB5ePcAIsOn7ljyLVU6Iy ct1BOjeYHv6XQs3ZQ7UzZ1vcJPzXBneM3ljQDv11pycbTJHdHcWhfdb0hIIsxXbh0RbA=; Received: from depesz by depesz.com with local (Exim 4.94.2) (envelope-from ) id 1ourTu-00EChG-7Q; Tue, 15 Nov 2022 09:39:46 +0100 Date: Tue, 15 Nov 2022 09:39:46 +0100 From: hubert depesz lubaczewski Sender: depesz@depesz.com To: Laurenz Albe Cc: Bzzzz , pgsql-novice@lists.postgresql.org Subject: Re: hstore or jsonb ? Message-ID: Reply-To: depesz@depesz.com References: <20221114155057.48406b86@msi.defcon1.lan> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Mon, Nov 14, 2022 at 10:03:02PM +0100, Laurenz Albe wrote: > On Mon, 2022-11-14 at 15:50 +0100, Bzzzz wrote: > > I'd like to store specs, as they vary a lot from one item to another, > > hstore or jsonb look like the best solution. > > > > Specs can have 2 levels at most. > > ie: "color": ["white", "black", "blue"]). > > > > The indexation is mandatory for fulltext accurate researches in > > (almost) natural language. > > > > So, as the processing is almost the same (maps I/O in Erlang), which one > > would be the best for my needs, hstore or jsonb ? > > "hstore" is obsolete; don't use it. Do you have any support for this claim? Best regards, depesz