View Issue Details

IDProjectCategoryView StatusLast Update
0006779SymmetricDSBugpublic2025-03-22 13:32
Reporterpbelov Assigned Topbelov  
Prioritynormal 
Status confirmedResolutionopen 
Product Version3.16.0 
Target Version3.16.1 
Summary0006779: Postgresql DDL trigger fails when sym_trigger_hist is located in another schema
DescriptionFunction for DDL trigger (on Postgresql) fails when sym_trigger_hist is located in another schema.
ERROR: relation "sym_trigger_hist" does not exist

LINE 1: ...id, source_table_name from sym_trigge...

                                                             ^

QUERY: select trigger_hist_id, source_table_name from sym_trigger_hist where upper(source_table_name) = upper(tableName) and inactive_time is null

CONTEXT: PL/pgSQL function tds.fsym_on_all_ddl() line 25 at SQL statement
Steps To ReproduceCreate a non-default schemas in Postgresql: "sds"
Install SymmetricDS runtime tables into the in the "sds" schema with connection string db.url=jdbc:postgresql://localhost:5432/postgres?currentSchema=sds
Configure parameter trigger.capture.ddl.changes=true
Create test tables in the "public" or other "business" schema.
Configure triggers on test tables.
Add column to a test table - as a non-SymmetricDS user in a separate connection targeting the "public" or "business" schema (SET search_path = business).
Observe the error relation "sym_trigger_hist" does not exist.


SET search_path = business;

CREATE TABLE ddl_trigger_test1 (
    test_id BIGINT NOT NULL,
    name char(20) NOT NULL,
    CONSTRAINT ddl_trigger_test1_PK PRIMARY KEY (test_id)
);

ALTER TABLE ddl_trigger_test1 add column test2 BIGINT;

SQL Error [42P01]: ERROR: relation "sym_trigger_hist" does not exist
  Where: PL/pgSQL function sym315client5.fsym_on_filtered_ddl() line 25 at SQL statement
Tagsdialect: postgresql

Activities

There are no notes attached to this issue.

Issue History

Date Modified Username Field Change
2025-03-21 21:00 pbelov New Issue
2025-03-21 21:00 pbelov Status new => assigned
2025-03-21 21:00 pbelov Assigned To => pbelov
2025-03-21 21:00 pbelov Tag Attached: dialect: postgresql
2025-03-22 13:15 pbelov Steps to Reproduce Updated View Revisions
2025-03-22 13:29 pbelov Steps to Reproduce Updated View Revisions
2025-03-22 13:30 pbelov Status assigned => confirmed
2025-03-22 13:30 pbelov Steps to Reproduce Updated View Revisions
2025-03-22 13:32 pbelov Steps to Reproduce Updated View Revisions