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

Re: DBD::Pg 1.00

From: "Peter Haworth" <pmh(at)edison(dot)ioppublishing(dot)com>
To: newsreader(at)mediaone(dot)net, pgsql-general(at)postgresql(dot)org
Subject: Re: DBD::Pg 1.00
Date: 2001-05-30 15:02:51
Message-ID: PGM.20010530150251.16619.492@edison.ioppublishing.com (view raw or flat)
Thread:
Lists: pgsql-general
On Wed, 30 May 2001 08:07:11 -0400, newsreader(at)mediaone(dot)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 which all rows had been fetched from.
The new behaviour is mre correct.

-- 
	Peter Haworth	pmh(at)edison(dot)ioppublishing(dot)com
"I'm just a mere programmer"
		-- James Counihan

In response to

Responses

pgsql-general by date

Next:From: Bruce MomjianDate: 2001-05-30 15:09:08
Subject: Re: [GENERAL] Patch for PGACCESS
Previous:From: Kapil TilwaniDate: 2001-05-30 14:41:50
Subject: OIDs

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