Search Postgresql Archives

Re: migration: parameterized statement and cursor

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



2010/1/11 Aleksey Onopriyenko <aleksey.alt@xxxxxxxxx>:
> Hello.
>
> We are trying to migrate from Informix 9.4 to PostgreSQL. As part of
> migration we are porting our client application.
>
> So we need reimplement such functionality:
> 1. Declare a cursor using to _parameterized_ SELECT statement. It should be
> possible to specify cursor's name (and, perhaps, the statement) dynamically.

cursors are supported, but parametrised cursors are supported only
inside plpgsql. Maybe you can transform your code to plpgsql function.
http://www.postgresql.org/docs/8.4/interactive/plpgsql-cursors.html


> 2. Open that cursor (in another C-function) passing parameters to it.

only in plpgsql

> 3. Fetch records from result set.

yes

Regards
Pavel Stehule

> 4. Close the cursor.
>
> Steps 2-4 may be repeated if necessary.
>
> Is it possible with ecpg or libpq?
>


> ----
> Best regards,
> Aleksey
>

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux