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

Commitb951c03

Browse files
committed
Make pg_regress use CREATE OR REPLACE LANGUAGE, so that --load-language
will work whether or not the specified language is preinstalled. Thisresponds to some complaints about having to change test scripts becauseplpgsql is preinstalled as of 9.0.
1 parent11b5847 commitb951c03

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

‎src/test/regress/pg_regress.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
* Portions Copyright (c) 1996-2010, PostgreSQL Global Development Group
1212
* Portions Copyright (c) 1994, Regents of the University of California
1313
*
14-
* $PostgreSQL: pgsql/src/test/regress/pg_regress.c,v 1.69 2010/01/02 16:58:15 momjian Exp $
14+
* $PostgreSQL: pgsql/src/test/regress/pg_regress.c,v 1.70 2010/02/24 01:35:14 tgl Exp $
1515
*
1616
*-------------------------------------------------------------------------
1717
*/
@@ -1791,12 +1791,13 @@ create_database(const char *dbname)
17911791
dbname,dbname,dbname,dbname,dbname);
17921792

17931793
/*
1794-
* Install any requested procedural languages
1794+
* Install any requested procedural languages. We use CREATE OR REPLACE
1795+
* so that this will work whether or not the language is preinstalled.
17951796
*/
17961797
for (sl=loadlanguage;sl!=NULL;sl=sl->next)
17971798
{
17981799
header(_("installing %s"),sl->str);
1799-
psql_command(dbname,"CREATE LANGUAGE \"%s\"",sl->str);
1800+
psql_command(dbname,"CREATEOR REPLACELANGUAGE \"%s\"",sl->str);
18001801
}
18011802
}
18021803

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp