pg.ddx.io  pgsql-php@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Nick Stone <nick@harelane.com>
To: pgsql-php@postgresql.org
Subject: Pqsocket not implemented in PHP
Date: Thu, 30 Jun 2005 10:35:06 +0100
Message-ID: <20050630093709.3A198252676@smtp.nildram.co.uk> (raw)

Hi,

I tried this question on the PHP lists but didn't get anywhere so I'm hoping
you maybe able to help.

I'm currently implementing a standalone app using php cli. Part of the app
connects to Postgres and waits for a notification using the "Listen
<tablename>" SQL. In the postgres C lib there is a function called
"Pqsocket" which returns the file-descriptor of the socket connection to
Postgres. With this I can use a simple select server to sleep on this
interface and others in the application.

Does anybody now of a patch to make this available under PHP or does the
structure of PHP code effectively make this type approach impossible?
Alternatively if I've just missed the function would somebody point me in
the right direction - I was kind of hoping (until I read the man pages more
closely) that pg_port was the function that wrapped the Pqsocket command but
sadly not!

If I need to wite one then I'll do that and post it back if that's useful
but just in case somebody has done it before...

Thanks

Nick





view thread (5+ messages)  latest in thread

Message-ID: <20050630093709.3A198252676@smtp.nildram.co.uk>
Permalink:  ../20050630093709.3A198252676@smtp.nildram.co.uk/
Also on:    postgresql.org/message-id/20050630093709.3A198252676@smtp.nildram.co.uk

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-php@postgresql.org
  Cc: nick@harelane.com
  Subject: Re: Pqsocket not implemented in PHP
  In-Reply-To: <20050630093709.3A198252676@smtp.nildram.co.uk>
  References: <20050630093709.3A198252676@smtp.nildram.co.uk>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox