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

Error codes for LIMIT and OFFSET

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: PG Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Error codes for LIMIT and OFFSET
Date: 2009-02-27 11:32:34
Message-ID: 49A7CF52.9040302@gmx.net (view raw or flat)
Thread:
Lists: pgsql-hackers
I was looking into adding new specific SQL:2008 error codes for invalid 
LIMIT and OFFSET values (see attached patch), when I came across an 
existing error code definition:

#define ERRCODE_INVALID_LIMIT_VALUE  MAKE_SQLSTATE('2','2', '0','2','0')

This definition has been in our sources since error codes were first 
added, but I don't find this code in the standard (it uses a 
standard-space SQLSTATE code), and as far as I can tell, it hasn't been 
actually used anywhere.  Except that PL/pgSQL defines it in plerrcodes.h 
(and Google shows that various other interfaces list it as well), but it 
can never happen, I think.

What should we do here, if anything?  Redefine 
ERRCODE_INVALID_LIMIT_VALUE to the new SQL:2008 code?  Or remove the 
whole thing (assuming that no PL/pgSQL code actually referes to it)?

Attachment: limit-offset-errcodes.patch
Description: text/x-diff (2.0 KB)

Responses

pgsql-hackers by date

Next:From: Heikki LinnakangasDate: 2009-02-27 12:14:34
Subject: Re: BUG #4680: Server crashed if using wrong (mismatch) conversion functions
Previous:From: Zeugswetter Andreas OSB sITDate: 2009-02-27 11:15:57
Subject: RE: [HACKERS] RE: [HACKERS] Kerberos V5 required for PostgreSQL installation on Windows

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