BUG #4647: Geometric functions reorder their parameters randomly

Поиск
Список
Период
Сортировка
От Juho Saarikko
Тема BUG #4647: Geometric functions reorder their parameters randomly
Дата
Msg-id 200902120751.n1C7pB44026081@wwwmaster.postgresql.org
обсуждение исходный текст
Ответы Re: BUG #4647: Geometric functions reorder their parameters randomly
Список pgsql-bugs
The following bug has been logged online:

Bug reference:      4647
Logged by:          Juho Saarikko
Email address:      juho.saarikko@gmail.com
PostgreSQL version: 8.3.6
Operating system:   Linux
Description:        Geometric functions reorder their parameters randomly
Details:

According to the online documentation, the ## operator is supposed to return
"Closest point to first operand on second operand". However, in reality it
seems to decide reorder its parameters as a function of them. That is,
sometimes it returns a point on the first operand, and sometimes a point on
the second operand, depending on what those operands are, but seemingly
consistently for a given set of operands.

This behaviour is also present in 8.3.5.


PostgreSQL output (from psql) demonstrating this behaviour:
**************************************

test=# select lseg '((1,1),(1,0))' ## box '((-2,-2),(-4,-4))';
 ?column?
----------
 (1,0)
(1 row)

test=# select lseg '((0,1),(1,0))' ## box '((-2,-2),(-4,-4))';
 ?column?
----------
 (-2,-2)
(1 row)

В списке pgsql-bugs по дате отправления:

Предыдущее
От: "Jason"
Дата:
Сообщение: BUG #4646: Default password is patently absurd
Следующее
От: Swadesh
Дата:
Сообщение: BackUp Problem : PG_graph table - Access Error