Skip to content

Commit b951c03

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. This responds to some complaints about having to change test scripts because plpgsql is preinstalled as of 9.0.
1 parent 11b5847 commit b951c03

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, "CREATE OR REPLACE LANGUAGE \"%s\"", sl->str);
18001801
}
18011802
}
18021803

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy