{"id":4965,"date":"2026-06-03T20:50:32","date_gmt":"2026-06-03T18:50:32","guid":{"rendered":"https:\/\/infosec.andreas-klingler.de\/?p=4965"},"modified":"2026-06-03T20:50:33","modified_gmt":"2026-06-03T18:50:33","slug":"postgres","status":"publish","type":"post","link":"https:\/\/infosec.andreas-klingler.de\/?p=4965","title":{"rendered":"Postgres"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">Enumeration<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Get ver\u00adsion:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">select version();<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Get cur\u00adrent&nbsp;user:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">select current_user;<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Get all databases:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">select datname from pg_database;<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Get all tables from a database:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">select table_name from $dbname.information_schema.tables where table_schema = 'public';<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Get details about a&nbsp;table:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>select column_name, data_type from $dbname.information_schema.columns where table_name = 'menu';<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Enu\u00admer\u00ada\u00adtion Get ver\u00adsion: select ver\u00adsion(); Get cur\u00adrent&nbsp;user: select current_user; Get all data\u00adbas\u00ades: select dat\u00adname from pg_database; Get all tables from a data\u00adbase: select table_name from $dbname.information_schema.tables where table_schema = \u2018pub\u00adlic\u2019; Get details about a&nbsp;table:<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"wp_typography_post_enhancements_disabled":false,"footnotes":""},"categories":[323],"tags":[177,327],"class_list":["post-4965","post","type-post","status-publish","format-standard","hentry","category-protocol","tag-database","tag-postgresql"],"_links":{"self":[{"href":"https:\/\/infosec.andreas-klingler.de\/index.php?rest_route=\/wp\/v2\/posts\/4965","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/infosec.andreas-klingler.de\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/infosec.andreas-klingler.de\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/infosec.andreas-klingler.de\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/infosec.andreas-klingler.de\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=4965"}],"version-history":[{"count":1,"href":"https:\/\/infosec.andreas-klingler.de\/index.php?rest_route=\/wp\/v2\/posts\/4965\/revisions"}],"predecessor-version":[{"id":4966,"href":"https:\/\/infosec.andreas-klingler.de\/index.php?rest_route=\/wp\/v2\/posts\/4965\/revisions\/4966"}],"wp:attachment":[{"href":"https:\/\/infosec.andreas-klingler.de\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=4965"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/infosec.andreas-klingler.de\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=4965"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/infosec.andreas-klingler.de\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=4965"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}