Re: [DOCS] Re: FE/BE protocol revision patch - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: [DOCS] Re: FE/BE protocol revision patch
Date
Msg-id 199805200154.VAA02090@candle.pha.pa.us
Whole thread Raw
In response to Re: [DOCS] Re: FE/BE protocol revision patch  ("Thomas G. Lockhart" <lockhart@alumni.caltech.edu>)
List 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 by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: [HACKERS] sorting big tables :(
Next
From: The Hermit Hacker
Date:
Subject: Re: [HACKERS] sorting big tables :(