Re: How to schema-qualify "IS DISTINCT FROM" on trigger definition? (I created a db that cannot be dump/restored) - Mailing list pgsql-general

From Tom Lane
Subject Re: How to schema-qualify "IS DISTINCT FROM" on trigger definition? (I created a db that cannot be dump/restored)
Date
Msg-id 154270.1708550827@sss.pgh.pa.us
Whole thread Raw
In response to How to schema-qualify "IS DISTINCT FROM" on trigger definition? (I created a db that cannot be dump/restored)  (Vick Khera <vivek@khera.org>)
Responses Re: How to schema-qualify "IS DISTINCT FROM" on trigger definition? (I created a db that cannot be dump/restored)
List pgsql-general
Vick Khera <vivek@khera.org> writes:
> I've created a database which my vendor (Supabase) cannot
> dump/restore/upgrade. Ultimately, it comes down to this trigger statement,
> and the fact that the underlying operations needed to perform the `IS
> DISTINCT FROM` comparison in the WHEN clause need to be found in the
> `public` schema. During the restore, the search path is empty, so it fails.

Yeah.  We've had some discussions about inventing a version of IS
DISTINCT FROM (and some other SQL-spec syntaxes with the same problem)
that supports schema-qualification of the underlying operator.  But
it hasn't gotten further than preliminary discussion.

For the moment, I think the only feasible solution is for your trigger
function to set the search path it needs by adding a "SET search_path
= whatever" clause to the function's CREATE command.

            regards, tom lane



pgsql-general by date:

Previous
From: Vick Khera
Date:
Subject: How to schema-qualify "IS DISTINCT FROM" on trigger definition? (I created a db that cannot be dump/restored)
Next
From: Nandhini Jayakumar
Date:
Subject: Discover PostgreSQL's Graph Power with Apache AGE!