Commit 66f0cf7d authored by Peter Eisentraut's avatar Peter Eisentraut

Remove useless const qualifier

Claiming that the typevar argument to DefineCompositeType() is const
was a plain lie.  A similar case in DefineVirtualRelation() was
already changed in passing in commit 1575fbcb.  Also clean up the now
unnecessary casts that used to cast away the const.
parent ac086d46
...@@ -1980,7 +1980,7 @@ AssignTypeArrayOid(void) ...@@ -1980,7 +1980,7 @@ AssignTypeArrayOid(void)
*------------------------------------------------------------------- *-------------------------------------------------------------------
*/ */
Oid Oid
DefineCompositeType(const RangeVar *typevar, List *coldeflist) DefineCompositeType(RangeVar *typevar, List *coldeflist)
{ {
CreateStmt *createStmt = makeNode(CreateStmt); CreateStmt *createStmt = makeNode(CreateStmt);
Oid old_type_oid; Oid old_type_oid;
...@@ -1991,7 +1991,7 @@ DefineCompositeType(const RangeVar *typevar, List *coldeflist) ...@@ -1991,7 +1991,7 @@ DefineCompositeType(const RangeVar *typevar, List *coldeflist)
* now set the parameters for keys/inheritance etc. All of these are * now set the parameters for keys/inheritance etc. All of these are
* uninteresting for composite types... * uninteresting for composite types...
*/ */
createStmt->relation = (RangeVar *) typevar; createStmt->relation = typevar;
createStmt->tableElts = coldeflist; createStmt->tableElts = coldeflist;
createStmt->inhRelations = NIL; createStmt->inhRelations = NIL;
createStmt->constraints = NIL; createStmt->constraints = NIL;
......
...@@ -254,7 +254,7 @@ DefineVirtualRelation(RangeVar *relation, List *tlist, bool replace, ...@@ -254,7 +254,7 @@ DefineVirtualRelation(RangeVar *relation, List *tlist, bool replace,
* now set the parameters for keys/inheritance etc. All of these are * now set the parameters for keys/inheritance etc. All of these are
* uninteresting for views... * uninteresting for views...
*/ */
createStmt->relation = (RangeVar *) relation; createStmt->relation = relation;
createStmt->tableElts = attrList; createStmt->tableElts = attrList;
createStmt->inhRelations = NIL; createStmt->inhRelations = NIL;
createStmt->constraints = NIL; createStmt->constraints = NIL;
......
...@@ -25,7 +25,7 @@ extern void DefineDomain(CreateDomainStmt *stmt); ...@@ -25,7 +25,7 @@ extern void DefineDomain(CreateDomainStmt *stmt);
extern void DefineEnum(CreateEnumStmt *stmt); extern void DefineEnum(CreateEnumStmt *stmt);
extern void DefineRange(CreateRangeStmt *stmt); extern void DefineRange(CreateRangeStmt *stmt);
extern void AlterEnum(AlterEnumStmt *stmt); extern void AlterEnum(AlterEnumStmt *stmt);
extern Oid DefineCompositeType(const RangeVar *typevar, List *coldeflist); extern Oid DefineCompositeType(RangeVar *typevar, List *coldeflist);
extern Oid AssignTypeArrayOid(void); extern Oid AssignTypeArrayOid(void);
extern void AlterDomainDefault(List *names, Node *defaultRaw); extern void AlterDomainDefault(List *names, Node *defaultRaw);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment