.TH REDEDIT 1
.SH NAME
rdedit \- create and manipulate relation definitions.
.SH SYNOPSIS
.B rdedit
.BI "[-c] [-t"
.I file_name
.BI "]"
.I relation_name
.SH DESCRIPTION
.I Rdedit
creates and manipulates relation definitions.
.PP
-c		creates: prompts for information, then edits.
-t file		use "file" as the template file.

Definition: a "user" is a login_name,host_name pair, usually it is written:
	login_name@host_name. There is a special "user" %any and a special
	host %any, which match any "user" (or host).

Only an owner can edit a relation's definition.

If the changers line is present, then an extra attribute is added: %user.
This attribute contains the "user" that created that tuple.
When redit [redit edits the tuples] is called,
only those tuples owned by the invoking "user" are available for edit.

If merge_method is tuple_date, then each tuple has an extra attribute:
%date which is the date it was last updated.

The idea behind merge_method is how we go about updates occuring on
multiple systems.  If 'relation_date' is chosen then the data_base copy
with the most recent authorization time is asssumed correct.  (To
protect against accidents the next_to_most_recent date is kept as well,
the copy of the most recent is allowed only if the next_to_most_recent
of the most recent is the same as the most_recent of the less recent.)
If 'tuple_date' is chosen then the tuple with most recently modified is
chosen for tuples with keys otherwise equal.

Outline:

0) Read in template, check to see that current "user" is owner of relation.

1) If -c ask for all items, else read rel file.

2) Dump to ascii file.

3) Invoke editor.

4) Check and translate ascii file.

5) Ask user if data should be checked (unless just created)

5) Write rel file.

There should be a way to set a template of defaults for each field.

Format of ascii file:
relation RELATION_NAME
owners '{' USER1 [ , USER2 [ ... ] ] '}'
merge_method { relation_date | tuple_date }
[ allow read '{' USER1 [ , USER2 [ ... ] ] '}' ] # not here implies {%any@%any}
[ allow change '{' USER1 [ , USER2 [ ... ] ] '}' ]
[ allow append '{' USER1 [ , USER2 [ ... ] ] '}' ]
data_from "[!]PATH_NAME"	# "!name" implies run a program called 'name'

Followed by possibly multiple occurances of:
attribute  ATTR_NAME string [ { "pattern" | ShortHandName |
					'{' list of strings '}' } ]
[key] attribute  ATTR_NAME text  # for multiple line unchecked text.
[key] attribute  ATTR_NAME integer(LOWER,UPPER)
[key] attribute  ATTR_NAME float(SIZE,DECPLACES,LOWER,UPPER)

BUGS
There probably ought to be a more flexible short hand mechanism
for pattern fields.
