RE: Order by email address by domain ?

From: Maxim Maletsky <maxim(at)japaninc(dot)com>
To: "'herve(at)elma(dot)fr'" <herve(at)elma(dot)fr>, pgsql-sql(at)postgresql(dot)org
Subject: RE: Order by email address by domain ?
Date: 2001-05-11 07:45:26
Message-ID: DC017B079D81D411998C009027B7112A015ED1A8@EXC-TYO-01
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

here's an idea:

if you would have all emails stored in the reverse order:

moc(dot)niamod(at)resu

then all you would need is simple 'ORDER BY email'.

Also, in this way, emails like user(at)subdomain(dot)domain(dot)com would be perfectly
ordered.

Is that a crazy thought?

If not yet then: why not to add an additional field to the table with the
reverse domain only? (after an @) ordering by it. INDEX would also be
simple.

now is crazy? Then, is there any such function in PostgreSQL? With C it
would be so easy and fast.

Cheers!
Maxim Maletsky

-----Original Message-----
From: Hervé Piedvache [mailto:herve(at)elma(dot)fr]
Sent: Friday, May 11, 2001 3:38 AM
To: pgsql-sql(at)postgresql(dot)org
Subject: [SQL] Order by email address by domain ?

Hi,

I just want to order by a listing of email address by domain like :

toto(at)aol(dot)com
tutu(at)aol(dot)com
toto(at)be(dot)com
tutu(at)be(dot)com
toto(at)yahoo(dot)com

Is it possible and how ?

Thanks !
--
Hervé Piedvache

Elma Ingenierie Informatique
6, rue du Faubourg Saint-Honoré
F-75008 - Paris - France
http://www.elma.fr
Tel: +33-1-44949901
Fax: +33-1-44949902
Email: herve(at)elma(dot)fr

---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://www.postgresql.org/search.mpl

Browse pgsql-sql by date

  From Date Subject
Next Message Mark Nielsen 2001-05-11 10:41:49 Re: Cannot build PL/Perl ...
Previous Message Amit 2001-05-11 06:54:25 Problems in porting from Oracle to Postgres