Thread: unqualified function calls in system_views.sql

unqualified function calls in system_views.sql

From
Christopher Kings-Lynne
Date:
Do these need to be fixed in backend/catalog/system_views.sql to have 
pg_catalog. before everything?

eg.

CREATE VIEW pg_rules AS    SELECT        N.nspname AS schemaname,        C.relname AS tablename,        R.rulename AS
rulename,       pg_get_ruledef(R.oid) AS definition    FROM (pg_rewrite R JOIN pg_class C ON (C.oid = R.ev_class))
 LEFT JOIN pg_namespace N ON (N.oid = C.relnamespace)    WHERE R.rulename != '_RETURN';
 

Chris



Re: unqualified function calls in system_views.sql

From
Tom Lane
Date:
Christopher Kings-Lynne <chriskl@familyhealth.com.au> writes:
> Do these need to be fixed in backend/catalog/system_views.sql to have 
> pg_catalog. before everything?

No, because the references are all resolved when the views are created.

We do have to be cautious about qualifying references that appear within
the bodies of SQL functions declared during initdb.
        regards, tom lane