pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Dean Gibson (DB Administrator) <postgresql4@ultimeth.com>
Cc: pgsql-sql <pgsql-sql@postgresql.org>
Subject: Re: Blank-padding (was: Oracle buys Innobase)
Date: Fri, 21 Oct 2005 23:23:48 -0400
Message-ID: <27840.1129951428@sss.pgh.pa.us> (raw)
In-Reply-To: <435979B0.60107@ultimeth.com>
References: <CC1CF380F4D70844B01D45982E671B239E8BEC@mtxexch01.add0.masergy.com>
	<878xwokk4d.fsf@charter.net>
	<20051020214518.Q1006@ganymede.hub.org>
	<33c6269f0510210716x474dae2ah3861d32d8db01602@mail.gmail.com>
	<23805.1129913241@sss.pgh.pa.us>
	<435979B0.60107@ultimeth.com>

"Dean Gibson (DB Administrator)" <postgresql4@ultimeth.com> writes:
> I remember that discussion, and I was for the change.  However, upon 
> doing some testing after reading the above, I wonder if the 
> blank-stripping isn't too aggressive.  I have a CHAR(6) field (say, 
> named Z) that has "abc   " in it.  Suppose I want to append "x" to Z, 
> with any leading spaces in Z PRESERVED.

(You meant trailing spaces, I assume.)  Why exactly would you want to do
that?  You decided by your choice of datatype that the trailing spaces
weren't significant.  This gripe seems to me exactly comparable to
complaining if a numeric datatype doesn't remember how many trailing
zeroes you typed after the decimal point.  Those zeroes aren't
semantically significant, so you have no case.

			regards, tom lane



view thread (2+ messages)

Message-ID: <27840.1129951428@sss.pgh.pa.us>
Permalink:  ../27840.1129951428@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/27840.1129951428@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: tgl@sss.pgh.pa.us, postgresql4@ultimeth.com
  Subject: Re: Blank-padding (was: Oracle buys Innobase)
  In-Reply-To: <27840.1129951428@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox