Search Postgresql Archives

Re: How do I use the backend APIs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 much like cursors. Isn't this what you're looking for?:

OPEN curs1 FOR SELECT * FROM foo WHERE key = mykey;
FETCH cursor INTO target;
CLOSE cursor;

(from: http://www.postgresql.org/docs/8.1/static/plpgsql-cursors.html#PLPGSQL-CURSOR-DECLARATIONS )

I figure the other PL/ languages feature cursors as well, but I've never used those.

--
Alban Hertroys
alban@xxxxxxxxxxxxxxxxx

magproductions b.v.

T: ++31(0)534346874
F: ++31(0)534346876
M:
I: www.magproductions.nl
A: Postbus 416
   7500 AK Enschede

// Integrate Your World //


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux