BUG #5225: create table: cast necessary for constant??

Поиск
Список
Период
Сортировка
От Kurt wagner
Тема BUG #5225: create table: cast necessary for constant??
Дата
Msg-id 200912021245.nB2CjFpb043790@wwwmaster.postgresql.org
обсуждение исходный текст
Ответы Re: BUG #5225: create table: cast necessary for constant??  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-bugs
The following bug has been logged online:

Bug reference:      5225
Logged by:          Kurt wagner
Email address:      kurt.wagnerextern@leoni.com
PostgreSQL version: 8.41
Operating system:   HP-UX
Description:        create table: cast necessary for constant??
Details:

During migration from Informix to Postgres I came across following issue:
create temp table temp1 as
   SELECT  firmnr,
           werknr,
           'I' as invper,
           invnum
   from .... ;

the next select on table temp1 returned the error
ERROR: failed to find conversion function from unknown to character [SQL
State=XX000]

I could find out that the column invper in the temp. table temp1 was defined
as data type "unknown". To me it is a bug because the column is filled by a
constant. So regardless if you estimate it as char, varchar, or text it is
still processable whereas "unknown" is the worst case and returns an error
as described above.

other DBs (e.g. db2, or Informix) can handle such cases correctly.

is it possible to fix it, please?

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

Предыдущее
От: Craig Ringer
Дата:
Сообщение: Re: BUG #5224: After upgrading from vista to windows 7, postgres services are missing
Следующее
От: "aftab"
Дата:
Сообщение: BUG #5226: Limit operator slows down