Re: Convert Cursor to array

From: Richard Huxton <dev(at)archonet(dot)com>
To: "GIROIRE Nicolas (COFRAMI)" <nicolas(dot)giroire(at)airbus(dot)com>
Cc: "'pgsql-general(at)postgresql(dot)org'" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Convert Cursor to array
Date: 2005-03-11 14:00:52
Message-ID: 4231A494.3050106@archonet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Thomas Hallgren 2005-03-11 14:11:07 Re: PostgreSQL still for Linux only?
Previous Message Dick Davies 2005-03-11 13:10:07 Re: PostgreSQL still for Linux only?