This project is archived and is in readonly mode.
empty string in composite data types
Reported by Psycopg website | December 3rd, 2012 @ 01:51 PM
Submitted by: Christian von Kietzell
Psycopg incorrectly returns empty strings in composite data types as None instead of ''.
sql> CREATE TYPE testtype AS (id INT, label TEXT);
python> import psycopg2
python> import psycopg2.extras
python> db = psycopg2.connect(...)
python> caster = psycopg2.extras.register_composite('testtype', db)
python> cursor = db.cursor()
python> cursor.execute("SELECT (1, '')::testtype")
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
WARNING: the informations in this tracker are archived. Please submit new tickets or comments to the new tracker.
Psycopg is the most used PostgreSQL adapter for the Python programming language. At the core it fully implements the Python DB API 2.0 specifications. Several extensions allow access to many of the features offered by PostgreSQL.