truncate capability in 8.1

From: Larry Kincaid <lwkinca(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: truncate capability in 8.1
Date: 2009-04-21 14:31:55
Message-ID: af030eb40904210731ke1fdf84n8d1958e221f4df26@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi-
Using postgresql 8.1 on RHEL 5.3, would like to be able to update (e.g.,
overwrite) a large object in place. Ultimately, I'd like to delete the
original large object, add a new one, but keep the original Oid. I've
looked at using lo_open, lo_read, lo_write, but if the new file is smaller
than the original file, I need to truncate the original. Unfortunately,
lo_truncate isn't implemented until 8.3 so I was hoping to get some ideas
from other folks on the best way to do this using capability available in
8.1. Are there any "gotchas" directly manipulating the pglargeobject table?

- larry

Browse pgsql-general by date

  From Date Subject
Next Message Filip Rembiałkowski 2009-04-21 14:55:14 Re: Re-Install data folder failure
Previous Message Alvaro Herrera 2009-04-21 14:29:29 Re: This is my first template