Re: rows and array

Поиск
Список
Период
Сортировка
От Richard Huxton
Тема Re: rows and array
Дата
Msg-id 421B2CDB.90103@archonet.com
обсуждение исходный текст
Ответ на Re: rows and array  ("FERREIRA William (COFRAMI)" <william.ferreira@airbus.com>)
Ответы Re: rows and array  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
FERREIRA William (COFRAMI) wrote:
> i want do to it in a stored procedure using the pl/pgSQL language.
> i can't use "ORDER by" because the traitment is very specific.
>
> for example, in oracle syntaxe i can create my own type :
>     type recordChild is TABLE OF XDB_CHILD%ROWTYPE
> and next when i declare my variable with this type :
>     children recordChild;
> i can store rows and re-order them like this :
> children(i-j) := children(i-j-1);

Well, I'd look at one of three solutions:
  1. Functional index to order by
  2. Temporary table (read up on EXECUTE and OID caching)
  3. pl/perl/python (which are better suited to this sort of thing)

Probably worth looking into functional indexes - might be what you need.
--
   Richard Huxton
   Archonet Ltd

В списке pgsql-general по дате отправления:

Предыдущее
От: Brar Piening
Дата:
Сообщение: Is there a way to implicitly grant privileges to an implicitly created sequence?
Следующее
От: Bruno Wolff III
Дата:
Сообщение: Re: Off-topic: monograph for database postgraduate