Re: [GENERAL] pg_connect sometimes works sometimes not

2007-04-26 Thread [EMAIL PROTECTED]
Richard Huxton wrote: Try some code like this: OK I'll try it now and write back. Thanks! Iv ---(end of broadcast)--- TIP 9: In versions below 8.0, the planner will ignore your desire to choose an index scan if your joining column's dataty

Re: [GENERAL] pg_connect sometimes works sometimes not

2007-04-26 Thread Richard Huxton
[EMAIL PROTECTED] wrote: Richard Huxton wrote: Did you try pg_last_error()? pg_last_error() does not seem to work. It requires connection as parameter, so if pg_connect() fails - it has nothing to operate on. Or am I missing something? No, I was. I've gone back and re-read your original m

Re: [GENERAL] pg_connect sometimes works sometimes not

2007-04-26 Thread [EMAIL PROTECTED]
Richard Huxton wrote: Did you try pg_last_error()? pg_last_error() does not seem to work. It requires connection as parameter, so if pg_connect() fails - it has nothing to operate on. Or am I missing something? Are you logging connection attempts/failures? Details in the manuals. Checked

Re: [GENERAL] pg_connect sometimes works sometimes not

2007-04-25 Thread Martijn van Oosterhout
On Wed, Apr 25, 2007 at 04:50:46PM +0200, [EMAIL PROTECTED] wrote: > Richard Huxton wrote: > >[EMAIL PROTECTED] wrote: > >>What other variable (which are sometimes there, sometimes not) reasons > >>there can be pg_connect to fail? > > > >What result-code/error do you get? What do your logs show? >

Re: [GENERAL] pg_connect sometimes works sometimes not

2007-04-25 Thread [EMAIL PROTECTED]
Richard Huxton wrote: > Did you try pg_last_error()? No. Will try now. > Are you logging connection attempts/failures? Details in the manuals. Understood. Thank you very much! Iv ---(end of broadcast)--- TIP 1: if posting/reading through Usenet,

Re: [GENERAL] pg_connect sometimes works sometimes not

2007-04-25 Thread Raymond O'Donnell
On 25/04/2007 15:50, [EMAIL PROTECTED] wrote: Thought of using pg_result_error - but it seems applicable only to queries (i.e. with pg_query or pg_execute). How can I get an error code? pg_last_error() http://www.php.net/manual/en/function.pg-last-error.php Ray.

Re: [GENERAL] pg_connect sometimes works sometimes not

2007-04-25 Thread Richard Huxton
[EMAIL PROTECTED] wrote: Richard Huxton wrote: [EMAIL PROTECTED] wrote: What other variable (which are sometimes there, sometimes not) reasons there can be pg_connect to fail? What result-code/error do you get? What do your logs show? I have - $connection = pg_connect("$host $db $user $pas

Re: [GENERAL] pg_connect sometimes works sometimes not

2007-04-25 Thread [EMAIL PROTECTED]
Richard Huxton wrote: [EMAIL PROTECTED] wrote: What other variable (which are sometimes there, sometimes not) reasons there can be pg_connect to fail? What result-code/error do you get? What do your logs show? I have - $connection = pg_connect("$host $db $user $pass"); When I get the error

Re: [GENERAL] pg_connect sometimes works sometimes not

2007-04-25 Thread Richard Huxton
[EMAIL PROTECTED] wrote: What other variable (which are sometimes there, sometimes not) reasons there can be pg_connect to fail? What result-code/error do you get? What do your logs show? -- Richard Huxton Archonet Ltd ---(end of broadcast)-