Re: Variable LIMIT and OFFSET in SELECTs - Mailing list pgsql-general

From Trevor Talbot
Subject Re: Variable LIMIT and OFFSET in SELECTs
Date
Msg-id 90bce5730711160107n37831925u5fc4703c94f9555a@mail.gmail.com
Whole thread Raw
In response to Re: Variable LIMIT and OFFSET in SELECTs  (Reg Me Please <regmeplease@gmail.com>)
List pgsql-general
On 11/16/07, Reg Me Please <regmeplease@gmail.com> wrote:
> Il Friday 16 November 2007 08:33:14 Tom Lane ha scritto:

> > Let me try to explain one more time.  You propose allowing
> >
> >       select ... from
> >         table1 join table2 on table1.x = table2.y
> >         limit table1.z
> >
> > Now this would be somewhat well-defined if there were only one row in
> > table1, or if there were many rows but they all had the same value
> > in column z.  But what if that's not the case?  If there are multiple
> > possible values for z then the query is just not sensible.

> tmp=# SELECT * from nextval( (select seq from seqs) );
> ERROR:  more than one row returned by a subquery used as an expression

This is a subselect, not a column from the query itself.  Completely
different thing.

pgsql-general by date:

Previous
From: Ow Mun Heng
Date:
Subject: Re: getting the number of rows affected by a query
Next
From: Wolfgang Keller
Date:
Subject: Composite types for composite primary/foreign keys?