Reduce messages associated with shell-type function arguments/results

from WARNING to NOTICE, since they are expected messages in common cases.
This commit is contained in:
Tom Lane 2002-11-01 19:19:58 +00:00
parent 03a2371317
commit 8d43947886
3 changed files with 15 additions and 15 deletions

View File

@ -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));
}

View File

@ -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,

View File

@ -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@'