Re: pg_last_error() doesn't return connection errors

Frank Naude <[email protected]> Fri, 27 Aug 2010 14:33:41 +0200
Newsgroups gmane.comp.db.postgresql.php
Message-ID <[email protected]>
Hi Andrew,

On Fri, Aug 27, 2010 at 2:01 PM, Andrew McMillan <[email protected]> wrote:
> Since I've migrated to PDO, and only have a bit of legacy stuff around
> that uses pg_* I don't think it will do me any good at all!  I really
> try to let other people do all of the coding against other databases, so
> I can luxuriate in the One True SQL :-)

I'm fully aware that the pdo_pgsql works as it should - here is an example:

try {
	$c = new PDO('pgsql:host=127.0.0.1 user=postgres password=xxx
dbname=yyy', 'postgres', 'xxx');
} catch (PDOException $e) {
	var_dump( $e->getMessage() );
}

However, the pgsql driver needs some updating or should be deprecated.

Best regards.

Frank

-- 
Sent via pgsql-php mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-php