Skip site navigation (1) Skip section navigation (2)

Re: Offset

From: David Wheeler <david(at)wheeler(dot)net>
To: Stephan Szabo <sszabo(at)megazone(dot)bigpanda(dot)com>
Cc: <sfpug(at)postgresql(dot)org>
Subject: Re: Offset
Date: 2003-08-28 17:36:31
Message-ID: (view raw or whole thread)
Lists: sfpug
On Wednesday, August 27, 2003, at 09:52  PM, Stephan Szabo wrote:

> Might a subselect in from on the table containing the main objects 
> with a
> limit on that do what you need?
> So instead of a query like:
>  select * from foo left outer join bar on (;
> you get something like:
>  select * from
>   (select * from foo limit <n> offset <m>) as foo left outer
>  join bar on (;
> Or am I misunderstanding?  One problem with that is that I'm not sure 
> at
> what version it'll start working, so it may not gain you anything since
> you need backward compatibility.

Oh yes, that's _exactly_ what I wanted. Thank you, Stephan, you're my 
hero for the day! I think that with the addition of a feature like this 
I'd be willing to push up the required version of PostgreSQL to 7.3.x.

What are the performance implications of this kind of subselect?

I wonder if MySQL 4.1 will be able to do this? If not, and I add this 
to Bricolage, we won't really be able to port it to MySQL. Oh, well!

Thanks again, Stephan!



David Wheeler                                     AIM: dwTheory
david(at)kineticode(dot)com                              ICQ: 15726394                     Yahoo!: dew7e
                                                Jabber: Theory(at)jabber(dot)org
Kineticode. Setting knowledge in motion.[sm]

In response to

  • Re: Offset at 2003-08-28 04:52:29 from Stephan Szabo


  • Re: Offset at 2003-08-28 17:58:09 from David Wheeler

sfpug by date

Next:From: David WheelerDate: 2003-08-28 17:58:09
Subject: Re: Offset
Previous:From: Stephan SzaboDate: 2003-08-28 04:52:29
Subject: Re: Offset

Privacy Policy | About PostgreSQL
Copyright © 1996-2015 The PostgreSQL Global Development Group