Re: record identical operator
От | Andres Freund |
---|---|
Тема | Re: record identical operator |
Дата | |
Msg-id | 20130916180542.GH5249@awork2.anarazel.de обсуждение исходный текст |
Ответ на | Re: record identical operator (Kevin Grittner <kgrittn@ymail.com>) |
Ответы |
Re: record identical operator
|
Список | pgsql-hackers |
On 2013-09-16 10:58:01 -0700, Kevin Grittner wrote: > Andres Freund <andres@2ndquadrant.com> wrote: > > On 2013-09-16 10:46:53 -0700, Kevin Grittner wrote: > >> I don't recall seeing anyone posting > >> regarding the existing undocumented record comparison operators. > >> Nor do I recall seeing anyone posting about the undocumented > >> pattern comparison operators. > > > > I've used and have seen them being used in client code... > > Which, the record operators or the text pattern operators (which > ignore collations and multi-byte character considerations and just > use memcmp())? I was referring to the text pattern ops. But I've seen the record ones as well. > http://git.postgresql.org/gitweb/?p=postgresql.git;a=blob;f=src/backend/utils/adt/varlena.c;h=5e2c2ddc532c604a05f365f0cf6761033a35be76;hb=master#l1719 > > Is the fact that you have seen them used in client code even though > they are not documented an argument for or against adding > documentation for them? Neither. It's an argument that providing operators with confusing behaviours will not go unnoticed/unused. I don't really think the record identical and pattern ops situations are comparable. The latter has a well defined behaviour (using the C locale basically) and is only useable for types where it's well defined. The proposed identical operator returns false for comparisons of actually equal data, that's quite different imo. Greetings, Andres Freund -- Andres Freund http://www.2ndQuadrant.com/PostgreSQL Development, 24x7 Support, Training & Services
В списке pgsql-hackers по дате отправления: