[Tile-serving] [openstreetmap/osm2pgsql] Add support for osm2pgsql_properties table to osm2pgsql-replication (PR #2029)

Sarah Hoffmann notifications at github.com
Thu Aug 10 20:14:48 UTC 2023


@lonvia commented on this pull request.



> +        self.conn = psycopg.connect(dbname=args.database, user=args.username,
+                                    host=args.host, port=args.port,
+                                    fallback_application_name="osm2pgsql-replication")
+
+        self.name = self.conn.get_dsn_parameters()['dbname']
+
+    def __enter__(self):
+        return self
+
+    def __exit__(self, exc_type, exc_value, traceback):
+        if self.conn is not None:
+            self.conn.close()
+
+    def table_exists(self, table_name):
+        with self.conn.cursor() as cur:
+            cur.execute('SELECT * FROM pg_tables where tablename = %s and schemaname = %s ',

Fixed.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/osm2pgsql/pull/2029#discussion_r1290633706
You are receiving this because you are subscribed to this thread.

Message ID: <openstreetmap/osm2pgsql/pull/2029/review/1572660296 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/tile-serving/attachments/20230810/ea47c631/attachment.htm>


More information about the Tile-serving mailing list