.th REPLACE AM 9/14/77 .sh NAME replace - modify an existing tuple .sh SYNOPSIS .nf replace(d, tid, tuple, checkdups) struct descriptor *d; struct tup_id *tid; char tuple[MAXTUP]; int checkdups; .fi .sh DESCRIPTION REPLACE will replace the current value of the tuple identified by TID with the new value in TUPLE. CHECKDUPS has the same meaning for REPLACE as it does for INSERT. See INSERT for description. .sp REPLACE will normally put the new tuple in the same location occupied by the old tuple except if the relation is compressed or if the value of a keyed domain is changed. This is necessary in the former case because compression may give a tuple size different from the previous tuple, while in the latter case a new key value for the tuple may force the tuple to be located in a different section of the relation so that it can be found by FIND. The two exceptions are handled by calling DELETE to remove the old tuple and calling INSERT to add the new tuple. .sh DIAGNOSTICS .nf AMFIND_ERR -- unidentifiable storage structure in find AMWRITE_ERR -- write error AMREAD_ERR -- read error 0 -- success 1 -- new tuple was a duplicate Tid is set to the tuple id of the duplicate 2 -- tuple identified by tid has been deleted .fi .sh "TRACE FLAGS" 24.4, 24.5, 24.6 .sh "SEE ALSO" closer, delete, get, insert, openr