Skip to content

Commit

Permalink
add legacy_varchar_typing setting (#19374)
Browse files Browse the repository at this point in the history
* add legacy_varchar_typing setting
  • Loading branch information
taroface authored Feb 13, 2025
1 parent ab9b1a9 commit 4da1e98
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/current/_includes/v23.2/misc/session-vars.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
| <a id="intervalstyle"></a> `intervalstyle` | The input string format for [`INTERVAL`]({% link {{ page.version.version }}/interval.md %}) values. Accepted values include `postgres`, `iso_8601`, and `sql_standard`. | The value set by the `sql.defaults.intervalstyle` [cluster setting]({% link {{ page.version.version }}/cluster-settings.md %}) (`postgres`, by default). | Yes | Yes |
| <a id="is-superuser"></a> `is_superuser` | If `on` or `true`, the current user is a member of the [`admin` role]({% link {{ page.version.version }}/security-reference/authorization.md %}#admin-role). | User-dependent | No | Yes |
| <a id="large-full-scan-rows"></a> `large_full_scan_rows` | Determines which tables are considered "large" such that `disallow_full_table_scans` prevents queries from performing full table or index scans on those tables. The default value is `1000`. To prevent all full table or index scans, set to `0`. | User-dependent | No | Yes |
| <a id="legacy-varchar-typing"></a> `legacy_varchar_typing` | **New in v23.2.18:** If `on`, type checking and overload resolution for [`VARCHAR`]({% link {{ page.version.version }}/string.md %}#related-types) types ignore overloads that cause errors, allowing comparisons between `VARCHAR` and non-`STRING`-like placeholder values to execute successfully. If `off`, type checking of these comparisons is more strict and must be handled with explicit type casts. | `on` | Yes | Yes |
| <a id="locality"></a> `locality` | The location of the node.<br/></br>For more information, see [Locality]({% link {{ page.version.version }}/cockroach-start.md %}#locality). | Node-dependent | No | Yes |
| <a id="lock-timeout"></a> `lock_timeout` | The amount of time a query can spend acquiring or waiting for a single [row-level lock]({% link {{ page.version.version }}/architecture/transaction-layer.md %}#concurrency-control). <br/>In CockroachDB, unlike in PostgreSQL, non-locking reads wait for conflicting locks to be released. As a result, the `lock_timeout` configuration applies to writes, and to locking and non-locking reads in read-write and read-only transactions. <br/>If `lock_timeout = 0`, queries do not timeout due to lock acquisitions. | The value set by the `sql.defaults.lock_timeout` [cluster setting]({% link {{ page.version.version }}/cluster-settings.md %}) (`0`, by default) | Yes | Yes |
| <a id="multiple-active-portals-enabled"></a> `multiple_active_portals_enabled` | Whether to enable the [multiple active portals]({% link {{ page.version.version }}/postgresql-compatibility.md %}#multiple-active-portals) pgwire feature. | `false` | Yes | Yes |
Expand Down
1 change: 1 addition & 0 deletions src/current/_includes/v24.1/misc/session-vars.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
| <a id="intervalstyle"></a> `intervalstyle` | The input string format for [`INTERVAL`]({% link {{ page.version.version }}/interval.md %}) values. Accepted values include `postgres`, `iso_8601`, and `sql_standard`. | The value set by the `sql.defaults.intervalstyle` [cluster setting]({% link {{ page.version.version }}/cluster-settings.md %}) (`postgres`, by default). | Yes | Yes |
| <a id="is-superuser"></a> `is_superuser` | If `on` or `true`, the current user is a member of the [`admin` role]({% link {{ page.version.version }}/security-reference/authorization.md %}#admin-role). | User-dependent | No | Yes |
| <a id="large-full-scan-rows"></a> `large_full_scan_rows` | Determines which tables are considered "large" such that `disallow_full_table_scans` rejects full table or index scans of "large" tables. The default value is `1000`. To reject all full table or index scans, set to `0`. | User-dependent | No | Yes |
| <a id="legacy-varchar-typing"></a> `legacy_varchar_typing` | **New in v24.1.9:** If `on`, type checking and overload resolution for [`VARCHAR`]({% link {{ page.version.version }}/string.md %}#related-types) types ignore overloads that cause errors, allowing comparisons between `VARCHAR` and non-`STRING`-like placeholder values to execute successfully. If `off`, type checking of these comparisons is more strict and must be handled with explicit type casts. | `on` | Yes | Yes |
| <a id="locality"></a> `locality` | The location of the node.<br/></br>For more information, see [Locality]({% link {{ page.version.version }}/cockroach-start.md %}#locality). | Node-dependent | No | Yes |
| <a id="lock-timeout"></a> `lock_timeout` | The amount of time a query can spend acquiring or waiting for a single [row-level lock]({% link {{ page.version.version }}/architecture/transaction-layer.md %}#concurrency-control). <br/>In CockroachDB, unlike in PostgreSQL, non-locking reads wait for conflicting locks to be released. As a result, the `lock_timeout` configuration applies to writes, and to locking and non-locking reads in read-write and read-only transactions. <br/>If `lock_timeout = 0`, queries do not timeout due to lock acquisitions. | The value set by the `sql.defaults.lock_timeout` [cluster setting]({% link {{ page.version.version }}/cluster-settings.md %}) (`0`, by default) | Yes | Yes |
| <a id="multiple-active-portals-enabled"></a> `multiple_active_portals_enabled` | Whether to enable the [multiple active portals]({% link {{ page.version.version }}/postgresql-compatibility.md %}#multiple-active-portals) pgwire feature. | `false` | Yes | Yes |
Expand Down
1 change: 1 addition & 0 deletions src/current/_includes/v24.2/misc/session-vars.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
| <a id="intervalstyle"></a> `intervalstyle` | The input string format for [`INTERVAL`]({% link {{ page.version.version }}/interval.md %}) values. Accepted values include `postgres`, `iso_8601`, and `sql_standard`. | The value set by the `sql.defaults.intervalstyle` [cluster setting]({% link {{ page.version.version }}/cluster-settings.md %}) (`postgres`, by default). | Yes | Yes |
| <a id="is-superuser"></a> `is_superuser` | If `on` or `true`, the current user is a member of the [`admin` role]({% link {{ page.version.version }}/security-reference/authorization.md %}#admin-role). | User-dependent | No | Yes |
| <a id="large-full-scan-rows"></a> `large_full_scan_rows` | Determines which tables are considered "large" such that `disallow_full_table_scans` rejects full table or index scans of "large" tables. The default value is `1000`. To reject all full table or index scans, set to `0`. | User-dependent | No | Yes |
| <a id="legacy-varchar-typing"></a> `legacy_varchar_typing` | **New in v24.2.7:** If `on`, type checking and overload resolution for [`VARCHAR`]({% link {{ page.version.version }}/string.md %}#related-types) types ignore overloads that cause errors, allowing comparisons between `VARCHAR` and non-`STRING`-like placeholder values to execute successfully. If `off`, type checking of these comparisons is more strict and must be handled with explicit type casts. | `on` | Yes | Yes |
| <a id="locality"></a> `locality` | The location of the node.<br/></br>For more information, see [Locality]({% link {{ page.version.version }}/cockroach-start.md %}#locality). | Node-dependent | No | Yes |
| <a id="lock-timeout"></a> `lock_timeout` | The amount of time a query can spend acquiring or waiting for a single [row-level lock]({% link {{ page.version.version }}/architecture/transaction-layer.md %}#concurrency-control). <br/>In CockroachDB, unlike in PostgreSQL, non-locking reads wait for conflicting locks to be released. As a result, the `lock_timeout` configuration applies to writes, and to locking and non-locking reads in read-write and read-only transactions. <br/>If `lock_timeout = 0`, queries do not timeout due to lock acquisitions. | The value set by the `sql.defaults.lock_timeout` [cluster setting]({% link {{ page.version.version }}/cluster-settings.md %}) (`0`, by default) | Yes | Yes |
| <a id="multiple-active-portals-enabled"></a> `multiple_active_portals_enabled` | Whether to enable the [multiple active portals]({% link {{ page.version.version }}/postgresql-compatibility.md %}#multiple-active-portals) pgwire feature. | `false` | Yes | Yes |
Expand Down
1 change: 1 addition & 0 deletions src/current/_includes/v24.3/misc/session-vars.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
| <a id="intervalstyle"></a> `intervalstyle` | The input string format for [`INTERVAL`]({% link {{ page.version.version }}/interval.md %}) values. Accepted values include `postgres`, `iso_8601`, and `sql_standard`. | The value set by the `sql.defaults.intervalstyle` [cluster setting]({% link {{ page.version.version }}/cluster-settings.md %}) (`postgres`, by default). | Yes | Yes |
| <a id="is-superuser"></a> `is_superuser` | If `on` or `true`, the current user is a member of the [`admin` role]({% link {{ page.version.version }}/security-reference/authorization.md %}#admin-role). | User-dependent | No | Yes |
| <a id="large-full-scan-rows"></a> `large_full_scan_rows` | Determines which tables are considered "large" such that `disallow_full_table_scans` rejects full table or index scans of "large" tables. The default value is `0`, which disallows all full table or index scans. | User-dependent | No | Yes |
| <a id="legacy-varchar-typing"></a> `legacy_varchar_typing` | **New in v24.3.2:** If `on`, type checking and overload resolution for [`VARCHAR`]({% link {{ page.version.version }}/string.md %}#related-types) types ignore overloads that cause errors, allowing comparisons between `VARCHAR` and non-`STRING`-like placeholder values to execute successfully. If `off`, type checking of these comparisons is more strict and must be handled with explicit type casts. | `on` | Yes | Yes |
| <a id="locality"></a> `locality` | The location of the node.<br/></br>For more information, see [Locality]({% link {{ page.version.version }}/cockroach-start.md %}#locality). | Node-dependent | No | Yes |
| <a id="lock-timeout"></a> `lock_timeout` | The amount of time a query can spend acquiring or waiting for a single [row-level lock]({% link {{ page.version.version }}/architecture/transaction-layer.md %}#concurrency-control). <br/>In CockroachDB, unlike in PostgreSQL, non-locking reads wait for conflicting locks to be released. As a result, the `lock_timeout` configuration applies to writes, and to locking and non-locking reads in read-write and read-only transactions. <br/>If `lock_timeout = 0`, queries do not timeout due to lock acquisitions. | The value set by the `sql.defaults.lock_timeout` [cluster setting]({% link {{ page.version.version }}/cluster-settings.md %}) (`0`, by default) | Yes | Yes |
| <a id="multiple-active-portals-enabled"></a> `multiple_active_portals_enabled` | Whether to enable the [multiple active portals]({% link {{ page.version.version }}/postgresql-compatibility.md %}#multiple-active-portals) pgwire feature. | `false` | Yes | Yes |
Expand Down
1 change: 1 addition & 0 deletions src/current/_includes/v25.1/misc/session-vars.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
| <a id="intervalstyle"></a> `intervalstyle` | The input string format for [`INTERVAL`]({% link {{ page.version.version }}/interval.md %}) values. Accepted values include `postgres`, `iso_8601`, and `sql_standard`. | The value set by the `sql.defaults.intervalstyle` [cluster setting]({% link {{ page.version.version }}/cluster-settings.md %}) (`postgres`, by default). | Yes | Yes |
| <a id="is-superuser"></a> `is_superuser` | If `on` or `true`, the current user is a member of the [`admin` role]({% link {{ page.version.version }}/security-reference/authorization.md %}#admin-role). | User-dependent | No | Yes |
| <a id="large-full-scan-rows"></a> `large_full_scan_rows` | Determines which tables are considered "large" such that `disallow_full_table_scans` rejects full table or index scans of "large" tables. The default value is `0`, which disallows all full table or index scans. | User-dependent | No | Yes |
| <a id="legacy-varchar-typing"></a> `legacy_varchar_typing` | **New in v25.1:** If `on`, type checking and overload resolution for [`VARCHAR`]({% link {{ page.version.version }}/string.md %}#related-types) types ignore overloads that cause errors, allowing comparisons between `VARCHAR` and non-`STRING`-like placeholder values to execute successfully. If `off`, type checking of these comparisons is more strict and must be handled with explicit type casts. | `off` | Yes | Yes |
| <a id="locality"></a> `locality` | The location of the node.<br/></br>For more information, see [Locality]({% link {{ page.version.version }}/cockroach-start.md %}#locality). | Node-dependent | No | Yes |
| <a id="lock-timeout"></a> `lock_timeout` | The amount of time a query can spend acquiring or waiting for a single [row-level lock]({% link {{ page.version.version }}/architecture/transaction-layer.md %}#concurrency-control). <br/>In CockroachDB, unlike in PostgreSQL, non-locking reads wait for conflicting locks to be released. As a result, the `lock_timeout` configuration applies to writes, and to locking and non-locking reads in read-write and read-only transactions. <br/>If `lock_timeout = 0`, queries do not timeout due to lock acquisitions. | The value set by the `sql.defaults.lock_timeout` [cluster setting]({% link {{ page.version.version }}/cluster-settings.md %}) (`0`, by default) | Yes | Yes |
| <a id="multiple-active-portals-enabled"></a> `multiple_active_portals_enabled` | Whether to enable the [multiple active portals]({% link {{ page.version.version }}/postgresql-compatibility.md %}#multiple-active-portals) pgwire feature. | `false` | Yes | Yes |
Expand Down

0 comments on commit 4da1e98

Please sign in to comment.