I have the following enum and table:
CREATE TYPE public.event_type as ENUM (
'eat_apple',
'eat_banana',
'brush_teeth'
);
CREATE TABLE public.events (
id integer not null,
type public.event_type,
created_at timestamp without time zone
);
I have a lot of queries that I'm writing against this table that are only concerned with a subset of the event types (eat_apple and eat_banana).
I could write each of these queries with a WHERE type IN ('eat_banana', 'eat_apple') clause, however there's a high likelihood that in future, I'll need to add an eat_pear event type.
What are the available abstractions in Postgres for storing a subset of these enum values for reuse throughout queries, in a way where the subset can be extended in future, such that existing queries take this into account?