Location via proxy:
[ UP ]
[Report a bug]
[Manage cookies]
No cookies
No scripts
No ads
No referrer
Show this form
projects
/
postgresql.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
84b8fcc
)
Reduce variable scope and possibly useless palloc
author
David Rowley
<drowley@postgresql.org>
Tue, 29 Oct 2024 12:38:42 +0000
(
01:38
+1300)
committer
David Rowley
<drowley@postgresql.org>
Tue, 29 Oct 2024 12:38:42 +0000
(
01:38
+1300)
Move the CreateStmt down to the branch that it's used in, thus
preventing the makeNode() call in cases where the CreateStmt isn't used.
Author: Ranier Vilela <ranier.vf@gmail.com>
Discussion: https://postgr.es/m/CAEudQAq=06YPWPhS+yyTbCwv5JLKRz8rm3dWx6JR5Uj_d_fQDA@mail.gmail.com
src/backend/commands/view.c
patch
|
blob
|
blame
|
history
diff --git
a/src/backend/commands/view.c
b/src/backend/commands/view.c
index fdad83383245f079a56fefba1cdcfbc4393f09dd..2bd49eb55e614b9f93be3410c25bb1d0b7a7c16e 100644
(file)
--- a/
src/backend/commands/view.c
+++ b/
src/backend/commands/view.c
@@
-47,7
+47,6
@@
DefineVirtualRelation(RangeVar *relation, List *tlist, bool replace,
{
Oid viewOid;
LOCKMODE lockmode;
- CreateStmt *createStmt = makeNode(CreateStmt);
List *attrList;
ListCell *t;
@@
-223,6
+222,7
@@
DefineVirtualRelation(RangeVar *relation, List *tlist, bool replace,
}
else
{
+ CreateStmt *createStmt = makeNode(CreateStmt);
ObjectAddress address;
/*