Recently Viewed Topics
Shortcuts for Running SQL Commands and Scripts
After logging in to a console window and invoking:
A reminder banner will appear:
USAGE of the enabled shortcuts:
psqlc "<a SQL command>"
psqlf <path to script with SQL commands> [<arg1> [<arg2> [...]]]
Invokes interactive prompt. Note that you can also invoke SQL scripts
from within the interactive prompt, like so: \i <path to script>
; you will then be prompted for script args.
psqlf shortcut is useful for easily running the various SQL scripts packaged with LCE and found under
/opt/lce/tools/pg-helper-sql/. Assuming you are in
/opt/lce/tools/ directory, here is an example of running a SQL script that takes no arguments:
And here is an example of running a SQL script that takes an argument:
psqlf pg-helper-sql/disk-usage-one-silo.sql 0
The individual SQL scripts relevant to administration and to troubleshooting or performance tuning will be summarized in the Tools section.