Re: Custom sort

From: Guillaume Lelarge <guillaume(at)lelarge(dot)info>
To: Artacus <artacus(at)comcast(dot)net>
Cc: PostgreSQL <pgsql-general(at)postgresql(dot)org>
Subject: Re: Custom sort
Date: 2008-08-14 17:34:57
Message-ID: 48A46CC1.8050301@lelarge.info
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Artacus a écrit :
> Can you define a custom sort in postgres? For instance in mysql, you
> could do something like (I forget the exact syntax)
>
> ORDER BY FIND_IN_SET(column_name, ('one','two','three'))
>

I don't really know this syntax but isn't it something like :
ORDER BY column_name='one', column_name='two', column='three' ?

--
Guillaume.
http://www.postgresqlfr.org
http://dalibo.com

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Bill Moran 2008-08-14 17:38:06 Re: Custom sort
Previous Message Artacus 2008-08-14 17:22:37 Custom sort