Re: Convert Cursor to array - Mailing list pgsql-general

From Richard Huxton
Subject Re: Convert Cursor to array
Date
Msg-id 4231A494.3050106@archonet.com
Whole thread Raw
In response to Convert Cursor to array  ("GIROIRE Nicolas (COFRAMI)" <nicolas.giroire@airbus.com>)
List pgsql-general
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

pgsql-general by date:

Previous
From: Dick Davies
Date:
Subject: Re: PostgreSQL still for Linux only?
Next
From: Thomas Hallgren
Date:
Subject: Re: PostgreSQL still for Linux only?