Re: [GENERAL] How do I use the backend APIs

2006-02-24 Thread Chad
Thanks Martijn. ---(end of broadcast)--- TIP 5: don't forget to increase your free space map settings

Re: [GENERAL] How do I use the backend APIs

2006-02-23 Thread Tom Lane
Martijn van Oosterhout writes: > On Tue, Feb 21, 2006 at 02:41:13AM -0800, Chad wrote: >> -When rows change in between opening the cursor and fetching the >> changed rows, will the FETCH retrieve the new data or is a snapshot >> taken when the cursor is declared ? > Standard visibility rules appl

Re: [GENERAL] How do I use the backend APIs

2006-02-23 Thread Martijn van Oosterhout
On Tue, Feb 21, 2006 at 02:41:13AM -0800, Chad wrote: > Thanks Martijn/Alban, > > This look interesting. I'll make some time to try this problem out > using your approach. > I have a few questions like: > -Could I skip the FETCH FORWARD and go straight to the FETCH BACKWARD > i.e. declare cursor t

Re: [GENERAL] How do I use the backend APIs

2006-02-22 Thread Alban Hertroys
Chad wrote: Thanks Martijn/Alban, This look interesting. I'll make some time to try this problem out using your approach. I have a few questions like: -Could I skip the FETCH FORWARD and go straight to the FETCH BACKWARD i.e. declare cursor to be at "Mal" and go backwards from there or is the cu

Re: [GENERAL] How do I use the backend APIs

2006-02-22 Thread Chad
Thanks Martijn/Alban, This look interesting. I'll make some time to try this problem out using your approach. I have a few questions like: -Could I skip the FETCH FORWARD and go straight to the FETCH BACKWARD i.e. declare cursor to be at "Mal" and go backwards from there or is the cursor limited t

Re: [GENERAL] How do I use the backend APIs

2006-02-20 Thread Scott Marlowe
On Mon, 2006-02-20 at 16:40, Martijn van Oosterhout wrote: > On Mon, Feb 20, 2006 at 05:08:33AM -0800, Chad wrote: > > 4. Why I think I need to work at this level of abstraction. I believe, > > certain types of queries can be realized more efficiently by code that > > can seek to specific parts of

Re: [GENERAL] How do I use the backend APIs

2006-02-20 Thread Martijn van Oosterhout
On Mon, Feb 20, 2006 at 05:08:33AM -0800, Chad wrote: > 4. Why I think I need to work at this level of abstraction. I believe, > certain types of queries can be realized more efficiently by code that > can seek to specific parts of an index and immediately returning a > small number of rows to the

Re: [GENERAL] How do I use the backend APIs

2006-02-20 Thread Chad
Firstly thank you to all who have taken the time to reply so far. I need to clarify a few things based on the feedback I have received. 1. I understand the concerns you have about people using internal APIs that the developers are free to change. I also understand the risks I take if I use an undo

Re: [GENERAL] How do I use the backend APIs

2006-02-20 Thread Alban Hertroys
Chad wrote: Thanks Martijn, "Well, in the backend you can do things like open a btree index, setup an ScanKey to indicate which values you want and then keep calling getnext(). If you set your scankey to (col1 >= 'A') it will start at 'A' and go up from there... " That looks suspiciously muc

Re: [GENERAL] How do I use the backend APIs

2006-02-17 Thread Christopher Browne
A long time ago, in a galaxy far, far away, "Chad" <[EMAIL PROTECTED]> wrote: > In a word: The kind of problems people use Berkeley DB for. > People use BDB for more fine grained cursor access to BTrees. Stuff you > CANNOT do with SQL. There is a market for this. See their website. I'd > like some

Re: [GENERAL] How do I use the backend APIs

2006-02-17 Thread Martijn van Oosterhout
On Fri, Feb 17, 2006 at 01:06:16AM -0800, Chad wrote: > In a word: The kind of problems people use Berkeley DB for. > > People use BDB for more fine grained cursor access to BTrees. Stuff you > CANNOT do with SQL. There is a market for this. See their website. I'd > like something similar from Pos

Re: [GENERAL] How do I use the backend APIs

2006-02-17 Thread Tom Lane
"Chad" <[EMAIL PROTECTED]> writes: > This is exactly what I am looking for. I'm wondering how easy it is to > sit on top of this backend. You can't, and you'll get exactly zero community support for trying. We don't believe in embedded databases --- or at least, we don't believe in trying to use P

Re: [GENERAL] How do I use the backend APIs

2006-02-17 Thread Chad
In a word: The kind of problems people use Berkeley DB for. People use BDB for more fine grained cursor access to BTrees. Stuff you CANNOT do with SQL. There is a market for this. See their website. I'd like something similar from Postgres so that the data would be stored in a full fledged RDBMS b

Re: [GENERAL] How do I use the backend APIs

2006-02-17 Thread Chad
Thanks Martijn, This is exactly what I am looking for. I'm wondering how easy it is to sit on top of this backend. Does anybody have any stand alone sample code? Is it a library that can be linked or do you need to produce a modified version of the postgres server? Can it be used in shared library

Re: [GENERAL] How do I use the backend APIs

2006-02-17 Thread Martijn van Oosterhout
On Thu, Feb 16, 2006 at 07:41:09AM -0800, Chad wrote: > Hi, > > In Postgres, is there a C language API which would give me access to > BTrees like Berkeley DB does? eg to seek to a particular key/value pair > and iterate forward from there? If not whats the nearest thing to this > in Postgres? We

Re: [GENERAL] How do I use the backend APIs

2006-02-16 Thread Christopher Browne
A long time ago, in a galaxy far, far away, [EMAIL PROTECTED] (Neil Conway) wrote: > On Fri, 2006-02-17 at 11:34 +0800, Qingqing Zhou wrote: >> AFAIK there is no such API for this purpose. The reason is that to access >> BTree, you have to setup complex enough environment to enable so. For >> exam

Re: [GENERAL] How do I use the backend APIs

2006-02-16 Thread Neil Conway
On Fri, 2006-02-17 at 11:34 +0800, Qingqing Zhou wrote: > AFAIK there is no such API for this purpose. The reason is that to access > BTree, you have to setup complex enough environment to enable so. For > example, the buffer pool support, the WAL support etc. So though exporting > such API is easy

Re: [GENERAL] How do I use the backend APIs

2006-02-16 Thread Qingqing Zhou
"Chad" <[EMAIL PROTECTED]> wrote > > In Postgres, is there a C language API which would give me access to > BTrees like Berkeley DB does? eg to seek to a particular key/value pair > and iterate forward from there? AFAIK there is no such API for this purpose. The reason is that to access BTree, yo

Re: [GENERAL] How do I use the backend APIs

2006-02-16 Thread Michael Fuhr
On Thu, Feb 16, 2006 at 07:41:09AM -0800, Chad wrote: > In Postgres, is there a C language API which would give me access to > BTrees like Berkeley DB does? eg to seek to a particular key/value pair > and iterate forward from there? If not whats the nearest thing to this > in Postgres? Could you t