As with is used to open a cursor variable whose query was bound to it when it was declared. A list of actual argument value expressions must appear if and only if the cursor was declared to take arguments. The query plan for a bound cursor is always considered cacheable; there is no equivalent of , as the cursor's scrolling behavior was already determined.Argument values can be passed using either positional or named notation.To do this, the function opens the cursor and returns the cursor name to the caller (or simply opens the cursor using a portal name specified by or otherwise known to the caller). The cursor can be closed by the caller, or it will be closed automatically when the transaction closes.The portal name used for a cursor can be specified by the programmer or automatically generated.
Each row returned by the cursor is successively assigned to this record variable and the loop body is executed.
Quirks like this can affect any data-changing DML operations, most often when the selection conditions involve a subquery.
Cases have been reported where sort order interferes with expectations, without involving a subquery.
Before version 2.5, columns got their new values immediately upon assignment.
It was non-standard behaviour that was fixed in version 2.5.
In positional notation, all arguments are specified in order.