File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -117,10 +117,10 @@ class DBConnection:
117117 if args .database and any (part in args .database for part in ['=' , '://' ]):
118118 self .conn = psycopg .connect (args .database ,
119119 fallback_application_name = "osm2pgsql-replication" )
120-
121- self .conn = psycopg .connect (dbname = args .database , user = args .username ,
122- host = args .host , port = args .port ,
123- fallback_application_name = "osm2pgsql-replication" )
120+ else :
121+ self .conn = psycopg .connect (dbname = args .database , user = args .username ,
122+ host = args .host , port = args .port ,
123+ fallback_application_name = "osm2pgsql-replication" )
124124
125125 self .name = self .conn .get_dsn_parameters ()['dbname' ]
126126
@@ -133,7 +133,7 @@ class DBConnection:
133133
134134 def table_exists (self , table_name ):
135135 with self .conn .cursor () as cur :
136- cur .execute ('SELECT * FROM pg_tables where tablename = %s and schemaname = %s ' ,
136+ cur .execute ('SELECT * FROM pg_tables WHERE tablename = %s and schemaname = %s ' ,
137137 (table_name , self .schema ))
138138 return cur .rowcount > 0
139139
You can’t perform that action at this time.
0 commit comments