From 8d43947886e6e499086009a509db7834b6513c5d Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Fri, 1 Nov 2002 19:19:58 +0000 Subject: [PATCH] Reduce messages associated with shell-type function arguments/results from WARNING to NOTICE, since they are expected messages in common cases. --- src/backend/commands/functioncmds.c | 14 +++++++------- src/test/regress/expected/create_type.out | 8 ++++---- src/test/regress/output/create_function_1.source | 8 ++++---- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/src/backend/commands/functioncmds.c b/src/backend/commands/functioncmds.c index 01217d9b12..2e660d7f61 100644 --- a/src/backend/commands/functioncmds.c +++ b/src/backend/commands/functioncmds.c @@ -9,7 +9,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/commands/functioncmds.c,v 1.23 2002/10/04 22:08:44 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/commands/functioncmds.c,v 1.24 2002/11/01 19:19:58 tgl Exp $ * * DESCRIPTION * These routines take the parse tree and pick out the @@ -62,7 +62,7 @@ * doesn't exist yet. (Without this, there's no way to define the I/O procs * for a new type.) But SQL function creation won't cope, so error out if * the target language is SQL. (We do this here, not in the SQL-function - * validator, so as not to produce a WARNING and then an ERROR for the same + * validator, so as not to produce a NOTICE and then an ERROR for the same * condition.) */ static void @@ -81,7 +81,7 @@ compute_return_type(TypeName *returnType, Oid languageOid, elog(ERROR, "SQL function cannot return shell type \"%s\"", TypeNameToString(returnType)); else - elog(WARNING, "Return type \"%s\" is only a shell", + elog(NOTICE, "Return type \"%s\" is only a shell", TypeNameToString(returnType)); } } @@ -103,7 +103,7 @@ compute_return_type(TypeName *returnType, Oid languageOid, elog(ERROR, "Type \"%s\" does not exist", typnam); /* Otherwise, go ahead and make a shell type */ - elog(WARNING, "ProcedureCreate: type %s is not yet defined", + elog(NOTICE, "ProcedureCreate: type %s is not yet defined", typnam); namespaceId = QualifiedNameGetCreationNamespace(returnType->names, &typname); @@ -150,7 +150,7 @@ compute_parameter_types(List *argTypes, Oid languageOid, elog(ERROR, "SQL function cannot accept shell type \"%s\"", TypeNameToString(t)); else - elog(WARNING, "Argument type \"%s\" is only a shell", + elog(NOTICE, "Argument type \"%s\" is only a shell", TypeNameToString(t)); } } @@ -518,8 +518,8 @@ RemoveFunction(RemoveFuncStmt *stmt) if (((Form_pg_proc) GETSTRUCT(tup))->prolang == INTERNALlanguageId) { - /* "Helpful" WARNING when removing a builtin function ... */ - elog(WARNING, "Removing built-in function \"%s\"", + /* "Helpful" NOTICE when removing a builtin function ... */ + elog(NOTICE, "Removing built-in function \"%s\"", NameListToString(functionName)); } diff --git a/src/test/regress/expected/create_type.out b/src/test/regress/expected/create_type.out index a177153d29..ea103d2ff4 100644 --- a/src/test/regress/expected/create_type.out +++ b/src/test/regress/expected/create_type.out @@ -19,22 +19,22 @@ CREATE FUNCTION int42_in(cstring) RETURNS int42 AS 'int4in' LANGUAGE 'internal' WITH (isStrict); -WARNING: ProcedureCreate: type int42 is not yet defined +NOTICE: ProcedureCreate: type int42 is not yet defined CREATE FUNCTION int42_out(int42) RETURNS cstring AS 'int4out' LANGUAGE 'internal' WITH (isStrict); -WARNING: Argument type "int42" is only a shell +NOTICE: Argument type "int42" is only a shell CREATE FUNCTION text_w_default_in(cstring) RETURNS text_w_default AS 'textin' LANGUAGE 'internal' WITH (isStrict); -WARNING: ProcedureCreate: type text_w_default is not yet defined +NOTICE: ProcedureCreate: type text_w_default is not yet defined CREATE FUNCTION text_w_default_out(text_w_default) RETURNS cstring AS 'textout' LANGUAGE 'internal' WITH (isStrict); -WARNING: Argument type "text_w_default" is only a shell +NOTICE: Argument type "text_w_default" is only a shell CREATE TYPE int42 ( internallength = 4, input = int42_in, diff --git a/src/test/regress/output/create_function_1.source b/src/test/regress/output/create_function_1.source index 9632114f93..b416c66cdd 100644 --- a/src/test/regress/output/create_function_1.source +++ b/src/test/regress/output/create_function_1.source @@ -5,22 +5,22 @@ CREATE FUNCTION widget_in(cstring) RETURNS widget AS '@abs_builddir@/regress@DLSUFFIX@' LANGUAGE 'c'; -WARNING: ProcedureCreate: type widget is not yet defined +NOTICE: ProcedureCreate: type widget is not yet defined CREATE FUNCTION widget_out(widget) RETURNS cstring AS '@abs_builddir@/regress@DLSUFFIX@' LANGUAGE 'c'; -WARNING: Argument type "widget" is only a shell +NOTICE: Argument type "widget" is only a shell CREATE FUNCTION int44in(cstring) RETURNS city_budget AS '@abs_builddir@/regress@DLSUFFIX@' LANGUAGE 'c'; -WARNING: ProcedureCreate: type city_budget is not yet defined +NOTICE: ProcedureCreate: type city_budget is not yet defined CREATE FUNCTION int44out(city_budget) RETURNS cstring AS '@abs_builddir@/regress@DLSUFFIX@' LANGUAGE 'c'; -WARNING: Argument type "city_budget" is only a shell +NOTICE: Argument type "city_budget" is only a shell CREATE FUNCTION check_primary_key () RETURNS trigger AS '@abs_builddir@/../../../contrib/spi/refint@DLSUFFIX@' -- 2.40.0