Return-Path: pg_adm@postgres.berkeley.edu
Received: by postgres.Berkeley.EDU (5.61/1.29)
	id AA00986; Sat, 20 Feb 93 16:14:00 -0800
Date: Sat, 20 Feb 93 16:14:00 -0800
Message-Id: <9302210014.AA00986@postgres.Berkeley.EDU>
From: joseash@bush.cs.tamu.edu (Alfredo Sanchez)
Subject: rewriting to Large Objects
To: postgres@postgres.berkeley.edu
Sender: pg_adm@postgres.berkeley.edu


I'm having a problem when re-writing to an existing
inversion large object.

p_create works fine, but the combination of p_open
and p_write does not work as I expected. It seems that
when opening an object the location pointer is positioned
at the end of the existing data. I did an lseek(fd,0,L_SET)
and it seems to work, but data is not completely overwritten.
The objects I'm using for my tests are ascii text, and it
seems that if a space is in the new data, the old character
is not overwritten. E.g. if an object initially contains
	'ABCDEABCDEABCDE'
and I try to replace it with
	'12345     12345'
the new object is
	'12345ABCDE12345'

Occasionally (I haven't observed a pattern) postgres crashes
with the msg:

Error: Unexpected identifier: ?.~~~

Also, how can space used by large objects be freed?

Thanks in advance for any help you can provide.

J Alfredo Sanchez H
-------------------
Hypermedia Research Lab
Texas A&M University
