Docs/cleanup for the lo_creat patch

This commit is contained in:
Daniele Varrazzo 2012-01-10 21:51:34 +00:00
parent e1700fe28b
commit 6f21111a92
2 changed files with 7 additions and 3 deletions

2
NEWS
View File

@ -3,6 +3,8 @@ What's new in psycopg 2.4.5
- Fixed fetchmany() with no argument in cursor subclasses - Fixed fetchmany() with no argument in cursor subclasses
(ticket #84). (ticket #84).
- Use lo_creat() instead of lo_create() when possible for better
interaction with pgpool-II (ticket #88).
What's new in psycopg 2.4.4 What's new in psycopg 2.4.4

View File

@ -175,10 +175,12 @@ lobject_open(lobjectObject *self, connectionObject *conn,
if (new_file) if (new_file)
self->oid = lo_import(self->conn->pgconn, new_file); self->oid = lo_import(self->conn->pgconn, new_file);
else else
if (new_oid != InvalidOid) /* Use lo_creat when possible to be more middleware-friendly.
* See ticket #88 */
if (new_oid != InvalidOid)
self->oid = lo_create(self->conn->pgconn, new_oid); self->oid = lo_create(self->conn->pgconn, new_oid);
else else
self->oid = lo_creat(self->conn->pgconn, INV_READ | INV_WRITE); self->oid = lo_creat(self->conn->pgconn, INV_READ | INV_WRITE);
Dprintf("lobject_open: large object created with oid = %d", Dprintf("lobject_open: large object created with oid = %d",
self->oid); self->oid);