Re: [GENERAL] Alter column...using failure under 9.0.4 - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [GENERAL] Alter column...using failure under 9.0.4
Date
Msg-id 1191.1316966669@sss.pgh.pa.us
Whole thread Raw
Responses RES: [GENERAL] Alter column...using failure under 9.0.4  ("Edson Carlos Ericksson Richter" <richter@simkorp.com.br>)
List pgsql-hackers
=?iso-8859-1?Q?Bj=F6rn_H=E4user?= <bjoernhaeuser@gmail.com> writes:
> Am 25.09.2011 um 17:17 schrieb Edson Carlos Ericksson Richter:
>> alter table usuario alter column ativo type smallint using (case when ativo then 1 else 0 end);
>> ERROR:  argument of IS FALSE must be type boolean, not type smallint

> you could check for indices or something like that.

Yeah, looks like expression index or CHECK constraint or something
similar that includes "ativo IS FALSE".

Note to hackers: I wonder whether we could make this a bit more
user-friendly by providing a CONTEXT line that shows which table
property we're trying to convert.

            regards, tom lane

pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: Inserting heap tuples in bulk in COPY
Next
From: "Edson Carlos Ericksson Richter"
Date:
Subject: RES: [GENERAL] Alter column...using failure under 9.0.4