A little bug in postgreSQL

Lists: pgsql-bugspgsql-general
From: "Baiju MP" <baiju(at)ipath(dot)net(dot)in>
To: <pgsql-bugs(at)postgresql(dot)org>
Subject: A little bug in postgreSQL
Date: 2002-11-26 18:35:54
Message-ID: 000801c2957a$a9eaeed0$8bbe04ca@web5
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-bugs pgsql-general


Sir,

We are using postgreSQL for two years for our projects.
It's fine and working well and meets all out requirements.
But one think I could find when comparing with other simple
databases is I am mentioning here . Hope your developing team
will consider this also while releasing the new version.

At present the all other database, providing an option to set
developers own order with the order by statement.
eg : SELECT ......
FROM ......
ORDER BY 1 like 'A%' like 'H%' like 'G%' like 'C%'

Please try to add this feature also on next version .

Regards,
Baiju MP
\\\\\|/////
| ~ ~ |
(- 0 0 -)
----------oOOo---(_)---oOOo--------------

Baiju MP,
iPath India (P) LtdG-358,
Panampilly Nagar,
Cochin - 36
oooO
---------------( )-----Oooo---------------
\ ( ( )
\_) ) /
(_/


From: Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com>
To: Baiju MP <baiju(at)ipath(dot)net(dot)in>
Cc: <pgsql-general(at)postgresql(dot)org>
Subject: Re: [BUGS] A little bug in postgreSQL
Date: 2002-11-27 00:55:13
Message-ID: 20021126164825.G84659-100000@megazone23.bigpanda.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-bugs pgsql-general

On Wed, 27 Nov 2002, Baiju MP wrote:

[Note, -bugs is the wrong place for this sort of message,
-general is more appropriate]

> We are using postgreSQL for two years for our projects.
> It's fine and working well and meets all out requirements.
> But one think I could find when comparing with other simple
> databases is I am mentioning here . Hope your developing team
> will consider this also while releasing the new version.
>
> At present the all other database, providing an option to set
> developers own order with the order by statement.
> eg : SELECT ......
> FROM ......
> ORDER BY 1 like 'A%' like 'H%' like 'G%' like 'C%'

I believe you can do this sort of thing already in postgresql by
defining an operator that provides the ordering you want and
doing ORDER BY 1 USING operator. This appears to work in at least
7.3 for a trivial example.


From: Neil Conway <neilc(at)samurai(dot)com>
To: Baiju MP <baiju(at)ipath(dot)net(dot)in>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: A little bug in postgreSQL
Date: 2002-11-27 03:27:40
Message-ID: 1038367660.1741.9.camel@tokyo
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-bugs pgsql-general

On Tue, 2002-11-26 at 13:35, Baiju MP wrote:
> At present the all other database, providing an option to set
> developers own order with the order by statement.
> eg : SELECT ......
> FROM ......
> ORDER BY 1 like 'A%' like 'H%' like 'G%' like 'C%'

Can you elaborate on exactly what behavior you'd expect this to produce?
We already support this syntax:

[ ORDER BY expression [ ASC | DESC | USING operator ] [, ...] ]

Cheers,

Neil

--
Neil Conway <neilc(at)samurai(dot)com> || PGP Key ID: DB3C29FC