From: | "Vadim I(dot) Passynkov" <pvi(at)axxent(dot)ca> |
---|---|
To: | Justin Clift <justin(at)postgresql(dot)org> |
Cc: | 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 15:49:55 |
Message-ID: | 3AE5A0A3.8559371F@axxent.ca |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
Justin Clift wrote:
>
For 7.0.3 I already found solution for this problem, thanks.
I ask now about why logical same functions host(inet) and netmask(inet)
return different types ?
> 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
--
Vadim I. Passynkov, Axxent Corp.
mailto:pvi(at)axxent(dot)ca
From | Date | Subject | |
---|---|---|---|
Next Message | Alexey Nalbat | 2001-04-24 15:55:32 | c-function returning multiple rows |
Previous Message | Peter Eisentraut | 2001-04-24 15:15:28 | Re: pg_regress hangs on parallel test |