Re: Note on scalar subquery syntax

From: Peter Fein <pfein(at)pobox(dot)com>
To: Kevin Murphy <murphy(at)genome(dot)chop(dot)edu>
Cc: PostgreSQL general <pgsql-general(at)postgresql(dot)org>
Subject: Re: Note on scalar subquery syntax
Date: 2005-08-03 17:18:15
Message-ID: 42F0FC57.3020200@pobox.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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...

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Ragnar Hafstað 2005-08-03 18:05:51 Re: postgresql.conf value need advice
Previous Message Luca Stancapiano 2005-08-03 16:56:23 ssl problem with postgres 8.0