Search Postgresql Archives

Re: select (17, 42)::s.t2 into... fails with "invalid input syntax"

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

 



Bryn Llewellyn <bryn@xxxxxxxxxxxx> writes:
>     select (17, 42)::s.t2 into r2;
> [ doesn't work ]

This would work as

      select 17, 42 into r2;

In general, SELECT INTO with a composite target expects to see
a source column per target field.  If you want to assign a
composite value to the whole target, don't use SELECT INTO;
use an assignment statement.

			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 Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux