search_path for replica-mode

From: André Kutepow <a(dot)kutepow(at)prodat-sql(dot)de>
To: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: search_path for replica-mode
Date: 2023-07-10 10:21:22
Message-ID: 547ccc2a-e8cd-10a3-3127-02cb0a274ca8@prodat-sql.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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?

Responses

Browse pgsql-general by date

  From Date Subject
Next Message David G. Johnston 2023-07-10 13:11:11 Re: search_path for replica-mode
Previous Message André Kutepow 2023-07-10 08:27:55 search_path for replica-mode