help replacing expresion in plpgsql - Mailing list pgsql-general

From Juan Pablo L
Subject help replacing expresion in plpgsql
Date
Msg-id CABSYDaazbqNu3vQonx4OhU_4wOkzuTN6T=BQceST0RCuDEeUtQ@mail.gmail.com
Whole thread Raw
Responses Re: help replacing expresion in plpgsql  (Albe Laurenz <laurenz.albe@wien.gv.at>)
List pgsql-general
Hi, i have a function that receives a parameter which represents days:

FUNCTION aaa_recharge_account(expdays integer)

i want to add those days to the CURRENT_DATE, but i do not know how to do it, i have tried several ways to replace that in an expresion like:

newexpdate := CURRENT_TIMESTAMP + interval '$1 days' using expdays;
(newexpdate is declared as timestamp)

and many more but none work, can someone please help me to find out how can i replace that parameter into an expression that i can add to CURRENT_TIMESTAMP or any other way that i can accomplish what i need which is to add that parameter to the current timestamp. thanks!!! 

pgsql-general by date:

Previous
From: Steve Knott
Date:
Subject: Need Help Restoring Old Backup
Next
From: Hungerbühler Philipp (hune)
Date:
Subject: Postgres SQL 8.4 regularly craches