Content-Length: 288352 | pFad | http://github.com/postgrespro/postgres/commit/6d341407a6e34cd6857cf55ee4757397286542db

6E Push attidentity and attgenerated handling into BuildDescForRelation() · postgrespro/postgres@6d34140 · GitHub
Skip to content

Commit 6d34140

Browse files
committed
Push attidentity and attgenerated handling into BuildDescForRelation()
Previously, this was handled by the callers separately, but it can be trivially moved into BuildDescForRelation() so that it is handled in a central place. 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 e29c464 commit 6d34140

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/backend/access/common/tupdesc.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -856,6 +856,8 @@ BuildDescForRelation(const List *columns)
856856
has_not_null |= entry->is_not_null;
857857
att->attislocal = entry->is_local;
858858
att->attinhcount = entry->inhcount;
859+
att->attidentity = entry->identity;
860+
att->attgenerated = entry->generated;
859861
}
860862

861863
if (has_not_null)

src/backend/commands/tablecmds.c

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

944-
attr->attidentity = colDef->identity;
945-
attr->attgenerated = colDef->generated;
946944
attr->attcompression = GetAttributeCompression(attr->atttypid, colDef->compression);
947945
if (colDef->storage_name)
948946
attr->attstorage = GetAttributeStorage(attr->atttypid, colDef->storage_name);

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/6d341407a6e34cd6857cf55ee4757397286542db

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy