From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Barry Lind <barry(at)xythos(dot)com> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Re: "Oracle's ROWNUM" |
Date: | 2001-07-30 18:12:12 |
Message-ID: | 21527.996516732@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Barry Lind <barry(at)xythos(dot)com> writes:
> ... For example rownum = 2 will return
> no rows because the first row returned by the query has by definition a
> rownum of 1, but the where predicate prevents this row from being
> returned, thus it can never get to a rownum value of 2 to satisfy the
> where predicate.
So in other words, a construct accessible in the WHERE clause is defined
in terms of what happens far downstream of WHERE. This cannot possibly
have sane behavior. I won't even ask about join queries...
AFAICT, LIMIT/OFFSET do the same job in a much more logical fashion.
Let's stick with those, and not try to copy the more brain-dead aspects
of Oracle.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Choe | 2001-07-30 20:22:24 | database information |
Previous Message | Stephan Szabo | 2001-07-30 17:05:39 | Re: RULE vs TRIGGER |