I hate asking about little stupid bugs like this, but I can't figure it out for the life of me...
This query:
INSERT INTO user_authentication(init_password_setup) VALUES( substr((md5(random()::TEXT)), 0, 10) ) WHERE (init_password_setup = NULL OR init_password_setup ='')
Is throwing this error:
16:27:11 Kernel error: ERROR: syntax error at or near "WHERE"
I tried running it as an insert select as well. Sincere thanks for any help it is greatly appreciated