<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, May 29, 2013 at 12:53 PM, Stephen Woodbridge <span dir="ltr"><<a 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 class="im">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 class="im">
<br>
<br>
<br>
On Wed, May 29, 2013 at 12:18 PM, Stephen Woodbridge<br></div><div><div class="h5">
<<a href="mailto:woodbri@swoodbridge.com" target="_blank">woodbri@swoodbridge.com</a> <mailto:<a href="mailto:woodbri@swoodbridge.com" target="_blank">woodbri@swoodbridge.<u></u>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>
----------+---------+-------+-<u></u>---------+---------------<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 style>Me neither. I would prefer to query for attributes as well.</div>

<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 style>

Do you really need to define new types to return a table?</div><div style><br></div><div style>I just did it like this in another function variant:</div><div style><a href="https://github.com/pgRouting/pgrouting/blob/sew-devel-2_0/src/common/sql/pgrouting_network_check.sql">https://github.com/pgRouting/pgrouting/blob/sew-devel-2_0/src/common/sql/pgrouting_network_check.sql</a><br>

</div><div style><br></div><div style>I didn't have to create a type for that.</div><div style><br></div><div style>Daniel</div><div><br></div><div><br></div><div><br></div><div> </div></div><div><br></div>-- <br><span style="font-family:arial,sans-serif;font-size:13px;border-collapse:collapse">Georepublic UG & Georepublic Japan<br>

eMail: <a href="mailto:daniel.kastl@georepublic.de" style="color:rgb(66,99,171)" target="_blank">daniel.kastl@georepublic.de</a><br>Web: <a href="http://georepublic.de/" style="color:rgb(66,99,171)" target="_blank">http://georepublic.de</a></span>
</div></div>