toluaina/pgsync

Bootstrap failure with schema containing PostgreSQL reserved Word (e.g. 'user')

sagitsofan opened this issue · 0 comments

PGSync version: latest

Postgres version:

Elasticsearch version:

Redis version:

Python version:

Problem Description:

Encountering failure in Bootstrap process with schema utilizing PostgreSQL reserved word (e.g. "user")

The issue pertains to the failure of the Bootstrap process when attempting to utilize a schema that incorporates a reserved word from PostgreSQL. An exemplar case is the usage of a schema named "user," which triggers an error during the Bootstrap procedure. This obstacle prevents the successful initiation of the Bootstrap process.
Also, when having a schema containing "-" for example "some-schema-name" bootstrap is failing as well, it should be wrapped with double quotes.

Error Message (if any):

#1

syntax error at or near "user"
CREATE OR REPLACE FUNCTION user.table_notify() RETURNS TRIGG..

#2

syntax error at or near "some-schema-name"
CREATE OR REPLACE FUNCTION some-schema.table_notify() RETURNS TRIGG..