Received: from localhost (maia-4.hub.org [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 955DD9FB2DB for ; Sun, 11 Feb 2007 23:14:00 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-new, port 10024) with ESMTP id 13928-04 for ; Sun, 11 Feb 2007 23:13:58 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from tigger.fuhr.org (tigger.fuhr.org [63.214.45.158]) by postgresql.org (Postfix) with ESMTP id C615B9FB2A6 for ; Sun, 11 Feb 2007 23:13:57 -0400 (AST) Received: from winnie.fuhr.org (winnie.fuhr.org [10.1.0.1]) by tigger.fuhr.org (8.13.8/8.13.8) with ESMTP id l1C3DrYE012258 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sun, 11 Feb 2007 20:13:55 -0700 (MST) Received: from winnie.fuhr.org (localhost [127.0.0.1]) by winnie.fuhr.org (8.13.8/8.13.8) with ESMTP id l1C3DrtT011837; Sun, 11 Feb 2007 20:13:53 -0700 (MST) (envelope-from mfuhr@winnie.fuhr.org) Received: (from mfuhr@localhost) by winnie.fuhr.org (8.13.8/8.13.8/Submit) id l1C3DqkT011836; Sun, 11 Feb 2007 20:13:52 -0700 (MST) (envelope-from mfuhr) Date: Sun, 11 Feb 2007 20:13:52 -0700 From: Michael Fuhr To: Mihail Mihailov Cc: pgsql-php@postgresql.org Subject: Re: phpinfo(): postgresql versions' mismatch Message-ID: <20070212031352.GA11669@winnie.fuhr.org> References: <20070209113129.he36qgs4vthc0o4c@imp3.uta.fi> <20070209145731.GA28879@winnie.fuhr.org> <20070209195346.qlm86chc1u88g84g@imp1.uta.fi> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20070209195346.qlm86chc1u88g84g@imp1.uta.fi> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.059 tagged_above=0 required=5 tests=AWL, SPF_PASS X-Spam-Level: X-Archive-Number: 200702/20 X-Sequence-Number: 3703 On Fri, Feb 09, 2007 at 07:53:46PM +0200, Mihail Mihailov wrote: > > 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 > doesn't seem to work now. It is a SELECT query with LIMIT and OFFSET > clauses. > The first query with OFFSET 0 worked, but the second with OFFSET N > returned an empty recordset. > I suspected that it has to do with php because the same query works > fine in psql environment. Have you turned on statement logging in the database to verify that PHP is sending the query you think it is? Have you looked for errors in the database logs? What does the PHP code that fetches the results look like? > 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? Impossible to say without more information. A self-contained test case might be useful. > > 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? I didn't mean to suggest not using libpq 8.x; I was suggesting that you review your queries to make sure you're not depending on implicit type casts that PDO's emulated prepared statements might be making that will no longer be made with the "real" prepared statements that PDO uses when linked against libpq 8.x. -- Michael Fuhr