From: Andrus <kobruleht2@hot.ee>
To: Adrian Klaver <adrian.klaver@aklaver.com>
To: Laurenz Albe <laurenz.albe@cybertec.at>
To: pgsql-general@postgresql.org
Subject: Re: permission denied for large object 200936761
Date: Tue, 2 Feb 2021 19:05:54 +0200
Message-ID: <6efde177-a2b3-5100-d154-61bd2629c2ea@hot.ee> (raw)
In-Reply-To: <67a7abbc-6039-fee3-23e1-02bccc02376c@aklaver.com>
References: <47c92baa-949b-92d1-c162-1f0d8348fb50@hot.ee>
<2eee8862-ea29-3e9c-30ff-82ec7ad4d99f@aklaver.com>
<08f90e7b-8d08-d46e-abb7-85dd68bc3078@hot.ee>
<ed44153c97970e36d7f4266370fcb1d5110f2d91.camel@cybertec.at>
<6f141378-2651-3c71-1bab-8b5700e45fbd@hot.ee>
<6611d34f7f5ab443a6dbac4a188ba4a1f0ecf196.camel@cybertec.at>
<ddd26ebf-b653-e6d1-c30c-f4b385031832@hot.ee>
<f1b313941d768ae1c19ed0a5629af845050b4c4a.camel@cybertec.at>
<b140314e-c4c5-8ba6-69b7-969f9e160391@hot.ee>
<67a7abbc-6039-fee3-23e1-02bccc02376c@aklaver.com>
Hi!
> So at that point the deed has been done.
>
> The questions to ask:
>
> 1) Why the driver thinks it is being passed a large object in the
> first place?
Source data type was binary. It was mapped to oid for unknown reason.
>
> 2) Have there been any recent changes to code that passes through the
> ODBC driver that would account for 1)?
> 3) To help with 2), where is 'INSERT INTO report ( ... ) values (.. ,
> '200936767'::lo, ... )" coming from?
> My suspicion is that it is user initiated change.
>
This change was done by me. I added new reports from other database.
Reports contain primary columns and import throws error about unknown lo
type.
I removed bonary columns from import and after that import succeeds.
It looks like during this procces 3 rows were added to large object
metadata table.
I used
select lo_unlink(oidnumber)
to remove them.
>If it is not and you suspect the ODBC driver then I would suggest
bringing it up on the -odbc list:
>https://www.postgresql.org/list/pgsql-odbc/
I created binary data in client side creating FoxPro cursor
create cursor t ( t gen )
and 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 row to pg_largeobject_metadata table.
Odbc driver creates large object and adds lo cast. 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.
Andrus.
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: kobruleht2@hot.ee, adrian.klaver@aklaver.com, laurenz.albe@cybertec.at
Subject: Re: permission denied for large object 200936761
In-Reply-To: <6efde177-a2b3-5100-d154-61bd2629c2ea@hot.ee>
References: <47c92baa-949b-92d1-c162-1f0d8348fb50@hot.ee> <2eee8862-ea29-3e9c-30ff-82ec7ad4d99f@aklaver.com> <08f90e7b-8d08-d46e-abb7-85dd68bc3078@hot.ee> <ed44153c97970e36d7f4266370fcb1d5110f2d91.camel@cybertec.at> <6f141378-2651-3c71-1bab-8b5700e45fbd@hot.ee> <6611d34f7f5ab443a6dbac4a188ba4a1f0ecf196.camel@cybertec.at> <ddd26ebf-b653-e6d1-c30c-f4b385031832@hot.ee> <f1b313941d768ae1c19ed0a5629af845050b4c4a.camel@cybertec.at> <b140314e-c4c5-8ba6-69b7-969f9e160391@hot.ee> <67a7abbc-6039-fee3-23e1-02bccc02376c@aklaver.com> <6efde177-a2b3-5100-d154-61bd2629c2ea@hot.ee>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox