[HACKERS] Passing tabular data around using python functions

2012-07-30 Thread Achim Domma
Hi, I'm just trying to figure out what's possible with Postgresql and Python. One thing that's important for me, would be to pass result sets around to process them further. I have a table like this: create table fps ( docid integer, conceptid integer, rank float4 )

[HACKERS] Access to current database from C-language function

2011-07-25 Thread Achim Domma
Hi, I have read http://www.postgresql.org/docs/9.1/static/xfunc-c.html and my idea is, to write a C function which returns a set of rows. To generate the result set, I would like to access indexes directly using the information I found at http://www.postgresql.org/docs/9.1/static/indexam.html.

Re: [HACKERS] Access to current database from C-language function

2011-07-25 Thread Achim Domma
Am 25.07.2011 um 14:48 schrieb Florian Pflug: A more low-level API is provided by {heap,index}_{beginscan,endscan}, heap_{insert,update,delete} and index_insert. However, correct handling of transactions using this API isn't easy - for example, to update a row you'd first have to find the

Re: [HACKERS] Access to current database from C-language function

2011-08-01 Thread Achim Domma
Am 26.07.2011 um 00:40 schrieb Florian Pflug: On Jul25, 2011, at 22:31 , Achim Domma wrote: Am 25.07.2011 um 14:48 schrieb Florian Pflug: A more low-level API is provided by {heap,index}_{beginscan,endscan}, heap_{insert,update,delete} and index_insert. However, correct handling

Re: [HACKERS] Access to current database from C-language function

2011-08-02 Thread Achim Domma
Am 01.08.2011 um 21:37 schrieb Merlin Moncure: I think David is probably right and this can be handled in pure sql simply and easily (perhaps in a function, perhaps not). The SPI interface is great, but the sql and plpgsql languages are very powerful and should always be preferred over a C