Hello,
I have searched the Internet for an answer but nothing works for me.
There is a plpgsql function which is used in a trigger. I need to
substitute a value "7" for "lifetime" (integer) SELECTed in a previous
query.
DECLARE
lifetime integer;
BEGIN
SELECT foo INTO lifetime FROM tblname;
UPDATE ....
SET expiretime = expiretime + interval '7 days'
WHERE .....
RETURN NEW;
END;
This doesn't work for me:
SET expiretime = expiretime + interval 'lifetime days'
SET expiretime = expiretime + interval || lifetime || 'days'
Thank you for your help or for a some useful link.
--
Jiri Nemec
http://www.meneashop.cz/