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

Commit926bbab

Browse files
committed
Make /contrib install/uninstall script consistent:
remove transactionsuse create or replace functionmake formatting consistentset search patch on first lineAdd documentation on modifying *.sql to set the search patch, andmention that major upgrades should still run the installation scripts.Some of these issues were spotted by Tom today.
1 parent541ff40 commit926bbab

File tree

54 files changed

+1068
-1037
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+1068
-1037
lines changed

‎contrib/adminpack/adminpack.sql.in

Lines changed: 36 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,52 @@
1+
-- Adjust this setting to control where the objects get created.
2+
SET search_path = public;
3+
14
/* ***********************************************
2-
* Administrative functions for PostgreSQL
5+
* Administrative functions for PostgreSQL
36
* *********************************************** */
47

58
/* generic file access functions */
69

7-
CREATE FUNCTION pg_catalog.pg_file_write(text, text, bool) RETURNS bigint
8-
AS 'MODULE_PATHNAME', 'pg_file_write'
9-
LANGUAGE C VOLATILE STRICT;
10+
CREATE OR REPLACE FUNCTION pg_catalog.pg_file_write(text, text, bool)
11+
RETURNS bigint
12+
AS 'MODULE_PATHNAME', 'pg_file_write'
13+
LANGUAGE C VOLATILE STRICT;
1014

11-
CREATE FUNCTION pg_catalog.pg_file_rename(text, text, text) RETURNS bool
12-
AS 'MODULE_PATHNAME', 'pg_file_rename'
13-
LANGUAGE C VOLATILE;
15+
CREATE OR REPLACE FUNCTION pg_catalog.pg_file_rename(text, text, text)
16+
RETURNS bool
17+
AS 'MODULE_PATHNAME', 'pg_file_rename'
18+
LANGUAGE C VOLATILE;
1419

15-
CREATE FUNCTION pg_catalog.pg_file_rename(text, text) RETURNS bool
16-
AS 'SELECT pg_file_rename($1, $2, NULL); '
17-
LANGUAGE SQL VOLATILE STRICT;
20+
CREATE OR REPLACE FUNCTION pg_catalog.pg_file_rename(text, text)
21+
RETURNS bool
22+
AS 'SELECT pg_file_rename($1, $2, NULL); '
23+
LANGUAGE SQL VOLATILE STRICT;
1824

19-
CREATE FUNCTION pg_catalog.pg_file_unlink(text) RETURNS bool
20-
AS 'MODULE_PATHNAME', 'pg_file_unlink'
21-
LANGUAGE C VOLATILE STRICT;
25+
CREATE OR REPLACE FUNCTION pg_catalog.pg_file_unlink(text)
26+
RETURNS bool
27+
AS 'MODULE_PATHNAME', 'pg_file_unlink'
28+
LANGUAGE C VOLATILE STRICT;
2229

23-
CREATE FUNCTION pg_catalog.pg_logdir_ls() RETURNS setof record
24-
AS 'MODULE_PATHNAME', 'pg_logdir_ls'
25-
LANGUAGE C VOLATILE STRICT;
30+
CREATE OR REPLACE FUNCTION pg_catalog.pg_logdir_ls()
31+
RETURNS setof record
32+
AS 'MODULE_PATHNAME', 'pg_logdir_ls'
33+
LANGUAGE C VOLATILE STRICT;
2634

2735

2836
/* Renaming of existing backend functions for pgAdmin compatibility */
2937

30-
CREATE FUNCTION pg_catalog.pg_file_read(text, bigint, bigint) RETURNS text
31-
AS 'pg_read_file'
32-
LANGUAGE INTERNAL VOLATILE STRICT;
38+
CREATE OR REPLACE FUNCTION pg_catalog.pg_file_read(text, bigint, bigint)
39+
RETURNS text
40+
AS 'pg_read_file'
41+
LANGUAGE INTERNAL VOLATILE STRICT;
3342

34-
CREATE FUNCTION pg_catalog.pg_file_length(text) RETURNS bigint
35-
AS 'SELECT size FROM pg_stat_file($1)'
36-
LANGUAGE SQL VOLATILE STRICT;
43+
CREATE OR REPLACE FUNCTION pg_catalog.pg_file_length(text)
44+
RETURNS bigint
45+
AS 'SELECT size FROM pg_stat_file($1)'
46+
LANGUAGE SQL VOLATILE STRICT;
3747

38-
CREATE FUNCTION pg_catalog.pg_logfile_rotate() RETURNS int4
39-
AS 'pg_rotate_logfile'
40-
LANGUAGE INTERNAL VOLATILE STRICT;
48+
CREATE OR REPLACE FUNCTION pg_catalog.pg_logfile_rotate()
49+
RETURNS int4
50+
AS 'pg_rotate_logfile'
51+
LANGUAGE INTERNAL VOLATILE STRICT;
4152

‎contrib/adminpack/uninstall_adminpack.sql

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
-- Adjust this setting to control where the objects get dropped.
2+
SET search_path= public;
3+
14
DROPFUNCTIONpg_catalog.pg_file_write(text,text, bool) ;
25
DROPFUNCTIONpg_catalog.pg_file_rename(text,text,text) ;
36
DROPFUNCTIONpg_catalog.pg_file_rename(text,text) ;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp