Postgres 'notify' in PHP?

From: Date: Mon, 19 Jul 1999 17:50:46 +0000
Subject: Postgres 'notify' in PHP?
Groups: php.dev 
Request: Send a blank email to php-dev+get-8728@lists.php.net to get a copy of this message
Dear list readers, I just subscribed, and though I looked into the list archives, I apologize if this issue came up recently. I whipped up a threaded message board using PHP and PostgreSQL ( http://www.lettera.hu/~bandit/AX/msgboard ), where the main topic list is refreshed by server push. For that to happen, I have to know when a change occured; I thought the listen/notify method offered by PostgreSQL would be great for this, but AFAIK this is not currently implemented in PHP as of 3.0.11, so I have to resort to a loop of { doing a query checking for change and then sleep() for some time }. While not currently a real issue as of CPU usage due to low traffic, this approach besides being conceptually ugly, causes unnecessary HDD activity as well. I would like to know your views on this feature, and integrating/implementing it into PHP. I've skimmed the code, and am also somewhat familiar with the psql C library; I would be glad to try my teeth on this, if someone would give me a helping hand at the beginning. Thank you in advance, Regards, Andras Kadinger bandit@freeside.elte.hu

« previous php.dev (#8728) next »