mirror of
https://github.com/postgres/postgres.git
synced 2025-08-24 09:27:52 +03:00
Remove useless assertions
We don't need Assert(IsA(foo, String)) right before running strVal(foo), since strVal() already does the assertion internally (via castNode()).
This commit is contained in:
@@ -8271,7 +8271,6 @@ ATExecSetStorage(Relation rel, const char *colName, Node *newValue, LOCKMODE loc
|
||||
AttrNumber attnum;
|
||||
ObjectAddress address;
|
||||
|
||||
Assert(IsA(newValue, String));
|
||||
storagemode = strVal(newValue);
|
||||
|
||||
if (pg_strcasecmp(storagemode, "plain") == 0)
|
||||
@@ -16171,7 +16170,6 @@ ATExecSetCompression(AlteredTableInfo *tab,
|
||||
char cmethod;
|
||||
ObjectAddress address;
|
||||
|
||||
Assert(IsA(newValue, String));
|
||||
compression = strVal(newValue);
|
||||
|
||||
attrel = table_open(AttributeRelationId, RowExclusiveLock);
|
||||
|
@@ -3577,7 +3577,6 @@ replace_domain_constraint_value(ParseState *pstate, ColumnRef *cref)
|
||||
Node *field1 = (Node *) linitial(cref->fields);
|
||||
char *colname;
|
||||
|
||||
Assert(IsA(field1, String));
|
||||
colname = strVal(field1);
|
||||
if (strcmp(colname, "value") == 0)
|
||||
{
|
||||
|
Reference in New Issue
Block a user