Re: schemapg.h - Mailing list pgsql-hackers

From Tom Lane
Subject Re: schemapg.h
Date
Msg-id 11431.1250117088@sss.pgh.pa.us
Whole thread Raw
In response to schemapg.h  (Alvaro Herrera <alvherre@commandprompt.com>)
Responses Re: schemapg.h  (Robert Haas <robertmhaas@gmail.com>)
Re: schemapg.h  (Alvaro Herrera <alvherre@commandprompt.com>)
List pgsql-hackers
Alvaro Herrera <alvherre@commandprompt.com> writes:
> I think having schemapg.h be autogenerated is a good idea, so I stripped
> that from Robert Haas' patch.  Here's the result.  This should be
> relatively uncontroversial since, well, the controversial stuff has been
> stripped.  The one problem is that it introduces more complex code than
> it removes dull declarations.

Indeed, and it fails to get rid of all the dull declarations :-(.

I thought the idea was to generate all this stuff directly from the C
struct declarations (plus some hardwired knowledge about the datatypes,
comparable to what is in TypInfo in bootstrap.c already).  Removing four
out of six Schema_pg_xxx macros while leaving the equivalent DATA
declarations behind isn't my idea of a major step forward.

The patch as submitted also appears to turn Perl into a hardwired
requirement for all Unix builds.  While I'm not necessarily averse to
doing that, I'd like to get more results out of it than this.  And when
we do do it, it needs to be documented and enforced by configure.  Plus
we ought to get rid of the workarounds we have for not requiring Perl
for tarball builds.  Or, if people would prefer to continue not
requiring Perl, we'd need to make schemapg.h be one of the derived
files that's shipped in tarballs.

Lastly, it'd be nice if the comments in gen_schemapg.pl had some
resemblance to what it is actually doing, rather than talking about
a lot of stuff that was stripped out of it.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Josh Berkus
Date:
Subject: Re: Alpha 1 release notes
Next
From: Tom Lane
Date:
Subject: Re: Error message for FK referencing deferrable unique/PK