Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:72992 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 71240 invoked from network); 7 Mar 2014 15:53:09 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 7 Mar 2014 15:53:09 -0000 Authentication-Results: pb1.pair.com header.from=php@beccati.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=php@beccati.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain beccati.com designates 176.9.114.167 as permitted sender) X-PHP-List-Original-Sender: php@beccati.com X-Host-Fingerprint: 176.9.114.167 spritz.beccati.com Received: from [176.9.114.167] ([176.9.114.167:56077] helo=mail.beccati.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id AE/F1-57079-D5BE9135 for ; Fri, 07 Mar 2014 10:53:07 -0500 Received: (qmail 19712 invoked from network); 7 Mar 2014 15:52:58 -0000 Received: from home.beccati.com (HELO ?192.168.1.202?) (88.149.176.119) by mail.beccati.com with SMTP; 7 Mar 2014 15:52:58 -0000 Message-ID: <5319EB3A.2060404@beccati.com> Date: Fri, 07 Mar 2014 16:52:26 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.3.0 MIME-Version: 1.0 To: PHP Internals Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: PDO_PGSQL improvements for 5.6 From: php@beccati.com (Matteo Beccati) Hi, I know I'm very late, but I really haven't had a chance until now. I do have a few improvements for PDO_PGSQL that I'd really love to get into PHP 5.6 if possible. They are about: 1. Cleaning up the #ifdef mess by raising the libpq requirements to versions providing PQprepare, PQescapeStringConn, PQescapeByteaConn, that is some 8.1.x / 8.2.x (which are way past EOL anyway). 2. Deprecate PDO::PGSQL_ATTR_DISABLE_NATIVE_PREPARED_STATEMENT which is effectively equivalent to PDO::ATTR_EMULATE_PREPARES. There's no need to keep and maintain both of them. 3. PQexecParams support. By default server side prepared statements are used, which is a waste of time/resources in case the query has to be executed just once. You can normally avoid that by using PDO::ATTR_EMULATE_PREPARES, which is much faster, but forces PDO to inline parameters in the queries. A newly introduced PDO::PGSQL_ATTR_DISABLE_PREPARES will switch to use PQexecParams by sending the query with placeholders and parameters separately, like PQprepare does, without having to worry with the potential security risks of ATTR_EMULATE_PREPARES. Thoughts? Cheers -- Matteo Beccati Development & Consulting - http://www.beccati.com/