unqualified function calls in system_views.sql

Started by Christopher Kings-Lynnealmost 22 years ago2 messages
#1Christopher Kings-Lynne
chriskl@familyhealth.com.au

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

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Christopher Kings-Lynne (#1)
Re: unqualified function calls in system_views.sql

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