1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-28 23:42:10 +03:00

Clean up a few places where Datums were being treated as pointers (and vice

versa) without going through DatumGetPointer.

Gavin Sherry, with Feng Tian.
This commit is contained in:
Alvaro Herrera
2008-04-17 21:37:28 +00:00
parent 25e46a504b
commit 2f0f7b4bce
7 changed files with 56 additions and 54 deletions

View File

@ -57,7 +57,7 @@
*
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/access/common/heaptuple.c,v 1.120 2008/01/01 19:45:45 momjian Exp $
* $PostgreSQL: pgsql/src/backend/access/common/heaptuple.c,v 1.121 2008/04/17 21:37:28 alvherre Exp $
*
*-------------------------------------------------------------------------
*/
@ -890,7 +890,7 @@ heap_form_tuple(TupleDesc tupleDescriptor,
else if (att[i]->attlen == -1 &&
att[i]->attalign == 'd' &&
att[i]->attndims == 0 &&
!VARATT_IS_EXTENDED(values[i]))
!VARATT_IS_EXTENDED(DatumGetPointer(values[i])))
{
values[i] = toast_flatten_tuple_attribute(values[i],
att[i]->atttypid,
@ -1001,7 +1001,7 @@ heap_formtuple(TupleDesc tupleDescriptor,
else if (att[i]->attlen == -1 &&
att[i]->attalign == 'd' &&
att[i]->attndims == 0 &&
!VARATT_IS_EXTENDED(values[i]))
!VARATT_IS_EXTENDED(DatumGetPointer(values[i])))
{
values[i] = toast_flatten_tuple_attribute(values[i],
att[i]->atttypid,