mirror of
https://github.com/psycopg/psycopg2.git
synced 2024-11-22 17:06:33 +03:00
Use lo_creat() instead of lo_create() when creating large objects without new_oid.
This enhances the compatibility with the pgpool-II replication middleware, that doesn't support lo_create() calls.
This commit is contained in:
parent
dcc60131a9
commit
e1700fe28b
|
@ -175,7 +175,10 @@ lobject_open(lobjectObject *self, connectionObject *conn,
|
|||
if (new_file)
|
||||
self->oid = lo_import(self->conn->pgconn, new_file);
|
||||
else
|
||||
self->oid = lo_create(self->conn->pgconn, new_oid);
|
||||
if (new_oid != InvalidOid)
|
||||
self->oid = lo_create(self->conn->pgconn, new_oid);
|
||||
else
|
||||
self->oid = lo_creat(self->conn->pgconn, INV_READ | INV_WRITE);
|
||||
|
||||
Dprintf("lobject_open: large object created with oid = %d",
|
||||
self->oid);
|
||||
|
|
Loading…
Reference in New Issue
Block a user