Re: Text comparison suddenly can't find collation?
От
Tom Lane
Тема
Re: Text comparison suddenly can't find collation?
Дата
Msg-id
20263.1326469417@sss.pgh.pa.us
Ответ на
Text comparison suddenly can't find collation? (Johann 'Myrkraverk' Oskarsson)
Список
Дерево обсуждения
Text comparison suddenly can't find collation? "Johann 'Myrkraverk' Oskarsson" <johann@2ndquadrant.com>
Re: Text comparison suddenly can't find collation? Tom Lane <tgl@sss.pgh.pa.us>
"Johann 'Myrkraverk' Oskarsson" writes: > Why would a string comparison work in one case and not another? In > the following example, it works to compare a and b, but not a and d. > This is in a C module which calls > DirectFunctionCall2( text_le, d1, d2 ); As of 9.1, I'd expect that coding to fail every time. text_le needs to be passed a collation, and you aren't doing so. You need to be using DirectFunctionCall2Coll. Where to get the collation from might be an interesting question too, but without more context it's hard to guess what will be appropriate for you. regards, tom lane
В списке pgsql-hackers по дате отправления