]> begriffs open source - ai-pg/blob - full-docs/src/sgml/html/runtime-config-compatible.html
WIP: toc builder
[ai-pg] / full-docs / src / sgml / html / runtime-config-compatible.html
1 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>19.13. Version and Platform Compatibility</title><link rel="stylesheet" type="text/css" href="stylesheet.css" /><link rev="made" href="pgsql-docs@lists.postgresql.org" /><meta name="generator" content="DocBook XSL Stylesheets Vsnapshot" /><link rel="prev" href="runtime-config-locks.html" title="19.12. Lock Management" /><link rel="next" href="runtime-config-error-handling.html" title="19.14. Error Handling" /></head><body id="docContent" class="container-fluid col-10"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="5" align="center">19.13. Version and Platform Compatibility</th></tr><tr><td width="10%" align="left"><a accesskey="p" href="runtime-config-locks.html" title="19.12. Lock Management">Prev</a> </td><td width="10%" align="left"><a accesskey="u" href="runtime-config.html" title="Chapter 19. Server Configuration">Up</a></td><th width="60%" align="center">Chapter 19. Server Configuration</th><td width="10%" align="right"><a accesskey="h" href="index.html" title="PostgreSQL 18.0 Documentation">Home</a></td><td width="10%" align="right"> <a accesskey="n" href="runtime-config-error-handling.html" title="19.14. Error Handling">Next</a></td></tr></table><hr /></div><div class="sect1" id="RUNTIME-CONFIG-COMPATIBLE"><div class="titlepage"><div><div><h2 class="title" style="clear: both">19.13. Version and Platform Compatibility <a href="#RUNTIME-CONFIG-COMPATIBLE" class="id_link">#</a></h2></div></div></div><div class="toc"><dl class="toc"><dt><span class="sect2"><a href="runtime-config-compatible.html#RUNTIME-CONFIG-COMPATIBLE-VERSION">19.13.1. Previous PostgreSQL Versions</a></span></dt><dt><span class="sect2"><a href="runtime-config-compatible.html#RUNTIME-CONFIG-COMPATIBLE-CLIENTS">19.13.2. Platform and Client Compatibility</a></span></dt></dl></div><div class="sect2" id="RUNTIME-CONFIG-COMPATIBLE-VERSION"><div class="titlepage"><div><div><h3 class="title">19.13.1. Previous PostgreSQL Versions <a href="#RUNTIME-CONFIG-COMPATIBLE-VERSION" class="id_link">#</a></h3></div></div></div><div class="variablelist"><dl class="variablelist"><dt id="GUC-ARRAY-NULLS"><span class="term"><code class="varname">array_nulls</code> (<code class="type">boolean</code>)
3       <a id="id-1.6.6.16.2.2.1.1.3" class="indexterm"></a>
4       </span> <a href="#GUC-ARRAY-NULLS" class="id_link">#</a></dt><dd><p>
5         This controls whether the array input parser recognizes
6         unquoted <code class="literal">NULL</code> as specifying a null array element.
7         By default, this is <code class="literal">on</code>, allowing array values containing
8         null values to be entered.  However, <span class="productname">PostgreSQL</span> versions
9         before 8.2 did not support null values in arrays, and therefore would
10         treat <code class="literal">NULL</code> as specifying a normal array element with
11         the string value <span class="quote">“<span class="quote">NULL</span>”</span>.  For backward compatibility with
12         applications that require the old behavior, this variable can be
13         turned <code class="literal">off</code>.
14        </p><p>
15         Note that it is possible to create array values containing null values
16         even when this variable is <code class="literal">off</code>.
17        </p></dd><dt id="GUC-BACKSLASH-QUOTE"><span class="term"><code class="varname">backslash_quote</code> (<code class="type">enum</code>)
18       <a id="id-1.6.6.16.2.2.2.1.3" class="indexterm"></a>
19       <a id="id-1.6.6.16.2.2.2.1.4" class="indexterm"></a>
20       </span> <a href="#GUC-BACKSLASH-QUOTE" class="id_link">#</a></dt><dd><p>
21         This controls whether a quote mark can be represented by
22         <code class="literal">\'</code> in a string literal.  The preferred, SQL-standard way
23         to represent a quote mark is by doubling it (<code class="literal">''</code>) but
24         <span class="productname">PostgreSQL</span> has historically also accepted
25         <code class="literal">\'</code>. However, use of <code class="literal">\'</code> creates security risks
26         because in some client character set encodings, there are multibyte
27         characters in which the last byte is numerically equivalent to ASCII
28         <code class="literal">\</code>.  If client-side code does escaping incorrectly then an
29         SQL-injection attack is possible.  This risk can be prevented by
30         making the server reject queries in which a quote mark appears to be
31         escaped by a backslash.
32         The allowed values of <code class="varname">backslash_quote</code> are
33         <code class="literal">on</code> (allow <code class="literal">\'</code> always),
34         <code class="literal">off</code> (reject always), and
35         <code class="literal">safe_encoding</code> (allow only if client encoding does not
36         allow ASCII <code class="literal">\</code> within a multibyte character).
37         <code class="literal">safe_encoding</code> is the default setting.
38        </p><p>
39         Note that in a standard-conforming string literal, <code class="literal">\</code> just
40         means <code class="literal">\</code> anyway.  This parameter only affects the handling of
41         non-standard-conforming literals, including
42         escape string syntax (<code class="literal">E'...'</code>).
43        </p></dd><dt id="GUC-ESCAPE-STRING-WARNING"><span class="term"><code class="varname">escape_string_warning</code> (<code class="type">boolean</code>)
44       <a id="id-1.6.6.16.2.2.3.1.3" class="indexterm"></a>
45       <a id="id-1.6.6.16.2.2.3.1.4" class="indexterm"></a>
46       </span> <a href="#GUC-ESCAPE-STRING-WARNING" class="id_link">#</a></dt><dd><p>
47         When on, a warning is issued if a backslash (<code class="literal">\</code>)
48         appears in an ordinary string literal (<code class="literal">'...'</code>
49         syntax) and <code class="varname">standard_conforming_strings</code> is off.
50         The default is <code class="literal">on</code>.
51        </p><p>
52         Applications that wish to use backslash as escape should be
53         modified to use escape string syntax (<code class="literal">E'...'</code>),
54         because the default behavior of ordinary strings is now to treat
55         backslash as an ordinary character, per SQL standard.  This variable
56         can be enabled to help locate code that needs to be changed.
57        </p></dd><dt id="GUC-LO-COMPAT-PRIVILEGES"><span class="term"><code class="varname">lo_compat_privileges</code> (<code class="type">boolean</code>)
58       <a id="id-1.6.6.16.2.2.4.1.3" class="indexterm"></a>
59       </span> <a href="#GUC-LO-COMPAT-PRIVILEGES" class="id_link">#</a></dt><dd><p>
60         In <span class="productname">PostgreSQL</span> releases prior to 9.0, large objects
61         did not have access privileges and were, therefore, always readable
62         and writable by all users.  Setting this variable to <code class="literal">on</code>
63         disables the new privilege checks, for compatibility with prior
64         releases.  The default is <code class="literal">off</code>.
65         Only superusers and users with the appropriate <code class="literal">SET</code>
66         privilege can change this setting.
67        </p><p>
68         Setting this variable does not disable all security checks related to
69         large objects — only those for which the default behavior has
70         changed in <span class="productname">PostgreSQL</span> 9.0.
71        </p></dd><dt id="GUC-QUOTE-ALL-IDENTIFIERS"><span class="term"><code class="varname">quote_all_identifiers</code> (<code class="type">boolean</code>)
72       <a id="id-1.6.6.16.2.2.5.1.3" class="indexterm"></a>
73       </span> <a href="#GUC-QUOTE-ALL-IDENTIFIERS" class="id_link">#</a></dt><dd><p>
74         When the database generates SQL, force all identifiers to be quoted,
75         even if they are not (currently) keywords.  This will affect the
76         output of <code class="command">EXPLAIN</code> as well as the results of functions
77         like <code class="function">pg_get_viewdef</code>.  See also the
78         <code class="option">--quote-all-identifiers</code> option of
79         <a class="xref" href="app-pgdump.html" title="pg_dump"><span class="refentrytitle"><span class="application">pg_dump</span></span></a> and <a class="xref" href="app-pg-dumpall.html" title="pg_dumpall"><span class="refentrytitle"><span class="application">pg_dumpall</span></span></a>.
80        </p></dd><dt id="GUC-STANDARD-CONFORMING-STRINGS"><span class="term"><code class="varname">standard_conforming_strings</code> (<code class="type">boolean</code>)
81       <a id="id-1.6.6.16.2.2.6.1.3" class="indexterm"></a>
82       <a id="id-1.6.6.16.2.2.6.1.4" class="indexterm"></a>
83       </span> <a href="#GUC-STANDARD-CONFORMING-STRINGS" class="id_link">#</a></dt><dd><p>
84         This controls whether ordinary string literals
85         (<code class="literal">'...'</code>) treat backslashes literally, as specified in
86         the SQL standard.
87         Beginning in <span class="productname">PostgreSQL</span> 9.1, the default is
88         <code class="literal">on</code> (prior releases defaulted to <code class="literal">off</code>).
89         Applications can check this
90         parameter to determine how string literals will be processed.
91         The presence of this parameter can also be taken as an indication
92         that the escape string syntax (<code class="literal">E'...'</code>) is supported.
93         Escape string syntax (<a class="xref" href="sql-syntax-lexical.html#SQL-SYNTAX-STRINGS-ESCAPE" title="4.1.2.2. String Constants with C-Style Escapes">Section 4.1.2.2</a>)
94         should be used if an application desires
95         backslashes to be treated as escape characters.
96        </p></dd><dt id="GUC-SYNCHRONIZE-SEQSCANS"><span class="term"><code class="varname">synchronize_seqscans</code> (<code class="type">boolean</code>)
97       <a id="id-1.6.6.16.2.2.7.1.3" class="indexterm"></a>
98       </span> <a href="#GUC-SYNCHRONIZE-SEQSCANS" class="id_link">#</a></dt><dd><p>
99         This allows sequential scans of large tables to synchronize with each
100         other, so that concurrent scans read the same block at about the
101         same time and hence share the I/O workload.  When this is enabled,
102         a scan might start in the middle of the table and then <span class="quote">“<span class="quote">wrap
103         around</span>”</span> the end to cover all rows, so as to synchronize with the
104         activity of scans already in progress.  This can result in
105         unpredictable changes in the row ordering returned by queries that
106         have no <code class="literal">ORDER BY</code> clause.  Setting this parameter to
107         <code class="literal">off</code> ensures the pre-8.3 behavior in which a sequential
108         scan always starts from the beginning of the table.  The default
109         is <code class="literal">on</code>.
110        </p></dd></dl></div></div><div class="sect2" id="RUNTIME-CONFIG-COMPATIBLE-CLIENTS"><div class="titlepage"><div><div><h3 class="title">19.13.2. Platform and Client Compatibility <a href="#RUNTIME-CONFIG-COMPATIBLE-CLIENTS" class="id_link">#</a></h3></div></div></div><div class="variablelist"><dl class="variablelist"><dt id="GUC-TRANSFORM-NULL-EQUALS"><span class="term"><code class="varname">transform_null_equals</code> (<code class="type">boolean</code>)
111       <a id="id-1.6.6.16.3.2.1.1.3" class="indexterm"></a>
112       <a id="id-1.6.6.16.3.2.1.1.4" class="indexterm"></a>
113       </span> <a href="#GUC-TRANSFORM-NULL-EQUALS" class="id_link">#</a></dt><dd><p>
114         When on, expressions of the form <code class="literal"><em class="replaceable"><code>expr</code></em> =
115         NULL</code> (or <code class="literal">NULL =
116         <em class="replaceable"><code>expr</code></em></code>) are treated as
117         <code class="literal"><em class="replaceable"><code>expr</code></em> IS NULL</code>, that is, they
118         return true if <em class="replaceable"><code>expr</code></em> evaluates to the null value,
119         and false otherwise. The correct SQL-spec-compliant behavior of
120         <code class="literal"><em class="replaceable"><code>expr</code></em> = NULL</code> is to always
121         return null (unknown). Therefore this parameter defaults to
122         <code class="literal">off</code>.
123        </p><p>
124         However, filtered forms in <span class="productname">Microsoft
125         Access</span> generate queries that appear to use
126         <code class="literal"><em class="replaceable"><code>expr</code></em> = NULL</code> to test for
127         null values, so if you use that interface to access the database you
128         might want to turn this option on.  Since expressions of the
129         form <code class="literal"><em class="replaceable"><code>expr</code></em> = NULL</code> always
130         return the null value (using the SQL standard interpretation), they are not
131         very useful and do not appear often in normal applications so
132         this option does little harm in practice.  But new users are
133         frequently confused about the semantics of expressions
134         involving null values, so this option is off by default.
135        </p><p>
136         Note that this option only affects the exact form <code class="literal">= NULL</code>,
137         not other comparison operators or other expressions
138         that are computationally equivalent to some expression
139         involving the equals operator (such as <code class="literal">IN</code>).
140         Thus, this option is not a general fix for bad programming.
141        </p><p>
142         Refer to <a class="xref" href="functions-comparison.html" title="9.2. Comparison Functions and Operators">Section 9.2</a> for related information.
143        </p></dd><dt id="GUC-ALLOW-ALTER-SYSTEM"><span class="term"><code class="varname">allow_alter_system</code> (<code class="type">boolean</code>)
144       <a id="id-1.6.6.16.3.2.2.1.3" class="indexterm"></a>
145       </span> <a href="#GUC-ALLOW-ALTER-SYSTEM" class="id_link">#</a></dt><dd><p>
146         When <code class="literal">allow_alter_system</code> is set to
147         <code class="literal">off</code>, an error is returned if the <code class="command">ALTER
148         SYSTEM</code> command is executed. This parameter can only be set in
149         the <code class="filename">postgresql.conf</code> file or on the server command
150         line. The default value is <code class="literal">on</code>.
151        </p><p>
152         Note that this setting must not be regarded as a security feature. It
153         only disables the <code class="literal">ALTER SYSTEM</code> command. It does not
154         prevent a superuser from changing the configuration using other SQL
155         commands. A superuser has many ways of executing shell commands at
156         the operating system level, and can therefore modify
157         <code class="literal">postgresql.auto.conf</code> regardless of the value of
158         this setting.
159        </p><p>
160         Turning this setting off is intended for environments where the
161         configuration of <span class="productname">PostgreSQL</span> is managed by
162         some external tool.
163         In such environments, a well-intentioned superuser might
164         <span class="emphasis"><em>mistakenly</em></span> use <code class="command">ALTER SYSTEM</code>
165         to change the configuration instead of using the external tool.
166         This might result in unintended behavior, such as the external tool
167         overwriting the change at some later point in time when it updates the
168         configuration.
169         Setting this parameter to <code class="literal">off</code> can
170         help avoid such mistakes.
171        </p><p>
172         This parameter only controls the use of <code class="command">ALTER SYSTEM</code>.
173         The settings stored in <code class="filename">postgresql.auto.conf</code>
174         take effect even if <code class="literal">allow_alter_system</code> is set to
175         <code class="literal">off</code>.
176        </p></dd></dl></div></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="runtime-config-locks.html" title="19.12. Lock Management">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="runtime-config.html" title="Chapter 19. Server Configuration">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="runtime-config-error-handling.html" title="19.14. Error Handling">Next</a></td></tr><tr><td width="40%" align="left" valign="top">19.12. Lock Management </td><td width="20%" align="center"><a accesskey="h" href="index.html" title="PostgreSQL 18.0 Documentation">Home</a></td><td width="40%" align="right" valign="top"> 19.14. Error Handling</td></tr></table></div></body></html>