Movatterモバイル変換


[0]ホーム

URL:



Facebook
Postgres Pro
Facebook
Downloads
19.13. Version and Platform Compatibility
Prev UpChapter 19. Server ConfigurationHome Next

19.13. Version and Platform Compatibility#

19.13.1. Previous PostgreSQL Versions#

array_nulls (boolean)#

This controls whether the array input parser recognizes unquotedNULL as specifying a null array element. By default, this ison, allowing array values containing null values to be entered. However,PostgreSQL versions before 8.2 did not support null values in arrays, and therefore would treatNULL as specifying a normal array element with the string valueNULL. For backward compatibility with applications that require the old behavior, this variable can be turnedoff.

Note that it is possible to create array values containing null values even when this variable isoff.

backslash_quote (enum)#

This controls whether a quote mark can be represented by\' in a string literal. The preferred, SQL-standard way to represent a quote mark is by doubling it ('') butPostgreSQL has historically also accepted\'. However, use of\' creates security risks because in some client character set encodings, there are multibyte characters in which the last byte is numerically equivalent to ASCII\. If client-side code does escaping incorrectly then an 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 ofbackslash_quote areon (allow\' always),off (reject always), andsafe_encoding (allow only if client encoding does not allow ASCII\ within a multibyte character).safe_encoding is the default setting.

Note that in a standard-conforming string literal,\ just means\ anyway. This parameter only affects the handling of non-standard-conforming literals, including escape string syntax (E'...').

escape_string_warning (boolean)#

When on, a warning is issued if a backslash (\) appears in an ordinary string literal ('...' syntax) andstandard_conforming_strings is off. The default ison.

Applications that wish to use backslash as escape should be modified to use escape string syntax (E'...'), because the default behavior of ordinary strings is now to treat backslash as an ordinary character, per SQL standard. This variable can be enabled to help locate code that needs to be changed.

lo_compat_privileges (boolean)#

InPostgreSQL releases prior to 9.0, large objects did not have access privileges and were, therefore, always readable and writable by all users. Setting this variable toon disables the new privilege checks, for compatibility with prior releases. The default isoff. Only superusers and users with the appropriateSET privilege can change this setting.

Setting this variable does not disable all security checks related to large objects — only those for which the default behavior has changed inPostgreSQL 9.0.

quote_all_identifiers (boolean)#

When the database generates SQL, force all identifiers to be quoted, even if they are not (currently) keywords. This will affect the output ofEXPLAIN as well as the results of functions likepg_get_viewdef. See also the--quote-all-identifiers option ofpg_dump andpg_dumpall.

standard_conforming_strings (boolean)#

This controls whether ordinary string literals ('...') treat backslashes literally, as specified in the SQL standard. Beginning inPostgreSQL 9.1, the default ison (prior releases defaulted tooff). Applications can check this parameter to determine how string literals will be processed. The presence of this parameter can also be taken as an indication that the escape string syntax (E'...') is supported. Escape string syntax (Section 4.1.2.2) should be used if an application desires backslashes to be treated as escape characters.

synchronize_seqscans (boolean)#

This allows sequential scans of large tables to synchronize with each other, so that concurrent scans read the same block at about the same time and hence share the I/O workload. When this is enabled, a scan might start in the middle of the table and thenwrap around the end to cover all rows, so as to synchronize with the activity of scans already in progress. This can result in unpredictable changes in the row ordering returned by queries that have noORDER BY clause. Setting this parameter tooff ensures the pre-8.3 behavior in which a sequential scan always starts from the beginning of the table. The default ison.

19.13.2. Platform and Client Compatibility#

transform_null_equals (boolean)#

When on, expressions of the formexpr = NULL (orNULL =expr) are treated asexpr IS NULL, that is, they return true ifexpr evaluates to the null value, and false otherwise. The correct SQL-spec-compliant behavior ofexpr = NULL is to always return null (unknown). Therefore this parameter defaults tooff.

However, filtered forms inMicrosoft Access generate queries that appear to useexpr = NULL 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 formexpr = NULL always return the null value (using the SQL standard 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 off by default.

Note that this option only affects the exact form= NULL, not other comparison operators or other expressions that are computationally equivalent to some expression involving the equals operator (such asIN). Thus, this option is not a general fix for bad programming.

Refer toSection 9.2 for related information.

allow_alter_system (boolean)#

Whenallow_alter_system is set tooff, an error is returned if theALTER SYSTEM command is executed. This parameter can only be set in thepostgresql.conf file or on the server command line. The default value ison.

Note that this setting must not be regarded as a security feature. It only disables theALTER SYSTEM command. It does not prevent a superuser from changing the configuration using other SQL commands. A superuser has many ways of executing shell commands at the operating system level, and can therefore modifypostgresql.auto.conf regardless of the value of this setting.

Turning this setting off is intended for environments where the configuration ofPostgreSQL is managed by some external tool. In such environments, a well intentioned superuser mightmistakenly useALTER SYSTEM to change the configuration instead of using the external tool. This might result in unintended behavior, such as the external tool overwriting the change at some later point in time when it updates the configuration. Setting this parameter tooff can help avoid such mistakes.

This parameter only controls the use ofALTER SYSTEM. The settings stored inpostgresql.auto.conf take effect even ifallow_alter_system is set tooff.


Prev Up Next
19.12. Lock Management Home 19.14. Error Handling
pdfepub
Go to PostgreSQL 17
By continuing to browse this website, you agree to the use of cookies. Go toPrivacy Policy.

[8]ページ先頭

©2009-2025 Movatter.jp