Simon Riggs [EMAIL PROTECTED] writes:
On Thu, 2007-12-13 at 22:23 -0800, Neil Conway wrote:
If LIMIT n means emit at most n tuples, then a query that produces 0
rows with n 0 is arguably violating its spec, since it has produced
more tuples than the LIMIT specified (0 n). Interpreted this
This has been saved for the 8.4 release:
http://momjian.postgresql.org/cgi-bin/pgpatches_hold
---
Andrew Sullivan wrote:
On Sun, Dec 16, 2007 at 12:31:11PM -0500, Tom Lane wrote:
Well, I wouldn't advocate
On Fri, Dec 14, 2007 at 06:42:24PM -0500, Tom Lane wrote:
How do people feel about applying this to 8.3, rather than holding it?
To me, this is a feature change, and therefore should be held.
A
---(end of broadcast)---
TIP 5: don't forget to
Andrew Sullivan [EMAIL PROTECTED] writes:
On Fri, Dec 14, 2007 at 06:42:24PM -0500, Tom Lane wrote:
How do people feel about applying this to 8.3, rather than holding it?
To me, this is a feature change, and therefore should be held.
Well, I wouldn't advocate making it in a minor release, but
Gregory Stark wrote:
Simon Riggs [EMAIL PROTECTED] writes:
I'm fairly surprised these queries work. Is there some reason why we
support this? April Fools Day? Jules Verne? I'm all for fast queries,
but zero seems like the lowest value we should support...
Huh, I was all set to post
Bruce Momjian [EMAIL PROTECTED] writes:
Since we got LIMIT/OFFSET from MySQL, would someone tell us how MySQL
behaves in these cases?
Not very well, at least not in mysql 5.0.45:
mysql select * from t limit -2;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that
Tom Lane [EMAIL PROTECTED] writes:
mysql select * from t limit 2 offset -2;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual
that corresponds to your MySQL server version for the right syntax to use
near '-2' at line 1
This behavior suggests that they can't even
Gregory Stark [EMAIL PROTECTED] writes:
Tom Lane [EMAIL PROTECTED] writes:
This behavior suggests that they can't even deal with LIMIT/OFFSET
values that aren't simple integer literals ...
I suppose when they added these features I think they didn't have subqueries,
so there wasn't really
On Fri, 2007-12-14 at 18:42 -0500, Tom Lane wrote:
Simon Riggs [EMAIL PROTECTED] writes:
How do people feel about applying this to 8.3, rather than holding it?
One possible objection is that we're past string freeze, but I noted
Peter doing some message editorializing as recently as today, so
Tom Lane [EMAIL PROTECTED] writes:
Gregory Stark [EMAIL PROTECTED] writes:
On Dec 14, 2007 6:42 PM, Tom Lane [EMAIL PROTECTED] wrote:
How do people feel about applying this to 8.3, rather than holding it?
I think it would have been better to apply before beta. We would have found
out if
On Thu, 2007-12-13 at 22:06 -0500, Tom Lane wrote:
Hmm ... I don't recall much either. The code in nodeLimit.c just
silently replaces a negative input value by zero. It'd certainly be
possible to make it throw an error instead, but what the downsides of
that might be aren't clear.
I
Tom Lane [EMAIL PROTECTED] writes:
Jonah H. Harris [EMAIL PROTECTED] writes:
Don't we have any similar usability cases in the system like this,
where negatives are not allowed only for the sake of it being an
insane setting? I'm tired, but I thought we did.
Yeah, probably. It's the kind
On Fri, 2007-12-14 at 14:41 +, Simon Riggs wrote:
On Thu, 2007-12-13 at 22:23 -0800, Neil Conway wrote:
so here's a patch.
minor correction
--
Simon Riggs
2ndQuadrant http://www.2ndQuadrant.com
Index: src/backend/executor/nodeLimit.c
On Thu, 2007-12-13 at 22:23 -0800, Neil Conway wrote:
On Thu, 2007-12-13 at 22:06 -0500, Tom Lane wrote:
I guess that on purely philosophical grounds, it's not an unreasonable
behavior. For example, LIMIT n means output at most n tuples,
not output exactly n tuples. So when it outputs no
On Fri, Dec 14, 2007 at 09:02:04AM +, Gregory Stark wrote:
Oh, and incidentally the problem with WARNING is that this is DML which could
potentially be executing hundreds or thousands of times per minute. A WARNING
is effectively an ERROR.
Good point. Also, the sort of case where you're
On Thu, Dec 13, 2007 at 11:31:17PM -0500, Merlin Moncure wrote:
for historical record, this comment (subject not directly related to
the OP) was probably this:
http://www.mail-archive.com/pgsql-hackers@postgresql.org/msg62562.html
Bingo. Thanks!
A
---(end of
Simon Riggs [EMAIL PROTECTED] writes:
I even found an existing, unused error message called
ERRCODE_INVALID_LIMIT_VALUE
That's a bad idea I think. That code is defined by SQL99. I can't find
anyplace that they specify what it should be raised for, but we can be
pretty confident that it's not
On Dec 14, 2007 6:42 PM, Tom Lane [EMAIL PROTECTED] wrote:
How do people feel about applying this to 8.3, rather than holding it?
One possible objection is that we're past string freeze, but I noted
Peter doing some message editorializing as recently as today, so it
would seem a slushy freeze
Jonah H. Harris [EMAIL PROTECTED] writes:
On Dec 14, 2007 6:42 PM, Tom Lane [EMAIL PROTECTED] wrote:
How do people feel about applying this to 8.3, rather than holding it?
One possible objection is that we're past string freeze, but I noted
Peter doing some message editorializing as recently
Gregory Stark [EMAIL PROTECTED] writes:
On Dec 14, 2007 6:42 PM, Tom Lane [EMAIL PROTECTED] wrote:
How do people feel about applying this to 8.3, rather than holding it?
I think it would have been better to apply before beta. We would have found
out if users were going to complain about it.
I'm fairly surprised these queries work. Is there some reason why we
support this? April Fools Day? Jules Verne? I'm all for fast queries,
but zero seems like the lowest value we should support...
postgres=# select * from accounts limit -9;
aid | bid | abalance | filler
Simon Riggs [EMAIL PROTECTED] writes:
I'm fairly surprised these queries work. Is there some reason why we
support this? April Fools Day? Jules Verne? I'm all for fast queries,
but zero seems like the lowest value we should support...
Huh, I was all set to post an example of a useful
On Fri, Dec 14, 2007 at 01:47:23AM +, Gregory Stark wrote:
Huh, I was all set to post an example of a useful application of it but then
apparently I'm wrong and it doesn't work:
I dimly remember some discussion of this issue once before, maybe a year
ago. My memory isn't what it was, and I
On Dec 13, 2007 9:43 PM, Andrew Sullivan [EMAIL PROTECTED] wrote:
I dimly remember some discussion of this issue once before, maybe a year
ago. My memory isn't what it was, and I can't find it by trolling archives,
but I recall Tom saying that it was dumb, yes, but don't do that, because
On Thu, Dec 13, 2007 at 10:06:35PM -0500, Tom Lane wrote:
of a negative limit, it's meeting its spec. If you want to throw an
error for negative limit, shouldn't you logically also throw an error
Should it be a WARNING?
A
---(end of
On Thu, Dec 13, 2007 at 10:01:43PM -0500, Jonah H. Harris wrote:
Man, maybe my mad Google skillz are not as mad as I thought :(
Hey, I worked in a library some years ago, when Google was just a googlet,
and I couldn't find it either. It's a dim memory, note. Which could mean
artifact. I'm
Andrew Sullivan [EMAIL PROTECTED] writes:
On Fri, Dec 14, 2007 at 01:47:23AM +, Gregory Stark wrote:
Huh, I was all set to post an example of a useful application of it but then
apparently I'm wrong and it doesn't work:
I dimly remember some discussion of this issue once before, maybe a
On Dec 13, 2007 10:06 PM, Tom Lane [EMAIL PROTECTED] wrote:
I guess that on purely philosophical grounds, it's not an unreasonable
behavior. For example, LIMIT n means output at most n tuples,
not output exactly n tuples. So when it outputs no tuples in the face
of a negative limit, it's
Jonah H. Harris [EMAIL PROTECTED] writes:
Don't we have any similar usability cases in the system like this,
where negatives are not allowed only for the sake of it being an
insane setting? I'm tired, but I thought we did.
Yeah, probably. It's the kind of thing where the call is close enough
On Dec 13, 2007 10:06 PM, Tom Lane [EMAIL PROTECTED] wrote:
Andrew Sullivan [EMAIL PROTECTED] writes:
On Fri, Dec 14, 2007 at 01:47:23AM +, Gregory Stark wrote:
Huh, I was all set to post an example of a useful application of it but
then
apparently I'm wrong and it doesn't work:
I
On Thu, 2007-12-13 at 22:06 -0500, Tom Lane wrote:
I guess that on purely philosophical grounds, it's not an unreasonable
behavior. For example, LIMIT n means output at most n tuples,
not output exactly n tuples. So when it outputs no tuples in the face
of a negative limit, it's meeting its
31 matches
Mail list logo