Skip to main content
3 events
when toggle format what by license comment
12 hours ago comment added Laurenz Albe It might be the ?IMMUTABLE`, which is bogus anyway.
13 hours ago comment added t316 Thank you. I had stumbled upon that wiki page and tried the following which I assumed to no longer be a subquery (is that right?) but it has the same result: ``` CREATE OR REPLACE FUNCTION has_artificial_colors_in_food(fid uuid) RETURNS boolean LANGUAGE sql IMMUTABLE PARALLEL SAFE COST 1 AS $$ SELECT BOOL_OR(ci.artificial_color) FROM food_ingredient fi JOIN canon_ingredient ci ON fi.canon_ingredient_id = ci.id WHERE fi.food_id = fid AND ci.artificial_color = TRUE; $$; ```
13 hours ago history answered Laurenz Albe CC BY-SA 4.0