some hints to understand the plsql cursor.

Поиск
Список
Период
Сортировка
От Andy Fan
Тема some hints to understand the plsql cursor.
Дата
Msg-id CAKU4AWqoGO=Lj8gpoA_VvW3r2HfFUGTs4oaEnW_yYp7xw=gbgQ@mail.gmail.com
обсуждение исходный текст
Ответы Re: some hints to understand the plsql cursor.  (Dilip Kumar <dilipbalaut@gmail.com>)
Список pgsql-hackers
actually I'm hacking pg for a function like :
1. define a select query. 
2. client ask for some data. and server reply some data.  server will do NOTHING if client doesn't ask any more.. 
3.  client ask some data more data with a batch and SERVER reply some data then. then do NOTHING. 

currently the simple "select * from t",  the server will try to send the data to client at one time which is not something I want. 

by looking into the plsql,  looks it has some api like:

fetch 10 from cursor_1;
fetch 10 from cursor_1; 

I'm lacking of the experience to hack plsql.   so my question are:
1.   Does pg has some codes which act like the "ask -> reply -> ask again -> reply again" on the server code?    currently I'm not sure if the above "fetch" really work like this. 
2.  any resources or hint or suggestion to understand the "fetch"  statement?

Thanks

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

Предыдущее
От: Andy Fan
Дата:
Сообщение: Re: When is the MessageContext released?
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: Segfault when restoring -Fd dump on current HEAD