Re: Bug in concat operator for Char? -- More Info - Mailing list pgsql-bugs

From Josh Berkus
Subject Re: Bug in concat operator for Char? -- More Info
Date
Msg-id 200407201106.27065.josh@agliodbs.com
Whole thread Raw
In response to Bug in concat operator for Char?  (Josh Berkus <josh@agliodbs.com>)
Responses Re: Bug in concat operator for Char? -- More Info
List pgsql-bugs
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

pgsql-bugs by date:

Previous
From: Josh Berkus
Date:
Subject: Bug in concat operator for Char?
Next
From: Michael Meskes
Date:
Subject: Re: ecpg -D SYMBOL