Re: [HACKERS] Show stopper ? (was: Re: "cruising" or "browsing" through tables using an index / ordering) - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: [HACKERS] Show stopper ? (was: Re: "cruising" or "browsing" through tables using an index / ordering)
Date
Msg-id 199801240350.WAA01284@candle.pha.pa.us
Whole thread Raw
In response to Re: [HACKERS] Show stopper ? (was: Re: "cruising" or "browsing" through tables using an index / ordering)  (Jan Vicherek <honza@ied.com>)
Responses Re: [HACKERS] Show stopper ? (was: Re: "cruising" or "browsing" through tables using an index / ordering)
List pgsql-hackers
>
> On Fri, 23 Jan 1998, The Hermit Hacker wrote:
>
> >     I'm curious, but can the "Big (commercial) Boys" do this?  If so,
> > can you please provide an example of which and how?
>
>     Hmm, well, the one we are switching from does this ;-) (Informix 3.3
> ALL-II C interface). It's not SQL, tho.

Ah, the Informix ISAM interface that used to sit underneath the Informix
SQL engine.

>   Important : I'm not looking for a "pure SQL" solution. I'm writing a C
> emulation library, so if it can be achieved via a call to a C Postgres
> function, it would be great.
>

You can put an index on the table, and embed a function inside the
engine to spin through the index, getting valid rows.  The code is
already there to spin through the index, so you could just hook on to
the index, get the 'tid' and use that to get data from the physical
table.  No locking, but you may get in trouble if other people are
reading the index.  Maybe a quick lock-unlock would do it for you.  Not
easy, because the engine really doesn't provide a user-friendly C
interface for this, but it could be done.

--
Bruce Momjian
maillist@candle.pha.pa.us

pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: [QUESTIONS] Re: [HACKERS] Show stopper ? (was: Re: "cruising" or "browsing" through tables using an index / ordering)
Next
From: Jan Vicherek
Date:
Subject: Re: [QUESTIONS] Re: [HACKERS] Show stopper ? (was: Re: "cruising" or "browsing" through tables using an index / ordering)