Re: Possible trigger bug? function call argument literalised - Mailing list pgsql-general

From Thiemo Kellner
Subject Re: Possible trigger bug? function call argument literalised
Date
Msg-id 20210103192741.Horde.RQ2ogTUGBJnpkIZYTeDRPO-@webmail.gelassene-pferde.biz
Whole thread Raw
In response to Re: Possible trigger bug? function call argument literalised  (Adrian Klaver <adrian.klaver@aklaver.com>)
Responses Re: Possible trigger bug? function call argument literalised
List pgsql-general
Quoting Adrian Klaver <adrian.klaver@aklaver.com>:

>> Well, I guess, I can put the correct schema at installation, but  
>> would have liked to have a more general approach. Furthermore, I  
>> think this also implies that installation can only be done by psql.  
>> :-s
>
> Why not grab the CURRENT_SCHEMA in the function?:
>
> DECLARE
>     V_COUNT     smallint;
>     C_SCHEMA    varchar := CURRENT_SCHEMA;

Thank you all for your lightning fast replies. I failed to set it at  
install time. \gset cannot be used as bind variables in SQL. So, I try  
retaining the restriction to that the function needs to be installed  
in the same schema as the triggered table.

-- 
S/MIME Public Key: https://oc.gelassene-pferde.biz/index.php/s/eJuAUFONag6ofnH
Signal (Safer than WhatsApp): +49 1578 7723737
Threema (Safer than WhatsApp): A76MKH3J
Handys: +41 78 947 36 21 | +49 1578 772 37 37




pgsql-general by date:

Previous
From: Adrian Klaver
Date:
Subject: Re: Possible trigger bug? function call argument literalised
Next
From: Adrian Klaver
Date:
Subject: Re: Possible trigger bug? function call argument literalised