Bug #811: Using || with char and char varying

Поиск
Список
Период
Сортировка
От pgsql-bugs@postgresql.org
Тема Bug #811: Using || with char and char varying
Дата
Msg-id 20021107090428.67EE3475DA7@postgresql.org
обсуждение исходный текст
Список pgsql-bugs
John Lim (heyjohnlim@yahoo.com) reports a bug with a severity of 2
The lower the number the more severe it is.

Short Description
Using || with char and char varying

Long Description
The following sql:

  select firstname||lastname from adoxyz;

generates this error:

PostgreSQL said: ERROR: Unable to identify an operator '||' for types 'character' and 'character varying' You will have
toretype this query using an explicit cast  

Based on the table:

CREATE TABLE "adoxyz" (
   "id" int4,
   "firstname" char(24),
   "lastname" varchar,
   "created" date
);

Although this can be fixed by a typecast, porting sql (which i am doing) from other databases such as oracle/mysql is a
bigpain. 

Thanks for looking into this.

Sample Code


No file was uploaded with this report

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

Предыдущее
От: Lars
Дата:
Сообщение: like not using indexes in 7.3b5?
Следующее
От: Mark Le Huray
Дата:
Сообщение: Problem with a sequence being acted on by an on insert rule.