"Andrey Y. Mosienko" <feo(at)ttn(dot)ru> writes:
> I just included PL/Perl language in my database.
> Created function:
> CREATE FUNCTION and_with_mask(int2, int2) RETURNS int2 AS
> [ behaves strangely ]
What Postgres version is this, on what platform?
Does the function behave more reasonably if you declare the
inputs and result as int4?
regards, tom lane