mirror of
https://github.com/postgres/postgres.git
synced 2025-07-08 11:42:09 +03:00
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:
@ -9,7 +9,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* 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
|
* DESCRIPTION
|
||||||
* These routines take the parse tree and pick out the
|
* 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
|
* 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
|
* 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
|
* 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.)
|
* condition.)
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
@ -81,7 +81,7 @@ compute_return_type(TypeName *returnType, Oid languageOid,
|
|||||||
elog(ERROR, "SQL function cannot return shell type \"%s\"",
|
elog(ERROR, "SQL function cannot return shell type \"%s\"",
|
||||||
TypeNameToString(returnType));
|
TypeNameToString(returnType));
|
||||||
else
|
else
|
||||||
elog(WARNING, "Return type \"%s\" is only a shell",
|
elog(NOTICE, "Return type \"%s\" is only a shell",
|
||||||
TypeNameToString(returnType));
|
TypeNameToString(returnType));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -103,7 +103,7 @@ compute_return_type(TypeName *returnType, Oid languageOid,
|
|||||||
elog(ERROR, "Type \"%s\" does not exist", typnam);
|
elog(ERROR, "Type \"%s\" does not exist", typnam);
|
||||||
|
|
||||||
/* Otherwise, go ahead and make a shell type */
|
/* 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);
|
typnam);
|
||||||
namespaceId = QualifiedNameGetCreationNamespace(returnType->names,
|
namespaceId = QualifiedNameGetCreationNamespace(returnType->names,
|
||||||
&typname);
|
&typname);
|
||||||
@ -150,7 +150,7 @@ compute_parameter_types(List *argTypes, Oid languageOid,
|
|||||||
elog(ERROR, "SQL function cannot accept shell type \"%s\"",
|
elog(ERROR, "SQL function cannot accept shell type \"%s\"",
|
||||||
TypeNameToString(t));
|
TypeNameToString(t));
|
||||||
else
|
else
|
||||||
elog(WARNING, "Argument type \"%s\" is only a shell",
|
elog(NOTICE, "Argument type \"%s\" is only a shell",
|
||||||
TypeNameToString(t));
|
TypeNameToString(t));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -518,8 +518,8 @@ RemoveFunction(RemoveFuncStmt *stmt)
|
|||||||
|
|
||||||
if (((Form_pg_proc) GETSTRUCT(tup))->prolang == INTERNALlanguageId)
|
if (((Form_pg_proc) GETSTRUCT(tup))->prolang == INTERNALlanguageId)
|
||||||
{
|
{
|
||||||
/* "Helpful" WARNING when removing a builtin function ... */
|
/* "Helpful" NOTICE when removing a builtin function ... */
|
||||||
elog(WARNING, "Removing built-in function \"%s\"",
|
elog(NOTICE, "Removing built-in function \"%s\"",
|
||||||
NameListToString(functionName));
|
NameListToString(functionName));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -19,22 +19,22 @@ CREATE FUNCTION int42_in(cstring)
|
|||||||
RETURNS int42
|
RETURNS int42
|
||||||
AS 'int4in'
|
AS 'int4in'
|
||||||
LANGUAGE 'internal' WITH (isStrict);
|
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)
|
CREATE FUNCTION int42_out(int42)
|
||||||
RETURNS cstring
|
RETURNS cstring
|
||||||
AS 'int4out'
|
AS 'int4out'
|
||||||
LANGUAGE 'internal' WITH (isStrict);
|
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)
|
CREATE FUNCTION text_w_default_in(cstring)
|
||||||
RETURNS text_w_default
|
RETURNS text_w_default
|
||||||
AS 'textin'
|
AS 'textin'
|
||||||
LANGUAGE 'internal' WITH (isStrict);
|
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)
|
CREATE FUNCTION text_w_default_out(text_w_default)
|
||||||
RETURNS cstring
|
RETURNS cstring
|
||||||
AS 'textout'
|
AS 'textout'
|
||||||
LANGUAGE 'internal' WITH (isStrict);
|
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 (
|
CREATE TYPE int42 (
|
||||||
internallength = 4,
|
internallength = 4,
|
||||||
input = int42_in,
|
input = int42_in,
|
||||||
|
@ -5,22 +5,22 @@ CREATE FUNCTION widget_in(cstring)
|
|||||||
RETURNS widget
|
RETURNS widget
|
||||||
AS '@abs_builddir@/regress@DLSUFFIX@'
|
AS '@abs_builddir@/regress@DLSUFFIX@'
|
||||||
LANGUAGE 'c';
|
LANGUAGE 'c';
|
||||||
WARNING: ProcedureCreate: type widget is not yet defined
|
NOTICE: ProcedureCreate: type widget is not yet defined
|
||||||
CREATE FUNCTION widget_out(widget)
|
CREATE FUNCTION widget_out(widget)
|
||||||
RETURNS cstring
|
RETURNS cstring
|
||||||
AS '@abs_builddir@/regress@DLSUFFIX@'
|
AS '@abs_builddir@/regress@DLSUFFIX@'
|
||||||
LANGUAGE 'c';
|
LANGUAGE 'c';
|
||||||
WARNING: Argument type "widget" is only a shell
|
NOTICE: Argument type "widget" is only a shell
|
||||||
CREATE FUNCTION int44in(cstring)
|
CREATE FUNCTION int44in(cstring)
|
||||||
RETURNS city_budget
|
RETURNS city_budget
|
||||||
AS '@abs_builddir@/regress@DLSUFFIX@'
|
AS '@abs_builddir@/regress@DLSUFFIX@'
|
||||||
LANGUAGE 'c';
|
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)
|
CREATE FUNCTION int44out(city_budget)
|
||||||
RETURNS cstring
|
RETURNS cstring
|
||||||
AS '@abs_builddir@/regress@DLSUFFIX@'
|
AS '@abs_builddir@/regress@DLSUFFIX@'
|
||||||
LANGUAGE 'c';
|
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 ()
|
CREATE FUNCTION check_primary_key ()
|
||||||
RETURNS trigger
|
RETURNS trigger
|
||||||
AS '@abs_builddir@/../../../contrib/spi/refint@DLSUFFIX@'
|
AS '@abs_builddir@/../../../contrib/spi/refint@DLSUFFIX@'
|
||||||
|
Reference in New Issue
Block a user