hi all, i want to know how to insert values into the field which is a complex type. In fact it is a complex type which also include a complex type. The following is its definition:
create TYPE lifetime as( strattime date, endtime date);
create TYPE attributetype as( ID numeric, address character(50), periodspan lifetime);
create TABLE attribute2005( gid serial, allfield attributetype);
now i want to insert data into the table attribute2005 but always failure so wish someone can help.
my sql is following:
INSERT INTO attribute2005 VALUES(1,(23,'ee','ttt',('2005-01-01','2005-12-31')));
my postgresql is 8.2 and is installed in windows XP.
thank you!
xiaochun wu
-------------------------------------------------------------------
外企高薪职位急聘( http://d1.sina.com.cn/sina/limeng3/mail_zhuiyu/2008/mail_zhuiyu_20080331.html )
-------------------------------------------------------------------
注册新浪2G免费邮箱(http://mail.sina.com.cn/)