Received: from localhost (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id 00422633A76 for ; Wed, 14 Oct 2009 17:54:38 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.208.211]) (amavisd-maia, port 10024) with ESMTP id 50093-07 for ; Wed, 14 Oct 2009 20:54:23 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from QMTA05.emeryville.ca.mail.comcast.net (qmta05.emeryville.ca.mail.comcast.net [76.96.30.48]) by mail.postgresql.org (Postfix) with ESMTP id 1CF5E632CF5 for ; Wed, 14 Oct 2009 17:54:27 -0300 (ADT) Received: from OMTA17.emeryville.ca.mail.comcast.net ([76.96.30.73]) by QMTA05.emeryville.ca.mail.comcast.net with comcast id sjvU1c0011afHeLA5kuTAD; Wed, 14 Oct 2009 20:54:27 +0000 Received: from tucker.local ([24.17.164.54]) by OMTA17.emeryville.ca.mail.comcast.net with comcast id skuK1c0031Ak4z48dkuQ0k; Wed, 14 Oct 2009 20:54:27 +0000 From: Adrian Klaver To: pgsql-sql@postgresql.org Subject: Re: How to order varchar data by word Date: Wed, 14 Oct 2009 13:54:17 -0700 User-Agent: KMail/1.9.10 Cc: "Oliveiros C," References: <6caee9520910140240u13daba93ua20637642727776e@mail.gmail.com> <99F66F53142145DE8127EAF7423AF726@marktestcr.marktest.pt> In-Reply-To: <99F66F53142145DE8127EAF7423AF726@marktestcr.marktest.pt> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200910141354.17785.aklaver@comcast.net> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.516 tagged_above=-10 required=5 tests=AWL=0.083, BAYES_00=-2.599 X-Spam-Level: X-Archive-Number: 200910/60 X-Sequence-Number: 33259 On Wednesday 14 October 2009 7:13:22 am Oliveiros C, wrote: > Hello, list. > > I have a table with a varchar field that I would like to order by word, not > by ordinal, which seems to be the default on postgres. > > Does anyone have a clue on how this can be done? > > Many thanx in advance, > > Best, > Oliveiros Can you show the SQL you are using? -- Adrian Klaver aklaver@comcast.net