Rule

From: sara_software(at)hotmail(dot)com (sara_software)
To: pgsql-general(at)postgresql(dot)org
Subject: Rule
Date: 2001-11-26 00:30:36
Message-ID: c05ff500.0111251630.9dd8127@posting.google.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

How can a rule call a function?

I have found that I can do this:

CREATE RULE a_rule
AS ON INSERT TO a_table
DO INSTEAD INSERT into other_table(myfunction());

actually I don't have any need for this test scenerio what I want to
do is say:

DO INSTEAD function();
where all insert changes and testing will be carried out.

but it doesn't seem to let me do this, of course all the documentation
leads me to believe it is not possible, but if I am able to call the
function from within an insert statement, can't I just skip that all
together and call the function alone?

Be gentle.

~Sara

Responses

  • Re: Rule at 2001-11-26 14:47:45 from Stephan Szabo
  • Re: Rule at 2001-11-26 14:59:02 from Martín Marqués

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2001-11-26 00:37:04 Re: 7.1.3 build on Solaris 8 with Sun CC
Previous Message Peter Ondruska 2001-11-25 23:27:25 7.1.3 build on Solaris 8 with Sun CC