Re: rows and array - Mailing list pgsql-general

From FERREIRA William (COFRAMI)
Subject Re: rows and array
Date
Msg-id 1904E3EB39448246A7ECB76DF34A70B00143B43D@TOCOMEXC03
Whole thread Raw
In response to rows and array  ("FERREIRA William (COFRAMI)" <william.ferreira@airbus.com>)
Responses Re: rows and array
List pgsql-general

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);

-----Message d'origine-----
De : Richard Huxton [mailto:dev@archonet.com]
Envoyé : mardi 22 février 2005 12:20
À : FERREIRA William (COFRAMI)
Cc : 'pgsql-general@postgresql.org'
Objet : Re: [GENERAL] rows and array

FERREIRA William (COFRAMI) wrote:
> hi
>
> does postgresql allows to store rows into array ?
> i select rows in a table and i would like to sort them depending on my
> criteria.

Is this different from
   SELECT a,b,c FROM t ORDER BY a ASC, b DESC;

If so, could you specify more details - what language you are using for
example.

--
   Richard Huxton
   Archonet Ltd

This mail has originated outside your organization,
either from an external partner or the Global Internet.
Keep this in mind if you answer this message.

pgsql-general by date:

Previous
From: Ragnar Hafstað
Date:
Subject: Re: Problem with inserting data into a table.....
Next
From: "Boris Makovecki"
Date:
Subject: migration