| From: | Holger Krug <hkrug(at)rationalizer(dot)com> |
|---|---|
| To: | Doug McNaught <doug(at)wireboard(dot)com> |
| Cc: | pgsql-general(at)postgresql(dot)org |
| Subject: | Re: Using Cursor in PostgreSQL 7.2 |
| Date: | 2001-12-07 07:30:47 |
| Message-ID: | 20011207083047.A689@dev12.rationalizer.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general pgsql-hackers pgsql-patches |
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(at)rationalizer(dot)com
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Alexey Borzov | 2001-12-07 08:08:35 | An error in docs? (client-only installation) |
| Previous Message | Frank Finner | 2001-12-07 06:21:11 | Re: Errors: Too many open files |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Oleg Bartunov | 2001-12-07 07:37:04 | Re: Remote connections? |
| Previous Message | Brent Verner | 2001-12-07 06:40:28 | Re: OIDs missing in pg_attribute? |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Peter Eisentraut | 2001-12-07 12:05:04 | Re: hu.po |
| Previous Message | Doug McNaught | 2001-12-06 18:13:18 | Re: [BASIC FEATURES] stored procedures in Postgresql ? |