column "id" is of type integer but expression is of type character

From: "Andrus" <kobruleht2(at)hot(dot)ee>
To: <pgsql-general(at)postgresql(dot)org>
Subject: column "id" is of type integer but expression is of type character
Date: 2009-01-08 19:04:55
Message-ID: 550FA46EDB07485183DEF8FAB1CC998C@andrusnotebook
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Commands:

create temp table test ( id int, baas char(10) );
create temp table lisa ( id int, baas char(10) );
alter table lisa drop column id;
INSERT INTO test SELECT * FROM lisa;
drop table lisa;

Cause error

ERROR: column "id" is of type integer but expression is of type character
HINT: You will need to rewrite or cast the expression.

********** Error **********

ERROR: column "id" is of type integer but expression is of type character
SQL state: 42804
Hint: You will need to rewrite or cast the expression.

How to fix ?

Andrus.

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Alan Hodgson 2009-01-08 19:14:07 Re: column "id" is of type integer but expression is of type character
Previous Message Dan Armbrust 2009-01-08 17:43:32 Re: Slow Vacuum was: vacuum output question