Is it possible to "truncate" a LOB?

From: Stephen Crawley <crawley(at)dstc(dot)edu(dot)au>
To: pgsql-interfaces(at)postgresql(dot)org, pgsql-sql(at)postgresql(dot)org
Subject: Is it possible to "truncate" a LOB?
Date: 2000-06-06 00:35:48
Message-ID: 200006060035.e560Zn504797@piglet.dstc.edu.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-interfaces pgsql-sql


Suppose that I have created a LOB, written a bunch of data to it, and
committed.

Is it now possible to rewrite the LOB to contain a lesser amount of data?
In other words can I do the equivalent of UNIX open(..., O_WRONLY | O_TRUNC)
or ftruncate(...) on a LOB?

Or am I forced to delete the existing LOB and create a new one if I want
to shrink the size of the stored data?

-- Steve

Browse pgsql-interfaces by date

  From Date Subject
Next Message Peter Mount 2000-06-06 07:20:46 RE: Long atributes
Previous Message Tom Lane 2000-06-06 00:17:06 CVS location (was Re: Postgres 7.0 JDBC - update count for DELETE is always 1)

Browse pgsql-sql by date

  From Date Subject
Next Message Christopher Sawtell 2000-06-06 07:33:43 Re: [SQL] moving DB
Previous Message Tom Lane 2000-06-06 00:08:33 Re: Vacuum problem in my system ?