Re: Pg module and several result objects
От | Martijn van Oosterhout |
---|---|
Тема | Re: Pg module and several result objects |
Дата | |
Msg-id | 20021011124614.GA5003@svana.org обсуждение исходный текст |
Ответ на | Pg module and several result objects ("Timur V. Irmatov" <itvthor@sdf.lonestar.org>) |
Список | pgsql-general |
On Fri, Oct 11, 2002 at 05:10:28PM +0500, Timur V. Irmatov wrote: > Hello, People! > > I'm using Pg module to access PostgreSQL from my perl scripts. I have > a question which is not clarified by reading man page.. > > Suppose I have one query: > my $res = $conn->exec(...); > and then I perfrom seconf one: > my $res2 = $conn->exec(...); > > Thus, I use two different result objects and perform fetchrow on them > in turn. I think it is OK, and I have checked that on practice. But > to be sure, I'd like to hear it from people who know the truth ;-) Yes, you can do this. When you do the query, the entire result is shipped to the client before it returns. So it works. It also means that if you have a really large resultset, you'll need to use cursors to manage it. -- Martijn van Oosterhout <kleptog@svana.org> http://svana.org/kleptog/ > There are 10 kinds of people in the world, those that can do binary > arithmetic and those that can't.
В списке pgsql-general по дате отправления: