Added support for builtin locale provider while creating Collation. #8931
parent
a4c5e5683c
commit
a3de5d05b7
|
|
@ -40,6 +40,9 @@ settings:
|
|||
as the existing one, but will be an independent object. If you choose to copy
|
||||
an existing collation, you cannot modify the collation properties displayed on
|
||||
this tab.
|
||||
* Use the drop-down listbox next to *Provider* to select a locale services associated
|
||||
with the collation. Possible values are: icu, libc and builtin.
|
||||
**Note:** The builtin option is available from v17 onwards.
|
||||
* Use the *Locale* field to specify a locale; a locale specifies language and
|
||||
language formatting characteristics. If you specify this, you cannot specify
|
||||
either of the following parameters. To view a list of locales supported by
|
||||
|
|
@ -50,8 +53,6 @@ settings:
|
|||
* Use the *LC_CTYPE* field to specify a locale with specified character
|
||||
classification. The locale must be applicable to the current database encoding.
|
||||
(See CREATE DATABASE for details.)
|
||||
* Use the drop-down listbox next to *Locale Provider* to select a locale services associated
|
||||
with the collation. Possible values are: icu, libc. libc is the default.
|
||||
* Move the switch next to *Deterministic* to *YES* to specify whether the collation should use
|
||||
deterministic comparisons. By default, this option is set to true. In a
|
||||
deterministic comparison, strings that are not byte-wise equal are considered
|
||||
|
|
|
|||
Binary file not shown.
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 60 KiB |
|
|
@ -23,6 +23,7 @@ New features
|
|||
| `Issue #5766 <https://github.com/pgadmin-org/pgadmin4/issues/5766>`_ - Add support for automatic updates in the pgAdmin 4 Desktop application on macOS.
|
||||
| `Issue #6456 <https://github.com/pgadmin-org/pgadmin4/issues/6456>`_ - Added GENERIC_PLAN, MEMORY, SERIALIZE option to EXPLAIN/EXPLAIN ANALYZE command.
|
||||
| `Issue #8917 <https://github.com/pgadmin-org/pgadmin4/issues/8917>`_ - Add support for server tag-based filtering in the Object Explorer.
|
||||
| `Issue #8931 <https://github.com/pgadmin-org/pgadmin4/issues/8931>`_ - Added support for builtin locale provider while creating Collation.
|
||||
| `Issue #8935 <https://github.com/pgadmin-org/pgadmin4/issues/8935>`_ - Added all new connection string parameters introduced in PostgreSQL 16 and later.
|
||||
|
||||
Housekeeping
|
||||
|
|
|
|||
|
|
@ -79,7 +79,8 @@ define('pgadmin.node.collation', [
|
|||
{
|
||||
owner: pgBrowser.serverInfo[treeNodeInfo.server._id].user.name,
|
||||
schema: ('schema' in treeNodeInfo)? treeNodeInfo.schema.label : ''
|
||||
}
|
||||
},
|
||||
treeNodeInfo
|
||||
);
|
||||
}
|
||||
});
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ import gettext from 'sources/gettext';
|
|||
import { isEmptyString } from 'sources/validators';
|
||||
|
||||
export default class CollationSchema extends BaseUISchema {
|
||||
constructor(fieldOptions = {},initValues={}) {
|
||||
constructor(fieldOptions = {}, initValues={}, nodeInfo={}) {
|
||||
super({
|
||||
name: undefined,
|
||||
oid: undefined,
|
||||
|
|
@ -30,6 +30,7 @@ export default class CollationSchema extends BaseUISchema {
|
|||
this.schemaList = fieldOptions.schemaList;
|
||||
this.ownerList = fieldOptions.rolesList;
|
||||
this.collationsList = fieldOptions.collationsList;
|
||||
this.nodeInfo = nodeInfo;
|
||||
}
|
||||
|
||||
get idAttribute() {
|
||||
|
|
@ -86,16 +87,24 @@ export default class CollationSchema extends BaseUISchema {
|
|||
deps: ['locale', 'lc_collate', 'lc_type'],
|
||||
},
|
||||
{
|
||||
id: 'provider', label: gettext('Locale Provider'),
|
||||
id: 'provider', label: gettext('Provider'),
|
||||
editable: false, type: 'select',mode: ['create'], group: gettext('Definition'),
|
||||
readonly: function (state) { return !obj.isNew(state); },
|
||||
options: [{
|
||||
label: gettext('icu'),
|
||||
value: 'icu',
|
||||
}, {
|
||||
label: gettext('libc'),
|
||||
value: 'libc',
|
||||
}],
|
||||
options: function() {
|
||||
let options = [{
|
||||
label: gettext('icu'),
|
||||
value: 'icu',
|
||||
}, {
|
||||
label: gettext('libc'),
|
||||
value: 'libc',
|
||||
}];
|
||||
if(obj.getServerVersion() >= 170000) {
|
||||
options.push({
|
||||
label: gettext('builtin'), value: 'builtin',
|
||||
});
|
||||
}
|
||||
return Promise.resolve(options);
|
||||
},
|
||||
min_version: 110000,
|
||||
deps: ['copy_collation'],
|
||||
depChange: (state)=>{
|
||||
|
|
@ -110,7 +119,7 @@ export default class CollationSchema extends BaseUISchema {
|
|||
}
|
||||
},
|
||||
{
|
||||
id: 'provider', label: gettext('Locale Provider'),
|
||||
id: 'provider', label: gettext('Provider'),
|
||||
type: 'text',mode: ['properties', 'edit'], group: gettext('Definition'),
|
||||
readonly: true,
|
||||
min_version: 110000,
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
SELECT c.oid, c.collname AS name, c.collcollate AS lc_collate, c.collctype AS lc_type,
|
||||
pg_catalog.pg_get_userbyid(c.collowner) AS owner, c.collisdeterministic AS is_deterministic, c.collversion AS version,
|
||||
c.collprovider AS provider, des.description, n.nspname AS schema
|
||||
|
||||
CASE WHEN c.collprovider = 'i' THEN 'icu' ELSE 'libc' END provider,
|
||||
des.description, n.nspname AS schema
|
||||
FROM pg_catalog.pg_collation c
|
||||
JOIN pg_catalog.pg_namespace n ON n.oid=c.collnamespace
|
||||
LEFT OUTER JOIN pg_catalog.pg_description des ON (des.objoid=c.oid AND des.classoid='pg_collation'::regclass)
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
SELECT c.oid, c.collname AS name, COALESCE(c.collcollate, c.colliculocale) AS lc_collate,
|
||||
COALESCE(c.collctype, c.colliculocale) AS lc_type, c.collisdeterministic AS is_deterministic, c.collversion AS version,
|
||||
c.collprovider AS provider,
|
||||
CASE WHEN c.collprovider = 'i' THEN 'icu' ELSE 'libc' END provider,
|
||||
pg_catalog.pg_get_userbyid(c.collowner) AS owner, description, n.nspname AS schema
|
||||
FROM pg_catalog.pg_collation c
|
||||
JOIN pg_catalog.pg_namespace n ON n.oid=c.collnamespace
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
SELECT c.oid, c.collname AS name, COALESCE(c.collcollate, c.colliculocale) AS lc_collate,
|
||||
COALESCE(c.collctype, c.colliculocale) AS lc_type, c.collisdeterministic AS is_deterministic, c.collversion AS version,
|
||||
c.collprovider AS provider, c.collicurules AS rules,
|
||||
CASE WHEN c.collprovider = 'i' THEN 'icu' ELSE 'libc' END provider, c.collicurules AS rules,
|
||||
pg_catalog.pg_get_userbyid(c.collowner) AS owner, description, n.nspname AS schema
|
||||
FROM pg_catalog.pg_collation c
|
||||
JOIN pg_catalog.pg_namespace n ON n.oid=c.collnamespace
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
SELECT c.oid, c.collname AS name, COALESCE(c.collcollate, c.colllocale) AS lc_collate,
|
||||
COALESCE(c.collctype, c.colllocale) AS lc_type, c.collisdeterministic AS is_deterministic, c.collversion AS version,
|
||||
c.collprovider AS provider, c.collicurules AS rules,
|
||||
CASE WHEN c.collprovider = 'i' THEN 'icu' WHEN c.collprovider = 'b' THEN 'builtin'
|
||||
ELSE 'libc' END provider, c.collicurules AS rules,
|
||||
pg_catalog.pg_get_userbyid(c.collowner) AS owner, description, n.nspname AS schema
|
||||
FROM pg_catalog.pg_collation c
|
||||
JOIN pg_catalog.pg_namespace n ON n.oid=c.collnamespace
|
||||
|
|
|
|||
Loading…
Reference in New Issue