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:
10
src/backend/utils/cache/relcache.c
vendored
10
src/backend/utils/cache/relcache.c
vendored
@ -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--;
|
||||
|
Reference in New Issue
Block a user