Re: inserting values into types

Поиск
Список
Период
Сортировка
От Michael Fuhr
Тема Re: inserting values into types
Дата
Msg-id 20041206040324.GA48287@winnie.fuhr.org
обсуждение исходный текст
Ответ на Re: inserting values into types  (Yasir Malik <ymalik@cs.stevens-tech.edu>)
Список pgsql-sql
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 given name and argument types. You may 
> >>need to add explicit type casts.
> 
> It seems as though you want to create your own user-defined types.  That 
> isn't easy in PostgreSQL.

That the CREATE TABLE statement succeeded implies that he's using
PostgreSQL 8.0, which has better support for composite types than
previous versions.  What he's trying to do will work -- he just has
the syntax wrong.

http://developer.postgresql.org/docs/postgres/rowtypes.html

-- 
Michael Fuhr
http://www.fuhr.org/~mfuhr/


В списке pgsql-sql по дате отправления:

Предыдущее
От: Yasir Malik
Дата:
Сообщение: Re: inserting values into types
Следующее
От: pgsql-sql@vankoperen.nl
Дата:
Сообщение: Making dirty reads possible?