From: | "Edson Carlos Ericksson Richter" <richter(at)simkorp(dot)com(dot)br> |
---|---|
To: | <pgsql-general(at)postgresql(dot)org>, <pgsql-hackers(at)postgresql(dot)org> |
Subject: | RES: Alter column...using failure under 9.0.4 |
Date: | 2011-09-25 16:19:19 |
Message-ID: | 001701cc7b9e$e3aa9bc0$aaffd340$@com.br |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general pgsql-hackers |
That's it: a check constraint I was not aware of...
Thanks!
Edson
-----Mensagem original-----
De: pgsql-general-owner(at)postgresql(dot)org
[mailto:pgsql-general-owner(at)postgresql(dot)org] Em nome de Tom Lane
Enviada em: domingo, 25 de setembro de 2011 13:04
Para: pgsql-general(at)postgresql(dot)org; pgsql-hackers(at)postgresql(dot)org
Assunto: Re: [GENERAL] Alter column...using failure under 9.0.4
=?iso-8859-1?Q?Bj=F6rn_H=E4user?= <bjoernhaeuser(at)gmail(dot)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
--
Sent via pgsql-general mailing list (pgsql-general(at)postgresql(dot)org) To make
changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2011-09-25 16:25:21 | Re: (another ;-)) PostgreSQL-derived project ... |
Previous Message | Tom Lane | 2011-09-25 16:08:46 | Re: New feature: accumulative functions. |
From | Date | Subject | |
---|---|---|---|
Next Message | Kevin Grittner | 2011-09-25 16:22:03 | Re: [v9.2] Fix Leaky View Problem |
Previous Message | Tom Lane | 2011-09-25 16:04:29 | Re: Alter column...using failure under 9.0.4 |