{"id":4455,"date":"2022-06-03T16:02:00","date_gmt":"2022-06-03T21:02:00","guid":{"rendered":"https:\/\/www.incredigeek.com\/home\/?p=4455"},"modified":"2022-06-03T15:20:24","modified_gmt":"2022-06-03T20:20:24","slug":"postgresql-commands-cheat-sheet","status":"publish","type":"post","link":"https:\/\/www.incredigeek.com\/home\/postgresql-commands-cheat-sheet\/","title":{"rendered":"PostgreSQL Commands Cheat Sheet"},"content":{"rendered":"\n<p>Here is a list of helpful Postgres commands<\/p>\n\n\n\n<p>Drop a Role<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">DROP ROLE role_name;<\/pre>\n\n\n\n<p>Connect to database<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">\\c database_name;<\/pre>\n\n\n\n<p>List tables<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">\\l<\/pre>\n\n\n\n<p>List tables in current database<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">\\dt<\/pre>\n\n\n\n<p>List users<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">\\du<\/pre>\n\n\n\n<p>A better Cheat Sheet<\/p>\n\n\n\n<figure class=\"wp-block-embed is-type-wp-embed is-provider-postgresql-tutorial wp-block-embed-postgresql-tutorial\"><div class=\"wp-block-embed__wrapper\">\n<blockquote class=\"wp-embedded-content\" data-secret=\"54CYpbQDjA\"><a href=\"https:\/\/www.postgresqltutorial.com\/postgresql-cheat-sheet\/\">PostgreSQL Cheat Sheet<\/a><\/blockquote><iframe loading=\"lazy\" class=\"wp-embedded-content\" sandbox=\"allow-scripts\" security=\"restricted\" style=\"position: absolute; clip: rect(1px, 1px, 1px, 1px);\" title=\"&#8220;PostgreSQL Cheat Sheet&#8221; &#8212; PostgreSQL Tutorial\" src=\"https:\/\/www.postgresqltutorial.com\/postgresql-cheat-sheet\/embed\/#?secret=pRpYYYv6Ja#?secret=54CYpbQDjA\" data-secret=\"54CYpbQDjA\" width=\"584\" height=\"329\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe>\n<\/div><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>Here is a list of helpful Postgres commands Drop a Role DROP ROLE role_name; Connect to database \\c database_name; List tables \\l List tables in current database \\dt List users \\du A better Cheat Sheet<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[1299,138,1298,1297],"class_list":["post-4455","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-cheat-sheet","tag-database","tag-db","tag-postgresql"],"_links":{"self":[{"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/posts\/4455","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/comments?post=4455"}],"version-history":[{"count":2,"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/posts\/4455\/revisions"}],"predecessor-version":[{"id":4457,"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/posts\/4455\/revisions\/4457"}],"wp:attachment":[{"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/media?parent=4455"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/categories?post=4455"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/tags?post=4455"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}