mirror of
https://github.com/postgres/postgres.git
synced 2025-08-27 07:42:10 +03:00
Pgindent run for 8.0.
This commit is contained in:
@@ -3,14 +3,14 @@
|
||||
* functioncmds.c
|
||||
*
|
||||
* Routines for CREATE and DROP FUNCTION commands and CREATE and DROP
|
||||
* CAST commands.
|
||||
* CAST commands.
|
||||
*
|
||||
* Portions Copyright (c) 1996-2004, PostgreSQL Global Development Group
|
||||
* Portions Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $PostgreSQL: pgsql/src/backend/commands/functioncmds.c,v 1.51 2004/08/29 04:12:30 momjian Exp $
|
||||
* $PostgreSQL: pgsql/src/backend/commands/functioncmds.c,v 1.52 2004/08/29 05:06:41 momjian Exp $
|
||||
*
|
||||
* DESCRIPTION
|
||||
* These routines take the parse tree and pick out the
|
||||
@@ -449,14 +449,14 @@ CreateFunction(CreateFunctionStmt *stmt)
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_UNDEFINED_OBJECT),
|
||||
errmsg("language \"%s\" does not exist", languageName),
|
||||
(strcmp(languageName, "plperl") == 0 ||
|
||||
strcmp(languageName, "plperlu") == 0 ||
|
||||
strcmp(languageName, "plpgsql") == 0 ||
|
||||
strcmp(languageName, "plpythonu") == 0 ||
|
||||
strcmp(languageName, "pltcl") == 0 ||
|
||||
strcmp(languageName, "pltclu") == 0) ?
|
||||
(strcmp(languageName, "plperl") == 0 ||
|
||||
strcmp(languageName, "plperlu") == 0 ||
|
||||
strcmp(languageName, "plpgsql") == 0 ||
|
||||
strcmp(languageName, "plpythonu") == 0 ||
|
||||
strcmp(languageName, "pltcl") == 0 ||
|
||||
strcmp(languageName, "pltclu") == 0) ?
|
||||
errhint("You need to use \"createlang\" to load the language into the database.") : 0));
|
||||
|
||||
|
||||
languageOid = HeapTupleGetOid(languageTuple);
|
||||
languageStruct = (Form_pg_language) GETSTRUCT(languageTuple);
|
||||
|
||||
@@ -490,7 +490,7 @@ CreateFunction(CreateFunctionStmt *stmt)
|
||||
&prorettype, &returnsSet);
|
||||
|
||||
parameterCount = examine_parameter_list(stmt->parameters, languageOid,
|
||||
parameterTypes, parameterNames);
|
||||
parameterTypes, parameterNames);
|
||||
|
||||
compute_attributes_with_style(stmt->withClause, &isStrict, &volatility);
|
||||
|
||||
@@ -739,8 +739,8 @@ AlterFunctionOwner(List *name, List *argtypes, AclId newOwnerSysId)
|
||||
procOid = LookupFuncNameTypeNames(name, argtypes, false);
|
||||
|
||||
tup = SearchSysCache(PROCOID,
|
||||
ObjectIdGetDatum(procOid),
|
||||
0, 0, 0);
|
||||
ObjectIdGetDatum(procOid),
|
||||
0, 0, 0);
|
||||
if (!HeapTupleIsValid(tup)) /* should not happen */
|
||||
elog(ERROR, "cache lookup failed for function %u", procOid);
|
||||
procForm = (Form_pg_proc) GETSTRUCT(tup);
|
||||
@@ -750,9 +750,9 @@ AlterFunctionOwner(List *name, List *argtypes, AclId newOwnerSysId)
|
||||
(errcode(ERRCODE_WRONG_OBJECT_TYPE),
|
||||
errmsg("\"%s\" is an aggregate function",
|
||||
NameListToString(name)),
|
||||
errhint("Use ALTER AGGREGATE to change owner of aggregate functions.")));
|
||||
errhint("Use ALTER AGGREGATE to change owner of aggregate functions.")));
|
||||
|
||||
/*
|
||||
/*
|
||||
* If the new owner is the same as the existing owner, consider the
|
||||
* command to have succeeded. This is for dump restoration purposes.
|
||||
*/
|
||||
@@ -761,7 +761,7 @@ AlterFunctionOwner(List *name, List *argtypes, AclId newOwnerSysId)
|
||||
Datum repl_val[Natts_pg_proc];
|
||||
char repl_null[Natts_pg_proc];
|
||||
char repl_repl[Natts_pg_proc];
|
||||
Acl *newAcl;
|
||||
Acl *newAcl;
|
||||
Datum aclDatum;
|
||||
bool isNull;
|
||||
HeapTuple newtuple;
|
||||
@@ -968,7 +968,7 @@ CreateCast(CreateCastStmt *stmt)
|
||||
if (nargs < 1 || nargs > 3)
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
|
||||
errmsg("cast function must take one to three arguments")));
|
||||
errmsg("cast function must take one to three arguments")));
|
||||
if (procstruct->proargtypes[0] != sourcetypeid)
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
|
||||
|
Reference in New Issue
Block a user