HEX
Server: Apache/2.4.41 (Ubuntu)
System: Linux vmi1674223.contaboserver.net 5.4.0-182-generic #202-Ubuntu SMP Fri Apr 26 12:29:36 UTC 2024 x86_64
User: root (0)
PHP: 7.4.3-4ubuntu2.22
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: //usr/share/postgresql-common/server/pg_config.pl
#!/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__
INCLUDEDIR = /usr/include/postgresql

pg_config provides information about the installed version of PostgreSQL.

Usage:
  pg_config [OPTION]...

Options:
  --includedir          show location of C header files of the client
                        interfaces
  -?, --help            show this help, then exit

With no arguments, all known items are shown.

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