Re: How best to create and use associative array type in Postgres?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Shaozhong SHI <shishaozhong(at)gmail(dot)com>
Cc: pgsql-general <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: How best to create and use associative array type in Postgres?
Date: 2022-01-05 14:54:25
Message-ID: 41274.1641394465@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Shaozhong SHI <shishaozhong(at)gmail(dot)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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Shaozhong SHI 2022-01-05 16:11:28 Re: How best to create and use associative array type in Postgres?
Previous Message Thomas Michael Engelke 2022-01-05 14:12:14 Replicate consistent snapshot to a second PG instance using FDWs