X-Original-To: pgsql-general-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 7EEFDDA883; Fri, 21 Oct 2005 13:47:42 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 51994-03; Fri, 21 Oct 2005 16:47:23 +0000 (GMT) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by svr1.postgresql.org (Postfix) with ESMTP id CA4ADD7868; Fri, 21 Oct 2005 13:47:23 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.1/8.13.1) with ESMTP id j9LGlLWp023806; Fri, 21 Oct 2005 12:47:21 -0400 (EDT) To: Alex Turner Cc: "Marc G. Fournier" , Doug Quale , pgsql-general@postgresql.org Subject: Re: [pgsql-advocacy] Oracle buys Innobase In-reply-to: <33c6269f0510210716x474dae2ah3861d32d8db01602@mail.gmail.com> References: <878xwokk4d.fsf@charter.net> <20051020214518.Q1006@ganymede.hub.org> <33c6269f0510210716x474dae2ah3861d32d8db01602@mail.gmail.com> Comments: In-reply-to Alex Turner message dated "Fri, 21 Oct 2005 10:16:08 -0400" Date: Fri, 21 Oct 2005 12:47:21 -0400 Message-ID: <23805.1129913241@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.006 required=5 tests=[AWL=0.006] X-Spam-Level: X-Archive-Number: 200510/1365 X-Sequence-Number: 85594 Alex Turner writes: > It appears that casting to a char() causes spaces to be stripped (ignored) > from the string: mls=# select length('123 '::char(8)); length -------- 3 (1 row) > I'm not sure about anyone else, but I would personaly consider that a bug? No, it's a feature, as per extensive discussion some time ago when we made it do that. The general rule is that trailing spaces in a char(n) are semantically insignificant. regards, tom lane