Queries using the C API

From: Marcos Barreto de Castro <mbdecastro(at)yahoo(dot)com>
To: pgsql-general(at)hub(dot)org
Subject: Queries using the C API
Date: 2000-05-16 12:02:52
Message-ID: 20000516120252.6893.qmail@web6008.mail.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,

I am new to Postgresql and to SQL as well and I have
the following situation, which has been performed so
far using Codebase Database Manager (xbase standard)
in
several application softwares, using C programming
language:

I have a table with 50.000 records;
I have to display a grid (browse) with all the
records on the table and the user has to be able to
scroll up and down the grid (browse), browsing
through the records on both directions (up and down).
Using Codebase Database Manager, all I have to do
is open the table (the file handle already points to
the first record), display the current record's
contents, skip to the next record, display its
contents and repeat the operation until all records
within the
available window are displayed, leaving the file
handle pointing to the first displayed record and
displaying it again in a different color to show
that it is the current selected record. If the user
presses the down arrow key, all I have to do is skip
to the next record using the Codebase skip function
and
then display the record in the selected color. If the
user then presses the up arrow key, all I have to do
is use the skip function again, passing an argument of
-1 to skip 1 record backwards and display the record.
Very
simple indeed, isn't it? And the best part is that the
Codebase Database Manager does all the dirty work
through its skip function.

My questions are: Is there a skip function in
Postgresql that I can use to browse through the
records in a table forwards and backwards (That table
has 50,000 records)? If not, how would I be able to
develop
such a mechanism as the one explained above? Are there
examples of existing algorithms or even functions,
libraries of functions fit for the job? Are there
examples of free software developed using the
Postgresql C API? If so, where can I find them?

Thanks a lot for any help on this matter.

Marcos Barreto de Castro
email: mbdecastro(at)yahoo(dot)com
phone: +55 61 3498747
fax..: +55 61 3498747

__________________________________________________
Do You Yahoo!?
Send instant messages & get email alerts with Yahoo! Messenger.
http://im.yahoo.com/

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Peter Mount 2000-05-16 12:10:56 RE: [HACKERS] RPMS for 7.0 final.
Previous Message Dustin Sallings 2000-05-16 08:41:48 Re: Performance