Re: MULTISET and additional functions for ARRAY

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: MULTISET and additional functions for ARRAY
Дата
Msg-id AANLkTimsNb0RhnbRJa3ErPYf5dOc9rCbCkQtAhqjG9QB@mail.gmail.com
обсуждение исходный текст
Ответ на Re: MULTISET and additional functions for ARRAY  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: MULTISET and additional functions for ARRAY  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: MULTISET and additional functions for ARRAY  (David Fetter <david@fetter.org>)
Список pgsql-hackers
On Fri, Nov 12, 2010 at 12:21 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Robert Haas <robertmhaas@gmail.com> writes:
>> On Thu, Nov 11, 2010 at 10:02 AM, Itagaki Takahiro
>> <itagaki.takahiro@gmail.com> wrote:
>>> If we reuse type IDs of arrays for multisets, the multisets would
>>> have some special typmod. For example, typmod = 0 means multiset,
>>> and positive value means array with max cardinality. Note that
>>> the SQL standard doesn't mention about multi-dimensional arrays.
>>> So, we can use typmod = -1 as a free-size and free-dimensional
>>> array for backward compatibility.
>
>> I would really like to see us fix our type system so that it doesn't
>> require this type of awful hack.  But maybe that's asking too much of
>> a patch to implement this feature.
>
> The problem is not with the type system: as long as you give multisets
> different type OIDs from arrays, everything will work fine.  It will
> absolutely not work to try to use typmod to make the behavior vary
> like that ... but Itagaki-san knew that already.

And thus you must create a THIRD copy of every entry in pg_type.  That
doesn't qualify as a problem?

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: MULTISET and additional functions for ARRAY
Следующее
От: Magnus Hagander
Дата:
Сообщение: Re: Re: [BUGS] BUG #5650: Postgres service showing as stopped when in fact it is running