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 20050901155920.GF28062@svana.org
обсуждение исходный текст
Ответ на Re: On hardcoded type aliases and typmod for user types  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: On hardcoded type aliases and typmod for user types  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Thu, Sep 01, 2005 at 08:50:27AM -0400, Tom Lane wrote:
> Martijn van Oosterhout <kleptog@svana.org> writes:
> > Simply pass the (Node*) from the parser and let the function sort it
> > out itself. Except now they have to be written in C. Is this
> > unreasonable,
>
> Nope.  You're not going to be writing any interesting datatypes without
> using C, anyway.  I'd go with this one to minimize flexibility problems.

Ack

> I'd be inclined to stick with the convention that internally typmod is
> a single int32; that is really wired into way too many APIs to consider
> changing.  varchar could do something like using 24 bits for the length
> and 8 bits for an encoded indication of the charset.

With the unfortunate effect that strings are limited to 16Mb instead of
1Gb. Not sure if people will be happy with that one. For my locale
experiments I used my taggedtypes module to embed the locale into the
data itself, I imagine something similar could be used.

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 по дате отправления:

Предыдущее
От: "Merlin Moncure"
Дата:
Сообщение: Re: Call for 7.5 feature completion
Следующее
От: Tom Lane
Дата:
Сообщение: Re: TODO item: set proper permissions on non-system schemas