Re: 8.3 PLpgSQL Can't Compare Records?

Поиск
Список
Период
Сортировка
От David E. Wheeler
Тема Re: 8.3 PLpgSQL Can't Compare Records?
Дата
Msg-id 95EEDB4E-CAB0-43DB-A4C0-DA41D388D9F0@kineticode.com
обсуждение исходный текст
Ответ на Re: 8.3 PLpgSQL Can't Compare Records?  (Merlin Moncure <mmoncure@gmail.com>)
Список pgsql-hackers
On Jul 1, 2009, at 11:47 AM, Merlin Moncure wrote:

>> fyi: works in 8.4, as part of a broad fix of composite type  
>> comparison ops
>
> whoops, you knew that already :-).  one possible workaround is:
>
> select $1::text is distinct from $2::text

Yes, and that's what I'm doing, although it is significantly less  
precise, in that:

* Columns with different types may successfully compare (e.g., NULL  
and '')
* No (easy) way to tell if two records have different numbers of columns

But it's good enough for 8.3 if there is no other workaround.

Thanks,

David


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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: 8.5 development schedule
Следующее
От: Lorraine Mancuso
Дата:
Сообщение: resetxlog bug