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
Views: Raw Message | Whole Thread | Download mbox | Resend email
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 Content-Type Size
limit-offset-errcodes.patch text/x-diff 2.0 KB

Responses

Browse pgsql-hackers by date

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