GIROIRE Nicolas (COFRAMI) wrote:
Hi,

In a procedure, I put data of Cursor in a two-dimensional array. This allows
me to sort rows.

The problem is this method is too slow.

In fact, I translate a pl/sql procedure to a plpgsql.
Under Oracle, we use bulk and I search to use equivalent of this under
postgresql.

Is that exist ?

No, but there might be other ways to do this. Can you explain why you need to sort within the function rather than using "order by"?


If you're sure you want to sort within the function, take a look at one of the alternative procedural languages. PL/pgsql evaluates all expressions by passing them to the SQL parser, which keeps things simple and consistent but isn't efficient if you want to do a lot of data processing.
--
Richard Huxton
Archonet Ltd


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

Reply via email to