public inbox for [email protected]  
help / color / mirror / Atom feed
From: Andrus <[email protected]>
To: [email protected]
Subject: orphan large objects created and invalid cast added for gen field
Date: Tue, 2 Feb 2021 19:16:30 +0200
Message-ID: <[email protected]> (raw)

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.





reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected]
  Subject: Re: orphan large objects created and invalid cast added for gen field
  In-Reply-To: <[email protected]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox