From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Michael Fuhr <mike(at)fuhr(dot)org> |
Cc: | Sebastian Siewior <lavish(at)kamp-dsl(dot)de>, pgsql-sql(at)postgresql(dot)org |
Subject: | Re: Problem with a Pettern Matching Check |
Date: | 2005-08-16 00:21:23 |
Message-ID: | 18684.1124151683@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
Michael Fuhr <mike(at)fuhr(dot)org> writes:
> The CHAR(3) specification causes the value to be space-padded, so
> '1' becomes '1 ' (the digit "one" followed by two spaces).
Actually, we seem to be going out of our way to make this case fail.
Given that we consider trailing spaces in char(n) to be semantically
insignificant, would it make sense to strip them before doing the
regex pattern match? That would happen automatically if we allowed
the char(n) value to promote to text --- and the only reason it's
not doing so is that there's an extra ~ operator definition that
specifically prevents that (bpcharregexeq).
I have a feeling that we added that operator definition at some point
for backwards compatibility, but it seems a bit odd now.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Mischa Sandberg | 2005-08-16 00:26:34 | Re: SQL output |
Previous Message | Simon Law | 2005-08-15 23:55:20 | SQL output |