Re: [BUGS] BUG #9652: inet types don't support min/max

From: Asif Naeem <anaeem(dot)it(at)gmail(dot)com>
To: Haribabu Kommi <kommi(dot)haribabu(at)gmail(dot)com>
Cc: Abhijit Menon-Sen <ams(at)2ndquadrant(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [BUGS] BUG #9652: inet types don't support min/max
Date: 2014-08-04 05:22:32
Message-ID: CAEB4t-PznBeb2kPhUtUAMGrLHmxjWAkf9sm4EBEtN-n44mAX=Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-hackers

Thank you Haribabu. Please see my comments inlined below i.e.

On Sun, Jul 27, 2014 at 11:42 AM, Haribabu Kommi <kommi(dot)haribabu(at)gmail(dot)com>
wrote:

> On Thu, Jul 24, 2014 at 5:59 PM, Asif Naeem <anaeem(dot)it(at)gmail(dot)com> wrote:
> > Sorry for being late. Thank you for sharing updated patch, sgml changes
> > seems not working i.e.
> >
> >> postgres=# select max('192.168.1.5', '192.168.1.4');
> >> ERROR: function max(unknown, unknown) does not exist
> >> LINE 1: select max('192.168.1.5', '192.168.1.4');
> >>
> >> ^
> >> HINT: No function matches the given name and argument types. You might
> >> need to add explicit type casts.
> >> postgres=# select min('192.168.1.5', '192.168.1.4');
> >> ERROR: function min(unknown, unknown) does not exist
> >> LINE 1: select min('192.168.1.5', '192.168.1.4');
> >>
> >> ^
> >> HINT: No function matches the given name and argument types. You might
> >> need to add explicit type casts.
>
> I didn't get your point. I tested the patch, the sgml changes are working
> fine.

Sorry for not being clear, above mentioned test is related to following doc
(sgml) changes that seems not working as described i.e.

*Table 9-35. cidr and inet Functions*
FunctionReturn TypeDescriptionExampleResult

max(inet, inet)inetlarger of two inet typesmax('192.168.1.5', '192.168.1.4')
192.168.1.5min(inet, inet)inetsmaller of two inet typesmin('192.168.1.5',
'192.168.1.4')192.168.1.4

Can you please elaborate these sgml change ?

> > I would suggest the following or similar changes e.g.
> >
> >> doc/src/sgml/func.sgml
> >> </indexterm>
> >> <function>max(<replaceable
> >> class="parameter">expression</replaceable>)</function>
> >> </entry>
> >> - <entry>any array, numeric, string, or date/time type</entry>
> >> + <entry>any inet, array, numeric, string, or date/time
> type</entry>
> >> <entry>same as argument type</entry>
> >> <entry>
> >> maximum value of <replaceable
> >> @@ -12204,7 +12228,7 @@ NULL baz</literallayout>(3 rows)</entry>
> >> </indexterm>
> >> <function>min(<replaceable
> >> class="parameter">expression</replaceable>)</function>
> >> </entry>
> >> - <entry>any array, numeric, string, or date/time type</entry>
> >> + <entry>any inet, array, numeric, string, or date/time
> type</entry>
> >> <entry>same as argument type</entry>
> >> <entry>
> >> minimum value of <replaceable
>
> Thanks for reviewing the patch.
> I missed the above change. Corrected the same in the attached patch.
>
> Regards,
> Hari Babu
> Fujitsu Australia
>

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Rainer Tammer 2014-08-04 05:56:40 Re: Fwd: Re: Compile fails on AIX 6.1
Previous Message luke.henry 2014-08-03 19:52:37 BUG #11119: JDBC Driver misreports failing query/statement in executeBatch

Browse pgsql-hackers by date

  From Date Subject
Next Message Rainer Tammer 2014-08-04 05:56:40 Re: Fwd: Re: Compile fails on AIX 6.1
Previous Message Gavin Flower 2014-08-03 19:29:25 Re: Proposed changing the definition of decade for date_trunc and extract