Re: [BUGS] BUG #14649: Function Namespace Resolution Bug - Mailing list pgsql-bugs

From Tom Lane
Subject Re: [BUGS] BUG #14649: Function Namespace Resolution Bug
Date
Msg-id 26979.1494612834@sss.pgh.pa.us
Whole thread Raw
In response to [BUGS] BUG #14649: Function Namespace Resolution Bug  (jeremy@cowgar.com)
Responses Re: [BUGS] BUG #14649: Function Namespace Resolution Bug  (Jeremy Cowgar <jeremy@cowgar.com>)
List pgsql-bugs
jeremy@cowgar.com writes:
> In short, when a CHECK on a column in a different schema references a
> function in public that references another function in public implicitly,
> there is confusion. The workaround is to prefix the function calls with the
> schema.

I don't see any PG bug here.  If you don't schema-qualify the function
reference, then it is dependent on the current search_path, and pg_dump/
pg_restore have their own ideas about how to set search_path.  Even if
those two somehow magically intuited what search_path you're expecting,
this coding would still be fragile since some other user might use a
different search_path than you while accessing the table.  The schema
qualification isn't a "workaround", it's just good coding practice.
        regards, tom lane


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs

pgsql-bugs by date:

Previous
From: jeremy@cowgar.com
Date:
Subject: [BUGS] BUG #14649: Function Namespace Resolution Bug
Next
From: tureba@gmail.com
Date:
Subject: [BUGS] BUG #14650: pg_dump -c fails when 'public' schema doesn't exist