{"id":1011,"date":"2017-12-28T10:53:42","date_gmt":"2017-12-28T10:53:42","guid":{"rendered":"http:\/\/www.dbafox.com\/?p=1011"},"modified":"2017-12-28T10:53:42","modified_gmt":"2017-12-28T10:53:42","slug":"postgresql-help","status":"publish","type":"post","link":"https:\/\/dbafox.com\/?p=1011","title":{"rendered":"postgresql &#8211; help"},"content":{"rendered":"\n<pre class=\"toolbar-overlay:false lang:sh decode:true \" title=\"psql --help\" >psql is the PostgreSQL interactive terminal.\r\n\r\nUsage:\r\n  psql [OPTION]... [DBNAME [USERNAME]]\r\n\r\nGeneral options:\r\n  -c, --command=COMMAND    run only single command (SQL or internal) and exit\r\n  -d, --dbname=DBNAME      database name to connect to (default: \"RAYFOX\")\r\n  -f, --file=FILENAME      execute commands from file, then exit\r\n  -l, --list               list available databases, then exit\r\n  -v, --set=, --variable=NAME=VALUE\r\n                           set psql variable NAME to VALUE\r\n                           (e.g., -v ON_ERROR_STOP=1)\r\n  -V, --version            output version information, then exit\r\n  -X, --no-psqlrc          do not read startup file (~\/.psqlrc)\r\n  -1 (\"one\"), --single-transaction\r\n                           execute as a single transaction (if non-interactive)\r\n  -?, --help[=options]     show this help, then exit\r\n      --help=commands      list backslash commands, then exit\r\n      --help=variables     list special variables, then exit\r\n\r\nInput and output options:\r\n  -a, --echo-all           echo all input from script\r\n  -b, --echo-errors        echo failed commands\r\n  -e, --echo-queries       echo commands sent to server\r\n  -E, --echo-hidden        display queries that internal commands generate\r\n  -L, --log-file=FILENAME  send session log to file\r\n  -n, --no-readline        disable enhanced command line editing (readline)\r\n  -o, --output=FILENAME    send query results to file (or |pipe)\r\n  -q, --quiet              run quietly (no messages, only query output)\r\n  -s, --single-step        single-step mode (confirm each query)\r\n  -S, --single-line        single-line mode (end of line terminates SQL command)\r\n\r\nOutput format options:\r\n  -A, --no-align           unaligned table output mode\r\n  -F, --field-separator=STRING\r\n                           field separator for unaligned output (default: \"|\")\r\n  -H, --html               HTML table output mode\r\n  -P, --pset=VAR[=ARG]     set printing option VAR to ARG (see \\pset command)\r\n  -R, --record-separator=STRING\r\n                           record separator for unaligned output (default: newline)\r\n  -t, --tuples-only        print rows only\r\n  -T, --table-attr=TEXT    set HTML table tag attributes (e.g., width, border)\r\n  -x, --expanded           turn on expanded table output\r\n  -z, --field-separator-zero\r\n                           set field separator for unaligned output to zero byte\r\n  -0, --record-separator-zero\r\n                           set record separator for unaligned output to zero byte\r\n\r\nConnection options:\r\n  -h, --host=HOSTNAME      database server host or socket directory (default: \"local socket\")\r\n  -p, --port=PORT          database server port (default: \"5432\")\r\n  -U, --username=USERNAME  database user name (default: \"RAYFOX\")\r\n  -w, --no-password        never prompt for password\r\n  -W, --password           force password prompt (should happen automatically)\r\n\r\nFor more information, type \"\\?\" (for internal commands) or \"\\help\" (for SQL\r\ncommands) from within psql, or consult the psql section in the PostgreSQL\r\ndocumentation.\r\n\r\nReport bugs to &lt;pgsql-bugs@postgresql.org&gt;.<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>psql is the PostgreSQL interactive terminal. Usage: psql [OPTION]&#8230; [DBNAME [USERNAME]] General options: -c, &#8211;command=COMMAND run only single command (SQL or internal) and exit -d, &#8211;dbname=DBNAME database name to connect to (default: &#8220;RAYFOX&#8221;) -f, &#8211;file=FILENAME execute commands from file, then &hellip; <a href=\"https:\/\/dbafox.com\/?p=1011\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"pgc_sgb_lightbox_settings":"","_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[50],"tags":[51],"class_list":["post-1011","post","type-post","status-publish","format-standard","hentry","category-postgresql","tag-postgresql"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.6 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>postgresql - help - dbafox<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/dbafox.com\/?p=1011\" \/>\n<meta property=\"og:locale\" content=\"en_GB\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"postgresql - help - dbafox\" \/>\n<meta property=\"og:description\" content=\"psql is the PostgreSQL interactive terminal. Usage: psql [OPTION]... [DBNAME [USERNAME]] General options: -c, --command=COMMAND run only single command (SQL or internal) and exit -d, --dbname=DBNAME database name to connect to (default: &quot;RAYFOX&quot;) -f, --file=FILENAME execute commands from file, then &hellip; Continue reading &rarr;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/dbafox.com\/?p=1011\" \/>\n<meta property=\"og:site_name\" content=\"dbafox\" \/>\n<meta property=\"article:published_time\" content=\"2017-12-28T10:53:42+00:00\" \/>\n<meta name=\"author\" content=\"Ray Fox\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Ray Fox\" \/>\n\t<meta name=\"twitter:label2\" content=\"Estimated reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/dbafox.com\/?p=1011\",\"url\":\"https:\/\/dbafox.com\/?p=1011\",\"name\":\"postgresql - help - dbafox\",\"isPartOf\":{\"@id\":\"https:\/\/dbafox.com\/#website\"},\"datePublished\":\"2017-12-28T10:53:42+00:00\",\"author\":{\"@id\":\"https:\/\/dbafox.com\/#\/schema\/person\/287adc474c1aebd398752ac4dcfe27eb\"},\"breadcrumb\":{\"@id\":\"https:\/\/dbafox.com\/?p=1011#breadcrumb\"},\"inLanguage\":\"en-GB\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/dbafox.com\/?p=1011\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/dbafox.com\/?p=1011#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/dbafox.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"postgresql &#8211; help\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/dbafox.com\/#website\",\"url\":\"https:\/\/dbafox.com\/\",\"name\":\"dbafox\",\"description\":\"DBA Technical Information\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/dbafox.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-GB\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/dbafox.com\/#\/schema\/person\/287adc474c1aebd398752ac4dcfe27eb\",\"name\":\"Ray Fox\",\"sameAs\":[\"http:\/\/www.dbafox.com\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"postgresql - help - dbafox","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/dbafox.com\/?p=1011","og_locale":"en_GB","og_type":"article","og_title":"postgresql - help - dbafox","og_description":"psql is the PostgreSQL interactive terminal. Usage: psql [OPTION]... [DBNAME [USERNAME]] General options: -c, --command=COMMAND run only single command (SQL or internal) and exit -d, --dbname=DBNAME database name to connect to (default: \"RAYFOX\") -f, --file=FILENAME execute commands from file, then &hellip; Continue reading &rarr;","og_url":"https:\/\/dbafox.com\/?p=1011","og_site_name":"dbafox","article_published_time":"2017-12-28T10:53:42+00:00","author":"Ray Fox","twitter_misc":{"Written by":"Ray Fox","Estimated reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/dbafox.com\/?p=1011","url":"https:\/\/dbafox.com\/?p=1011","name":"postgresql - help - dbafox","isPartOf":{"@id":"https:\/\/dbafox.com\/#website"},"datePublished":"2017-12-28T10:53:42+00:00","author":{"@id":"https:\/\/dbafox.com\/#\/schema\/person\/287adc474c1aebd398752ac4dcfe27eb"},"breadcrumb":{"@id":"https:\/\/dbafox.com\/?p=1011#breadcrumb"},"inLanguage":"en-GB","potentialAction":[{"@type":"ReadAction","target":["https:\/\/dbafox.com\/?p=1011"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/dbafox.com\/?p=1011#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/dbafox.com\/"},{"@type":"ListItem","position":2,"name":"postgresql &#8211; help"}]},{"@type":"WebSite","@id":"https:\/\/dbafox.com\/#website","url":"https:\/\/dbafox.com\/","name":"dbafox","description":"DBA Technical Information","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/dbafox.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-GB"},{"@type":"Person","@id":"https:\/\/dbafox.com\/#\/schema\/person\/287adc474c1aebd398752ac4dcfe27eb","name":"Ray Fox","sameAs":["http:\/\/www.dbafox.com"]}]}},"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p3ecMb-gj","_links":{"self":[{"href":"https:\/\/dbafox.com\/index.php?rest_route=\/wp\/v2\/posts\/1011","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/dbafox.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/dbafox.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/dbafox.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/dbafox.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1011"}],"version-history":[{"count":2,"href":"https:\/\/dbafox.com\/index.php?rest_route=\/wp\/v2\/posts\/1011\/revisions"}],"predecessor-version":[{"id":1013,"href":"https:\/\/dbafox.com\/index.php?rest_route=\/wp\/v2\/posts\/1011\/revisions\/1013"}],"wp:attachment":[{"href":"https:\/\/dbafox.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1011"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dbafox.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1011"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dbafox.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1011"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}