[SQL] Memory usage on subselect

2004-05-22 Thread Alexander M. Pravking
Hello, PostgreSQL users and developers. I've got a memory usage problem when I try to do a subselect on the same table as the main select (PostgreSQL 7.3.4 on FreeBSD). Here's my query: SELECT sreq(s1.id, 'ipacct_ip', now()), s1.* FROMservices s1 WHERE EXISTS ( SELECT 1

Re: [SQL] Elegant way to monitor for changes in a trigger and migrate

2004-05-22 Thread Mark Gibson
David B wrote: Folks, Perhaps you can helphell I'm sure you can! I want to monitor for changes in a table and migrate the OLD. record to audit table. Is there an elegant or generic way to do this so I can use across multiple tables with little change. You can use a rule to do this: CREATE RU