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

From: "Kurt wagner" <kurt(dot)wagnerextern(at)leoni(dot)com>
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #5225: create table: cast necessary for constant??
Date: 2009-12-02 12:45:15
Message-ID: 200912021245.nB2CjFpb043790@wwwmaster.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs


The following bug has been logged online:

Bug reference: 5225
Logged by: Kurt wagner
Email address: kurt(dot)wagnerextern(at)leoni(dot)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?

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message aftab 2009-12-02 14:35:21 BUG #5226: Limit operator slows down
Previous Message Craig Ringer 2009-12-02 09:07:06 Re: BUG #5224: After upgrading from vista to windows 7, postgres services are missing