1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-05 07:21:24 +03:00

Cosmetic improvements for faster column addition.

Changed the name of few structure members for the sake of clarity and
removed spurious whitespace.

Reported-by: Amit Kapila
Author: Amit Kapila, based on suggestion by Andrew Dunstan
Reviewed-by: Alvaro Herrera
Discussion: https://postgr.es/m/CAA4eK1K2znsFpC+NQ9A4vxT4uDxADN4RmvHX0L6Y=aHVo9gB4Q@mail.gmail.com
This commit is contained in:
Amit Kapila
2018-06-27 08:16:13 +05:30
parent f49a80c481
commit 8121ab88e7
4 changed files with 26 additions and 28 deletions

View File

@ -614,18 +614,18 @@ RelationBuildTupleDesc(Relation relation)
if (attp->attbyval)
{
/* for copy by val just copy the datum direct */
attrmiss[attnum - 1].ammissing = missval;
attrmiss[attnum - 1].am_value = missval;
}
else
{
/* otherwise copy in the correct context */
oldcxt = MemoryContextSwitchTo(CacheMemoryContext);
attrmiss[attnum - 1].ammissing = datumCopy(missval,
attp->attbyval,
attp->attlen);
attrmiss[attnum - 1].am_value = datumCopy(missval,
attp->attbyval,
attp->attlen);
MemoryContextSwitchTo(oldcxt);
}
attrmiss[attnum - 1].ammissingPresent = true;
attrmiss[attnum - 1].am_present = true;
}
}
need--;