On 05-12-2012 18:54, [email protected] wrote:
[This is not a PostgreSQL bug. It seems a limitation/bug in Hibernate dialect.]
> insert into my_table (gender) values ('male');
> insert into my_table (gender) values ('female');
> insert into my_table (gender) values ('unknown');
>
s/gender/gender_type/
> Caused by: org.postgresql.util.PSQLException: ERROR: column “gender_type” is
> of type GENDER_ENUM but expression is of type character varying
> Hint: You will need to rewrite or cast the expression.
>
What is the SQL generated by Hibernate? It seems it is casting the expression
to varchar like:
insert into my_table (gender_type) values ('male'::varchar);
--
Euler Taveira de Oliveira - Timbira http://www.timbira.com.br/
PostgreSQL: Consultoria, Desenvolvimento, Suporte 24x7 e Treinamento
--
Sent via pgsql-bugs mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs