Re: DBD::Pg 1.00 - Mailing list pgsql-general

From Peter Haworth
Subject Re: DBD::Pg 1.00
Date
Msg-id PGM.20010530150251.16619.492@edison.ioppublishing.com
Whole thread Raw
In response to DBD::Pg 1.00  (newsreader@mediaone.net)
Responses Re: DBD::Pg 1.00
List pgsql-general
On Wed, 30 May 2001 08:07:11 -0400, newsreader@mediaone.net wrote:
> DBD::Pg 1.00 won't allow me to use the following
> the code anymore
>
> ----------
> $s=$dbh->prepare('select * from table');
> $s->execute or die $dbh->errstr;
> while(my @a=$s->fetchrow_array())
>     {
>     ... do something
>     }
> while(my @a=$s->fetchrow_array())
>     {
>     .. do something else
>     }
> -----------
>
> It was fine before with 0.9?
>
> Now I need another execute statement before
> the second while statement.

That's because previous versions of DBD::Pg had a bug which didn't remove the Active attribute from statement handles
whichall rows had been fetched from. 
The new behaviour is mre correct.

--
    Peter Haworth    pmh@edison.ioppublishing.com
"I'm just a mere programmer"
        -- James Counihan

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Problems with new data location
Next
From: Anand Raman
Date:
Subject: Re: LIKE erratic? or unseen DB corruption?