Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 6d34140

Browse filesBrowse 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
Copy full SHA for 6d34140

File tree

Expand file treeCollapse file tree

2 files changed

+2
-2
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+2
-2
lines changed

‎src/backend/access/common/tupdesc.c

Copy file name to clipboardExpand all lines: src/backend/access/common/tupdesc.c
+2Lines 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

Copy file name to clipboardExpand all lines: src/backend/commands/tablecmds.c
-2Lines 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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.