I went to test my functions but got the following.

darcy=> select '198.1.2.3/8'::inet;
ERROR:  type name lookup of inet failed

Was the type backed out while waiting for completion?  Any chance of
getting it put back so I can make the tests?

-- 
D'Arcy J.M. Cain <darcy@{druid|vex}.net>   |  Democracy is three wolves
http://www.druid.net/darcy/                |  and a sheep voting on
+1 416 424 2871     (DoD#0082)    (eNTP)   |  what's for dinner.

Thu, 15 Oct 1998 12:58:37 -0400 (EDT)
darcy@druid.net (D'Arcy J.M. Cain)
Did the inet type get backed out?
> I went to test my functions but got the following.
> 
> darcy=> select '198.1.2.3/8'::inet;
> ERROR:  type name lookup of inet failed
> 
> Was the type backed out while waiting for completion?  Any chance of
> getting it put back so I can make the tests?

It's in there:

	test=> create table testv (x inet);

Not sure why your test doesn't work.  I think there needs to be a
function named inet().

-- 
  Bruce Momjian                        |  http://www.op.net/~candle
  maillist@candle.pha.pa.us            |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026

Thu, 15 Oct 1998 13:51:53 -0400 (EDT)
Bruce Momjian <maillist@candle.pha.pa.us>
Re: [HACKERS] Did the inet type get backed out?
Thus spake Bruce Momjian
> > darcy=> select '198.1.2.3/8'::inet;
> > ERROR:  type name lookup of inet failed
> > 
> > Was the type backed out while waiting for completion?  Any chance of
> > getting it put back so I can make the tests?
> 
> It's in there:
> 
> 	test=> create table testv (x inet);
> 
> Not sure why your test doesn't work.  I think there needs to be a
> function named inet().

But it worked before.  In fact it still works on another system with
an earlier compile.

-- 
D'Arcy J.M. Cain <darcy@{druid|vex}.net>   |  Democracy is three wolves
http://www.druid.net/darcy/                |  and a sheep voting on
+1 416 424 2871     (DoD#0082)    (eNTP)   |  what's for dinner.

Thu, 15 Oct 1998 17:15:27 -0400 (EDT)
darcy@druid.net (D'Arcy J.M. Cain)
Re: [HACKERS] Did the inet type get backed out?
> Thus spake Bruce Momjian
> > > darcy=> select '198.1.2.3/8'::inet;
> > > ERROR:  type name lookup of inet failed
> > > 
> > > Was the type backed out while waiting for completion?  Any chance of
> > > getting it put back so I can make the tests?
> > 
> > It's in there:
> > 
> > 	test=> create table testv (x inet);
> > 
> > Not sure why your test doesn't work.  I think there needs to be a
> > function named inet().
> 
> But it worked before.  In fact it still works on another system with
> an earlier compile.

That is strange.  I haven't done anything in a long while that would
affect this.  I applied your patch to add the functions.  That is the
only thing I can think of.

-- 
  Bruce Momjian                        |  http://www.op.net/~candle
  maillist@candle.pha.pa.us            |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026

Fri, 16 Oct 1998 02:17:31 -0400 (EDT)
Bruce Momjian <maillist@candle.pha.pa.us>
Re: [HACKERS] Did the inet type get backed out?
darcy@druid.net (D'Arcy J.M. Cain) writes:

> But it worked before.  In fact it still works on another system with
> an earlier compile.

"Works" for me, using a cvs update from yesterday morning (the morning
after the BETA 2 freeze), modulo the fact that someone committed
changes to #ifdef out ("#ifdef BAD") all the calls to the actual inet
parser routines, effectively causing all data to be rejected.  Since
we had an implementation that actually worked, and the changes that we
wanted to make were compatible with currently stored data, it would
have been smarter to leave it working until the changes were ready to
be committed.  It's better to be able to keep testing something that
doesn't have all the wanted functionality than to disable it until an
unknown time in the future!  :-)

-tih
-- 
Popularity is the hallmark of mediocrity.  --Niles Crane, "Frasier"

16 Oct 1998 08:21:59 +0200
Tom Ivar Helbekkmo <tih@nhh.no>
Re: [HACKERS] Did the inet type get backed out?
Thus spake Tom Ivar Helbekkmo
> darcy@druid.net (D'Arcy J.M. Cain) writes:
> > But it worked before.  In fact it still works on another system with
> > an earlier compile.
> 
> "Works" for me, using a cvs update from yesterday morning (the morning
> after the BETA 2 freeze), modulo the fact that someone committed
> changes to #ifdef out ("#ifdef BAD") all the calls to the actual inet
> parser routines, effectively causing all data to be rejected.  Since

That's odd.  I know that Bruce #ifdef'd out the core of the _new_
functions I sent in but I didn't realize that he took the existing
ones out too.

> we had an implementation that actually worked, and the changes that we
> wanted to make were compatible with currently stored data, it would
> have been smarter to leave it working until the changes were ready to
> be committed.  It's better to be able to keep testing something that
> doesn't have all the wanted functionality than to disable it until an
> unknown time in the future!  :-)

Yes, I agree.  Bruce, can we put the inet_in and inet_out functions
back the way they were?

However, I have put all the code back in locally for testing so that
isn't why mine isn't working.  I'll try with today's sup.

-- 
D'Arcy J.M. Cain <darcy@{druid|vex}.net>   |  Democracy is three wolves
http://www.druid.net/darcy/                |  and a sheep voting on
+1 416 424 2871     (DoD#0082)    (eNTP)   |  what's for dinner.

Fri, 16 Oct 1998 08:11:53 -0400 (EDT)
darcy@druid.net (D'Arcy J.M. Cain)
Re: [HACKERS] Did the inet type get backed out?
> Thus spake Tom Ivar Helbekkmo
> > darcy@druid.net (D'Arcy J.M. Cain) writes:
> > > But it worked before.  In fact it still works on another system with
> > > an earlier compile.
> > 
> > "Works" for me, using a cvs update from yesterday morning (the morning
> > after the BETA 2 freeze), modulo the fact that someone committed
> > changes to #ifdef out ("#ifdef BAD") all the calls to the actual inet
> > parser routines, effectively causing all data to be rejected.  Since
> 
> That's odd.  I know that Bruce #ifdef'd out the core of the _new_
> functions I sent in but I didn't realize that he took the existing
> ones out too.
> 
> > we had an implementation that actually worked, and the changes that we
> > wanted to make were compatible with currently stored data, it would
> > have been smarter to leave it working until the changes were ready to
> > be committed.  It's better to be able to keep testing something that
> > doesn't have all the wanted functionality than to disable it until an
> > unknown time in the future!  :-)
> 
> Yes, I agree.  Bruce, can we put the inet_in and inet_out functions
> back the way they were?
> 
> However, I have put all the code back in locally for testing so that
> isn't why mine isn't working.  I'll try with today's sup.

I just ifdef'ed out the calls to the non-existant functions.  That is
all.


-- 
  Bruce Momjian                        |  http://www.op.net/~candle
  maillist@candle.pha.pa.us            |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026

Fri, 16 Oct 1998 11:21:09 -0400 (EDT)
Bruce Momjian <maillist@candle.pha.pa.us>
Re: [HACKERS] Did the inet type get backed out?
Bruce Momjian <maillist@candle.pha.pa.us> writes:

> I just ifdef'ed out the calls to the non-existant functions.  That is
> all.

You probably meant to.  What you did was to #ifdef out all the calls
to the missing inet_cidr_*() functions in the code that D'Arcy added,
_and_ the ones to the existing inet_net_*() ones that are needed for
the code to work at all.  Easy mistake to make when things are named
so similarly.

If you remove the erroneous #ifdef BAD stuff, and apply the following
patch to the (current) inet_net_pton.c, we'll have a working INET type
again, only missing the improvements that D'Arcy and Paul cooperated
to hash out.

Oh, and D'Arcy: about documentation: should you and I maybe bounce a
file of SGML back and forth a couple of times, getting the type and
functions properly described?  I can start it off if you like, but I'm
not sure I'll be able to find time to do it until monday...

-tih

*** inet_net_pton.c.old	Fri Oct 16 19:44:25 1998
--- inet_net_pton.c.new	Fri Oct 16 19:45:40 1998
***************
*** 100,133 ****
  
  	ch = *src++;
  	if (ch == '0' && (src[0] == 'x' || src[0] == 'X')
! 		&& isascii(src[1]) && isxdigit(src[1]))
! 	{
  		/* Hexadecimal: Eat nybble string. */
  		if (size <= 0)
  			goto emsgsize;
- 		tmp = 0;
  		dirty = 0;
! 		src++;					/* skip x or X. */
! 		while ((ch = *src++) != '\0' &&
! 			   isascii(ch) && isxdigit(ch))
! 		{
  			if (isupper(ch))
  				ch = tolower(ch);
  			n = strchr(xdigits, ch) - xdigits;
  			assert(n >= 0 && n <= 15);
! 			tmp = (tmp << 4) | n;
  			if (++dirty == 2) {
  				if (size-- <= 0)
  					goto emsgsize;
  				*dst++ = (u_char) tmp;
! 				tmp = 0, dirty = 0;
  			}
  		}
! 		if (dirty) {
  			if (size-- <= 0)
  				goto emsgsize;
! 			tmp <<= 4;
! 			*dst++ = (u_char) tmp;
  		}
  	}
  	else if (isascii(ch) && isdigit(ch))
--- 100,131 ----
  
  	ch = *src++;
  	if (ch == '0' && (src[0] == 'x' || src[0] == 'X')
! 	    && isascii(src[1]) && isxdigit(src[1])) {
  		/* Hexadecimal: Eat nybble string. */
  		if (size <= 0)
  			goto emsgsize;
  		dirty = 0;
! 		src++;	/* skip x or X. */
! 		while ((ch = *src++) != '\0' && isascii(ch) && isxdigit(ch)) {
  			if (isupper(ch))
  				ch = tolower(ch);
  			n = strchr(xdigits, ch) - xdigits;
  			assert(n >= 0 && n <= 15);
! 			if (dirty == 0)
! 				tmp = n;
! 			else
! 				tmp = (tmp << 4) | n;
  			if (++dirty == 2) {
  				if (size-- <= 0)
  					goto emsgsize;
  				*dst++ = (u_char) tmp;
! 				dirty = 0;
  			}
  		}
! 		if (dirty) {  /* Odd trailing nybble? */
  			if (size-- <= 0)
  				goto emsgsize;
! 			*dst++ = (u_char) (tmp << 4);
  		}
  	}
  	else if (isascii(ch) && isdigit(ch))

-- 
Popularity is the hallmark of mediocrity.  --Niles Crane, "Frasier"

16 Oct 1998 19:51:45 +0200
Tom Ivar Helbekkmo <tih@nhh.no>
Re: [HACKERS] Did the inet type get backed out?
Thus spake Tom Ivar Helbekkmo
> Bruce Momjian <maillist@candle.pha.pa.us> writes:
> > I just ifdef'ed out the calls to the non-existant functions.  That is
> > all.
> 
> You probably meant to.  What you did was to #ifdef out all the calls
> to the missing inet_cidr_*() functions in the code that D'Arcy added,
> _and_ the ones to the existing inet_net_*() ones that are needed for
> the code to work at all.  Easy mistake to make when things are named
> so similarly.

Ah.  I thought I had left the inet_in and inet_out alone before sending
in the patches but I wasn't sure and I have made more drastic changes
locally since then so I couldn't tell for sure.

However, I have removed the comments but it still thinks that there is
no inet type at all.

> If you remove the erroneous #ifdef BAD stuff, and apply the following
> patch to the (current) inet_net_pton.c, we'll have a working INET type
> again, only missing the improvements that D'Arcy and Paul cooperated
> to hash out.

While I'm posting anyway, Paul; do you have an ETA yet?

> Oh, and D'Arcy: about documentation: should you and I maybe bounce a
> file of SGML back and forth a couple of times, getting the type and
> functions properly described?  I can start it off if you like, but I'm
> not sure I'll be able to find time to do it until monday...

Sure.  Is there an existing file for the existing inet type that I can
start working on?

-- 
D'Arcy J.M. Cain <darcy@{druid|vex}.net>   |  Democracy is three wolves
http://www.druid.net/darcy/                |  and a sheep voting on
+1 416 424 2871     (DoD#0082)    (eNTP)   |  what's for dinner.

Fri, 16 Oct 1998 18:44:53 -0400 (EDT)
darcy@druid.net (D'Arcy J.M. Cain)
Re: [HACKERS] Did the inet type get backed out?
Applied.

BAD defines removed for existing functions.  Oops.

> Bruce Momjian <maillist@candle.pha.pa.us> writes:
> 
> > I just ifdef'ed out the calls to the non-existant functions.  That is
> > all.
> 
> You probably meant to.  What you did was to #ifdef out all the calls
> to the missing inet_cidr_*() functions in the code that D'Arcy added,
> _and_ the ones to the existing inet_net_*() ones that are needed for
> the code to work at all.  Easy mistake to make when things are named
> so similarly.
> 
> If you remove the erroneous #ifdef BAD stuff, and apply the following
> patch to the (current) inet_net_pton.c, we'll have a working INET type
> again, only missing the improvements that D'Arcy and Paul cooperated
> to hash out.
> 
> Oh, and D'Arcy: about documentation: should you and I maybe bounce a
> file of SGML back and forth a couple of times, getting the type and
> functions properly described?  I can start it off if you like, but I'm
> not sure I'll be able to find time to do it until monday...
> 
> -tih
> 
> *** inet_net_pton.c.old	Fri Oct 16 19:44:25 1998
> --- inet_net_pton.c.new	Fri Oct 16 19:45:40 1998
> ***************
> *** 100,133 ****
>   
>   	ch = *src++;
>   	if (ch == '0' && (src[0] == 'x' || src[0] == 'X')
> ! 		&& isascii(src[1]) && isxdigit(src[1]))
> ! 	{
>   		/* Hexadecimal: Eat nybble string. */
>   		if (size <= 0)
>   			goto emsgsize;
> - 		tmp = 0;
>   		dirty = 0;
> ! 		src++;					/* skip x or X. */
> ! 		while ((ch = *src++) != '\0' &&
> ! 			   isascii(ch) && isxdigit(ch))
> ! 		{
>   			if (isupper(ch))
>   				ch = tolower(ch);
>   			n = strchr(xdigits, ch) - xdigits;
>   			assert(n >= 0 && n <= 15);
> ! 			tmp = (tmp << 4) | n;
>   			if (++dirty == 2) {
>   				if (size-- <= 0)
>   					goto emsgsize;
>   				*dst++ = (u_char) tmp;
> ! 				tmp = 0, dirty = 0;
>   			}
>   		}
> ! 		if (dirty) {
>   			if (size-- <= 0)
>   				goto emsgsize;
> ! 			tmp <<= 4;
> ! 			*dst++ = (u_char) tmp;
>   		}
>   	}
>   	else if (isascii(ch) && isdigit(ch))
> --- 100,131 ----
>   
>   	ch = *src++;
>   	if (ch == '0' && (src[0] == 'x' || src[0] == 'X')
> ! 	    && isascii(src[1]) && isxdigit(src[1])) {
>   		/* Hexadecimal: Eat nybble string. */
>   		if (size <= 0)
>   			goto emsgsize;
>   		dirty = 0;
> ! 		src++;	/* skip x or X. */
> ! 		while ((ch = *src++) != '\0' && isascii(ch) && isxdigit(ch)) {
>   			if (isupper(ch))
>   				ch = tolower(ch);
>   			n = strchr(xdigits, ch) - xdigits;
>   			assert(n >= 0 && n <= 15);
> ! 			if (dirty == 0)
> ! 				tmp = n;
> ! 			else
> ! 				tmp = (tmp << 4) | n;
>   			if (++dirty == 2) {
>   				if (size-- <= 0)
>   					goto emsgsize;
>   				*dst++ = (u_char) tmp;
> ! 				dirty = 0;
>   			}
>   		}
> ! 		if (dirty) {  /* Odd trailing nybble? */
>   			if (size-- <= 0)
>   				goto emsgsize;
> ! 			*dst++ = (u_char) (tmp << 4);
>   		}
>   	}
>   	else if (isascii(ch) && isdigit(ch))
> 
> -- 
> Popularity is the hallmark of mediocrity.  --Niles Crane, "Frasier"
> 


-- 
  Bruce Momjian                        |  http://www.op.net/~candle
  maillist@candle.pha.pa.us            |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026

Fri, 16 Oct 1998 23:59:47 -0400 (EDT)
Bruce Momjian <maillist@candle.pha.pa.us>
Re: [HACKERS] Did the inet type get backed out?
> Thus spake Tom Ivar Helbekkmo
> > Bruce Momjian <maillist@candle.pha.pa.us> writes:
> > > I just ifdef'ed out the calls to the non-existant functions.  That is
> > > all.
> > 
> > You probably meant to.  What you did was to #ifdef out all the calls
> > to the missing inet_cidr_*() functions in the code that D'Arcy added,
> > _and_ the ones to the existing inet_net_*() ones that are needed for
> > the code to work at all.  Easy mistake to make when things are named
> > so similarly.
> 
> Ah.  I thought I had left the inet_in and inet_out alone before sending
> in the patches but I wasn't sure and I have made more drastic changes
> locally since then so I couldn't tell for sure.
> 
> However, I have removed the comments but it still thinks that there is
> no inet type at all.
> 
> > If you remove the erroneous #ifdef BAD stuff, and apply the following
> > patch to the (current) inet_net_pton.c, we'll have a working INET type
> > again, only missing the improvements that D'Arcy and Paul cooperated
> > to hash out.
> 
> While I'm posting anyway, Paul; do you have an ETA yet?
> 
> > Oh, and D'Arcy: about documentation: should you and I maybe bounce a
> > file of SGML back and forth a couple of times, getting the type and
> > functions properly described?  I can start it off if you like, but I'm
> > not sure I'll be able to find time to do it until monday...
> 
> Sure.  Is there an existing file for the existing inet type that I can
> start working on?

I have again re-added the BAD defines because there are calls to
existing function are causing errors.  Basically, inet is broken.

-- 
  Bruce Momjian                        |  http://www.op.net/~candle
  maillist@candle.pha.pa.us            |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026

Sat, 17 Oct 1998 00:09:45 -0400 (EDT)
Bruce Momjian <maillist@candle.pha.pa.us>
Re: [HACKERS] Did the inet type get backed out?
Bruce Momjian <maillist@candle.pha.pa.us> writes:

> I have again re-added the BAD defines because there are calls to
> existing function are causing errors.  Basically, inet is broken.

Whoops.  Looks like D'Arcy changed those function calls in the patch
from him that you applied -- probably because you were planning to
change the inet_net_*() functions, right, D'Arcy?  I don't have time
to look at them right now, but if monday comes around and we don't
have the new version of the INET type in place, I'll have to do the
work locally to get it back to the working state it was in, anyway,
and I'll submit complete patches then.  I'm using the current state
of the PostgreSQL code in production here, and I really, really need
a working INET type, like, right now.  :-)

-tih
-- 
Popularity is the hallmark of mediocrity.  --Niles Crane, "Frasier"

17 Oct 1998 17:10:12 +0200
Tom Ivar Helbekkmo <tih@nhh.no>
Re: [HACKERS] Did the inet type get backed out?
Thus spake Tom Ivar Helbekkmo
> Bruce Momjian <maillist@candle.pha.pa.us> writes:
> > I have again re-added the BAD defines because there are calls to
> > existing function are causing errors.  Basically, inet is broken.

Damn!  I guess I did change those functions.  Sorry about that.

> Whoops.  Looks like D'Arcy changed those function calls in the patch
> from him that you applied -- probably because you were planning to
> change the inet_net_*() functions, right, D'Arcy?  I don't have time
> to look at them right now, but if monday comes around and we don't
> have the new version of the INET type in place, I'll have to do the
> work locally to get it back to the working state it was in, anyway,
> and I'll submit complete patches then.  I'm using the current state
> of the PostgreSQL code in production here, and I really, really need
> a working INET type, like, right now.  :-)

Paul said that he expects to have his stuff in this weekend.  I promise
to test and submit my stuff the minute I see it.

-- 
D'Arcy J.M. Cain <darcy@{druid|vex}.net>   |  Democracy is three wolves
http://www.druid.net/darcy/                |  and a sheep voting on
+1 416 424 2871     (DoD#0082)    (eNTP)   |  what's for dinner.

Sat, 17 Oct 1998 13:18:23 -0400 (EDT)
darcy@druid.net (D'Arcy J.M. Cain)
Re: [HACKERS] Did the inet type get backed out?