Re: TODO item: Allow more complex user/database default GUC settings

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Alvaro Herrera <alvherre(at)commandprompt(dot)com>, Gurjeet Singh <singh(dot)gurjeet(at)gmail(dot)com>, Bernd Helmle <mailings(at)oopsware(dot)de>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: TODO item: Allow more complex user/database default GUC settings
Date: 2009-09-26 16:12:30
Message-ID: 0A4BA455-38B6-4510-9DF1-24CF597091D1@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sep 26, 2009, at 11:59 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:

> Alvaro Herrera <alvherre(at)commandprompt(dot)com> writes:
>> Right, that works. Updated patch attached; should solve the issues
>> raised in the thread. I renamed the catalog pg_db_role_setting as
>> suggested by Tom.
>> ...
>> I have also added a view, whose only purpose is to convert the role
>> and
>> database OIDs into names. It's been named pg_db_role_settings, but
>> if
>> anyone has a better suggestion I'm all ears.
>
> I dislike the idea of having a catalog and a view whose names are the
> same except for a plural. It's confusing as heck, because no one will
> remember which is which.
>
> Since pg_settings is the existing user view, I think
> pg_db_role_settings
> is a reasonable choice for the new view, but then we need a different
> name for the catalog. The only thing that comes to mind right now is
> "pg_db_role_default", but I don't like it much. Anybody have other
> suggestions?

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.

Renaming the underlying table doesn't seem like it helps at all.

...Robert

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Simon Riggs 2009-09-26 16:19:13 Re: Join optimization for inheritance tables
Previous Message Tom Lane 2009-09-26 16:09:20 Re: syslog_line_prefix