German "umlaut insensitive" query

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

German "umlaut insensitive" query

Jakob.Witczak

Hi,

 

i found an entry from 2004, where it is about the German Umlaute and i have the same problem.

https://www.postgresql.org/message-id/4135E7F5.4070002%40stroetgen.de

 

I also found this article:

https://dba.stackexchange.com/questions/195502/postgres-collate-example-in-select

 

Are there other possibilities today (for example COLLATE) besides replace() to process the German Umlaute?

In the long term, we also want to use it for other countries.

 

Best Regards

Jakob Witczak

 

 

————————————————————————

 

Deutsches Zentrum für Luft- und Raumfahrt e.V. (DLR)

Institut für Luft- und Raumfahrtmedizin | Abteilung für Luft- und Raumfahrtpsychologie | Sportallee 54a | 22335 Hamburg

 

P.-Jakob Witczak | Dipl.-Ing.(FH)

Telefon 040 513096-845 | [hidden email]

DLR.de

 


smime.p7s (10K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: German "umlaut insensitive" query

Jonathan S. Katz

On Sep 20, 2019, at 4:36 AM, <[hidden email]> <[hidden email]> wrote:

Hi,
 
i found an entry from 2004, where it is about the German Umlaute and i have the same problem.
 
I also found this article:
 
Are there other possibilities today (for example COLLATE) besides replace() to process the German Umlaute?
In the long term, we also want to use it for other countries.

There is a feature in the upcoming PostgreSQL 12 release that
allows for accent insensitive queries:


This is part of PostgreSQL’s support for ICU collations.

Thanks,

Jonathan

signature.asc (849 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

AW: German "umlaut insensitive" query

Jakob.Witczak

Thanks for the quick answer. I am looking forward to the new PostgresSQL version. Thanks

 

Jakob

 

Von: Jonathan S. Katz [mailto:[hidden email]]
Gesendet: Freitag, 20. September 2019 14:17
An: Witczak, Jakob
Cc: [hidden email]
Betreff: Re: German "umlaut insensitive" query

 

 

On Sep 20, 2019, at 4:36 AM, <[hidden email]> <[hidden email]> wrote:

 

Hi,

 

i found an entry from 2004, where it is about the German Umlaute and i have the same problem.

 

I also found this article:

 

Are there other possibilities today (for example COLLATE) besides replace() to process the German Umlaute?

In the long term, we also want to use it for other countries.

 

There is a feature in the upcoming PostgreSQL 12 release that

allows for accent insensitive queries:

 

 

This is part of PostgreSQL’s support for ICU collations.

 

Thanks,

 

Jonathan


smime.p7s (10K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: AW: German "umlaut insensitive" query

Peter Eisentraut-6
On 2019-09-23 07:57, [hidden email] wrote:
> Thanks for the quick answer. I am looking forward to the new PostgresSQL
> version. Thanks

In the meantime, the unaccent contrib module can also help.

--
Peter Eisentraut              http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services


Reply | Threaded
Open this post in threaded view
|

AW: AW: German "umlaut insensitive" query

Jakob.Witczak
Super, thank you so much for the tip.

I still have a little problem where I don't get far ;-)

I constantly get an error message when I give the SET a value.
Siehe unten.

ERROR: ERROR: invalid value for parameter "idle_in_transaction_session_timeout": "_timeout" CONTEXT: SQL statement "SET idle_in_transaction_session_timeout TO _timeout" PL/pgSQL function set_transfer(integer,character varying,character varying) Line 4 at SET SQL state: 22023SELECT * FROM

Call function:
set_transfer(87,'users','5000');


Function:

CREATE OR REPLACE FUNCTION public.set_transfer(_id integer,  _tablename character varying, _timeout character varying)
   RETURNS SETOF users
   LANGUAGE 'plpgsql'AS $BODY$
BEGIN
  SET idle_in_transaction_session_timeout TO _timeout;
......
END


I've tried almost everything. :-(


Best Regards
Jakob





-----Ursprüngliche Nachricht-----
Von: Peter Eisentraut [mailto:[hidden email]]
Gesendet: Dienstag, 24. September 2019 09:05
An: Witczak, Jakob; [hidden email]
Cc: [hidden email]
Betreff: Re: AW: German "umlaut insensitive" query

On 2019-09-23 07:57, [hidden email] wrote:
> Thanks for the quick answer. I am looking forward to the new PostgresSQL
> version. Thanks

In the meantime, the unaccent contrib module can also help.

--
Peter Eisentraut              http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

smime.p7s (10K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

RE: AW: German "umlaut insensitive" query

Voillequin, Jean-Marc
Hello,

SET command does not work as you expect in PLPGSQL. The _timeout argument is understood as a the new value (not the content of _timeout).
Use set_config function instead.

CREATE OR REPLACE FUNCTION public.set_transfer(_id integer,  _tablename character varying, _timeout character varying)
 RETURNS void
 LANGUAGE plpgsql
AS $function$
begin
  perform set_config('idle_in_transaction_session_timeout',_timeout,false);
end;$function$
;

Regards

-----Original Message-----
From: [hidden email] <[hidden email]>
Sent: Tuesday, September 24, 2019 10:38 AM
To: [hidden email]
Cc: [hidden email]; [hidden email]
Subject: AW: AW: German "umlaut insensitive" query

Super, thank you so much for the tip.

I still have a little problem where I don't get far ;-)

I constantly get an error message when I give the SET a value.
Siehe unten.

ERROR: ERROR: invalid value for parameter "idle_in_transaction_session_timeout": "_timeout" CONTEXT: SQL statement "SET idle_in_transaction_session_timeout TO _timeout" PL/pgSQL function set_transfer(integer,character varying,character varying) Line 4 at SET SQL state: 22023SELECT * FROM

Call function:
set_transfer(87,'users','5000');


Function:

CREATE OR REPLACE FUNCTION public.set_transfer(_id integer,  _tablename character varying, _timeout character varying)
   RETURNS SETOF users
   LANGUAGE 'plpgsql'AS $BODY$
BEGIN
  SET idle_in_transaction_session_timeout TO _timeout; ......
END


I've tried almost everything. :-(


Best Regards
Jakob





-----Ursprüngliche Nachricht-----
Von: Peter Eisentraut [mailto:[hidden email]]
Gesendet: Dienstag, 24. September 2019 09:05
An: Witczak, Jakob; [hidden email]
Cc: [hidden email]
Betreff: Re: AW: German "umlaut insensitive" query

On 2019-09-23 07:57, [hidden email] wrote:
> Thanks for the quick answer. I am looking forward to the new
> PostgresSQL version. Thanks

In the meantime, the unaccent contrib module can also help.

--
Peter Eisentraut              http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
-----------------------------------------

Moody's monitors email communications through its networks for regulatory compliance purposes and to protect its customers, employees and business and where allowed to do so by applicable law. The information contained in this e-mail message, and any attachment thereto, is confidential and may not be disclosed without our express permission. If you are not the intended recipient or an employee or agent responsible for delivering this message to the intended recipient, you are hereby notified that you have received this message in error and that any review, dissemination, distribution or copying of this message, or any attachment thereto, in whole or in part, is strictly prohibited. If you have received this message in error, please immediately notify us by telephone, fax or e-mail and delete the message and all of its attachments. Every effort is made to keep our network free from viruses. You should, however, review this e-mail message, as well as any attachment thereto, for viruses. We take no responsibility and have no liability for any computer virus which may be transferred via this e-mail message.

This email was sent to you by Moody’s Investors Service EMEA Limited
Registered office address:
One Canada Square
Canary Wharf
London, E14 5FA
Registered in England and Wales No: 8922701

-----------------------------------------