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 WAA15056; Mon, 27 Apr 1998 22:30:57 -0400 (EDT) Received: (from maillist@localhost) by candle.pha.pa.us (8.8.5/8.8.5) id WAA01689; Mon, 27 Apr 1998 22:17:55 -0400 (EDT) From: Bruce Momjian Message-Id: <199804280217.WAA01689@candle.pha.pa.us> Subject: Re: [HACKERS] Re: [INTERFACES] retrieving varchar size To: lockhart@alumni.caltech.edu (Thomas G. Lockhart) Date: Mon, 27 Apr 1998 22:17:55 -0400 (EDT) Cc: byronn@insightdist.com, hannu@trust.ee, daveh@insightdist.com, pgsql-hackers@postgresql.org, pgsql-interfaces@postgresql.org In-Reply-To: <3544A239.FD32AF09@alumni.caltech.edu> from "Thomas G. Lockhart" at Apr 27, 98 03:20:25 pm X-Mailer: ELM [version 2.4 PL25] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit > > > > > We could pass back atttypmod as part of the PGresult. I can add > > > > that to the TODO list. Would that help? > > > Yes, that would do it! > > > Thank you for listening to our ravings on this issue. > > Added to TODO: > > * Add pg_attribute.atttypmod/Resdom->restypmod to PGresult structure > > This is a good suggestion. > > How do we determine atttypmod for queries like > > select '123' || '456'; > > ?? I might be able to address this with my upcoming type conversion work > but I don't know if we have enough hooks for this right now... No way, I think. This would have a atttypmod of -1, which is true because there is no atttypmod size for this. Once a char()/varchar() goes into a function, anything can come out. -- 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)