Reduce variable scope and possibly useless palloc
authorDavid Rowley <drowley@postgresql.org>
Tue, 29 Oct 2024 12:38:42 +0000 (01:38 +1300)
committerDavid Rowley <drowley@postgresql.org>
Tue, 29 Oct 2024 12:38:42 +0000 (01:38 +1300)
commitfcbd1bb6613fde5784b54c88e4d0398ab8e13694
tree39ad8010932c2ed531c49eeec1ab1e7abf0f6969
parent84b8fccbe5c21cc2a05f8cf91903cadc6ebfe680
Reduce variable scope and possibly useless palloc

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