I'm using 7.4b4 with domains, and am having a problem with selecting without casting.
create domain test_domain as integer check( (value notnull) and (value >= 1) ); create table test_table( field_1 test_domain, field_2 integer ); insert into test_table values( 1, 1 ); insert into test_table values( '2', '2' ); select * from test_table where field_2 = '1'; select * from test_table where field_1 = '1'; -- fails The last select fails with 'operator is not unique: test_domain = "unknown"' The insert with quoted values works fine without casting. The HINT indicates I need to cast, which works find with either '1'::integer or '1'::test_domain. Is this the correct behavior? Do I have to cast every quoted value? The values are quoted through the usage of DBD::Pg. Thanks, Rob -- 10:32:54 up 78 days, 2:58, 4 users, load average: 2.00, 2.00, 2.00
pgp00000.pgp
Description: PGP signature