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. 2. Open that cursor (in another C-function) passing parameters to it. 3. Fetch records from result set. 4. Close the cursor.