Re: inserting values into types
От | Michael Fuhr |
---|---|
Тема | Re: inserting values into types |
Дата | |
Msg-id | 20041201001711.GA87131@winnie.fuhr.org обсуждение исходный текст |
Ответ на | inserting values into types ("Andrew Thorley" <andrew.thorley@linuxmail.org>) |
Список | pgsql-sql |
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 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 This error doesn't agree with the INSERT statement you gave -- it should say "function qwerty_udt(integer) does not exist". Where does test_x() come from? Did you type the SQL statements and/or error messages instead of cutting and pasting? We can see what's happening, but it's better to paste the exact statements and output to avoid mistakes. > HINT: No function matches the given name and argument types. You may need to add explicit type casts. See the "Composite Types" documentation -- it has a section entitled "Composite Value Input": http://developer.postgresql.org/docs/postgres/rowtypes.html -- Michael Fuhr http://www.fuhr.org/~mfuhr/
В списке pgsql-sql по дате отправления: