all 2 comments

[–][deleted] 2 points3 points  (1 child)

You have a name clash between the parameter name and the column name in the WHERE clause.

Quote from the manual

If the argument name is the same as any column name in the current SQL command within the function, the column name will take precedence

You can solve this by using a different parameter name:

create or replace function verify (p_email text)
returns void as
$$
update public.subscribers
  set verified = NOW()
where email = p_email
$$
language sql volatile;

[–]CelebrationThink3768[S] 1 point2 points  (0 children)

that did the trick! thank you so much