rules question
rules question
От:
ed despard <despareg@clarkson.edu>
Дата:
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