shsql: dataedit(1) manual page

SQL database system
| Manual page for dataedit(1)(manual)

## dataedit(1)

Usage: `dataedit` tablename`[-c` command`] [-s]
`

## Description

dataedit allows a database table data file to be edited manually or modified by an external program.`` tablename must be only the table name, not the entire path name of the table data file.`` dataedit cannot be used with ordinary files or temporary tables.``

dataedit makes a separate working copy of the datafile and invokes a text editor based on the EDITOR environment variable (default is vi). At the end of the editing session, a sanity check (field count) is run on the result, and the user has a chance to discard the result at that point.`` If the user elects to keep the result, dataedit will rebuild any indexes associated with the table (except with `-s`).``

dataedit follows shsql locking conventions.. it holds a write-lock on the table file for the duration, and it holds a read-lock during the short time that the temp file overwrites the original data file.``

Example: `dataedit auctionitems`

## Options

-c command

  command is a shell command which is invoked, presumably to update the data file. command should be enclosed in quotes so that it appears as one argument on the dataedit command line.`` It should contain the special symbol `%s`. The temp file name will be substituted into this symbol.``
  Example: `dataedit pheno_dump -c "compute_stats_1 %s"`

-s

  Skip automatic rebuild of indexes afterwards.``

## Notes

dataedit is intended for administrative use by the database owner.`` Actual access control is enforced by unix permissions on the data file.``

Obviously, care should be exercised during manual editing. Valid table structure must be maintained.``

## Environment

discussed here.`` The EDITOR environment variable is used to decide which text editor to fire up.
Copyright Steve Grubb

Markup created by unroff 1.0, `` `` March 18, 2004.