| From: | "Trevor Talbot" <quension(at)gmail(dot)com> |
|---|---|
| To: | "Reg Me Please" <regmeplease(at)gmail(dot)com> |
| Cc: | "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-general(at)postgresql(dot)org, "Sam Mason" <sam(at)samason(dot)me(dot)uk> |
| Subject: | Re: Variable LIMIT and OFFSET in SELECTs |
| Date: | 2007-11-16 09:07:21 |
| Message-ID: | 90bce5730711160107n37831925u5fc4703c94f9555a@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
On 11/16/07, Reg Me Please <regmeplease(at)gmail(dot)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.
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Wolfgang Keller | 2007-11-16 09:07:26 | Composite types for composite primary/foreign keys? |
| Previous Message | Ow Mun Heng | 2007-11-16 09:03:40 | Re: getting the number of rows affected by a query |