RE: AW: German "umlaut insensitive" query

Поиск
Список
Период
Сортировка
От Voillequin, Jean-Marc
Тема RE: AW: German "umlaut insensitive" query
Дата
Msg-id BYAPR20MB26140531FB0138F4C49F54DABE840@BYAPR20MB2614.namprd20.prod.outlook.com
обсуждение исходный текст
Ответ на AW: AW: German "umlaut insensitive" query  (<Jakob.Witczak@dlr.de>)
Список pgsql-sql
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

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

В списке pgsql-sql по дате отправления:

Предыдущее
От:
Дата:
Сообщение: AW: AW: German "umlaut insensitive" query
Следующее
От: Karen Goh
Дата:
Сообщение: How do I get rid of version 10 Postgresql completely ?