rules question

Поиск
Список
Период
Сортировка
От ed despard
Тема rules question
Дата
Msg-id 55369696-7AC0-11D7-B730-0003938ABE54@clarkson.edu
обсуждение исходный текст
Ответы Re: rules question  (Richard Huxton <dev@archonet.com>)
Список pgsql-general
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


В списке pgsql-general по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: dump/restore to 7.4devel giving "[archiver (db)] error returned by PQputline"
Следующее
От: Martijn van Oosterhout
Дата:
Сообщение: Re: qsort (was Re: Solaris)