Re: [HACKERS] typedefs for indent

2009-03-30 Thread Tom Lane
Bruce Momjian writes: > Andrew Dunstan wrote: >> This is on the 8.3 code. Notice how this is formatted: >> >> hitrate = (float) BufferHitCount *100.0 / ReadBufferCount; > The good news is that LocalBufferHitCount isn't in my list of typedefs > from CVS HEAD, and probably not in 8.3 either. The

Re: [HACKERS] typedefs for indent

2009-03-30 Thread Bruce Momjian
Andrew Dunstan wrote: > >>> FWIW I was looking at this code for unrelated reasons and found a couple > >>> of symbols that pgindent considers to be typedefs but it clearly are not > >>> -- BufferHitCount and LocalBufferHitCount. It can be seen in > >>> ShowBufferUsage(). > >>> > >> Are you

Re: [HACKERS] typedefs for indent

2009-03-30 Thread Alvaro Herrera
Alvaro Herrera wrote: > This is on the 8.3 code. Notice how this is formatted: > > hitrate = (float) BufferHitCount *100.0 / ReadBufferCount; Hmm, I just noticed that this is mentioned as a "known bug" in pgindent. Nevermind ... -- Alvaro Herrerah

Re: [HACKERS] typedefs for indent

2009-03-30 Thread Andrew Dunstan
Alvaro Herrera wrote: Bruce Momjian wrote: Alvaro Herrera wrote: Bruce Momjian wrote: Thanks. I will run tests when we are ready for pg_indent and we can then make a decision. FWIW I was looking at this code for unrelated reasons and found a couple of symbols that

Re: [HACKERS] typedefs for indent

2009-03-30 Thread Alvaro Herrera
Bruce Momjian wrote: > Alvaro Herrera wrote: > > Bruce Momjian wrote: > > > > > Thanks. I will run tests when we are ready for pg_indent and we can > > > then make a decision. > > > > FWIW I was looking at this code for unrelated reasons and found a couple > > of symbols that pgindent considers

Re: [HACKERS] typedefs for indent

2009-03-30 Thread Bruce Momjian
Alvaro Herrera wrote: > Bruce Momjian wrote: > > > Thanks. I will run tests when we are ready for pg_indent and we can > > then make a decision. > > FWIW I was looking at this code for unrelated reasons and found a couple > of symbols that pgindent considers to be typedefs but it clearly are not

Re: [HACKERS] typedefs for indent

2009-03-30 Thread Alvaro Herrera
Bruce Momjian wrote: > Thanks. I will run tests when we are ready for pg_indent and we can > then make a decision. FWIW I was looking at this code for unrelated reasons and found a couple of symbols that pgindent considers to be typedefs but it clearly are not -- BufferHitCount and LocalBufferHi

Re: [HACKERS] typedefs for indent

2009-03-27 Thread Alvaro Herrera
Bruce Momjian wrote: > Alvaro Herrera wrote: > > Bruce Momjian wrote: > > > Alvaro Herrera wrote: > > > > Huh? What false positive problem? > > > > > > typedefs listed on platforms that match identifiers in our code that are > > > _not_ typedefs. > > > > Does this actually happen anywhere? > >

Re: [HACKERS] typedefs for indent

2009-03-27 Thread Bruce Momjian
Andrew Dunstan wrote: > > > Bruce Momjian wrote: > > Anyway, I think a diff of using my list and Andrew's list will show us > > which one gets things clearest; the diff is going to highlight only > > cases where the typedef lists change formatting. > > > > Andrew, where exactly is the list I sho

Re: [HACKERS] typedefs for indent

2009-03-27 Thread Andrew Dunstan
Bruce Momjian wrote: Anyway, I think a diff of using my list and Andrew's list will show us which one gets things clearest; the diff is going to highlight only cases where the typedef lists change formatting. Andrew, where exactly is the list I should try? fetch it from

Re: [HACKERS] typedefs for indent

2009-03-27 Thread Bruce Momjian
Alvaro Herrera wrote: > Bruce Momjian wrote: > > Alvaro Herrera wrote: > > > Bruce Momjian wrote: > > > > > > > Well, as you, I was hoping for a clear solution, and it seems we don't > > > > have one. I think the false-positives problem is real and might make > > > > the greater code coverage of

Re: [HACKERS] typedefs for indent

2009-03-27 Thread Alvaro Herrera
Bruce Momjian wrote: > Alvaro Herrera wrote: > > Bruce Momjian wrote: > > > > > Well, as you, I was hoping for a clear solution, and it seems we don't > > > have one. I think the false-positives problem is real and might make > > > the greater code coverage of the buildfarm worse than what we did

