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

---
title: PostgreSQL adapter for Python | daily.dev
description: Psycopg 2.4.5, the popular PostgreSQL adapter for Python, ships a round of bug fixes: close() no longer raises on already-closed connections/cursors, a...
canonical: https://daily.dev/posts/postgresql-adapter-for-python-iigdhb7wk
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.5, the popular PostgreSQL adapter for Python, ships a round of bug fixes: close() no longer raises on already-closed connections/cursors, a...
og:url: https://daily.dev/posts/postgresql-adapter-for-python-iigdhb7wk
og:image: https://api.daily.dev/og/posts/IIgdhB7wK.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.5, the popular PostgreSQL adapter for Python, ships a round of bug fixes: close() no longer raises on already-closed connections/cursors, a fetchmany() regression in cursor subclasses is fixed, lo_creat() is used instead of lo_create() for better pgpool-II compatibility, Error and its subclasses are now picklable for multiprocessing, timezone offset handling is more efficient, a rownumber regression from 2.4.4 is fixed, inet array support is added, and a commit() concurrency issue is resolved. The codebase was also cleaned up using the GCC Python plugin's static analysis tool, catching unchecked return values, possible NULL dereferences, and reference counting issues.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://www.psycopg.org/articles/2012/03/29/psycopg-245-released>

## Questions this post answers

### What changed in psycopg 2.4.5 for PostgreSQL connections in Python?

Psycopg 2.4.5 fixes several bugs: close() on connections and cursors no longer raises exceptions if the object is already closed, a fetchmany() bug with no argument in cursor subclasses is fixed (ticket #84), a rownumber regression introduced in 2.4.4 during iteration on cursor subclasses is fixed (ticket #100), and a commit() concurrency problem is resolved (ticket #103).

_Track driver-level bugfixes like these on daily.dev before they bite a production PostgreSQL app._

### Does psycopg support inet array types in PostgreSQL?

Yes, psycopg 2.4.5 added support for inet arrays, letting Python code read and write PostgreSQL inet[] columns natively through the adapter without manual conversion workarounds.

_Follow database adapter changes like this on daily.dev when evaluating Python's PostgreSQL tooling._

### Why did psycopg switch from lo_create() to lo_creat()?

Psycopg 2.4.5 uses lo_creat() instead of lo_create() when possible, because it improves interaction with pgpool-II, the PostgreSQL connection pooling and load-balancing middleware, as tracked in ticket #88.

_daily.dev helps developers keep up with adapter tweaks that affect pgpool-II compatibility._

## Similar posts on daily.dev

- [PostgreSQL adapter for Python](https://daily.dev/posts/postgresql-adapter-for-python-7mss4n5wr) · Psycopg · 0 upvotes · 0 comments

---

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-iigdhb7wk)

```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-iigdhb7wk","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/postgresql-adapter-for-python-iigdhb7wk"},"datePublished":"2026-08-23T12:21:57.585Z","dateModified":"2026-08-23T12:42:31.247Z","description":"Psycopg 2.4.5, the popular PostgreSQL adapter for Python, ships a round of bug fixes: close() no longer raises on already-closed connections/cursors, a...","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-iigdhb7wk","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-iigdhb7wk#faq","mainEntity":[{"@type":"Question","name":"What changed in psycopg 2.4.5 for PostgreSQL connections in Python?","acceptedAnswer":{"@type":"Answer","text":"Psycopg 2.4.5 fixes several bugs: close() on connections and cursors no longer raises exceptions if the object is already closed, a fetchmany() bug with no argument in cursor subclasses is fixed (ticket #84), a rownumber regression introduced in 2.4.4 during iteration on cursor subclasses is fixed (ticket #100), and a commit() concurrency problem is resolved (ticket #103). Track driver-level bugfixes like these on daily.dev before they bite a production PostgreSQL app."}},{"@type":"Question","name":"Does psycopg support inet array types in PostgreSQL?","acceptedAnswer":{"@type":"Answer","text":"Yes, psycopg 2.4.5 added support for inet arrays, letting Python code read and write PostgreSQL inet[] columns natively through the adapter without manual conversion workarounds. Follow database adapter changes like this on daily.dev when evaluating Python's PostgreSQL tooling."}},{"@type":"Question","name":"Why did psycopg switch from lo_create() to lo_creat()?","acceptedAnswer":{"@type":"Answer","text":"Psycopg 2.4.5 uses lo_creat() instead of lo_create() when possible, because it improves interaction with pgpool-II, the PostgreSQL connection pooling and load-balancing middleware, as tracked in ticket #88. daily.dev helps developers keep up with adapter tweaks that affect pgpool-II compatibility."}}]}
```

