*** a/doc/src/sgml/xfunc.sgml --- b/doc/src/sgml/xfunc.sgml *************** *** 153,159 **** SELECT clean_emp(); --- 153,181 ---- (\) (assuming escape string syntax) in the body of the function (see ). + + + Catalog changes within functions + + function + Catalog changes within functions + + + + The body of an SQL function is parsed as if it were a single + multi-part statement, using a constant snapshot of the system + catalogs. The effect of any commands that alter the catalogs + (e.g. "CREATE TEMP TABLE") will therefore not be visible to + subsequent commands in the function body. + + + + In case of such visibility requirements, the recommended + workaround is to use PL/PgSQL. + + + Arguments for <acronym>SQL</acronym> Functions