Received: from candle.pha.pa.us (root@s5-03.ppp.op.net [209.152.195.67]) by hub.org (8.8.8/8.7.5) with ESMTP id WAA12227; Tue, 19 May 1998 22:32:12 -0400 (EDT) Received: (from maillist@localhost) by candle.pha.pa.us (8.8.5/8.8.5) id VAA02090; Tue, 19 May 1998 21:54:08 -0400 (EDT) From: Bruce Momjian Message-Id: <199805200154.VAA02090@candle.pha.pa.us> Subject: Re: [DOCS] Re: FE/BE protocol revision patch To: lockhart@alumni.caltech.edu (Thomas G. Lockhart) Date: Tue, 19 May 1998 21:54:08 -0400 (EDT) Cc: tgl@sss.pgh.pa.us, hackers@postgresql.org, pgsql-interfaces@postgresql.org (PostgreSQL-interfaces) In-Reply-To: <35622CED.9B435442@alumni.caltech.edu> from "Thomas G. Lockhart" at May 20, 98 01:07:57 am X-Mailer: ELM [version 2.4 PL25] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit > > > > 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)