Thread: German "umlaut insensitive" query
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 | jakob.witczak@dlr.de
Attachment
On Sep 20, 2019, at 4:36 AM, <Jakob.Witczak@dlr.de> <Jakob.Witczak@dlr.de> 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.
Attachment
Thanks for the quick answer. I am looking forward to the new PostgresSQL version. Thanks
Jakob
Von: Jonathan S. Katz [mailto:jonathan.katz@excoventures.com]
Gesendet: Freitag, 20. September 2019 14:17
An: Witczak, Jakob
Cc: pgsql-sql@postgresql.org
Betreff: Re: German "umlaut insensitive" query
On Sep 20, 2019, at 4:36 AM, <Jakob.Witczak@dlr.de> <Jakob.Witczak@dlr.de> 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
Attachment
On 2019-09-23 07:57, Jakob.Witczak@dlr.de 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
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_timeoutTO _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:peter.eisentraut@2ndquadrant.com] Gesendet: Dienstag, 24. September 2019 09:05 An: Witczak, Jakob; jonathan.katz@excoventures.com Cc: pgsql-sql@postgresql.org Betreff: Re: AW: German "umlaut insensitive" query On 2019-09-23 07:57, Jakob.Witczak@dlr.de 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
Attachment
Hello, SET command does not work as you expect in PLPGSQL. The _timeout argument is understood as a the new value (not the contentof _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: Jakob.Witczak@dlr.de <Jakob.Witczak@dlr.de> Sent: Tuesday, September 24, 2019 10:38 AM To: peter.eisentraut@2ndquadrant.com Cc: pgsql-sql@postgresql.org; jonathan.katz@excoventures.com 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_timeoutTO _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:peter.eisentraut@2ndquadrant.com] Gesendet: Dienstag, 24. September 2019 09:05 An: Witczak, Jakob; jonathan.katz@excoventures.com Cc: pgsql-sql@postgresql.org Betreff: Re: AW: German "umlaut insensitive" query On 2019-09-23 07:57, Jakob.Witczak@dlr.de 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 notthe intended recipient or an employee or agent responsible for delivering this message to the intended recipient, youare hereby notified that you have received this message in error and that any review, dissemination, distribution or copyingof this message, or any attachment thereto, in whole or in part, is strictly prohibited. If you have received thismessage 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 computervirus 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 -----------------------------------------