chore: import upstream snapshot with attribution

This commit is contained in:
wehub-resource-sync
2026-07-13 12:32:25 +08:00
commit e014feafe1
2285 changed files with 1131979 additions and 0 deletions
+144
View File
@@ -0,0 +1,144 @@
// Copyright 2024 Dolthub, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package id
import (
"hash/crc32"
"sync"
)
// builtinOidLimit is the largest OID that Postgres will assign to built-in items, so we use this to mitigate conflicts
// with existing and future built-in OIDs.
const builtinOidLimit = 65535
var (
// crcTable is the table that is used for our CRC operations.
crcTable = crc32.MakeTable(crc32.Castagnoli)
// globalCache is the cache structure that is used for the server session.
globalCache = &cacheStruct{
mutex: &sync.RWMutex{},
toOID: map[Id]uint32{Null: 0},
toInternal: map[uint32]Id{0: Null},
}
)
// cacheStruct is the cache structure that holds mappings between the internal ID and external OID (used by Postgres).
// The mappings are temporary, and exist only within a server session. We must discourage users from storing converted
// OIDs, and to use the actual OID type, since the type uses internal IDs so long as it's not returned to the user.
type cacheStruct struct {
mutex *sync.RWMutex
toOID map[Id]uint32
toInternal map[uint32]Id
}
// Cache returns the global cache that is used for the server session.
func Cache() *cacheStruct {
return globalCache
}
// ToOID returns the OID associated with the given internal ID.
func (cache *cacheStruct) ToOID(id Id) uint32 {
// If the ID is in the cache, then we can just return its associated OID
cache.mutex.RLock()
if oid, ok := cache.toOID[id]; ok {
cache.mutex.RUnlock()
return oid
}
cache.mutex.RUnlock()
if id.Section() == Section_OID {
return Oid(id).OID()
}
cache.mutex.Lock()
defer cache.mutex.Unlock()
underlyingBytes := id.UnderlyingBytes()
oid := crc32.Checksum(underlyingBytes, crcTable)
// If the generated OID is valid, then we'll add it to the cache and return it
if _, ok := cache.toInternal[oid]; !ok && oid > builtinOidLimit {
cache.toOID[id] = oid
cache.toInternal[oid] = id
return oid
}
// In this case, the OID is not valid, so we'll run a small loop to generate an OID based on the actual ID.
// This retains some level of determinism for OID to ID relationships.
modifiedBytes := make([]byte, len(underlyingBytes)+1)
copy(modifiedBytes[1:], underlyingBytes)
for i := byte(0); i < 255; i++ {
modifiedBytes[0] = i
oid = crc32.Checksum(underlyingBytes, crcTable)
if _, ok := cache.toInternal[oid]; !ok && oid > builtinOidLimit {
cache.toOID[id] = oid
cache.toInternal[oid] = id
return oid
}
}
// If we're here, then we'll just search for an empty OID as a last resort
for i := uint32(4294967295); i > builtinOidLimit; i-- {
if _, ok := cache.toInternal[oid]; !ok {
cache.toOID[id] = oid
cache.toInternal[oid] = id
return oid
}
}
// We must have over 4 billion items in the database, so we'll panic since there's nothing we can do
panic("all OIDs have been taken")
}
// ToInternal returns the internal ID associated with the given OID.
func (cache *cacheStruct) ToInternal(oid uint32) Id {
cache.mutex.RLock()
defer cache.mutex.RUnlock()
if id, ok := cache.toInternal[oid]; ok {
return id
}
// The OID is not in the cache, so it's invalid
return ""
}
// Exists returns whether the given internal ID exists within the cache. This should primarily be used for the default
// functions, as it's not guaranteed that user functions will be in the cache, especially after a server restart.
func (cache *cacheStruct) Exists(id Id) bool {
cache.mutex.RLock()
defer cache.mutex.RUnlock()
_, ok := cache.toOID[id]
return ok
}
// setBuiltIn sets the given ID to the OID. This should only be used for the built-in items.
func (cache *cacheStruct) setBuiltIn(id Id, oid uint32) {
if oid > builtinOidLimit {
panic("oid is not a built-in")
}
cache.toOID[id] = oid
cache.toInternal[oid] = id
}
// update is used to change the OID mapping of an existing internal ID that has been changed (where the internal ID
// points to the same logical item).
//
//lint:ignore U1000 For future use
func (cache *cacheStruct) update(old Id, new Id) {
cache.mutex.Lock()
defer cache.mutex.Unlock()
// If the old ID doesn't exist in the cache, then we don't have anything to update
oid, ok := cache.toOID[old]
if !ok {
return
}
// We'll delete the old entry and add the new entry, keeping the OID the same for the server session
delete(cache.toOID, old)
delete(cache.toInternal, oid)
cache.toOID[new] = oid
cache.toInternal[oid] = new
}
+26
View File
@@ -0,0 +1,26 @@
// Copyright 2024 Dolthub, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package id
// This adds all of the built-in schemas to the cache.
func init() {
globalCache.setBuiltIn(NewId(Section_AccessMethod, "heap"), 2)
globalCache.setBuiltIn(NewId(Section_AccessMethod, "btree"), 403)
globalCache.setBuiltIn(NewId(Section_AccessMethod, "hash"), 405)
globalCache.setBuiltIn(NewId(Section_AccessMethod, "gist"), 783)
globalCache.setBuiltIn(NewId(Section_AccessMethod, "gin"), 2742)
globalCache.setBuiltIn(NewId(Section_AccessMethod, "brin"), 3580)
globalCache.setBuiltIn(NewId(Section_AccessMethod, "spgist"), 4000)
}
+806
View File
@@ -0,0 +1,806 @@
// Copyright 2024 Dolthub, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package id
// This adds all of the built-in schemas to the cache.
func init() {
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "default"), 100)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "C"), 950)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "POSIX"), 951)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "ucs_basic"), 12340)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "und-x-icu"), 12341)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "af-x-icu"), 12342)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "af-NA-x-icu"), 12343)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "af-ZA-x-icu"), 12344)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "agq-x-icu"), 12345)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "agq-CM-x-icu"), 12346)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "ak-x-icu"), 12347)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "ak-GH-x-icu"), 12348)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "am-x-icu"), 12349)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "am-ET-x-icu"), 12350)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "ar-x-icu"), 12351)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "ar-001-x-icu"), 12352)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "ar-AE-x-icu"), 12353)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "ar-BH-x-icu"), 12354)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "ar-DJ-x-icu"), 12355)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "ar-DZ-x-icu"), 12356)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "ar-EG-x-icu"), 12357)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "ar-EH-x-icu"), 12358)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "ar-ER-x-icu"), 12359)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "ar-IL-x-icu"), 12360)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "ar-IQ-x-icu"), 12361)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "ar-JO-x-icu"), 12362)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "ar-KM-x-icu"), 12363)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "ar-KW-x-icu"), 12364)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "ar-LB-x-icu"), 12365)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "ar-LY-x-icu"), 12366)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "ar-MA-x-icu"), 12367)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "ar-MR-x-icu"), 12368)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "ar-OM-x-icu"), 12369)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "ar-PS-x-icu"), 12370)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "ar-QA-x-icu"), 12371)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "ar-SA-x-icu"), 12372)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "ar-SD-x-icu"), 12373)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "ar-SO-x-icu"), 12374)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "ar-SS-x-icu"), 12375)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "ar-SY-x-icu"), 12376)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "ar-TD-x-icu"), 12377)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "ar-TN-x-icu"), 12378)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "ar-YE-x-icu"), 12379)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "as-x-icu"), 12380)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "as-IN-x-icu"), 12381)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "asa-x-icu"), 12382)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "asa-TZ-x-icu"), 12383)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "ast-x-icu"), 12384)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "ast-ES-x-icu"), 12385)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "az-x-icu"), 12386)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "az-Cyrl-x-icu"), 12387)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "az-Cyrl-AZ-x-icu"), 12388)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "az-Latn-x-icu"), 12389)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "az-Latn-AZ-x-icu"), 12390)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "bas-x-icu"), 12391)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "bas-CM-x-icu"), 12392)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "be-x-icu"), 12393)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "be-BY-x-icu"), 12394)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "bem-x-icu"), 12395)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "bem-ZM-x-icu"), 12396)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "bez-x-icu"), 12397)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "bez-TZ-x-icu"), 12398)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "bg-x-icu"), 12399)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "bg-BG-x-icu"), 12400)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "bm-x-icu"), 12401)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "bm-ML-x-icu"), 12402)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "bn-x-icu"), 12403)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "bn-BD-x-icu"), 12404)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "bn-IN-x-icu"), 12405)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "bo-x-icu"), 12406)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "bo-CN-x-icu"), 12407)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "bo-IN-x-icu"), 12408)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "br-x-icu"), 12409)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "br-FR-x-icu"), 12410)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "brx-x-icu"), 12411)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "brx-IN-x-icu"), 12412)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "bs-x-icu"), 12413)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "bs-Cyrl-x-icu"), 12414)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "bs-Cyrl-BA-x-icu"), 12415)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "bs-Latn-x-icu"), 12416)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "bs-Latn-BA-x-icu"), 12417)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "ca-x-icu"), 12418)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "ca-AD-x-icu"), 12419)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "ca-ES-x-icu"), 12420)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "ca-FR-x-icu"), 12421)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "ca-IT-x-icu"), 12422)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "ccp-x-icu"), 12423)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "ccp-BD-x-icu"), 12424)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "ccp-IN-x-icu"), 12425)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "ce-x-icu"), 12426)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "ce-RU-x-icu"), 12427)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "ceb-x-icu"), 12428)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "ceb-PH-x-icu"), 12429)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "cgg-x-icu"), 12430)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "cgg-UG-x-icu"), 12431)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "chr-x-icu"), 12432)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "chr-US-x-icu"), 12433)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "ckb-x-icu"), 12434)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "ckb-IQ-x-icu"), 12435)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "ckb-IR-x-icu"), 12436)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "cs-x-icu"), 12437)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "cs-CZ-x-icu"), 12438)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "cy-x-icu"), 12439)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "cy-GB-x-icu"), 12440)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "da-x-icu"), 12441)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "da-DK-x-icu"), 12442)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "da-GL-x-icu"), 12443)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "dav-x-icu"), 12444)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "dav-KE-x-icu"), 12445)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "de-x-icu"), 12446)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "de-AT-x-icu"), 12447)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "de-BE-x-icu"), 12448)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "de-CH-x-icu"), 12449)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "de-DE-x-icu"), 12450)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "de-IT-x-icu"), 12451)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "de-LI-x-icu"), 12452)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "de-LU-x-icu"), 12453)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "dje-x-icu"), 12454)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "dje-NE-x-icu"), 12455)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "dsb-x-icu"), 12456)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "dsb-DE-x-icu"), 12457)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "dua-x-icu"), 12458)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "dua-CM-x-icu"), 12459)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "dyo-x-icu"), 12460)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "dyo-SN-x-icu"), 12461)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "dz-x-icu"), 12462)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "dz-BT-x-icu"), 12463)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "ebu-x-icu"), 12464)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "ebu-KE-x-icu"), 12465)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "ee-x-icu"), 12466)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "ee-GH-x-icu"), 12467)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "ee-TG-x-icu"), 12468)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "el-x-icu"), 12469)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "el-CY-x-icu"), 12470)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "el-GR-x-icu"), 12471)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "en-x-icu"), 12472)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "en-001-x-icu"), 12473)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "en-150-x-icu"), 12474)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "en-AE-x-icu"), 12475)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "en-AG-x-icu"), 12476)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "en-AI-x-icu"), 12477)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "en-AS-x-icu"), 12478)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "en-AT-x-icu"), 12479)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "en-AU-x-icu"), 12480)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "en-BB-x-icu"), 12481)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "en-BE-x-icu"), 12482)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "en-BI-x-icu"), 12483)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "en-BM-x-icu"), 12484)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "en-BS-x-icu"), 12485)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "en-BW-x-icu"), 12486)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "en-BZ-x-icu"), 12487)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "en-CA-x-icu"), 12488)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "en-CC-x-icu"), 12489)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "en-CH-x-icu"), 12490)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "en-CK-x-icu"), 12491)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "en-CM-x-icu"), 12492)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "en-CX-x-icu"), 12493)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "en-CY-x-icu"), 12494)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "en-DE-x-icu"), 12495)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "en-DG-x-icu"), 12496)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "en-DK-x-icu"), 12497)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "en-DM-x-icu"), 12498)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "en-ER-x-icu"), 12499)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "en-FI-x-icu"), 12500)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "en-FJ-x-icu"), 12501)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "en-FK-x-icu"), 12502)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "en-FM-x-icu"), 12503)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "en-GB-x-icu"), 12504)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "en-GD-x-icu"), 12505)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "en-GG-x-icu"), 12506)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "en-GH-x-icu"), 12507)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "en-GI-x-icu"), 12508)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "en-GM-x-icu"), 12509)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "en-GU-x-icu"), 12510)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "en-GY-x-icu"), 12511)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "en-HK-x-icu"), 12512)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "en-IE-x-icu"), 12513)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "en-IL-x-icu"), 12514)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "en-IM-x-icu"), 12515)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "en-IN-x-icu"), 12516)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "en-IO-x-icu"), 12517)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "en-JE-x-icu"), 12518)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "en-JM-x-icu"), 12519)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "en-KE-x-icu"), 12520)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "en-KI-x-icu"), 12521)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "en-KN-x-icu"), 12522)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "en-KY-x-icu"), 12523)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "en-LC-x-icu"), 12524)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "en-LR-x-icu"), 12525)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "en-LS-x-icu"), 12526)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "en-MG-x-icu"), 12527)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "en-MH-x-icu"), 12528)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "en-MO-x-icu"), 12529)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "en-MP-x-icu"), 12530)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "en-MS-x-icu"), 12531)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "en-MT-x-icu"), 12532)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "en-MU-x-icu"), 12533)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "en-MW-x-icu"), 12534)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "en-MY-x-icu"), 12535)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "en-NA-x-icu"), 12536)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "en-NF-x-icu"), 12537)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "en-NG-x-icu"), 12538)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "en-NL-x-icu"), 12539)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "en-NR-x-icu"), 12540)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "en-NU-x-icu"), 12541)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "en-NZ-x-icu"), 12542)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "en-PG-x-icu"), 12543)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "en-PH-x-icu"), 12544)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "en-PK-x-icu"), 12545)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "en-PN-x-icu"), 12546)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "en-PR-x-icu"), 12547)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "en-PW-x-icu"), 12548)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "en-RW-x-icu"), 12549)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "en-SB-x-icu"), 12550)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "en-SC-x-icu"), 12551)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "en-SD-x-icu"), 12552)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "en-SE-x-icu"), 12553)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "en-SG-x-icu"), 12554)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "en-SH-x-icu"), 12555)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "en-SI-x-icu"), 12556)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "en-SL-x-icu"), 12557)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "en-SS-x-icu"), 12558)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "en-SX-x-icu"), 12559)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "en-SZ-x-icu"), 12560)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "en-TC-x-icu"), 12561)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "en-TK-x-icu"), 12562)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "en-TO-x-icu"), 12563)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "en-TT-x-icu"), 12564)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "en-TV-x-icu"), 12565)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "en-TZ-x-icu"), 12566)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "en-UG-x-icu"), 12567)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "en-UM-x-icu"), 12568)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "en-US-x-icu"), 12569)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "en-US-u-va-posix-x-icu"), 12570)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "en-VC-x-icu"), 12571)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "en-VG-x-icu"), 12572)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "en-VI-x-icu"), 12573)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "en-VU-x-icu"), 12574)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "en-WS-x-icu"), 12575)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "en-ZA-x-icu"), 12576)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "en-ZM-x-icu"), 12577)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "en-ZW-x-icu"), 12578)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "eo-x-icu"), 12579)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "eo-001-x-icu"), 12580)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "es-x-icu"), 12581)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "es-419-x-icu"), 12582)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "es-AR-x-icu"), 12583)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "es-BO-x-icu"), 12584)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "es-BR-x-icu"), 12585)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "es-BZ-x-icu"), 12586)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "es-CL-x-icu"), 12587)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "es-CO-x-icu"), 12588)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "es-CR-x-icu"), 12589)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "es-CU-x-icu"), 12590)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "es-DO-x-icu"), 12591)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "es-EA-x-icu"), 12592)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "es-EC-x-icu"), 12593)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "es-ES-x-icu"), 12594)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "es-GQ-x-icu"), 12595)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "es-GT-x-icu"), 12596)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "es-HN-x-icu"), 12597)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "es-IC-x-icu"), 12598)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "es-MX-x-icu"), 12599)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "es-NI-x-icu"), 12600)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "es-PA-x-icu"), 12601)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "es-PE-x-icu"), 12602)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "es-PH-x-icu"), 12603)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "es-PR-x-icu"), 12604)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "es-PY-x-icu"), 12605)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "es-SV-x-icu"), 12606)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "es-US-x-icu"), 12607)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "es-UY-x-icu"), 12608)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "es-VE-x-icu"), 12609)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "et-x-icu"), 12610)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "et-EE-x-icu"), 12611)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "eu-x-icu"), 12612)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "eu-ES-x-icu"), 12613)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "ewo-x-icu"), 12614)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "ewo-CM-x-icu"), 12615)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "fa-x-icu"), 12616)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "fa-AF-x-icu"), 12617)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "fa-IR-x-icu"), 12618)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "ff-x-icu"), 12619)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "ff-Adlm-x-icu"), 12620)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "ff-Adlm-BF-x-icu"), 12621)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "ff-Adlm-CM-x-icu"), 12622)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "ff-Adlm-GH-x-icu"), 12623)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "ff-Adlm-GM-x-icu"), 12624)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "ff-Adlm-GN-x-icu"), 12625)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "ff-Adlm-GW-x-icu"), 12626)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "ff-Adlm-LR-x-icu"), 12627)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "ff-Adlm-MR-x-icu"), 12628)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "ff-Adlm-NE-x-icu"), 12629)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "ff-Adlm-NG-x-icu"), 12630)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "ff-Adlm-SL-x-icu"), 12631)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "ff-Adlm-SN-x-icu"), 12632)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "ff-Latn-x-icu"), 12633)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "ff-Latn-BF-x-icu"), 12634)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "ff-Latn-CM-x-icu"), 12635)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "ff-Latn-GH-x-icu"), 12636)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "ff-Latn-GM-x-icu"), 12637)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "ff-Latn-GN-x-icu"), 12638)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "ff-Latn-GW-x-icu"), 12639)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "ff-Latn-LR-x-icu"), 12640)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "ff-Latn-MR-x-icu"), 12641)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "ff-Latn-NE-x-icu"), 12642)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "ff-Latn-NG-x-icu"), 12643)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "ff-Latn-SL-x-icu"), 12644)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "ff-Latn-SN-x-icu"), 12645)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "fi-x-icu"), 12646)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "fi-FI-x-icu"), 12647)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "fil-x-icu"), 12648)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "fil-PH-x-icu"), 12649)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "fo-x-icu"), 12650)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "fo-DK-x-icu"), 12651)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "fo-FO-x-icu"), 12652)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "fr-x-icu"), 12653)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "fr-BE-x-icu"), 12654)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "fr-BF-x-icu"), 12655)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "fr-BI-x-icu"), 12656)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "fr-BJ-x-icu"), 12657)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "fr-BL-x-icu"), 12658)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "fr-CA-x-icu"), 12659)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "fr-CD-x-icu"), 12660)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "fr-CF-x-icu"), 12661)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "fr-CG-x-icu"), 12662)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "fr-CH-x-icu"), 12663)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "fr-CI-x-icu"), 12664)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "fr-CM-x-icu"), 12665)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "fr-DJ-x-icu"), 12666)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "fr-DZ-x-icu"), 12667)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "fr-FR-x-icu"), 12668)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "fr-GA-x-icu"), 12669)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "fr-GF-x-icu"), 12670)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "fr-GN-x-icu"), 12671)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "fr-GP-x-icu"), 12672)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "fr-GQ-x-icu"), 12673)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "fr-HT-x-icu"), 12674)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "fr-KM-x-icu"), 12675)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "fr-LU-x-icu"), 12676)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "fr-MA-x-icu"), 12677)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "fr-MC-x-icu"), 12678)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "fr-MF-x-icu"), 12679)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "fr-MG-x-icu"), 12680)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "fr-ML-x-icu"), 12681)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "fr-MQ-x-icu"), 12682)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "fr-MR-x-icu"), 12683)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "fr-MU-x-icu"), 12684)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "fr-NC-x-icu"), 12685)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "fr-NE-x-icu"), 12686)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "fr-PF-x-icu"), 12687)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "fr-PM-x-icu"), 12688)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "fr-RE-x-icu"), 12689)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "fr-RW-x-icu"), 12690)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "fr-SC-x-icu"), 12691)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "fr-SN-x-icu"), 12692)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "fr-SY-x-icu"), 12693)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "fr-TD-x-icu"), 12694)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "fr-TG-x-icu"), 12695)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "fr-TN-x-icu"), 12696)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "fr-VU-x-icu"), 12697)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "fr-WF-x-icu"), 12698)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "fr-YT-x-icu"), 12699)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "fur-x-icu"), 12700)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "fur-IT-x-icu"), 12701)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "fy-x-icu"), 12702)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "fy-NL-x-icu"), 12703)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "ga-x-icu"), 12704)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "ga-GB-x-icu"), 12705)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "ga-IE-x-icu"), 12706)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "gd-x-icu"), 12707)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "gd-GB-x-icu"), 12708)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "gl-x-icu"), 12709)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "gl-ES-x-icu"), 12710)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "gsw-x-icu"), 12711)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "gsw-CH-x-icu"), 12712)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "gsw-FR-x-icu"), 12713)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "gsw-LI-x-icu"), 12714)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "gu-x-icu"), 12715)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "gu-IN-x-icu"), 12716)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "guz-x-icu"), 12717)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "guz-KE-x-icu"), 12718)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "gv-x-icu"), 12719)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "gv-IM-x-icu"), 12720)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "ha-x-icu"), 12721)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "ha-GH-x-icu"), 12722)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "ha-NE-x-icu"), 12723)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "ha-NG-x-icu"), 12724)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "haw-x-icu"), 12725)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "haw-US-x-icu"), 12726)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "he-x-icu"), 12727)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "he-IL-x-icu"), 12728)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "hi-x-icu"), 12729)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "hi-IN-x-icu"), 12730)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "hr-x-icu"), 12731)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "hr-BA-x-icu"), 12732)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "hr-HR-x-icu"), 12733)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "hsb-x-icu"), 12734)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "hsb-DE-x-icu"), 12735)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "hu-x-icu"), 12736)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "hu-HU-x-icu"), 12737)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "hy-x-icu"), 12738)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "hy-AM-x-icu"), 12739)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "ia-x-icu"), 27401)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "ia-001-x-icu"), 27411)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "id-x-icu"), 27421)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "id-ID-x-icu"), 27431)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "ig-x-icu"), 27441)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "ig-NG-x-icu"), 27451)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "ii-x-icu"), 27461)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "ii-CN-x-icu"), 27471)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "is-x-icu"), 27481)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "is-IS-x-icu"), 27491)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "it-x-icu"), 27501)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "it-CH-x-icu"), 27511)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "it-IT-x-icu"), 27521)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "it-SM-x-icu"), 27531)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "it-VA-x-icu"), 27541)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "ja-x-icu"), 27551)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "ja-JP-x-icu"), 27561)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "jgo-x-icu"), 27571)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "jgo-CM-x-icu"), 27581)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "jmc-x-icu"), 27591)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "jmc-TZ-x-icu"), 27601)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "jv-x-icu"), 27611)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "jv-ID-x-icu"), 27621)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "ka-x-icu"), 27631)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "ka-GE-x-icu"), 27641)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "kab-x-icu"), 27651)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "kab-DZ-x-icu"), 27661)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "kam-x-icu"), 27671)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "kam-KE-x-icu"), 27681)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "kde-x-icu"), 27691)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "kde-TZ-x-icu"), 27701)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "kea-x-icu"), 27711)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "kea-CV-x-icu"), 27721)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "khq-x-icu"), 27731)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "khq-ML-x-icu"), 27741)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "ki-x-icu"), 27751)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "ki-KE-x-icu"), 27761)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "kk-x-icu"), 27771)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "kk-KZ-x-icu"), 27781)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "kkj-x-icu"), 27791)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "kkj-CM-x-icu"), 27801)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "kl-x-icu"), 27811)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "kl-GL-x-icu"), 27821)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "kln-x-icu"), 27831)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "kln-KE-x-icu"), 27841)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "km-x-icu"), 27851)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "km-KH-x-icu"), 27861)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "kn-x-icu"), 27871)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "kn-IN-x-icu"), 27881)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "ko-x-icu"), 27891)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "ko-KP-x-icu"), 27901)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "ko-KR-x-icu"), 27911)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "kok-x-icu"), 27921)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "kok-IN-x-icu"), 27931)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "ks-x-icu"), 27941)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "ks-Arab-x-icu"), 27951)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "ks-Arab-IN-x-icu"), 27961)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "ksb-x-icu"), 27971)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "ksb-TZ-x-icu"), 27981)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "ksf-x-icu"), 27991)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "ksf-CM-x-icu"), 28001)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "ksh-x-icu"), 28011)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "ksh-DE-x-icu"), 28021)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "ku-x-icu"), 28031)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "ku-TR-x-icu"), 28041)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "kw-x-icu"), 28051)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "kw-GB-x-icu"), 28061)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "ky-x-icu"), 28071)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "ky-KG-x-icu"), 28081)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "lag-x-icu"), 28091)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "lag-TZ-x-icu"), 28101)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "lb-x-icu"), 28111)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "lb-LU-x-icu"), 28121)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "lg-x-icu"), 28131)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "lg-UG-x-icu"), 28141)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "lkt-x-icu"), 28151)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "lkt-US-x-icu"), 28161)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "ln-x-icu"), 28171)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "ln-AO-x-icu"), 28181)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "ln-CD-x-icu"), 28191)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "ln-CF-x-icu"), 28201)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "ln-CG-x-icu"), 28211)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "lo-x-icu"), 28221)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "lo-LA-x-icu"), 28231)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "lrc-x-icu"), 28241)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "lrc-IQ-x-icu"), 28251)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "lrc-IR-x-icu"), 28261)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "lt-x-icu"), 28271)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "lt-LT-x-icu"), 28281)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "lu-x-icu"), 28291)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "lu-CD-x-icu"), 28301)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "luo-x-icu"), 28311)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "luo-KE-x-icu"), 28321)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "luy-x-icu"), 28331)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "luy-KE-x-icu"), 28341)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "lv-x-icu"), 28351)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "lv-LV-x-icu"), 28361)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "mai-x-icu"), 28371)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "mai-IN-x-icu"), 28381)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "mas-x-icu"), 28391)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "mas-KE-x-icu"), 28401)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "mas-TZ-x-icu"), 28411)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "mer-x-icu"), 28421)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "mer-KE-x-icu"), 28431)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "mfe-x-icu"), 28441)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "mfe-MU-x-icu"), 28451)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "mg-x-icu"), 28461)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "mg-MG-x-icu"), 28471)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "mgh-x-icu"), 28481)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "mgh-MZ-x-icu"), 28491)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "mgo-x-icu"), 28501)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "mgo-CM-x-icu"), 28511)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "mi-x-icu"), 28521)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "mi-NZ-x-icu"), 28531)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "mk-x-icu"), 28541)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "mk-MK-x-icu"), 28551)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "ml-x-icu"), 28561)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "ml-IN-x-icu"), 28571)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "mn-x-icu"), 28581)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "mn-MN-x-icu"), 28591)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "mni-x-icu"), 28601)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "mni-Beng-x-icu"), 28611)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "mni-Beng-IN-x-icu"), 28621)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "mr-x-icu"), 28631)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "mr-IN-x-icu"), 28641)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "ms-x-icu"), 28651)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "ms-BN-x-icu"), 28661)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "ms-ID-x-icu"), 28671)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "ms-MY-x-icu"), 28681)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "ms-SG-x-icu"), 28691)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "mt-x-icu"), 28701)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "mt-MT-x-icu"), 28711)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "mua-x-icu"), 28721)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "mua-CM-x-icu"), 28731)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "my-x-icu"), 28741)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "my-MM-x-icu"), 28751)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "mzn-x-icu"), 28761)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "mzn-IR-x-icu"), 28771)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "naq-x-icu"), 28781)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "naq-NA-x-icu"), 28791)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "nb-x-icu"), 28801)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "nb-NO-x-icu"), 28811)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "nb-SJ-x-icu"), 28821)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "nd-x-icu"), 28831)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "nd-ZW-x-icu"), 28841)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "nds-x-icu"), 28851)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "nds-DE-x-icu"), 28861)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "nds-NL-x-icu"), 28871)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "ne-x-icu"), 28881)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "ne-IN-x-icu"), 28891)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "ne-NP-x-icu"), 28901)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "nl-x-icu"), 28911)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "nl-AW-x-icu"), 28921)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "nl-BE-x-icu"), 28931)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "nl-BQ-x-icu"), 28941)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "nl-CW-x-icu"), 28951)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "nl-NL-x-icu"), 28961)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "nl-SR-x-icu"), 28971)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "nl-SX-x-icu"), 28981)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "nmg-x-icu"), 28991)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "nmg-CM-x-icu"), 29001)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "nn-x-icu"), 29011)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "nn-NO-x-icu"), 29021)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "nnh-x-icu"), 29031)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "nnh-CM-x-icu"), 29041)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "nus-x-icu"), 29051)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "nus-SS-x-icu"), 29061)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "nyn-x-icu"), 29071)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "nyn-UG-x-icu"), 29081)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "om-x-icu"), 29091)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "om-ET-x-icu"), 29101)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "om-KE-x-icu"), 29111)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "or-x-icu"), 29121)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "or-IN-x-icu"), 29131)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "os-x-icu"), 29141)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "os-GE-x-icu"), 29151)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "os-RU-x-icu"), 29161)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "pa-x-icu"), 29171)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "pa-Arab-x-icu"), 29181)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "pa-Arab-PK-x-icu"), 29191)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "pa-Guru-x-icu"), 29201)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "pa-Guru-IN-x-icu"), 29211)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "pcm-x-icu"), 29221)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "pcm-NG-x-icu"), 29231)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "pl-x-icu"), 29241)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "pl-PL-x-icu"), 29251)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "ps-x-icu"), 29261)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "ps-AF-x-icu"), 29271)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "ps-PK-x-icu"), 29281)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "pt-x-icu"), 29291)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "pt-AO-x-icu"), 29301)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "pt-BR-x-icu"), 29311)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "pt-CH-x-icu"), 29321)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "pt-CV-x-icu"), 29331)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "pt-GQ-x-icu"), 29341)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "pt-GW-x-icu"), 29351)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "pt-LU-x-icu"), 29361)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "pt-MO-x-icu"), 29371)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "pt-MZ-x-icu"), 29381)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "pt-PT-x-icu"), 29391)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "pt-ST-x-icu"), 29401)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "pt-TL-x-icu"), 29411)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "qu-x-icu"), 29421)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "qu-BO-x-icu"), 29431)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "qu-EC-x-icu"), 29441)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "qu-PE-x-icu"), 29451)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "rm-x-icu"), 29461)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "rm-CH-x-icu"), 29471)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "rn-x-icu"), 29481)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "rn-BI-x-icu"), 29491)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "ro-x-icu"), 29501)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "ro-MD-x-icu"), 29511)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "ro-RO-x-icu"), 29521)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "rof-x-icu"), 29531)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "rof-TZ-x-icu"), 29541)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "ru-x-icu"), 29551)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "ru-BY-x-icu"), 29561)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "ru-KG-x-icu"), 29571)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "ru-KZ-x-icu"), 29581)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "ru-MD-x-icu"), 29591)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "ru-RU-x-icu"), 29601)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "ru-UA-x-icu"), 29611)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "rw-x-icu"), 29621)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "rw-RW-x-icu"), 29631)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "rwk-x-icu"), 29641)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "rwk-TZ-x-icu"), 29651)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "sah-x-icu"), 29661)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "sah-RU-x-icu"), 29671)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "saq-x-icu"), 29681)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "saq-KE-x-icu"), 29691)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "sat-x-icu"), 29701)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "sat-Olck-x-icu"), 29711)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "sat-Olck-IN-x-icu"), 29721)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "sbp-x-icu"), 29731)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "sbp-TZ-x-icu"), 29741)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "sd-x-icu"), 29751)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "sd-Arab-x-icu"), 29761)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "sd-Arab-PK-x-icu"), 29771)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "sd-Deva-x-icu"), 29781)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "sd-Deva-IN-x-icu"), 29791)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "se-x-icu"), 29801)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "se-FI-x-icu"), 29811)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "se-NO-x-icu"), 29821)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "se-SE-x-icu"), 29831)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "seh-x-icu"), 29841)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "seh-MZ-x-icu"), 29851)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "ses-x-icu"), 29861)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "ses-ML-x-icu"), 29871)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "sg-x-icu"), 29881)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "sg-CF-x-icu"), 29891)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "shi-x-icu"), 29901)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "shi-Latn-x-icu"), 29911)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "shi-Latn-MA-x-icu"), 29921)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "shi-Tfng-x-icu"), 29931)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "shi-Tfng-MA-x-icu"), 29941)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "si-x-icu"), 29951)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "si-LK-x-icu"), 29961)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "sk-x-icu"), 29971)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "sk-SK-x-icu"), 29981)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "sl-x-icu"), 29991)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "sl-SI-x-icu"), 30001)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "smn-x-icu"), 30011)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "smn-FI-x-icu"), 30021)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "sn-x-icu"), 30031)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "sn-ZW-x-icu"), 30041)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "so-x-icu"), 30051)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "so-DJ-x-icu"), 30061)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "so-ET-x-icu"), 30071)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "so-KE-x-icu"), 30081)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "so-SO-x-icu"), 30091)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "sq-x-icu"), 30101)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "sq-AL-x-icu"), 30111)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "sq-MK-x-icu"), 30121)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "sq-XK-x-icu"), 30131)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "sr-x-icu"), 30141)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "sr-Cyrl-x-icu"), 30151)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "sr-Cyrl-BA-x-icu"), 30161)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "sr-Cyrl-ME-x-icu"), 30171)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "sr-Cyrl-RS-x-icu"), 30181)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "sr-Cyrl-XK-x-icu"), 30191)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "sr-Latn-x-icu"), 30201)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "sr-Latn-BA-x-icu"), 30211)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "sr-Latn-ME-x-icu"), 30221)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "sr-Latn-RS-x-icu"), 30231)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "sr-Latn-XK-x-icu"), 30241)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "su-x-icu"), 30251)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "su-Latn-x-icu"), 30261)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "su-Latn-ID-x-icu"), 30271)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "sv-x-icu"), 30281)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "sv-AX-x-icu"), 30291)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "sv-FI-x-icu"), 30301)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "sv-SE-x-icu"), 30311)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "sw-x-icu"), 30321)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "sw-CD-x-icu"), 30331)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "sw-KE-x-icu"), 30341)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "sw-TZ-x-icu"), 30351)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "sw-UG-x-icu"), 30361)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "ta-x-icu"), 30371)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "ta-IN-x-icu"), 30381)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "ta-LK-x-icu"), 30391)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "ta-MY-x-icu"), 30401)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "ta-SG-x-icu"), 30411)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "te-x-icu"), 30421)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "te-IN-x-icu"), 30431)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "teo-x-icu"), 30441)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "teo-KE-x-icu"), 30451)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "teo-UG-x-icu"), 30461)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "tg-x-icu"), 30471)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "tg-TJ-x-icu"), 30481)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "th-x-icu"), 30491)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "th-TH-x-icu"), 30501)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "ti-x-icu"), 30511)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "ti-ER-x-icu"), 30521)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "ti-ET-x-icu"), 30531)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "tk-x-icu"), 30541)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "tk-TM-x-icu"), 30551)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "to-x-icu"), 30561)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "to-TO-x-icu"), 30571)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "tr-x-icu"), 30581)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "tr-CY-x-icu"), 30591)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "tr-TR-x-icu"), 30601)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "tt-x-icu"), 30611)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "tt-RU-x-icu"), 30621)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "twq-x-icu"), 30631)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "twq-NE-x-icu"), 30641)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "tzm-x-icu"), 30651)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "tzm-MA-x-icu"), 30661)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "ug-x-icu"), 30671)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "ug-CN-x-icu"), 30681)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "uk-x-icu"), 30691)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "uk-UA-x-icu"), 30701)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "ur-x-icu"), 30711)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "ur-IN-x-icu"), 30721)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "ur-PK-x-icu"), 30731)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "uz-x-icu"), 30741)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "uz-Arab-x-icu"), 30751)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "uz-Arab-AF-x-icu"), 30761)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "uz-Cyrl-x-icu"), 30771)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "uz-Cyrl-UZ-x-icu"), 30781)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "uz-Latn-x-icu"), 30791)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "uz-Latn-UZ-x-icu"), 30801)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "vai-x-icu"), 30811)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "vai-Latn-x-icu"), 30821)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "vai-Latn-LR-x-icu"), 30831)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "vai-Vaii-x-icu"), 30841)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "vai-Vaii-LR-x-icu"), 30851)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "vi-x-icu"), 30861)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "vi-VN-x-icu"), 30871)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "vun-x-icu"), 30881)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "vun-TZ-x-icu"), 30891)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "wae-x-icu"), 30901)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "wae-CH-x-icu"), 30911)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "wo-x-icu"), 30921)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "wo-SN-x-icu"), 30931)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "xh-x-icu"), 30941)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "xh-ZA-x-icu"), 30951)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "xog-x-icu"), 30961)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "xog-UG-x-icu"), 30971)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "yav-x-icu"), 30981)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "yav-CM-x-icu"), 30991)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "yi-x-icu"), 31001)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "yi-001-x-icu"), 31011)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "yo-x-icu"), 31021)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "yo-BJ-x-icu"), 31031)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "yo-NG-x-icu"), 31041)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "yue-x-icu"), 31051)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "yue-Hans-x-icu"), 31061)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "yue-Hans-CN-x-icu"), 31071)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "yue-Hant-x-icu"), 31081)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "yue-Hant-HK-x-icu"), 31091)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "zgh-x-icu"), 31101)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "zgh-MA-x-icu"), 31111)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "zh-x-icu"), 31121)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "zh-Hans-x-icu"), 31131)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "zh-Hans-CN-x-icu"), 31141)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "zh-Hans-HK-x-icu"), 31151)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "zh-Hans-MO-x-icu"), 31161)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "zh-Hans-SG-x-icu"), 31171)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "zh-Hant-x-icu"), 31181)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "zh-Hant-HK-x-icu"), 31191)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "zh-Hant-MO-x-icu"), 31201)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "zh-Hant-TW-x-icu"), 31211)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "zu-x-icu"), 31221)
globalCache.setBuiltIn(NewId(Section_Collation, "pg_catalog", "zu-ZA-x-icu"), 31231)
}
+22
View File
@@ -0,0 +1,22 @@
// Copyright 2024 Dolthub, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package id
// This adds all of the built-in databases to the cache.
func init() {
globalCache.setBuiltIn(NewId(Section_Database, "template1"), 1)
globalCache.setBuiltIn(NewId(Section_Database, "template0"), 4)
globalCache.setBuiltIn(NewId(Section_Database, "postgres"), 5)
}
File diff suppressed because it is too large Load Diff
+23
View File
@@ -0,0 +1,23 @@
// Copyright 2024 Dolthub, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package id
// This adds all of the built-in schemas to the cache.
func init() {
globalCache.setBuiltIn(NewId(Section_Namespace, "pg_catalog"), 11)
globalCache.setBuiltIn(NewId(Section_Namespace, "pg_toast"), 99)
globalCache.setBuiltIn(NewId(Section_Namespace, "public"), 2200)
globalCache.setBuiltIn(NewId(Section_Namespace, "information_schema"), 13183)
}
+188
View File
@@ -0,0 +1,188 @@
// Copyright 2024 Dolthub, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package id
import "github.com/lib/pq/oid"
// This adds all of the built-in type IDs to the cache.
func init() {
globalCache.setBuiltIn(NewId(Section_Type, "pg_catalog", "_abstime"), uint32(oid.T__abstime))
globalCache.setBuiltIn(NewId(Section_Type, "pg_catalog", "_aclitem"), uint32(oid.T__aclitem))
globalCache.setBuiltIn(NewId(Section_Type, "pg_catalog", "_bit"), uint32(oid.T__bit))
globalCache.setBuiltIn(NewId(Section_Type, "pg_catalog", "_bool"), uint32(oid.T__bool))
globalCache.setBuiltIn(NewId(Section_Type, "pg_catalog", "_box"), uint32(oid.T__box))
globalCache.setBuiltIn(NewId(Section_Type, "pg_catalog", "_bpchar"), uint32(oid.T__bpchar))
globalCache.setBuiltIn(NewId(Section_Type, "pg_catalog", "_bytea"), uint32(oid.T__bytea))
globalCache.setBuiltIn(NewId(Section_Type, "pg_catalog", "_char"), uint32(oid.T__char))
globalCache.setBuiltIn(NewId(Section_Type, "pg_catalog", "_cid"), uint32(oid.T__cid))
globalCache.setBuiltIn(NewId(Section_Type, "pg_catalog", "_cidr"), uint32(oid.T__cidr))
globalCache.setBuiltIn(NewId(Section_Type, "pg_catalog", "_circle"), uint32(oid.T__circle))
globalCache.setBuiltIn(NewId(Section_Type, "pg_catalog", "_cstring"), uint32(oid.T__cstring))
globalCache.setBuiltIn(NewId(Section_Type, "pg_catalog", "_date"), uint32(oid.T__date))
globalCache.setBuiltIn(NewId(Section_Type, "pg_catalog", "_daterange"), uint32(oid.T__daterange))
globalCache.setBuiltIn(NewId(Section_Type, "pg_catalog", "_float4"), uint32(oid.T__float4))
globalCache.setBuiltIn(NewId(Section_Type, "pg_catalog", "_float8"), uint32(oid.T__float8))
globalCache.setBuiltIn(NewId(Section_Type, "pg_catalog", "_gtsvector"), uint32(oid.T__gtsvector))
globalCache.setBuiltIn(NewId(Section_Type, "pg_catalog", "_inet"), uint32(oid.T__inet))
globalCache.setBuiltIn(NewId(Section_Type, "pg_catalog", "_int2"), uint32(oid.T__int2))
globalCache.setBuiltIn(NewId(Section_Type, "pg_catalog", "_int2vector"), uint32(oid.T__int2vector))
globalCache.setBuiltIn(NewId(Section_Type, "pg_catalog", "_int4"), uint32(oid.T__int4))
globalCache.setBuiltIn(NewId(Section_Type, "pg_catalog", "_int4range"), uint32(oid.T__int4range))
globalCache.setBuiltIn(NewId(Section_Type, "pg_catalog", "_int8"), uint32(oid.T__int8))
globalCache.setBuiltIn(NewId(Section_Type, "pg_catalog", "_int8range"), uint32(oid.T__int8range))
globalCache.setBuiltIn(NewId(Section_Type, "pg_catalog", "_interval"), uint32(oid.T__interval))
globalCache.setBuiltIn(NewId(Section_Type, "pg_catalog", "_json"), uint32(oid.T__json))
globalCache.setBuiltIn(NewId(Section_Type, "pg_catalog", "_jsonb"), uint32(oid.T__jsonb))
globalCache.setBuiltIn(NewId(Section_Type, "pg_catalog", "_line"), uint32(oid.T__line))
globalCache.setBuiltIn(NewId(Section_Type, "pg_catalog", "_lseg"), uint32(oid.T__lseg))
globalCache.setBuiltIn(NewId(Section_Type, "pg_catalog", "_macaddr"), uint32(oid.T__macaddr))
globalCache.setBuiltIn(NewId(Section_Type, "pg_catalog", "_money"), uint32(oid.T__money))
globalCache.setBuiltIn(NewId(Section_Type, "pg_catalog", "_name"), uint32(oid.T__name))
globalCache.setBuiltIn(NewId(Section_Type, "pg_catalog", "_numeric"), uint32(oid.T__numeric))
globalCache.setBuiltIn(NewId(Section_Type, "pg_catalog", "_numrange"), uint32(oid.T__numrange))
globalCache.setBuiltIn(NewId(Section_Type, "pg_catalog", "_oid"), uint32(oid.T__oid))
globalCache.setBuiltIn(NewId(Section_Type, "pg_catalog", "_oidvector"), uint32(oid.T__oidvector))
globalCache.setBuiltIn(NewId(Section_Type, "pg_catalog", "_path"), uint32(oid.T__path))
globalCache.setBuiltIn(NewId(Section_Type, "pg_catalog", "_pg_lsn"), uint32(oid.T__pg_lsn))
globalCache.setBuiltIn(NewId(Section_Type, "pg_catalog", "_point"), uint32(oid.T__point))
globalCache.setBuiltIn(NewId(Section_Type, "pg_catalog", "_polygon"), uint32(oid.T__polygon))
globalCache.setBuiltIn(NewId(Section_Type, "pg_catalog", "_record"), uint32(oid.T__record))
globalCache.setBuiltIn(NewId(Section_Type, "pg_catalog", "_refcursor"), uint32(oid.T__refcursor))
globalCache.setBuiltIn(NewId(Section_Type, "pg_catalog", "_regclass"), uint32(oid.T__regclass))
globalCache.setBuiltIn(NewId(Section_Type, "pg_catalog", "_regconfig"), uint32(oid.T__regconfig))
globalCache.setBuiltIn(NewId(Section_Type, "pg_catalog", "_regdictionary"), uint32(oid.T__regdictionary))
globalCache.setBuiltIn(NewId(Section_Type, "pg_catalog", "_regnamespace"), uint32(oid.T__regnamespace))
globalCache.setBuiltIn(NewId(Section_Type, "pg_catalog", "_regoper"), uint32(oid.T__regoper))
globalCache.setBuiltIn(NewId(Section_Type, "pg_catalog", "_regoperator"), uint32(oid.T__regoperator))
globalCache.setBuiltIn(NewId(Section_Type, "pg_catalog", "_regproc"), uint32(oid.T__regproc))
globalCache.setBuiltIn(NewId(Section_Type, "pg_catalog", "_regprocedure"), uint32(oid.T__regprocedure))
globalCache.setBuiltIn(NewId(Section_Type, "pg_catalog", "_regrole"), uint32(oid.T__regrole))
globalCache.setBuiltIn(NewId(Section_Type, "pg_catalog", "_regtype"), uint32(oid.T__regtype))
globalCache.setBuiltIn(NewId(Section_Type, "pg_catalog", "_reltime"), uint32(oid.T__reltime))
globalCache.setBuiltIn(NewId(Section_Type, "pg_catalog", "_text"), uint32(oid.T__text))
globalCache.setBuiltIn(NewId(Section_Type, "pg_catalog", "_tid"), uint32(oid.T__tid))
globalCache.setBuiltIn(NewId(Section_Type, "pg_catalog", "_time"), uint32(oid.T__time))
globalCache.setBuiltIn(NewId(Section_Type, "pg_catalog", "_timestamp"), uint32(oid.T__timestamp))
globalCache.setBuiltIn(NewId(Section_Type, "pg_catalog", "_timestamptz"), uint32(oid.T__timestamptz))
globalCache.setBuiltIn(NewId(Section_Type, "pg_catalog", "_timetz"), uint32(oid.T__timetz))
globalCache.setBuiltIn(NewId(Section_Type, "pg_catalog", "_tinterval"), uint32(oid.T__tinterval))
globalCache.setBuiltIn(NewId(Section_Type, "pg_catalog", "_tsquery"), uint32(oid.T__tsquery))
globalCache.setBuiltIn(NewId(Section_Type, "pg_catalog", "_tsrange"), uint32(oid.T__tsrange))
globalCache.setBuiltIn(NewId(Section_Type, "pg_catalog", "_tstzrange"), uint32(oid.T__tstzrange))
globalCache.setBuiltIn(NewId(Section_Type, "pg_catalog", "_tsvector"), uint32(oid.T__tsvector))
globalCache.setBuiltIn(NewId(Section_Type, "pg_catalog", "_txid_snapshot"), uint32(oid.T__txid_snapshot))
globalCache.setBuiltIn(NewId(Section_Type, "pg_catalog", "_uuid"), uint32(oid.T__uuid))
globalCache.setBuiltIn(NewId(Section_Type, "pg_catalog", "_varbit"), uint32(oid.T__varbit))
globalCache.setBuiltIn(NewId(Section_Type, "pg_catalog", "_varchar"), uint32(oid.T__varchar))
globalCache.setBuiltIn(NewId(Section_Type, "pg_catalog", "_xid"), uint32(oid.T__xid))
globalCache.setBuiltIn(NewId(Section_Type, "pg_catalog", "_xml"), uint32(oid.T__xml))
globalCache.setBuiltIn(NewId(Section_Type, "pg_catalog", "abstime"), uint32(oid.T_abstime))
globalCache.setBuiltIn(NewId(Section_Type, "pg_catalog", "aclitem"), uint32(oid.T_aclitem))
globalCache.setBuiltIn(NewId(Section_Type, "pg_catalog", "any"), uint32(oid.T_any))
globalCache.setBuiltIn(NewId(Section_Type, "pg_catalog", "anyarray"), uint32(oid.T_anyarray))
globalCache.setBuiltIn(NewId(Section_Type, "pg_catalog", "anyelement"), uint32(oid.T_anyelement))
globalCache.setBuiltIn(NewId(Section_Type, "pg_catalog", "anyenum"), uint32(oid.T_anyenum))
globalCache.setBuiltIn(NewId(Section_Type, "pg_catalog", "anynonarray"), uint32(oid.T_anynonarray))
globalCache.setBuiltIn(NewId(Section_Type, "pg_catalog", "anyrange"), uint32(oid.T_anyrange))
globalCache.setBuiltIn(NewId(Section_Type, "pg_catalog", "bit"), uint32(oid.T_bit))
globalCache.setBuiltIn(NewId(Section_Type, "pg_catalog", "bool"), uint32(oid.T_bool))
globalCache.setBuiltIn(NewId(Section_Type, "pg_catalog", "box"), uint32(oid.T_box))
globalCache.setBuiltIn(NewId(Section_Type, "pg_catalog", "bpchar"), uint32(oid.T_bpchar))
globalCache.setBuiltIn(NewId(Section_Type, "pg_catalog", "bytea"), uint32(oid.T_bytea))
globalCache.setBuiltIn(NewId(Section_Type, "pg_catalog", "char"), uint32(oid.T_char))
globalCache.setBuiltIn(NewId(Section_Type, "pg_catalog", "cid"), uint32(oid.T_cid))
globalCache.setBuiltIn(NewId(Section_Type, "pg_catalog", "cidr"), uint32(oid.T_cidr))
globalCache.setBuiltIn(NewId(Section_Type, "pg_catalog", "circle"), uint32(oid.T_circle))
globalCache.setBuiltIn(NewId(Section_Type, "pg_catalog", "cstring"), uint32(oid.T_cstring))
globalCache.setBuiltIn(NewId(Section_Type, "pg_catalog", "date"), uint32(oid.T_date))
globalCache.setBuiltIn(NewId(Section_Type, "pg_catalog", "daterange"), uint32(oid.T_daterange))
globalCache.setBuiltIn(NewId(Section_Type, "pg_catalog", "event_trigger"), uint32(oid.T_event_trigger))
globalCache.setBuiltIn(NewId(Section_Type, "pg_catalog", "fdw_handler"), uint32(oid.T_fdw_handler))
globalCache.setBuiltIn(NewId(Section_Type, "pg_catalog", "float4"), uint32(oid.T_float4))
globalCache.setBuiltIn(NewId(Section_Type, "pg_catalog", "float8"), uint32(oid.T_float8))
globalCache.setBuiltIn(NewId(Section_Type, "pg_catalog", "gtsvector"), uint32(oid.T_gtsvector))
globalCache.setBuiltIn(NewId(Section_Type, "pg_catalog", "index_am_handler"), uint32(oid.T_index_am_handler))
globalCache.setBuiltIn(NewId(Section_Type, "pg_catalog", "inet"), uint32(oid.T_inet))
globalCache.setBuiltIn(NewId(Section_Type, "pg_catalog", "int2"), uint32(oid.T_int2))
globalCache.setBuiltIn(NewId(Section_Type, "pg_catalog", "int2vector"), uint32(oid.T_int2vector))
globalCache.setBuiltIn(NewId(Section_Type, "pg_catalog", "int4"), uint32(oid.T_int4))
globalCache.setBuiltIn(NewId(Section_Type, "pg_catalog", "int4range"), uint32(oid.T_int4range))
globalCache.setBuiltIn(NewId(Section_Type, "pg_catalog", "int8"), uint32(oid.T_int8))
globalCache.setBuiltIn(NewId(Section_Type, "pg_catalog", "int8range"), uint32(oid.T_int8range))
globalCache.setBuiltIn(NewId(Section_Type, "pg_catalog", "internal"), uint32(oid.T_internal))
globalCache.setBuiltIn(NewId(Section_Type, "pg_catalog", "interval"), uint32(oid.T_interval))
globalCache.setBuiltIn(NewId(Section_Type, "pg_catalog", "json"), uint32(oid.T_json))
globalCache.setBuiltIn(NewId(Section_Type, "pg_catalog", "jsonb"), uint32(oid.T_jsonb))
globalCache.setBuiltIn(NewId(Section_Type, "pg_catalog", "language_handler"), uint32(oid.T_language_handler))
globalCache.setBuiltIn(NewId(Section_Type, "pg_catalog", "line"), uint32(oid.T_line))
globalCache.setBuiltIn(NewId(Section_Type, "pg_catalog", "lseg"), uint32(oid.T_lseg))
globalCache.setBuiltIn(NewId(Section_Type, "pg_catalog", "macaddr"), uint32(oid.T_macaddr))
globalCache.setBuiltIn(NewId(Section_Type, "pg_catalog", "money"), uint32(oid.T_money))
globalCache.setBuiltIn(NewId(Section_Type, "pg_catalog", "name"), uint32(oid.T_name))
globalCache.setBuiltIn(NewId(Section_Type, "pg_catalog", "numeric"), uint32(oid.T_numeric))
globalCache.setBuiltIn(NewId(Section_Type, "pg_catalog", "numrange"), uint32(oid.T_numrange))
globalCache.setBuiltIn(NewId(Section_Type, "pg_catalog", "oid"), uint32(oid.T_oid))
globalCache.setBuiltIn(NewId(Section_Type, "pg_catalog", "oidvector"), uint32(oid.T_oidvector))
globalCache.setBuiltIn(NewId(Section_Type, "pg_catalog", "opaque"), uint32(oid.T_opaque))
globalCache.setBuiltIn(NewId(Section_Type, "pg_catalog", "path"), uint32(oid.T_path))
globalCache.setBuiltIn(NewId(Section_Type, "pg_catalog", "pg_attribute"), uint32(oid.T_pg_attribute))
globalCache.setBuiltIn(NewId(Section_Type, "pg_catalog", "pg_auth_members"), uint32(oid.T_pg_auth_members))
globalCache.setBuiltIn(NewId(Section_Type, "pg_catalog", "pg_authid"), uint32(oid.T_pg_authid))
globalCache.setBuiltIn(NewId(Section_Type, "pg_catalog", "pg_class"), uint32(oid.T_pg_class))
globalCache.setBuiltIn(NewId(Section_Type, "pg_catalog", "pg_database"), uint32(oid.T_pg_database))
globalCache.setBuiltIn(NewId(Section_Type, "pg_catalog", "pg_ddl_command"), uint32(oid.T_pg_ddl_command))
globalCache.setBuiltIn(NewId(Section_Type, "pg_catalog", "pg_lsn"), uint32(oid.T_pg_lsn))
globalCache.setBuiltIn(NewId(Section_Type, "pg_catalog", "pg_node_tree"), uint32(oid.T_pg_node_tree))
globalCache.setBuiltIn(NewId(Section_Type, "pg_catalog", "pg_proc"), uint32(oid.T_pg_proc))
globalCache.setBuiltIn(NewId(Section_Type, "pg_catalog", "pg_shseclabel"), uint32(oid.T_pg_shseclabel))
globalCache.setBuiltIn(NewId(Section_Type, "pg_catalog", "pg_type"), uint32(oid.T_pg_type))
globalCache.setBuiltIn(NewId(Section_Type, "pg_catalog", "point"), uint32(oid.T_point))
globalCache.setBuiltIn(NewId(Section_Type, "pg_catalog", "polygon"), uint32(oid.T_polygon))
globalCache.setBuiltIn(NewId(Section_Type, "pg_catalog", "record"), uint32(oid.T_record))
globalCache.setBuiltIn(NewId(Section_Type, "pg_catalog", "refcursor"), uint32(oid.T_refcursor))
globalCache.setBuiltIn(NewId(Section_Type, "pg_catalog", "regclass"), uint32(oid.T_regclass))
globalCache.setBuiltIn(NewId(Section_Type, "pg_catalog", "regconfig"), uint32(oid.T_regconfig))
globalCache.setBuiltIn(NewId(Section_Type, "pg_catalog", "regdictionary"), uint32(oid.T_regdictionary))
globalCache.setBuiltIn(NewId(Section_Type, "pg_catalog", "regnamespace"), uint32(oid.T_regnamespace))
globalCache.setBuiltIn(NewId(Section_Type, "pg_catalog", "regoper"), uint32(oid.T_regoper))
globalCache.setBuiltIn(NewId(Section_Type, "pg_catalog", "regoperator"), uint32(oid.T_regoperator))
globalCache.setBuiltIn(NewId(Section_Type, "pg_catalog", "regproc"), uint32(oid.T_regproc))
globalCache.setBuiltIn(NewId(Section_Type, "pg_catalog", "regprocedure"), uint32(oid.T_regprocedure))
globalCache.setBuiltIn(NewId(Section_Type, "pg_catalog", "regrole"), uint32(oid.T_regrole))
globalCache.setBuiltIn(NewId(Section_Type, "pg_catalog", "regtype"), uint32(oid.T_regtype))
globalCache.setBuiltIn(NewId(Section_Type, "pg_catalog", "reltime"), uint32(oid.T_reltime))
globalCache.setBuiltIn(NewId(Section_Type, "pg_catalog", "smgr"), uint32(oid.T_smgr))
globalCache.setBuiltIn(NewId(Section_Type, "pg_catalog", "text"), uint32(oid.T_text))
globalCache.setBuiltIn(NewId(Section_Type, "pg_catalog", "tid"), uint32(oid.T_tid))
globalCache.setBuiltIn(NewId(Section_Type, "pg_catalog", "time"), uint32(oid.T_time))
globalCache.setBuiltIn(NewId(Section_Type, "pg_catalog", "timestamp"), uint32(oid.T_timestamp))
globalCache.setBuiltIn(NewId(Section_Type, "pg_catalog", "timestamptz"), uint32(oid.T_timestamptz))
globalCache.setBuiltIn(NewId(Section_Type, "pg_catalog", "timetz"), uint32(oid.T_timetz))
globalCache.setBuiltIn(NewId(Section_Type, "pg_catalog", "tinterval"), uint32(oid.T_tinterval))
globalCache.setBuiltIn(NewId(Section_Type, "pg_catalog", "trigger"), uint32(oid.T_trigger))
globalCache.setBuiltIn(NewId(Section_Type, "pg_catalog", "tsm_handler"), uint32(oid.T_tsm_handler))
globalCache.setBuiltIn(NewId(Section_Type, "pg_catalog", "tsquery"), uint32(oid.T_tsquery))
globalCache.setBuiltIn(NewId(Section_Type, "pg_catalog", "tsrange"), uint32(oid.T_tsrange))
globalCache.setBuiltIn(NewId(Section_Type, "pg_catalog", "tstzrange"), uint32(oid.T_tstzrange))
globalCache.setBuiltIn(NewId(Section_Type, "pg_catalog", "tsvector"), uint32(oid.T_tsvector))
globalCache.setBuiltIn(NewId(Section_Type, "pg_catalog", "txid_snapshot"), uint32(oid.T_txid_snapshot))
globalCache.setBuiltIn(NewId(Section_Type, "pg_catalog", "unknown"), uint32(oid.T_unknown))
globalCache.setBuiltIn(NewId(Section_Type, "pg_catalog", "uuid"), uint32(oid.T_uuid))
globalCache.setBuiltIn(NewId(Section_Type, "pg_catalog", "varbit"), uint32(oid.T_varbit))
globalCache.setBuiltIn(NewId(Section_Type, "pg_catalog", "varchar"), uint32(oid.T_varchar))
globalCache.setBuiltIn(NewId(Section_Type, "pg_catalog", "void"), uint32(oid.T_void))
globalCache.setBuiltIn(NewId(Section_Type, "pg_catalog", "xid"), uint32(oid.T_xid))
globalCache.setBuiltIn(NewId(Section_Type, "pg_catalog", "xml"), uint32(oid.T_xml))
}
+260
View File
@@ -0,0 +1,260 @@
// Copyright 2024 Dolthub, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package id
import (
"bytes"
"fmt"
"strings"
"unsafe"
)
// Id uses one of two formats. Which format is being used is marked by the upper Section bit being either 0 or 1.
// Often, an ID contains information that will commonly be accessed by the item, so the first format is tailored for
// efficient retrieval of specific segments. If an item is larger than the size limit (255, size is stored as an uint8),
// then we use the second format, which inserts a separator between items. This allows Id to hold any data in case
// the need arises in the future, but in practice we'll only see the first format (since data will usually be
// identifiers or smaller embedded IDs). Id IDs will be accessed far more often than they'll be created, hence the
// focus on efficient retrieval rather than simplicity of storage.
//
// First format (upper bit is 0):
// The first byte is the section
// The second byte contains the number of segments N (up to 255 segments)
// The next N bytes contain the length of each respective segment (up to 255 bytes)
// The remaining bytes are the original string data, stored contiguously
// Second format (upper bit is 1):
// The first byte is the section
// The remaining bytes are the original string data, stored with the separator between each segment
const (
// idSeparator marks the different data sections in an Id. This is the null byte since that byte is invalid in
// all identifiers, so we can guarantee that it's safe to use as a separator. This is used when an individual data
// segment is larger than 254 bytes.
idSeparator = "\x00"
// formatMask is the upper bit that determines whether we're using the first or second format.
formatMask = uint8(0x80)
// Null is an empty, invalid ID.
Null Id = ""
// NullAccessMethod is an empty, invalid ID. This is exactly equivalent to Null.
NullAccessMethod AccessMethod = ""
// NullCast is an empty, invalid ID. This is exactly equivalent to Null.
NullCast Cast = ""
// NullCheck is an empty, invalid ID. This is exactly equivalent to Null.
NullCheck Check = ""
// NullCollation is an empty, invalid ID. This is exactly equivalent to Null.
NullCollation Collation = ""
// NullColumnDefault is an empty, invalid ID. This is exactly equivalent to Null.
NullColumnDefault ColumnDefault = ""
// NullDatabase is an empty, invalid ID. This is exactly equivalent to Null.
NullDatabase Database = ""
// NullEnumLabel is an empty, invalid ID. This is exactly equivalent to Null.
NullEnumLabel EnumLabel = ""
// NullExtension is an empty, invalid ID. This is exactly equivalent to Null.
NullExtension Extension = ""
// NullForeignKey is an empty, invalid ID. This is exactly equivalent to Null.
NullForeignKey ForeignKey = ""
// NullFunction is an empty, invalid ID. This is exactly equivalent to Null.
NullFunction Function = ""
// NullIndex is an empty, invalid ID. This is exactly equivalent to Null.
NullIndex Index = ""
// NullNamespace is an empty, invalid ID. This is exactly equivalent to Null.
NullNamespace Namespace = ""
// NullProcedure is an empty, invalid ID. This is exactly equivalent to Null.
NullProcedure Procedure = ""
// NullSequence is an empty, invalid ID. This is exactly equivalent to Null.
NullSequence Sequence = ""
// NullTable is an empty, invalid ID. This is exactly equivalent to Null.
NullTable Table = ""
// NullTrigger is an empty, invalid ID. This is exactly equivalent to Null.
NullTrigger Trigger = ""
// NullType is an empty, invalid ID. This is exactly equivalent to Null.
NullType Type = ""
// NullView is an empty, invalid ID. This is exactly equivalent to Null.
NullView View = ""
)
// Id is an ID that is used within Doltgres. This ID is never exposed to clients through any normal means, and
// exists solely for internal operations to be able to identify specific items. This functions as an internal
// replacement for Postgres' OIDs.
type Id string
// NewId constructs an Id using the given section and data. In general, you should prefer to use the `NewIDTYPE` that
// matches the Section that's being created, and then convert that to an Id for returning or storage. You almost never
// want to call this function directly.
func NewId(section Section, data ...string) Id {
if section == Section_Null {
// It's easier if there's only one canonical way to represent a null ID, so we'll return our constant instead of
// creating a new string
return Null
}
if len(data) > 255 {
return newIdSecondFormat(section, data)
}
buf := bytes.Buffer{}
buf.WriteByte(uint8(section))
buf.WriteByte(uint8(len(data)))
for _, segment := range data {
segmentLength := len(segment)
if segmentLength > 255 {
return newIdSecondFormat(section, data)
}
buf.WriteByte(uint8(segmentLength))
}
for _, segment := range data {
buf.WriteString(segment)
}
return Id(buf.Bytes())
}
// newIdSecondFormat constructs an Id using the given section and data. This always returns the second format (using the
// separator).
func newIdSecondFormat(section Section, data []string) Id {
buf := bytes.Buffer{}
buf.WriteByte(uint8(section) | formatMask)
for i, segment := range data {
if i > 0 {
buf.WriteString(idSeparator)
}
buf.WriteString(segment)
}
return Id(buf.Bytes())
}
// IsValid returns whether the Id is valid.
func (id Id) IsValid() bool {
// We don't allow setting the section to Section_Null, so we can do a simple length check
return len(id) > 0
}
// Section returns the Section for this Id.
func (id Id) Section() Section {
if len(id) == 0 {
return Section_Null
}
return Section(id[0] & (^formatMask))
}
// Data returns the original data used to create this Id.
func (id Id) Data() []string {
if len(id) <= 1 {
return nil
}
if id[0]&formatMask == formatMask {
// Second format
return strings.Split(string(id[1:]), idSeparator)
} else {
// First format
segmentCount := int(id[1])
data := id[2+segmentCount:] // We skip 2 for the section and count bytes, then the number of segment counts
segments := make([]string, segmentCount)
start := 0
for i := 0; i < segmentCount; i++ {
length := int(id[2+i])
segments[i] = string(data[start : start+length])
start += length
}
return segments
}
}
// SegmentCount returns the number of segments that were in the original data.
func (id Id) SegmentCount() int {
if len(id) <= 1 {
return 0
}
if id[0]&formatMask == formatMask {
// Second format
return len(id.Data())
} else {
// First format
return int(id[1])
}
}
// Segment returns the segment from the given index. An empty string is returned for an index not contained by the ID.
func (id Id) Segment(index int) string {
if index < 0 || len(id) <= 1 {
return ""
}
if id[0]&formatMask == formatMask {
// Second format
data := id.Data()
if index >= len(data) {
return ""
}
return data[index]
} else {
// First format
segmentCount := int(id[1])
data := id[2+segmentCount:] // We skip 2 for the section and count bytes, then the number of segment counts
if index >= segmentCount {
return ""
}
start := 0
currentLength := 0
for i := 0; i <= index; i++ {
start += currentLength
currentLength = int(id[2+i])
}
return string(data[start : start+currentLength])
}
}
// String returns a display-suitable version of the ID. Although the ID is implemented as a string, it should not be
// treated as a string except for the purposes of storage and retrieval.
func (id Id) String() string {
data := id.Data()
if len(data) == 0 {
return fmt.Sprintf(`{%s:[]}`, id.Section().String())
}
return fmt.Sprintf(`{%s:["%s"]}`, id.Section().String(), strings.Join(data, `","`))
}
// CaseString returns a quoted string that may be used to represent this ID in a switch-case.
func (id Id) CaseString() string {
if len(id) == 0 {
return `""`
}
if id[0]&formatMask == formatMask {
// Second format
data := strings.ReplaceAll(string(id[1:]), "\x00", `\x00`)
data = strings.ReplaceAll(data, `"`, `\x22`)
return fmt.Sprintf(`"\x%02x%s"`, id[0], data)
} else {
// First format
sb := strings.Builder{}
sb.Grow(len(id) + 32)
sb.WriteRune('"')
count := int(id[1])
sb.WriteString(fmt.Sprintf(`\x%02x\x%02x`, id[0], count))
for i := 0; i < count; i++ {
sb.WriteString(fmt.Sprintf(`\x%02x`, id[2+i]))
}
sb.WriteString(strings.ReplaceAll(string(id[2+count:]), `"`, `\x22`))
sb.WriteRune('"')
return sb.String()
}
}
// UnderlyingBytes returns the underlying bytes for the ID. These must not be modified, as this is intended solely for
// efficient usage of operations that require byte slices.
func (id Id) UnderlyingBytes() []byte {
return unsafe.Slice(unsafe.StringData(string(id)), len(id))
}
// usesSecondFormat returns whether the separator is used, which is the second format.
func (id Id) usesSecondFormat() bool {
return len(id) > 0 && id[0]&formatMask == formatMask
}
+61
View File
@@ -0,0 +1,61 @@
// Copyright 2024 Dolthub, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package id
import (
"fmt"
"testing"
"github.com/stretchr/testify/require"
)
const longString1 = `
0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789
0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789
0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789
0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789
0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789`
func TestInternal(t *testing.T) {
tests := []struct {
section Section
data []string
}{
{Section_Table, []string{"exampleschema", "exampletable"}},
{Section_Table, []string{"random$string", longString1, "bogus_data"}},
{Section_Type, []string{`best "type" ever`, "worst type ever?"}},
}
for testIdx, test := range tests {
t.Run(fmt.Sprintf("%d", testIdx), func(t *testing.T) {
id := NewId(test.section, test.data...)
for {
require.True(t, id.IsValid())
require.Equal(t, test.section, id.Section())
data := id.Data()
require.Len(t, data, len(test.data))
for i := range data {
require.Equal(t, test.data[i], data[i])
require.Equal(t, test.data[i], id.Segment(i))
}
// If this is using the first format, then we'll rerun the test using a variant forced to the second format
if !id.usesSecondFormat() {
id = newIdSecondFormat(test.section, test.data)
continue
}
break
}
})
}
}
+587
View File
@@ -0,0 +1,587 @@
// Copyright 2025 Dolthub, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package id
import (
"fmt"
"strconv"
"strings"
)
// AccessMethod is an Id wrapper for access methods. This wrapper must not be returned to the client.
type AccessMethod Id
// Cast is an Id wrapper for casts. This wrapper must not be returned to the client.
type Cast Id
// Check is an Id wrapper for checks. This wrapper must not be returned to the client.
type Check Id
// Collation is an Id wrapper for collations. This wrapper must not be returned to the client.
type Collation Id
// ColumnDefault is an Id wrapper for column defaults. This wrapper must not be returned to the client.
type ColumnDefault Id
// Database is an Id wrapper for databases. This wrapper must not be returned to the client.
type Database Id
// EnumLabel is an Id wrapper for enum labels. This wrapper must not be returned to the client.
type EnumLabel Id
// Extension is an Id wrapper for extensions. This wrapper must not be returned to the client.
type Extension Id
// ForeignKey is an Id wrapper for foreign keys. This wrapper must not be returned to the client.
type ForeignKey Id
// Function is an Id wrapper for functions. This wrapper must not be returned to the client.
type Function Id
// Index is an Id wrapper for indexes. This wrapper must not be returned to the client.
type Index Id
// Namespace is an Id wrapper for schemas/namespaces. This wrapper must not be returned to the client.
type Namespace Id
// Oid is an Id wrapper for OIDs. This wrapper must not be returned to the client.
type Oid Id
// Procedure is an Id wrapper for procedures. This wrapper must not be returned to the client.
type Procedure Id
// Sequence is an Id wrapper for sequences. This wrapper must not be returned to the client.
type Sequence Id
// Table is an Id wrapper for tables. This wrapper must not be returned to the client.
type Table Id
// Trigger is an Id wrapper for triggers. This wrapper must not be returned to the client.
type Trigger Id
// Type is an Id wrapper for types. This wrapper must not be returned to the client.
type Type Id
// View is an Id wrapper for views. This wrapper must not be returned to the client.
type View Id
// NewAccessMethod returns a new AccessMethod. This wrapper must not be returned to the client.
func NewAccessMethod(methodName string) AccessMethod {
if len(methodName) == 0 {
return NullAccessMethod
}
return AccessMethod(NewId(Section_AccessMethod, methodName))
}
// NewCast returns a new Cast. This wrapper must not be returned to the client.
func NewCast(sourceType Type, targetType Type) Cast {
if len(sourceType) == 0 && len(targetType) == 0 {
return NullCast
}
return Cast(NewId(Section_Cast, string(sourceType), string(targetType)))
}
// NewCheck returns a new Check. This wrapper must not be returned to the client.
func NewCheck(schemaName string, tableName string, checkName string) Check {
if len(schemaName) == 0 && len(tableName) == 0 && len(checkName) == 0 {
return NullCheck
}
return Check(NewId(Section_Check, schemaName, tableName, checkName))
}
// NewCollation returns a new Collation. This wrapper must not be returned to the client.
func NewCollation(schemaName string, collationName string) Collation {
if len(schemaName) == 0 && len(collationName) == 0 {
return NullCollation
}
return Collation(NewId(Section_Collation, schemaName, collationName))
}
// NewColumnDefault returns a new ColumnDefault. This wrapper must not be returned to the client.
func NewColumnDefault(schemaName string, tableName string, columnName string) ColumnDefault {
if len(schemaName) == 0 && len(tableName) == 0 && len(columnName) == 0 {
return NullColumnDefault
}
return ColumnDefault(NewId(Section_ColumnDefault, schemaName, tableName, columnName))
}
// NewDatabase returns a new Database. This wrapper must not be returned to the client.
func NewDatabase(dbName string) Database {
if len(dbName) == 0 {
return NullDatabase
}
return Database(NewId(Section_Database, dbName))
}
// NewEnumLabel returns a new EnumLabel. This wrapper must not be returned to the client.
func NewEnumLabel(parent Type, label string) EnumLabel {
if len(parent) == 0 && len(label) == 0 {
return NullEnumLabel
}
return EnumLabel(NewId(Section_EnumLabel, string(parent), label))
}
// NewExtension returns a new Extension. This wrapper must not be returned to the client.
func NewExtension(name string) Extension {
if len(name) == 0 {
return NullExtension
}
return Extension(NewId(Section_Extension, name))
}
// NewForeignKey returns a new ForeignKey. This wrapper must not be returned to the client.
func NewForeignKey(schemaName string, tableName string, fkName string) ForeignKey {
if len(schemaName) == 0 && len(tableName) == 0 && len(fkName) == 0 {
return NullForeignKey
}
return ForeignKey(NewId(Section_ForeignKey, schemaName, tableName, fkName))
}
// NewFunction returns a new Function. This wrapper must not be returned to the client.
func NewFunction(schemaName string, funcName string, params ...Type) Function {
if len(schemaName) == 0 && len(funcName) == 0 && len(params) == 0 {
return NullFunction
}
data := make([]string, len(params)+2)
data[0] = schemaName
data[1] = funcName
for i := range params {
data[2+i] = string(params[i])
}
return Function(NewId(Section_Function, data...))
}
// NewIndex returns a new Index. This wrapper must not be returned to the client.
func NewIndex(schemaName string, tableName string, indexName string) Index {
if len(schemaName) == 0 && len(tableName) == 0 && len(indexName) == 0 {
return NullIndex
}
return Index(NewId(Section_Index, schemaName, tableName, indexName))
}
// NewNamespace returns a new Namespace. This wrapper must not be returned to the client.
func NewNamespace(schemaName string) Namespace {
if len(schemaName) == 0 {
return NullNamespace
}
return Namespace(NewId(Section_Namespace, schemaName))
}
// NewOID returns a new Oid. This wrapper must not be returned to the client.
func NewOID(val uint32) Oid {
return Oid(NewId(Section_OID, strconv.FormatUint(uint64(val), 10)))
}
// NewProcedure returns a new Procedure. This wrapper must not be returned to the client.
func NewProcedure(schemaName string, procName string, params ...Type) Procedure {
if len(schemaName) == 0 && len(procName) == 0 && len(params) == 0 {
return NullProcedure
}
data := make([]string, len(params)+2)
data[0] = schemaName
data[1] = procName
for i := range params {
data[2+i] = string(params[i])
}
return Procedure(NewId(Section_Procedure, data...))
}
// NewSequence returns a new Sequence. This wrapper must not be returned to the client.
func NewSequence(schemaName string, sequenceName string) Sequence {
if len(schemaName) == 0 && len(sequenceName) == 0 {
return NullSequence
}
return Sequence(NewId(Section_Sequence, schemaName, sequenceName))
}
// NewTable returns a new Table. This wrapper must not be returned to the client.
func NewTable(schemaName string, tableName string) Table {
if len(schemaName) == 0 && len(tableName) == 0 {
return NullTable
}
return Table(NewId(Section_Table, schemaName, tableName))
}
// NewTrigger returns a new Trigger. This wrapper must not be returned to the client.
func NewTrigger(schemaName string, tableName string, triggerName string) Trigger {
if len(schemaName) == 0 && len(tableName) == 0 && len(triggerName) == 0 {
return NullTrigger
}
return Trigger(NewId(Section_Trigger, schemaName, tableName, triggerName))
}
// NewType returns a new Type. This wrapper must not be returned to the client.
func NewType(schemaName string, typeName string) Type {
if len(schemaName) == 0 && len(typeName) == 0 {
return NullType
}
return Type(NewId(Section_Type, schemaName, typeName))
}
// NewView returns a new View. This wrapper must not be returned to the client.
func NewView(schemaName string, viewName string) View {
if len(schemaName) == 0 && len(viewName) == 0 {
return NullView
}
return View(NewId(Section_View, schemaName, viewName))
}
// MethodName returns the method's name.
func (id AccessMethod) MethodName() string {
return Id(id).Segment(0)
}
// SourceType returns the source type.
func (id Cast) SourceType() Type {
return Type(Id(id).Segment(0))
}
// TargetType returns the target type.
func (id Cast) TargetType() Type {
return Type(Id(id).Segment(1))
}
// CheckName returns the check's name.
func (id Check) CheckName() string {
return Id(id).Segment(2)
}
// SchemaName returns the schema name of the check.
func (id Check) SchemaName() string {
return Id(id).Segment(0)
}
// TableName returns the name of the table that the check belongs to.
func (id Check) TableName() string {
return Id(id).Segment(1)
}
// CollationName returns the collation's name.
func (id Collation) CollationName() string {
return Id(id).Segment(1)
}
// SchemaName returns the schema name of the collation.
func (id Collation) SchemaName() string {
return Id(id).Segment(0)
}
// ColumnName returns the column's name that the default belongs to.
func (id ColumnDefault) ColumnName() string {
return Id(id).Segment(2)
}
// SchemaName returns the schema name of the column default.
func (id ColumnDefault) SchemaName() string {
return Id(id).Segment(0)
}
// TableName returns the name of the table that the column belongs to.
func (id ColumnDefault) TableName() string {
return Id(id).Segment(1)
}
// DatabaseName returns the database's name.
func (id Database) DatabaseName() string {
return Id(id).Segment(0)
}
// Parent returns the parent ENUM for the label.
func (id EnumLabel) Parent() Type {
return Type(Id(id).Segment(0))
}
// Label returns the name of the label.
func (id EnumLabel) Label() string {
return Id(id).Segment(1)
}
// Name returns the name of the extension.
func (id Extension) Name() string {
return Id(id).Segment(0)
}
// ForeignKeyName returns the foreign key's name.
func (id ForeignKey) ForeignKeyName() string {
return Id(id).Segment(2)
}
// SchemaName returns the schema name of the foreign key.
func (id ForeignKey) SchemaName() string {
return Id(id).Segment(0)
}
// TableName returns the name of the table that the foreign key belongs to.
func (id ForeignKey) TableName() string {
return Id(id).Segment(1)
}
// DisplayString returns the function ID as a suitable display name.
// For example, the output will generally look like: "func_name(param1, param2)"
func (id Function) DisplayString() string {
if !id.IsValid() {
return ""
}
params := make([]string, id.ParameterCount())
for i, paramID := range id.Parameters() {
params[i] = paramID.TypeName()
}
return fmt.Sprintf("%s(%s)", id.FunctionName(), strings.Join(params, ", "))
}
// FunctionName returns the function's name.
func (id Function) FunctionName() string {
return Id(id).Segment(1)
}
// Parameters returns the function's name.
func (id Function) Parameters() []Type {
data := Id(id).Data()[2:]
params := make([]Type, len(data))
for i := range data {
params[i] = Type(data[i])
}
return params
}
// ParameterCount returns the function's name.
func (id Function) ParameterCount() int {
return Id(id).SegmentCount() - 2
}
// SchemaName returns the schema name of the function.
func (id Function) SchemaName() string {
return Id(id).Segment(0)
}
// IndexName returns the index's name.
func (id Index) IndexName() string {
return Id(id).Segment(2)
}
// SchemaName returns the schema name of the index.
func (id Index) SchemaName() string {
return Id(id).Segment(0)
}
// TableName returns the name of the table that the index belongs to.
func (id Index) TableName() string {
return Id(id).Segment(1)
}
// SchemaName returns the schema name.
func (id Namespace) SchemaName() string {
return Id(id).Segment(0)
}
// OID returns the contained uint32 value.
func (id Oid) OID() uint32 {
val, _ := strconv.ParseUint(Id(id).Segment(0), 10, 32)
return uint32(val)
}
// ProcedureName returns the procedure's name.
func (id Procedure) ProcedureName() string {
return Id(id).Segment(1)
}
// Parameters returns the procedure's parameters.
func (id Procedure) Parameters() []Type {
data := Id(id).Data()[2:]
params := make([]Type, len(data))
for i := range data {
params[i] = Type(data[i])
}
return params
}
// ParameterCount returns the procedure's parameter count.
func (id Procedure) ParameterCount() int {
return Id(id).SegmentCount() - 2
}
// SchemaName returns the schema name of the procedure.
func (id Procedure) SchemaName() string {
return Id(id).Segment(0)
}
// SchemaName returns the schema name of the sequence.
func (id Sequence) SchemaName() string {
return Id(id).Segment(0)
}
// SequenceName returns the name of the sequence.
func (id Sequence) SequenceName() string {
return Id(id).Segment(1)
}
// SchemaName returns the schema name of the table.
func (id Table) SchemaName() string {
return Id(id).Segment(0)
}
// TableName returns the table's name.
func (id Table) TableName() string {
return Id(id).Segment(1)
}
// SchemaName returns the schema name of the trigger.
func (id Trigger) SchemaName() string {
return Id(id).Segment(0)
}
// TableName returns the name of the table that the trigger belongs to.
func (id Trigger) TableName() string {
return Id(id).Segment(1)
}
// TriggerName returns the trigger's name.
func (id Trigger) TriggerName() string {
return Id(id).Segment(2)
}
// SchemaName returns the schema name of the type.
func (id Type) SchemaName() string {
return Id(id).Segment(0)
}
// TypeName returns the type's name.
func (id Type) TypeName() string {
return Id(id).Segment(1)
}
// SchemaName returns the schema name of the view.
func (id View) SchemaName() string {
return Id(id).Segment(0)
}
// ViewName returns the view's name.
func (id View) ViewName() string {
return Id(id).Segment(1)
}
// IsValid returns whether the ID is valid.
func (id AccessMethod) IsValid() bool { return Id(id).IsValid() }
// IsValid returns whether the ID is valid.
func (id Cast) IsValid() bool { return Id(id).IsValid() }
// IsValid returns whether the ID is valid.
func (id Check) IsValid() bool { return Id(id).IsValid() }
// IsValid returns whether the ID is valid.
func (id Collation) IsValid() bool { return Id(id).IsValid() }
// IsValid returns whether the ID is valid.
func (id ColumnDefault) IsValid() bool { return Id(id).IsValid() }
// IsValid returns whether the ID is valid.
func (id Database) IsValid() bool { return Id(id).IsValid() }
// IsValid returns whether the ID is valid.
func (id EnumLabel) IsValid() bool { return Id(id).IsValid() }
// IsValid returns whether the ID is valid.
func (id Extension) IsValid() bool { return Id(id).IsValid() }
// IsValid returns whether the ID is valid.
func (id ForeignKey) IsValid() bool { return Id(id).IsValid() }
// IsValid returns whether the ID is valid.
func (id Function) IsValid() bool { return Id(id).IsValid() }
// IsValid returns whether the ID is valid.
func (id Index) IsValid() bool { return Id(id).IsValid() }
// IsValid returns whether the ID is valid.
func (id Namespace) IsValid() bool { return Id(id).IsValid() }
// IsValid returns whether the ID is valid.
func (id Oid) IsValid() bool { return Id(id).IsValid() }
// IsValid returns whether the ID is valid.
func (id Procedure) IsValid() bool { return Id(id).IsValid() }
// IsValid returns whether the ID is valid.
func (id Sequence) IsValid() bool { return Id(id).IsValid() }
// IsValid returns whether the ID is valid.
func (id Table) IsValid() bool { return Id(id).IsValid() }
// IsValid returns whether the ID is valid.
func (id Trigger) IsValid() bool { return Id(id).IsValid() }
// IsValid returns whether the ID is valid.
func (id Type) IsValid() bool { return Id(id).IsValid() }
// IsValid returns whether the ID is valid.
func (id View) IsValid() bool { return Id(id).IsValid() }
// AsId returns the unwrapped ID.
func (id AccessMethod) AsId() Id { return Id(id) }
// AsId returns the unwrapped ID.
func (id Cast) AsId() Id { return Id(id) }
// AsId returns the unwrapped ID.
func (id Check) AsId() Id { return Id(id) }
// AsId returns the unwrapped ID.
func (id Collation) AsId() Id { return Id(id) }
// AsId returns the unwrapped ID.
func (id ColumnDefault) AsId() Id { return Id(id) }
// AsId returns the unwrapped ID.
func (id Database) AsId() Id { return Id(id) }
// AsId returns the unwrapped ID.
func (id EnumLabel) AsId() Id { return Id(id) }
// AsId returns the unwrapped ID.
func (id Extension) AsId() Id { return Id(id) }
// AsId returns the unwrapped ID.
func (id ForeignKey) AsId() Id { return Id(id) }
// AsId returns the unwrapped ID.
func (id Function) AsId() Id { return Id(id) }
// AsId returns the unwrapped ID.
func (id Index) AsId() Id { return Id(id) }
// AsId returns the unwrapped ID.
func (id Namespace) AsId() Id { return Id(id) }
// AsId returns the unwrapped ID.
func (id Oid) AsId() Id { return Id(id) }
// AsId returns the unwrapped ID.
func (id Procedure) AsId() Id { return Id(id) }
// AsId returns the unwrapped ID.
func (id Sequence) AsId() Id { return Id(id) }
// AsId returns the unwrapped ID.
func (id Table) AsId() Id { return Id(id) }
// AsId returns the unwrapped ID.
func (id Trigger) AsId() Id { return Id(id) }
// AsId returns the unwrapped ID.
func (id Type) AsId() Id { return Id(id) }
// AsId returns the unwrapped ID.
func (id View) AsId() Id { return Id(id) }
+103
View File
@@ -0,0 +1,103 @@
// Copyright 2025 Dolthub, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package id
import "github.com/dolthub/go-mysql-server/sql"
// Operation represents an operation that is being performed or validated.
type Operation uint8
const (
Operation_Rename Operation = iota
Operation_Delete
Operation_Delete_Cascade
)
// registry is the implementation of the global registry. This holds all functions that operate or validate a change on
// an ID.
type registry struct {
listeners [][]Listener
}
// globalRegistry is the variable that is referenced for the registry.
var globalRegistry = &registry{
listeners: make([][]Listener, section_count),
}
type Listener interface {
// OperationPerformer is a function that performs the given operation on the original ID. Some operations, such as
// renames, will use the new ID.
OperationPerformer(ctx *sql.Context, operation Operation, databaseName string, originalID Id, newID Id) error
// OperationValidator is a function that validates the given operation on the original ID. Some operations, such as
// renames, will use the new ID. A validator is not required, and is intended for operations that may be relatively
// expensive to perform, but able to check quickly for failures. In addition, validators should not perform any
// modifications. If a validator is not required, then this should just return nil.
OperationValidator(ctx *sql.Context, operation Operation, databaseName string, originalID Id, newID Id) error
}
// RegisterListener registers the given listener for the given sections.
//
// For example, sequences are related to tables. Whenever a table operation is performed that changes its ID, sequences
// will also need to update their IDs that reference the table. This is accomplished by registering a performer that
// accepts a table section, where the performer modifies sequences as needed.
//
// Performers should not register sections that are directly related to themselves. For example, a sequence performer
// should not register itself under the sequence section, as it will be the one broadcasting that section, and therefore
// could cause a loop.
func RegisterListener(listener Listener, sections ...Section) {
for _, section := range sections {
if section == Section_Null {
continue
}
globalRegistry.listeners[section] = append(globalRegistry.listeners[section], listener)
}
}
// PerformOperation calls all registered performers that are associated with the given section. This does not call any
// validators, which should be done using ValidateOperation. This returns the first error that is encountered.
func PerformOperation(ctx *sql.Context, targetSection Section, operation Operation, databaseName string, originalID Id, newID Id) error {
for _, listener := range globalRegistry.listeners[targetSection] {
if err := listener.OperationPerformer(ctx, operation, databaseName, originalID, newID); err != nil {
return err
}
}
// TODO: need to look for tables that store OIDs in their columns and UPDATE them to the new value
// it will be relatively slow, but that's the price a user pays to store OIDs in their tables
return nil
}
// ValidateOperation calls all registered validators that are associated with the given section.
func ValidateOperation(ctx *sql.Context, targetSection Section, operation Operation, databaseName string, originalID Id, newID Id) error {
for _, listener := range globalRegistry.listeners[targetSection] {
if err := listener.OperationValidator(ctx, operation, databaseName, originalID, newID); err != nil {
return err
}
}
return nil
}
// String returns the name of the operation.
func (op Operation) String() string {
switch op {
case Operation_Rename:
return "Rename"
case Operation_Delete:
return "Delete"
case Operation_Delete_Cascade:
return "DeleteCascade"
default:
return "UNKNOWN_OPERATION"
}
}
+152
View File
@@ -0,0 +1,152 @@
// Copyright 2024 Dolthub, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package id
// Section represents a specific space that an Internal ID resides in. This makes it relatively simple to find the
// target of the ID, since each searchable space has its own section.
type Section uint8
// All new sections must be given an unused number, as these may be persisted in tables. Changing them would change
// pre-existing table data, potentially corrupting that table data. At most, there can be 127 sections, since the first
// bit is reserved to determine a format's encoding.
const (
Section_Null Section = 0 // Represents a null ID
Section_AccessMethod Section = 1 // Refers to relation access methods
Section_Cast Section = 2 // Refers to casts between types
Section_Check Section = 3 // Refers to checks on tables
Section_Collation Section = 4 // Refers to collations
Section_ColumnDefault Section = 5 // Refers to column defaults on tables
Section_Database Section = 6 // Refers to the database
Section_EnumLabel Section = 7 // Refers to a specific label in an ENUM type
Section_EventTrigger Section = 8 // Refers to event triggers
Section_ExclusionConstraint Section = 9 // Refers to exclusion constraints
Section_Extension Section = 10 // Refers to extensions
Section_ForeignKey Section = 11 // Refers to foreign keys on tables
Section_ForeignDataWrapper Section = 12 // Refers to foreign data wrappers
Section_ForeignServer Section = 13 // Refers to foreign servers
Section_ForeignTable Section = 14 // Refers to foreign tables
Section_Function Section = 15 // Refers to functions
Section_FunctionLanguage Section = 16 // Refers to the programming languages available for writing functions
Section_Index Section = 17 // Refers to indexes on tables
Section_Namespace Section = 18 // Namespaces are the underlying structure of a schema (basically the schema)
Section_OID Section = 19 // Refers to a raw OID that is not actually attached to anything (ONLY used with reg types)
Section_Operator Section = 20 // Refers to operators (+, -, *, etc.)
Section_OperatorClass Section = 21 // Refers to operator classes
Section_OperatorFamily Section = 22 // Refers to operator families
Section_PrimaryKey Section = 23 // Refers to primary keys on tables
Section_Procedure Section = 24 // Refers to stored procedures
Section_Publication Section = 25 // Refers to publications
Section_RowLevelSecurity Section = 26 // Refers to row-level security polices on tables
Section_Sequence Section = 27 // Refers to sequences
Section_Subscription Section = 28 // Refers to logical replication subscriptions
Section_Table Section = 29 // Refers to tables
Section_TextSearchConfig Section = 30 // Refers to text search configuration
Section_TextSearchDictionary Section = 31 // Refers to text search dictionaries
Section_TextSearchParser Section = 32 // Refers to text search parsers
Section_TextSearchTemplate Section = 33 // Refers to text search templates
Section_Trigger Section = 34 // Refers to triggers on tables and views
Section_Type Section = 35 // Refers to types
Section_UniqueKey Section = 36 // Refers to unique keys on tables
Section_User Section = 37 // Refers to users
Section_View Section = 38 // Refers to views
section_count uint8 = 39 // This is the number of sections, and should ALWAYS be kept up-to-date
)
// String returns the name of the Section.
func (section Section) String() string {
switch section {
case Section_Null:
return "Null"
case Section_AccessMethod:
return "AccessMethod"
case Section_Cast:
return "Cast"
case Section_Check:
return "Check"
case Section_Collation:
return "Collation"
case Section_ColumnDefault:
return "ColumnDefault"
case Section_Database:
return "Database"
case Section_EnumLabel:
return "EnumLabel"
case Section_EventTrigger:
return "EventTrigger"
case Section_ExclusionConstraint:
return "ExclusionConstraint"
case Section_Extension:
return "Extension"
case Section_ForeignKey:
return "ForeignKey"
case Section_ForeignDataWrapper:
return "ForeignDataWrapper"
case Section_ForeignServer:
return "ForeignServer"
case Section_ForeignTable:
return "ForeignTable"
case Section_Function:
return "Function"
case Section_FunctionLanguage:
return "FunctionLanguage"
case Section_Index:
return "Index"
case Section_Namespace:
return "Namespace"
case Section_OID:
return "OID"
case Section_Operator:
return "Operator"
case Section_OperatorClass:
return "OperatorClass:"
case Section_OperatorFamily:
return "OperatorFamily"
case Section_PrimaryKey:
return "PrimaryKey"
case Section_Procedure:
return "Procedure"
case Section_Publication:
return "Publication"
case Section_RowLevelSecurity:
return "RowLevelSecurity"
case Section_Sequence:
return "Sequence"
case Section_Subscription:
return "Subscription"
case Section_Table:
return "Table"
case Section_TextSearchConfig:
return "TextSearchConfig"
case Section_TextSearchDictionary:
return "TextSearchDictionary"
case Section_TextSearchParser:
return "TextSearchParser"
case Section_TextSearchTemplate:
return "TextSearchTemplate"
case Section_Trigger:
return "Trigger"
case Section_Type:
return "Type"
case Section_UniqueKey:
return "UniqueKey"
case Section_User:
return "User"
case Section_View:
return "View"
default:
return "UNKNOWN_SECTION"
}
}
+81
View File
@@ -0,0 +1,81 @@
// Copyright 2025 Dolthub, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package id
import "testing"
// TestSectionValue operates as a line of defense to prevent accidental changes to pre-existing Section IDs.
// If this test fails, then a Section was changed that should not have been changed.
func TestSectionValue(t *testing.T) {
ids := []struct {
Section
ID uint8
Name string
}{
{Section_Null, 0, "Null"},
{Section_AccessMethod, 1, "AccessMethod"},
{Section_Cast, 2, "Cast"},
{Section_Check, 3, "Check"},
{Section_Collation, 4, "Collation"},
{Section_ColumnDefault, 5, "ColumnDefault"},
{Section_Database, 6, "Database"},
{Section_EnumLabel, 7, "EnumLabel"},
{Section_EventTrigger, 8, "EventTrigger"},
{Section_ExclusionConstraint, 9, "ExclusionConstraint"},
{Section_Extension, 10, "Extension"},
{Section_ForeignKey, 11, "ForeignKey"},
{Section_ForeignDataWrapper, 12, "ForeignDataWrapper"},
{Section_ForeignServer, 13, "ForeignServer"},
{Section_ForeignTable, 14, "ForeignTable"},
{Section_Function, 15, "Function"},
{Section_FunctionLanguage, 16, "FunctionLanguage"},
{Section_Index, 17, "Index"},
{Section_Namespace, 18, "Namespace"},
{Section_OID, 19, "OID"},
{Section_Operator, 20, "Operator"},
{Section_OperatorClass, 21, "OperatorClass"},
{Section_OperatorFamily, 22, "OperatorFamily"},
{Section_PrimaryKey, 23, "PrimaryKey"},
{Section_Procedure, 24, "Procedure"},
{Section_Publication, 25, "Publication"},
{Section_RowLevelSecurity, 26, "RowLevelSecurity"},
{Section_Sequence, 27, "Sequence"},
{Section_Subscription, 28, "Subscription"},
{Section_Table, 29, "Table"},
{Section_TextSearchConfig, 30, "TextSearchConfig"},
{Section_TextSearchDictionary, 31, "TextSearchDictionary"},
{Section_TextSearchParser, 32, "TextSearchParser"},
{Section_TextSearchTemplate, 33, "TextSearchTemplate"},
{Section_Trigger, 34, "Trigger"},
{Section_Type, 35, "Type"},
{Section_UniqueKey, 36, "UniqueKey"},
{Section_User, 37, "User"},
{Section_View, 38, "View"},
}
allIds := make(map[uint8]string)
for _, id := range ids {
if uint8(id.Section) != id.ID {
t.Logf("Section `%s` has been changed from its permanent value of `%d` to `%d`",
id.Name, id.ID, uint8(id.Section))
t.Fail()
} else if existingName, ok := allIds[id.ID]; ok {
t.Logf("Section `%s` has the same value as `%s`: `%d`",
id.Name, existingName, id.ID)
t.Fail()
} else {
allIds[id.ID] = id.Name
}
}
}
+29
View File
@@ -0,0 +1,29 @@
// Copyright 2025 Dolthub, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package id
import (
"github.com/cockroachdb/errors"
"github.com/dolthub/go-mysql-server/sql"
)
// GetFromTable returns the id from the table.
func GetFromTable(ctx *sql.Context, tbl sql.Table) (Table, bool, error) {
schTbl, ok := tbl.(sql.DatabaseSchemaTable)
if !ok {
return NullTable, false, errors.Newf(`table "%s" does not specify a schema`, tbl.Name())
}
return NewTable(schTbl.DatabaseSchema().SchemaName(), schTbl.Name()), true, nil
}