From: Tom Lane <tgl@sss.pgh.pa.us>
To: Andrew Thorley <andrew.thorley@linuxmail.org>
Cc: Michael Fuhr <mike@fuhr.org>
Cc: pgsql-sql@postgresql.org
Subject: Re: inserting values into types
Date: Wed, 01 Dec 2004 17:11:32 -0500
Message-ID: <19848.1101939092@sss.pgh.pa.us> (raw)
In-Reply-To: <20041201215811.476CF23CE8@ws5-3.us4.outblaze.com>
References: <20041201215811.476CF23CE8@ws5-3.us4.outblaze.com>
"Andrew Thorley" <andrew.thorley@linuxmail.org> writes:
> CREATE TYPE qwerty_UDT AS (abc INT);
> CREATE TABLE t (col1 qwerty_UDT);
> INSERT INTO t (col1) VALUES (qwerty_UDT(123));
> ERROR: function qwerty_udt(integer) does not exist
Just say
INSERT INTO t (col1) VALUES (ROW(123));
Note this will not work at all on pre-8.0 Postgres.
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: tgl@sss.pgh.pa.us, andrew.thorley@linuxmail.org, mike@fuhr.org
Subject: Re: inserting values into types
In-Reply-To: <19848.1101939092@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox