Re: Does Type Have = Operator?

Поиск
Список
Период
Сортировка
От Kevin Grittner
Тема Re: Does Type Have = Operator?
Дата
Msg-id CACjxUsNes20eBJ10yiU7yoBruvJEArzTacidPXijyA-V-Zt7GA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Does Type Have = Operator?  ("David E. Wheeler" <david@justatheory.com>)
Ответы Re: Does Type Have = Operator?  ("David E. Wheeler" <david@justatheory.com>)
Список pgsql-hackers
On Wed, May 11, 2016 at 12:23 PM, David E. Wheeler
<david@justatheory.com> wrote:

> Oh, well crap. Maybe I’d be better off just comparing the plain
> text of the expressions as Tom suggested.

At the other extreme are the row comparison operators that only
consider values equal if they have the same storage value.  See the
last paragraph of:

http://www.postgresql.org/docs/9.5/static/functions-comparisons.html#COMPOSITE-TYPE-COMPARISON

| To support matching of rows which include elements without a
| default B-tree operator class, the following operators are
| defined for composite type comparison: *=, *<>, *<, *<=, *>, and
| *>=. These operators compare the internal binary representation
| of the two rows. Two rows might have a different binary
| representation even though comparisons of the two rows with the
| equality operator is true. The ordering of rows under these
| comparison operators is deterministic but not otherwise
| meaningful. These operators are used internally for materialized
| views and might be useful for other specialized purposes such as
| replication but are not intended to be generally useful for
| writing queries.

I'm not clear enough on your intended usage to know whether these
operators are a good fit, but they are sitting there waiting to be
used if they do fit.

--
Kevin Grittner
EDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



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

Предыдущее
От: Shawn
Дата:
Сообщение: Re: Need help debugging why autovacuum seems "stuck" -- until I use superuser to vacuum freeze pg_database
Следующее
От: Robert Haas
Дата:
Сообщение: Re: parallel.c is not marked as test covered