Skip to content

Commit 6114040

Browse files
committed
Small code simplifications
strVal() can be used in a couple of places instead of coding the same thing by hand.
1 parent 25a9e54 commit 6114040

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/backend/foreign/foreign.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -544,7 +544,7 @@ deflist_to_tuplestore(ReturnSetInfo *rsinfo, List *options)
544544
nulls[0] = false;
545545
if (def->arg)
546546
{
547-
values[1] = CStringGetTextDatum(((Value *) (def->arg))->val.str);
547+
values[1] = CStringGetTextDatum(strVal(def->arg));
548548
nulls[1] = false;
549549
}
550550
else

src/backend/parser/gram.y

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13890,7 +13890,7 @@ func_expr_common_subexpr:
1389013890
* Convert SystemTypeName() to SystemFuncName() even though
1389113891
* at the moment they result in the same thing.
1389213892
*/
13893-
$$ = (Node *) makeFuncCall(SystemFuncName(((Value *) llast($5->names))->val.str),
13893+
$$ = (Node *) makeFuncCall(SystemFuncName(strVal(llast($5->names))),
1389413894
list_make1($3),
1389513895
COERCE_EXPLICIT_CALL,
1389613896
@1);

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy