Re: How best to create and use associative array type in Postgres? - Mailing list pgsql-general

From Shaozhong SHI
Subject Re: How best to create and use associative array type in Postgres?
Date
Msg-id CA+i5JwZRMwu_Mo8wfrS-_VWANG+RpaGEXth_orym-s_2joKKYA@mail.gmail.com
Whole thread Raw
In response to Re: How best to create and use associative array type in Postgres?  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: How best to create and use associative array type in Postgres?  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
What do you think this attempt by using create type and create a function?


Regards,

David

On Wed, 5 Jan 2022 at 14:54, Tom Lane <tgl@sss.pgh.pa.us> wrote:
Shaozhong SHI <shishaozhong@gmail.com> writes:
> How best to create and use associative array type in Postgres?

I think the closest thing you'd find to that is jsonb, or
contrib/hstore if you'd like something with a bit less complexity.
The notation is unlikely to look much like Oracle, but they
both have the ability to store sets of key/value pairs.

https://www.postgresql.org/docs/current/datatype-json.html
https://www.postgresql.org/docs/current/hstore.html

                        regards, tom lane

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: How best to create and use associative array type in Postgres?
Next
From: Tom Lane
Date:
Subject: Re: How best to create and use associative array type in Postgres?