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
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-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

Browse pgsql-hackers by date

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

Browse pgsql-interfaces by date

  From Date Subject
Next Message Ian Barwick 2002-11-18 17:36:02 Re: DBD::PostgreSQL
Previous Message David Wheeler 2002-11-18 17:17:05 Re: DBD::PostgreSQL