mirror of
https://github.com/postgres/postgres.git
synced 2025-11-12 05:01:15 +03:00
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.)
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/catalog/heap.c,v 1.212 2002/07/20 05:16:56 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/catalog/heap.c,v 1.213 2002/07/24 19:11:07 petere Exp $
|
||||
*
|
||||
*
|
||||
* INTERFACE ROUTINES
|
||||
@@ -641,13 +641,10 @@ AddNewRelationType(const char *typeName,
|
||||
new_type_oid, /* preassigned oid for type */
|
||||
new_rel_oid, /* relation oid */
|
||||
sizeof(Oid), /* internal size */
|
||||
-1, /* external size */
|
||||
'c', /* type-type (complex) */
|
||||
',', /* default array delimiter */
|
||||
F_OIDIN, /* input procedure */
|
||||
F_OIDOUT, /* output procedure */
|
||||
F_OIDIN, /* receive procedure */
|
||||
F_OIDOUT, /* send procedure */
|
||||
InvalidOid, /* array element type - irrelevant */
|
||||
InvalidOid, /* domain base type - irrelevant */
|
||||
NULL, /* default type value - none */
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/catalog/pg_aggregate.c,v 1.51 2002/07/18 23:11:27 petere Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/catalog/pg_aggregate.c,v 1.52 2002/07/24 19:11:07 petere Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -146,10 +146,6 @@ AggregateCreate(const char *aggName,
|
||||
false, /* security invoker (currently not definable for agg) */
|
||||
false, /* isStrict (not needed for agg) */
|
||||
PROVOLATILE_IMMUTABLE, /* volatility (not needed for agg) */
|
||||
BYTE_PCT, /* default cost values */
|
||||
PERBYTE_CPU,
|
||||
PERCALL_CPU,
|
||||
OUTIN_RATIO,
|
||||
1, /* parameterCount */
|
||||
fnArgs); /* parameterTypes */
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/catalog/pg_operator.c,v 1.73 2002/07/20 05:16:56 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/catalog/pg_operator.c,v 1.74 2002/07/24 19:11:08 petere Exp $
|
||||
*
|
||||
* NOTES
|
||||
* these routines moved here from commands/define.c and somewhat cleaned up.
|
||||
@@ -232,9 +232,7 @@ OperatorShellMake(const char *operatorName,
|
||||
values[i++] = NameGetDatum(&oname); /* oprname */
|
||||
values[i++] = ObjectIdGetDatum(operatorNamespace); /* oprnamespace */
|
||||
values[i++] = Int32GetDatum(GetUserId()); /* oprowner */
|
||||
values[i++] = UInt16GetDatum(0); /* oprprec */
|
||||
values[i++] = CharGetDatum(leftTypeId ? (rightTypeId ? 'b' : 'r') : 'l'); /* oprkind */
|
||||
values[i++] = BoolGetDatum(false); /* oprisleft */
|
||||
values[i++] = BoolGetDatum(false); /* oprcanhash */
|
||||
values[i++] = ObjectIdGetDatum(leftTypeId); /* oprleft */
|
||||
values[i++] = ObjectIdGetDatum(rightTypeId); /* oprright */
|
||||
@@ -296,8 +294,6 @@ OperatorShellMake(const char *operatorName,
|
||||
* leftTypeId X left type ID
|
||||
* rightTypeId X right type ID
|
||||
* procedureName procedure for operator
|
||||
* precedence operator precedence
|
||||
* isLeftAssociative operator is left associative
|
||||
* commutatorName X commutator operator
|
||||
* negatorName X negator operator
|
||||
* restrictionName X restriction sel. procedure
|
||||
@@ -331,9 +327,7 @@ OperatorShellMake(const char *operatorName,
|
||||
* assign values to the fields of the operator:
|
||||
* operatorName
|
||||
* owner id (simply the user id of the caller)
|
||||
* precedence
|
||||
* operator "kind" either "b" for binary or "l" for left unary
|
||||
* isLeftAssociative boolean
|
||||
* canHash boolean
|
||||
* leftTypeObjectId -- type must already be defined
|
||||
* rightTypeObjectId -- this is optional, enter ObjectId=0 if none specified
|
||||
@@ -373,8 +367,6 @@ OperatorCreate(const char *operatorName,
|
||||
Oid leftTypeId,
|
||||
Oid rightTypeId,
|
||||
List *procedureName,
|
||||
uint16 precedence,
|
||||
bool isLeftAssociative,
|
||||
List *commutatorName,
|
||||
List *negatorName,
|
||||
List *restrictionName,
|
||||
@@ -524,9 +516,7 @@ OperatorCreate(const char *operatorName,
|
||||
values[i++] = NameGetDatum(&oname); /* oprname */
|
||||
values[i++] = ObjectIdGetDatum(operatorNamespace); /* oprnamespace */
|
||||
values[i++] = Int32GetDatum(GetUserId()); /* oprowner */
|
||||
values[i++] = UInt16GetDatum(precedence); /* oprprec */
|
||||
values[i++] = CharGetDatum(leftTypeId ? (rightTypeId ? 'b' : 'r') : 'l'); /* oprkind */
|
||||
values[i++] = BoolGetDatum(isLeftAssociative); /* oprisleft */
|
||||
values[i++] = BoolGetDatum(canHash); /* oprcanhash */
|
||||
values[i++] = ObjectIdGetDatum(leftTypeId); /* oprleft */
|
||||
values[i++] = ObjectIdGetDatum(rightTypeId); /* oprright */
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/catalog/pg_proc.c,v 1.80 2002/07/20 05:16:57 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/catalog/pg_proc.c,v 1.81 2002/07/24 19:11:09 petere Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -57,10 +57,6 @@ ProcedureCreate(const char *procedureName,
|
||||
bool security_definer,
|
||||
bool isStrict,
|
||||
char volatility,
|
||||
int32 byte_pct,
|
||||
int32 perbyte_cpu,
|
||||
int32 percall_cpu,
|
||||
int32 outin_ratio,
|
||||
int parameterCount,
|
||||
const Oid *parameterTypes)
|
||||
{
|
||||
@@ -162,17 +158,12 @@ ProcedureCreate(const char *procedureName,
|
||||
values[i++] = ObjectIdGetDatum(languageObjectId); /* prolang */
|
||||
values[i++] = BoolGetDatum(isAgg); /* proisagg */
|
||||
values[i++] = BoolGetDatum(security_definer); /* prosecdef */
|
||||
values[i++] = BoolGetDatum(false); /* proimplicit */
|
||||
values[i++] = BoolGetDatum(isStrict); /* proisstrict */
|
||||
values[i++] = BoolGetDatum(returnsSet); /* proretset */
|
||||
values[i++] = CharGetDatum(volatility); /* provolatile */
|
||||
values[i++] = UInt16GetDatum(parameterCount); /* pronargs */
|
||||
values[i++] = ObjectIdGetDatum(returnType); /* prorettype */
|
||||
values[i++] = PointerGetDatum(typev); /* proargtypes */
|
||||
values[i++] = Int32GetDatum(byte_pct); /* probyte_pct */
|
||||
values[i++] = Int32GetDatum(perbyte_cpu); /* properbyte_cpu */
|
||||
values[i++] = Int32GetDatum(percall_cpu); /* propercall_cpu */
|
||||
values[i++] = Int32GetDatum(outin_ratio); /* prooutin_ratio */
|
||||
values[i++] = DirectFunctionCall1(textin, /* prosrc */
|
||||
CStringGetDatum(prosrc));
|
||||
values[i++] = DirectFunctionCall1(textin, /* probin */
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/catalog/pg_type.c,v 1.75 2002/07/20 05:16:57 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/catalog/pg_type.c,v 1.76 2002/07/24 19:11:09 petere Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -76,7 +76,6 @@ TypeShellMake(const char *typeName, Oid typeNamespace)
|
||||
values[i++] = ObjectIdGetDatum(typeNamespace); /* typnamespace */
|
||||
values[i++] = ObjectIdGetDatum(InvalidOid); /* typowner */
|
||||
values[i++] = Int16GetDatum(0); /* typlen */
|
||||
values[i++] = Int16GetDatum(0); /* typprtlen */
|
||||
values[i++] = BoolGetDatum(false); /* typbyval */
|
||||
values[i++] = CharGetDatum(0); /* typtype */
|
||||
values[i++] = BoolGetDatum(false); /* typisdefined */
|
||||
@@ -85,8 +84,6 @@ TypeShellMake(const char *typeName, Oid typeNamespace)
|
||||
values[i++] = ObjectIdGetDatum(InvalidOid); /* typelem */
|
||||
values[i++] = ObjectIdGetDatum(InvalidOid); /* typinput */
|
||||
values[i++] = ObjectIdGetDatum(InvalidOid); /* typoutput */
|
||||
values[i++] = ObjectIdGetDatum(InvalidOid); /* typreceive */
|
||||
values[i++] = ObjectIdGetDatum(InvalidOid); /* typsend */
|
||||
values[i++] = CharGetDatum('i'); /* typalign */
|
||||
values[i++] = CharGetDatum('p'); /* typstorage */
|
||||
values[i++] = BoolGetDatum(false); /* typnotnull */
|
||||
@@ -141,13 +138,10 @@ TypeCreate(const char *typeName,
|
||||
Oid assignedTypeOid,
|
||||
Oid relationOid, /* only for 'c'atalog typeTypes */
|
||||
int16 internalSize,
|
||||
int16 externalSize,
|
||||
char typeType,
|
||||
char typDelim,
|
||||
Oid inputProcedure,
|
||||
Oid outputProcedure,
|
||||
Oid receiveProcedure,
|
||||
Oid sendProcedure,
|
||||
Oid elementType,
|
||||
Oid baseType,
|
||||
const char *defaultTypeValue, /* human readable rep */
|
||||
@@ -176,9 +170,6 @@ TypeCreate(const char *typeName,
|
||||
if (!(internalSize > 0 || internalSize == -1))
|
||||
elog(ERROR, "TypeCreate: invalid type internal size %d",
|
||||
internalSize);
|
||||
if (!(externalSize > 0 || externalSize == -1))
|
||||
elog(ERROR, "TypeCreate: invalid type external size %d",
|
||||
externalSize);
|
||||
|
||||
if (internalSize != -1 && storage != 'p')
|
||||
elog(ERROR, "TypeCreate: fixed size types must have storage PLAIN");
|
||||
@@ -202,7 +193,6 @@ TypeCreate(const char *typeName,
|
||||
values[i++] = ObjectIdGetDatum(typeNamespace); /* typnamespace */
|
||||
values[i++] = Int32GetDatum(GetUserId()); /* typowner */
|
||||
values[i++] = Int16GetDatum(internalSize); /* typlen */
|
||||
values[i++] = Int16GetDatum(externalSize); /* typprtlen */
|
||||
values[i++] = BoolGetDatum(passedByValue); /* typbyval */
|
||||
values[i++] = CharGetDatum(typeType); /* typtype */
|
||||
values[i++] = BoolGetDatum(true); /* typisdefined */
|
||||
@@ -211,8 +201,6 @@ TypeCreate(const char *typeName,
|
||||
values[i++] = ObjectIdGetDatum(elementType); /* typelem */
|
||||
values[i++] = ObjectIdGetDatum(inputProcedure); /* typinput */
|
||||
values[i++] = ObjectIdGetDatum(outputProcedure); /* typoutput */
|
||||
values[i++] = ObjectIdGetDatum(receiveProcedure); /* typreceive */
|
||||
values[i++] = ObjectIdGetDatum(sendProcedure); /* typsend */
|
||||
values[i++] = CharGetDatum(alignment); /* typalign */
|
||||
values[i++] = CharGetDatum(storage); /* typstorage */
|
||||
values[i++] = BoolGetDatum(typeNotNull); /* typnotnull */
|
||||
@@ -335,22 +323,6 @@ TypeCreate(const char *typeName,
|
||||
referenced.objectSubId = 0;
|
||||
recordDependencyOn(&myself, &referenced, DEPENDENCY_NORMAL);
|
||||
|
||||
if (receiveProcedure != inputProcedure)
|
||||
{
|
||||
referenced.classId = RelOid_pg_proc;
|
||||
referenced.objectId = receiveProcedure;
|
||||
referenced.objectSubId = 0;
|
||||
recordDependencyOn(&myself, &referenced, DEPENDENCY_NORMAL);
|
||||
}
|
||||
|
||||
if (sendProcedure != outputProcedure)
|
||||
{
|
||||
referenced.classId = RelOid_pg_proc;
|
||||
referenced.objectId = sendProcedure;
|
||||
referenced.objectSubId = 0;
|
||||
recordDependencyOn(&myself, &referenced, DEPENDENCY_NORMAL);
|
||||
}
|
||||
|
||||
/*
|
||||
* If the type is a rowtype for a relation, mark it as internally
|
||||
* dependent on the relation. This allows it to be auto-dropped
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/commands/operatorcmds.c,v 1.5 2002/07/12 18:43:16 tgl Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/commands/operatorcmds.c,v 1.6 2002/07/24 19:11:09 petere Exp $
|
||||
*
|
||||
* DESCRIPTION
|
||||
* The "DefineFoo" routines take the parse tree and pick out the
|
||||
@@ -62,11 +62,8 @@ DefineOperator(List *names, List *parameters)
|
||||
char *oprName;
|
||||
Oid oprNamespace;
|
||||
AclResult aclresult;
|
||||
uint16 precedence = 0; /* operator precedence */
|
||||
bool canHash = false; /* operator hashes */
|
||||
bool canMerge = false; /* operator merges */
|
||||
bool isLeftAssociative = true; /* operator is left
|
||||
* associative */
|
||||
List *functionName = NIL; /* function for operator */
|
||||
TypeName *typeName1 = NULL; /* first type name */
|
||||
TypeName *typeName2 = NULL; /* second type name */
|
||||
@@ -113,16 +110,6 @@ DefineOperator(List *names, List *parameters)
|
||||
}
|
||||
else if (strcasecmp(defel->defname, "procedure") == 0)
|
||||
functionName = defGetQualifiedName(defel);
|
||||
else if (strcasecmp(defel->defname, "precedence") == 0)
|
||||
{
|
||||
/* NOT IMPLEMENTED (never worked in v4.2) */
|
||||
elog(NOTICE, "CREATE OPERATOR: precedence not implemented");
|
||||
}
|
||||
else if (strcasecmp(defel->defname, "associativity") == 0)
|
||||
{
|
||||
/* NOT IMPLEMENTED (never worked in v4.2) */
|
||||
elog(NOTICE, "CREATE OPERATOR: associativity not implemented");
|
||||
}
|
||||
else if (strcasecmp(defel->defname, "commutator") == 0)
|
||||
commutatorName = defGetQualifiedName(defel);
|
||||
else if (strcasecmp(defel->defname, "negator") == 0)
|
||||
@@ -190,8 +177,6 @@ DefineOperator(List *names, List *parameters)
|
||||
typeId1, /* left type id */
|
||||
typeId2, /* right type id */
|
||||
functionName, /* function for operator */
|
||||
precedence, /* operator precedence */
|
||||
isLeftAssociative, /* operator is left associative */
|
||||
commutatorName, /* optional commutator operator
|
||||
* name */
|
||||
negatorName, /* optional negator operator name */
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
* Portions Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/commands/proclang.c,v 1.37 2002/07/20 05:16:57 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/commands/proclang.c,v 1.38 2002/07/24 19:11:09 petere Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -110,8 +110,6 @@ CreateProceduralLanguage(CreatePLangStmt *stmt)
|
||||
values[i++] = BoolGetDatum(stmt->pltrusted);
|
||||
values[i++] = ObjectIdGetDatum(procOid);
|
||||
values[i++] = ObjectIdGetDatum(valProcOid);
|
||||
values[i++] = DirectFunctionCall1(textin,
|
||||
CStringGetDatum(stmt->plcompiler));
|
||||
nulls[i] = 'n'; /* lanacl */
|
||||
|
||||
rel = heap_openr(LanguageRelationName, RowExclusiveLock);
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/commands/typecmds.c,v 1.7 2002/07/20 05:16:57 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/commands/typecmds.c,v 1.8 2002/07/24 19:11:09 petere Exp $
|
||||
*
|
||||
* DESCRIPTION
|
||||
* The "DefineFoo" routines take the parse tree and pick out the
|
||||
@@ -20,7 +20,7 @@
|
||||
* NOTES
|
||||
* These things must be defined and committed in the following order:
|
||||
* "create function":
|
||||
* input/output, recv/send procedures
|
||||
* input/output functions
|
||||
* "create type":
|
||||
* type
|
||||
* "create operator":
|
||||
@@ -62,12 +62,9 @@ DefineType(List *names, List *parameters)
|
||||
Oid typeNamespace;
|
||||
AclResult aclresult;
|
||||
int16 internalLength = -1; /* int2 */
|
||||
int16 externalLength = -1; /* int2 */
|
||||
Oid elemType = InvalidOid;
|
||||
List *inputName = NIL;
|
||||
List *outputName = NIL;
|
||||
List *sendName = NIL;
|
||||
List *receiveName = NIL;
|
||||
char *defaultValue = NULL;
|
||||
bool byValue = false;
|
||||
char delimiter = DEFAULT_TYPDELIM;
|
||||
@@ -75,8 +72,6 @@ DefineType(List *names, List *parameters)
|
||||
char storage = 'p'; /* default TOAST storage method */
|
||||
Oid inputOid;
|
||||
Oid outputOid;
|
||||
Oid sendOid;
|
||||
Oid receiveOid;
|
||||
char *shadow_type;
|
||||
List *pl;
|
||||
Oid typoid;
|
||||
@@ -105,15 +100,15 @@ DefineType(List *names, List *parameters)
|
||||
if (strcasecmp(defel->defname, "internallength") == 0)
|
||||
internalLength = defGetTypeLength(defel);
|
||||
else if (strcasecmp(defel->defname, "externallength") == 0)
|
||||
externalLength = defGetTypeLength(defel);
|
||||
; /* ignored -- remove after 7.3 */
|
||||
else if (strcasecmp(defel->defname, "input") == 0)
|
||||
inputName = defGetQualifiedName(defel);
|
||||
else if (strcasecmp(defel->defname, "output") == 0)
|
||||
outputName = defGetQualifiedName(defel);
|
||||
else if (strcasecmp(defel->defname, "send") == 0)
|
||||
sendName = defGetQualifiedName(defel);
|
||||
; /* ignored -- remove after 7.3 */
|
||||
else if (strcasecmp(defel->defname, "receive") == 0)
|
||||
receiveName = defGetQualifiedName(defel);
|
||||
; /* ignored -- remove after 7.3 */
|
||||
else if (strcasecmp(defel->defname, "delimiter") == 0)
|
||||
{
|
||||
char *p = defGetString(defel);
|
||||
@@ -187,14 +182,6 @@ DefineType(List *names, List *parameters)
|
||||
/* Convert I/O proc names to OIDs */
|
||||
inputOid = findTypeIOFunction(inputName, false);
|
||||
outputOid = findTypeIOFunction(outputName, true);
|
||||
if (sendName)
|
||||
sendOid = findTypeIOFunction(sendName, true);
|
||||
else
|
||||
sendOid = outputOid;
|
||||
if (receiveName)
|
||||
receiveOid = findTypeIOFunction(receiveName, false);
|
||||
else
|
||||
receiveOid = inputOid;
|
||||
|
||||
/*
|
||||
* now have TypeCreate do all the real work.
|
||||
@@ -205,13 +192,10 @@ DefineType(List *names, List *parameters)
|
||||
InvalidOid, /* preassigned type oid (not done here) */
|
||||
InvalidOid, /* relation oid (n/a here) */
|
||||
internalLength, /* internal size */
|
||||
externalLength, /* external size */
|
||||
'b', /* type-type (base type) */
|
||||
delimiter, /* array element delimiter */
|
||||
inputOid, /* input procedure */
|
||||
outputOid, /* output procedure */
|
||||
receiveOid, /* receive procedure */
|
||||
sendOid, /* send procedure */
|
||||
elemType, /* element type ID */
|
||||
InvalidOid, /* base type ID (only for domains) */
|
||||
defaultValue, /* default type value */
|
||||
@@ -237,13 +221,10 @@ DefineType(List *names, List *parameters)
|
||||
InvalidOid, /* preassigned type oid (not done here) */
|
||||
InvalidOid, /* relation oid (n/a here) */
|
||||
-1, /* internal size */
|
||||
-1, /* external size */
|
||||
'b', /* type-type (base type) */
|
||||
DEFAULT_TYPDELIM, /* array element delimiter */
|
||||
F_ARRAY_IN, /* input procedure */
|
||||
F_ARRAY_OUT, /* output procedure */
|
||||
F_ARRAY_IN, /* receive procedure */
|
||||
F_ARRAY_OUT, /* send procedure */
|
||||
typoid, /* element type ID */
|
||||
InvalidOid, /* base type ID */
|
||||
NULL, /* never a default type value */
|
||||
@@ -346,11 +327,8 @@ DefineDomain(CreateDomainStmt *stmt)
|
||||
Oid domainNamespace;
|
||||
AclResult aclresult;
|
||||
int16 internalLength;
|
||||
int16 externalLength;
|
||||
Oid inputProcedure;
|
||||
Oid outputProcedure;
|
||||
Oid receiveProcedure;
|
||||
Oid sendProcedure;
|
||||
bool byValue;
|
||||
char delimiter;
|
||||
char alignment;
|
||||
@@ -421,17 +399,12 @@ DefineDomain(CreateDomainStmt *stmt)
|
||||
/* Storage Length */
|
||||
internalLength = baseType->typlen;
|
||||
|
||||
/* External Length (unused) */
|
||||
externalLength = baseType->typprtlen;
|
||||
|
||||
/* Array element Delimiter */
|
||||
delimiter = baseType->typdelim;
|
||||
|
||||
/* I/O Functions */
|
||||
inputProcedure = baseType->typinput;
|
||||
outputProcedure = baseType->typoutput;
|
||||
receiveProcedure = baseType->typreceive;
|
||||
sendProcedure = baseType->typsend;
|
||||
|
||||
/* Inherited default value */
|
||||
datum = SysCacheGetAttr(TYPEOID, typeTup,
|
||||
@@ -549,13 +522,10 @@ DefineDomain(CreateDomainStmt *stmt)
|
||||
InvalidOid, /* preassigned type oid (none here) */
|
||||
InvalidOid, /* relation oid (n/a here) */
|
||||
internalLength, /* internal size */
|
||||
externalLength, /* external size */
|
||||
'd', /* type-type (domain type) */
|
||||
delimiter, /* array element delimiter */
|
||||
inputProcedure, /* input procedure */
|
||||
outputProcedure, /* output procedure */
|
||||
receiveProcedure, /* receive procedure */
|
||||
sendProcedure, /* send procedure */
|
||||
basetypelem, /* element type ID */
|
||||
basetypeoid, /* base type ID */
|
||||
defaultValue, /* default type value (text) */
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
* Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group
|
||||
* Portions Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* $Header: /cvsroot/pgsql/src/backend/commands/user.c,v 1.105 2002/06/20 20:29:27 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/commands/user.c,v 1.106 2002/07/24 19:11:09 petere Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -560,7 +560,6 @@ CreateUser(CreateUserStmt *stmt)
|
||||
new_record[Anum_pg_shadow_usesysid - 1] = Int32GetDatum(sysid);
|
||||
AssertState(BoolIsValid(createdb));
|
||||
new_record[Anum_pg_shadow_usecreatedb - 1] = BoolGetDatum(createdb);
|
||||
new_record[Anum_pg_shadow_usetrace - 1] = BoolGetDatum(false);
|
||||
AssertState(BoolIsValid(createuser));
|
||||
new_record[Anum_pg_shadow_usesuper - 1] = BoolGetDatum(createuser);
|
||||
/* superuser gets catupd right by default */
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
* Portions Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/nodes/copyfuncs.c,v 1.196 2002/07/18 17:14:19 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/nodes/copyfuncs.c,v 1.197 2002/07/24 19:11:10 petere Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -2415,8 +2415,6 @@ _copyCreatePLangStmt(CreatePLangStmt *from)
|
||||
newnode->plname = pstrdup(from->plname);
|
||||
Node_Copy(from, newnode, plhandler);
|
||||
Node_Copy(from, newnode, plvalidator);
|
||||
if (from->plcompiler)
|
||||
newnode->plcompiler = pstrdup(from->plcompiler);
|
||||
newnode->pltrusted = from->pltrusted;
|
||||
|
||||
return newnode;
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
* Portions Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/nodes/equalfuncs.c,v 1.143 2002/07/18 17:14:19 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/nodes/equalfuncs.c,v 1.144 2002/07/24 19:11:10 petere Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -1252,8 +1252,6 @@ _equalCreatePLangStmt(CreatePLangStmt *a, CreatePLangStmt *b)
|
||||
return false;
|
||||
if (!equal(a->plvalidator, b->plvalidator))
|
||||
return false;
|
||||
if (!equalstr(a->plcompiler, b->plcompiler))
|
||||
return false;
|
||||
if (a->pltrusted != b->pltrusted)
|
||||
return false;
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/parser/gram.y,v 2.348 2002/07/20 05:58:34 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/parser/gram.y,v 2.349 2002/07/24 19:11:10 petere Exp $
|
||||
*
|
||||
* HISTORY
|
||||
* AUTHOR DATE MAJOR EVENT
|
||||
@@ -1931,7 +1931,6 @@ CreatePLangStmt:
|
||||
n->plname = $5;
|
||||
n->plhandler = $7;
|
||||
n->plvalidator = $8;
|
||||
n->plcompiler = $9;
|
||||
n->pltrusted = $2;
|
||||
$$ = (Node *)n;
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
#
|
||||
#
|
||||
# IDENTIFICATION
|
||||
# $Header: /cvsroot/pgsql/src/backend/utils/Attic/Gen_fmgrtab.sh,v 1.24 2002/06/20 20:29:36 momjian Exp $
|
||||
# $Header: /cvsroot/pgsql/src/backend/utils/Attic/Gen_fmgrtab.sh,v 1.25 2002/07/24 19:11:10 petere Exp $
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
|
||||
@@ -233,15 +233,15 @@ FuNkYfMgRtAbStUfF
|
||||
# may seem tedious, but avoid the temptation to write a quick x?y:z
|
||||
# conditional expression instead. Not all awks have conditional expressions.
|
||||
#
|
||||
# Note assumptions here that prosrc == $(NF-2), pronargs == $12,
|
||||
# proisstrict == $9, proretset == $10
|
||||
# Note assumptions here that prosrc == $(NF-2), pronargs == $11,
|
||||
# proisstrict == $8, proretset == $9
|
||||
|
||||
$AWK 'BEGIN {
|
||||
Bool["t"] = "true"
|
||||
Bool["f"] = "false"
|
||||
}
|
||||
{ printf (" { %d, \"%s\", %d, %s, %s, %s },\n"), \
|
||||
$1, $(NF-2), $12, Bool[$9], Bool[$10], $(NF-2)
|
||||
$1, $(NF-2), $11, Bool[$8], Bool[$9], $(NF-2)
|
||||
}' $RAWFILE >> "$$-$TABLEFILE"
|
||||
|
||||
if [ $? -ne 0 ]; then
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/adt/Attic/sets.c,v 1.48 2002/07/20 05:16:58 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/adt/Attic/sets.c,v 1.49 2002/07/24 19:11:11 petere Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -65,10 +65,6 @@ SetDefine(char *querystr, Oid elemType)
|
||||
false, /* security invoker */
|
||||
false, /* isStrict (irrelevant, no args) */
|
||||
PROVOLATILE_VOLATILE, /* assume unsafe */
|
||||
100, /* byte_pct */
|
||||
0, /* perbyte_cpu */
|
||||
0, /* percall_cpu */
|
||||
100, /* outin_ratio */
|
||||
0, /* parameterCount */
|
||||
NULL); /* parameterTypes */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user