Re: [GENERAL] Sorting array field

2005-12-22 Thread David Fetter
On Thu, Dec 22, 2005 at 08:38:46AM -0700, Pete Deffendol wrote: > Hi, > > Can anyone point me toward an SQL function (whether built-in or an > add-on) that will allow me to sort the contents of an array datatype > in an SQL query? > > Something like this: > > select sort(my_array_field) from my_

Re: [GENERAL] Sorting array field

2005-12-22 Thread Michael Fuhr
On Thu, Dec 22, 2005 at 08:38:46AM -0700, Pete Deffendol wrote: > Can anyone point me toward an SQL function (whether built-in or an add-on) > that will allow me to sort the contents of an array datatype in an SQL > query? For integer arrays see contrib/intarray. SELECT sort('{5,2,3,1,9,7}'::int[