1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-05 07:21:24 +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

@ -318,12 +318,10 @@ sql_fn_post_column_ref(ParseState *pstate, ColumnRef *cref, Node *var)
nnames--;
field1 = (Node *) linitial(cref->fields);
Assert(IsA(field1, String));
name1 = strVal(field1);
if (nnames > 1)
{
subfield = (Node *) lsecond(cref->fields);
Assert(IsA(subfield, String));
name2 = strVal(subfield);
}