where is pg_views

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • ²©×X µÔ

    where is pg_views

    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
    Yahoo Mail: Your smarter, faster, free email solution. Organize your inbox, protect your privacy, and tackle tasks efficiently with AI-powered features and robust security tools.

  • Greg Patnude

    #2
    Re: where is pg_views

    "²©×X µÔ" <powerzbx@yahoo .com.cn> wrote in message
    news:2003102209 1245.62690.qmai l@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
    Yahoo Mail: Your smarter, faster, free email solution. Organize your inbox, protect your privacy, and tackle tasks efficiently with AI-powered features and robust security tools.


    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


    Comment

    Working...