Skip site navigation (1) Skip section navigation (2)

reverse sorting

From: Marc Tardif <admin(at)wtbwts(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: reverse sorting
Date: 2000-01-26 19:02:18
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-general
I need to sort the domains of email addresses from right to left, so that
all similar domains are grouped together. For instance, all .ca's will be
in the same batch.

I think I should be writing a trigger for this, using a secondary table
for the reverse domain name, then using a query like:
select email from table1, table2 where order by

I'm not sure if keeping a secondary table is worthwhile, I will only be
executing this query about 50 times per day.

Let me know if there's a better way,
Marc Tardif


pgsql-general by date

Next:From: Bruce BantosDate: 2000-01-26 19:29:57
Subject: Backup, Vacuume scheduling tips?
Previous:From: Peter EisentrautDate: 2000-01-26 18:34:06
Subject: Re: [GENERAL] what is "view?"

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group