Search Postgresql Archives

Re: composite type insert

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Ron Peterson <ron.peterson@xxxxxxxxxxxxxx> 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


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux