Re: pgsql/src/backend/parser gram.y

Lists: pgsql-committerspgsql-hackers
From: momjian(at)postgresql(dot)org (Bruce Momjian - CVS)
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql/src/backend/parser gram.y
Date: 2002-06-18 17:56:41
Message-ID: 20020618175641.8628C478A5F@postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-committers pgsql-hackers

CVSROOT: /cvsroot
Module name: pgsql
Changes by: momjian(at)postgresql(dot)org 02/06/18 13:56:41

Modified files:
src/backend/parser: gram.y

Log message:
Wrap long gram.y lines.


From: Thomas Lockhart <lockhart(at)fourpalms(dot)org>
To: Bruce Momjian - CVS <momjian(at)postgresql(dot)org>
Cc: pgsql-committers(at)postgresql(dot)org
Subject: Re: pgsql/src/backend/parser gram.y
Date: 2002-06-19 05:26:37
Message-ID: 3D10160D.861D8F12@fourpalms.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-committers pgsql-hackers

> Modified files:
> src/backend/parser: gram.y
> Log message:
> Wrap long gram.y lines.

Argh. I've been making some (minor) changes to gram.y and had noticed
some indenting troubles too. I'll bet it conflicts :(

Does the cvs head now compile and run? If so (or if when) I'll merge and
remove conflicts...

- Thomas


From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Thomas Lockhart <lockhart(at)fourpalms(dot)org>
Cc: Bruce Momjian - CVS <momjian(at)postgresql(dot)org>, pgsql-committers(at)postgresql(dot)org
Subject: Re: pgsql/src/backend/parser gram.y
Date: 2002-06-19 05:55:08
Message-ID: 200206190555.g5J5t8K13728@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-committers pgsql-hackers

Thomas Lockhart wrote:
> > Modified files:
> > src/backend/parser: gram.y
> > Log message:
> > Wrap long gram.y lines.
>
> Argh. I've been making some (minor) changes to gram.y and had noticed
> some indenting troubles too. I'll bet it conflicts :(

Yes, I have to do gram.y manually. Few indenters can do yacc files.

> Does the cvs head now compile and run? If so (or if when) I'll merge and
> remove conflicts...

Sure, CVS runs fine. I am working on some COPY syntax changes, but that
will not effect your changes. Let me know if you want help merging. I
know what I changed.

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


From: "Christopher Kings-Lynne" <chriskl(at)familyhealth(dot)com(dot)au>
To: "Bruce Momjian" <pgman(at)candle(dot)pha(dot)pa(dot)us>, "Thomas Lockhart" <lockhart(at)fourpalms(dot)org>
Cc: "Bruce Momjian - CVS" <momjian(at)postgresql(dot)org>, <pgsql-committers(at)postgresql(dot)org>
Subject: Re: pgsql/src/backend/parser gram.y
Date: 2002-06-19 06:14:34
Message-ID: GNELIHDDFBOCMGBFGEFOMENGCCAA.chriskl@familyhealth.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-committers pgsql-hackers

CVS HEAD does not compile on FreeBSD/Alpha:

./configure --prefix=/home/chriskl/local --enable-integer-datetimes --enable
-debug --enable-depend --enable-cassert --with-pam --with-CXX --with-openssl

Gives:

gmake[3]: Entering directory `/home/chriskl/pgsql-head/src/interfaces/libpq'
gcc -pipe -O -g -Wall -Wmissing-prototypes -Wmissing-declarations -fpic -DPI
C -I. -I../../../src/include -DFRONTEND -DSYSCONFDIR='"/home/chriskl/local/
etc/postgresql"' -c -o fe-secure.o fe-secure.c -MMD
fe-secure.c: In function `verify_peer':
fe-secure.c:417: structure has no member named `s6_addr8'
gmake[3]: *** [fe-secure.o] Error 1
gmake[3]: Leaving directory `/home/chriskl/pgsql-head/src/interfaces/libpq'
gmake[2]: *** [all] Error 2
gmake[2]: Leaving directory `/home/chriskl/pgsql-head/src/interfaces'
gmake[1]: *** [all] Error 2
gmake[1]: Leaving directory `/home/chriskl/pgsql-head/src'
gmake: *** [all] Error 2

Chris

> -----Original Message-----
> From: pgsql-committers-owner(at)postgresql(dot)org
> [mailto:pgsql-committers-owner(at)postgresql(dot)org]On Behalf Of Bruce Momjian
> Sent: Wednesday, 19 June 2002 1:55 PM
> To: Thomas Lockhart
> Cc: Bruce Momjian - CVS; pgsql-committers(at)postgresql(dot)org
> Subject: Re: [COMMITTERS] pgsql/src/backend/parser gram.y
>
>
> Thomas Lockhart wrote:
> > > Modified files:
> > > src/backend/parser: gram.y
> > > Log message:
> > > Wrap long gram.y lines.
> >
> > Argh. I've been making some (minor) changes to gram.y and had noticed
> > some indenting troubles too. I'll bet it conflicts :(
>
> Yes, I have to do gram.y manually. Few indenters can do yacc files.
>
> > Does the cvs head now compile and run? If so (or if when) I'll merge and
> > remove conflicts...
>
> Sure, CVS runs fine. I am working on some COPY syntax changes, but that
> will not effect your changes. Let me know if you want help merging. I
> know what I changed.
>
> --
> Bruce Momjian | http://candle.pha.pa.us
> pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
> + If your life is a hard drive, | 830 Blythe Avenue
> + Christ can be your backup. | Drexel Hill, Pennsylvania 19026
>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo(at)postgresql(dot)org so that your
> message can get through to the mailing list cleanly
>


From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au>
Cc: Thomas Lockhart <lockhart(at)fourpalms(dot)org>, Bruce Momjian - CVS <momjian(at)postgresql(dot)org>, pgsql-committers(at)postgresql(dot)org
Subject: Re: pgsql/src/backend/parser gram.y
Date: 2002-06-19 06:16:08
Message-ID: 200206190616.g5J6G8616282@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-committers pgsql-hackers

Christopher Kings-Lynne wrote:
> CVS HEAD does not compile on FreeBSD/Alpha:
>
> ./configure --prefix=/home/chriskl/local --enable-integer-datetimes --enable
> -debug --enable-depend --enable-cassert --with-pam --with-CXX --with-openssl
>
> Gives:
>
> gmake[3]: Entering directory `/home/chriskl/pgsql-head/src/interfaces/libpq'
> gcc -pipe -O -g -Wall -Wmissing-prototypes -Wmissing-declarations -fpic -DPI
> C -I. -I../../../src/include -DFRONTEND -DSYSCONFDIR='"/home/chriskl/local/
> etc/postgresql"' -c -o fe-secure.o fe-secure.c -MMD
> fe-secure.c: In function `verify_peer':
> fe-secure.c:417: structure has no member named `s6_addr8'
> gmake[3]: *** [fe-secure.o] Error 1
> gmake[3]: Leaving directory `/home/chriskl/pgsql-head/src/interfaces/libpq'
> gmake[2]: *** [all] Error 2
> gmake[2]: Leaving directory `/home/chriskl/pgsql-head/src/interfaces'
> gmake[1]: *** [all] Error 2
> gmake[1]: Leaving directory `/home/chriskl/pgsql-head/src'
> gmake: *** [all] Error 2

Of course, it compiles if you disable SSL. :-)

Can you look at that line and see if there is something in your OS that
matches it? I have KAME here and I thought FreeBSD would have that too.

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


From: "Christopher Kings-Lynne" <chriskl(at)familyhealth(dot)com(dot)au>
To: "Bruce Momjian" <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: "Thomas Lockhart" <lockhart(at)fourpalms(dot)org>, "Bruce Momjian - CVS" <momjian(at)postgresql(dot)org>, <pgsql-committers(at)postgresql(dot)org>
Subject: Re: pgsql/src/backend/parser gram.y
Date: 2002-06-19 06:29:42
Message-ID: GNELIHDDFBOCMGBFGEFOEENHCCAA.chriskl@familyhealth.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-committers pgsql-hackers

Can you give me a hint where to look? I've looked at the code and throught
he man pages and can't find the actual structure documented. It's version
4.4 of FreeBSD, and it has ipv6 compiled in (ifconfig -a proves that).

I'm searching /usr/src right now...

Chris

> -----Original Message-----
> From: Bruce Momjian [mailto:pgman(at)candle(dot)pha(dot)pa(dot)us]
> Sent: Wednesday, 19 June 2002 2:16 PM
> To: Christopher Kings-Lynne
> Cc: Thomas Lockhart; Bruce Momjian - CVS;
> pgsql-committers(at)postgresql(dot)org
> Subject: Re: [COMMITTERS] pgsql/src/backend/parser gram.y
>
>
> Christopher Kings-Lynne wrote:
> > CVS HEAD does not compile on FreeBSD/Alpha:
> >
> > ./configure --prefix=/home/chriskl/local
> --enable-integer-datetimes --enable
> > -debug --enable-depend --enable-cassert --with-pam --with-CXX
> --with-openssl
> >
> > Gives:
> >
> > gmake[3]: Entering directory
> `/home/chriskl/pgsql-head/src/interfaces/libpq'
> > gcc -pipe -O -g -Wall -Wmissing-prototypes
> -Wmissing-declarations -fpic -DPI
> > C -I. -I../../../src/include -DFRONTEND
> -DSYSCONFDIR='"/home/chriskl/local/
> > etc/postgresql"' -c -o fe-secure.o fe-secure.c -MMD
> > fe-secure.c: In function `verify_peer':
> > fe-secure.c:417: structure has no member named `s6_addr8'
> > gmake[3]: *** [fe-secure.o] Error 1
> > gmake[3]: Leaving directory
> `/home/chriskl/pgsql-head/src/interfaces/libpq'
> > gmake[2]: *** [all] Error 2
> > gmake[2]: Leaving directory `/home/chriskl/pgsql-head/src/interfaces'
> > gmake[1]: *** [all] Error 2
> > gmake[1]: Leaving directory `/home/chriskl/pgsql-head/src'
> > gmake: *** [all] Error 2
>
> Of course, it compiles if you disable SSL. :-)
>
> Can you look at that line and see if there is something in your OS that
> matches it? I have KAME here and I thought FreeBSD would have that too.
>
> --
> Bruce Momjian | http://candle.pha.pa.us
> pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
> + If your life is a hard drive, | 830 Blythe Avenue
> + Christ can be your backup. | Drexel Hill, Pennsylvania 19026
>


From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au>
Cc: Thomas Lockhart <lockhart(at)fourpalms(dot)org>, Bruce Momjian - CVS <momjian(at)postgresql(dot)org>, pgsql-committers(at)postgresql(dot)org
Subject: Re: pgsql/src/backend/parser gram.y
Date: 2002-06-19 06:37:26
Message-ID: 200206190637.g5J6bQw19250@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-committers pgsql-hackers

Christopher Kings-Lynne wrote:
> Can you give me a hint where to look? I've looked at the code and throught
> he man pages and can't find the actual structure documented. It's version
> 4.4 of FreeBSD, and it has ipv6 compiled in (ifconfig -a proves that).
>
> I'm searching /usr/src right now...

I see:

netinet6/in6.h:132:#define s6_addr8 __u6_addr.__u6_addr8

I have in that file:

struct in6_addr {
union {
u_int8_t __u6_addr8[16];
u_int16_t __u6_addr16[8];
u_int32_t __u6_addr32[4];
} __u6_addr; /* 128-bit IP6 address */
};

#define s6_addr __u6_addr.__u6_addr8
#define s6_addr8 __u6_addr.__u6_addr8
#define s6_addr16 __u6_addr.__u6_addr16
#define s6_addr32 __u6_addr.__u6_addr32

and struct in6_addr is part of struct sockaddr_in6:

struct sockaddr_in6 {
u_int8_t sin6_len; /* length of this struct(sa_family_t)*/
u_int8_t sin6_family; /* AF_INET6 (sa_family_t) */
u_int16_t sin6_port; /* Transport layer port # (in_port_t)*/
u_int32_t sin6_flowinfo; /* IP6 flow information */
struct in6_addr sin6_addr; /* IP6 address */
^^^^^^^^^^^^^^^^^^^^^^^^^
u_int32_t sin6_scope_id; /* intface scope id */
};

Now, do we support IP6 anyway in the backend? If we don't, do we need
this code? I see a test for AF_INET6, but I don't see that anywhere
else in the backend code. Perhaps that 'case' needs to be removed and
we can do IP6 all at once in the future.

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


From: "Christopher Kings-Lynne" <chriskl(at)familyhealth(dot)com(dot)au>
To: "Bruce Momjian" <pgman(at)candle(dot)pha(dot)pa(dot)us>, "Hackers" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [COMMITTERS] pgsql/src/backend/parser gram.y
Date: 2002-06-19 06:40:54
Message-ID: GNELIHDDFBOCMGBFGEFOIENHCCAA.chriskl@familyhealth.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-committers pgsql-hackers

OK, the offending code is this:

case AF_INET6:
sin6 = (struct sockaddr_in6 *) &addr;
for (s = h->h_addr_list; *s != NULL; s++)
{
if (!memcmp(sin6->sin6_addr.s6_addr8, *s,
h->h_length))
return 0;
}
break;

It seems that this is how sin6_addr's type is defined:

struct in6_addr {
u_int8_t s6_addr[16];
};

so it's s6_addr, NOT s6_addr8. Is it still the same type?

Chris

> -----Original Message-----
> From: pgsql-committers-owner(at)postgresql(dot)org
> [mailto:pgsql-committers-owner(at)postgresql(dot)org]On Behalf Of Christopher
> Kings-Lynne
> Sent: Wednesday, 19 June 2002 2:30 PM
> To: Bruce Momjian
> Cc: Thomas Lockhart; Bruce Momjian - CVS;
> pgsql-committers(at)postgresql(dot)org
> Subject: Re: [COMMITTERS] pgsql/src/backend/parser gram.y
>
>
> Can you give me a hint where to look? I've looked at the code
> and throught
> he man pages and can't find the actual structure documented. It's version
> 4.4 of FreeBSD, and it has ipv6 compiled in (ifconfig -a proves that).
>
> I'm searching /usr/src right now...
>
> Chris
>
> > -----Original Message-----
> > From: Bruce Momjian [mailto:pgman(at)candle(dot)pha(dot)pa(dot)us]
> > Sent: Wednesday, 19 June 2002 2:16 PM
> > To: Christopher Kings-Lynne
> > Cc: Thomas Lockhart; Bruce Momjian - CVS;
> > pgsql-committers(at)postgresql(dot)org
> > Subject: Re: [COMMITTERS] pgsql/src/backend/parser gram.y
> >
> >
> > Christopher Kings-Lynne wrote:
> > > CVS HEAD does not compile on FreeBSD/Alpha:
> > >
> > > ./configure --prefix=/home/chriskl/local
> > --enable-integer-datetimes --enable
> > > -debug --enable-depend --enable-cassert --with-pam --with-CXX
> > --with-openssl
> > >
> > > Gives:
> > >
> > > gmake[3]: Entering directory
> > `/home/chriskl/pgsql-head/src/interfaces/libpq'
> > > gcc -pipe -O -g -Wall -Wmissing-prototypes
> > -Wmissing-declarations -fpic -DPI
> > > C -I. -I../../../src/include -DFRONTEND
> > -DSYSCONFDIR='"/home/chriskl/local/
> > > etc/postgresql"' -c -o fe-secure.o fe-secure.c -MMD
> > > fe-secure.c: In function `verify_peer':
> > > fe-secure.c:417: structure has no member named `s6_addr8'
> > > gmake[3]: *** [fe-secure.o] Error 1
> > > gmake[3]: Leaving directory
> > `/home/chriskl/pgsql-head/src/interfaces/libpq'
> > > gmake[2]: *** [all] Error 2
> > > gmake[2]: Leaving directory `/home/chriskl/pgsql-head/src/interfaces'
> > > gmake[1]: *** [all] Error 2
> > > gmake[1]: Leaving directory `/home/chriskl/pgsql-head/src'
> > > gmake: *** [all] Error 2
> >
> > Of course, it compiles if you disable SSL. :-)
> >
> > Can you look at that line and see if there is something in your OS that
> > matches it? I have KAME here and I thought FreeBSD would have that too.
> >
> > --
> > Bruce Momjian | http://candle.pha.pa.us
> > pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
> > + If your life is a hard drive, | 830 Blythe Avenue
> > + Christ can be your backup. | Drexel Hill,
> Pennsylvania 19026
> >
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: Have you checked our extensive FAQ?
>
> http://www.postgresql.org/users-lounge/docs/faq.html
>


From: "Christopher Kings-Lynne" <chriskl(at)familyhealth(dot)com(dot)au>
To: "Bruce Momjian" <pgman(at)candle(dot)pha(dot)pa(dot)us>, "Hackers" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [COMMITTERS] pgsql/src/backend/parser gram.y
Date: 2002-06-19 06:42:42
Message-ID: GNELIHDDFBOCMGBFGEFOMENHCCAA.chriskl@familyhealth.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-committers pgsql-hackers

Althought that is in the contrib/bind directory. Searching again...

Chris

> -----Original Message-----
> From: pgsql-hackers-owner(at)postgresql(dot)org
> [mailto:pgsql-hackers-owner(at)postgresql(dot)org]On Behalf Of Christopher
> Kings-Lynne
> Sent: Wednesday, 19 June 2002 2:41 PM
> To: Bruce Momjian; Hackers
> Subject: Re: [HACKERS] [COMMITTERS] pgsql/src/backend/parser gram.y
>
>
> OK, the offending code is this:
>
> case AF_INET6:
> sin6 = (struct sockaddr_in6 *) &addr;
> for (s = h->h_addr_list; *s != NULL; s++)
> {
> if (!memcmp(sin6->sin6_addr.s6_addr8, *s,
> h->h_length))
> return 0;
> }
> break;
>
>
> It seems that this is how sin6_addr's type is defined:
>
> struct in6_addr {
> u_int8_t s6_addr[16];
> };
>
> so it's s6_addr, NOT s6_addr8. Is it still the same type?
>
> Chris
>
> > -----Original Message-----
> > From: pgsql-committers-owner(at)postgresql(dot)org
> > [mailto:pgsql-committers-owner(at)postgresql(dot)org]On Behalf Of Christopher
> > Kings-Lynne
> > Sent: Wednesday, 19 June 2002 2:30 PM
> > To: Bruce Momjian
> > Cc: Thomas Lockhart; Bruce Momjian - CVS;
> > pgsql-committers(at)postgresql(dot)org
> > Subject: Re: [COMMITTERS] pgsql/src/backend/parser gram.y
> >
> >
> > Can you give me a hint where to look? I've looked at the code
> > and throught
> > he man pages and can't find the actual structure documented.
> It's version
> > 4.4 of FreeBSD, and it has ipv6 compiled in (ifconfig -a proves that).
> >
> > I'm searching /usr/src right now...
> >
> > Chris
> >
> > > -----Original Message-----
> > > From: Bruce Momjian [mailto:pgman(at)candle(dot)pha(dot)pa(dot)us]
> > > Sent: Wednesday, 19 June 2002 2:16 PM
> > > To: Christopher Kings-Lynne
> > > Cc: Thomas Lockhart; Bruce Momjian - CVS;
> > > pgsql-committers(at)postgresql(dot)org
> > > Subject: Re: [COMMITTERS] pgsql/src/backend/parser gram.y
> > >
> > >
> > > Christopher Kings-Lynne wrote:
> > > > CVS HEAD does not compile on FreeBSD/Alpha:
> > > >
> > > > ./configure --prefix=/home/chriskl/local
> > > --enable-integer-datetimes --enable
> > > > -debug --enable-depend --enable-cassert --with-pam --with-CXX
> > > --with-openssl
> > > >
> > > > Gives:
> > > >
> > > > gmake[3]: Entering directory
> > > `/home/chriskl/pgsql-head/src/interfaces/libpq'
> > > > gcc -pipe -O -g -Wall -Wmissing-prototypes
> > > -Wmissing-declarations -fpic -DPI
> > > > C -I. -I../../../src/include -DFRONTEND
> > > -DSYSCONFDIR='"/home/chriskl/local/
> > > > etc/postgresql"' -c -o fe-secure.o fe-secure.c -MMD
> > > > fe-secure.c: In function `verify_peer':
> > > > fe-secure.c:417: structure has no member named `s6_addr8'
> > > > gmake[3]: *** [fe-secure.o] Error 1
> > > > gmake[3]: Leaving directory
> > > `/home/chriskl/pgsql-head/src/interfaces/libpq'
> > > > gmake[2]: *** [all] Error 2
> > > > gmake[2]: Leaving directory
> `/home/chriskl/pgsql-head/src/interfaces'
> > > > gmake[1]: *** [all] Error 2
> > > > gmake[1]: Leaving directory `/home/chriskl/pgsql-head/src'
> > > > gmake: *** [all] Error 2
> > >
> > > Of course, it compiles if you disable SSL. :-)
> > >
> > > Can you look at that line and see if there is something in
> your OS that
> > > matches it? I have KAME here and I thought FreeBSD would
> have that too.
> > >
> > > --
> > > Bruce Momjian | http://candle.pha.pa.us
> > > pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
> > > + If your life is a hard drive, | 830 Blythe Avenue
> > > + Christ can be your backup. | Drexel Hill,
> > Pennsylvania 19026
> > >
> >
> >
> > ---------------------------(end of broadcast)---------------------------
> > TIP 5: Have you checked our extensive FAQ?
> >
> > http://www.postgresql.org/users-lounge/docs/faq.html
> >
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo(at)postgresql(dot)org so that your
> message can get through to the mailing list cleanly
>