|
|
1.1 root 1: .th INSERT AM 9/13/77
2: .sh NAME
3: insert - add a new tuple to a relation
4: .sh SYNOPSIS
5: .nf
6: insert(d, tid, tuple, checkdups)
7: struct descriptor *d;
8: struct tup_id *tid;
9: char tuple[MAXTUP];
10: int checkdups;
11: .fi
12: .sh DESCRIPTION
13: INSERT will insert the offered tuple into the "correct"
14: position in the relation. TID will be set to the TID which is
15: assigned to the tuple.
16: Normally INSERT should be called with CHECKDUPS = 1 which will
17: cause INSERT to check for a duplicate tuple prior to making the
18: insertion. In certain special cases when dealing with INGRES
19: system relations (i.e. RELATION, ATTRIBUTE, etc.),
20: the calling program may know that a check for duplicates is not
21: necessary and may call INSERT with CHECKDUPS = 0.
22: If the relation is stored as a heap (D->RELSPEC = 5),
23: checkdups will be ignored
24: and assumed to be false.
25: .sh DIAGNOSTICS
26: .nf
27: AMFIND_ERR -- unidentifiable storage structure
28: AMWRITE_ERR -- write error
29: AMREAD_ERR -- read error
30: 0 -- success
31: 1 -- a duplicate of TUPLE was found
32: Tid will be set to the tuple id of the duplicate.
33: .fi
34: .sh "TRACE FLAGS"
35: 24.0
36: .sh "SEE ALSO"
37: closer, findbest, openr, put_tuple
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.