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

Re: DBD::PostgreSQL

From: Tim Bunce <Tim(dot)Bunce(at)pobox(dot)com>
To: David Wheeler <david(at)wheeler(dot)net>
Cc: Tim Bunce <Tim(dot)Bunce(at)pobox(dot)com>, dbi-dev(at)perl(dot)org,pgsql-interfaces(at)postgresql(dot)org
Subject: Re: DBD::PostgreSQL
Date: 2002-11-18 17:33:56
Message-ID: 20021118173356.GE1444@dansat.data-plan.com (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-interfaces
On Mon, Nov 18, 2002 at 08:55:20AM -0800, David Wheeler wrote:
> On Monday, November 18, 2002, at 02:15  AM, Tim Bunce wrote:
> 
> Okay, then that's what I'll do. Do I check it like this?
> 
>   if (DBIc_has(imp_dbh, DBIcf_BegunWork)) {...}

Yeap.

> >>* Also in dbd_db_commit() and dbd_db_rollback(), I notice that the 
> >>last
> >>return statement returns 0. Shouldn't these be returning true?
> >
> >Yes, when using Driver.xst, if there's no error.
> 
> It appears that they return false when imp_dbh->conn is NULL. That 
> would count as an error, I think. DBD::Pg doesn't report it as an 
> error, though -- it just returns false. Should I add an appropriate 
> call to do_error() in such a case?

Probably. It's fairly important that a method doesn't return an error
status without having recorded the error by at least doing
	sv_setiv(DBIc_ERR(imp_xxh), ...)

> >I'd really appreciate any feedback (ie patches :) you might have
> >for the DBI::DBD document.  It's a bit thin and/or dated in places.
> 
> Yes, I've thought about that. You can at least expect a bit of clean up 
> (grammar, etc.), but I might well add more. It'd probably be good to do 
> so as a newbie who wants to help other newbies along...

Great. Thanks.

Tim.

In response to

Responses

pgsql-hackers by date

Next:From: Haris PecoDate: 2002-11-18 17:36:00
Subject: Re: [GENERAL] DECLARE CURSOR
Previous:From: Haris PecoDate: 2002-11-18 17:32:36
Subject: Re: DECLARE CURSOR

pgsql-interfaces by date

Next:From: Ian BarwickDate: 2002-11-18 17:36:02
Subject: Re: DBD::PostgreSQL
Previous:From: David WheelerDate: 2002-11-18 17:17:05
Subject: Re: DBD::PostgreSQL

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