Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 1852A9FB24D for ; Mon, 13 Nov 2006 08:28:14 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 88908-01 for ; Mon, 13 Nov 2006 08:28:08 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from bugaboo.mu (ns1.bugaboo.mu [213.133.111.57]) by postgresql.org (Postfix) with ESMTP id 50BB29FB20F for ; Mon, 13 Nov 2006 08:28:07 -0400 (AST) Received: from [192.168.0.242] (berlin.programmfabrik.de [::ffff:213.221.101.147]) (AUTH: CRAM-MD5 markus@bluegap.ch) by bugaboo.mu with esmtp; Mon, 13 Nov 2006 13:28:03 +0100 id 008F4D5B.455864D3.00002128 Message-ID: <455864D3.4020904@bluegap.ch> Date: Mon, 13 Nov 2006 13:28:03 +0100 From: Markus Schiltknecht User-Agent: Icedove 1.5.0.7 (X11/20061013) MIME-Version: 1.0 To: rodrigo.sakai@zanthus.com.br CC: pgsql-sql@postgresql.org Subject: Re: Inserting data in composite types! References: <00fc01c70720$7364c400$4700a8c0@TREEZANTHUS> In-Reply-To: <00fc01c70720$7364c400$4700a8c0@TREEZANTHUS> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200611/122 X-Sequence-Number: 26774 Hi, Rodrigo Sakai wrote: > How can I insert a single row in this table??? INSERT INTO employee (emp_salary) VALUES ((1000.00, '(2006/10/10, 2006/12/10)')); BTW: are you sure you don't want to use foreign keys instead? Something like: CREATE TABLE salaries ( id SERIAL PRIMARY KEY, salary numeric(10,2) NOT NULL, t_date t_time NOT NULL ); CREATE TABLE employee ( employee_id SERIAL PRIMARY KEY, name TEXT NOT NULL, salary INT NOT NULL REFERENCES salaries(id) ); Regards Markus