Re: [HACKERS] Show stopper ? (was: Re: "cruising" or "browsing" through tables using an index / ordering)
От | Jan Vicherek |
---|---|
Тема | Re: [HACKERS] Show stopper ? (was: Re: "cruising" or "browsing" through tables using an index / ordering) |
Дата | |
Msg-id | Pine.LNX.3.96.980123230503.497J-100000@ann.ied.com обсуждение исходный текст |
Ответ на | Re: [HACKERS] Show stopper ? (was: Re: "cruising" or "browsing" through tables using an index / ordering) (Bruce Momjian <maillist@candle.pha.pa.us>) |
Ответы |
Re: [HACKERS] Show stopper ? (was: Re: "cruising" or "browsing" through tables using an index / ordering)
|
Список | pgsql-hackers |
Hey ! You sound like you know exactly what I mean ! ;-) On Fri, 23 Jan 1998, Bruce Momjian wrote: > > 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. Aha, this implies that in the index there are valid and non-valid rows. I guess those that are to be "valid" (no current transactions on that row) and the non-valid "those that are subject to an update lock / transaction". > 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. This sounds like what I meant. Would you have any pointers (to source files / functions I should read / understand / call ) ? > No locking, but you may get in trouble if other people are > reading the index. I don't see what trouble I could get into. Any hints appreciated. > Maybe a quick lock-unlock would do it for you. Do you mean lock-unlock on the table or on the index ? > Not easy, because the engine really doesn't provide a user-friendly C > interface for this, but it could be done. Can you point me to some of the user-nonfriendly files / functions I should use then ? Thanx a bunch (I have to have the implementation by tomorrow 10am), Jan -- Gospel of Jesus is the saving power of God for all who believe -- Jan Vicherek ## To some, nothing is impossible. ## www.ied.com/~honza >>> Free Software Union President ... www.fslu.org <<< Interactive Electronic Design Inc. -#- PGP: finger honza@ied.com
В списке pgsql-hackers по дате отправления: