Re: [HACKERS] replace GrantObjectType with ObjectType

From: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
To: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>
Cc: Stephen Frost <sfrost(at)snowman(dot)net>, Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [HACKERS] replace GrantObjectType with ObjectType
Date: 2018-01-18 04:52:00
Message-ID: 20180118045200.GH29962@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Jan 17, 2018 at 05:23:25PM -0500, Peter Eisentraut wrote:
> On 1/16/18 23:38, Michael Paquier wrote:
>> + if (prop->objtype == OBJECT_TABLE)
>> + /*
>> + * If the property data says it's a table, dig a little deeper to get
>> + * the real relation kind, so that callers can produce more precise
>> + * error messages.
>> + */
>> + return relkind_get_objtype(get_rel_relkind(object_id));
>> I guess that this is the price to pay as OBJECT_RELATION gets
>> removed, but it seems to me that we want to keep the OBJECT_RELATION
>> layer and look in depth at the relkind if is found...
>
> The problem I'm trying to solve is that keeping OBJECT_RELATION anywhere
> means it has to be handled everywhere. This is the only place where
> it's interesting, but it's only used to produce some error messages, so
> I think it doesn't have to be terribly efficient and elegant.

OK, I can live with that argument.
--
Michael

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Ashutosh Sharma 2018-01-18 04:57:33 Re: Test-cases for exclusion constraints is missing in alter_table.sql file
Previous Message Peter Geoghegan 2018-01-18 03:28:05 Re: [HACKERS] Parallel tuplesort (for parallel B-Tree index creation)