On Sat, Sep 26, 2009 at 11:44 PM, Alvaro Herrera <alvhe...@commandprompt.com> wrote: > Robert Haas escribió: > >> The problem of having both a table and a closely related view is, >> IME, one that comes up a lot. I think you just need to pick a >> convention and stick with it. Mine is to append "_view" to the >> table name. > > That would make the difference clear, but since what the user normally > wants to see is the view, it seems a poor solution to make the view the > more difficult one to type (and the one that isn't tab-completed first > in psql). I'd go with naming the view pg_db_role_setting and append > "_internal" to the catalog or something similar, except that we don't > have any catalog with such a bad name yet and I don't want to start. > > Maybe name the table pg_configuration?
That seems to me to be just confusing the issue. Now the table name and the view name are just totally different with no obvious connection between them. We have enough nonsense of this type already (e.g. pg_stats vs. pg_statistic; pg_authid vs. pg_roles vs. pg_shadow). I think we need to settle on a system for handling problems of this type and document it in the fine manual or perhaps a README somewhere, and stick with it. Inventing random unconnected names is just craziness. Now, if you/others don't like my _view convention; that's fine. Just pick something else. Really, I don't believe the tab-completion thing is much of a problem, you just type underscore-tab and you're there. But I am 100% OK with whatever we pick, as long as it is something easy to remember that we have a chance of being able to apply consistently. ...Robert -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers