From: Tomas Vondra <tomas.vondra@enterprisedb.com>
To: Shaozhong SHI <shishaozhong@gmail.com>
To: pgsql-general <pgsql-general@lists.postgresql.org>
Subject: Re: Create and access a dictionary type
Date: Wed, 5 Jan 2022 14:22:24 +0100
Message-ID: <c699f135-2326-0fda-6623-850da6101bc8@enterprisedb.com> (raw)
In-Reply-To: <CA+i5JwYG_m7Ka2Sw_p9r5-3LrRqz=4HsuccX-7oz4+SMtbmvhA@mail.gmail.com>
References: <CA+i5JwYG_m7Ka2Sw_p9r5-3LrRqz=4HsuccX-7oz4+SMtbmvhA@mail.gmail.com>
On 1/5/22 14:17, Shaozhong SHI wrote:
> Any examples in Postgres to create a dictionary type to store and access
> key value pairs?
>
I'd say JSONB can be used as an associative array, and e.g. in Python
can map to dict data type.
regards
--
Tomas Vondra
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: tomas.vondra@enterprisedb.com, shishaozhong@gmail.com
Subject: Re: Create and access a dictionary type
In-Reply-To: <c699f135-2326-0fda-6623-850da6101bc8@enterprisedb.com>
References: <CA+i5JwYG_m7Ka2Sw_p9r5-3LrRqz=4HsuccX-7oz4+SMtbmvhA@mail.gmail.com> <c699f135-2326-0fda-6623-850da6101bc8@enterprisedb.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox