Pavel Stehule wrote:
> What version do you have?
>
> I am cannot repeat it.
It will depend on the relative cost of the clauses (though 0.0001 should
have been enough to force it). Try:
CREATE OR REPLACE FUNCTION row_hidden (phone text) RETURNS bool AS $$
BEGIN RETURN phone LIKE '6%';
END;
$$ LANGUAGE plpgsql COST 999;
CREATE VIEW phone_number AS SELECT person, phone FROM phone_data WHERE NOT row_hidden(phone);
-- Richard Huxton Archonet Ltd