pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Hélder M. Vieira <hmv@mail.telepac.pt>
To: pgsql-sql@postgresql.org
Subject: Locale and pattern matching
Date: Thu, 8 Dec 2005 01:37:53 -0000
Message-ID: <001801c5fb98$025ac0f0$580bfea9@hmv02> (raw)

A question about encoding, some days ago, led me to concentrate my attention 
on the subject and perform a few tests on two different 8.1 installations, 
configured as follows:

Machine 1 -  pt_PT(Portuguese_Portugal.28591)/LATIN1
Machine 2 -  pt_PT(Portuguese_Portugal.28605)/LATIN9

In both machines, case insensitive pattern matching designed to match the 
letter 'A' will indeed match 'A' and 'a' but not the accented forms.
Generalizing, an accented or unaccented vowel in the pattern will only match 
that vowel in upper or lowercase forms if the accent is the same as 
specified  in the pattern.
For instance, if the pattern specifies an uppercase 'A' with an accute 
accent, then it will match a lowercase 'A' with an accute accent, but not an 
upper or lower case 'A' with a tilde.
This behaviour seems inconsistent with that of the ORDER BY clause, which 
considers all forms of a vowel as equal (uppercase/lowercase,accented/not 
accented).
Shouldn't case insensitive pattern matching follow the same collation 
weights that ORDER BY uses ?
Can someone please elaborate on this subject ?

Another question, for european users:
Until now, I've been selecting LATIN1 encoding, but after a few tests, I 
came to think that LATIN9 is a better option (the euro sign...).
For those who regularly use LATIN9, what is your opinion ? Is it indeed a 
better option ?


Thank you.

Hélder M. Vieira









LATIN CAPITAL LETTER A WITH GRAVE






view thread (2+ messages)  latest in thread

Message-ID: <001801c5fb98$025ac0f0$580bfea9@hmv02>
Permalink:  ../001801c5fb98$025ac0f0$580bfea9@hmv02/
Also on:    postgresql.org/message-id/001801c5fb98$025ac0f0$580bfea9@hmv02

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: hmv@mail.telepac.pt
  Subject: Re: Locale and pattern matching
  In-Reply-To: <001801c5fb98$025ac0f0$580bfea9@hmv02>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox