Search Postgresql Archives

Re: Note on scalar subquery syntax

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

 



Kevin Murphy wrote:
> I thought this might be helpful in the future to other duffers such as
> myself.
> 
> The following is my big contribution to the documentation of the use of
> scalar subqueries ;-):
> 
> You have to wrap a scalar subquery in its own parentheses even where you
> might think it to be unnecessary, such as when the subquery is the sole
> argument to a function.
> 
> As an example, I wrote a function to explode, or unpack, the elements of
> an array onto separate rows (its return type is SETOF whatever), but it
> took me a while to figure out how to use it effectively in queries.

Mind posting it?  I know I've had need of such I thing & IIRC others
have asked as well...

---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

[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