[BUGS] BUG #14546: "point" type does not work with "IS DISTINCT"

Поиск
Список
Период
Сортировка
От kcwitt@gmail.com
Тема [BUGS] BUG #14546: "point" type does not work with "IS DISTINCT"
Дата
Msg-id 20170215091408.6099.42167@wrigleys.postgresql.org
обсуждение исходный текст
Ответы Re: [BUGS] BUG #14546: "point" type does not work with "IS DISTINCT"  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-bugs
The following bug has been logged on the website:

Bug reference:      14546
Logged by:          Casey Witt
Email address:      kcwitt@gmail.com
PostgreSQL version: 9.6.1
Operating system:   N/A
Description:

The point type is a built-in type, yet does not work with the "IS DISTINCT"
clause and throws the error "42883: operator does not exist: point =
point".

This means that generated SQL template code such as the following does not
work:
UPDATE dcc.tbl_document_coordinates SET lower_left=@newValue WHERE
(lower_left IS NOT DISTINCT FROM @oldValue OR lower_left IS NOT DISTINCT
FROM @newValue) AND id=@primary_key;

The point of the above statement is to update the "lower_left" point unless
somebody has changed it already (IS NOT DISTINCT FROM @original_value) or
somebody else has already changed it to the desired new value (IS NOT
DISTINCT FROM @new_value).

To update this single statement is easy, but the issue is that this
statement is generated automatically by a function and includes all fields
that have changed.

Whatever issue there is with comparing points should be dealt with in
postgres and not pushed to client applications.

Conceptually, there should not be any difference between updating/comparing
an int4 and a point (considering that they are both built-in types).

This is a bug because
https://www.postgresql.org/docs/9.0/static/functions-comparison.html states
that  "Comparison operators are available for all relevant data types."


--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs

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

Предыдущее
От: "David G. Johnston"
Дата:
Сообщение: Re: [BUGS] BUG #14545: Unable to retrieve parameter mode 'VARIADIC'
Следующее
От: Stuart Bishop
Дата:
Сообщение: [BUGS] pg_rewind fails after failover, 'invalid record length'