pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
AW: German "umlaut insensitive" query
3+ messages / 3 participants
[nested] [flat]

* AW: German "umlaut insensitive" query
@ 2019-09-23 05:57  Jakob.Witczak@dlr.de
  0 siblings, 1 reply; 3+ messages in thread

From: Jakob.Witczak@dlr.de @ 2019-09-23 05:57 UTC (permalink / raw)
  To: jonathan.katz@excoventures.com; +Cc: pgsql-sql

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.

 <https://www.postgresql.org/message-id/4135E7F5.4070002%40stroetgen.de; 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; 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.

 

There is a feature in the upcoming PostgreSQL 12 release that

allows for accent insensitive queries:

 

https://www.postgresql.org/docs/12/collation.html#COLLATION-NONDETERMINISTIC

 

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

 

Thanks,

 

Jonathan

Attachments:

  [application/pkcs7-signature] smime.p7s (7.6K, ../../242EFA74EBC4CE45AD34310EEB2145E70E49A6BB@DLDEFFMIMP03EXC.intra.dlr.de/3-smime.p7s)
  download

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

* Re: AW: German "umlaut insensitive" query
@ 2019-09-24 07:05  Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
  parent: Jakob.Witczak@dlr.de
  0 siblings, 1 reply; 3+ messages in thread

From: Peter Eisentraut @ 2019-09-24 07:05 UTC (permalink / raw)
  To: Jakob.Witczak@dlr.de; jonathan.katz@excoventures.com; +Cc: pgsql-sql

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





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

* RE: AW: German "umlaut insensitive" query
@ 2019-09-24 10:10  Voillequin, Jean-Marc <Jean-Marc.Voillequin@moodys.com>
  parent: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
  0 siblings, 0 replies; 3+ messages in thread

From: Voillequin, Jean-Marc @ 2019-09-24 10:10 UTC (permalink / raw)
  To: Jakob.Witczak@dlr.de <Jakob.Witczak@dlr.de>; peter.eisentraut@2ndquadrant.com <peter.eisentraut@2ndquadrant.com>; +Cc: pgsql-sql; jonathan.katz@excoventures.com <jonathan.katz@excoventures.com>

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: 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_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: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 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

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


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


end of thread, other threads:[~2019-09-24 10:10 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2019-09-23 05:57 AW: German "umlaut insensitive" query Jakob.Witczak@dlr.de
2019-09-24 07:05 ` Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
2019-09-24 10:10   ` Voillequin, Jean-Marc <Jean-Marc.Voillequin@moodys.com>

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