"Lars Eckberg" <le(at)eckbergconsulting(dot)com> writes:
> I'm trying to create a function, where the first parameter will be the
> tablename to update.
There is no way to do that in an SQL-language function. If you use
plpgsql then it's possible to construct an SQL command as a string
(ie, concatenate the constant parts with the table name) and then
execute it with an EXECUTE statement.
regards, tom lane