Re: Using Cursor in PostgreSQL 7.2
От | Holger Krug |
---|---|
Тема | Re: Using Cursor in PostgreSQL 7.2 |
Дата | |
Msg-id | 20011207083047.A689@dev12.rationalizer.com обсуждение исходный текст |
Ответ на | Re: [BASIC FEATURES] stored procedures in Postgresql ? (Doug McNaught <doug@wireboard.com>) |
Список | pgsql-general |
On Thu, Dec 06, 2001 at 01:13:18PM -0500, Doug McNaught wrote: > However, it's my understanding that in 7.2 (which is currently in > beta) functions can return open cursors, which gives you a lot of the > same functionality as returning result sets. Gives it also the possibility to returning result sets to the client ?? I want to code a scenario (e.g. within a rule) like: id = nextval('idseq'); INSERT INTO tab ( id, ... ) VALUES ( id, ... ); /* return the result of the following query to the user: */ SELECT * FROM tab WHERE tab.id = id; The problem is that there is no way to put the value of the `id' variable into the last query, when the last query is put into a place, where its result set is returned to the client (e.g. as the last query in a rule). Can I return an open cursor to the client ? Can I otherwise return the result set of an open cursor, which was returned by a server-side function, to the client ? -- Holger Krug hkrug@rationalizer.com
В списке pgsql-general по дате отправления: