Re: permission denied for large object 200936761

Поиск
Список
Период
Сортировка
От Adrian Klaver
Тема Re: permission denied for large object 200936761
Дата
Msg-id 67a7abbc-6039-fee3-23e1-02bccc02376c@aklaver.com
обсуждение исходный текст
Ответ на Re: permission denied for large object 200936761  (Andrus <kobruleht2@hot.ee>)
Ответы Re: permission denied for large object 200936761  (Andrus <kobruleht2@hot.ee>)
Список pgsql-general
On 2/2/21 4:12 AM, Andrus wrote:
> Hi!
> 
> 
>> So?  What is your point?
>> Somebody created a large object of size 0.
> 
> report table has bytea column. It looks like  psqlodbc driver adds ::lo 
> cast  when inserting binary data:
> 
> https://github.com/hlinnaka/psqlodbc/blob/master/convert.c#L4564
> 
> and this adds row to pg_largeobject_metadata table. >
> Why it adds cast to lo type ? This type does not exist in Postgres 
> server and causes server error.

The comment for the code snippet you linked to is:

"/*
   * the oid of the large object -- just put that in for the
   * parameter marker -- the data has already been sent to
   * the large object
*/"

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?

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. 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/


> 
> Andrus.
> 
> 


-- 
Adrian Klaver
adrian.klaver@aklaver.com



В списке pgsql-general по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: libpq and mysterious "invalid byte sequence for encoding UTF8".
Следующее
От: Joao Miguel Ferreira
Дата:
Сообщение: pg_dumpall and tablespaces