Re: rows and array

From: "FERREIRA William (COFRAMI)" <william(dot)ferreira(at)airbus(dot)com>
To: 'Richard Huxton' <dev(at)archonet(dot)com>
Cc: "'pgsql-general(at)postgresql(dot)org'" <pgsql-general(at)postgresql(dot)org>
Subject: Re: rows and array
Date: 2005-02-22 12:45:19
Message-ID: 1904E3EB39448246A7ECB76DF34A70B00143B43D@TOCOMEXC03
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)archonet(dot)com]
Envoyé : mardi 22 février 2005 12:20
À : FERREIRA William (COFRAMI)
Cc : 'pgsql-general(at)postgresql(dot)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.

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Richard Huxton 2005-02-22 13:00:11 Re: rows and array
Previous Message Boris Makovecki 2005-02-22 12:41:33 migration