On Wed, Aug 20, 2003 at 10:14:01AM +0800, Ramil Sagum wrote: > > -----Original Message----- > > From: [EMAIL PROTECTED] > > [mailto:[EMAIL PROTECTED] Behalf Of Ramil Sagum > > Sent: Wednesday, August 20, 2003 10:01 AM > > To: Philippine Linux Users Group Mailing List > > Subject: RE: [plug] PL/pgSQL > > > > > Statement 1. I've done database development for 15+ years now. > > Statement 2. Cool. That's more than half my lifetime! :) > ... > > > > :D > > > should have just kept my mouth shut. hehe. > > anyway, does anyone know of a way to get the queries currently being passed > onto postgres other than > > select * from pg_stat_activity; > > ? It's good, but i need something that updates in real time. (like a file > being "tail -f"-ed)
To do this properly, you can use the notify/listen functionality. Basically, put an update/insert trigger on the table, and notify within it. The listening side then knows that the table was updated. Michael -- Michael Darrin Chaney [EMAIL PROTECTED] http://www.michaelchaney.com/ -- Philippine Linux Users' Group (PLUG) Mailing List [EMAIL PROTECTED] (#PLUG @ irc.free.net.ph) Official Website: http://plug.linux.org.ph Searchable Archives: http://marc.free.net.ph . To leave, go to http://lists.q-linux.com/mailman/listinfo/plug . Are you a Linux newbie? To join the newbie list, go to http://lists.q-linux.com/mailman/listinfo/ph-linux-newbie
