Обсуждение: view without definition in information_schema.Views
Hello! I realised that there are views in information_schema.Views without definition but \d+ psql command shows the definition. Where does the definition live, please? SELECT * FROM information_schema.Views WHERE Table_Schema NOT IN ('pg_catalog', 'information_schema') AND View_Definition IS NULL LIMIT 10; Regards Hans Ginzel
Its in pg_view catalog. Check more detail in PostgreSQL doc: http://www.postgresql.org/docs/9.3/static/view-pg-views.html Regards, Amul Sul On Wednesday, 1 July 2015 4:55 PM, Hans Ginzel <hans@matfyz.cz> wrote: Hello! I realised that there are views in information_schema.Views without definition but \d+ psql command shows the definition. Where does the definition live, please? SELECT * FROM information_schema.Views WHERE Table_Schema NOT IN ('pg_catalog', 'information_schema') AND View_Definition IS NULL LIMIT 10; Regards Hans Ginzel -- Sent via pgsql-novice mailing list (pgsql-novice@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-novice
Dne 01.07.2015 14:04, amul sul napsal: > Its in pg_view catalog. Thank you. It works. There is a "feature" in information_schema.Views, that definition is null if the view is not owned by a currently enabled role. See http://www.postgresql.org/docs/9.4/static/infoschema-views.html. HG > Check more detail in PostgreSQL doc: > http://www.postgresql.org/docs/9.3/static/view-pg-views.html > Regards, > Amul Sul > > On Wednesday, 1 July 2015 4:55 PM, Hans Ginzel <hans@matfyz.cz> > wrote: > > Hello! > > I realised that there are views in information_schema.Views without > definition but d+ psql command shows the definition. Where does the > definition live, please? > > SELECT * > FROM information_schema.Views > WHERE Table_Schema NOT IN ('pg_catalog', 'information_schema') > AND View_Definition IS NULL > LIMIT 10; > > Regards > Hans Ginzel