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

Re: proposal - structured funcid and lineno as new fields in error message

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: proposal - structured funcid and lineno as new fields in error message
Date: 2010-03-29 16:32:46
Message-ID: 15085.1269880366@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-hackers
Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> writes:
> can we add well structured information about function id and lineno to
> ErrorData?

The idea that I was toying with was to report the function OID and line
number, which might as well be two separate fields rather than messing
around with anything "structured".

The OID might be a bit inconvenient from the client side, but the
trouble with trying to do more is that constructing a complete function
descriptor will require catalog lookups, which is exactly what you don't
want to be doing in an already-failed transaction.  (We just fixed some
bugs along that line :-()

In any case, the real problem we have is not so much that we lack error
message fields: the messages we emit for plpgsql syntax errors are quite
complete already.  The work that is needed is to provide that same
infrastructure for run-time errors.

			regards, tom lane

In response to

Responses

pgsql-hackers by date

Next:From: Greg SmithDate: 2010-03-29 16:33:00
Subject: Re: enable_joinremoval
Previous:From: Robert HaasDate: 2010-03-29 16:29:11
Subject: Re: enable_joinremoval

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