From: Alvaro Herrera <alvherre@atentus.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: PgSQL general <pgsql-general@postgresql.org>
Subject: Re: [SQL] how to get more detailed error messages?
Date: Fri, 12 Apr 2002 14:05:03 -0400
Message-ID: <20020412140503.7786ee3a.alvherre@atentus.com> (raw)
In-Reply-To: <28259.1018633206@sss.pgh.pa.us>
References: <0204120904101G.28384@magnus>
<28259.1018633206@sss.pgh.pa.us>
En Fri, 12 Apr 2002 13:40:06 -0400
Tom Lane <tgl@sss.pgh.pa.us> escribió:
> Markus Wagner <wagner@imsd.uni-mainz.de> writes:
> > When executing the code we get an error message "ERROR: UNION types "text"
> > and "int4" not matched" with only the line number of the terminating
> > semicolon included.
>
> > Isn't there a way to get the parser to talk more precisely???
[...]
> 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.
Is there a way to tell the parser to only include those backpointer on
demand (say, set them to NULL unless explicitly told to do the
backreference)? That way, correct queries do not have to pay the price,
but there is a way to debug a query if one wants to. Say,
DEBUG <sql-stmt>
or something like that (just like EXPLAIN etc).
--
Alvaro Herrera (<alvherre[a]atentus.com>)
"El destino baraja y nosotros jugamos" (A. Schopenhauer)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: alvherre@atentus.com, tgl@sss.pgh.pa.us, pgsql-general@postgresql.org
Subject: Re: [SQL] how to get more detailed error messages?
In-Reply-To: <20020412140503.7786ee3a.alvherre@atentus.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox