Re: Some array semantics issues

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Some array semantics issues
Дата
Msg-id 11013.1132176172@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Some array semantics issues  (David Fetter <david@fetter.org>)
Список pgsql-hackers
David Fetter <david@fetter.org> writes:
> On Wed, Nov 16, 2005 at 03:03:53PM -0500, Greg Stark wrote:
>> It occurs to me that it would also make sense to have an operator
>> that considered the arrays in an order-insensitive comparison. 

> That sounds more like the SQL:2003 MULTISET, which is essentially
> unordered.  Any plans for these?

Seems to me it would be really expensive to try to make such a
comparison directly with the present array representation.  The
only sensible way to do it would be to sort the elements of the
two arrays (using the comparison operator of the element data type)
and then compare the results.  So you don't actually need a variant
equality operator, you just need a generic array_sort() function,
and then go "array_sort(x) = array_sort(y)".  Such a function might
have other uses besides this, too.
        regards, tom lane


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

Предыдущее
От: David Fetter
Дата:
Сообщение: Re: Some array semantics issues
Следующее
От: Dave Cramer
Дата:
Сообщение: PANIC: could not locate a valid checkpoint record