What is the best way to query presence of a table
select relname from pg_class where relname = 'SomeTable';
or
select * from SomeTable -- I know this one succss but I don't have to
wory
about pg_* changing under me....
or
select exists('SomeTable');
Where exists() is a pg built in function -- I am wishing here for a feature
I'd like to solve this such that I'm protected from internal changes
within PG.
Obviously the suggested method above similar to version() can abstract that.
Also, when I create my table, can I say create or replace (for base
tables) ?
Thanks