import psycopg

conn = psycopg.connect(
    host='192.168.0.61',
    port=55432,
    dbname='njts_acct',
    user='njts_app',
    password='njts_app2025'
)

cur = conn.cursor()
cur.execute("""
    SELECT column_name, data_type 
    FROM information_schema.columns 
    WHERE table_name = 'insurance_rates' 
    ORDER BY ordinal_position
""")

rows = cur.fetchall()
print('insurance_ratesテーブルのカラム:')
for r in rows:
    print(f'  {r[0]}: {r[1]}')

cur.close()
conn.close()
