mirror of
https://github.com/postgres/postgres.git
synced 2025-04-25 21:42:33 +03:00
Fix bug in record_image_ops on big endian machines.
The buildfarm pointed out the problem. Fix based on suggestion by Robert Haas.
This commit is contained in:
parent
4d212bac17
commit
15e46fd1dd
@ -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
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user