From: | Alvaro Herrera <alvherre(at)commandprompt(dot)com> |
---|---|
To: | Jan van der Weijde <Jan(dot)van(dot)der(dot)Weijde(at)attachmate(dot)com> |
Cc: | pgsql-interfaces(at)postgresql(dot)org |
Subject: | Re: How do I detect End-of-table or End-of-limit ? |
Date: | 2007-01-12 00:36:41 |
Message-ID: | 20070112003641.GI10464@alvh.no-ip.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-interfaces |
Jan van der Weijde wrote:
> However I am looking for something more elegant like a status flag in
> libpq that indicate EOF or End-Of-limit.
I don't think there's an actual "EOF". What you see is an "end of
tuples in the result set". Whether it is because you ran into the
LIMIT, or because you fell off the end of the table, you can't tell (nor
can the server actually).
Maybe it's more appropriate for you to open a cursor for the whole
table, and then do FETCH from it until it runs out of tuples; you will
know then that it's the end of the table.
--
Alvaro Herrera http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.
From | Date | Subject | |
---|---|---|---|
Next Message | L Bayuk | 2007-01-12 00:41:45 | Re: How do I detect End-of-table or End-of-limit ? |
Previous Message | Jan van der Weijde | 2007-01-11 10:30:48 | How do I detect End-of-table or End-of-limit ? |