INSERT cursors
Informix®
Informix provides insert cursors to
optimize row creation in a database. An insert cursor is declared as a cursor, and rows as added
with the PUT
instruction. The rows are buffered and sent to the database server
when executing a FLUSH
instruction, or when the cursor is closed with
CLOSE
. When using transactions in Informix, the OPEN
, PUT
and FLUSH
instructions must be executed within a transaction block.
DECLARE c1 CURSOR FOR INSERT INTO tab1 ...
BEGIN WORK
OPEN c1
WHILE ...
PUT c1 USING var-list
END WHILE
CLOSE c1
COMMIT WORK
PostgreSQL
PostgreSQL does not support insert cursors.
Solution
Insert cursors are emulated by the database interface, using basic INSERT
SQL
instructions.
The performances might be not as good as with Informix, but the feature is fully supported.