X-Original-To: pgsql-hackers@postgreSQL.org Received: from localhost (developer.postgresql.org [64.117.224.193]) by developer.postgresql.org (Postfix) with ESMTP id DB6EA925435 for ; Fri, 23 May 2003 16:34:53 -0400 (EDT) Received: from developer.postgresql.org ([64.117.224.193]) by localhost (developer.postgresql.org [64.117.224.193:10024]) (amavisd-new) with ESMTP id 17776-08 for ; Fri, 23 May 2003 16:34:53 -0400 (EDT) Received: from sss.pgh.pa.us (unknown [192.204.191.242]) by developer.postgresql.org (Postfix) with ESMTP id B4F4C92542E for ; Fri, 23 May 2003 16:34:52 -0400 (EDT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.9/8.12.9) with ESMTP id h4NKYnU6018327; Fri, 23 May 2003 16:34:49 -0400 (EDT) To: Stephan Szabo Cc: pgsql-hackers@postgreSQL.org Subject: Simplifying varchar and bpchar behavior In-reply-to: <20030513123355.B29586-100000@megazone23.bigpanda.com> References: <20030513123355.B29586-100000@megazone23.bigpanda.com> Comments: In-reply-to Stephan Szabo message dated "Tue, 13 May 2003 12:45:27 -0700" Date: Fri, 23 May 2003 16:34:48 -0400 Message-ID: <18326.1053722088@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new X-Archive-Number: 200305/605 X-Sequence-Number: 39111 We have had a couple of threads recently on improving bpchar/varchar/text behavior by making bpchar-to-text promotion go through rtrim() (instead of being a straight binary-compatible conversion) and getting rid of redundant operators: http://archives.postgresql.org/pgsql-hackers/2002-11/msg00703.php http://archives.postgresql.org/pgsql-performance/2003-05/msg00151.php I'm going to go ahead and make these changes for 7.4, as they will clearly improve the intuitiveness of the behavior. I don't think they move us any closer to spec compliance --- the spec appears to require a notion of a collation sequence that can be specified independently of the character datatype, which is something we don't have and aren't likely to have very soon. (It's not clear to me that it's actually *useful* to specify NO PAD collation with fixed-width character data, or PAD SPACE with varchar data, but the spec lets you do it.) In the meantime though these changes seem to be a win, and they will not leave us any worse off when we do get around to implementing collations. We speculated about a couple of alternative solutions in the first of the above-mentioned threads, but they didn't look nearly as practical to implement as this way. Last call for objections ... regards, tom lane