mirror of
https://github.com/postgres/postgres.git
synced 2025-07-27 12:41:57 +03:00
Merge dblink's paths test script into its main test.
There's no longer any reason to fire up a separate psql run to create these functions. (Some refactoring in the main regression tests is also called for, but that will take more thought.) Discussion: https://postgr.es/m/1655733.1639871614@sss.pgh.pa.us
This commit is contained in:
@ -1,5 +1,28 @@
|
||||
CREATE EXTENSION dblink;
|
||||
|
||||
-- directory paths and dlsuffix are passed to us in environment variables
|
||||
\getenv abs_srcdir PG_ABS_SRCDIR
|
||||
\getenv libdir PG_LIBDIR
|
||||
\getenv dlsuffix PG_DLSUFFIX
|
||||
|
||||
\set regresslib :libdir '/regress' :dlsuffix
|
||||
|
||||
-- create some functions needed for tests
|
||||
CREATE FUNCTION setenv(text, text)
|
||||
RETURNS void
|
||||
AS :'regresslib', 'regress_setenv'
|
||||
LANGUAGE C STRICT;
|
||||
|
||||
CREATE FUNCTION wait_pid(int)
|
||||
RETURNS void
|
||||
AS :'regresslib'
|
||||
LANGUAGE C STRICT;
|
||||
|
||||
\set path :abs_srcdir '/'
|
||||
\set fnbody 'SELECT setenv(''PGSERVICEFILE'', ' :'path' ' || $1)'
|
||||
CREATE FUNCTION set_pgservicefile(text) RETURNS void LANGUAGE SQL
|
||||
AS :'fnbody';
|
||||
|
||||
-- want context for notices
|
||||
\set SHOW_CONTEXT always
|
||||
|
||||
|
Reference in New Issue
Block a user