Re: exposing pg_controldata and pg_config as functions - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: exposing pg_controldata and pg_config as functions
Date
Msg-id CAB7nPqR4wY5P64QQNqJxu8777=s-FKQ0v_jz3LFcH5jmHKbfnw@mail.gmail.com
Whole thread Raw
In response to Re: exposing pg_controldata and pg_config as functions  (Michael Paquier <michael.paquier@gmail.com>)
Responses Re: exposing pg_controldata and pg_config as functions  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
On Sat, Jan 16, 2016 at 11:07 PM, Michael Paquier
<michael.paquier@gmail.com> wrote:
> On Sun, Dec 27, 2015 at 5:39 AM, Joe Conway <mail@joeconway.com> wrote:
>> First installment -- pg_config function/view as a separate patch,
>> rebased to current master.
>
> Documentation would be good to have.
>
> ! # don't include subdirectory-path-dependent -I and -L switches
> ! STD_CPPFLAGS := $(filter-out -I$(top_srcdir)/src/include
> -I$(top_builddir)/src/include,$(CPPFLAGS))
> ! STD_LDFLAGS := $(filter-out -L$(top_builddir)/src/port,$(LDFLAGS))
> ! override CPPFLAGS += -DVAL_CONFIGURE="\"$(configure_args)\""
> ! override CPPFLAGS += -DVAL_CC="\"$(CC)\""
> ! override CPPFLAGS += -DVAL_CPPFLAGS="\"$(STD_CPPFLAGS)\""
> ! override CPPFLAGS += -DVAL_CFLAGS="\"$(CFLAGS)\""
> ! override CPPFLAGS += -DVAL_CFLAGS_SL="\"$(CFLAGS_SL)\""
> ! override CPPFLAGS += -DVAL_LDFLAGS="\"$(STD_LDFLAGS)\""
> ! override CPPFLAGS += -DVAL_LDFLAGS_EX="\"$(LDFLAGS_EX)\""
> ! override CPPFLAGS += -DVAL_LDFLAGS_SL="\"$(LDFLAGS_SL)\""
> ! override CPPFLAGS += -DVAL_LIBS="\"$(LIBS)\""
> This duplication from src/bin/pg_config is a bad idea. Couldn't we do
> something in src/common instead that sets up values at compilation
> time in a routine (perhaps set of routines) available for both the
> frontend and backend?

Just forgot to mention that those new functions should be superuser-only.
-- 
Michael



pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: exposing pg_controldata and pg_config as functions
Next
From: Michael Paquier
Date:
Subject: Re: pg_dump fails on domain constraint comments