Re: composite type insert

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: composite type insert
Дата
Msg-id 6146.1163920151@sss.pgh.pa.us
обсуждение исходный текст
Ответ на composite type insert  (Ron Peterson <ron.peterson@yellowbank.com>)
Ответы Re: composite type insert  (Ron Peterson <ron.peterson@yellowbank.com>)
Список pgsql-general
Ron Peterson <ron.peterson@yellowbank.com> writes:
> How should I create a composite type value out of columns a and b in
> table tt that I can insert into table atable?

Hm, it works for me with an explicit cast:

INSERT INTO
  atable
SELECT
  ROW(a, b)::atype
FROM
  tt;

Perhaps we should allow this in an automatic or even implicit cast
context.

            regards, tom lane

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

Предыдущее
От: "Thomas H."
Дата:
Сообщение: tsearch trigger: function public.tsearch2(tsvector, text) does not exist
Следующее
От: Mark Lubratt
Дата:
Сообщение: Running a query as a specific, different user