Oh, I understood you. Clearly, to surely avoid any side-effect in pg_dump, all IMMUTABLE functions must implicitly
assignsearch_path in develop time. It's not obvious, so I propose to include this in CONSTRAINT ... CHECK and CREATE
INDEXdocumentation. :-) Or - raise NOTICE if an IMMUTABLE function is used in CHECK or INDEX, but does not define
search_pathints arguments.<br /><br />Thanks!<br /><br /><br /><div class="gmail_quote">On Fri, Nov 14, 2008 at 7:25
PM,Tom Lane <span dir="ltr"><<a href="mailto:tgl@sss.pgh.pa.us">tgl@sss.pgh.pa.us</a>></span> wrote:<br
/><blockquoteclass="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex;
padding-left:1ex;"><div class="Ih2E3d">"Dmitry Koterov" <<a
href="mailto:dmitry@koterov.ru">dmitry@koterov.ru</a>>writes:<br /></div><div class="Ih2E3d">> Thank you for a
possiblesolution.<br /> > But what about the database which exists and works correctly (and conforms<br /> > all
thestandards from the documentation), but dump+restore sequence is<br /> > failed for it? Does it mean that pg_dump
shouldbe improved to pass<br /> > dump+restore sequence?<br /><br /></div>No matter what pg_dump does, it can never
guaranteethat a non-immutable<br /> check constraint will still pass at restore time ... and that's<br /> basically
whatyou've got, if the check function is<br /> search-path-sensitive.<br /><br /> regards, tom
lane<br/></blockquote></div><br />