On Tue, Mar 7, 2017 at 4:15 PM, Amit Langote
<langote_amit...@lab.ntt.co.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


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to