Re: Some array semantics issues

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Some array semantics issues
Дата
Msg-id 10566.1132173179@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Some array semantics issues  (Greg Stark <gsstark@mit.edu>)
Ответы Re: Some array semantics issues  (Greg Stark <gsstark@mit.edu>)
Список pgsql-hackers
Greg Stark <gsstark@mit.edu> writes:
> Tom Lane <tgl@sss.pgh.pa.us> writes:
>> I could go for a separate operator that has the current behavior
>> (might as well ignore number of dimensions too, if we're going to
>> ignore bounds).  Any thoughts about the operator name?

> Well to me these are two different cases. At least the way I see it {1,2} is a
> list of two numbers, and {{1,2,},{3,4}} is a list of two lists. They aren't
> the same and they don't even contain the same thing.

Well, in that case what do you think about{{1,2},{3,4},{5,6},{7,8}}
vs{{1,2,3,4},{5,6,7,8}}
These have the same physical contents and the same number of dimensions,
so unless you want to consider them equal, you have to consider the
dimension values.

I think what we may be dancing around here is that there are some cases
where it makes sense to ignore the lower bounds, as opposed to the axis
lengths.  I'm not convinced that there are any cases where it makes
sense to compare the number of dimensions without comparing the axis
lengths --- but I can see the argument that lower bounds might be
uninteresting, particularly seeing that array_push and and array_cat
do some not-necessarily-always-right things with them.
        regards, tom lane


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

Предыдущее
От: Bruno Wolff III
Дата:
Сообщение: Re: forcing returned values to be binary
Следующее
От: Yann Michel
Дата:
Сообщение: Re: PG_DUMP and table locking in PG7.4