"Kurt wagner" <kurt.wagnerext...@leoni.com> writes:
> During migration from Informix to Postgres I came across following issue:
> create temp table temp1 as
>    SELECT  firmnr,
>            werknr,
>            'I' as invper,
>            invnum
>    from .... ;

You really ought to cast the 'I' to some specific type.  The above code
is illegal per SQL standard.  You can get away with it in certain
contexts in Postgres, but when you are creating a table or view and
don't know exactly what might be done with the column, it's much better
to ensure it's of the intended type.  We aren't going to make it default
to text or whatever because it's not always clear that that's what's
intended --- consider

        '1.2' as invper,
        '2009-11-23' as invper,

Most likely text was not what the writer had in mind in such cases.

                        regards, tom lane

-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs

Reply via email to