Re: [DOCS] Re: FE/BE protocol revision patch

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: [DOCS] Re: FE/BE protocol revision patch
Дата
Msg-id 199805200154.VAA02090@candle.pha.pa.us
обсуждение исходный текст
Ответ на Re: [DOCS] Re: FE/BE protocol revision patch  ("Thomas G. Lockhart" <lockhart@alumni.caltech.edu>)
Список pgsql-hackers
>
> > > 1. Implement addition of atttypmod field to RowDescriptor messages.
> > >    The client-side code is there but ifdef'd out.  I have no idea
> > >    what to change on the backend side.  The field should be sent
> > >    only if protocol >= 2.0, of course.
>
> Hmm. I was hoping to do something in the backend to allow data types
> like numeric(p,s) which take multiple qualifying arguments (in this
> case, precision and scale). One possibility was to shoehorn both fields
> into the existing atttypmod 16-bit field.
>
> Seems like atttypmod is now being used for things outside of the
> backend, but I'm not sure how to support these other uses with these
> other possible data types.

We are just passing it back.  There is no special handling of atttypmod
that you need to worry about.  I think we pass it back to Openlink can
know the actual length of the char() and varchar() fields without doing
a dummy select.  However, they better know it is a char()/varchar()
field before using it for such a purpose, because it could be used from
something else later on, as you suggest.

> A better general approach to the type qualifier problem might be to
> define a variable-length data type which specifies column
> characteristics, and then pass that around. For character strings, it
> would have one field, and for numeric() and decimal() it would have two.

--
Bruce Momjian                          |  830 Blythe Avenue
maillist@candle.pha.pa.us              |  Drexel Hill, Pennsylvania 19026
  +  If your life is a hard drive,     |  (610) 353-9879(w)
  +  Christ can be your backup.        |  (610) 853-3000(h)

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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: [HACKERS] sorting big tables :(
Следующее
От: The Hermit Hacker
Дата:
Сообщение: Re: [HACKERS] sorting big tables :(