Max and min not working. V 5.0 Postgress db

Hello, I am using Helical Insight EE version 5.0 GIT 686 build. The max and min functions are not working. I am using Postgress DB

Thanks,
Sesa.

Hello Sesa,

We are sharing a file Postgress.xml. Please put this file in the location “…\hi\hi-repository\System\Admin\SqlFunctions”

Then in a private browser (delete browser cache) create a new report and try this functionality and confirm the result. In fact even if you face this issue with any other DB, you can open that respective db.xml file (like Mysql.xml, oracle.xml etc) present at the location. You will see some code like below which defined Min function and Max function. You can delete/comment out the definition of this code of Max/Min and then you can see it would work.

<function group="numeric" returns="numeric">
        <key>sql.numeric.max</key>
        <value>MAX</value>
        <signature><![CDATA[greatest(${number1},${number2})]]></signature>
        <parameters>
            <parameter column="true" name="number1"/>
            <parameter column="true" name="number2"/>
        </parameters>
        <description>Returns the largest of the provided number. Example: greatest(4,13) result: 13</description>
    </function>
	<function group="numeric" returns="numeric">
        <key>sql.numeric.min</key>
        <value>MIN</value>
        <signature><![CDATA[least(${number1},${number2})]]></signature>
        <parameters>
            <parameter column="true" name="number1"/>
            <parameter column="true" name="number2"/>
        </parameters>
        <description>Returns the smallest of the provided number. Example: least(13,4) result: 4</description>
    </function>

Thank you,
Helical Insight.