codekingpro/portable-devtools
115k
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>20.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="20.12. Lock Management" /><link rel="next" href="runtime-config-error-handling.html" title="20.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">20.13. Version and Platform Compatibility</th></tr><tr><td width="10%" align="left"><a accesskey="p" href="runtime-config-locks.html" title="20.12. Lock Management">Prev</a> </td><td width="10%" align="left"><a accesskey="u" href="runtime-config.html" title="Chapter 20. Server Configuration">Up</a></td><th width="60%" align="center">Chapter 20. Server Configuration</th><td width="10%" align="right"><a accesskey="h" href="index.html" title="PostgreSQL 16.3 Documentation">Home</a></td><td width="10%" align="right"> <a accesskey="n" href="runtime-config-error-handling.html" title="20.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">20.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">20.13.1. Previous PostgreSQL Versions</a></span></dt><dt><span class="sect2"><a href="runtime-config-compatible.html#RUNTIME-CONFIG-COMPATIBLE-CLIENTS">20.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">20.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.7.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 recognizes6 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 containing8 null values to be entered. However, <span class="productname">PostgreSQL</span> versions9 before 8.2 did not support null values in arrays, and therefore would10 treat <code class="literal">NULL</code> as specifying a normal array element with11 the string value <span class="quote">“<span class="quote">NULL</span>”</span>. For backward compatibility with12 applications that require the old behavior, this variable can be13 turned <code class="literal">off</code>.14 </p><p>15 Note that it is possible to create array values containing null values16 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.7.16.2.2.2.1.3" class="indexterm"></a>19 <a id="id-1.6.7.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 by22 <code class="literal">\'</code> in a string literal. The preferred, SQL-standard way23 to represent a quote mark is by doubling it (<code class="literal">''</code>) but24 <span class="productname">PostgreSQL</span> has historically also accepted25 <code class="literal">\'</code>. However, use of <code class="literal">\'</code> creates security risks26 because in some client character set encodings, there are multibyte27 characters in which the last byte is numerically equivalent to ASCII28 <code class="literal">\</code>. If client-side code does escaping incorrectly then an29 SQL-injection attack is possible. This risk can be prevented by30 making the server reject queries in which a quote mark appears to be31 escaped by a backslash.32 The allowed values of <code class="varname">backslash_quote</code> are33 <code class="literal">on</code> (allow <code class="literal">\'</code> always),34 <code class="literal">off</code> (reject always), and35 <code class="literal">safe_encoding</code> (allow only if client encoding does not36 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> just40 means <code class="literal">\</code> anyway. This parameter only affects the handling of41 non-standard-conforming literals, including42 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.7.16.2.2.3.1.3" class="indexterm"></a>45 <a id="id-1.6.7.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 be53 modified to use escape string syntax (<code class="literal">E'...'</code>),54 because the default behavior of ordinary strings is now to treat55 backslash as an ordinary character, per SQL standard. This variable56 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.7.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 objects61 did not have access privileges and were, therefore, always readable62 and writable by all users. Setting this variable to <code class="literal">on</code>63 disables the new privilege checks, for compatibility with prior64 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 to69 large objects — only those for which the default behavior has70 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.7.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 the76 output of <code class="command">EXPLAIN</code> as well as the results of functions77 like <code class="function">pg_get_viewdef</code>. See also the78 <code class="option">--quote-all-identifiers</code> option of79 <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.7.16.2.2.6.1.3" class="indexterm"></a>82 <a id="id-1.6.7.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 literals85 (<code class="literal">'...'</code>) treat backslashes literally, as specified in86 the SQL standard.87 Beginning in <span class="productname">PostgreSQL</span> 9.1, the default is88 <code class="literal">on</code> (prior releases defaulted to <code class="literal">off</code>).89 Applications can check this90 parameter to determine how string literals will be processed.91 The presence of this parameter can also be taken as an indication92 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 desires95 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.7.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 each100 other, so that concurrent scans read the same block at about the101 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">wrap103 around</span>”</span> the end to cover all rows, so as to synchronize with the104 activity of scans already in progress. This can result in105 unpredictable changes in the row ordering returned by queries that106 have no <code class="literal">ORDER BY</code> clause. Setting this parameter to107 <code class="literal">off</code> ensures the pre-8.3 behavior in which a sequential108 scan always starts from the beginning of the table. The default109 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">20.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.7.16.3.2.1.1.3" class="indexterm"></a>112 <a id="id-1.6.7.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 as117 <code class="literal"><em class="replaceable"><code>expr</code></em> IS NULL</code>, that is, they118 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 of120 <code class="literal"><em class="replaceable"><code>expr</code></em> = NULL</code> is to always121 return null (unknown). Therefore this parameter defaults to122 <code class="literal">off</code>.123 </p><p>124 However, filtered forms in <span class="productname">Microsoft125 Access</span> generate queries that appear to use126 <code class="literal"><em class="replaceable"><code>expr</code></em> = NULL</code> to test for127 null values, so if you use that interface to access the database you128 might want to turn this option on. Since expressions of the129 form <code class="literal"><em class="replaceable"><code>expr</code></em> = NULL</code> always130 return the null value (using the SQL standard interpretation), they are not131 very useful and do not appear often in normal applications so132 this option does little harm in practice. But new users are133 frequently confused about the semantics of expressions134 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 expressions138 that are computationally equivalent to some expression139 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></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="20.12. Lock Management">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="runtime-config.html" title="Chapter 20. Server Configuration">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="runtime-config-error-handling.html" title="20.14. Error Handling">Next</a></td></tr><tr><td width="40%" align="left" valign="top">20.12. Lock Management </td><td width="20%" align="center"><a accesskey="h" href="index.html" title="PostgreSQL 16.3 Documentation">Home</a></td><td width="40%" align="right" valign="top"> 20.14. Error Handling</td></tr></table></div></body></html>