mirror of
https://git.postgresql.org/git/postgresql.git
synced 2024-12-21 08:29:39 +08:00
OK, some of these syntax errors should be given other codes.
This commit is contained in:
parent
baba02a84e
commit
2d13472c9e
@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/executor/execQual.c,v 1.143 2003/09/09 23:22:20 petere Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/executor/execQual.c,v 1.144 2003/09/15 20:03:37 petere Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -713,7 +713,7 @@ ExecMakeFunctionResult(FuncExprState *fcache,
|
||||
*isDone = ExprEndResult;
|
||||
else
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_SYNTAX_ERROR),
|
||||
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
|
||||
errmsg("set-valued function called in context that cannot accept a set")));
|
||||
return (Datum) 0;
|
||||
}
|
||||
@ -757,7 +757,7 @@ ExecMakeFunctionResult(FuncExprState *fcache,
|
||||
*/
|
||||
if (isDone == NULL)
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_SYNTAX_ERROR),
|
||||
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
|
||||
errmsg("set-valued function called in context that cannot accept a set")));
|
||||
|
||||
/*
|
||||
@ -944,7 +944,7 @@ ExecMakeTableFunctionResult(ExprState *funcexpr,
|
||||
/* We don't allow sets in the arguments of the table function */
|
||||
if (argDone != ExprSingleResult)
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_SYNTAX_ERROR),
|
||||
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
|
||||
errmsg("set-valued function called in context that cannot accept a set")));
|
||||
|
||||
/*
|
||||
@ -2955,7 +2955,7 @@ ExecTargetList(List *targetlist,
|
||||
/* We have a set-valued expression in the tlist */
|
||||
if (isDone == NULL)
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_SYNTAX_ERROR),
|
||||
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
|
||||
errmsg("set-valued function called in context that cannot accept a set")));
|
||||
if (itemIsDone[resind] == ExprMultipleResult)
|
||||
{
|
||||
|
@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/executor/functions.c,v 1.72 2003/09/09 23:22:20 petere Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/executor/functions.c,v 1.73 2003/09/15 20:03:37 petere Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -574,7 +574,7 @@ fmgr_sql(PG_FUNCTION_ARGS)
|
||||
rsi->isDone = ExprEndResult;
|
||||
else
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_SYNTAX_ERROR),
|
||||
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
|
||||
errmsg("set-valued function called in context that cannot accept a set")));
|
||||
fcinfo->isnull = true;
|
||||
result = (Datum) 0;
|
||||
@ -613,7 +613,7 @@ fmgr_sql(PG_FUNCTION_ARGS)
|
||||
rsi->isDone = ExprMultipleResult;
|
||||
else
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_SYNTAX_ERROR),
|
||||
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
|
||||
errmsg("set-valued function called in context that cannot accept a set")));
|
||||
|
||||
/*
|
||||
|
@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/adt/acl.c,v 1.97 2003/09/09 23:22:21 petere Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/adt/acl.c,v 1.98 2003/09/15 20:03:37 petere Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -776,8 +776,8 @@ aclremove(PG_FUNCTION_ARGS)
|
||||
if (dst == 0)
|
||||
{ /* start */
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
|
||||
errmsg("cannot remove the world ACL")));
|
||||
(errcode(ERRCODE_DATA_EXCEPTION),
|
||||
errmsg("aclitem for public may not be removed")));
|
||||
}
|
||||
else if (dst == old_num - 1)
|
||||
{ /* end */
|
||||
@ -846,7 +846,7 @@ makeaclitem(PG_FUNCTION_ARGS)
|
||||
else if (u_grantee != 0 && g_grantee != 0)
|
||||
{
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_SYNTAX_ERROR),
|
||||
(errcode(ERRCODE_DATA_EXCEPTION),
|
||||
errmsg("cannot specify both user and group")));
|
||||
}
|
||||
else if (u_grantee != 0)
|
||||
|
@ -6,7 +6,7 @@
|
||||
* Copyright (c) 2003, PostgreSQL Global Development Group
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/adt/array_userfuncs.c,v 1.9 2003/09/09 23:22:21 petere Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/adt/array_userfuncs.c,v 1.10 2003/09/15 20:03:37 petere Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -95,7 +95,7 @@ array_push(PG_FUNCTION_ARGS)
|
||||
indx = 1;
|
||||
else
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_SYNTAX_ERROR),
|
||||
(errcode(ERRCODE_DATA_EXCEPTION),
|
||||
errmsg("argument must be empty or one-dimensional array")));
|
||||
|
||||
/*
|
||||
|
@ -187,7 +187,7 @@ pg_stat_get_backend_idset(PG_FUNCTION_ARGS)
|
||||
if (fcinfo->resultinfo == NULL ||
|
||||
!IsA(fcinfo->resultinfo, ReturnSetInfo))
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_SYNTAX_ERROR),
|
||||
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
|
||||
errmsg("set-valued function called in context that "
|
||||
"cannot accept a set")));
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
* back to source text
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/adt/ruleutils.c,v 1.153 2003/09/09 23:22:21 petere Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/adt/ruleutils.c,v 1.154 2003/09/15 20:03:37 petere Exp $
|
||||
*
|
||||
* This software is copyrighted by Jan Wieck - Hamburg.
|
||||
*
|
||||
@ -1097,10 +1097,7 @@ pg_get_constraintdef_worker(Oid constraintId, int prettyFlags)
|
||||
break;
|
||||
}
|
||||
default:
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_INTERNAL_ERROR),
|
||||
errmsg("invalid constraint type \"%c\"",
|
||||
conForm->contype)));
|
||||
elog(ERROR, "invalid constraint type \"%c\"", conForm->contype);
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -10,7 +10,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/adt/Attic/sets.c,v 1.59 2003/09/09 23:22:21 petere Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/adt/Attic/sets.c,v 1.60 2003/09/15 20:03:37 petere Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -203,7 +203,7 @@ seteval(PG_FUNCTION_ARGS)
|
||||
rsi->isDone = isDone;
|
||||
else
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_SYNTAX_ERROR),
|
||||
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
|
||||
errmsg("set-valued function called in context that "
|
||||
"cannot accept a set")));
|
||||
}
|
||||
|
@ -9,7 +9,7 @@
|
||||
* Portions Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/adt/varbit.c,v 1.35 2003/09/09 23:22:21 petere Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/adt/varbit.c,v 1.36 2003/09/15 20:03:37 petere Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -901,7 +901,7 @@ bitand(PG_FUNCTION_ARGS)
|
||||
bitlen2 = VARBITLEN(arg2);
|
||||
if (bitlen1 != bitlen2)
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_SYNTAX_ERROR),
|
||||
(errcode(ERRCODE_STRING_DATA_LENGTH_MISMATCH),
|
||||
errmsg("cannot AND bit strings of different sizes")));
|
||||
|
||||
len = VARSIZE(arg1);
|
||||
@ -942,7 +942,7 @@ bitor(PG_FUNCTION_ARGS)
|
||||
bitlen2 = VARBITLEN(arg2);
|
||||
if (bitlen1 != bitlen2)
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_SYNTAX_ERROR),
|
||||
(errcode(ERRCODE_STRING_DATA_LENGTH_MISMATCH),
|
||||
errmsg("cannot OR bit strings of different sizes")));
|
||||
len = VARSIZE(arg1);
|
||||
result = (VarBit *) palloc(len);
|
||||
@ -988,7 +988,7 @@ bitxor(PG_FUNCTION_ARGS)
|
||||
bitlen2 = VARBITLEN(arg2);
|
||||
if (bitlen1 != bitlen2)
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_SYNTAX_ERROR),
|
||||
(errcode(ERRCODE_STRING_DATA_LENGTH_MISMATCH),
|
||||
errmsg("cannot XOR bit strings of different sizes")));
|
||||
|
||||
len = VARSIZE(arg1);
|
||||
|
@ -7,7 +7,7 @@
|
||||
* Copyright (c) 2002-2003, PostgreSQL Global Development Group
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/fmgr/funcapi.c,v 1.10 2003/09/09 23:22:21 petere Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/fmgr/funcapi.c,v 1.11 2003/09/15 20:03:37 petere Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -34,7 +34,7 @@ init_MultiFuncCall(PG_FUNCTION_ARGS)
|
||||
*/
|
||||
if (fcinfo->resultinfo == NULL || !IsA(fcinfo->resultinfo, ReturnSetInfo))
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_SYNTAX_ERROR),
|
||||
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
|
||||
errmsg("set-valued function called in context that cannot accept a set")));
|
||||
|
||||
if (fcinfo->flinfo->fn_extra == NULL)
|
||||
|
Loading…
Reference in New Issue
Block a user