Re: Convert Cursor to array
От | Richard Huxton |
---|---|
Тема | Re: Convert Cursor to array |
Дата | |
Msg-id | 4231A494.3050106@archonet.com обсуждение исходный текст |
Ответ на | Convert Cursor to array ("GIROIRE Nicolas (COFRAMI)" <nicolas.giroire@airbus.com>) |
Список | 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 по дате отправления: