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
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
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