Re: pgsql: Add a regression test for allow_system_table_mods

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>
Cc: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: Re: pgsql: Add a regression test for allow_system_table_mods
Date: 2019-12-02 15:11:40
Message-ID: 29779.1575299500@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)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

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2019-12-02 21:31:10 pgsql: Make postgres_fdw's "Relations" output agree with the rest of EX
Previous Message Peter Eisentraut 2019-12-02 10:09:49 Re: pgsql: Add a regression test for allow_system_table_mods