Re: Using textin/textout vs. scribbling around

Поиск
Список
Период
Сортировка
От Brook Milligan
Тема Re: Using textin/textout vs. scribbling around
Дата
Msg-id 200108151554.JAA21247@biology.nmsu.edu
обсуждение исходный текст
Ответ на Using textin/textout vs. scribbling around  (Peter Eisentraut <peter_e@gmx.net>)
Ответы Re: Using textin/textout vs. scribbling around  (Bruce Momjian <pgman@candle.pha.pa.us>)
Список pgsql-hackers
I am tempted to replace all attempts to build text data on your own (with  VARDATA, VARHDRSZ, etc.) with proper
callsto textin/textout in all places  that can't claim to be truly internal (especially all contrib).  The  background
isthat the internal format might change sometime when more  locale features are implemented (see recent idea).  Is this
agood idea?
 

I would be in favor of this for the following reasons.  One of the
great advantages of PostgreSQL is that adding new types is relatively
straightforward.  In many cases new types could be coded largely in
terms of preexisting types.  An example I am facing currently involves
the problem of constructing basically a TEXT type with rather unusual
parsing and output semantics.  If a reasonably well-encapsulated
version of the TEXT type existed--including header files with the
right granularity and with the right functions provided in an
installed library--the natural means of providing the new type we need
would be to simply define a type with different *in/*out functions
implemented over an instance of the TEXT internal data
representation.

Peter's suggestion appears to be a natural step towards the goal of
being able to provide a defined interface that could be used for
extensions.  The concern that the _external_ format might change seems
counter to the effort of providing a stable platform for extending
PostgreSQL.  If there is a serious possibility that this might occur,
and because of that we cannot provide any external interface to the
predefined types, then the well-known advantages of composing software
modules from well-defined and well-tested components will be largely
lost for anyone wishing to rapidly extend the system.

Cheers,
Brook


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

Предыдущее
От: Brook Milligan
Дата:
Сообщение: Re: [PATCHES] Re: PostGIS spatial extensions
Следующее
От: "Nicolas Verger"
Дата:
Сообщение: RE: Select parser at runtime ....