<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <span style="color: rgb(34, 34, 34); font-family: Arial, Helvetica,
      sans-serif; font-size: 13px; font-style: normal; font-variant:
      normal; font-weight: normal; letter-spacing: normal; line-height:
      normal; orphans: auto; text-align: start; text-indent: 0px;
      text-transform: none; white-space: normal; widows: auto;
      word-spacing: 0px; -webkit-text-stroke-width: 0px;
      background-color: rgb(255, 255, 255); display: inline !important;
      float: none;">Hi PostGIS users,</span>
    <div style="margin: 0px; padding: 0px; border: 0px; vertical-align:
      baseline; color: rgb(34, 34, 34); font-family: Arial, Helvetica,
      sans-serif; font-size: 13px; font-style: normal; font-variant:
      normal; font-weight: normal; letter-spacing: normal; line-height:
      normal; orphans: auto; text-align: start; text-indent: 0px;
      text-transform: none; white-space: normal; widows: auto;
      word-spacing: 0px; -webkit-text-stroke-width: 0px;
      background-color: rgb(255, 255, 255);">I have a PostGIS database,
      which stores raster from Landsat 8. Each scene was divided with
      tile-size 500x500. Then each row in database will keep 1 tile with
      11 bands (except band No. 8).</div>
    <div style="margin: 0px; padding: 0px; border: 0px; vertical-align:
      baseline; color: rgb(34, 34, 34); font-family: Arial, Helvetica,
      sans-serif; font-size: 13px; font-style: normal; font-variant:
      normal; font-weight: normal; letter-spacing: normal; line-height:
      normal; orphans: auto; text-align: start; text-indent: 0px;
      text-transform: none; white-space: normal; widows: auto;
      word-spacing: 0px; -webkit-text-stroke-width: 0px;
      background-color: rgb(255, 255, 255);">I'm trying to ST_Union()
      about 1179 raster-tiles with 3 bands (2,3,4) and pgAdminIII shows
      a window said "Connection lost - Try to reconnect database";</div>
    <div style="margin: 0px; padding: 0px; border: 0px; vertical-align:
      baseline; color: rgb(34, 34, 34); font-family: Arial, Helvetica,
      sans-serif; font-size: 13px; font-style: normal; font-variant:
      normal; font-weight: normal; letter-spacing: normal; line-height:
      normal; orphans: auto; text-align: start; text-indent: 0px;
      text-transform: none; white-space: normal; widows: auto;
      word-spacing: 0px; -webkit-text-stroke-width: 0px;
      background-color: rgb(255, 255, 255);">Here's my query:</div>
    <div style="margin: 0px; padding: 0px; border: 0px; vertical-align:
      baseline; color: rgb(34, 34, 34); font-family: Arial, Helvetica,
      sans-serif; font-size: 13px; font-style: normal; font-variant:
      normal; font-weight: normal; letter-spacing: normal; line-height:
      normal; orphans: auto; text-align: start; text-indent: 0px;
      text-transform: none; white-space: normal; widows: auto;
      word-spacing: 0px; -webkit-text-stroke-width: 0px;
      background-color: rgb(255, 255, 255);"><font style="margin: 0px;
        padding: 0px; border: 0px; vertical-align: baseline;"
        face="courier new, monospace">SELECT ST_Union(rast,
        ARRAY[ROW(2,'LAST'),ROW(3,'<wbr>LAST'),ROW(4,'LAST')]::<wbr>unionarg[])</font></div>
    <div style="margin: 0px; padding: 0px; border: 0px; vertical-align:
      baseline; color: rgb(34, 34, 34); font-family: Arial, Helvetica,
      sans-serif; font-size: 13px; font-style: normal; font-variant:
      normal; font-weight: normal; letter-spacing: normal; line-height:
      normal; orphans: auto; text-align: start; text-indent: 0px;
      text-transform: none; white-space: normal; widows: auto;
      word-spacing: 0px; -webkit-text-stroke-width: 0px;
      background-color: rgb(255, 255, 255);"><font style="margin: 0px;
        padding: 0px; border: 0px; vertical-align: baseline;"
        face="courier new, monospace">FROM landsat8</font></div>
    <div style="margin: 0px; padding: 0px; border: 0px; vertical-align:
      baseline; color: rgb(34, 34, 34); font-family: Arial, Helvetica,
      sans-serif; font-size: 13px; font-style: normal; font-variant:
      normal; font-weight: normal; letter-spacing: normal; line-height:
      normal; orphans: auto; text-align: start; text-indent: 0px;
      text-transform: none; white-space: normal; widows: auto;
      word-spacing: 0px; -webkit-text-stroke-width: 0px;
      background-color: rgb(255, 255, 255);"><font style="margin: 0px;
        padding: 0px; border: 0px; vertical-align: baseline;"
        face="courier new, monospace">WHERE ST_Overlaps(polygon,
        rast_geom_4326)</font></div>
    <div style="margin: 0px; padding: 0px; border: 0px; vertical-align:
      baseline; color: rgb(34, 34, 34); font-family: Arial, Helvetica,
      sans-serif; font-size: 13px; font-style: normal; font-variant:
      normal; font-weight: normal; letter-spacing: normal; line-height:
      normal; orphans: auto; text-align: start; text-indent: 0px;
      text-transform: none; white-space: normal; widows: auto;
      word-spacing: 0px; -webkit-text-stroke-width: 0px;
      background-color: rgb(255, 255, 255);"><font style="margin: 0px;
        padding: 0px; border: 0px; vertical-align: baseline;"
        face="courier new, monospace"><br>
      </font></div>
    <div style="margin: 0px; padding: 0px; border: 0px; vertical-align:
      baseline; color: rgb(34, 34, 34); font-family: Arial, Helvetica,
      sans-serif; font-size: 13px; font-style: normal; font-variant:
      normal; font-weight: normal; letter-spacing: normal; line-height:
      normal; orphans: auto; text-align: start; text-indent: 0px;
      text-transform: none; white-space: normal; widows: auto;
      word-spacing: 0px; -webkit-text-stroke-width: 0px;
      background-color: rgb(255, 255, 255);"><font style="margin: 0px;
        padding: 0px; border: 0px; vertical-align: baseline;"
        face="arial, sans-serif">I'm using PostGIS 2.1, my raster is
        retrieved from <a href="http://earthexplorer.usgs.gov/"
          target="_blank"
          onmousedown="this.href='http://www.google.com/url?q\75http%3A%2F%2Fearthexplorer.usgs.gov\46sa\75D\46sntz\0751\46usg\75AFQjCNEhTkks1k0cvnNJr9Gk3bdQzymKQw';return
          true;"
          onclick="this.href='http://www.google.com/url?q\75http%3A%2F%2Fearthexplorer.usgs.gov\46sa\75D\46sntz\0751\46usg\75AFQjCNEhTkks1k0cvnNJr9Gk3bdQzymKQw';return
          true;" style="margin: 0px; padding: 0px; border: 0px;
          vertical-align: baseline; text-decoration: none; color:
          rgb(102, 17, 204); cursor: pointer;">earthexplorer.usgs.gov</a></font></div>
  </body>
</html>