From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Brian Blaha <bblaha(at)umr(dot)edu> |
Cc: | pgsql-sql(at)postgresql(dot)org |
Subject: | Re: SQL function triggers |
Date: | 2002-10-15 14:07:14 |
Message-ID: | 14677.1034690834@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
Brian Blaha <bblaha(at)umr(dot)edu> writes:
> I would like to write a function as a set of SQL statements, and then
> use that function
> in a trigger. However, since triggers require a return type of opaque,
> and SQL functions
> cannot return type opaque, this doesn't look possible.
You could call a SQL function from a trigger, but it can't be a trigger
itself; at present triggers have to be in C, plpgsql, or pltcl (maybe
plpython? Not sure about that one).
For what you are doing (transferring info from one table to another)
I suspect a rule might work better than a trigger anyway.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Jeff | 2002-10-15 14:14:01 | Re: how do i insert an empty string ? |
Previous Message | Tom Lane | 2002-10-15 13:57:59 | Re: Stored procedure returning row or resultset |