Re: psql variable to plpgsql?

2018-04-17 Thread Thiemo Kellner
Zitat von Pavel Stehule : no. The :xxx is not evaluated inside string. The workaround is using GUC variables and related functions. Can be used from psql and from plpgsql too. Hi Pavel, thanks for pointing this out. However, I implemented another solution with

Re: psql variable to plpgsql?

2018-04-11 Thread Pavel Stehule
2018-04-11 11:36 GMT+02:00 Thiemo Kellner, NHC Barhufpflege < thiemo.kell...@gelassene-pferde.biz>: > Zitat von Pavel Stehule : > > No, there is not possible to read/write client side variables from server >> side. >> > > I did not mean that the variable be replaced by

psql variable to plpgsql?

2018-04-11 Thread Thiemo Kellner
Hi all Is there a way to pass the value of a psql variable into function code? I create a schema with help of psql variable \set SCHEMA_NAME LOGGER create schema :SCHEMA_NAME; I would like to create a function that has the Schema hard coded like declare V_SCHEMA_NAME