Re: On hardcoded type aliases and typmod for user types

Поиск
Список
Период
Сортировка
От Martijn van Oosterhout
Тема Re: On hardcoded type aliases and typmod for user types
Дата
Msg-id 20050901093336.GB28062@svana.org
обсуждение исходный текст
Ответ на Re: On hardcoded type aliases and typmod for user types  (Dennis Bjorklund <db@zigo.dhs.org>)
Список pgsql-hackers
On Thu, Sep 01, 2005 at 11:18:04AM +0200, Dennis Bjorklund wrote:
> String types have 3 modifiers, the length, the charset and the collation.
> The syntax of these are defined by the standard so at least that syntax
> ought to be allowed (even if there are more work to actually do anything
> with charset and collation info).

From a quick browse in google it looks like:
  CHAR(4) COLLATE xxx CHARACTER SET yyy

is valid syntax. So I guess that becomes 0 or more modifiers. And a
single int32 is not going to cut it.

More fields (typmod2, typmod3)? Fields explicitly for this purpose
(typcollate and typcharset), array of int32?

Which would make the second argument to the typmod function ARRAY OF
(textpair) or some such. If the function doesn't accept that then this
is a quick indicator that no options are allowed.

Quick thing, should 'mytype' and 'mytype()' be considered the same and
should they default to typmod -1? Currently '()' is not even accepted.

Have a nice day,
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a
> tool for doing 5% of the work and then sitting around waiting for someone
> else to do the other 95% so you can sue them.

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

Предыдущее
От: Simon Riggs
Дата:
Сообщение: Re: Minimally avoiding Transaction Wraparound in VLDBs
Следующее
От: Martijn van Oosterhout
Дата:
Сообщение: Re: On hardcoded type aliases and typmod for user types