Content-Length: 265749 | pFad | http://github.com/postgrespro/postgres/commit/689c66a84bb75e08462c05ffc18514895b19d48e

BF Remove useless if condition · postgrespro/postgres@689c66a · GitHub
Skip to content

Commit 689c66a

Browse files
committed
Remove useless if condition
This is useless because these fields are not set anywhere before, so we can assign them unconditionally. This also makes this more consistent with ATExecAddColumn(). Reviewed-by: Alvaro Herrera <alvherre@alvh.no-ip.org> Discussion: https://www.postgresql.org/message-id/flat/52a125e4-ff9a-95f5-9f61-b87cf447e4da@eisentraut.org
1 parent 1fa9241 commit 689c66a

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

src/backend/commands/tablecmds.c

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -942,11 +942,8 @@ DefineRelation(CreateStmt *stmt, char relkind, Oid ownerId,
942942
attr->atthasdef = true;
943943
}
944944

945-
if (colDef->identity)
946-
attr->attidentity = colDef->identity;
947-
948-
if (colDef->generated)
949-
attr->attgenerated = colDef->generated;
945+
attr->attidentity = colDef->identity;
946+
attr->attgenerated = colDef->generated;
950947

951948
if (colDef->compression)
952949
attr->attcompression = GetAttributeCompression(attr->atttypid,

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/postgrespro/postgres/commit/689c66a84bb75e08462c05ffc18514895b19d48e

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy