orphan large objects created and invalid cast added for gen field - Mailing list pgsql-odbc

From Andrus
Subject orphan large objects created and invalid cast added for gen field
Date
Msg-id 9ade4722-3082-96d0-6bfa-0e486e5b3280@hot.ee
Whole thread Raw
List pgsql-odbc

Hi!

Tried latest 13.00.0000 32 bit driver with Visual FoxPro.

1. Created gen type column in client side: create cursor t ( t gen  )

2. Used psqlodbc to insert this data:

create temp table test ( test bytea ) on commit drop;
insert into test values ( ?t.t );

This code throws exception

type "lo" does not exist

but each call adds new large object (new row to pg_largeobject_metadata table).

Odbc driver generates strange code:

insert into test values ( '202564337'::lo  );

where 202564337 increases on each call and also creates large object.

This large object remains even if transaction is rolled back due to unexisting lo type.

C7=0  (bytea as logvarbinary is false) is used in connection string.

Questions:

1. Why odbc driver creates and does not remove large object  if transaction is rolled bact ?

2.  Why it adds cast to lo type which does not exist ?

It looks like cast is added in line

https://github.com/hlinnaka/psqlodbc/blob/master/convert.c#L4564

Andrus.



pgsql-odbc by date:

Previous
From: walid zohair
Date:
Subject: Fwd: Raise Notice MS access not working
Next
From: Rohan Malik
Date:
Subject: Error ODBC driver Wrds