pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: André Kutepow <isaev.mail@mail.ru>
To: pgsql-general@lists.postgresql.org
Subject: search_path for replica-mode
Date: Mon, 10 Jul 2023 10:27:55 +0200
Message-ID: <ced70356-eec8-7d2f-b039-6e789698842b@mail.ru> (raw)

There is a trigger in the database

    SET search_path TO "$user", public;

    CREATE OR REPLACE FUNCTION art__a_iu_func()
    BEGIN
       INSERT INTO table_z...   --//»table_z« is in schema public//
    END;

    CREATE OR REPLACE TRIGGER art__a_iu
         AFTER INSERT OR UPDATE OF ak_nr
         ON art
         FOR EACH ROW
         EXECUTE FUNCTION art__a_iu_func();

In a regular trigger, it works great!
But, if I announce it, as:

    ALTER TABLE art ENABLE REPLICA TRIGGER art__a_iu;
    then I get an error:

/FEHLER:  Relation »table_z« existiert nicht bei Zeichen xxx//
//ANFRAGE:  INSERT INTO table_z...

/why does'nt work the search_path for replica-mode?
is it made specifically or is it a bug?
How else can I set the search_path for replica-mode?

view thread (4+ messages)  latest in thread

Message-ID: <ced70356-eec8-7d2f-b039-6e789698842b@mail.ru>
Permalink:  ../ced70356-eec8-7d2f-b039-6e789698842b@mail.ru/
Also on:    postgresql.org/message-id/ced70356-eec8-7d2f-b039-6e789698842b@mail.ru

 · 

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: isaev.mail@mail.ru
  Subject: Re: search_path for replica-mode
  In-Reply-To: <ced70356-eec8-7d2f-b039-6e789698842b@mail.ru>
  References: <ced70356-eec8-7d2f-b039-6e789698842b@mail.ru>

* 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