Subject: pgindent issue with EXEC_BACKEND-only typedefs
From: tgl@sss.pgh.pa.us (Tom Lane)
Date: 12/16/2007 6:53:22 PM
Bruce Momjian <bruce@momjian.us> writes:
> Alvaro Herrera wrote:
>> It seems pgindent is not considering EXEC_BACKEND typedefs.
> Yep. The cause is that find_typedefs actually pulls the typedef out of
> the debugged-enabled binary, and on Unix those functions aren't used by
> default. This is spelled out in the pgindent/README in CVS.
> I could just EXEC_BACKEND in the debug build I use but I suppose there
> are other typedef I am missing as well. Any idea on a more
> comprehensive solution to finding typedefs?
I guess that explains why plpython.c and most of contrib have similar
problems.
If you want to do this on the basis of precompiled code, you need to
enable every optional feature in your build, and include the PLs and
contrib modules not only the core backend.
regards, tom lane
---------------------------(end of broadcast)---------------------------
TIP 7: You can help support the PostgreSQL project by donating at
http://www.postgresql.org/about/donate
Subject: pgindent issue with EXEC_BACKEND-only typedefs
From: tgl@sss.pgh.pa.us (Tom Lane)
Date: 12/17/2007 11:06:14 AM
Alvaro Herrera <alvherre@commandprompt.com> writes:
> I don't know how to make it output the symbol names like it seems to do
> for you.
I dislike the object-file-based approach altogether, not least because
it appears to depend on unportable aspects of someBSD's objdump.
Surely there's some code out there that can find typedef names from the
source files? Why does pgindent even need to be told this?
> I am also wondering if current GNU indent is now better suited to the
> task. Perhaps the bugs that it had on earlier versions have since been
> fixed? I remember checking the source code size a couple of years ago
> and it had grown by an order of magnitude or something like that.
It might be interesting to try it again. It's been quite a few years
since anyone tried it on the PG sources, AFAIK.
regards, tom lane
---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend
|