Re: pgsql: Add a regression test for allow_system_table_mods - Mailing list pgsql-committers

From Tom Lane
Subject Re: pgsql: Add a regression test for allow_system_table_mods
Date
Msg-id 29779.1575299500@sss.pgh.pa.us
Whole thread Raw
In response to Re: pgsql: Add a regression test for allow_system_table_mods  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
Responses Re: pgsql: Add a regression test for allow_system_table_mods  (Michael Paquier <michael@paquier.xyz>)
List pgsql-committers
Peter Eisentraut <peter.eisentraut@2ndquadrant.com> writes:
> On 2019-11-29 17:09, Tom Lane wrote:
>> But using a different name isn't going to invalidate the test case,

> The test case is specifically testing tablespace names starting with "pg_":
>      -- reserved tablespace name
>      CREATE TABLESPACE pg_foo LOCATION '/no/such/location';
>      ERROR:  unacceptable tablespace name "pg_foo"
>      DETAIL:  The prefix "pg_" is reserved for system tablespaces.

Oh, I see.  But is testing that specific error case really worth
the trouble it's going to be to make this pass with or without 
-DENFORCE_REGRESSION_TEST_NAME_RESTRICTIONS ?

One way would be to provide a variant expected-file, but that's not going
to be fun for future maintenance of the test script.  Another simple
answer is to crank up client_min_messages for this one test to hide the
WARNING, but you could conjure scenarios where that misses something
important.  (Of course, not running the test at all would also miss
any such issue.)

            regards, tom lane



pgsql-committers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: pgsql: Add a regression test for allow_system_table_mods
Next
From: Tom Lane
Date:
Subject: pgsql: Make postgres_fdw's "Relations" output agree with the rest of EX