postgresql determines whether a table exists:
method one:
select count(*) from pg_class where relname = 'tablename';
Method Two:
COUNT SELECT (*) = TABLE_SCHEMA from information_schema.tables WHERE 'public' and TABLE_TYPE = 'TABLE BASE' and table_name = 'TableName';
---------------------
author: wolf maple
source: CSDN
original: https: //blog.csdn.net/leixiaorong/article/details/7735883
copyright: This article is a blogger original article, reproduced, please attach Bowen link!