From: | Michael Paquier <michael(dot)paquier(at)gmail(dot)com> |
---|---|
To: | Amit Langote <Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp> |
Cc: | Corey Huinker <corey(dot)huinker(at)gmail(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: contrib modules and relkind check |
Date: | 2017-03-08 07:47:26 |
Message-ID: | CAB7nPqSOAuOZkFpAJjVJjWun1znX8JLM6n7aAihQfgvhCce-_A@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Tue, Mar 7, 2017 at 4:15 PM, Amit Langote
<Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp> wrote:
> Sorry about the absence on this thread.
No problems! Thanks for showing up with an updated patch.
> 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).
Yep.
> 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.
Okay.
+++ b/contrib/pg_visibility/expected/pg_visibility.out
@@ -0,0 +1,85 @@
+CREATE EXTENSION pg_visibility;
+--
+-- check that using the module's functions with unsupported relations will fail
+--
[...]
+select count(*) > 0 from pg_visibility('regular_table');
+ ?column?
+----------
+ t
+(1 row)
Only regular tables are tested as valid objects. Testing toast tables
is not worth the complication. Could you add as well a matview?
Except for this small issue the patch looks good to me.
--
Michael
From | Date | Subject | |
---|---|---|---|
Next Message | Amit Langote | 2017-03-08 08:10:21 | Re: contrib modules and relkind check |
Previous Message | Michael Paquier | 2017-03-08 07:34:06 | Re: Enabling replication connections by default in pg_hba.conf |