Re: PostgresQL or PHP bug? - Mailing list pgsql-general

From Jean-Christian Imbeault
Subject Re: PostgresQL or PHP bug?
Date
Msg-id 3D7AE4BC.1000401@mega-bucks.co.jp
Whole thread Raw
In response to PostgresQL or PHP bug?  (Jean-Christian Imbeault <jc@mega-bucks.co.jp>)
List pgsql-general
Martijn van Oosterhout wrote:

 >I don't see anything obvious but have a look at the rows it is
 >considering duplicates. Are they the same list each time? By the way,
 >it looks like you're connect()ing once for each query you are
 >executing. You should only connect once at the beginning of the
 >program.

Unfortunately I didn't check to see if it always outputted the same
items as being duplicates. I would think not but I'll try and check it out.

As for connect()ing once every query, I was under the impression that
PHP would only really connect() the first time, and on subsequent calls
to connect(), if the connect parameters are the same, would just return
the same backend connection.

The connection gets closed only (and automatically) once the PHP script
ends.

But that is only my *understanding* of PHP and connect() I might be
wrong on the implementation might be buggy (very possible).

I'll try connect()ing just once and also seeing if the duplicate items
are the same and report back.

Thanks for having a look, I really appreciate it!

Jc


pgsql-general by date:

Previous
From: Joel Rodrigues
Date:
Subject: Re: "...integer[] references..." = error
Next
From: Stephan Szabo
Date:
Subject: Re: "...integer[] references..." = error