1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168
|
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>17.12.Version and Platform Compatibility</title>
<link rel="stylesheet" href="stylesheet.css" type="text/css">
<link rev="made" href="pgsql-docs@postgresql.org">
<meta name="generator" content="DocBook XSL Stylesheets V1.70.0">
<link rel="start" href="index.html" title="PostgreSQL 8.1.4 Documentation">
<link rel="up" href="runtime-config.html" title="Chapter17.Server Configuration">
<link rel="prev" href="runtime-config-locks.html" title="17.11.Lock Management">
<link rel="next" href="runtime-config-preset.html" title="17.13.Preset Options">
<link rel="copyright" href="ln-legalnotice.html" title="Legal Notice">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="sect1" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="runtime-config-compatible"></a>17.12.Version and Platform Compatibility</h2></div></div></div>
<div class="sect2" lang="en">
<div class="titlepage"><div><div><h3 class="title">
<a name="runtime-config-compatible-version"></a>17.12.1.Previous PostgreSQL Versions</h3></div></div></div>
<div class="variablelist"><dl>
<dt>
<a name="guc-add-missing-from"></a><span class="term"><code class="varname">add_missing_from</code> (<code class="type">boolean</code>)</span>
</dt>
<dd>
<p> When on, tables that are referenced by a query will be
automatically added to the <code class="literal">FROM</code> clause if not
already present. This behavior does not comply with the SQL
standard and many people dislike it because it can mask mistakes
(such as referencing a table where you should have referenced
its alias). The default is <code class="literal">off</code>. This variable can be
enabled for compatibility with releases of
<span class="productname">PostgreSQL</span> prior to 8.1, where this behavior was
allowed by default.
</p>
<p> Note that even when this variable is enabled, a warning
message will be emitted for each implicit <code class="literal">FROM</code>
entry referenced by a query. Users are encouraged to update
their applications to not rely on this behavior, by adding all
tables referenced by a query to the query's <code class="literal">FROM</code>
clause (or its <code class="literal">USING</code> clause in the case of
<code class="command">DELETE</code>).
</p>
</dd>
<dt>
<a name="guc-regex-flavor"></a><span class="term"><code class="varname">regex_flavor</code> (<code class="type">string</code>)</span>
</dt>
<dd><p> The regular expression “<span class="quote">flavor</span>” can be set to
<code class="literal">advanced</code>, <code class="literal">extended</code>, or <code class="literal">basic</code>.
The default is <code class="literal">advanced</code>. The <code class="literal">extended</code>
setting may be useful for exact backwards compatibility with
pre-7.4 releases of <span class="productname">PostgreSQL</span>. See
<a href="functions-matching.html#posix-syntax-details" title="9.7.3.1.Regular Expression Details">Section9.7.3.1, “Regular Expression Details”</a> for details.
</p></dd>
<dt>
<a name="guc-sql-inheritance"></a><span class="term"><code class="varname">sql_inheritance</code> (<code class="type">boolean</code>)</span>
</dt>
<dd><p> This controls the inheritance semantics, in particular whether
subtables are included by various commands by default. They were
not included in versions prior to 7.1. If you need the old
behavior you can set this variable to <code class="literal">off</code>, but in
the long run you are encouraged to change your applications to
use the <code class="literal">ONLY</code> key word to exclude subtables.
See <a href="ddl-inherit.html" title="5.8.Inheritance">Section5.8, “Inheritance”</a> for more information about
inheritance.
</p></dd>
<dt>
<a name="guc-backslash-quote"></a><span class="term"><code class="varname">backslash_quote</code> (<code class="type">string</code>)</span>
</dt>
<dd><p> This controls whether a quote mark can be represented by
<code class="literal">\'</code> in a string literal. The preferred, SQL-standard way
to represent a quote mark is by doubling it (<code class="literal">''</code>) but
<span class="productname">PostgreSQL</span> has historically also accepted
<code class="literal">\'</code>. However, use of <code class="literal">\'</code> creates security risks
because in some client character set encodings, there are multibyte
characters in which the last byte is numerically equivalent to ASCII
<code class="literal">\</code>. If client-side code does escaping incorrectly then a
SQL-injection attack is possible. This risk can be prevented by
making the server reject queries in which a quote mark appears to be
escaped by a backslash.
The allowed values of <code class="varname">backslash_quote</code> are
<code class="literal">on</code> (allow <code class="literal">\'</code> always),
<code class="literal">off</code> (reject always), and
<code class="literal">safe_encoding</code> (allow only if client encoding does not
allow ASCII <code class="literal">\</code> within a multibyte character).
<code class="literal">safe_encoding</code> is the default setting.
</p></dd>
<dt>
<a name="guc-default-with-oids"></a><span class="term"><code class="varname">default_with_oids</code> (<code class="type">boolean</code>)</span>
</dt>
<dd>
<p> This controls whether <code class="command">CREATE TABLE</code> and
<code class="command">CREATE TABLE AS</code> include an OID column in
newly-created tables, if neither <code class="literal">WITH OIDS</code>
nor <code class="literal">WITHOUT OIDS</code> is specified. It also
determines whether OIDs will be included in tables created by
<code class="command">SELECT INTO</code>. In <span class="productname">PostgreSQL</span>
8.1 <code class="varname">default_with_oids</code> is disabled by default; in
prior versions of <span class="productname">PostgreSQL</span>, it
was on by default.
</p>
<p> The use of OIDs in user tables is considered deprecated, so
most installations should leave this variable disabled.
Applications that require OIDs for a particular table should
specify <code class="literal">WITH OIDS</code> when creating the
table. This variable can be enabled for compatibility with old
applications that do not follow this behavior.
</p>
</dd>
<dt>
<a name="guc-escape-string-warning"></a><span class="term"><code class="varname">escape_string_warning</code> (<code class="type">boolean</code>)</span>
</dt>
<dd>
<p> When on, a warning is issued if a backslash (<code class="literal">\</code>)
appears in an ordinary string literal (<code class="literal">'...'</code>
syntax). The default is <code class="literal">off</code>.
</p>
<p> Escape string syntax (<code class="literal">E'...'</code>) should be used for
escapes, because in future versions of
<span class="productname">PostgreSQL</span> ordinary strings will have
the standard-conforming behavior of treating backslashes
literally.
</p>
</dd>
</dl></div>
</div>
<div class="sect2" lang="en">
<div class="titlepage"><div><div><h3 class="title">
<a name="runtime-config-compatible-clients"></a>17.12.2.Platform and Client Compatibility</h3></div></div></div>
<div class="variablelist"><dl>
<dt>
<a name="guc-transform-null-equals"></a><span class="term"><code class="varname">transform_null_equals</code> (<code class="type">boolean</code>)</span>
</dt>
<dd>
<p> When on, expressions of the form <code class="literal"><em class="replaceable"><code>expr</code></em> =
NULL</code> (or <code class="literal">NULL =
<em class="replaceable"><code>expr</code></em></code>) are treated as
<code class="literal"><em class="replaceable"><code>expr</code></em> IS NULL</code>, that is, they
return true if <em class="replaceable"><code>expr</code></em> evaluates to the null value,
and false otherwise. The correct SQL-spec-compliant behavior of
<code class="literal"><em class="replaceable"><code>expr</code></em> = NULL</code> is to always
return null (unknown). Therefore this option defaults to
<code class="literal">off</code>.
</p>
<p> However, filtered forms in <span class="productname">Microsoft
Access</span> generate queries that appear to use
<code class="literal"><em class="replaceable"><code>expr</code></em> = NULL</code> to test for
null values, so if you use that interface to access the database you
might want to turn this option on. Since expressions of the
form <code class="literal"><em class="replaceable"><code>expr</code></em> = NULL</code> always
return the null value (using the correct interpretation) they are not
very useful and do not appear often in normal applications, so
this option does little harm in practice. But new users are
frequently confused about the semantics of expressions
involving null values, so this option is not on by default.
</p>
<p> Note that this option only affects the exact form <code class="literal">= NULL</code>,
not other comparison operators or other expressions
that are computationally equivalent to some expression
involving the equals operator (such as <code class="literal">IN</code>).
Thus, this option is not a general fix for bad programming.
</p>
<p> Refer to <a href="functions-comparison.html" title="9.2.Comparison Operators">Section9.2, “Comparison Operators”</a> for related information.
</p>
</dd>
</dl></div>
</div>
</div></body>
</html>
|