Re: [ADMIN] Cannot retrieve images inserted through VB and odbc, after a table reorganization.

From: David G Johnston <david(dot)g(dot)johnston(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: [ADMIN] Cannot retrieve images inserted through VB and odbc, after a table reorganization.
Date: 2014-09-05 15:44:57
Message-ID: CAKFQuwZcp+TAxwf76oh5qo6RH+0K0v+9_eX1dcsXHA3BnpzDMA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin pgsql-general

On Fri, Sep 5, 2014 at 11:34 AM, Alanoly Andrews [via PostgreSQL] <
ml-node+s1045698n5817949h43(at)n5(dot)nabble(dot)com> wrote:

> Hi Adrian,
>
> 1. We are storing our large objects in a table column whose datatype is
> "lo" (which, I understand, ultimately is in fact "bytea").
>

The "lo" data type is effectively a domain over the "oid"​

​data type which is effectively a lookup key onto the large objects table.
While you can ultimately retrieve bytea data if you have an "lo" value the
"lo" data is not itself your binary content.

I'm confused because you seem confused here but the code actually works...

You still haven't provided a self-contained scenario ​which demonstrates
the problem - during which you should enable logging of all statements in
order to definitively see what it is that PostgreSQL is doing during the
test run.

One theory I have is that you've added:

CREATE TRIGGER t_raster BEFORE UPDATE OR DELETE ON image
FOR EACH ROW EXECUTE PROCEDURE lo_manage(raster);

to the relevant table and, arguably incorrectly, when the table rewrite
occurs the original row pointing to the large object goes away and so the
trigger removes the large object as it is designed to do. This really
doesn't make sense but the general mechanics of what this function does and
what you describe are too similar to ignore.

David J.

--
View this message in context: http://postgresql.1045698.n5.nabble.com/Cannot-retrieve-images-inserted-through-VB-and-odbc-after-a-table-reorganization-tp5817580p5817953.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Adrian Klaver 2014-09-05 22:09:04 Re: [GENERAL] Re: Cannot retrieve images inserted through VB and odbc, after a table reorganization.
Previous Message Alanoly Andrews 2014-09-05 15:33:14 Re: [GENERAL] Re: Cannot retrieve images inserted through VB and odbc, after a table reorganization.

Browse pgsql-general by date

  From Date Subject
Next Message Rich Shepard 2014-09-05 16:39:47 Re: Employee modeling question
Previous Message Nelson Green 2014-09-05 15:42:07 Re: Employee modeling question