For testing purposes, I provide my own implementation of the now()
function which is public.now()
. Using search_path
to override the default pg_catalog.now()
with my own version mostly works, but I have a table with a table with a default expression of now()
. Showing the table produces something akin to the following:
start_date | date | not null default now()
However, after a schema save and restore (to a testing DB), the same show table produces
start_date | date | not null default pg_catalog.now()
I assume from this, initially the function in the default expression is not bound to any schema and the search_path will be used to find the correct one. However, dump or restore operation seems to "bind" the function to the current one.
Is my understanding of the "bind state" of the function correct? Is there a way to keep the unbound-ness of the function across dump/restore boundaries?