Re: pgsql: Move tablespace path re-creation from the makefiles to pg_regres
От | Noah Misch |
---|---|
Тема | Re: pgsql: Move tablespace path re-creation from the makefiles to pg_regres |
Дата | |
Msg-id | 20210325025659.GA4017435@rfd.leadboat.com обсуждение исходный текст |
Ответ на | Re: pgsql: Move tablespace path re-creation from the makefiles to pg_regres (Michael Paquier <michael@paquier.xyz>) |
Ответы |
Re: pgsql: Move tablespace path re-creation from the makefiles to pg_regres
|
Список | pgsql-hackers |
On Thu, Mar 25, 2021 at 07:44:02AM +0900, Michael Paquier wrote: > On Wed, Mar 24, 2021 at 10:50:50AM -0400, Robert Haas wrote: > > On Wed, Mar 24, 2021 at 5:56 AM Christoph Berg <myon@debian.org> wrote: > >> Maybe creating the tablespace directory from within the testsuite > >> would suffice? > >> > >> CREATE TABLE foo (t text); > >> COPY foo FROM PROGRAM 'mkdir @testtablespace@'; > >> CREATE TABLESPACE regress_tblspace LOCATION '@testtablespace@'; > > > > Would that work on Windows? That would entail forbidding various shell metacharacters in @testtablespace@. One could avoid imposing such a restriction by adding a mkdir() function to regress.c and writing it like: CREATE FUNCTION mkdir(text) RETURNS void AS '@libdir@/regress@DLSUFFIX@', 'regress_mkdir' LANGUAGE C STRICT\; REVOKE ALL ON FUNCTION mkdir FROM public; SELECT mkdir('@testtablespace@'); CREATE TABLESPACE regress_tblspace LOCATION '@testtablespace@'; > I doubt that all the Windows environments would be able to get their > hands on that. > And I am not sure either that this would work when it > comes to the CI case, again on Windows. How might a CI provider break that?
В списке pgsql-hackers по дате отправления: