Re: Postgresql table reloading

From: Joel Burton <jburton(at)scw(dot)org>
To: David Wall <dwall(at)Yozons(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Postgresql table reloading
Date: 2001-05-05 16:16:54
Message-ID: Pine.LNX.4.21.0105051213540.16683-100000@olympus.scw.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Fri, 4 May 2001, David Wall wrote:

> Sorry to bother you personally, but I read your "Updating columns in PostgreSQL tables effectively" page and had a question.
>
> Will the temporary table scheme work if the table contains blobs (identified by OIDs)? In my case, I don't need to preserve the actual OID number (it's not a key), but I do need the blob that's behind the OID to be copied. Will the INSERT..SELECT FROM syntax carry the blobs over?

(cross-posted to pgsql-general, so others can find this in the archives)

In the table, you're storing the OID of the large object itself, so if you
copy all the contents of the table, so far as I can see, yes, you'd still
have the reference to your large object.

(The table row of your current table has an OID, and when you create the
temporary table--which becomes the new table--it will have a different
OID, but that shouldn't matter, since all you care about is the LO oid.

However, I'm not a BLOB expert, and haven't used them in any real systems.

Do try this out on a test table before doing it for real.

HTH,
--
Joel Burton <jburton(at)scw(dot)org>
Director of Information Systems, Support Center of Washington

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Ludwig Meyerhoff 2001-05-05 16:27:30 Sequences - problem
Previous Message Erick Papadakis 2001-05-05 16:13:01 Re: Re: How to install on Windows?