On July 21, 2004 08:22 am, Tom Lane wrote:
>
> IMHO the bottom line here is that the SQL-spec behavior of type char(N)
> is completely brain-dead. Practically all of the questions in this area
> would go away if people used varchar(N) or text to store their data.
>
> regards, tom lane
For reference sake oracle treats it as follows:
<Dorm> SQL> create table dummy (value char(4));
<Dorm> Table created.
<Dorm> SQL> insert into dummy values ('A');
<Dorm> 1 row created.
<Dorm> SQL> commit;
<Dorm> Commit complete.
<Dorm> SQL> select value||value from dummy;
<Dorm> VALUE||V
<Dorm> --------
<Dorm> A A
<Dorm> SQL> select length(value||value) from dummy;
<Dorm> LENGTH(VALUE||VALUE)
<Dorm> --------------------
<Dorm> 8
--
Darcy Buskermolen
Wavefire Technologies Corp.
ph: 250.717.0200
fx: 250.763.1759
http://www.wavefire.com