| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
|---|---|
| To: | Vick Khera <vivek(at)khera(dot)org> |
| Cc: | pgsql-general(at)lists(dot)postgresql(dot)org |
| Subject: | Re: How to schema-qualify "IS DISTINCT FROM" on trigger definition? (I created a db that cannot be dump/restored) |
| Date: | 2024-02-21 21:27:07 |
| Message-ID: | 154270.1708550827@sss.pgh.pa.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
Vick Khera <vivek(at)khera(dot)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
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Nandhini Jayakumar | 2024-02-21 22:42:59 | Discover PostgreSQL's Graph Power with Apache AGE! |
| Previous Message | Vick Khera | 2024-02-21 21:11:30 | How to schema-qualify "IS DISTINCT FROM" on trigger definition? (I created a db that cannot be dump/restored) |