<!doctype html>
<html lang="en">
 <head>
  <title>PostgreSQL: Documentation: {{page.display_version}}: {{page.title}}</title>
  <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
  <meta http-equiv="Content-Type" content="text/xhtml; charset=utf-8" />
  {%block meta%}{%endblock%} {# used for custom meta tags such as description which we don't want for every page #}
  <meta name="theme-color" content="#336791"/>
  <meta name="copyright" content="The PostgreSQL Global Development Group" />{%if og%}
  <meta property="og:url" content="https://www.postgresql.org{{og.url}}" />
  <meta property="og:type" content="article" />
  <meta property="article:published_time" content="{{og.time|date:"c"}}" />
{%if not og.noimage%}  <meta property="og:image" content="https://www.postgresql.org/media/img/about/press/elephant.png" />{%endif%}
  <meta property="og:title" content="{{og.title}}" />
{%if og.description%}  <meta property="og:description" content="{{og.description|truncatewords:"20"}}" />{%endif%}
  <meta property="og:site_name" content="{{og.sitename|default:"PostgreSQL"}}" />{%endif%}
{%if not page.version.supported%}  <meta name="robots" content="nofollow" />{%endif%}
{% if canonical_version %}
  <link rel="canonical" href="https://www.postgresql.org/docs/{{ canonical_version }}/{{ page.file }}" />
{% endif %}
  <link href="/media/css/fontawesome.css?{{gitrev}}" rel="stylesheet">
  <link rel="stylesheet" href="/media/css/bootstrap-4.4.1.min.css">
  <link rel="shortcut icon" href="/favicon.ico" />
  {%if newstags %}
  {%comment%}Default RSS links are only shown on pages that have newstags set{%endcomment%}
  <link rel="alternate" type="application/rss+xml" title="All PostgreSQL News" href="/news.rss" />
  {%for t in newstags%}
    <link rel="alternate" type="application/rss+xml" title="PostgreSQL News about {{t.name}}" href="/news/{{t.urlname}}.rss" />
  {%endfor%}
  <link rel="alternate" type="application/rss+xml" title="PostgreSQL Events" href="/events.rss" />
  {%endif%}
  <link rel="stylesheet" type="text/css" href="/dyncss/base.css?{{gitrev}}">

  <script src="/media/js/theme.js"></script>

  {%block extrahead%}{%endblock%}
  </head>
  <body>
    <div class="container-fluid">
      <div class="row justify-content-md-center">
        <div class="col">
          <!-- Header -->
          <nav class="navbar navbar-expand-lg navbar-light bg-light">
            <a class="navbar-brand p-0" href="/">
              <img class="logo" src="/media/img/about/press/elephant.png" alt="PostgreSQL Elephant Logo">
            </a>
            <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#pgNavbar" aria-controls="pgNavbar" aria-expanded="false" aria-label="Toggle navigation">
              <span class="navbar-toggler-icon"></span>
            </button>
            <div class="collapse navbar-collapse" id="pgNavbar">
              <ul class="navbar-nav mr-auto">
                <li class="nav-item p-2"><a href="/" title="Home">Home</a></li>
                <li class="nav-item p-2"><a href="/about/" title="About">About</a></li>
                <li class="nav-item p-2"><a href="/download/" title="Download">Download</a></li>
                <li class="nav-item p-2"><a href="/docs/" title="Documentation">Documentation</a></li>
                <li class="nav-item p-2"><a href="/community/" title="Community">Community</a></li>
                <li class="nav-item p-2"><a href="/developer/" title="Developers">Developers</a></li>
                <li class="nav-item p-2"><a href="/support/" title="Support">Support</a></li>
                <li class="nav-item p-2"><a href="/about/donate/" title="Donate">Donate</a></li>
                <li class="nav-item p-2"><a href="/account/" title="Your account">Your account</a></li>
              </ul>
              <form role="search" method="get" action="/search/">
                <div class="input-group">
                  <input id="q" name="q" type="text" size="20" maxlength="255" accesskey="s"  class="form-control" placeholder="Search for...">
                  <span class="input-group-btn">
                    <button class="btn btn-default" type="submit"><i class="fas fa-search"></i></button>
                  </span>
                </div><!-- /input-group -->
              </form>
              <form id="form-theme" class="form-inline d-none">
                <button id="btn-theme" class="btn btn-default ml-1" type="button"></button>
              </form>
            </div>
          </nav>
        </div>
      </div>
      <div class="row justify-content-center pg-shout-box">
        <div class="col text-white text-center">{%include "base/esi.html" with includepage="/include/topbar" %}</div>
      </div>
    </div>
    <div class="container-fluid margin">
      <div class="row">
        <div id="pgContentWrap" class="col-11">
          <div class="row">
            <div class="col-md-6 mb-2">
              <div class="row">
                <div class="col">
                  <div>
                    <a href="/docs/" title="Documentation">Documentation</a> &rarr; <a href="/docs/{{page.display_version}}/{{doc_index_filename}}">PostgreSQL {{page.display_version}}</a>{%if loaddate%} ({{loaddate|date:"Y-m-d H:i:s"}}{%if loadgit%} - git commit <a href="https://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h={{loadgit}}">{{loadgit}}</a>{%endif%}){%endif%}
                  </div>
                </div>
              </div>
              {% if supported_versions %}
                <div class="row">
                  <div class="col">
                    Supported Versions:
                      {% for ver in supported_versions %}
                        {% if not forloop.first %} / {% endif %}
                        {% if ver.version.current %}
                          <a href="/docs/current/{{ver.file}}" title="PostgreSQL {{ver.display_version}} - {{page.title}}" {% if ver.version == page.version %}class="docs-version-selected"{% endif %}>Current</a>
                          (<a href="/docs/{{ver.display_version}}/{{ver.file}}" title="PostgreSQL {{ver.display_version}} - {{page.title}}" {% if ver.version == page.version %}class="docs-version-selected"{% endif %}>{{ver.display_version}}</a>)
                        {% else %}
                          <a href="/docs/{{ver.display_version}}/{{ver.file}}" title="PostgreSQL {{ver.display_version}} - {{page.title}}" {% if ver.version == page.version %}class="docs-version-selected"{% endif %}>{{ver.display_version}}</a>
                        {% endif %}
                      {% endfor %}
                  </div>
                </div>
              {% endif %}
              {% if devel_versions %}
                <div class="row">
                  <div class="col">
                    Development Versions:
                    {% for ver in devel_versions %}
                      {% if not forloop.first %} / {% endif %}
                      <a href="/docs/{{ver.display_version}}/{{ver.file}}" title="PostgreSQL {{ver.display_version}} - {{page.title}}" {% if ver.version == page.version %}class="docs-version-selected"{% endif %} rel="nofollow">{{ver.display_version}}</a>
                    {% endfor %}
                  </div>
                </div>
              {% endif %}
              {% if unsupported_versions %}
                <div class="row">
                  <div class="col-12">
                    Unsupported versions:
                    {% for ver in unsupported_versions %}
                      {% if not forloop.first %} / {% endif %}
                      <a href="/docs/{{ver.display_version}}/{{ver.file}}" title="PostgreSQL {{ver.display_version}} - {{page.title}}" {% if ver.version == page.version %}class="docs-version-selected"{% endif %} rel="nofollow">{{ver.display_version}}</a>
                    {% endfor %}
                  </div>
                </div>
              {% endif %}
            </div>
            <div class="col-md-6 col-lg-5 offset-lg-1">
              <form id="docSearchForm" role="search" method="get" action="/search/">
                <input type="hidden" name="u" value="/docs/{{page.display_version}}/" />
                <div class="input-group">
                  <input type="text" id="q" name="q" class="form-control" placeholder="Search the documentation for..."/>
                  <span class="input-group-btn">
                    <button class="btn btn-default" type="submit"><i class="fas fa-search"></i></button>
                  </span>
                </div><!-- /input-group -->
              </form>
            </div>
          </div>
{%if not page.version.supported%}
	  <div class="text-center alert-warning">
	    This documentation is for an unsupported version of PostgreSQL.<br/>
	    You may want to view the same page for the
	    <a href="/docs/current/{{page.file}}" title="PostgreSQL {{page.version.display_version}} - {{page.title}}">current</a>
	    version, or one of the other supported versions listed above instead.
	  </div>
{%endif%}
          <div id="docContent">
            {{page.content|safe}}
          </div>
          {% if page.version.supported %}
            <div id="docComments">
              <h2>Submit correction</h2>
              <p>
              If you see anything in the documentation that is not correct, does not match
              your experience with the particular feature or requires further clarification,
              please use
              <a href="/account/comments/new/{{page.version.numtree|default:"devel"}}/{{page.file}}/" rel="nofollow">this form</a>
              to report a documentation issue.
              </p>
            </div>
          {% endif %}
        </div> <!-- pgContentWrap -->
      </div>
    </div>
    <!-- Footer -->
    <footer id="footer">
      <!-- Copyright -->
      <div class="container">
        <a href="/about/privacypolicy">Privacy Policy</a> |
        <a href="/about/policies/coc/">Code of Conduct</a> |
        <a href="/about/">About PostgreSQL</a> |
        <a href="/about/contact/">Contact</a><br/>
        <p>Copyright &copy; 1996-{% now "Y" %} The PostgreSQL Global Development Group</p>
      </div>
    </footer>
    <script src="/media/js/jquery-3.4.1.slim.min.js"></script>
    <script src="/media/js/popper-1.16.0.min.js"></script>
    <script src="/media/js/bootstrap-4.4.1.min.js"></script>
    <script src="/media/js/main.js?{{gitrev}}"></script>
  </body>
</html>
