Re: inserting values into types

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: inserting values into types
Дата
Msg-id 19848.1101939092@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: inserting values into types  ("Andrew Thorley" <andrew.thorley@linuxmail.org>)
Список pgsql-sql
"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


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

Предыдущее
От: "Andrew Thorley"
Дата:
Сообщение: Re: inserting values into types
Следующее
От: Stephan Szabo
Дата:
Сообщение: Re: Query is slower