Re: [HACKERS] replace GrantObjectType with ObjectType - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: [HACKERS] replace GrantObjectType with ObjectType
Date
Msg-id 20180118045200.GH29962@paquier.xyz
Whole thread Raw
In response to Re: [HACKERS] replace GrantObjectType with ObjectType  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
Responses Re: [HACKERS] replace GrantObjectType with ObjectType
List 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

Attachment

pgsql-hackers by date:

Previous
From: Peter Geoghegan
Date:
Subject: Re: [HACKERS] Parallel tuplesort (for parallel B-Tree index creation)
Next
From: Ashutosh Sharma
Date:
Subject: Re: Test-cases for exclusion constraints is missing inalter_table.sql file