calling elog possibly causing problem in DirectFunctionCall1

Поиск
Список
Период
Сортировка
Искать
От
Rajesh Kumar Mallah
Тема
calling elog possibly causing problem in DirectFunctionCall1
Дата
Msg-id
a97c77030612010840o3436b7bcje1cdfc507c009f3b@mail.gmail.com
Список
Дерево обсуждения
calling elog possibly causing problem in DirectFunctionCall1 "Rajesh Kumar Mallah" <mallah.rajesh@gmail.com>
Re: calling elog possibly causing problem in DirectFunctionCall1 Tom Lane <tgl@sss.pgh.pa.us>
Re: calling elog possibly causing problem in DirectFunctionCall1 "Rajesh Kumar Mallah" <mallah.rajesh@gmail.com>
Re: calling elog possibly causing problem in DirectFunctionCall1 "Rajesh Kumar Mallah" <mallah.rajesh@gmail.com>
Hi ,
In certain C trigger function following code snippet causes ERROR:
---------------------------------------------------
elog (NOTICE , "before calling DirectFunctionCall1");
  data->time_stamp =
    DirectFunctionCall1(timestamptz_in, CStringGetDatum("now"));
elog (NOTICE , "after calling DirectFunctionCall1");
----------------------------------------------------

begin work;INSERT INTO  audittest.test_table (name,foo) values ('test','test'); rollback;
BEGIN
NOTICE:  before calling DirectFunctionCall1
ERROR:  timestamp(-1073748880) precision must be between 0 and 6
ROLLBACK

If the elog before DirectFunctionCall1 is removed the code works fine.

begin work;INSERT INTO  audittest.test_table (name,foo) values ('test','test'); rollback;
BEGIN
NOTICE:  after calling DirectFunctionCall1
INSERT 0 1
ROLLBACK

Can anyone please explain how removing a elog makes a difference?

Regds
Mallah.






В списке pgsql-sql по дате отправления
От: Adrian Klaver
Дата:
Сообщение: Re: Grants
От: Shane Ambler
Дата:
Сообщение: Re: Autovaccum
FAQ