<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/postgresql-adapter-for-python-jknj6oqjs" -->

---
title: PostgreSQL adapter for Python | daily.dev
description: Psycopg 2.4.4 restores the isolation level symbolic constants to their pre-2.4.2 values so that old code relying on numeric constants keeps working. The...
canonical: https://daily.dev/posts/postgresql-adapter-for-python-jknj6oqjs
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: PostgreSQL adapter for Python | daily.dev
og:description: Psycopg 2.4.4 restores the isolation level symbolic constants to their pre-2.4.2 values so that old code relying on numeric constants keeps working. The...
og:url: https://daily.dev/posts/postgresql-adapter-for-python-jknj6oqjs
og:image: https://api.daily.dev/og/posts/jkNj6oqjS.png
og:image:alt: PostgreSQL adapter for Python
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# PostgreSQL adapter for Python

**[Psycopg](https://daily.dev/sources/psycopg)** · 1 min read · 0 upvotes · 0 comments

## Summary

Psycopg 2.4.4 restores the isolation level symbolic constants to their pre-2.4.2 values so that old code relying on numeric constants keeps working. The release also fixes register_composite() to work with implicitly defined table row types, makes named DictCursor/RealDictCursor honor itersize, fixes rollback on error under Zope, and corrects a regression from 2.4.1 where empty libpq errors raised the wrong exception type.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://www.psycopg.org/articles/2011/12/19/psycopg-244-released>

## Questions this post answers

### Why did my psycopg2 isolation level numeric constants stop matching after upgrading to 2.4.2?

Psycopg 2.4.2 changed the numeric values of the isolation level symbolic constants, breaking code that used the raw numbers instead of the named constants. Psycopg 2.4.4 restores these values to what they were before release 2.4.2 specifically to avoid breaking apps that depend on the numeric values.

_Track breaking changes like this psycopg isolation level fix before they hit your database code on daily.dev._

### Does psycopg2's register_composite() work with types created implicitly by a table row, or only types made with CREATE TYPE?

As of psycopg 2.4.4, register_composite() also works with types implicitly defined after a table row, not only those explicitly created with CREATE TYPE. Earlier versions only supported the explicitly created composite types.

_Developers wiring up Postgres composite types can follow driver fixes like this on daily.dev._

### Why is psycopg2 raising Error instead of DatabaseError on a disconnection with an empty libpq error message?

This was a regression introduced in psycopg release 2.4.1, where empty libpq errors incorrectly raised the generic Error class instead of DatabaseError. Psycopg 2.4.4 fixes this so DatabaseError is raised consistently with other disconnection-related errors, matching behavior from before 2.4.1.

_Debugging inconsistent database exceptions gets easier when you track fixes like this on daily.dev._

---

Tags: [#python](https://daily.dev/tags/python), [#postgresql](https://daily.dev/tags/postgresql)

[View this post on daily.dev](https://daily.dev/posts/postgresql-adapter-for-python-jknj6oqjs)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"PostgreSQL adapter for Python","url":"https://daily.dev/posts/postgresql-adapter-for-python-jknj6oqjs","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/postgresql-adapter-for-python-jknj6oqjs"},"datePublished":"2026-08-23T12:21:53.202Z","dateModified":"2026-08-23T12:40:39.912Z","description":"Psycopg 2.4.4 restores the isolation level symbolic constants to their pre-2.4.2 values so that old code relying on numeric constants keeps working. The...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/b0cbd2ac8948f96ab39fa6a90db7464f?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/b0cbd2ac8948f96ab39fa6a90db7464f?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Psycopg","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Psycopg","logo":"https://media.daily.dev/image/upload/s--5N-KNNWk--/f_auto,q_auto/v1787487485/logos/psycopg?_a=BAMAMicg0","url":"https://daily.dev/sources/psycopg"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/postgresql-adapter-for-python-jknj6oqjs","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"python,postgresql","timeRequired":"PT1M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Psycopg","item":"https://daily.dev/sources/psycopg"},{"@type":"ListItem","position":3,"name":"PostgreSQL adapter for Python"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/postgresql-adapter-for-python-jknj6oqjs#faq","mainEntity":[{"@type":"Question","name":"Why did my psycopg2 isolation level numeric constants stop matching after upgrading to 2.4.2?","acceptedAnswer":{"@type":"Answer","text":"Psycopg 2.4.2 changed the numeric values of the isolation level symbolic constants, breaking code that used the raw numbers instead of the named constants. Psycopg 2.4.4 restores these values to what they were before release 2.4.2 specifically to avoid breaking apps that depend on the numeric values. Track breaking changes like this psycopg isolation level fix before they hit your database code on daily.dev."}},{"@type":"Question","name":"Does psycopg2's register_composite() work with types created implicitly by a table row, or only types made with CREATE TYPE?","acceptedAnswer":{"@type":"Answer","text":"As of psycopg 2.4.4, register_composite() also works with types implicitly defined after a table row, not only those explicitly created with CREATE TYPE. Earlier versions only supported the explicitly created composite types. Developers wiring up Postgres composite types can follow driver fixes like this on daily.dev."}},{"@type":"Question","name":"Why is psycopg2 raising Error instead of DatabaseError on a disconnection with an empty libpq error message?","acceptedAnswer":{"@type":"Answer","text":"This was a regression introduced in psycopg release 2.4.1, where empty libpq errors incorrectly raised the generic Error class instead of DatabaseError. Psycopg 2.4.4 fixes this so DatabaseError is raised consistently with other disconnection-related errors, matching behavior from before 2.4.1. Debugging inconsistent database exceptions gets easier when you track fixes like this on daily.dev."}}]}
```

