From: ed despard <despareg@clarkson.edu>
To: pgsql-general@postgresql.org
Cc: pgsql-sql@postgresql.org
Subject: rules question
Date: Wed, 30 Apr 2003 00:00:51 -0400
Message-ID: <55369696-7AC0-11D7-B730-0003938ABE54@clarkson.edu> (raw)
hi, i have a table named pursuit which has no data in it, currently to
get data for the table i have a function that i call like: select *
from pursuit_select_function(raceid), but i put in the raceid that im
selecting for. i would like to be able to treat this table like a view
and make a query like select * from pursuit where raceid=9 or somthing
and have a rule rewrite this into the function call. is there a way to
have a rule that rewrites the query based on the qualifier of the query?
the reason im not just using a normal view is that i have a sequence
that needs to be reset before each select, so the
pursuit_select_function resets the sequence and does the select query.
thanks.
ed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-sql@postgresql.org
Cc: despareg@clarkson.edu, pgsql-general@postgresql.org
Subject: Re: rules question
In-Reply-To: <55369696-7AC0-11D7-B730-0003938ABE54@clarkson.edu>
References: <55369696-7AC0-11D7-B730-0003938ABE54@clarkson.edu>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox