1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-03 20:02:46 +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:
Peter Eisentraut
2022-07-13 11:40:00 +02:00
parent 7057bf2354
commit 503e3833ef
5 changed files with 0 additions and 21 deletions

View File

@ -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);