Re: [SQL] inserting values into types

2004-12-05 Thread Michael Fuhr
On Sat, Dec 04, 2004 at 11:13:29PM -0500, Yasir Malik wrote: > >>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 > >>HINT: No function matches the gi

Re: [SQL] inserting values into types

2004-12-04 Thread Yasir Malik
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 HINT: No function matches the given name and argument types. You may need to add explicit type casts. It seems as though you wa

Re: [SQL] inserting values into types

2004-12-01 Thread Karsten Hilbert
> 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 > HINT: No function matches the given name and argument types. You may need to > add explicit type casts. Well

Re: [SQL] inserting values into types

2004-12-01 Thread Tom Lane
"Andrew Thorley" <[EMAIL PROTECTED]> 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

Re: [SQL] inserting values into types

2004-12-01 Thread Andrew Thorley
qwerty_udt(integer) does not exist HINT: No function matches the given name and argument types. You may need to add explicit type casts. - Original Message - From: "Michael Fuhr" <[EMAIL PROTECTED]> To: "Andrew Thorley" <[EMAIL PROTECTED]> Subject: Re: [SQL]

Re: [SQL] inserting values into types

2004-12-01 Thread Michael Fuhr
On Wed, Dec 01, 2004 at 06:07:34PM +0800, Andrew Thorley wrote: > > Did you type the SQL statements and/or error messages instead > > of cutting and pasting? > > yes i C&P'ed the SQL code & error code. But did you copy the error message associated with the SQL code you copied, or did you copy so

Re: [SQL] inserting values into types

2004-11-30 Thread Michael Fuhr
On Wed, Dec 01, 2004 at 07:51:17AM +0800, Andrew Thorley wrote: > ive generated a user defined type: CREATE TYPE qwerty_UDT AS (abc INT); > > & table as: CREATE TABLE t (col1 qwerty_UDT); Are you using 8.0? I don't think earlier versions allowed this. > my prob is that when i try to insert int

[SQL] inserting values into types

2004-11-30 Thread Andrew Thorley
Hi, ive generated a user defined type: CREATE TYPE qwerty_UDT AS (abc INT); & table as: CREATE TABLE t (col1 qwerty_UDT); my prob is that when i try to insert into the type i.e: INSERT INTO t (col1) Values (qwerty_UDT(123)); i get the error: ERROR: function test_x(integer) does not exist HIN