Files
feiqiu-ETL/tmp/list_dwd_tables.py
2026-02-04 21:39:01 +08:00

10 lines
342 B
Python

# -*- coding: utf-8 -*-
import psycopg2
DSN = 'postgresql://local-Python:Neo-local-1991125@100.64.0.4:5432/LLZQ-test'
conn = psycopg2.connect(DSN)
cur = conn.cursor()
cur.execute("SELECT table_name FROM information_schema.tables WHERE table_schema = 'billiards_dwd' ORDER BY table_name")
for r in cur.fetchall():
print(r[0])
conn.close()