NAME
pmsql - Mini SQL Terminal Monitor
SYNOPSIS
pmsql [ -h host ] [ database ]
DESCRIPTION
Like all database applications, Msqlperl provides a program that allows a user to interactively submit queries to the database engine. In the case of Msqlperl, it's a program simply called pmsql and completely written in perl. The mSQL distribution comes with its own monitor program msql. It requires one command line argument, being the name of the database to access. Once started, there is no way to swap databases without restarting the program. this program is the main user interface to the database engine. This monitor hasn been modelled after the original Ingres (and the subsequent Postgres) monitor program.
See libmsql(3) for Details in specifying a hostname.
You may get full access to the database via mSQL queries according configured access rules. Each query must be followed by ` (see later) to get sent to the engine. See msql(5) for the supported subset of ANSI-SQL.
COMMANDS
Queries and commands are distinguished due to commands being prefixed by backslashes.
- ?
-
Print usage summary and current host and database.
- ho[st] host
-
Set default host to host.
- da[tabase] database
-
Set default database to database.
- re[lshow] [ -h host ] [ database ] [ table ] [ index ]
-
Describe databases or tables in the same way as done by the relshow program. If host or database are specified, the defaults are set to these values. The prameter index is only supported for mSQL-2.0.
- ! EXPR
-
Eval the EXPR In Perl.
- q[uit]
-
Leave pmsql.
Completion
pmsql comes with some basic completion definitions that are far from being perfect. Completion means, you can use the TAB character to run some lookup routines on the current host or database and use the results to save a few keystrokes.
The completion mechanism is very basic, and I'm not intending to refine it in the near future. Feel free to implement your own refinements and let me know, if you have something better than what we have here.
SEE ALSO
libmsql(3), msql(5), perldocpmsql.