{"id":3993,"date":"2019-02-04T17:15:25","date_gmt":"2019-02-04T15:15:25","guid":{"rendered":"https:\/\/www.systemcodegeeks.com\/?p=3993"},"modified":"2019-02-04T13:53:30","modified_gmt":"2019-02-04T11:53:30","slug":"queries-behind-psqls-backslash-commands","status":"publish","type":"post","link":"https:\/\/www.systemcodegeeks.com\/databases\/postgresql\/queries-behind-psqls-backslash-commands\/","title":{"rendered":"Revealing the Queries Behind psql&#8217;s Backslash Commands"},"content":{"rendered":"\n<p><a href=\"https:\/\/www.postgresql.org\/\">PostgreSQL<\/a>&#8216;s <a href=\"https:\/\/www.postgresql.org\/docs\/11\/app-psql.html\">psql interactive terminal tool<\/a> provides several useful &#8220;<a href=\"https:\/\/alvinalexander.com\/blog\/post\/postgresql\/what-are-available-listing-commands-in-postgresql\">backslash list commands<\/a>&#8221; such as <code>\\d<\/code> (lists &#8220;relations&#8221; such as tables, views, indexes, and sequences), <code>\\dt<\/code> (lists tables), <code>\\di<\/code> (lists indexes), <code>\\ds<\/code> (lists sequences), <code>\\dv<\/code> (lists views), <code>\\df<\/code> (lists functions), <code>\\du<\/code> (lists roles), and <code>\\?<\/code> (displays <a href=\"https:\/\/alvinalexander.com\/blog\/post\/postgresql\/list-postgresql-slash-commands\">help\/usage details on backslash commands<\/a>). These commands are concise and much simpler to use than writing the queries against PostgreSQL <a href=\"https:\/\/www.postgresql.org\/docs\/11\/catalogs.html\">system catalogs<\/a> (<a href=\"https:\/\/www.postgresql.org\/docs\/11\/catalog-pg-class.html\">pg_class<\/a>, <a href=\"https:\/\/www.postgresql.org\/docs\/11\/view-pg-roles.html\">pg_roles<\/a>, <a href=\"https:\/\/www.postgresql.org\/docs\/11\/catalog-pg-namespace.html\">pg_namespace<\/a>, <a href=\"https:\/\/www.postgresql.org\/docs\/11\/catalog-pg-trigger.html\">pg_trigger<\/a>, <a href=\"https:\/\/www.postgresql.org\/docs\/11\/catalog-pg-index.html\">pg_index<\/a>, etc.) and <a href=\"https:\/\/www.postgresql.org\/docs\/current\/information-schema.html\">information_schema<\/a> that would provide the same types of details.<\/p>\n\n\n\n<p>Although the <code>psql<\/code> backslash commands are easier to use than their associated queries, there are situations when it is important to know the <a href=\"https:\/\/stackoverflow.com\/a\/11024420\">full query<\/a> behind a particular command. These situations include needing to perform a slightly different\/adapted query from that associated with the pre-built command and needing to perform similar queries in scripts or code that are being used as PostgreSQL clients instead of <code>psql<\/code>. These situations make it important to be able to determine what queries <code>psql<\/code> is performing and the <code>psql<\/code> option <code>-E<\/code> (or <code>--echo-hidden<\/code>) allow that.<\/p>\n\n\n\n<p>The <a href=\"https:\/\/www.postgresql.org\/docs\/11\/app-psql.html\">PostgreSQL psql documentation<\/a> states that the <code>psql<\/code> options <code>-E<\/code> and <code>--echo-hidden<\/code> &#8220;echo the actual queries generated by <code>\\d<\/code> and other backslash commands.&#8221; The documentation adds commentary on why this is useful, &#8220;You can use this to study psql&#8217;s internal operations.&#8221; When <code>psql<\/code> is started with the <code>-E<\/code> or <code>--echo-hidden<\/code> options, it will display the query associated with a backslash command before executing that command. The next screen snapshot illustrates this for the <code>\\du<\/code> command used to show roles.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img decoding=\"async\" width=\"684\" height=\"365\" src=\"http:\/\/www.systemcodegeeks.com\/wp-content\/uploads\/2019\/02\/20190202-displayingPsqlBlackSlashRolesQueryForDU.png\" alt=\"psql Backslash Commands\" class=\"wp-image-3995\" srcset=\"https:\/\/www.systemcodegeeks.com\/wp-content\/uploads\/2019\/02\/20190202-displayingPsqlBlackSlashRolesQueryForDU.png 684w, https:\/\/www.systemcodegeeks.com\/wp-content\/uploads\/2019\/02\/20190202-displayingPsqlBlackSlashRolesQueryForDU-300x160.png 300w, https:\/\/www.systemcodegeeks.com\/wp-content\/uploads\/2019\/02\/20190202-displayingPsqlBlackSlashRolesQueryForDU-620x330.png 620w\" sizes=\"(max-width: 684px) 100vw, 684px\" \/><\/figure><\/div>\n\n\n\n<p>From use of <code>psql -E<\/code> and execution of the command <code>\\du<\/code>, we&#8217;re able to see that the query underling <code>\\du<\/code> is this:<\/p>\n\n\n\n<div>\n<div id=\"highlighter_340658\" class=\"syntaxhighlighter  sql\">\n<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\n<tbody>\n<tr>\n<td class=\"gutter\">\n<div class=\"line number1 index0 alt2\">1<\/div>\n<div class=\"line number2 index1 alt1\">2<\/div>\n<div class=\"line number3 index2 alt2\">3<\/div>\n<div class=\"line number4 index3 alt1\">4<\/div>\n<div class=\"line number5 index4 alt2\">5<\/div>\n<div class=\"line number6 index5 alt1\">6<\/div>\n<div class=\"line number7 index6 alt2\">7<\/div>\n<div class=\"line number8 index7 alt1\">8<\/div>\n<div class=\"line number9 index8 alt2\">9<\/div>\n<div class=\"line number10 index9 alt1\">10<\/div>\n<div class=\"line number11 index10 alt2\">11<\/div>\n<div class=\"line number12 index11 alt1\">12<\/div>\n<\/td>\n<td class=\"code\">\n<div class=\"container\">\n<div class=\"line number1 index0 alt2\"><code class=\"sql keyword\">SELECT<\/code> <code class=\"sql plain\">r.rolname, r.rolsuper, r.rolinherit,<\/code><\/div>\n<div class=\"line number2 index1 alt1\"><code class=\"sql spaces\">&nbsp;&nbsp;<\/code><code class=\"sql plain\">r.rolcreaterole, r.rolcreatedb, r.rolcanlogin,<\/code><\/div>\n<div class=\"line number3 index2 alt2\"><code class=\"sql spaces\">&nbsp;&nbsp;<\/code><code class=\"sql plain\">r.rolconnlimit, r.rolvaliduntil,<\/code><\/div>\n<div class=\"line number4 index3 alt1\"><code class=\"sql spaces\">&nbsp;&nbsp;<\/code><code class=\"sql plain\">ARRAY(<\/code><code class=\"sql keyword\">SELECT<\/code> <code class=\"sql plain\">b.rolname<\/code><\/div>\n<div class=\"line number5 index4 alt2\"><code class=\"sql spaces\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/code><code class=\"sql keyword\">FROM<\/code> <code class=\"sql plain\">pg_catalog.pg_auth_members m<\/code><\/div>\n<div class=\"line number6 index5 alt1\"><code class=\"sql spaces\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/code><code class=\"sql color1\">JOIN<\/code> <code class=\"sql plain\">pg_catalog.pg_roles b <\/code><code class=\"sql keyword\">ON<\/code> <code class=\"sql plain\">(m.roleid = b.oid)<\/code><\/div>\n<div class=\"line number7 index6 alt2\"><code class=\"sql spaces\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/code><code class=\"sql keyword\">WHERE<\/code> <code class=\"sql plain\">m.member = r.oid) <\/code><code class=\"sql keyword\">as<\/code> <code class=\"sql plain\">memberof<\/code><\/div>\n<div class=\"line number8 index7 alt1\"><code class=\"sql plain\">, r.rolreplication<\/code><\/div>\n<div class=\"line number9 index8 alt2\"><code class=\"sql plain\">, r.rolbypassrls<\/code><\/div>\n<div class=\"line number10 index9 alt1\"><code class=\"sql keyword\">FROM<\/code> <code class=\"sql plain\">pg_catalog.pg_roles r<\/code><\/div>\n<div class=\"line number11 index10 alt2\"><code class=\"sql keyword\">WHERE<\/code> <code class=\"sql plain\">r.rolname !~ <\/code><code class=\"sql string\">'^pg_'<\/code><\/div>\n<div class=\"line number12 index11 alt1\"><code class=\"sql keyword\">ORDER<\/code> <code class=\"sql keyword\">BY<\/code> <code class=\"sql plain\">1;<\/code><\/div>\n<\/div>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n\n\n\n<p>Although the query is not nearly as nice to use as <code>\\du<\/code>, we are now able to adapt this query for a related but different use case and are able to run this query from a PostgreSQL client other than <code>psql<\/code>.<\/p>\n\n\n\n<div class=\"attribution\">\n<table>\n<tbody>\n<tr>\n<td>\n<p>Published on System Code Geeks with permission by Dustin Marx, partner at our <a href=\"\/\/www.systemcodegeeks.com\/join-us\/scg\/\" target=\"_blank\" rel=\"noopener\">SCG program<\/a>. See the original article here: <a href=\"http:\/\/marxsoftware.blogspot.com\/2019\/02\/psql-backslash-commands-queries.html\" target=\"_blank\" rel=\"noopener\">Revealing the Queries Behind psql&#8217;s Backslash Commands<\/a><\/p>\n<p>Opinions expressed by System Code Geeks contributors are their own.<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>PostgreSQL&#8216;s psql interactive terminal tool provides several useful &#8220;backslash list commands&#8221; such as \\d (lists &#8220;relations&#8221; such as tables, views, indexes, and sequences), \\dt (lists tables), \\di (lists indexes), \\ds (lists sequences), \\dv (lists views), \\df (lists functions), \\du (lists roles), and \\? (displays help\/usage details on backslash commands). These commands are concise and much &hellip;<\/p>\n","protected":false},"author":3990,"featured_media":198,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[34],"tags":[],"class_list":["post-3993","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-postgresql"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Revealing the Queries Behind psql&#039;s Backslash Commands - System Code Geeks - 2026<\/title>\n<meta name=\"description\" content=\"Interested to learn about psql Backslash Commands? Check our article revealing the Queries Behind psql&#039;s Backslash Commands\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.systemcodegeeks.com\/databases\/postgresql\/queries-behind-psqls-backslash-commands\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Revealing the Queries Behind psql&#039;s Backslash Commands - System Code Geeks - 2026\" \/>\n<meta property=\"og:description\" content=\"Interested to learn about psql Backslash Commands? Check our article revealing the Queries Behind psql&#039;s Backslash Commands\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.systemcodegeeks.com\/databases\/postgresql\/queries-behind-psqls-backslash-commands\/\" \/>\n<meta property=\"og:site_name\" content=\"System Code Geeks\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/systemcodegeeks\" \/>\n<meta property=\"article:published_time\" content=\"2019-02-04T15:15:25+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.systemcodegeeks.com\/wp-content\/uploads\/2016\/01\/postgresql-logo.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"150\" \/>\n\t<meta property=\"og:image:height\" content=\"150\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Dustin Marx\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@systemcodegeeks\" \/>\n<meta name=\"twitter:site\" content=\"@systemcodegeeks\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Dustin Marx\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. 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\":\"Article\",\"@id\":\"https:\/\/www.systemcodegeeks.com\/databases\/postgresql\/queries-behind-psqls-backslash-commands\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.systemcodegeeks.com\/databases\/postgresql\/queries-behind-psqls-backslash-commands\/\"},\"author\":{\"name\":\"Dustin Marx\",\"@id\":\"https:\/\/www.systemcodegeeks.com\/#\/schema\/person\/09197bb4e9a891b2589891c42bf5ceb1\"},\"headline\":\"Revealing the Queries Behind psql&#8217;s Backslash Commands\",\"datePublished\":\"2019-02-04T15:15:25+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.systemcodegeeks.com\/databases\/postgresql\/queries-behind-psqls-backslash-commands\/\"},\"wordCount\":343,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.systemcodegeeks.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.systemcodegeeks.com\/databases\/postgresql\/queries-behind-psqls-backslash-commands\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.systemcodegeeks.com\/wp-content\/uploads\/2016\/01\/postgresql-logo.jpg\",\"articleSection\":[\"PostgreSQL\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.systemcodegeeks.com\/databases\/postgresql\/queries-behind-psqls-backslash-commands\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.systemcodegeeks.com\/databases\/postgresql\/queries-behind-psqls-backslash-commands\/\",\"url\":\"https:\/\/www.systemcodegeeks.com\/databases\/postgresql\/queries-behind-psqls-backslash-commands\/\",\"name\":\"Revealing the Queries Behind psql's Backslash Commands - System Code Geeks - 2026\",\"isPartOf\":{\"@id\":\"https:\/\/www.systemcodegeeks.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.systemcodegeeks.com\/databases\/postgresql\/queries-behind-psqls-backslash-commands\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.systemcodegeeks.com\/databases\/postgresql\/queries-behind-psqls-backslash-commands\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.systemcodegeeks.com\/wp-content\/uploads\/2016\/01\/postgresql-logo.jpg\",\"datePublished\":\"2019-02-04T15:15:25+00:00\",\"description\":\"Interested to learn about psql Backslash Commands? Check our article revealing the Queries Behind psql's Backslash Commands\",\"breadcrumb\":{\"@id\":\"https:\/\/www.systemcodegeeks.com\/databases\/postgresql\/queries-behind-psqls-backslash-commands\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.systemcodegeeks.com\/databases\/postgresql\/queries-behind-psqls-backslash-commands\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.systemcodegeeks.com\/databases\/postgresql\/queries-behind-psqls-backslash-commands\/#primaryimage\",\"url\":\"https:\/\/www.systemcodegeeks.com\/wp-content\/uploads\/2016\/01\/postgresql-logo.jpg\",\"contentUrl\":\"https:\/\/www.systemcodegeeks.com\/wp-content\/uploads\/2016\/01\/postgresql-logo.jpg\",\"width\":150,\"height\":150},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.systemcodegeeks.com\/databases\/postgresql\/queries-behind-psqls-backslash-commands\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.systemcodegeeks.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Databases\",\"item\":\"https:\/\/www.systemcodegeeks.com\/category\/databases\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"PostgreSQL\",\"item\":\"https:\/\/www.systemcodegeeks.com\/category\/databases\/postgresql\/\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"Revealing the Queries Behind psql&#8217;s Backslash Commands\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.systemcodegeeks.com\/#website\",\"url\":\"https:\/\/www.systemcodegeeks.com\/\",\"name\":\"System Code Geeks\",\"description\":\"Operating System Developers Resource Center\",\"publisher\":{\"@id\":\"https:\/\/www.systemcodegeeks.com\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.systemcodegeeks.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.systemcodegeeks.com\/#organization\",\"name\":\"Exelixis Media P.C.\",\"url\":\"https:\/\/www.systemcodegeeks.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.systemcodegeeks.com\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.systemcodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png\",\"contentUrl\":\"https:\/\/www.systemcodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png\",\"width\":864,\"height\":246,\"caption\":\"Exelixis Media P.C.\"},\"image\":{\"@id\":\"https:\/\/www.systemcodegeeks.com\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/systemcodegeeks\",\"https:\/\/x.com\/systemcodegeeks\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.systemcodegeeks.com\/#\/schema\/person\/09197bb4e9a891b2589891c42bf5ceb1\",\"name\":\"Dustin Marx\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.systemcodegeeks.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/a11cce21db49686299ad9afde297b5213759b39e79a54820195cf16b842639c0?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/a11cce21db49686299ad9afde297b5213759b39e79a54820195cf16b842639c0?s=96&d=mm&r=g\",\"caption\":\"Dustin Marx\"},\"sameAs\":[\"http:\/\/marxsoftware.blogspot.com\/\"],\"url\":\"https:\/\/www.systemcodegeeks.com\/author\/dustin-marx\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Revealing the Queries Behind psql's Backslash Commands - System Code Geeks - 2026","description":"Interested to learn about psql Backslash Commands? Check our article revealing the Queries Behind psql's Backslash Commands","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:\/\/www.systemcodegeeks.com\/databases\/postgresql\/queries-behind-psqls-backslash-commands\/","og_locale":"en_US","og_type":"article","og_title":"Revealing the Queries Behind psql's Backslash Commands - System Code Geeks - 2026","og_description":"Interested to learn about psql Backslash Commands? Check our article revealing the Queries Behind psql's Backslash Commands","og_url":"https:\/\/www.systemcodegeeks.com\/databases\/postgresql\/queries-behind-psqls-backslash-commands\/","og_site_name":"System Code Geeks","article_publisher":"https:\/\/www.facebook.com\/systemcodegeeks","article_published_time":"2019-02-04T15:15:25+00:00","og_image":[{"width":150,"height":150,"url":"https:\/\/www.systemcodegeeks.com\/wp-content\/uploads\/2016\/01\/postgresql-logo.jpg","type":"image\/jpeg"}],"author":"Dustin Marx","twitter_card":"summary_large_image","twitter_creator":"@systemcodegeeks","twitter_site":"@systemcodegeeks","twitter_misc":{"Written by":"Dustin Marx","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.systemcodegeeks.com\/databases\/postgresql\/queries-behind-psqls-backslash-commands\/#article","isPartOf":{"@id":"https:\/\/www.systemcodegeeks.com\/databases\/postgresql\/queries-behind-psqls-backslash-commands\/"},"author":{"name":"Dustin Marx","@id":"https:\/\/www.systemcodegeeks.com\/#\/schema\/person\/09197bb4e9a891b2589891c42bf5ceb1"},"headline":"Revealing the Queries Behind psql&#8217;s Backslash Commands","datePublished":"2019-02-04T15:15:25+00:00","mainEntityOfPage":{"@id":"https:\/\/www.systemcodegeeks.com\/databases\/postgresql\/queries-behind-psqls-backslash-commands\/"},"wordCount":343,"commentCount":0,"publisher":{"@id":"https:\/\/www.systemcodegeeks.com\/#organization"},"image":{"@id":"https:\/\/www.systemcodegeeks.com\/databases\/postgresql\/queries-behind-psqls-backslash-commands\/#primaryimage"},"thumbnailUrl":"https:\/\/www.systemcodegeeks.com\/wp-content\/uploads\/2016\/01\/postgresql-logo.jpg","articleSection":["PostgreSQL"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.systemcodegeeks.com\/databases\/postgresql\/queries-behind-psqls-backslash-commands\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.systemcodegeeks.com\/databases\/postgresql\/queries-behind-psqls-backslash-commands\/","url":"https:\/\/www.systemcodegeeks.com\/databases\/postgresql\/queries-behind-psqls-backslash-commands\/","name":"Revealing the Queries Behind psql's Backslash Commands - System Code Geeks - 2026","isPartOf":{"@id":"https:\/\/www.systemcodegeeks.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.systemcodegeeks.com\/databases\/postgresql\/queries-behind-psqls-backslash-commands\/#primaryimage"},"image":{"@id":"https:\/\/www.systemcodegeeks.com\/databases\/postgresql\/queries-behind-psqls-backslash-commands\/#primaryimage"},"thumbnailUrl":"https:\/\/www.systemcodegeeks.com\/wp-content\/uploads\/2016\/01\/postgresql-logo.jpg","datePublished":"2019-02-04T15:15:25+00:00","description":"Interested to learn about psql Backslash Commands? Check our article revealing the Queries Behind psql's Backslash Commands","breadcrumb":{"@id":"https:\/\/www.systemcodegeeks.com\/databases\/postgresql\/queries-behind-psqls-backslash-commands\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.systemcodegeeks.com\/databases\/postgresql\/queries-behind-psqls-backslash-commands\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.systemcodegeeks.com\/databases\/postgresql\/queries-behind-psqls-backslash-commands\/#primaryimage","url":"https:\/\/www.systemcodegeeks.com\/wp-content\/uploads\/2016\/01\/postgresql-logo.jpg","contentUrl":"https:\/\/www.systemcodegeeks.com\/wp-content\/uploads\/2016\/01\/postgresql-logo.jpg","width":150,"height":150},{"@type":"BreadcrumbList","@id":"https:\/\/www.systemcodegeeks.com\/databases\/postgresql\/queries-behind-psqls-backslash-commands\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.systemcodegeeks.com\/"},{"@type":"ListItem","position":2,"name":"Databases","item":"https:\/\/www.systemcodegeeks.com\/category\/databases\/"},{"@type":"ListItem","position":3,"name":"PostgreSQL","item":"https:\/\/www.systemcodegeeks.com\/category\/databases\/postgresql\/"},{"@type":"ListItem","position":4,"name":"Revealing the Queries Behind psql&#8217;s Backslash Commands"}]},{"@type":"WebSite","@id":"https:\/\/www.systemcodegeeks.com\/#website","url":"https:\/\/www.systemcodegeeks.com\/","name":"System Code Geeks","description":"Operating System Developers Resource Center","publisher":{"@id":"https:\/\/www.systemcodegeeks.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.systemcodegeeks.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.systemcodegeeks.com\/#organization","name":"Exelixis Media P.C.","url":"https:\/\/www.systemcodegeeks.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.systemcodegeeks.com\/#\/schema\/logo\/image\/","url":"https:\/\/www.systemcodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","contentUrl":"https:\/\/www.systemcodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","width":864,"height":246,"caption":"Exelixis Media P.C."},"image":{"@id":"https:\/\/www.systemcodegeeks.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/systemcodegeeks","https:\/\/x.com\/systemcodegeeks"]},{"@type":"Person","@id":"https:\/\/www.systemcodegeeks.com\/#\/schema\/person\/09197bb4e9a891b2589891c42bf5ceb1","name":"Dustin Marx","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.systemcodegeeks.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/a11cce21db49686299ad9afde297b5213759b39e79a54820195cf16b842639c0?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/a11cce21db49686299ad9afde297b5213759b39e79a54820195cf16b842639c0?s=96&d=mm&r=g","caption":"Dustin Marx"},"sameAs":["http:\/\/marxsoftware.blogspot.com\/"],"url":"https:\/\/www.systemcodegeeks.com\/author\/dustin-marx\/"}]}},"_links":{"self":[{"href":"https:\/\/www.systemcodegeeks.com\/wp-json\/wp\/v2\/posts\/3993","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.systemcodegeeks.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.systemcodegeeks.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.systemcodegeeks.com\/wp-json\/wp\/v2\/users\/3990"}],"replies":[{"embeddable":true,"href":"https:\/\/www.systemcodegeeks.com\/wp-json\/wp\/v2\/comments?post=3993"}],"version-history":[{"count":0,"href":"https:\/\/www.systemcodegeeks.com\/wp-json\/wp\/v2\/posts\/3993\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.systemcodegeeks.com\/wp-json\/wp\/v2\/media\/198"}],"wp:attachment":[{"href":"https:\/\/www.systemcodegeeks.com\/wp-json\/wp\/v2\/media?parent=3993"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.systemcodegeeks.com\/wp-json\/wp\/v2\/categories?post=3993"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.systemcodegeeks.com\/wp-json\/wp\/v2\/tags?post=3993"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}