Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit0e6e7f0

Browse files
committed
Merge dblink's paths test script into its main test.
There's no longer any reason to fire up a separate psql runto create these functions. (Some refactoring in the mainregression tests is also called for, but that will takemore thought.)Discussion:https://postgr.es/m/1655733.1639871614@sss.pgh.pa.us
1 parentdc9c3b0 commit0e6e7f0

File tree

5 files changed

+42
-42
lines changed

5 files changed

+42
-42
lines changed

‎contrib/dblink/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ EXTENSION = dblink
1111
DATA = dblink--1.2.sql dblink--1.1--1.2.sql dblink--1.0--1.1.sql
1212
PGFILEDESC = "dblink - connect to other PostgreSQL databases"
1313

14-
REGRESS =pathsdblink
14+
REGRESS = dblink
1515
REGRESS_OPTS = --dlpath=$(top_builddir)/src/test/regress
1616

1717
ifdefUSE_PGXS

‎contrib/dblink/expected/dblink.out

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,22 @@
11
CREATE EXTENSION dblink;
2+
-- directory paths and dlsuffix are passed to us in environment variables
3+
\getenv abs_srcdir PG_ABS_SRCDIR
4+
\getenv libdir PG_LIBDIR
5+
\getenv dlsuffix PG_DLSUFFIX
6+
\set regresslib :libdir '/regress' :dlsuffix
7+
-- create some functions needed for tests
8+
CREATE FUNCTION setenv(text, text)
9+
RETURNS void
10+
AS :'regresslib', 'regress_setenv'
11+
LANGUAGE C STRICT;
12+
CREATE FUNCTION wait_pid(int)
13+
RETURNS void
14+
AS :'regresslib'
15+
LANGUAGE C STRICT;
16+
\set path :abs_srcdir '/'
17+
\set fnbody 'SELECT setenv(''PGSERVICEFILE'', ' :'path' ' || $1)'
18+
CREATE FUNCTION set_pgservicefile(text) RETURNS void LANGUAGE SQL
19+
AS :'fnbody';
220
-- want context for notices
321
\set SHOW_CONTEXT always
422
CREATE TABLE foo(f1 int, f2 text, f3 text[], primary key (f1,f2));

‎contrib/dblink/expected/paths.out

Lines changed: 0 additions & 18 deletions
This file was deleted.

‎contrib/dblink/sql/dblink.sql

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,28 @@
11
CREATE EXTENSION dblink;
22

3+
-- directory paths and dlsuffix are passed to us in environment variables
4+
\getenv abs_srcdir PG_ABS_SRCDIR
5+
\getenv libdir PG_LIBDIR
6+
\getenv dlsuffix PG_DLSUFFIX
7+
8+
\set regresslib :libdir'/regress' :dlsuffix
9+
10+
-- create some functions needed for tests
11+
CREATEFUNCTIONsetenv(text,text)
12+
RETURNS void
13+
AS :'regresslib','regress_setenv'
14+
LANGUAGE C STRICT;
15+
16+
CREATEFUNCTIONwait_pid(int)
17+
RETURNS void
18+
AS :'regresslib'
19+
LANGUAGE C STRICT;
20+
21+
\setpath :abs_srcdir'/'
22+
\set fnbody'SELECT setenv(''PGSERVICEFILE'',' :'path'' || $1)'
23+
CREATEFUNCTIONset_pgservicefile(text) RETURNS void LANGUAGE SQL
24+
AS :'fnbody';
25+
326
-- want context for notices
427
\set SHOW_CONTEXT always
528

‎contrib/dblink/sql/paths.sql

Lines changed: 0 additions & 23 deletions
This file was deleted.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp