Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 66f0cf7

Browse files
committed
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 1575fbc. Also clean up the now unnecessary casts that used to cast away the const.
1 parent ac086d4 commit 66f0cf7

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

src/backend/commands/typecmds.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1980,7 +1980,7 @@ AssignTypeArrayOid(void)
19801980
*-------------------------------------------------------------------
19811981
*/
19821982
Oid
1983-
DefineCompositeType(const RangeVar *typevar, List *coldeflist)
1983+
DefineCompositeType(RangeVar *typevar, List *coldeflist)
19841984
{
19851985
CreateStmt *createStmt = makeNode(CreateStmt);
19861986
Oid old_type_oid;
@@ -1991,7 +1991,7 @@ DefineCompositeType(const RangeVar *typevar, List *coldeflist)
19911991
* now set the parameters for keys/inheritance etc. All of these are
19921992
* uninteresting for composite types...
19931993
*/
1994-
createStmt->relation = (RangeVar *) typevar;
1994+
createStmt->relation = typevar;
19951995
createStmt->tableElts = coldeflist;
19961996
createStmt->inhRelations = NIL;
19971997
createStmt->constraints = NIL;

src/backend/commands/view.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ DefineVirtualRelation(RangeVar *relation, List *tlist, bool replace,
254254
* now set the parameters for keys/inheritance etc. All of these are
255255
* uninteresting for views...
256256
*/
257-
createStmt->relation = (RangeVar *) relation;
257+
createStmt->relation = relation;
258258
createStmt->tableElts = attrList;
259259
createStmt->inhRelations = NIL;
260260
createStmt->constraints = NIL;

src/include/commands/typecmds.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ extern void DefineDomain(CreateDomainStmt *stmt);
2525
extern void DefineEnum(CreateEnumStmt *stmt);
2626
extern void DefineRange(CreateRangeStmt *stmt);
2727
extern void AlterEnum(AlterEnumStmt *stmt);
28-
extern Oid DefineCompositeType(const RangeVar *typevar, List *coldeflist);
28+
extern Oid DefineCompositeType(RangeVar *typevar, List *coldeflist);
2929
extern Oid AssignTypeArrayOid(void);
3030

3131
extern void AlterDomainDefault(List *names, Node *defaultRaw);

0 commit comments

Comments
 (0)