Major upgrade to ext/pgsql

From: Date: Wed, 16 Mar 2005 05:21:16 +0000
Subject: Major upgrade to ext/pgsql
Groups: php.internals 
Request: Send a blank email to internals+get-15460@lists.php.net to get a copy of this message
Hi, Attached is a patch that brings PostgreSQL support in PHP out of the stone age! It adds a five new functions: * pg_query_params Allows paramaterised queries (ie. no escaping required). This really is just a libpq shortcut for prepare/execute libpq function: PQexecParams * pg_prepare Creates a named prepared query libpq function: PQprepare * pg_execute Executes a named prepared query libpq function: PQexecPrepared * pg_transaction_status Returns transaction status of a connection libpq function: PQtransactionStatus * pg_result_error_field Allows getting advanced diagnostics on errors, most importantly allows getting the SQLSTATE error code on errors, therefore finally pgsql users can identify errors by ID. libpq function: PQresultErrorField Notes ----- I haven't attached docs or regression tests, these will follow if the patch is accepted (or before if you require) Should pg_query_params instead be folded into pg_query, with an optional 3rd parameter which would be the parameter array? Would this then be difficult for clients to detect if the 3rd parameter is available to them? I've tested it all and seems to work fine, please review :) Cheers, Chris

« previous php.internals (#15460) next »