Re: insert data of composite type

From: Greg Stark <gsstark(at)mit(dot)edu>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: insert data of composite type
Date: 2003-11-03 15:28:57
Message-ID: 87sml58o92.fsf@stark.dyndns.tv
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


"shiyuan" <shizhao111(at)163(dot)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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message mallah 2003-11-03 15:34:44 Re: slow down on UPDATE using IN statements
Previous Message Stephan Szabo 2003-11-03 15:28:24 Re: slow down on UPDATE using IN statements