1
0
mirror of https://github.com/postgres/postgres.git synced 2025-08-15 14:02:29 +03:00

Use the new castNode() macro in a number of places.

This is far from a pervasive conversion, but it's a good starting
point.

Author: Peter Eisentraut, with some minor changes by me
Reviewed-By: Tom Lane
Discussion: https://postgr.es/m/c5d387d9-3440-f5e0-f9d4-71d53b9fbe52@2ndquadrant.com
This commit is contained in:
Andres Freund
2017-01-26 16:47:03 -08:00
parent 5bcab11142
commit 9ba8a9ce45
32 changed files with 77 additions and 131 deletions

View File

@@ -578,9 +578,8 @@ update_proconfig_value(ArrayType *a, List *set_items)
foreach(l, set_items)
{
VariableSetStmt *sstmt = (VariableSetStmt *) lfirst(l);
VariableSetStmt *sstmt = castNode(VariableSetStmt, lfirst(l));
Assert(IsA(sstmt, VariableSetStmt));
if (sstmt->kind == VAR_RESET_ALL)
a = NULL;
else
@@ -971,9 +970,7 @@ CreateFunction(ParseState *pstate, CreateFunctionStmt *stmt)
{
ListCell *lc;
Assert(IsA(transformDefElem, List));
foreach(lc, (List *) transformDefElem)
foreach(lc, castNode(List, transformDefElem))
{
Oid typeid = typenameTypeId(NULL, lfirst(lc));
Oid elt = get_base_element_type(typeid);