View Single Post

   
  #2 (permalink)  
Old 04-18-2008, 11:13 AM
Pavel Stehule
 
Posts: n/a
Default Re: WIP: updatable cursors in plpgsql

2007/6/11, Tom Lane <tgl@sss.pgh.pa.us>:
> "Pavel Stehule" <pavel.stehule@gmail.com> writes:
> > this small patch allows using updatable cursors in plpgsql.

>
> Why do we need this?
>

For stored procedures. Updatable cursors are used mainly in transform
procedures, and without suppport in plpgsql, you have to write
external procedure. It similar with support scrollable cursors, which
was added into plpgsql now. It's not strong argument. With this patch
will be less diference between cursors supported by PostgreSQL and
cursors in plpgsql.

Updatable cursor are currently substituted using ctid, but updatable
cursors are more clean and readable.

PL/pgSQL can be consistent in support PostgreSQL SQL statements. It's
little bit strange, PostgreSQL offer some functionality, which cannot
be used from PL/pgSQL.

Regards
Pavel Stehule

---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

Reply With Quote