Version and Platform Compatibility Category Parameters

This document describes the parameters related to version and platform compatibility categories in the system configuration parameters.

Notes!
To ensure system stability and security, please be cautious when manually modifying relevant parameters.


Versions prior to PostgreSQL 12

array_nulls


This parameter controls whether the array input parser recognizes an unquoted NULL as an empty array element.

  • The default is on, allowing input containing empty array values.
  • Notes: Even if this variable is off, it is still possible to create array values containing empty values.
Data type Default value Setting category
boolean on master; session; reload

backslash_quote


This parameter controls whether single quotes in string text can be represented using \'.

  • The preferred SQL standard method is to double them (‘’), but \' is also accepted.
  • However, using \‘ can lead to security risks because, in some client character set encodings, the last byte of a multibyte character is numerically equivalent to ASCII \’. If client code fails to properly escape, this can result in SQL injection attacks. If the server rejects queries that appear to contain backslash-escaped single quotes, this risk can be avoided.
  • The available values for this parameter are on (always allow \'), off (always reject), and safe_encoding (only allow if the client encoding does not permit ASCII \ within multibyte characters).
  • Notes: In standard string text, \ means \. This parameter only affects the processing of non-standard text, including escape string syntax (E'...').
Data type Default value Setting category
enum safe_encoding master;session;reload

escape_string_warning


When this parameter is enabled, a warning is issued if a backslash (\) appears in a regular string text (‘...’ syntax) and standard_conforming_strings is disabled.

  • Applications that use the backslash as an escape character should consider using escape string syntax (E'...'), as the default behavior for regular strings in the SQL standard is to treat the backslash as a regular character.
  • This variable can be enabled to help identify code that needs to be modified.
Data Type Default Value Setting Category
boolean on master;session;reload

lo_compat_privileges


To maintain compatibility with previous versions, setting this variable to on disables this new privilege check.

  • Large objects do not have access privileges, so they are always readable and writable by all users.
  • Setting this parameter does not disable all security checks related to large objects.
Data type Default value Setting category
boolean off segments;session;reload;superuser

operator_precedence_warning


When this parameter is enabled, the parser will issue a warning for any structures whose meaning has changed due to operator precedence changes since PostgreSQL 9.4.

  • This helps audit applications to check if priority changes have broken anything. However, it is not intended to be kept enabled in production environments, as it will issue warnings for some completely valid, standards-compliant SQL code.
Data Type Default Value Setting Category
boolean off segments;session;reload

quote_all_identifiers


When the database generates SQL, all identifiers are required to be enclosed in quotes, even if they are not currently keywords.

  • This will affect the output of EXPLAIN and the results of functions such as pg_get_viewdef. See also the --quote-all-identifiers option for pg_dump and pg_dumpall.
Data type Default value Setting category
boolean off segments;session;reload

standard_conforming_strings


Control whether ordinary string text (‘...’) treats backslashes as ordinary text according to the SQL standard.

  • The default value is on (the default value in previous releases was off).
  • Applications can check this parameter to determine how string text will be processed.
  • The presence of this parameter indicates that escape string syntax (E'...') is supported. If an application wants backslashes to be treated as escape characters, it should use escape string syntax.
Data type Default value Setting category
boolean on master;session;reload

synchronize_seqscans


It enables synchronized sequential scans of large tables with other scans, allowing concurrent scans to read the same blocks at nearly the same time, thereby distributing I/O load.

  • When this parameter is enabled, a scan may start from the middle of the table and then “loop back” to the beginning to cover all rows, thereby synchronizing with ongoing scan activities.
  • For queries without an ORDER BY clause, such scans may cause unpredictable changes in the order of returned rows.
Data Type Default Value Setting Category
boolean on segments;session;reload

gp_debug_add_path


Whether to allow path debugging information to be added to the YMatrix database.

  • This parameter is mainly used for debugging the optimizer. Enabling it will print out all path information considered by the optimizer, with red indicating that it was not adopted and green indicating that it was adopted.
Data type Default value Setting category
boolean off master;session;reload


Other platforms and clients

transform_null_equals


When this parameter is enabled, expressions of the form expr = NULL (or NULL = expr) are treated as expr IS NULL, meaning that if expr evaluates to NULL, the result is true; otherwise, it is false.

  • The correct SQL-compliant behavior for expr = NULL always returns null (unknown). Therefore, this parameter is set to off by default.
  • However, queries generated by filter forms in Microsoft Access seem to use expr = NULL to test for null values. Therefore, if you are accessing the database using this interface, you can enable this option.
  • Since expressions in the form of expr = NULL always return a null value (as interpreted by the SQL standard), they are not very useful and are uncommon in typical applications. Therefore, this option poses little harm. However, new users often find the semantics of expressions involving null values confusing, so this option is set to off by default.
  • Please note that this option only affects the = NULL form, and does not affect other comparison operators or other expressions that are computationally equivalent to some expressions involving equality operators (such as IN). Therefore, this option is not a general fix for poor programming.
Data type Default value Setting category
boolean off master;session;reload