PL/PgSQL Question

From: Brian Knox <laotse(at)aol(dot)net>
To: pgsql-sql(at)postgresql(dot)org
Subject: PL/PgSQL Question
Date: 2003-04-25 15:52:11
Message-ID: Pine.LNX.4.53.0304251125230.19187@tao.office.aol.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

From within a postgresql rule, is it possible to get at the values
specified in the WHERE clause of the query?

For example, given the query:

DELETE FROM map_tr_relationship WHERE fk_tr1_id = 4 AND fk_tr2_id = 5 AND
fk_tr_relationship_type_id = 1 AND from_tr_request_id = 4;

I want to intercept that query with a rule, and with DO INSTEAD call a
stored procedure and pass the values in the where clause to that stored
proc? Is this possible? If so, how?

Thanks for any info.

Brian Knox
laotse(at)aol(dot)net

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Rajesh Kumar Mallah 2003-04-25 16:10:49 /* */ comments showing up in pg_stat_activity
Previous Message maggie 2003-04-25 11:14:23 Can I using function with insert or update?