Database Reference
In-Depth Information
FROM pg_settings
WHERE category LIKE '%Planner%'
GROUP BY category
ORDER BY category;
\H
\qecho '</td><td><h2>File Locations</h2>'
\x off
\t on
\pset format html
SELECT name, setting FROM pg_settings WHERE category = 'File Locations' ORDER BY
name;
\qecho '<h2>Memory Settings</h2>'
SELECT name, setting, unit FROM pg_settings WHERE category ILIKE '%memory%' ORDER
BY name;
\qecho '</td></tr></table>'
\qecho '</body></html>'
\o
Redirects query output to a file.
HTML table settings for query output.
Appends additional HTML.
Expand mode. Repeats the column headers for each row and outputs each
column of each row as a separate row.
Forces the queries to output as HTML tables.
string_agg() , introduced in PostgreSQL 9.0 to concatenate all properties in the
same category into a single column.
Turns off expand mode. The second and third queries should output one row
per table row.
Toggles tuples mode. When on, column headers and row counts are omitted.
Example 3-11 demonstrates that by interspersing SQL and psql commands, you can
create a fairly comprehensive tabular report replete with subreports. Run Example 3-11
by connecting interactively with psql and executing \i settings_report.psql , or run
psql -f settings_report.psql from your OS command line. The output generated
by settings_report.html is shown in Figure 3-2 .
Search WWH ::




Custom Search