Mark Rofail wrote: > - now the RI checks utilise the @>(anyarray, anyelement) > - however there's a small problem: > operator does not exist: integer[] @> smallint > I assume that external casting would be required here. But how can I > downcast smallint to integer or interger to numeric automatically ?
We have one opclass for each type combination -- int4 to int2, int4 to int4, int4 to int8, etc. You just need to add the new strategy to all the opclasses. BTW now that we've gone through this a little further, it's starting to look like a mistake to me to use the same @> operator for (anyarray, anyelement) than we use for (anyarray, anyarray). I have the feeling we'd do better by having some other operator for this purpose -- dunno, maybe @>> or @>. ... whatever you think is reasonable and not already in use. Unless there is some other reason to pick @> for this purpose. -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers