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

From: Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us>
To: lockhart(at)alumni(dot)caltech(dot)edu (Thomas G(dot) Lockhart)
Cc: tgl(at)sss(dot)pgh(dot)pa(dot)us, hackers(at)postgresql(dot)org, pgsql-interfaces(at)postgresql(dot)org (PostgreSQL-interfaces)
Subject: Re: [DOCS] Re: FE/BE protocol revision patch
Date: 1998-05-20 01:54:08
Message-ID: 199805200154.VAA02090@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-interfaces

>
> > > 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(at)candle(dot)pha(dot)pa(dot)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)

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message The Hermit Hacker 1998-05-20 02:53:44 Re: [HACKERS] sorting big tables :(
Previous Message Bruce Momjian 1998-05-20 01:50:34 Re: [HACKERS] sorting big tables :(

Browse pgsql-interfaces by date

  From Date Subject
Next Message Peter Mount 1998-05-20 07:03:44 RE: [INTERFACES] Libpq in Windows95 and VC++ 5.0
Previous Message Thomas G. Lockhart 1998-05-20 01:07:57 Re: [DOCS] Re: FE/BE protocol revision patch