From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Andrew Gierth <andrew(at)tao11(dot)riddles(dot)org(dot)uk> |
Cc: | Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Should contrib modules install .h files? |
Date: | 2018-08-01 02:44:32 |
Message-ID: | 27744.1533091472@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Andrew Gierth <andrew(at)tao11(dot)riddles(dot)org(dot)uk> writes:
> "Peter" == Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com> writes:
> Peter> I'm missing some guidance what an extension using those headers
> Peter> is supposed to do. How does it get the right -I options?
> If your extension is relying on pg11+, or you have checked the pg
> version when constructing the makefile, you can just do:
> PG_CPPFLAGS += -I$(includedir_server)/extension/hstore
> and #include "hstore.h" will work.
I remain of the opinion that it'd be smarter to do
PG_CPPFLAGS += -I$(includedir_server)/extension
then
#include "hstore/hstore.h"
This way requires fewer -I options and is far more robust against header
name conflicts.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2018-08-01 02:55:52 | Re: pg_upgrade from 9.4 to 10.4 |
Previous Message | Tom Lane | 2018-08-01 02:22:16 | Re: New Defects reported by Coverity Scan for PostgreSQL |