Received: from localhost (maia-3.hub.org [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id B8AE39FA5D8 for ; Fri, 9 Feb 2007 13:53:54 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-new, port 10024) with ESMTP id 60049-07 for ; Fri, 9 Feb 2007 13:53:48 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from alsikeapila.uta.fi (alsikeapila.uta.fi [153.1.1.44]) by postgresql.org (Postfix) with ESMTP id 1512A9FA43B for ; Fri, 9 Feb 2007 13:53:48 -0400 (AST) Received: from neliapila.uta.fi (neliapila.uta.fi [153.1.1.43]) by alsikeapila.uta.fi (8.13.8/8.13.8) with ESMTP id l19HrlBb009085 for ; Fri, 9 Feb 2007 19:53:47 +0200 (EET) Received: from apila.uta.fi (localhost.localdomain [127.0.0.1]) by neliapila.uta.fi (8.13.8/8.13.8) with ESMTP id l19Hrkqv004045 for ; Fri, 9 Feb 2007 19:53:46 +0200 Received: from piippo.uta.fi (piippo.uta.fi [153.1.6.43]) by apila.uta.fi (8.13.8/8.13.8) with ESMTP id l19Hrk0O010773 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT) for ; Fri, 9 Feb 2007 19:53:46 +0200 (EET) Received: from piippo.uta.fi (localhost.localdomain [127.0.0.1]) by piippo.uta.fi (8.13.4/8.13.4/Debian-3sarge3) with ESMTP id l19HrkPZ004735 for ; Fri, 9 Feb 2007 19:53:46 +0200 Received: (from wwwroot@localhost) by piippo.uta.fi (8.13.4/8.13.4/Submit) id l19HrkPn004734 for pgsql-php@postgresql.org; Fri, 9 Feb 2007 19:53:46 +0200 Received: from a81-197-33-208.elisa-laajakaista.fi (a81-197-33-208.elisa-laajakaista.fi [81.197.33.208]) by imp1.uta.fi (Horde MIME library) with HTTP; Fri, 09 Feb 2007 19:53:46 +0200 Message-ID: <20070209195346.qlm86chc1u88g84g@imp1.uta.fi> Date: Fri, 09 Feb 2007 19:53:46 +0200 From: Mihail Mihailov To: pgsql-php@postgresql.org Subject: Re: phpinfo(): postgresql versions' mismatch References: <20070209113129.he36qgs4vthc0o4c@imp3.uta.fi> <20070209145731.GA28879@winnie.fuhr.org> In-Reply-To: <20070209145731.GA28879@winnie.fuhr.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; DelSp="Yes"; format="flowed" Content-Disposition: inline Content-Transfer-Encoding: quoted-printable User-Agent: Internet Messaging Program (IMP) H3 (4.1.4-cvs) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-3.0 (apila.uta.fi [153.1.1.41]); Fri, 09 Feb 2007 19:53:46 +0200 (EET) X-Scanned-By: MIMEDefang 2.58 on 153.1.1.43 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200702/18 X-Sequence-Number: 3701 Hi Michael, Thanks for comments! > On Fri, Feb 09, 2007 at 11:31:29AM +0200, Mihail Mihailov wrote: >> I have recently found out that PHP libpq Version reported by >> phpinfo() doesn't match the Actual PGSQL Version on the server. >> I suspect this is the reason why some of postgresql queries do not run >> via web interface and run without any problem via psql. > > Only some PHP queries don't run? What's different about those that > run and those that don't? At first everything seemed to work fine. Connection works, queries run. So far I have found only one query, which worked in postgres 7.4 and =20 doesn't seem to work now. It is a SELECT query with LIMIT and OFFSET =20 clauses. The first query with OFFSET 0 worked, but the second with OFFSET N =20 returned an empty recordset. I suspected that it has to do with php because the same query works =20 fine in psql environment. > Do the queries that don't run fail with > an error message? If so, what's the exact message? What do the > PostgreSQL logs show for the failed queries? You might need to > adjust settings like log_min_error_statement in postgresql.conf to > get useful log entries. Actually, these queries do not fail they just don't return any data. Do you think it's more likely a bug in the script? > If you ever upgrade PHP to use 8.x libraries instead of 7.4 libraries, > beware that some prepared queries that used to work might start > failing. So, you think it is not a good idea to make php use the 8.x libpq? Is the 7.4 libpq quite compatible with postgres 8.1? Does it affect the speed? Mihail Mihailov