-c --command
or runs one command and exits.
-c
command
or--command
command
runs one command and exits. This is useful in shell scripts.
Use either:
-
A command string that can be completely parsed by the server that does not contain features specific to vsql
-
A single meta-command
You cannot mix SQL and vsql meta-commands. You can, however, pipe the string into vsql as shown:
echo "\\timing\\\\select * from t" | ../Linux64/bin/vsql
Timing is on.
i | c | v
---+---+---
(0 rows)
Note
If you use double quotes (") withecho
, you must double the backslashes ().