Re: schemapg.h

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
Cc: Pg Hackers <pgsql-hackers(at)postgresql(dot)org>, Robert Haas <robertmhaas(at)gmail(dot)com>
Subject: Re: schemapg.h
Date: 2009-08-12 22:44:48
Message-ID: 11431.1250117088@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Alvaro Herrera <alvherre(at)commandprompt(dot)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

In response to

  • schemapg.h at 2009-08-12 22:16:28 from Alvaro Herrera

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2009-08-12 23:02:06 Re: Error message for FK referencing deferrable unique/PK
Previous Message Josh Berkus 2009-08-12 22:33:29 Re: Alpha 1 release notes