PostgreSQL 查看数据库配置信息

PostgreSQL About 3,086 words

pg_config

psql一样,pg_config直接在不连接数据库的情况下,命令行中直接查看。

pg_config

输出

❯ pg_config
BINDIR = /Applications/Postgres.app/Contents/Versions/15/bin
DOCDIR = /Applications/Postgres.app/Contents/Versions/15/share/doc/postgresql
HTMLDIR = /Applications/Postgres.app/Contents/Versions/15/share/doc/postgresql
INCLUDEDIR = /Applications/Postgres.app/Contents/Versions/15/include
PKGINCLUDEDIR = /Applications/Postgres.app/Contents/Versions/15/include/postgresql
INCLUDEDIR-SERVER = /Applications/Postgres.app/Contents/Versions/15/include/postgresql/server
LIBDIR = /Applications/Postgres.app/Contents/Versions/15/lib
PKGLIBDIR = /Applications/Postgres.app/Contents/Versions/15/lib/postgresql
LOCALEDIR = /Applications/Postgres.app/Contents/Versions/15/share/locale
MANDIR = /Applications/Postgres.app/Contents/Versions/15/share/man
SHAREDIR = /Applications/Postgres.app/Contents/Versions/15/share/postgresql
SYSCONFDIR = /Applications/Postgres.app/Contents/Versions/15/etc/postgresql
PGXS = /Applications/Postgres.app/Contents/Versions/15/lib/postgresql/pgxs/src/makefiles/pgxs.mk
CONFIGURE =  '--prefix=/Applications/Postgres.app/Contents/Versions/15' '--with-includes=/Applications/Postgres.app/Contents/Versions/15/include' '--with-libraries=/Applications/Postgres.app/Contents/Versions/15/lib' '--enable-thread-safety' '--with-openssl' '--with-bonjour' '--with-libxml' '--with-libxslt' '--with-python' '--with-readline' '--with-uuid=e2fs' '--with-icu' '--with-lz4' '--with-zstd' 'CFLAGS= -Os -mmacosx-version-min=10.13 -arch arm64 -arch x86_64' 'CXXFLAGS= -Os -mmacosx-version-min=10.13 -arch arm64 -arch x86_64' 'PKG_CONFIG_LIBDIR=/Applications/Postgres.app/Contents/Versions/15/lib/pkgconfig' 'ICU_CFLAGS=-I/Applications/Postgres.app/Contents/Versions/15/share/icu' 'ICU_LIBS=-licui18n -licuuc' 'PYTHON=/Library/Frameworks/Python.framework/Versions/3.11/bin/python3'
CC = gcc
CPPFLAGS = -I/Applications/Postgres.app/Contents/Versions/15/share/icu -I/Applications/Postgres.app/Contents/Versions/15/include/libxml2 -I/Applications/Postgres.app/Contents/Versions/15/include -I/Applications/Postgres.app/Contents/Versions/15/include -I/Applications/Postgres.app/Contents/Versions/15/include
CFLAGS = -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Werror=unguarded-availability-new -Wendif-labels -Wmissing-format-attribute -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro  -Os -mmacosx-version-min=10.13 -arch arm64 -arch x86_64
CFLAGS_SL =
LDFLAGS = -L/Applications/Postgres.app/Contents/Versions/15/lib -L/Applications/Postgres.app/Contents/Versions/15/lib -L/Applications/Postgres.app/Contents/Versions/15/lib -L/Applications/Postgres.app/Contents/Versions/15/lib -Wl,-dead_strip_dylibs
LDFLAGS_EX =
LDFLAGS_SL =
LIBS = -lpgcommon -lpgport -lzstd -llz4 -lxslt -lxml2 -lssl -lcrypto -lz -lreadline -lm
VERSION = PostgreSQL 15.2

指定查看一项配置,如:BINDIR

pg_config --bindir

输出

❯ pg_config --bindir
/Applications/Postgres.app/Contents/Versions/15/bin

SQL

select * from pg_config;
Views: 1,255 · Posted: 2023-10-20

————        END        ————

Give me a Star, Thanks:)

https://github.com/fendoudebb/LiteNote

扫描下方二维码关注公众号和小程序↓↓↓

扫描下方二维码关注公众号和小程序↓↓↓


Today On History
Browsing Refresh