Re: how to get more detailed error messages? - Mailing list pgsql-sql

From Josh Berkus
Subject Re: how to get more detailed error messages?
Date
Msg-id web-1320638@davinci.ethosmedia.com
Whole thread Raw
In response to Re: how to get more detailed error messages?  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-sql
Tom,

> I have occasionally toyed with the idea of labeling querytree
> elements
> with back-pointers showing the segment of source text that they came
> from, but AFAICT this would impose a nontrivial cost on parsing
> activity
> --- a cost that'd be paid all the time, even on correct queries.  Not
> sure if it'd be a net benefit or not.

I'd suggest it as a compile-time option, if that's feasable.  This is
only a concern, IME, for development machines.  On a production
machine, presumably all of the queries and functions are already
tested.

Thus, if we had the compile-time option of --explicit-query-errors then
it would add this functionality for testers without slowing down
PostgreSQL overall.  Don't know if compile-time options for the parser
are reasonable, though.  Also, I would personally rate this below
several other improvement projects in priority, such as in-database
replication, point-in-time recovery and nested transactions.

-Josh Berkus

pgsql-sql by date:

Previous
From: Jan Wieck
Date:
Subject: Re: Functions in Postgres
Next
From: Tom Lane
Date:
Subject: Re: Functions in Postgres