This file is indexed.

/usr/bin/pg_config is in libpq-dev 10.3-1.

This file is owned by root:root, with mode 0o755.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
#!/usr/bin/perl

# Perl reimplementation of PostgreSQL's pg_config binary.
# We provide this as /usr/bin/pg_config to support cross-compilation using
# libpq-dev. Also, this makes the two installed pg_config copies not conflict
# via their debugging symbols.
#
# This code is released under the terms of the PostgreSQL License.
# Portions Copyright (c) 1996-2017, PostgreSQL Global Development Group
# Author: Christoph Berg

use strict;
use warnings;

# no arguments, print all items
if (@ARGV == 0) {
	while (<DATA>) {
		last if /^$/; # begin of help section
		print;
	}
	exit 0;
}

# --help or -?
if (grep {$_ =~ /^(--help|-\?)$/} @ARGV) {
	while (<DATA>) {
		last if /^$/; # begin of help section
	}
	print; # include empty line in output
	while (<DATA>) {
		next if /^Report bugs/; # Skip bug address in the perl version
		print;
	}
	exit 0;
}

# specific value(s) requested
my %options;
my $help;
while (<DATA>) {
	last if /^$/; # begin of help section
	/^(\S+) = (.*)/ or die "malformatted data item";
	$options{'--' . lc $1} = $2;
}

foreach my $arg (@ARGV) {
	unless ($options{$arg}) {
		print "pg_config: invalid argument: $arg\n";
		print "Try \"pg_config --help\" for more information.\n";
		exit 1;
	}
	print "$options{$arg}\n";
}

exit 0;

# The DATA section consists of the `pg_config` output (one KEY = value item per
# line), and the `pg_config --help` text. The first --help line is empty, which
# we use to detect the beginning of the help section.

__DATA__
BINDIR = /usr/lib/postgresql/10/bin
DOCDIR = /usr/share/doc/postgresql-doc-10
HTMLDIR = /usr/share/doc/postgresql-doc-10
INCLUDEDIR = /usr/include/postgresql
PKGINCLUDEDIR = /usr/include/postgresql
INCLUDEDIR-SERVER = /usr/include/postgresql/10/server
LIBDIR = /usr/lib/x86_64-linux-gnu
PKGLIBDIR = /usr/lib/postgresql/10/lib
LOCALEDIR = /usr/share/locale
MANDIR = /usr/share/postgresql/10/man
SHAREDIR = /usr/share/postgresql/10
SYSCONFDIR = /etc/postgresql-common
PGXS = /usr/lib/postgresql/10/lib/pgxs/src/makefiles/pgxs.mk
CONFIGURE = '--with-icu' '--with-tcl' '--with-perl' '--with-python' '--with-pam' '--with-openssl' '--with-libxml' '--with-libxslt' '--with-tclconfig=/usr/lib/x86_64-linux-gnu/tcl8.6' '--with-includes=/usr/include/tcl8.6' 'PYTHON=/usr/bin/python' '--mandir=/usr/share/postgresql/10/man' '--docdir=/usr/share/doc/postgresql-doc-10' '--sysconfdir=/etc/postgresql-common' '--datarootdir=/usr/share/' '--datadir=/usr/share/postgresql/10' '--bindir=/usr/lib/postgresql/10/bin' '--libdir=/usr/lib/x86_64-linux-gnu/' '--libexecdir=/usr/lib/postgresql/' '--includedir=/usr/include/postgresql/' '--with-extra-version= (Ubuntu 10.3-1)' '--enable-nls' '--enable-integer-datetimes' '--enable-thread-safety' '--enable-tap-tests' '--enable-debug' '--disable-rpath' '--with-uuid=e2fs' '--with-gnu-ld' '--with-pgport=5432' '--with-system-tzdata=/usr/share/zoneinfo' '--with-systemd' 'CFLAGS=-g -O2 -fstack-protector-strong -Wformat -Werror=format-security -fno-omit-frame-pointer' 'LDFLAGS=-Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,now' '--with-gssapi' '--with-ldap' '--with-includes=/usr/include/mit-krb5' '--with-libs=/usr/lib/mit-krb5' '--with-libs=/usr/lib/x86_64-linux-gnu/mit-krb5' '--with-selinux' 'CPPFLAGS=-Wdate-time -D_FORTIFY_SOURCE=2'
CC = gcc
CPPFLAGS = -DFRONTEND -Wdate-time -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -I/usr/include/libxml2 -I/usr/include/mit-krb5
CFLAGS = -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -g -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -fno-omit-frame-pointer
CFLAGS_SL = -fPIC
LDFLAGS = -L../../src/common -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,now -L/usr/lib/x86_64-linux-gnu/mit-krb5 -Wl,--as-needed
LDFLAGS_EX = 
LDFLAGS_SL = 
LIBS = -lpgcommon -lpgport -lpthread -lselinux -lxslt -lxml2 -lpam -lssl -lcrypto -lgssapi_krb5 -lz -ledit -lrt -lcrypt -ldl -lm  
VERSION = PostgreSQL 10.3 (Ubuntu 10.3-1)

pg_config provides information about the installed version of PostgreSQL.

Usage:
  pg_config [OPTION]...

Options:
  --bindir              show location of user executables
  --docdir              show location of documentation files
  --htmldir             show location of HTML documentation files
  --includedir          show location of C header files of the client
                        interfaces
  --pkgincludedir       show location of other C header files
  --includedir-server   show location of C header files for the server
  --libdir              show location of object code libraries
  --pkglibdir           show location of dynamically loadable modules
  --localedir           show location of locale support files
  --mandir              show location of manual pages
  --sharedir            show location of architecture-independent support files
  --sysconfdir          show location of system-wide configuration files
  --pgxs                show location of extension makefile
  --configure           show options given to "configure" script when
                        PostgreSQL was built
  --cc                  show CC value used when PostgreSQL was built
  --cppflags            show CPPFLAGS value used when PostgreSQL was built
  --cflags              show CFLAGS value used when PostgreSQL was built
  --cflags_sl           show CFLAGS_SL value used when PostgreSQL was built
  --ldflags             show LDFLAGS value used when PostgreSQL was built
  --ldflags_ex          show LDFLAGS_EX value used when PostgreSQL was built
  --ldflags_sl          show LDFLAGS_SL value used when PostgreSQL was built
  --libs                show LIBS value used when PostgreSQL was built
  --version             show the PostgreSQL version
  -?, --help            show this help, then exit

With no arguments, all known items are shown.

Report bugs to <pgsql-bugs@postgresql.org>.