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

Commit8d43947

Browse files
committed
Reduce messages associated with shell-type function arguments/results
from WARNING to NOTICE, since they are expected messages in common cases.
1 parent03a2371 commit8d43947

File tree

3 files changed

+15
-15
lines changed

3 files changed

+15
-15
lines changed

‎src/backend/commands/functioncmds.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
*
1010
*
1111
* IDENTIFICATION
12-
* $Header: /cvsroot/pgsql/src/backend/commands/functioncmds.c,v 1.23 2002/10/04 22:08:44 tgl Exp $
12+
* $Header: /cvsroot/pgsql/src/backend/commands/functioncmds.c,v 1.24 2002/11/01 19:19:58 tgl Exp $
1313
*
1414
* DESCRIPTION
1515
* These routines take the parse tree and pick out the
@@ -62,7 +62,7 @@
6262
* doesn't exist yet. (Without this, there's no way to define the I/O procs
6363
* for a new type.) But SQL function creation won't cope, so error out if
6464
* the target language is SQL.(We do this here, not in the SQL-function
65-
* validator, so as not to produce aWARNING and then an ERROR for the same
65+
* validator, so as not to produce aNOTICE and then an ERROR for the same
6666
* condition.)
6767
*/
6868
staticvoid
@@ -81,7 +81,7 @@ compute_return_type(TypeName *returnType, Oid languageOid,
8181
elog(ERROR,"SQL function cannot return shell type \"%s\"",
8282
TypeNameToString(returnType));
8383
else
84-
elog(WARNING,"Return type \"%s\" is only a shell",
84+
elog(NOTICE,"Return type \"%s\" is only a shell",
8585
TypeNameToString(returnType));
8686
}
8787
}
@@ -103,7 +103,7 @@ compute_return_type(TypeName *returnType, Oid languageOid,
103103
elog(ERROR,"Type \"%s\" does not exist",typnam);
104104

105105
/* Otherwise, go ahead and make a shell type */
106-
elog(WARNING,"ProcedureCreate: type %s is not yet defined",
106+
elog(NOTICE,"ProcedureCreate: type %s is not yet defined",
107107
typnam);
108108
namespaceId=QualifiedNameGetCreationNamespace(returnType->names,
109109
&typname);
@@ -150,7 +150,7 @@ compute_parameter_types(List *argTypes, Oid languageOid,
150150
elog(ERROR,"SQL function cannot accept shell type \"%s\"",
151151
TypeNameToString(t));
152152
else
153-
elog(WARNING,"Argument type \"%s\" is only a shell",
153+
elog(NOTICE,"Argument type \"%s\" is only a shell",
154154
TypeNameToString(t));
155155
}
156156
}
@@ -518,8 +518,8 @@ RemoveFunction(RemoveFuncStmt *stmt)
518518

519519
if (((Form_pg_proc)GETSTRUCT(tup))->prolang==INTERNALlanguageId)
520520
{
521-
/* "Helpful"WARNING when removing a builtin function ... */
522-
elog(WARNING,"Removing built-in function \"%s\"",
521+
/* "Helpful"NOTICE when removing a builtin function ... */
522+
elog(NOTICE,"Removing built-in function \"%s\"",
523523
NameListToString(functionName));
524524
}
525525

‎src/test/regress/expected/create_type.out

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,22 +19,22 @@ CREATE FUNCTION int42_in(cstring)
1919
RETURNS int42
2020
AS 'int4in'
2121
LANGUAGE 'internal' WITH (isStrict);
22-
WARNING: ProcedureCreate: type int42 is not yet defined
22+
NOTICE: ProcedureCreate: type int42 is not yet defined
2323
CREATE FUNCTION int42_out(int42)
2424
RETURNS cstring
2525
AS 'int4out'
2626
LANGUAGE 'internal' WITH (isStrict);
27-
WARNING: Argument type "int42" is only a shell
27+
NOTICE: Argument type "int42" is only a shell
2828
CREATE FUNCTION text_w_default_in(cstring)
2929
RETURNS text_w_default
3030
AS 'textin'
3131
LANGUAGE 'internal' WITH (isStrict);
32-
WARNING: ProcedureCreate: type text_w_default is not yet defined
32+
NOTICE: ProcedureCreate: type text_w_default is not yet defined
3333
CREATE FUNCTION text_w_default_out(text_w_default)
3434
RETURNS cstring
3535
AS 'textout'
3636
LANGUAGE 'internal' WITH (isStrict);
37-
WARNING: Argument type "text_w_default" is only a shell
37+
NOTICE: Argument type "text_w_default" is only a shell
3838
CREATE TYPE int42 (
3939
internallength = 4,
4040
input = int42_in,

‎src/test/regress/output/create_function_1.source

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,22 +5,22 @@ CREATE FUNCTION widget_in(cstring)
55
RETURNS widget
66
AS '@abs_builddir@/regress@DLSUFFIX@'
77
LANGUAGE 'c';
8-
WARNING: ProcedureCreate: type widget is not yet defined
8+
NOTICE: ProcedureCreate: type widget is not yet defined
99
CREATE FUNCTION widget_out(widget)
1010
RETURNS cstring
1111
AS '@abs_builddir@/regress@DLSUFFIX@'
1212
LANGUAGE 'c';
13-
WARNING: Argument type "widget" is only a shell
13+
NOTICE: Argument type "widget" is only a shell
1414
CREATE FUNCTION int44in(cstring)
1515
RETURNS city_budget
1616
AS '@abs_builddir@/regress@DLSUFFIX@'
1717
LANGUAGE 'c';
18-
WARNING: ProcedureCreate: type city_budget is not yet defined
18+
NOTICE: ProcedureCreate: type city_budget is not yet defined
1919
CREATE FUNCTION int44out(city_budget)
2020
RETURNS cstring
2121
AS '@abs_builddir@/regress@DLSUFFIX@'
2222
LANGUAGE 'c';
23-
WARNING: Argument type "city_budget" is only a shell
23+
NOTICE: Argument type "city_budget" is only a shell
2424
CREATE FUNCTION check_primary_key ()
2525
RETURNS trigger
2626
AS '@abs_builddir@/../../../contrib/spi/refint@DLSUFFIX@'

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp