<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">On 29/05/13 06:20, Daniel Kastl wrote:<br>
      <br>
      Looks great as long as it returns all the information required for
      debugging pg route that can not be got from elsewhere.  It returns
      information about which version of the pgr code has been used, but
      does it include the version information for the dependency of
      libraries used to build pgr? <br>
      <br>
      For example if I use select postgis_version<br>
      <br>
      I get 2.0 USE_GEOS=1 USE_PROJU=1 USE_STATS=1<br>
      <br>
      postgis_full_version<br>
      <br>
      POSTGIS="2.0.0 r9605" GEOS="3.3.8-CAPI-1.7.82 PROJ="Rel.4.8.0, 6
      March 2012" GDAL="GDAL 1.9.2, release 2012/10/08"
      LIBJSON="UNKNOWN" RASTER<br>
      <br>
      With this information I would known everything required to build
      the right version of postgis,  does'nt pgr include some support
      from some 3rd party libraries?<br>
      <br>
      I am just thinking about the next time,  a bug report is raised!<br>
      <br>
      Dave.<br>
      <a class="spell"
href="https://www.google.co.uk/search?client=ubuntu&hs=k3u&channel=cs&biw=1325&bih=870&q=libraries&spell=1&sa=X&ei=-5GlUeK1GOmX0QWK94DwBw&ved=0CCwQvwUoAA"
        style="font-size: medium; color: rgb(17, 34, 204); cursor:
        pointer; font-family: arial, sans-serif; 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-size-adjust: auto;
        -webkit-text-stroke-width: 0px; background-color: rgb(255, 255,
        255);"><b><i></i></b></a></div>
    <blockquote
cite="mid:CABXBSH_cXh8bkc0mCvUMObF5McYrOd0bBg5F4aa7w99rd=D1=A@mail.gmail.com"
      type="cite">
      <div dir="ltr"><br>
        <div class="gmail_extra"><br>
          <br>
          <div class="gmail_quote">On Wed, May 29, 2013 at 1:17 PM,
            Daniel Kastl <span dir="ltr"><<a moz-do-not-send="true"
                href="mailto:daniel@georepublic.de" target="_blank">daniel@georepublic.de</a>></span>
            wrote:<br>
            <blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
              <div dir="ltr"><br>
                <div class="gmail_extra"><br>
                  <br>
                  <div class="gmail_quote">
                    <div>
                      <div class="h5">On Wed, May 29, 2013 at 12:53 PM,
                        Stephen Woodbridge <span dir="ltr"><<a
                            moz-do-not-send="true"
                            href="mailto:woodbri@swoodbridge.com"
                            target="_blank">woodbri@swoodbridge.com</a>></span>
                        wrote:<br>
                        <blockquote class="gmail_quote"
                          style="margin:0px 0px 0px
0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
                          <div>On 5/28/2013 11:40 PM, Daniel Kastl
                            wrote:<br>
                          </div>
                          <blockquote class="gmail_quote"
                            style="margin:0px 0px 0px
0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
                            <div>
                              <br>
                              <br>
                              <br>
                              On Wed, May 29, 2013 at 12:18 PM, Stephen
                              Woodbridge<br>
                            </div>
                            <div>
                              <div>
                                <<a moz-do-not-send="true"
                                  href="mailto:woodbri@swoodbridge.com"
                                  target="_blank">woodbri@swoodbridge.com</a>
                                <mailto:<a moz-do-not-send="true"
                                  href="mailto:woodbri@swoodbridge.com"
                                  target="_blank">woodbri@swoodbridge.com</a>>>
                                wrote:<br>
                                <br>
                                    On 5/28/2013 10:14 PM, Daniel Kastl
                                wrote:<br>
                                <br>
                                <br>
                                        What about just one
                                "pgr_version()" function?<br>
                                        I don't get the use case where
                                we need two of them ;-)<br>
                                <br>
                                        I think "pgr_version()" should
                                then return the "full" version.<br>
                                <br>
                                <br>
                                    I'm fine with have to two functions.<br>
                                <br>
                                    pgr_full_version()  - this would be
                                the full string with everything<br>
                                    pgr_version()       - this should
                                match version of extension like:<br>
                                                           2.0.0-dev in
                                pgrouting--2.0.0-dev.sql<br>
                                <br>
                                    The full version string is what we
                                want for bug reporting.<br>
                                    The version is what you might want
                                to use in an application to<br>
                                    construct if clauses based on
                                features available in this or that<br>
                                    version of the software.<br>
                                <br>
                                <br>
                                What about<br>
                                <br>
                                pgr_version() -> should match version
                                of extension<br>
                                pgr_version("full") -> full string
                                with everything  (could be also "debug")<br>
                                <br>
                                I know this is not really important
                                discussion, but we did so well in<br>
                                decreasing the number of functions and
                                then we're having multiple ones<br>
                                for just getting the version information
                                ;-)<br>
                                Also I had to add two pages to the
                                function reference somehow.<br>
                                <br>
                                I still like the idea to return a
                                record, because someone could pick<br>
                                what is important if used for an
                                application, like:<br>
                                <br>
                                SELECT * FROM pgr_version();<br>
                                <br>
                                version   | tag     | build | hash     |
                                branch<br>
                                ----------+---------+-------+----------+---------------<br>
                                2.0.0-dev | v2.0dev | 271   | g6eeef9b |
                                sew-devel-2_0<br>
                                <br>
                                So one could get the version with SELECT
                                version FROM pgr_version() in<br>
                                case they really use it for some
                                application for example;<br>
                              </div>
                            </div>
                          </blockquote>
                          <br>
                          This would require defining a new TYPE, I
                          suppose I we could return text[] then you
                          could use array_to_string() to concat them
                          with hyphens.<br>
                          <br>
                          I don't like the idea of passing arguments to
                          get different strings, because I have not seen
                          it on any other apps.<br>
                        </blockquote>
                        <div><br>
                        </div>
                      </div>
                    </div>
                    <div>Me neither. I would prefer to query for
                      attributes as well.</div>
                    <div class="im">
                      <div><br>
                      </div>
                      <div> </div>
                      <blockquote class="gmail_quote" style="margin:0px
                        0px 0px
0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><br>
                        I would just have leave it as two functions and
                        put them both on one doc page. Or if you want it
                        parsed return a text[] array. I'm happy to make
                        the changes that is trivial.<br>
                      </blockquote>
                      <div><br>
                      </div>
                    </div>
                    <div>
                      Do you really need to define new types to return a
                      table?</div>
                    <div><br>
                    </div>
                    <div>I just did it like this in another function
                      variant:</div>
                    <div><a moz-do-not-send="true"
href="https://github.com/pgRouting/pgrouting/blob/sew-devel-2_0/src/common/sql/pgrouting_network_check.sql"
                        target="_blank">https://github.com/pgRouting/pgrouting/blob/sew-devel-2_0/src/common/sql/pgrouting_network_check.sql</a><br>
                    </div>
                    <div><br>
                    </div>
                    <div>I didn't have to create a type for that.</div>
                    <div><br>
                    </div>
                  </div>
                </div>
              </div>
            </blockquote>
            <div><br>
            </div>
            <div><br>
            </div>
            <div style="">I tried this and it works pretty well:</div>
            <div style=""><br>
            </div>
            <div style="">
              <div><font face="courier new, monospace">CREATE OR REPLACE
                  FUNCTION public.pgr_version()</font></div>
              <div><font face="courier new, monospace">  RETURNS TABLE(</font></div>
              <div><font face="courier new, monospace"><span class=""
                    style="white-space:pre"> </span>"version" varchar, </font></div>
              <div><font face="courier new, monospace"><span class=""
                    style="white-space:pre"> </span>tag varchar,</font></div>
              <div><font face="courier new, monospace"><span class=""
                    style="white-space:pre"> </span>build varchar,</font></div>
              <div><font face="courier new, monospace"><span class=""
                    style="white-space:pre"> </span>hash varchar,</font></div>
              <div><font face="courier new, monospace"><span class=""
                    style="white-space:pre"> </span>branch varchar</font></div>
              <div><font face="courier new, monospace">) AS</font></div>
              <div><font face="courier new, monospace">$BODY$</font></div>
              <div><font face="courier new, monospace">DECLARE</font></div>
              <div><font face="courier new, monospace"><br>
                </font></div>
              <div><font face="courier new, monospace">BEGIN</font></div>
              <div><font face="courier new, monospace">    --return
                  '2.0.0-dev v2.0dev-285-g101f36a sew-devel-2_0';</font></div>
              <div><font face="courier new, monospace">    RETURN QUERY
                  SELECT '2.0.0-dev'::varchar AS
                  version,'v2.0dev'::varchar AS tag, </font></div>
              <div><font face="courier new, monospace">                 
                        '285'::varchar AS build, 'g101f36a'::varchar AS
                  hash, </font></div>
              <div><font face="courier new, monospace">                 
                        'sew-devel-2_0'::varchar AS branch;</font></div>
              <div><font face="courier new, monospace">END;</font></div>
              <div><font face="courier new, monospace">$BODY$</font></div>
              <div><font face="courier new, monospace">  LANGUAGE
                  plpgsql IMMUTABLE</font></div>
              <div>  COST 100;</div>
            </div>
            <div style=""><br>
            </div>
            <div style="">You can run either with "SELECT * FROM
              pgr_version()"</div>
            <div style=""><br>
            </div>
            <div style="">
              <div> psql -U postgres -d doc -c "SELECT * FROM
                public.pgr_version()"</div>
              <div>  version  |   tag   | build |   hash   |    branch  
                  </div>
              <div>-----------+---------+-------+----------+---------------</div>
              <div> 2.0.0-dev | v2.0dev | 285   | g101f36a |
                sew-devel-2_0</div>
              <div>(1 row)</div>
              <div>
                <br>
              </div>
              <div style="">Or just "SELECT pgr_version()"</div>
            </div>
            <div style=""><br>
            </div>
            <div style="">
              <div>psql -U postgres -d doc -c "SELECT
                public.pgr_version()"</div>
              <div>                  pgr_version                   </div>
              <div>------------------------------------------------</div>
              <div> (2.0.0-dev,v2.0dev,285,g101f36a,sew-devel-2_0)</div>
              <div>(1 row)</div>
              <div><br>
              </div>
              <div style="">I think this should satisfy everyone. No?
                ;-)</div>
              <div style="">
                <br>
              </div>
              <div style="">Daniel</div>
            </div>
            <div style=""><br>
            </div>
            <div style=""><br>
            </div>
            <div style=""> </div>
          </div>
          <br clear="all">
          <div><br>
          </div>
          -- <br>
          <span
style="font-family:arial,sans-serif;font-size:13px;border-collapse:collapse">Georepublic
            UG & Georepublic Japan<br>
            eMail: <a moz-do-not-send="true"
              href="mailto:daniel.kastl@georepublic.de"
              style="color:rgb(66,99,171)" target="_blank">daniel.kastl@georepublic.de</a><br>
            Web: <a moz-do-not-send="true" href="http://georepublic.de/"
              style="color:rgb(66,99,171)" target="_blank">http://georepublic.de</a></span>
        </div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
pgrouting-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:pgrouting-dev@lists.osgeo.org">pgrouting-dev@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="http://lists.osgeo.org/mailman/listinfo/pgrouting-dev">http://lists.osgeo.org/mailman/listinfo/pgrouting-dev</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>