Kevin Grittner <kgri...@postgresql.org> wrote:
> Add record_image_ops opclass for matview concurrent refresh.
The buildfarm pointed out that I had not handled pass-by-value data
types correctly. Fixed based on advice from Robert. We'll see
whether that clears up the part of the buildfarm breakage
attributed to this patch.
--
Kevin Grittner
EDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
diff --git a/src/backend/utils/adt/rowtypes.c b/src/backend/utils/adt/rowtypes.c
index 0bcbb5d..7925ce2 100644
--- a/src/backend/utils/adt/rowtypes.c
+++ b/src/backend/utils/adt/rowtypes.c
@@ -1464,9 +1464,8 @@ record_image_cmp(PG_FUNCTION_ARGS)
}
else if (tupdesc1->attrs[i1]->attbyval)
{
- cmpresult = memcmp(&(values1[i1]),
- &(values2[i2]),
- tupdesc1->attrs[i1]->attlen);
+ if (values1[i1] != values2[i2])
+ cmpresult = (values1[i1] < values2[i2]) ? -1 : 1;
}
else
{
@@ -1695,9 +1694,7 @@ record_image_eq(PG_FUNCTION_ARGS)
}
else if (tupdesc1->attrs[i1]->attbyval)
{
- result = (memcmp(&(values1[i1]),
- &(values2[i2]),
- tupdesc1->attrs[i1]->attlen) == 0);
+ result = (values1[i1] == values2[i2]);
}
else
{
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers