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