From: | "Rajesh Kumar Mallah" <mallah(dot)rajesh(at)gmail(dot)com> |
---|---|
To: | pgsql-sql(at)postgresql(dot)org |
Subject: | calling elog possibly causing problem in DirectFunctionCall1 |
Date: | 2006-12-01 16:40:50 |
Message-ID: | a97c77030612010840o3436b7bcje1cdfc507c009f3b@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
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.
From | Date | Subject | |
---|---|---|---|
Next Message | Shane Ambler | 2006-12-01 17:06:09 | Re: Autovaccum |
Previous Message | Adrian Klaver | 2006-12-01 15:42:10 | Re: [SQL] Grants |