Re: incompatible return type for netmask(inet) function between 7.0.3 and 7.1

From: Justin Clift <justin(at)postgresql(dot)org>
To: pvi(at)axxent(dot)ca, pgsql-bugs(at)postgresql(dot)org
Subject: Re: incompatible return type for netmask(inet) function between 7.0.3 and 7.1
Date: 2001-04-24 14:47:02
Message-ID: 3AE591E6.22E8EF54@postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Hi Vadim,

I don't know if this is of any help, but it might be...

With PostgreSQL 7.0.x, there was a bug with the way inet type data was
being returned. It was being given out as text, but with spaces used
for padding stuck on the end of the string.

i.e. '192.168.1.1 '

This was fixed in 7.1.

i.e. '192.168.1.1'

Depending on how you're doing things, you *might* be able to wrap stuff
in a btrim() function for 7.0.x.

i.e. btrim(<inet_field>) should return '192.168.1.1'

Well, you get the idea. Might be a start of a workaround for you
anyway.

Regards and best wishes,

Justin Clift

pgsql-bugs(at)postgresql(dot)org wrote:
>
> Vadim Passynkov (pvi(at)axxent(dot)ca) reports a bug with a severity of 4
> The lower the number the more severe it is.
>
> Short Description
> incompatible return type for netmask(inet) function between 7.0.3 and 7.1
>
> Long Description
> Function netmask(inet) change return type from 7.0.3 to 7.1
> In 7.0.3 return type was text, in 7.1 return type inet
> Realy in 7.1 added text(inet) and of course need that
> host and netmask have return type inet, but host in 7.1 still return
> text.
>
> Other problem this changes that dump code from 7.0.3 incompatible
> with 7.1.
>
> Sample Code
> Version 7.0.3
> template1=# \df netmask
> List of functions
> Result | Function | Arguments
> --------+----------+-----------
> text | netmask | inet
> (1 row)
>
> template1=# \df host
> List of functions
> Result | Function | Arguments
> --------+----------+-----------
> text | host | inet
> (1 row)
>
> Version 7.1
> template1=# \df netmask
> List of functions
> Result | Function | Arguments
> --------+----------+-----------
> inet | netmask | inet
> (1 row)
>
> template1=# \df host
> List of functions
> Result | Function | Arguments
> --------+----------+-----------
> text | host | inet
> (1 row)
>
> No file was uploaded with this report
>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
> (send "unregister YourEmailAddressHere" to majordomo(at)postgresql(dot)org)

--
"My grandfather once told me that there are two kinds of people: those
who work and those who take the credit. He told me to try to be in the
first group; there was less competition there."
- Indira Gandhi

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Peter Eisentraut 2001-04-24 15:15:28 Re: pg_regress hangs on parallel test
Previous Message pgsql-bugs 2001-04-24 14:36:19 build of PL/Perl cannot find include files.