Re: [HACKERS] typedefs for indent

2009-03-27 Thread Bruce Momjian
Alvaro Herrera wrote: > Bruce Momjian wrote: > > > Well, as you, I was hoping for a clear solution, and it seems we don't > > have one. I think the false-positives problem is real and might make > > the greater code coverage of the buildfarm worse than what we did for > > 8.3. > > Huh? What fal

Re: [HACKERS] typedefs for indent

2009-03-27 Thread Bruce Momjian
Tom Lane wrote: > Bruce Momjian writes: > > Frankly, I don't remember anyone complaining we didn't find any typedefs > > in pgindent, > > There are lots and lots of places where it's obvious that pgindent > was misinformed on the subject, because it puts in a space where there > should not be one

Re: [HACKERS] typedefs for indent

2009-03-27 Thread Alvaro Herrera
Bruce Momjian wrote: > Well, as you, I was hoping for a clear solution, and it seems we don't > have one. I think the false-positives problem is real and might make > the greater code coverage of the buildfarm worse than what we did for > 8.3. Huh? What false positive problem? -- Alvaro Herre

Re: [HACKERS] typedefs for indent

2009-03-26 Thread Tom Lane
Bruce Momjian writes: > Frankly, I don't remember anyone complaining we didn't find any typedefs > in pgindent, There are lots and lots of places where it's obvious that pgindent was misinformed on the subject, because it puts in a space where there should not be one, eg "typename * ptr" instead

Re: [HACKERS] typedefs for indent

2009-03-26 Thread Bruce Momjian
Andrew Dunstan wrote: > >> Andrew, this is disappointing news. When you talked about generating an > >> typedef list from the buildfarm, you were saying how great it would be > >> --- now a year later you post: > >> > >>It'd be nice to get that dealt with before we run pg_indent, but it's > >>

Re: [HACKERS] typedefs for indent

2009-03-26 Thread Andrew Dunstan
Bruce Momjian wrote: bruce wrote: Andrew Dunstan wrote: This URL gives a typedef list that is (currently) the combined result from three fairly different buildfarm members: dungbeetle | 2009-03-22 06:44:01 brown_bat | 2009-03-21 13:0

Re: [HACKERS] typedefs for indent

2009-03-26 Thread Bruce Momjian
bruce wrote: > Andrew Dunstan wrote: > > This URL gives a > > typedef list that is (currently) the combined result from three fairly > > different buildfarm members: > > > > dungbeetle | 2009-03-22 06:44:01 > > brown_bat | 2009-03-21 13:00:58 > >

Re: [HACKERS] typedefs for indent

2009-03-26 Thread Bruce Momjian
Andrew Dunstan wrote: > This URL gives a > typedef list that is (currently) the combined result from three fairly > different buildfarm members: > > dungbeetle | 2009-03-22 06:44:01 > brown_bat | 2009-03-21 13:00:58 > dawn_bat | 2009-03-21 14:23:4

Re: [HACKERS] typedefs for indent

2009-03-22 Thread Andrew Dunstan
Tom Lane wrote: BTW, is dungbeetle still running Fedora 6? yes. Upgrading it is on my long TODO list. I wish Fedora had a bit longer release cycles. On my F-10 machine the output of objdump seems to be formatted differently than your script is expecting I guess that will make upgr

Re: [HACKERS] typedefs for indent

2009-03-22 Thread Tom Lane
After doing some further digging I've concluded that the typedefs that are missing from dungbeetle's list are those that are declared, but are never used as the type of anything. For instance AfterTriggerEventDataOneCtid is only used in a sizeof() computation, and there are quite a few enums for w

Re: [HACKERS] typedefs for indent

2009-03-22 Thread Tom Lane
Alvaro Herrera writes: > Tom Lane wrote: >> On the other hand, dungbeetle is failing to report >> a whole bunch of typedefs that it should report, > I tend to think that having this list is much better than no list at all > (the current situation), and it's better than the old list we used to > h

Re: [HACKERS] typedefs for indent

2009-03-22 Thread Alvaro Herrera
Tom Lane wrote: > Andrew Dunstan writes: > > [ typedef lists ] > > Hmm ... the windows members are claiming that "int", "char", "float", > "double" etc are typedefs, which doesn't exactly match up with my > mental model of C. I don't think this is a problem, because the whole point is telling in

Re: [HACKERS] typedefs for indent

2009-03-22 Thread Andrew Dunstan
Tom Lane wrote: Andrew Dunstan writes: [ typedef lists ] Hmm ... the windows members are claiming that "int", "char", "float", "double" etc are typedefs, which doesn't exactly match up with my mental model of C. On the other hand, dungbeetle is failing to report a whole bunch of ty

