Re: insert data of composite type - Mailing list pgsql-general

From Greg Stark
Subject Re: insert data of composite type
Date
Msg-id 87sml58o92.fsf@stark.dyndns.tv
Whole thread Raw
In response to insert data of composite type  ("shiyuan" <shizhao111@163.com>)
List pgsql-general
"shiyuan" <shizhao111@163.com> writes:

> Dear Sir:
>   We have created a table with a column of composite type.
>   how can we insert values in this table.
>  for exemple:
>  create table aa (a int);
>  create tabel bb (b aa);
>
> how to insert data  into bb??

I wasn't even aware you could do this.

One area this would be really handy is for audit tables. Instead of having to
copy every column over to the audit log, and have to write out tedious
triggers to insert every column, the logging triggers could simply insert the
whole record as one column.

How do you work with such datatypes?

--
greg

pgsql-general by date:

Previous
From: Stephan Szabo
Date:
Subject: Re: slow down on UPDATE using IN statements
Next
From:
Date:
Subject: Re: slow down on UPDATE using IN statements