MAP(K, V)
stores key-value pairs. Here’s what K
and V
represent:
K
: The type of the Map keys. It can be string or integral types (i.e., character varying
, smallint
, integer
, or bigint
). It must not be NULL
, and must be unique in the map.V
: The type of the Map values. It can be arbitrary type.VARCHAR
keys and INTEGER
values, use the statement below.
map_from_key_values
or from an array of key-value pairs with map_from_entries
.
x
that has a MAP(VARCHAR, INTEGER)
column.
map_insert
to insert or overwrite a key-value pair into a map.