Skip site navigation (1) Skip section navigation (2)

Re: pg_last_error() doesn't return connection errors

From: Frank Naude <naudefj(at)gmail(dot)com>
To: Andrew McMillan <andrew(at)morphoss(dot)com>
Cc: pgsql-php(at)postgresql(dot)org
Subject: Re: pg_last_error() doesn't return connection errors
Date: 2010-08-27 12:33:41
Message-ID: AANLkTikf8JXMHqWg060jmcqyNBv+deSAs-m5nOnak_GH@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-php
Hi Andrew,

On Fri, Aug 27, 2010 at 2:01 PM, Andrew McMillan <andrew(at)morphoss(dot)com> 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

In response to

pgsql-php by date

Next:From: Yaz KedooDate: 2011-04-03 14:21:33
Subject: pgsql-php@postgresql.org
Previous:From: Frank NaudeDate: 2010-08-27 12:26:33
Subject: Re: pg_last_error() doesn't return connection errors

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group