Re: [GENERAL] plpgsql extract epoch problem

2003-10-22 Thread Darren Ferguson
Sorry found the answer I was taking the docs to literal It should be extract(epoch from _test) Sorry for the email Darren Darren Ferguson wrote: Hey all I am trying to extract the epoch from a timestamp variable in plpgsql. The function is as follows: create or replace function test() returns

[GENERAL] plpgsql extract epoch problem

2003-10-22 Thread Darren Ferguson
Hey all I am trying to extract the epoch from a timestamp variable in plpgsql. The function is as follows: create or replace function test() returns integer as ' declare _test timestamp with time zone; _f integer; begin _test := current_timestamp; _f := extract(epoch from timestamp _test); re

Re: [GENERAL] create function for trigger question

2003-11-06 Thread Darren Ferguson
Barbera What you have written is a stored procedure not a trigger function. Trigger functions until 7.2 return generally OPAQUE and after 7.2 they return TRIGGER. See the example of a trigger below for your function CREATE OR REPLACE FUNCTION customer_bak_proc() RETURNS TRIGGER AS ' BEGIN IF T