Re: contrib modules and relkind check
Amit Langote <langote_amit_f8@lab.ntt.co.jp>
From: Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>
To: Michael Paquier <michael.paquier@gmail.com>
Cc: Corey Huinker <corey.huinker@gmail.com>,
Pg Hackers <pgsql-hackers@postgresql.org>
Date: 2017-03-07T07:15:32Z
Lists: pgsql-hackers
Attachments
- 0001-Add-relkind-checks-to-certain-contrib-modules.patch (text/x-diff)
Sorry about the absence on this thread.
On 2017/02/14 15:30, Michael Paquier wrote:
> On Tue, Feb 14, 2017 at 3:18 PM, Amit Langote wrote:
>>
>> Added more tests in pgstattuple and the new ones for pg_visibility,
>> although I may have overdone the latter.
>
> A bonus idea is also to add tests for relkinds that work, with for
> example the creation of a table, inserting some data in it, vacuum it,
> and look at "SELECT count(*) > 0 FROM pg_visibility('foo'::regclass)".
I assume you meant only for pg_visibility. Done in the attached (a pretty
basic test though).
>> In certain contexts where a subset of relkinds are allowed and others are
>> not or vice versa, partitioned tables are still referred to as "tables".
>> That's because we still use CREATE/DROP TABLE to create/drop them and
>> perhaps more to the point, their being partitioned is irrelevant.
>>
>> Examples of where partitioned tables are referred to as tables:
>>
>> [...]
>>
>> In other contexts, where a table's being partitioned is relevant, the
>> message is shown as "relation is/is not partitioned table". Examples:
>>
>> [...]
>
> Hm... It may be a good idea to be consistent on the whole system and
> refer to "partitioned table" as a table without storage and used as an
> entry point for partitions. The docs use this term in CREATE TABLE,
> and we would finish with messages like "not a table or a partitioned
> table". Extra thoughts are welcome here, the current inconsistencies
> would be confusing for users.
If we decide to go with some different approach, we'd not be doing it
here. Maybe in the "partitioned tables and relfilenode" thread or a new one.
Thanks,
Amit
Commits
-
Add relkind checks to certain contrib modules
- c08d82f38ebf 10.0 landed