| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
|---|---|
| To: | Robert Haas <robertmhaas(at)gmail(dot)com> |
| Cc: | Thomas Munro <thomas(dot)munro(at)enterprisedb(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | Re: Removing #include "postgres.h" from a couple of headers |
| Date: | 2017-03-08 14:53:50 |
| Message-ID: | 20756.1488984830@sss.pgh.pa.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
... BTW, a bit of grepping shows that there are still significant
violations of this policy with respect to header-driven inclusion of
postgres_fe.h and c.h. Also, plpgsql is doing it in the unapproved
fashion. Cleaning these up will take a bit more work, since we'll have
to actually add #includes to some .c files that are currently relying on
those headers to get the core header. However, if I believe my own
argument, then that's a good thing and we'd better go do it.
Also, ecpglib.h seems like a complete mess: it's relying on symbols
like ENABLE_NLS but there's no certainty as to whether pg_config.h
has been included first. It won't have been in the case where this
header is read from an ecpg-generated .c file. So this header will
in fact be interpreted differently in ecpg-generated programs than
in ecpglib and ecpg itself. Maybe this is okay but it sure smells
like trouble waiting to happen. I have no desire to try to fix it
myself though.
regards, tom lane
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Robert Haas | 2017-03-08 14:58:42 | Re: Parallel bitmap heap scan |
| Previous Message | Tom Lane | 2017-03-08 14:33:55 | Re: Removing #include "postgres.h" from a couple of headers |