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

From: Alan Hodgson <ahodgson(at)simkin(dot)ca>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: column "id" is of type integer but expression is of type character
Date: 2009-01-08 19:14:07
Message-ID: 200901081114.07578@hal.medialogik.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thursday 08 January 2009, "Andrus" <kobruleht2(at)hot(dot)ee> wrote:
> 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;

> How to fix ?

INSERT INTO test (baas) SELECT baas FROM lisa;

--
Current Peeve: The mindset that the Internet is some sort of school for
novice sysadmins and that everyone -not- doing stupid dangerous things
should act like patient teachers with the ones who are. -- Bill Cole, NANAE

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Raymond O'Donnell 2009-01-08 19:14:08 Re: column "id" is of type integer but expression is of type character
Previous Message Andrus 2009-01-08 19:04:55 column "id" is of type integer but expression is of type character