Re: [HACKERS] typedefs for indent

2009-03-22 Thread Tom Lane
Andrew Dunstan writes: > [ typedef lists ] Hmm ... the windows members are claiming that "int", "char", "float", "double" etc are typedefs, which doesn't exactly match up with my mental model of C. On the other hand, dungbeetle is failing to report a whole bunch of typedefs that it should report

Re: [HACKERS] typedefs for indent

2009-03-22 Thread Andrew Dunstan
Andrew Dunstan wrote: Tom Lane wrote: Andrew Dunstan writes: Bruce Momjian wrote: I need to run pgindent in a few months. What typedef list am I going to use? This URL gives a typedef list that is (currently) the combine

Re: [HACKERS] typedefs for indent

2009-03-22 Thread Andrew Dunstan
Tom Lane wrote: Andrew Dunstan writes: Bruce Momjian wrote: I need to run pgindent in a few months. What typedef list am I going to use? This URL gives a typedef list that is (currently) the combined result from three fai

Re: [HACKERS] typedefs for indent

2009-03-22 Thread Tom Lane
Andrew Dunstan writes: > Bruce Momjian wrote: >> I need to run pgindent in a few months. What typedef list am I going to >> use? > This URL gives a > typedef list that is (currently) the combined result from three fairly > different buildfarm me

Re: [HACKERS] typedefs for indent

2009-03-22 Thread Andrew Dunstan
Bruce Momjian wrote: Andrew Dunstan wrote: Alvaro Herrera wrote: Andrew Dunstan wrote: OK, I have spent some time generating and filtering typdefs via objdump on various platforms. I filtered them and Bruce's list to eliminate items not actually found in the sources thus

Re: [HACKERS] typedefs for indent

2008-11-10 Thread Bruce Momjian
Andrew Dunstan wrote: > > > Alvaro Herrera wrote: > > Andrew Dunstan wrote: > > > >> OK, I have spent some time generating and filtering typdefs via objdump > >> on various platforms. I filtered them and Bruce's list to eliminate > >> items not actually found in the sources thus: > >>

Re: [HACKERS] typedefs for indent

2008-07-21 Thread Andrew Dunstan
Bruce Momjian wrote: Andrew Dunstan wrote: Alvaro Herrera wrote: Andrew Dunstan wrote: OK, I have spent some time generating and filtering typdefs via objdump on various platforms. I filtered them and Bruce's list to eliminate items not actually found in the sources thus

Re: [HACKERS] typedefs for indent

2008-07-18 Thread Bruce Momjian
Andrew Dunstan wrote: > > > Alvaro Herrera wrote: > > Andrew Dunstan wrote: > > > >> OK, I have spent some time generating and filtering typdefs via objdump > >> on various platforms. I filtered them and Bruce's list to eliminate > >> items not actually found in the sources thus: > >>

Re: [HACKERS] typedefs for indent

2008-06-15 Thread Andrew Dunstan
Alvaro Herrera wrote: Andrew Dunstan wrote: OK, I have spent some time generating and filtering typdefs via objdump on various platforms. I filtered them and Bruce's list to eliminate items not actually found in the sources thus: Did this go anywhere? I'm still trying to ge

Re: [HACKERS] typedefs for indent

2008-06-15 Thread Alvaro Herrera
Andrew Dunstan wrote: > > OK, I have spent some time generating and filtering typdefs via objdump > on various platforms. I filtered them and Bruce's list to eliminate > items not actually found in the sources thus: Did this go anywhere? -- Alvaro Herrerahttp:

Re: [HACKERS] typedefs for indent

2008-04-21 Thread Andrew Dunstan
Bruce Momjian wrote: Andrew Dunstan wrote: So I continue to think the best way to generate a list will be to consolidate lists generated from the buildfarm which represents a wide variety of build scenarios. Is anyone else looking at GNU indent to see if it has improved enough to meet o

Re: [HACKERS] typedefs for indent

2008-04-21 Thread Bruce Momjian
Andrew Dunstan wrote: > So I continue to think the best way to generate a list will be to > consolidate lists generated from the buildfarm which represents a wide > variety of build scenarios. > > Is anyone else looking at GNU indent to see if it has improved enough to > meet our needs? I am n

[HACKERS] typedefs for indent

2008-04-20 Thread Andrew Dunstan
OK, I have spent some time generating and filtering typdefs via objdump on various platforms. I filtered them and Bruce's list to eliminate items not actually found in the sources thus: while read line ; do grep -q -w -r --exclude="*.data" --exclude="*.out" --exclude="*.sql" --exclude="*.po"