diff options
author | Peter Eisentraut <peter_e@gmx.net> | 2002-07-24 19:11:14 +0000 |
---|---|---|
committer | Peter Eisentraut <peter_e@gmx.net> | 2002-07-24 19:11:14 +0000 |
commit | 739adf32eecfe129aea09f543370d886045c7c01 (patch) | |
tree | 57523329d5ef1c98f67755d000402273f366ea8c /src/backend/commands/functioncmds.c | |
parent | a78777558cfac77563e74fc82edbe2089d7bbc11 (diff) | |
download | postgresql-739adf32eecfe129aea09f543370d886045c7c01.tar.gz postgresql-739adf32eecfe129aea09f543370d886045c7c01.zip |
Remove unused system table columns:
pg_language.lancompiler
pg_operator.oprprec
pg_operator.oprisleft
pg_proc.proimplicit
pg_proc.probyte_pct
pg_proc.properbyte_cpu
pg_proc.propercall_cpu
pg_proc.prooutin_ratio
pg_shadow.usetrace
pg_type.typprtlen
pg_type.typreceive
pg_type.typsend
Attempts to use the obsoleted attributes of pg_operator or pg_proc
in the CREATE commands will be greeted by a warning. For pg_type,
there is no warning (yet) because pg_dump scripts still contain these
attributes.
Also remove new but already obsolete spellings
isVolatile, isStable, isImmutable in WITH clause. (Use new syntax
instead.)
Diffstat (limited to 'src/backend/commands/functioncmds.c')
-rw-r--r-- | src/backend/commands/functioncmds.c | 46 |
1 files changed, 3 insertions, 43 deletions
diff --git a/src/backend/commands/functioncmds.c b/src/backend/commands/functioncmds.c index a445b7d0e7b..29c3e550e74 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.12 2002/07/22 20:23:19 petere Exp $ + * $Header: /cvsroot/pgsql/src/backend/commands/functioncmds.c,v 1.13 2002/07/24 19:11:09 petere Exp $ * * DESCRIPTION * These routines take the parse tree and pick out the @@ -272,11 +272,7 @@ compute_attributes_sql_style(const List *options, *------------ */ static void -compute_attributes_with_style(List *parameters, - int32 *byte_pct_p, int32 *perbyte_cpu_p, - int32 *percall_cpu_p, int32 *outin_ratio_p, - bool *isStrict_p, - char *volatility_p) +compute_attributes_with_style(List *parameters, bool *isStrict_p, char *volatility_p) { List *pl; @@ -286,33 +282,11 @@ compute_attributes_with_style(List *parameters, if (strcasecmp(param->defname, "isstrict") == 0) *isStrict_p = true; - else if (strcasecmp(param->defname, "isimmutable") == 0) - *volatility_p = PROVOLATILE_IMMUTABLE; - else if (strcasecmp(param->defname, "isstable") == 0) - *volatility_p = PROVOLATILE_STABLE; - else if (strcasecmp(param->defname, "isvolatile") == 0) - *volatility_p = PROVOLATILE_VOLATILE; else if (strcasecmp(param->defname, "iscachable") == 0) { /* obsolete spelling of isImmutable */ *volatility_p = PROVOLATILE_IMMUTABLE; } - else if (strcasecmp(param->defname, "trusted") == 0) - { - /* - * we don't have untrusted functions any more. The 4.2 - * implementation is lousy anyway so I took it out. -ay 10/94 - */ - elog(ERROR, "untrusted function has been decommissioned."); - } - else if (strcasecmp(param->defname, "byte_pct") == 0) - *byte_pct_p = (int) defGetNumeric(param); - else if (strcasecmp(param->defname, "perbyte_cpu") == 0) - *perbyte_cpu_p = (int) defGetNumeric(param); - else if (strcasecmp(param->defname, "percall_cpu") == 0) - *percall_cpu_p = (int) defGetNumeric(param); - else if (strcasecmp(param->defname, "outin_ratio") == 0) - *outin_ratio_p = (int) defGetNumeric(param); else elog(WARNING, "Unrecognized function attribute '%s' ignored", param->defname); @@ -383,10 +357,6 @@ CreateFunction(CreateFunctionStmt *stmt) AclResult aclresult; int parameterCount; Oid parameterTypes[FUNC_MAX_ARGS]; - int32 byte_pct, - perbyte_cpu, - percall_cpu, - outin_ratio; bool isStrict, security; char volatility; @@ -404,10 +374,6 @@ CreateFunction(CreateFunctionStmt *stmt) aclcheck_error(aclresult, get_namespace_name(namespaceId)); /* defaults attributes */ - byte_pct = BYTE_PCT; - perbyte_cpu = PERBYTE_CPU; - percall_cpu = PERCALL_CPU; - outin_ratio = OUTIN_RATIO; isStrict = false; security = false; volatility = PROVOLATILE_VOLATILE; @@ -459,9 +425,7 @@ CreateFunction(CreateFunctionStmt *stmt) parameterCount = compute_parameter_types(stmt->argTypes, languageOid, parameterTypes); - compute_attributes_with_style(stmt->withClause, - &byte_pct, &perbyte_cpu, &percall_cpu, - &outin_ratio, &isStrict, &volatility); + compute_attributes_with_style(stmt->withClause, &isStrict, &volatility); interpret_AS_clause(languageOid, languageName, as_clause, &prosrc_str, &probin_str); @@ -505,10 +469,6 @@ CreateFunction(CreateFunctionStmt *stmt) security, isStrict, volatility, - byte_pct, - perbyte_cpu, - percall_cpu, - outin_ratio, parameterCount, parameterTypes); } |