pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
SELECT * FROM xy WHERE name LIKE '%german special char'
3+ messages / 3 participants
[nested] [flat]

* SELECT * FROM xy WHERE name LIKE '%german special char'
@ 2002-01-07 23:23  Albrecht Berger <berger1517@gmx.ch>
  0 siblings, 2 replies; 3+ messages in thread

From: Albrecht Berger @ 2002-01-07 23:23 UTC (permalink / raw)
  To: pgsql-sql

Hello,
in my postgres db i have several Tables with german Special Chars like
ÄÖÜßäöü.

I have no problem displaying them with any terminal, php, jdbc and so on,
but the like pattern doesn't find any of this special chars.

The Statement
SELECT * FROM XYZ WHERE name LIKE '%Müller%'
doesn't any of a matching row.

Is there a solution for this problem ? LIKE '%M_ller%' doesn't work, too !

I don't want to change the data in the tables, because displaying the data
is ok, but i have to search in it.

Thanks
Berger




^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: SELECT * FROM xy WHERE name LIKE '%german special char'
@ 2002-01-08 00:06  Manuel Sugawara <masm@fciencias.unam.mx>
  parent: Albrecht Berger <berger1517@gmx.ch>
  1 sibling, 0 replies; 3+ messages in thread

From: Manuel Sugawara @ 2002-01-08 00:06 UTC (permalink / raw)
  To: Albrecht Berger <berger1517@gmx.ch>; +Cc: pgsql-sql

"Albrecht Berger" <berger1517@gmx.ch> writes:

[...]
> The Statement
> SELECT * FROM XYZ WHERE name LIKE '%Müller%'
> doesn't any of a matching row.


It does work for me:

regression=# select 'Müller' LIKE '%Müller%';
 ?column?
----------
 t
(1 row)

postgres version?, database encoding?, plataform?

Regards,
Manuel.



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: SELECT * FROM xy WHERE name LIKE '%german special char'
@ 2002-01-08 00:26  Tom Lane <tgl@sss.pgh.pa.us>
  parent: Albrecht Berger <berger1517@gmx.ch>
  1 sibling, 0 replies; 3+ messages in thread

From: Tom Lane @ 2002-01-08 00:26 UTC (permalink / raw)
  To: Albrecht Berger <berger1517@gmx.ch>; +Cc: pgsql-sql

"Albrecht Berger" <berger1517@gmx.ch> writes:
> The Statement
> SELECT * FROM XYZ WHERE name LIKE '%Müller%'
> doesn't any of a matching row.

> Is there a solution for this problem ? LIKE '%M_ller%' doesn't work, too !

The only way I could see for the underscore not to match is if the
character is actually stored as two or more bytes, but Postgres doesn't
know it should treat that sequence as a single logical character.

Are you using a multibyte character set representation (eg, Unicode)?
If so, did you build Postgres with MULTIBYTE support enabled, and did
you specify the correct character set when you created the database?

If you're not sure about this theory, try looking to see whether
length() of one of the problem strings agrees with the number of
characters you think there are.

			regards, tom lane



^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2002-01-08 00:26 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2002-01-07 23:23 SELECT * FROM xy WHERE name LIKE '%german special char' Albrecht Berger <berger1517@gmx.ch>
2002-01-08 00:06 ` Manuel Sugawara <masm@fciencias.unam.mx>
2002-01-08 00:26 ` Tom Lane <tgl@sss.pgh.pa.us>

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