<p dir="auto">Many databases support storing comments as part of the actual schema.<br>
Postgres is one of them, just the syntax is slightly different than other RDBMS, b/c you<br>
can't define it inline with the table definition.</p>
<p dir="auto">This PR adds the ability to write out comments using the <code class="notranslate">COMMENT</code> command <a href="https://www.postgresql.org/docs/current/sql-comment.html" rel="nofollow">documented<br>
here</a>.</p>
<p dir="auto">It follows the example of the MySQL producer and puts all comments into the schema,<br>
including ones that were parsed as DDL only comments (line comments starting with <code class="notranslate">--</code>).</p>

<hr>

<h4>You can view, comment on, or merge this pull request online at:</h4>
<p>&nbsp;&nbsp;<a href='https://github.com/dbsrgits/sql-translator/pull/137'>https://github.com/dbsrgits/sql-translator/pull/137</a></p>

<h4>Commit Summary</h4>
<ul>
  <li><a href="https://github.com/dbsrgits/sql-translator/pull/137/commits/8670ec57fb22529566866db110ed92c7f5bfd2e7" class="commit-link">8670ec5</a>  update parser test to assert that parsing COMMENT comments work on Producer::PG</li>
  <li><a href="https://github.com/dbsrgits/sql-translator/pull/137/commits/be4fe502d7d3010b1175d239096c34b7e82eaa1a" class="commit-link">be4fe50</a>  implementation of comment DDL *should* be correct</li>
  <li><a href="https://github.com/dbsrgits/sql-translator/pull/137/commits/4ae6f235a2e112c22f31edc501d10e9939837485" class="commit-link">4ae6f23</a>  woops, didn&#39;t understand how `-&gt;comments` worked</li>
  <li><a href="https://github.com/dbsrgits/sql-translator/pull/137/commits/3b8fb2cf0a6f08385f3ed98b6fabb4c653a60174" class="commit-link">3b8fb2c</a>  get this right and fix all the tests!</li>
</ul>

<h4 style="display: inline-block">File Changes </h4> <p style="display: inline-block">(<a href="https://github.com/dbsrgits/sql-translator/pull/137/files">4&nbsp;files</a>)</p>
<ul>
  <li>
    <strong>M</strong>
    <a href="https://github.com/dbsrgits/sql-translator/pull/137/files#diff-2ed1f0c36561ec8261fb857e60ee693cf26e3fa09f536b369810bc24f593b451">lib/SQL/Translator/Parser/PostgreSQL.pm</a>
    (1)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/dbsrgits/sql-translator/pull/137/files#diff-74dda26d4d454e8f3a1a7f3761fc0ebe1c1117c68b192b24c0e3ab07358bf733">lib/SQL/Translator/Producer/PostgreSQL.pm</a>
    (29)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/dbsrgits/sql-translator/pull/137/files#diff-2d870522f429f2aafcc45429d76ebad890c6d38b4df107894d9f8e1530ecc04f">t/46xml-to-pg.t</a>
    (2)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/dbsrgits/sql-translator/pull/137/files#diff-189a00d181911490216a0063c6c01224bccb76bbdc1a49f7b2725c76a42d1333">t/47postgres-producer.t</a>
    (17)
  </li>
</ul>

<h4>Patch Links:</h4>
<ul>
  <li><a href='https://github.com/dbsrgits/sql-translator/pull/137.patch'>https://github.com/dbsrgits/sql-translator/pull/137.patch</a></li>
  <li><a href='https://github.com/dbsrgits/sql-translator/pull/137.diff'>https://github.com/dbsrgits/sql-translator/pull/137.diff</a></li>
</ul>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">&mdash;<br />Reply to this email directly, <a href="https://github.com/dbsrgits/sql-translator/pull/137">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AACJ4AW4QMYDIQVEDNTJXZLVS5DR7ANCNFSM5262276Q">unsubscribe</a>.<br />You are receiving this because you are subscribed to this thread.<img src="https://github.com/notifications/beacon/AACJ4ARJSATYLXC2JXQJSPLVS5DR7A5CNFSM52622762YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4TK7ZHYA.gif" height="1" width="1" alt="" /><span style="color: transparent; font-size: 0; display: none; visibility: hidden; overflow: hidden; opacity: 0; width: 0; height: 0; max-width: 0; max-height: 0; mso-hide: all">Message ID: <span>&lt;dbsrgits/sql-translator/pull/137</span><span>@</span><span>github</span><span>.</span><span>com&gt;</span></span></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/dbsrgits/sql-translator/pull/137",
"url": "https://github.com/dbsrgits/sql-translator/pull/137",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>