Re: Bug in concat operator for Char? -- More Info

Поиск
Список
Период
Сортировка
От Darcy Buskermolen
Тема Re: Bug in concat operator for Char? -- More Info
Дата
Msg-id 200407211206.09696.darcy@wavefire.com
обсуждение исходный текст
Ответ на Re: Bug in concat operator for Char? -- More Info  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-bugs
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

В списке pgsql-bugs по дате отправления:

Предыдущее
От: Andreas Pflug
Дата:
Сообщение: Re: Bug in concat operator for Char? -- More Info
Следующее
От: "PostgreSQL Bugs List"
Дата:
Сообщение: BUG #1199: pgAdmin problem