Re: Custom sort

From: Jeff Davis <pgsql(at)j-davis(dot)com>
To: Artacus <artacus(at)comcast(dot)net>
Cc: PostgreSQL <pgsql-general(at)postgresql(dot)org>
Subject: Re: Custom sort
Date: 2008-08-14 19:06:26
Message-ID: 1218740786.30569.4.camel@dell.linuxdev.us.dell.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, 2008-08-14 at 10:22 -0700, Artacus wrote:
> 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'))
>

You can sort by any column, or arbitrary expression or function.

Regards,
Jeff Davis

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Glen Parker 2008-08-14 21:28:42 Default table permissions
Previous Message SCassidy 2008-08-14 18:12:17 Re: PostgreSQL arrays and DBD