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.