Re: How do I use the backend APIs

Поиск
Список
Период
Сортировка
От Alban Hertroys
Тема Re: How do I use the backend APIs
Дата
Msg-id 43F998C2.9090400@magproductions.nl
обсуждение исходный текст
Ответ на Re: How do I use the backend APIs  ("Chad" <chadzakary@hotmail.com>)
Список pgsql-general
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@magproductions.nl

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 //

В списке pgsql-general по дате отправления:

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: Encodings
Следующее
От: Andreas Seltenreich
Дата:
Сообщение: Re: simple explain output.