I am trying to make a conditional Select statement that creates a table if the table does not exist, but this does not seem to work for some reason?
IF SELECT to_regclass('public.entityName') IS NULL
BEGIN
CREATE TABLE |entityName|
(....)
END
END IF