| From: | ed despard <despareg(at)clarkson(dot)edu> |
|---|---|
| To: | pgsql-general(at)postgresql(dot)org |
| Cc: | pgsql-sql(at)postgresql(dot)org |
| Subject: | rules question |
| Date: | 2003-04-30 04:00:51 |
| Message-ID: | 55369696-7AC0-11D7-B730-0003938ABE54@clarkson.edu |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general pgsql-sql |
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
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tom Lane | 2003-04-30 04:14:34 | Re: Optimizer not using index on 120M row table |
| Previous Message | Tom Lane | 2003-04-30 03:58:03 | Re: dump/restore to 7.4devel giving "[archiver (db)] error returned by PQputline" |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tom Lane | 2003-04-30 04:10:37 | Re: Making "SECURITY DEFINER" procedures.. - SOLVED |
| Previous Message | David Durst | 2003-04-30 01:00:29 | unsubscribe |