Skip site navigation (1) Skip section navigation (2)

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: (view raw, whole thread or download thread mbox)
Lists: pgsql-interfacespgsql-sql
Suppose that I have created a LOB, written a bunch of data to it, and 

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

pgsql-interfaces by date

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

pgsql-sql by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group