Re: How about to have relnamespace and relrole?

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Kyotaro HORIGUCHI <horiguchi(dot)kyotaro(at)lab(dot)ntt(dot)co(dot)jp>, Jim(dot)Nasby(at)BlueTreble(dot)com, andres(at)2ndquadrant(dot)com, robertmhaas(at)gmail(dot)com, pgsql-hackers(at)postgresql(dot)org
Subject: Re: How about to have relnamespace and relrole?
Date: 2015-04-01 18:46:01
Message-ID: 551C3CE9.4080503@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


On 04/01/2015 12:53 PM, Tom Lane wrote:
> Andrew Dunstan <andrew(at)dunslane(dot)net> writes:
>> On 04/01/2015 12:13 PM, Tom Lane wrote:
>>> Andrew Dunstan <andrew(at)dunslane(dot)net> writes:
>>>> The only possible issue I see on reading the patches is that these are
>>>> treated differently for dependencies than other regFOO types. Rather
>>>> than create a dependency if a value is used in a default expression, an
>>>> error is raised if one is found. Are we OK with that?
>>> Why would it be a good idea to act differently from the others?
>> I have no idea.
>> It was mentioned here
>> <http://www.postgresql.org/message-id/20150218.174231.125293096.horiguchi.kyotaro@lab.ntt.co.jp>
>> but nobody seems to have commented. I'm not sure why it was done like
>> this. Adding the dependencies seems to be no harder than raising the
>> exception. I think we can kick this back to the author to fix.
> After a bit more thought it occurred to me that a dependency on a role
> would need to be a shared dependency, and the existing infrastructure
> for recordDependencyOnExpr() wouldn't support that.
>
> I'm not sure that it's worth adding the complexity to allow shared
> dependencies along with normal ones there. This might be a reason
> to reject the regrole part of the patch, as requiring more complexity
> than it's worth.
>
> But in any case I cannot see a reason to treat regnamespace differently
> from the existing types on this point.
>
>

Good points.

I agree re namespace. And I also agree that shared dependency support is
not worth the trouble, especially not just to support regrole. I'm not
sure that's a reason to reject regrole entirely, though. However, I also
think there is a significantly less compelling case for it than for
regnamespace, based on the number of times I have wanted each.

Anybody else have thoughts on this?

cheers

andrew

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Dean Rasheed 2015-04-01 19:01:11 Re: Tables cannot have INSTEAD OF triggers
Previous Message David Steele 2015-04-01 18:00:55 Re: Auditing extension for PostgreSQL (Take 2)