By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,660 Members | 1,299 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,660 IT Pros & Developers. It's quick & easy.

insert data of composite type

P: n/a
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??
Thank you!
Nov 12 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a

"shiyuan" <sh********@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
---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to ma*******@postgresql.org so that your
message can get through to the mailing list cleanly

Nov 12 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.