Re: [SQL] how to get more detailed error messages?

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: [SQL] how to get more detailed error messages?
Дата
Msg-id 20020412140503.7786ee3a.alvherre@atentus.com
обсуждение исходный текст
Ответ на Re: [SQL] how to get more detailed error messages?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
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)

В списке pgsql-general по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: [SQL] how to get more detailed error messages?
Следующее
От: Devrim GUNDUZ
Дата:
Сообщение: Permissions on columns: in todo list??