M
M
Mirrrta2020-06-10 13:39:42
PostgreSQL
Mirrrta, 2020-06-10 13:39:42

How to create an array with objects in postgres?

I am creating a column and I need to choose a Data type, which one to choose for storing an array with objects [{}]?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
G
galaxy, 2020-06-10
@Mirrta

See what the task is.
For completely arbitrary objects - jsonb (well, or jsonb[] to have an array).
If the objects are of the same structure, you can create your own composite type and typename[] column.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question