10/30/2022 0 Comments Pg commander psql version![]() ![]() That means the user is prompted before each command is sent s | -single-step Run in single-step mode. R separator | -record-separator= separator Use separator as the record separator for unaligned output. Welcome messages and various informational output. q | -quiet Specifies that psql should do its work quietly. Thus to set the output format to LaTeX, you could Note that here you have to separate name and value with an equal sign P assignment | -pset= assignment Allows you to specify printing options in the style of \pset on theĬommand line. o filename | -output= filename Put all query output into the specified file. Useful to turn off tab expansion when cutting and pasting. n | -no-readline Do not use Readline for line editing and do not use the command history. L filename | -log-file= filename Write all query output into the specified log file, in addition to the normal outputĭestination. l | -list List all available databases, then exit. F separator | -field-separator= separator Use the specified separator as the field separator for unaligned output. Theory) guaranteed to yield exactly the same output you would have received had youĮntered everything by hand. On the other hand, the variant using the shell's input redirection is (in There is also a slight chance that using this option will reduce the start-up Using -f enables some nice features such as error messages with line In general, both will do what you expect, but Using this option is subtly different from writing psql <įilename. In this case (much as if -n had been specified). If filename is - (hyphen), then standard input is read until an EOF This is in many ways equivalent to the meta-command \i. After the file is processed, psql terminates. f filename | -file= filename Use the file filename as the source of commands instead of readingĬommands interactively. This isĮquivalent to setting the variable ECHO_HIDDEN to You can use this to study psql's internal operations. E | -echo-hidden Echo the actual queries generated by \d and other backslash commands. e | -echo-queries Copy all SQL commands sent to the server to standard output as well. See Connection Strings in the PostgreSQLĭocumentation for more information. Prefix ( postgresql:// or postgres://), it is treatedĪs a conninfo string. If this parameter contains an = sign or starts with a valid URI This is equivalent to specifyingĭbname as the first non-option argument on the command line. d dbname | -dbname= dbname Specifies the name of the database to connect to. Only the result of the last SQL command is returned. This is different from theīehavior when the same string is fed to psql's standard input. In the string to divide it into multiple transactions. Transaction, unless there are explicit BEGIN/COMMIT commands included ![]() This: echo '\x \\ SELECT * FROM foo ' | psql ( \\ is the separator meta-command.) If the command string contains multiple SQL commands, they are processed in a single To achieve that, you could pipe the string into psql, like ![]() Thus you cannot mix SQL and psql meta-commands with this command must be either aĬommand string that is completely parseable by the server, or a single backslashĬommand. (The default output mode is aligned.) -c ' command' | -command=' command' Specifies that psql is to execute the specified command string, and ![]() A | -no-align Switches to unaligned output mode. (This does notĪpply to lines read interactively.) This is equivalent to setting the variableĮCHO to all. Options -a | -echo-all Print all nonempty input lines to standard output as they are read. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |