Skip site navigation (1) Skip section navigation (2)

trigger with arguments

From: Vincent CARON <vincent(dot)caron(at)aktiva(dot)hu>
To: pgsql-novice(at)postgresql(dot)org
Subject: trigger with arguments
Date: 2005-05-31 10:42:40
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-novice
Hello everybody,
I have little problems with a function/trigger in Pl/pgSQL.
I want to call this function with 2 arguments:
- the name of a table
- the name of a column
So it looks like :
CREATE  FUNCTION attribute_max(table name,column name)
The creation is successfull, but, when I look after what's the function
looks like, it's something like this:
FUNCTION attribute_max(name,name)

I'm unable to call this function, by a trigger for exemple :
   ON status FOR EACH ROW
   EXECUTE PROCEDURE public.attribute_max(table1, column1);
I have this error: function public.attribute_max() does not exist.
I have tried to put table1 and column1 into single and double quotes,
and protected by \ also.

Can anyone help me, where am I wrong?

Mes coordonnées - My details :
Clé - GPG - Key:


pgsql-novice by date

Next:From: Keith WorthingtonDate: 2005-05-31 11:04:11
Subject: Re: trigger with arguments
Previous:From: Jessica DittDate: 2005-05-31 09:16:19
Subject: another question concerning TOAST

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group