Re: array sort for varchar arrays?

From: Artacus <artacus(at)comcast(dot)net>
To: PGSQL <pgsql-general(at)postgresql(dot)org>
Subject: Re: array sort for varchar arrays?
Date: 2008-07-09 06:39:03
Message-ID: 48745D07.9060202@comcast.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

>> I'm likely overlooking something, but I can't seem to find a function
>> to sort a varchar array. Something like "select
>> sort('{y,z,x}'::varchar[])" => {'x','y','z'}.
>
> You've got it right. On Pg 8.3.3 I get
> SELECT sort(array['z','y','x']) -> {x,y,z}
>

Crap. There's a sort function included for int[]. I tried it on a
varchar[] and it worked, but that was because I had made a function that
was pretty much what pavel posted.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Artacus 2008-07-09 07:31:04 Re: Getting source code for database objects
Previous Message Tino Wildenhain 2008-07-09 05:58:30 Re: Getting source code for database objects