Re: email data type first release

From: Tommi Maekitalo <t(dot)maekitalo(at)epgmbh(dot)de>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: email data type first release
Date: 2004-05-17 10:17:40
Message-ID: 200405171217.41093.t.maekitalo@epgmbh.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

...
>
> Another thing is that it might make more sense to sort email addresses by
> domain first (case insensitively of course), then by left hand side (case
> sensitively). Since the domain is really the "most significant bit". This
> is also convenient for many systems like email since they perform better
> when they can handle data in that order.
>
> Note that this would make the type sort differently from its text
> representation. This shouldn't really be a problem but occasionally you see
> poorly written queries that introduce extra type conversions that the user
> doesn't expect. But then if it behaves just like the text datatype then
> there wouldn't be much point in using it.

Sorting should then be done by top-level-domain first. Then 2nd, 3rd... and
last by user.

b(at)a(dot)domain(dot)com < a(at)b(dot)domain(dot)com
and
b(at)b(dot)a(dot)com < b(at)a(dot)b(dot)com

we get then the order:
a(at)a(dot)a(dot)com < a(at)b(dot)a(dot)com < a(at)a(dot)b(dot)com < a(at)b(dot)b(dot)com

rather than (in normal text-order):
a(at)a(dot)a(dot)com < a(at)a(dot)b(dot)com < a(at)b(dot)a(dot)com < a(at)a(dot)b(dot)com

Tommi

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Gavin Sherry 2004-05-17 10:28:32 Table Spaces
Previous Message Fabien COELHO 2004-05-17 09:16:48 Re: add server include files to default installation?