pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Adrian Klaver <adrian.klaver@aklaver.com>
To: Thiemo Kellner <thiemo@gelassene-pferde.biz>
Cc: PostgreSQL General <pgsql-general@lists.postgresql.org>
Subject: Re: Possible trigger bug? function call argument literalised
Date: Sun, 3 Jan 2021 10:32:13 -0800
Message-ID: <c2cd33a6-6cbf-649e-140e-4deed1783482@aklaver.com> (raw)
In-Reply-To: <20210103192741.Horde.RQ2ogTUGBJnpkIZYTeDRPO-@webmail.gelassene-pferde.biz>
References: <20210103180840.Horde.Fe4qNP3Uviz_9c6aPfxBTS2@webmail.gelassene-pferde.biz>
	<2692292.1609695452@sss.pgh.pa.us>
	<20210103184529.Horde.LO8-skyriHu3oMxD4rNG2WV@webmail.gelassene-pferde.biz>
	<e5b3b5f5-d6ab-b1f1-6c8e-ee55b6b0159a@aklaver.com>
	<20210103192741.Horde.RQ2ogTUGBJnpkIZYTeDRPO-@webmail.gelassene-pferde.biz>

On 1/3/21 10:27 AM, Thiemo Kellner wrote:
> 
> 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.
> 

Alright you lost me.

Can you provide an outline form of what you are trying to accomplish?


-- 
Adrian Klaver
adrian.klaver@aklaver.com





view thread (14+ messages)  latest in thread

Message-ID: <c2cd33a6-6cbf-649e-140e-4deed1783482@aklaver.com>
Permalink:  ../c2cd33a6-6cbf-649e-140e-4deed1783482@aklaver.com/
Also on:    postgresql.org/message-id/c2cd33a6-6cbf-649e-140e-4deed1783482@aklaver.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: adrian.klaver@aklaver.com, thiemo@gelassene-pferde.biz
  Subject: Re: Possible trigger bug? function call argument literalised
  In-Reply-To: <c2cd33a6-6cbf-649e-140e-4deed1783482@aklaver.com>
  References: <20210103180840.Horde.Fe4qNP3Uviz_9c6aPfxBTS2@webmail.gelassene-pferde.biz> <2692292.1609695452@sss.pgh.pa.us> <20210103184529.Horde.LO8-skyriHu3oMxD4rNG2WV@webmail.gelassene-pferde.biz> <e5b3b5f5-d6ab-b1f1-6c8e-ee55b6b0159a@aklaver.com> <20210103192741.Horde.RQ2ogTUGBJnpkIZYTeDRPO-@webmail.gelassene-pferde.biz> <c2cd33a6-6cbf-649e-140e-4deed1783482@aklaver.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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