Folks,
Also:
This behavior was different in 7.1:
[11:02:45] <DarcyB> darcy=# select '1'::char(4) || '-'::char(1);
[11:02:45] <DarcyB> ?column?
[11:02:45] <DarcyB> ----------
[11:02:45] <DarcyB> 1 -
[11:02:45] <DarcyB> (1 row)
[11:02:49] <DarcyB> on 7.1
And there's apparently either an issue, or a change in behavior, in CHAR for
7.5:
[11:03:25] <DarcyB> darcy=# SELECT length('1'::char(4));
[11:03:25] <DarcyB> length
[11:03:25] <DarcyB> --------
[11:03:25] <DarcyB> 1
[11:03:25] <DarcyB> (1 row)
[11:03:29] <DarcyB> is 7.5
pg743=> select length('1'::char(4));
length
--------
4
(1 row)
(on 7.4.3)
Are these changes intentional, or are they bugs?
--
-Josh Berkus
Aglio Database Solutions
San Francisco