Re: Improve error handling in pltcl

Поиск
Список
Период
Сортировка
От Pavel Stehule
Тема Re: Improve error handling in pltcl
Дата
Msg-id CAFj8pRC-ctCzs68kL-04PGNjuRKQ9yGJr_dTaOz4rD5OXXi0nw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Improve error handling in pltcl  (Jim Nasby <Jim.Nasby@BlueTreble.com>)
Ответы Re: Improve error handling in pltcl  (Pavel Stehule <pavel.stehule@gmail.com>)
Список pgsql-hackers
Hi

2016-03-01 22:23 GMT+01:00 Jim Nasby <Jim.Nasby@bluetreble.com>:
On 2/29/16 10:01 PM, Tom Lane wrote:
Jim Nasby <Jim.Nasby@BlueTreble.com> writes:
On 2/28/16 5:50 PM, Jim Nasby wrote:
Per discussion in [1], this patch improves error reporting in pltcl.

I forgot to mention that this work is sponsored by Flight Aware
(http://flightaware.com).

Huh ... I use that site.  There's PG and pltcl code behind it?
Cool!


I didn't study this patch deeper yet. Just I am sending rebased code

I found one issue. The context

+ ERROR:  relation "foo" does not exist
+ CONTEXT:  relation "foo" does not exist
+     while executing
+ "spi_exec "select * from foo;""
+     ("eval" body line 1)
+     invoked from within
+ "eval $1"
+     (procedure "__PLTcl_proc_16461" line 3)
+     invoked from within
+ "__PLTcl_proc_16461 {spi_exec "select * from foo;"}"
+ in PL/Tcl function "tcl_eval"

is changed in any call - when I did "make installcheck"


*** 567,575 ****
      ("eval" body line 1)
      invoked from within
  "eval $1"
!     (procedure "__PLTcl_proc_16461" line 3)
      invoked from within
! "__PLTcl_proc_16461 {spi_exec "select * from foo;"}"
  in PL/Tcl function "tcl_eval"
  select pg_temp.tcl_eval($$
  set list [lindex $::errorCode 0];
--- 567,575 ----
      ("eval" body line 1)
      invoked from within
  "eval $1"
!     (procedure "__PLTcl_proc_16841" line 3) <<<<<==================== _PLTcl_proc_XXXX
      invoked from within
! "__PLTcl_proc_16841 {spi_exec "select * from foo;"}"
  in PL/Tcl function "tcl_eval"
  select pg_temp.tcl_eval($$
  set list [lindex $::errorCode 0];

I am not able to see, if this information is interesting or not. We can hide context, but I have not a idea, if it is ok or not.

Regards

Pavel

Вложения

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

Предыдущее
От: Michael Paquier
Дата:
Сообщение: VS 2015 support in src/tools/msvc
Следующее
От: Teodor Sigaev
Дата:
Сообщение: Re: WIP: Upper planner pathification