{"id":9102,"date":"2019-02-03T20:52:29","date_gmt":"2019-02-03T20:52:29","guid":{"rendered":"https:\/\/dbtut.com\/?p=9102"},"modified":"2019-02-03T21:11:28","modified_gmt":"2019-02-03T21:11:28","slug":"postgresql-format-sql-with-pgformatter","status":"publish","type":"post","link":"https:\/\/dbtut.com\/index.php\/2019\/02\/03\/postgresql-format-sql-with-pgformatter\/","title":{"rendered":"PostgreSQL &#8211; format sql with pgFormatter"},"content":{"rendered":"<p>pgFormatter can format a SQL file according to the options. It can also be used as a CGI. Also is simple to use. The basic use is as follows.<\/p>\n<pre class=\"lang:default decode:true \">pg_format [options] file.sql<\/pre>\n<p>There are various applications and websites that do this job in the market. You&#8217;re pasting the query, you&#8217;re getting formatted.<\/p>\n<p><strong>So, what do we need the pgFormatter?<\/strong><\/p>\n<p>In Linux environments, we use text editors such as vi, vim or nano when we want to modify a script while working on ssh.<\/p>\n<p>vim can automatically colorize files with sql extension. This section is known by everyone. What most people don&#8217;t know is that vim has text formatting capabilities. We call them gq commands in general.<\/p>\n<p>However, vim does not know the sql format when formatting text. She&#8217;s formatting it as a straight paragraph.<\/p>\n<p>All we have to do is tell vim to use pgformatter when using gq commands on SQL files.<\/p>\n<p>First, let&#8217;s use pg_format alone. I&#8217;ll use .sql files in the pg_format sample folder in my examples;<\/p>\n<pre class=\"lang:default decode:true \">vim pgFormatter-2.0\/samples\/ex0.sql<\/pre>\n<p id=\"zuikFrI\"><img loading=\"lazy\" decoding=\"async\" width=\"578\" height=\"275\" class=\"size-full wp-image-9103  aligncenter\" src=\"https:\/\/dbtut.com\/wp-content\/uploads\/2019\/02\/img_5c5750a9d0f0c.png\" alt=\"\" \/><\/p>\n<p>Format and save the output as a new file. Then look at our file again.<\/p>\n<pre class=\"lang:default decode:true \">pg_format --output pgFormatter-2.0\/samples\/ex0_formatted.sql pgFormatter-2.0\/samples\/ex0.sql\nvim pgFormatter-2.0\/samples\/ex0_formatted.sql<\/pre>\n<p id=\"bGmYXDT\"><img loading=\"lazy\" decoding=\"async\" width=\"582\" height=\"367\" class=\"size-full wp-image-9104  aligncenter\" src=\"https:\/\/dbtut.com\/wp-content\/uploads\/2019\/02\/img_5c5750f752782.png\" alt=\"\" \/><\/p>\n<p><strong>As a note;<\/strong> You can also use pgFormatter to remove all of the comments in your sql file. You can use the &#8211;nocomment parameter for this.<\/p>\n<p>Now let&#8217;s do formatting on vim. We need to tell vim how to format it before this.<\/p>\n<p><strong>Edit vim profile file;<\/strong><\/p>\n<pre class=\"lang:default decode:true \">vim ~\/.vimrc<\/pre>\n<p><strong>Edit the contents as follows;<\/strong><\/p>\n<pre class=\"lang:default decode:true \">syntax on\nau FileType sql setl formatprg=\/usr\/local\/bin\/pg_format\\ -<\/pre>\n<p><strong>It should be as follows:<\/strong><\/p>\n<p id=\"KNtlcQC\"><img loading=\"lazy\" decoding=\"async\" width=\"577\" height=\"158\" class=\"size-full wp-image-9105  aligncenter\" src=\"https:\/\/dbtut.com\/wp-content\/uploads\/2019\/02\/img_5c5751f6234c4.png\" alt=\"\" \/><\/p>\n<p>We color the vim in the first line. In the second line, we tell vim to use pg_format as the format application in sql files.<\/p>\n<p><strong>Now vim (or vi) knows how to format sql files. Let&#8217;s try;<\/strong><\/p>\n<pre class=\"lang:default decode:true \">vim pgFormatter-2.0\/samples\/ex10.sql<\/pre>\n<p id=\"KtwCJyZ\"><img loading=\"lazy\" decoding=\"async\" width=\"628\" height=\"258\" class=\"size-full wp-image-9106  aligncenter\" src=\"https:\/\/dbtut.com\/wp-content\/uploads\/2019\/02\/img_5c5752c9ae7a0.png\" alt=\"\" \/><\/p>\n<p>Press letters starting with gq respectively; Note that the end G is a upper case. Do not press plus (+). This will format the entire document.<\/p>\n<pre class=\"lang:default decode:true \">ESC+gq+G<\/pre>\n<p id=\"ffYJqju\"><img loading=\"lazy\" decoding=\"async\" width=\"382\" height=\"386\" class=\"size-full wp-image-9107  aligncenter\" src=\"https:\/\/dbtut.com\/wp-content\/uploads\/2019\/02\/img_5c5753465ea37.png\" alt=\"\" \/><\/p>\n\n<div class=\"pvc_clear\"><\/div>\n<p id=\"pvc_stats_9102\" class=\"pvc_stats all  \" data-element-id=\"9102\" style=\"\"><i class=\"pvc-stats-icon medium\" aria-hidden=\"true\"><svg aria-hidden=\"true\" focusable=\"false\" data-prefix=\"far\" data-icon=\"chart-bar\" role=\"img\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 512 512\" class=\"svg-inline--fa fa-chart-bar fa-w-16 fa-2x\"><path fill=\"currentColor\" d=\"M396.8 352h22.4c6.4 0 12.8-6.4 12.8-12.8V108.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v230.4c0 6.4 6.4 12.8 12.8 12.8zm-192 0h22.4c6.4 0 12.8-6.4 12.8-12.8V140.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v198.4c0 6.4 6.4 12.8 12.8 12.8zm96 0h22.4c6.4 0 12.8-6.4 12.8-12.8V204.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v134.4c0 6.4 6.4 12.8 12.8 12.8zM496 400H48V80c0-8.84-7.16-16-16-16H16C7.16 64 0 71.16 0 80v336c0 17.67 14.33 32 32 32h464c8.84 0 16-7.16 16-16v-16c0-8.84-7.16-16-16-16zm-387.2-48h22.4c6.4 0 12.8-6.4 12.8-12.8v-70.4c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v70.4c0 6.4 6.4 12.8 12.8 12.8z\" class=\"\"><\/path><\/svg><\/i> <img loading=\"lazy\" decoding=\"async\" width=\"16\" height=\"16\" alt=\"Loading\" src=\"https:\/\/dbtut.com\/wp-content\/plugins\/page-views-count\/ajax-loader-2x.gif\" border=0 \/><\/p>\n<div class=\"pvc_clear\"><\/div>\n","protected":false},"excerpt":{"rendered":"<p>pgFormatter can format a SQL file according to the options. It can also be used as a CGI. Also is simple to use. The basic use is as follows. pg_format [options] file.sql There are various applications and websites that do this job in the market. You&#8217;re pasting the query, you&#8217;re getting formatted. So, what do &hellip;<\/p>\n<div class=\"pvc_clear\"><\/div>\n<p id=\"pvc_stats_9102\" class=\"pvc_stats all  \" data-element-id=\"9102\" style=\"\"><i class=\"pvc-stats-icon medium\" aria-hidden=\"true\"><svg aria-hidden=\"true\" focusable=\"false\" data-prefix=\"far\" data-icon=\"chart-bar\" role=\"img\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 512 512\" class=\"svg-inline--fa fa-chart-bar fa-w-16 fa-2x\"><path fill=\"currentColor\" d=\"M396.8 352h22.4c6.4 0 12.8-6.4 12.8-12.8V108.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v230.4c0 6.4 6.4 12.8 12.8 12.8zm-192 0h22.4c6.4 0 12.8-6.4 12.8-12.8V140.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v198.4c0 6.4 6.4 12.8 12.8 12.8zm96 0h22.4c6.4 0 12.8-6.4 12.8-12.8V204.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v134.4c0 6.4 6.4 12.8 12.8 12.8zM496 400H48V80c0-8.84-7.16-16-16-16H16C7.16 64 0 71.16 0 80v336c0 17.67 14.33 32 32 32h464c8.84 0 16-7.16 16-16v-16c0-8.84-7.16-16-16-16zm-387.2-48h22.4c6.4 0 12.8-6.4 12.8-12.8v-70.4c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v70.4c0 6.4 6.4 12.8 12.8 12.8z\" class=\"\"><\/path><\/svg><\/i> <img loading=\"lazy\" decoding=\"async\" width=\"16\" height=\"16\" alt=\"Loading\" src=\"https:\/\/dbtut.com\/wp-content\/plugins\/page-views-count\/ajax-loader-2x.gif\" border=0 \/><\/p>\n<div class=\"pvc_clear\"><\/div>\n","protected":false},"author":384,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_uf_show_specific_survey":0,"_uf_disable_surveys":false,"footnotes":""},"categories":[299,5],"tags":[1899,1905,1900,1902,1903,1904,1901],"class_list":["post-9102","post","type-post","status-publish","format-standard","","category-linux","category-postgres","tag-format-sql-with-pgformatter","tag-pg_format","tag-pgformatter","tag-text-formatting","tag-text-formatting-in-linux","tag-text-formatting-with-vim","tag-use-pgformatter-with-vim"],"aioseo_notices":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.9 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>PostgreSQL - format sql with pgFormatter - Database Tutorials<\/title>\n<meta name=\"description\" content=\"PostgreSQL - format sql with pgFormatter\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/dbtut.com\/index.php\/2019\/02\/03\/postgresql-format-sql-with-pgformatter\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"PostgreSQL - format sql with pgFormatter - Database Tutorials\" \/>\n<meta property=\"og:description\" content=\"PostgreSQL - format sql with pgFormatter\" \/>\n<meta property=\"og:url\" content=\"https:\/\/dbtut.com\/index.php\/2019\/02\/03\/postgresql-format-sql-with-pgformatter\/\" \/>\n<meta property=\"og:site_name\" content=\"Database Tutorials\" \/>\n<meta property=\"article:published_time\" content=\"2019-02-03T20:52:29+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2019-02-03T21:11:28+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/dbtut.com\/wp-content\/uploads\/2019\/02\/img_5c5750a9d0f0c.png\" \/>\n<meta name=\"author\" content=\"\u015eahap A\u015f\u00e7\u0131\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"\u015eahap A\u015f\u00e7\u0131\" \/>\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:\/\/dbtut.com\/index.php\/2019\/02\/03\/postgresql-format-sql-with-pgformatter\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/dbtut.com\/index.php\/2019\/02\/03\/postgresql-format-sql-with-pgformatter\/\"},\"author\":{\"name\":\"\u015eahap A\u015f\u00e7\u0131\",\"@id\":\"https:\/\/dbtut.com\/#\/schema\/person\/a2e613d6be4a3553f844a52366dc0888\"},\"headline\":\"PostgreSQL &#8211; format sql with pgFormatter\",\"datePublished\":\"2019-02-03T20:52:29+00:00\",\"dateModified\":\"2019-02-03T21:11:28+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/dbtut.com\/index.php\/2019\/02\/03\/postgresql-format-sql-with-pgformatter\/\"},\"wordCount\":312,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/dbtut.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/dbtut.com\/index.php\/2019\/02\/03\/postgresql-format-sql-with-pgformatter\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/dbtut.com\/wp-content\/uploads\/2019\/02\/img_5c5750a9d0f0c.png\",\"keywords\":[\"format sql with pgFormatter\",\"pg_format\",\"pgFormatter\",\"text formatting\",\"text formatting in linux\",\"text formatting with vim\",\"use pgFormatter with vim\"],\"articleSection\":[\"Linux\",\"PostgreSQL\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/dbtut.com\/index.php\/2019\/02\/03\/postgresql-format-sql-with-pgformatter\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/dbtut.com\/index.php\/2019\/02\/03\/postgresql-format-sql-with-pgformatter\/\",\"url\":\"https:\/\/dbtut.com\/index.php\/2019\/02\/03\/postgresql-format-sql-with-pgformatter\/\",\"name\":\"PostgreSQL - format sql with pgFormatter - Database Tutorials\",\"isPartOf\":{\"@id\":\"https:\/\/dbtut.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/dbtut.com\/index.php\/2019\/02\/03\/postgresql-format-sql-with-pgformatter\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/dbtut.com\/index.php\/2019\/02\/03\/postgresql-format-sql-with-pgformatter\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/dbtut.com\/wp-content\/uploads\/2019\/02\/img_5c5750a9d0f0c.png\",\"datePublished\":\"2019-02-03T20:52:29+00:00\",\"dateModified\":\"2019-02-03T21:11:28+00:00\",\"description\":\"PostgreSQL - format sql with pgFormatter\",\"breadcrumb\":{\"@id\":\"https:\/\/dbtut.com\/index.php\/2019\/02\/03\/postgresql-format-sql-with-pgformatter\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/dbtut.com\/index.php\/2019\/02\/03\/postgresql-format-sql-with-pgformatter\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/dbtut.com\/index.php\/2019\/02\/03\/postgresql-format-sql-with-pgformatter\/#primaryimage\",\"url\":\"https:\/\/dbtut.com\/wp-content\/uploads\/2019\/02\/img_5c5750a9d0f0c.png\",\"contentUrl\":\"https:\/\/dbtut.com\/wp-content\/uploads\/2019\/02\/img_5c5750a9d0f0c.png\",\"width\":578,\"height\":275},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/dbtut.com\/index.php\/2019\/02\/03\/postgresql-format-sql-with-pgformatter\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/dbtut.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"PostgreSQL &#8211; format sql with pgFormatter\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/dbtut.com\/#website\",\"url\":\"https:\/\/dbtut.com\/\",\"name\":\"Database Tutorials\",\"description\":\"MSSQL, Oracle, PostgreSQL, MySQL, MariaDB, DB2, Sybase, Teradata, Big Data, NOSQL, MongoDB, Couchbase, Cassandra, Windows, Linux\",\"publisher\":{\"@id\":\"https:\/\/dbtut.com\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/dbtut.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/dbtut.com\/#organization\",\"name\":\"dbtut\",\"url\":\"https:\/\/dbtut.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/dbtut.com\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/dbtut.com\/wp-content\/uploads\/2021\/02\/dbtutlogo.jpg\",\"contentUrl\":\"https:\/\/dbtut.com\/wp-content\/uploads\/2021\/02\/dbtutlogo.jpg\",\"width\":223,\"height\":36,\"caption\":\"dbtut\"},\"image\":{\"@id\":\"https:\/\/dbtut.com\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/dbtut.com\/#\/schema\/person\/a2e613d6be4a3553f844a52366dc0888\",\"name\":\"\u015eahap A\u015f\u00e7\u0131\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/dbtut.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/005a983c36f6cca1fef1bc16f5d9d1d3f2fd7a27692b5d2c362b0b806bcfdb4a?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/005a983c36f6cca1fef1bc16f5d9d1d3f2fd7a27692b5d2c362b0b806bcfdb4a?s=96&d=mm&r=g\",\"caption\":\"\u015eahap A\u015f\u00e7\u0131\"},\"url\":\"https:\/\/dbtut.com\/index.php\/author\/sahapasci\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"PostgreSQL - format sql with pgFormatter - Database Tutorials","description":"PostgreSQL - format sql with pgFormatter","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:\/\/dbtut.com\/index.php\/2019\/02\/03\/postgresql-format-sql-with-pgformatter\/","og_locale":"en_US","og_type":"article","og_title":"PostgreSQL - format sql with pgFormatter - Database Tutorials","og_description":"PostgreSQL - format sql with pgFormatter","og_url":"https:\/\/dbtut.com\/index.php\/2019\/02\/03\/postgresql-format-sql-with-pgformatter\/","og_site_name":"Database Tutorials","article_published_time":"2019-02-03T20:52:29+00:00","article_modified_time":"2019-02-03T21:11:28+00:00","og_image":[{"url":"https:\/\/dbtut.com\/wp-content\/uploads\/2019\/02\/img_5c5750a9d0f0c.png","type":"","width":"","height":""}],"author":"\u015eahap A\u015f\u00e7\u0131","twitter_card":"summary_large_image","twitter_misc":{"Written by":"\u015eahap A\u015f\u00e7\u0131","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/dbtut.com\/index.php\/2019\/02\/03\/postgresql-format-sql-with-pgformatter\/#article","isPartOf":{"@id":"https:\/\/dbtut.com\/index.php\/2019\/02\/03\/postgresql-format-sql-with-pgformatter\/"},"author":{"name":"\u015eahap A\u015f\u00e7\u0131","@id":"https:\/\/dbtut.com\/#\/schema\/person\/a2e613d6be4a3553f844a52366dc0888"},"headline":"PostgreSQL &#8211; format sql with pgFormatter","datePublished":"2019-02-03T20:52:29+00:00","dateModified":"2019-02-03T21:11:28+00:00","mainEntityOfPage":{"@id":"https:\/\/dbtut.com\/index.php\/2019\/02\/03\/postgresql-format-sql-with-pgformatter\/"},"wordCount":312,"commentCount":0,"publisher":{"@id":"https:\/\/dbtut.com\/#organization"},"image":{"@id":"https:\/\/dbtut.com\/index.php\/2019\/02\/03\/postgresql-format-sql-with-pgformatter\/#primaryimage"},"thumbnailUrl":"https:\/\/dbtut.com\/wp-content\/uploads\/2019\/02\/img_5c5750a9d0f0c.png","keywords":["format sql with pgFormatter","pg_format","pgFormatter","text formatting","text formatting in linux","text formatting with vim","use pgFormatter with vim"],"articleSection":["Linux","PostgreSQL"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/dbtut.com\/index.php\/2019\/02\/03\/postgresql-format-sql-with-pgformatter\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/dbtut.com\/index.php\/2019\/02\/03\/postgresql-format-sql-with-pgformatter\/","url":"https:\/\/dbtut.com\/index.php\/2019\/02\/03\/postgresql-format-sql-with-pgformatter\/","name":"PostgreSQL - format sql with pgFormatter - Database Tutorials","isPartOf":{"@id":"https:\/\/dbtut.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/dbtut.com\/index.php\/2019\/02\/03\/postgresql-format-sql-with-pgformatter\/#primaryimage"},"image":{"@id":"https:\/\/dbtut.com\/index.php\/2019\/02\/03\/postgresql-format-sql-with-pgformatter\/#primaryimage"},"thumbnailUrl":"https:\/\/dbtut.com\/wp-content\/uploads\/2019\/02\/img_5c5750a9d0f0c.png","datePublished":"2019-02-03T20:52:29+00:00","dateModified":"2019-02-03T21:11:28+00:00","description":"PostgreSQL - format sql with pgFormatter","breadcrumb":{"@id":"https:\/\/dbtut.com\/index.php\/2019\/02\/03\/postgresql-format-sql-with-pgformatter\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/dbtut.com\/index.php\/2019\/02\/03\/postgresql-format-sql-with-pgformatter\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/dbtut.com\/index.php\/2019\/02\/03\/postgresql-format-sql-with-pgformatter\/#primaryimage","url":"https:\/\/dbtut.com\/wp-content\/uploads\/2019\/02\/img_5c5750a9d0f0c.png","contentUrl":"https:\/\/dbtut.com\/wp-content\/uploads\/2019\/02\/img_5c5750a9d0f0c.png","width":578,"height":275},{"@type":"BreadcrumbList","@id":"https:\/\/dbtut.com\/index.php\/2019\/02\/03\/postgresql-format-sql-with-pgformatter\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/dbtut.com\/"},{"@type":"ListItem","position":2,"name":"PostgreSQL &#8211; format sql with pgFormatter"}]},{"@type":"WebSite","@id":"https:\/\/dbtut.com\/#website","url":"https:\/\/dbtut.com\/","name":"Database Tutorials","description":"MSSQL, Oracle, PostgreSQL, MySQL, MariaDB, DB2, Sybase, Teradata, Big Data, NOSQL, MongoDB, Couchbase, Cassandra, Windows, Linux","publisher":{"@id":"https:\/\/dbtut.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/dbtut.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/dbtut.com\/#organization","name":"dbtut","url":"https:\/\/dbtut.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/dbtut.com\/#\/schema\/logo\/image\/","url":"https:\/\/dbtut.com\/wp-content\/uploads\/2021\/02\/dbtutlogo.jpg","contentUrl":"https:\/\/dbtut.com\/wp-content\/uploads\/2021\/02\/dbtutlogo.jpg","width":223,"height":36,"caption":"dbtut"},"image":{"@id":"https:\/\/dbtut.com\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/dbtut.com\/#\/schema\/person\/a2e613d6be4a3553f844a52366dc0888","name":"\u015eahap A\u015f\u00e7\u0131","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/dbtut.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/005a983c36f6cca1fef1bc16f5d9d1d3f2fd7a27692b5d2c362b0b806bcfdb4a?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/005a983c36f6cca1fef1bc16f5d9d1d3f2fd7a27692b5d2c362b0b806bcfdb4a?s=96&d=mm&r=g","caption":"\u015eahap A\u015f\u00e7\u0131"},"url":"https:\/\/dbtut.com\/index.php\/author\/sahapasci\/"}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/dbtut.com\/index.php\/wp-json\/wp\/v2\/posts\/9102","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/dbtut.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/dbtut.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/dbtut.com\/index.php\/wp-json\/wp\/v2\/users\/384"}],"replies":[{"embeddable":true,"href":"https:\/\/dbtut.com\/index.php\/wp-json\/wp\/v2\/comments?post=9102"}],"version-history":[{"count":0,"href":"https:\/\/dbtut.com\/index.php\/wp-json\/wp\/v2\/posts\/9102\/revisions"}],"wp:attachment":[{"href":"https:\/\/dbtut.com\/index.php\/wp-json\/wp\/v2\/media?parent=9102"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dbtut.com\/index.php\/wp-json\/wp\/v2\/categories?post=9102"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dbtut.com\/index.php\/wp-json\/wp\/v2\/tags?post=9102"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}