In Postgresql, how can I do a condition to create a table only if it does not already exist?
Code example appreciated.
I think to check the pg_class table perhaps help you, something like that:
SELECT COUNT (relname) as a FROM pg_class WHERE relname = 'mytable' if a = 0 then (CREATE IT)
Regards.