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

Commit029fac2

Browse files
committed
Avoid use of CREATE OR REPLACE FUNCTION in extension installation files.
It was never terribly consistent to use OR REPLACE (because of the lack ofcomparable functionality for data types, operators, etc), andexperimentation shows that it's now positively pernicious in the extensionworld. We really want a failure to occur if there are any conflicts, elseit's unclear what the extension-ownership state of the conflicted objectought to be. Most of the time, CREATE EXTENSION will fail anyway becauseof conflicts on other object types, but an extension defining onlyfunctions can succeed, with bad results.
1 parent629b3af commit029fac2

File tree

37 files changed

+922
-922
lines changed

37 files changed

+922
-922
lines changed

‎contrib/adminpack/adminpack--1.0.sql

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,45 +6,45 @@
66

77
/* generic file access functions*/
88

9-
CREATEOR REPLACEFUNCTIONpg_catalog.pg_file_write(text,text, bool)
9+
CREATEFUNCTIONpg_catalog.pg_file_write(text,text, bool)
1010
RETURNSbigint
1111
AS'MODULE_PATHNAME','pg_file_write'
1212
LANGUAGE C VOLATILE STRICT;
1313

14-
CREATEOR REPLACEFUNCTIONpg_catalog.pg_file_rename(text,text,text)
14+
CREATEFUNCTIONpg_catalog.pg_file_rename(text,text,text)
1515
RETURNS bool
1616
AS'MODULE_PATHNAME','pg_file_rename'
1717
LANGUAGE C VOLATILE;
1818

19-
CREATEOR REPLACEFUNCTIONpg_catalog.pg_file_rename(text,text)
19+
CREATEFUNCTIONpg_catalog.pg_file_rename(text,text)
2020
RETURNS bool
2121
AS'SELECT pg_catalog.pg_file_rename($1, $2, NULL::pg_catalog.text);'
2222
LANGUAGE SQL VOLATILE STRICT;
2323

24-
CREATEOR REPLACEFUNCTIONpg_catalog.pg_file_unlink(text)
24+
CREATEFUNCTIONpg_catalog.pg_file_unlink(text)
2525
RETURNS bool
2626
AS'MODULE_PATHNAME','pg_file_unlink'
2727
LANGUAGE C VOLATILE STRICT;
2828

29-
CREATEOR REPLACEFUNCTIONpg_catalog.pg_logdir_ls()
29+
CREATEFUNCTIONpg_catalog.pg_logdir_ls()
3030
RETURNS setof record
3131
AS'MODULE_PATHNAME','pg_logdir_ls'
3232
LANGUAGE C VOLATILE STRICT;
3333

3434

3535
/* Renaming of existing backend functions for pgAdmin compatibility*/
3636

37-
CREATEOR REPLACEFUNCTIONpg_catalog.pg_file_read(text,bigint,bigint)
37+
CREATEFUNCTIONpg_catalog.pg_file_read(text,bigint,bigint)
3838
RETURNStext
3939
AS'pg_read_file'
4040
LANGUAGE INTERNAL VOLATILE STRICT;
4141

42-
CREATEOR REPLACEFUNCTIONpg_catalog.pg_file_length(text)
42+
CREATEFUNCTIONpg_catalog.pg_file_length(text)
4343
RETURNSbigint
4444
AS'SELECT size FROM pg_catalog.pg_stat_file($1)'
4545
LANGUAGE SQL VOLATILE STRICT;
4646

47-
CREATEOR REPLACEFUNCTIONpg_catalog.pg_logfile_rotate()
47+
CREATEFUNCTIONpg_catalog.pg_logfile_rotate()
4848
RETURNS int4
4949
AS'pg_rotate_logfile'
5050
LANGUAGE INTERNAL VOLATILE STRICT;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp