diff options
author | Alvaro Herrera <alvherre@alvh.no-ip.org> | 2022-09-14 15:36:21 +0200 |
---|---|---|
committer | Alvaro Herrera <alvherre@alvh.no-ip.org> | 2022-09-14 15:36:21 +0200 |
commit | 3fd1f4b9cd1e374e76e23dd37dfd6ab03b6ef935 (patch) | |
tree | c1c4952381cd5459272899495b080d0fb1e40772 /src/backend/parser | |
parent | 9320cfdd06e5975b7bf60ab4c3d03195bf3fb5ff (diff) | |
download | postgresql-3fd1f4b9cd1e374e76e23dd37dfd6ab03b6ef935.tar.gz |
Remove duplicate initialization
This appears to be a merge mistake in 96ef3237bf74. We could put it
back the way it was before JSON_TABLE and it'd be two lines shorter, but
it's likely that JSON_TABLE will be back and will prefer things this
way. It makes no other difference in practice.
Backpatch to 15.
Reported by Ranier Vilela
Discussion: https://postgr.es/m/CAEudQAr4nOcNQskC4oBEZN4S+4heJ=1ch_ZKOxU+_Ef-FQSf-g@mail.gmail.com
Diffstat (limited to 'src/backend/parser')
-rw-r--r-- | src/backend/parser/parse_relation.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/backend/parser/parse_relation.c b/src/backend/parser/parse_relation.c index f44937a8bb..81f9ae2f02 100644 --- a/src/backend/parser/parse_relation.c +++ b/src/backend/parser/parse_relation.c @@ -2017,7 +2017,7 @@ addRangeTableEntryForTableFunc(ParseState *pstate, bool inFromCl) { RangeTblEntry *rte = makeNode(RangeTblEntry); - char *refname = alias ? alias->aliasname : pstrdup("xmltable"); + char *refname; Alias *eref; int numaliases; @@ -2035,7 +2035,7 @@ addRangeTableEntryForTableFunc(ParseState *pstate, Assert(list_length(tf->coltypmods) == list_length(tf->colnames)); Assert(list_length(tf->colcollations) == list_length(tf->colnames)); - refname = alias ? alias->aliasname : pstrdup("xmltable"); + refname = alias ? alias->aliasname : pstrdup("xmltable"); rte->rtekind = RTE_TABLEFUNC; rte->relid = InvalidOid; |