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]

 



On Wed, Mar 8, 2023 at 7:58 PM Bryn Llewellyn <bryn@xxxxxxxxxxxx> wrote:

    r := (my_c1, my_c2)::s.t;

If you write s.x there it will also work.

Your first and third assignments are identical in syntax/nature.  These are both the first examples here[1]

Yes, the behavior of INTO in the second assignment is somewhat non-intuitive; but covered here[2].  Probably it could use more examples.

The final form fits into a procedural flow better than the SQL-based one.  Since plpgsql allows for procedural flow this makes sense.  The composite variable reference is simply: main_type_name.field_name  Hence the second example here[1]


David J.


[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