Server Configuration

From PostgreSQL wiki

(Difference between revisions)
Jump to: navigation, search
(Add source and use NOT IN ('default', 'override') instead of explicit list of excluded settings, per recommendation of Tom Lane.)
(Use two separate SELECT queries rather than a UNION.)
 
Line 2: Line 2:
 
{{SnippetInfo|Dependency display|lang=SQL|category=Administrative}}
 
{{SnippetInfo|Dependency display|lang=SQL|category=Administrative}}
 
<source lang="sql">
 
<source lang="sql">
SELECT 'version'::text AS name, version() AS current_setting, 'version()'::text as source
+
SELECT version();
UNION ALL
+
SELECT name, current_setting(name), source
SELECT name, current_setting(name), source
+
  FROM pg_settings
FROM   pg_settings
+
   WHERE source NOT IN ('default', 'override');
WHERE   source NOT IN ('default', 'override');
+
 
</source>
 
</source>
 
[[Category:SQL]]
 
[[Category:SQL]]

Latest revision as of 14:51, 20 January 2013

This shows all of the server configuration changes made via updates to the postgresql.conf file, from a running server:

Administrative Snippets

Dependency display

Works with PostgreSQL

Any version

Written in

SQL

Depends on

Nothing

SELECT version();
SELECT name, current_setting(name), source
  FROM pg_settings
  WHERE source NOT IN ('default', 'override');
Personal tools