collection() function

The collection() function creates an empty collection.

Syntax

The collection() function has the following syntax:
collection = collection();

Returns

The function creates an empty collection.

Example

In the following example, the collection_t table is created:
create table collection_t(col1 int, col2 varchar(100));
CREATE TABLE
The following queries store and display the collection in the collection_t table:
insert into collection_t values(1,collection());
INSERT 0 1
select * from collection_t;
 col1 | col2 
------+------
    1 | ARR
(1 row)