Map connection().status() to name?

From: Jim Nasby <Jim(dot)Nasby(at)BlueTreble(dot)com>
To: <psycopg(at)postgresql(dot)org>
Subject: Map connection().status() to name?
Date: 2016-11-11 20:14:31
Message-ID: f3dced99-bf0d-e590-4f8e-4becb38364ab@BlueTreble.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: psycopg

I realize that there are constants in psycopg2.extensions for available
connection statuses and what-not, but is there any included way to map a
returned status to a descriptive string? When I'm trying to debug
something a status of '2' doesn't really tell me anything useful. :(
--
Jim Nasby, Data Architect, Blue Treble Consulting, Austin TX
Experts in Analytics, Data Architecture and PostgreSQL
Data in Trouble? Get it in Treble! http://BlueTreble.com
855-TREBLE2 (855-873-2532) mobile: 512-569-9461

Responses

Browse psycopg by date

  From Date Subject
Next Message Jim Nasby 2016-11-18 20:47:17 Re: Map connection().status() to name?
Previous Message Aleksi Häkli 2016-11-08 18:24:30 Re: Psycopg2 Windows packaging