By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,809 Members | 1,997 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,809 IT Pros & Developers. It's quick & easy.

where is pg_views

P: n/a
is there a table or view whose name is "pg_views" in this system ??

I can not find it in the catalog, but in source code i find the following clause:

sprintf(buf, "SELECT definition FROM pg_views WHERE
viewname = '%s'", name);
result = PSQLexec(buf);

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
Nov 12 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
"X " <po******@yahoo.com.cn> wrote in message
news:20************************@web15210.mail.bjs. yahoo.com...
is there a table or view whose name is "pg_views" in this system ??

I can not find it in the catalog, but in source code i find the following
clause:

sprintf(buf, "SELECT definition FROM pg_views WHERE
viewname = '%s'", name);
result = PSQLexec(buf);
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com

There's a view in the pg_catalog schema called pg_views -- It is defined
internal to postgreSQL and you shouldnt need to mess with pg_views directly
(I definitely DO NOT recommend dropping it or altering it in any way -- If
you need a different view -- write one DO NOT destroy or alter ANY of the
core tables, triggers, functions, casts, views, etc.. in pg_catalog) ...

pg_views is used to identify the views defined in the DB system (for both
internal [system] views and user-defined views)...

you can

"SELECT * from pg_views" and it will show you all of the views created in
your DB along with schema, viewname, owner, and the CREATE VIEW syntax that
defined the view...
--
Greg Patnude / The Digital Demention
2916 East Upper Hayden Lake Road
Hayden Lake, ID 83835
(208) 762-0762
Nov 12 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.