Re: [GENERAL] Rules on Select

2006-05-05 Thread elein
This is best done by using a trigger on the table. http://www.varlena.com/GeneralBits/38.php shows how to do it with both a trigger and with a rule. --elein [EMAIL PROTECTED] On Fri, May 05, 2006 at 04:48:28PM -0400, Sean Hamilton wrote: > I have to log each time a user selects data from a table

Re: [GENERAL] Rules on Select

2006-05-05 Thread Tony Wasson
On 5/5/06, Sean Hamilton <[EMAIL PROTECTED]> wrote: I have to log each time a user selects data from a table by inserting record in another table. For example I have table xzy user test selects id, name from table xyz. I want to insert into table xyz_log user, action, fields, timestamp test, sele

Re: [GENERAL] Rules on Select

2006-05-05 Thread Hogan, James F. Jr.
Sean, I am looking to do the same thing... I have so far posted with little relevant response to pgsql-admin, pgsql-general and pgsql-sql If you get any help please forward my way... I will do the same.. What I can tell you is that it is possible to write the Select Statements submitted to the

Re: [GENERAL] Rules on select

2005-01-17 Thread Rick Schumeyer
As a new user, I recently had the same problem. I then realized what the problem is. You want to select from sharp_p1 instead of selecting from sharp. That means you never actually select from sharp. Since nothing was selected, postgres can't do anything useful with the WHERE clause. To put it