Re: Populating array of composite datatype

From: Chris Travers <chris(dot)travers(at)gmail(dot)com>
To: Raghavendra <raghavendra(dot)rao(at)enterprisedb(dot)com>
Cc: Sameer Thakur <samthakur74(at)gmail(dot)com>, Postgres General <pgsql-general(at)postgresql(dot)org>
Subject: Re: Populating array of composite datatype
Date: 2013-08-07 10:56:34
Message-ID: CAKt_ZfskPwqZpCFvYQWvYHaNmztYBAs+6EP7y9Eavgwx=yu+JA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wed, Aug 7, 2013 at 3:53 AM, Raghavendra <
raghavendra(dot)rao(at)enterprisedb(dot)com> wrote:

>
> postgres=# insert into foo values (array[row(1,2)::abc]);
>
>
Also because all array members must be of the same db type, you can:

insert into foo values (array[row(1,2)]::abc[]). This can be helpful if
you have more than one array member.

--
Best Wishes,
Chris Travers

Efficito: Hosted Accounting and ERP. Robust and Flexible. No vendor
lock-in.
http://www.efficito.com/learn_more.shtml

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Raghavendra 2013-08-07 11:02:27 Re: Populating array of composite datatype
Previous Message Raghavendra 2013-08-07 10:53:00 Re: Populating array of composite datatype