In Postgresql, how can I do a condition to create a table only if it does not already exist?
Code example appreciated.
The easiest answer is :
catch{ #create table here }
This creates a table if not exists and produces an error if exists. And the error is caught.