Re: Convert Cursor to array - Mailing list pgsql-general

From FERREIRA William (COFRAMI)
Subject Re: Convert Cursor to array
Date
Msg-id 1904E3EB39448246A7ECB76DF34A70B00143B484@TOCOMEXC03
Whole thread Raw
In response to Convert Cursor to array  ("GIROIRE Nicolas (COFRAMI)" <nicolas.giroire@airbus.com>)
List pgsql-general

well my example was incomplete :
at the begin :
 chapter_id | evolution | index
    1       |     0     |   1
    2       |     0     |   2
    3       |     0     |   3
    4       |     1     |   2
    5       |     1     |   4
by using the sort function i obtain this :

 chapter_id | evolution | index
    1       |     0     |   1
    4       |     1     |   2
    2       |     0     |   2
    5       |     1     |   4
    3       |     0     |   3

that why i can't use ORDER BY...

-----Message d'origine-----
De : Ragnar Hafstað [mailto:gnari@simnet.is]
Envoyé : lundi 14 mars 2005 12:11
À : FERREIRA William (COFRAMI)
Cc : 'Richard Huxton'; GIROIRE Nicolas (COFRAMI);
'pgsql-general@postgresql.org'
Objet : Re: [GENERAL] Convert Cursor to array

On Mon, 2005-03-14 at 10:44 +0100, FERREIRA William (COFRAMI) wrote:

> so we choice to use a different solution which consist on using the
> index of a chapter and its evolution.
> if we have this data :
> chapter_id | evolution | index
>    1       |     0     |   1
>    2       |     0     |   2
>    3       |     0     |   3
>    4       |     1     |   2
>
> by using our sort function we obtain this :
> chapter_id | evolution | index
>    1       |     0     |   1
>    4       |     1     |   2
>    2       |     0     |   2
>    3       |     0     |   3
>

in what way is this different than
  ... ORDER BY index ASC, evolution DESC;
?

gnari

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: Shachar Shemesh
Date:
Subject: Re: skip weekends: revisited
Next
From: "Rick Schumeyer"
Date:
Subject: Re: prelimiary performance comparison pgsql vs mysql