From 32db6a72f86c4e0a30084436dc0a9b4b5e28c393 Mon Sep 17 00:00:00 2001
From: robot-piglet <robot-piglet@yandex-team.com>
Date: Mon, 8 Apr 2024 10:44:40 +0300
Subject: Intermediate changes

---
 .../python/clickhouse-connect/.dist-info/METADATA  |  2 +-
 .../clickhouse_connect/__version__.py              |  2 +-
 .../clickhouse_connect/driver/client.py            | 47 ++++++++++++++++++----
 .../clickhouse_connect/driver/common.py            |  2 +-
 .../clickhouse_connect/driver/dataconv.py          |  2 +-
 .../clickhouse_connect/driver/httpclient.py        | 10 +++--
 .../clickhouse_connect/driver/query.py             |  7 ++++
 contrib/python/clickhouse-connect/ya.make          |  2 +-
 contrib/python/hypothesis/py3/.dist-info/METADATA  |  6 +--
 contrib/python/hypothesis/py3/hypothesis/core.py   | 19 +++++----
 .../hypothesis/py3/hypothesis/extra/_patching.py   |  2 +-
 .../hypothesis/py3/hypothesis/extra/array_api.py   |  4 +-
 .../py3/hypothesis/internal/conjecture/data.py     |  6 +--
 .../py3/hypothesis/internal/conjecture/engine.py   |  9 +++++
 .../hypothesis/py3/hypothesis/internal/coverage.py |  2 +-
 .../py3/hypothesis/internal/observability.py       |  2 +-
 .../python/hypothesis/py3/hypothesis/stateful.py   |  2 +-
 .../hypothesis/strategies/_internal/datetime.py    |  2 +-
 .../python/hypothesis/py3/hypothesis/version.py    |  2 +-
 contrib/python/hypothesis/py3/ya.make              |  2 +-
 20 files changed, 93 insertions(+), 39 deletions(-)

diff --git a/contrib/python/clickhouse-connect/.dist-info/METADATA b/contrib/python/clickhouse-connect/.dist-info/METADATA
index 9b873eb781..7e568e330b 100644
--- a/contrib/python/clickhouse-connect/.dist-info/METADATA
+++ b/contrib/python/clickhouse-connect/.dist-info/METADATA
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: clickhouse-connect
-Version: 0.7.3
+Version: 0.7.4
 Summary: ClickHouse Database Core Driver for Python, Pandas, and Superset
 Home-page: https://github.com/ClickHouse/clickhouse-connect
 Author: ClickHouse Inc.
diff --git a/contrib/python/clickhouse-connect/clickhouse_connect/__version__.py b/contrib/python/clickhouse-connect/clickhouse_connect/__version__.py
index 0ab8b1bafd..33c23e6624 100644
--- a/contrib/python/clickhouse-connect/clickhouse_connect/__version__.py
+++ b/contrib/python/clickhouse-connect/clickhouse_connect/__version__.py
@@ -1 +1 @@
-version = '0.7.3'
+version = '0.7.4'
diff --git a/contrib/python/clickhouse-connect/clickhouse_connect/driver/client.py b/contrib/python/clickhouse-connect/clickhouse_connect/driver/client.py
index ae6d9b7a8e..cf16ec24ec 100644
--- a/contrib/python/clickhouse-connect/clickhouse_connect/driver/client.py
+++ b/contrib/python/clickhouse-connect/clickhouse_connect/driver/client.py
@@ -19,7 +19,8 @@ from clickhouse_connect.driver.external import ExternalData
 from clickhouse_connect.driver.insert import InsertContext
 from clickhouse_connect.driver.summary import QuerySummary
 from clickhouse_connect.driver.models import ColumnDef, SettingDef, SettingStatus
-from clickhouse_connect.driver.query import QueryResult, to_arrow, QueryContext, arrow_buffer, quote_identifier
+from clickhouse_connect.driver.query import QueryResult, to_arrow, to_arrow_batches, QueryContext, arrow_buffer, \
+    quote_identifier
 
 io.DEFAULT_BUFFER_SIZE = 1024 * 256
 logger = logging.getLogger(__name__)
@@ -255,7 +256,8 @@ class Client(ABC):
                   settings: Optional[Dict[str, Any]] = None,
                   fmt: str = None,
                   use_database: bool = True,
-                  external_data: Optional[ExternalData] = None) -> bytes:
+                  external_data: Optional[ExternalData] = None,
+                  stream: bool = False) -> Union[bytes, io.IOBase]:
         """
         Query method that simply returns the raw ClickHouse format bytes
         :param query: Query statement/format string
@@ -348,7 +350,7 @@ class Client(ABC):
         """
         Query method that returns the results as a StreamContext.  For parameter values, see the
         create_query_context method
-        :return: Pandas dataframe representing the result set
+        :return: Generator that yields a Pandas dataframe per block representing the result set
         """
         return self._context_query(locals(), use_numpy=True,
                                    as_pandas=True,
@@ -462,6 +464,39 @@ class Client(ABC):
         :param external_data ClickHouse "external data" to send with query
         :return: PyArrow.Table
         """
+        settings = self._update_arrow_settings(settings, use_strings)
+        return to_arrow(self.raw_query(query,
+                                       parameters,
+                                       settings,
+                                       fmt='Arrow',
+                                       external_data=external_data))
+
+    def query_arrow_stream(self,
+                           query: str,
+                           parameters: Optional[Union[Sequence, Dict[str, Any]]] = None,
+                           settings: Optional[Dict[str, Any]] = None,
+                           use_strings: Optional[bool] = None,
+                           external_data: Optional[ExternalData] = None) -> StreamContext:
+        """
+        Query method that returns the results as a stream of Arrow tables
+        :param query: Query statement/format string
+        :param parameters: Optional dictionary used to format the query
+        :param settings: Optional dictionary of ClickHouse settings (key/string values)
+        :param use_strings:  Convert ClickHouse String type to Arrow string type (instead of binary)
+        :param external_data ClickHouse "external data" to send with query
+        :return: Generator that yields a PyArrow.Table for per block representing the result set
+        """
+        settings = self._update_arrow_settings(settings, use_strings)
+        return to_arrow_batches(self.raw_query(query,
+                                               parameters,
+                                               settings,
+                                               fmt='ArrowStream',
+                                               external_data=external_data,
+                                               stream=True))
+
+    def _update_arrow_settings(self,
+                               settings: Optional[Dict[str, Any]],
+                               use_strings: Optional[bool]) -> Dict[str, Any]:
         settings = dict_copy(settings)
         if self.database:
             settings['database'] = self.database
@@ -473,11 +508,7 @@ class Client(ABC):
             if not str_status.is_writable:
                 raise OperationalError(f'Cannot change readonly {arrow_str_setting} to {use_strings}')
             settings[arrow_str_setting] = '1' if use_strings else '0'
-        return to_arrow(self.raw_query(query,
-                                       parameters,
-                                       settings,
-                                       fmt='Arrow',
-                                       external_data=external_data))
+        return settings
 
     @abstractmethod
     def command(self,
diff --git a/contrib/python/clickhouse-connect/clickhouse_connect/driver/common.py b/contrib/python/clickhouse-connect/clickhouse_connect/driver/common.py
index 71adb00321..84a91c9415 100644
--- a/contrib/python/clickhouse-connect/clickhouse_connect/driver/common.py
+++ b/contrib/python/clickhouse-connect/clickhouse_connect/driver/common.py
@@ -125,7 +125,7 @@ def coerce_int(val: Optional[Union[str, int]]) -> int:
 def coerce_bool(val: Optional[Union[str, bool]]):
     if not val:
         return False
-    return val in (True, 'True', 'true', '1')
+    return val is True or (isinstance(val, str) and val.lower() in ('true', '1', 'y', 'yes'))
 
 
 class SliceView(Sequence):
diff --git a/contrib/python/clickhouse-connect/clickhouse_connect/driver/dataconv.py b/contrib/python/clickhouse-connect/clickhouse_connect/driver/dataconv.py
index c1a9b62aad..5acc49830e 100644
--- a/contrib/python/clickhouse-connect/clickhouse_connect/driver/dataconv.py
+++ b/contrib/python/clickhouse-connect/clickhouse_connect/driver/dataconv.py
@@ -122,7 +122,7 @@ def write_str_col(column: Sequence, nullable: bool, encoding: Optional[str], des
             if encoding:
                 x = x.encode(encoding)
             else:
-                x = b''
+                x = bytes(x)
             sz = len(x)
             while True:
                 b = sz & 0x7f
diff --git a/contrib/python/clickhouse-connect/clickhouse_connect/driver/httpclient.py b/contrib/python/clickhouse-connect/clickhouse_connect/driver/httpclient.py
index c4a2da2393..1a35470b43 100644
--- a/contrib/python/clickhouse-connect/clickhouse_connect/driver/httpclient.py
+++ b/contrib/python/clickhouse-connect/clickhouse_connect/driver/httpclient.py
@@ -449,8 +449,11 @@ class HttpClient(Client):
 
     def raw_query(self, query: str,
                   parameters: Optional[Union[Sequence, Dict[str, Any]]] = None,
-                  settings: Optional[Dict[str, Any]] = None, fmt: str = None,
-                  use_database: bool = True, external_data: Optional[ExternalData] = None) -> bytes:
+                  settings: Optional[Dict[str, Any]] = None,
+                  fmt: str = None,
+                  use_database: bool = True,
+                  external_data: Optional[ExternalData] = None,
+                  stream: bool = False) -> Union[bytes, HTTPResponse]:
         """
         See BaseClient doc_string for this method
         """
@@ -469,7 +472,8 @@ class HttpClient(Client):
         else:
             body = final_query
             fields = None
-        return self._raw_request(body, params, fields=fields).data
+        response = self._raw_request(body, params, fields=fields, stream=stream)
+        return response if stream else response.data
 
     def close(self):
         if self._owns_pool_manager:
diff --git a/contrib/python/clickhouse-connect/clickhouse_connect/driver/query.py b/contrib/python/clickhouse-connect/clickhouse_connect/driver/query.py
index 2483d61222..6ad3fae9f1 100644
--- a/contrib/python/clickhouse-connect/clickhouse_connect/driver/query.py
+++ b/contrib/python/clickhouse-connect/clickhouse_connect/driver/query.py
@@ -5,6 +5,7 @@ import uuid
 import pytz
 
 from enum import Enum
+from io import IOBase
 from typing import Any, Tuple, Dict, Sequence, Optional, Union, Generator
 from datetime import date, datetime, tzinfo
 
@@ -489,6 +490,12 @@ def to_arrow(content: bytes):
     return reader.read_all()
 
 
+def to_arrow_batches(buffer: IOBase) -> StreamContext:
+    pyarrow = check_arrow()
+    reader = pyarrow.ipc.open_stream(buffer)
+    return StreamContext(buffer, reader)
+
+
 def arrow_buffer(table) -> Tuple[Sequence[str], bytes]:
     pyarrow = check_arrow()
     sink = pyarrow.BufferOutputStream()
diff --git a/contrib/python/clickhouse-connect/ya.make b/contrib/python/clickhouse-connect/ya.make
index d082921604..cd5de03ec7 100644
--- a/contrib/python/clickhouse-connect/ya.make
+++ b/contrib/python/clickhouse-connect/ya.make
@@ -2,7 +2,7 @@
 
 PY3_LIBRARY()
 
-VERSION(0.7.3)
+VERSION(0.7.4)
 
 LICENSE(Apache-2.0)
 
diff --git a/contrib/python/hypothesis/py3/.dist-info/METADATA b/contrib/python/hypothesis/py3/.dist-info/METADATA
index 17a8050e56..59c5ae6875 100644
--- a/contrib/python/hypothesis/py3/.dist-info/METADATA
+++ b/contrib/python/hypothesis/py3/.dist-info/METADATA
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: hypothesis
-Version: 6.99.12
+Version: 6.99.13
 Summary: A library for property-based testing
 Home-page: https://hypothesis.works
 Author: David R. MacIver and Zac Hatfield-Dodds
@@ -41,7 +41,7 @@ Requires-Dist: exceptiongroup >=1.0.0 ; python_version < "3.11"
 Provides-Extra: all
 Requires-Dist: black >=19.10b0 ; extra == 'all'
 Requires-Dist: click >=7.0 ; extra == 'all'
-Requires-Dist: crosshair-tool >=0.0.51 ; extra == 'all'
+Requires-Dist: crosshair-tool >=0.0.53 ; extra == 'all'
 Requires-Dist: django >=3.2 ; extra == 'all'
 Requires-Dist: dpcontracts >=0.4 ; extra == 'all'
 Requires-Dist: hypothesis-crosshair >=0.0.2 ; extra == 'all'
@@ -64,7 +64,7 @@ Provides-Extra: codemods
 Requires-Dist: libcst >=0.3.16 ; extra == 'codemods'
 Provides-Extra: crosshair
 Requires-Dist: hypothesis-crosshair >=0.0.2 ; extra == 'crosshair'
-Requires-Dist: crosshair-tool >=0.0.51 ; extra == 'crosshair'
+Requires-Dist: crosshair-tool >=0.0.53 ; extra == 'crosshair'
 Provides-Extra: dateutil
 Requires-Dist: python-dateutil >=1.4 ; extra == 'dateutil'
 Provides-Extra: django
diff --git a/contrib/python/hypothesis/py3/hypothesis/core.py b/contrib/python/hypothesis/py3/hypothesis/core.py
index 402382c6aa..ccd5c43b6e 100644
--- a/contrib/python/hypothesis/py3/hypothesis/core.py
+++ b/contrib/python/hypothesis/py3/hypothesis/core.py
@@ -786,7 +786,6 @@ class StateForActualGivenExecution:
         self.explain_traces = defaultdict(set)
         self._start_timestamp = time.time()
         self._string_repr = ""
-        self._jsonable_arguments = {}
         self._timing_features = {}
 
     @property
@@ -913,7 +912,7 @@ class StateForActualGivenExecution:
                     ),
                 )
                 self._string_repr = printer.getvalue()
-                self._jsonable_arguments = {
+                data._observability_arguments = {
                     **dict(enumerate(map(to_jsonable, args))),
                     **{k: to_jsonable(v) for k, v in kwargs.items()},
                 }
@@ -1085,19 +1084,23 @@ class StateForActualGivenExecution:
             # Conditional here so we can save some time constructing the payload; in
             # other cases (without coverage) it's cheap enough to do that regardless.
             if TESTCASE_CALLBACKS:
-                if self.failed_normally or self.failed_due_to_deadline:
-                    phase = "shrink"
-                elif runner := getattr(self, "_runner", None):
+                if runner := getattr(self, "_runner", None):
                     phase = runner._current_phase
+                elif self.failed_normally or self.failed_due_to_deadline:
+                    phase = "shrink"
                 else:  # pragma: no cover  # in case of messing with internals
                     phase = "unknown"
+                backend_desc = f", using backend={self.settings.backend!r}" * (
+                    self.settings.backend != "hypothesis"
+                    and not getattr(runner, "_switch_to_hypothesis_provider", False)
+                )
                 tc = make_testcase(
                     start_timestamp=self._start_timestamp,
                     test_name_or_nodeid=self.test_identifier,
                     data=data,
-                    how_generated=f"generated during {phase} phase",
+                    how_generated=f"during {phase} phase{backend_desc}",
                     string_repr=self._string_repr,
-                    arguments={**self._jsonable_arguments, **data._observability_args},
+                    arguments=data._observability_args,
                     timing=self._timing_features,
                     coverage=tractable_coverage_report(trace) or None,
                     phase=phase,
@@ -1217,7 +1220,7 @@ class StateForActualGivenExecution:
                     "status": "passed" if sys.exc_info()[0] else "failed",
                     "status_reason": str(origin or "unexpected/flaky pass"),
                     "representation": self._string_repr,
-                    "arguments": self._jsonable_arguments,
+                    "arguments": ran_example._observability_args,
                     "how_generated": "minimal failing example",
                     "features": {
                         **{
diff --git a/contrib/python/hypothesis/py3/hypothesis/extra/_patching.py b/contrib/python/hypothesis/py3/hypothesis/extra/_patching.py
index 8f53076d72..d3678e3f9f 100644
--- a/contrib/python/hypothesis/py3/hypothesis/extra/_patching.py
+++ b/contrib/python/hypothesis/py3/hypothesis/extra/_patching.py
@@ -121,7 +121,7 @@ class AddExamplesCodemod(VisitorBasedCodemodCommand):
                     cst.Module([]).code_for_node(via),
                     mode=black.FileMode(line_length=self.line_length),
                 )
-            except ImportError:
+            except (ImportError, AttributeError):
                 return None  # See https://github.com/psf/black/pull/4224
             via = cst.parse_expression(pretty.strip())
         return cst.Decorator(via)
diff --git a/contrib/python/hypothesis/py3/hypothesis/extra/array_api.py b/contrib/python/hypothesis/py3/hypothesis/extra/array_api.py
index ce0993ab3b..8c82f63114 100644
--- a/contrib/python/hypothesis/py3/hypothesis/extra/array_api.py
+++ b/contrib/python/hypothesis/py3/hypothesis/extra/array_api.py
@@ -424,12 +424,12 @@ class ArrayStrategy(st.SearchStrategy):
             while elements.more():
                 i = data.draw_integer(0, self.array_size - 1)
                 if i in assigned:
-                    elements.reject()
+                    elements.reject("chose an array index we've already used")
                     continue
                 val = data.draw(self.elements_strategy)
                 if self.unique:
                     if val in seen:
-                        elements.reject()
+                        elements.reject("chose an element we've already used")
                         continue
                     else:
                         seen.add(val)
diff --git a/contrib/python/hypothesis/py3/hypothesis/internal/conjecture/data.py b/contrib/python/hypothesis/py3/hypothesis/internal/conjecture/data.py
index 3f15a974ef..701105bd5e 100644
--- a/contrib/python/hypothesis/py3/hypothesis/internal/conjecture/data.py
+++ b/contrib/python/hypothesis/py3/hypothesis/internal/conjecture/data.py
@@ -2273,13 +2273,13 @@ class ConjectureData:
         # (in fact, it is possible that giving up early here results in more time
         # for useful shrinks to run).
         if node.ir_type != ir_type:
-            self.mark_invalid()
+            self.mark_invalid(f"(internal) want a {ir_type} but have a {node.ir_type}")
 
         # if a node has different kwargs (and so is misaligned), but has a value
         # that is allowed by the expected kwargs, then we can coerce this node
         # into an aligned one by using its value. It's unclear how useful this is.
         if not ir_value_permitted(node.value, node.ir_type, kwargs):
-            self.mark_invalid()
+            self.mark_invalid(f"(internal) got a {ir_type} but outside the valid range")
 
         return node
 
@@ -2348,7 +2348,7 @@ class ConjectureData:
         strategy.validate()
 
         if strategy.is_empty:
-            self.mark_invalid("strategy is empty")
+            self.mark_invalid(f"empty strategy {self!r}")
 
         if self.depth >= MAX_DEPTH:
             self.mark_invalid("max depth exceeded")
diff --git a/contrib/python/hypothesis/py3/hypothesis/internal/conjecture/engine.py b/contrib/python/hypothesis/py3/hypothesis/internal/conjecture/engine.py
index 6791b28e04..ddf8c0e090 100644
--- a/contrib/python/hypothesis/py3/hypothesis/internal/conjecture/engine.py
+++ b/contrib/python/hypothesis/py3/hypothesis/internal/conjecture/engine.py
@@ -809,6 +809,15 @@ class ConjectureRunner:
 
             self.test_function(data)
 
+            if (
+                data.status == Status.OVERRUN
+                and max_length < BUFFER_SIZE
+                and "invalid because" not in data.events
+            ):
+                data.events["invalid because"] = (
+                    "reduced max size for early examples (avoids flaky health checks)"
+                )
+
             self.generate_mutations_from(data)
 
             # Although the optimisations are logically a distinct phase, we
diff --git a/contrib/python/hypothesis/py3/hypothesis/internal/coverage.py b/contrib/python/hypothesis/py3/hypothesis/internal/coverage.py
index 40f609b75a..c71ce28642 100644
--- a/contrib/python/hypothesis/py3/hypothesis/internal/coverage.py
+++ b/contrib/python/hypothesis/py3/hypothesis/internal/coverage.py
@@ -61,7 +61,7 @@ if IN_COVERAGE_TESTS:
         if key in written:
             return
         written.add(key)
-        with open("branch-check", mode="a", encoding="utf-8") as log:
+        with open(f"branch-check-{os.getpid()}", mode="a", encoding="utf-8") as log:
             log.write(json.dumps({"name": name, "value": value}) + "\n")
 
     description_stack = []
diff --git a/contrib/python/hypothesis/py3/hypothesis/internal/observability.py b/contrib/python/hypothesis/py3/hypothesis/internal/observability.py
index aff19d805c..a532d054cd 100644
--- a/contrib/python/hypothesis/py3/hypothesis/internal/observability.py
+++ b/contrib/python/hypothesis/py3/hypothesis/internal/observability.py
@@ -36,7 +36,7 @@ def make_testcase(
     start_timestamp: float,
     test_name_or_nodeid: str,
     data: ConjectureData,
-    how_generated: str = "unknown",
+    how_generated: str,
     string_repr: str = "<unknown>",
     arguments: Optional[dict] = None,
     timing: Dict[str, float],
diff --git a/contrib/python/hypothesis/py3/hypothesis/stateful.py b/contrib/python/hypothesis/py3/hypothesis/stateful.py
index d5af39b5c0..8c8272df7b 100644
--- a/contrib/python/hypothesis/py3/hypothesis/stateful.py
+++ b/contrib/python/hypothesis/py3/hypothesis/stateful.py
@@ -478,7 +478,7 @@ class BundleReferenceStrategy(SearchStrategy):
         machine = data.draw(self_strategy)
         bundle = machine.bundle(self.name)
         if not bundle:
-            data.mark_invalid()
+            data.mark_invalid(f"Cannot draw from empty bundle {self.name!r}")
         # Shrink towards the right rather than the left. This makes it easier
         # to delete data generated earlier, as when the error is towards the
         # end there can be a lot of hard to remove padding.
diff --git a/contrib/python/hypothesis/py3/hypothesis/strategies/_internal/datetime.py b/contrib/python/hypothesis/py3/hypothesis/strategies/_internal/datetime.py
index f2c33fa8c5..427d8c5ed2 100644
--- a/contrib/python/hypothesis/py3/hypothesis/strategies/_internal/datetime.py
+++ b/contrib/python/hypothesis/py3/hypothesis/strategies/_internal/datetime.py
@@ -155,7 +155,7 @@ class DatetimeStrategy(SearchStrategy):
 
         # If we happened to end up with a disallowed imaginary time, reject it.
         if (not self.allow_imaginary) and datetime_does_not_exist(result):
-            data.mark_invalid("nonexistent datetime")
+            data.mark_invalid(f"{result} does not exist (usually a DST transition)")
         return result
 
     def draw_naive_datetime_and_combine(self, data, tz):
diff --git a/contrib/python/hypothesis/py3/hypothesis/version.py b/contrib/python/hypothesis/py3/hypothesis/version.py
index 14d8902f65..27443504c2 100644
--- a/contrib/python/hypothesis/py3/hypothesis/version.py
+++ b/contrib/python/hypothesis/py3/hypothesis/version.py
@@ -8,5 +8,5 @@
 # v. 2.0. If a copy of the MPL was not distributed with this file, You can
 # obtain one at https://mozilla.org/MPL/2.0/.
 
-__version_info__ = (6, 99, 12)
+__version_info__ = (6, 99, 13)
 __version__ = ".".join(map(str, __version_info__))
diff --git a/contrib/python/hypothesis/py3/ya.make b/contrib/python/hypothesis/py3/ya.make
index 604d175b40..dbfb51e4f1 100644
--- a/contrib/python/hypothesis/py3/ya.make
+++ b/contrib/python/hypothesis/py3/ya.make
@@ -2,7 +2,7 @@
 
 PY3_LIBRARY()
 
-VERSION(6.99.12)
+VERSION(6.99.13)
 
 LICENSE(MPL-2.0)
 
-- 
cgit v1.2.3


From 6c8be60e070643e6ddb0805ff3ea63c8084e17ee Mon Sep 17 00:00:00 2001
From: robot-contrib <robot-contrib@yandex-team.com>
Date: Mon, 8 Apr 2024 10:44:54 +0300
Subject: Update vendor/github.com/go-resty/resty/v2 to 2.12.0
 2c417eb1f19edbc1bc383a8fae8345fc76c5e038

---
 vendor/golang.org/x/net/http2/transport.go         |  9 ++
 vendor/golang.org/x/sys/unix/aliases.go            |  2 +-
 vendor/golang.org/x/sys/unix/darwin_amd64_test.go  |  2 +-
 vendor/golang.org/x/sys/unix/darwin_arm64_test.go  |  2 +-
 vendor/golang.org/x/sys/unix/darwin_test.go        |  2 +-
 vendor/golang.org/x/sys/unix/dev_linux_test.go     |  2 -
 vendor/golang.org/x/sys/unix/mkasm.go              |  2 +-
 .../x/sys/unix/syscall_darwin_libSystem.go         |  2 +-
 vendor/golang.org/x/sys/unix/syscall_freebsd.go    | 12 +--
 vendor/golang.org/x/sys/unix/syscall_linux.go      | 99 ++++++++++++++++++++++
 vendor/golang.org/x/sys/unix/zsyscall_linux.go     | 10 +++
 vendor/golang.org/x/sys/unix/ztypes_linux.go       | 60 +++++++++++++
 12 files changed, 191 insertions(+), 13 deletions(-)

diff --git a/vendor/golang.org/x/net/http2/transport.go b/vendor/golang.org/x/net/http2/transport.go
index df578b86c6..c2a5b44b3d 100644
--- a/vendor/golang.org/x/net/http2/transport.go
+++ b/vendor/golang.org/x/net/http2/transport.go
@@ -2911,6 +2911,15 @@ func (rl *clientConnReadLoop) processWindowUpdate(f *WindowUpdateFrame) error {
 		fl = &cs.flow
 	}
 	if !fl.add(int32(f.Increment)) {
+		// For stream, the sender sends RST_STREAM with an error code of FLOW_CONTROL_ERROR
+		if cs != nil {
+			rl.endStreamError(cs, StreamError{
+				StreamID: f.StreamID,
+				Code:     ErrCodeFlowControl,
+			})
+			return nil
+		}
+
 		return ConnectionError(ErrCodeFlowControl)
 	}
 	cc.cond.Broadcast()
diff --git a/vendor/golang.org/x/sys/unix/aliases.go b/vendor/golang.org/x/sys/unix/aliases.go
index e7d3df4bd3..b0e4198575 100644
--- a/vendor/golang.org/x/sys/unix/aliases.go
+++ b/vendor/golang.org/x/sys/unix/aliases.go
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-//go:build (aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos) && go1.9
+//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos
 
 package unix
 
diff --git a/vendor/golang.org/x/sys/unix/darwin_amd64_test.go b/vendor/golang.org/x/sys/unix/darwin_amd64_test.go
index b547a62871..b58e1383c3 100644
--- a/vendor/golang.org/x/sys/unix/darwin_amd64_test.go
+++ b/vendor/golang.org/x/sys/unix/darwin_amd64_test.go
@@ -1,7 +1,7 @@
 // go run mkasm.go darwin amd64
 // Code generated by the command above; DO NOT EDIT.
 
-//go:build darwin && go1.12
+//go:build darwin
 
 package unix
 
diff --git a/vendor/golang.org/x/sys/unix/darwin_arm64_test.go b/vendor/golang.org/x/sys/unix/darwin_arm64_test.go
index b0df8c7485..9e537a39e3 100644
--- a/vendor/golang.org/x/sys/unix/darwin_arm64_test.go
+++ b/vendor/golang.org/x/sys/unix/darwin_arm64_test.go
@@ -1,7 +1,7 @@
 // go run mkasm.go darwin arm64
 // Code generated by the command above; DO NOT EDIT.
 
-//go:build darwin && go1.12
+//go:build darwin
 
 package unix
 
diff --git a/vendor/golang.org/x/sys/unix/darwin_test.go b/vendor/golang.org/x/sys/unix/darwin_test.go
index 6f801f6c94..8edde104b1 100644
--- a/vendor/golang.org/x/sys/unix/darwin_test.go
+++ b/vendor/golang.org/x/sys/unix/darwin_test.go
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-//go:build darwin && go1.12
+//go:build darwin
 
 package unix
 
diff --git a/vendor/golang.org/x/sys/unix/dev_linux_test.go b/vendor/golang.org/x/sys/unix/dev_linux_test.go
index bf86fd0e6d..da1069cfa1 100644
--- a/vendor/golang.org/x/sys/unix/dev_linux_test.go
+++ b/vendor/golang.org/x/sys/unix/dev_linux_test.go
@@ -2,8 +2,6 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-//go:build go1.7
-
 package unix_test
 
 import (
diff --git a/vendor/golang.org/x/sys/unix/mkasm.go b/vendor/golang.org/x/sys/unix/mkasm.go
index 9fd62822bf..cdafc717a3 100644
--- a/vendor/golang.org/x/sys/unix/mkasm.go
+++ b/vendor/golang.org/x/sys/unix/mkasm.go
@@ -80,7 +80,7 @@ func generateASMFile(goos, arch string, inFileNames []string, outFileName string
 const darwinTestTemplate = `// go run mkasm.go %s
 // Code generated by the command above; DO NOT EDIT.
 
-//go:build darwin && go1.12
+//go:build darwin
 
 package unix
 
diff --git a/vendor/golang.org/x/sys/unix/syscall_darwin_libSystem.go b/vendor/golang.org/x/sys/unix/syscall_darwin_libSystem.go
index 16dc699379..2f0fa76e4f 100644
--- a/vendor/golang.org/x/sys/unix/syscall_darwin_libSystem.go
+++ b/vendor/golang.org/x/sys/unix/syscall_darwin_libSystem.go
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-//go:build darwin && go1.12
+//go:build darwin
 
 package unix
 
diff --git a/vendor/golang.org/x/sys/unix/syscall_freebsd.go b/vendor/golang.org/x/sys/unix/syscall_freebsd.go
index 64d1bb4dba..2b57e0f73b 100644
--- a/vendor/golang.org/x/sys/unix/syscall_freebsd.go
+++ b/vendor/golang.org/x/sys/unix/syscall_freebsd.go
@@ -13,6 +13,7 @@
 package unix
 
 import (
+	"errors"
 	"sync"
 	"unsafe"
 )
@@ -169,25 +170,26 @@ func Getfsstat(buf []Statfs_t, flags int) (n int, err error) {
 func Uname(uname *Utsname) error {
 	mib := []_C_int{CTL_KERN, KERN_OSTYPE}
 	n := unsafe.Sizeof(uname.Sysname)
-	if err := sysctl(mib, &uname.Sysname[0], &n, nil, 0); err != nil {
+	// Suppress ENOMEM errors to be compatible with the C library __xuname() implementation.
+	if err := sysctl(mib, &uname.Sysname[0], &n, nil, 0); err != nil && !errors.Is(err, ENOMEM) {
 		return err
 	}
 
 	mib = []_C_int{CTL_KERN, KERN_HOSTNAME}
 	n = unsafe.Sizeof(uname.Nodename)
-	if err := sysctl(mib, &uname.Nodename[0], &n, nil, 0); err != nil {
+	if err := sysctl(mib, &uname.Nodename[0], &n, nil, 0); err != nil && !errors.Is(err, ENOMEM) {
 		return err
 	}
 
 	mib = []_C_int{CTL_KERN, KERN_OSRELEASE}
 	n = unsafe.Sizeof(uname.Release)
-	if err := sysctl(mib, &uname.Release[0], &n, nil, 0); err != nil {
+	if err := sysctl(mib, &uname.Release[0], &n, nil, 0); err != nil && !errors.Is(err, ENOMEM) {
 		return err
 	}
 
 	mib = []_C_int{CTL_KERN, KERN_VERSION}
 	n = unsafe.Sizeof(uname.Version)
-	if err := sysctl(mib, &uname.Version[0], &n, nil, 0); err != nil {
+	if err := sysctl(mib, &uname.Version[0], &n, nil, 0); err != nil && !errors.Is(err, ENOMEM) {
 		return err
 	}
 
@@ -205,7 +207,7 @@ func Uname(uname *Utsname) error {
 
 	mib = []_C_int{CTL_HW, HW_MACHINE}
 	n = unsafe.Sizeof(uname.Machine)
-	if err := sysctl(mib, &uname.Machine[0], &n, nil, 0); err != nil {
+	if err := sysctl(mib, &uname.Machine[0], &n, nil, 0); err != nil && !errors.Is(err, ENOMEM) {
 		return err
 	}
 
diff --git a/vendor/golang.org/x/sys/unix/syscall_linux.go b/vendor/golang.org/x/sys/unix/syscall_linux.go
index 0f85e29e62..5682e2628a 100644
--- a/vendor/golang.org/x/sys/unix/syscall_linux.go
+++ b/vendor/golang.org/x/sys/unix/syscall_linux.go
@@ -1849,6 +1849,105 @@ func Dup2(oldfd, newfd int) error {
 //sys	Fsmount(fd int, flags int, mountAttrs int) (fsfd int, err error)
 //sys	Fsopen(fsName string, flags int) (fd int, err error)
 //sys	Fspick(dirfd int, pathName string, flags int) (fd int, err error)
+
+//sys	fsconfig(fd int, cmd uint, key *byte, value *byte, aux int) (err error)
+
+func fsconfigCommon(fd int, cmd uint, key string, value *byte, aux int) (err error) {
+	var keyp *byte
+	if keyp, err = BytePtrFromString(key); err != nil {
+		return
+	}
+	return fsconfig(fd, cmd, keyp, value, aux)
+}
+
+// FsconfigSetFlag is equivalent to fsconfig(2) called
+// with cmd == FSCONFIG_SET_FLAG.
+//
+// fd is the filesystem context to act upon.
+// key the parameter key to set.
+func FsconfigSetFlag(fd int, key string) (err error) {
+	return fsconfigCommon(fd, FSCONFIG_SET_FLAG, key, nil, 0)
+}
+
+// FsconfigSetString is equivalent to fsconfig(2) called
+// with cmd == FSCONFIG_SET_STRING.
+//
+// fd is the filesystem context to act upon.
+// key the parameter key to set.
+// value is the parameter value to set.
+func FsconfigSetString(fd int, key string, value string) (err error) {
+	var valuep *byte
+	if valuep, err = BytePtrFromString(value); err != nil {
+		return
+	}
+	return fsconfigCommon(fd, FSCONFIG_SET_STRING, key, valuep, 0)
+}
+
+// FsconfigSetBinary is equivalent to fsconfig(2) called
+// with cmd == FSCONFIG_SET_BINARY.
+//
+// fd is the filesystem context to act upon.
+// key the parameter key to set.
+// value is the parameter value to set.
+func FsconfigSetBinary(fd int, key string, value []byte) (err error) {
+	if len(value) == 0 {
+		return EINVAL
+	}
+	return fsconfigCommon(fd, FSCONFIG_SET_BINARY, key, &value[0], len(value))
+}
+
+// FsconfigSetPath is equivalent to fsconfig(2) called
+// with cmd == FSCONFIG_SET_PATH.
+//
+// fd is the filesystem context to act upon.
+// key the parameter key to set.
+// path is a non-empty path for specified key.
+// atfd is a file descriptor at which to start lookup from or AT_FDCWD.
+func FsconfigSetPath(fd int, key string, path string, atfd int) (err error) {
+	var valuep *byte
+	if valuep, err = BytePtrFromString(path); err != nil {
+		return
+	}
+	return fsconfigCommon(fd, FSCONFIG_SET_PATH, key, valuep, atfd)
+}
+
+// FsconfigSetPathEmpty is equivalent to fsconfig(2) called
+// with cmd == FSCONFIG_SET_PATH_EMPTY. The same as
+// FconfigSetPath but with AT_PATH_EMPTY implied.
+func FsconfigSetPathEmpty(fd int, key string, path string, atfd int) (err error) {
+	var valuep *byte
+	if valuep, err = BytePtrFromString(path); err != nil {
+		return
+	}
+	return fsconfigCommon(fd, FSCONFIG_SET_PATH_EMPTY, key, valuep, atfd)
+}
+
+// FsconfigSetFd is equivalent to fsconfig(2) called
+// with cmd == FSCONFIG_SET_FD.
+//
+// fd is the filesystem context to act upon.
+// key the parameter key to set.
+// value is a file descriptor to be assigned to specified key.
+func FsconfigSetFd(fd int, key string, value int) (err error) {
+	return fsconfigCommon(fd, FSCONFIG_SET_FD, key, nil, value)
+}
+
+// FsconfigCreate is equivalent to fsconfig(2) called
+// with cmd == FSCONFIG_CMD_CREATE.
+//
+// fd is the filesystem context to act upon.
+func FsconfigCreate(fd int) (err error) {
+	return fsconfig(fd, FSCONFIG_CMD_CREATE, nil, nil, 0)
+}
+
+// FsconfigReconfigure is equivalent to fsconfig(2) called
+// with cmd == FSCONFIG_CMD_RECONFIGURE.
+//
+// fd is the filesystem context to act upon.
+func FsconfigReconfigure(fd int) (err error) {
+	return fsconfig(fd, FSCONFIG_CMD_RECONFIGURE, nil, nil, 0)
+}
+
 //sys	Getdents(fd int, buf []byte) (n int, err error) = SYS_GETDENTS64
 //sysnb	Getpgid(pid int) (pgid int, err error)
 
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux.go b/vendor/golang.org/x/sys/unix/zsyscall_linux.go
index 1488d27128..87d8612a1d 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_linux.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_linux.go
@@ -906,6 +906,16 @@ func Fspick(dirfd int, pathName string, flags int) (fd int, err error) {
 
 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
 
+func fsconfig(fd int, cmd uint, key *byte, value *byte, aux int) (err error) {
+	_, _, e1 := Syscall6(SYS_FSCONFIG, uintptr(fd), uintptr(cmd), uintptr(unsafe.Pointer(key)), uintptr(unsafe.Pointer(value)), uintptr(aux), 0)
+	if e1 != 0 {
+		err = errnoErr(e1)
+	}
+	return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
 func Getdents(fd int, buf []byte) (n int, err error) {
 	var _p0 unsafe.Pointer
 	if len(buf) > 0 {
diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux.go b/vendor/golang.org/x/sys/unix/ztypes_linux.go
index dc0c955eec..eff6bcdef8 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_linux.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_linux.go
@@ -836,6 +836,15 @@ const (
 	FSPICK_EMPTY_PATH       = 0x8
 
 	FSMOUNT_CLOEXEC = 0x1
+
+	FSCONFIG_SET_FLAG        = 0x0
+	FSCONFIG_SET_STRING      = 0x1
+	FSCONFIG_SET_BINARY      = 0x2
+	FSCONFIG_SET_PATH        = 0x3
+	FSCONFIG_SET_PATH_EMPTY  = 0x4
+	FSCONFIG_SET_FD          = 0x5
+	FSCONFIG_CMD_CREATE      = 0x6
+	FSCONFIG_CMD_RECONFIGURE = 0x7
 )
 
 type OpenHow struct {
@@ -1550,6 +1559,7 @@ const (
 	IFLA_DEVLINK_PORT                          = 0x3e
 	IFLA_GSO_IPV4_MAX_SIZE                     = 0x3f
 	IFLA_GRO_IPV4_MAX_SIZE                     = 0x40
+	IFLA_DPLL_PIN                              = 0x41
 	IFLA_PROTO_DOWN_REASON_UNSPEC              = 0x0
 	IFLA_PROTO_DOWN_REASON_MASK                = 0x1
 	IFLA_PROTO_DOWN_REASON_VALUE               = 0x2
@@ -1565,6 +1575,7 @@ const (
 	IFLA_INET6_ICMP6STATS                      = 0x6
 	IFLA_INET6_TOKEN                           = 0x7
 	IFLA_INET6_ADDR_GEN_MODE                   = 0x8
+	IFLA_INET6_RA_MTU                          = 0x9
 	IFLA_BR_UNSPEC                             = 0x0
 	IFLA_BR_FORWARD_DELAY                      = 0x1
 	IFLA_BR_HELLO_TIME                         = 0x2
@@ -1612,6 +1623,9 @@ const (
 	IFLA_BR_MCAST_MLD_VERSION                  = 0x2c
 	IFLA_BR_VLAN_STATS_PER_PORT                = 0x2d
 	IFLA_BR_MULTI_BOOLOPT                      = 0x2e
+	IFLA_BR_MCAST_QUERIER_STATE                = 0x2f
+	IFLA_BR_FDB_N_LEARNED                      = 0x30
+	IFLA_BR_FDB_MAX_LEARNED                    = 0x31
 	IFLA_BRPORT_UNSPEC                         = 0x0
 	IFLA_BRPORT_STATE                          = 0x1
 	IFLA_BRPORT_PRIORITY                       = 0x2
@@ -1649,6 +1663,14 @@ const (
 	IFLA_BRPORT_BACKUP_PORT                    = 0x22
 	IFLA_BRPORT_MRP_RING_OPEN                  = 0x23
 	IFLA_BRPORT_MRP_IN_OPEN                    = 0x24
+	IFLA_BRPORT_MCAST_EHT_HOSTS_LIMIT          = 0x25
+	IFLA_BRPORT_MCAST_EHT_HOSTS_CNT            = 0x26
+	IFLA_BRPORT_LOCKED                         = 0x27
+	IFLA_BRPORT_MAB                            = 0x28
+	IFLA_BRPORT_MCAST_N_GROUPS                 = 0x29
+	IFLA_BRPORT_MCAST_MAX_GROUPS               = 0x2a
+	IFLA_BRPORT_NEIGH_VLAN_SUPPRESS            = 0x2b
+	IFLA_BRPORT_BACKUP_NHID                    = 0x2c
 	IFLA_INFO_UNSPEC                           = 0x0
 	IFLA_INFO_KIND                             = 0x1
 	IFLA_INFO_DATA                             = 0x2
@@ -1670,6 +1692,9 @@ const (
 	IFLA_MACVLAN_MACADDR                       = 0x4
 	IFLA_MACVLAN_MACADDR_DATA                  = 0x5
 	IFLA_MACVLAN_MACADDR_COUNT                 = 0x6
+	IFLA_MACVLAN_BC_QUEUE_LEN                  = 0x7
+	IFLA_MACVLAN_BC_QUEUE_LEN_USED             = 0x8
+	IFLA_MACVLAN_BC_CUTOFF                     = 0x9
 	IFLA_VRF_UNSPEC                            = 0x0
 	IFLA_VRF_TABLE                             = 0x1
 	IFLA_VRF_PORT_UNSPEC                       = 0x0
@@ -1693,9 +1718,22 @@ const (
 	IFLA_XFRM_UNSPEC                           = 0x0
 	IFLA_XFRM_LINK                             = 0x1
 	IFLA_XFRM_IF_ID                            = 0x2
+	IFLA_XFRM_COLLECT_METADATA                 = 0x3
 	IFLA_IPVLAN_UNSPEC                         = 0x0
 	IFLA_IPVLAN_MODE                           = 0x1
 	IFLA_IPVLAN_FLAGS                          = 0x2
+	NETKIT_NEXT                                = -0x1
+	NETKIT_PASS                                = 0x0
+	NETKIT_DROP                                = 0x2
+	NETKIT_REDIRECT                            = 0x7
+	NETKIT_L2                                  = 0x0
+	NETKIT_L3                                  = 0x1
+	IFLA_NETKIT_UNSPEC                         = 0x0
+	IFLA_NETKIT_PEER_INFO                      = 0x1
+	IFLA_NETKIT_PRIMARY                        = 0x2
+	IFLA_NETKIT_POLICY                         = 0x3
+	IFLA_NETKIT_PEER_POLICY                    = 0x4
+	IFLA_NETKIT_MODE                           = 0x5
 	IFLA_VXLAN_UNSPEC                          = 0x0
 	IFLA_VXLAN_ID                              = 0x1
 	IFLA_VXLAN_GROUP                           = 0x2
@@ -1726,6 +1764,8 @@ const (
 	IFLA_VXLAN_GPE                             = 0x1b
 	IFLA_VXLAN_TTL_INHERIT                     = 0x1c
 	IFLA_VXLAN_DF                              = 0x1d
+	IFLA_VXLAN_VNIFILTER                       = 0x1e
+	IFLA_VXLAN_LOCALBYPASS                     = 0x1f
 	IFLA_GENEVE_UNSPEC                         = 0x0
 	IFLA_GENEVE_ID                             = 0x1
 	IFLA_GENEVE_REMOTE                         = 0x2
@@ -1740,6 +1780,7 @@ const (
 	IFLA_GENEVE_LABEL                          = 0xb
 	IFLA_GENEVE_TTL_INHERIT                    = 0xc
 	IFLA_GENEVE_DF                             = 0xd
+	IFLA_GENEVE_INNER_PROTO_INHERIT            = 0xe
 	IFLA_BAREUDP_UNSPEC                        = 0x0
 	IFLA_BAREUDP_PORT                          = 0x1
 	IFLA_BAREUDP_ETHERTYPE                     = 0x2
@@ -1752,6 +1793,8 @@ const (
 	IFLA_GTP_FD1                               = 0x2
 	IFLA_GTP_PDP_HASHSIZE                      = 0x3
 	IFLA_GTP_ROLE                              = 0x4
+	IFLA_GTP_CREATE_SOCKETS                    = 0x5
+	IFLA_GTP_RESTART_COUNT                     = 0x6
 	IFLA_BOND_UNSPEC                           = 0x0
 	IFLA_BOND_MODE                             = 0x1
 	IFLA_BOND_ACTIVE_SLAVE                     = 0x2
@@ -1781,6 +1824,9 @@ const (
 	IFLA_BOND_AD_ACTOR_SYSTEM                  = 0x1a
 	IFLA_BOND_TLB_DYNAMIC_LB                   = 0x1b
 	IFLA_BOND_PEER_NOTIF_DELAY                 = 0x1c
+	IFLA_BOND_AD_LACP_ACTIVE                   = 0x1d
+	IFLA_BOND_MISSED_MAX                       = 0x1e
+	IFLA_BOND_NS_IP6_TARGET                    = 0x1f
 	IFLA_BOND_AD_INFO_UNSPEC                   = 0x0
 	IFLA_BOND_AD_INFO_AGGREGATOR               = 0x1
 	IFLA_BOND_AD_INFO_NUM_PORTS                = 0x2
@@ -1796,6 +1842,7 @@ const (
 	IFLA_BOND_SLAVE_AD_AGGREGATOR_ID           = 0x6
 	IFLA_BOND_SLAVE_AD_ACTOR_OPER_PORT_STATE   = 0x7
 	IFLA_BOND_SLAVE_AD_PARTNER_OPER_PORT_STATE = 0x8
+	IFLA_BOND_SLAVE_PRIO                       = 0x9
 	IFLA_VF_INFO_UNSPEC                        = 0x0
 	IFLA_VF_INFO                               = 0x1
 	IFLA_VF_UNSPEC                             = 0x0
@@ -1854,8 +1901,16 @@ const (
 	IFLA_STATS_LINK_XSTATS_SLAVE               = 0x3
 	IFLA_STATS_LINK_OFFLOAD_XSTATS             = 0x4
 	IFLA_STATS_AF_SPEC                         = 0x5
+	IFLA_STATS_GETSET_UNSPEC                   = 0x0
+	IFLA_STATS_GET_FILTERS                     = 0x1
+	IFLA_STATS_SET_OFFLOAD_XSTATS_L3_STATS     = 0x2
 	IFLA_OFFLOAD_XSTATS_UNSPEC                 = 0x0
 	IFLA_OFFLOAD_XSTATS_CPU_HIT                = 0x1
+	IFLA_OFFLOAD_XSTATS_HW_S_INFO              = 0x2
+	IFLA_OFFLOAD_XSTATS_L3_STATS               = 0x3
+	IFLA_OFFLOAD_XSTATS_HW_S_INFO_UNSPEC       = 0x0
+	IFLA_OFFLOAD_XSTATS_HW_S_INFO_REQUEST      = 0x1
+	IFLA_OFFLOAD_XSTATS_HW_S_INFO_USED         = 0x2
 	IFLA_XDP_UNSPEC                            = 0x0
 	IFLA_XDP_FD                                = 0x1
 	IFLA_XDP_ATTACHED                          = 0x2
@@ -1885,6 +1940,11 @@ const (
 	IFLA_RMNET_UNSPEC                          = 0x0
 	IFLA_RMNET_MUX_ID                          = 0x1
 	IFLA_RMNET_FLAGS                           = 0x2
+	IFLA_MCTP_UNSPEC                           = 0x0
+	IFLA_MCTP_NET                              = 0x1
+	IFLA_DSA_UNSPEC                            = 0x0
+	IFLA_DSA_CONDUIT                           = 0x1
+	IFLA_DSA_MASTER                            = 0x1
 )
 
 const (
-- 
cgit v1.2.3


From 5d00501105db37fd7faf22cb093779332416207f Mon Sep 17 00:00:00 2001
From: osidorkin <osidorkin@yandex-team.com>
Date: Mon, 8 Apr 2024 11:52:28 +0300
Subject: YT-20971: Check for actual clock_cluster_tag in generateTimestamp
 11502915d95ae90898a9b08a451054aa148accde

---
 .../transaction_client/remote_timestamp_provider.cpp  | 19 ++++++++++++++++---
 yt/yt/core/rpc/public.h                               |  2 ++
 .../transaction_client/proto/timestamp_service.proto  |  1 +
 3 files changed, 19 insertions(+), 3 deletions(-)

diff --git a/yt/yt/client/transaction_client/remote_timestamp_provider.cpp b/yt/yt/client/transaction_client/remote_timestamp_provider.cpp
index cf2b976dab..c45478975f 100644
--- a/yt/yt/client/transaction_client/remote_timestamp_provider.cpp
+++ b/yt/yt/client/transaction_client/remote_timestamp_provider.cpp
@@ -87,9 +87,22 @@ private:
         if (clockClusterTag != InvalidCellTag) {
             req->set_clock_cluster_tag(ToProto<int>(clockClusterTag));
         }
-        return req->Invoke().Apply(BIND([] (const TTimestampServiceProxy::TRspGenerateTimestampsPtr& rsp) {
-            return static_cast<TTimestamp>(rsp->timestamp());
-        }));
+        return req->Invoke().Apply(
+            BIND([clockClusterTag] (const TTimestampServiceProxy::TRspGenerateTimestampsPtr& rsp) {
+            auto responseClockClusterTag = rsp->has_clock_cluster_tag()
+                ? FromProto<TCellTag>(rsp->clock_cluster_tag())
+                : InvalidCellTag;
+
+            if (clockClusterTag != InvalidCellTag && responseClockClusterTag != InvalidCellTag &&
+                clockClusterTag != responseClockClusterTag)
+            {
+                THROW_ERROR_EXCEPTION(NRpc::EErrorCode::ClockClusterTagMismatch, "Clock cluster tag mismatch")
+                    << TErrorAttribute("request_clock_cluster_tag", clockClusterTag)
+                    << TErrorAttribute("response_clock_cluster_tag", responseClockClusterTag);
+            }
+
+                return static_cast<TTimestamp>(rsp->timestamp());
+            }));
     }
 };
 
diff --git a/yt/yt/core/rpc/public.h b/yt/yt/core/rpc/public.h
index 759f741bd8..db8dff99fb 100644
--- a/yt/yt/core/rpc/public.h
+++ b/yt/yt/core/rpc/public.h
@@ -185,6 +185,8 @@ YT_DEFINE_ERROR_ENUM(
     ((SslError)                     (static_cast<int>(NBus::EErrorCode::SslError)))
     ((MemoryOverflow)               (120))
     ((GlobalDiscoveryError)         (121)) // Single peer discovery interrupts discovery session.
+    ((UnknownClockClusterTag)       (122))
+    ((ClockClusterTagMismatch)      (123))
 );
 
 DEFINE_ENUM(EMessageFormat,
diff --git a/yt/yt_proto/yt/client/transaction_client/proto/timestamp_service.proto b/yt/yt_proto/yt/client/transaction_client/proto/timestamp_service.proto
index 7bc9ec79a8..8ceccfff33 100644
--- a/yt/yt_proto/yt/client/transaction_client/proto/timestamp_service.proto
+++ b/yt/yt_proto/yt/client/transaction_client/proto/timestamp_service.proto
@@ -11,6 +11,7 @@ message TReqGenerateTimestamps
 message TRspGenerateTimestamps
 {
     required int64 timestamp = 1;
+    optional int32 clock_cluster_tag = 2;
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-- 
cgit v1.2.3


From cafb490be5f77760f2612e70ec174dd1e8fb8651 Mon Sep 17 00:00:00 2001
From: robot-piglet <robot-piglet@yandex-team.com>
Date: Mon, 8 Apr 2024 15:03:00 +0300
Subject: Intermediate changes

---
 contrib/libs/fmt/include/fmt/args.h               |  234 ---
 contrib/libs/fmt/include/fmt/chrono.h             | 2067 -------------------
 contrib/libs/fmt/include/fmt/color.h              |  638 ------
 contrib/libs/fmt/include/fmt/compile.h            |  642 ------
 contrib/libs/fmt/include/fmt/ostream.h            |  135 --
 contrib/libs/fmt/include/fmt/printf.h             |  657 -------
 contrib/libs/fmt/include/fmt/ranges.h             |  793 --------
 contrib/libs/fmt/test/args-test.cc                |  186 --
 contrib/libs/fmt/test/args-test/ya.make           |   31 -
 contrib/libs/fmt/test/assert-test.cc              |   31 -
 contrib/libs/fmt/test/assert-test/ya.make         |   31 -
 contrib/libs/fmt/test/chrono-test.cc              |  625 ------
 contrib/libs/fmt/test/chrono-test/ya.make         |   31 -
 contrib/libs/fmt/test/color-test.cc               |   66 -
 contrib/libs/fmt/test/color-test/ya.make          |   31 -
 contrib/libs/fmt/test/compile-fp-test.cc          |   62 -
 contrib/libs/fmt/test/compile-fp-test/ya.make     |   32 -
 contrib/libs/fmt/test/compile-test.cc             |  376 ----
 contrib/libs/fmt/test/compile-test/ya.make        |   31 -
 contrib/libs/fmt/test/core-test.cc                |  923 ---------
 contrib/libs/fmt/test/core-test/ya.make           |   31 -
 contrib/libs/fmt/test/enforce-checks-test.cc      |   63 -
 contrib/libs/fmt/test/enforce-checks-test/ya.make |   32 -
 contrib/libs/fmt/test/format-impl-test.cc         |  377 ----
 contrib/libs/fmt/test/format-impl-test/ya.make    |   30 -
 contrib/libs/fmt/test/format-test.cc              | 2190 ---------------------
 contrib/libs/fmt/test/format-test/ya.make         |   33 -
 contrib/libs/fmt/test/gtest-extra-test.cc         |  413 ----
 contrib/libs/fmt/test/gtest-extra-test/ya.make    |   31 -
 contrib/libs/fmt/test/gtest-extra.cc              |   80 -
 contrib/libs/fmt/test/gtest-extra.h               |  171 --
 contrib/libs/fmt/test/header-only-test.cc         |   11 -
 contrib/libs/fmt/test/mock-allocator.h            |   64 -
 contrib/libs/fmt/test/os-test.cc                  |  551 ------
 contrib/libs/fmt/test/os-test/ya.make             |   31 -
 contrib/libs/fmt/test/ostream-test.cc             |  301 ---
 contrib/libs/fmt/test/ostream-test/ya.make        |   31 -
 contrib/libs/fmt/test/posix-mock-test.cc          |  540 -----
 contrib/libs/fmt/test/posix-mock-test/ya.make     |   32 -
 contrib/libs/fmt/test/posix-mock.h                |   78 -
 contrib/libs/fmt/test/printf-test.cc              |  588 ------
 contrib/libs/fmt/test/printf-test/ya.make         |   31 -
 contrib/libs/fmt/test/ranges-odr-test.cc          |   17 -
 contrib/libs/fmt/test/ranges-test.cc              |  363 ----
 contrib/libs/fmt/test/ranges-test/ya.make         |   32 -
 contrib/libs/fmt/test/scan-test.cc                |  116 --
 contrib/libs/fmt/test/scan-test/ya.make           |   31 -
 contrib/libs/fmt/test/scan.h                      |  241 ---
 contrib/libs/fmt/test/test-assert.h               |   39 -
 contrib/libs/fmt/test/unicode-test.cc             |   48 -
 contrib/libs/fmt/test/unicode-test/ya.make        |   32 -
 contrib/libs/fmt/test/util.cc                     |   46 -
 contrib/libs/fmt/test/util.h                      |   85 -
 contrib/libs/fmt/test/xchar-test.cc               |  502 -----
 contrib/libs/fmt/test/xchar-test/ya.make          |   31 -
 contrib/libs/fmt/test/ya.make                     |   57 -
 contrib/libs/fmt/ya.make                          |   14 +-
 57 files changed, 5 insertions(+), 14980 deletions(-)
 delete mode 100644 contrib/libs/fmt/include/fmt/args.h
 delete mode 100644 contrib/libs/fmt/include/fmt/chrono.h
 delete mode 100644 contrib/libs/fmt/include/fmt/color.h
 delete mode 100644 contrib/libs/fmt/include/fmt/compile.h
 delete mode 100644 contrib/libs/fmt/include/fmt/ostream.h
 delete mode 100644 contrib/libs/fmt/include/fmt/printf.h
 delete mode 100644 contrib/libs/fmt/include/fmt/ranges.h
 delete mode 100644 contrib/libs/fmt/test/args-test.cc
 delete mode 100644 contrib/libs/fmt/test/args-test/ya.make
 delete mode 100644 contrib/libs/fmt/test/assert-test.cc
 delete mode 100644 contrib/libs/fmt/test/assert-test/ya.make
 delete mode 100644 contrib/libs/fmt/test/chrono-test.cc
 delete mode 100644 contrib/libs/fmt/test/chrono-test/ya.make
 delete mode 100644 contrib/libs/fmt/test/color-test.cc
 delete mode 100644 contrib/libs/fmt/test/color-test/ya.make
 delete mode 100644 contrib/libs/fmt/test/compile-fp-test.cc
 delete mode 100644 contrib/libs/fmt/test/compile-fp-test/ya.make
 delete mode 100644 contrib/libs/fmt/test/compile-test.cc
 delete mode 100644 contrib/libs/fmt/test/compile-test/ya.make
 delete mode 100644 contrib/libs/fmt/test/core-test.cc
 delete mode 100644 contrib/libs/fmt/test/core-test/ya.make
 delete mode 100644 contrib/libs/fmt/test/enforce-checks-test.cc
 delete mode 100644 contrib/libs/fmt/test/enforce-checks-test/ya.make
 delete mode 100644 contrib/libs/fmt/test/format-impl-test.cc
 delete mode 100644 contrib/libs/fmt/test/format-impl-test/ya.make
 delete mode 100644 contrib/libs/fmt/test/format-test.cc
 delete mode 100644 contrib/libs/fmt/test/format-test/ya.make
 delete mode 100644 contrib/libs/fmt/test/gtest-extra-test.cc
 delete mode 100644 contrib/libs/fmt/test/gtest-extra-test/ya.make
 delete mode 100644 contrib/libs/fmt/test/gtest-extra.cc
 delete mode 100644 contrib/libs/fmt/test/gtest-extra.h
 delete mode 100644 contrib/libs/fmt/test/header-only-test.cc
 delete mode 100644 contrib/libs/fmt/test/mock-allocator.h
 delete mode 100644 contrib/libs/fmt/test/os-test.cc
 delete mode 100644 contrib/libs/fmt/test/os-test/ya.make
 delete mode 100644 contrib/libs/fmt/test/ostream-test.cc
 delete mode 100644 contrib/libs/fmt/test/ostream-test/ya.make
 delete mode 100644 contrib/libs/fmt/test/posix-mock-test.cc
 delete mode 100644 contrib/libs/fmt/test/posix-mock-test/ya.make
 delete mode 100644 contrib/libs/fmt/test/posix-mock.h
 delete mode 100644 contrib/libs/fmt/test/printf-test.cc
 delete mode 100644 contrib/libs/fmt/test/printf-test/ya.make
 delete mode 100644 contrib/libs/fmt/test/ranges-odr-test.cc
 delete mode 100644 contrib/libs/fmt/test/ranges-test.cc
 delete mode 100644 contrib/libs/fmt/test/ranges-test/ya.make
 delete mode 100644 contrib/libs/fmt/test/scan-test.cc
 delete mode 100644 contrib/libs/fmt/test/scan-test/ya.make
 delete mode 100644 contrib/libs/fmt/test/scan.h
 delete mode 100644 contrib/libs/fmt/test/test-assert.h
 delete mode 100644 contrib/libs/fmt/test/unicode-test.cc
 delete mode 100644 contrib/libs/fmt/test/unicode-test/ya.make
 delete mode 100644 contrib/libs/fmt/test/util.cc
 delete mode 100644 contrib/libs/fmt/test/util.h
 delete mode 100644 contrib/libs/fmt/test/xchar-test.cc
 delete mode 100644 contrib/libs/fmt/test/xchar-test/ya.make
 delete mode 100644 contrib/libs/fmt/test/ya.make

diff --git a/contrib/libs/fmt/include/fmt/args.h b/contrib/libs/fmt/include/fmt/args.h
deleted file mode 100644
index 9a8e4ed2ce..0000000000
--- a/contrib/libs/fmt/include/fmt/args.h
+++ /dev/null
@@ -1,234 +0,0 @@
-// Formatting library for C++ - dynamic format arguments
-//
-// Copyright (c) 2012 - present, Victor Zverovich
-// All rights reserved.
-//
-// For the license information refer to format.h.
-
-#ifndef FMT_ARGS_H_
-#define FMT_ARGS_H_
-
-#include <functional>  // std::reference_wrapper
-#include <memory>      // std::unique_ptr
-#include <vector>
-
-#include "core.h"
-
-FMT_BEGIN_NAMESPACE
-
-namespace detail {
-
-template <typename T> struct is_reference_wrapper : std::false_type {};
-template <typename T>
-struct is_reference_wrapper<std::reference_wrapper<T>> : std::true_type {};
-
-template <typename T> const T& unwrap(const T& v) { return v; }
-template <typename T> const T& unwrap(const std::reference_wrapper<T>& v) {
-  return static_cast<const T&>(v);
-}
-
-class dynamic_arg_list {
-  // Workaround for clang's -Wweak-vtables. Unlike for regular classes, for
-  // templates it doesn't complain about inability to deduce single translation
-  // unit for placing vtable. So storage_node_base is made a fake template.
-  template <typename = void> struct node {
-    virtual ~node() = default;
-    std::unique_ptr<node<>> next;
-  };
-
-  template <typename T> struct typed_node : node<> {
-    T value;
-
-    template <typename Arg>
-    FMT_CONSTEXPR typed_node(const Arg& arg) : value(arg) {}
-
-    template <typename Char>
-    FMT_CONSTEXPR typed_node(const basic_string_view<Char>& arg)
-        : value(arg.data(), arg.size()) {}
-  };
-
-  std::unique_ptr<node<>> head_;
-
- public:
-  template <typename T, typename Arg> const T& push(const Arg& arg) {
-    auto new_node = std::unique_ptr<typed_node<T>>(new typed_node<T>(arg));
-    auto& value = new_node->value;
-    new_node->next = std::move(head_);
-    head_ = std::move(new_node);
-    return value;
-  }
-};
-}  // namespace detail
-
-/**
-  \rst
-  A dynamic version of `fmt::format_arg_store`.
-  It's equipped with a storage to potentially temporary objects which lifetimes
-  could be shorter than the format arguments object.
-
-  It can be implicitly converted into `~fmt::basic_format_args` for passing
-  into type-erased formatting functions such as `~fmt::vformat`.
-  \endrst
- */
-template <typename Context>
-class dynamic_format_arg_store
-#if FMT_GCC_VERSION && FMT_GCC_VERSION < 409
-    // Workaround a GCC template argument substitution bug.
-    : public basic_format_args<Context>
-#endif
-{
- private:
-  using char_type = typename Context::char_type;
-
-  template <typename T> struct need_copy {
-    static constexpr detail::type mapped_type =
-        detail::mapped_type_constant<T, Context>::value;
-
-    enum {
-      value = !(detail::is_reference_wrapper<T>::value ||
-                std::is_same<T, basic_string_view<char_type>>::value ||
-                std::is_same<T, detail::std_string_view<char_type>>::value ||
-                (mapped_type != detail::type::cstring_type &&
-                 mapped_type != detail::type::string_type &&
-                 mapped_type != detail::type::custom_type))
-    };
-  };
-
-  template <typename T>
-  using stored_type = conditional_t<detail::is_string<T>::value &&
-                                        !has_formatter<T, Context>::value &&
-                                        !detail::is_reference_wrapper<T>::value,
-                                    std::basic_string<char_type>, T>;
-
-  // Storage of basic_format_arg must be contiguous.
-  std::vector<basic_format_arg<Context>> data_;
-  std::vector<detail::named_arg_info<char_type>> named_info_;
-
-  // Storage of arguments not fitting into basic_format_arg must grow
-  // without relocation because items in data_ refer to it.
-  detail::dynamic_arg_list dynamic_args_;
-
-  friend class basic_format_args<Context>;
-
-  unsigned long long get_types() const {
-    return detail::is_unpacked_bit | data_.size() |
-           (named_info_.empty()
-                ? 0ULL
-                : static_cast<unsigned long long>(detail::has_named_args_bit));
-  }
-
-  const basic_format_arg<Context>* data() const {
-    return named_info_.empty() ? data_.data() : data_.data() + 1;
-  }
-
-  template <typename T> void emplace_arg(const T& arg) {
-    data_.emplace_back(detail::make_arg<Context>(arg));
-  }
-
-  template <typename T>
-  void emplace_arg(const detail::named_arg<char_type, T>& arg) {
-    if (named_info_.empty()) {
-      constexpr const detail::named_arg_info<char_type>* zero_ptr{nullptr};
-      data_.insert(data_.begin(), {zero_ptr, 0});
-    }
-    data_.emplace_back(detail::make_arg<Context>(detail::unwrap(arg.value)));
-    auto pop_one = [](std::vector<basic_format_arg<Context>>* data) {
-      data->pop_back();
-    };
-    std::unique_ptr<std::vector<basic_format_arg<Context>>, decltype(pop_one)>
-        guard{&data_, pop_one};
-    named_info_.push_back({arg.name, static_cast<int>(data_.size() - 2u)});
-    data_[0].value_.named_args = {named_info_.data(), named_info_.size()};
-    guard.release();
-  }
-
- public:
-  constexpr dynamic_format_arg_store() = default;
-
-  /**
-    \rst
-    Adds an argument into the dynamic store for later passing to a formatting
-    function.
-
-    Note that custom types and string types (but not string views) are copied
-    into the store dynamically allocating memory if necessary.
-
-    **Example**::
-
-      fmt::dynamic_format_arg_store<fmt::format_context> store;
-      store.push_back(42);
-      store.push_back("abc");
-      store.push_back(1.5f);
-      std::string result = fmt::vformat("{} and {} and {}", store);
-    \endrst
-  */
-  template <typename T> void push_back(const T& arg) {
-    if (detail::const_check(need_copy<T>::value))
-      emplace_arg(dynamic_args_.push<stored_type<T>>(arg));
-    else
-      emplace_arg(detail::unwrap(arg));
-  }
-
-  /**
-    \rst
-    Adds a reference to the argument into the dynamic store for later passing to
-    a formatting function.
-
-    **Example**::
-
-      fmt::dynamic_format_arg_store<fmt::format_context> store;
-      char band[] = "Rolling Stones";
-      store.push_back(std::cref(band));
-      band[9] = 'c'; // Changing str affects the output.
-      std::string result = fmt::vformat("{}", store);
-      // result == "Rolling Scones"
-    \endrst
-  */
-  template <typename T> void push_back(std::reference_wrapper<T> arg) {
-    static_assert(
-        need_copy<T>::value,
-        "objects of built-in types and string views are always copied");
-    emplace_arg(arg.get());
-  }
-
-  /**
-    Adds named argument into the dynamic store for later passing to a formatting
-    function. ``std::reference_wrapper`` is supported to avoid copying of the
-    argument. The name is always copied into the store.
-  */
-  template <typename T>
-  void push_back(const detail::named_arg<char_type, T>& arg) {
-    const char_type* arg_name =
-        dynamic_args_.push<std::basic_string<char_type>>(arg.name).c_str();
-    if (detail::const_check(need_copy<T>::value)) {
-      emplace_arg(
-          fmt::arg(arg_name, dynamic_args_.push<stored_type<T>>(arg.value)));
-    } else {
-      emplace_arg(fmt::arg(arg_name, arg.value));
-    }
-  }
-
-  /** Erase all elements from the store */
-  void clear() {
-    data_.clear();
-    named_info_.clear();
-    dynamic_args_ = detail::dynamic_arg_list();
-  }
-
-  /**
-    \rst
-    Reserves space to store at least *new_cap* arguments including
-    *new_cap_named* named arguments.
-    \endrst
-  */
-  void reserve(size_t new_cap, size_t new_cap_named) {
-    FMT_ASSERT(new_cap >= new_cap_named,
-               "Set of arguments includes set of named arguments");
-    data_.reserve(new_cap);
-    named_info_.reserve(new_cap_named);
-  }
-};
-
-FMT_END_NAMESPACE
-
-#endif  // FMT_ARGS_H_
diff --git a/contrib/libs/fmt/include/fmt/chrono.h b/contrib/libs/fmt/include/fmt/chrono.h
deleted file mode 100644
index 682efd8d21..0000000000
--- a/contrib/libs/fmt/include/fmt/chrono.h
+++ /dev/null
@@ -1,2067 +0,0 @@
-// Formatting library for C++ - chrono support
-//
-// Copyright (c) 2012 - present, Victor Zverovich
-// All rights reserved.
-//
-// For the license information refer to format.h.
-
-#ifndef FMT_CHRONO_H_
-#define FMT_CHRONO_H_
-
-#include <algorithm>
-#include <chrono>
-#include <ctime>
-#include <iterator>
-#include <locale>
-#include <ostream>
-#include <type_traits>
-
-#include "format.h"
-
-FMT_BEGIN_NAMESPACE
-
-// Enable tzset.
-#ifndef FMT_USE_TZSET
-// UWP doesn't provide _tzset.
-#  if FMT_HAS_INCLUDE("winapifamily.h")
-#    include <winapifamily.h>
-#  endif
-#  if defined(_WIN32) && (!defined(WINAPI_FAMILY) || \
-                          (WINAPI_FAMILY == WINAPI_FAMILY_DESKTOP_APP))
-#    define FMT_USE_TZSET 1
-#  else
-#    define FMT_USE_TZSET 0
-#  endif
-#endif
-
-// Enable safe chrono durations, unless explicitly disabled.
-#ifndef FMT_SAFE_DURATION_CAST
-#  define FMT_SAFE_DURATION_CAST 1
-#endif
-#if FMT_SAFE_DURATION_CAST
-
-// For conversion between std::chrono::durations without undefined
-// behaviour or erroneous results.
-// This is a stripped down version of duration_cast, for inclusion in fmt.
-// See https://github.com/pauldreik/safe_duration_cast
-//
-// Copyright Paul Dreik 2019
-namespace safe_duration_cast {
-
-template <typename To, typename From,
-          FMT_ENABLE_IF(!std::is_same<From, To>::value &&
-                        std::numeric_limits<From>::is_signed ==
-                            std::numeric_limits<To>::is_signed)>
-FMT_CONSTEXPR To lossless_integral_conversion(const From from, int& ec) {
-  ec = 0;
-  using F = std::numeric_limits<From>;
-  using T = std::numeric_limits<To>;
-  static_assert(F::is_integer, "From must be integral");
-  static_assert(T::is_integer, "To must be integral");
-
-  // A and B are both signed, or both unsigned.
-  if (detail::const_check(F::digits <= T::digits)) {
-    // From fits in To without any problem.
-  } else {
-    // From does not always fit in To, resort to a dynamic check.
-    if (from < (T::min)() || from > (T::max)()) {
-      // outside range.
-      ec = 1;
-      return {};
-    }
-  }
-  return static_cast<To>(from);
-}
-
-/**
- * converts From to To, without loss. If the dynamic value of from
- * can't be converted to To without loss, ec is set.
- */
-template <typename To, typename From,
-          FMT_ENABLE_IF(!std::is_same<From, To>::value &&
-                        std::numeric_limits<From>::is_signed !=
-                            std::numeric_limits<To>::is_signed)>
-FMT_CONSTEXPR To lossless_integral_conversion(const From from, int& ec) {
-  ec = 0;
-  using F = std::numeric_limits<From>;
-  using T = std::numeric_limits<To>;
-  static_assert(F::is_integer, "From must be integral");
-  static_assert(T::is_integer, "To must be integral");
-
-  if (detail::const_check(F::is_signed && !T::is_signed)) {
-    // From may be negative, not allowed!
-    if (fmt::detail::is_negative(from)) {
-      ec = 1;
-      return {};
-    }
-    // From is positive. Can it always fit in To?
-    if (detail::const_check(F::digits > T::digits) &&
-        from > static_cast<From>(detail::max_value<To>())) {
-      ec = 1;
-      return {};
-    }
-  }
-
-  if (detail::const_check(!F::is_signed && T::is_signed &&
-                          F::digits >= T::digits) &&
-      from > static_cast<From>(detail::max_value<To>())) {
-    ec = 1;
-    return {};
-  }
-  return static_cast<To>(from);  // Lossless conversion.
-}
-
-template <typename To, typename From,
-          FMT_ENABLE_IF(std::is_same<From, To>::value)>
-FMT_CONSTEXPR To lossless_integral_conversion(const From from, int& ec) {
-  ec = 0;
-  return from;
-}  // function
-
-// clang-format off
-/**
- * converts From to To if possible, otherwise ec is set.
- *
- * input                            |    output
- * ---------------------------------|---------------
- * NaN                              | NaN
- * Inf                              | Inf
- * normal, fits in output           | converted (possibly lossy)
- * normal, does not fit in output   | ec is set
- * subnormal                        | best effort
- * -Inf                             | -Inf
- */
-// clang-format on
-template <typename To, typename From,
-          FMT_ENABLE_IF(!std::is_same<From, To>::value)>
-FMT_CONSTEXPR To safe_float_conversion(const From from, int& ec) {
-  ec = 0;
-  using T = std::numeric_limits<To>;
-  static_assert(std::is_floating_point<From>::value, "From must be floating");
-  static_assert(std::is_floating_point<To>::value, "To must be floating");
-
-  // catch the only happy case
-  if (std::isfinite(from)) {
-    if (from >= T::lowest() && from <= (T::max)()) {
-      return static_cast<To>(from);
-    }
-    // not within range.
-    ec = 1;
-    return {};
-  }
-
-  // nan and inf will be preserved
-  return static_cast<To>(from);
-}  // function
-
-template <typename To, typename From,
-          FMT_ENABLE_IF(std::is_same<From, To>::value)>
-FMT_CONSTEXPR To safe_float_conversion(const From from, int& ec) {
-  ec = 0;
-  static_assert(std::is_floating_point<From>::value, "From must be floating");
-  return from;
-}
-
-/**
- * safe duration cast between integral durations
- */
-template <typename To, typename FromRep, typename FromPeriod,
-          FMT_ENABLE_IF(std::is_integral<FromRep>::value),
-          FMT_ENABLE_IF(std::is_integral<typename To::rep>::value)>
-To safe_duration_cast(std::chrono::duration<FromRep, FromPeriod> from,
-                      int& ec) {
-  using From = std::chrono::duration<FromRep, FromPeriod>;
-  ec = 0;
-  // the basic idea is that we need to convert from count() in the from type
-  // to count() in the To type, by multiplying it with this:
-  struct Factor
-      : std::ratio_divide<typename From::period, typename To::period> {};
-
-  static_assert(Factor::num > 0, "num must be positive");
-  static_assert(Factor::den > 0, "den must be positive");
-
-  // the conversion is like this: multiply from.count() with Factor::num
-  // /Factor::den and convert it to To::rep, all this without
-  // overflow/underflow. let's start by finding a suitable type that can hold
-  // both To, From and Factor::num
-  using IntermediateRep =
-      typename std::common_type<typename From::rep, typename To::rep,
-                                decltype(Factor::num)>::type;
-
-  // safe conversion to IntermediateRep
-  IntermediateRep count =
-      lossless_integral_conversion<IntermediateRep>(from.count(), ec);
-  if (ec) return {};
-  // multiply with Factor::num without overflow or underflow
-  if (detail::const_check(Factor::num != 1)) {
-    const auto max1 = detail::max_value<IntermediateRep>() / Factor::num;
-    if (count > max1) {
-      ec = 1;
-      return {};
-    }
-    const auto min1 =
-        (std::numeric_limits<IntermediateRep>::min)() / Factor::num;
-    if (count < min1) {
-      ec = 1;
-      return {};
-    }
-    count *= Factor::num;
-  }
-
-  if (detail::const_check(Factor::den != 1)) count /= Factor::den;
-  auto tocount = lossless_integral_conversion<typename To::rep>(count, ec);
-  return ec ? To() : To(tocount);
-}
-
-/**
- * safe duration_cast between floating point durations
- */
-template <typename To, typename FromRep, typename FromPeriod,
-          FMT_ENABLE_IF(std::is_floating_point<FromRep>::value),
-          FMT_ENABLE_IF(std::is_floating_point<typename To::rep>::value)>
-To safe_duration_cast(std::chrono::duration<FromRep, FromPeriod> from,
-                      int& ec) {
-  using From = std::chrono::duration<FromRep, FromPeriod>;
-  ec = 0;
-  if (std::isnan(from.count())) {
-    // nan in, gives nan out. easy.
-    return To{std::numeric_limits<typename To::rep>::quiet_NaN()};
-  }
-  // maybe we should also check if from is denormal, and decide what to do about
-  // it.
-
-  // +-inf should be preserved.
-  if (std::isinf(from.count())) {
-    return To{from.count()};
-  }
-
-  // the basic idea is that we need to convert from count() in the from type
-  // to count() in the To type, by multiplying it with this:
-  struct Factor
-      : std::ratio_divide<typename From::period, typename To::period> {};
-
-  static_assert(Factor::num > 0, "num must be positive");
-  static_assert(Factor::den > 0, "den must be positive");
-
-  // the conversion is like this: multiply from.count() with Factor::num
-  // /Factor::den and convert it to To::rep, all this without
-  // overflow/underflow. let's start by finding a suitable type that can hold
-  // both To, From and Factor::num
-  using IntermediateRep =
-      typename std::common_type<typename From::rep, typename To::rep,
-                                decltype(Factor::num)>::type;
-
-  // force conversion of From::rep -> IntermediateRep to be safe,
-  // even if it will never happen be narrowing in this context.
-  IntermediateRep count =
-      safe_float_conversion<IntermediateRep>(from.count(), ec);
-  if (ec) {
-    return {};
-  }
-
-  // multiply with Factor::num without overflow or underflow
-  if (detail::const_check(Factor::num != 1)) {
-    constexpr auto max1 = detail::max_value<IntermediateRep>() /
-                          static_cast<IntermediateRep>(Factor::num);
-    if (count > max1) {
-      ec = 1;
-      return {};
-    }
-    constexpr auto min1 = std::numeric_limits<IntermediateRep>::lowest() /
-                          static_cast<IntermediateRep>(Factor::num);
-    if (count < min1) {
-      ec = 1;
-      return {};
-    }
-    count *= static_cast<IntermediateRep>(Factor::num);
-  }
-
-  // this can't go wrong, right? den>0 is checked earlier.
-  if (detail::const_check(Factor::den != 1)) {
-    using common_t = typename std::common_type<IntermediateRep, intmax_t>::type;
-    count /= static_cast<common_t>(Factor::den);
-  }
-
-  // convert to the to type, safely
-  using ToRep = typename To::rep;
-
-  const ToRep tocount = safe_float_conversion<ToRep>(count, ec);
-  if (ec) {
-    return {};
-  }
-  return To{tocount};
-}
-}  // namespace safe_duration_cast
-#endif
-
-// Prevents expansion of a preceding token as a function-style macro.
-// Usage: f FMT_NOMACRO()
-#define FMT_NOMACRO
-
-namespace detail {
-template <typename T = void> struct null {};
-inline null<> localtime_r FMT_NOMACRO(...) { return null<>(); }
-inline null<> localtime_s(...) { return null<>(); }
-inline null<> gmtime_r(...) { return null<>(); }
-inline null<> gmtime_s(...) { return null<>(); }
-
-inline const std::locale& get_classic_locale() {
-  static const auto& locale = std::locale::classic();
-  return locale;
-}
-
-template <typename CodeUnit> struct codecvt_result {
-  static constexpr const size_t max_size = 32;
-  CodeUnit buf[max_size];
-  CodeUnit* end;
-};
-template <typename CodeUnit>
-constexpr const size_t codecvt_result<CodeUnit>::max_size;
-
-template <typename CodeUnit>
-void write_codecvt(codecvt_result<CodeUnit>& out, string_view in_buf,
-                   const std::locale& loc) {
-  using codecvt = std::codecvt<CodeUnit, char, std::mbstate_t>;
-#if FMT_CLANG_VERSION
-#  pragma clang diagnostic push
-#  pragma clang diagnostic ignored "-Wdeprecated"
-  auto& f = std::use_facet<codecvt>(loc);
-#  pragma clang diagnostic pop
-#else
-  auto& f = std::use_facet<codecvt>(loc);
-#endif
-  auto mb = std::mbstate_t();
-  const char* from_next = nullptr;
-  auto result = f.in(mb, in_buf.begin(), in_buf.end(), from_next,
-                     std::begin(out.buf), std::end(out.buf), out.end);
-  if (result != std::codecvt_base::ok)
-    FMT_THROW(format_error("failed to format time"));
-}
-
-template <typename OutputIt>
-auto write_encoded_tm_str(OutputIt out, string_view in, const std::locale& loc)
-    -> OutputIt {
-  if (detail::is_utf8() && loc != get_classic_locale()) {
-    // char16_t and char32_t codecvts are broken in MSVC (linkage errors) and
-    // gcc-4.
-#if FMT_MSC_VER != 0 || \
-    (defined(__GLIBCXX__) && !defined(_GLIBCXX_USE_DUAL_ABI))
-    // The _GLIBCXX_USE_DUAL_ABI macro is always defined in libstdc++ from gcc-5
-    // and newer.
-    using code_unit = wchar_t;
-#else
-    using code_unit = char32_t;
-#endif
-
-    using unit_t = codecvt_result<code_unit>;
-    unit_t unit;
-    write_codecvt(unit, in, loc);
-    // In UTF-8 is used one to four one-byte code units.
-    auto&& buf = basic_memory_buffer<char, unit_t::max_size * 4>();
-    for (code_unit* p = unit.buf; p != unit.end; ++p) {
-      uint32_t c = static_cast<uint32_t>(*p);
-      if (sizeof(code_unit) == 2 && c >= 0xd800 && c <= 0xdfff) {
-        // surrogate pair
-        ++p;
-        if (p == unit.end || (c & 0xfc00) != 0xd800 ||
-            (*p & 0xfc00) != 0xdc00) {
-          FMT_THROW(format_error("failed to format time"));
-        }
-        c = (c << 10) + static_cast<uint32_t>(*p) - 0x35fdc00;
-      }
-      if (c < 0x80) {
-        buf.push_back(static_cast<char>(c));
-      } else if (c < 0x800) {
-        buf.push_back(static_cast<char>(0xc0 | (c >> 6)));
-        buf.push_back(static_cast<char>(0x80 | (c & 0x3f)));
-      } else if ((c >= 0x800 && c <= 0xd7ff) || (c >= 0xe000 && c <= 0xffff)) {
-        buf.push_back(static_cast<char>(0xe0 | (c >> 12)));
-        buf.push_back(static_cast<char>(0x80 | ((c & 0xfff) >> 6)));
-        buf.push_back(static_cast<char>(0x80 | (c & 0x3f)));
-      } else if (c >= 0x10000 && c <= 0x10ffff) {
-        buf.push_back(static_cast<char>(0xf0 | (c >> 18)));
-        buf.push_back(static_cast<char>(0x80 | ((c & 0x3ffff) >> 12)));
-        buf.push_back(static_cast<char>(0x80 | ((c & 0xfff) >> 6)));
-        buf.push_back(static_cast<char>(0x80 | (c & 0x3f)));
-      } else {
-        FMT_THROW(format_error("failed to format time"));
-      }
-    }
-    return copy_str<char>(buf.data(), buf.data() + buf.size(), out);
-  }
-  return copy_str<char>(in.data(), in.data() + in.size(), out);
-}
-
-template <typename Char, typename OutputIt,
-          FMT_ENABLE_IF(!std::is_same<Char, char>::value)>
-auto write_tm_str(OutputIt out, string_view sv, const std::locale& loc)
-    -> OutputIt {
-  codecvt_result<Char> unit;
-  write_codecvt(unit, sv, loc);
-  return copy_str<Char>(unit.buf, unit.end, out);
-}
-
-template <typename Char, typename OutputIt,
-          FMT_ENABLE_IF(std::is_same<Char, char>::value)>
-auto write_tm_str(OutputIt out, string_view sv, const std::locale& loc)
-    -> OutputIt {
-  return write_encoded_tm_str(out, sv, loc);
-}
-
-template <typename Char>
-inline void do_write(buffer<Char>& buf, const std::tm& time,
-                     const std::locale& loc, char format, char modifier) {
-  auto&& format_buf = formatbuf<std::basic_streambuf<Char>>(buf);
-  auto&& os = std::basic_ostream<Char>(&format_buf);
-  os.imbue(loc);
-  using iterator = std::ostreambuf_iterator<Char>;
-  const auto& facet = std::use_facet<std::time_put<Char, iterator>>(loc);
-  auto end = facet.put(os, os, Char(' '), &time, format, modifier);
-  if (end.failed()) FMT_THROW(format_error("failed to format time"));
-}
-
-template <typename Char, typename OutputIt,
-          FMT_ENABLE_IF(!std::is_same<Char, char>::value)>
-auto write(OutputIt out, const std::tm& time, const std::locale& loc,
-           char format, char modifier = 0) -> OutputIt {
-  auto&& buf = get_buffer<Char>(out);
-  do_write<Char>(buf, time, loc, format, modifier);
-  return buf.out();
-}
-
-template <typename Char, typename OutputIt,
-          FMT_ENABLE_IF(std::is_same<Char, char>::value)>
-auto write(OutputIt out, const std::tm& time, const std::locale& loc,
-           char format, char modifier = 0) -> OutputIt {
-  auto&& buf = basic_memory_buffer<Char>();
-  do_write<char>(buf, time, loc, format, modifier);
-  return write_encoded_tm_str(out, string_view(buf.data(), buf.size()), loc);
-}
-
-}  // namespace detail
-
-FMT_MODULE_EXPORT_BEGIN
-
-/**
-  Converts given time since epoch as ``std::time_t`` value into calendar time,
-  expressed in local time. Unlike ``std::localtime``, this function is
-  thread-safe on most platforms.
- */
-inline std::tm localtime(std::time_t time) {
-  struct dispatcher {
-    std::time_t time_;
-    std::tm tm_;
-
-    dispatcher(std::time_t t) : time_(t) {}
-
-    bool run() {
-      using namespace fmt::detail;
-      return handle(localtime_r(&time_, &tm_));
-    }
-
-    bool handle(std::tm* tm) { return tm != nullptr; }
-
-    bool handle(detail::null<>) {
-      using namespace fmt::detail;
-      return fallback(localtime_s(&tm_, &time_));
-    }
-
-    bool fallback(int res) { return res == 0; }
-
-#if !FMT_MSC_VER
-    bool fallback(detail::null<>) {
-      using namespace fmt::detail;
-      std::tm* tm = std::localtime(&time_);
-      if (tm) tm_ = *tm;
-      return tm != nullptr;
-    }
-#endif
-  };
-  dispatcher lt(time);
-  // Too big time values may be unsupported.
-  if (!lt.run()) FMT_THROW(format_error("time_t value out of range"));
-  return lt.tm_;
-}
-
-inline std::tm localtime(
-    std::chrono::time_point<std::chrono::system_clock> time_point) {
-  return localtime(std::chrono::system_clock::to_time_t(time_point));
-}
-
-/**
-  Converts given time since epoch as ``std::time_t`` value into calendar time,
-  expressed in Coordinated Universal Time (UTC). Unlike ``std::gmtime``, this
-  function is thread-safe on most platforms.
- */
-inline std::tm gmtime(std::time_t time) {
-  struct dispatcher {
-    std::time_t time_;
-    std::tm tm_;
-
-    dispatcher(std::time_t t) : time_(t) {}
-
-    bool run() {
-      using namespace fmt::detail;
-      return handle(gmtime_r(&time_, &tm_));
-    }
-
-    bool handle(std::tm* tm) { return tm != nullptr; }
-
-    bool handle(detail::null<>) {
-      using namespace fmt::detail;
-      return fallback(gmtime_s(&tm_, &time_));
-    }
-
-    bool fallback(int res) { return res == 0; }
-
-#if !FMT_MSC_VER
-    bool fallback(detail::null<>) {
-      std::tm* tm = std::gmtime(&time_);
-      if (tm) tm_ = *tm;
-      return tm != nullptr;
-    }
-#endif
-  };
-  dispatcher gt(time);
-  // Too big time values may be unsupported.
-  if (!gt.run()) FMT_THROW(format_error("time_t value out of range"));
-  return gt.tm_;
-}
-
-inline std::tm gmtime(
-    std::chrono::time_point<std::chrono::system_clock> time_point) {
-  return gmtime(std::chrono::system_clock::to_time_t(time_point));
-}
-
-FMT_BEGIN_DETAIL_NAMESPACE
-
-// Writes two-digit numbers a, b and c separated by sep to buf.
-// The method by Pavel Novikov based on
-// https://johnnylee-sde.github.io/Fast-unsigned-integer-to-time-string/.
-inline void write_digit2_separated(char* buf, unsigned a, unsigned b,
-                                   unsigned c, char sep) {
-  unsigned long long digits =
-      a | (b << 24) | (static_cast<unsigned long long>(c) << 48);
-  // Convert each value to BCD.
-  // We have x = a * 10 + b and we want to convert it to BCD y = a * 16 + b.
-  // The difference is
-  //   y - x = a * 6
-  // a can be found from x:
-  //   a = floor(x / 10)
-  // then
-  //   y = x + a * 6 = x + floor(x / 10) * 6
-  // floor(x / 10) is (x * 205) >> 11 (needs 16 bits).
-  digits += (((digits * 205) >> 11) & 0x000f00000f00000f) * 6;
-  // Put low nibbles to high bytes and high nibbles to low bytes.
-  digits = ((digits & 0x00f00000f00000f0) >> 4) |
-           ((digits & 0x000f00000f00000f) << 8);
-  auto usep = static_cast<unsigned long long>(sep);
-  // Add ASCII '0' to each digit byte and insert separators.
-  digits |= 0x3030003030003030 | (usep << 16) | (usep << 40);
-
-  constexpr const size_t len = 8;
-  if (const_check(is_big_endian())) {
-    char tmp[len];
-    memcpy(tmp, &digits, len);
-    std::reverse_copy(tmp, tmp + len, buf);
-  } else {
-    memcpy(buf, &digits, len);
-  }
-}
-
-template <typename Period> FMT_CONSTEXPR inline const char* get_units() {
-  if (std::is_same<Period, std::atto>::value) return "as";
-  if (std::is_same<Period, std::femto>::value) return "fs";
-  if (std::is_same<Period, std::pico>::value) return "ps";
-  if (std::is_same<Period, std::nano>::value) return "ns";
-  if (std::is_same<Period, std::micro>::value) return "µs";
-  if (std::is_same<Period, std::milli>::value) return "ms";
-  if (std::is_same<Period, std::centi>::value) return "cs";
-  if (std::is_same<Period, std::deci>::value) return "ds";
-  if (std::is_same<Period, std::ratio<1>>::value) return "s";
-  if (std::is_same<Period, std::deca>::value) return "das";
-  if (std::is_same<Period, std::hecto>::value) return "hs";
-  if (std::is_same<Period, std::kilo>::value) return "ks";
-  if (std::is_same<Period, std::mega>::value) return "Ms";
-  if (std::is_same<Period, std::giga>::value) return "Gs";
-  if (std::is_same<Period, std::tera>::value) return "Ts";
-  if (std::is_same<Period, std::peta>::value) return "Ps";
-  if (std::is_same<Period, std::exa>::value) return "Es";
-  if (std::is_same<Period, std::ratio<60>>::value) return "m";
-  if (std::is_same<Period, std::ratio<3600>>::value) return "h";
-  return nullptr;
-}
-
-enum class numeric_system {
-  standard,
-  // Alternative numeric system, e.g. 十二 instead of 12 in ja_JP locale.
-  alternative
-};
-
-// Parses a put_time-like format string and invokes handler actions.
-template <typename Char, typename Handler>
-FMT_CONSTEXPR const Char* parse_chrono_format(const Char* begin,
-                                              const Char* end,
-                                              Handler&& handler) {
-  auto ptr = begin;
-  while (ptr != end) {
-    auto c = *ptr;
-    if (c == '}') break;
-    if (c != '%') {
-      ++ptr;
-      continue;
-    }
-    if (begin != ptr) handler.on_text(begin, ptr);
-    ++ptr;  // consume '%'
-    if (ptr == end) FMT_THROW(format_error("invalid format"));
-    c = *ptr++;
-    switch (c) {
-    case '%':
-      handler.on_text(ptr - 1, ptr);
-      break;
-    case 'n': {
-      const Char newline[] = {'\n'};
-      handler.on_text(newline, newline + 1);
-      break;
-    }
-    case 't': {
-      const Char tab[] = {'\t'};
-      handler.on_text(tab, tab + 1);
-      break;
-    }
-    // Year:
-    case 'Y':
-      handler.on_year(numeric_system::standard);
-      break;
-    case 'y':
-      handler.on_short_year(numeric_system::standard);
-      break;
-    case 'C':
-      handler.on_century(numeric_system::standard);
-      break;
-    case 'G':
-      handler.on_iso_week_based_year();
-      break;
-    case 'g':
-      handler.on_iso_week_based_short_year();
-      break;
-    // Day of the week:
-    case 'a':
-      handler.on_abbr_weekday();
-      break;
-    case 'A':
-      handler.on_full_weekday();
-      break;
-    case 'w':
-      handler.on_dec0_weekday(numeric_system::standard);
-      break;
-    case 'u':
-      handler.on_dec1_weekday(numeric_system::standard);
-      break;
-    // Month:
-    case 'b':
-    case 'h':
-      handler.on_abbr_month();
-      break;
-    case 'B':
-      handler.on_full_month();
-      break;
-    case 'm':
-      handler.on_dec_month(numeric_system::standard);
-      break;
-    // Day of the year/month:
-    case 'U':
-      handler.on_dec0_week_of_year(numeric_system::standard);
-      break;
-    case 'W':
-      handler.on_dec1_week_of_year(numeric_system::standard);
-      break;
-    case 'V':
-      handler.on_iso_week_of_year(numeric_system::standard);
-      break;
-    case 'j':
-      handler.on_day_of_year();
-      break;
-    case 'd':
-      handler.on_day_of_month(numeric_system::standard);
-      break;
-    case 'e':
-      handler.on_day_of_month_space(numeric_system::standard);
-      break;
-    // Hour, minute, second:
-    case 'H':
-      handler.on_24_hour(numeric_system::standard);
-      break;
-    case 'I':
-      handler.on_12_hour(numeric_system::standard);
-      break;
-    case 'M':
-      handler.on_minute(numeric_system::standard);
-      break;
-    case 'S':
-      handler.on_second(numeric_system::standard);
-      break;
-    // Other:
-    case 'c':
-      handler.on_datetime(numeric_system::standard);
-      break;
-    case 'x':
-      handler.on_loc_date(numeric_system::standard);
-      break;
-    case 'X':
-      handler.on_loc_time(numeric_system::standard);
-      break;
-    case 'D':
-      handler.on_us_date();
-      break;
-    case 'F':
-      handler.on_iso_date();
-      break;
-    case 'r':
-      handler.on_12_hour_time();
-      break;
-    case 'R':
-      handler.on_24_hour_time();
-      break;
-    case 'T':
-      handler.on_iso_time();
-      break;
-    case 'p':
-      handler.on_am_pm();
-      break;
-    case 'Q':
-      handler.on_duration_value();
-      break;
-    case 'q':
-      handler.on_duration_unit();
-      break;
-    case 'z':
-      handler.on_utc_offset();
-      break;
-    case 'Z':
-      handler.on_tz_name();
-      break;
-    // Alternative representation:
-    case 'E': {
-      if (ptr == end) FMT_THROW(format_error("invalid format"));
-      c = *ptr++;
-      switch (c) {
-      case 'Y':
-        handler.on_year(numeric_system::alternative);
-        break;
-      case 'y':
-        handler.on_offset_year();
-        break;
-      case 'C':
-        handler.on_century(numeric_system::alternative);
-        break;
-      case 'c':
-        handler.on_datetime(numeric_system::alternative);
-        break;
-      case 'x':
-        handler.on_loc_date(numeric_system::alternative);
-        break;
-      case 'X':
-        handler.on_loc_time(numeric_system::alternative);
-        break;
-      default:
-        FMT_THROW(format_error("invalid format"));
-      }
-      break;
-    }
-    case 'O':
-      if (ptr == end) FMT_THROW(format_error("invalid format"));
-      c = *ptr++;
-      switch (c) {
-      case 'y':
-        handler.on_short_year(numeric_system::alternative);
-        break;
-      case 'm':
-        handler.on_dec_month(numeric_system::alternative);
-        break;
-      case 'U':
-        handler.on_dec0_week_of_year(numeric_system::alternative);
-        break;
-      case 'W':
-        handler.on_dec1_week_of_year(numeric_system::alternative);
-        break;
-      case 'V':
-        handler.on_iso_week_of_year(numeric_system::alternative);
-        break;
-      case 'd':
-        handler.on_day_of_month(numeric_system::alternative);
-        break;
-      case 'e':
-        handler.on_day_of_month_space(numeric_system::alternative);
-        break;
-      case 'w':
-        handler.on_dec0_weekday(numeric_system::alternative);
-        break;
-      case 'u':
-        handler.on_dec1_weekday(numeric_system::alternative);
-        break;
-      case 'H':
-        handler.on_24_hour(numeric_system::alternative);
-        break;
-      case 'I':
-        handler.on_12_hour(numeric_system::alternative);
-        break;
-      case 'M':
-        handler.on_minute(numeric_system::alternative);
-        break;
-      case 'S':
-        handler.on_second(numeric_system::alternative);
-        break;
-      default:
-        FMT_THROW(format_error("invalid format"));
-      }
-      break;
-    default:
-      FMT_THROW(format_error("invalid format"));
-    }
-    begin = ptr;
-  }
-  if (begin != ptr) handler.on_text(begin, ptr);
-  return ptr;
-}
-
-template <typename Derived> struct null_chrono_spec_handler {
-  FMT_CONSTEXPR void unsupported() {
-    static_cast<Derived*>(this)->unsupported();
-  }
-  FMT_CONSTEXPR void on_year(numeric_system) { unsupported(); }
-  FMT_CONSTEXPR void on_short_year(numeric_system) { unsupported(); }
-  FMT_CONSTEXPR void on_offset_year() { unsupported(); }
-  FMT_CONSTEXPR void on_century(numeric_system) { unsupported(); }
-  FMT_CONSTEXPR void on_iso_week_based_year() { unsupported(); }
-  FMT_CONSTEXPR void on_iso_week_based_short_year() { unsupported(); }
-  FMT_CONSTEXPR void on_abbr_weekday() { unsupported(); }
-  FMT_CONSTEXPR void on_full_weekday() { unsupported(); }
-  FMT_CONSTEXPR void on_dec0_weekday(numeric_system) { unsupported(); }
-  FMT_CONSTEXPR void on_dec1_weekday(numeric_system) { unsupported(); }
-  FMT_CONSTEXPR void on_abbr_month() { unsupported(); }
-  FMT_CONSTEXPR void on_full_month() { unsupported(); }
-  FMT_CONSTEXPR void on_dec_month(numeric_system) { unsupported(); }
-  FMT_CONSTEXPR void on_dec0_week_of_year(numeric_system) { unsupported(); }
-  FMT_CONSTEXPR void on_dec1_week_of_year(numeric_system) { unsupported(); }
-  FMT_CONSTEXPR void on_iso_week_of_year(numeric_system) { unsupported(); }
-  FMT_CONSTEXPR void on_day_of_year() { unsupported(); }
-  FMT_CONSTEXPR void on_day_of_month(numeric_system) { unsupported(); }
-  FMT_CONSTEXPR void on_day_of_month_space(numeric_system) { unsupported(); }
-  FMT_CONSTEXPR void on_24_hour(numeric_system) { unsupported(); }
-  FMT_CONSTEXPR void on_12_hour(numeric_system) { unsupported(); }
-  FMT_CONSTEXPR void on_minute(numeric_system) { unsupported(); }
-  FMT_CONSTEXPR void on_second(numeric_system) { unsupported(); }
-  FMT_CONSTEXPR void on_datetime(numeric_system) { unsupported(); }
-  FMT_CONSTEXPR void on_loc_date(numeric_system) { unsupported(); }
-  FMT_CONSTEXPR void on_loc_time(numeric_system) { unsupported(); }
-  FMT_CONSTEXPR void on_us_date() { unsupported(); }
-  FMT_CONSTEXPR void on_iso_date() { unsupported(); }
-  FMT_CONSTEXPR void on_12_hour_time() { unsupported(); }
-  FMT_CONSTEXPR void on_24_hour_time() { unsupported(); }
-  FMT_CONSTEXPR void on_iso_time() { unsupported(); }
-  FMT_CONSTEXPR void on_am_pm() { unsupported(); }
-  FMT_CONSTEXPR void on_duration_value() { unsupported(); }
-  FMT_CONSTEXPR void on_duration_unit() { unsupported(); }
-  FMT_CONSTEXPR void on_utc_offset() { unsupported(); }
-  FMT_CONSTEXPR void on_tz_name() { unsupported(); }
-};
-
-struct tm_format_checker : null_chrono_spec_handler<tm_format_checker> {
-  FMT_NORETURN void unsupported() { FMT_THROW(format_error("no format")); }
-
-  template <typename Char>
-  FMT_CONSTEXPR void on_text(const Char*, const Char*) {}
-  FMT_CONSTEXPR void on_year(numeric_system) {}
-  FMT_CONSTEXPR void on_short_year(numeric_system) {}
-  FMT_CONSTEXPR void on_offset_year() {}
-  FMT_CONSTEXPR void on_century(numeric_system) {}
-  FMT_CONSTEXPR void on_iso_week_based_year() {}
-  FMT_CONSTEXPR void on_iso_week_based_short_year() {}
-  FMT_CONSTEXPR void on_abbr_weekday() {}
-  FMT_CONSTEXPR void on_full_weekday() {}
-  FMT_CONSTEXPR void on_dec0_weekday(numeric_system) {}
-  FMT_CONSTEXPR void on_dec1_weekday(numeric_system) {}
-  FMT_CONSTEXPR void on_abbr_month() {}
-  FMT_CONSTEXPR void on_full_month() {}
-  FMT_CONSTEXPR void on_dec_month(numeric_system) {}
-  FMT_CONSTEXPR void on_dec0_week_of_year(numeric_system) {}
-  FMT_CONSTEXPR void on_dec1_week_of_year(numeric_system) {}
-  FMT_CONSTEXPR void on_iso_week_of_year(numeric_system) {}
-  FMT_CONSTEXPR void on_day_of_year() {}
-  FMT_CONSTEXPR void on_day_of_month(numeric_system) {}
-  FMT_CONSTEXPR void on_day_of_month_space(numeric_system) {}
-  FMT_CONSTEXPR void on_24_hour(numeric_system) {}
-  FMT_CONSTEXPR void on_12_hour(numeric_system) {}
-  FMT_CONSTEXPR void on_minute(numeric_system) {}
-  FMT_CONSTEXPR void on_second(numeric_system) {}
-  FMT_CONSTEXPR void on_datetime(numeric_system) {}
-  FMT_CONSTEXPR void on_loc_date(numeric_system) {}
-  FMT_CONSTEXPR void on_loc_time(numeric_system) {}
-  FMT_CONSTEXPR void on_us_date() {}
-  FMT_CONSTEXPR void on_iso_date() {}
-  FMT_CONSTEXPR void on_12_hour_time() {}
-  FMT_CONSTEXPR void on_24_hour_time() {}
-  FMT_CONSTEXPR void on_iso_time() {}
-  FMT_CONSTEXPR void on_am_pm() {}
-  FMT_CONSTEXPR void on_utc_offset() {}
-  FMT_CONSTEXPR void on_tz_name() {}
-};
-
-inline const char* tm_wday_full_name(int wday) {
-  static constexpr const char* full_name_list[] = {
-      "Sunday",   "Monday", "Tuesday", "Wednesday",
-      "Thursday", "Friday", "Saturday"};
-  return wday >= 0 && wday <= 6 ? full_name_list[wday] : "?";
-}
-inline const char* tm_wday_short_name(int wday) {
-  static constexpr const char* short_name_list[] = {"Sun", "Mon", "Tue", "Wed",
-                                                    "Thu", "Fri", "Sat"};
-  return wday >= 0 && wday <= 6 ? short_name_list[wday] : "???";
-}
-
-inline const char* tm_mon_full_name(int mon) {
-  static constexpr const char* full_name_list[] = {
-      "January", "February", "March",     "April",   "May",      "June",
-      "July",    "August",   "September", "October", "November", "December"};
-  return mon >= 0 && mon <= 11 ? full_name_list[mon] : "?";
-}
-inline const char* tm_mon_short_name(int mon) {
-  static constexpr const char* short_name_list[] = {
-      "Jan", "Feb", "Mar", "Apr", "May", "Jun",
-      "Jul", "Aug", "Sep", "Oct", "Nov", "Dec",
-  };
-  return mon >= 0 && mon <= 11 ? short_name_list[mon] : "???";
-}
-
-template <typename T, typename = void>
-struct has_member_data_tm_gmtoff : std::false_type {};
-template <typename T>
-struct has_member_data_tm_gmtoff<T, void_t<decltype(T::tm_gmtoff)>>
-    : std::true_type {};
-
-template <typename T, typename = void>
-struct has_member_data_tm_zone : std::false_type {};
-template <typename T>
-struct has_member_data_tm_zone<T, void_t<decltype(T::tm_zone)>>
-    : std::true_type {};
-
-#if FMT_USE_TZSET
-inline void tzset_once() {
-  static bool init = []() -> bool {
-    _tzset();
-    return true;
-  }();
-  ignore_unused(init);
-}
-#endif
-
-template <typename OutputIt, typename Char> class tm_writer {
- private:
-  static constexpr int days_per_week = 7;
-
-  const std::locale& loc_;
-  const bool is_classic_;
-  OutputIt out_;
-  const std::tm& tm_;
-
-  auto tm_sec() const noexcept -> int {
-    FMT_ASSERT(tm_.tm_sec >= 0 && tm_.tm_sec <= 61, "");
-    return tm_.tm_sec;
-  }
-  auto tm_min() const noexcept -> int {
-    FMT_ASSERT(tm_.tm_min >= 0 && tm_.tm_min <= 59, "");
-    return tm_.tm_min;
-  }
-  auto tm_hour() const noexcept -> int {
-    FMT_ASSERT(tm_.tm_hour >= 0 && tm_.tm_hour <= 23, "");
-    return tm_.tm_hour;
-  }
-  auto tm_mday() const noexcept -> int {
-    FMT_ASSERT(tm_.tm_mday >= 1 && tm_.tm_mday <= 31, "");
-    return tm_.tm_mday;
-  }
-  auto tm_mon() const noexcept -> int {
-    FMT_ASSERT(tm_.tm_mon >= 0 && tm_.tm_mon <= 11, "");
-    return tm_.tm_mon;
-  }
-  auto tm_year() const noexcept -> long long { return 1900ll + tm_.tm_year; }
-  auto tm_wday() const noexcept -> int {
-    FMT_ASSERT(tm_.tm_wday >= 0 && tm_.tm_wday <= 6, "");
-    return tm_.tm_wday;
-  }
-  auto tm_yday() const noexcept -> int {
-    FMT_ASSERT(tm_.tm_yday >= 0 && tm_.tm_yday <= 365, "");
-    return tm_.tm_yday;
-  }
-
-  auto tm_hour12() const noexcept -> int {
-    const auto h = tm_hour();
-    const auto z = h < 12 ? h : h - 12;
-    return z == 0 ? 12 : z;
-  }
-
-  // POSIX and the C Standard are unclear or inconsistent about what %C and %y
-  // do if the year is negative or exceeds 9999. Use the convention that %C
-  // concatenated with %y yields the same output as %Y, and that %Y contains at
-  // least 4 characters, with more only if necessary.
-  auto split_year_lower(long long year) const noexcept -> int {
-    auto l = year % 100;
-    if (l < 0) l = -l;  // l in [0, 99]
-    return static_cast<int>(l);
-  }
-
-  // Algorithm:
-  // https://en.wikipedia.org/wiki/ISO_week_date#Calculating_the_week_number_from_a_month_and_day_of_the_month_or_ordinal_date
-  auto iso_year_weeks(long long curr_year) const noexcept -> int {
-    const auto prev_year = curr_year - 1;
-    const auto curr_p =
-        (curr_year + curr_year / 4 - curr_year / 100 + curr_year / 400) %
-        days_per_week;
-    const auto prev_p =
-        (prev_year + prev_year / 4 - prev_year / 100 + prev_year / 400) %
-        days_per_week;
-    return 52 + ((curr_p == 4 || prev_p == 3) ? 1 : 0);
-  }
-  auto iso_week_num(int tm_yday, int tm_wday) const noexcept -> int {
-    return (tm_yday + 11 - (tm_wday == 0 ? days_per_week : tm_wday)) /
-           days_per_week;
-  }
-  auto tm_iso_week_year() const noexcept -> long long {
-    const auto year = tm_year();
-    const auto w = iso_week_num(tm_yday(), tm_wday());
-    if (w < 1) return year - 1;
-    if (w > iso_year_weeks(year)) return year + 1;
-    return year;
-  }
-  auto tm_iso_week_of_year() const noexcept -> int {
-    const auto year = tm_year();
-    const auto w = iso_week_num(tm_yday(), tm_wday());
-    if (w < 1) return iso_year_weeks(year - 1);
-    if (w > iso_year_weeks(year)) return 1;
-    return w;
-  }
-
-  void write1(int value) {
-    *out_++ = static_cast<char>('0' + to_unsigned(value) % 10);
-  }
-  void write2(int value) {
-    const char* d = digits2(to_unsigned(value) % 100);
-    *out_++ = *d++;
-    *out_++ = *d;
-  }
-
-  void write_year_extended(long long year) {
-    // At least 4 characters.
-    int width = 4;
-    if (year < 0) {
-      *out_++ = '-';
-      year = 0 - year;
-      --width;
-    }
-    uint32_or_64_or_128_t<long long> n = to_unsigned(year);
-    const int num_digits = count_digits(n);
-    if (width > num_digits) out_ = std::fill_n(out_, width - num_digits, '0');
-    out_ = format_decimal<Char>(out_, n, num_digits).end;
-  }
-  void write_year(long long year) {
-    if (year >= 0 && year < 10000) {
-      write2(static_cast<int>(year / 100));
-      write2(static_cast<int>(year % 100));
-    } else {
-      write_year_extended(year);
-    }
-  }
-
-  void write_utc_offset(long offset) {
-    if (offset < 0) {
-      *out_++ = '-';
-      offset = -offset;
-    } else {
-      *out_++ = '+';
-    }
-    offset /= 60;
-    write2(static_cast<int>(offset / 60));
-    write2(static_cast<int>(offset % 60));
-  }
-  template <typename T, FMT_ENABLE_IF(has_member_data_tm_gmtoff<T>::value)>
-  void format_utc_offset_impl(const T& tm) {
-    write_utc_offset(tm.tm_gmtoff);
-  }
-  template <typename T, FMT_ENABLE_IF(!has_member_data_tm_gmtoff<T>::value)>
-  void format_utc_offset_impl(const T& tm) {
-#if defined(_WIN32) && defined(_UCRT)
-#  if FMT_USE_TZSET
-    tzset_once();
-#  endif
-    long offset = 0;
-    _get_timezone(&offset);
-    if (tm.tm_isdst) {
-      long dstbias = 0;
-      _get_dstbias(&dstbias);
-      offset += dstbias;
-    }
-    write_utc_offset(-offset);
-#else
-    ignore_unused(tm);
-    format_localized('z');
-#endif
-  }
-
-  template <typename T, FMT_ENABLE_IF(has_member_data_tm_zone<T>::value)>
-  void format_tz_name_impl(const T& tm) {
-    if (is_classic_)
-      out_ = write_tm_str<Char>(out_, tm.tm_zone, loc_);
-    else
-      format_localized('Z');
-  }
-  template <typename T, FMT_ENABLE_IF(!has_member_data_tm_zone<T>::value)>
-  void format_tz_name_impl(const T&) {
-    format_localized('Z');
-  }
-
-  void format_localized(char format, char modifier = 0) {
-    out_ = write<Char>(out_, tm_, loc_, format, modifier);
-  }
-
- public:
-  tm_writer(const std::locale& loc, OutputIt out, const std::tm& tm)
-      : loc_(loc),
-        is_classic_(loc_ == get_classic_locale()),
-        out_(out),
-        tm_(tm) {}
-
-  OutputIt out() const { return out_; }
-
-  FMT_CONSTEXPR void on_text(const Char* begin, const Char* end) {
-    out_ = copy_str<Char>(begin, end, out_);
-  }
-
-  void on_abbr_weekday() {
-    if (is_classic_)
-      out_ = write(out_, tm_wday_short_name(tm_wday()));
-    else
-      format_localized('a');
-  }
-  void on_full_weekday() {
-    if (is_classic_)
-      out_ = write(out_, tm_wday_full_name(tm_wday()));
-    else
-      format_localized('A');
-  }
-  void on_dec0_weekday(numeric_system ns) {
-    if (is_classic_ || ns == numeric_system::standard) return write1(tm_wday());
-    format_localized('w', 'O');
-  }
-  void on_dec1_weekday(numeric_system ns) {
-    if (is_classic_ || ns == numeric_system::standard) {
-      auto wday = tm_wday();
-      write1(wday == 0 ? days_per_week : wday);
-    } else {
-      format_localized('u', 'O');
-    }
-  }
-
-  void on_abbr_month() {
-    if (is_classic_)
-      out_ = write(out_, tm_mon_short_name(tm_mon()));
-    else
-      format_localized('b');
-  }
-  void on_full_month() {
-    if (is_classic_)
-      out_ = write(out_, tm_mon_full_name(tm_mon()));
-    else
-      format_localized('B');
-  }
-
-  void on_datetime(numeric_system ns) {
-    if (is_classic_) {
-      on_abbr_weekday();
-      *out_++ = ' ';
-      on_abbr_month();
-      *out_++ = ' ';
-      on_day_of_month_space(numeric_system::standard);
-      *out_++ = ' ';
-      on_iso_time();
-      *out_++ = ' ';
-      on_year(numeric_system::standard);
-    } else {
-      format_localized('c', ns == numeric_system::standard ? '\0' : 'E');
-    }
-  }
-  void on_loc_date(numeric_system ns) {
-    if (is_classic_)
-      on_us_date();
-    else
-      format_localized('x', ns == numeric_system::standard ? '\0' : 'E');
-  }
-  void on_loc_time(numeric_system ns) {
-    if (is_classic_)
-      on_iso_time();
-    else
-      format_localized('X', ns == numeric_system::standard ? '\0' : 'E');
-  }
-  void on_us_date() {
-    char buf[8];
-    write_digit2_separated(buf, to_unsigned(tm_mon() + 1),
-                           to_unsigned(tm_mday()),
-                           to_unsigned(split_year_lower(tm_year())), '/');
-    out_ = copy_str<Char>(std::begin(buf), std::end(buf), out_);
-  }
-  void on_iso_date() {
-    auto year = tm_year();
-    char buf[10];
-    size_t offset = 0;
-    if (year >= 0 && year < 10000) {
-      copy2(buf, digits2(to_unsigned(year / 100)));
-    } else {
-      offset = 4;
-      write_year_extended(year);
-      year = 0;
-    }
-    write_digit2_separated(buf + 2, static_cast<unsigned>(year % 100),
-                           to_unsigned(tm_mon() + 1), to_unsigned(tm_mday()),
-                           '-');
-    out_ = copy_str<Char>(std::begin(buf) + offset, std::end(buf), out_);
-  }
-
-  void on_utc_offset() { format_utc_offset_impl(tm_); }
-  void on_tz_name() { format_tz_name_impl(tm_); }
-
-  void on_year(numeric_system ns) {
-    if (is_classic_ || ns == numeric_system::standard)
-      return write_year(tm_year());
-    format_localized('Y', 'E');
-  }
-  void on_short_year(numeric_system ns) {
-    if (is_classic_ || ns == numeric_system::standard)
-      return write2(split_year_lower(tm_year()));
-    format_localized('y', 'O');
-  }
-  void on_offset_year() {
-    if (is_classic_) return write2(split_year_lower(tm_year()));
-    format_localized('y', 'E');
-  }
-
-  void on_century(numeric_system ns) {
-    if (is_classic_ || ns == numeric_system::standard) {
-      auto year = tm_year();
-      auto upper = year / 100;
-      if (year >= -99 && year < 0) {
-        // Zero upper on negative year.
-        *out_++ = '-';
-        *out_++ = '0';
-      } else if (upper >= 0 && upper < 100) {
-        write2(static_cast<int>(upper));
-      } else {
-        out_ = write<Char>(out_, upper);
-      }
-    } else {
-      format_localized('C', 'E');
-    }
-  }
-
-  void on_dec_month(numeric_system ns) {
-    if (is_classic_ || ns == numeric_system::standard)
-      return write2(tm_mon() + 1);
-    format_localized('m', 'O');
-  }
-
-  void on_dec0_week_of_year(numeric_system ns) {
-    if (is_classic_ || ns == numeric_system::standard)
-      return write2((tm_yday() + days_per_week - tm_wday()) / days_per_week);
-    format_localized('U', 'O');
-  }
-  void on_dec1_week_of_year(numeric_system ns) {
-    if (is_classic_ || ns == numeric_system::standard) {
-      auto wday = tm_wday();
-      write2((tm_yday() + days_per_week -
-              (wday == 0 ? (days_per_week - 1) : (wday - 1))) /
-             days_per_week);
-    } else {
-      format_localized('W', 'O');
-    }
-  }
-  void on_iso_week_of_year(numeric_system ns) {
-    if (is_classic_ || ns == numeric_system::standard)
-      return write2(tm_iso_week_of_year());
-    format_localized('V', 'O');
-  }
-
-  void on_iso_week_based_year() { write_year(tm_iso_week_year()); }
-  void on_iso_week_based_short_year() {
-    write2(split_year_lower(tm_iso_week_year()));
-  }
-
-  void on_day_of_year() {
-    auto yday = tm_yday() + 1;
-    write1(yday / 100);
-    write2(yday % 100);
-  }
-  void on_day_of_month(numeric_system ns) {
-    if (is_classic_ || ns == numeric_system::standard) return write2(tm_mday());
-    format_localized('d', 'O');
-  }
-  void on_day_of_month_space(numeric_system ns) {
-    if (is_classic_ || ns == numeric_system::standard) {
-      auto mday = to_unsigned(tm_mday()) % 100;
-      const char* d2 = digits2(mday);
-      *out_++ = mday < 10 ? ' ' : d2[0];
-      *out_++ = d2[1];
-    } else {
-      format_localized('e', 'O');
-    }
-  }
-
-  void on_24_hour(numeric_system ns) {
-    if (is_classic_ || ns == numeric_system::standard) return write2(tm_hour());
-    format_localized('H', 'O');
-  }
-  void on_12_hour(numeric_system ns) {
-    if (is_classic_ || ns == numeric_system::standard)
-      return write2(tm_hour12());
-    format_localized('I', 'O');
-  }
-  void on_minute(numeric_system ns) {
-    if (is_classic_ || ns == numeric_system::standard) return write2(tm_min());
-    format_localized('M', 'O');
-  }
-  void on_second(numeric_system ns) {
-    if (is_classic_ || ns == numeric_system::standard) return write2(tm_sec());
-    format_localized('S', 'O');
-  }
-
-  void on_12_hour_time() {
-    if (is_classic_) {
-      char buf[8];
-      write_digit2_separated(buf, to_unsigned(tm_hour12()),
-                             to_unsigned(tm_min()), to_unsigned(tm_sec()), ':');
-      out_ = copy_str<Char>(std::begin(buf), std::end(buf), out_);
-      *out_++ = ' ';
-      on_am_pm();
-    } else {
-      format_localized('r');
-    }
-  }
-  void on_24_hour_time() {
-    write2(tm_hour());
-    *out_++ = ':';
-    write2(tm_min());
-  }
-  void on_iso_time() {
-    char buf[8];
-    write_digit2_separated(buf, to_unsigned(tm_hour()), to_unsigned(tm_min()),
-                           to_unsigned(tm_sec()), ':');
-    out_ = copy_str<Char>(std::begin(buf), std::end(buf), out_);
-  }
-
-  void on_am_pm() {
-    if (is_classic_) {
-      *out_++ = tm_hour() < 12 ? 'A' : 'P';
-      *out_++ = 'M';
-    } else {
-      format_localized('p');
-    }
-  }
-
-  // These apply to chrono durations but not tm.
-  void on_duration_value() {}
-  void on_duration_unit() {}
-};
-
-struct chrono_format_checker : null_chrono_spec_handler<chrono_format_checker> {
-  FMT_NORETURN void unsupported() { FMT_THROW(format_error("no date")); }
-
-  template <typename Char>
-  FMT_CONSTEXPR void on_text(const Char*, const Char*) {}
-  FMT_CONSTEXPR void on_24_hour(numeric_system) {}
-  FMT_CONSTEXPR void on_12_hour(numeric_system) {}
-  FMT_CONSTEXPR void on_minute(numeric_system) {}
-  FMT_CONSTEXPR void on_second(numeric_system) {}
-  FMT_CONSTEXPR void on_12_hour_time() {}
-  FMT_CONSTEXPR void on_24_hour_time() {}
-  FMT_CONSTEXPR void on_iso_time() {}
-  FMT_CONSTEXPR void on_am_pm() {}
-  FMT_CONSTEXPR void on_duration_value() {}
-  FMT_CONSTEXPR void on_duration_unit() {}
-};
-
-template <typename T, FMT_ENABLE_IF(std::is_integral<T>::value)>
-inline bool isnan(T) {
-  return false;
-}
-template <typename T, FMT_ENABLE_IF(std::is_floating_point<T>::value)>
-inline bool isnan(T value) {
-  return std::isnan(value);
-}
-
-template <typename T, FMT_ENABLE_IF(std::is_integral<T>::value)>
-inline bool isfinite(T) {
-  return true;
-}
-
-// Converts value to Int and checks that it's in the range [0, upper).
-template <typename T, typename Int, FMT_ENABLE_IF(std::is_integral<T>::value)>
-inline Int to_nonnegative_int(T value, Int upper) {
-  FMT_ASSERT(value >= 0 && to_unsigned(value) <= to_unsigned(upper),
-             "invalid value");
-  (void)upper;
-  return static_cast<Int>(value);
-}
-template <typename T, typename Int, FMT_ENABLE_IF(!std::is_integral<T>::value)>
-inline Int to_nonnegative_int(T value, Int upper) {
-  if (value < 0 || value > static_cast<T>(upper))
-    FMT_THROW(format_error("invalid value"));
-  return static_cast<Int>(value);
-}
-
-template <typename T, FMT_ENABLE_IF(std::is_integral<T>::value)>
-inline T mod(T x, int y) {
-  return x % static_cast<T>(y);
-}
-template <typename T, FMT_ENABLE_IF(std::is_floating_point<T>::value)>
-inline T mod(T x, int y) {
-  return std::fmod(x, static_cast<T>(y));
-}
-
-// If T is an integral type, maps T to its unsigned counterpart, otherwise
-// leaves it unchanged (unlike std::make_unsigned).
-template <typename T, bool INTEGRAL = std::is_integral<T>::value>
-struct make_unsigned_or_unchanged {
-  using type = T;
-};
-
-template <typename T> struct make_unsigned_or_unchanged<T, true> {
-  using type = typename std::make_unsigned<T>::type;
-};
-
-#if FMT_SAFE_DURATION_CAST
-// throwing version of safe_duration_cast
-template <typename To, typename FromRep, typename FromPeriod>
-To fmt_safe_duration_cast(std::chrono::duration<FromRep, FromPeriod> from) {
-  int ec;
-  To to = safe_duration_cast::safe_duration_cast<To>(from, ec);
-  if (ec) FMT_THROW(format_error("cannot format duration"));
-  return to;
-}
-#endif
-
-template <typename Rep, typename Period,
-          FMT_ENABLE_IF(std::is_integral<Rep>::value)>
-inline std::chrono::duration<Rep, std::milli> get_milliseconds(
-    std::chrono::duration<Rep, Period> d) {
-  // this may overflow and/or the result may not fit in the
-  // target type.
-#if FMT_SAFE_DURATION_CAST
-  using CommonSecondsType =
-      typename std::common_type<decltype(d), std::chrono::seconds>::type;
-  const auto d_as_common = fmt_safe_duration_cast<CommonSecondsType>(d);
-  const auto d_as_whole_seconds =
-      fmt_safe_duration_cast<std::chrono::seconds>(d_as_common);
-  // this conversion should be nonproblematic
-  const auto diff = d_as_common - d_as_whole_seconds;
-  const auto ms =
-      fmt_safe_duration_cast<std::chrono::duration<Rep, std::milli>>(diff);
-  return ms;
-#else
-  auto s = std::chrono::duration_cast<std::chrono::seconds>(d);
-  return std::chrono::duration_cast<std::chrono::milliseconds>(d - s);
-#endif
-}
-
-// Returns the number of fractional digits in the range [0, 18] according to the
-// C++20 spec. If more than 18 fractional digits are required then returns 6 for
-// microseconds precision.
-constexpr int count_fractional_digits(long long num, long long den, int n = 0) {
-  return num % den == 0
-             ? n
-             : (n > 18 ? 6 : count_fractional_digits(num * 10, den, n + 1));
-}
-
-constexpr long long pow10(std::uint32_t n) {
-  return n == 0 ? 1 : 10 * pow10(n - 1);
-}
-
-template <class Rep, class Period,
-          FMT_ENABLE_IF(std::numeric_limits<Rep>::is_signed)>
-constexpr std::chrono::duration<Rep, Period> abs(
-    std::chrono::duration<Rep, Period> d) {
-  // We need to compare the duration using the count() method directly
-  // due to a compiler bug in clang-11 regarding the spaceship operator,
-  // when -Wzero-as-null-pointer-constant is enabled.
-  // In clang-12 the bug has been fixed. See
-  // https://bugs.llvm.org/show_bug.cgi?id=46235 and the reproducible example:
-  // https://www.godbolt.org/z/Knbb5joYx.
-  return d.count() >= d.zero().count() ? d : -d;
-}
-
-template <class Rep, class Period,
-          FMT_ENABLE_IF(!std::numeric_limits<Rep>::is_signed)>
-constexpr std::chrono::duration<Rep, Period> abs(
-    std::chrono::duration<Rep, Period> d) {
-  return d;
-}
-
-template <typename Char, typename Rep, typename OutputIt,
-          FMT_ENABLE_IF(std::is_integral<Rep>::value)>
-OutputIt format_duration_value(OutputIt out, Rep val, int) {
-  return write<Char>(out, val);
-}
-
-template <typename Char, typename Rep, typename OutputIt,
-          FMT_ENABLE_IF(std::is_floating_point<Rep>::value)>
-OutputIt format_duration_value(OutputIt out, Rep val, int precision) {
-  auto specs = basic_format_specs<Char>();
-  specs.precision = precision;
-  specs.type = precision >= 0 ? presentation_type::fixed_lower
-                              : presentation_type::general_lower;
-  return write<Char>(out, val, specs);
-}
-
-template <typename Char, typename OutputIt>
-OutputIt copy_unit(string_view unit, OutputIt out, Char) {
-  return std::copy(unit.begin(), unit.end(), out);
-}
-
-template <typename OutputIt>
-OutputIt copy_unit(string_view unit, OutputIt out, wchar_t) {
-  // This works when wchar_t is UTF-32 because units only contain characters
-  // that have the same representation in UTF-16 and UTF-32.
-  utf8_to_utf16 u(unit);
-  return std::copy(u.c_str(), u.c_str() + u.size(), out);
-}
-
-template <typename Char, typename Period, typename OutputIt>
-OutputIt format_duration_unit(OutputIt out) {
-  if (const char* unit = get_units<Period>())
-    return copy_unit(string_view(unit), out, Char());
-  *out++ = '[';
-  out = write<Char>(out, Period::num);
-  if (const_check(Period::den != 1)) {
-    *out++ = '/';
-    out = write<Char>(out, Period::den);
-  }
-  *out++ = ']';
-  *out++ = 's';
-  return out;
-}
-
-class get_locale {
- private:
-  union {
-    std::locale locale_;
-  };
-  bool has_locale_ = false;
-
- public:
-  get_locale(bool localized, locale_ref loc) : has_locale_(localized) {
-    if (localized)
-      ::new (&locale_) std::locale(loc.template get<std::locale>());
-  }
-  ~get_locale() {
-    if (has_locale_) locale_.~locale();
-  }
-  operator const std::locale&() const {
-    return has_locale_ ? locale_ : get_classic_locale();
-  }
-};
-
-template <typename FormatContext, typename OutputIt, typename Rep,
-          typename Period>
-struct chrono_formatter {
-  FormatContext& context;
-  OutputIt out;
-  int precision;
-  bool localized = false;
-  // rep is unsigned to avoid overflow.
-  using rep =
-      conditional_t<std::is_integral<Rep>::value && sizeof(Rep) < sizeof(int),
-                    unsigned, typename make_unsigned_or_unchanged<Rep>::type>;
-  rep val;
-  using seconds = std::chrono::duration<rep>;
-  seconds s;
-  using milliseconds = std::chrono::duration<rep, std::milli>;
-  bool negative;
-
-  using char_type = typename FormatContext::char_type;
-  using tm_writer_type = tm_writer<OutputIt, char_type>;
-
-  chrono_formatter(FormatContext& ctx, OutputIt o,
-                   std::chrono::duration<Rep, Period> d)
-      : context(ctx),
-        out(o),
-        val(static_cast<rep>(d.count())),
-        negative(false) {
-    if (d.count() < 0) {
-      val = 0 - val;
-      negative = true;
-    }
-
-    // this may overflow and/or the result may not fit in the
-    // target type.
-#if FMT_SAFE_DURATION_CAST
-    // might need checked conversion (rep!=Rep)
-    auto tmpval = std::chrono::duration<rep, Period>(val);
-    s = fmt_safe_duration_cast<seconds>(tmpval);
-#else
-    s = std::chrono::duration_cast<seconds>(
-        std::chrono::duration<rep, Period>(val));
-#endif
-  }
-
-  // returns true if nan or inf, writes to out.
-  bool handle_nan_inf() {
-    if (isfinite(val)) {
-      return false;
-    }
-    if (isnan(val)) {
-      write_nan();
-      return true;
-    }
-    // must be +-inf
-    if (val > 0) {
-      write_pinf();
-    } else {
-      write_ninf();
-    }
-    return true;
-  }
-
-  Rep hour() const { return static_cast<Rep>(mod((s.count() / 3600), 24)); }
-
-  Rep hour12() const {
-    Rep hour = static_cast<Rep>(mod((s.count() / 3600), 12));
-    return hour <= 0 ? 12 : hour;
-  }
-
-  Rep minute() const { return static_cast<Rep>(mod((s.count() / 60), 60)); }
-  Rep second() const { return static_cast<Rep>(mod(s.count(), 60)); }
-
-  std::tm time() const {
-    auto time = std::tm();
-    time.tm_hour = to_nonnegative_int(hour(), 24);
-    time.tm_min = to_nonnegative_int(minute(), 60);
-    time.tm_sec = to_nonnegative_int(second(), 60);
-    return time;
-  }
-
-  void write_sign() {
-    if (negative) {
-      *out++ = '-';
-      negative = false;
-    }
-  }
-
-  void write(Rep value, int width) {
-    write_sign();
-    if (isnan(value)) return write_nan();
-    uint32_or_64_or_128_t<int> n =
-        to_unsigned(to_nonnegative_int(value, max_value<int>()));
-    int num_digits = detail::count_digits(n);
-    if (width > num_digits) out = std::fill_n(out, width - num_digits, '0');
-    out = format_decimal<char_type>(out, n, num_digits).end;
-  }
-
-  template <class Duration> void write_fractional_seconds(Duration d) {
-    constexpr auto num_fractional_digits =
-        count_fractional_digits(Duration::period::num, Duration::period::den);
-
-    using subsecond_precision = std::chrono::duration<
-        typename std::common_type<typename Duration::rep,
-                                  std::chrono::seconds::rep>::type,
-        std::ratio<1, detail::pow10(num_fractional_digits)>>;
-    if (std::ratio_less<typename subsecond_precision::period,
-                        std::chrono::seconds::period>::value) {
-      *out++ = '.';
-      // Don't convert long double to integer seconds to avoid overflow.
-      using sec = conditional_t<
-          std::is_same<typename Duration::rep, long double>::value,
-          std::chrono::duration<long double>, std::chrono::seconds>;
-      auto fractional = detail::abs(d) - std::chrono::duration_cast<sec>(d);
-      const auto subseconds =
-          std::chrono::treat_as_floating_point<
-              typename subsecond_precision::rep>::value
-              ? fractional.count()
-              : std::chrono::duration_cast<subsecond_precision>(fractional)
-                    .count();
-      uint32_or_64_or_128_t<long long> n =
-          to_unsigned(to_nonnegative_int(subseconds, max_value<long long>()));
-      int num_digits = detail::count_digits(n);
-      if (num_fractional_digits > num_digits)
-        out = std::fill_n(out, num_fractional_digits - num_digits, '0');
-      out = format_decimal<char_type>(out, n, num_digits).end;
-    }
-  }
-
-  void write_nan() { std::copy_n("nan", 3, out); }
-  void write_pinf() { std::copy_n("inf", 3, out); }
-  void write_ninf() { std::copy_n("-inf", 4, out); }
-
-  template <typename Callback, typename... Args>
-  void format_tm(const tm& time, Callback cb, Args... args) {
-    if (isnan(val)) return write_nan();
-    get_locale loc(localized, context.locale());
-    auto w = tm_writer_type(loc, out, time);
-    (w.*cb)(args...);
-    out = w.out();
-  }
-
-  void on_text(const char_type* begin, const char_type* end) {
-    std::copy(begin, end, out);
-  }
-
-  // These are not implemented because durations don't have date information.
-  void on_abbr_weekday() {}
-  void on_full_weekday() {}
-  void on_dec0_weekday(numeric_system) {}
-  void on_dec1_weekday(numeric_system) {}
-  void on_abbr_month() {}
-  void on_full_month() {}
-  void on_datetime(numeric_system) {}
-  void on_loc_date(numeric_system) {}
-  void on_loc_time(numeric_system) {}
-  void on_us_date() {}
-  void on_iso_date() {}
-  void on_utc_offset() {}
-  void on_tz_name() {}
-  void on_year(numeric_system) {}
-  void on_short_year(numeric_system) {}
-  void on_offset_year() {}
-  void on_century(numeric_system) {}
-  void on_iso_week_based_year() {}
-  void on_iso_week_based_short_year() {}
-  void on_dec_month(numeric_system) {}
-  void on_dec0_week_of_year(numeric_system) {}
-  void on_dec1_week_of_year(numeric_system) {}
-  void on_iso_week_of_year(numeric_system) {}
-  void on_day_of_year() {}
-  void on_day_of_month(numeric_system) {}
-  void on_day_of_month_space(numeric_system) {}
-
-  void on_24_hour(numeric_system ns) {
-    if (handle_nan_inf()) return;
-
-    if (ns == numeric_system::standard) return write(hour(), 2);
-    auto time = tm();
-    time.tm_hour = to_nonnegative_int(hour(), 24);
-    format_tm(time, &tm_writer_type::on_24_hour, ns);
-  }
-
-  void on_12_hour(numeric_system ns) {
-    if (handle_nan_inf()) return;
-
-    if (ns == numeric_system::standard) return write(hour12(), 2);
-    auto time = tm();
-    time.tm_hour = to_nonnegative_int(hour12(), 12);
-    format_tm(time, &tm_writer_type::on_12_hour, ns);
-  }
-
-  void on_minute(numeric_system ns) {
-    if (handle_nan_inf()) return;
-
-    if (ns == numeric_system::standard) return write(minute(), 2);
-    auto time = tm();
-    time.tm_min = to_nonnegative_int(minute(), 60);
-    format_tm(time, &tm_writer_type::on_minute, ns);
-  }
-
-  void on_second(numeric_system ns) {
-    if (handle_nan_inf()) return;
-
-    if (ns == numeric_system::standard) {
-      write(second(), 2);
-      write_fractional_seconds(std::chrono::duration<rep, Period>{val});
-      return;
-    }
-    auto time = tm();
-    time.tm_sec = to_nonnegative_int(second(), 60);
-    format_tm(time, &tm_writer_type::on_second, ns);
-  }
-
-  void on_12_hour_time() {
-    if (handle_nan_inf()) return;
-    format_tm(time(), &tm_writer_type::on_12_hour_time);
-  }
-
-  void on_24_hour_time() {
-    if (handle_nan_inf()) {
-      *out++ = ':';
-      handle_nan_inf();
-      return;
-    }
-
-    write(hour(), 2);
-    *out++ = ':';
-    write(minute(), 2);
-  }
-
-  void on_iso_time() {
-    on_24_hour_time();
-    *out++ = ':';
-    if (handle_nan_inf()) return;
-    on_second(numeric_system::standard);
-  }
-
-  void on_am_pm() {
-    if (handle_nan_inf()) return;
-    format_tm(time(), &tm_writer_type::on_am_pm);
-  }
-
-  void on_duration_value() {
-    if (handle_nan_inf()) return;
-    write_sign();
-    out = format_duration_value<char_type>(out, val, precision);
-  }
-
-  void on_duration_unit() {
-    out = format_duration_unit<char_type, Period>(out);
-  }
-};
-
-FMT_END_DETAIL_NAMESPACE
-
-#if defined(__cpp_lib_chrono) && __cpp_lib_chrono >= 201907
-using weekday = std::chrono::weekday;
-#else
-// A fallback version of weekday.
-class weekday {
- private:
-  unsigned char value;
-
- public:
-  weekday() = default;
-  explicit constexpr weekday(unsigned wd) noexcept
-      : value(static_cast<unsigned char>(wd != 7 ? wd : 0)) {}
-  constexpr unsigned c_encoding() const noexcept { return value; }
-};
-
-class year_month_day {};
-#endif
-
-// A rudimentary weekday formatter.
-template <typename Char> struct formatter<weekday, Char> {
- private:
-  bool localized = false;
-
- public:
-  FMT_CONSTEXPR auto parse(basic_format_parse_context<Char>& ctx)
-      -> decltype(ctx.begin()) {
-    auto begin = ctx.begin(), end = ctx.end();
-    if (begin != end && *begin == 'L') {
-      ++begin;
-      localized = true;
-    }
-    return begin;
-  }
-
-  template <typename FormatContext>
-  auto format(weekday wd, FormatContext& ctx) const -> decltype(ctx.out()) {
-    auto time = std::tm();
-    time.tm_wday = static_cast<int>(wd.c_encoding());
-    detail::get_locale loc(localized, ctx.locale());
-    auto w = detail::tm_writer<decltype(ctx.out()), Char>(loc, ctx.out(), time);
-    w.on_abbr_weekday();
-    return w.out();
-  }
-};
-
-template <typename Rep, typename Period, typename Char>
-struct formatter<std::chrono::duration<Rep, Period>, Char> {
- private:
-  basic_format_specs<Char> specs;
-  int precision = -1;
-  using arg_ref_type = detail::arg_ref<Char>;
-  arg_ref_type width_ref;
-  arg_ref_type precision_ref;
-  bool localized = false;
-  basic_string_view<Char> format_str;
-  using duration = std::chrono::duration<Rep, Period>;
-
-  struct spec_handler {
-    formatter& f;
-    basic_format_parse_context<Char>& context;
-    basic_string_view<Char> format_str;
-
-    template <typename Id> FMT_CONSTEXPR arg_ref_type make_arg_ref(Id arg_id) {
-      context.check_arg_id(arg_id);
-      return arg_ref_type(arg_id);
-    }
-
-    FMT_CONSTEXPR arg_ref_type make_arg_ref(basic_string_view<Char> arg_id) {
-      context.check_arg_id(arg_id);
-      return arg_ref_type(arg_id);
-    }
-
-    FMT_CONSTEXPR arg_ref_type make_arg_ref(detail::auto_id) {
-      return arg_ref_type(context.next_arg_id());
-    }
-
-    void on_error(const char* msg) { FMT_THROW(format_error(msg)); }
-    FMT_CONSTEXPR void on_fill(basic_string_view<Char> fill) {
-      f.specs.fill = fill;
-    }
-    FMT_CONSTEXPR void on_align(align_t align) { f.specs.align = align; }
-    FMT_CONSTEXPR void on_width(int width) { f.specs.width = width; }
-    FMT_CONSTEXPR void on_precision(int _precision) {
-      f.precision = _precision;
-    }
-    FMT_CONSTEXPR void end_precision() {}
-
-    template <typename Id> FMT_CONSTEXPR void on_dynamic_width(Id arg_id) {
-      f.width_ref = make_arg_ref(arg_id);
-    }
-
-    template <typename Id> FMT_CONSTEXPR void on_dynamic_precision(Id arg_id) {
-      f.precision_ref = make_arg_ref(arg_id);
-    }
-  };
-
-  using iterator = typename basic_format_parse_context<Char>::iterator;
-  struct parse_range {
-    iterator begin;
-    iterator end;
-  };
-
-  FMT_CONSTEXPR parse_range do_parse(basic_format_parse_context<Char>& ctx) {
-    auto begin = ctx.begin(), end = ctx.end();
-    if (begin == end || *begin == '}') return {begin, begin};
-    spec_handler handler{*this, ctx, format_str};
-    begin = detail::parse_align(begin, end, handler);
-    if (begin == end) return {begin, begin};
-    begin = detail::parse_width(begin, end, handler);
-    if (begin == end) return {begin, begin};
-    if (*begin == '.') {
-      if (std::is_floating_point<Rep>::value)
-        begin = detail::parse_precision(begin, end, handler);
-      else
-        handler.on_error("precision not allowed for this argument type");
-    }
-    if (begin != end && *begin == 'L') {
-      ++begin;
-      localized = true;
-    }
-    end = detail::parse_chrono_format(begin, end,
-                                      detail::chrono_format_checker());
-    return {begin, end};
-  }
-
- public:
-  FMT_CONSTEXPR auto parse(basic_format_parse_context<Char>& ctx)
-      -> decltype(ctx.begin()) {
-    auto range = do_parse(ctx);
-    format_str = basic_string_view<Char>(
-        &*range.begin, detail::to_unsigned(range.end - range.begin));
-    return range.end;
-  }
-
-  template <typename FormatContext>
-  auto format(const duration& d, FormatContext& ctx) const
-      -> decltype(ctx.out()) {
-    auto specs_copy = specs;
-    auto precision_copy = precision;
-    auto begin = format_str.begin(), end = format_str.end();
-    // As a possible future optimization, we could avoid extra copying if width
-    // is not specified.
-    basic_memory_buffer<Char> buf;
-    auto out = std::back_inserter(buf);
-    detail::handle_dynamic_spec<detail::width_checker>(specs_copy.width,
-                                                       width_ref, ctx);
-    detail::handle_dynamic_spec<detail::precision_checker>(precision_copy,
-                                                           precision_ref, ctx);
-    if (begin == end || *begin == '}') {
-      out = detail::format_duration_value<Char>(out, d.count(), precision_copy);
-      detail::format_duration_unit<Char, Period>(out);
-    } else {
-      detail::chrono_formatter<FormatContext, decltype(out), Rep, Period> f(
-          ctx, out, d);
-      f.precision = precision_copy;
-      f.localized = localized;
-      detail::parse_chrono_format(begin, end, f);
-    }
-    return detail::write(
-        ctx.out(), basic_string_view<Char>(buf.data(), buf.size()), specs_copy);
-  }
-};
-
-template <typename Char, typename Duration>
-struct formatter<std::chrono::time_point<std::chrono::system_clock, Duration>,
-                 Char> : formatter<std::tm, Char> {
-  FMT_CONSTEXPR formatter() {
-    this->do_parse(default_specs,
-                   default_specs + sizeof(default_specs) / sizeof(Char));
-  }
-
-  template <typename ParseContext>
-  FMT_CONSTEXPR auto parse(ParseContext& ctx) -> decltype(ctx.begin()) {
-    return this->do_parse(ctx.begin(), ctx.end(), true);
-  }
-
-  template <typename FormatContext>
-  auto format(std::chrono::time_point<std::chrono::system_clock> val,
-              FormatContext& ctx) const -> decltype(ctx.out()) {
-    return formatter<std::tm, Char>::format(localtime(val), ctx);
-  }
-
-  static constexpr const Char default_specs[] = {'%', 'F', ' ', '%', 'T'};
-};
-
-template <typename Char, typename Duration>
-constexpr const Char
-    formatter<std::chrono::time_point<std::chrono::system_clock, Duration>,
-              Char>::default_specs[];
-
-template <typename Char> struct formatter<std::tm, Char> {
- private:
-  enum class spec {
-    unknown,
-    year_month_day,
-    hh_mm_ss,
-  };
-  spec spec_ = spec::unknown;
-  basic_string_view<Char> specs;
-
- protected:
-  template <typename It>
-  FMT_CONSTEXPR auto do_parse(It begin, It end, bool with_default = false)
-      -> It {
-    if (begin != end && *begin == ':') ++begin;
-    end = detail::parse_chrono_format(begin, end, detail::tm_format_checker());
-    if (!with_default || end != begin)
-      specs = {begin, detail::to_unsigned(end - begin)};
-    // basic_string_view<>::compare isn't constexpr before C++17.
-    if (specs.size() == 2 && specs[0] == Char('%')) {
-      if (specs[1] == Char('F'))
-        spec_ = spec::year_month_day;
-      else if (specs[1] == Char('T'))
-        spec_ = spec::hh_mm_ss;
-    }
-    return end;
-  }
-
- public:
-  template <typename ParseContext>
-  FMT_CONSTEXPR auto parse(ParseContext& ctx) -> decltype(ctx.begin()) {
-    return this->do_parse(ctx.begin(), ctx.end());
-  }
-
-  template <typename FormatContext>
-  auto format(const std::tm& tm, FormatContext& ctx) const
-      -> decltype(ctx.out()) {
-    const auto loc_ref = ctx.locale();
-    detail::get_locale loc(static_cast<bool>(loc_ref), loc_ref);
-    auto w = detail::tm_writer<decltype(ctx.out()), Char>(loc, ctx.out(), tm);
-    if (spec_ == spec::year_month_day)
-      w.on_iso_date();
-    else if (spec_ == spec::hh_mm_ss)
-      w.on_iso_time();
-    else
-      detail::parse_chrono_format(specs.begin(), specs.end(), w);
-    return w.out();
-  }
-};
-
-FMT_MODULE_EXPORT_END
-FMT_END_NAMESPACE
-
-#endif  // FMT_CHRONO_H_
diff --git a/contrib/libs/fmt/include/fmt/color.h b/contrib/libs/fmt/include/fmt/color.h
deleted file mode 100644
index dfbe482938..0000000000
--- a/contrib/libs/fmt/include/fmt/color.h
+++ /dev/null
@@ -1,638 +0,0 @@
-// Formatting library for C++ - color support
-//
-// Copyright (c) 2018 - present, Victor Zverovich and fmt contributors
-// All rights reserved.
-//
-// For the license information refer to format.h.
-
-#ifndef FMT_COLOR_H_
-#define FMT_COLOR_H_
-
-#include "format.h"
-
-// __declspec(deprecated) is broken in some MSVC versions.
-#if FMT_MSC_VER
-#  define FMT_DEPRECATED_NONMSVC
-#else
-#  define FMT_DEPRECATED_NONMSVC FMT_DEPRECATED
-#endif
-
-FMT_BEGIN_NAMESPACE
-FMT_MODULE_EXPORT_BEGIN
-
-enum class color : uint32_t {
-  alice_blue = 0xF0F8FF,               // rgb(240,248,255)
-  antique_white = 0xFAEBD7,            // rgb(250,235,215)
-  aqua = 0x00FFFF,                     // rgb(0,255,255)
-  aquamarine = 0x7FFFD4,               // rgb(127,255,212)
-  azure = 0xF0FFFF,                    // rgb(240,255,255)
-  beige = 0xF5F5DC,                    // rgb(245,245,220)
-  bisque = 0xFFE4C4,                   // rgb(255,228,196)
-  black = 0x000000,                    // rgb(0,0,0)
-  blanched_almond = 0xFFEBCD,          // rgb(255,235,205)
-  blue = 0x0000FF,                     // rgb(0,0,255)
-  blue_violet = 0x8A2BE2,              // rgb(138,43,226)
-  brown = 0xA52A2A,                    // rgb(165,42,42)
-  burly_wood = 0xDEB887,               // rgb(222,184,135)
-  cadet_blue = 0x5F9EA0,               // rgb(95,158,160)
-  chartreuse = 0x7FFF00,               // rgb(127,255,0)
-  chocolate = 0xD2691E,                // rgb(210,105,30)
-  coral = 0xFF7F50,                    // rgb(255,127,80)
-  cornflower_blue = 0x6495ED,          // rgb(100,149,237)
-  cornsilk = 0xFFF8DC,                 // rgb(255,248,220)
-  crimson = 0xDC143C,                  // rgb(220,20,60)
-  cyan = 0x00FFFF,                     // rgb(0,255,255)
-  dark_blue = 0x00008B,                // rgb(0,0,139)
-  dark_cyan = 0x008B8B,                // rgb(0,139,139)
-  dark_golden_rod = 0xB8860B,          // rgb(184,134,11)
-  dark_gray = 0xA9A9A9,                // rgb(169,169,169)
-  dark_green = 0x006400,               // rgb(0,100,0)
-  dark_khaki = 0xBDB76B,               // rgb(189,183,107)
-  dark_magenta = 0x8B008B,             // rgb(139,0,139)
-  dark_olive_green = 0x556B2F,         // rgb(85,107,47)
-  dark_orange = 0xFF8C00,              // rgb(255,140,0)
-  dark_orchid = 0x9932CC,              // rgb(153,50,204)
-  dark_red = 0x8B0000,                 // rgb(139,0,0)
-  dark_salmon = 0xE9967A,              // rgb(233,150,122)
-  dark_sea_green = 0x8FBC8F,           // rgb(143,188,143)
-  dark_slate_blue = 0x483D8B,          // rgb(72,61,139)
-  dark_slate_gray = 0x2F4F4F,          // rgb(47,79,79)
-  dark_turquoise = 0x00CED1,           // rgb(0,206,209)
-  dark_violet = 0x9400D3,              // rgb(148,0,211)
-  deep_pink = 0xFF1493,                // rgb(255,20,147)
-  deep_sky_blue = 0x00BFFF,            // rgb(0,191,255)
-  dim_gray = 0x696969,                 // rgb(105,105,105)
-  dodger_blue = 0x1E90FF,              // rgb(30,144,255)
-  fire_brick = 0xB22222,               // rgb(178,34,34)
-  floral_white = 0xFFFAF0,             // rgb(255,250,240)
-  forest_green = 0x228B22,             // rgb(34,139,34)
-  fuchsia = 0xFF00FF,                  // rgb(255,0,255)
-  gainsboro = 0xDCDCDC,                // rgb(220,220,220)
-  ghost_white = 0xF8F8FF,              // rgb(248,248,255)
-  gold = 0xFFD700,                     // rgb(255,215,0)
-  golden_rod = 0xDAA520,               // rgb(218,165,32)
-  gray = 0x808080,                     // rgb(128,128,128)
-  green = 0x008000,                    // rgb(0,128,0)
-  green_yellow = 0xADFF2F,             // rgb(173,255,47)
-  honey_dew = 0xF0FFF0,                // rgb(240,255,240)
-  hot_pink = 0xFF69B4,                 // rgb(255,105,180)
-  indian_red = 0xCD5C5C,               // rgb(205,92,92)
-  indigo = 0x4B0082,                   // rgb(75,0,130)
-  ivory = 0xFFFFF0,                    // rgb(255,255,240)
-  khaki = 0xF0E68C,                    // rgb(240,230,140)
-  lavender = 0xE6E6FA,                 // rgb(230,230,250)
-  lavender_blush = 0xFFF0F5,           // rgb(255,240,245)
-  lawn_green = 0x7CFC00,               // rgb(124,252,0)
-  lemon_chiffon = 0xFFFACD,            // rgb(255,250,205)
-  light_blue = 0xADD8E6,               // rgb(173,216,230)
-  light_coral = 0xF08080,              // rgb(240,128,128)
-  light_cyan = 0xE0FFFF,               // rgb(224,255,255)
-  light_golden_rod_yellow = 0xFAFAD2,  // rgb(250,250,210)
-  light_gray = 0xD3D3D3,               // rgb(211,211,211)
-  light_green = 0x90EE90,              // rgb(144,238,144)
-  light_pink = 0xFFB6C1,               // rgb(255,182,193)
-  light_salmon = 0xFFA07A,             // rgb(255,160,122)
-  light_sea_green = 0x20B2AA,          // rgb(32,178,170)
-  light_sky_blue = 0x87CEFA,           // rgb(135,206,250)
-  light_slate_gray = 0x778899,         // rgb(119,136,153)
-  light_steel_blue = 0xB0C4DE,         // rgb(176,196,222)
-  light_yellow = 0xFFFFE0,             // rgb(255,255,224)
-  lime = 0x00FF00,                     // rgb(0,255,0)
-  lime_green = 0x32CD32,               // rgb(50,205,50)
-  linen = 0xFAF0E6,                    // rgb(250,240,230)
-  magenta = 0xFF00FF,                  // rgb(255,0,255)
-  maroon = 0x800000,                   // rgb(128,0,0)
-  medium_aquamarine = 0x66CDAA,        // rgb(102,205,170)
-  medium_blue = 0x0000CD,              // rgb(0,0,205)
-  medium_orchid = 0xBA55D3,            // rgb(186,85,211)
-  medium_purple = 0x9370DB,            // rgb(147,112,219)
-  medium_sea_green = 0x3CB371,         // rgb(60,179,113)
-  medium_slate_blue = 0x7B68EE,        // rgb(123,104,238)
-  medium_spring_green = 0x00FA9A,      // rgb(0,250,154)
-  medium_turquoise = 0x48D1CC,         // rgb(72,209,204)
-  medium_violet_red = 0xC71585,        // rgb(199,21,133)
-  midnight_blue = 0x191970,            // rgb(25,25,112)
-  mint_cream = 0xF5FFFA,               // rgb(245,255,250)
-  misty_rose = 0xFFE4E1,               // rgb(255,228,225)
-  moccasin = 0xFFE4B5,                 // rgb(255,228,181)
-  navajo_white = 0xFFDEAD,             // rgb(255,222,173)
-  navy = 0x000080,                     // rgb(0,0,128)
-  old_lace = 0xFDF5E6,                 // rgb(253,245,230)
-  olive = 0x808000,                    // rgb(128,128,0)
-  olive_drab = 0x6B8E23,               // rgb(107,142,35)
-  orange = 0xFFA500,                   // rgb(255,165,0)
-  orange_red = 0xFF4500,               // rgb(255,69,0)
-  orchid = 0xDA70D6,                   // rgb(218,112,214)
-  pale_golden_rod = 0xEEE8AA,          // rgb(238,232,170)
-  pale_green = 0x98FB98,               // rgb(152,251,152)
-  pale_turquoise = 0xAFEEEE,           // rgb(175,238,238)
-  pale_violet_red = 0xDB7093,          // rgb(219,112,147)
-  papaya_whip = 0xFFEFD5,              // rgb(255,239,213)
-  peach_puff = 0xFFDAB9,               // rgb(255,218,185)
-  peru = 0xCD853F,                     // rgb(205,133,63)
-  pink = 0xFFC0CB,                     // rgb(255,192,203)
-  plum = 0xDDA0DD,                     // rgb(221,160,221)
-  powder_blue = 0xB0E0E6,              // rgb(176,224,230)
-  purple = 0x800080,                   // rgb(128,0,128)
-  rebecca_purple = 0x663399,           // rgb(102,51,153)
-  red = 0xFF0000,                      // rgb(255,0,0)
-  rosy_brown = 0xBC8F8F,               // rgb(188,143,143)
-  royal_blue = 0x4169E1,               // rgb(65,105,225)
-  saddle_brown = 0x8B4513,             // rgb(139,69,19)
-  salmon = 0xFA8072,                   // rgb(250,128,114)
-  sandy_brown = 0xF4A460,              // rgb(244,164,96)
-  sea_green = 0x2E8B57,                // rgb(46,139,87)
-  sea_shell = 0xFFF5EE,                // rgb(255,245,238)
-  sienna = 0xA0522D,                   // rgb(160,82,45)
-  silver = 0xC0C0C0,                   // rgb(192,192,192)
-  sky_blue = 0x87CEEB,                 // rgb(135,206,235)
-  slate_blue = 0x6A5ACD,               // rgb(106,90,205)
-  slate_gray = 0x708090,               // rgb(112,128,144)
-  snow = 0xFFFAFA,                     // rgb(255,250,250)
-  spring_green = 0x00FF7F,             // rgb(0,255,127)
-  steel_blue = 0x4682B4,               // rgb(70,130,180)
-  tan = 0xD2B48C,                      // rgb(210,180,140)
-  teal = 0x008080,                     // rgb(0,128,128)
-  thistle = 0xD8BFD8,                  // rgb(216,191,216)
-  tomato = 0xFF6347,                   // rgb(255,99,71)
-  turquoise = 0x40E0D0,                // rgb(64,224,208)
-  violet = 0xEE82EE,                   // rgb(238,130,238)
-  wheat = 0xF5DEB3,                    // rgb(245,222,179)
-  white = 0xFFFFFF,                    // rgb(255,255,255)
-  white_smoke = 0xF5F5F5,              // rgb(245,245,245)
-  yellow = 0xFFFF00,                   // rgb(255,255,0)
-  yellow_green = 0x9ACD32              // rgb(154,205,50)
-};                                     // enum class color
-
-enum class terminal_color : uint8_t {
-  black = 30,
-  red,
-  green,
-  yellow,
-  blue,
-  magenta,
-  cyan,
-  white,
-  bright_black = 90,
-  bright_red,
-  bright_green,
-  bright_yellow,
-  bright_blue,
-  bright_magenta,
-  bright_cyan,
-  bright_white
-};
-
-enum class emphasis : uint8_t {
-  bold = 1,
-  faint = 1 << 1,
-  italic = 1 << 2,
-  underline = 1 << 3,
-  blink = 1 << 4,
-  reverse = 1 << 5,
-  conceal = 1 << 6,
-  strikethrough = 1 << 7,
-};
-
-// rgb is a struct for red, green and blue colors.
-// Using the name "rgb" makes some editors show the color in a tooltip.
-struct rgb {
-  FMT_CONSTEXPR rgb() : r(0), g(0), b(0) {}
-  FMT_CONSTEXPR rgb(uint8_t r_, uint8_t g_, uint8_t b_) : r(r_), g(g_), b(b_) {}
-  FMT_CONSTEXPR rgb(uint32_t hex)
-      : r((hex >> 16) & 0xFF), g((hex >> 8) & 0xFF), b(hex & 0xFF) {}
-  FMT_CONSTEXPR rgb(color hex)
-      : r((uint32_t(hex) >> 16) & 0xFF),
-        g((uint32_t(hex) >> 8) & 0xFF),
-        b(uint32_t(hex) & 0xFF) {}
-  uint8_t r;
-  uint8_t g;
-  uint8_t b;
-};
-
-FMT_BEGIN_DETAIL_NAMESPACE
-
-// color is a struct of either a rgb color or a terminal color.
-struct color_type {
-  FMT_CONSTEXPR color_type() FMT_NOEXCEPT : is_rgb(), value{} {}
-  FMT_CONSTEXPR color_type(color rgb_color) FMT_NOEXCEPT : is_rgb(true),
-                                                           value{} {
-    value.rgb_color = static_cast<uint32_t>(rgb_color);
-  }
-  FMT_CONSTEXPR color_type(rgb rgb_color) FMT_NOEXCEPT : is_rgb(true), value{} {
-    value.rgb_color = (static_cast<uint32_t>(rgb_color.r) << 16) |
-                      (static_cast<uint32_t>(rgb_color.g) << 8) | rgb_color.b;
-  }
-  FMT_CONSTEXPR color_type(terminal_color term_color) FMT_NOEXCEPT : is_rgb(),
-                                                                     value{} {
-    value.term_color = static_cast<uint8_t>(term_color);
-  }
-  bool is_rgb;
-  union color_union {
-    uint8_t term_color;
-    uint32_t rgb_color;
-  } value;
-};
-
-FMT_END_DETAIL_NAMESPACE
-
-/** A text style consisting of foreground and background colors and emphasis. */
-class text_style {
- public:
-  FMT_CONSTEXPR text_style(emphasis em = emphasis()) FMT_NOEXCEPT
-      : set_foreground_color(),
-        set_background_color(),
-        ems(em) {}
-
-  FMT_CONSTEXPR text_style& operator|=(const text_style& rhs) {
-    if (!set_foreground_color) {
-      set_foreground_color = rhs.set_foreground_color;
-      foreground_color = rhs.foreground_color;
-    } else if (rhs.set_foreground_color) {
-      if (!foreground_color.is_rgb || !rhs.foreground_color.is_rgb)
-        FMT_THROW(format_error("can't OR a terminal color"));
-      foreground_color.value.rgb_color |= rhs.foreground_color.value.rgb_color;
-    }
-
-    if (!set_background_color) {
-      set_background_color = rhs.set_background_color;
-      background_color = rhs.background_color;
-    } else if (rhs.set_background_color) {
-      if (!background_color.is_rgb || !rhs.background_color.is_rgb)
-        FMT_THROW(format_error("can't OR a terminal color"));
-      background_color.value.rgb_color |= rhs.background_color.value.rgb_color;
-    }
-
-    ems = static_cast<emphasis>(static_cast<uint8_t>(ems) |
-                                static_cast<uint8_t>(rhs.ems));
-    return *this;
-  }
-
-  friend FMT_CONSTEXPR text_style operator|(text_style lhs,
-                                            const text_style& rhs) {
-    return lhs |= rhs;
-  }
-
-  FMT_DEPRECATED_NONMSVC FMT_CONSTEXPR text_style& operator&=(
-      const text_style& rhs) {
-    return and_assign(rhs);
-  }
-
-  FMT_DEPRECATED_NONMSVC friend FMT_CONSTEXPR text_style
-  operator&(text_style lhs, const text_style& rhs) {
-    return lhs.and_assign(rhs);
-  }
-
-  FMT_CONSTEXPR bool has_foreground() const FMT_NOEXCEPT {
-    return set_foreground_color;
-  }
-  FMT_CONSTEXPR bool has_background() const FMT_NOEXCEPT {
-    return set_background_color;
-  }
-  FMT_CONSTEXPR bool has_emphasis() const FMT_NOEXCEPT {
-    return static_cast<uint8_t>(ems) != 0;
-  }
-  FMT_CONSTEXPR detail::color_type get_foreground() const FMT_NOEXCEPT {
-    FMT_ASSERT(has_foreground(), "no foreground specified for this style");
-    return foreground_color;
-  }
-  FMT_CONSTEXPR detail::color_type get_background() const FMT_NOEXCEPT {
-    FMT_ASSERT(has_background(), "no background specified for this style");
-    return background_color;
-  }
-  FMT_CONSTEXPR emphasis get_emphasis() const FMT_NOEXCEPT {
-    FMT_ASSERT(has_emphasis(), "no emphasis specified for this style");
-    return ems;
-  }
-
- private:
-  FMT_CONSTEXPR text_style(bool is_foreground,
-                           detail::color_type text_color) FMT_NOEXCEPT
-      : set_foreground_color(),
-        set_background_color(),
-        ems() {
-    if (is_foreground) {
-      foreground_color = text_color;
-      set_foreground_color = true;
-    } else {
-      background_color = text_color;
-      set_background_color = true;
-    }
-  }
-
-  // DEPRECATED!
-  FMT_CONSTEXPR text_style& and_assign(const text_style& rhs) {
-    if (!set_foreground_color) {
-      set_foreground_color = rhs.set_foreground_color;
-      foreground_color = rhs.foreground_color;
-    } else if (rhs.set_foreground_color) {
-      if (!foreground_color.is_rgb || !rhs.foreground_color.is_rgb)
-        FMT_THROW(format_error("can't AND a terminal color"));
-      foreground_color.value.rgb_color &= rhs.foreground_color.value.rgb_color;
-    }
-
-    if (!set_background_color) {
-      set_background_color = rhs.set_background_color;
-      background_color = rhs.background_color;
-    } else if (rhs.set_background_color) {
-      if (!background_color.is_rgb || !rhs.background_color.is_rgb)
-        FMT_THROW(format_error("can't AND a terminal color"));
-      background_color.value.rgb_color &= rhs.background_color.value.rgb_color;
-    }
-
-    ems = static_cast<emphasis>(static_cast<uint8_t>(ems) &
-                                static_cast<uint8_t>(rhs.ems));
-    return *this;
-  }
-
-  friend FMT_CONSTEXPR_DECL text_style fg(detail::color_type foreground)
-      FMT_NOEXCEPT;
-
-  friend FMT_CONSTEXPR_DECL text_style bg(detail::color_type background)
-      FMT_NOEXCEPT;
-
-  detail::color_type foreground_color;
-  detail::color_type background_color;
-  bool set_foreground_color;
-  bool set_background_color;
-  emphasis ems;
-};
-
-/** Creates a text style from the foreground (text) color. */
-FMT_CONSTEXPR inline text_style fg(detail::color_type foreground) FMT_NOEXCEPT {
-  return text_style(true, foreground);
-}
-
-/** Creates a text style from the background color. */
-FMT_CONSTEXPR inline text_style bg(detail::color_type background) FMT_NOEXCEPT {
-  return text_style(false, background);
-}
-
-FMT_CONSTEXPR inline text_style operator|(emphasis lhs,
-                                          emphasis rhs) FMT_NOEXCEPT {
-  return text_style(lhs) | rhs;
-}
-
-FMT_BEGIN_DETAIL_NAMESPACE
-
-template <typename Char> struct ansi_color_escape {
-  FMT_CONSTEXPR ansi_color_escape(detail::color_type text_color,
-                                  const char* esc) FMT_NOEXCEPT {
-    // If we have a terminal color, we need to output another escape code
-    // sequence.
-    if (!text_color.is_rgb) {
-      bool is_background = esc == string_view("\x1b[48;2;");
-      uint32_t value = text_color.value.term_color;
-      // Background ASCII codes are the same as the foreground ones but with
-      // 10 more.
-      if (is_background) value += 10u;
-
-      size_t index = 0;
-      buffer[index++] = static_cast<Char>('\x1b');
-      buffer[index++] = static_cast<Char>('[');
-
-      if (value >= 100u) {
-        buffer[index++] = static_cast<Char>('1');
-        value %= 100u;
-      }
-      buffer[index++] = static_cast<Char>('0' + value / 10u);
-      buffer[index++] = static_cast<Char>('0' + value % 10u);
-
-      buffer[index++] = static_cast<Char>('m');
-      buffer[index++] = static_cast<Char>('\0');
-      return;
-    }
-
-    for (int i = 0; i < 7; i++) {
-      buffer[i] = static_cast<Char>(esc[i]);
-    }
-    rgb color(text_color.value.rgb_color);
-    to_esc(color.r, buffer + 7, ';');
-    to_esc(color.g, buffer + 11, ';');
-    to_esc(color.b, buffer + 15, 'm');
-    buffer[19] = static_cast<Char>(0);
-  }
-  FMT_CONSTEXPR ansi_color_escape(emphasis em) FMT_NOEXCEPT {
-    uint8_t em_codes[num_emphases] = {};
-    if (has_emphasis(em, emphasis::bold)) em_codes[0] = 1;
-    if (has_emphasis(em, emphasis::faint)) em_codes[1] = 2;
-    if (has_emphasis(em, emphasis::italic)) em_codes[2] = 3;
-    if (has_emphasis(em, emphasis::underline)) em_codes[3] = 4;
-    if (has_emphasis(em, emphasis::blink)) em_codes[4] = 5;
-    if (has_emphasis(em, emphasis::reverse)) em_codes[5] = 7;
-    if (has_emphasis(em, emphasis::conceal)) em_codes[6] = 8;
-    if (has_emphasis(em, emphasis::strikethrough)) em_codes[7] = 9;
-
-    size_t index = 0;
-    for (size_t i = 0; i < num_emphases; ++i) {
-      if (!em_codes[i]) continue;
-      buffer[index++] = static_cast<Char>('\x1b');
-      buffer[index++] = static_cast<Char>('[');
-      buffer[index++] = static_cast<Char>('0' + em_codes[i]);
-      buffer[index++] = static_cast<Char>('m');
-    }
-    buffer[index++] = static_cast<Char>(0);
-  }
-  FMT_CONSTEXPR operator const Char*() const FMT_NOEXCEPT { return buffer; }
-
-  FMT_CONSTEXPR const Char* begin() const FMT_NOEXCEPT { return buffer; }
-  FMT_CONSTEXPR_CHAR_TRAITS const Char* end() const FMT_NOEXCEPT {
-    return buffer + std::char_traits<Char>::length(buffer);
-  }
-
- private:
-  static constexpr size_t num_emphases = 8;
-  Char buffer[7u + 3u * num_emphases + 1u];
-
-  static FMT_CONSTEXPR void to_esc(uint8_t c, Char* out,
-                                   char delimiter) FMT_NOEXCEPT {
-    out[0] = static_cast<Char>('0' + c / 100);
-    out[1] = static_cast<Char>('0' + c / 10 % 10);
-    out[2] = static_cast<Char>('0' + c % 10);
-    out[3] = static_cast<Char>(delimiter);
-  }
-  static FMT_CONSTEXPR bool has_emphasis(emphasis em,
-                                         emphasis mask) FMT_NOEXCEPT {
-    return static_cast<uint8_t>(em) & static_cast<uint8_t>(mask);
-  }
-};
-
-template <typename Char>
-FMT_CONSTEXPR ansi_color_escape<Char> make_foreground_color(
-    detail::color_type foreground) FMT_NOEXCEPT {
-  return ansi_color_escape<Char>(foreground, "\x1b[38;2;");
-}
-
-template <typename Char>
-FMT_CONSTEXPR ansi_color_escape<Char> make_background_color(
-    detail::color_type background) FMT_NOEXCEPT {
-  return ansi_color_escape<Char>(background, "\x1b[48;2;");
-}
-
-template <typename Char>
-FMT_CONSTEXPR ansi_color_escape<Char> make_emphasis(emphasis em) FMT_NOEXCEPT {
-  return ansi_color_escape<Char>(em);
-}
-
-template <typename Char>
-inline void fputs(const Char* chars, FILE* stream) FMT_NOEXCEPT {
-  std::fputs(chars, stream);
-}
-
-template <>
-inline void fputs<wchar_t>(const wchar_t* chars, FILE* stream) FMT_NOEXCEPT {
-  std::fputws(chars, stream);
-}
-
-template <typename Char> inline void reset_color(FILE* stream) FMT_NOEXCEPT {
-  fputs("\x1b[0m", stream);
-}
-
-template <> inline void reset_color<wchar_t>(FILE* stream) FMT_NOEXCEPT {
-  fputs(L"\x1b[0m", stream);
-}
-
-template <typename Char>
-inline void reset_color(buffer<Char>& buffer) FMT_NOEXCEPT {
-  auto reset_color = string_view("\x1b[0m");
-  buffer.append(reset_color.begin(), reset_color.end());
-}
-
-template <typename Char>
-void vformat_to(buffer<Char>& buf, const text_style& ts,
-                basic_string_view<Char> format_str,
-                basic_format_args<buffer_context<type_identity_t<Char>>> args) {
-  bool has_style = false;
-  if (ts.has_emphasis()) {
-    has_style = true;
-    auto emphasis = detail::make_emphasis<Char>(ts.get_emphasis());
-    buf.append(emphasis.begin(), emphasis.end());
-  }
-  if (ts.has_foreground()) {
-    has_style = true;
-    auto foreground = detail::make_foreground_color<Char>(ts.get_foreground());
-    buf.append(foreground.begin(), foreground.end());
-  }
-  if (ts.has_background()) {
-    has_style = true;
-    auto background = detail::make_background_color<Char>(ts.get_background());
-    buf.append(background.begin(), background.end());
-  }
-  detail::vformat_to(buf, format_str, args, {});
-  if (has_style) detail::reset_color<Char>(buf);
-}
-
-FMT_END_DETAIL_NAMESPACE
-
-template <typename S, typename Char = char_t<S>>
-void vprint(std::FILE* f, const text_style& ts, const S& format,
-            basic_format_args<buffer_context<type_identity_t<Char>>> args) {
-  basic_memory_buffer<Char> buf;
-  detail::vformat_to(buf, ts, to_string_view(format), args);
-  buf.push_back(Char(0));
-  detail::fputs(buf.data(), f);
-}
-
-/**
-  \rst
-  Formats a string and prints it to the specified file stream using ANSI
-  escape sequences to specify text formatting.
-
-  **Example**::
-
-    fmt::print(fmt::emphasis::bold | fg(fmt::color::red),
-               "Elapsed time: {0:.2f} seconds", 1.23);
-  \endrst
- */
-template <typename S, typename... Args,
-          FMT_ENABLE_IF(detail::is_string<S>::value)>
-void print(std::FILE* f, const text_style& ts, const S& format_str,
-           const Args&... args) {
-  vprint(f, ts, format_str,
-         fmt::make_args_checked<Args...>(format_str, args...));
-}
-
-/**
-  \rst
-  Formats a string and prints it to stdout using ANSI escape sequences to
-  specify text formatting.
-
-  **Example**::
-
-    fmt::print(fmt::emphasis::bold | fg(fmt::color::red),
-               "Elapsed time: {0:.2f} seconds", 1.23);
-  \endrst
- */
-template <typename S, typename... Args,
-          FMT_ENABLE_IF(detail::is_string<S>::value)>
-void print(const text_style& ts, const S& format_str, const Args&... args) {
-  return print(stdout, ts, format_str, args...);
-}
-
-template <typename S, typename Char = char_t<S>>
-inline std::basic_string<Char> vformat(
-    const text_style& ts, const S& format_str,
-    basic_format_args<buffer_context<type_identity_t<Char>>> args) {
-  basic_memory_buffer<Char> buf;
-  detail::vformat_to(buf, ts, to_string_view(format_str), args);
-  return fmt::to_string(buf);
-}
-
-/**
-  \rst
-  Formats arguments and returns the result as a string using ANSI
-  escape sequences to specify text formatting.
-
-  **Example**::
-
-    #include <fmt/color.h>
-    std::string message = fmt::format(fmt::emphasis::bold | fg(fmt::color::red),
-                                      "The answer is {}", 42);
-  \endrst
-*/
-template <typename S, typename... Args, typename Char = char_t<S>>
-inline std::basic_string<Char> format(const text_style& ts, const S& format_str,
-                                      const Args&... args) {
-  return fmt::vformat(ts, to_string_view(format_str),
-                      fmt::make_args_checked<Args...>(format_str, args...));
-}
-
-/**
-  Formats a string with the given text_style and writes the output to ``out``.
- */
-template <typename OutputIt, typename Char,
-          FMT_ENABLE_IF(detail::is_output_iterator<OutputIt, Char>::value)>
-OutputIt vformat_to(
-    OutputIt out, const text_style& ts, basic_string_view<Char> format_str,
-    basic_format_args<buffer_context<type_identity_t<Char>>> args) {
-  auto&& buf = detail::get_buffer<Char>(out);
-  detail::vformat_to(buf, ts, format_str, args);
-  return detail::get_iterator(buf);
-}
-
-/**
-  \rst
-  Formats arguments with the given text_style, writes the result to the output
-  iterator ``out`` and returns the iterator past the end of the output range.
-
-  **Example**::
-
-    std::vector<char> out;
-    fmt::format_to(std::back_inserter(out),
-                   fmt::emphasis::bold | fg(fmt::color::red), "{}", 42);
-  \endrst
-*/
-template <typename OutputIt, typename S, typename... Args,
-          bool enable = detail::is_output_iterator<OutputIt, char_t<S>>::value&&
-              detail::is_string<S>::value>
-inline auto format_to(OutputIt out, const text_style& ts, const S& format_str,
-                      Args&&... args) ->
-    typename std::enable_if<enable, OutputIt>::type {
-  return vformat_to(out, ts, to_string_view(format_str),
-                    fmt::make_args_checked<Args...>(format_str, args...));
-}
-
-FMT_MODULE_EXPORT_END
-FMT_END_NAMESPACE
-
-#endif  // FMT_COLOR_H_
diff --git a/contrib/libs/fmt/include/fmt/compile.h b/contrib/libs/fmt/include/fmt/compile.h
deleted file mode 100644
index 1dba3ddb52..0000000000
--- a/contrib/libs/fmt/include/fmt/compile.h
+++ /dev/null
@@ -1,642 +0,0 @@
-// Formatting library for C++ - experimental format string compilation
-//
-// Copyright (c) 2012 - present, Victor Zverovich and fmt contributors
-// All rights reserved.
-//
-// For the license information refer to format.h.
-
-#ifndef FMT_COMPILE_H_
-#define FMT_COMPILE_H_
-
-#include "format.h"
-
-FMT_BEGIN_NAMESPACE
-namespace detail {
-
-// An output iterator that counts the number of objects written to it and
-// discards them.
-class counting_iterator {
- private:
-  size_t count_;
-
- public:
-  using iterator_category = std::output_iterator_tag;
-  using difference_type = std::ptrdiff_t;
-  using pointer = void;
-  using reference = void;
-  using _Unchecked_type = counting_iterator;  // Mark iterator as checked.
-
-  struct value_type {
-    template <typename T> void operator=(const T&) {}
-  };
-
-  counting_iterator() : count_(0) {}
-
-  size_t count() const { return count_; }
-
-  counting_iterator& operator++() {
-    ++count_;
-    return *this;
-  }
-  counting_iterator operator++(int) {
-    auto it = *this;
-    ++*this;
-    return it;
-  }
-
-  friend counting_iterator operator+(counting_iterator it, difference_type n) {
-    it.count_ += static_cast<size_t>(n);
-    return it;
-  }
-
-  value_type operator*() const { return {}; }
-};
-
-template <typename Char, typename InputIt>
-inline counting_iterator copy_str(InputIt begin, InputIt end,
-                                  counting_iterator it) {
-  return it + (end - begin);
-}
-
-template <typename OutputIt> class truncating_iterator_base {
- protected:
-  OutputIt out_;
-  size_t limit_;
-  size_t count_ = 0;
-
-  truncating_iterator_base() : out_(), limit_(0) {}
-
-  truncating_iterator_base(OutputIt out, size_t limit)
-      : out_(out), limit_(limit) {}
-
- public:
-  using iterator_category = std::output_iterator_tag;
-  using value_type = typename std::iterator_traits<OutputIt>::value_type;
-  using difference_type = std::ptrdiff_t;
-  using pointer = void;
-  using reference = void;
-  using _Unchecked_type =
-      truncating_iterator_base;  // Mark iterator as checked.
-
-  OutputIt base() const { return out_; }
-  size_t count() const { return count_; }
-};
-
-// An output iterator that truncates the output and counts the number of objects
-// written to it.
-template <typename OutputIt,
-          typename Enable = typename std::is_void<
-              typename std::iterator_traits<OutputIt>::value_type>::type>
-class truncating_iterator;
-
-template <typename OutputIt>
-class truncating_iterator<OutputIt, std::false_type>
-    : public truncating_iterator_base<OutputIt> {
-  mutable typename truncating_iterator_base<OutputIt>::value_type blackhole_;
-
- public:
-  using value_type = typename truncating_iterator_base<OutputIt>::value_type;
-
-  truncating_iterator() = default;
-
-  truncating_iterator(OutputIt out, size_t limit)
-      : truncating_iterator_base<OutputIt>(out, limit) {}
-
-  truncating_iterator& operator++() {
-    if (this->count_++ < this->limit_) ++this->out_;
-    return *this;
-  }
-
-  truncating_iterator operator++(int) {
-    auto it = *this;
-    ++*this;
-    return it;
-  }
-
-  value_type& operator*() const {
-    return this->count_ < this->limit_ ? *this->out_ : blackhole_;
-  }
-};
-
-template <typename OutputIt>
-class truncating_iterator<OutputIt, std::true_type>
-    : public truncating_iterator_base<OutputIt> {
- public:
-  truncating_iterator() = default;
-
-  truncating_iterator(OutputIt out, size_t limit)
-      : truncating_iterator_base<OutputIt>(out, limit) {}
-
-  template <typename T> truncating_iterator& operator=(T val) {
-    if (this->count_++ < this->limit_) *this->out_++ = val;
-    return *this;
-  }
-
-  truncating_iterator& operator++() { return *this; }
-  truncating_iterator& operator++(int) { return *this; }
-  truncating_iterator& operator*() { return *this; }
-};
-
-// A compile-time string which is compiled into fast formatting code.
-class compiled_string {};
-
-template <typename S>
-struct is_compiled_string : std::is_base_of<compiled_string, S> {};
-
-/**
-  \rst
-  Converts a string literal *s* into a format string that will be parsed at
-  compile time and converted into efficient formatting code. Requires C++17
-  ``constexpr if`` compiler support.
-
-  **Example**::
-
-    // Converts 42 into std::string using the most efficient method and no
-    // runtime format string processing.
-    std::string s = fmt::format(FMT_COMPILE("{}"), 42);
-  \endrst
- */
-#if defined(__cpp_if_constexpr) && defined(__cpp_return_type_deduction)
-#  define FMT_COMPILE(s) \
-    FMT_STRING_IMPL(s, fmt::detail::compiled_string, explicit)
-#else
-#  define FMT_COMPILE(s) FMT_STRING(s)
-#endif
-
-#if FMT_USE_NONTYPE_TEMPLATE_PARAMETERS
-template <typename Char, size_t N,
-          fmt::detail_exported::fixed_string<Char, N> Str>
-struct udl_compiled_string : compiled_string {
-  using char_type = Char;
-  constexpr operator basic_string_view<char_type>() const {
-    return {Str.data, N - 1};
-  }
-};
-#endif
-
-template <typename T, typename... Tail>
-const T& first(const T& value, const Tail&...) {
-  return value;
-}
-
-#if defined(__cpp_if_constexpr) && defined(__cpp_return_type_deduction)
-template <typename... Args> struct type_list {};
-
-// Returns a reference to the argument at index N from [first, rest...].
-template <int N, typename T, typename... Args>
-constexpr const auto& get([[maybe_unused]] const T& first,
-                          [[maybe_unused]] const Args&... rest) {
-  static_assert(N < 1 + sizeof...(Args), "index is out of bounds");
-  if constexpr (N == 0)
-    return first;
-  else
-    return detail::get<N - 1>(rest...);
-}
-
-template <typename Char, typename... Args>
-constexpr int get_arg_index_by_name(basic_string_view<Char> name,
-                                    type_list<Args...>) {
-  return get_arg_index_by_name<Args...>(name);
-}
-
-template <int N, typename> struct get_type_impl;
-
-template <int N, typename... Args> struct get_type_impl<N, type_list<Args...>> {
-  using type =
-      remove_cvref_t<decltype(detail::get<N>(std::declval<Args>()...))>;
-};
-
-template <int N, typename T>
-using get_type = typename get_type_impl<N, T>::type;
-
-template <typename T> struct is_compiled_format : std::false_type {};
-
-template <typename Char> struct text {
-  basic_string_view<Char> data;
-  using char_type = Char;
-
-  template <typename OutputIt, typename... Args>
-  constexpr OutputIt format(OutputIt out, const Args&...) const {
-    return write<Char>(out, data);
-  }
-};
-
-template <typename Char>
-struct is_compiled_format<text<Char>> : std::true_type {};
-
-template <typename Char>
-constexpr text<Char> make_text(basic_string_view<Char> s, size_t pos,
-                               size_t size) {
-  return {{&s[pos], size}};
-}
-
-template <typename Char> struct code_unit {
-  Char value;
-  using char_type = Char;
-
-  template <typename OutputIt, typename... Args>
-  constexpr OutputIt format(OutputIt out, const Args&...) const {
-    return write<Char>(out, value);
-  }
-};
-
-// This ensures that the argument type is convertible to `const T&`.
-template <typename T, int N, typename... Args>
-constexpr const T& get_arg_checked(const Args&... args) {
-  const auto& arg = detail::get<N>(args...);
-  if constexpr (detail::is_named_arg<remove_cvref_t<decltype(arg)>>()) {
-    return arg.value;
-  } else {
-    return arg;
-  }
-}
-
-template <typename Char>
-struct is_compiled_format<code_unit<Char>> : std::true_type {};
-
-// A replacement field that refers to argument N.
-template <typename Char, typename T, int N> struct field {
-  using char_type = Char;
-
-  template <typename OutputIt, typename... Args>
-  constexpr OutputIt format(OutputIt out, const Args&... args) const {
-    return write<Char>(out, get_arg_checked<T, N>(args...));
-  }
-};
-
-template <typename Char, typename T, int N>
-struct is_compiled_format<field<Char, T, N>> : std::true_type {};
-
-// A replacement field that refers to argument with name.
-template <typename Char> struct runtime_named_field {
-  using char_type = Char;
-  basic_string_view<Char> name;
-
-  template <typename OutputIt, typename T>
-  constexpr static bool try_format_argument(
-      OutputIt& out,
-      // [[maybe_unused]] due to unused-but-set-parameter warning in GCC 7,8,9
-      [[maybe_unused]] basic_string_view<Char> arg_name, const T& arg) {
-    if constexpr (is_named_arg<typename std::remove_cv<T>::type>::value) {
-      if (arg_name == arg.name) {
-        out = write<Char>(out, arg.value);
-        return true;
-      }
-    }
-    return false;
-  }
-
-  template <typename OutputIt, typename... Args>
-  constexpr OutputIt format(OutputIt out, const Args&... args) const {
-    bool found = (try_format_argument(out, name, args) || ...);
-    if (!found) {
-      FMT_THROW(format_error("argument with specified name is not found"));
-    }
-    return out;
-  }
-};
-
-template <typename Char>
-struct is_compiled_format<runtime_named_field<Char>> : std::true_type {};
-
-// A replacement field that refers to argument N and has format specifiers.
-template <typename Char, typename T, int N> struct spec_field {
-  using char_type = Char;
-  formatter<T, Char> fmt;
-
-  template <typename OutputIt, typename... Args>
-  constexpr FMT_INLINE OutputIt format(OutputIt out,
-                                       const Args&... args) const {
-    const auto& vargs =
-        fmt::make_format_args<basic_format_context<OutputIt, Char>>(args...);
-    basic_format_context<OutputIt, Char> ctx(out, vargs);
-    return fmt.format(get_arg_checked<T, N>(args...), ctx);
-  }
-};
-
-template <typename Char, typename T, int N>
-struct is_compiled_format<spec_field<Char, T, N>> : std::true_type {};
-
-template <typename L, typename R> struct concat {
-  L lhs;
-  R rhs;
-  using char_type = typename L::char_type;
-
-  template <typename OutputIt, typename... Args>
-  constexpr OutputIt format(OutputIt out, const Args&... args) const {
-    out = lhs.format(out, args...);
-    return rhs.format(out, args...);
-  }
-};
-
-template <typename L, typename R>
-struct is_compiled_format<concat<L, R>> : std::true_type {};
-
-template <typename L, typename R>
-constexpr concat<L, R> make_concat(L lhs, R rhs) {
-  return {lhs, rhs};
-}
-
-struct unknown_format {};
-
-template <typename Char>
-constexpr size_t parse_text(basic_string_view<Char> str, size_t pos) {
-  for (size_t size = str.size(); pos != size; ++pos) {
-    if (str[pos] == '{' || str[pos] == '}') break;
-  }
-  return pos;
-}
-
-template <typename Args, size_t POS, int ID, typename S>
-constexpr auto compile_format_string(S format_str);
-
-template <typename Args, size_t POS, int ID, typename T, typename S>
-constexpr auto parse_tail(T head, S format_str) {
-  if constexpr (POS !=
-                basic_string_view<typename S::char_type>(format_str).size()) {
-    constexpr auto tail = compile_format_string<Args, POS, ID>(format_str);
-    if constexpr (std::is_same<remove_cvref_t<decltype(tail)>,
-                               unknown_format>())
-      return tail;
-    else
-      return make_concat(head, tail);
-  } else {
-    return head;
-  }
-}
-
-template <typename T, typename Char> struct parse_specs_result {
-  formatter<T, Char> fmt;
-  size_t end;
-  int next_arg_id;
-};
-
-constexpr int manual_indexing_id = -1;
-
-template <typename T, typename Char>
-constexpr parse_specs_result<T, Char> parse_specs(basic_string_view<Char> str,
-                                                  size_t pos, int next_arg_id) {
-  str.remove_prefix(pos);
-  auto ctx = basic_format_parse_context<Char>(str, {}, next_arg_id);
-  auto f = formatter<T, Char>();
-  auto end = f.parse(ctx);
-  return {f, pos + fmt::detail::to_unsigned(end - str.data()) + 1,
-          next_arg_id == 0 ? manual_indexing_id : ctx.next_arg_id()};
-}
-
-template <typename Char> struct arg_id_handler {
-  arg_ref<Char> arg_id;
-
-  constexpr int operator()() {
-    FMT_ASSERT(false, "handler cannot be used with automatic indexing");
-    return 0;
-  }
-  constexpr int operator()(int id) {
-    arg_id = arg_ref<Char>(id);
-    return 0;
-  }
-  constexpr int operator()(basic_string_view<Char> id) {
-    arg_id = arg_ref<Char>(id);
-    return 0;
-  }
-
-  constexpr void on_error(const char* message) {
-    FMT_THROW(format_error(message));
-  }
-};
-
-template <typename Char> struct parse_arg_id_result {
-  arg_ref<Char> arg_id;
-  const Char* arg_id_end;
-};
-
-template <int ID, typename Char>
-constexpr auto parse_arg_id(const Char* begin, const Char* end) {
-  auto handler = arg_id_handler<Char>{arg_ref<Char>{}};
-  auto arg_id_end = parse_arg_id(begin, end, handler);
-  return parse_arg_id_result<Char>{handler.arg_id, arg_id_end};
-}
-
-template <typename T, typename Enable = void> struct field_type {
-  using type = remove_cvref_t<T>;
-};
-
-template <typename T>
-struct field_type<T, enable_if_t<detail::is_named_arg<T>::value>> {
-  using type = remove_cvref_t<decltype(T::value)>;
-};
-
-template <typename T, typename Args, size_t END_POS, int ARG_INDEX, int NEXT_ID,
-          typename S>
-constexpr auto parse_replacement_field_then_tail(S format_str) {
-  using char_type = typename S::char_type;
-  constexpr auto str = basic_string_view<char_type>(format_str);
-  constexpr char_type c = END_POS != str.size() ? str[END_POS] : char_type();
-  if constexpr (c == '}') {
-    return parse_tail<Args, END_POS + 1, NEXT_ID>(
-        field<char_type, typename field_type<T>::type, ARG_INDEX>(),
-        format_str);
-  } else if constexpr (c == ':') {
-    constexpr auto result = parse_specs<typename field_type<T>::type>(
-        str, END_POS + 1, NEXT_ID == manual_indexing_id ? 0 : NEXT_ID);
-    return parse_tail<Args, result.end, result.next_arg_id>(
-        spec_field<char_type, typename field_type<T>::type, ARG_INDEX>{
-            result.fmt},
-        format_str);
-  }
-}
-
-// Compiles a non-empty format string and returns the compiled representation
-// or unknown_format() on unrecognized input.
-template <typename Args, size_t POS, int ID, typename S>
-constexpr auto compile_format_string(S format_str) {
-  using char_type = typename S::char_type;
-  constexpr auto str = basic_string_view<char_type>(format_str);
-  if constexpr (str[POS] == '{') {
-    if constexpr (POS + 1 == str.size())
-      FMT_THROW(format_error("unmatched '{' in format string"));
-    if constexpr (str[POS + 1] == '{') {
-      return parse_tail<Args, POS + 2, ID>(make_text(str, POS, 1), format_str);
-    } else if constexpr (str[POS + 1] == '}' || str[POS + 1] == ':') {
-      static_assert(ID != manual_indexing_id,
-                    "cannot switch from manual to automatic argument indexing");
-      constexpr auto next_id =
-          ID != manual_indexing_id ? ID + 1 : manual_indexing_id;
-      return parse_replacement_field_then_tail<get_type<ID, Args>, Args,
-                                               POS + 1, ID, next_id>(
-          format_str);
-    } else {
-      constexpr auto arg_id_result =
-          parse_arg_id<ID>(str.data() + POS + 1, str.data() + str.size());
-      constexpr auto arg_id_end_pos = arg_id_result.arg_id_end - str.data();
-      constexpr char_type c =
-          arg_id_end_pos != str.size() ? str[arg_id_end_pos] : char_type();
-      static_assert(c == '}' || c == ':', "missing '}' in format string");
-      if constexpr (arg_id_result.arg_id.kind == arg_id_kind::index) {
-        static_assert(
-            ID == manual_indexing_id || ID == 0,
-            "cannot switch from automatic to manual argument indexing");
-        constexpr auto arg_index = arg_id_result.arg_id.val.index;
-        return parse_replacement_field_then_tail<get_type<arg_index, Args>,
-                                                 Args, arg_id_end_pos,
-                                                 arg_index, manual_indexing_id>(
-            format_str);
-      } else if constexpr (arg_id_result.arg_id.kind == arg_id_kind::name) {
-        constexpr auto arg_index =
-            get_arg_index_by_name(arg_id_result.arg_id.val.name, Args{});
-        if constexpr (arg_index != invalid_arg_index) {
-          constexpr auto next_id =
-              ID != manual_indexing_id ? ID + 1 : manual_indexing_id;
-          return parse_replacement_field_then_tail<
-              decltype(get_type<arg_index, Args>::value), Args, arg_id_end_pos,
-              arg_index, next_id>(format_str);
-        } else {
-          if constexpr (c == '}') {
-            return parse_tail<Args, arg_id_end_pos + 1, ID>(
-                runtime_named_field<char_type>{arg_id_result.arg_id.val.name},
-                format_str);
-          } else if constexpr (c == ':') {
-            return unknown_format();  // no type info for specs parsing
-          }
-        }
-      }
-    }
-  } else if constexpr (str[POS] == '}') {
-    if constexpr (POS + 1 == str.size())
-      FMT_THROW(format_error("unmatched '}' in format string"));
-    return parse_tail<Args, POS + 2, ID>(make_text(str, POS, 1), format_str);
-  } else {
-    constexpr auto end = parse_text(str, POS + 1);
-    if constexpr (end - POS > 1) {
-      return parse_tail<Args, end, ID>(make_text(str, POS, end - POS),
-                                       format_str);
-    } else {
-      return parse_tail<Args, end, ID>(code_unit<char_type>{str[POS]},
-                                       format_str);
-    }
-  }
-}
-
-template <typename... Args, typename S,
-          FMT_ENABLE_IF(detail::is_compiled_string<S>::value)>
-constexpr auto compile(S format_str) {
-  constexpr auto str = basic_string_view<typename S::char_type>(format_str);
-  if constexpr (str.size() == 0) {
-    return detail::make_text(str, 0, 0);
-  } else {
-    constexpr auto result =
-        detail::compile_format_string<detail::type_list<Args...>, 0, 0>(
-            format_str);
-    return result;
-  }
-}
-#endif  // defined(__cpp_if_constexpr) && defined(__cpp_return_type_deduction)
-}  // namespace detail
-
-FMT_MODULE_EXPORT_BEGIN
-
-#if defined(__cpp_if_constexpr) && defined(__cpp_return_type_deduction)
-
-template <typename CompiledFormat, typename... Args,
-          typename Char = typename CompiledFormat::char_type,
-          FMT_ENABLE_IF(detail::is_compiled_format<CompiledFormat>::value)>
-FMT_INLINE std::basic_string<Char> format(const CompiledFormat& cf,
-                                          const Args&... args) {
-  auto s = std::basic_string<Char>();
-  cf.format(std::back_inserter(s), args...);
-  return s;
-}
-
-template <typename OutputIt, typename CompiledFormat, typename... Args,
-          FMT_ENABLE_IF(detail::is_compiled_format<CompiledFormat>::value)>
-constexpr FMT_INLINE OutputIt format_to(OutputIt out, const CompiledFormat& cf,
-                                        const Args&... args) {
-  return cf.format(out, args...);
-}
-
-template <typename S, typename... Args,
-          FMT_ENABLE_IF(detail::is_compiled_string<S>::value)>
-FMT_INLINE std::basic_string<typename S::char_type> format(const S&,
-                                                           Args&&... args) {
-  if constexpr (std::is_same<typename S::char_type, char>::value) {
-    constexpr auto str = basic_string_view<typename S::char_type>(S());
-    if constexpr (str.size() == 2 && str[0] == '{' && str[1] == '}') {
-      const auto& first = detail::first(args...);
-      if constexpr (detail::is_named_arg<
-                        remove_cvref_t<decltype(first)>>::value) {
-        return fmt::to_string(first.value);
-      } else {
-        return fmt::to_string(first);
-      }
-    }
-  }
-  constexpr auto compiled = detail::compile<Args...>(S());
-  if constexpr (std::is_same<remove_cvref_t<decltype(compiled)>,
-                             detail::unknown_format>()) {
-    return format(static_cast<basic_string_view<typename S::char_type>>(S()),
-                  std::forward<Args>(args)...);
-  } else {
-    return format(compiled, std::forward<Args>(args)...);
-  }
-}
-
-template <typename OutputIt, typename S, typename... Args,
-          FMT_ENABLE_IF(detail::is_compiled_string<S>::value)>
-FMT_CONSTEXPR OutputIt format_to(OutputIt out, const S&, Args&&... args) {
-  constexpr auto compiled = detail::compile<Args...>(S());
-  if constexpr (std::is_same<remove_cvref_t<decltype(compiled)>,
-                             detail::unknown_format>()) {
-    return format_to(out,
-                     static_cast<basic_string_view<typename S::char_type>>(S()),
-                     std::forward<Args>(args)...);
-  } else {
-    return format_to(out, compiled, std::forward<Args>(args)...);
-  }
-}
-#endif
-
-template <typename OutputIt, typename S, typename... Args,
-          FMT_ENABLE_IF(detail::is_compiled_string<S>::value)>
-format_to_n_result<OutputIt> format_to_n(OutputIt out, size_t n,
-                                         const S& format_str, Args&&... args) {
-  auto it = format_to(detail::truncating_iterator<OutputIt>(out, n), format_str,
-                      std::forward<Args>(args)...);
-  return {it.base(), it.count()};
-}
-
-template <typename S, typename... Args,
-          FMT_ENABLE_IF(detail::is_compiled_string<S>::value)>
-size_t formatted_size(const S& format_str, const Args&... args) {
-  return format_to(detail::counting_iterator(), format_str, args...).count();
-}
-
-template <typename S, typename... Args,
-          FMT_ENABLE_IF(detail::is_compiled_string<S>::value)>
-void print(std::FILE* f, const S& format_str, const Args&... args) {
-  memory_buffer buffer;
-  format_to(std::back_inserter(buffer), format_str, args...);
-  detail::print(f, {buffer.data(), buffer.size()});
-}
-
-template <typename S, typename... Args,
-          FMT_ENABLE_IF(detail::is_compiled_string<S>::value)>
-void print(const S& format_str, const Args&... args) {
-  print(stdout, format_str, args...);
-}
-
-#if FMT_USE_NONTYPE_TEMPLATE_PARAMETERS
-inline namespace literals {
-template <detail_exported::fixed_string Str>
-constexpr detail::udl_compiled_string<
-    remove_cvref_t<decltype(Str.data[0])>,
-    sizeof(Str.data) / sizeof(decltype(Str.data[0])), Str>
-operator""_cf() {
-  return {};
-}
-}  // namespace literals
-#endif
-
-FMT_MODULE_EXPORT_END
-FMT_END_NAMESPACE
-
-#endif  // FMT_COMPILE_H_
diff --git a/contrib/libs/fmt/include/fmt/ostream.h b/contrib/libs/fmt/include/fmt/ostream.h
deleted file mode 100644
index 3d716ece84..0000000000
--- a/contrib/libs/fmt/include/fmt/ostream.h
+++ /dev/null
@@ -1,135 +0,0 @@
-// Formatting library for C++ - std::ostream support
-//
-// Copyright (c) 2012 - present, Victor Zverovich
-// All rights reserved.
-//
-// For the license information refer to format.h.
-
-#ifndef FMT_OSTREAM_H_
-#define FMT_OSTREAM_H_
-
-#include <ostream>
-
-#include "format.h"
-
-FMT_BEGIN_NAMESPACE
-
-template <typename OutputIt, typename Char> class basic_printf_context;
-
-namespace detail {
-
-// Checks if T has a user-defined operator<<.
-template <typename T, typename Char, typename Enable = void>
-class is_streamable {
- private:
-  template <typename U>
-  static auto test(int)
-      -> bool_constant<sizeof(std::declval<std::basic_ostream<Char>&>()
-                              << std::declval<U>()) != 0>;
-
-  template <typename> static auto test(...) -> std::false_type;
-
-  using result = decltype(test<T>(0));
-
- public:
-  is_streamable() = default;
-
-  static const bool value = result::value;
-};
-
-// Formatting of built-in types and arrays is intentionally disabled because
-// it's handled by standard (non-ostream) formatters.
-template <typename T, typename Char>
-struct is_streamable<
-    T, Char,
-    enable_if_t<
-        std::is_arithmetic<T>::value || std::is_array<T>::value ||
-        std::is_pointer<T>::value || std::is_same<T, char8_type>::value ||
-        std::is_same<T, std::basic_string<Char>>::value ||
-        std::is_same<T, std_string_view<Char>>::value ||
-        (std::is_convertible<T, int>::value && !std::is_enum<T>::value)>>
-    : std::false_type {};
-
-// Write the content of buf to os.
-// It is a separate function rather than a part of vprint to simplify testing.
-template <typename Char>
-void write_buffer(std::basic_ostream<Char>& os, buffer<Char>& buf) {
-  const Char* buf_data = buf.data();
-  using unsigned_streamsize = std::make_unsigned<std::streamsize>::type;
-  unsigned_streamsize size = buf.size();
-  unsigned_streamsize max_size = to_unsigned(max_value<std::streamsize>());
-  do {
-    unsigned_streamsize n = size <= max_size ? size : max_size;
-    os.write(buf_data, static_cast<std::streamsize>(n));
-    buf_data += n;
-    size -= n;
-  } while (size != 0);
-}
-
-template <typename Char, typename T>
-void format_value(buffer<Char>& buf, const T& value,
-                  locale_ref loc = locale_ref()) {
-  auto&& format_buf = formatbuf<std::basic_streambuf<Char>>(buf);
-  auto&& output = std::basic_ostream<Char>(&format_buf);
-#if !defined(FMT_STATIC_THOUSANDS_SEPARATOR)
-  if (loc) output.imbue(loc.get<std::locale>());
-#endif
-  output << value;
-  output.exceptions(std::ios_base::failbit | std::ios_base::badbit);
-  buf.try_resize(buf.size());
-}
-
-// Formats an object of type T that has an overloaded ostream operator<<.
-template <typename T, typename Char>
-struct fallback_formatter<T, Char, enable_if_t<is_streamable<T, Char>::value>>
-    : private formatter<basic_string_view<Char>, Char> {
-  using formatter<basic_string_view<Char>, Char>::parse;
-
-  template <typename OutputIt>
-  auto format(const T& value, basic_format_context<OutputIt, Char>& ctx)
-      -> OutputIt {
-    auto buffer = basic_memory_buffer<Char>();
-    format_value(buffer, value, ctx.locale());
-    return formatter<basic_string_view<Char>, Char>::format(
-        {buffer.data(), buffer.size()}, ctx);
-  }
-
-  // DEPRECATED!
-  template <typename OutputIt>
-  auto format(const T& value, basic_printf_context<OutputIt, Char>& ctx)
-      -> OutputIt {
-    auto buffer = basic_memory_buffer<Char>();
-    format_value(buffer, value, ctx.locale());
-    return std::copy(buffer.begin(), buffer.end(), ctx.out());
-  }
-};
-}  // namespace detail
-
-FMT_MODULE_EXPORT
-template <typename Char>
-void vprint(std::basic_ostream<Char>& os, basic_string_view<Char> format_str,
-            basic_format_args<buffer_context<type_identity_t<Char>>> args) {
-  auto buffer = basic_memory_buffer<Char>();
-  detail::vformat_to(buffer, format_str, args);
-  detail::write_buffer(os, buffer);
-}
-
-/**
-  \rst
-  Prints formatted data to the stream *os*.
-
-  **Example**::
-
-    fmt::print(cerr, "Don't {}!", "panic");
-  \endrst
- */
-FMT_MODULE_EXPORT
-template <typename S, typename... Args,
-          typename Char = enable_if_t<detail::is_string<S>::value, char_t<S>>>
-void print(std::basic_ostream<Char>& os, const S& format_str, Args&&... args) {
-  vprint(os, to_string_view(format_str),
-         fmt::make_args_checked<Args...>(format_str, args...));
-}
-FMT_END_NAMESPACE
-
-#endif  // FMT_OSTREAM_H_
diff --git a/contrib/libs/fmt/include/fmt/printf.h b/contrib/libs/fmt/include/fmt/printf.h
deleted file mode 100644
index 19d550f6cf..0000000000
--- a/contrib/libs/fmt/include/fmt/printf.h
+++ /dev/null
@@ -1,657 +0,0 @@
-// Formatting library for C++ - legacy printf implementation
-//
-// Copyright (c) 2012 - 2016, Victor Zverovich
-// All rights reserved.
-//
-// For the license information refer to format.h.
-
-#ifndef FMT_PRINTF_H_
-#define FMT_PRINTF_H_
-
-#include <algorithm>  // std::max
-#include <limits>     // std::numeric_limits
-#include <ostream>
-
-#include "format.h"
-
-FMT_BEGIN_NAMESPACE
-FMT_MODULE_EXPORT_BEGIN
-
-template <typename T> struct printf_formatter { printf_formatter() = delete; };
-
-template <typename Char>
-class basic_printf_parse_context : public basic_format_parse_context<Char> {
-  using basic_format_parse_context<Char>::basic_format_parse_context;
-};
-
-template <typename OutputIt, typename Char> class basic_printf_context {
- private:
-  OutputIt out_;
-  basic_format_args<basic_printf_context> args_;
-
- public:
-  using char_type = Char;
-  using format_arg = basic_format_arg<basic_printf_context>;
-  using parse_context_type = basic_printf_parse_context<Char>;
-  template <typename T> using formatter_type = printf_formatter<T>;
-
-  /**
-    \rst
-    Constructs a ``printf_context`` object. References to the arguments are
-    stored in the context object so make sure they have appropriate lifetimes.
-    \endrst
-   */
-  basic_printf_context(OutputIt out,
-                       basic_format_args<basic_printf_context> args)
-      : out_(out), args_(args) {}
-
-  OutputIt out() { return out_; }
-  void advance_to(OutputIt it) { out_ = it; }
-
-  detail::locale_ref locale() { return {}; }
-
-  format_arg arg(int id) const { return args_.get(id); }
-
-  FMT_CONSTEXPR void on_error(const char* message) {
-    detail::error_handler().on_error(message);
-  }
-};
-
-FMT_BEGIN_DETAIL_NAMESPACE
-
-// Checks if a value fits in int - used to avoid warnings about comparing
-// signed and unsigned integers.
-template <bool IsSigned> struct int_checker {
-  template <typename T> static bool fits_in_int(T value) {
-    unsigned max = max_value<int>();
-    return value <= max;
-  }
-  static bool fits_in_int(bool) { return true; }
-};
-
-template <> struct int_checker<true> {
-  template <typename T> static bool fits_in_int(T value) {
-    return value >= (std::numeric_limits<int>::min)() &&
-           value <= max_value<int>();
-  }
-  static bool fits_in_int(int) { return true; }
-};
-
-class printf_precision_handler {
- public:
-  template <typename T, FMT_ENABLE_IF(std::is_integral<T>::value)>
-  int operator()(T value) {
-    if (!int_checker<std::numeric_limits<T>::is_signed>::fits_in_int(value))
-      FMT_THROW(format_error("number is too big"));
-    return (std::max)(static_cast<int>(value), 0);
-  }
-
-  template <typename T, FMT_ENABLE_IF(!std::is_integral<T>::value)>
-  int operator()(T) {
-    FMT_THROW(format_error("precision is not integer"));
-    return 0;
-  }
-};
-
-// An argument visitor that returns true iff arg is a zero integer.
-class is_zero_int {
- public:
-  template <typename T, FMT_ENABLE_IF(std::is_integral<T>::value)>
-  bool operator()(T value) {
-    return value == 0;
-  }
-
-  template <typename T, FMT_ENABLE_IF(!std::is_integral<T>::value)>
-  bool operator()(T) {
-    return false;
-  }
-};
-
-template <typename T> struct make_unsigned_or_bool : std::make_unsigned<T> {};
-
-template <> struct make_unsigned_or_bool<bool> { using type = bool; };
-
-template <typename T, typename Context> class arg_converter {
- private:
-  using char_type = typename Context::char_type;
-
-  basic_format_arg<Context>& arg_;
-  char_type type_;
-
- public:
-  arg_converter(basic_format_arg<Context>& arg, char_type type)
-      : arg_(arg), type_(type) {}
-
-  void operator()(bool value) {
-    if (type_ != 's') operator()<bool>(value);
-  }
-
-  template <typename U, FMT_ENABLE_IF(std::is_integral<U>::value)>
-  void operator()(U value) {
-    bool is_signed = type_ == 'd' || type_ == 'i';
-    using target_type = conditional_t<std::is_same<T, void>::value, U, T>;
-    if (const_check(sizeof(target_type) <= sizeof(int))) {
-      // Extra casts are used to silence warnings.
-      if (is_signed) {
-        arg_ = detail::make_arg<Context>(
-            static_cast<int>(static_cast<target_type>(value)));
-      } else {
-        using unsigned_type = typename make_unsigned_or_bool<target_type>::type;
-        arg_ = detail::make_arg<Context>(
-            static_cast<unsigned>(static_cast<unsigned_type>(value)));
-      }
-    } else {
-      if (is_signed) {
-        // glibc's printf doesn't sign extend arguments of smaller types:
-        //   std::printf("%lld", -42);  // prints "4294967254"
-        // but we don't have to do the same because it's a UB.
-        arg_ = detail::make_arg<Context>(static_cast<long long>(value));
-      } else {
-        arg_ = detail::make_arg<Context>(
-            static_cast<typename make_unsigned_or_bool<U>::type>(value));
-      }
-    }
-  }
-
-  template <typename U, FMT_ENABLE_IF(!std::is_integral<U>::value)>
-  void operator()(U) {}  // No conversion needed for non-integral types.
-};
-
-// Converts an integer argument to T for printf, if T is an integral type.
-// If T is void, the argument is converted to corresponding signed or unsigned
-// type depending on the type specifier: 'd' and 'i' - signed, other -
-// unsigned).
-template <typename T, typename Context, typename Char>
-void convert_arg(basic_format_arg<Context>& arg, Char type) {
-  visit_format_arg(arg_converter<T, Context>(arg, type), arg);
-}
-
-// Converts an integer argument to char for printf.
-template <typename Context> class char_converter {
- private:
-  basic_format_arg<Context>& arg_;
-
- public:
-  explicit char_converter(basic_format_arg<Context>& arg) : arg_(arg) {}
-
-  template <typename T, FMT_ENABLE_IF(std::is_integral<T>::value)>
-  void operator()(T value) {
-    arg_ = detail::make_arg<Context>(
-        static_cast<typename Context::char_type>(value));
-  }
-
-  template <typename T, FMT_ENABLE_IF(!std::is_integral<T>::value)>
-  void operator()(T) {}  // No conversion needed for non-integral types.
-};
-
-// An argument visitor that return a pointer to a C string if argument is a
-// string or null otherwise.
-template <typename Char> struct get_cstring {
-  template <typename T> const Char* operator()(T) { return nullptr; }
-  const Char* operator()(const Char* s) { return s; }
-};
-
-// Checks if an argument is a valid printf width specifier and sets
-// left alignment if it is negative.
-template <typename Char> class printf_width_handler {
- private:
-  using format_specs = basic_format_specs<Char>;
-
-  format_specs& specs_;
-
- public:
-  explicit printf_width_handler(format_specs& specs) : specs_(specs) {}
-
-  template <typename T, FMT_ENABLE_IF(std::is_integral<T>::value)>
-  unsigned operator()(T value) {
-    auto width = static_cast<uint32_or_64_or_128_t<T>>(value);
-    if (detail::is_negative(value)) {
-      specs_.align = align::left;
-      width = 0 - width;
-    }
-    unsigned int_max = max_value<int>();
-    if (width > int_max) FMT_THROW(format_error("number is too big"));
-    return static_cast<unsigned>(width);
-  }
-
-  template <typename T, FMT_ENABLE_IF(!std::is_integral<T>::value)>
-  unsigned operator()(T) {
-    FMT_THROW(format_error("width is not integer"));
-    return 0;
-  }
-};
-
-// The ``printf`` argument formatter.
-template <typename OutputIt, typename Char>
-class printf_arg_formatter : public arg_formatter<Char> {
- private:
-  using base = arg_formatter<Char>;
-  using context_type = basic_printf_context<OutputIt, Char>;
-  using format_specs = basic_format_specs<Char>;
-
-  context_type& context_;
-
-  OutputIt write_null_pointer(bool is_string = false) {
-    auto s = this->specs;
-    s.type = presentation_type::none;
-    return write_bytes(this->out, is_string ? "(null)" : "(nil)", s);
-  }
-
- public:
-  printf_arg_formatter(OutputIt iter, format_specs& s, context_type& ctx)
-      : base{iter, s, locale_ref()}, context_(ctx) {}
-
-  OutputIt operator()(monostate value) { return base::operator()(value); }
-
-  template <typename T, FMT_ENABLE_IF(detail::is_integral<T>::value)>
-  OutputIt operator()(T value) {
-    // MSVC2013 fails to compile separate overloads for bool and Char so use
-    // std::is_same instead.
-    if (std::is_same<T, Char>::value) {
-      format_specs fmt_specs = this->specs;
-      if (fmt_specs.type != presentation_type::none &&
-          fmt_specs.type != presentation_type::chr) {
-        return (*this)(static_cast<int>(value));
-      }
-      fmt_specs.sign = sign::none;
-      fmt_specs.alt = false;
-      fmt_specs.fill[0] = ' ';  // Ignore '0' flag for char types.
-      // align::numeric needs to be overwritten here since the '0' flag is
-      // ignored for non-numeric types
-      if (fmt_specs.align == align::none || fmt_specs.align == align::numeric)
-        fmt_specs.align = align::right;
-      return write<Char>(this->out, static_cast<Char>(value), fmt_specs);
-    }
-    return base::operator()(value);
-  }
-
-  template <typename T, FMT_ENABLE_IF(std::is_floating_point<T>::value)>
-  OutputIt operator()(T value) {
-    return base::operator()(value);
-  }
-
-  /** Formats a null-terminated C string. */
-  OutputIt operator()(const char* value) {
-    if (value) return base::operator()(value);
-    return write_null_pointer(this->specs.type != presentation_type::pointer);
-  }
-
-  /** Formats a null-terminated wide C string. */
-  OutputIt operator()(const wchar_t* value) {
-    if (value) return base::operator()(value);
-    return write_null_pointer(this->specs.type != presentation_type::pointer);
-  }
-
-  OutputIt operator()(basic_string_view<Char> value) {
-    return base::operator()(value);
-  }
-
-  /** Formats a pointer. */
-  OutputIt operator()(const void* value) {
-    return value ? base::operator()(value) : write_null_pointer();
-  }
-
-  /** Formats an argument of a custom (user-defined) type. */
-  OutputIt operator()(typename basic_format_arg<context_type>::handle handle) {
-    auto parse_ctx =
-        basic_printf_parse_context<Char>(basic_string_view<Char>());
-    handle.format(parse_ctx, context_);
-    return this->out;
-  }
-};
-
-template <typename Char>
-void parse_flags(basic_format_specs<Char>& specs, const Char*& it,
-                 const Char* end) {
-  for (; it != end; ++it) {
-    switch (*it) {
-    case '-':
-      specs.align = align::left;
-      break;
-    case '+':
-      specs.sign = sign::plus;
-      break;
-    case '0':
-      specs.fill[0] = '0';
-      break;
-    case ' ':
-      if (specs.sign != sign::plus) {
-        specs.sign = sign::space;
-      }
-      break;
-    case '#':
-      specs.alt = true;
-      break;
-    default:
-      return;
-    }
-  }
-}
-
-template <typename Char, typename GetArg>
-int parse_header(const Char*& it, const Char* end,
-                 basic_format_specs<Char>& specs, GetArg get_arg) {
-  int arg_index = -1;
-  Char c = *it;
-  if (c >= '0' && c <= '9') {
-    // Parse an argument index (if followed by '$') or a width possibly
-    // preceded with '0' flag(s).
-    int value = parse_nonnegative_int(it, end, -1);
-    if (it != end && *it == '$') {  // value is an argument index
-      ++it;
-      arg_index = value != -1 ? value : max_value<int>();
-    } else {
-      if (c == '0') specs.fill[0] = '0';
-      if (value != 0) {
-        // Nonzero value means that we parsed width and don't need to
-        // parse it or flags again, so return now.
-        if (value == -1) FMT_THROW(format_error("number is too big"));
-        specs.width = value;
-        return arg_index;
-      }
-    }
-  }
-  parse_flags(specs, it, end);
-  // Parse width.
-  if (it != end) {
-    if (*it >= '0' && *it <= '9') {
-      specs.width = parse_nonnegative_int(it, end, -1);
-      if (specs.width == -1) FMT_THROW(format_error("number is too big"));
-    } else if (*it == '*') {
-      ++it;
-      specs.width = static_cast<int>(visit_format_arg(
-          detail::printf_width_handler<Char>(specs), get_arg(-1)));
-    }
-  }
-  return arg_index;
-}
-
-template <typename Char, typename Context>
-void vprintf(buffer<Char>& buf, basic_string_view<Char> format,
-             basic_format_args<Context> args) {
-  using OutputIt = buffer_appender<Char>;
-  auto out = OutputIt(buf);
-  auto context = basic_printf_context<OutputIt, Char>(out, args);
-  auto parse_ctx = basic_printf_parse_context<Char>(format);
-
-  // Returns the argument with specified index or, if arg_index is -1, the next
-  // argument.
-  auto get_arg = [&](int arg_index) {
-    if (arg_index < 0)
-      arg_index = parse_ctx.next_arg_id();
-    else
-      parse_ctx.check_arg_id(--arg_index);
-    return detail::get_arg(context, arg_index);
-  };
-
-  const Char* start = parse_ctx.begin();
-  const Char* end = parse_ctx.end();
-  auto it = start;
-  while (it != end) {
-    if (!detail::find<false, Char>(it, end, '%', it)) {
-      it = end;  // detail::find leaves it == nullptr if it doesn't find '%'
-      break;
-    }
-    Char c = *it++;
-    if (it != end && *it == c) {
-      out = detail::write(
-          out, basic_string_view<Char>(start, detail::to_unsigned(it - start)));
-      start = ++it;
-      continue;
-    }
-    out = detail::write(out, basic_string_view<Char>(
-                                 start, detail::to_unsigned(it - 1 - start)));
-
-    basic_format_specs<Char> specs;
-    specs.align = align::right;
-
-    // Parse argument index, flags and width.
-    int arg_index = parse_header(it, end, specs, get_arg);
-    if (arg_index == 0) parse_ctx.on_error("argument not found");
-
-    // Parse precision.
-    if (it != end && *it == '.') {
-      ++it;
-      c = it != end ? *it : 0;
-      if ('0' <= c && c <= '9') {
-        specs.precision = parse_nonnegative_int(it, end, 0);
-      } else if (c == '*') {
-        ++it;
-        specs.precision = static_cast<int>(
-            visit_format_arg(detail::printf_precision_handler(), get_arg(-1)));
-      } else {
-        specs.precision = 0;
-      }
-    }
-
-    auto arg = get_arg(arg_index);
-    // For d, i, o, u, x, and X conversion specifiers, if a precision is
-    // specified, the '0' flag is ignored
-    if (specs.precision >= 0 && arg.is_integral())
-      specs.fill[0] =
-          ' ';  // Ignore '0' flag for non-numeric types or if '-' present.
-    if (specs.precision >= 0 && arg.type() == detail::type::cstring_type) {
-      auto str = visit_format_arg(detail::get_cstring<Char>(), arg);
-      auto str_end = str + specs.precision;
-      auto nul = std::find(str, str_end, Char());
-      arg = detail::make_arg<basic_printf_context<OutputIt, Char>>(
-          basic_string_view<Char>(
-              str, detail::to_unsigned(nul != str_end ? nul - str
-                                                      : specs.precision)));
-    }
-    if (specs.alt && visit_format_arg(detail::is_zero_int(), arg))
-      specs.alt = false;
-    if (specs.fill[0] == '0') {
-      if (arg.is_arithmetic() && specs.align != align::left)
-        specs.align = align::numeric;
-      else
-        specs.fill[0] = ' ';  // Ignore '0' flag for non-numeric types or if '-'
-                              // flag is also present.
-    }
-
-    // Parse length and convert the argument to the required type.
-    c = it != end ? *it++ : 0;
-    Char t = it != end ? *it : 0;
-    using detail::convert_arg;
-    switch (c) {
-    case 'h':
-      if (t == 'h') {
-        ++it;
-        t = it != end ? *it : 0;
-        convert_arg<signed char>(arg, t);
-      } else {
-        convert_arg<short>(arg, t);
-      }
-      break;
-    case 'l':
-      if (t == 'l') {
-        ++it;
-        t = it != end ? *it : 0;
-        convert_arg<long long>(arg, t);
-      } else {
-        convert_arg<long>(arg, t);
-      }
-      break;
-    case 'j':
-      convert_arg<intmax_t>(arg, t);
-      break;
-    case 'z':
-      convert_arg<size_t>(arg, t);
-      break;
-    case 't':
-      convert_arg<std::ptrdiff_t>(arg, t);
-      break;
-    case 'L':
-      // printf produces garbage when 'L' is omitted for long double, no
-      // need to do the same.
-      break;
-    default:
-      --it;
-      convert_arg<void>(arg, c);
-    }
-
-    // Parse type.
-    if (it == end) FMT_THROW(format_error("invalid format string"));
-    char type = static_cast<char>(*it++);
-    if (arg.is_integral()) {
-      // Normalize type.
-      switch (type) {
-      case 'i':
-      case 'u':
-        type = 'd';
-        break;
-      case 'c':
-        visit_format_arg(
-            detail::char_converter<basic_printf_context<OutputIt, Char>>(arg),
-            arg);
-        break;
-      }
-    }
-    specs.type = parse_presentation_type(type);
-    if (specs.type == presentation_type::none)
-      parse_ctx.on_error("invalid type specifier");
-
-    start = it;
-
-    // Format argument.
-    out = visit_format_arg(
-        detail::printf_arg_formatter<OutputIt, Char>(out, specs, context), arg);
-  }
-  detail::write(out, basic_string_view<Char>(start, to_unsigned(it - start)));
-}
-FMT_END_DETAIL_NAMESPACE
-
-template <typename Char>
-using basic_printf_context_t =
-    basic_printf_context<detail::buffer_appender<Char>, Char>;
-
-using printf_context = basic_printf_context_t<char>;
-using wprintf_context = basic_printf_context_t<wchar_t>;
-
-using printf_args = basic_format_args<printf_context>;
-using wprintf_args = basic_format_args<wprintf_context>;
-
-/**
-  \rst
-  Constructs an `~fmt::format_arg_store` object that contains references to
-  arguments and can be implicitly converted to `~fmt::printf_args`.
-  \endrst
- */
-template <typename... T>
-inline auto make_printf_args(const T&... args)
-    -> format_arg_store<printf_context, T...> {
-  return {args...};
-}
-
-/**
-  \rst
-  Constructs an `~fmt::format_arg_store` object that contains references to
-  arguments and can be implicitly converted to `~fmt::wprintf_args`.
-  \endrst
- */
-template <typename... T>
-inline auto make_wprintf_args(const T&... args)
-    -> format_arg_store<wprintf_context, T...> {
-  return {args...};
-}
-
-template <typename S, typename Char = char_t<S>>
-inline auto vsprintf(
-    const S& fmt,
-    basic_format_args<basic_printf_context_t<type_identity_t<Char>>> args)
-    -> std::basic_string<Char> {
-  basic_memory_buffer<Char> buffer;
-  vprintf(buffer, to_string_view(fmt), args);
-  return to_string(buffer);
-}
-
-/**
-  \rst
-  Formats arguments and returns the result as a string.
-
-  **Example**::
-
-    std::string message = fmt::sprintf("The answer is %d", 42);
-  \endrst
-*/
-template <typename S, typename... T,
-          typename Char = enable_if_t<detail::is_string<S>::value, char_t<S>>>
-inline auto sprintf(const S& fmt, const T&... args) -> std::basic_string<Char> {
-  using context = basic_printf_context_t<Char>;
-  return vsprintf(to_string_view(fmt), fmt::make_format_args<context>(args...));
-}
-
-template <typename S, typename Char = char_t<S>>
-inline auto vfprintf(
-    std::FILE* f, const S& fmt,
-    basic_format_args<basic_printf_context_t<type_identity_t<Char>>> args)
-    -> int {
-  basic_memory_buffer<Char> buffer;
-  vprintf(buffer, to_string_view(fmt), args);
-  size_t size = buffer.size();
-  return std::fwrite(buffer.data(), sizeof(Char), size, f) < size
-             ? -1
-             : static_cast<int>(size);
-}
-
-/**
-  \rst
-  Prints formatted data to the file *f*.
-
-  **Example**::
-
-    fmt::fprintf(stderr, "Don't %s!", "panic");
-  \endrst
- */
-template <typename S, typename... T, typename Char = char_t<S>>
-inline auto fprintf(std::FILE* f, const S& fmt, const T&... args) -> int {
-  using context = basic_printf_context_t<Char>;
-  return vfprintf(f, to_string_view(fmt),
-                  fmt::make_format_args<context>(args...));
-}
-
-template <typename S, typename Char = char_t<S>>
-inline auto vprintf(
-    const S& fmt,
-    basic_format_args<basic_printf_context_t<type_identity_t<Char>>> args)
-    -> int {
-  return vfprintf(stdout, to_string_view(fmt), args);
-}
-
-/**
-  \rst
-  Prints formatted data to ``stdout``.
-
-  **Example**::
-
-    fmt::printf("Elapsed time: %.2f seconds", 1.23);
-  \endrst
- */
-template <typename S, typename... T, FMT_ENABLE_IF(detail::is_string<S>::value)>
-inline auto printf(const S& fmt, const T&... args) -> int {
-  return vprintf(
-      to_string_view(fmt),
-      fmt::make_format_args<basic_printf_context_t<char_t<S>>>(args...));
-}
-
-template <typename S, typename Char = char_t<S>>
-FMT_DEPRECATED auto vfprintf(
-    std::basic_ostream<Char>& os, const S& fmt,
-    basic_format_args<basic_printf_context_t<type_identity_t<Char>>> args)
-    -> int {
-  basic_memory_buffer<Char> buffer;
-  vprintf(buffer, to_string_view(fmt), args);
-  os.write(buffer.data(), static_cast<std::streamsize>(buffer.size()));
-  return static_cast<int>(buffer.size());
-}
-template <typename S, typename... T, typename Char = char_t<S>>
-FMT_DEPRECATED auto fprintf(std::basic_ostream<Char>& os, const S& fmt,
-                            const T&... args) -> int {
-  return vfprintf(os, to_string_view(fmt),
-                  fmt::make_format_args<basic_printf_context_t<Char>>(args...));
-}
-
-FMT_MODULE_EXPORT_END
-FMT_END_NAMESPACE
-
-#endif  // FMT_PRINTF_H_
diff --git a/contrib/libs/fmt/include/fmt/ranges.h b/contrib/libs/fmt/include/fmt/ranges.h
deleted file mode 100644
index fd87b4f4f8..0000000000
--- a/contrib/libs/fmt/include/fmt/ranges.h
+++ /dev/null
@@ -1,793 +0,0 @@
-// Formatting library for C++ - experimental range support
-//
-// Copyright (c) 2012 - present, Victor Zverovich
-// All rights reserved.
-//
-// For the license information refer to format.h.
-//
-// Copyright (c) 2018 - present, Remotion (Igor Schulz)
-// All Rights Reserved
-// {fmt} support for ranges, containers and types tuple interface.
-
-#ifndef FMT_RANGES_H_
-#define FMT_RANGES_H_
-
-#include <initializer_list>
-#include <tuple>
-#include <type_traits>
-
-#include "format.h"
-
-FMT_BEGIN_NAMESPACE
-
-namespace detail {
-
-template <typename RangeT, typename OutputIterator>
-OutputIterator copy(const RangeT& range, OutputIterator out) {
-  for (auto it = range.begin(), end = range.end(); it != end; ++it)
-    *out++ = *it;
-  return out;
-}
-
-template <typename OutputIterator>
-OutputIterator copy(const char* str, OutputIterator out) {
-  while (*str) *out++ = *str++;
-  return out;
-}
-
-template <typename OutputIterator>
-OutputIterator copy(char ch, OutputIterator out) {
-  *out++ = ch;
-  return out;
-}
-
-template <typename OutputIterator>
-OutputIterator copy(wchar_t ch, OutputIterator out) {
-  *out++ = ch;
-  return out;
-}
-
-// Returns true if T has a std::string-like interface, like std::string_view.
-template <typename T> class is_std_string_like {
-  template <typename U>
-  static auto check(U* p)
-      -> decltype((void)p->find('a'), p->length(), (void)p->data(), int());
-  template <typename> static void check(...);
-
- public:
-  static FMT_CONSTEXPR_DECL const bool value =
-      is_string<T>::value ||
-      std::is_convertible<T, std_string_view<char>>::value ||
-      !std::is_void<decltype(check<T>(nullptr))>::value;
-};
-
-template <typename Char>
-struct is_std_string_like<fmt::basic_string_view<Char>> : std::true_type {};
-
-template <typename T> class is_map {
-  template <typename U> static auto check(U*) -> typename U::mapped_type;
-  template <typename> static void check(...);
-
- public:
-#ifdef FMT_FORMAT_MAP_AS_LIST
-  static FMT_CONSTEXPR_DECL const bool value = false;
-#else
-  static FMT_CONSTEXPR_DECL const bool value =
-      !std::is_void<decltype(check<T>(nullptr))>::value;
-#endif
-};
-
-template <typename T> class is_set {
-  template <typename U> static auto check(U*) -> typename U::key_type;
-  template <typename> static void check(...);
-
- public:
-#ifdef FMT_FORMAT_SET_AS_LIST
-  static FMT_CONSTEXPR_DECL const bool value = false;
-#else
-  static FMT_CONSTEXPR_DECL const bool value =
-      !std::is_void<decltype(check<T>(nullptr))>::value && !is_map<T>::value;
-#endif
-};
-
-template <typename... Ts> struct conditional_helper {};
-
-template <typename T, typename _ = void> struct is_range_ : std::false_type {};
-
-#if !FMT_MSC_VER || FMT_MSC_VER > 1800
-
-#  define FMT_DECLTYPE_RETURN(val)  \
-    ->decltype(val) { return val; } \
-    static_assert(                  \
-        true, "")  // This makes it so that a semicolon is required after the
-                   // macro, which helps clang-format handle the formatting.
-
-// C array overload
-template <typename T, std::size_t N>
-auto range_begin(const T (&arr)[N]) -> const T* {
-  return arr;
-}
-template <typename T, std::size_t N>
-auto range_end(const T (&arr)[N]) -> const T* {
-  return arr + N;
-}
-
-template <typename T, typename Enable = void>
-struct has_member_fn_begin_end_t : std::false_type {};
-
-template <typename T>
-struct has_member_fn_begin_end_t<T, void_t<decltype(std::declval<T>().begin()),
-                                           decltype(std::declval<T>().end())>>
-    : std::true_type {};
-
-// Member function overload
-template <typename T>
-auto range_begin(T&& rng) FMT_DECLTYPE_RETURN(static_cast<T&&>(rng).begin());
-template <typename T>
-auto range_end(T&& rng) FMT_DECLTYPE_RETURN(static_cast<T&&>(rng).end());
-
-// ADL overload. Only participates in overload resolution if member functions
-// are not found.
-template <typename T>
-auto range_begin(T&& rng)
-    -> enable_if_t<!has_member_fn_begin_end_t<T&&>::value,
-                   decltype(begin(static_cast<T&&>(rng)))> {
-  return begin(static_cast<T&&>(rng));
-}
-template <typename T>
-auto range_end(T&& rng) -> enable_if_t<!has_member_fn_begin_end_t<T&&>::value,
-                                       decltype(end(static_cast<T&&>(rng)))> {
-  return end(static_cast<T&&>(rng));
-}
-
-template <typename T, typename Enable = void>
-struct has_const_begin_end : std::false_type {};
-template <typename T, typename Enable = void>
-struct has_mutable_begin_end : std::false_type {};
-
-template <typename T>
-struct has_const_begin_end<
-    T,
-    void_t<
-        decltype(detail::range_begin(std::declval<const remove_cvref_t<T>&>())),
-        decltype(detail::range_end(std::declval<const remove_cvref_t<T>&>()))>>
-    : std::true_type {};
-
-template <typename T>
-struct has_mutable_begin_end<
-    T, void_t<decltype(detail::range_begin(std::declval<T>())),
-              decltype(detail::range_end(std::declval<T>())),
-              enable_if_t<std::is_copy_constructible<T>::value>>>
-    : std::true_type {};
-
-template <typename T>
-struct is_range_<T, void>
-    : std::integral_constant<bool, (has_const_begin_end<T>::value ||
-                                    has_mutable_begin_end<T>::value)> {};
-#  undef FMT_DECLTYPE_RETURN
-#endif
-
-// tuple_size and tuple_element check.
-template <typename T> class is_tuple_like_ {
-  template <typename U>
-  static auto check(U* p) -> decltype(std::tuple_size<U>::value, int());
-  template <typename> static void check(...);
-
- public:
-  static FMT_CONSTEXPR_DECL const bool value =
-      !std::is_void<decltype(check<T>(nullptr))>::value;
-};
-
-// Check for integer_sequence
-#if defined(__cpp_lib_integer_sequence) || FMT_MSC_VER >= 1900
-template <typename T, T... N>
-using integer_sequence = std::integer_sequence<T, N...>;
-template <size_t... N> using index_sequence = std::index_sequence<N...>;
-template <size_t N> using make_index_sequence = std::make_index_sequence<N>;
-#else
-template <typename T, T... N> struct integer_sequence {
-  using value_type = T;
-
-  static FMT_CONSTEXPR size_t size() { return sizeof...(N); }
-};
-
-template <size_t... N> using index_sequence = integer_sequence<size_t, N...>;
-
-template <typename T, size_t N, T... Ns>
-struct make_integer_sequence : make_integer_sequence<T, N - 1, N - 1, Ns...> {};
-template <typename T, T... Ns>
-struct make_integer_sequence<T, 0, Ns...> : integer_sequence<T, Ns...> {};
-
-template <size_t N>
-using make_index_sequence = make_integer_sequence<size_t, N>;
-#endif
-
-template <class Tuple, class F, size_t... Is>
-void for_each(index_sequence<Is...>, Tuple&& tup, F&& f) FMT_NOEXCEPT {
-  using std::get;
-  // using free function get<I>(T) now.
-  const int _[] = {0, ((void)f(get<Is>(tup)), 0)...};
-  (void)_;  // blocks warnings
-}
-
-template <class T>
-FMT_CONSTEXPR make_index_sequence<std::tuple_size<T>::value> get_indexes(
-    T const&) {
-  return {};
-}
-
-template <class Tuple, class F> void for_each(Tuple&& tup, F&& f) {
-  const auto indexes = get_indexes(tup);
-  for_each(indexes, std::forward<Tuple>(tup), std::forward<F>(f));
-}
-
-template <typename Range>
-using value_type =
-    remove_cvref_t<decltype(*detail::range_begin(std::declval<Range>()))>;
-
-template <typename OutputIt> OutputIt write_delimiter(OutputIt out) {
-  *out++ = ',';
-  *out++ = ' ';
-  return out;
-}
-
-struct singleton {
-  unsigned char upper;
-  unsigned char lower_count;
-};
-
-inline auto is_printable(uint16_t x, const singleton* singletons,
-                         size_t singletons_size,
-                         const unsigned char* singleton_lowers,
-                         const unsigned char* normal, size_t normal_size)
-    -> bool {
-  auto upper = x >> 8;
-  auto lower_start = 0;
-  for (size_t i = 0; i < singletons_size; ++i) {
-    auto s = singletons[i];
-    auto lower_end = lower_start + s.lower_count;
-    if (upper < s.upper) break;
-    if (upper == s.upper) {
-      for (auto j = lower_start; j < lower_end; ++j) {
-        if (singleton_lowers[j] == (x & 0xff)) return false;
-      }
-    }
-    lower_start = lower_end;
-  }
-
-  auto xsigned = static_cast<int>(x);
-  auto current = true;
-  for (size_t i = 0; i < normal_size; ++i) {
-    auto v = static_cast<int>(normal[i]);
-    auto len = (v & 0x80) != 0 ? (v & 0x7f) << 8 | normal[++i] : v;
-    xsigned -= len;
-    if (xsigned < 0) break;
-    current = !current;
-  }
-  return current;
-}
-
-// Returns true iff the code point cp is printable.
-// This code is generated by support/printable.py.
-inline auto is_printable(uint32_t cp) -> bool {
-  static constexpr singleton singletons0[] = {
-      {0x00, 1},  {0x03, 5},  {0x05, 6},  {0x06, 3},  {0x07, 6},  {0x08, 8},
-      {0x09, 17}, {0x0a, 28}, {0x0b, 25}, {0x0c, 20}, {0x0d, 16}, {0x0e, 13},
-      {0x0f, 4},  {0x10, 3},  {0x12, 18}, {0x13, 9},  {0x16, 1},  {0x17, 5},
-      {0x18, 2},  {0x19, 3},  {0x1a, 7},  {0x1c, 2},  {0x1d, 1},  {0x1f, 22},
-      {0x20, 3},  {0x2b, 3},  {0x2c, 2},  {0x2d, 11}, {0x2e, 1},  {0x30, 3},
-      {0x31, 2},  {0x32, 1},  {0xa7, 2},  {0xa9, 2},  {0xaa, 4},  {0xab, 8},
-      {0xfa, 2},  {0xfb, 5},  {0xfd, 4},  {0xfe, 3},  {0xff, 9},
-  };
-  static constexpr unsigned char singletons0_lower[] = {
-      0xad, 0x78, 0x79, 0x8b, 0x8d, 0xa2, 0x30, 0x57, 0x58, 0x8b, 0x8c, 0x90,
-      0x1c, 0x1d, 0xdd, 0x0e, 0x0f, 0x4b, 0x4c, 0xfb, 0xfc, 0x2e, 0x2f, 0x3f,
-      0x5c, 0x5d, 0x5f, 0xb5, 0xe2, 0x84, 0x8d, 0x8e, 0x91, 0x92, 0xa9, 0xb1,
-      0xba, 0xbb, 0xc5, 0xc6, 0xc9, 0xca, 0xde, 0xe4, 0xe5, 0xff, 0x00, 0x04,
-      0x11, 0x12, 0x29, 0x31, 0x34, 0x37, 0x3a, 0x3b, 0x3d, 0x49, 0x4a, 0x5d,
-      0x84, 0x8e, 0x92, 0xa9, 0xb1, 0xb4, 0xba, 0xbb, 0xc6, 0xca, 0xce, 0xcf,
-      0xe4, 0xe5, 0x00, 0x04, 0x0d, 0x0e, 0x11, 0x12, 0x29, 0x31, 0x34, 0x3a,
-      0x3b, 0x45, 0x46, 0x49, 0x4a, 0x5e, 0x64, 0x65, 0x84, 0x91, 0x9b, 0x9d,
-      0xc9, 0xce, 0xcf, 0x0d, 0x11, 0x29, 0x45, 0x49, 0x57, 0x64, 0x65, 0x8d,
-      0x91, 0xa9, 0xb4, 0xba, 0xbb, 0xc5, 0xc9, 0xdf, 0xe4, 0xe5, 0xf0, 0x0d,
-      0x11, 0x45, 0x49, 0x64, 0x65, 0x80, 0x84, 0xb2, 0xbc, 0xbe, 0xbf, 0xd5,
-      0xd7, 0xf0, 0xf1, 0x83, 0x85, 0x8b, 0xa4, 0xa6, 0xbe, 0xbf, 0xc5, 0xc7,
-      0xce, 0xcf, 0xda, 0xdb, 0x48, 0x98, 0xbd, 0xcd, 0xc6, 0xce, 0xcf, 0x49,
-      0x4e, 0x4f, 0x57, 0x59, 0x5e, 0x5f, 0x89, 0x8e, 0x8f, 0xb1, 0xb6, 0xb7,
-      0xbf, 0xc1, 0xc6, 0xc7, 0xd7, 0x11, 0x16, 0x17, 0x5b, 0x5c, 0xf6, 0xf7,
-      0xfe, 0xff, 0x80, 0x0d, 0x6d, 0x71, 0xde, 0xdf, 0x0e, 0x0f, 0x1f, 0x6e,
-      0x6f, 0x1c, 0x1d, 0x5f, 0x7d, 0x7e, 0xae, 0xaf, 0xbb, 0xbc, 0xfa, 0x16,
-      0x17, 0x1e, 0x1f, 0x46, 0x47, 0x4e, 0x4f, 0x58, 0x5a, 0x5c, 0x5e, 0x7e,
-      0x7f, 0xb5, 0xc5, 0xd4, 0xd5, 0xdc, 0xf0, 0xf1, 0xf5, 0x72, 0x73, 0x8f,
-      0x74, 0x75, 0x96, 0x2f, 0x5f, 0x26, 0x2e, 0x2f, 0xa7, 0xaf, 0xb7, 0xbf,
-      0xc7, 0xcf, 0xd7, 0xdf, 0x9a, 0x40, 0x97, 0x98, 0x30, 0x8f, 0x1f, 0xc0,
-      0xc1, 0xce, 0xff, 0x4e, 0x4f, 0x5a, 0x5b, 0x07, 0x08, 0x0f, 0x10, 0x27,
-      0x2f, 0xee, 0xef, 0x6e, 0x6f, 0x37, 0x3d, 0x3f, 0x42, 0x45, 0x90, 0x91,
-      0xfe, 0xff, 0x53, 0x67, 0x75, 0xc8, 0xc9, 0xd0, 0xd1, 0xd8, 0xd9, 0xe7,
-      0xfe, 0xff,
-  };
-  static constexpr singleton singletons1[] = {
-      {0x00, 6},  {0x01, 1}, {0x03, 1},  {0x04, 2}, {0x08, 8},  {0x09, 2},
-      {0x0a, 5},  {0x0b, 2}, {0x0e, 4},  {0x10, 1}, {0x11, 2},  {0x12, 5},
-      {0x13, 17}, {0x14, 1}, {0x15, 2},  {0x17, 2}, {0x19, 13}, {0x1c, 5},
-      {0x1d, 8},  {0x24, 1}, {0x6a, 3},  {0x6b, 2}, {0xbc, 2},  {0xd1, 2},
-      {0xd4, 12}, {0xd5, 9}, {0xd6, 2},  {0xd7, 2}, {0xda, 1},  {0xe0, 5},
-      {0xe1, 2},  {0xe8, 2}, {0xee, 32}, {0xf0, 4}, {0xf8, 2},  {0xf9, 2},
-      {0xfa, 2},  {0xfb, 1},
-  };
-  static constexpr unsigned char singletons1_lower[] = {
-      0x0c, 0x27, 0x3b, 0x3e, 0x4e, 0x4f, 0x8f, 0x9e, 0x9e, 0x9f, 0x06, 0x07,
-      0x09, 0x36, 0x3d, 0x3e, 0x56, 0xf3, 0xd0, 0xd1, 0x04, 0x14, 0x18, 0x36,
-      0x37, 0x56, 0x57, 0x7f, 0xaa, 0xae, 0xaf, 0xbd, 0x35, 0xe0, 0x12, 0x87,
-      0x89, 0x8e, 0x9e, 0x04, 0x0d, 0x0e, 0x11, 0x12, 0x29, 0x31, 0x34, 0x3a,
-      0x45, 0x46, 0x49, 0x4a, 0x4e, 0x4f, 0x64, 0x65, 0x5c, 0xb6, 0xb7, 0x1b,
-      0x1c, 0x07, 0x08, 0x0a, 0x0b, 0x14, 0x17, 0x36, 0x39, 0x3a, 0xa8, 0xa9,
-      0xd8, 0xd9, 0x09, 0x37, 0x90, 0x91, 0xa8, 0x07, 0x0a, 0x3b, 0x3e, 0x66,
-      0x69, 0x8f, 0x92, 0x6f, 0x5f, 0xee, 0xef, 0x5a, 0x62, 0x9a, 0x9b, 0x27,
-      0x28, 0x55, 0x9d, 0xa0, 0xa1, 0xa3, 0xa4, 0xa7, 0xa8, 0xad, 0xba, 0xbc,
-      0xc4, 0x06, 0x0b, 0x0c, 0x15, 0x1d, 0x3a, 0x3f, 0x45, 0x51, 0xa6, 0xa7,
-      0xcc, 0xcd, 0xa0, 0x07, 0x19, 0x1a, 0x22, 0x25, 0x3e, 0x3f, 0xc5, 0xc6,
-      0x04, 0x20, 0x23, 0x25, 0x26, 0x28, 0x33, 0x38, 0x3a, 0x48, 0x4a, 0x4c,
-      0x50, 0x53, 0x55, 0x56, 0x58, 0x5a, 0x5c, 0x5e, 0x60, 0x63, 0x65, 0x66,
-      0x6b, 0x73, 0x78, 0x7d, 0x7f, 0x8a, 0xa4, 0xaa, 0xaf, 0xb0, 0xc0, 0xd0,
-      0xae, 0xaf, 0x79, 0xcc, 0x6e, 0x6f, 0x93,
-  };
-  static constexpr unsigned char normal0[] = {
-      0x00, 0x20, 0x5f, 0x22, 0x82, 0xdf, 0x04, 0x82, 0x44, 0x08, 0x1b, 0x04,
-      0x06, 0x11, 0x81, 0xac, 0x0e, 0x80, 0xab, 0x35, 0x28, 0x0b, 0x80, 0xe0,
-      0x03, 0x19, 0x08, 0x01, 0x04, 0x2f, 0x04, 0x34, 0x04, 0x07, 0x03, 0x01,
-      0x07, 0x06, 0x07, 0x11, 0x0a, 0x50, 0x0f, 0x12, 0x07, 0x55, 0x07, 0x03,
-      0x04, 0x1c, 0x0a, 0x09, 0x03, 0x08, 0x03, 0x07, 0x03, 0x02, 0x03, 0x03,
-      0x03, 0x0c, 0x04, 0x05, 0x03, 0x0b, 0x06, 0x01, 0x0e, 0x15, 0x05, 0x3a,
-      0x03, 0x11, 0x07, 0x06, 0x05, 0x10, 0x07, 0x57, 0x07, 0x02, 0x07, 0x15,
-      0x0d, 0x50, 0x04, 0x43, 0x03, 0x2d, 0x03, 0x01, 0x04, 0x11, 0x06, 0x0f,
-      0x0c, 0x3a, 0x04, 0x1d, 0x25, 0x5f, 0x20, 0x6d, 0x04, 0x6a, 0x25, 0x80,
-      0xc8, 0x05, 0x82, 0xb0, 0x03, 0x1a, 0x06, 0x82, 0xfd, 0x03, 0x59, 0x07,
-      0x15, 0x0b, 0x17, 0x09, 0x14, 0x0c, 0x14, 0x0c, 0x6a, 0x06, 0x0a, 0x06,
-      0x1a, 0x06, 0x59, 0x07, 0x2b, 0x05, 0x46, 0x0a, 0x2c, 0x04, 0x0c, 0x04,
-      0x01, 0x03, 0x31, 0x0b, 0x2c, 0x04, 0x1a, 0x06, 0x0b, 0x03, 0x80, 0xac,
-      0x06, 0x0a, 0x06, 0x21, 0x3f, 0x4c, 0x04, 0x2d, 0x03, 0x74, 0x08, 0x3c,
-      0x03, 0x0f, 0x03, 0x3c, 0x07, 0x38, 0x08, 0x2b, 0x05, 0x82, 0xff, 0x11,
-      0x18, 0x08, 0x2f, 0x11, 0x2d, 0x03, 0x20, 0x10, 0x21, 0x0f, 0x80, 0x8c,
-      0x04, 0x82, 0x97, 0x19, 0x0b, 0x15, 0x88, 0x94, 0x05, 0x2f, 0x05, 0x3b,
-      0x07, 0x02, 0x0e, 0x18, 0x09, 0x80, 0xb3, 0x2d, 0x74, 0x0c, 0x80, 0xd6,
-      0x1a, 0x0c, 0x05, 0x80, 0xff, 0x05, 0x80, 0xdf, 0x0c, 0xee, 0x0d, 0x03,
-      0x84, 0x8d, 0x03, 0x37, 0x09, 0x81, 0x5c, 0x14, 0x80, 0xb8, 0x08, 0x80,
-      0xcb, 0x2a, 0x38, 0x03, 0x0a, 0x06, 0x38, 0x08, 0x46, 0x08, 0x0c, 0x06,
-      0x74, 0x0b, 0x1e, 0x03, 0x5a, 0x04, 0x59, 0x09, 0x80, 0x83, 0x18, 0x1c,
-      0x0a, 0x16, 0x09, 0x4c, 0x04, 0x80, 0x8a, 0x06, 0xab, 0xa4, 0x0c, 0x17,
-      0x04, 0x31, 0xa1, 0x04, 0x81, 0xda, 0x26, 0x07, 0x0c, 0x05, 0x05, 0x80,
-      0xa5, 0x11, 0x81, 0x6d, 0x10, 0x78, 0x28, 0x2a, 0x06, 0x4c, 0x04, 0x80,
-      0x8d, 0x04, 0x80, 0xbe, 0x03, 0x1b, 0x03, 0x0f, 0x0d,
-  };
-  static constexpr unsigned char normal1[] = {
-      0x5e, 0x22, 0x7b, 0x05, 0x03, 0x04, 0x2d, 0x03, 0x66, 0x03, 0x01, 0x2f,
-      0x2e, 0x80, 0x82, 0x1d, 0x03, 0x31, 0x0f, 0x1c, 0x04, 0x24, 0x09, 0x1e,
-      0x05, 0x2b, 0x05, 0x44, 0x04, 0x0e, 0x2a, 0x80, 0xaa, 0x06, 0x24, 0x04,
-      0x24, 0x04, 0x28, 0x08, 0x34, 0x0b, 0x01, 0x80, 0x90, 0x81, 0x37, 0x09,
-      0x16, 0x0a, 0x08, 0x80, 0x98, 0x39, 0x03, 0x63, 0x08, 0x09, 0x30, 0x16,
-      0x05, 0x21, 0x03, 0x1b, 0x05, 0x01, 0x40, 0x38, 0x04, 0x4b, 0x05, 0x2f,
-      0x04, 0x0a, 0x07, 0x09, 0x07, 0x40, 0x20, 0x27, 0x04, 0x0c, 0x09, 0x36,
-      0x03, 0x3a, 0x05, 0x1a, 0x07, 0x04, 0x0c, 0x07, 0x50, 0x49, 0x37, 0x33,
-      0x0d, 0x33, 0x07, 0x2e, 0x08, 0x0a, 0x81, 0x26, 0x52, 0x4e, 0x28, 0x08,
-      0x2a, 0x56, 0x1c, 0x14, 0x17, 0x09, 0x4e, 0x04, 0x1e, 0x0f, 0x43, 0x0e,
-      0x19, 0x07, 0x0a, 0x06, 0x48, 0x08, 0x27, 0x09, 0x75, 0x0b, 0x3f, 0x41,
-      0x2a, 0x06, 0x3b, 0x05, 0x0a, 0x06, 0x51, 0x06, 0x01, 0x05, 0x10, 0x03,
-      0x05, 0x80, 0x8b, 0x62, 0x1e, 0x48, 0x08, 0x0a, 0x80, 0xa6, 0x5e, 0x22,
-      0x45, 0x0b, 0x0a, 0x06, 0x0d, 0x13, 0x39, 0x07, 0x0a, 0x36, 0x2c, 0x04,
-      0x10, 0x80, 0xc0, 0x3c, 0x64, 0x53, 0x0c, 0x48, 0x09, 0x0a, 0x46, 0x45,
-      0x1b, 0x48, 0x08, 0x53, 0x1d, 0x39, 0x81, 0x07, 0x46, 0x0a, 0x1d, 0x03,
-      0x47, 0x49, 0x37, 0x03, 0x0e, 0x08, 0x0a, 0x06, 0x39, 0x07, 0x0a, 0x81,
-      0x36, 0x19, 0x80, 0xb7, 0x01, 0x0f, 0x32, 0x0d, 0x83, 0x9b, 0x66, 0x75,
-      0x0b, 0x80, 0xc4, 0x8a, 0xbc, 0x84, 0x2f, 0x8f, 0xd1, 0x82, 0x47, 0xa1,
-      0xb9, 0x82, 0x39, 0x07, 0x2a, 0x04, 0x02, 0x60, 0x26, 0x0a, 0x46, 0x0a,
-      0x28, 0x05, 0x13, 0x82, 0xb0, 0x5b, 0x65, 0x4b, 0x04, 0x39, 0x07, 0x11,
-      0x40, 0x05, 0x0b, 0x02, 0x0e, 0x97, 0xf8, 0x08, 0x84, 0xd6, 0x2a, 0x09,
-      0xa2, 0xf7, 0x81, 0x1f, 0x31, 0x03, 0x11, 0x04, 0x08, 0x81, 0x8c, 0x89,
-      0x04, 0x6b, 0x05, 0x0d, 0x03, 0x09, 0x07, 0x10, 0x93, 0x60, 0x80, 0xf6,
-      0x0a, 0x73, 0x08, 0x6e, 0x17, 0x46, 0x80, 0x9a, 0x14, 0x0c, 0x57, 0x09,
-      0x19, 0x80, 0x87, 0x81, 0x47, 0x03, 0x85, 0x42, 0x0f, 0x15, 0x85, 0x50,
-      0x2b, 0x80, 0xd5, 0x2d, 0x03, 0x1a, 0x04, 0x02, 0x81, 0x70, 0x3a, 0x05,
-      0x01, 0x85, 0x00, 0x80, 0xd7, 0x29, 0x4c, 0x04, 0x0a, 0x04, 0x02, 0x83,
-      0x11, 0x44, 0x4c, 0x3d, 0x80, 0xc2, 0x3c, 0x06, 0x01, 0x04, 0x55, 0x05,
-      0x1b, 0x34, 0x02, 0x81, 0x0e, 0x2c, 0x04, 0x64, 0x0c, 0x56, 0x0a, 0x80,
-      0xae, 0x38, 0x1d, 0x0d, 0x2c, 0x04, 0x09, 0x07, 0x02, 0x0e, 0x06, 0x80,
-      0x9a, 0x83, 0xd8, 0x08, 0x0d, 0x03, 0x0d, 0x03, 0x74, 0x0c, 0x59, 0x07,
-      0x0c, 0x14, 0x0c, 0x04, 0x38, 0x08, 0x0a, 0x06, 0x28, 0x08, 0x22, 0x4e,
-      0x81, 0x54, 0x0c, 0x15, 0x03, 0x03, 0x05, 0x07, 0x09, 0x19, 0x07, 0x07,
-      0x09, 0x03, 0x0d, 0x07, 0x29, 0x80, 0xcb, 0x25, 0x0a, 0x84, 0x06,
-  };
-  auto lower = static_cast<uint16_t>(cp);
-  if (cp < 0x10000) {
-    return is_printable(lower, singletons0,
-                        sizeof(singletons0) / sizeof(*singletons0),
-                        singletons0_lower, normal0, sizeof(normal0));
-  }
-  if (cp < 0x20000) {
-    return is_printable(lower, singletons1,
-                        sizeof(singletons1) / sizeof(*singletons1),
-                        singletons1_lower, normal1, sizeof(normal1));
-  }
-  if (0x2a6de <= cp && cp < 0x2a700) return false;
-  if (0x2b735 <= cp && cp < 0x2b740) return false;
-  if (0x2b81e <= cp && cp < 0x2b820) return false;
-  if (0x2cea2 <= cp && cp < 0x2ceb0) return false;
-  if (0x2ebe1 <= cp && cp < 0x2f800) return false;
-  if (0x2fa1e <= cp && cp < 0x30000) return false;
-  if (0x3134b <= cp && cp < 0xe0100) return false;
-  if (0xe01f0 <= cp && cp < 0x110000) return false;
-  return cp < 0x110000;
-}
-
-inline auto needs_escape(uint32_t cp) -> bool {
-  return cp < 0x20 || cp == 0x7f || cp == '"' || cp == '\\' ||
-         !is_printable(cp);
-}
-
-template <typename Char> struct find_escape_result {
-  const Char* begin;
-  const Char* end;
-  uint32_t cp;
-};
-
-template <typename Char>
-auto find_escape(const Char* begin, const Char* end)
-    -> find_escape_result<Char> {
-  for (; begin != end; ++begin) {
-    auto cp = static_cast<typename std::make_unsigned<Char>::type>(*begin);
-    if (sizeof(Char) == 1 && cp >= 0x80) continue;
-    if (needs_escape(cp)) return {begin, begin + 1, cp};
-  }
-  return {begin, nullptr, 0};
-}
-
-inline auto find_escape(const char* begin, const char* end)
-    -> find_escape_result<char> {
-  if (!is_utf8()) return find_escape<char>(begin, end);
-  auto result = find_escape_result<char>{end, nullptr, 0};
-  for_each_codepoint(string_view(begin, to_unsigned(end - begin)),
-                     [&](uint32_t cp, string_view sv) {
-                       if (needs_escape(cp)) {
-                         result = {sv.begin(), sv.end(), cp};
-                         return false;
-                       }
-                       return true;
-                     });
-  return result;
-}
-
-template <typename Char, typename OutputIt>
-auto write_range_entry(OutputIt out, basic_string_view<Char> str) -> OutputIt {
-  *out++ = '"';
-  auto begin = str.begin(), end = str.end();
-  do {
-    auto escape = find_escape(begin, end);
-    out = copy_str<Char>(begin, escape.begin, out);
-    begin = escape.end;
-    if (!begin) break;
-    auto c = static_cast<Char>(escape.cp);
-    switch (escape.cp) {
-    case '\n':
-      *out++ = '\\';
-      c = 'n';
-      break;
-    case '\r':
-      *out++ = '\\';
-      c = 'r';
-      break;
-    case '\t':
-      *out++ = '\\';
-      c = 't';
-      break;
-    case '"':
-      FMT_FALLTHROUGH;
-    case '\\':
-      *out++ = '\\';
-      break;
-    default:
-      if (is_utf8()) {
-        if (escape.cp < 0x100) {
-          out = fmt::format_to(out, "\\x{:02x}", escape.cp);
-          continue;
-        }
-        if (escape.cp < 0x10000) {
-          out = fmt::format_to(out, "\\u{:04x}", escape.cp);
-          continue;
-        }
-        if (escape.cp < 0x110000) {
-          out = fmt::format_to(out, "\\U{:08x}", escape.cp);
-          continue;
-        }
-      }
-      for (Char escape_char : basic_string_view<Char>(
-               escape.begin, to_unsigned(escape.end - escape.begin))) {
-        out = fmt::format_to(
-            out, "\\x{:02x}",
-            static_cast<typename std::make_unsigned<Char>::type>(escape_char));
-      }
-      continue;
-    }
-    *out++ = c;
-  } while (begin != end);
-  *out++ = '"';
-  return out;
-}
-
-template <typename Char, typename OutputIt, typename T,
-          FMT_ENABLE_IF(std::is_convertible<T, std_string_view<char>>::value)>
-inline auto write_range_entry(OutputIt out, const T& str) -> OutputIt {
-  auto sv = std_string_view<Char>(str);
-  return write_range_entry<Char>(out, basic_string_view<Char>(sv));
-}
-
-template <typename Char, typename OutputIt, typename Arg,
-          FMT_ENABLE_IF(std::is_same<Arg, Char>::value)>
-OutputIt write_range_entry(OutputIt out, const Arg v) {
-  *out++ = '\'';
-  *out++ = v;
-  *out++ = '\'';
-  return out;
-}
-
-template <
-    typename Char, typename OutputIt, typename Arg,
-    FMT_ENABLE_IF(!is_std_string_like<typename std::decay<Arg>::type>::value &&
-                  !std::is_same<Arg, Char>::value)>
-OutputIt write_range_entry(OutputIt out, const Arg& v) {
-  return write<Char>(out, v);
-}
-
-}  // namespace detail
-
-template <typename T> struct is_tuple_like {
-  static FMT_CONSTEXPR_DECL const bool value =
-      detail::is_tuple_like_<T>::value && !detail::is_range_<T>::value;
-};
-
-template <typename TupleT, typename Char>
-struct formatter<TupleT, Char, enable_if_t<fmt::is_tuple_like<TupleT>::value>> {
- private:
-  // C++11 generic lambda for format().
-  template <typename FormatContext> struct format_each {
-    template <typename T> void operator()(const T& v) {
-      if (i > 0) out = detail::write_delimiter(out);
-      out = detail::write_range_entry<Char>(out, v);
-      ++i;
-    }
-    int i;
-    typename FormatContext::iterator& out;
-  };
-
- public:
-  template <typename ParseContext>
-  FMT_CONSTEXPR auto parse(ParseContext& ctx) -> decltype(ctx.begin()) {
-    return ctx.begin();
-  }
-
-  template <typename FormatContext = format_context>
-  auto format(const TupleT& values, FormatContext& ctx) -> decltype(ctx.out()) {
-    auto out = ctx.out();
-    *out++ = '(';
-    detail::for_each(values, format_each<FormatContext>{0, out});
-    *out++ = ')';
-    return out;
-  }
-};
-
-template <typename T, typename Char> struct is_range {
-  static FMT_CONSTEXPR_DECL const bool value =
-      detail::is_range_<T>::value && !detail::is_std_string_like<T>::value &&
-      !detail::is_map<T>::value &&
-      !std::is_convertible<T, std::basic_string<Char>>::value &&
-      !std::is_constructible<detail::std_string_view<Char>, T>::value;
-};
-
-template <typename T, typename Char>
-struct formatter<
-    T, Char,
-    enable_if_t<
-        fmt::is_range<T, Char>::value
-// Workaround a bug in MSVC 2019 and earlier.
-#if !FMT_MSC_VER
-        && (is_formattable<detail::value_type<T>, Char>::value ||
-            detail::has_fallback_formatter<detail::value_type<T>, Char>::value)
-#endif
-        >> {
-  template <typename ParseContext>
-  FMT_CONSTEXPR auto parse(ParseContext& ctx) -> decltype(ctx.begin()) {
-    return ctx.begin();
-  }
-
-  template <
-      typename FormatContext, typename U,
-      FMT_ENABLE_IF(
-          std::is_same<U, conditional_t<detail::has_const_begin_end<T>::value,
-                                        const T, T>>::value)>
-  auto format(U& range, FormatContext& ctx) -> decltype(ctx.out()) {
-#ifdef FMT_DEPRECATED_BRACED_RANGES
-    Char prefix = '{';
-    Char postfix = '}';
-#else
-    Char prefix = detail::is_set<T>::value ? '{' : '[';
-    Char postfix = detail::is_set<T>::value ? '}' : ']';
-#endif
-    auto out = ctx.out();
-    *out++ = prefix;
-    int i = 0;
-    auto it = std::begin(range);
-    auto end = std::end(range);
-    for (; it != end; ++it) {
-      if (i > 0) out = detail::write_delimiter(out);
-      out = detail::write_range_entry<Char>(out, *it);
-      ++i;
-    }
-    *out++ = postfix;
-    return out;
-  }
-};
-
-template <typename T, typename Char>
-struct formatter<
-    T, Char,
-    enable_if_t<
-        detail::is_map<T>::value
-// Workaround a bug in MSVC 2019 and earlier.
-#if !FMT_MSC_VER
-        && (is_formattable<detail::value_type<T>, Char>::value ||
-            detail::has_fallback_formatter<detail::value_type<T>, Char>::value)
-#endif
-        >> {
-  template <typename ParseContext>
-  FMT_CONSTEXPR auto parse(ParseContext& ctx) -> decltype(ctx.begin()) {
-    return ctx.begin();
-  }
-
-  template <
-      typename FormatContext, typename U,
-      FMT_ENABLE_IF(
-          std::is_same<U, conditional_t<detail::has_const_begin_end<T>::value,
-                                        const T, T>>::value)>
-  auto format(U& map, FormatContext& ctx) -> decltype(ctx.out()) {
-    auto out = ctx.out();
-    *out++ = '{';
-    int i = 0;
-    for (const auto& item : map) {
-      if (i > 0) out = detail::write_delimiter(out);
-      out = detail::write_range_entry<Char>(out, item.first);
-      *out++ = ':';
-      *out++ = ' ';
-      out = detail::write_range_entry<Char>(out, item.second);
-      ++i;
-    }
-    *out++ = '}';
-    return out;
-  }
-};
-
-template <typename Char, typename... T> struct tuple_join_view : detail::view {
-  const std::tuple<T...>& tuple;
-  basic_string_view<Char> sep;
-
-  tuple_join_view(const std::tuple<T...>& t, basic_string_view<Char> s)
-      : tuple(t), sep{s} {}
-};
-
-template <typename Char, typename... T>
-using tuple_arg_join = tuple_join_view<Char, T...>;
-
-// Define FMT_TUPLE_JOIN_SPECIFIERS to enable experimental format specifiers
-// support in tuple_join. It is disabled by default because of issues with
-// the dynamic width and precision.
-#ifndef FMT_TUPLE_JOIN_SPECIFIERS
-#  define FMT_TUPLE_JOIN_SPECIFIERS 0
-#endif
-
-template <typename Char, typename... T>
-struct formatter<tuple_join_view<Char, T...>, Char> {
-  template <typename ParseContext>
-  FMT_CONSTEXPR auto parse(ParseContext& ctx) -> decltype(ctx.begin()) {
-    return do_parse(ctx, std::integral_constant<size_t, sizeof...(T)>());
-  }
-
-  template <typename FormatContext>
-  auto format(const tuple_join_view<Char, T...>& value,
-              FormatContext& ctx) const -> typename FormatContext::iterator {
-    return do_format(value, ctx,
-                     std::integral_constant<size_t, sizeof...(T)>());
-  }
-
- private:
-  std::tuple<formatter<typename std::decay<T>::type, Char>...> formatters_;
-
-  template <typename ParseContext>
-  FMT_CONSTEXPR auto do_parse(ParseContext& ctx,
-                              std::integral_constant<size_t, 0>)
-      -> decltype(ctx.begin()) {
-    return ctx.begin();
-  }
-
-  template <typename ParseContext, size_t N>
-  FMT_CONSTEXPR auto do_parse(ParseContext& ctx,
-                              std::integral_constant<size_t, N>)
-      -> decltype(ctx.begin()) {
-    auto end = ctx.begin();
-#if FMT_TUPLE_JOIN_SPECIFIERS
-    end = std::get<sizeof...(T) - N>(formatters_).parse(ctx);
-    if (N > 1) {
-      auto end1 = do_parse(ctx, std::integral_constant<size_t, N - 1>());
-      if (end != end1)
-        FMT_THROW(format_error("incompatible format specs for tuple elements"));
-    }
-#endif
-    return end;
-  }
-
-  template <typename FormatContext>
-  auto do_format(const tuple_join_view<Char, T...>&, FormatContext& ctx,
-                 std::integral_constant<size_t, 0>) const ->
-      typename FormatContext::iterator {
-    return ctx.out();
-  }
-
-  template <typename FormatContext, size_t N>
-  auto do_format(const tuple_join_view<Char, T...>& value, FormatContext& ctx,
-                 std::integral_constant<size_t, N>) const ->
-      typename FormatContext::iterator {
-    auto out = std::get<sizeof...(T) - N>(formatters_)
-                   .format(std::get<sizeof...(T) - N>(value.tuple), ctx);
-    if (N > 1) {
-      out = std::copy(value.sep.begin(), value.sep.end(), out);
-      ctx.advance_to(out);
-      return do_format(value, ctx, std::integral_constant<size_t, N - 1>());
-    }
-    return out;
-  }
-};
-
-FMT_MODULE_EXPORT_BEGIN
-
-/**
-  \rst
-  Returns an object that formats `tuple` with elements separated by `sep`.
-
-  **Example**::
-
-    std::tuple<int, char> t = {1, 'a'};
-    fmt::print("{}", fmt::join(t, ", "));
-    // Output: "1, a"
-  \endrst
- */
-template <typename... T>
-FMT_CONSTEXPR auto join(const std::tuple<T...>& tuple, string_view sep)
-    -> tuple_join_view<char, T...> {
-  return {tuple, sep};
-}
-
-template <typename... T>
-FMT_CONSTEXPR auto join(const std::tuple<T...>& tuple,
-                        basic_string_view<wchar_t> sep)
-    -> tuple_join_view<wchar_t, T...> {
-  return {tuple, sep};
-}
-
-/**
-  \rst
-  Returns an object that formats `initializer_list` with elements separated by
-  `sep`.
-
-  **Example**::
-
-    fmt::print("{}", fmt::join({1, 2, 3}, ", "));
-    // Output: "1, 2, 3"
-  \endrst
- */
-template <typename T>
-auto join(std::initializer_list<T> list, string_view sep)
-    -> join_view<const T*, const T*> {
-  return join(std::begin(list), std::end(list), sep);
-}
-
-FMT_MODULE_EXPORT_END
-FMT_END_NAMESPACE
-
-#endif  // FMT_RANGES_H_
diff --git a/contrib/libs/fmt/test/args-test.cc b/contrib/libs/fmt/test/args-test.cc
deleted file mode 100644
index aa01fa4e08..0000000000
--- a/contrib/libs/fmt/test/args-test.cc
+++ /dev/null
@@ -1,186 +0,0 @@
-// Formatting library for C++ - dynamic argument store tests
-//
-// Copyright (c) 2012 - present, Victor Zverovich
-// All rights reserved.
-//
-// For the license information refer to format.h.
-
-#include "fmt/args.h"
-
-#include <memory>
-
-#include "gtest/gtest.h"
-
-TEST(args_test, basic) {
-  fmt::dynamic_format_arg_store<fmt::format_context> store;
-  store.push_back(42);
-  store.push_back("abc1");
-  store.push_back(1.5f);
-  EXPECT_EQ("42 and abc1 and 1.5", fmt::vformat("{} and {} and {}", store));
-}
-
-TEST(args_test, strings_and_refs) {
-  // Unfortunately the tests are compiled with old ABI so strings use COW.
-  fmt::dynamic_format_arg_store<fmt::format_context> store;
-  char str[] = "1234567890";
-  store.push_back(str);
-  store.push_back(std::cref(str));
-  store.push_back(fmt::string_view{str});
-  str[0] = 'X';
-
-  auto result = fmt::vformat("{} and {} and {}", store);
-  EXPECT_EQ("1234567890 and X234567890 and X234567890", result);
-}
-
-struct custom_type {
-  int i = 0;
-};
-
-FMT_BEGIN_NAMESPACE
-template <> struct formatter<custom_type> {
-  auto parse(format_parse_context& ctx) const -> decltype(ctx.begin()) {
-    return ctx.begin();
-  }
-
-  template <typename FormatContext>
-  auto format(const custom_type& p, FormatContext& ctx) -> decltype(ctx.out()) {
-    return format_to(ctx.out(), "cust={}", p.i);
-  }
-};
-FMT_END_NAMESPACE
-
-TEST(args_test, custom_format) {
-  fmt::dynamic_format_arg_store<fmt::format_context> store;
-  auto c = custom_type();
-  store.push_back(c);
-  ++c.i;
-  store.push_back(c);
-  ++c.i;
-  store.push_back(std::cref(c));
-  ++c.i;
-  auto result = fmt::vformat("{} and {} and {}", store);
-  EXPECT_EQ("cust=0 and cust=1 and cust=3", result);
-}
-
-struct to_stringable {
-  friend fmt::string_view to_string_view(to_stringable) { return {}; }
-};
-
-FMT_BEGIN_NAMESPACE
-template <> struct formatter<to_stringable> {
-  auto parse(format_parse_context& ctx) const -> decltype(ctx.begin()) {
-    return ctx.begin();
-  }
-
-  auto format(to_stringable, format_context& ctx) -> decltype(ctx.out()) {
-    return ctx.out();
-  }
-};
-FMT_END_NAMESPACE
-
-TEST(args_test, to_string_and_formatter) {
-  fmt::dynamic_format_arg_store<fmt::format_context> store;
-  auto s = to_stringable();
-  store.push_back(s);
-  store.push_back(std::cref(s));
-  fmt::vformat("", store);
-}
-
-TEST(args_test, named_int) {
-  fmt::dynamic_format_arg_store<fmt::format_context> store;
-  store.push_back(fmt::arg("a1", 42));
-  EXPECT_EQ("42", fmt::vformat("{a1}", store));
-}
-
-TEST(args_test, named_strings) {
-  fmt::dynamic_format_arg_store<fmt::format_context> store;
-  char str[] = "1234567890";
-  store.push_back(fmt::arg("a1", str));
-  store.push_back(fmt::arg("a2", std::cref(str)));
-  str[0] = 'X';
-  EXPECT_EQ("1234567890 and X234567890", fmt::vformat("{a1} and {a2}", store));
-}
-
-TEST(args_test, named_arg_by_ref) {
-  fmt::dynamic_format_arg_store<fmt::format_context> store;
-  char band[] = "Rolling Stones";
-  store.push_back(fmt::arg("band", std::cref(band)));
-  band[9] = 'c';  // Changing band affects the output.
-  EXPECT_EQ(fmt::vformat("{band}", store), "Rolling Scones");
-}
-
-TEST(args_test, named_custom_format) {
-  fmt::dynamic_format_arg_store<fmt::format_context> store;
-  auto c = custom_type();
-  store.push_back(fmt::arg("c1", c));
-  ++c.i;
-  store.push_back(fmt::arg("c2", c));
-  ++c.i;
-  store.push_back(fmt::arg("c_ref", std::cref(c)));
-  ++c.i;
-  auto result = fmt::vformat("{c1} and {c2} and {c_ref}", store);
-  EXPECT_EQ("cust=0 and cust=1 and cust=3", result);
-}
-
-TEST(args_test, clear) {
-  fmt::dynamic_format_arg_store<fmt::format_context> store;
-  store.push_back(42);
-
-  auto result = fmt::vformat("{}", store);
-  EXPECT_EQ("42", result);
-
-  store.push_back(43);
-  result = fmt::vformat("{} and {}", store);
-  EXPECT_EQ("42 and 43", result);
-
-  store.clear();
-  store.push_back(44);
-  result = fmt::vformat("{}", store);
-  EXPECT_EQ("44", result);
-}
-
-TEST(args_test, reserve) {
-  fmt::dynamic_format_arg_store<fmt::format_context> store;
-  store.reserve(2, 1);
-  store.push_back(1.5f);
-  store.push_back(fmt::arg("a1", 42));
-  auto result = fmt::vformat("{a1} and {}", store);
-  EXPECT_EQ("42 and 1.5", result);
-}
-
-struct copy_throwable {
-  copy_throwable() {}
-  copy_throwable(const copy_throwable&) { throw "deal with it"; }
-};
-
-FMT_BEGIN_NAMESPACE
-template <> struct formatter<copy_throwable> {
-  auto parse(format_parse_context& ctx) const -> decltype(ctx.begin()) {
-    return ctx.begin();
-  }
-  auto format(copy_throwable, format_context& ctx) -> decltype(ctx.out()) {
-    return ctx.out();
-  }
-};
-FMT_END_NAMESPACE
-
-TEST(args_test, throw_on_copy) {
-  fmt::dynamic_format_arg_store<fmt::format_context> store;
-  store.push_back(std::string("foo"));
-  try {
-    store.push_back(copy_throwable());
-  } catch (...) {
-  }
-  EXPECT_EQ(fmt::vformat("{}", store), "foo");
-}
-
-TEST(args_test, move_constructor) {
-  using store_type = fmt::dynamic_format_arg_store<fmt::format_context>;
-  auto store = std::unique_ptr<store_type>(new store_type());
-  store->push_back(42);
-  store->push_back(std::string("foo"));
-  store->push_back(fmt::arg("a1", "foo"));
-  auto moved_store = std::move(*store);
-  store.reset();
-  EXPECT_EQ(fmt::vformat("{} {} {a1}", moved_store), "42 foo foo");
-}
diff --git a/contrib/libs/fmt/test/args-test/ya.make b/contrib/libs/fmt/test/args-test/ya.make
deleted file mode 100644
index 430ed1293a..0000000000
--- a/contrib/libs/fmt/test/args-test/ya.make
+++ /dev/null
@@ -1,31 +0,0 @@
-# Generated by devtools/yamaker.
-
-GTEST()
-
-WITHOUT_LICENSE_TEXTS()
-
-LICENSE(MIT)
-
-PEERDIR(
-    contrib/libs/fmt
-    contrib/libs/fmt/test
-)
-
-NO_COMPILER_WARNINGS()
-
-NO_UTIL()
-
-CFLAGS(
-    -DFMT_LOCALE
-    -DFMT_SHARED
-    -DGTEST_HAS_STD_WSTRING=1
-    -D_SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING=1
-)
-
-SRCDIR(contrib/libs/fmt/test)
-
-SRCS(
-    args-test.cc
-)
-
-END()
diff --git a/contrib/libs/fmt/test/assert-test.cc b/contrib/libs/fmt/test/assert-test.cc
deleted file mode 100644
index c74e617e68..0000000000
--- a/contrib/libs/fmt/test/assert-test.cc
+++ /dev/null
@@ -1,31 +0,0 @@
-// Formatting library for C++ - FMT_ASSERT test
-//
-// It is a separate test to minimize the number of EXPECT_DEBUG_DEATH checks
-// which are slow on some platforms. In other tests FMT_ASSERT is made to throw
-// an exception which is much faster and easier to check.
-//
-// Copyright (c) 2012 - present, Victor Zverovich
-// All rights reserved.
-//
-// For the license information refer to format.h.
-
-#include "fmt/core.h"
-#include "gtest/gtest.h"
-
-TEST(assert_test, fail) {
-#if GTEST_HAS_DEATH_TEST
-  EXPECT_DEBUG_DEATH(FMT_ASSERT(false, "don't panic!"), "don't panic!");
-#else
-  fmt::print("warning: death tests are not supported\n");
-#endif
-}
-
-TEST(assert_test, dangling_else) {
-  bool test_condition = false;
-  bool executed_else = false;
-  if (test_condition)
-    FMT_ASSERT(true, "");
-  else
-    executed_else = true;
-  EXPECT_TRUE(executed_else);
-}
diff --git a/contrib/libs/fmt/test/assert-test/ya.make b/contrib/libs/fmt/test/assert-test/ya.make
deleted file mode 100644
index 7b8997a7e6..0000000000
--- a/contrib/libs/fmt/test/assert-test/ya.make
+++ /dev/null
@@ -1,31 +0,0 @@
-# Generated by devtools/yamaker.
-
-GTEST()
-
-WITHOUT_LICENSE_TEXTS()
-
-LICENSE(MIT)
-
-PEERDIR(
-    contrib/libs/fmt
-    contrib/libs/fmt/test
-)
-
-NO_COMPILER_WARNINGS()
-
-NO_UTIL()
-
-CFLAGS(
-    -DFMT_LOCALE
-    -DFMT_SHARED
-    -DGTEST_HAS_STD_WSTRING=1
-    -D_SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING=1
-)
-
-SRCDIR(contrib/libs/fmt/test)
-
-SRCS(
-    assert-test.cc
-)
-
-END()
diff --git a/contrib/libs/fmt/test/chrono-test.cc b/contrib/libs/fmt/test/chrono-test.cc
deleted file mode 100644
index 42360e5f12..0000000000
--- a/contrib/libs/fmt/test/chrono-test.cc
+++ /dev/null
@@ -1,625 +0,0 @@
-// Formatting library for C++ - time formatting tests
-//
-// Copyright (c) 2012 - present, Victor Zverovich
-// All rights reserved.
-//
-// For the license information refer to format.h.
-
-#include "fmt/chrono.h"
-
-#include <ctime>
-#include <vector>
-
-#include "gtest-extra.h"  // EXPECT_THROW_MSG
-#include "util.h"         // get_locale
-
-using fmt::runtime;
-
-using testing::Contains;
-
-auto make_tm() -> std::tm {
-  auto time = std::tm();
-  time.tm_mday = 1;
-  return time;
-}
-
-auto make_hour(int h) -> std::tm {
-  auto time = make_tm();
-  time.tm_hour = h;
-  return time;
-}
-
-auto make_minute(int m) -> std::tm {
-  auto time = make_tm();
-  time.tm_min = m;
-  return time;
-}
-
-auto make_second(int s) -> std::tm {
-  auto time = make_tm();
-  time.tm_sec = s;
-  return time;
-}
-
-std::string system_strftime(const std::string& format, const std::tm* timeptr,
-                            std::locale* locptr = nullptr) {
-  auto loc = locptr ? *locptr : std::locale::classic();
-  auto& facet = std::use_facet<std::time_put<char>>(loc);
-  std::ostringstream os;
-  os.imbue(loc);
-  facet.put(os, os, ' ', timeptr, format.c_str(),
-            format.c_str() + format.size());
-#ifdef _WIN32
-  // Workaround a bug in older versions of Universal CRT.
-  auto str = os.str();
-  if (str == "-0000") str = "+0000";
-  return str;
-#else
-  return os.str();
-#endif
-}
-
-FMT_CONSTEXPR std::tm make_tm(int year, int mon, int mday, int hour, int min,
-                              int sec) {
-  auto tm = std::tm();
-  tm.tm_sec = sec;
-  tm.tm_min = min;
-  tm.tm_hour = hour;
-  tm.tm_mday = mday;
-  tm.tm_mon = mon - 1;
-  tm.tm_year = year - 1900;
-  return tm;
-}
-
-TEST(chrono_test, format_tm) {
-  auto tm = std::tm();
-  tm.tm_year = 116;
-  tm.tm_mon = 3;
-  tm.tm_mday = 25;
-  tm.tm_hour = 11;
-  tm.tm_min = 22;
-  tm.tm_sec = 33;
-  EXPECT_EQ(fmt::format("The date is {:%Y-%m-%d %H:%M:%S}.", tm),
-            "The date is 2016-04-25 11:22:33.");
-  EXPECT_EQ(fmt::format("{:%Y}", tm), "2016");
-  EXPECT_EQ(fmt::format("{:%C}", tm), "20");
-  EXPECT_EQ(fmt::format("{:%C%y}", tm), fmt::format("{:%Y}", tm));
-  EXPECT_EQ(fmt::format("{:%e}", tm), "25");
-  EXPECT_EQ(fmt::format("{:%D}", tm), "04/25/16");
-  EXPECT_EQ(fmt::format("{:%F}", tm), "2016-04-25");
-  EXPECT_EQ(fmt::format("{:%T}", tm), "11:22:33");
-
-  // Short year
-  tm.tm_year = 999 - 1900;
-  tm.tm_mon = 0;   // for %G
-  tm.tm_mday = 2;  // for %G
-  tm.tm_wday = 3;  // for %G
-  tm.tm_yday = 1;  // for %G
-  EXPECT_EQ(fmt::format("{:%Y}", tm), "0999");
-  EXPECT_EQ(fmt::format("{:%C%y}", tm), "0999");
-  EXPECT_EQ(fmt::format("{:%G}", tm), "0999");
-
-  tm.tm_year = 27 - 1900;
-  EXPECT_EQ(fmt::format("{:%Y}", tm), "0027");
-  EXPECT_EQ(fmt::format("{:%C%y}", tm), "0027");
-
-  // Overflow year
-  tm.tm_year = 2147483647;
-  EXPECT_EQ(fmt::format("{:%Y}", tm), "2147485547");
-
-  tm.tm_year = -2147483648;
-  EXPECT_EQ(fmt::format("{:%Y}", tm), "-2147481748");
-
-  // for week on the year
-  // https://www.cl.cam.ac.uk/~mgk25/iso-time.html
-  std::vector<std::tm> tm_list = {
-      make_tm(1975, 12, 29, 12, 14, 16),  // W01
-      make_tm(1977, 1, 2, 12, 14, 16),    // W53
-      make_tm(1999, 12, 27, 12, 14, 16),  // W52
-      make_tm(1999, 12, 31, 12, 14, 16),  // W52
-      make_tm(2000, 1, 1, 12, 14, 16),    // W52
-      make_tm(2000, 1, 2, 12, 14, 16),    // W52
-      make_tm(2000, 1, 3, 12, 14, 16)     // W1
-  };
-  const std::string iso_week_spec = "%Y-%m-%d: %G %g %V";
-  for (auto ctm : tm_list) {
-    // Calculate tm_yday, tm_wday, etc.
-    std::time_t t = std::mktime(&ctm);
-    tm = *std::localtime(&t);
-
-    auto fmt_spec = fmt::format("{{:{}}}", iso_week_spec);
-    EXPECT_EQ(system_strftime(iso_week_spec, &tm),
-              fmt::format(fmt::runtime(fmt_spec), tm));
-  }
-
-  // Every day from 1970-01-01
-  std::time_t time_now = std::time(nullptr);
-  for (std::time_t t = 6 * 3600; t < time_now; t += 86400) {
-    tm = *std::localtime(&t);
-
-    auto fmt_spec = fmt::format("{{:{}}}", iso_week_spec);
-    EXPECT_EQ(system_strftime(iso_week_spec, &tm),
-              fmt::format(fmt::runtime(fmt_spec), tm));
-  }
-}
-
-// MSVC:
-//  minkernel\crts\ucrt\src\appcrt\time\wcsftime.cpp(971) : Assertion failed:
-//  timeptr->tm_year >= -1900 && timeptr->tm_year <= 8099
-#ifndef _WIN32
-TEST(chrono_test, format_tm_future) {
-  auto tm = std::tm();
-  tm.tm_year = 10445;  // 10000+ years
-  tm.tm_mon = 3;
-  tm.tm_mday = 25;
-  tm.tm_hour = 11;
-  tm.tm_min = 22;
-  tm.tm_sec = 33;
-  EXPECT_EQ(fmt::format("The date is {:%Y-%m-%d %H:%M:%S}.", tm),
-            "The date is 12345-04-25 11:22:33.");
-  EXPECT_EQ(fmt::format("{:%Y}", tm), "12345");
-  EXPECT_EQ(fmt::format("{:%C}", tm), "123");
-  EXPECT_EQ(fmt::format("{:%C%y}", tm), fmt::format("{:%Y}", tm));
-  EXPECT_EQ(fmt::format("{:%D}", tm), "04/25/45");
-  EXPECT_EQ(fmt::format("{:%F}", tm), "12345-04-25");
-  EXPECT_EQ(fmt::format("{:%T}", tm), "11:22:33");
-}
-
-TEST(chrono_test, format_tm_past) {
-  auto tm = std::tm();
-  tm.tm_year = -2001;
-  tm.tm_mon = 3;
-  tm.tm_mday = 25;
-  tm.tm_hour = 11;
-  tm.tm_min = 22;
-  tm.tm_sec = 33;
-  EXPECT_EQ(fmt::format("The date is {:%Y-%m-%d %H:%M:%S}.", tm),
-            "The date is -101-04-25 11:22:33.");
-  EXPECT_EQ(fmt::format("{:%Y}", tm), "-101");
-
-  // macOS  %C - "-1"
-  // Linux  %C - "-2"
-  // fmt    %C - "-1"
-  EXPECT_EQ(fmt::format("{:%C}", tm), "-1");
-  EXPECT_EQ(fmt::format("{:%C%y}", tm), fmt::format("{:%Y}", tm));
-
-  // macOS  %D - "04/25/01" (%y)
-  // Linux  %D - "04/25/99" (%y)
-  // fmt    %D - "04/25/01" (%y)
-  EXPECT_EQ(fmt::format("{:%D}", tm), "04/25/01");
-
-  EXPECT_EQ(fmt::format("{:%F}", tm), "-101-04-25");
-  EXPECT_EQ(fmt::format("{:%T}", tm), "11:22:33");
-
-  tm.tm_year = -1901;  // -1
-  EXPECT_EQ(fmt::format("{:%Y}", tm), "-001");
-  EXPECT_EQ(fmt::format("{:%C%y}", tm), fmt::format("{:%Y}", tm));
-
-  tm.tm_year = -1911;  // -11
-  EXPECT_EQ(fmt::format("{:%Y}", tm), "-011");
-  EXPECT_EQ(fmt::format("{:%C%y}", tm), fmt::format("{:%Y}", tm));
-}
-#endif
-
-TEST(chrono_test, grow_buffer) {
-  auto s = std::string("{:");
-  for (int i = 0; i < 30; ++i) s += "%c";
-  s += "}\n";
-  auto t = std::time(nullptr);
-  (void)fmt::format(fmt::runtime(s), *std::localtime(&t));
-}
-
-TEST(chrono_test, format_to_empty_container) {
-  auto time = std::tm();
-  time.tm_sec = 42;
-  auto s = std::string();
-  fmt::format_to(std::back_inserter(s), "{:%S}", time);
-  EXPECT_EQ(s, "42");
-}
-
-TEST(chrono_test, empty_result) { EXPECT_EQ(fmt::format("{}", std::tm()), ""); }
-
-auto equal(const std::tm& lhs, const std::tm& rhs) -> bool {
-  return lhs.tm_sec == rhs.tm_sec && lhs.tm_min == rhs.tm_min &&
-         lhs.tm_hour == rhs.tm_hour && lhs.tm_mday == rhs.tm_mday &&
-         lhs.tm_mon == rhs.tm_mon && lhs.tm_year == rhs.tm_year &&
-         lhs.tm_wday == rhs.tm_wday && lhs.tm_yday == rhs.tm_yday &&
-         lhs.tm_isdst == rhs.tm_isdst;
-}
-
-TEST(chrono_test, localtime) {
-  auto t = std::time(nullptr);
-  auto tm = *std::localtime(&t);
-  EXPECT_TRUE(equal(tm, fmt::localtime(t)));
-}
-
-TEST(chrono_test, gmtime) {
-  auto t = std::time(nullptr);
-  auto tm = *std::gmtime(&t);
-  EXPECT_TRUE(equal(tm, fmt::gmtime(t)));
-}
-
-template <typename TimePoint> auto strftime_full(TimePoint tp) -> std::string {
-  auto t = std::chrono::system_clock::to_time_t(tp);
-  auto tm = *std::localtime(&t);
-  return system_strftime("%Y-%m-%d %H:%M:%S", &tm);
-}
-
-TEST(chrono_test, time_point) {
-  auto t1 = std::chrono::system_clock::now();
-  EXPECT_EQ(strftime_full(t1), fmt::format("{:%Y-%m-%d %H:%M:%S}", t1));
-  EXPECT_EQ(strftime_full(t1), fmt::format("{}", t1));
-  using time_point =
-      std::chrono::time_point<std::chrono::system_clock, std::chrono::seconds>;
-  auto t2 = time_point(std::chrono::seconds(42));
-  EXPECT_EQ(strftime_full(t2), fmt::format("{:%Y-%m-%d %H:%M:%S}", t2));
-
-  std::vector<std::string> spec_list = {
-      "%%",  "%n",  "%t",  "%Y",  "%EY", "%y",  "%Oy", "%Ey", "%C",
-      "%EC", "%G",  "%g",  "%b",  "%h",  "%B",  "%m",  "%Om", "%U",
-      "%OU", "%W",  "%OW", "%V",  "%OV", "%j",  "%d",  "%Od", "%e",
-      "%Oe", "%a",  "%A",  "%w",  "%Ow", "%u",  "%Ou", "%H",  "%OH",
-      "%I",  "%OI", "%M",  "%OM", "%S",  "%OS", "%x",  "%Ex", "%X",
-      "%EX", "%D",  "%F",  "%R",  "%T",  "%p",  "%z",  "%Z"};
-  spec_list.push_back("%Y-%m-%d %H:%M:%S");
-#ifndef _WIN32
-  // Disabled on Windows because these formats are not consistent among
-  // platforms.
-  spec_list.insert(spec_list.end(), {"%c", "%Ec", "%r"});
-#endif
-
-  for (const auto& spec : spec_list) {
-    auto t = std::chrono::system_clock::to_time_t(t1);
-    auto tm = *std::localtime(&t);
-
-    auto sys_output = system_strftime(spec, &tm);
-
-    auto fmt_spec = fmt::format("{{:{}}}", spec);
-    EXPECT_EQ(sys_output, fmt::format(fmt::runtime(fmt_spec), t1));
-    EXPECT_EQ(sys_output, fmt::format(fmt::runtime(fmt_spec), tm));
-  }
-}
-
-#ifndef FMT_STATIC_THOUSANDS_SEPARATOR
-
-TEST(chrono_test, format_default) {
-  EXPECT_EQ("42s", fmt::format("{}", std::chrono::seconds(42)));
-  EXPECT_EQ("42as",
-            fmt::format("{}", std::chrono::duration<int, std::atto>(42)));
-  EXPECT_EQ("42fs",
-            fmt::format("{}", std::chrono::duration<int, std::femto>(42)));
-  EXPECT_EQ("42ps",
-            fmt::format("{}", std::chrono::duration<int, std::pico>(42)));
-  EXPECT_EQ("42ns", fmt::format("{}", std::chrono::nanoseconds(42)));
-  EXPECT_EQ("42µs", fmt::format("{}", std::chrono::microseconds(42)));
-  EXPECT_EQ("42ms", fmt::format("{}", std::chrono::milliseconds(42)));
-  EXPECT_EQ("42cs",
-            fmt::format("{}", std::chrono::duration<int, std::centi>(42)));
-  EXPECT_EQ("42ds",
-            fmt::format("{}", std::chrono::duration<int, std::deci>(42)));
-  EXPECT_EQ("42s", fmt::format("{}", std::chrono::seconds(42)));
-  EXPECT_EQ("42das",
-            fmt::format("{}", std::chrono::duration<int, std::deca>(42)));
-  EXPECT_EQ("42hs",
-            fmt::format("{}", std::chrono::duration<int, std::hecto>(42)));
-  EXPECT_EQ("42ks",
-            fmt::format("{}", std::chrono::duration<int, std::kilo>(42)));
-  EXPECT_EQ("42Ms",
-            fmt::format("{}", std::chrono::duration<int, std::mega>(42)));
-  EXPECT_EQ("42Gs",
-            fmt::format("{}", std::chrono::duration<int, std::giga>(42)));
-  EXPECT_EQ("42Ts",
-            fmt::format("{}", std::chrono::duration<int, std::tera>(42)));
-  EXPECT_EQ("42Ps",
-            fmt::format("{}", std::chrono::duration<int, std::peta>(42)));
-  EXPECT_EQ("42Es",
-            fmt::format("{}", std::chrono::duration<int, std::exa>(42)));
-  EXPECT_EQ("42m", fmt::format("{}", std::chrono::minutes(42)));
-  EXPECT_EQ("42h", fmt::format("{}", std::chrono::hours(42)));
-  EXPECT_EQ(
-      "42[15]s",
-      fmt::format("{}", std::chrono::duration<int, std::ratio<15, 1>>(42)));
-  EXPECT_EQ(
-      "42[15/4]s",
-      fmt::format("{}", std::chrono::duration<int, std::ratio<15, 4>>(42)));
-}
-
-TEST(chrono_test, align) {
-  auto s = std::chrono::seconds(42);
-  EXPECT_EQ("42s  ", fmt::format("{:5}", s));
-  EXPECT_EQ("42s  ", fmt::format("{:{}}", s, 5));
-  EXPECT_EQ("  42s", fmt::format("{:>5}", s));
-  EXPECT_EQ("**42s**", fmt::format("{:*^7}", s));
-  EXPECT_EQ("03:25:45    ",
-            fmt::format("{:12%H:%M:%S}", std::chrono::seconds(12345)));
-  EXPECT_EQ("    03:25:45",
-            fmt::format("{:>12%H:%M:%S}", std::chrono::seconds(12345)));
-  EXPECT_EQ("~~03:25:45~~",
-            fmt::format("{:~^12%H:%M:%S}", std::chrono::seconds(12345)));
-  EXPECT_EQ("03:25:45    ",
-            fmt::format("{:{}%H:%M:%S}", std::chrono::seconds(12345), 12));
-}
-
-TEST(chrono_test, format_specs) {
-  EXPECT_EQ("%", fmt::format("{:%%}", std::chrono::seconds(0)));
-  EXPECT_EQ("\n", fmt::format("{:%n}", std::chrono::seconds(0)));
-  EXPECT_EQ("\t", fmt::format("{:%t}", std::chrono::seconds(0)));
-  EXPECT_EQ("00", fmt::format("{:%S}", std::chrono::seconds(0)));
-  EXPECT_EQ("00", fmt::format("{:%S}", std::chrono::seconds(60)));
-  EXPECT_EQ("42", fmt::format("{:%S}", std::chrono::seconds(42)));
-  EXPECT_EQ("01.234", fmt::format("{:%S}", std::chrono::milliseconds(1234)));
-  EXPECT_EQ("00", fmt::format("{:%M}", std::chrono::minutes(0)));
-  EXPECT_EQ("00", fmt::format("{:%M}", std::chrono::minutes(60)));
-  EXPECT_EQ("42", fmt::format("{:%M}", std::chrono::minutes(42)));
-  EXPECT_EQ("01", fmt::format("{:%M}", std::chrono::seconds(61)));
-  EXPECT_EQ("00", fmt::format("{:%H}", std::chrono::hours(0)));
-  EXPECT_EQ("00", fmt::format("{:%H}", std::chrono::hours(24)));
-  EXPECT_EQ("14", fmt::format("{:%H}", std::chrono::hours(14)));
-  EXPECT_EQ("01", fmt::format("{:%H}", std::chrono::minutes(61)));
-  EXPECT_EQ("12", fmt::format("{:%I}", std::chrono::hours(0)));
-  EXPECT_EQ("12", fmt::format("{:%I}", std::chrono::hours(12)));
-  EXPECT_EQ("12", fmt::format("{:%I}", std::chrono::hours(24)));
-  EXPECT_EQ("04", fmt::format("{:%I}", std::chrono::hours(4)));
-  EXPECT_EQ("02", fmt::format("{:%I}", std::chrono::hours(14)));
-  EXPECT_EQ("03:25:45",
-            fmt::format("{:%H:%M:%S}", std::chrono::seconds(12345)));
-  EXPECT_EQ("03:25", fmt::format("{:%R}", std::chrono::seconds(12345)));
-  EXPECT_EQ("03:25:45", fmt::format("{:%T}", std::chrono::seconds(12345)));
-  EXPECT_EQ("12345", fmt::format("{:%Q}", std::chrono::seconds(12345)));
-  EXPECT_EQ("s", fmt::format("{:%q}", std::chrono::seconds(12345)));
-}
-
-TEST(chrono_test, invalid_specs) {
-  auto sec = std::chrono::seconds(0);
-  EXPECT_THROW_MSG((void)fmt::format(runtime("{:%a}"), sec), fmt::format_error,
-                   "no date");
-  EXPECT_THROW_MSG((void)fmt::format(runtime("{:%A}"), sec), fmt::format_error,
-                   "no date");
-  EXPECT_THROW_MSG((void)fmt::format(runtime("{:%c}"), sec), fmt::format_error,
-                   "no date");
-  EXPECT_THROW_MSG((void)fmt::format(runtime("{:%x}"), sec), fmt::format_error,
-                   "no date");
-  EXPECT_THROW_MSG((void)fmt::format(runtime("{:%Ex}"), sec), fmt::format_error,
-                   "no date");
-  EXPECT_THROW_MSG((void)fmt::format(runtime("{:%X}"), sec), fmt::format_error,
-                   "no date");
-  EXPECT_THROW_MSG((void)fmt::format(runtime("{:%EX}"), sec), fmt::format_error,
-                   "no date");
-  EXPECT_THROW_MSG((void)fmt::format(runtime("{:%D}"), sec), fmt::format_error,
-                   "no date");
-  EXPECT_THROW_MSG((void)fmt::format(runtime("{:%F}"), sec), fmt::format_error,
-                   "no date");
-  EXPECT_THROW_MSG((void)fmt::format(runtime("{:%Ec}"), sec), fmt::format_error,
-                   "no date");
-  EXPECT_THROW_MSG((void)fmt::format(runtime("{:%w}"), sec), fmt::format_error,
-                   "no date");
-  EXPECT_THROW_MSG((void)fmt::format(runtime("{:%u}"), sec), fmt::format_error,
-                   "no date");
-  EXPECT_THROW_MSG((void)fmt::format(runtime("{:%b}"), sec), fmt::format_error,
-                   "no date");
-  EXPECT_THROW_MSG((void)fmt::format(runtime("{:%B}"), sec), fmt::format_error,
-                   "no date");
-  EXPECT_THROW_MSG((void)fmt::format(runtime("{:%z}"), sec), fmt::format_error,
-                   "no date");
-  EXPECT_THROW_MSG((void)fmt::format(runtime("{:%Z}"), sec), fmt::format_error,
-                   "no date");
-  EXPECT_THROW_MSG((void)fmt::format(runtime("{:%Eq}"), sec), fmt::format_error,
-                   "invalid format");
-  EXPECT_THROW_MSG((void)fmt::format(runtime("{:%Oq}"), sec), fmt::format_error,
-                   "invalid format");
-}
-
-auto format_tm(const std::tm& time, fmt::string_view spec,
-               const std::locale& loc) -> std::string {
-  auto& facet = std::use_facet<std::time_put<char>>(loc);
-  std::ostringstream os;
-  os.imbue(loc);
-  facet.put(os, os, ' ', &time, spec.begin(), spec.end());
-  return os.str();
-}
-
-TEST(chrono_test, locale) {
-  auto loc = get_locale("ja_JP.utf8");
-  if (loc == std::locale::classic()) return;
-#  define EXPECT_TIME(spec, time, duration)                     \
-    {                                                           \
-      auto jp_loc = std::locale("ja_JP.utf8");                  \
-      EXPECT_EQ(format_tm(time, spec, jp_loc),                  \
-                fmt::format(jp_loc, "{:L" spec "}", duration)); \
-    }
-  EXPECT_TIME("%OH", make_hour(14), std::chrono::hours(14));
-  EXPECT_TIME("%OI", make_hour(14), std::chrono::hours(14));
-  EXPECT_TIME("%OM", make_minute(42), std::chrono::minutes(42));
-  EXPECT_TIME("%OS", make_second(42), std::chrono::seconds(42));
-  auto time = make_tm();
-  time.tm_hour = 3;
-  time.tm_min = 25;
-  time.tm_sec = 45;
-  auto sec = std::chrono::seconds(12345);
-  EXPECT_TIME("%r", time, sec);
-  EXPECT_TIME("%p", time, sec);
-}
-
-using dms = std::chrono::duration<double, std::milli>;
-
-TEST(chrono_test, format_default_fp) {
-  typedef std::chrono::duration<float> fs;
-  EXPECT_EQ("1.234s", fmt::format("{}", fs(1.234)));
-  typedef std::chrono::duration<float, std::milli> fms;
-  EXPECT_EQ("1.234ms", fmt::format("{}", fms(1.234)));
-  typedef std::chrono::duration<double> ds;
-  EXPECT_EQ("1.234s", fmt::format("{}", ds(1.234)));
-  EXPECT_EQ("1.234ms", fmt::format("{}", dms(1.234)));
-}
-
-TEST(chrono_test, format_precision) {
-  EXPECT_THROW_MSG(
-      (void)fmt::format(runtime("{:.2}"), std::chrono::seconds(42)),
-      fmt::format_error, "precision not allowed for this argument type");
-  EXPECT_EQ("1ms", fmt::format("{:.0}", dms(1.234)));
-  EXPECT_EQ("1.2ms", fmt::format("{:.1}", dms(1.234)));
-  EXPECT_EQ("1.23ms", fmt::format("{:.{}}", dms(1.234), 2));
-
-  EXPECT_EQ("13ms", fmt::format("{:.0}", dms(12.56)));
-  EXPECT_EQ("12.6ms", fmt::format("{:.1}", dms(12.56)));
-  EXPECT_EQ("12.56ms", fmt::format("{:.2}", dms(12.56)));
-}
-
-TEST(chrono_test, format_full_specs) {
-  EXPECT_EQ("1ms   ", fmt::format("{:6.0}", dms(1.234)));
-  EXPECT_EQ("1.2ms ", fmt::format("{:6.1}", dms(1.234)));
-  EXPECT_EQ("  1.23ms", fmt::format("{:>8.{}}", dms(1.234), 2));
-  EXPECT_EQ(" 1.2ms ", fmt::format("{:^{}.{}}", dms(1.234), 7, 1));
-  EXPECT_EQ(" 1.23ms ", fmt::format("{0:^{2}.{1}}", dms(1.234), 2, 8));
-  EXPECT_EQ("=1.234ms=", fmt::format("{:=^{}.{}}", dms(1.234), 9, 3));
-  EXPECT_EQ("*1.2340ms*", fmt::format("{:*^10.4}", dms(1.234)));
-
-  EXPECT_EQ("13ms  ", fmt::format("{:6.0}", dms(12.56)));
-  EXPECT_EQ("    13ms", fmt::format("{:>8.{}}", dms(12.56), 0));
-  EXPECT_EQ(" 13ms ", fmt::format("{:^{}.{}}", dms(12.56), 6, 0));
-  EXPECT_EQ("  13ms  ", fmt::format("{0:^{2}.{1}}", dms(12.56), 0, 8));
-  EXPECT_EQ("==13ms===", fmt::format("{:=^{}.{}}", dms(12.56), 9, 0));
-  EXPECT_EQ("***13ms***", fmt::format("{:*^10.0}", dms(12.56)));
-}
-
-TEST(chrono_test, format_simple_q) {
-  typedef std::chrono::duration<float> fs;
-  EXPECT_EQ("1.234 s", fmt::format("{:%Q %q}", fs(1.234)));
-  typedef std::chrono::duration<float, std::milli> fms;
-  EXPECT_EQ("1.234 ms", fmt::format("{:%Q %q}", fms(1.234)));
-  typedef std::chrono::duration<double> ds;
-  EXPECT_EQ("1.234 s", fmt::format("{:%Q %q}", ds(1.234)));
-  EXPECT_EQ("1.234 ms", fmt::format("{:%Q %q}", dms(1.234)));
-}
-
-TEST(chrono_test, format_precision_q) {
-  EXPECT_THROW_MSG(
-      (void)fmt::format(runtime("{:.2%Q %q}"), std::chrono::seconds(42)),
-      fmt::format_error, "precision not allowed for this argument type");
-  EXPECT_EQ("1.2 ms", fmt::format("{:.1%Q %q}", dms(1.234)));
-  EXPECT_EQ("1.23 ms", fmt::format("{:.{}%Q %q}", dms(1.234), 2));
-}
-
-TEST(chrono_test, format_full_specs_q) {
-  EXPECT_EQ("1 ms   ", fmt::format("{:7.0%Q %q}", dms(1.234)));
-  EXPECT_EQ("1.2 ms ", fmt::format("{:7.1%Q %q}", dms(1.234)));
-  EXPECT_EQ(" 1.23 ms", fmt::format("{:>8.{}%Q %q}", dms(1.234), 2));
-  EXPECT_EQ(" 1.2 ms ", fmt::format("{:^{}.{}%Q %q}", dms(1.234), 8, 1));
-  EXPECT_EQ(" 1.23 ms ", fmt::format("{0:^{2}.{1}%Q %q}", dms(1.234), 2, 9));
-  EXPECT_EQ("=1.234 ms=", fmt::format("{:=^{}.{}%Q %q}", dms(1.234), 10, 3));
-  EXPECT_EQ("*1.2340 ms*", fmt::format("{:*^11.4%Q %q}", dms(1.234)));
-
-  EXPECT_EQ("13 ms  ", fmt::format("{:7.0%Q %q}", dms(12.56)));
-  EXPECT_EQ("   13 ms", fmt::format("{:>8.{}%Q %q}", dms(12.56), 0));
-  EXPECT_EQ(" 13 ms  ", fmt::format("{:^{}.{}%Q %q}", dms(12.56), 8, 0));
-  EXPECT_EQ("  13 ms  ", fmt::format("{0:^{2}.{1}%Q %q}", dms(12.56), 0, 9));
-  EXPECT_EQ("==13 ms==", fmt::format("{:=^{}.{}%Q %q}", dms(12.56), 9, 0));
-  EXPECT_EQ("***13 ms***", fmt::format("{:*^11.0%Q %q}", dms(12.56)));
-}
-
-TEST(chrono_test, invalid_width_id) {
-  EXPECT_THROW((void)fmt::format(runtime("{:{o}"), std::chrono::seconds(0)),
-               fmt::format_error);
-}
-
-TEST(chrono_test, invalid_colons) {
-  EXPECT_THROW((void)fmt::format(runtime("{0}=:{0::"), std::chrono::seconds(0)),
-               fmt::format_error);
-}
-
-TEST(chrono_test, negative_durations) {
-  EXPECT_EQ("-12345", fmt::format("{:%Q}", std::chrono::seconds(-12345)));
-  EXPECT_EQ("-03:25:45",
-            fmt::format("{:%H:%M:%S}", std::chrono::seconds(-12345)));
-  EXPECT_EQ("-00:01",
-            fmt::format("{:%M:%S}", std::chrono::duration<double>(-1)));
-  EXPECT_EQ("s", fmt::format("{:%q}", std::chrono::seconds(-12345)));
-  EXPECT_EQ("-00.127",
-            fmt::format("{:%S}",
-                        std::chrono::duration<signed char, std::milli>{-127}));
-  auto min = std::numeric_limits<int>::min();
-  EXPECT_EQ(fmt::format("{}", min),
-            fmt::format("{:%Q}", std::chrono::duration<int>(min)));
-}
-
-TEST(chrono_test, special_durations) {
-  auto value = fmt::format("{:%S}", std::chrono::duration<double>(1e20));
-  EXPECT_EQ(value, "40");
-  auto nan = std::numeric_limits<double>::quiet_NaN();
-  EXPECT_EQ(
-      "nan nan nan nan nan:nan nan",
-      fmt::format("{:%I %H %M %S %R %r}", std::chrono::duration<double>(nan)));
-  EXPECT_EQ(fmt::format("{}", std::chrono::duration<float, std::exa>(1)),
-            "1Es");
-  EXPECT_EQ(fmt::format("{}", std::chrono::duration<float, std::atto>(1)),
-            "1as");
-  EXPECT_EQ(fmt::format("{:%R}", std::chrono::duration<char, std::mega>{2}),
-            "03:33");
-  EXPECT_EQ(fmt::format("{:%T}", std::chrono::duration<char, std::mega>{2}),
-            "03:33:20");
-}
-
-TEST(chrono_test, unsigned_duration) {
-  EXPECT_EQ("42s", fmt::format("{}", std::chrono::duration<unsigned>(42)));
-}
-
-TEST(chrono_test, weekday) {
-  auto loc = get_locale("ru_RU.UTF-8");
-  std::locale::global(loc);
-  auto mon = fmt::weekday(1);
-
-  auto tm = std::tm();
-  tm.tm_wday = static_cast<int>(mon.c_encoding());
-
-  EXPECT_EQ(fmt::format("{}", mon), "Mon");
-  EXPECT_EQ(fmt::format("{:%a}", tm), "Mon");
-
-  if (loc != std::locale::classic()) {
-    EXPECT_THAT((std::vector<std::string>{"пн", "Пн", "пнд", "Пнд"}),
-                Contains(fmt::format(loc, "{:L}", mon)));
-    EXPECT_THAT((std::vector<std::string>{"пн", "Пн", "пнд", "Пнд"}),
-                Contains(fmt::format(loc, "{:%a}", tm)));
-  }
-}
-
-TEST(chrono_test, cpp20_duration_subsecond_support) {
-  using attoseconds = std::chrono::duration<long long, std::atto>;
-  // Check that 18 digits of subsecond precision are supported.
-  EXPECT_EQ(fmt::format("{:%S}", attoseconds{999999999999999999}),
-            "00.999999999999999999");
-  EXPECT_EQ(fmt::format("{:%S}", attoseconds{673231113420148734}),
-            "00.673231113420148734");
-  EXPECT_EQ(fmt::format("{:%S}", attoseconds{-673231113420148734}),
-            "-00.673231113420148734");
-  EXPECT_EQ(fmt::format("{:%S}", std::chrono::nanoseconds{13420148734}),
-            "13.420148734");
-  EXPECT_EQ(fmt::format("{:%S}", std::chrono::nanoseconds{-13420148734}),
-            "-13.420148734");
-  EXPECT_EQ(fmt::format("{:%S}", std::chrono::milliseconds{1234}), "01.234");
-  {
-    // Check that {:%H:%M:%S} is equivalent to {:%T}.
-    auto dur = std::chrono::milliseconds{3601234};
-    auto formatted_dur = fmt::format("{:%T}", dur);
-    EXPECT_EQ(formatted_dur, "01:00:01.234");
-    EXPECT_EQ(fmt::format("{:%H:%M:%S}", dur), formatted_dur);
-  }
-  using nanoseconds_dbl = std::chrono::duration<double, std::nano>;
-  EXPECT_EQ(fmt::format("{:%S}", nanoseconds_dbl{-123456789}), "-00.123456789");
-  EXPECT_EQ(fmt::format("{:%S}", nanoseconds_dbl{9123456789}), "09.123456789");
-  // Verify that only the seconds part is extracted and printed.
-  EXPECT_EQ(fmt::format("{:%S}", nanoseconds_dbl{99123456789}), "39.123456789");
-  EXPECT_EQ(fmt::format("{:%S}", nanoseconds_dbl{99123000000}), "39.123000000");
-  {
-    // Now the hour is printed, and we also test if negative doubles work.
-    auto dur = nanoseconds_dbl{-99123456789};
-    auto formatted_dur = fmt::format("{:%T}", dur);
-    EXPECT_EQ(formatted_dur, "-00:01:39.123456789");
-    EXPECT_EQ(fmt::format("{:%H:%M:%S}", dur), formatted_dur);
-  }
-  // Check that durations with precision greater than std::chrono::seconds have
-  // fixed precision, and print zeros even if there is no fractional part.
-  EXPECT_EQ(fmt::format("{:%S}", std::chrono::microseconds{7000000}),
-            "07.000000");
-}
-
-#endif  // FMT_STATIC_THOUSANDS_SEPARATOR
diff --git a/contrib/libs/fmt/test/chrono-test/ya.make b/contrib/libs/fmt/test/chrono-test/ya.make
deleted file mode 100644
index c3f3bbd49e..0000000000
--- a/contrib/libs/fmt/test/chrono-test/ya.make
+++ /dev/null
@@ -1,31 +0,0 @@
-# Generated by devtools/yamaker.
-
-GTEST()
-
-WITHOUT_LICENSE_TEXTS()
-
-LICENSE(MIT)
-
-PEERDIR(
-    contrib/libs/fmt
-    contrib/libs/fmt/test
-)
-
-NO_COMPILER_WARNINGS()
-
-NO_UTIL()
-
-CFLAGS(
-    -DFMT_LOCALE
-    -DFMT_SHARED
-    -DGTEST_HAS_STD_WSTRING=1
-    -D_SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING=1
-)
-
-SRCDIR(contrib/libs/fmt/test)
-
-SRCS(
-    chrono-test.cc
-)
-
-END()
diff --git a/contrib/libs/fmt/test/color-test.cc b/contrib/libs/fmt/test/color-test.cc
deleted file mode 100644
index af8f149426..0000000000
--- a/contrib/libs/fmt/test/color-test.cc
+++ /dev/null
@@ -1,66 +0,0 @@
-// Formatting library for C++ - color tests
-//
-// Copyright (c) 2012 - present, Victor Zverovich
-// All rights reserved.
-//
-// For the license information refer to format.h.
-
-#include "fmt/color.h"
-
-#include <iterator>  // std::back_inserter
-
-#include "gtest-extra.h"  // EXPECT_WRITE
-
-TEST(color_test, format) {
-  EXPECT_EQ(fmt::format(fg(fmt::rgb(255, 20, 30)), "rgb(255,20,30)"),
-            "\x1b[38;2;255;020;030mrgb(255,20,30)\x1b[0m");
-  EXPECT_EQ(fmt::format(fg(fmt::color::blue), "blue"),
-            "\x1b[38;2;000;000;255mblue\x1b[0m");
-  EXPECT_EQ(
-      fmt::format(fg(fmt::color::blue) | bg(fmt::color::red), "two color"),
-      "\x1b[38;2;000;000;255m\x1b[48;2;255;000;000mtwo color\x1b[0m");
-  EXPECT_EQ(fmt::format(fmt::emphasis::bold, "bold"), "\x1b[1mbold\x1b[0m");
-  EXPECT_EQ(fmt::format(fmt::emphasis::faint, "faint"), "\x1b[2mfaint\x1b[0m");
-  EXPECT_EQ(fmt::format(fmt::emphasis::italic, "italic"),
-            "\x1b[3mitalic\x1b[0m");
-  EXPECT_EQ(fmt::format(fmt::emphasis::underline, "underline"),
-            "\x1b[4munderline\x1b[0m");
-  EXPECT_EQ(fmt::format(fmt::emphasis::blink, "blink"), "\x1b[5mblink\x1b[0m");
-  EXPECT_EQ(fmt::format(fmt::emphasis::reverse, "reverse"),
-            "\x1b[7mreverse\x1b[0m");
-  EXPECT_EQ(fmt::format(fmt::emphasis::conceal, "conceal"),
-            "\x1b[8mconceal\x1b[0m");
-  EXPECT_EQ(fmt::format(fmt::emphasis::strikethrough, "strikethrough"),
-            "\x1b[9mstrikethrough\x1b[0m");
-  EXPECT_EQ(
-      fmt::format(fg(fmt::color::blue) | fmt::emphasis::bold, "blue/bold"),
-      "\x1b[1m\x1b[38;2;000;000;255mblue/bold\x1b[0m");
-  EXPECT_EQ(fmt::format(fmt::emphasis::bold, "bold error"),
-            "\x1b[1mbold error\x1b[0m");
-  EXPECT_EQ(fmt::format(fg(fmt::color::blue), "blue log"),
-            "\x1b[38;2;000;000;255mblue log\x1b[0m");
-  EXPECT_EQ(fmt::format(fmt::text_style(), "hi"), "hi");
-  EXPECT_EQ(fmt::format(fg(fmt::terminal_color::red), "tred"),
-            "\x1b[31mtred\x1b[0m");
-  EXPECT_EQ(fmt::format(bg(fmt::terminal_color::cyan), "tcyan"),
-            "\x1b[46mtcyan\x1b[0m");
-  EXPECT_EQ(fmt::format(fg(fmt::terminal_color::bright_green), "tbgreen"),
-            "\x1b[92mtbgreen\x1b[0m");
-  EXPECT_EQ(fmt::format(bg(fmt::terminal_color::bright_magenta), "tbmagenta"),
-            "\x1b[105mtbmagenta\x1b[0m");
-  EXPECT_EQ(fmt::format(fg(fmt::terminal_color::red), "{}", "foo"),
-            "\x1b[31mfoo\x1b[0m");
-}
-
-TEST(color_test, format_to) {
-  auto out = std::string();
-  fmt::format_to(std::back_inserter(out), fg(fmt::rgb(255, 20, 30)),
-                 "rgb(255,20,30){}{}{}", 1, 2, 3);
-  EXPECT_EQ(fmt::to_string(out),
-            "\x1b[38;2;255;020;030mrgb(255,20,30)123\x1b[0m");
-}
-
-TEST(color_test, print) {
-  EXPECT_WRITE(stdout, fmt::print(fg(fmt::rgb(255, 20, 30)), "rgb(255,20,30)"),
-               "\x1b[38;2;255;020;030mrgb(255,20,30)\x1b[0m");
-}
diff --git a/contrib/libs/fmt/test/color-test/ya.make b/contrib/libs/fmt/test/color-test/ya.make
deleted file mode 100644
index d526cd77cb..0000000000
--- a/contrib/libs/fmt/test/color-test/ya.make
+++ /dev/null
@@ -1,31 +0,0 @@
-# Generated by devtools/yamaker.
-
-GTEST()
-
-WITHOUT_LICENSE_TEXTS()
-
-LICENSE(MIT)
-
-PEERDIR(
-    contrib/libs/fmt
-    contrib/libs/fmt/test
-)
-
-NO_COMPILER_WARNINGS()
-
-NO_UTIL()
-
-CFLAGS(
-    -DFMT_LOCALE
-    -DFMT_SHARED
-    -DGTEST_HAS_STD_WSTRING=1
-    -D_SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING=1
-)
-
-SRCDIR(contrib/libs/fmt/test)
-
-SRCS(
-    color-test.cc
-)
-
-END()
diff --git a/contrib/libs/fmt/test/compile-fp-test.cc b/contrib/libs/fmt/test/compile-fp-test.cc
deleted file mode 100644
index afedc26d06..0000000000
--- a/contrib/libs/fmt/test/compile-fp-test.cc
+++ /dev/null
@@ -1,62 +0,0 @@
-// Formatting library for C++ - formatting library tests
-//
-// Copyright (c) 2012 - present, Victor Zverovich
-// All rights reserved.
-//
-// For the license information refer to format.h.
-
-#include "fmt/compile.h"
-#include "gmock/gmock.h"
-
-#if defined(__cpp_lib_bit_cast) && __cpp_lib_bit_cast >= 201806 && \
-    defined(__cpp_constexpr) && __cpp_constexpr >= 201907 &&       \
-    defined(__cpp_constexpr_dynamic_alloc) &&                      \
-    __cpp_constexpr_dynamic_alloc >= 201907 && __cplusplus >= 202002L
-template <size_t max_string_length, typename Char = char> struct test_string {
-  template <typename T> constexpr bool operator==(const T& rhs) const noexcept {
-    return fmt::basic_string_view<Char>(rhs).compare(buffer) == 0;
-  }
-  Char buffer[max_string_length]{};
-};
-
-template <size_t max_string_length, typename Char = char, typename... Args>
-consteval auto test_format(auto format, const Args&... args) {
-  test_string<max_string_length, Char> string{};
-  fmt::format_to(string.buffer, format, args...);
-  return string;
-}
-
-TEST(compile_time_formatting_test, floating_point) {
-  EXPECT_EQ("0", test_format<2>(FMT_COMPILE("{}"), 0.0f));
-  EXPECT_EQ("392.500000", test_format<11>(FMT_COMPILE("{0:f}"), 392.5f));
-
-  EXPECT_EQ("0", test_format<2>(FMT_COMPILE("{:}"), 0.0));
-  EXPECT_EQ("0.000000", test_format<9>(FMT_COMPILE("{:f}"), 0.0));
-  EXPECT_EQ("0", test_format<2>(FMT_COMPILE("{:g}"), 0.0));
-  EXPECT_EQ("392.65", test_format<7>(FMT_COMPILE("{:}"), 392.65));
-  EXPECT_EQ("392.65", test_format<7>(FMT_COMPILE("{:g}"), 392.65));
-  EXPECT_EQ("392.65", test_format<7>(FMT_COMPILE("{:G}"), 392.65));
-  EXPECT_EQ("4.9014e+06", test_format<11>(FMT_COMPILE("{:g}"), 4.9014e6));
-  EXPECT_EQ("-392.650000", test_format<12>(FMT_COMPILE("{:f}"), -392.65));
-  EXPECT_EQ("-392.650000", test_format<12>(FMT_COMPILE("{:F}"), -392.65));
-
-  EXPECT_EQ("3.926500e+02", test_format<13>(FMT_COMPILE("{0:e}"), 392.65));
-  EXPECT_EQ("3.926500E+02", test_format<13>(FMT_COMPILE("{0:E}"), 392.65));
-  EXPECT_EQ("+0000392.6", test_format<11>(FMT_COMPILE("{0:+010.4g}"), 392.65));
-  EXPECT_EQ("9223372036854775808.000000",
-            test_format<27>(FMT_COMPILE("{:f}"), 9223372036854775807.0));
-
-  constexpr double nan = std::numeric_limits<double>::quiet_NaN();
-  EXPECT_EQ("nan", test_format<4>(FMT_COMPILE("{}"), nan));
-  EXPECT_EQ("+nan", test_format<5>(FMT_COMPILE("{:+}"), nan));
-  if (std::signbit(-nan))
-    EXPECT_EQ("-nan", test_format<5>(FMT_COMPILE("{}"), -nan));
-  else
-    fmt::print("Warning: compiler doesn't handle negative NaN correctly");
-
-  constexpr double inf = std::numeric_limits<double>::infinity();
-  EXPECT_EQ("inf", test_format<4>(FMT_COMPILE("{}"), inf));
-  EXPECT_EQ("+inf", test_format<5>(FMT_COMPILE("{:+}"), inf));
-  EXPECT_EQ("-inf", test_format<5>(FMT_COMPILE("{}"), -inf));
-}
-#endif
diff --git a/contrib/libs/fmt/test/compile-fp-test/ya.make b/contrib/libs/fmt/test/compile-fp-test/ya.make
deleted file mode 100644
index 35f77d31a5..0000000000
--- a/contrib/libs/fmt/test/compile-fp-test/ya.make
+++ /dev/null
@@ -1,32 +0,0 @@
-# Generated by devtools/yamaker.
-
-GTEST()
-
-WITHOUT_LICENSE_TEXTS()
-
-LICENSE(MIT)
-
-ADDINCL(
-    contrib/libs/fmt/include
-)
-
-NO_COMPILER_WARNINGS()
-
-NO_UTIL()
-
-CFLAGS(
-    -DFMT_HEADER_ONLY=1
-    -DGTEST_HAS_STD_WSTRING=1
-    -D_SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING=1
-)
-
-SRCDIR(contrib/libs/fmt)
-
-SRCS(
-    src/os.cc
-    test/compile-fp-test.cc
-    test/gtest-extra.cc
-    test/util.cc
-)
-
-END()
diff --git a/contrib/libs/fmt/test/compile-test.cc b/contrib/libs/fmt/test/compile-test.cc
deleted file mode 100644
index 1765961b89..0000000000
--- a/contrib/libs/fmt/test/compile-test.cc
+++ /dev/null
@@ -1,376 +0,0 @@
-// Formatting library for C++ - formatting library tests
-//
-// Copyright (c) 2012 - present, Victor Zverovich
-// All rights reserved.
-//
-// For the license information refer to format.h.
-
-#include "fmt/compile.h"
-
-#include <type_traits>
-
-#include "fmt/chrono.h"
-#include "gmock/gmock.h"
-#include "gtest-extra.h"
-
-TEST(iterator_test, counting_iterator) {
-  auto it = fmt::detail::counting_iterator();
-  auto prev = it++;
-  EXPECT_EQ(prev.count(), 0);
-  EXPECT_EQ(it.count(), 1);
-  EXPECT_EQ((it + 41).count(), 42);
-}
-
-TEST(iterator_test, truncating_iterator) {
-  char* p = nullptr;
-  auto it = fmt::detail::truncating_iterator<char*>(p, 3);
-  auto prev = it++;
-  EXPECT_EQ(prev.base(), p);
-  EXPECT_EQ(it.base(), p + 1);
-}
-
-TEST(iterator_test, truncating_iterator_default_construct) {
-  auto it = fmt::detail::truncating_iterator<char*>();
-  EXPECT_EQ(nullptr, it.base());
-  EXPECT_EQ(std::size_t{0}, it.count());
-}
-
-#ifdef __cpp_lib_ranges
-TEST(iterator_test, truncating_iterator_is_output_iterator) {
-  static_assert(
-      std::output_iterator<fmt::detail::truncating_iterator<char*>, char>);
-}
-#endif
-
-TEST(iterator_test, truncating_back_inserter) {
-  auto buffer = std::string();
-  auto bi = std::back_inserter(buffer);
-  auto it = fmt::detail::truncating_iterator<decltype(bi)>(bi, 2);
-  *it++ = '4';
-  *it++ = '2';
-  *it++ = '1';
-  EXPECT_EQ(buffer.size(), 2);
-  EXPECT_EQ(buffer, "42");
-}
-
-TEST(compile_test, compile_fallback) {
-  // FMT_COMPILE should fallback on runtime formatting when `if constexpr` is
-  // not available.
-  EXPECT_EQ("42", fmt::format(FMT_COMPILE("{}"), 42));
-}
-
-struct type_with_get {
-  template <int> friend void get(type_with_get);
-};
-
-FMT_BEGIN_NAMESPACE
-template <> struct formatter<type_with_get> : formatter<int> {
-  template <typename FormatContext>
-  auto format(type_with_get, FormatContext& ctx) -> decltype(ctx.out()) {
-    return formatter<int>::format(42, ctx);
-  }
-};
-FMT_END_NAMESPACE
-
-TEST(compile_test, compile_type_with_get) {
-  EXPECT_EQ("42", fmt::format(FMT_COMPILE("{}"), type_with_get()));
-}
-
-#if defined(__cpp_if_constexpr) && defined(__cpp_return_type_deduction)
-struct test_formattable {};
-
-FMT_BEGIN_NAMESPACE
-template <> struct formatter<test_formattable> : formatter<const char*> {
-  char word_spec = 'f';
-  constexpr auto parse(format_parse_context& ctx) {
-    auto it = ctx.begin(), end = ctx.end();
-    if (it == end || *it == '}') return it;
-    if (it != end && (*it == 'f' || *it == 'b')) word_spec = *it++;
-    if (it != end && *it != '}') throw format_error("invalid format");
-    return it;
-  }
-  template <typename FormatContext>
-  constexpr auto format(test_formattable, FormatContext& ctx) const
-      -> decltype(ctx.out()) {
-    return formatter<const char*>::format(word_spec == 'f' ? "foo" : "bar",
-                                          ctx);
-  }
-};
-FMT_END_NAMESPACE
-
-TEST(compile_test, format_default) {
-  EXPECT_EQ("42", fmt::format(FMT_COMPILE("{}"), 42));
-  EXPECT_EQ("42", fmt::format(FMT_COMPILE("{}"), 42u));
-  EXPECT_EQ("42", fmt::format(FMT_COMPILE("{}"), 42ll));
-  EXPECT_EQ("42", fmt::format(FMT_COMPILE("{}"), 42ull));
-  EXPECT_EQ("true", fmt::format(FMT_COMPILE("{}"), true));
-  EXPECT_EQ("x", fmt::format(FMT_COMPILE("{}"), 'x'));
-  EXPECT_EQ("4.2", fmt::format(FMT_COMPILE("{}"), 4.2));
-  EXPECT_EQ("foo", fmt::format(FMT_COMPILE("{}"), "foo"));
-  EXPECT_EQ("foo", fmt::format(FMT_COMPILE("{}"), std::string("foo")));
-  EXPECT_EQ("foo", fmt::format(FMT_COMPILE("{}"), test_formattable()));
-  auto t = std::chrono::system_clock::now();
-  EXPECT_EQ(fmt::format("{}", t), fmt::format(FMT_COMPILE("{}"), t));
-#  ifdef __cpp_lib_byte
-  EXPECT_EQ("42", fmt::format(FMT_COMPILE("{}"), std::byte{42}));
-#  endif
-}
-
-TEST(compile_test, format_wide_string) {
-  EXPECT_EQ(L"42", fmt::format(FMT_COMPILE(L"{}"), 42));
-}
-
-TEST(compile_test, format_specs) {
-  EXPECT_EQ("42", fmt::format(FMT_COMPILE("{:x}"), 0x42));
-  EXPECT_EQ("1.2 ms ",
-            fmt::format(FMT_COMPILE("{:7.1%Q %q}"),
-                        std::chrono::duration<double, std::milli>(1.234)));
-}
-
-TEST(compile_test, dynamic_format_specs) {
-  EXPECT_EQ("foo  ", fmt::format(FMT_COMPILE("{:{}}"), "foo", 5));
-  EXPECT_EQ("  3.14", fmt::format(FMT_COMPILE("{:{}.{}f}"), 3.141592, 6, 2));
-  EXPECT_EQ(
-      "=1.234ms=",
-      fmt::format(FMT_COMPILE("{:=^{}.{}}"),
-                  std::chrono::duration<double, std::milli>(1.234), 9, 3));
-}
-
-TEST(compile_test, manual_ordering) {
-  EXPECT_EQ("42", fmt::format(FMT_COMPILE("{0}"), 42));
-  EXPECT_EQ(" -42", fmt::format(FMT_COMPILE("{0:4}"), -42));
-  EXPECT_EQ("41 43", fmt::format(FMT_COMPILE("{0} {1}"), 41, 43));
-  EXPECT_EQ("41 43", fmt::format(FMT_COMPILE("{1} {0}"), 43, 41));
-  EXPECT_EQ("41 43", fmt::format(FMT_COMPILE("{0} {2}"), 41, 42, 43));
-  EXPECT_EQ("  41   43", fmt::format(FMT_COMPILE("{1:{2}} {0:4}"), 43, 41, 4));
-  EXPECT_EQ("42 1.2 ms ",
-            fmt::format(FMT_COMPILE("{0} {1:7.1%Q %q}"), 42,
-                        std::chrono::duration<double, std::milli>(1.234)));
-  EXPECT_EQ(
-      "true 42 42 foo 0x1234 foo",
-      fmt::format(FMT_COMPILE("{0} {1} {2} {3} {4} {5}"), true, 42, 42.0f,
-                  "foo", reinterpret_cast<void*>(0x1234), test_formattable()));
-  EXPECT_EQ(L"42", fmt::format(FMT_COMPILE(L"{0}"), 42));
-}
-
-TEST(compile_test, named) {
-  auto runtime_named_field_compiled =
-      fmt::detail::compile<decltype(fmt::arg("arg", 42))>(FMT_COMPILE("{arg}"));
-  static_assert(std::is_same_v<decltype(runtime_named_field_compiled),
-                               fmt::detail::runtime_named_field<char>>);
-
-  EXPECT_EQ("42", fmt::format(FMT_COMPILE("{}"), fmt::arg("arg", 42)));
-  EXPECT_EQ("41 43", fmt::format(FMT_COMPILE("{} {}"), fmt::arg("arg", 41),
-                                 fmt::arg("arg", 43)));
-
-  EXPECT_EQ("foobar",
-            fmt::format(FMT_COMPILE("{a0}{a1}"), fmt::arg("a0", "foo"),
-                        fmt::arg("a1", "bar")));
-  EXPECT_EQ("foobar", fmt::format(FMT_COMPILE("{}{a1}"), fmt::arg("a0", "foo"),
-                                  fmt::arg("a1", "bar")));
-  EXPECT_EQ("foofoo", fmt::format(FMT_COMPILE("{a0}{}"), fmt::arg("a0", "foo"),
-                                  fmt::arg("a1", "bar")));
-  EXPECT_EQ("foobar", fmt::format(FMT_COMPILE("{0}{a1}"), fmt::arg("a0", "foo"),
-                                  fmt::arg("a1", "bar")));
-  EXPECT_EQ("foobar", fmt::format(FMT_COMPILE("{a0}{1}"), fmt::arg("a0", "foo"),
-                                  fmt::arg("a1", "bar")));
-
-  EXPECT_EQ("foobar",
-            fmt::format(FMT_COMPILE("{}{a1}"), "foo", fmt::arg("a1", "bar")));
-  EXPECT_EQ("foobar",
-            fmt::format(FMT_COMPILE("{a0}{a1}"), fmt::arg("a1", "bar"),
-                        fmt::arg("a2", "baz"), fmt::arg("a0", "foo")));
-  EXPECT_EQ(" bar foo ",
-            fmt::format(FMT_COMPILE(" {foo} {bar} "), fmt::arg("foo", "bar"),
-                        fmt::arg("bar", "foo")));
-
-  EXPECT_THROW(fmt::format(FMT_COMPILE("{invalid}"), fmt::arg("valid", 42)),
-               fmt::format_error);
-
-#  if FMT_USE_NONTYPE_TEMPLATE_PARAMETERS
-  using namespace fmt::literals;
-  auto statically_named_field_compiled =
-      fmt::detail::compile<decltype("arg"_a = 42)>(FMT_COMPILE("{arg}"));
-  static_assert(std::is_same_v<decltype(statically_named_field_compiled),
-                               fmt::detail::field<char, int, 0>>);
-
-  EXPECT_EQ("41 43",
-            fmt::format(FMT_COMPILE("{a0} {a1}"), "a0"_a = 41, "a1"_a = 43));
-  EXPECT_EQ("41 43",
-            fmt::format(FMT_COMPILE("{a1} {a0}"), "a0"_a = 43, "a1"_a = 41));
-#  endif
-}
-
-TEST(compile_test, format_to) {
-  char buf[8];
-  auto end = fmt::format_to(buf, FMT_COMPILE("{}"), 42);
-  *end = '\0';
-  EXPECT_STREQ("42", buf);
-  end = fmt::format_to(buf, FMT_COMPILE("{:x}"), 42);
-  *end = '\0';
-  EXPECT_STREQ("2a", buf);
-}
-
-TEST(compile_test, format_to_n) {
-  constexpr auto buffer_size = 8;
-  char buffer[buffer_size];
-  auto res = fmt::format_to_n(buffer, buffer_size, FMT_COMPILE("{}"), 42);
-  *res.out = '\0';
-  EXPECT_STREQ("42", buffer);
-  res = fmt::format_to_n(buffer, buffer_size, FMT_COMPILE("{:x}"), 42);
-  *res.out = '\0';
-  EXPECT_STREQ("2a", buffer);
-}
-
-TEST(compile_test, formatted_size) {
-  EXPECT_EQ(2, fmt::formatted_size(FMT_COMPILE("{0}"), 42));
-  EXPECT_EQ(5, fmt::formatted_size(FMT_COMPILE("{0:<4.2f}"), 42.0));
-}
-
-TEST(compile_test, text_and_arg) {
-  EXPECT_EQ(">>>42<<<", fmt::format(FMT_COMPILE(">>>{}<<<"), 42));
-  EXPECT_EQ("42!", fmt::format(FMT_COMPILE("{}!"), 42));
-}
-
-TEST(compile_test, unknown_format_fallback) {
-  EXPECT_EQ(" 42 ",
-            fmt::format(FMT_COMPILE("{name:^4}"), fmt::arg("name", 42)));
-
-  std::vector<char> v;
-  fmt::format_to(std::back_inserter(v), FMT_COMPILE("{name:^4}"),
-                 fmt::arg("name", 42));
-  EXPECT_EQ(" 42 ", fmt::string_view(v.data(), v.size()));
-
-  char buffer[4];
-  auto result = fmt::format_to_n(buffer, 4, FMT_COMPILE("{name:^5}"),
-                                 fmt::arg("name", 42));
-  EXPECT_EQ(5u, result.size);
-  EXPECT_EQ(buffer + 4, result.out);
-  EXPECT_EQ(" 42 ", fmt::string_view(buffer, 4));
-}
-
-TEST(compile_test, empty) { EXPECT_EQ("", fmt::format(FMT_COMPILE(""))); }
-
-struct to_stringable {
-  friend fmt::string_view to_string_view(to_stringable) { return {}; }
-};
-
-FMT_BEGIN_NAMESPACE
-template <> struct formatter<to_stringable> {
-  auto parse(format_parse_context& ctx) const -> decltype(ctx.begin()) {
-    return ctx.begin();
-  }
-
-  template <typename FormatContext>
-  auto format(const to_stringable&, FormatContext& ctx) -> decltype(ctx.out()) {
-    return ctx.out();
-  }
-};
-FMT_END_NAMESPACE
-
-TEST(compile_test, to_string_and_formatter) {
-  fmt::format(FMT_COMPILE("{}"), to_stringable());
-}
-
-TEST(compile_test, print) {
-  EXPECT_WRITE(stdout, fmt::print(FMT_COMPILE("Don't {}!"), "panic"),
-               "Don't panic!");
-  EXPECT_WRITE(stderr, fmt::print(stderr, FMT_COMPILE("Don't {}!"), "panic"),
-               "Don't panic!");
-}
-#endif
-
-#if FMT_USE_NONTYPE_TEMPLATE_PARAMETERS
-TEST(compile_test, compile_format_string_literal) {
-  using namespace fmt::literals;
-  EXPECT_EQ("", fmt::format(""_cf));
-  EXPECT_EQ("42", fmt::format("{}"_cf, 42));
-  EXPECT_EQ(L"42", fmt::format(L"{}"_cf, 42));
-}
-#endif
-
-#if __cplusplus >= 202002L || \
-    (__cplusplus >= 201709L && FMT_GCC_VERSION >= 1002)
-template <size_t max_string_length, typename Char = char> struct test_string {
-  template <typename T> constexpr bool operator==(const T& rhs) const noexcept {
-    return fmt::basic_string_view<Char>(rhs).compare(buffer) == 0;
-  }
-  Char buffer[max_string_length]{};
-};
-
-template <size_t max_string_length, typename Char = char, typename... Args>
-consteval auto test_format(auto format, const Args&... args) {
-  test_string<max_string_length, Char> string{};
-  fmt::format_to(string.buffer, format, args...);
-  return string;
-}
-
-TEST(compile_time_formatting_test, bool) {
-  EXPECT_EQ("true", test_format<5>(FMT_COMPILE("{}"), true));
-  EXPECT_EQ("false", test_format<6>(FMT_COMPILE("{}"), false));
-  EXPECT_EQ("true ", test_format<6>(FMT_COMPILE("{:5}"), true));
-  EXPECT_EQ("1", test_format<2>(FMT_COMPILE("{:d}"), true));
-}
-
-TEST(compile_time_formatting_test, integer) {
-  EXPECT_EQ("42", test_format<3>(FMT_COMPILE("{}"), 42));
-  EXPECT_EQ("420", test_format<4>(FMT_COMPILE("{}"), 420));
-  EXPECT_EQ("42 42", test_format<6>(FMT_COMPILE("{} {}"), 42, 42));
-  EXPECT_EQ("42 42",
-            test_format<6>(FMT_COMPILE("{} {}"), uint32_t{42}, uint64_t{42}));
-
-  EXPECT_EQ("+42", test_format<4>(FMT_COMPILE("{:+}"), 42));
-  EXPECT_EQ("42", test_format<3>(FMT_COMPILE("{:-}"), 42));
-  EXPECT_EQ(" 42", test_format<4>(FMT_COMPILE("{: }"), 42));
-
-  EXPECT_EQ("-0042", test_format<6>(FMT_COMPILE("{:05}"), -42));
-
-  EXPECT_EQ("101010", test_format<7>(FMT_COMPILE("{:b}"), 42));
-  EXPECT_EQ("0b101010", test_format<9>(FMT_COMPILE("{:#b}"), 42));
-  EXPECT_EQ("0B101010", test_format<9>(FMT_COMPILE("{:#B}"), 42));
-  EXPECT_EQ("042", test_format<4>(FMT_COMPILE("{:#o}"), 042));
-  EXPECT_EQ("0x4a", test_format<5>(FMT_COMPILE("{:#x}"), 0x4a));
-  EXPECT_EQ("0X4A", test_format<5>(FMT_COMPILE("{:#X}"), 0x4a));
-
-  EXPECT_EQ("   42", test_format<6>(FMT_COMPILE("{:5}"), 42));
-  EXPECT_EQ("   42", test_format<6>(FMT_COMPILE("{:5}"), 42ll));
-  EXPECT_EQ("   42", test_format<6>(FMT_COMPILE("{:5}"), 42ull));
-
-  EXPECT_EQ("42  ", test_format<5>(FMT_COMPILE("{:<4}"), 42));
-  EXPECT_EQ("  42", test_format<5>(FMT_COMPILE("{:>4}"), 42));
-  EXPECT_EQ(" 42 ", test_format<5>(FMT_COMPILE("{:^4}"), 42));
-  EXPECT_EQ("**-42", test_format<6>(FMT_COMPILE("{:*>5}"), -42));
-}
-
-TEST(compile_time_formatting_test, char) {
-  EXPECT_EQ("c", test_format<2>(FMT_COMPILE("{}"), 'c'));
-
-  EXPECT_EQ("c  ", test_format<4>(FMT_COMPILE("{:3}"), 'c'));
-  EXPECT_EQ("99", test_format<3>(FMT_COMPILE("{:d}"), 'c'));
-}
-
-TEST(compile_time_formatting_test, string) {
-  EXPECT_EQ("42", test_format<3>(FMT_COMPILE("{}"), "42"));
-  EXPECT_EQ("The answer is 42",
-            test_format<17>(FMT_COMPILE("{} is {}"), "The answer", "42"));
-
-  EXPECT_EQ("abc**", test_format<6>(FMT_COMPILE("{:*<5}"), "abc"));
-  EXPECT_EQ("**🤡**", test_format<9>(FMT_COMPILE("{:*^6}"), "🤡"));
-}
-
-TEST(compile_time_formatting_test, combination) {
-  EXPECT_EQ("420, true, answer",
-            test_format<18>(FMT_COMPILE("{}, {}, {}"), 420, true, "answer"));
-
-  EXPECT_EQ(" -42", test_format<5>(FMT_COMPILE("{:{}}"), -42, 4));
-}
-
-TEST(compile_time_formatting_test, custom_type) {
-  EXPECT_EQ("foo", test_format<4>(FMT_COMPILE("{}"), test_formattable()));
-  EXPECT_EQ("bar", test_format<4>(FMT_COMPILE("{:b}"), test_formattable()));
-}
-
-TEST(compile_time_formatting_test, multibyte_fill) {
-  EXPECT_EQ("жж42", test_format<8>(FMT_COMPILE("{:ж>4}"), 42));
-}
-#endif
diff --git a/contrib/libs/fmt/test/compile-test/ya.make b/contrib/libs/fmt/test/compile-test/ya.make
deleted file mode 100644
index d75f41a908..0000000000
--- a/contrib/libs/fmt/test/compile-test/ya.make
+++ /dev/null
@@ -1,31 +0,0 @@
-# Generated by devtools/yamaker.
-
-GTEST()
-
-WITHOUT_LICENSE_TEXTS()
-
-LICENSE(MIT)
-
-PEERDIR(
-    contrib/libs/fmt
-    contrib/libs/fmt/test
-)
-
-NO_COMPILER_WARNINGS()
-
-NO_UTIL()
-
-CFLAGS(
-    -DFMT_LOCALE
-    -DFMT_SHARED
-    -DGTEST_HAS_STD_WSTRING=1
-    -D_SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING=1
-)
-
-SRCDIR(contrib/libs/fmt/test)
-
-SRCS(
-    compile-test.cc
-)
-
-END()
diff --git a/contrib/libs/fmt/test/core-test.cc b/contrib/libs/fmt/test/core-test.cc
deleted file mode 100644
index b2f2097ea1..0000000000
--- a/contrib/libs/fmt/test/core-test.cc
+++ /dev/null
@@ -1,923 +0,0 @@
-// Formatting library for C++ - core tests
-//
-// Copyright (c) 2012 - present, Victor Zverovich
-// All rights reserved.
-//
-// For the license information refer to format.h.
-
-// clang-format off
-#include "test-assert.h"
-// clang-format on
-
-#include "fmt/core.h"
-
-#include <algorithm>    // std::copy_n
-#include <climits>      // INT_MAX
-#include <cstring>      // std::strlen
-#include <functional>   // std::equal_to
-#include <iterator>     // std::back_insert_iterator
-#include <limits>       // std::numeric_limits
-#include <string>       // std::string
-#include <type_traits>  // std::is_same
-
-#include "gmock/gmock.h"
-
-using fmt::string_view;
-using fmt::detail::buffer;
-
-using testing::_;
-using testing::Invoke;
-using testing::Return;
-
-#ifdef FMT_FORMAT_H_
-#  error core-test includes format.h
-#endif
-
-TEST(string_view_test, value_type) {
-  static_assert(std::is_same<string_view::value_type, char>::value, "");
-}
-
-TEST(string_view_test, ctor) {
-  EXPECT_STREQ("abc", fmt::string_view("abc").data());
-  EXPECT_EQ(3u, fmt::string_view("abc").size());
-
-  EXPECT_STREQ("defg", fmt::string_view(std::string("defg")).data());
-  EXPECT_EQ(4u, fmt::string_view(std::string("defg")).size());
-}
-
-TEST(string_view_test, length) {
-  // Test that string_view::size() returns string length, not buffer size.
-  char str[100] = "some string";
-  EXPECT_EQ(std::strlen(str), string_view(str).size());
-  EXPECT_LT(std::strlen(str), sizeof(str));
-}
-
-// Check string_view's comparison operator.
-template <template <typename> class Op> void check_op() {
-  const char* inputs[] = {"foo", "fop", "fo"};
-  size_t num_inputs = sizeof(inputs) / sizeof(*inputs);
-  for (size_t i = 0; i < num_inputs; ++i) {
-    for (size_t j = 0; j < num_inputs; ++j) {
-      string_view lhs(inputs[i]), rhs(inputs[j]);
-      EXPECT_EQ(Op<int>()(lhs.compare(rhs), 0), Op<string_view>()(lhs, rhs));
-    }
-  }
-}
-
-TEST(string_view_test, compare) {
-  EXPECT_EQ(string_view("foo").compare(string_view("foo")), 0);
-  EXPECT_GT(string_view("fop").compare(string_view("foo")), 0);
-  EXPECT_LT(string_view("foo").compare(string_view("fop")), 0);
-  EXPECT_GT(string_view("foo").compare(string_view("fo")), 0);
-  EXPECT_LT(string_view("fo").compare(string_view("foo")), 0);
-  check_op<std::equal_to>();
-  check_op<std::not_equal_to>();
-  check_op<std::less>();
-  check_op<std::less_equal>();
-  check_op<std::greater>();
-  check_op<std::greater_equal>();
-}
-
-namespace test_ns {
-template <typename Char> class test_string {
- private:
-  std::basic_string<Char> s_;
-
- public:
-  test_string(const Char* s) : s_(s) {}
-  const Char* data() const { return s_.data(); }
-  size_t length() const { return s_.size(); }
-  operator const Char*() const { return s_.c_str(); }
-};
-
-template <typename Char>
-fmt::basic_string_view<Char> to_string_view(const test_string<Char>& s) {
-  return {s.data(), s.length()};
-}
-}  // namespace test_ns
-
-TEST(core_test, is_output_iterator) {
-  EXPECT_TRUE((fmt::detail::is_output_iterator<char*, char>::value));
-  EXPECT_FALSE((fmt::detail::is_output_iterator<const char*, char>::value));
-  EXPECT_FALSE((fmt::detail::is_output_iterator<std::string, char>::value));
-  EXPECT_TRUE(
-      (fmt::detail::is_output_iterator<std::back_insert_iterator<std::string>,
-                                       char>::value));
-  EXPECT_TRUE(
-      (fmt::detail::is_output_iterator<std::string::iterator, char>::value));
-  EXPECT_FALSE((fmt::detail::is_output_iterator<std::string::const_iterator,
-                                                char>::value));
-}
-
-TEST(core_test, buffer_appender) {
-  // back_insert_iterator is not default-constructible before C++20, so
-  // buffer_appender can only be default-constructible when back_insert_iterator
-  // is.
-  static_assert(
-      std::is_default_constructible<
-          std::back_insert_iterator<fmt::detail::buffer<char>>>::value ==
-          std::is_default_constructible<
-              fmt::detail::buffer_appender<char>>::value,
-      "");
-
-#ifdef __cpp_lib_ranges
-  static_assert(std::output_iterator<fmt::detail::buffer_appender<char>, char>);
-#endif
-}
-
-#if !FMT_GCC_VERSION || FMT_GCC_VERSION >= 470
-TEST(buffer_test, noncopyable) {
-  EXPECT_FALSE(std::is_copy_constructible<buffer<char>>::value);
-#  if !FMT_MSC_VER
-  // std::is_copy_assignable is broken in MSVC2013.
-  EXPECT_FALSE(std::is_copy_assignable<buffer<char>>::value);
-#  endif
-}
-
-TEST(buffer_test, nonmoveable) {
-  EXPECT_FALSE(std::is_move_constructible<buffer<char>>::value);
-#  if !FMT_MSC_VER
-  // std::is_move_assignable is broken in MSVC2013.
-  EXPECT_FALSE(std::is_move_assignable<buffer<char>>::value);
-#  endif
-}
-#endif
-
-TEST(buffer_test, indestructible) {
-  static_assert(!std::is_destructible<fmt::detail::buffer<int>>(),
-                "buffer's destructor is protected");
-}
-
-template <typename T> struct mock_buffer final : buffer<T> {
-  MOCK_METHOD1(do_grow, size_t(size_t capacity));
-
-  void grow(size_t capacity) override {
-    this->set(this->data(), do_grow(capacity));
-  }
-
-  mock_buffer(T* data = nullptr, size_t buf_capacity = 0) {
-    this->set(data, buf_capacity);
-    ON_CALL(*this, do_grow(_)).WillByDefault(Invoke([](size_t capacity) {
-      return capacity;
-    }));
-  }
-};
-
-TEST(buffer_test, ctor) {
-  {
-    mock_buffer<int> buffer;
-    EXPECT_EQ(nullptr, buffer.data());
-    EXPECT_EQ(static_cast<size_t>(0), buffer.size());
-    EXPECT_EQ(static_cast<size_t>(0), buffer.capacity());
-  }
-  {
-    int dummy;
-    mock_buffer<int> buffer(&dummy);
-    EXPECT_EQ(&dummy, &buffer[0]);
-    EXPECT_EQ(static_cast<size_t>(0), buffer.size());
-    EXPECT_EQ(static_cast<size_t>(0), buffer.capacity());
-  }
-  {
-    int dummy;
-    size_t capacity = std::numeric_limits<size_t>::max();
-    mock_buffer<int> buffer(&dummy, capacity);
-    EXPECT_EQ(&dummy, &buffer[0]);
-    EXPECT_EQ(static_cast<size_t>(0), buffer.size());
-    EXPECT_EQ(capacity, buffer.capacity());
-  }
-}
-
-TEST(buffer_test, access) {
-  char data[10];
-  mock_buffer<char> buffer(data, sizeof(data));
-  buffer[0] = 11;
-  EXPECT_EQ(11, buffer[0]);
-  buffer[3] = 42;
-  EXPECT_EQ(42, *(&buffer[0] + 3));
-  const fmt::detail::buffer<char>& const_buffer = buffer;
-  EXPECT_EQ(42, const_buffer[3]);
-}
-
-TEST(buffer_test, try_resize) {
-  char data[123];
-  mock_buffer<char> buffer(data, sizeof(data));
-  buffer[10] = 42;
-  EXPECT_EQ(42, buffer[10]);
-  buffer.try_resize(20);
-  EXPECT_EQ(20u, buffer.size());
-  EXPECT_EQ(123u, buffer.capacity());
-  EXPECT_EQ(42, buffer[10]);
-  buffer.try_resize(5);
-  EXPECT_EQ(5u, buffer.size());
-  EXPECT_EQ(123u, buffer.capacity());
-  EXPECT_EQ(42, buffer[10]);
-  // Check if try_resize calls grow.
-  EXPECT_CALL(buffer, do_grow(124));
-  buffer.try_resize(124);
-  EXPECT_CALL(buffer, do_grow(200));
-  buffer.try_resize(200);
-}
-
-TEST(buffer_test, try_resize_partial) {
-  char data[10];
-  mock_buffer<char> buffer(data, sizeof(data));
-  EXPECT_CALL(buffer, do_grow(20)).WillOnce(Return(15));
-  buffer.try_resize(20);
-  EXPECT_EQ(buffer.capacity(), 15);
-  EXPECT_EQ(buffer.size(), 15);
-}
-
-TEST(buffer_test, clear) {
-  mock_buffer<char> buffer;
-  EXPECT_CALL(buffer, do_grow(20));
-  buffer.try_resize(20);
-  buffer.try_resize(0);
-  EXPECT_EQ(static_cast<size_t>(0), buffer.size());
-  EXPECT_EQ(20u, buffer.capacity());
-}
-
-TEST(buffer_test, append) {
-  char data[15];
-  mock_buffer<char> buffer(data, 10);
-  auto test = "test";
-  buffer.append(test, test + 5);
-  EXPECT_STREQ(test, &buffer[0]);
-  EXPECT_EQ(5u, buffer.size());
-  buffer.try_resize(10);
-  EXPECT_CALL(buffer, do_grow(12));
-  buffer.append(test, test + 2);
-  EXPECT_EQ('t', buffer[10]);
-  EXPECT_EQ('e', buffer[11]);
-  EXPECT_EQ(12u, buffer.size());
-}
-
-TEST(buffer_test, append_partial) {
-  char data[10];
-  mock_buffer<char> buffer(data, sizeof(data));
-  testing::InSequence seq;
-  EXPECT_CALL(buffer, do_grow(15)).WillOnce(Return(10));
-  EXPECT_CALL(buffer, do_grow(15)).WillOnce(Invoke([&buffer](size_t) {
-    EXPECT_EQ(fmt::string_view(buffer.data(), buffer.size()), "0123456789");
-    buffer.clear();
-    return 10;
-  }));
-  auto test = "0123456789abcde";
-  buffer.append(test, test + 15);
-}
-
-TEST(buffer_test, append_allocates_enough_storage) {
-  char data[19];
-  mock_buffer<char> buffer(data, 10);
-  auto test = "abcdefgh";
-  buffer.try_resize(10);
-  EXPECT_CALL(buffer, do_grow(19));
-  buffer.append(test, test + 9);
-}
-
-struct custom_context {
-  using char_type = char;
-  using parse_context_type = fmt::format_parse_context;
-
-  bool called = false;
-
-  template <typename T> struct formatter_type {
-    auto parse(fmt::format_parse_context& ctx) -> decltype(ctx.begin()) {
-      return ctx.begin();
-    }
-
-    const char* format(const T&, custom_context& ctx) {
-      ctx.called = true;
-      return nullptr;
-    }
-  };
-
-  void advance_to(const char*) {}
-};
-
-struct test_struct {};
-
-FMT_BEGIN_NAMESPACE
-template <typename Char> struct formatter<test_struct, Char> {
-  auto parse(format_parse_context& ctx) -> decltype(ctx.begin()) {
-    return ctx.begin();
-  }
-
-  auto format(test_struct, format_context& ctx) -> decltype(ctx.out()) {
-    auto test = string_view("test");
-    return std::copy_n(test.data(), test.size(), ctx.out());
-  }
-};
-FMT_END_NAMESPACE
-
-TEST(arg_test, format_args) {
-  auto args = fmt::format_args();
-  EXPECT_FALSE(args.get(1));
-}
-
-TEST(arg_test, make_value_with_custom_context) {
-  auto t = test_struct();
-  fmt::detail::value<custom_context> arg(
-      fmt::detail::arg_mapper<custom_context>().map(t));
-  auto ctx = custom_context();
-  auto parse_ctx = fmt::format_parse_context("");
-  arg.custom.format(&t, parse_ctx, ctx);
-  EXPECT_TRUE(ctx.called);
-}
-
-// Use a unique result type to make sure that there are no undesirable
-// conversions.
-struct test_result {};
-
-template <typename T> struct mock_visitor {
-  template <typename U> struct result { using type = test_result; };
-
-  mock_visitor() {
-    ON_CALL(*this, visit(_)).WillByDefault(Return(test_result()));
-  }
-
-  MOCK_METHOD1_T(visit, test_result(T value));
-  MOCK_METHOD0_T(unexpected, void());
-
-  test_result operator()(T value) { return visit(value); }
-
-  template <typename U> test_result operator()(U) {
-    unexpected();
-    return test_result();
-  }
-};
-
-template <typename T> struct visit_type { using type = T; };
-
-#define VISIT_TYPE(type_, visit_type_) \
-  template <> struct visit_type<type_> { using type = visit_type_; }
-
-VISIT_TYPE(signed char, int);
-VISIT_TYPE(unsigned char, unsigned);
-VISIT_TYPE(short, int);
-VISIT_TYPE(unsigned short, unsigned);
-
-#if LONG_MAX == INT_MAX
-VISIT_TYPE(long, int);
-VISIT_TYPE(unsigned long, unsigned);
-#else
-VISIT_TYPE(long, long long);
-VISIT_TYPE(unsigned long, unsigned long long);
-#endif
-
-#define CHECK_ARG(Char, expected, value)                                  \
-  {                                                                       \
-    testing::StrictMock<mock_visitor<decltype(expected)>> visitor;        \
-    EXPECT_CALL(visitor, visit(expected));                                \
-    using iterator = std::back_insert_iterator<buffer<Char>>;             \
-    fmt::visit_format_arg(                                                \
-        visitor,                                                          \
-        fmt::detail::make_arg<fmt::basic_format_context<iterator, Char>>( \
-            value));                                                      \
-  }
-
-#define CHECK_ARG_SIMPLE(value)                             \
-  {                                                         \
-    using value_type = decltype(value);                     \
-    typename visit_type<value_type>::type expected = value; \
-    CHECK_ARG(char, expected, value)                        \
-    CHECK_ARG(wchar_t, expected, value)                     \
-  }
-
-template <typename T> class numeric_arg_test : public testing::Test {};
-
-using types =
-    testing::Types<bool, signed char, unsigned char, short, unsigned short, int,
-                   unsigned, long, unsigned long, long long, unsigned long long,
-                   float, double, long double>;
-TYPED_TEST_SUITE(numeric_arg_test, types);
-
-template <typename T, fmt::enable_if_t<std::is_integral<T>::value, int> = 0>
-T test_value() {
-  return static_cast<T>(42);
-}
-
-template <typename T,
-          fmt::enable_if_t<std::is_floating_point<T>::value, int> = 0>
-T test_value() {
-  return static_cast<T>(4.2);
-}
-
-TYPED_TEST(numeric_arg_test, make_and_visit) {
-  CHECK_ARG_SIMPLE(test_value<TypeParam>());
-  CHECK_ARG_SIMPLE(std::numeric_limits<TypeParam>::min());
-  CHECK_ARG_SIMPLE(std::numeric_limits<TypeParam>::max());
-}
-
-TEST(arg_test, char_arg) { CHECK_ARG(char, 'a', 'a'); }
-
-TEST(arg_test, string_arg) {
-  char str_data[] = "test";
-  char* str = str_data;
-  const char* cstr = str;
-  CHECK_ARG(char, cstr, str);
-
-  auto sv = fmt::string_view(str);
-  CHECK_ARG(char, sv, std::string(str));
-}
-
-TEST(arg_test, wstring_arg) {
-  wchar_t str_data[] = L"test";
-  wchar_t* str = str_data;
-  const wchar_t* cstr = str;
-
-  auto sv = fmt::basic_string_view<wchar_t>(str);
-  CHECK_ARG(wchar_t, cstr, str);
-  CHECK_ARG(wchar_t, cstr, cstr);
-  CHECK_ARG(wchar_t, sv, std::wstring(str));
-  CHECK_ARG(wchar_t, sv, fmt::basic_string_view<wchar_t>(str));
-}
-
-TEST(arg_test, pointer_arg) {
-  void* p = nullptr;
-  const void* cp = nullptr;
-  CHECK_ARG(char, cp, p);
-  CHECK_ARG(wchar_t, cp, p);
-  CHECK_ARG_SIMPLE(cp);
-}
-
-struct check_custom {
-  test_result operator()(
-      fmt::basic_format_arg<fmt::format_context>::handle h) const {
-    struct test_buffer final : fmt::detail::buffer<char> {
-      char data[10];
-      test_buffer() : fmt::detail::buffer<char>(data, 0, 10) {}
-      void grow(size_t) override {}
-    } buffer;
-    auto parse_ctx = fmt::format_parse_context("");
-    auto ctx = fmt::format_context(fmt::detail::buffer_appender<char>(buffer),
-                                   fmt::format_args());
-    h.format(parse_ctx, ctx);
-    EXPECT_EQ("test", std::string(buffer.data, buffer.size()));
-    return test_result();
-  }
-};
-
-TEST(arg_test, custom_arg) {
-  auto test = test_struct();
-  using visitor =
-      mock_visitor<fmt::basic_format_arg<fmt::format_context>::handle>;
-  testing::StrictMock<visitor> v;
-  EXPECT_CALL(v, visit(_)).WillOnce(Invoke(check_custom()));
-  fmt::visit_format_arg(v, fmt::detail::make_arg<fmt::format_context>(test));
-}
-
-TEST(arg_test, visit_invalid_arg) {
-  testing::StrictMock<mock_visitor<fmt::monostate>> visitor;
-  EXPECT_CALL(visitor, visit(_));
-  auto arg = fmt::basic_format_arg<fmt::format_context>();
-  fmt::visit_format_arg(visitor, arg);
-}
-
-#if FMT_USE_CONSTEXPR
-
-enum class arg_id_result { none, empty, index, name, error };
-struct test_arg_id_handler {
-  arg_id_result res = arg_id_result::none;
-  int index = 0;
-  string_view name;
-
-  constexpr void operator()() { res = arg_id_result::empty; }
-
-  constexpr void operator()(int i) {
-    res = arg_id_result::index;
-    index = i;
-  }
-
-  constexpr void operator()(string_view n) {
-    res = arg_id_result::name;
-    name = n;
-  }
-
-  constexpr void on_error(const char*) { res = arg_id_result::error; }
-};
-
-template <size_t N>
-constexpr test_arg_id_handler parse_arg_id(const char (&s)[N]) {
-  test_arg_id_handler h;
-  fmt::detail::parse_arg_id(s, s + N, h);
-  return h;
-}
-
-TEST(format_test, constexpr_parse_arg_id) {
-  static_assert(parse_arg_id(":").res == arg_id_result::empty, "");
-  static_assert(parse_arg_id("}").res == arg_id_result::empty, "");
-  static_assert(parse_arg_id("42:").res == arg_id_result::index, "");
-  static_assert(parse_arg_id("42:").index == 42, "");
-  static_assert(parse_arg_id("foo:").res == arg_id_result::name, "");
-  static_assert(parse_arg_id("foo:").name.size() == 3, "");
-  static_assert(parse_arg_id("!").res == arg_id_result::error, "");
-}
-
-struct test_format_specs_handler {
-  enum result { none, hash, zero, loc, error };
-  result res = none;
-
-  fmt::align_t alignment = fmt::align::none;
-  fmt::sign_t sign = fmt::sign::none;
-  char fill = 0;
-  int width = 0;
-  fmt::detail::arg_ref<char> width_ref;
-  int precision = 0;
-  fmt::detail::arg_ref<char> precision_ref;
-  fmt::presentation_type type = fmt::presentation_type::none;
-
-  // Workaround for MSVC2017 bug that results in "expression did not evaluate
-  // to a constant" with compiler-generated copy ctor.
-  constexpr test_format_specs_handler() {}
-  constexpr test_format_specs_handler(const test_format_specs_handler& other) =
-      default;
-
-  constexpr void on_align(fmt::align_t a) { alignment = a; }
-  constexpr void on_fill(fmt::string_view f) { fill = f[0]; }
-  constexpr void on_sign(fmt::sign_t s) { sign = s; }
-  constexpr void on_hash() { res = hash; }
-  constexpr void on_zero() { res = zero; }
-  constexpr void on_localized() { res = loc; }
-
-  constexpr void on_width(int w) { width = w; }
-  constexpr void on_dynamic_width(fmt::detail::auto_id) {}
-  constexpr void on_dynamic_width(int index) { width_ref = index; }
-  constexpr void on_dynamic_width(string_view) {}
-
-  constexpr void on_precision(int p) { precision = p; }
-  constexpr void on_dynamic_precision(fmt::detail::auto_id) {}
-  constexpr void on_dynamic_precision(int index) { precision_ref = index; }
-  constexpr void on_dynamic_precision(string_view) {}
-
-  constexpr void end_precision() {}
-  constexpr void on_type(fmt::presentation_type t) { type = t; }
-  constexpr void on_error(const char*) { res = error; }
-};
-
-template <size_t N>
-constexpr test_format_specs_handler parse_test_specs(const char (&s)[N]) {
-  auto h = test_format_specs_handler();
-  fmt::detail::parse_format_specs(s, s + N - 1, h);
-  return h;
-}
-
-TEST(core_test, constexpr_parse_format_specs) {
-  using handler = test_format_specs_handler;
-  static_assert(parse_test_specs("<").alignment == fmt::align::left, "");
-  static_assert(parse_test_specs("*^").fill == '*', "");
-  static_assert(parse_test_specs("+").sign == fmt::sign::plus, "");
-  static_assert(parse_test_specs("-").sign == fmt::sign::minus, "");
-  static_assert(parse_test_specs(" ").sign == fmt::sign::space, "");
-  static_assert(parse_test_specs("#").res == handler::hash, "");
-  static_assert(parse_test_specs("0").res == handler::zero, "");
-  static_assert(parse_test_specs("L").res == handler::loc, "");
-  static_assert(parse_test_specs("42").width == 42, "");
-  static_assert(parse_test_specs("{42}").width_ref.val.index == 42, "");
-  static_assert(parse_test_specs(".42").precision == 42, "");
-  static_assert(parse_test_specs(".{42}").precision_ref.val.index == 42, "");
-  static_assert(parse_test_specs("d").type == fmt::presentation_type::dec, "");
-  static_assert(parse_test_specs("{<").res == handler::error, "");
-}
-
-struct test_parse_context {
-  using char_type = char;
-
-  constexpr int next_arg_id() { return 11; }
-  template <typename Id> FMT_CONSTEXPR void check_arg_id(Id) {}
-
-  constexpr const char* begin() { return nullptr; }
-  constexpr const char* end() { return nullptr; }
-
-  void on_error(const char*) {}
-};
-
-template <size_t N>
-constexpr fmt::detail::dynamic_format_specs<char> parse_dynamic_specs(
-    const char (&s)[N]) {
-  auto specs = fmt::detail::dynamic_format_specs<char>();
-  auto ctx = test_parse_context();
-  auto h = fmt::detail::dynamic_specs_handler<test_parse_context>(specs, ctx);
-  parse_format_specs(s, s + N - 1, h);
-  return specs;
-}
-
-TEST(format_test, constexpr_dynamic_specs_handler) {
-  static_assert(parse_dynamic_specs("<").align == fmt::align::left, "");
-  static_assert(parse_dynamic_specs("*^").fill[0] == '*', "");
-  static_assert(parse_dynamic_specs("+").sign == fmt::sign::plus, "");
-  static_assert(parse_dynamic_specs("-").sign == fmt::sign::minus, "");
-  static_assert(parse_dynamic_specs(" ").sign == fmt::sign::space, "");
-  static_assert(parse_dynamic_specs("#").alt, "");
-  static_assert(parse_dynamic_specs("0").align == fmt::align::numeric, "");
-  static_assert(parse_dynamic_specs("42").width == 42, "");
-  static_assert(parse_dynamic_specs("{}").width_ref.val.index == 11, "");
-  static_assert(parse_dynamic_specs("{42}").width_ref.val.index == 42, "");
-  static_assert(parse_dynamic_specs(".42").precision == 42, "");
-  static_assert(parse_dynamic_specs(".{}").precision_ref.val.index == 11, "");
-  static_assert(parse_dynamic_specs(".{42}").precision_ref.val.index == 42, "");
-  static_assert(parse_dynamic_specs("d").type == fmt::presentation_type::dec,
-                "");
-}
-
-template <size_t N>
-constexpr test_format_specs_handler check_specs(const char (&s)[N]) {
-  fmt::detail::specs_checker<test_format_specs_handler> checker(
-      test_format_specs_handler(), fmt::detail::type::double_type);
-  parse_format_specs(s, s + N - 1, checker);
-  return checker;
-}
-
-TEST(format_test, constexpr_specs_checker) {
-  using handler = test_format_specs_handler;
-  static_assert(check_specs("<").alignment == fmt::align::left, "");
-  static_assert(check_specs("*^").fill == '*', "");
-  static_assert(check_specs("+").sign == fmt::sign::plus, "");
-  static_assert(check_specs("-").sign == fmt::sign::minus, "");
-  static_assert(check_specs(" ").sign == fmt::sign::space, "");
-  static_assert(check_specs("#").res == handler::hash, "");
-  static_assert(check_specs("0").res == handler::zero, "");
-  static_assert(check_specs("42").width == 42, "");
-  static_assert(check_specs("{42}").width_ref.val.index == 42, "");
-  static_assert(check_specs(".42").precision == 42, "");
-  static_assert(check_specs(".{42}").precision_ref.val.index == 42, "");
-  static_assert(check_specs("d").type == fmt::presentation_type::dec, "");
-  static_assert(check_specs("{<").res == handler::error, "");
-}
-
-struct test_format_string_handler {
-  constexpr void on_text(const char*, const char*) {}
-
-  constexpr int on_arg_id() { return 0; }
-
-  template <typename T> constexpr int on_arg_id(T) { return 0; }
-
-  constexpr void on_replacement_field(int, const char*) {}
-
-  constexpr const char* on_format_specs(int, const char* begin, const char*) {
-    return begin;
-  }
-
-  constexpr void on_error(const char*) { error = true; }
-
-  bool error = false;
-};
-
-template <size_t N> constexpr bool parse_string(const char (&s)[N]) {
-  auto h = test_format_string_handler();
-  fmt::detail::parse_format_string<true>(fmt::string_view(s, N - 1), h);
-  return !h.error;
-}
-
-TEST(format_test, constexpr_parse_format_string) {
-  static_assert(parse_string("foo"), "");
-  static_assert(!parse_string("}"), "");
-  static_assert(parse_string("{}"), "");
-  static_assert(parse_string("{42}"), "");
-  static_assert(parse_string("{foo}"), "");
-  static_assert(parse_string("{:}"), "");
-}
-#endif  // FMT_USE_CONSTEXPR
-
-struct enabled_formatter {};
-struct disabled_formatter {};
-struct disabled_formatter_convertible {
-  operator int() const { return 42; }
-};
-
-FMT_BEGIN_NAMESPACE
-template <> struct formatter<enabled_formatter> {
-  auto parse(format_parse_context& ctx) -> decltype(ctx.begin()) {
-    return ctx.begin();
-  }
-  auto format(enabled_formatter, format_context& ctx) -> decltype(ctx.out()) {
-    return ctx.out();
-  }
-};
-FMT_END_NAMESPACE
-
-TEST(core_test, has_formatter) {
-  using fmt::has_formatter;
-  using context = fmt::format_context;
-  static_assert(has_formatter<enabled_formatter, context>::value, "");
-  static_assert(!has_formatter<disabled_formatter, context>::value, "");
-  static_assert(!has_formatter<disabled_formatter_convertible, context>::value,
-                "");
-}
-
-struct const_formattable {};
-struct nonconst_formattable {};
-
-FMT_BEGIN_NAMESPACE
-template <> struct formatter<const_formattable> {
-  auto parse(format_parse_context& ctx) -> decltype(ctx.begin()) {
-    return ctx.begin();
-  }
-
-  auto format(const const_formattable&, format_context& ctx)
-      -> decltype(ctx.out()) {
-    auto test = string_view("test");
-    return std::copy_n(test.data(), test.size(), ctx.out());
-  }
-};
-
-template <> struct formatter<nonconst_formattable> {
-  auto parse(format_parse_context& ctx) -> decltype(ctx.begin()) {
-    return ctx.begin();
-  }
-
-  auto format(nonconst_formattable&, format_context& ctx)
-      -> decltype(ctx.out()) {
-    auto test = string_view("test");
-    return std::copy_n(test.data(), test.size(), ctx.out());
-  }
-};
-FMT_END_NAMESPACE
-
-struct convertible_to_pointer {
-  operator const int*() const { return nullptr; }
-};
-
-enum class test_scoped_enum {};
-
-TEST(core_test, is_formattable) {
-#if 0
-  // This should be enabled once corresponding map overloads are gone.
-  static_assert(fmt::is_formattable<signed char*>::value, "");
-  static_assert(fmt::is_formattable<unsigned char*>::value, "");
-  static_assert(fmt::is_formattable<const signed char*>::value, "");
-  static_assert(fmt::is_formattable<const unsigned char*>::value, "");
-#endif
-  static_assert(!fmt::is_formattable<wchar_t>::value, "");
-#ifdef __cpp_char8_t
-  static_assert(!fmt::is_formattable<char8_t>::value, "");
-#endif
-  static_assert(!fmt::is_formattable<char16_t>::value, "");
-  static_assert(!fmt::is_formattable<char32_t>::value, "");
-  static_assert(!fmt::is_formattable<const wchar_t*>::value, "");
-  static_assert(!fmt::is_formattable<const wchar_t[3]>::value, "");
-  static_assert(!fmt::is_formattable<fmt::basic_string_view<wchar_t>>::value,
-                "");
-  static_assert(fmt::is_formattable<enabled_formatter>::value, "");
-  static_assert(!fmt::is_formattable<disabled_formatter>::value, "");
-  static_assert(fmt::is_formattable<disabled_formatter_convertible>::value, "");
-
-  static_assert(fmt::is_formattable<const_formattable&>::value, "");
-  static_assert(fmt::is_formattable<const const_formattable&>::value, "");
-
-  static_assert(fmt::is_formattable<nonconst_formattable&>::value, "");
-#if !FMT_MSC_VER || FMT_MSC_VER >= 1910
-  static_assert(!fmt::is_formattable<const nonconst_formattable&>::value, "");
-#endif
-
-  static_assert(!fmt::is_formattable<convertible_to_pointer>::value, "");
-
-  static_assert(!fmt::is_formattable<void (*)()>::value, "");
-
-  struct s;
-
-  static_assert(!fmt::is_formattable<int(s::*)>::value, "");
-  static_assert(!fmt::is_formattable<int (s::*)()>::value, "");
-  static_assert(!fmt::is_formattable<test_scoped_enum>::value, "");
-}
-
-TEST(core_test, format) { EXPECT_EQ(fmt::format("{}", 42), "42"); }
-
-TEST(core_test, format_to) {
-  std::string s;
-  fmt::format_to(std::back_inserter(s), "{}", 42);
-  EXPECT_EQ(s, "42");
-}
-
-struct convertible_to_int {
-  operator int() const { return 42; }
-};
-
-struct convertible_to_c_string {
-  operator const char*() const { return "foo"; }
-};
-
-FMT_BEGIN_NAMESPACE
-template <> struct formatter<convertible_to_int> {
-  auto parse(format_parse_context& ctx) -> decltype(ctx.begin()) {
-    return ctx.begin();
-  }
-  auto format(convertible_to_int, format_context& ctx) -> decltype(ctx.out()) {
-    return std::copy_n("foo", 3, ctx.out());
-  }
-};
-
-template <> struct formatter<convertible_to_c_string> {
-  FMT_CONSTEXPR auto parse(format_parse_context& ctx) -> decltype(ctx.begin()) {
-    return ctx.begin();
-  }
-  auto format(convertible_to_c_string, format_context& ctx)
-      -> decltype(ctx.out()) {
-    return std::copy_n("bar", 3, ctx.out());
-  }
-};
-FMT_END_NAMESPACE
-
-TEST(core_test, formatter_overrides_implicit_conversion) {
-  EXPECT_EQ(fmt::format("{}", convertible_to_int()), "foo");
-  EXPECT_EQ(fmt::format("{}", convertible_to_c_string()), "bar");
-}
-
-// Test that check is not found by ADL.
-template <typename T> void check(T);
-TEST(core_test, adl_check) {
-  EXPECT_EQ(fmt::format("{}", test_struct()), "test");
-}
-
-TEST(core_test, to_string_view_foreign_strings) {
-  using namespace test_ns;
-  EXPECT_EQ(to_string_view(test_string<char>("42")), "42");
-  fmt::detail::type type =
-      fmt::detail::mapped_type_constant<test_string<char>,
-                                        fmt::format_context>::value;
-  EXPECT_EQ(type, fmt::detail::type::string_type);
-}
-
-struct implicitly_convertible_to_string {
-  operator std::string() const { return "foo"; }
-};
-
-struct implicitly_convertible_to_string_view {
-  operator fmt::string_view() const { return "foo"; }
-};
-
-TEST(core_test, format_implicitly_convertible_to_string_view) {
-  EXPECT_EQ("foo", fmt::format("{}", implicitly_convertible_to_string_view()));
-}
-
-// std::is_constructible is broken in MSVC until version 2015.
-#if !FMT_MSC_VER || FMT_MSC_VER >= 1900
-struct explicitly_convertible_to_string_view {
-  explicit operator fmt::string_view() const { return "foo"; }
-};
-
-TEST(core_test, format_explicitly_convertible_to_string_view) {
-  EXPECT_EQ("foo", fmt::format("{}", explicitly_convertible_to_string_view()));
-}
-
-#  ifdef FMT_USE_STRING_VIEW
-struct explicitly_convertible_to_std_string_view {
-  explicit operator std::string_view() const { return "foo"; }
-};
-
-TEST(core_test, format_explicitly_convertible_to_std_string_view) {
-  EXPECT_EQ("foo",
-            fmt::format("{}", explicitly_convertible_to_std_string_view()));
-}
-#  endif
-#endif
-
-struct convertible_to_long_long {
-  operator long long() const { return 1LL << 32; }
-};
-
-TEST(format_test, format_convertible_to_long_long) {
-  EXPECT_EQ("100000000", fmt::format("{:x}", convertible_to_long_long()));
-}
-
-struct disabled_rvalue_conversion {
-  operator const char*() const& { return "foo"; }
-  operator const char*() & { return "foo"; }
-  operator const char*() const&& = delete;
-  operator const char*() && = delete;
-};
-
-TEST(core_test, disabled_rvalue_conversion) {
-  EXPECT_EQ("foo", fmt::format("{}", disabled_rvalue_conversion()));
-}
-
-namespace adl_test {
-template <typename... T> void make_format_args(const T&...) = delete;
-
-struct string : std::string {};
-}  // namespace adl_test
-
-// Test that formatting functions compile when make_format_args is found by ADL.
-TEST(core_test, adl) {
-  // Only check compilation and don't run the code to avoid polluting the output
-  // and since the output is tested elsewhere.
-  if (fmt::detail::const_check(true)) return;
-  auto s = adl_test::string();
-  char buf[10];
-  (void)fmt::format("{}", s);
-  fmt::format_to(buf, "{}", s);
-  fmt::format_to_n(buf, 10, "{}", s);
-  (void)fmt::formatted_size("{}", s);
-  fmt::print("{}", s);
-  fmt::print(stdout, "{}", s);
-}
-
-TEST(core_test, has_const_formatter) {
-  EXPECT_TRUE((fmt::detail::has_const_formatter<const_formattable,
-                                                fmt::format_context>()));
-  EXPECT_FALSE((fmt::detail::has_const_formatter<nonconst_formattable,
-                                                 fmt::format_context>()));
-}
-
-TEST(core_test, format_nonconst) {
-  EXPECT_EQ(fmt::format("{}", nonconst_formattable()), "test");
-}
diff --git a/contrib/libs/fmt/test/core-test/ya.make b/contrib/libs/fmt/test/core-test/ya.make
deleted file mode 100644
index af342ff101..0000000000
--- a/contrib/libs/fmt/test/core-test/ya.make
+++ /dev/null
@@ -1,31 +0,0 @@
-# Generated by devtools/yamaker.
-
-GTEST()
-
-WITHOUT_LICENSE_TEXTS()
-
-LICENSE(MIT)
-
-PEERDIR(
-    contrib/libs/fmt
-    contrib/libs/fmt/test
-)
-
-NO_COMPILER_WARNINGS()
-
-NO_UTIL()
-
-CFLAGS(
-    -DFMT_LOCALE
-    -DFMT_SHARED
-    -DGTEST_HAS_STD_WSTRING=1
-    -D_SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING=1
-)
-
-SRCDIR(contrib/libs/fmt/test)
-
-SRCS(
-    core-test.cc
-)
-
-END()
diff --git a/contrib/libs/fmt/test/enforce-checks-test.cc b/contrib/libs/fmt/test/enforce-checks-test.cc
deleted file mode 100644
index c77cb142f6..0000000000
--- a/contrib/libs/fmt/test/enforce-checks-test.cc
+++ /dev/null
@@ -1,63 +0,0 @@
-// Formatting library for C++ - formatting library tests
-//
-// Copyright (c) 2012 - present, Victor Zverovich
-// All rights reserved.
-//
-// For the license information refer to format.h.
-
-#include <iterator>
-#include <vector>
-
-#include "fmt/chrono.h"
-#include "fmt/color.h"
-#include "fmt/format.h"
-#include "fmt/ostream.h"
-#include "fmt/ranges.h"
-#include "fmt/xchar.h"
-
-// Exercise the API to verify that everything we expect to can compile.
-void test_format_api() {
-  (void)fmt::format(FMT_STRING("{}"), 42);
-  (void)fmt::format(FMT_STRING(L"{}"), 42);
-  (void)fmt::format(FMT_STRING("noop"));
-
-  (void)fmt::to_string(42);
-  (void)fmt::to_wstring(42);
-
-  std::vector<char> out;
-  fmt::format_to(std::back_inserter(out), FMT_STRING("{}"), 42);
-
-  char buffer[4];
-  fmt::format_to_n(buffer, 3, FMT_STRING("{}"), 12345);
-
-  wchar_t wbuffer[4];
-  fmt::format_to_n(wbuffer, 3, FMT_STRING(L"{}"), 12345);
-}
-
-void test_chrono() {
-  (void)fmt::format(FMT_STRING("{}"), std::chrono::seconds(42));
-  (void)fmt::format(FMT_STRING(L"{}"), std::chrono::seconds(42));
-}
-
-void test_text_style() {
-  fmt::print(fg(fmt::rgb(255, 20, 30)), FMT_STRING("{}"), "rgb(255,20,30)");
-  (void)fmt::format(fg(fmt::rgb(255, 20, 30)), FMT_STRING("{}"),
-                    "rgb(255,20,30)");
-
-  fmt::text_style ts = fg(fmt::rgb(255, 20, 30));
-  std::string out;
-  fmt::format_to(std::back_inserter(out), ts,
-                 FMT_STRING("rgb(255,20,30){}{}{}"), 1, 2, 3);
-}
-
-void test_range() {
-  std::vector<char> hello = {'h', 'e', 'l', 'l', 'o'};
-  (void)fmt::format(FMT_STRING("{}"), hello);
-}
-
-int main() {
-  test_format_api();
-  test_chrono();
-  test_text_style();
-  test_range();
-}
diff --git a/contrib/libs/fmt/test/enforce-checks-test/ya.make b/contrib/libs/fmt/test/enforce-checks-test/ya.make
deleted file mode 100644
index 0d67fef412..0000000000
--- a/contrib/libs/fmt/test/enforce-checks-test/ya.make
+++ /dev/null
@@ -1,32 +0,0 @@
-# Generated by devtools/yamaker.
-
-GTEST()
-
-WITHOUT_LICENSE_TEXTS()
-
-LICENSE(MIT)
-
-PEERDIR(
-    contrib/libs/fmt
-    contrib/libs/fmt/test
-)
-
-NO_COMPILER_WARNINGS()
-
-NO_UTIL()
-
-CFLAGS(
-    -DFMT_ENFORCE_COMPILE_STRING
-    -DFMT_LOCALE
-    -DFMT_SHARED
-    -DGTEST_HAS_STD_WSTRING=1
-    -D_SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING=1
-)
-
-SRCDIR(contrib/libs/fmt/test)
-
-SRCS(
-    enforce-checks-test.cc
-)
-
-END()
diff --git a/contrib/libs/fmt/test/format-impl-test.cc b/contrib/libs/fmt/test/format-impl-test.cc
deleted file mode 100644
index a012306f5b..0000000000
--- a/contrib/libs/fmt/test/format-impl-test.cc
+++ /dev/null
@@ -1,377 +0,0 @@
-// Formatting library for C++ - formatting library implementation tests
-//
-// Copyright (c) 2012 - present, Victor Zverovich
-// All rights reserved.
-//
-// For the license information refer to format.h.
-
-#include <algorithm>
-#include <cstring>
-
-// clang-format off
-#include "test-assert.h"
-// clang-format on
-
-#include "fmt/format.h"
-#include "gmock/gmock.h"
-#include "util.h"
-
-using fmt::detail::bigint;
-using fmt::detail::fp;
-using fmt::detail::max_value;
-
-static_assert(!std::is_copy_constructible<bigint>::value, "");
-static_assert(!std::is_copy_assignable<bigint>::value, "");
-
-TEST(bigint_test, construct) {
-  EXPECT_EQ("", fmt::format("{}", bigint()));
-  EXPECT_EQ("42", fmt::format("{}", bigint(0x42)));
-  EXPECT_EQ("123456789abcedf0", fmt::format("{}", bigint(0x123456789abcedf0)));
-}
-
-TEST(bigint_test, compare) {
-  bigint n1(42);
-  bigint n2(42);
-  EXPECT_EQ(compare(n1, n2), 0);
-  n2 <<= 32;
-  EXPECT_LT(compare(n1, n2), 0);
-  bigint n3(43);
-  EXPECT_LT(compare(n1, n3), 0);
-  EXPECT_GT(compare(n3, n1), 0);
-  bigint n4(42 * 0x100000001);
-  EXPECT_LT(compare(n2, n4), 0);
-  EXPECT_GT(compare(n4, n2), 0);
-}
-
-TEST(bigint_test, add_compare) {
-  EXPECT_LT(
-      add_compare(bigint(0xffffffff), bigint(0xffffffff), bigint(1) <<= 64), 0);
-  EXPECT_LT(add_compare(bigint(1) <<= 32, bigint(1), bigint(1) <<= 96), 0);
-  EXPECT_GT(add_compare(bigint(1) <<= 32, bigint(0), bigint(0xffffffff)), 0);
-  EXPECT_GT(add_compare(bigint(0), bigint(1) <<= 32, bigint(0xffffffff)), 0);
-  EXPECT_GT(add_compare(bigint(42), bigint(1), bigint(42)), 0);
-  EXPECT_GT(add_compare(bigint(0xffffffff), bigint(1), bigint(0xffffffff)), 0);
-  EXPECT_LT(add_compare(bigint(10), bigint(10), bigint(22)), 0);
-  EXPECT_LT(add_compare(bigint(0x100000010), bigint(0x100000010),
-                        bigint(0x300000010)),
-            0);
-  EXPECT_GT(add_compare(bigint(0x1ffffffff), bigint(0x100000002),
-                        bigint(0x300000000)),
-            0);
-  EXPECT_EQ(add_compare(bigint(0x1ffffffff), bigint(0x100000002),
-                        bigint(0x300000001)),
-            0);
-  EXPECT_LT(add_compare(bigint(0x1ffffffff), bigint(0x100000002),
-                        bigint(0x300000002)),
-            0);
-  EXPECT_LT(add_compare(bigint(0x1ffffffff), bigint(0x100000002),
-                        bigint(0x300000003)),
-            0);
-}
-
-TEST(bigint_test, shift_left) {
-  bigint n(0x42);
-  n <<= 0;
-  EXPECT_EQ("42", fmt::format("{}", n));
-  n <<= 1;
-  EXPECT_EQ("84", fmt::format("{}", n));
-  n <<= 25;
-  EXPECT_EQ("108000000", fmt::format("{}", n));
-}
-
-TEST(bigint_test, multiply) {
-  bigint n(0x42);
-  EXPECT_THROW(n *= 0, assertion_failure);
-  n *= 1;
-  EXPECT_EQ("42", fmt::format("{}", n));
-  n *= 2;
-  EXPECT_EQ("84", fmt::format("{}", n));
-  n *= 0x12345678;
-  EXPECT_EQ("962fc95e0", fmt::format("{}", n));
-  bigint bigmax(max_value<uint32_t>());
-  bigmax *= max_value<uint32_t>();
-  EXPECT_EQ("fffffffe00000001", fmt::format("{}", bigmax));
-  bigmax.assign(max_value<uint64_t>());
-  bigmax *= max_value<uint64_t>();
-  EXPECT_EQ("fffffffffffffffe0000000000000001", fmt::format("{}", bigmax));
-}
-
-TEST(bigint_test, accumulator) {
-  fmt::detail::accumulator acc;
-  EXPECT_EQ(acc.lower, 0);
-  EXPECT_EQ(acc.upper, 0);
-  acc.upper = 12;
-  acc.lower = 34;
-  EXPECT_EQ(static_cast<uint32_t>(acc), 34);
-  acc += 56;
-  EXPECT_EQ(acc.lower, 90);
-  acc += max_value<uint64_t>();
-  EXPECT_EQ(acc.upper, 13);
-  EXPECT_EQ(acc.lower, 89);
-  acc >>= 32;
-  EXPECT_EQ(acc.upper, 0);
-  EXPECT_EQ(acc.lower, 13 * 0x100000000);
-}
-
-TEST(bigint_test, square) {
-  bigint n0(0);
-  n0.square();
-  EXPECT_EQ("0", fmt::format("{}", n0));
-  bigint n1(0x100);
-  n1.square();
-  EXPECT_EQ("10000", fmt::format("{}", n1));
-  bigint n2(0xfffffffff);
-  n2.square();
-  EXPECT_EQ("ffffffffe000000001", fmt::format("{}", n2));
-  bigint n3(max_value<uint64_t>());
-  n3.square();
-  EXPECT_EQ("fffffffffffffffe0000000000000001", fmt::format("{}", n3));
-  bigint n4;
-  n4.assign_pow10(10);
-  EXPECT_EQ("2540be400", fmt::format("{}", n4));
-}
-
-TEST(bigint_test, divmod_assign_zero_divisor) {
-  bigint zero(0);
-  EXPECT_THROW(bigint(0).divmod_assign(zero), assertion_failure);
-  EXPECT_THROW(bigint(42).divmod_assign(zero), assertion_failure);
-}
-
-TEST(bigint_test, divmod_assign_self) {
-  bigint n(100);
-  EXPECT_THROW(n.divmod_assign(n), assertion_failure);
-}
-
-TEST(bigint_test, divmod_assign_unaligned) {
-  // (42 << 340) / pow(10, 100):
-  bigint n1(42);
-  n1 <<= 340;
-  bigint n2;
-  n2.assign_pow10(100);
-  int result = n1.divmod_assign(n2);
-  EXPECT_EQ(result, 9406);
-  EXPECT_EQ("10f8353019583bfc29ffc8f564e1b9f9d819dbb4cf783e4507eca1539220p96",
-            fmt::format("{}", n1));
-}
-
-TEST(bigint_test, divmod_assign) {
-  // 100 / 10:
-  bigint n1(100);
-  int result = n1.divmod_assign(bigint(10));
-  EXPECT_EQ(result, 10);
-  EXPECT_EQ("0", fmt::format("{}", n1));
-  // pow(10, 100) / (42 << 320):
-  n1.assign_pow10(100);
-  result = n1.divmod_assign(bigint(42) <<= 320);
-  EXPECT_EQ(result, 111);
-  EXPECT_EQ("13ad2594c37ceb0b2784c4ce0bf38ace408e211a7caab24308a82e8f10p96",
-            fmt::format("{}", n1));
-  // 42 / 100:
-  bigint n2(42);
-  n1.assign_pow10(2);
-  result = n2.divmod_assign(n1);
-  EXPECT_EQ(result, 0);
-  EXPECT_EQ("2a", fmt::format("{}", n2));
-}
-
-template <bool is_iec559> void run_double_tests() {
-  fmt::print("warning: double is not IEC559, skipping FP tests\n");
-}
-
-template <> void run_double_tests<true>() {
-  // Construct from double.
-  EXPECT_EQ(fp(1.23), fp(0x13ae147ae147aeu, -52));
-}
-
-TEST(fp_test, double_tests) {
-  run_double_tests<std::numeric_limits<double>::is_iec559>();
-}
-
-TEST(fp_test, normalize) {
-  const auto v = fp(0xbeef, 42);
-  auto normalized = normalize(v);
-  EXPECT_EQ(0xbeef000000000000, normalized.f);
-  EXPECT_EQ(-6, normalized.e);
-}
-
-TEST(fp_test, multiply) {
-  auto v = fp(123ULL << 32, 4) * fp(56ULL << 32, 7);
-  EXPECT_EQ(v.f, 123u * 56u);
-  EXPECT_EQ(v.e, 4 + 7 + 64);
-  v = fp(123ULL << 32, 4) * fp(567ULL << 31, 8);
-  EXPECT_EQ(v.f, (123 * 567 + 1u) / 2);
-  EXPECT_EQ(v.e, 4 + 8 + 64);
-}
-
-TEST(fp_test, get_cached_power) {
-  using limits = std::numeric_limits<double>;
-  for (auto exp = limits::min_exponent; exp <= limits::max_exponent; ++exp) {
-    int dec_exp = 0;
-    auto fp = fmt::detail::get_cached_power(exp, dec_exp);
-    bigint exact, cache(fp.f);
-    if (dec_exp >= 0) {
-      exact.assign_pow10(dec_exp);
-      if (fp.e <= 0)
-        exact <<= -fp.e;
-      else
-        cache <<= fp.e;
-      exact.align(cache);
-      cache.align(exact);
-      auto exact_str = fmt::format("{}", exact);
-      auto cache_str = fmt::format("{}", cache);
-      EXPECT_EQ(exact_str.size(), cache_str.size());
-      EXPECT_EQ(exact_str.substr(0, 15), cache_str.substr(0, 15));
-      int diff = cache_str[15] - exact_str[15];
-      if (diff == 1)
-        EXPECT_GT(exact_str[16], '8');
-      else
-        EXPECT_EQ(diff, 0);
-    } else {
-      cache.assign_pow10(-dec_exp);
-      cache *= fp.f + 1;  // Inexact check.
-      exact.assign(1);
-      exact <<= -fp.e;
-      exact.align(cache);
-      auto exact_str = fmt::format("{}", exact);
-      auto cache_str = fmt::format("{}", cache);
-      EXPECT_EQ(exact_str.size(), cache_str.size());
-      EXPECT_EQ(exact_str.substr(0, 16), cache_str.substr(0, 16));
-    }
-  }
-}
-
-TEST(fp_test, dragonbox_max_k) {
-  using fmt::detail::dragonbox::floor_log10_pow2;
-  using float_info = fmt::detail::dragonbox::float_info<float>;
-  EXPECT_EQ(fmt::detail::const_check(float_info::max_k),
-            float_info::kappa - floor_log10_pow2(float_info::min_exponent -
-                                                 float_info::significand_bits));
-  using double_info = fmt::detail::dragonbox::float_info<double>;
-  EXPECT_EQ(
-      fmt::detail::const_check(double_info::max_k),
-      double_info::kappa - floor_log10_pow2(double_info::min_exponent -
-                                            double_info::significand_bits));
-}
-
-TEST(fp_test, get_round_direction) {
-  using fmt::detail::get_round_direction;
-  using fmt::detail::round_direction;
-  EXPECT_EQ(round_direction::down, get_round_direction(100, 50, 0));
-  EXPECT_EQ(round_direction::up, get_round_direction(100, 51, 0));
-  EXPECT_EQ(round_direction::down, get_round_direction(100, 40, 10));
-  EXPECT_EQ(round_direction::up, get_round_direction(100, 60, 10));
-  for (size_t i = 41; i < 60; ++i)
-    EXPECT_EQ(round_direction::unknown, get_round_direction(100, i, 10));
-  uint64_t max = max_value<uint64_t>();
-  EXPECT_THROW(get_round_direction(100, 100, 0), assertion_failure);
-  EXPECT_THROW(get_round_direction(100, 0, 100), assertion_failure);
-  EXPECT_THROW(get_round_direction(100, 0, 50), assertion_failure);
-  // Check that remainder + error doesn't overflow.
-  EXPECT_EQ(round_direction::up, get_round_direction(max, max - 1, 2));
-  // Check that 2 * (remainder + error) doesn't overflow.
-  EXPECT_EQ(round_direction::unknown,
-            get_round_direction(max, max / 2 + 1, max / 2));
-  // Check that remainder - error doesn't overflow.
-  EXPECT_EQ(round_direction::unknown, get_round_direction(100, 40, 41));
-  // Check that 2 * (remainder - error) doesn't overflow.
-  EXPECT_EQ(round_direction::up, get_round_direction(max, max - 1, 1));
-}
-
-TEST(fp_test, fixed_handler) {
-  struct handler : fmt::detail::gen_digits_handler {
-    char buffer[10];
-    handler(int prec = 0) : fmt::detail::gen_digits_handler() {
-      buf = buffer;
-      precision = prec;
-    }
-  };
-  handler().on_digit('0', 100, 99, 0, false);
-  EXPECT_THROW(handler().on_digit('0', 100, 100, 0, false), assertion_failure);
-  namespace digits = fmt::detail::digits;
-  EXPECT_EQ(handler(1).on_digit('0', 100, 10, 10, false), digits::error);
-  // Check that divisor - error doesn't overflow.
-  EXPECT_EQ(handler(1).on_digit('0', 100, 10, 101, false), digits::error);
-  // Check that 2 * error doesn't overflow.
-  uint64_t max = max_value<uint64_t>();
-  EXPECT_EQ(handler(1).on_digit('0', max, 10, max - 1, false), digits::error);
-}
-
-TEST(fp_test, grisu_format_compiles_with_on_ieee_double) {
-  fmt::memory_buffer buf;
-  format_float(0.42, -1, fmt::detail::float_specs(), buf);
-}
-
-TEST(format_impl_test, format_error_code) {
-  std::string msg = "error 42", sep = ": ";
-  {
-    fmt::memory_buffer buffer;
-    format_to(fmt::appender(buffer), "garbage");
-    fmt::detail::format_error_code(buffer, 42, "test");
-    EXPECT_EQ("test: " + msg, to_string(buffer));
-  }
-  {
-    fmt::memory_buffer buffer;
-    auto prefix =
-        std::string(fmt::inline_buffer_size - msg.size() - sep.size() + 1, 'x');
-    fmt::detail::format_error_code(buffer, 42, prefix);
-    EXPECT_EQ(msg, to_string(buffer));
-  }
-  int codes[] = {42, -1};
-  for (size_t i = 0, n = sizeof(codes) / sizeof(*codes); i < n; ++i) {
-    // Test maximum buffer size.
-    msg = fmt::format("error {}", codes[i]);
-    fmt::memory_buffer buffer;
-    auto prefix =
-        std::string(fmt::inline_buffer_size - msg.size() - sep.size(), 'x');
-    fmt::detail::format_error_code(buffer, codes[i], prefix);
-    EXPECT_EQ(prefix + sep + msg, to_string(buffer));
-    size_t size = fmt::inline_buffer_size;
-    EXPECT_EQ(size, buffer.size());
-    buffer.resize(0);
-    // Test with a message that doesn't fit into the buffer.
-    prefix += 'x';
-    fmt::detail::format_error_code(buffer, codes[i], prefix);
-    EXPECT_EQ(msg, to_string(buffer));
-  }
-}
-
-TEST(format_impl_test, compute_width) {
-  EXPECT_EQ(4,
-            fmt::detail::compute_width(
-                fmt::basic_string_view<fmt::detail::char8_type>(
-                    reinterpret_cast<const fmt::detail::char8_type*>("ёжик"))));
-}
-
-// Tests fmt::detail::count_digits for integer type Int.
-template <typename Int> void test_count_digits() {
-  for (Int i = 0; i < 10; ++i) EXPECT_EQ(1u, fmt::detail::count_digits(i));
-  for (Int i = 1, n = 1, end = max_value<Int>() / 10; n <= end; ++i) {
-    n *= 10;
-    EXPECT_EQ(i, fmt::detail::count_digits(n - 1));
-    EXPECT_EQ(i + 1, fmt::detail::count_digits(n));
-  }
-}
-
-TEST(format_impl_test, count_digits) {
-  test_count_digits<uint32_t>();
-  test_count_digits<uint64_t>();
-}
-
-TEST(format_impl_test, write_fallback_uintptr) {
-  std::string s;
-  fmt::detail::write_ptr<char>(
-      std::back_inserter(s),
-      fmt::detail::fallback_uintptr(reinterpret_cast<void*>(0xface)), nullptr);
-  EXPECT_EQ(s, "0xface");
-}
-
-#ifdef _WIN32
-#  include <windows.h>
-#endif
-
-#ifdef _WIN32
-TEST(format_impl_test, write_console_signature) {
-  decltype(WriteConsoleW)* p = fmt::detail::WriteConsoleW;
-  (void)p;
-}
-#endif
diff --git a/contrib/libs/fmt/test/format-impl-test/ya.make b/contrib/libs/fmt/test/format-impl-test/ya.make
deleted file mode 100644
index fe49868ec1..0000000000
--- a/contrib/libs/fmt/test/format-impl-test/ya.make
+++ /dev/null
@@ -1,30 +0,0 @@
-# Generated by devtools/yamaker.
-
-GTEST()
-
-WITHOUT_LICENSE_TEXTS()
-
-LICENSE(MIT)
-
-ADDINCL(
-    contrib/libs/fmt/include
-)
-
-NO_COMPILER_WARNINGS()
-
-NO_UTIL()
-
-CFLAGS(
-    -DFMT_HEADER_ONLY=1
-    -DGTEST_HAS_STD_WSTRING=1
-    -D_SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING=1
-)
-
-SRCDIR(contrib/libs/fmt)
-
-SRCS(
-    test/format-impl-test.cc
-    test/header-only-test.cc
-)
-
-END()
diff --git a/contrib/libs/fmt/test/format-test.cc b/contrib/libs/fmt/test/format-test.cc
deleted file mode 100644
index a8592ef07e..0000000000
--- a/contrib/libs/fmt/test/format-test.cc
+++ /dev/null
@@ -1,2190 +0,0 @@
-// Formatting library for C++ - formatting library tests
-//
-// Copyright (c) 2012 - present, Victor Zverovich
-// All rights reserved.
-//
-// For the license information refer to format.h.
-
-// Check if fmt/format.h compiles with windows.h included before it.
-#ifdef _WIN32
-#  include <windows.h>
-#endif
-// clang-format off
-#include "fmt/format.h"
-// clang-format on
-
-#include <stdint.h>  // uint32_t
-
-#include <climits>      // INT_MAX
-#include <cmath>        // std::signbit
-#include <cstring>      // std::strlen
-#include <iterator>     // std::back_inserter
-#include <list>         // std::list
-#include <memory>       // std::unique_ptr
-#include <type_traits>  // std::is_default_constructible
-
-#include "gtest-extra.h"
-#include "mock-allocator.h"
-#include "util.h"
-
-using fmt::basic_memory_buffer;
-using fmt::format_error;
-using fmt::memory_buffer;
-using fmt::runtime;
-using fmt::string_view;
-using fmt::detail::max_value;
-
-using testing::Return;
-using testing::StrictMock;
-
-enum { buffer_size = 256 };
-
-struct uint32_pair {
-  uint32_t u[2];
-};
-
-TEST(util_test, bit_cast) {
-  auto s = fmt::detail::bit_cast<uint32_pair>(uint64_t{42});
-  EXPECT_EQ(fmt::detail::bit_cast<uint64_t>(s), 42ull);
-  s = fmt::detail::bit_cast<uint32_pair>(~uint64_t{0});
-  EXPECT_EQ(fmt::detail::bit_cast<uint64_t>(s), ~0ull);
-}
-
-// Increment a number in a string.
-void increment(char* s) {
-  for (int i = static_cast<int>(std::strlen(s)) - 1; i >= 0; --i) {
-    if (s[i] != '9') {
-      ++s[i];
-      break;
-    }
-    s[i] = '0';
-  }
-}
-
-TEST(util_test, increment) {
-  char s[10] = "123";
-  increment(s);
-  EXPECT_STREQ("124", s);
-  s[2] = '8';
-  increment(s);
-  EXPECT_STREQ("129", s);
-  increment(s);
-  EXPECT_STREQ("130", s);
-  s[1] = s[2] = '9';
-  increment(s);
-  EXPECT_STREQ("200", s);
-}
-
-TEST(util_test, parse_nonnegative_int) {
-  auto s = fmt::string_view("10000000000");
-  auto begin = s.begin(), end = s.end();
-  EXPECT_EQ(fmt::detail::parse_nonnegative_int(begin, end, -1), -1);
-  s = "2147483649";
-  begin = s.begin();
-  end = s.end();
-  EXPECT_EQ(fmt::detail::parse_nonnegative_int(begin, end, -1), -1);
-}
-
-TEST(util_test, utf8_to_utf16) {
-  auto u = fmt::detail::utf8_to_utf16("лошадка");
-  EXPECT_EQ(L"\x043B\x043E\x0448\x0430\x0434\x043A\x0430", u.str());
-  EXPECT_EQ(7, u.size());
-  // U+10437 { DESERET SMALL LETTER YEE }
-  EXPECT_EQ(L"\xD801\xDC37", fmt::detail::utf8_to_utf16("𐐷").str());
-  EXPECT_THROW_MSG(fmt::detail::utf8_to_utf16("\xc3\x28"), std::runtime_error,
-                   "invalid utf8");
-  EXPECT_THROW_MSG(fmt::detail::utf8_to_utf16(fmt::string_view("л", 1)),
-                   std::runtime_error, "invalid utf8");
-  EXPECT_EQ(L"123456", fmt::detail::utf8_to_utf16("123456").str());
-}
-
-TEST(util_test, utf8_to_utf16_empty_string) {
-  auto s = std::string();
-  auto u = fmt::detail::utf8_to_utf16(s.c_str());
-  EXPECT_EQ(L"", u.str());
-  EXPECT_EQ(s.size(), u.size());
-}
-
-TEST(util_test, allocator_ref) {
-  using test_allocator_ref = allocator_ref<mock_allocator<int>>;
-  auto check_forwarding = [](mock_allocator<int>& alloc,
-                             test_allocator_ref& ref) {
-    int mem;
-    // Check if value_type is properly defined.
-    allocator_ref<mock_allocator<int>>::value_type* ptr = &mem;
-    // Check forwarding.
-    EXPECT_CALL(alloc, allocate(42)).WillOnce(Return(ptr));
-    ref.allocate(42);
-    EXPECT_CALL(alloc, deallocate(ptr, 42));
-    ref.deallocate(ptr, 42);
-  };
-
-  StrictMock<mock_allocator<int>> alloc;
-  auto ref = test_allocator_ref(&alloc);
-  // Check if allocator_ref forwards to the underlying allocator.
-  check_forwarding(alloc, ref);
-  test_allocator_ref ref2(ref);
-  check_forwarding(alloc, ref2);
-  test_allocator_ref ref3;
-  EXPECT_EQ(nullptr, ref3.get());
-  ref3 = ref;
-  check_forwarding(alloc, ref3);
-}
-
-TEST(util_test, format_system_error) {
-  fmt::memory_buffer message;
-  fmt::format_system_error(message, EDOM, "test");
-  auto ec = std::error_code(EDOM, std::generic_category());
-  EXPECT_EQ(to_string(message), std::system_error(ec, "test").what());
-  message = fmt::memory_buffer();
-
-  // Check if std::allocator throws on allocating max size_t / 2 chars.
-  size_t max_size = max_value<size_t>() / 2;
-  bool throws_on_alloc = false;
-  try {
-    auto alloc = std::allocator<char>();
-    alloc.deallocate(alloc.allocate(max_size), max_size);
-  } catch (const std::bad_alloc&) {
-    throws_on_alloc = true;
-  }
-  if (!throws_on_alloc) {
-    fmt::print("warning: std::allocator allocates {} chars", max_size);
-    return;
-  }
-}
-
-TEST(util_test, system_error) {
-  auto test_error = fmt::system_error(EDOM, "test");
-  auto ec = std::error_code(EDOM, std::generic_category());
-  EXPECT_STREQ(test_error.what(), std::system_error(ec, "test").what());
-  EXPECT_EQ(test_error.code(), ec);
-
-  auto error = std::system_error(std::error_code());
-  try {
-    throw fmt::system_error(EDOM, "test {}", "error");
-  } catch (const std::system_error& e) {
-    error = e;
-  }
-  fmt::memory_buffer message;
-  fmt::format_system_error(message, EDOM, "test error");
-  EXPECT_EQ(error.what(), to_string(message));
-  EXPECT_EQ(error.code(), std::error_code(EDOM, std::generic_category()));
-}
-
-TEST(util_test, report_system_error) {
-  fmt::memory_buffer out;
-  fmt::format_system_error(out, EDOM, "test error");
-  out.push_back('\n');
-  EXPECT_WRITE(stderr, fmt::report_system_error(EDOM, "test error"),
-               to_string(out));
-}
-
-TEST(memory_buffer_test, ctor) {
-  basic_memory_buffer<char, 123> buffer;
-  EXPECT_EQ(static_cast<size_t>(0), buffer.size());
-  EXPECT_EQ(123u, buffer.capacity());
-}
-
-using std_allocator = allocator_ref<std::allocator<char>>;
-
-TEST(memory_buffer_test, move_ctor_inline_buffer) {
-  auto check_move_buffer =
-      [](const char* str, basic_memory_buffer<char, 5, std_allocator>& buffer) {
-        std::allocator<char>* alloc = buffer.get_allocator().get();
-        basic_memory_buffer<char, 5, std_allocator> buffer2(std::move(buffer));
-        // Move shouldn't destroy the inline content of the first buffer.
-        EXPECT_EQ(str, std::string(&buffer[0], buffer.size()));
-        EXPECT_EQ(str, std::string(&buffer2[0], buffer2.size()));
-        EXPECT_EQ(5u, buffer2.capacity());
-        // Move should transfer allocator.
-        EXPECT_EQ(nullptr, buffer.get_allocator().get());
-        EXPECT_EQ(alloc, buffer2.get_allocator().get());
-      };
-
-  auto alloc = std::allocator<char>();
-  basic_memory_buffer<char, 5, std_allocator> buffer((std_allocator(&alloc)));
-  const char test[] = "test";
-  buffer.append(string_view(test, 4));
-  check_move_buffer("test", buffer);
-  // Adding one more character fills the inline buffer, but doesn't cause
-  // dynamic allocation.
-  buffer.push_back('a');
-  check_move_buffer("testa", buffer);
-}
-
-TEST(memory_buffer_test, move_ctor_dynamic_buffer) {
-  auto alloc = std::allocator<char>();
-  basic_memory_buffer<char, 4, std_allocator> buffer((std_allocator(&alloc)));
-  const char test[] = "test";
-  buffer.append(test, test + 4);
-  const char* inline_buffer_ptr = &buffer[0];
-  // Adding one more character causes the content to move from the inline to
-  // a dynamically allocated buffer.
-  buffer.push_back('a');
-  basic_memory_buffer<char, 4, std_allocator> buffer2(std::move(buffer));
-  // Move should rip the guts of the first buffer.
-  EXPECT_EQ(inline_buffer_ptr, &buffer[0]);
-  EXPECT_EQ("testa", std::string(&buffer2[0], buffer2.size()));
-  EXPECT_GT(buffer2.capacity(), 4u);
-}
-
-void check_move_assign_buffer(const char* str,
-                              basic_memory_buffer<char, 5>& buffer) {
-  basic_memory_buffer<char, 5> buffer2;
-  buffer2 = std::move(buffer);
-  // Move shouldn't destroy the inline content of the first buffer.
-  EXPECT_EQ(str, std::string(&buffer[0], buffer.size()));
-  EXPECT_EQ(str, std::string(&buffer2[0], buffer2.size()));
-  EXPECT_EQ(5u, buffer2.capacity());
-}
-
-TEST(memory_buffer_test, move_assignment) {
-  basic_memory_buffer<char, 5> buffer;
-  const char test[] = "test";
-  buffer.append(test, test + 4);
-  check_move_assign_buffer("test", buffer);
-  // Adding one more character fills the inline buffer, but doesn't cause
-  // dynamic allocation.
-  buffer.push_back('a');
-  check_move_assign_buffer("testa", buffer);
-  const char* inline_buffer_ptr = &buffer[0];
-  // Adding one more character causes the content to move from the inline to
-  // a dynamically allocated buffer.
-  buffer.push_back('b');
-  basic_memory_buffer<char, 5> buffer2;
-  buffer2 = std::move(buffer);
-  // Move should rip the guts of the first buffer.
-  EXPECT_EQ(inline_buffer_ptr, &buffer[0]);
-  EXPECT_EQ("testab", std::string(&buffer2[0], buffer2.size()));
-  EXPECT_GT(buffer2.capacity(), 5u);
-}
-
-TEST(memory_buffer_test, grow) {
-  typedef allocator_ref<mock_allocator<int>> Allocator;
-  mock_allocator<int> alloc;
-  basic_memory_buffer<int, 10, Allocator> buffer((Allocator(&alloc)));
-  buffer.resize(7);
-  using fmt::detail::to_unsigned;
-  for (int i = 0; i < 7; ++i) buffer[to_unsigned(i)] = i * i;
-  EXPECT_EQ(10u, buffer.capacity());
-  int mem[20];
-  mem[7] = 0xdead;
-  EXPECT_CALL(alloc, allocate(20)).WillOnce(Return(mem));
-  buffer.try_reserve(20);
-  EXPECT_EQ(20u, buffer.capacity());
-  // Check if size elements have been copied
-  for (int i = 0; i < 7; ++i) EXPECT_EQ(i * i, buffer[to_unsigned(i)]);
-  // and no more than that.
-  EXPECT_EQ(0xdead, buffer[7]);
-  EXPECT_CALL(alloc, deallocate(mem, 20));
-}
-
-TEST(memory_buffer_test, allocator) {
-  using test_allocator = allocator_ref<mock_allocator<char>>;
-  basic_memory_buffer<char, 10, test_allocator> buffer;
-  EXPECT_EQ(nullptr, buffer.get_allocator().get());
-  StrictMock<mock_allocator<char>> alloc;
-  char mem;
-  {
-    basic_memory_buffer<char, 10, test_allocator> buffer2(
-        (test_allocator(&alloc)));
-    EXPECT_EQ(&alloc, buffer2.get_allocator().get());
-    size_t size = 2 * fmt::inline_buffer_size;
-    EXPECT_CALL(alloc, allocate(size)).WillOnce(Return(&mem));
-    buffer2.reserve(size);
-    EXPECT_CALL(alloc, deallocate(&mem, size));
-  }
-}
-
-TEST(memory_buffer_test, exception_in_deallocate) {
-  using test_allocator = allocator_ref<mock_allocator<char>>;
-  StrictMock<mock_allocator<char>> alloc;
-  basic_memory_buffer<char, 10, test_allocator> buffer(
-      (test_allocator(&alloc)));
-  size_t size = 2 * fmt::inline_buffer_size;
-  auto mem = std::vector<char>(size);
-  {
-    EXPECT_CALL(alloc, allocate(size)).WillOnce(Return(&mem[0]));
-    buffer.resize(size);
-    std::fill(&buffer[0], &buffer[0] + size, 'x');
-  }
-  auto mem2 = std::vector<char>(2 * size);
-  {
-    EXPECT_CALL(alloc, allocate(2 * size)).WillOnce(Return(&mem2[0]));
-    auto e = std::exception();
-    EXPECT_CALL(alloc, deallocate(&mem[0], size)).WillOnce(testing::Throw(e));
-    EXPECT_THROW(buffer.reserve(2 * size), std::exception);
-    EXPECT_EQ(&mem2[0], &buffer[0]);
-    // Check that the data has been copied.
-    for (size_t i = 0; i < size; ++i) EXPECT_EQ('x', buffer[i]);
-  }
-  EXPECT_CALL(alloc, deallocate(&mem2[0], 2 * size));
-}
-
-template <typename Allocator, size_t MaxSize>
-class max_size_allocator : public Allocator {
- public:
-  using typename Allocator::value_type;
-  size_t max_size() const FMT_NOEXCEPT { return MaxSize; }
-  value_type* allocate(size_t n) {
-    if (n > max_size()) {
-      throw std::length_error("size > max_size");
-    }
-    return std::allocator_traits<Allocator>::allocate(
-        *static_cast<Allocator*>(this), n);
-  }
-  void deallocate(value_type* p, size_t n) {
-    std::allocator_traits<Allocator>::deallocate(*static_cast<Allocator*>(this),
-                                                 p, n);
-  }
-};
-
-TEST(memory_buffer_test, max_size_allocator) {
-  // 160 = 128 + 32
-  using test_allocator = max_size_allocator<std::allocator<char>, 160>;
-  basic_memory_buffer<char, 10, test_allocator> buffer;
-  buffer.resize(128);
-  // new_capacity = 128 + 128/2 = 192 > 160
-  buffer.resize(160);  // Shouldn't throw.
-}
-
-TEST(memory_buffer_test, max_size_allocator_overflow) {
-  using test_allocator = max_size_allocator<std::allocator<char>, 160>;
-  basic_memory_buffer<char, 10, test_allocator> buffer;
-  EXPECT_THROW(buffer.resize(161), std::exception);
-}
-
-TEST(format_test, escape) {
-  EXPECT_EQ("{", fmt::format("{{"));
-  EXPECT_EQ("before {", fmt::format("before {{"));
-  EXPECT_EQ("{ after", fmt::format("{{ after"));
-  EXPECT_EQ("before { after", fmt::format("before {{ after"));
-
-  EXPECT_EQ("}", fmt::format("}}"));
-  EXPECT_EQ("before }", fmt::format("before }}"));
-  EXPECT_EQ("} after", fmt::format("}} after"));
-  EXPECT_EQ("before } after", fmt::format("before }} after"));
-
-  EXPECT_EQ("{}", fmt::format("{{}}"));
-  EXPECT_EQ("{42}", fmt::format("{{{0}}}", 42));
-}
-
-TEST(format_test, unmatched_braces) {
-  EXPECT_THROW_MSG((void)fmt::format(runtime("{")), format_error,
-                   "invalid format string");
-  EXPECT_THROW_MSG((void)fmt::format(runtime("}")), format_error,
-                   "unmatched '}' in format string");
-  EXPECT_THROW_MSG((void)fmt::format(runtime("{0{}")), format_error,
-                   "invalid format string");
-}
-
-TEST(format_test, no_args) { EXPECT_EQ("test", fmt::format("test")); }
-
-TEST(format_test, args_in_different_positions) {
-  EXPECT_EQ("42", fmt::format("{0}", 42));
-  EXPECT_EQ("before 42", fmt::format("before {0}", 42));
-  EXPECT_EQ("42 after", fmt::format("{0} after", 42));
-  EXPECT_EQ("before 42 after", fmt::format("before {0} after", 42));
-  EXPECT_EQ("answer = 42", fmt::format("{0} = {1}", "answer", 42));
-  EXPECT_EQ("42 is the answer", fmt::format("{1} is the {0}", "answer", 42));
-  EXPECT_EQ("abracadabra", fmt::format("{0}{1}{0}", "abra", "cad"));
-}
-
-TEST(format_test, arg_errors) {
-  EXPECT_THROW_MSG((void)fmt::format(runtime("{")), format_error,
-                   "invalid format string");
-  EXPECT_THROW_MSG((void)fmt::format(runtime("{?}")), format_error,
-                   "invalid format string");
-  EXPECT_THROW_MSG((void)fmt::format(runtime("{0")), format_error,
-                   "invalid format string");
-  EXPECT_THROW_MSG((void)fmt::format(runtime("{0}")), format_error,
-                   "argument not found");
-  EXPECT_THROW_MSG((void)fmt::format(runtime("{00}"), 42), format_error,
-                   "invalid format string");
-
-  char format_str[buffer_size];
-  safe_sprintf(format_str, "{%u", INT_MAX);
-  EXPECT_THROW_MSG((void)fmt::format(runtime(format_str)), format_error,
-                   "invalid format string");
-  safe_sprintf(format_str, "{%u}", INT_MAX);
-  EXPECT_THROW_MSG((void)fmt::format(runtime(format_str)), format_error,
-                   "argument not found");
-
-  safe_sprintf(format_str, "{%u", INT_MAX + 1u);
-  EXPECT_THROW_MSG((void)fmt::format(runtime(format_str)), format_error,
-                   "invalid format string");
-  safe_sprintf(format_str, "{%u}", INT_MAX + 1u);
-  EXPECT_THROW_MSG((void)fmt::format(runtime(format_str)), format_error,
-                   "argument not found");
-}
-
-template <int N> struct test_format {
-  template <typename... T>
-  static std::string format(fmt::string_view fmt, const T&... args) {
-    return test_format<N - 1>::format(fmt, N - 1, args...);
-  }
-};
-
-template <> struct test_format<0> {
-  template <typename... T>
-  static std::string format(fmt::string_view fmt, const T&... args) {
-    return fmt::format(runtime(fmt), args...);
-  }
-};
-
-TEST(format_test, many_args) {
-  EXPECT_EQ("19", test_format<20>::format("{19}"));
-  EXPECT_THROW_MSG(test_format<20>::format("{20}"), format_error,
-                   "argument not found");
-  EXPECT_THROW_MSG(test_format<21>::format("{21}"), format_error,
-                   "argument not found");
-  using fmt::detail::max_packed_args;
-  std::string format_str = fmt::format("{{{}}}", max_packed_args + 1);
-  EXPECT_THROW_MSG(test_format<max_packed_args>::format(format_str),
-                   format_error, "argument not found");
-}
-
-TEST(format_test, named_arg) {
-  EXPECT_EQ("1/a/A", fmt::format("{_1}/{a_}/{A_}", fmt::arg("a_", 'a'),
-                                 fmt::arg("A_", "A"), fmt::arg("_1", 1)));
-  EXPECT_EQ(" -42", fmt::format("{0:{width}}", -42, fmt::arg("width", 4)));
-  EXPECT_EQ("st",
-            fmt::format("{0:.{precision}}", "str", fmt::arg("precision", 2)));
-  EXPECT_EQ("1 2", fmt::format("{} {two}", 1, fmt::arg("two", 2)));
-  EXPECT_EQ("42",
-            fmt::format("{c}", fmt::arg("a", 0), fmt::arg("b", 0),
-                        fmt::arg("c", 42), fmt::arg("d", 0), fmt::arg("e", 0),
-                        fmt::arg("f", 0), fmt::arg("g", 0), fmt::arg("h", 0),
-                        fmt::arg("i", 0), fmt::arg("j", 0), fmt::arg("k", 0),
-                        fmt::arg("l", 0), fmt::arg("m", 0), fmt::arg("n", 0),
-                        fmt::arg("o", 0), fmt::arg("p", 0)));
-  EXPECT_THROW_MSG((void)fmt::format(runtime("{a}")), format_error,
-                   "argument not found");
-  EXPECT_THROW_MSG((void)fmt::format(runtime("{a}"), 42), format_error,
-                   "argument not found");
-}
-
-TEST(format_test, auto_arg_index) {
-  EXPECT_EQ("abc", fmt::format("{}{}{}", 'a', 'b', 'c'));
-  EXPECT_THROW_MSG((void)fmt::format(runtime("{0}{}"), 'a', 'b'), format_error,
-                   "cannot switch from manual to automatic argument indexing");
-  EXPECT_THROW_MSG((void)fmt::format(runtime("{}{0}"), 'a', 'b'), format_error,
-                   "cannot switch from automatic to manual argument indexing");
-  EXPECT_EQ("1.2", fmt::format("{:.{}}", 1.2345, 2));
-  EXPECT_THROW_MSG((void)fmt::format(runtime("{0}:.{}"), 1.2345, 2),
-                   format_error,
-                   "cannot switch from manual to automatic argument indexing");
-  EXPECT_THROW_MSG((void)fmt::format(runtime("{:.{0}}"), 1.2345, 2),
-                   format_error,
-                   "cannot switch from automatic to manual argument indexing");
-  EXPECT_THROW_MSG((void)fmt::format(runtime("{}")), format_error,
-                   "argument not found");
-}
-
-TEST(format_test, empty_specs) { EXPECT_EQ("42", fmt::format("{0:}", 42)); }
-
-TEST(format_test, left_align) {
-  EXPECT_EQ("42  ", fmt::format("{0:<4}", 42));
-  EXPECT_EQ("42  ", fmt::format("{0:<4o}", 042));
-  EXPECT_EQ("42  ", fmt::format("{0:<4x}", 0x42));
-  EXPECT_EQ("-42  ", fmt::format("{0:<5}", -42));
-  EXPECT_EQ("42   ", fmt::format("{0:<5}", 42u));
-  EXPECT_EQ("-42  ", fmt::format("{0:<5}", -42l));
-  EXPECT_EQ("42   ", fmt::format("{0:<5}", 42ul));
-  EXPECT_EQ("-42  ", fmt::format("{0:<5}", -42ll));
-  EXPECT_EQ("42   ", fmt::format("{0:<5}", 42ull));
-  EXPECT_EQ("-42  ", fmt::format("{0:<5}", -42.0));
-  EXPECT_EQ("-42  ", fmt::format("{0:<5}", -42.0l));
-  EXPECT_EQ("c    ", fmt::format("{0:<5}", 'c'));
-  EXPECT_EQ("abc  ", fmt::format("{0:<5}", "abc"));
-  EXPECT_EQ("0xface  ", fmt::format("{0:<8}", reinterpret_cast<void*>(0xface)));
-}
-
-TEST(format_test, right_align) {
-  EXPECT_EQ("  42", fmt::format("{0:>4}", 42));
-  EXPECT_EQ("  42", fmt::format("{0:>4o}", 042));
-  EXPECT_EQ("  42", fmt::format("{0:>4x}", 0x42));
-  EXPECT_EQ("  -42", fmt::format("{0:>5}", -42));
-  EXPECT_EQ("   42", fmt::format("{0:>5}", 42u));
-  EXPECT_EQ("  -42", fmt::format("{0:>5}", -42l));
-  EXPECT_EQ("   42", fmt::format("{0:>5}", 42ul));
-  EXPECT_EQ("  -42", fmt::format("{0:>5}", -42ll));
-  EXPECT_EQ("   42", fmt::format("{0:>5}", 42ull));
-  EXPECT_EQ("  -42", fmt::format("{0:>5}", -42.0));
-  EXPECT_EQ("  -42", fmt::format("{0:>5}", -42.0l));
-  EXPECT_EQ("    c", fmt::format("{0:>5}", 'c'));
-  EXPECT_EQ("  abc", fmt::format("{0:>5}", "abc"));
-  EXPECT_EQ("  0xface", fmt::format("{0:>8}", reinterpret_cast<void*>(0xface)));
-}
-
-TEST(format_test, center_align) {
-  EXPECT_EQ(" 42  ", fmt::format("{0:^5}", 42));
-  EXPECT_EQ(" 42  ", fmt::format("{0:^5o}", 042));
-  EXPECT_EQ(" 42  ", fmt::format("{0:^5x}", 0x42));
-  EXPECT_EQ(" -42 ", fmt::format("{0:^5}", -42));
-  EXPECT_EQ(" 42  ", fmt::format("{0:^5}", 42u));
-  EXPECT_EQ(" -42 ", fmt::format("{0:^5}", -42l));
-  EXPECT_EQ(" 42  ", fmt::format("{0:^5}", 42ul));
-  EXPECT_EQ(" -42 ", fmt::format("{0:^5}", -42ll));
-  EXPECT_EQ(" 42  ", fmt::format("{0:^5}", 42ull));
-  EXPECT_EQ(" -42 ", fmt::format("{0:^5}", -42.0));
-  EXPECT_EQ(" -42 ", fmt::format("{0:^5}", -42.0l));
-  EXPECT_EQ("  c  ", fmt::format("{0:^5}", 'c'));
-  EXPECT_EQ(" abc  ", fmt::format("{0:^6}", "abc"));
-  EXPECT_EQ(" 0xface ", fmt::format("{0:^8}", reinterpret_cast<void*>(0xface)));
-}
-
-TEST(format_test, fill) {
-  EXPECT_THROW_MSG((void)fmt::format(runtime("{0:{<5}"), 'c'), format_error,
-                   "invalid fill character '{'");
-  EXPECT_THROW_MSG((void)fmt::format(runtime("{0:{<5}}"), 'c'), format_error,
-                   "invalid fill character '{'");
-  EXPECT_EQ("**42", fmt::format("{0:*>4}", 42));
-  EXPECT_EQ("**-42", fmt::format("{0:*>5}", -42));
-  EXPECT_EQ("***42", fmt::format("{0:*>5}", 42u));
-  EXPECT_EQ("**-42", fmt::format("{0:*>5}", -42l));
-  EXPECT_EQ("***42", fmt::format("{0:*>5}", 42ul));
-  EXPECT_EQ("**-42", fmt::format("{0:*>5}", -42ll));
-  EXPECT_EQ("***42", fmt::format("{0:*>5}", 42ull));
-  EXPECT_EQ("**-42", fmt::format("{0:*>5}", -42.0));
-  EXPECT_EQ("**-42", fmt::format("{0:*>5}", -42.0l));
-  EXPECT_EQ("c****", fmt::format("{0:*<5}", 'c'));
-  EXPECT_EQ("abc**", fmt::format("{0:*<5}", "abc"));
-  EXPECT_EQ("**0xface",
-            fmt::format("{0:*>8}", reinterpret_cast<void*>(0xface)));
-  EXPECT_EQ("foo=", fmt::format("{:}=", "foo"));
-  EXPECT_EQ(std::string("\0\0\0*", 4),
-            fmt::format(string_view("{:\0>4}", 6), '*'));
-  EXPECT_EQ("жж42", fmt::format("{0:ж>4}", 42));
-  EXPECT_THROW_MSG((void)fmt::format(runtime("{:\x80\x80\x80\x80\x80>}"), 0),
-                   format_error, "invalid type specifier");
-}
-
-TEST(format_test, plus_sign) {
-  EXPECT_EQ("+42", fmt::format("{0:+}", 42));
-  EXPECT_EQ("-42", fmt::format("{0:+}", -42));
-  EXPECT_EQ("+42", fmt::format("{0:+}", 42));
-  EXPECT_THROW_MSG((void)fmt::format(runtime("{0:+}"), 42u), format_error,
-                   "format specifier requires signed argument");
-  EXPECT_EQ("+42", fmt::format("{0:+}", 42l));
-  EXPECT_THROW_MSG((void)fmt::format(runtime("{0:+}"), 42ul), format_error,
-                   "format specifier requires signed argument");
-  EXPECT_EQ("+42", fmt::format("{0:+}", 42ll));
-  EXPECT_THROW_MSG((void)fmt::format(runtime("{0:+}"), 42ull), format_error,
-                   "format specifier requires signed argument");
-  EXPECT_EQ("+42", fmt::format("{0:+}", 42.0));
-  EXPECT_EQ("+42", fmt::format("{0:+}", 42.0l));
-  EXPECT_THROW_MSG((void)fmt::format(runtime("{0:+"), 'c'), format_error,
-                   "missing '}' in format string");
-  EXPECT_THROW_MSG((void)fmt::format(runtime("{0:+}"), 'c'), format_error,
-                   "invalid format specifier for char");
-  EXPECT_THROW_MSG((void)fmt::format(runtime("{0:+}"), "abc"), format_error,
-                   "format specifier requires numeric argument");
-  EXPECT_THROW_MSG(
-      (void)fmt::format(runtime("{0:+}"), reinterpret_cast<void*>(0x42)),
-      format_error, "format specifier requires numeric argument");
-}
-
-TEST(format_test, minus_sign) {
-  EXPECT_EQ("42", fmt::format("{0:-}", 42));
-  EXPECT_EQ("-42", fmt::format("{0:-}", -42));
-  EXPECT_EQ("42", fmt::format("{0:-}", 42));
-  EXPECT_THROW_MSG((void)fmt::format(runtime("{0:-}"), 42u), format_error,
-                   "format specifier requires signed argument");
-  EXPECT_EQ("42", fmt::format("{0:-}", 42l));
-  EXPECT_THROW_MSG((void)fmt::format(runtime("{0:-}"), 42ul), format_error,
-                   "format specifier requires signed argument");
-  EXPECT_EQ("42", fmt::format("{0:-}", 42ll));
-  EXPECT_THROW_MSG((void)fmt::format(runtime("{0:-}"), 42ull), format_error,
-                   "format specifier requires signed argument");
-  EXPECT_EQ("42", fmt::format("{0:-}", 42.0));
-  EXPECT_EQ("42", fmt::format("{0:-}", 42.0l));
-  EXPECT_THROW_MSG((void)fmt::format(runtime("{0:-"), 'c'), format_error,
-                   "missing '}' in format string");
-  EXPECT_THROW_MSG((void)fmt::format(runtime("{0:-}"), 'c'), format_error,
-                   "invalid format specifier for char");
-  EXPECT_THROW_MSG((void)fmt::format(runtime("{0:-}"), "abc"), format_error,
-                   "format specifier requires numeric argument");
-  EXPECT_THROW_MSG(
-      (void)fmt::format(runtime("{0:-}"), reinterpret_cast<void*>(0x42)),
-      format_error, "format specifier requires numeric argument");
-}
-
-TEST(format_test, space_sign) {
-  EXPECT_EQ(" 42", fmt::format("{0: }", 42));
-  EXPECT_EQ("-42", fmt::format("{0: }", -42));
-  EXPECT_EQ(" 42", fmt::format("{0: }", 42));
-  EXPECT_THROW_MSG((void)fmt::format(runtime("{0: }"), 42u), format_error,
-                   "format specifier requires signed argument");
-  EXPECT_EQ(" 42", fmt::format("{0: }", 42l));
-  EXPECT_THROW_MSG((void)fmt::format(runtime("{0: }"), 42ul), format_error,
-                   "format specifier requires signed argument");
-  EXPECT_EQ(" 42", fmt::format("{0: }", 42ll));
-  EXPECT_THROW_MSG((void)fmt::format(runtime("{0: }"), 42ull), format_error,
-                   "format specifier requires signed argument");
-  EXPECT_EQ(" 42", fmt::format("{0: }", 42.0));
-  EXPECT_EQ(" 42", fmt::format("{0: }", 42.0l));
-  EXPECT_THROW_MSG((void)fmt::format(runtime("{0: "), 'c'), format_error,
-                   "missing '}' in format string");
-  EXPECT_THROW_MSG((void)fmt::format(runtime("{0: }"), 'c'), format_error,
-                   "invalid format specifier for char");
-  EXPECT_THROW_MSG((void)fmt::format(runtime("{0: }"), "abc"), format_error,
-                   "format specifier requires numeric argument");
-  EXPECT_THROW_MSG(
-      (void)fmt::format(runtime("{0: }"), reinterpret_cast<void*>(0x42)),
-      format_error, "format specifier requires numeric argument");
-}
-
-TEST(format_test, hash_flag) {
-  EXPECT_EQ("42", fmt::format("{0:#}", 42));
-  EXPECT_EQ("-42", fmt::format("{0:#}", -42));
-  EXPECT_EQ("0b101010", fmt::format("{0:#b}", 42));
-  EXPECT_EQ("0B101010", fmt::format("{0:#B}", 42));
-  EXPECT_EQ("-0b101010", fmt::format("{0:#b}", -42));
-  EXPECT_EQ("0x42", fmt::format("{0:#x}", 0x42));
-  EXPECT_EQ("0X42", fmt::format("{0:#X}", 0x42));
-  EXPECT_EQ("-0x42", fmt::format("{0:#x}", -0x42));
-  EXPECT_EQ("0", fmt::format("{0:#o}", 0));
-  EXPECT_EQ("042", fmt::format("{0:#o}", 042));
-  EXPECT_EQ("-042", fmt::format("{0:#o}", -042));
-  EXPECT_EQ("42", fmt::format("{0:#}", 42u));
-  EXPECT_EQ("0x42", fmt::format("{0:#x}", 0x42u));
-  EXPECT_EQ("042", fmt::format("{0:#o}", 042u));
-
-  EXPECT_EQ("-42", fmt::format("{0:#}", -42l));
-  EXPECT_EQ("0x42", fmt::format("{0:#x}", 0x42l));
-  EXPECT_EQ("-0x42", fmt::format("{0:#x}", -0x42l));
-  EXPECT_EQ("042", fmt::format("{0:#o}", 042l));
-  EXPECT_EQ("-042", fmt::format("{0:#o}", -042l));
-  EXPECT_EQ("42", fmt::format("{0:#}", 42ul));
-  EXPECT_EQ("0x42", fmt::format("{0:#x}", 0x42ul));
-  EXPECT_EQ("042", fmt::format("{0:#o}", 042ul));
-
-  EXPECT_EQ("-42", fmt::format("{0:#}", -42ll));
-  EXPECT_EQ("0x42", fmt::format("{0:#x}", 0x42ll));
-  EXPECT_EQ("-0x42", fmt::format("{0:#x}", -0x42ll));
-  EXPECT_EQ("042", fmt::format("{0:#o}", 042ll));
-  EXPECT_EQ("-042", fmt::format("{0:#o}", -042ll));
-  EXPECT_EQ("42", fmt::format("{0:#}", 42ull));
-  EXPECT_EQ("0x42", fmt::format("{0:#x}", 0x42ull));
-  EXPECT_EQ("042", fmt::format("{0:#o}", 042ull));
-
-  EXPECT_EQ("-42.0", fmt::format("{0:#}", -42.0));
-  EXPECT_EQ("-42.0", fmt::format("{0:#}", -42.0l));
-  EXPECT_EQ("4.e+01", fmt::format("{:#.0e}", 42.0));
-  EXPECT_EQ("0.", fmt::format("{:#.0f}", 0.01));
-  EXPECT_EQ("0.50", fmt::format("{:#.2g}", 0.5));
-  EXPECT_EQ("0.", fmt::format("{:#.0f}", 0.5));
-  EXPECT_THROW_MSG((void)fmt::format(runtime("{0:#"), 'c'), format_error,
-                   "missing '}' in format string");
-  EXPECT_THROW_MSG((void)fmt::format(runtime("{0:#}"), 'c'), format_error,
-                   "invalid format specifier for char");
-  EXPECT_THROW_MSG((void)fmt::format(runtime("{0:#}"), "abc"), format_error,
-                   "format specifier requires numeric argument");
-  EXPECT_THROW_MSG(
-      (void)fmt::format(runtime("{0:#}"), reinterpret_cast<void*>(0x42)),
-      format_error, "format specifier requires numeric argument");
-}
-
-TEST(format_test, zero_flag) {
-  EXPECT_EQ("42", fmt::format("{0:0}", 42));
-  EXPECT_EQ("-0042", fmt::format("{0:05}", -42));
-  EXPECT_EQ("00042", fmt::format("{0:05}", 42u));
-  EXPECT_EQ("-0042", fmt::format("{0:05}", -42l));
-  EXPECT_EQ("00042", fmt::format("{0:05}", 42ul));
-  EXPECT_EQ("-0042", fmt::format("{0:05}", -42ll));
-  EXPECT_EQ("00042", fmt::format("{0:05}", 42ull));
-  EXPECT_EQ("-000042", fmt::format("{0:07}", -42.0));
-  EXPECT_EQ("-000042", fmt::format("{0:07}", -42.0l));
-  EXPECT_THROW_MSG((void)fmt::format(runtime("{0:0"), 'c'), format_error,
-                   "missing '}' in format string");
-  EXPECT_THROW_MSG((void)fmt::format(runtime("{0:05}"), 'c'), format_error,
-                   "invalid format specifier for char");
-  EXPECT_THROW_MSG((void)fmt::format(runtime("{0:05}"), "abc"), format_error,
-                   "format specifier requires numeric argument");
-  EXPECT_THROW_MSG(
-      (void)fmt::format(runtime("{0:05}"), reinterpret_cast<void*>(0x42)),
-      format_error, "format specifier requires numeric argument");
-}
-
-TEST(format_test, width) {
-  char format_str[buffer_size];
-  safe_sprintf(format_str, "{0:%u", UINT_MAX);
-  increment(format_str + 3);
-  EXPECT_THROW_MSG((void)fmt::format(runtime(format_str), 0), format_error,
-                   "number is too big");
-  size_t size = std::strlen(format_str);
-  format_str[size] = '}';
-  format_str[size + 1] = 0;
-  EXPECT_THROW_MSG((void)fmt::format(runtime(format_str), 0), format_error,
-                   "number is too big");
-
-  safe_sprintf(format_str, "{0:%u", INT_MAX + 1u);
-  EXPECT_THROW_MSG((void)fmt::format(runtime(format_str), 0), format_error,
-                   "number is too big");
-  safe_sprintf(format_str, "{0:%u}", INT_MAX + 1u);
-  EXPECT_THROW_MSG((void)fmt::format(runtime(format_str), 0), format_error,
-                   "number is too big");
-  EXPECT_EQ(" -42", fmt::format("{0:4}", -42));
-  EXPECT_EQ("   42", fmt::format("{0:5}", 42u));
-  EXPECT_EQ("   -42", fmt::format("{0:6}", -42l));
-  EXPECT_EQ("     42", fmt::format("{0:7}", 42ul));
-  EXPECT_EQ("   -42", fmt::format("{0:6}", -42ll));
-  EXPECT_EQ("     42", fmt::format("{0:7}", 42ull));
-  EXPECT_EQ("   -1.23", fmt::format("{0:8}", -1.23));
-  EXPECT_EQ("    -1.23", fmt::format("{0:9}", -1.23l));
-  EXPECT_EQ("    0xcafe",
-            fmt::format("{0:10}", reinterpret_cast<void*>(0xcafe)));
-  EXPECT_EQ("x          ", fmt::format("{0:11}", 'x'));
-  EXPECT_EQ("str         ", fmt::format("{0:12}", "str"));
-  EXPECT_EQ(fmt::format("{:*^6}", "🤡"), "**🤡**");
-  EXPECT_EQ(fmt::format("{:*^8}", "你好"), "**你好**");
-  EXPECT_EQ(fmt::format("{:#6}", 42.0), "  42.0");
-  EXPECT_EQ(fmt::format("{:6c}", static_cast<int>('x')), "x     ");
-  EXPECT_EQ(fmt::format("{:>06.0f}", 0.00884311), "000000");
-}
-
-TEST(format_test, runtime_width) {
-  char format_str[buffer_size];
-  safe_sprintf(format_str, "{0:{%u", UINT_MAX);
-  increment(format_str + 4);
-  EXPECT_THROW_MSG((void)fmt::format(runtime(format_str), 0), format_error,
-                   "invalid format string");
-  size_t size = std::strlen(format_str);
-  format_str[size] = '}';
-  format_str[size + 1] = 0;
-  EXPECT_THROW_MSG((void)fmt::format(runtime(format_str), 0), format_error,
-                   "argument not found");
-  format_str[size + 1] = '}';
-  format_str[size + 2] = 0;
-  EXPECT_THROW_MSG((void)fmt::format(runtime(format_str), 0), format_error,
-                   "argument not found");
-
-  EXPECT_THROW_MSG((void)fmt::format(runtime("{0:{"), 0), format_error,
-                   "invalid format string");
-  EXPECT_THROW_MSG((void)fmt::format(runtime("{0:{}"), 0), format_error,
-                   "cannot switch from manual to automatic argument indexing");
-  EXPECT_THROW_MSG((void)fmt::format(runtime("{0:{?}}"), 0), format_error,
-                   "invalid format string");
-  EXPECT_THROW_MSG((void)fmt::format(runtime("{0:{1}}"), 0), format_error,
-                   "argument not found");
-
-  EXPECT_THROW_MSG((void)fmt::format(runtime("{0:{0:}}"), 0), format_error,
-                   "invalid format string");
-
-  EXPECT_THROW_MSG((void)fmt::format(runtime("{0:{1}}"), 0, -1), format_error,
-                   "negative width");
-  EXPECT_THROW_MSG((void)fmt::format(runtime("{0:{1}}"), 0, (INT_MAX + 1u)),
-                   format_error, "number is too big");
-  EXPECT_THROW_MSG((void)fmt::format(runtime("{0:{1}}"), 0, -1l), format_error,
-                   "negative width");
-  if (fmt::detail::const_check(sizeof(long) > sizeof(int))) {
-    long value = INT_MAX;
-    EXPECT_THROW_MSG((void)fmt::format(runtime("{0:{1}}"), 0, (value + 1)),
-                     format_error, "number is too big");
-  }
-  EXPECT_THROW_MSG((void)fmt::format(runtime("{0:{1}}"), 0, (INT_MAX + 1ul)),
-                   format_error, "number is too big");
-
-  EXPECT_THROW_MSG((void)fmt::format(runtime("{0:{1}}"), 0, '0'), format_error,
-                   "width is not integer");
-  EXPECT_THROW_MSG((void)fmt::format(runtime("{0:{1}}"), 0, 0.0), format_error,
-                   "width is not integer");
-
-  EXPECT_EQ(" -42", fmt::format("{0:{1}}", -42, 4));
-  EXPECT_EQ("   42", fmt::format("{0:{1}}", 42u, 5));
-  EXPECT_EQ("   -42", fmt::format("{0:{1}}", -42l, 6));
-  EXPECT_EQ("     42", fmt::format("{0:{1}}", 42ul, 7));
-  EXPECT_EQ("   -42", fmt::format("{0:{1}}", -42ll, 6));
-  EXPECT_EQ("     42", fmt::format("{0:{1}}", 42ull, 7));
-  EXPECT_EQ("   -1.23", fmt::format("{0:{1}}", -1.23, 8));
-  EXPECT_EQ("    -1.23", fmt::format("{0:{1}}", -1.23l, 9));
-  EXPECT_EQ("    0xcafe",
-            fmt::format("{0:{1}}", reinterpret_cast<void*>(0xcafe), 10));
-  EXPECT_EQ("x          ", fmt::format("{0:{1}}", 'x', 11));
-  EXPECT_EQ("str         ", fmt::format("{0:{1}}", "str", 12));
-}
-
-TEST(format_test, precision) {
-  char format_str[buffer_size];
-  safe_sprintf(format_str, "{0:.%u", UINT_MAX);
-  increment(format_str + 4);
-  EXPECT_THROW_MSG((void)fmt::format(runtime(format_str), 0), format_error,
-                   "number is too big");
-  size_t size = std::strlen(format_str);
-  format_str[size] = '}';
-  format_str[size + 1] = 0;
-  EXPECT_THROW_MSG((void)fmt::format(runtime(format_str), 0), format_error,
-                   "number is too big");
-
-  safe_sprintf(format_str, "{0:.%u", INT_MAX + 1u);
-  EXPECT_THROW_MSG((void)fmt::format(runtime(format_str), 0), format_error,
-                   "number is too big");
-  safe_sprintf(format_str, "{0:.%u}", INT_MAX + 1u);
-  EXPECT_THROW_MSG((void)fmt::format(runtime(format_str), 0), format_error,
-                   "number is too big");
-
-  EXPECT_THROW_MSG((void)fmt::format(runtime("{0:."), 0), format_error,
-                   "missing precision specifier");
-  EXPECT_THROW_MSG((void)fmt::format(runtime("{0:.}"), 0), format_error,
-                   "missing precision specifier");
-
-  EXPECT_THROW_MSG((void)fmt::format(runtime("{0:.2"), 0), format_error,
-                   "precision not allowed for this argument type");
-  EXPECT_THROW_MSG((void)fmt::format(runtime("{0:.2}"), 42), format_error,
-                   "precision not allowed for this argument type");
-  EXPECT_THROW_MSG((void)fmt::format(runtime("{0:.2f}"), 42), format_error,
-                   "precision not allowed for this argument type");
-  EXPECT_THROW_MSG((void)fmt::format(runtime("{0:.2}"), 42u), format_error,
-                   "precision not allowed for this argument type");
-  EXPECT_THROW_MSG((void)fmt::format(runtime("{0:.2f}"), 42u), format_error,
-                   "precision not allowed for this argument type");
-  EXPECT_THROW_MSG((void)fmt::format(runtime("{0:.2}"), 42l), format_error,
-                   "precision not allowed for this argument type");
-  EXPECT_THROW_MSG((void)fmt::format(runtime("{0:.2f}"), 42l), format_error,
-                   "precision not allowed for this argument type");
-  EXPECT_THROW_MSG((void)fmt::format(runtime("{0:.2}"), 42ul), format_error,
-                   "precision not allowed for this argument type");
-  EXPECT_THROW_MSG((void)fmt::format(runtime("{0:.2f}"), 42ul), format_error,
-                   "precision not allowed for this argument type");
-  EXPECT_THROW_MSG((void)fmt::format(runtime("{0:.2}"), 42ll), format_error,
-                   "precision not allowed for this argument type");
-  EXPECT_THROW_MSG((void)fmt::format(runtime("{0:.2f}"), 42ll), format_error,
-                   "precision not allowed for this argument type");
-  EXPECT_THROW_MSG((void)fmt::format(runtime("{0:.2}"), 42ull), format_error,
-                   "precision not allowed for this argument type");
-  EXPECT_THROW_MSG((void)fmt::format(runtime("{0:.2f}"), 42ull), format_error,
-                   "precision not allowed for this argument type");
-  EXPECT_THROW_MSG((void)fmt::format(runtime("{0:3.0}"), 'x'), format_error,
-                   "precision not allowed for this argument type");
-  EXPECT_EQ("1.2", fmt::format("{0:.2}", 1.2345));
-  EXPECT_EQ("1.2", fmt::format("{0:.2}", 1.2345l));
-  EXPECT_EQ("1.2e+56", fmt::format("{:.2}", 1.234e56));
-  EXPECT_EQ("1.1", fmt::format("{0:.3}", 1.1));
-  EXPECT_EQ("1e+00", fmt::format("{:.0e}", 1.0L));
-  EXPECT_EQ("  0.0e+00", fmt::format("{:9.1e}", 0.0));
-  EXPECT_EQ(
-      fmt::format("{:.494}", 4.9406564584124654E-324),
-      "4.9406564584124654417656879286822137236505980261432476442558568250067550"
-      "727020875186529983636163599237979656469544571773092665671035593979639877"
-      "479601078187812630071319031140452784581716784898210368871863605699873072"
-      "305000638740915356498438731247339727316961514003171538539807412623856559"
-      "117102665855668676818703956031062493194527159149245532930545654440112748"
-      "012970999954193198940908041656332452475714786901472678015935523861155013"
-      "480352649347201937902681071074917033322268447533357208324319361e-324");
-  EXPECT_EQ(
-      fmt::format("{:.1074f}", 1.1125369292536e-308),
-      "0.0000000000000000000000000000000000000000000000000000000000000000000000"
-      "000000000000000000000000000000000000000000000000000000000000000000000000"
-      "000000000000000000000000000000000000000000000000000000000000000000000000"
-      "000000000000000000000000000000000000000000000000000000000000000000000000"
-      "000000000000000000000111253692925360019747947051741965785554081512200979"
-      "355021686109411883779182127659725163430929750364498219730822952552570601"
-      "152163505899912777129583674906301179059298598412303893909188340988729019"
-      "014361467448914817838555156840459458527907308695109202499990850735085304"
-      "478476991912072201449236975063640913461919914396877093174125167509869762"
-      "482369631100360266123742648159508919592746619553246586039571522788247697"
-      "156360766271842991667238355464496455107749716934387136380536472531224398"
-      "559833794807213172371254492216255558078524900147957309382830827524104234"
-      "530961756787819847850302379672357738807808384667004752163416921762619527"
-      "462847642037420991432005657440259928195996762610375541867198059294212446"
-      "81962777939941034720757232455434770912461317493580281734466552734375");
-
-  std::string outputs[] = {
-      "-0X1.41FE3FFE71C9E000000000000000000000000000000000000000000000000000000"
-      "000000000000000000000000000000000000000000000000000000000000000000000000"
-      "000000000000000000000000000000000000000000000000000000000000000000000000"
-      "000000000000000000000000000000000000000000000000000000000000000000000000"
-      "000000000000000000000000000000000000000000000000000000000000000000000000"
-      "000000000000000000000000000000000000000000000000000000000000000000000000"
-      "000000000000000000000000000000000000000000000000000000000000000000000000"
-      "000000000000000000000000000000000000000000000000000000000000000000000000"
-      "000000000000000000000000000000000000000000000000000000000000000000000000"
-      "000000000000000000000000000000000000000000000000000000000000000000000000"
-      "000000000000000000000000000000000000000000000000000000000000000000000000"
-      "000000000000000000000000000000000000000000000000000P+127",
-      "-0XA.0FF1FFF38E4F0000000000000000000000000000000000000000000000000000000"
-      "000000000000000000000000000000000000000000000000000000000000000000000000"
-      "000000000000000000000000000000000000000000000000000000000000000000000000"
-      "000000000000000000000000000000000000000000000000000000000000000000000000"
-      "000000000000000000000000000000000000000000000000000000000000000000000000"
-      "000000000000000000000000000000000000000000000000000000000000000000000000"
-      "000000000000000000000000000000000000000000000000000000000000000000000000"
-      "000000000000000000000000000000000000000000000000000000000000000000000000"
-      "000000000000000000000000000000000000000000000000000000000000000000000000"
-      "000000000000000000000000000000000000000000000000000000000000000000000000"
-      "000000000000000000000000000000000000000000000000000000000000000000000000"
-      "000000000000000000000000000000000000000000000000000P+124"};
-  EXPECT_THAT(outputs,
-              testing::Contains(fmt::format("{:.838A}", -2.14001164E+38)));
-
-  EXPECT_EQ("123.", fmt::format("{:#.0f}", 123.0));
-  EXPECT_EQ("1.23", fmt::format("{:.02f}", 1.234));
-  EXPECT_EQ("0.001", fmt::format("{:.1g}", 0.001));
-  EXPECT_EQ("1019666400", fmt::format("{}", 1019666432.0f));
-  EXPECT_EQ("1e+01", fmt::format("{:.0e}", 9.5));
-  EXPECT_EQ("1.0e-34", fmt::format("{:.1e}", 1e-34));
-
-  EXPECT_THROW_MSG(
-      (void)fmt::format(runtime("{0:.2}"), reinterpret_cast<void*>(0xcafe)),
-      format_error, "precision not allowed for this argument type");
-  EXPECT_THROW_MSG(
-      (void)fmt::format(runtime("{0:.2f}"), reinterpret_cast<void*>(0xcafe)),
-      format_error, "precision not allowed for this argument type");
-  EXPECT_THROW_MSG((void)fmt::format(runtime("{:.{}e}"), 42.0,
-                                     fmt::detail::max_value<int>()),
-                   format_error, "number is too big");
-  EXPECT_THROW_MSG(
-      (void)fmt::format("{:.2147483646f}", -2.2121295195081227E+304),
-      format_error, "number is too big");
-
-  EXPECT_EQ("st", fmt::format("{0:.2}", "str"));
-}
-
-TEST(format_test, runtime_precision) {
-  char format_str[buffer_size];
-  safe_sprintf(format_str, "{0:.{%u", UINT_MAX);
-  increment(format_str + 5);
-  EXPECT_THROW_MSG((void)fmt::format(runtime(format_str), 0), format_error,
-                   "invalid format string");
-  size_t size = std::strlen(format_str);
-  format_str[size] = '}';
-  format_str[size + 1] = 0;
-  EXPECT_THROW_MSG((void)fmt::format(runtime(format_str), 0), format_error,
-                   "argument not found");
-  format_str[size + 1] = '}';
-  format_str[size + 2] = 0;
-  EXPECT_THROW_MSG((void)fmt::format(runtime(format_str), 0), format_error,
-                   "argument not found");
-
-  EXPECT_THROW_MSG((void)fmt::format(runtime("{0:.{"), 0), format_error,
-                   "invalid format string");
-  EXPECT_THROW_MSG((void)fmt::format(runtime("{0:.{}"), 0), format_error,
-                   "cannot switch from manual to automatic argument indexing");
-  EXPECT_THROW_MSG((void)fmt::format(runtime("{0:.{?}}"), 0), format_error,
-                   "invalid format string");
-  EXPECT_THROW_MSG((void)fmt::format(runtime("{0:.{1}"), 0, 0), format_error,
-                   "precision not allowed for this argument type");
-  EXPECT_THROW_MSG((void)fmt::format(runtime("{0:.{1}}"), 0), format_error,
-                   "argument not found");
-
-  EXPECT_THROW_MSG((void)fmt::format(runtime("{0:.{0:}}"), 0), format_error,
-                   "invalid format string");
-
-  EXPECT_THROW_MSG((void)fmt::format(runtime("{0:.{1}}"), 0, -1), format_error,
-                   "negative precision");
-  EXPECT_THROW_MSG((void)fmt::format(runtime("{0:.{1}}"), 0, (INT_MAX + 1u)),
-                   format_error, "number is too big");
-  EXPECT_THROW_MSG((void)fmt::format(runtime("{0:.{1}}"), 0, -1l), format_error,
-                   "negative precision");
-  if (fmt::detail::const_check(sizeof(long) > sizeof(int))) {
-    long value = INT_MAX;
-    EXPECT_THROW_MSG((void)fmt::format(runtime("{0:.{1}}"), 0, (value + 1)),
-                     format_error, "number is too big");
-  }
-  EXPECT_THROW_MSG((void)fmt::format(runtime("{0:.{1}}"), 0, (INT_MAX + 1ul)),
-                   format_error, "number is too big");
-
-  EXPECT_THROW_MSG((void)fmt::format(runtime("{0:.{1}}"), 0, '0'), format_error,
-                   "precision is not integer");
-  EXPECT_THROW_MSG((void)fmt::format(runtime("{0:.{1}}"), 0, 0.0), format_error,
-                   "precision is not integer");
-
-  EXPECT_THROW_MSG((void)fmt::format(runtime("{0:.{1}}"), 42, 2), format_error,
-                   "precision not allowed for this argument type");
-  EXPECT_THROW_MSG((void)fmt::format(runtime("{0:.{1}f}"), 42, 2), format_error,
-                   "precision not allowed for this argument type");
-  EXPECT_THROW_MSG((void)fmt::format(runtime("{0:.{1}}"), 42u, 2), format_error,
-                   "precision not allowed for this argument type");
-  EXPECT_THROW_MSG((void)fmt::format(runtime("{0:.{1}f}"), 42u, 2),
-                   format_error,
-                   "precision not allowed for this argument type");
-  EXPECT_THROW_MSG((void)fmt::format(runtime("{0:.{1}}"), 42l, 2), format_error,
-                   "precision not allowed for this argument type");
-  EXPECT_THROW_MSG((void)fmt::format(runtime("{0:.{1}f}"), 42l, 2),
-                   format_error,
-                   "precision not allowed for this argument type");
-  EXPECT_THROW_MSG((void)fmt::format(runtime("{0:.{1}}"), 42ul, 2),
-                   format_error,
-                   "precision not allowed for this argument type");
-  EXPECT_THROW_MSG((void)fmt::format(runtime("{0:.{1}f}"), 42ul, 2),
-                   format_error,
-                   "precision not allowed for this argument type");
-  EXPECT_THROW_MSG((void)fmt::format(runtime("{0:.{1}}"), 42ll, 2),
-                   format_error,
-                   "precision not allowed for this argument type");
-  EXPECT_THROW_MSG((void)fmt::format(runtime("{0:.{1}f}"), 42ll, 2),
-                   format_error,
-                   "precision not allowed for this argument type");
-  EXPECT_THROW_MSG((void)fmt::format(runtime("{0:.{1}}"), 42ull, 2),
-                   format_error,
-                   "precision not allowed for this argument type");
-  EXPECT_THROW_MSG((void)fmt::format(runtime("{0:.{1}f}"), 42ull, 2),
-                   format_error,
-                   "precision not allowed for this argument type");
-  EXPECT_THROW_MSG((void)fmt::format(runtime("{0:3.{1}}"), 'x', 0),
-                   format_error,
-                   "precision not allowed for this argument type");
-  EXPECT_EQ("1.2", fmt::format("{0:.{1}}", 1.2345, 2));
-  EXPECT_EQ("1.2", fmt::format("{1:.{0}}", 2, 1.2345l));
-
-  EXPECT_THROW_MSG((void)fmt::format(runtime("{0:.{1}}"),
-                                     reinterpret_cast<void*>(0xcafe), 2),
-                   format_error,
-                   "precision not allowed for this argument type");
-  EXPECT_THROW_MSG((void)fmt::format(runtime("{0:.{1}f}"),
-                                     reinterpret_cast<void*>(0xcafe), 2),
-                   format_error,
-                   "precision not allowed for this argument type");
-
-  EXPECT_EQ("st", fmt::format("{0:.{1}}", "str", 2));
-}
-
-TEST(format_test, format_bool) {
-  EXPECT_EQ("true", fmt::format("{}", true));
-  EXPECT_EQ("false", fmt::format("{}", false));
-  EXPECT_EQ("1", fmt::format("{:d}", true));
-  EXPECT_EQ("true ", fmt::format("{:5}", true));
-  EXPECT_EQ("true", fmt::format("{:s}", true));
-  EXPECT_EQ("false", fmt::format("{:s}", false));
-  EXPECT_EQ("false ", fmt::format("{:6s}", false));
-}
-
-TEST(format_test, format_short) {
-  short s = 42;
-  EXPECT_EQ("42", fmt::format("{0:d}", s));
-  unsigned short us = 42;
-  EXPECT_EQ("42", fmt::format("{0:d}", us));
-}
-
-template <typename T>
-void check_unknown_types(const T& value, const char* types, const char*) {
-  char format_str[buffer_size];
-  const char* special = ".0123456789L}";
-  for (int i = CHAR_MIN; i <= CHAR_MAX; ++i) {
-    char c = static_cast<char>(i);
-    if (std::strchr(types, c) || std::strchr(special, c) || !c) continue;
-    safe_sprintf(format_str, "{0:10%c}", c);
-    const char* message = "invalid type specifier";
-    EXPECT_THROW_MSG((void)fmt::format(runtime(format_str), value),
-                     format_error, message)
-        << format_str << " " << message;
-  }
-}
-
-TEST(format_test, format_int) {
-  EXPECT_THROW_MSG((void)fmt::format(runtime("{0:v"), 42), format_error,
-                   "invalid type specifier");
-  check_unknown_types(42, "bBdoxXnLc", "integer");
-  EXPECT_EQ("x", fmt::format("{:c}", static_cast<int>('x')));
-}
-
-TEST(format_test, format_bin) {
-  EXPECT_EQ("0", fmt::format("{0:b}", 0));
-  EXPECT_EQ("101010", fmt::format("{0:b}", 42));
-  EXPECT_EQ("101010", fmt::format("{0:b}", 42u));
-  EXPECT_EQ("-101010", fmt::format("{0:b}", -42));
-  EXPECT_EQ("11000000111001", fmt::format("{0:b}", 12345));
-  EXPECT_EQ("10010001101000101011001111000", fmt::format("{0:b}", 0x12345678));
-  EXPECT_EQ("10010000101010111100110111101111",
-            fmt::format("{0:b}", 0x90ABCDEF));
-  EXPECT_EQ("11111111111111111111111111111111",
-            fmt::format("{0:b}", max_value<uint32_t>()));
-}
-
-#if FMT_USE_INT128
-constexpr auto int128_max = static_cast<__int128_t>(
-    (static_cast<__uint128_t>(1) << ((__SIZEOF_INT128__ * CHAR_BIT) - 1)) - 1);
-constexpr auto int128_min = -int128_max - 1;
-
-constexpr auto uint128_max = ~static_cast<__uint128_t>(0);
-#endif
-
-TEST(format_test, format_dec) {
-  EXPECT_EQ("0", fmt::format("{0}", 0));
-  EXPECT_EQ("42", fmt::format("{0}", 42));
-  EXPECT_EQ("42", fmt::format("{0:d}", 42));
-  EXPECT_EQ("42", fmt::format("{0}", 42u));
-  EXPECT_EQ("-42", fmt::format("{0}", -42));
-  EXPECT_EQ("12345", fmt::format("{0}", 12345));
-  EXPECT_EQ("67890", fmt::format("{0}", 67890));
-#if FMT_USE_INT128
-  EXPECT_EQ("0", fmt::format("{0}", static_cast<__int128_t>(0)));
-  EXPECT_EQ("0", fmt::format("{0}", static_cast<__uint128_t>(0)));
-  EXPECT_EQ("9223372036854775808",
-            fmt::format("{0}", static_cast<__int128_t>(INT64_MAX) + 1));
-  EXPECT_EQ("-9223372036854775809",
-            fmt::format("{0}", static_cast<__int128_t>(INT64_MIN) - 1));
-  EXPECT_EQ("18446744073709551616",
-            fmt::format("{0}", static_cast<__int128_t>(UINT64_MAX) + 1));
-  EXPECT_EQ("170141183460469231731687303715884105727",
-            fmt::format("{0}", int128_max));
-  EXPECT_EQ("-170141183460469231731687303715884105728",
-            fmt::format("{0}", int128_min));
-  EXPECT_EQ("340282366920938463463374607431768211455",
-            fmt::format("{0}", uint128_max));
-#endif
-
-  char buffer[buffer_size];
-  safe_sprintf(buffer, "%d", INT_MIN);
-  EXPECT_EQ(buffer, fmt::format("{0}", INT_MIN));
-  safe_sprintf(buffer, "%d", INT_MAX);
-  EXPECT_EQ(buffer, fmt::format("{0}", INT_MAX));
-  safe_sprintf(buffer, "%u", UINT_MAX);
-  EXPECT_EQ(buffer, fmt::format("{0}", UINT_MAX));
-  safe_sprintf(buffer, "%ld", 0 - static_cast<unsigned long>(LONG_MIN));
-  EXPECT_EQ(buffer, fmt::format("{0}", LONG_MIN));
-  safe_sprintf(buffer, "%ld", LONG_MAX);
-  EXPECT_EQ(buffer, fmt::format("{0}", LONG_MAX));
-  safe_sprintf(buffer, "%lu", ULONG_MAX);
-  EXPECT_EQ(buffer, fmt::format("{0}", ULONG_MAX));
-}
-
-TEST(format_test, format_hex) {
-  EXPECT_EQ("0", fmt::format("{0:x}", 0));
-  EXPECT_EQ("42", fmt::format("{0:x}", 0x42));
-  EXPECT_EQ("42", fmt::format("{0:x}", 0x42u));
-  EXPECT_EQ("-42", fmt::format("{0:x}", -0x42));
-  EXPECT_EQ("12345678", fmt::format("{0:x}", 0x12345678));
-  EXPECT_EQ("90abcdef", fmt::format("{0:x}", 0x90abcdef));
-  EXPECT_EQ("12345678", fmt::format("{0:X}", 0x12345678));
-  EXPECT_EQ("90ABCDEF", fmt::format("{0:X}", 0x90ABCDEF));
-#if FMT_USE_INT128
-  EXPECT_EQ("0", fmt::format("{0:x}", static_cast<__int128_t>(0)));
-  EXPECT_EQ("0", fmt::format("{0:x}", static_cast<__uint128_t>(0)));
-  EXPECT_EQ("8000000000000000",
-            fmt::format("{0:x}", static_cast<__int128_t>(INT64_MAX) + 1));
-  EXPECT_EQ("-8000000000000001",
-            fmt::format("{0:x}", static_cast<__int128_t>(INT64_MIN) - 1));
-  EXPECT_EQ("10000000000000000",
-            fmt::format("{0:x}", static_cast<__int128_t>(UINT64_MAX) + 1));
-  EXPECT_EQ("7fffffffffffffffffffffffffffffff",
-            fmt::format("{0:x}", int128_max));
-  EXPECT_EQ("-80000000000000000000000000000000",
-            fmt::format("{0:x}", int128_min));
-  EXPECT_EQ("ffffffffffffffffffffffffffffffff",
-            fmt::format("{0:x}", uint128_max));
-#endif
-
-  char buffer[buffer_size];
-  safe_sprintf(buffer, "-%x", 0 - static_cast<unsigned>(INT_MIN));
-  EXPECT_EQ(buffer, fmt::format("{0:x}", INT_MIN));
-  safe_sprintf(buffer, "%x", INT_MAX);
-  EXPECT_EQ(buffer, fmt::format("{0:x}", INT_MAX));
-  safe_sprintf(buffer, "%x", UINT_MAX);
-  EXPECT_EQ(buffer, fmt::format("{0:x}", UINT_MAX));
-  safe_sprintf(buffer, "-%lx", 0 - static_cast<unsigned long>(LONG_MIN));
-  EXPECT_EQ(buffer, fmt::format("{0:x}", LONG_MIN));
-  safe_sprintf(buffer, "%lx", LONG_MAX);
-  EXPECT_EQ(buffer, fmt::format("{0:x}", LONG_MAX));
-  safe_sprintf(buffer, "%lx", ULONG_MAX);
-  EXPECT_EQ(buffer, fmt::format("{0:x}", ULONG_MAX));
-}
-
-TEST(format_test, format_oct) {
-  EXPECT_EQ("0", fmt::format("{0:o}", 0));
-  EXPECT_EQ("42", fmt::format("{0:o}", 042));
-  EXPECT_EQ("42", fmt::format("{0:o}", 042u));
-  EXPECT_EQ("-42", fmt::format("{0:o}", -042));
-  EXPECT_EQ("12345670", fmt::format("{0:o}", 012345670));
-#if FMT_USE_INT128
-  EXPECT_EQ("0", fmt::format("{0:o}", static_cast<__int128_t>(0)));
-  EXPECT_EQ("0", fmt::format("{0:o}", static_cast<__uint128_t>(0)));
-  EXPECT_EQ("1000000000000000000000",
-            fmt::format("{0:o}", static_cast<__int128_t>(INT64_MAX) + 1));
-  EXPECT_EQ("-1000000000000000000001",
-            fmt::format("{0:o}", static_cast<__int128_t>(INT64_MIN) - 1));
-  EXPECT_EQ("2000000000000000000000",
-            fmt::format("{0:o}", static_cast<__int128_t>(UINT64_MAX) + 1));
-  EXPECT_EQ("1777777777777777777777777777777777777777777",
-            fmt::format("{0:o}", int128_max));
-  EXPECT_EQ("-2000000000000000000000000000000000000000000",
-            fmt::format("{0:o}", int128_min));
-  EXPECT_EQ("3777777777777777777777777777777777777777777",
-            fmt::format("{0:o}", uint128_max));
-#endif
-
-  char buffer[buffer_size];
-  safe_sprintf(buffer, "-%o", 0 - static_cast<unsigned>(INT_MIN));
-  EXPECT_EQ(buffer, fmt::format("{0:o}", INT_MIN));
-  safe_sprintf(buffer, "%o", INT_MAX);
-  EXPECT_EQ(buffer, fmt::format("{0:o}", INT_MAX));
-  safe_sprintf(buffer, "%o", UINT_MAX);
-  EXPECT_EQ(buffer, fmt::format("{0:o}", UINT_MAX));
-  safe_sprintf(buffer, "-%lo", 0 - static_cast<unsigned long>(LONG_MIN));
-  EXPECT_EQ(buffer, fmt::format("{0:o}", LONG_MIN));
-  safe_sprintf(buffer, "%lo", LONG_MAX);
-  EXPECT_EQ(buffer, fmt::format("{0:o}", LONG_MAX));
-  safe_sprintf(buffer, "%lo", ULONG_MAX);
-  EXPECT_EQ(buffer, fmt::format("{0:o}", ULONG_MAX));
-}
-
-TEST(format_test, format_int_locale) {
-  EXPECT_EQ("1234", fmt::format("{:L}", 1234));
-}
-
-TEST(format_test, format_float) {
-  EXPECT_EQ("0", fmt::format("{}", 0.0f));
-  EXPECT_EQ("392.500000", fmt::format("{0:f}", 392.5f));
-}
-
-TEST(format_test, format_double) {
-  EXPECT_EQ("0", fmt::format("{}", 0.0));
-  check_unknown_types(1.2, "eEfFgGaAnL%", "double");
-  EXPECT_EQ("0", fmt::format("{:}", 0.0));
-  EXPECT_EQ("0.000000", fmt::format("{:f}", 0.0));
-  EXPECT_EQ("0", fmt::format("{:g}", 0.0));
-  EXPECT_EQ("392.65", fmt::format("{:}", 392.65));
-  EXPECT_EQ("392.65", fmt::format("{:g}", 392.65));
-  EXPECT_EQ("392.65", fmt::format("{:G}", 392.65));
-  EXPECT_EQ("4.9014e+06", fmt::format("{:g}", 4.9014e6));
-  EXPECT_EQ("392.650000", fmt::format("{:f}", 392.65));
-  EXPECT_EQ("392.650000", fmt::format("{:F}", 392.65));
-  EXPECT_EQ("42", fmt::format("{:L}", 42.0));
-  EXPECT_EQ("    0x1.0cccccccccccdp+2", fmt::format("{:24a}", 4.2));
-  EXPECT_EQ("0x1.0cccccccccccdp+2    ", fmt::format("{:<24a}", 4.2));
-  char buffer[buffer_size];
-  safe_sprintf(buffer, "%e", 392.65);
-  EXPECT_EQ(buffer, fmt::format("{0:e}", 392.65));
-  safe_sprintf(buffer, "%E", 392.65);
-  EXPECT_EQ(buffer, fmt::format("{0:E}", 392.65));
-  EXPECT_EQ("+0000392.6", fmt::format("{0:+010.4g}", 392.65));
-  safe_sprintf(buffer, "%a", -42.0);
-  EXPECT_EQ(buffer, fmt::format("{:a}", -42.0));
-  safe_sprintf(buffer, "%A", -42.0);
-  EXPECT_EQ(buffer, fmt::format("{:A}", -42.0));
-  EXPECT_EQ("9223372036854775808.000000",
-            fmt::format("{:f}", 9223372036854775807.0));
-}
-
-TEST(format_test, precision_rounding) {
-  EXPECT_EQ("0", fmt::format("{:.0f}", 0.0));
-  EXPECT_EQ("0", fmt::format("{:.0f}", 0.01));
-  EXPECT_EQ("0", fmt::format("{:.0f}", 0.1));
-  EXPECT_EQ("0.000", fmt::format("{:.3f}", 0.00049));
-  EXPECT_EQ("0.001", fmt::format("{:.3f}", 0.0005));
-  EXPECT_EQ("0.001", fmt::format("{:.3f}", 0.00149));
-  EXPECT_EQ("0.002", fmt::format("{:.3f}", 0.0015));
-  EXPECT_EQ("1.000", fmt::format("{:.3f}", 0.9999));
-  EXPECT_EQ("0.00123", fmt::format("{:.3}", 0.00123));
-  EXPECT_EQ("0.1", fmt::format("{:.16g}", 0.1));
-  EXPECT_EQ("1", fmt::format("{:.0}", 1.0));
-  EXPECT_EQ("225.51575035152063720",
-            fmt::format("{:.17f}", 225.51575035152064));
-  EXPECT_EQ("-761519619559038.2", fmt::format("{:.1f}", -761519619559038.2));
-  EXPECT_EQ("1.9156918820264798e-56",
-            fmt::format("{}", 1.9156918820264798e-56));
-  EXPECT_EQ("0.0000", fmt::format("{:.4f}", 7.2809479766055470e-15));
-
-  // Trigger a rounding error in Grisu by a specially chosen number.
-  EXPECT_EQ("3788512123356.985352", fmt::format("{:f}", 3788512123356.985352));
-}
-
-TEST(format_test, prettify_float) {
-  EXPECT_EQ("0.0001", fmt::format("{}", 1e-4));
-  EXPECT_EQ("1e-05", fmt::format("{}", 1e-5));
-  EXPECT_EQ("1000000000000000", fmt::format("{}", 1e15));
-  EXPECT_EQ("1e+16", fmt::format("{}", 1e16));
-  EXPECT_EQ("9.999e-05", fmt::format("{}", 9.999e-5));
-  EXPECT_EQ("10000000000", fmt::format("{}", 1e10));
-  EXPECT_EQ("100000000000", fmt::format("{}", 1e11));
-  EXPECT_EQ("12340000000", fmt::format("{}", 1234e7));
-  EXPECT_EQ("12.34", fmt::format("{}", 1234e-2));
-  EXPECT_EQ("0.001234", fmt::format("{}", 1234e-6));
-  EXPECT_EQ("0.1", fmt::format("{}", 0.1f));
-  EXPECT_EQ("0.10000000149011612", fmt::format("{}", double(0.1f)));
-  EXPECT_EQ("1.3563156e-19", fmt::format("{}", 1.35631564e-19f));
-}
-
-TEST(format_test, format_nan) {
-  double nan = std::numeric_limits<double>::quiet_NaN();
-  EXPECT_EQ("nan", fmt::format("{}", nan));
-  EXPECT_EQ("+nan", fmt::format("{:+}", nan));
-  EXPECT_EQ("  +nan", fmt::format("{:+06}", nan));
-  EXPECT_EQ("+nan  ", fmt::format("{:<+06}", nan));
-  EXPECT_EQ(" +nan ", fmt::format("{:^+06}", nan));
-  EXPECT_EQ("  +nan", fmt::format("{:>+06}", nan));
-  if (std::signbit(-nan)) {
-    EXPECT_EQ("-nan", fmt::format("{}", -nan));
-    EXPECT_EQ("  -nan", fmt::format("{:+06}", -nan));
-  } else {
-    fmt::print("Warning: compiler doesn't handle negative NaN correctly");
-  }
-  EXPECT_EQ(" nan", fmt::format("{: }", nan));
-  EXPECT_EQ("NAN", fmt::format("{:F}", nan));
-  EXPECT_EQ("nan    ", fmt::format("{:<7}", nan));
-  EXPECT_EQ("  nan  ", fmt::format("{:^7}", nan));
-  EXPECT_EQ("    nan", fmt::format("{:>7}", nan));
-}
-
-TEST(format_test, format_infinity) {
-  double inf = std::numeric_limits<double>::infinity();
-  EXPECT_EQ("inf", fmt::format("{}", inf));
-  EXPECT_EQ("+inf", fmt::format("{:+}", inf));
-  EXPECT_EQ("-inf", fmt::format("{}", -inf));
-  EXPECT_EQ("  +inf", fmt::format("{:+06}", inf));
-  EXPECT_EQ("  -inf", fmt::format("{:+06}", -inf));
-  EXPECT_EQ("+inf  ", fmt::format("{:<+06}", inf));
-  EXPECT_EQ(" +inf ", fmt::format("{:^+06}", inf));
-  EXPECT_EQ("  +inf", fmt::format("{:>+06}", inf));
-  EXPECT_EQ(" inf", fmt::format("{: }", inf));
-  EXPECT_EQ("INF", fmt::format("{:F}", inf));
-  EXPECT_EQ("inf    ", fmt::format("{:<7}", inf));
-  EXPECT_EQ("  inf  ", fmt::format("{:^7}", inf));
-  EXPECT_EQ("    inf", fmt::format("{:>7}", inf));
-}
-
-TEST(format_test, format_long_double) {
-  EXPECT_EQ("0", fmt::format("{0:}", 0.0l));
-  EXPECT_EQ("0.000000", fmt::format("{0:f}", 0.0l));
-  EXPECT_EQ("392.65", fmt::format("{0:}", 392.65l));
-  EXPECT_EQ("392.65", fmt::format("{0:g}", 392.65l));
-  EXPECT_EQ("392.65", fmt::format("{0:G}", 392.65l));
-  EXPECT_EQ("392.650000", fmt::format("{0:f}", 392.65l));
-  EXPECT_EQ("392.650000", fmt::format("{0:F}", 392.65l));
-  char buffer[buffer_size];
-  safe_sprintf(buffer, "%Le", 392.65l);
-  EXPECT_EQ(buffer, fmt::format("{0:e}", 392.65l));
-  EXPECT_EQ("+0000392.6", fmt::format("{0:+010.4g}", 392.64l));
-  safe_sprintf(buffer, "%La", 3.31l);
-  EXPECT_EQ(buffer, fmt::format("{:a}", 3.31l));
-}
-
-TEST(format_test, format_char) {
-  const char types[] = "cbBdoxX";
-  check_unknown_types('a', types, "char");
-  EXPECT_EQ("a", fmt::format("{0}", 'a'));
-  EXPECT_EQ("z", fmt::format("{0:c}", 'z'));
-  int n = 'x';
-  for (const char* type = types + 1; *type; ++type) {
-    std::string format_str = fmt::format("{{:{}}}", *type);
-    EXPECT_EQ(fmt::format(runtime(format_str), n),
-              fmt::format(runtime(format_str), 'x'))
-        << format_str;
-  }
-  EXPECT_EQ(fmt::format("{:02X}", n), fmt::format("{:02X}", 'x'));
-}
-
-TEST(format_test, format_volatile_char) {
-  volatile char c = 'x';
-  EXPECT_EQ("x", fmt::format("{}", c));
-}
-
-TEST(format_test, format_unsigned_char) {
-  EXPECT_EQ("42", fmt::format("{}", static_cast<unsigned char>(42)));
-  EXPECT_EQ("42", fmt::format("{}", static_cast<uint8_t>(42)));
-}
-
-TEST(format_test, format_cstring) {
-  check_unknown_types("test", "sp", "string");
-  EXPECT_EQ("test", fmt::format("{0}", "test"));
-  EXPECT_EQ("test", fmt::format("{0:s}", "test"));
-  char nonconst[] = "nonconst";
-  EXPECT_EQ("nonconst", fmt::format("{0}", nonconst));
-  EXPECT_THROW_MSG(
-      (void)fmt::format(runtime("{0}"), static_cast<const char*>(nullptr)),
-      format_error, "string pointer is null");
-}
-
-void function_pointer_test(int, double, std::string) {}
-
-TEST(format_test, format_pointer) {
-  check_unknown_types(reinterpret_cast<void*>(0x1234), "p", "pointer");
-  EXPECT_EQ("0x0", fmt::format("{0}", static_cast<void*>(nullptr)));
-  EXPECT_EQ("0x1234", fmt::format("{0}", reinterpret_cast<void*>(0x1234)));
-  EXPECT_EQ("0x1234", fmt::format("{0:p}", reinterpret_cast<void*>(0x1234)));
-  EXPECT_EQ("0x" + std::string(sizeof(void*) * CHAR_BIT / 4, 'f'),
-            fmt::format("{0}", reinterpret_cast<void*>(~uintptr_t())));
-  EXPECT_EQ("0x1234",
-            fmt::format("{}", fmt::ptr(reinterpret_cast<int*>(0x1234))));
-  std::unique_ptr<int> up(new int(1));
-  EXPECT_EQ(fmt::format("{}", fmt::ptr(up.get())),
-            fmt::format("{}", fmt::ptr(up)));
-  std::shared_ptr<int> sp(new int(1));
-  EXPECT_EQ(fmt::format("{}", fmt::ptr(sp.get())),
-            fmt::format("{}", fmt::ptr(sp)));
-  EXPECT_EQ(fmt::format("{}", fmt::detail::bit_cast<const void*>(
-                                  &function_pointer_test)),
-            fmt::format("{}", fmt::ptr(function_pointer_test)));
-  EXPECT_EQ("0x0", fmt::format("{}", nullptr));
-}
-
-TEST(format_test, format_string) {
-  EXPECT_EQ("test", fmt::format("{0}", std::string("test")));
-  EXPECT_THROW((void)fmt::format(fmt::runtime("{:x}"), std::string("test")),
-               fmt::format_error);
-}
-
-TEST(format_test, format_string_view) {
-  EXPECT_EQ("test", fmt::format("{}", string_view("test")));
-  EXPECT_EQ("", fmt::format("{}", string_view()));
-}
-
-#ifdef FMT_USE_STRING_VIEW
-struct string_viewable {};
-
-FMT_BEGIN_NAMESPACE
-template <> struct formatter<string_viewable> : formatter<std::string_view> {
-  auto format(string_viewable, format_context& ctx) -> decltype(ctx.out()) {
-    return formatter<std::string_view>::format("foo", ctx);
-  }
-};
-FMT_END_NAMESPACE
-
-TEST(format_test, format_std_string_view) {
-  EXPECT_EQ("test", fmt::format("{}", std::string_view("test")));
-  EXPECT_EQ("foo", fmt::format("{}", string_viewable()));
-}
-
-struct explicitly_convertible_to_std_string_view {
-  explicit operator std::string_view() const { return "foo"; }
-};
-
-template <>
-struct fmt::formatter<explicitly_convertible_to_std_string_view>
-    : formatter<std::string_view> {
-  auto format(explicitly_convertible_to_std_string_view v, format_context& ctx)
-      -> decltype(ctx.out()) {
-    return format_to(ctx.out(), "'{}'", std::string_view(v));
-  }
-};
-
-TEST(format_test, format_explicitly_convertible_to_std_string_view) {
-  EXPECT_EQ("'foo'",
-            fmt::format("{}", explicitly_convertible_to_std_string_view()));
-}
-#endif
-
-struct converible_to_anything {
-  template <typename T> operator T() const { return T(); }
-};
-
-FMT_BEGIN_NAMESPACE
-template <> struct formatter<converible_to_anything> {
-  FMT_CONSTEXPR auto parse(format_parse_context& ctx) -> decltype(ctx.begin()) {
-    return ctx.begin();
-  }
-
-  auto format(converible_to_anything, format_context& ctx)
-      -> decltype(ctx.out()) {
-    return format_to(ctx.out(), "foo");
-  }
-};
-FMT_END_NAMESPACE
-
-TEST(format_test, format_convertible_to_anything) {
-  EXPECT_EQ("foo", fmt::format("{}", converible_to_anything()));
-}
-
-class Answer {};
-
-FMT_BEGIN_NAMESPACE
-template <> struct formatter<date> {
-  template <typename ParseContext>
-  FMT_CONSTEXPR auto parse(ParseContext& ctx) -> decltype(ctx.begin()) {
-    auto it = ctx.begin();
-    if (it != ctx.end() && *it == 'd') ++it;
-    return it;
-  }
-
-  auto format(const date& d, format_context& ctx) -> decltype(ctx.out()) {
-    format_to(ctx.out(), "{}-{}-{}", d.year(), d.month(), d.day());
-    return ctx.out();
-  }
-};
-
-template <> struct formatter<Answer> : formatter<int> {
-  template <typename FormatContext>
-  auto format(Answer, FormatContext& ctx) -> decltype(ctx.out()) {
-    return formatter<int>::format(42, ctx);
-  }
-};
-FMT_END_NAMESPACE
-
-TEST(format_test, format_custom) {
-  EXPECT_THROW_MSG((void)fmt::format(runtime("{:s}"), date(2012, 12, 9)),
-                   format_error, "unknown format specifier");
-  EXPECT_EQ("42", fmt::format("{0}", Answer()));
-  EXPECT_EQ("0042", fmt::format("{:04}", Answer()));
-}
-
-TEST(format_test, format_to_custom) {
-  char buf[10] = {};
-  auto end =
-      &*fmt::format_to(fmt::detail::make_checked(buf, 10), "{}", Answer());
-  EXPECT_EQ(end, buf + 2);
-  EXPECT_STREQ(buf, "42");
-}
-
-TEST(format_test, format_string_from_speed_test) {
-  EXPECT_EQ("1.2340000000:0042:+3.13:str:0x3e8:X:%",
-            fmt::format("{0:0.10f}:{1:04}:{2:+g}:{3}:{4}:{5}:%", 1.234, 42,
-                        3.13, "str", reinterpret_cast<void*>(1000), 'X'));
-}
-
-TEST(format_test, format_examples) {
-  std::string message = fmt::format("The answer is {}", 42);
-  EXPECT_EQ("The answer is 42", message);
-
-  EXPECT_EQ("42", fmt::format("{}", 42));
-
-  memory_buffer out;
-  format_to(std::back_inserter(out), "The answer is {}.", 42);
-  EXPECT_EQ("The answer is 42.", to_string(out));
-
-  const char* filename = "nonexistent";
-  FILE* ftest = safe_fopen(filename, "r");
-  if (ftest) fclose(ftest);
-  int error_code = errno;
-  EXPECT_TRUE(ftest == nullptr);
-  EXPECT_SYSTEM_ERROR(
-      {
-        FILE* f = safe_fopen(filename, "r");
-        if (!f)
-          throw fmt::system_error(errno, "Cannot open file '{}'", filename);
-        fclose(f);
-      },
-      error_code, "Cannot open file 'nonexistent'");
-
-  EXPECT_EQ("First, thou shalt count to three",
-            fmt::format("First, thou shalt count to {0}", "three"));
-  EXPECT_EQ("Bring me a shrubbery", fmt::format("Bring me a {}", "shrubbery"));
-  EXPECT_EQ("From 1 to 3", fmt::format("From {} to {}", 1, 3));
-
-  char buffer[buffer_size];
-  safe_sprintf(buffer, "%03.2f", -1.2);
-  EXPECT_EQ(buffer, fmt::format("{:03.2f}", -1.2));
-
-  EXPECT_EQ("a, b, c", fmt::format("{0}, {1}, {2}", 'a', 'b', 'c'));
-  EXPECT_EQ("a, b, c", fmt::format("{}, {}, {}", 'a', 'b', 'c'));
-  EXPECT_EQ("c, b, a", fmt::format("{2}, {1}, {0}", 'a', 'b', 'c'));
-  EXPECT_EQ("abracadabra", fmt::format("{0}{1}{0}", "abra", "cad"));
-
-  EXPECT_EQ("left aligned                  ",
-            fmt::format("{:<30}", "left aligned"));
-  EXPECT_EQ("                 right aligned",
-            fmt::format("{:>30}", "right aligned"));
-  EXPECT_EQ("           centered           ",
-            fmt::format("{:^30}", "centered"));
-  EXPECT_EQ("***********centered***********",
-            fmt::format("{:*^30}", "centered"));
-
-  EXPECT_EQ("+3.140000; -3.140000", fmt::format("{:+f}; {:+f}", 3.14, -3.14));
-  EXPECT_EQ(" 3.140000; -3.140000", fmt::format("{: f}; {: f}", 3.14, -3.14));
-  EXPECT_EQ("3.140000; -3.140000", fmt::format("{:-f}; {:-f}", 3.14, -3.14));
-
-  EXPECT_EQ("int: 42;  hex: 2a;  oct: 52",
-            fmt::format("int: {0:d};  hex: {0:x};  oct: {0:o}", 42));
-  EXPECT_EQ("int: 42;  hex: 0x2a;  oct: 052",
-            fmt::format("int: {0:d};  hex: {0:#x};  oct: {0:#o}", 42));
-
-  EXPECT_EQ("The answer is 42", fmt::format("The answer is {}", 42));
-  EXPECT_THROW_MSG(
-      (void)fmt::format(runtime("The answer is {:d}"), "forty-two"),
-      format_error, "invalid type specifier");
-
-  EXPECT_WRITE(
-      stdout, fmt::print("{}", std::numeric_limits<double>::infinity()), "inf");
-}
-
-TEST(format_test, print) {
-  EXPECT_WRITE(stdout, fmt::print("Don't {}!", "panic"), "Don't panic!");
-  EXPECT_WRITE(stderr, fmt::print(stderr, "Don't {}!", "panic"),
-               "Don't panic!");
-}
-
-TEST(format_test, variadic) {
-  EXPECT_EQ("abc1", fmt::format("{}c{}", "ab", 1));
-}
-
-TEST(format_test, dynamic) {
-  using ctx = fmt::format_context;
-  auto args = std::vector<fmt::basic_format_arg<ctx>>();
-  args.emplace_back(fmt::detail::make_arg<ctx>(42));
-  args.emplace_back(fmt::detail::make_arg<ctx>("abc1"));
-  args.emplace_back(fmt::detail::make_arg<ctx>(1.5f));
-
-  std::string result = fmt::vformat(
-      "{} and {} and {}",
-      fmt::format_args(args.data(), static_cast<int>(args.size())));
-
-  EXPECT_EQ("42 and abc1 and 1.5", result);
-}
-
-TEST(format_test, bytes) {
-  auto s = fmt::format("{:10}", fmt::bytes("ёжик"));
-  EXPECT_EQ("ёжик  ", s);
-  EXPECT_EQ(10, s.size());
-}
-
-TEST(format_test, group_digits_view) {
-  EXPECT_EQ(fmt::format("{}", fmt::group_digits(10000000)), "10,000,000");
-  EXPECT_EQ(fmt::format("{:8}", fmt::group_digits(1000)), "   1,000");
-}
-
-enum test_enum { foo, bar };
-
-TEST(format_test, join) {
-  using fmt::join;
-  int v1[3] = {1, 2, 3};
-  auto v2 = std::vector<float>();
-  v2.push_back(1.2f);
-  v2.push_back(3.4f);
-  void* v3[2] = {&v1[0], &v1[1]};
-
-  EXPECT_EQ("(1, 2, 3)", fmt::format("({})", join(v1, v1 + 3, ", ")));
-  EXPECT_EQ("(1)", fmt::format("({})", join(v1, v1 + 1, ", ")));
-  EXPECT_EQ("()", fmt::format("({})", join(v1, v1, ", ")));
-  EXPECT_EQ("(001, 002, 003)", fmt::format("({:03})", join(v1, v1 + 3, ", ")));
-  EXPECT_EQ("(+01.20, +03.40)",
-            fmt::format("({:+06.2f})", join(v2.begin(), v2.end(), ", ")));
-
-  EXPECT_EQ("1, 2, 3", fmt::format("{0:{1}}", join(v1, v1 + 3, ", "), 1));
-
-  EXPECT_EQ(fmt::format("{}, {}", v3[0], v3[1]),
-            fmt::format("{}", join(v3, v3 + 2, ", ")));
-
-  EXPECT_EQ("(1, 2, 3)", fmt::format("({})", join(v1, ", ")));
-  EXPECT_EQ("(+01.20, +03.40)", fmt::format("({:+06.2f})", join(v2, ", ")));
-
-  auto v4 = std::vector<test_enum>{foo, bar, foo};
-  EXPECT_EQ("0 1 0", fmt::format("{}", join(v4, " ")));
-}
-
-#ifdef __cpp_lib_byte
-TEST(format_test, join_bytes) {
-  auto v = std::vector<std::byte>{std::byte(1), std::byte(2), std::byte(3)};
-  EXPECT_EQ("1, 2, 3", fmt::format("{}", fmt::join(v, ", ")));
-}
-#endif
-
-std::string vformat_message(int id, const char* format, fmt::format_args args) {
-  auto buffer = fmt::memory_buffer();
-  format_to(fmt::appender(buffer), "[{}] ", id);
-  vformat_to(fmt::appender(buffer), format, args);
-  return to_string(buffer);
-}
-
-template <typename... Args>
-std::string format_message(int id, const char* format, const Args&... args) {
-  auto va = fmt::make_format_args(args...);
-  return vformat_message(id, format, va);
-}
-
-TEST(format_test, format_message_example) {
-  EXPECT_EQ("[42] something happened",
-            format_message(42, "{} happened", "something"));
-}
-
-template <typename... Args>
-void print_error(const char* file, int line, const char* format,
-                 const Args&... args) {
-  fmt::print("{}: {}: ", file, line);
-  fmt::print(format, args...);
-}
-
-TEST(format_test, unpacked_args) {
-  EXPECT_EQ("0123456789abcdefg",
-            fmt::format("{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}", 0, 1, 2, 3, 4, 5,
-                        6, 7, 8, 9, 'a', 'b', 'c', 'd', 'e', 'f', 'g'));
-}
-
-struct string_like {};
-fmt::string_view to_string_view(string_like) { return "foo"; }
-
-constexpr char with_null[3] = {'{', '}', '\0'};
-constexpr char no_null[2] = {'{', '}'};
-static FMT_CONSTEXPR_DECL const char static_with_null[3] = {'{', '}', '\0'};
-static FMT_CONSTEXPR_DECL const char static_no_null[2] = {'{', '}'};
-
-TEST(format_test, compile_time_string) {
-  EXPECT_EQ("foo", fmt::format(FMT_STRING("foo")));
-  EXPECT_EQ("42", fmt::format(FMT_STRING("{}"), 42));
-  EXPECT_EQ("foo", fmt::format(FMT_STRING("{}"), string_like()));
-
-#if FMT_USE_NONTYPE_TEMPLATE_PARAMETERS
-  using namespace fmt::literals;
-  EXPECT_EQ("foobar", fmt::format(FMT_STRING("{foo}{bar}"), "bar"_a = "bar",
-                                  "foo"_a = "foo"));
-  EXPECT_EQ("", fmt::format(FMT_STRING("")));
-  EXPECT_EQ("", fmt::format(FMT_STRING(""), "arg"_a = 42));
-#endif
-
-  (void)static_with_null;
-  (void)static_no_null;
-#ifndef _MSC_VER
-  EXPECT_EQ("42", fmt::format(FMT_STRING(static_with_null), 42));
-  EXPECT_EQ("42", fmt::format(FMT_STRING(static_no_null), 42));
-#endif
-
-  (void)with_null;
-  (void)no_null;
-#if __cplusplus >= 201703L
-  EXPECT_EQ("42", fmt::format(FMT_STRING(with_null), 42));
-  EXPECT_EQ("42", fmt::format(FMT_STRING(no_null), 42));
-#endif
-#if defined(FMT_USE_STRING_VIEW) && __cplusplus >= 201703L
-  EXPECT_EQ("42", fmt::format(FMT_STRING(std::string_view("{}")), 42));
-#endif
-}
-
-TEST(format_test, custom_format_compile_time_string) {
-  EXPECT_EQ("42", fmt::format(FMT_STRING("{}"), Answer()));
-  auto answer = Answer();
-  EXPECT_EQ("42", fmt::format(FMT_STRING("{}"), answer));
-  char buf[10] = {};
-  fmt::format_to(buf, FMT_STRING("{}"), answer);
-  const Answer const_answer = Answer();
-  EXPECT_EQ("42", fmt::format(FMT_STRING("{}"), const_answer));
-}
-
-#if FMT_USE_USER_DEFINED_LITERALS
-// Passing user-defined literals directly to EXPECT_EQ causes problems
-// with macro argument stringification (#) on some versions of GCC.
-// Workaround: Assing the UDL result to a variable before the macro.
-
-using namespace fmt::literals;
-
-#  if FMT_GCC_VERSION
-#    define FMT_CHECK_DEPRECATED_UDL_FORMAT 1
-#  elif FMT_CLANG_VERSION && defined(__has_warning)
-#    if __has_warning("-Wdeprecated-declarations")
-#      define FMT_CHECK_DEPRECATED_UDL_FORMAT 1
-#    endif
-#  endif
-#  ifndef FMT_CHECK_DEPRECATED_UDL_FORMAT
-#    define FMT_CHECK_DEPRECATED_UDL_FORMAT 0
-#  endif
-
-#  if FMT_CHECK_DEPRECATED_UDL_FORMAT
-#    pragma GCC diagnostic push
-#    pragma GCC diagnostic ignored "-Wdeprecated-declarations"
-
-TEST(format_test, format_udl) {
-  EXPECT_EQ("{}c{}"_format("ab", 1), fmt::format("{}c{}", "ab", 1));
-  EXPECT_EQ("foo"_format(), "foo");
-  EXPECT_EQ("{0:10}"_format(42), "        42");
-  EXPECT_EQ("{}"_format(date(2015, 10, 21)), "2015-10-21");
-}
-
-#    pragma GCC diagnostic pop
-#  endif
-
-TEST(format_test, named_arg_udl) {
-  auto udl_a = fmt::format("{first}{second}{first}{third}", "first"_a = "abra",
-                           "second"_a = "cad", "third"_a = 99);
-  EXPECT_EQ(
-      fmt::format("{first}{second}{first}{third}", fmt::arg("first", "abra"),
-                  fmt::arg("second", "cad"), fmt::arg("third", 99)),
-      udl_a);
-}
-#endif  // FMT_USE_USER_DEFINED_LITERALS
-
-TEST(format_test, enum) { EXPECT_EQ("0", fmt::format("{}", foo)); }
-
-TEST(format_test, formatter_not_specialized) {
-  static_assert(!fmt::has_formatter<fmt::formatter<test_enum>,
-                                    fmt::format_context>::value,
-                "");
-}
-
-#if FMT_HAS_FEATURE(cxx_strong_enums)
-enum big_enum : unsigned long long { big_enum_value = 5000000000ULL };
-
-TEST(format_test, strong_enum) {
-  EXPECT_EQ("5000000000", fmt::format("{}", big_enum_value));
-}
-#endif
-
-TEST(format_test, non_null_terminated_format_string) {
-  EXPECT_EQ("42", fmt::format(string_view("{}foo", 2), 42));
-}
-
-struct variant {
-  enum { int_type, string_type } type;
-  explicit variant(int) : type(int_type) {}
-  explicit variant(const char*) : type(string_type) {}
-};
-
-FMT_BEGIN_NAMESPACE
-template <> struct formatter<variant> : dynamic_formatter<> {
-  auto format(variant value, format_context& ctx) -> decltype(ctx.out()) {
-    if (value.type == variant::int_type)
-      return dynamic_formatter<>::format(42, ctx);
-    return dynamic_formatter<>::format("foo", ctx);
-  }
-};
-FMT_END_NAMESPACE
-
-TEST(format_test, dynamic_formatter) {
-  auto num = variant(42);
-  auto str = variant("foo");
-  EXPECT_EQ("42", fmt::format("{:d}", num));
-  EXPECT_EQ("foo", fmt::format("{:s}", str));
-  EXPECT_EQ(" 42 foo ", fmt::format("{:{}} {:{}}", num, 3, str, 4));
-  EXPECT_THROW_MSG((void)fmt::format(runtime("{0:{}}"), num), format_error,
-                   "cannot switch from manual to automatic argument indexing");
-  EXPECT_THROW_MSG((void)fmt::format(runtime("{:{0}}"), num), format_error,
-                   "cannot switch from automatic to manual argument indexing");
-  EXPECT_THROW_MSG((void)fmt::format(runtime("{:+}"), str), format_error,
-                   "format specifier requires numeric argument");
-  EXPECT_THROW_MSG((void)fmt::format(runtime("{:-}"), str), format_error,
-                   "format specifier requires numeric argument");
-  EXPECT_THROW_MSG((void)fmt::format(runtime("{: }"), str), format_error,
-                   "format specifier requires numeric argument");
-  EXPECT_THROW_MSG((void)fmt::format(runtime("{:#}"), str), format_error,
-                   "format specifier requires numeric argument");
-  EXPECT_THROW_MSG((void)fmt::format(runtime("{:0}"), str), format_error,
-                   "format specifier requires numeric argument");
-  EXPECT_THROW_MSG((void)fmt::format(runtime("{:.2}"), num), format_error,
-                   "precision not allowed for this argument type");
-}
-
-namespace adl_test {
-namespace fmt {
-namespace detail {
-struct foo {};
-template <typename, typename OutputIt> void write(OutputIt, foo) = delete;
-}  // namespace detail
-}  // namespace fmt
-}  // namespace adl_test
-
-FMT_BEGIN_NAMESPACE
-template <>
-struct formatter<adl_test::fmt::detail::foo> : formatter<std::string> {
-  template <typename FormatContext>
-  auto format(adl_test::fmt::detail::foo, FormatContext& ctx)
-      -> decltype(ctx.out()) {
-    return formatter<std::string>::format("foo", ctx);
-  }
-};
-FMT_END_NAMESPACE
-
-struct convertible_to_int {
-  operator int() const { return value; }
-
-  int value = 42;
-};
-
-TEST(format_test, to_string) {
-  EXPECT_EQ(fmt::to_string(42), "42");
-  EXPECT_EQ(fmt::to_string(reinterpret_cast<void*>(0x1234)), "0x1234");
-  EXPECT_EQ(fmt::to_string(adl_test::fmt::detail::foo()), "foo");
-  EXPECT_EQ(fmt::to_string(convertible_to_int()), "42");
-
-  enum foo : unsigned char { zero };
-  EXPECT_EQ(fmt::to_string(zero), "0");
-}
-
-TEST(format_test, output_iterators) {
-  std::list<char> out;
-  fmt::format_to(std::back_inserter(out), "{}", 42);
-  EXPECT_EQ("42", std::string(out.begin(), out.end()));
-  std::stringstream s;
-  fmt::format_to(std::ostream_iterator<char>(s), "{}", 42);
-  EXPECT_EQ("42", s.str());
-}
-
-TEST(format_test, formatted_size) {
-  EXPECT_EQ(2u, fmt::formatted_size("{}", 42));
-}
-
-TEST(format_test, format_to_no_args) {
-  std::string s;
-  fmt::format_to(std::back_inserter(s), "test");
-  EXPECT_EQ("test", s);
-}
-
-TEST(format_test, format_to) {
-  std::string s;
-  fmt::format_to(std::back_inserter(s), "part{0}", 1);
-  EXPECT_EQ("part1", s);
-  fmt::format_to(std::back_inserter(s), "part{0}", 2);
-  EXPECT_EQ("part1part2", s);
-}
-
-TEST(format_test, format_to_memory_buffer) {
-  auto buf = fmt::basic_memory_buffer<char, 100>();
-  fmt::format_to(fmt::appender(buf), "{}", "foo");
-  EXPECT_EQ("foo", to_string(buf));
-}
-
-TEST(format_test, format_to_vector) {
-  std::vector<char> v;
-  fmt::format_to(std::back_inserter(v), "{}", "foo");
-  EXPECT_EQ(string_view(v.data(), v.size()), "foo");
-}
-
-struct nongrowing_container {
-  using value_type = char;
-  void push_back(char) { throw std::runtime_error("can't take it any more"); }
-};
-
-TEST(format_test, format_to_propagates_exceptions) {
-  auto c = nongrowing_container();
-  EXPECT_THROW(fmt::format_to(std::back_inserter(c), "{}", 42),
-               std::runtime_error);
-}
-
-TEST(format_test, format_to_n) {
-  char buffer[4];
-  buffer[3] = 'x';
-  auto result = fmt::format_to_n(buffer, 3, "{}", 12345);
-  EXPECT_EQ(5u, result.size);
-  EXPECT_EQ(buffer + 3, result.out);
-  EXPECT_EQ("123x", fmt::string_view(buffer, 4));
-
-  result = fmt::format_to_n(buffer, 3, "{:s}", "foobar");
-  EXPECT_EQ(6u, result.size);
-  EXPECT_EQ(buffer + 3, result.out);
-  EXPECT_EQ("foox", fmt::string_view(buffer, 4));
-
-  buffer[0] = 'x';
-  buffer[1] = 'x';
-  buffer[2] = 'x';
-  result = fmt::format_to_n(buffer, 3, "{}", 'A');
-  EXPECT_EQ(1u, result.size);
-  EXPECT_EQ(buffer + 1, result.out);
-  EXPECT_EQ("Axxx", fmt::string_view(buffer, 4));
-
-  result = fmt::format_to_n(buffer, 3, "{}{} ", 'B', 'C');
-  EXPECT_EQ(3u, result.size);
-  EXPECT_EQ(buffer + 3, result.out);
-  EXPECT_EQ("BC x", fmt::string_view(buffer, 4));
-
-  result = fmt::format_to_n(buffer, 4, "{}", "ABCDE");
-  EXPECT_EQ(5u, result.size);
-  EXPECT_EQ("ABCD", fmt::string_view(buffer, 4));
-
-  buffer[3] = 'x';
-  result = fmt::format_to_n(buffer, 3, "{}", std::string(1000, '*'));
-  EXPECT_EQ(1000u, result.size);
-  EXPECT_EQ("***x", fmt::string_view(buffer, 4));
-}
-
-struct test_output_iterator {
-  char* data;
-
-  using iterator_category = std::output_iterator_tag;
-  using value_type = void;
-  using difference_type = void;
-  using pointer = void;
-  using reference = void;
-
-  test_output_iterator& operator++() {
-    ++data;
-    return *this;
-  }
-  test_output_iterator operator++(int) {
-    auto tmp = *this;
-    ++data;
-    return tmp;
-  }
-  char& operator*() { return *data; }
-};
-
-TEST(format_test, format_to_n_output_iterator) {
-  char buf[10] = {};
-  fmt::format_to_n(test_output_iterator{buf}, 10, "{}", 42);
-  EXPECT_STREQ(buf, "42");
-}
-
-#if FMT_USE_CONSTEXPR
-struct test_error_handler {
-  const char*& error;
-
-  FMT_CONSTEXPR test_error_handler(const char*& err) : error(err) {}
-
-  FMT_CONSTEXPR test_error_handler(const test_error_handler& other)
-      : error(other.error) {}
-
-  FMT_CONSTEXPR void on_error(const char* message) {
-    if (!error) error = message;
-  }
-};
-
-FMT_CONSTEXPR size_t len(const char* s) {
-  size_t len = 0;
-  while (*s++) ++len;
-  return len;
-}
-
-FMT_CONSTEXPR bool equal(const char* s1, const char* s2) {
-  if (!s1 || !s2) return s1 == s2;
-  while (*s1 && *s1 == *s2) {
-    ++s1;
-    ++s2;
-  }
-  return *s1 == *s2;
-}
-
-template <typename... Args>
-FMT_CONSTEXPR bool test_error(const char* fmt, const char* expected_error) {
-  const char* actual_error = nullptr;
-  auto s = string_view(fmt, len(fmt));
-  auto checker =
-      fmt::detail::format_string_checker<char, test_error_handler, Args...>(
-          s, test_error_handler(actual_error));
-  fmt::detail::parse_format_string<true>(s, checker);
-  return equal(actual_error, expected_error);
-}
-
-#  define EXPECT_ERROR_NOARGS(fmt, error) \
-    static_assert(test_error(fmt, error), "")
-#  define EXPECT_ERROR(fmt, error, ...) \
-    static_assert(test_error<__VA_ARGS__>(fmt, error), "")
-
-TEST(format_test, format_string_errors) {
-  EXPECT_ERROR_NOARGS("foo", nullptr);
-  EXPECT_ERROR_NOARGS("}", "unmatched '}' in format string");
-  EXPECT_ERROR("{0:s", "unknown format specifier", date);
-#  if !FMT_MSC_VER || FMT_MSC_VER >= 1916
-  // This causes an detail compiler error in MSVC2017.
-  EXPECT_ERROR("{:{<}", "invalid fill character '{'", int);
-  EXPECT_ERROR("{:10000000000}", "number is too big", int);
-  EXPECT_ERROR("{:.10000000000}", "number is too big", int);
-  EXPECT_ERROR_NOARGS("{:x}", "argument not found");
-  EXPECT_ERROR("{:+}", "format specifier requires numeric argument",
-               const char*);
-  EXPECT_ERROR("{:-}", "format specifier requires numeric argument",
-               const char*);
-  EXPECT_ERROR("{:#}", "format specifier requires numeric argument",
-               const char*);
-  EXPECT_ERROR("{: }", "format specifier requires numeric argument",
-               const char*);
-  EXPECT_ERROR("{:0}", "format specifier requires numeric argument",
-               const char*);
-  EXPECT_ERROR("{:+}", "format specifier requires signed argument", unsigned);
-  EXPECT_ERROR("{:-}", "format specifier requires signed argument", unsigned);
-  EXPECT_ERROR("{: }", "format specifier requires signed argument", unsigned);
-  EXPECT_ERROR("{:{}}", "argument not found", int);
-  EXPECT_ERROR("{:.{}}", "argument not found", double);
-  EXPECT_ERROR("{:.2}", "precision not allowed for this argument type", int);
-  EXPECT_ERROR("{:s}", "invalid type specifier", int);
-  EXPECT_ERROR("{:s}", "invalid type specifier", char);
-  EXPECT_ERROR("{:+}", "invalid format specifier for char", char);
-  EXPECT_ERROR("{:s}", "invalid type specifier", double);
-  EXPECT_ERROR("{:d}", "invalid type specifier", const char*);
-  EXPECT_ERROR("{:d}", "invalid type specifier", std::string);
-  EXPECT_ERROR("{:s}", "invalid type specifier", void*);
-#  else
-  fmt::print("warning: constexpr is broken in this version of MSVC\n");
-#  endif
-#  if FMT_USE_NONTYPE_TEMPLATE_PARAMETERS
-  EXPECT_ERROR("{foo}", "named argument is not found", decltype("bar"_a = 42));
-  EXPECT_ERROR("{foo}", "named argument is not found",
-               decltype(fmt::arg("foo", 42)));
-#  else
-  EXPECT_ERROR("{foo}",
-               "compile-time checks for named arguments require C++20 support",
-               int);
-#  endif
-  EXPECT_ERROR_NOARGS("{10000000000}", "argument not found");
-  EXPECT_ERROR_NOARGS("{0x}", "invalid format string");
-  EXPECT_ERROR_NOARGS("{-}", "invalid format string");
-  EXPECT_ERROR("{:{0x}}", "invalid format string", int);
-  EXPECT_ERROR("{:{-}}", "invalid format string", int);
-  EXPECT_ERROR("{:.{0x}}", "invalid format string", int);
-  EXPECT_ERROR("{:.{-}}", "invalid format string", int);
-  EXPECT_ERROR("{:.x}", "missing precision specifier", int);
-  EXPECT_ERROR_NOARGS("{}", "argument not found");
-  EXPECT_ERROR("{1}", "argument not found", int);
-  EXPECT_ERROR("{1}{}",
-               "cannot switch from manual to automatic argument indexing", int,
-               int);
-  EXPECT_ERROR("{}{1}",
-               "cannot switch from automatic to manual argument indexing", int,
-               int);
-}
-
-TEST(format_test, vformat_to) {
-  using context = fmt::format_context;
-  fmt::basic_format_arg<context> arg = fmt::detail::make_arg<context>(42);
-  auto args = fmt::basic_format_args<context>(&arg, 1);
-  auto s = std::string();
-  fmt::vformat_to(std::back_inserter(s), "{}", args);
-  EXPECT_EQ("42", s);
-  s.clear();
-  fmt::vformat_to(std::back_inserter(s), FMT_STRING("{}"), args);
-  EXPECT_EQ("42", s);
-}
-
-#endif  // FMT_USE_CONSTEXPR
-
-TEST(format_test, char_traits_is_not_ambiguous) {
-  // Test that we don't inject detail names into the std namespace.
-  using namespace std;
-  auto c = char_traits<char>::char_type();
-  (void)c;
-#if __cplusplus >= 201103L
-  auto s = std::string();
-  auto lval = begin(s);
-  (void)lval;
-#endif
-}
-
-struct check_back_appender {};
-
-FMT_BEGIN_NAMESPACE
-template <> struct formatter<check_back_appender> {
-  auto parse(format_parse_context& ctx) -> decltype(ctx.begin()) {
-    return ctx.begin();
-  }
-
-  template <typename Context>
-  auto format(check_back_appender, Context& ctx) -> decltype(ctx.out()) {
-    auto out = ctx.out();
-    static_assert(std::is_same<decltype(++out), decltype(out)&>::value,
-                  "needs to satisfy weakly_incrementable");
-    *out = 'y';
-    return ++out;
-  }
-};
-FMT_END_NAMESPACE
-
-TEST(format_test, back_insert_slicing) {
-  EXPECT_EQ(fmt::format("{}", check_back_appender{}), "y");
-}
-
-template <typename Char, typename T> bool check_enabled_formatter() {
-  static_assert(std::is_default_constructible<fmt::formatter<T, Char>>::value,
-                "");
-  return true;
-}
-
-template <typename Char, typename... T> void check_enabled_formatters() {
-  auto dummy = {check_enabled_formatter<Char, T>()...};
-  (void)dummy;
-}
-
-TEST(format_test, test_formatters_enabled) {
-  check_enabled_formatters<char, bool, char, signed char, unsigned char, short,
-                           unsigned short, int, unsigned, long, unsigned long,
-                           long long, unsigned long long, float, double,
-                           long double, void*, const void*, char*, const char*,
-                           std::string, std::nullptr_t>();
-  check_enabled_formatters<wchar_t, bool, wchar_t, signed char, unsigned char,
-                           short, unsigned short, int, unsigned, long,
-                           unsigned long, long long, unsigned long long, float,
-                           double, long double, void*, const void*, wchar_t*,
-                           const wchar_t*, std::wstring, std::nullptr_t>();
-}
-
-TEST(format_int_test, data) {
-  fmt::format_int format_int(42);
-  EXPECT_EQ("42", std::string(format_int.data(), format_int.size()));
-}
-
-TEST(format_int_test, format_int) {
-  EXPECT_EQ("42", fmt::format_int(42).str());
-  EXPECT_EQ(2u, fmt::format_int(42).size());
-  EXPECT_EQ("-42", fmt::format_int(-42).str());
-  EXPECT_EQ(3u, fmt::format_int(-42).size());
-  EXPECT_EQ("42", fmt::format_int(42ul).str());
-  EXPECT_EQ("-42", fmt::format_int(-42l).str());
-  EXPECT_EQ("42", fmt::format_int(42ull).str());
-  EXPECT_EQ("-42", fmt::format_int(-42ll).str());
-  std::ostringstream os;
-  os << max_value<int64_t>();
-  EXPECT_EQ(os.str(), fmt::format_int(max_value<int64_t>()).str());
-}
diff --git a/contrib/libs/fmt/test/format-test/ya.make b/contrib/libs/fmt/test/format-test/ya.make
deleted file mode 100644
index 672765d32b..0000000000
--- a/contrib/libs/fmt/test/format-test/ya.make
+++ /dev/null
@@ -1,33 +0,0 @@
-# Generated by devtools/yamaker.
-
-GTEST()
-
-WITHOUT_LICENSE_TEXTS()
-
-LICENSE(MIT)
-
-ALLOCATOR(J)
-
-PEERDIR(
-    contrib/libs/fmt
-    contrib/libs/fmt/test
-)
-
-NO_COMPILER_WARNINGS()
-
-NO_UTIL()
-
-CFLAGS(
-    -DFMT_LOCALE
-    -DFMT_SHARED
-    -DGTEST_HAS_STD_WSTRING=1
-    -D_SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING=1
-)
-
-SRCDIR(contrib/libs/fmt/test)
-
-SRCS(
-    format-test.cc
-)
-
-END()
diff --git a/contrib/libs/fmt/test/gtest-extra-test.cc b/contrib/libs/fmt/test/gtest-extra-test.cc
deleted file mode 100644
index 0d86206c93..0000000000
--- a/contrib/libs/fmt/test/gtest-extra-test.cc
+++ /dev/null
@@ -1,413 +0,0 @@
-// Formatting library for C++ - tests of custom Google Test assertions
-//
-// Copyright (c) 2012 - present, Victor Zverovich
-// All rights reserved.
-//
-// For the license information refer to format.h.
-
-#include "gtest-extra.h"
-
-#include <gtest/gtest-spi.h>
-
-#include <cstring>
-#include <memory>
-#include <stdexcept>
-
-#include "fmt/os.h"
-#include "util.h"
-
-// Tests that assertion macros evaluate their arguments exactly once.
-namespace {
-class single_evaluation_test : public ::testing::Test {
- protected:
-  single_evaluation_test() {
-    p_ = s_;
-    a_ = 0;
-    b_ = 0;
-  }
-
-  static const char* const s_;
-  static const char* p_;
-
-  static int a_;
-  static int b_;
-};
-}  // namespace
-
-const char* const single_evaluation_test::s_ = "01234";
-const char* single_evaluation_test::p_;
-int single_evaluation_test::a_;
-int single_evaluation_test::b_;
-
-void do_nothing() {}
-
-FMT_NORETURN void throw_exception() { throw std::runtime_error("test"); }
-
-FMT_NORETURN void throw_system_error() {
-  throw fmt::system_error(EDOM, "test");
-}
-
-// Tests that when EXPECT_THROW_MSG fails, it evaluates its message argument
-// exactly once.
-TEST_F(single_evaluation_test, failed_expect_throw_msg) {
-  EXPECT_NONFATAL_FAILURE(
-      EXPECT_THROW_MSG(throw_exception(), std::exception, p_++), "01234");
-  EXPECT_EQ(s_ + 1, p_);
-}
-
-// Tests that when EXPECT_SYSTEM_ERROR fails, it evaluates its message argument
-// exactly once.
-TEST_F(single_evaluation_test, failed_expect_system_error) {
-  EXPECT_NONFATAL_FAILURE(EXPECT_SYSTEM_ERROR(throw_system_error(), EDOM, p_++),
-                          "01234");
-  EXPECT_EQ(s_ + 1, p_);
-}
-
-// Tests that assertion arguments are evaluated exactly once.
-TEST_F(single_evaluation_test, exception_tests) {
-  // successful EXPECT_THROW_MSG
-  EXPECT_THROW_MSG(
-      {  // NOLINT
-        a_++;
-        throw_exception();
-      },
-      std::exception, (b_++, "test"));
-  EXPECT_EQ(1, a_);
-  EXPECT_EQ(1, b_);
-
-  // failed EXPECT_THROW_MSG, throws different type
-  EXPECT_NONFATAL_FAILURE(EXPECT_THROW_MSG(
-                              {  // NOLINT
-                                a_++;
-                                throw_exception();
-                              },
-                              std::logic_error, (b_++, "test")),
-                          "throws a different type");
-  EXPECT_EQ(2, a_);
-  EXPECT_EQ(2, b_);
-
-  // failed EXPECT_THROW_MSG, throws an exception with different message
-  EXPECT_NONFATAL_FAILURE(EXPECT_THROW_MSG(
-                              {  // NOLINT
-                                a_++;
-                                throw_exception();
-                              },
-                              std::exception, (b_++, "other")),
-                          "throws an exception with a different message");
-  EXPECT_EQ(3, a_);
-  EXPECT_EQ(3, b_);
-
-  // failed EXPECT_THROW_MSG, throws nothing
-  EXPECT_NONFATAL_FAILURE(
-      EXPECT_THROW_MSG(a_++, std::exception, (b_++, "test")), "throws nothing");
-  EXPECT_EQ(4, a_);
-  EXPECT_EQ(4, b_);
-}
-
-TEST_F(single_evaluation_test, system_error_tests) {
-  // successful EXPECT_SYSTEM_ERROR
-  EXPECT_SYSTEM_ERROR(
-      {  // NOLINT
-        a_++;
-        throw_system_error();
-      },
-      EDOM, (b_++, "test"));
-  EXPECT_EQ(1, a_);
-  EXPECT_EQ(1, b_);
-
-  // failed EXPECT_SYSTEM_ERROR, throws different type
-  EXPECT_NONFATAL_FAILURE(EXPECT_SYSTEM_ERROR(
-                              {  // NOLINT
-                                a_++;
-                                throw_exception();
-                              },
-                              EDOM, (b_++, "test")),
-                          "throws a different type");
-  EXPECT_EQ(2, a_);
-  EXPECT_EQ(2, b_);
-
-  // failed EXPECT_SYSTEM_ERROR, throws an exception with different message
-  EXPECT_NONFATAL_FAILURE(EXPECT_SYSTEM_ERROR(
-                              {  // NOLINT
-                                a_++;
-                                throw_system_error();
-                              },
-                              EDOM, (b_++, "other")),
-                          "throws an exception with a different message");
-  EXPECT_EQ(3, a_);
-  EXPECT_EQ(3, b_);
-
-  // failed EXPECT_SYSTEM_ERROR, throws nothing
-  EXPECT_NONFATAL_FAILURE(EXPECT_SYSTEM_ERROR(a_++, EDOM, (b_++, "test")),
-                          "throws nothing");
-  EXPECT_EQ(4, a_);
-  EXPECT_EQ(4, b_);
-}
-
-#if FMT_USE_FCNTL
-// Tests that when EXPECT_WRITE fails, it evaluates its message argument
-// exactly once.
-TEST_F(single_evaluation_test, failed_expect_write) {
-  EXPECT_NONFATAL_FAILURE(EXPECT_WRITE(stdout, std::printf("test"), p_++),
-                          "01234");
-  EXPECT_EQ(s_ + 1, p_);
-}
-
-// Tests that assertion arguments are evaluated exactly once.
-TEST_F(single_evaluation_test, write_tests) {
-  // successful EXPECT_WRITE
-  EXPECT_WRITE(
-      stdout,
-      {  // NOLINT
-        a_++;
-        std::printf("test");
-      },
-      (b_++, "test"));
-  EXPECT_EQ(1, a_);
-  EXPECT_EQ(1, b_);
-
-  // failed EXPECT_WRITE
-  EXPECT_NONFATAL_FAILURE(EXPECT_WRITE(
-                              stdout,
-                              {  // NOLINT
-                                a_++;
-                                std::printf("test");
-                              },
-                              (b_++, "other")),
-                          "Actual: test");
-  EXPECT_EQ(2, a_);
-  EXPECT_EQ(2, b_);
-}
-
-// Tests EXPECT_WRITE.
-TEST(gtest_extra_test, expect_write) {
-  EXPECT_WRITE(stdout, do_nothing(), "");
-  EXPECT_WRITE(stdout, std::printf("test"), "test");
-  EXPECT_WRITE(stderr, std::fprintf(stderr, "test"), "test");
-  EXPECT_NONFATAL_FAILURE(EXPECT_WRITE(stdout, std::printf("that"), "this"),
-                          "Expected: this\n"
-                          "  Actual: that");
-}
-
-TEST(gtest_extra_test, expect_write_streaming) {
-  EXPECT_WRITE(stdout, std::printf("test"), "test") << "unexpected failure";
-  EXPECT_NONFATAL_FAILURE(EXPECT_WRITE(stdout, std::printf("test"), "other")
-                              << "expected failure",
-                          "expected failure");
-}
-#endif  // FMT_USE_FCNTL
-
-// Tests that the compiler will not complain about unreachable code in the
-// EXPECT_THROW_MSG macro.
-TEST(gtest_extra_test, expect_throw_no_unreachable_code_warning) {
-  int n = 0;
-  using std::runtime_error;
-  EXPECT_THROW_MSG(throw runtime_error(""), runtime_error, "");
-  EXPECT_NONFATAL_FAILURE(EXPECT_THROW_MSG(n++, runtime_error, ""), "");
-  EXPECT_NONFATAL_FAILURE(EXPECT_THROW_MSG(throw 1, runtime_error, ""), "");
-  EXPECT_NONFATAL_FAILURE(
-      EXPECT_THROW_MSG(throw runtime_error("a"), runtime_error, "b"), "");
-}
-
-// Tests that the compiler will not complain about unreachable code in the
-// EXPECT_SYSTEM_ERROR macro.
-TEST(gtest_extra_test, expect_system_error_no_unreachable_code_warning) {
-  int n = 0;
-  EXPECT_SYSTEM_ERROR(throw fmt::system_error(EDOM, "test"), EDOM, "test");
-  EXPECT_NONFATAL_FAILURE(EXPECT_SYSTEM_ERROR(n++, EDOM, ""), "");
-  EXPECT_NONFATAL_FAILURE(EXPECT_SYSTEM_ERROR(throw 1, EDOM, ""), "");
-  EXPECT_NONFATAL_FAILURE(
-      EXPECT_SYSTEM_ERROR(throw fmt::system_error(EDOM, "aaa"), EDOM, "bbb"),
-      "");
-}
-
-TEST(gtest_extra_test, expect_throw_behaves_like_single_statement) {
-  if (::testing::internal::AlwaysFalse())
-    EXPECT_THROW_MSG(do_nothing(), std::exception, "");
-
-  if (::testing::internal::AlwaysTrue())
-    EXPECT_THROW_MSG(throw_exception(), std::exception, "test");
-  else
-    do_nothing();
-}
-
-TEST(gtest_extra_test, expect_system_error_behaves_like_single_statement) {
-  if (::testing::internal::AlwaysFalse())
-    EXPECT_SYSTEM_ERROR(do_nothing(), EDOM, "");
-
-  if (::testing::internal::AlwaysTrue())
-    EXPECT_SYSTEM_ERROR(throw_system_error(), EDOM, "test");
-  else
-    do_nothing();
-}
-
-TEST(gtest_extra_test, expect_write_behaves_like_single_statement) {
-  if (::testing::internal::AlwaysFalse())
-    EXPECT_WRITE(stdout, std::printf("x"), "x");
-
-  if (::testing::internal::AlwaysTrue())
-    EXPECT_WRITE(stdout, std::printf("x"), "x");
-  else
-    do_nothing();
-}
-
-// Tests EXPECT_THROW_MSG.
-TEST(gtest_extra_test, expect_throw_msg) {
-  EXPECT_THROW_MSG(throw_exception(), std::exception, "test");
-  EXPECT_NONFATAL_FAILURE(
-      EXPECT_THROW_MSG(throw_exception(), std::logic_error, "test"),
-      "Expected: throw_exception() throws an exception of "
-      "type std::logic_error.\n  Actual: it throws a different type.");
-  EXPECT_NONFATAL_FAILURE(
-      EXPECT_THROW_MSG(do_nothing(), std::exception, "test"),
-      "Expected: do_nothing() throws an exception of type std::exception.\n"
-      "  Actual: it throws nothing.");
-  EXPECT_NONFATAL_FAILURE(
-      EXPECT_THROW_MSG(throw_exception(), std::exception, "other"),
-      "throw_exception() throws an exception with a different message.\n"
-      "Expected: other\n"
-      "  Actual: test");
-}
-
-// Tests EXPECT_SYSTEM_ERROR.
-TEST(gtest_extra_test, expect_system_error) {
-  EXPECT_SYSTEM_ERROR(throw_system_error(), EDOM, "test");
-  EXPECT_NONFATAL_FAILURE(
-      EXPECT_SYSTEM_ERROR(throw_exception(), EDOM, "test"),
-      "Expected: throw_exception() throws an exception of "
-      "type std::system_error.\n  Actual: it throws a different type.");
-  EXPECT_NONFATAL_FAILURE(
-      EXPECT_SYSTEM_ERROR(do_nothing(), EDOM, "test"),
-      "Expected: do_nothing() throws an exception of type std::system_error.\n"
-      "  Actual: it throws nothing.");
-  EXPECT_NONFATAL_FAILURE(
-      EXPECT_SYSTEM_ERROR(throw_system_error(), EDOM, "other"),
-      fmt::format(
-          "throw_system_error() throws an exception with a different message.\n"
-          "Expected: {}\n"
-          "  Actual: {}",
-          system_error_message(EDOM, "other"),
-          system_error_message(EDOM, "test")));
-}
-
-TEST(gtest_extra_test, expect_throw_msg_streaming) {
-  EXPECT_THROW_MSG(throw_exception(), std::exception, "test")
-      << "unexpected failure";
-  EXPECT_NONFATAL_FAILURE(
-      EXPECT_THROW_MSG(throw_exception(), std::exception, "other")
-          << "expected failure",
-      "expected failure");
-}
-
-TEST(gtest_extra_test, expect_system_error_streaming) {
-  EXPECT_SYSTEM_ERROR(throw_system_error(), EDOM, "test")
-      << "unexpected failure";
-  EXPECT_NONFATAL_FAILURE(
-      EXPECT_SYSTEM_ERROR(throw_system_error(), EDOM, "other")
-          << "expected failure",
-      "expected failure");
-}
-
-#if FMT_USE_FCNTL
-
-using fmt::buffered_file;
-using fmt::file;
-
-TEST(output_redirect_test, scoped_redirect) {
-  file read_end, write_end;
-  file::pipe(read_end, write_end);
-  {
-    buffered_file file(write_end.fdopen("w"));
-    std::fprintf(file.get(), "[[[");
-    {
-      output_redirect redir(file.get());
-      std::fprintf(file.get(), "censored");
-    }
-    std::fprintf(file.get(), "]]]");
-  }
-  EXPECT_READ(read_end, "[[[]]]");
-}
-
-// Test that output_redirect handles errors in flush correctly.
-TEST(output_redirect_test, flush_error_in_ctor) {
-  file read_end, write_end;
-  file::pipe(read_end, write_end);
-  int write_fd = write_end.descriptor();
-  file write_copy = write_end.dup(write_fd);
-  buffered_file f = write_end.fdopen("w");
-  // Put a character in a file buffer.
-  EXPECT_EQ('x', fputc('x', f.get()));
-  FMT_POSIX(close(write_fd));
-  std::unique_ptr<output_redirect> redir{nullptr};
-  EXPECT_SYSTEM_ERROR_NOASSERT(redir.reset(new output_redirect(f.get())), EBADF,
-                               "cannot flush stream");
-  redir.reset(nullptr);
-  write_copy.dup2(write_fd);  // "undo" close or dtor will fail
-}
-
-TEST(output_redirect_test, dup_error_in_ctor) {
-  buffered_file f = open_buffered_file();
-  int fd = (f.fileno)();
-  file copy = file::dup(fd);
-  FMT_POSIX(close(fd));
-  std::unique_ptr<output_redirect> redir{nullptr};
-  EXPECT_SYSTEM_ERROR_NOASSERT(
-      redir.reset(new output_redirect(f.get())), EBADF,
-      fmt::format("cannot duplicate file descriptor {}", fd));
-  copy.dup2(fd);  // "undo" close or dtor will fail
-}
-
-TEST(output_redirect_test, restore_and_read) {
-  file read_end, write_end;
-  file::pipe(read_end, write_end);
-  buffered_file file(write_end.fdopen("w"));
-  std::fprintf(file.get(), "[[[");
-  output_redirect redir(file.get());
-  std::fprintf(file.get(), "censored");
-  EXPECT_EQ("censored", redir.restore_and_read());
-  EXPECT_EQ("", redir.restore_and_read());
-  std::fprintf(file.get(), "]]]");
-  file = buffered_file();
-  EXPECT_READ(read_end, "[[[]]]");
-}
-
-// Test that OutputRedirect handles errors in flush correctly.
-TEST(output_redirect_test, flush_error_in_restore_and_read) {
-  file read_end, write_end;
-  file::pipe(read_end, write_end);
-  int write_fd = write_end.descriptor();
-  file write_copy = write_end.dup(write_fd);
-  buffered_file f = write_end.fdopen("w");
-  output_redirect redir(f.get());
-  // Put a character in a file buffer.
-  EXPECT_EQ('x', fputc('x', f.get()));
-  FMT_POSIX(close(write_fd));
-  EXPECT_SYSTEM_ERROR_NOASSERT(redir.restore_and_read(), EBADF,
-                               "cannot flush stream");
-  write_copy.dup2(write_fd);  // "undo" close or dtor will fail
-}
-
-TEST(output_redirect_test, error_in_dtor) {
-  file read_end, write_end;
-  file::pipe(read_end, write_end);
-  int write_fd = write_end.descriptor();
-  file write_copy = write_end.dup(write_fd);
-  buffered_file f = write_end.fdopen("w");
-  std::unique_ptr<output_redirect> redir(new output_redirect(f.get()));
-  // Put a character in a file buffer.
-  EXPECT_EQ('x', fputc('x', f.get()));
-  EXPECT_WRITE(
-      stderr,
-      {
-        // The close function must be called inside EXPECT_WRITE,
-        // otherwise the system may recycle closed file descriptor when
-        // redirecting the output in EXPECT_STDERR and the second close
-        // will break output redirection.
-        FMT_POSIX(close(write_fd));
-        SUPPRESS_ASSERT(redir.reset(nullptr));
-      },
-      system_error_message(EBADF, "cannot flush stream"));
-  write_copy.dup2(write_fd);  // "undo" close or dtor of buffered_file will fail
-}
-
-#endif  // FMT_USE_FCNTL
diff --git a/contrib/libs/fmt/test/gtest-extra-test/ya.make b/contrib/libs/fmt/test/gtest-extra-test/ya.make
deleted file mode 100644
index 407c5e33d8..0000000000
--- a/contrib/libs/fmt/test/gtest-extra-test/ya.make
+++ /dev/null
@@ -1,31 +0,0 @@
-# Generated by devtools/yamaker.
-
-GTEST()
-
-WITHOUT_LICENSE_TEXTS()
-
-LICENSE(MIT)
-
-PEERDIR(
-    contrib/libs/fmt
-    contrib/libs/fmt/test
-)
-
-NO_COMPILER_WARNINGS()
-
-NO_UTIL()
-
-CFLAGS(
-    -DFMT_LOCALE
-    -DFMT_SHARED
-    -DGTEST_HAS_STD_WSTRING=1
-    -D_SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING=1
-)
-
-SRCDIR(contrib/libs/fmt/test)
-
-SRCS(
-    gtest-extra-test.cc
-)
-
-END()
diff --git a/contrib/libs/fmt/test/gtest-extra.cc b/contrib/libs/fmt/test/gtest-extra.cc
deleted file mode 100644
index 1d48a1736d..0000000000
--- a/contrib/libs/fmt/test/gtest-extra.cc
+++ /dev/null
@@ -1,80 +0,0 @@
-// Formatting library for C++ - custom Google Test assertions
-//
-// Copyright (c) 2012 - present, Victor Zverovich
-// All rights reserved.
-//
-// For the license information refer to format.h.
-
-#include "gtest-extra.h"
-
-#if FMT_USE_FCNTL
-
-using fmt::file;
-
-output_redirect::output_redirect(FILE* f) : file_(f) {
-  flush();
-  int fd = FMT_POSIX(fileno(f));
-  // Create a file object referring to the original file.
-  original_ = file::dup(fd);
-  // Create a pipe.
-  file write_end;
-  file::pipe(read_end_, write_end);
-  // Connect the passed FILE object to the write end of the pipe.
-  write_end.dup2(fd);
-}
-
-output_redirect::~output_redirect() FMT_NOEXCEPT {
-  try {
-    restore();
-  } catch (const std::exception& e) {
-    std::fputs(e.what(), stderr);
-  }
-}
-
-void output_redirect::flush() {
-  int result = 0;
-  do {
-    result = fflush(file_);
-  } while (result == EOF && errno == EINTR);
-  if (result != 0) throw fmt::system_error(errno, "cannot flush stream");
-}
-
-void output_redirect::restore() {
-  if (original_.descriptor() == -1) return;  // Already restored.
-  flush();
-  // Restore the original file.
-  original_.dup2(FMT_POSIX(fileno(file_)));
-  original_.close();
-}
-
-std::string output_redirect::restore_and_read() {
-  // Restore output.
-  restore();
-
-  // Read everything from the pipe.
-  std::string content;
-  if (read_end_.descriptor() == -1) return content;  // Already read.
-  enum { BUFFER_SIZE = 4096 };
-  char buffer[BUFFER_SIZE];
-  size_t count = 0;
-  do {
-    count = read_end_.read(buffer, BUFFER_SIZE);
-    content.append(buffer, count);
-  } while (count != 0);
-  read_end_.close();
-  return content;
-}
-
-std::string read(file& f, size_t count) {
-  std::string buffer(count, '\0');
-  size_t n = 0, offset = 0;
-  do {
-    n = f.read(&buffer[offset], count - offset);
-    // We can't read more than size_t bytes since count has type size_t.
-    offset += n;
-  } while (offset < count && n != 0);
-  buffer.resize(offset);
-  return buffer;
-}
-
-#endif  // FMT_USE_FCNTL
diff --git a/contrib/libs/fmt/test/gtest-extra.h b/contrib/libs/fmt/test/gtest-extra.h
deleted file mode 100644
index f779731748..0000000000
--- a/contrib/libs/fmt/test/gtest-extra.h
+++ /dev/null
@@ -1,171 +0,0 @@
-// Formatting library for C++ - custom Google Test assertions
-//
-// Copyright (c) 2012 - present, Victor Zverovich
-// All rights reserved.
-//
-// For the license information refer to format.h.
-
-#ifndef FMT_GTEST_EXTRA_H_
-#define FMT_GTEST_EXTRA_H_
-
-#include <stdlib.h>  // _invalid_parameter_handler
-
-#include <string>
-
-#ifdef FMT_MODULE_TEST
-import fmt;
-#else
-#  include "fmt/os.h"
-#endif  // FMG_MODULE_TEST
-
-#include "gmock/gmock.h"
-
-#define FMT_TEST_THROW_(statement, expected_exception, expected_message, fail) \
-  GTEST_AMBIGUOUS_ELSE_BLOCKER_                                                \
-  if (::testing::AssertionResult gtest_ar = ::testing::AssertionSuccess()) {   \
-    std::string gtest_expected_message = expected_message;                     \
-    bool gtest_caught_expected = false;                                        \
-    try {                                                                      \
-      GTEST_SUPPRESS_UNREACHABLE_CODE_WARNING_BELOW_(statement);               \
-    } catch (expected_exception const& e) {                                    \
-      if (gtest_expected_message != e.what()) {                                \
-        gtest_ar << #statement                                                 \
-            " throws an exception with a different message.\n"                 \
-                 << "Expected: " << gtest_expected_message << "\n"             \
-                 << "  Actual: " << e.what();                                  \
-        goto GTEST_CONCAT_TOKEN_(gtest_label_testthrow_, __LINE__);            \
-      }                                                                        \
-      gtest_caught_expected = true;                                            \
-    } catch (...) {                                                            \
-      gtest_ar << "Expected: " #statement                                      \
-                  " throws an exception of type " #expected_exception          \
-                  ".\n  Actual: it throws a different type.";                  \
-      goto GTEST_CONCAT_TOKEN_(gtest_label_testthrow_, __LINE__);              \
-    }                                                                          \
-    if (!gtest_caught_expected) {                                              \
-      gtest_ar << "Expected: " #statement                                      \
-                  " throws an exception of type " #expected_exception          \
-                  ".\n  Actual: it throws nothing.";                           \
-      goto GTEST_CONCAT_TOKEN_(gtest_label_testthrow_, __LINE__);              \
-    }                                                                          \
-  } else                                                                       \
-    GTEST_CONCAT_TOKEN_(gtest_label_testthrow_, __LINE__)                      \
-        : fail(gtest_ar.failure_message())
-
-// Tests that the statement throws the expected exception and the exception's
-// what() method returns expected message.
-#define EXPECT_THROW_MSG(statement, expected_exception, expected_message) \
-  FMT_TEST_THROW_(statement, expected_exception, expected_message,        \
-                  GTEST_NONFATAL_FAILURE_)
-
-inline std::string system_error_message(int error_code,
-                                        const std::string& message) {
-  auto ec = std::error_code(error_code, std::generic_category());
-  return std::system_error(ec, message).what();
-}
-
-#define EXPECT_SYSTEM_ERROR(statement, error_code, message) \
-  EXPECT_THROW_MSG(statement, std::system_error,            \
-                   system_error_message(error_code, message))
-
-#if FMT_USE_FCNTL
-
-// Captures file output by redirecting it to a pipe.
-// The output it can handle is limited by the pipe capacity.
-class output_redirect {
- private:
-  FILE* file_;
-  fmt::file original_;  // Original file passed to redirector.
-  fmt::file read_end_;  // Read end of the pipe where the output is redirected.
-
-  void flush();
-  void restore();
-
- public:
-  explicit output_redirect(FILE* file);
-  ~output_redirect() FMT_NOEXCEPT;
-
-  output_redirect(const output_redirect&) = delete;
-  void operator=(const output_redirect&) = delete;
-
-  // Restores the original file, reads output from the pipe into a string
-  // and returns it.
-  std::string restore_and_read();
-};
-
-#  define FMT_TEST_WRITE_(statement, expected_output, file, fail)              \
-    GTEST_AMBIGUOUS_ELSE_BLOCKER_                                              \
-    if (::testing::AssertionResult gtest_ar = ::testing::AssertionSuccess()) { \
-      std::string gtest_expected_output = expected_output;                     \
-      output_redirect gtest_redir(file);                                       \
-      GTEST_SUPPRESS_UNREACHABLE_CODE_WARNING_BELOW_(statement);               \
-      std::string gtest_output = gtest_redir.restore_and_read();               \
-      if (gtest_output != gtest_expected_output) {                             \
-        gtest_ar << #statement " produces different output.\n"                 \
-                 << "Expected: " << gtest_expected_output << "\n"              \
-                 << "  Actual: " << gtest_output;                              \
-        goto GTEST_CONCAT_TOKEN_(gtest_label_testthrow_, __LINE__);            \
-      }                                                                        \
-    } else                                                                     \
-      GTEST_CONCAT_TOKEN_(gtest_label_testthrow_, __LINE__)                    \
-          : fail(gtest_ar.failure_message())
-
-// Tests that the statement writes the expected output to file.
-#  define EXPECT_WRITE(file, statement, expected_output) \
-    FMT_TEST_WRITE_(statement, expected_output, file, GTEST_NONFATAL_FAILURE_)
-
-#  ifdef _MSC_VER
-#include <crtdbg.h>
-
-// Suppresses Windows assertions on invalid file descriptors, making
-// POSIX functions return proper error codes instead of crashing on Windows.
-class suppress_assert {
- private:
-  _invalid_parameter_handler original_handler_;
-  int original_report_mode_;
-
-  static void handle_invalid_parameter(const wchar_t*, const wchar_t*,
-                                       const wchar_t*, unsigned, uintptr_t) {}
-
- public:
-  suppress_assert()
-      : original_handler_(
-            _set_invalid_parameter_handler(handle_invalid_parameter)),
-        original_report_mode_(_CrtSetReportMode(_CRT_ASSERT, 0)) {}
-  ~suppress_assert() {
-    _set_invalid_parameter_handler(original_handler_);
-    _CrtSetReportMode(_CRT_ASSERT, original_report_mode_);
-    (void)original_report_mode_;
-  }
-};
-
-#    define SUPPRESS_ASSERT(statement) \
-      {                                \
-        suppress_assert sa;            \
-        statement;                     \
-      }
-#  else
-#    define SUPPRESS_ASSERT(statement) statement
-#  endif  // _MSC_VER
-
-#  define EXPECT_SYSTEM_ERROR_NOASSERT(statement, error_code, message) \
-    EXPECT_SYSTEM_ERROR(SUPPRESS_ASSERT(statement), error_code, message)
-
-// Attempts to read count characters from a file.
-std::string read(fmt::file& f, size_t count);
-
-#  define EXPECT_READ(file, expected_content) \
-    EXPECT_EQ(expected_content,               \
-              read(file, fmt::string_view(expected_content).size()))
-
-#else
-#  define EXPECT_WRITE(file, statement, expected_output) \
-    do {                                                 \
-      (void)(file);                                      \
-      (void)(statement);                                 \
-      (void)(expected_output);                           \
-      SUCCEED();                                         \
-    } while (false)
-#endif  // FMT_USE_FCNTL
-
-#endif  // FMT_GTEST_EXTRA_H_
diff --git a/contrib/libs/fmt/test/header-only-test.cc b/contrib/libs/fmt/test/header-only-test.cc
deleted file mode 100644
index 570f09a563..0000000000
--- a/contrib/libs/fmt/test/header-only-test.cc
+++ /dev/null
@@ -1,11 +0,0 @@
-// Header-only configuration test
-
-#include "fmt/core.h"
-#include "fmt/ostream.h"
-#include "gtest/gtest.h"
-
-#ifndef FMT_HEADER_ONLY
-#  error "Not in the header-only mode."
-#endif
-
-TEST(header_only_test, format) { EXPECT_EQ(fmt::format("foo"), "foo"); }
diff --git a/contrib/libs/fmt/test/mock-allocator.h b/contrib/libs/fmt/test/mock-allocator.h
deleted file mode 100644
index 6a67e08f4f..0000000000
--- a/contrib/libs/fmt/test/mock-allocator.h
+++ /dev/null
@@ -1,64 +0,0 @@
-// Formatting library for C++ - mock allocator
-//
-// Copyright (c) 2012 - present, Victor Zverovich
-// All rights reserved.
-//
-// For the license information refer to format.h.
-
-#ifndef FMT_MOCK_ALLOCATOR_H_
-#define FMT_MOCK_ALLOCATOR_H_
-
-#include <assert.h>  // assert
-#include <stddef.h>  // size_t
-
-#include <memory>  // std::allocator_traits
-
-#include "gmock/gmock.h"
-
-template <typename T> class mock_allocator {
- public:
-  mock_allocator() {}
-  mock_allocator(const mock_allocator&) {}
-  using value_type = T;
-  MOCK_METHOD1_T(allocate, T*(size_t n));
-  MOCK_METHOD2_T(deallocate, void(T* p, size_t n));
-};
-
-template <typename Allocator> class allocator_ref {
- private:
-  Allocator* alloc_;
-
-  void move(allocator_ref& other) {
-    alloc_ = other.alloc_;
-    other.alloc_ = nullptr;
-  }
-
- public:
-  using value_type = typename Allocator::value_type;
-
-  explicit allocator_ref(Allocator* alloc = nullptr) : alloc_(alloc) {}
-
-  allocator_ref(const allocator_ref& other) : alloc_(other.alloc_) {}
-  allocator_ref(allocator_ref&& other) { move(other); }
-
-  allocator_ref& operator=(allocator_ref&& other) {
-    assert(this != &other);
-    move(other);
-    return *this;
-  }
-
-  allocator_ref& operator=(const allocator_ref& other) {
-    alloc_ = other.alloc_;
-    return *this;
-  }
-
- public:
-  Allocator* get() const { return alloc_; }
-
-  value_type* allocate(size_t n) {
-    return std::allocator_traits<Allocator>::allocate(*alloc_, n);
-  }
-  void deallocate(value_type* p, size_t n) { alloc_->deallocate(p, n); }
-};
-
-#endif  // FMT_MOCK_ALLOCATOR_H_
diff --git a/contrib/libs/fmt/test/os-test.cc b/contrib/libs/fmt/test/os-test.cc
deleted file mode 100644
index 5b5ef76ed6..0000000000
--- a/contrib/libs/fmt/test/os-test.cc
+++ /dev/null
@@ -1,551 +0,0 @@
-// Formatting library for C++ - tests of the OS-specific functionality
-//
-// Copyright (c) 2012 - present, Victor Zverovich
-// All rights reserved.
-//
-// For the license information refer to format.h.
-
-#include "fmt/os.h"
-
-#include <cstdlib>  // std::exit
-#include <cstring>
-#include <memory>
-
-#include "gtest-extra.h"
-#include "util.h"
-
-#ifdef fileno
-#  undef fileno
-#endif
-
-using fmt::buffered_file;
-using testing::HasSubstr;
-using wstring_view = fmt::basic_string_view<wchar_t>;
-
-#ifdef _WIN32
-
-#  include <windows.h>
-
-TEST(util_test, utf16_to_utf8) {
-  auto s = std::string("ёжик");
-  fmt::detail::utf16_to_utf8 u(L"\x0451\x0436\x0438\x043A");
-  EXPECT_EQ(s, u.str());
-  EXPECT_EQ(s.size(), u.size());
-}
-
-TEST(util_test, utf16_to_utf8_empty_string) {
-  std::string s = "";
-  fmt::detail::utf16_to_utf8 u(L"");
-  EXPECT_EQ(s, u.str());
-  EXPECT_EQ(s.size(), u.size());
-}
-
-template <typename Converter, typename Char>
-void check_utf_conversion_error(const char* message,
-                                fmt::basic_string_view<Char> str =
-                                    fmt::basic_string_view<Char>(nullptr, 1)) {
-  fmt::memory_buffer out;
-  fmt::detail::format_windows_error(out, ERROR_INVALID_PARAMETER, message);
-  auto error = std::system_error(std::error_code());
-  try {
-    (Converter)(str);
-  } catch (const std::system_error& e) {
-    error = e;
-  }
-  EXPECT_EQ(ERROR_INVALID_PARAMETER, error.code().value());
-  EXPECT_THAT(error.what(), HasSubstr(fmt::to_string(out)));
-}
-
-TEST(util_test, utf16_to_utf8_error) {
-  check_utf_conversion_error<fmt::detail::utf16_to_utf8, wchar_t>(
-      "cannot convert string from UTF-16 to UTF-8");
-}
-
-TEST(util_test, utf16_to_utf8_convert) {
-  fmt::detail::utf16_to_utf8 u;
-  EXPECT_EQ(ERROR_INVALID_PARAMETER, u.convert(wstring_view(nullptr, 1)));
-  EXPECT_EQ(ERROR_INVALID_PARAMETER,
-            u.convert(wstring_view(L"foo", INT_MAX + 1u)));
-}
-
-TEST(os_test, format_std_error_code) {
-  EXPECT_EQ("generic:42",
-            fmt::format(FMT_STRING("{0}"),
-                        std::error_code(42, std::generic_category())));
-  EXPECT_EQ("system:42",
-            fmt::format(FMT_STRING("{0}"),
-                        std::error_code(42, fmt::system_category())));
-  EXPECT_EQ("system:-42",
-            fmt::format(FMT_STRING("{0}"),
-                        std::error_code(-42, fmt::system_category())));
-}
-
-TEST(os_test, format_windows_error) {
-  LPWSTR message = nullptr;
-  auto result = FormatMessageW(
-      FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM |
-          FORMAT_MESSAGE_IGNORE_INSERTS,
-      nullptr, ERROR_FILE_EXISTS, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
-      reinterpret_cast<LPWSTR>(&message), 0, nullptr);
-  fmt::detail::utf16_to_utf8 utf8_message(wstring_view(message, result - 2));
-  LocalFree(message);
-  fmt::memory_buffer actual_message;
-  fmt::detail::format_windows_error(actual_message, ERROR_FILE_EXISTS, "test");
-  EXPECT_EQ(fmt::format("test: {}", utf8_message.str()),
-            fmt::to_string(actual_message));
-  actual_message.resize(0);
-}
-
-TEST(os_test, format_long_windows_error) {
-  LPWSTR message = nullptr;
-  // this error code is not available on all Windows platforms and
-  // Windows SDKs, so do not fail the test if the error string cannot
-  // be retrieved.
-  int provisioning_not_allowed = 0x80284013L;  // TBS_E_PROVISIONING_NOT_ALLOWED
-  auto result = FormatMessageW(
-      FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM |
-          FORMAT_MESSAGE_IGNORE_INSERTS,
-      nullptr, static_cast<DWORD>(provisioning_not_allowed),
-      MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
-      reinterpret_cast<LPWSTR>(&message), 0, nullptr);
-  if (result == 0) {
-    LocalFree(message);
-    return;
-  }
-  fmt::detail::utf16_to_utf8 utf8_message(wstring_view(message, result - 2));
-  LocalFree(message);
-  fmt::memory_buffer actual_message;
-  fmt::detail::format_windows_error(actual_message, provisioning_not_allowed,
-                                    "test");
-  EXPECT_EQ(fmt::format("test: {}", utf8_message.str()),
-            fmt::to_string(actual_message));
-}
-
-TEST(os_test, windows_error) {
-  auto error = std::system_error(std::error_code());
-  try {
-    throw fmt::windows_error(ERROR_FILE_EXISTS, "test {}", "error");
-  } catch (const std::system_error& e) {
-    error = e;
-  }
-  fmt::memory_buffer message;
-  fmt::detail::format_windows_error(message, ERROR_FILE_EXISTS, "test error");
-  EXPECT_THAT(error.what(), HasSubstr(to_string(message)));
-  EXPECT_EQ(ERROR_FILE_EXISTS, error.code().value());
-}
-
-TEST(os_test, report_windows_error) {
-  fmt::memory_buffer out;
-  fmt::detail::format_windows_error(out, ERROR_FILE_EXISTS, "test error");
-  out.push_back('\n');
-  EXPECT_WRITE(stderr,
-               fmt::report_windows_error(ERROR_FILE_EXISTS, "test error"),
-               fmt::to_string(out));
-}
-
-#endif  // _WIN32
-
-#if FMT_USE_FCNTL
-
-using fmt::file;
-
-bool isclosed(int fd) {
-  char buffer;
-  auto result = std::streamsize();
-  SUPPRESS_ASSERT(result = FMT_POSIX(read(fd, &buffer, 1)));
-  return result == -1 && errno == EBADF;
-}
-
-// Opens a file for reading.
-file open_file() {
-  file read_end, write_end;
-  file::pipe(read_end, write_end);
-  write_end.write(file_content, std::strlen(file_content));
-  write_end.close();
-  return read_end;
-}
-
-// Attempts to write a string to a file.
-void write(file& f, fmt::string_view s) {
-  size_t num_chars_left = s.size();
-  const char* ptr = s.data();
-  do {
-    size_t count = f.write(ptr, num_chars_left);
-    ptr += count;
-    // We can't write more than size_t bytes since num_chars_left
-    // has type size_t.
-    num_chars_left -= count;
-  } while (num_chars_left != 0);
-}
-
-TEST(buffered_file_test, default_ctor) {
-  auto f = buffered_file();
-  EXPECT_TRUE(f.get() == nullptr);
-}
-
-TEST(buffered_file_test, move_ctor) {
-  buffered_file bf = open_buffered_file();
-  FILE* fp = bf.get();
-  EXPECT_TRUE(fp != nullptr);
-  buffered_file bf2(std::move(bf));
-  EXPECT_EQ(fp, bf2.get());
-  EXPECT_TRUE(bf.get() == nullptr);
-}
-
-TEST(buffered_file_test, move_assignment) {
-  buffered_file bf = open_buffered_file();
-  FILE* fp = bf.get();
-  EXPECT_TRUE(fp != nullptr);
-  buffered_file bf2;
-  bf2 = std::move(bf);
-  EXPECT_EQ(fp, bf2.get());
-  EXPECT_TRUE(bf.get() == nullptr);
-}
-
-TEST(buffered_file_test, move_assignment_closes_file) {
-  buffered_file bf = open_buffered_file();
-  buffered_file bf2 = open_buffered_file();
-  int old_fd = bf2.fileno();
-  bf2 = std::move(bf);
-  EXPECT_TRUE(isclosed(old_fd));
-}
-
-TEST(buffered_file_test, move_from_temporary_in_ctor) {
-  FILE* fp = nullptr;
-  buffered_file f = open_buffered_file(&fp);
-  EXPECT_EQ(fp, f.get());
-}
-
-TEST(buffered_file_test, move_from_temporary_in_assignment) {
-  FILE* fp = nullptr;
-  auto f = buffered_file();
-  f = open_buffered_file(&fp);
-  EXPECT_EQ(fp, f.get());
-}
-
-TEST(buffered_file_test, move_from_temporary_in_assignment_closes_file) {
-  buffered_file f = open_buffered_file();
-  int old_fd = f.fileno();
-  f = open_buffered_file();
-  EXPECT_TRUE(isclosed(old_fd));
-}
-
-TEST(buffered_file_test, close_file_in_dtor) {
-  int fd = 0;
-  {
-    buffered_file f = open_buffered_file();
-    fd = f.fileno();
-  }
-  EXPECT_TRUE(isclosed(fd));
-}
-
-TEST(buffered_file_test, close_error_in_dtor) {
-  auto f =
-      std::unique_ptr<buffered_file>(new buffered_file(open_buffered_file()));
-  EXPECT_WRITE(
-      stderr,
-      {
-        // The close function must be called inside EXPECT_WRITE,
-        // otherwise the system may recycle closed file descriptor when
-        // redirecting the output in EXPECT_STDERR and the second close
-        // will break output redirection.
-        FMT_POSIX(close(f->fileno()));
-        SUPPRESS_ASSERT(f.reset(nullptr));
-      },
-      system_error_message(EBADF, "cannot close file") + "\n");
-}
-
-TEST(buffered_file_test, close) {
-  buffered_file f = open_buffered_file();
-  int fd = f.fileno();
-  f.close();
-  EXPECT_TRUE(f.get() == nullptr);
-  EXPECT_TRUE(isclosed(fd));
-}
-
-TEST(buffered_file_test, close_error) {
-  buffered_file f = open_buffered_file();
-  FMT_POSIX(close(f.fileno()));
-  EXPECT_SYSTEM_ERROR_NOASSERT(f.close(), EBADF, "cannot close file");
-  EXPECT_TRUE(f.get() == nullptr);
-}
-
-TEST(buffered_file_test, fileno) {
-  auto f = open_buffered_file();
-  EXPECT_TRUE(f.fileno() != -1);
-  file copy = file::dup(f.fileno());
-  EXPECT_READ(copy, file_content);
-}
-
-TEST(ostream_test, move) {
-  fmt::ostream out = fmt::output_file("test-file");
-  fmt::ostream moved(std::move(out));
-  moved.print("hello");
-}
-
-TEST(ostream_test, move_while_holding_data) {
-  {
-    fmt::ostream out = fmt::output_file("test-file");
-    out.print("Hello, ");
-    fmt::ostream moved(std::move(out));
-    moved.print("world!\n");
-  }
-  {
-    file in("test-file", file::RDONLY);
-    EXPECT_READ(in, "Hello, world!\n");
-  }
-}
-
-TEST(ostream_test, print) {
-  fmt::ostream out = fmt::output_file("test-file");
-  out.print("The answer is {}.\n",
-            fmt::join(std::initializer_list<int>{42}, ", "));
-  out.close();
-  file in("test-file", file::RDONLY);
-  EXPECT_READ(in, "The answer is 42.\n");
-}
-
-TEST(ostream_test, buffer_boundary) {
-  auto str = std::string(4096, 'x');
-  fmt::ostream out = fmt::output_file("test-file");
-  out.print("{}", str);
-  out.print("{}", str);
-  out.close();
-  file in("test-file", file::RDONLY);
-  EXPECT_READ(in, str + str);
-}
-
-TEST(ostream_test, buffer_size) {
-  fmt::ostream out = fmt::output_file("test-file", fmt::buffer_size = 1);
-  out.print("{}", "foo");
-  out.close();
-  file in("test-file", file::RDONLY);
-  EXPECT_READ(in, "foo");
-}
-
-TEST(ostream_test, truncate) {
-  {
-    fmt::ostream out = fmt::output_file("test-file");
-    out.print("0123456789");
-  }
-  {
-    fmt::ostream out = fmt::output_file("test-file");
-    out.print("foo");
-  }
-  file in("test-file", file::RDONLY);
-  EXPECT_EQ("foo", read(in, 4));
-}
-
-TEST(ostream_test, flush) {
-  auto out = fmt::output_file("test-file");
-  out.print("x");
-  out.flush();
-  auto in = fmt::file("test-file", file::RDONLY);
-  EXPECT_READ(in, "x");
-}
-
-TEST(file_test, default_ctor) {
-  file f;
-  EXPECT_EQ(-1, f.descriptor());
-}
-
-TEST(file_test, open_buffered_file_in_ctor) {
-  FILE* fp = safe_fopen("test-file", "w");
-  std::fputs(file_content, fp);
-  std::fclose(fp);
-  file f("test-file", file::RDONLY);
-  // Check if the file is open by reading one character from it.
-  char buffer;
-  bool isopen = FMT_POSIX(read(f.descriptor(), &buffer, 1)) == 1;
-  ASSERT_TRUE(isopen);
-}
-
-TEST(file_test, open_buffered_file_error) {
-  EXPECT_SYSTEM_ERROR(file("nonexistent", file::RDONLY), ENOENT,
-                      "cannot open file nonexistent");
-}
-
-TEST(file_test, move_ctor) {
-  file f = open_file();
-  int fd = f.descriptor();
-  EXPECT_NE(-1, fd);
-  file f2(std::move(f));
-  EXPECT_EQ(fd, f2.descriptor());
-  EXPECT_EQ(-1, f.descriptor());
-}
-
-TEST(file_test, move_assignment) {
-  file f = open_file();
-  int fd = f.descriptor();
-  EXPECT_NE(-1, fd);
-  file f2;
-  f2 = std::move(f);
-  EXPECT_EQ(fd, f2.descriptor());
-  EXPECT_EQ(-1, f.descriptor());
-}
-
-TEST(file_test, move_assignment_closes_file) {
-  file f = open_file();
-  file f2 = open_file();
-  int old_fd = f2.descriptor();
-  f2 = std::move(f);
-  EXPECT_TRUE(isclosed(old_fd));
-}
-
-file open_buffered_file(int& fd) {
-  file f = open_file();
-  fd = f.descriptor();
-  return f;
-}
-
-TEST(file_test, move_from_temporary_in_ctor) {
-  int fd = 0xdead;
-  file f(open_buffered_file(fd));
-  EXPECT_EQ(fd, f.descriptor());
-}
-
-TEST(file_test, move_from_temporary_in_assignment) {
-  int fd = 0xdead;
-  file f;
-  f = open_buffered_file(fd);
-  EXPECT_EQ(fd, f.descriptor());
-}
-
-TEST(file_test, move_from_temporary_in_assignment_closes_file) {
-  int fd = 0xdead;
-  file f = open_file();
-  int old_fd = f.descriptor();
-  f = open_buffered_file(fd);
-  EXPECT_TRUE(isclosed(old_fd));
-}
-
-TEST(file_test, close_file_in_dtor) {
-  int fd = 0;
-  {
-    file f = open_file();
-    fd = f.descriptor();
-  }
-  EXPECT_TRUE(isclosed(fd));
-}
-
-TEST(file_test, close_error_in_dtor) {
-  std::unique_ptr<file> f(new file(open_file()));
-  EXPECT_WRITE(
-      stderr,
-      {
-        // The close function must be called inside EXPECT_WRITE,
-        // otherwise the system may recycle closed file descriptor when
-        // redirecting the output in EXPECT_STDERR and the second close
-        // will break output redirection.
-        FMT_POSIX(close(f->descriptor()));
-        SUPPRESS_ASSERT(f.reset(nullptr));
-      },
-      system_error_message(EBADF, "cannot close file") + "\n");
-}
-
-TEST(file_test, close) {
-  file f = open_file();
-  int fd = f.descriptor();
-  f.close();
-  EXPECT_EQ(-1, f.descriptor());
-  EXPECT_TRUE(isclosed(fd));
-}
-
-TEST(file_test, close_error) {
-  file f = open_file();
-  FMT_POSIX(close(f.descriptor()));
-  EXPECT_SYSTEM_ERROR_NOASSERT(f.close(), EBADF, "cannot close file");
-  EXPECT_EQ(-1, f.descriptor());
-}
-
-TEST(file_test, read) {
-  file f = open_file();
-  EXPECT_READ(f, file_content);
-}
-
-TEST(file_test, read_error) {
-  file f("test-file", file::WRONLY);
-  char buf;
-  // We intentionally read from a file opened in the write-only mode to
-  // cause error.
-  EXPECT_SYSTEM_ERROR(f.read(&buf, 1), EBADF, "cannot read from file");
-}
-
-TEST(file_test, write) {
-  file read_end, write_end;
-  file::pipe(read_end, write_end);
-  write(write_end, "test");
-  write_end.close();
-  EXPECT_READ(read_end, "test");
-}
-
-TEST(file_test, write_error) {
-  file f("test-file", file::RDONLY);
-  // We intentionally write to a file opened in the read-only mode to
-  // cause error.
-  EXPECT_SYSTEM_ERROR(f.write(" ", 1), EBADF, "cannot write to file");
-}
-
-TEST(file_test, dup) {
-  file f = open_file();
-  file copy = file::dup(f.descriptor());
-  EXPECT_NE(f.descriptor(), copy.descriptor());
-  EXPECT_EQ(file_content, read(copy, std::strlen(file_content)));
-}
-
-#  ifndef __COVERITY__
-TEST(file_test, dup_error) {
-  int value = -1;
-  EXPECT_SYSTEM_ERROR_NOASSERT(file::dup(value), EBADF,
-                               "cannot duplicate file descriptor -1");
-}
-#  endif
-
-TEST(file_test, dup2) {
-  file f = open_file();
-  file copy = open_file();
-  f.dup2(copy.descriptor());
-  EXPECT_NE(f.descriptor(), copy.descriptor());
-  EXPECT_READ(copy, file_content);
-}
-
-TEST(file_test, dup2_error) {
-  file f = open_file();
-  EXPECT_SYSTEM_ERROR_NOASSERT(
-      f.dup2(-1), EBADF,
-      fmt::format("cannot duplicate file descriptor {} to -1", f.descriptor()));
-}
-
-TEST(file_test, dup2_noexcept) {
-  file f = open_file();
-  file copy = open_file();
-  std::error_code ec;
-  f.dup2(copy.descriptor(), ec);
-  EXPECT_EQ(ec.value(), 0);
-  EXPECT_NE(f.descriptor(), copy.descriptor());
-  EXPECT_READ(copy, file_content);
-}
-
-TEST(file_test, dup2_noexcept_error) {
-  file f = open_file();
-  std::error_code ec;
-  SUPPRESS_ASSERT(f.dup2(-1, ec));
-  EXPECT_EQ(EBADF, ec.value());
-}
-
-TEST(file_test, pipe) {
-  file read_end, write_end;
-  file::pipe(read_end, write_end);
-  EXPECT_NE(-1, read_end.descriptor());
-  EXPECT_NE(-1, write_end.descriptor());
-  write(write_end, "test");
-  EXPECT_READ(read_end, "test");
-}
-
-TEST(file_test, fdopen) {
-  file read_end, write_end;
-  file::pipe(read_end, write_end);
-  int read_fd = read_end.descriptor();
-  EXPECT_EQ(read_fd, FMT_POSIX(fileno(read_end.fdopen("r").get())));
-}
-#endif  // FMT_USE_FCNTL
diff --git a/contrib/libs/fmt/test/os-test/ya.make b/contrib/libs/fmt/test/os-test/ya.make
deleted file mode 100644
index ef90d93fea..0000000000
--- a/contrib/libs/fmt/test/os-test/ya.make
+++ /dev/null
@@ -1,31 +0,0 @@
-# Generated by devtools/yamaker.
-
-GTEST()
-
-WITHOUT_LICENSE_TEXTS()
-
-LICENSE(MIT)
-
-PEERDIR(
-    contrib/libs/fmt
-    contrib/libs/fmt/test
-)
-
-NO_COMPILER_WARNINGS()
-
-NO_UTIL()
-
-CFLAGS(
-    -DFMT_LOCALE
-    -DFMT_SHARED
-    -DGTEST_HAS_STD_WSTRING=1
-    -D_SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING=1
-)
-
-SRCDIR(contrib/libs/fmt/test)
-
-SRCS(
-    os-test.cc
-)
-
-END()
diff --git a/contrib/libs/fmt/test/ostream-test.cc b/contrib/libs/fmt/test/ostream-test.cc
deleted file mode 100644
index f81039e5bb..0000000000
--- a/contrib/libs/fmt/test/ostream-test.cc
+++ /dev/null
@@ -1,301 +0,0 @@
-// Formatting library for C++ - std::ostream support tests
-//
-// Copyright (c) 2012 - present, Victor Zverovich
-// All rights reserved.
-//
-// For the license information refer to format.h.
-
-#include "fmt/format.h"
-
-using fmt::runtime;
-
-struct test {};
-
-// Test that there is no issues with specializations when fmt/ostream.h is
-// included after fmt/format.h.
-namespace fmt {
-template <> struct formatter<test> : formatter<int> {
-  auto format(const test&, format_context& ctx) -> decltype(ctx.out()) {
-    return formatter<int>::format(42, ctx);
-  }
-};
-}  // namespace fmt
-
-#include <sstream>
-
-#include "fmt/compile.h"
-#include "fmt/ostream.h"
-#include "fmt/ranges.h"
-#include "gmock/gmock.h"
-#include "gtest-extra.h"
-#include "util.h"
-
-std::ostream& operator<<(std::ostream& os, const date& d) {
-  os << d.year() << '-' << d.month() << '-' << d.day();
-  return os;
-}
-
-std::wostream& operator<<(std::wostream& os, const date& d) {
-  os << d.year() << L'-' << d.month() << L'-' << d.day();
-  return os;
-}
-
-// Make sure that overloaded comma operators do no harm to is_streamable.
-struct type_with_comma_op {};
-template <typename T> void operator,(type_with_comma_op, const T&);
-template <typename T> type_with_comma_op operator<<(T&, const date&);
-
-enum streamable_enum {};
-
-std::ostream& operator<<(std::ostream& os, streamable_enum) {
-  return os << "streamable_enum";
-}
-
-enum unstreamable_enum {};
-
-TEST(ostream_test, enum) {
-  EXPECT_EQ("streamable_enum", fmt::format("{}", streamable_enum()));
-  EXPECT_EQ("0", fmt::format("{}", unstreamable_enum()));
-}
-
-TEST(ostream_test, format) {
-  EXPECT_EQ("a string", fmt::format("{0}", test_string("a string")));
-  EXPECT_EQ("The date is 2012-12-9",
-            fmt::format("The date is {0}", date(2012, 12, 9)));
-}
-
-TEST(ostream_test, format_specs) {
-  using fmt::format_error;
-  EXPECT_EQ("def  ", fmt::format("{0:<5}", test_string("def")));
-  EXPECT_EQ("  def", fmt::format("{0:>5}", test_string("def")));
-  EXPECT_EQ(" def ", fmt::format("{0:^5}", test_string("def")));
-  EXPECT_EQ("def**", fmt::format("{0:*<5}", test_string("def")));
-  EXPECT_THROW_MSG((void)fmt::format(runtime("{0:+}"), test_string()),
-                   format_error, "format specifier requires numeric argument");
-  EXPECT_THROW_MSG((void)fmt::format(runtime("{0:-}"), test_string()),
-                   format_error, "format specifier requires numeric argument");
-  EXPECT_THROW_MSG((void)fmt::format(runtime("{0: }"), test_string()),
-                   format_error, "format specifier requires numeric argument");
-  EXPECT_THROW_MSG((void)fmt::format(runtime("{0:#}"), test_string()),
-                   format_error, "format specifier requires numeric argument");
-  EXPECT_THROW_MSG((void)fmt::format(runtime("{0:05}"), test_string()),
-                   format_error, "format specifier requires numeric argument");
-  EXPECT_EQ("test         ", fmt::format("{0:13}", test_string("test")));
-  EXPECT_EQ("test         ", fmt::format("{0:{1}}", test_string("test"), 13));
-  EXPECT_EQ("te", fmt::format("{0:.2}", test_string("test")));
-  EXPECT_EQ("te", fmt::format("{0:.{1}}", test_string("test"), 2));
-}
-
-struct empty_test {};
-std::ostream& operator<<(std::ostream& os, empty_test) { return os << ""; }
-
-TEST(ostream_test, empty_custom_output) {
-  EXPECT_EQ("", fmt::format("{}", empty_test()));
-}
-
-TEST(ostream_test, print) {
-  std::ostringstream os;
-  fmt::print(os, "Don't {}!", "panic");
-  EXPECT_EQ("Don't panic!", os.str());
-}
-
-TEST(ostream_test, write_to_ostream) {
-  std::ostringstream os;
-  fmt::memory_buffer buffer;
-  const char* foo = "foo";
-  buffer.append(foo, foo + std::strlen(foo));
-  fmt::detail::write_buffer(os, buffer);
-  EXPECT_EQ("foo", os.str());
-}
-
-TEST(ostream_test, write_to_ostream_max_size) {
-  auto max_size = fmt::detail::max_value<size_t>();
-  auto max_streamsize = fmt::detail::max_value<std::streamsize>();
-  if (max_size <= fmt::detail::to_unsigned(max_streamsize)) return;
-
-  struct test_buffer final : fmt::detail::buffer<char> {
-    explicit test_buffer(size_t size)
-        : fmt::detail::buffer<char>(nullptr, size, size) {}
-    void grow(size_t) override {}
-  } buffer(max_size);
-
-  struct mock_streambuf : std::streambuf {
-    MOCK_METHOD2(xsputn, std::streamsize(const void* s, std::streamsize n));
-    std::streamsize xsputn(const char* s, std::streamsize n) override {
-      const void* v = s;
-      return xsputn(v, n);
-    }
-  } streambuf;
-
-  struct test_ostream : std::ostream {
-    explicit test_ostream(mock_streambuf& output_buffer)
-        : std::ostream(&output_buffer) {}
-  } os(streambuf);
-
-  testing::InSequence sequence;
-  const char* data = nullptr;
-  using ustreamsize = std::make_unsigned<std::streamsize>::type;
-  ustreamsize size = max_size;
-  do {
-    auto n = std::min(size, fmt::detail::to_unsigned(max_streamsize));
-    EXPECT_CALL(streambuf, xsputn(data, static_cast<std::streamsize>(n)))
-        .WillOnce(testing::Return(max_streamsize));
-    data += n;
-    size -= n;
-  } while (size != 0);
-  fmt::detail::write_buffer(os, buffer);
-}
-
-TEST(ostream_test, join) {
-  int v[3] = {1, 2, 3};
-  EXPECT_EQ("1, 2, 3", fmt::format("{}", fmt::join(v, v + 3, ", ")));
-}
-
-TEST(ostream_test, join_fallback_formatter) {
-  auto strs = std::vector<test_string>{test_string("foo"), test_string("bar")};
-  EXPECT_EQ("foo, bar", fmt::format("{}", fmt::join(strs, ", ")));
-}
-
-#if FMT_USE_CONSTEXPR
-TEST(ostream_test, constexpr_string) {
-  EXPECT_EQ("42", format(FMT_STRING("{}"), std::string("42")));
-  EXPECT_EQ("a string", format(FMT_STRING("{0}"), test_string("a string")));
-}
-#endif
-
-namespace fmt_test {
-struct abc {};
-
-template <typename Output> Output& operator<<(Output& out, abc) {
-  return out << "abc";
-}
-}  // namespace fmt_test
-
-template <typename T> struct test_template {};
-
-template <typename T>
-std::ostream& operator<<(std::ostream& os, test_template<T>) {
-  return os << 1;
-}
-
-namespace fmt {
-template <typename T> struct formatter<test_template<T>> : formatter<int> {
-  auto format(test_template<T>, format_context& ctx) -> decltype(ctx.out()) {
-    return formatter<int>::format(2, ctx);
-  }
-};
-}  // namespace fmt
-
-TEST(ostream_test, template) {
-  EXPECT_EQ("2", fmt::format("{}", test_template<int>()));
-}
-
-TEST(ostream_test, format_to_n) {
-  char buffer[4];
-  buffer[3] = 'x';
-  auto result = fmt::format_to_n(buffer, 3, "{}", fmt_test::abc());
-  EXPECT_EQ(3u, result.size);
-  EXPECT_EQ(buffer + 3, result.out);
-  EXPECT_EQ("abcx", fmt::string_view(buffer, 4));
-  result = fmt::format_to_n(buffer, 3, "x{}y", fmt_test::abc());
-  EXPECT_EQ(5u, result.size);
-  EXPECT_EQ(buffer + 3, result.out);
-  EXPECT_EQ("xabx", fmt::string_view(buffer, 4));
-}
-
-template <typename T> struct convertible {
-  T value;
-  explicit convertible(const T& val) : value(val) {}
-  operator T() const { return value; }
-};
-
-TEST(ostream_test, disable_builtin_ostream_operators) {
-  EXPECT_EQ("42", fmt::format("{:d}", convertible<unsigned short>(42)));
-  EXPECT_EQ("foo", fmt::format("{}", convertible<const char*>("foo")));
-}
-
-struct explicitly_convertible_to_string_like {
-  template <typename String,
-            typename = typename std::enable_if<std::is_constructible<
-                String, const char*, size_t>::value>::type>
-  explicit operator String() const {
-    return String("foo", 3u);
-  }
-};
-
-std::ostream& operator<<(std::ostream& os,
-                         explicitly_convertible_to_string_like) {
-  return os << "bar";
-}
-
-TEST(ostream_test, format_explicitly_convertible_to_string_like) {
-  EXPECT_EQ("bar", fmt::format("{}", explicitly_convertible_to_string_like()));
-}
-
-#ifdef FMT_USE_STRING_VIEW
-struct explicitly_convertible_to_std_string_view {
-  explicit operator fmt::detail::std_string_view<char>() const {
-    return {"foo", 3u};
-  }
-};
-
-std::ostream& operator<<(std::ostream& os,
-                         explicitly_convertible_to_std_string_view) {
-  return os << "bar";
-}
-
-TEST(ostream_test, format_explicitly_convertible_to_std_string_view) {
-  EXPECT_EQ("bar", fmt::format("{}", explicitly_convertible_to_string_like()));
-}
-#endif  // FMT_USE_STRING_VIEW
-
-struct streamable_and_convertible_to_bool {
-  operator bool() const { return true; }
-};
-
-std::ostream& operator<<(std::ostream& os, streamable_and_convertible_to_bool) {
-  return os << "foo";
-}
-
-TEST(ostream_test, format_convertible_to_bool) {
-  // operator<< is intentionally not used because of potential ODR violations.
-  EXPECT_EQ(fmt::format("{}", streamable_and_convertible_to_bool()), "true");
-}
-
-struct copyfmt_test {};
-
-std::ostream& operator<<(std::ostream& os, copyfmt_test) {
-  std::ios ios(nullptr);
-  ios.copyfmt(os);
-  return os << "foo";
-}
-
-TEST(ostream_test, copyfmt) {
-  EXPECT_EQ("foo", fmt::format("{}", copyfmt_test()));
-}
-
-TEST(ostream_test, to_string) {
-  EXPECT_EQ("abc", fmt::to_string(fmt_test::abc()));
-}
-
-TEST(ostream_test, range) {
-  auto strs = std::vector<test_string>{test_string("foo"), test_string("bar")};
-  EXPECT_EQ("[foo, bar]", fmt::format("{}", strs));
-}
-
-struct abstract {
-  virtual ~abstract() = default;
-  virtual void f() = 0;
-  friend std::ostream& operator<<(std::ostream& os, const abstract&) {
-    return os;
-  }
-};
-
-void format_abstract_compiles(const abstract& a) {
-  fmt::format(FMT_COMPILE("{}"), a);
-}
-
-TEST(ostream_test, is_formattable) {
-  EXPECT_TRUE(fmt::is_formattable<std::string>());
-  EXPECT_TRUE(fmt::is_formattable<fmt::detail::std_string_view<char>>());
-}
diff --git a/contrib/libs/fmt/test/ostream-test/ya.make b/contrib/libs/fmt/test/ostream-test/ya.make
deleted file mode 100644
index 74f45abcf9..0000000000
--- a/contrib/libs/fmt/test/ostream-test/ya.make
+++ /dev/null
@@ -1,31 +0,0 @@
-# Generated by devtools/yamaker.
-
-GTEST()
-
-WITHOUT_LICENSE_TEXTS()
-
-LICENSE(MIT)
-
-PEERDIR(
-    contrib/libs/fmt
-    contrib/libs/fmt/test
-)
-
-NO_COMPILER_WARNINGS()
-
-NO_UTIL()
-
-CFLAGS(
-    -DFMT_LOCALE
-    -DFMT_SHARED
-    -DGTEST_HAS_STD_WSTRING=1
-    -D_SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING=1
-)
-
-SRCDIR(contrib/libs/fmt/test)
-
-SRCS(
-    ostream-test.cc
-)
-
-END()
diff --git a/contrib/libs/fmt/test/posix-mock-test.cc b/contrib/libs/fmt/test/posix-mock-test.cc
deleted file mode 100644
index 3a20b269a4..0000000000
--- a/contrib/libs/fmt/test/posix-mock-test.cc
+++ /dev/null
@@ -1,540 +0,0 @@
-// Tests of the C++ interface to POSIX functions that require mocks
-//
-// Copyright (c) 2012 - present, Victor Zverovich
-// All rights reserved.
-//
-// For the license information refer to format.h.
-
-// Disable bogus MSVC warnings.
-#ifndef _CRT_SECURE_NO_WARNINGS
-#  define _CRT_SECURE_NO_WARNINGS
-#endif
-
-#include "posix-mock.h"
-
-#include <errno.h>
-#include <fcntl.h>
-
-#include <climits>
-#include <memory>
-
-#include "../src/os.cc"
-
-#ifdef _WIN32
-#  include <io.h>
-#  undef max
-#endif
-
-#include "gmock/gmock.h"
-#include "gtest-extra.h"
-#include "util.h"
-
-using fmt::buffered_file;
-
-using testing::_;
-using testing::Return;
-using testing::StrEq;
-
-template <typename Mock> struct scoped_mock : testing::StrictMock<Mock> {
-  scoped_mock() { Mock::instance = this; }
-  ~scoped_mock() { Mock::instance = nullptr; }
-};
-
-namespace {
-int open_count;
-int close_count;
-int dup_count;
-int dup2_count;
-int fdopen_count;
-int read_count;
-int write_count;
-int pipe_count;
-int fopen_count;
-int fclose_count;
-int fileno_count;
-size_t read_nbyte;
-size_t write_nbyte;
-bool sysconf_error;
-
-enum { none, max_size, error } fstat_sim;
-}  // namespace
-
-#define EMULATE_EINTR(func, error_result) \
-  if (func##_count != 0) {                \
-    if (func##_count++ != 3) {            \
-      errno = EINTR;                      \
-      return error_result;                \
-    }                                     \
-  }
-
-#ifndef _MSC_VER
-int test::open(const char* path, int oflag, int mode) {
-  EMULATE_EINTR(open, -1);
-  return ::open(path, oflag, mode);
-}
-#else
-errno_t test::sopen_s(int* pfh, const char* filename, int oflag, int shflag,
-                      int pmode) {
-  EMULATE_EINTR(open, EINTR);
-  return _sopen_s(pfh, filename, oflag, shflag, pmode);
-}
-#endif
-
-#ifndef _WIN32
-
-long test::sysconf(int name) {
-  long result = ::sysconf(name);
-  if (!sysconf_error) return result;
-  // Simulate an error.
-  errno = EINVAL;
-  return -1;
-}
-
-static off_t max_file_size() { return std::numeric_limits<off_t>::max(); }
-
-int test::fstat(int fd, struct stat* buf) {
-  int result = ::fstat(fd, buf);
-  if (fstat_sim == max_size) buf->st_size = max_file_size();
-  return result;
-}
-
-#else
-
-static LONGLONG max_file_size() { return std::numeric_limits<LONGLONG>::max(); }
-
-DWORD test::GetFileSize(HANDLE hFile, LPDWORD lpFileSizeHigh) {
-  if (fstat_sim == error) {
-    SetLastError(ERROR_ACCESS_DENIED);
-    return INVALID_FILE_SIZE;
-  }
-  if (fstat_sim == max_size) {
-    DWORD max = std::numeric_limits<DWORD>::max();
-    *lpFileSizeHigh = max >> 1;
-    return max;
-  }
-  return ::GetFileSize(hFile, lpFileSizeHigh);
-}
-
-#endif
-
-int test::close(int fildes) {
-  // Close the file first because close shouldn't be retried.
-  int result = ::FMT_POSIX(close(fildes));
-  EMULATE_EINTR(close, -1);
-  return result;
-}
-
-int test::dup(int fildes) {
-  EMULATE_EINTR(dup, -1);
-  return ::FMT_POSIX(dup(fildes));
-}
-
-int test::dup2(int fildes, int fildes2) {
-  EMULATE_EINTR(dup2, -1);
-  return ::FMT_POSIX(dup2(fildes, fildes2));
-}
-
-FILE* test::fdopen(int fildes, const char* mode) {
-  EMULATE_EINTR(fdopen, nullptr);
-  return ::FMT_POSIX(fdopen(fildes, mode));
-}
-
-test::ssize_t test::read(int fildes, void* buf, test::size_t nbyte) {
-  read_nbyte = nbyte;
-  EMULATE_EINTR(read, -1);
-  return ::FMT_POSIX(read(fildes, buf, nbyte));
-}
-
-test::ssize_t test::write(int fildes, const void* buf, test::size_t nbyte) {
-  write_nbyte = nbyte;
-  EMULATE_EINTR(write, -1);
-  return ::FMT_POSIX(write(fildes, buf, nbyte));
-}
-
-#ifndef _WIN32
-int test::pipe(int fildes[2]) {
-  EMULATE_EINTR(pipe, -1);
-  return ::pipe(fildes);
-}
-#else
-int test::pipe(int* pfds, unsigned psize, int textmode) {
-  EMULATE_EINTR(pipe, -1);
-  return _pipe(pfds, psize, textmode);
-}
-#endif
-
-FILE* test::fopen(const char* filename, const char* mode) {
-  EMULATE_EINTR(fopen, nullptr);
-  return ::fopen(filename, mode);
-}
-
-int test::fclose(FILE* stream) {
-  EMULATE_EINTR(fclose, EOF);
-  return ::fclose(stream);
-}
-
-int(test::fileno)(FILE* stream) {
-  EMULATE_EINTR(fileno, -1);
-#ifdef fileno
-  return FMT_POSIX(fileno(stream));
-#else
-  return ::FMT_POSIX(fileno(stream));
-#endif
-}
-
-#ifndef _WIN32
-#  define EXPECT_RETRY(statement, func, message) \
-    func##_count = 1;                            \
-    statement;                                   \
-    EXPECT_EQ(4, func##_count);                  \
-    func##_count = 0;
-#  define EXPECT_EQ_POSIX(expected, actual) EXPECT_EQ(expected, actual)
-#else
-#  define EXPECT_RETRY(statement, func, message)    \
-    func##_count = 1;                               \
-    EXPECT_SYSTEM_ERROR(statement, EINTR, message); \
-    func##_count = 0;
-#  define EXPECT_EQ_POSIX(expected, actual)
-#endif
-
-#if FMT_USE_FCNTL
-void write_file(fmt::cstring_view filename, fmt::string_view content) {
-  fmt::buffered_file f(filename, "w");
-  f.print("{}", content);
-}
-
-using fmt::file;
-
-TEST(os_test, getpagesize) {
-#  ifdef _WIN32
-  SYSTEM_INFO si = {};
-  GetSystemInfo(&si);
-  EXPECT_EQ(si.dwPageSize, fmt::getpagesize());
-#  else
-  EXPECT_EQ(sysconf(_SC_PAGESIZE), fmt::getpagesize());
-  sysconf_error = true;
-  EXPECT_SYSTEM_ERROR(fmt::getpagesize(), EINVAL,
-                      "cannot get memory page size");
-  sysconf_error = false;
-#  endif
-}
-
-TEST(file_test, open_retry) {
-  write_file("temp", "there must be something here");
-  std::unique_ptr<file> f{nullptr};
-  EXPECT_RETRY(f.reset(new file("temp", file::RDONLY)), open,
-               "cannot open file temp");
-#  ifndef _WIN32
-  char c = 0;
-  f->read(&c, 1);
-#  endif
-}
-
-TEST(file_test, close_no_retry_in_dtor) {
-  file read_end, write_end;
-  file::pipe(read_end, write_end);
-  std::unique_ptr<file> f(new file(std::move(read_end)));
-  int saved_close_count = 0;
-  EXPECT_WRITE(
-      stderr,
-      {
-        close_count = 1;
-        f.reset(nullptr);
-        saved_close_count = close_count;
-        close_count = 0;
-      },
-      system_error_message(EINTR, "cannot close file") + "\n");
-  EXPECT_EQ(2, saved_close_count);
-}
-
-TEST(file_test, close_no_retry) {
-  file read_end, write_end;
-  file::pipe(read_end, write_end);
-  close_count = 1;
-  EXPECT_SYSTEM_ERROR(read_end.close(), EINTR, "cannot close file");
-  EXPECT_EQ(2, close_count);
-  close_count = 0;
-}
-
-TEST(file_test, size) {
-  std::string content = "top secret, destroy before reading";
-  write_file("temp", content);
-  file f("temp", file::RDONLY);
-  EXPECT_GE(f.size(), 0);
-  EXPECT_EQ(content.size(), static_cast<unsigned long long>(f.size()));
-#  ifdef _WIN32
-  auto error_code = std::error_code();
-  fstat_sim = error;
-  try {
-    f.size();
-  } catch (const std::system_error& e) {
-    error_code = e.code();
-  }
-  fstat_sim = none;
-  EXPECT_EQ(error_code,
-            std::error_code(ERROR_ACCESS_DENIED, fmt::system_category()));
-#  else
-  f.close();
-  EXPECT_SYSTEM_ERROR(f.size(), EBADF, "cannot get file attributes");
-#  endif
-}
-
-TEST(file_test, max_size) {
-  write_file("temp", "");
-  file f("temp", file::RDONLY);
-  fstat_sim = max_size;
-  EXPECT_GE(f.size(), 0);
-  EXPECT_EQ(max_file_size(), f.size());
-  fstat_sim = none;
-}
-
-TEST(file_test, read_retry) {
-  file read_end, write_end;
-  file::pipe(read_end, write_end);
-  enum { SIZE = 4 };
-  write_end.write("test", SIZE);
-  write_end.close();
-  char buffer[SIZE];
-  size_t count = 0;
-  EXPECT_RETRY(count = read_end.read(buffer, SIZE), read,
-               "cannot read from file");
-  EXPECT_EQ_POSIX(static_cast<std::streamsize>(SIZE), count);
-}
-
-TEST(file_test, write_retry) {
-  file read_end, write_end;
-  file::pipe(read_end, write_end);
-  enum { SIZE = 4 };
-  size_t count = 0;
-  EXPECT_RETRY(count = write_end.write("test", SIZE), write,
-               "cannot write to file");
-  write_end.close();
-#  ifndef _WIN32
-  EXPECT_EQ(static_cast<std::streamsize>(SIZE), count);
-  char buffer[SIZE + 1];
-  read_end.read(buffer, SIZE);
-  buffer[SIZE] = '\0';
-  EXPECT_STREQ("test", buffer);
-#  endif
-}
-
-#  ifdef _WIN32
-TEST(file_test, convert_read_count) {
-  file read_end, write_end;
-  file::pipe(read_end, write_end);
-  char c;
-  size_t size = UINT_MAX;
-  if (sizeof(unsigned) != sizeof(size_t)) ++size;
-  read_count = 1;
-  read_nbyte = 0;
-  EXPECT_THROW(read_end.read(&c, size), std::system_error);
-  read_count = 0;
-  EXPECT_EQ(UINT_MAX, read_nbyte);
-}
-
-TEST(file_test, convert_write_count) {
-  file read_end, write_end;
-  file::pipe(read_end, write_end);
-  char c;
-  size_t size = UINT_MAX;
-  if (sizeof(unsigned) != sizeof(size_t)) ++size;
-  write_count = 1;
-  write_nbyte = 0;
-  EXPECT_THROW(write_end.write(&c, size), std::system_error);
-  write_count = 0;
-  EXPECT_EQ(UINT_MAX, write_nbyte);
-}
-#  endif
-
-TEST(file_test, dup_no_retry) {
-  int stdout_fd = FMT_POSIX(fileno(stdout));
-  dup_count = 1;
-  EXPECT_SYSTEM_ERROR(
-      file::dup(stdout_fd), EINTR,
-      fmt::format("cannot duplicate file descriptor {}", stdout_fd));
-  dup_count = 0;
-}
-
-TEST(file_test, dup2_retry) {
-  int stdout_fd = FMT_POSIX(fileno(stdout));
-  file f1 = file::dup(stdout_fd), f2 = file::dup(stdout_fd);
-  EXPECT_RETRY(f1.dup2(f2.descriptor()), dup2,
-               fmt::format("cannot duplicate file descriptor {} to {}",
-                           f1.descriptor(), f2.descriptor()));
-}
-
-TEST(file_test, dup2_no_except_retry) {
-  int stdout_fd = FMT_POSIX(fileno(stdout));
-  file f1 = file::dup(stdout_fd), f2 = file::dup(stdout_fd);
-  std::error_code ec;
-  dup2_count = 1;
-  f1.dup2(f2.descriptor(), ec);
-#  ifndef _WIN32
-  EXPECT_EQ(4, dup2_count);
-#  else
-  EXPECT_EQ(EINTR, ec.value());
-#  endif
-  dup2_count = 0;
-}
-
-TEST(file_test, pipe_no_retry) {
-  file read_end, write_end;
-  pipe_count = 1;
-  EXPECT_SYSTEM_ERROR(file::pipe(read_end, write_end), EINTR,
-                      "cannot create pipe");
-  pipe_count = 0;
-}
-
-TEST(file_test, fdopen_no_retry) {
-  file read_end, write_end;
-  file::pipe(read_end, write_end);
-  fdopen_count = 1;
-  EXPECT_SYSTEM_ERROR(read_end.fdopen("r"), EINTR,
-                      "cannot associate stream with file descriptor");
-  fdopen_count = 0;
-}
-
-TEST(buffered_file_test, open_retry) {
-  write_file("temp", "there must be something here");
-  std::unique_ptr<buffered_file> f{nullptr};
-  EXPECT_RETRY(f.reset(new buffered_file("temp", "r")), fopen,
-               "cannot open file temp");
-#  ifndef _WIN32
-  char c = 0;
-  if (fread(&c, 1, 1, f->get()) < 1)
-    throw fmt::system_error(errno, "fread failed");
-#  endif
-}
-
-TEST(buffered_file_test, close_no_retry_in_dtor) {
-  file read_end, write_end;
-  file::pipe(read_end, write_end);
-  std::unique_ptr<buffered_file> f(new buffered_file(read_end.fdopen("r")));
-  int saved_fclose_count = 0;
-  EXPECT_WRITE(
-      stderr,
-      {
-        fclose_count = 1;
-        f.reset(nullptr);
-        saved_fclose_count = fclose_count;
-        fclose_count = 0;
-      },
-      system_error_message(EINTR, "cannot close file") + "\n");
-  EXPECT_EQ(2, saved_fclose_count);
-}
-
-TEST(buffered_file_test, close_no_retry) {
-  file read_end, write_end;
-  file::pipe(read_end, write_end);
-  buffered_file f = read_end.fdopen("r");
-  fclose_count = 1;
-  EXPECT_SYSTEM_ERROR(f.close(), EINTR, "cannot close file");
-  EXPECT_EQ(2, fclose_count);
-  fclose_count = 0;
-}
-
-TEST(buffered_file_test, fileno_no_retry) {
-  file read_end, write_end;
-  file::pipe(read_end, write_end);
-  buffered_file f = read_end.fdopen("r");
-  fileno_count = 1;
-  EXPECT_SYSTEM_ERROR((f.fileno)(), EINTR, "cannot get file descriptor");
-  EXPECT_EQ(2, fileno_count);
-  fileno_count = 0;
-}
-#endif  // FMT_USE_FCNTL
-
-struct test_mock {
-  static test_mock* instance;
-} * test_mock::instance;
-
-TEST(scoped_mock, scope) {
-  {
-    scoped_mock<test_mock> mock;
-    EXPECT_EQ(&mock, test_mock::instance);
-    test_mock& copy = mock;
-    static_cast<void>(copy);
-  }
-  EXPECT_EQ(nullptr, test_mock::instance);
-}
-
-#if defined(FMT_LOCALE) && !defined(_LIBCPP_VERSION)
-
-using locale_type = fmt::locale::type;
-
-struct locale_mock {
-  static locale_mock* instance;
-  MOCK_METHOD3(newlocale, locale_type(int category_mask, const char* locale,
-                                      locale_type base));
-  MOCK_METHOD1(freelocale, void(locale_type locale));
-} * locale_mock::instance;
-
-#  ifdef _MSC_VER
-#    pragma warning(push)
-#    pragma warning(disable : 4273)
-#    ifdef __clang__
-#      pragma clang diagnostic push
-#      pragma clang diagnostic ignored "-Winconsistent-dllimport"
-#    endif
-
-_locale_t _create_locale(int category, const char* locale) {
-  return locale_mock::instance->newlocale(category, locale, 0);
-}
-
-void _free_locale(_locale_t locale) {
-  locale_mock::instance->freelocale(locale);
-}
-#    ifdef __clang__
-#      pragma clang diagnostic pop
-#    endif
-#    pragma warning(pop)
-#  endif
-
-#  if defined(__THROW) && \
-      ((FMT_GCC_VERSION > 0 && FMT_GCC_VERSION <= 408) || defined(__e2k__))
-#    define FMT_LOCALE_THROW __THROW
-#  else
-#    define FMT_LOCALE_THROW
-#  endif
-
-#  if defined(__APPLE__) || \
-      (defined(__FreeBSD__) && __FreeBSD_version < 1200002)
-typedef int FreeLocaleResult;
-#  else
-typedef void FreeLocaleResult;
-#  endif
-
-FreeLocaleResult freelocale(locale_type locale) FMT_LOCALE_THROW {
-  locale_mock::instance->freelocale(locale);
-  return FreeLocaleResult();
-}
-
-#  undef FMT_LOCALE_THROW
-
-#  if !defined(_WIN32) || defined(_LIBCPP_VERSION)
-locale_t test::newlocale(int category_mask, const char* locale, locale_t base) {
-  return locale_mock::instance->newlocale(category_mask, locale, base);
-}
-
-TEST(locale_test, locale_mock) {
-  scoped_mock<locale_mock> mock;
-  auto locale = reinterpret_cast<locale_type>(11);
-  EXPECT_CALL(mock, newlocale(222, StrEq("foo"), locale));
-  FMT_SYSTEM(newlocale(222, "foo", locale));
-}
-#  endif
-
-TEST(locale_test, locale) {
-#  ifndef LC_NUMERIC_MASK
-  enum { LC_NUMERIC_MASK = LC_NUMERIC };
-#  endif
-  scoped_mock<locale_mock> mock;
-  auto impl = reinterpret_cast<locale_type>(42);
-  EXPECT_CALL(mock, newlocale(LC_NUMERIC_MASK, StrEq("C"), nullptr))
-      .WillOnce(Return(impl));
-  EXPECT_CALL(mock, freelocale(impl));
-  fmt::locale loc;
-  EXPECT_EQ(impl, loc.get());
-}
-
-#endif  // FMT_LOCALE
diff --git a/contrib/libs/fmt/test/posix-mock-test/ya.make b/contrib/libs/fmt/test/posix-mock-test/ya.make
deleted file mode 100644
index 411bacbd94..0000000000
--- a/contrib/libs/fmt/test/posix-mock-test/ya.make
+++ /dev/null
@@ -1,32 +0,0 @@
-# Generated by devtools/yamaker.
-
-GTEST()
-
-WITHOUT_LICENSE_TEXTS()
-
-LICENSE(MIT)
-
-ADDINCL(
-    contrib/libs/fmt/include
-)
-
-NO_COMPILER_WARNINGS()
-
-NO_UTIL()
-
-CFLAGS(
-    -DFMT_LOCALE
-    -DGTEST_HAS_STD_WSTRING=1
-    -D_SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING=1
-)
-
-SRCDIR(contrib/libs/fmt)
-
-SRCS(
-    src/format.cc
-    test/gtest-extra.cc
-    test/posix-mock-test.cc
-    test/util.cc
-)
-
-END()
diff --git a/contrib/libs/fmt/test/posix-mock.h b/contrib/libs/fmt/test/posix-mock.h
deleted file mode 100644
index 1f204263c6..0000000000
--- a/contrib/libs/fmt/test/posix-mock.h
+++ /dev/null
@@ -1,78 +0,0 @@
-// Formatting library for C++ - mocks of POSIX functions
-//
-// Copyright (c) 2012 - present, Victor Zverovich
-// All rights reserved.
-//
-// For the license information refer to format.h.
-
-#ifndef FMT_POSIX_TEST_H
-#define FMT_POSIX_TEST_H
-
-#include <errno.h>
-#include <locale.h>
-#include <stdio.h>
-#ifdef __APPLE__
-#  include <xlocale.h>
-#endif
-
-#ifdef _WIN32
-#  include <windows.h>
-#  include <locale>  // for libc++ locale_win32.h
-#else
-#  include <sys/param.h>  // for FreeBSD version
-#  include <sys/types.h>  // for ssize_t
-#endif
-
-#ifndef _MSC_VER
-struct stat;
-#endif
-
-namespace test {
-
-#ifndef _MSC_VER
-// Size type for read and write.
-typedef size_t size_t;
-typedef ssize_t ssize_t;
-int open(const char* path, int oflag, int mode);
-int fstat(int fd, struct stat* buf);
-#else
-typedef unsigned size_t;
-typedef int ssize_t;
-errno_t sopen_s(int* pfh, const char* filename, int oflag, int shflag,
-                int pmode);
-#endif
-
-#ifndef _WIN32
-long sysconf(int name);
-#else
-DWORD GetFileSize(HANDLE hFile, LPDWORD lpFileSizeHigh);
-#endif
-
-int close(int fildes);
-
-int dup(int fildes);
-int dup2(int fildes, int fildes2);
-
-FILE* fdopen(int fildes, const char* mode);
-
-ssize_t read(int fildes, void* buf, size_t nbyte);
-ssize_t write(int fildes, const void* buf, size_t nbyte);
-
-#ifndef _WIN32
-int pipe(int fildes[2]);
-#else
-int pipe(int* pfds, unsigned psize, int textmode);
-#endif
-
-FILE* fopen(const char* filename, const char* mode);
-int fclose(FILE* stream);
-int(fileno)(FILE* stream);
-
-#if defined(FMT_LOCALE) && (!defined(_WIN32) || defined(_LIBCPP_VERSION))
-locale_t newlocale(int category_mask, const char* locale, locale_t base);
-#endif
-}  // namespace test
-
-#define FMT_SYSTEM(call) test::call
-
-#endif  // FMT_POSIX_TEST_H
diff --git a/contrib/libs/fmt/test/printf-test.cc b/contrib/libs/fmt/test/printf-test.cc
deleted file mode 100644
index 0bb9ccdaf6..0000000000
--- a/contrib/libs/fmt/test/printf-test.cc
+++ /dev/null
@@ -1,588 +0,0 @@
-// Formatting library for C++ - printf tests
-//
-// Copyright (c) 2012 - present, Victor Zverovich
-// All rights reserved.
-//
-// For the license information refer to format.h.
-
-#include "fmt/printf.h"
-
-#include <cctype>
-#include <climits>
-#include <cstring>
-
-#include "fmt/ostream.h"
-#include "fmt/xchar.h"
-#include "gtest-extra.h"
-#include "util.h"
-
-using fmt::format;
-using fmt::format_error;
-using fmt::detail::max_value;
-
-const unsigned big_num = INT_MAX + 1u;
-
-// Makes format string argument positional.
-static std::string make_positional(fmt::string_view format) {
-  std::string s(format.data(), format.size());
-  s.replace(s.find('%'), 1, "%1$");
-  return s;
-}
-
-static std::wstring make_positional(fmt::basic_string_view<wchar_t> format) {
-  std::wstring s(format.data(), format.size());
-  s.replace(s.find(L'%'), 1, L"%1$");
-  return s;
-}
-
-// A wrapper around fmt::sprintf to workaround bogus warnings about invalid
-// format strings in MSVC.
-template <typename... Args>
-std::string test_sprintf(fmt::string_view format, const Args&... args) {
-  return fmt::sprintf(format, args...);
-}
-template <typename... Args>
-std::wstring test_sprintf(fmt::basic_string_view<wchar_t> format,
-                          const Args&... args) {
-  return fmt::sprintf(format, args...);
-}
-
-#define EXPECT_PRINTF(expected_output, format, arg)     \
-  EXPECT_EQ(expected_output, test_sprintf(format, arg)) \
-      << "format: " << format;                          \
-  EXPECT_EQ(expected_output, fmt::sprintf(make_positional(format), arg))
-
-TEST(printf_test, no_args) {
-  EXPECT_EQ("test", test_sprintf("test"));
-  EXPECT_EQ(L"test", fmt::sprintf(L"test"));
-}
-
-TEST(printf_test, escape) {
-  EXPECT_EQ("%", test_sprintf("%%"));
-  EXPECT_EQ("before %", test_sprintf("before %%"));
-  EXPECT_EQ("% after", test_sprintf("%% after"));
-  EXPECT_EQ("before % after", test_sprintf("before %% after"));
-  EXPECT_EQ("%s", test_sprintf("%%s"));
-  EXPECT_EQ(L"%", fmt::sprintf(L"%%"));
-  EXPECT_EQ(L"before %", fmt::sprintf(L"before %%"));
-  EXPECT_EQ(L"% after", fmt::sprintf(L"%% after"));
-  EXPECT_EQ(L"before % after", fmt::sprintf(L"before %% after"));
-  EXPECT_EQ(L"%s", fmt::sprintf(L"%%s"));
-}
-
-TEST(printf_test, positional_args) {
-  EXPECT_EQ("42", test_sprintf("%1$d", 42));
-  EXPECT_EQ("before 42", test_sprintf("before %1$d", 42));
-  EXPECT_EQ("42 after", test_sprintf("%1$d after", 42));
-  EXPECT_EQ("before 42 after", test_sprintf("before %1$d after", 42));
-  EXPECT_EQ("answer = 42", test_sprintf("%1$s = %2$d", "answer", 42));
-  EXPECT_EQ("42 is the answer", test_sprintf("%2$d is the %1$s", "answer", 42));
-  EXPECT_EQ("abracadabra", test_sprintf("%1$s%2$s%1$s", "abra", "cad"));
-}
-
-TEST(printf_test, automatic_arg_indexing) {
-  EXPECT_EQ("abc", test_sprintf("%c%c%c", 'a', 'b', 'c'));
-}
-
-TEST(printf_test, number_is_too_big_in_arg_index) {
-  EXPECT_THROW_MSG(test_sprintf(format("%{}$", big_num)), format_error,
-                   "argument not found");
-  EXPECT_THROW_MSG(test_sprintf(format("%{}$d", big_num)), format_error,
-                   "argument not found");
-}
-
-TEST(printf_test, switch_arg_indexing) {
-  EXPECT_THROW_MSG(test_sprintf("%1$d%", 1, 2), format_error,
-                   "cannot switch from manual to automatic argument indexing");
-  EXPECT_THROW_MSG(test_sprintf(format("%1$d%{}d", big_num), 1, 2),
-                   format_error, "number is too big");
-  EXPECT_THROW_MSG(test_sprintf("%1$d%d", 1, 2), format_error,
-                   "cannot switch from manual to automatic argument indexing");
-
-  EXPECT_THROW_MSG(test_sprintf("%d%1$", 1, 2), format_error,
-                   "cannot switch from automatic to manual argument indexing");
-  EXPECT_THROW_MSG(test_sprintf(format("%d%{}$d", big_num), 1, 2), format_error,
-                   "cannot switch from automatic to manual argument indexing");
-  EXPECT_THROW_MSG(test_sprintf("%d%1$d", 1, 2), format_error,
-                   "cannot switch from automatic to manual argument indexing");
-
-  // Indexing errors override width errors.
-  EXPECT_THROW_MSG(test_sprintf(format("%d%1${}d", big_num), 1, 2),
-                   format_error, "number is too big");
-  EXPECT_THROW_MSG(test_sprintf(format("%1$d%{}d", big_num), 1, 2),
-                   format_error, "number is too big");
-}
-
-TEST(printf_test, invalid_arg_index) {
-  EXPECT_THROW_MSG(test_sprintf("%0$d", 42), format_error,
-                   "argument not found");
-  EXPECT_THROW_MSG(test_sprintf("%2$d", 42), format_error,
-                   "argument not found");
-  EXPECT_THROW_MSG(test_sprintf(format("%{}$d", INT_MAX), 42), format_error,
-                   "argument not found");
-
-  EXPECT_THROW_MSG(test_sprintf("%2$", 42), format_error, "argument not found");
-  EXPECT_THROW_MSG(test_sprintf(format("%{}$d", big_num), 42), format_error,
-                   "argument not found");
-}
-
-TEST(printf_test, default_align_right) {
-  EXPECT_PRINTF("   42", "%5d", 42);
-  EXPECT_PRINTF("  abc", "%5s", "abc");
-}
-
-TEST(printf_test, zero_flag) {
-  EXPECT_PRINTF("00042", "%05d", 42);
-  EXPECT_PRINTF("-0042", "%05d", -42);
-
-  EXPECT_PRINTF("00042", "%05d", 42);
-  EXPECT_PRINTF("-0042", "%05d", -42);
-  EXPECT_PRINTF("-004.2", "%06g", -4.2);
-
-  EXPECT_PRINTF("+00042", "%00+6d", 42);
-
-  EXPECT_PRINTF("   42", "%05.d", 42);
-  EXPECT_PRINTF(" 0042", "%05.4d", 42);
-
-  // '0' flag is ignored for non-numeric types.
-  EXPECT_PRINTF("    x", "%05c", 'x');
-}
-
-TEST(printf_test, plus_flag) {
-  EXPECT_PRINTF("+42", "%+d", 42);
-  EXPECT_PRINTF("-42", "%+d", -42);
-  EXPECT_PRINTF("+0042", "%+05d", 42);
-  EXPECT_PRINTF("+0042", "%0++5d", 42);
-
-  // '+' flag is ignored for non-numeric types.
-  EXPECT_PRINTF("x", "%+c", 'x');
-
-  // '+' flag wins over space flag
-  EXPECT_PRINTF("+42", "%+ d", 42);
-  EXPECT_PRINTF("-42", "%+ d", -42);
-  EXPECT_PRINTF("+42", "% +d", 42);
-  EXPECT_PRINTF("-42", "% +d", -42);
-  EXPECT_PRINTF("+0042", "% +05d", 42);
-  EXPECT_PRINTF("+0042", "%0+ 5d", 42);
-
-  // '+' flag and space flag are both ignored for non-numeric types.
-  EXPECT_PRINTF("x", "%+ c", 'x');
-  EXPECT_PRINTF("x", "% +c", 'x');
-}
-
-TEST(printf_test, minus_flag) {
-  EXPECT_PRINTF("abc  ", "%-5s", "abc");
-  EXPECT_PRINTF("abc  ", "%0--5s", "abc");
-
-  EXPECT_PRINTF("7    ", "%-5d", 7);
-  EXPECT_PRINTF("97   ", "%-5hhi", 'a');
-  EXPECT_PRINTF("a    ", "%-5c", 'a');
-
-  // '0' flag is ignored if '-' flag is given
-  EXPECT_PRINTF("7    ", "%-05d", 7);
-  EXPECT_PRINTF("7    ", "%0-5d", 7);
-  EXPECT_PRINTF("a    ", "%-05c", 'a');
-  EXPECT_PRINTF("a    ", "%0-5c", 'a');
-  EXPECT_PRINTF("97   ", "%-05hhi", 'a');
-  EXPECT_PRINTF("97   ", "%0-5hhi", 'a');
-
-  // '-' and space flag don't interfere
-  EXPECT_PRINTF(" 42", "%- d", 42);
-}
-
-TEST(printf_test, space_flag) {
-  EXPECT_PRINTF(" 42", "% d", 42);
-  EXPECT_PRINTF("-42", "% d", -42);
-  EXPECT_PRINTF(" 0042", "% 05d", 42);
-  EXPECT_PRINTF(" 0042", "%0  5d", 42);
-
-  // ' ' flag is ignored for non-numeric types.
-  EXPECT_PRINTF("x", "% c", 'x');
-}
-
-TEST(printf_test, hash_flag) {
-  EXPECT_PRINTF("042", "%#o", 042);
-  EXPECT_PRINTF(fmt::format("0{:o}", static_cast<unsigned>(-042)), "%#o", -042);
-  EXPECT_PRINTF("0", "%#o", 0);
-
-  EXPECT_PRINTF("0x42", "%#x", 0x42);
-  EXPECT_PRINTF("0X42", "%#X", 0x42);
-  EXPECT_PRINTF(fmt::format("0x{:x}", static_cast<unsigned>(-0x42)), "%#x",
-                -0x42);
-  EXPECT_PRINTF("0", "%#x", 0);
-
-  EXPECT_PRINTF("0x0042", "%#06x", 0x42);
-  EXPECT_PRINTF("0x0042", "%0##6x", 0x42);
-
-  EXPECT_PRINTF("-42.000000", "%#f", -42.0);
-  EXPECT_PRINTF("-42.000000", "%#F", -42.0);
-
-  char buffer[256];
-  safe_sprintf(buffer, "%#e", -42.0);
-  EXPECT_PRINTF(buffer, "%#e", -42.0);
-  safe_sprintf(buffer, "%#E", -42.0);
-  EXPECT_PRINTF(buffer, "%#E", -42.0);
-
-  EXPECT_PRINTF("-42.0000", "%#g", -42.0);
-  EXPECT_PRINTF("-42.0000", "%#G", -42.0);
-
-  safe_sprintf(buffer, "%#a", 16.0);
-  EXPECT_PRINTF(buffer, "%#a", 16.0);
-  safe_sprintf(buffer, "%#A", 16.0);
-  EXPECT_PRINTF(buffer, "%#A", 16.0);
-
-  // '#' flag is ignored for non-numeric types.
-  EXPECT_PRINTF("x", "%#c", 'x');
-}
-
-TEST(printf_test, width) {
-  EXPECT_PRINTF("  abc", "%5s", "abc");
-
-  // Width cannot be specified twice.
-  EXPECT_THROW_MSG(test_sprintf("%5-5d", 42), format_error,
-                   "invalid type specifier");
-
-  EXPECT_THROW_MSG(test_sprintf(format("%{}d", big_num), 42), format_error,
-                   "number is too big");
-  EXPECT_THROW_MSG(test_sprintf(format("%1${}d", big_num), 42), format_error,
-                   "number is too big");
-}
-
-TEST(printf_test, dynamic_width) {
-  EXPECT_EQ("   42", test_sprintf("%*d", 5, 42));
-  EXPECT_EQ("42   ", test_sprintf("%*d", -5, 42));
-  EXPECT_THROW_MSG(test_sprintf("%*d", 5.0, 42), format_error,
-                   "width is not integer");
-  EXPECT_THROW_MSG(test_sprintf("%*d"), format_error, "argument not found");
-  EXPECT_THROW_MSG(test_sprintf("%*d", big_num, 42), format_error,
-                   "number is too big");
-}
-
-TEST(printf_test, int_precision) {
-  EXPECT_PRINTF("00042", "%.5d", 42);
-  EXPECT_PRINTF("-00042", "%.5d", -42);
-  EXPECT_PRINTF("00042", "%.5x", 0x42);
-  EXPECT_PRINTF("0x00042", "%#.5x", 0x42);
-  EXPECT_PRINTF("00042", "%.5o", 042);
-  EXPECT_PRINTF("00042", "%#.5o", 042);
-
-  EXPECT_PRINTF("  00042", "%7.5d", 42);
-  EXPECT_PRINTF("  00042", "%7.5x", 0x42);
-  EXPECT_PRINTF("   0x00042", "%#10.5x", 0x42);
-  EXPECT_PRINTF("  00042", "%7.5o", 042);
-  EXPECT_PRINTF("     00042", "%#10.5o", 042);
-
-  EXPECT_PRINTF("00042  ", "%-7.5d", 42);
-  EXPECT_PRINTF("00042  ", "%-7.5x", 0x42);
-  EXPECT_PRINTF("0x00042   ", "%-#10.5x", 0x42);
-  EXPECT_PRINTF("00042  ", "%-7.5o", 042);
-  EXPECT_PRINTF("00042     ", "%-#10.5o", 042);
-}
-
-TEST(printf_test, float_precision) {
-  char buffer[256];
-  safe_sprintf(buffer, "%.3e", 1234.5678);
-  EXPECT_PRINTF(buffer, "%.3e", 1234.5678);
-  EXPECT_PRINTF("1234.568", "%.3f", 1234.5678);
-  EXPECT_PRINTF("1.23e+03", "%.3g", 1234.5678);
-  safe_sprintf(buffer, "%.3a", 1234.5678);
-  EXPECT_PRINTF(buffer, "%.3a", 1234.5678);
-}
-
-TEST(printf_test, string_precision) {
-  char test[] = {'H', 'e', 'l', 'l', 'o'};
-  EXPECT_EQ(fmt::sprintf("%.4s", test), "Hell");
-}
-
-TEST(printf_test, ignore_precision_for_non_numeric_arg) {
-  EXPECT_PRINTF("abc", "%.5s", "abc");
-}
-
-TEST(printf_test, dynamic_precision) {
-  EXPECT_EQ("00042", test_sprintf("%.*d", 5, 42));
-  EXPECT_EQ("42", test_sprintf("%.*d", -5, 42));
-  EXPECT_THROW_MSG(test_sprintf("%.*d", 5.0, 42), format_error,
-                   "precision is not integer");
-  EXPECT_THROW_MSG(test_sprintf("%.*d"), format_error, "argument not found");
-  EXPECT_THROW_MSG(test_sprintf("%.*d", big_num, 42), format_error,
-                   "number is too big");
-  if (sizeof(long long) != sizeof(int)) {
-    long long prec = static_cast<long long>(INT_MIN) - 1;
-    EXPECT_THROW_MSG(test_sprintf("%.*d", prec, 42), format_error,
-                     "number is too big");
-  }
-}
-
-template <typename T> struct make_signed { typedef T type; };
-
-#define SPECIALIZE_MAKE_SIGNED(T, S) \
-  template <> struct make_signed<T> { typedef S type; }
-
-SPECIALIZE_MAKE_SIGNED(char, signed char);
-SPECIALIZE_MAKE_SIGNED(unsigned char, signed char);
-SPECIALIZE_MAKE_SIGNED(unsigned short, short);
-SPECIALIZE_MAKE_SIGNED(unsigned, int);
-SPECIALIZE_MAKE_SIGNED(unsigned long, long);
-SPECIALIZE_MAKE_SIGNED(unsigned long long, long long);
-
-// Test length format specifier ``length_spec``.
-template <typename T, typename U>
-void test_length(const char* length_spec, U value) {
-  long long signed_value = 0;
-  unsigned long long unsigned_value = 0;
-  // Apply integer promotion to the argument.
-  unsigned long long max = max_value<U>();
-  using fmt::detail::const_check;
-  if (const_check(max <= static_cast<unsigned>(max_value<int>()))) {
-    signed_value = static_cast<int>(value);
-    unsigned_value = static_cast<unsigned long long>(value);
-  } else if (const_check(max <= max_value<unsigned>())) {
-    signed_value = static_cast<unsigned>(value);
-    unsigned_value = static_cast<unsigned long long>(value);
-  }
-  if (sizeof(U) <= sizeof(int) && sizeof(int) < sizeof(T)) {
-    signed_value = static_cast<long long>(value);
-    unsigned_value = static_cast<unsigned long long>(
-        static_cast<typename std::make_unsigned<unsigned>::type>(value));
-  } else {
-    signed_value = static_cast<typename make_signed<T>::type>(value);
-    unsigned_value = static_cast<typename std::make_unsigned<T>::type>(value);
-  }
-  std::ostringstream os;
-  os << signed_value;
-  EXPECT_PRINTF(os.str(), fmt::format("%{}d", length_spec), value);
-  EXPECT_PRINTF(os.str(), fmt::format("%{}i", length_spec), value);
-  os.str("");
-  os << unsigned_value;
-  EXPECT_PRINTF(os.str(), fmt::format("%{}u", length_spec), value);
-  os.str("");
-  os << std::oct << unsigned_value;
-  EXPECT_PRINTF(os.str(), fmt::format("%{}o", length_spec), value);
-  os.str("");
-  os << std::hex << unsigned_value;
-  EXPECT_PRINTF(os.str(), fmt::format("%{}x", length_spec), value);
-  os.str("");
-  os << std::hex << std::uppercase << unsigned_value;
-  EXPECT_PRINTF(os.str(), fmt::format("%{}X", length_spec), value);
-}
-
-template <typename T> void test_length(const char* length_spec) {
-  T min = std::numeric_limits<T>::min(), max = max_value<T>();
-  test_length<T>(length_spec, 42);
-  test_length<T>(length_spec, -42);
-  test_length<T>(length_spec, min);
-  test_length<T>(length_spec, max);
-  long long long_long_min = std::numeric_limits<long long>::min();
-  if (static_cast<long long>(min) > long_long_min)
-    test_length<T>(length_spec, static_cast<long long>(min) - 1);
-  unsigned long long long_long_max = max_value<long long>();
-  if (static_cast<unsigned long long>(max) < long_long_max)
-    test_length<T>(length_spec, static_cast<long long>(max) + 1);
-  test_length<T>(length_spec, std::numeric_limits<short>::min());
-  test_length<T>(length_spec, max_value<unsigned short>());
-  test_length<T>(length_spec, std::numeric_limits<int>::min());
-  test_length<T>(length_spec, max_value<int>());
-  test_length<T>(length_spec, std::numeric_limits<unsigned>::min());
-  test_length<T>(length_spec, max_value<unsigned>());
-  test_length<T>(length_spec, std::numeric_limits<long long>::min());
-  test_length<T>(length_spec, max_value<long long>());
-  test_length<T>(length_spec, std::numeric_limits<unsigned long long>::min());
-  test_length<T>(length_spec, max_value<unsigned long long>());
-}
-
-TEST(printf_test, length) {
-  test_length<char>("hh");
-  test_length<signed char>("hh");
-  test_length<unsigned char>("hh");
-  test_length<short>("h");
-  test_length<unsigned short>("h");
-  test_length<long>("l");
-  test_length<unsigned long>("l");
-  test_length<long long>("ll");
-  test_length<unsigned long long>("ll");
-  test_length<intmax_t>("j");
-  test_length<size_t>("z");
-  test_length<std::ptrdiff_t>("t");
-  long double max = max_value<long double>();
-  EXPECT_PRINTF(fmt::format("{:.6}", max), "%g", max);
-  EXPECT_PRINTF(fmt::format("{:.6}", max), "%Lg", max);
-}
-
-TEST(printf_test, bool) {
-  EXPECT_PRINTF("1", "%d", true);
-  EXPECT_PRINTF("true", "%s", true);
-}
-
-TEST(printf_test, int) {
-  EXPECT_PRINTF("-42", "%d", -42);
-  EXPECT_PRINTF("-42", "%i", -42);
-  unsigned u = 0 - 42u;
-  EXPECT_PRINTF(fmt::format("{}", u), "%u", -42);
-  EXPECT_PRINTF(fmt::format("{:o}", u), "%o", -42);
-  EXPECT_PRINTF(fmt::format("{:x}", u), "%x", -42);
-  EXPECT_PRINTF(fmt::format("{:X}", u), "%X", -42);
-}
-
-TEST(printf_test, long_long) {
-  // fmt::printf allows passing long long arguments to %d without length
-  // specifiers.
-  long long max = max_value<long long>();
-  EXPECT_PRINTF(fmt::format("{}", max), "%d", max);
-}
-
-TEST(printf_test, float) {
-  EXPECT_PRINTF("392.650000", "%f", 392.65);
-  EXPECT_PRINTF("392.65", "%.2f", 392.65);
-  EXPECT_PRINTF("392.6", "%.1f", 392.65);
-  EXPECT_PRINTF("393", "%.f", 392.65);
-  EXPECT_PRINTF("392.650000", "%F", 392.65);
-  char buffer[256];
-  safe_sprintf(buffer, "%e", 392.65);
-  EXPECT_PRINTF(buffer, "%e", 392.65);
-  safe_sprintf(buffer, "%E", 392.65);
-  EXPECT_PRINTF(buffer, "%E", 392.65);
-  EXPECT_PRINTF("392.65", "%g", 392.65);
-  EXPECT_PRINTF("392.65", "%G", 392.65);
-  EXPECT_PRINTF("392", "%g", 392.0);
-  EXPECT_PRINTF("392", "%G", 392.0);
-  EXPECT_PRINTF("4.56e-07", "%g", 0.000000456);
-  safe_sprintf(buffer, "%a", -392.65);
-  EXPECT_EQ(buffer, format("{:a}", -392.65));
-  safe_sprintf(buffer, "%A", -392.65);
-  EXPECT_EQ(buffer, format("{:A}", -392.65));
-}
-
-TEST(printf_test, inf) {
-  double inf = std::numeric_limits<double>::infinity();
-  for (const char* type = "fega"; *type; ++type) {
-    EXPECT_PRINTF("inf", fmt::format("%{}", *type), inf);
-    char upper = static_cast<char>(std::toupper(*type));
-    EXPECT_PRINTF("INF", fmt::format("%{}", upper), inf);
-  }
-}
-
-TEST(printf_test, char) {
-  EXPECT_PRINTF("x", "%c", 'x');
-  int max = max_value<int>();
-  EXPECT_PRINTF(fmt::format("{}", static_cast<char>(max)), "%c", max);
-  // EXPECT_PRINTF("x", "%lc", L'x');
-  EXPECT_PRINTF(L"x", L"%c", L'x');
-  EXPECT_PRINTF(fmt::format(L"{}", static_cast<wchar_t>(max)), L"%c", max);
-}
-
-TEST(printf_test, string) {
-  EXPECT_PRINTF("abc", "%s", "abc");
-  const char* null_str = nullptr;
-  EXPECT_PRINTF("(null)", "%s", null_str);
-  EXPECT_PRINTF("    (null)", "%10s", null_str);
-  EXPECT_PRINTF(L"abc", L"%s", L"abc");
-  const wchar_t* null_wstr = nullptr;
-  EXPECT_PRINTF(L"(null)", L"%s", null_wstr);
-  EXPECT_PRINTF(L"    (null)", L"%10s", null_wstr);
-}
-
-TEST(printf_test, pointer) {
-  int n;
-  void* p = &n;
-  EXPECT_PRINTF(fmt::format("{}", p), "%p", p);
-  p = nullptr;
-  EXPECT_PRINTF("(nil)", "%p", p);
-  EXPECT_PRINTF("     (nil)", "%10p", p);
-  const char* s = "test";
-  EXPECT_PRINTF(fmt::format("{:p}", s), "%p", s);
-  const char* null_str = nullptr;
-  EXPECT_PRINTF("(nil)", "%p", null_str);
-
-  p = &n;
-  EXPECT_PRINTF(fmt::format(L"{}", p), L"%p", p);
-  p = nullptr;
-  EXPECT_PRINTF(L"(nil)", L"%p", p);
-  EXPECT_PRINTF(L"     (nil)", L"%10p", p);
-  const wchar_t* w = L"test";
-  EXPECT_PRINTF(fmt::format(L"{:p}", w), L"%p", w);
-  const wchar_t* null_wstr = nullptr;
-  EXPECT_PRINTF(L"(nil)", L"%p", null_wstr);
-}
-
-enum test_enum { answer = 42 };
-
-TEST(printf_test, enum) {
-  EXPECT_PRINTF("42", "%d", answer);
-  volatile test_enum volatile_enum = answer;
-  EXPECT_PRINTF("42", "%d", volatile_enum);
-}
-
-#if FMT_USE_FCNTL
-TEST(printf_test, examples) {
-  const char* weekday = "Thursday";
-  const char* month = "August";
-  int day = 21;
-  EXPECT_WRITE(stdout, fmt::printf("%1$s, %3$d %2$s", weekday, month, day),
-               "Thursday, 21 August");
-}
-
-TEST(printf_test, printf_error) {
-  fmt::file read_end, write_end;
-  fmt::file::pipe(read_end, write_end);
-  int result = fmt::fprintf(read_end.fdopen("r").get(), "test");
-  EXPECT_LT(result, 0);
-}
-#endif
-
-TEST(printf_test, wide_string) {
-  EXPECT_EQ(L"abc", fmt::sprintf(L"%s", L"abc"));
-}
-
-TEST(printf_test, printf_custom) {
-  EXPECT_EQ("abc", test_sprintf("%s", test_string("abc")));
-}
-
-TEST(printf_test, vprintf) {
-  fmt::format_arg_store<fmt::printf_context, int> as{42};
-  fmt::basic_format_args<fmt::printf_context> args(as);
-  EXPECT_EQ(fmt::vsprintf("%d", args), "42");
-  EXPECT_WRITE(stdout, fmt::vprintf("%d", args), "42");
-  EXPECT_WRITE(stdout, fmt::vfprintf(stdout, "%d", args), "42");
-}
-
-template <typename... Args>
-void check_format_string_regression(fmt::string_view s, const Args&... args) {
-  fmt::sprintf(s, args...);
-}
-
-TEST(printf_test, check_format_string_regression) {
-  check_format_string_regression("%c%s", 'x', "");
-}
-
-TEST(printf_test, fixed_large_exponent) {
-  EXPECT_EQ("1000000000000000000000", fmt::sprintf("%.*f", -13, 1e21));
-}
-
-TEST(printf_test, vsprintf_make_args_example) {
-  fmt::format_arg_store<fmt::printf_context, int, const char*> as{42,
-                                                                  "something"};
-  fmt::basic_format_args<fmt::printf_context> args(as);
-  EXPECT_EQ("[42] something happened", fmt::vsprintf("[%d] %s happened", args));
-  auto as2 = fmt::make_printf_args(42, "something");
-  fmt::basic_format_args<fmt::printf_context> args2(as2);
-  EXPECT_EQ("[42] something happened",
-            fmt::vsprintf("[%d] %s happened", args2));
-  EXPECT_EQ("[42] something happened",
-            fmt::vsprintf("[%d] %s happened",
-                          {fmt::make_printf_args(42, "something")}));
-}
-
-TEST(printf_test, vsprintf_make_wargs_example) {
-  fmt::format_arg_store<fmt::wprintf_context, int, const wchar_t*> as{
-      42, L"something"};
-  fmt::basic_format_args<fmt::wprintf_context> args(as);
-  EXPECT_EQ(L"[42] something happened",
-            fmt::vsprintf(L"[%d] %s happened", args));
-  auto as2 = fmt::make_wprintf_args(42, L"something");
-  fmt::basic_format_args<fmt::wprintf_context> args2(as2);
-  EXPECT_EQ(L"[42] something happened",
-            fmt::vsprintf(L"[%d] %s happened", args2));
-  EXPECT_EQ(L"[42] something happened",
-            fmt::vsprintf(L"[%d] %s happened",
-                          {fmt::make_wprintf_args(42, L"something")}));
-}
diff --git a/contrib/libs/fmt/test/printf-test/ya.make b/contrib/libs/fmt/test/printf-test/ya.make
deleted file mode 100644
index 1d93b49d90..0000000000
--- a/contrib/libs/fmt/test/printf-test/ya.make
+++ /dev/null
@@ -1,31 +0,0 @@
-# Generated by devtools/yamaker.
-
-GTEST()
-
-WITHOUT_LICENSE_TEXTS()
-
-LICENSE(MIT)
-
-PEERDIR(
-    contrib/libs/fmt
-    contrib/libs/fmt/test
-)
-
-NO_COMPILER_WARNINGS()
-
-NO_UTIL()
-
-CFLAGS(
-    -DFMT_LOCALE
-    -DFMT_SHARED
-    -DGTEST_HAS_STD_WSTRING=1
-    -D_SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING=1
-)
-
-SRCDIR(contrib/libs/fmt/test)
-
-SRCS(
-    printf-test.cc
-)
-
-END()
diff --git a/contrib/libs/fmt/test/ranges-odr-test.cc b/contrib/libs/fmt/test/ranges-odr-test.cc
deleted file mode 100644
index 031354d3c2..0000000000
--- a/contrib/libs/fmt/test/ranges-odr-test.cc
+++ /dev/null
@@ -1,17 +0,0 @@
-// Formatting library for C++ - the core API
-//
-// Copyright (c) 2012 - present, Victor Zverovich
-// All rights reserved.
-//
-// For the license information refer to format.h.
-
-#include <vector>
-
-#include "fmt/ranges.h"
-#include "gtest/gtest.h"
-
-// call fmt::format from another translation unit to test ODR
-TEST(ranges_odr_test, format_vector) {
-  auto v = std::vector<int>{1, 2, 3, 5, 7, 11};
-  EXPECT_EQ(fmt::format("{}", v), "[1, 2, 3, 5, 7, 11]");
-}
diff --git a/contrib/libs/fmt/test/ranges-test.cc b/contrib/libs/fmt/test/ranges-test.cc
deleted file mode 100644
index 63cb8c8bca..0000000000
--- a/contrib/libs/fmt/test/ranges-test.cc
+++ /dev/null
@@ -1,363 +0,0 @@
-// Formatting library for C++ - the core API
-//
-// Copyright (c) 2012 - present, Victor Zverovich
-// All rights reserved.
-//
-// For the license information refer to format.h.
-//
-// Copyright (c) 2018 - present, Remotion (Igor Schulz)
-// All Rights Reserved
-// {fmt} support for ranges, containers and types tuple interface.
-
-#include "fmt/ranges.h"
-
-#include <map>
-#include <string>
-#include <vector>
-
-#include "gtest/gtest.h"
-
-#if !FMT_GCC_VERSION || FMT_GCC_VERSION >= 601
-#  define FMT_RANGES_TEST_ENABLE_C_STYLE_ARRAY
-#endif
-
-#if !FMT_MSC_VER || FMT_MSC_VER > 1910
-#  define FMT_RANGES_TEST_ENABLE_JOIN
-#  define FMT_RANGES_TEST_ENABLE_FORMAT_STRUCT
-#endif
-
-#ifdef FMT_RANGES_TEST_ENABLE_C_STYLE_ARRAY
-TEST(ranges_test, format_array) {
-  int arr[] = {1, 2, 3, 5, 7, 11};
-  EXPECT_EQ(fmt::format("{}", arr), "[1, 2, 3, 5, 7, 11]");
-}
-
-TEST(ranges_test, format_2d_array) {
-  int arr[][2] = {{1, 2}, {3, 5}, {7, 11}};
-  EXPECT_EQ(fmt::format("{}", arr), "[[1, 2], [3, 5], [7, 11]]");
-}
-
-TEST(ranges_test, format_array_of_literals) {
-  const char* arr[] = {"1234", "abcd"};
-  EXPECT_EQ(fmt::format("{}", arr), "[\"1234\", \"abcd\"]");
-}
-#endif  // FMT_RANGES_TEST_ENABLE_C_STYLE_ARRAY
-
-TEST(ranges_test, format_vector) {
-  auto v = std::vector<int>{1, 2, 3, 5, 7, 11};
-  EXPECT_EQ(fmt::format("{}", v), "[1, 2, 3, 5, 7, 11]");
-}
-
-TEST(ranges_test, format_vector2) {
-  auto v = std::vector<std::vector<int>>{{1, 2}, {3, 5}, {7, 11}};
-  EXPECT_EQ(fmt::format("{}", v), "[[1, 2], [3, 5], [7, 11]]");
-}
-
-TEST(ranges_test, format_map) {
-  auto m = std::map<std::string, int>{{"one", 1}, {"two", 2}};
-  EXPECT_EQ(fmt::format("{}", m), "{\"one\": 1, \"two\": 2}");
-}
-
-TEST(ranges_test, format_set) {
-  EXPECT_EQ(fmt::format("{}", std::set<std::string>{"one", "two"}),
-            "{\"one\", \"two\"}");
-}
-
-TEST(ranges_test, format_pair) {
-  auto p = std::pair<int, float>(42, 1.5f);
-  EXPECT_EQ(fmt::format("{}", p), "(42, 1.5)");
-}
-
-TEST(ranges_test, format_tuple) {
-  auto t =
-      std::tuple<int, float, std::string, char>(42, 1.5f, "this is tuple", 'i');
-  EXPECT_EQ(fmt::format("{}", t), "(42, 1.5, \"this is tuple\", 'i')");
-  EXPECT_EQ(fmt::format("{}", std::tuple<>()), "()");
-}
-
-#ifdef FMT_RANGES_TEST_ENABLE_FORMAT_STRUCT
-struct tuple_like {
-  int i;
-  std::string str;
-
-  template <size_t N> fmt::enable_if_t<N == 0, int> get() const noexcept {
-    return i;
-  }
-  template <size_t N>
-  fmt::enable_if_t<N == 1, fmt::string_view> get() const noexcept {
-    return str;
-  }
-};
-
-template <size_t N>
-auto get(const tuple_like& t) noexcept -> decltype(t.get<N>()) {
-  return t.get<N>();
-}
-
-namespace std {
-template <>
-struct tuple_size<tuple_like> : std::integral_constant<size_t, 2> {};
-
-template <size_t N> struct tuple_element<N, tuple_like> {
-  using type = decltype(std::declval<tuple_like>().get<N>());
-};
-}  // namespace std
-
-TEST(ranges_test, format_struct) {
-  auto t = tuple_like{42, "foo"};
-  EXPECT_EQ(fmt::format("{}", t), "(42, \"foo\")");
-}
-#endif  // FMT_RANGES_TEST_ENABLE_FORMAT_STRUCT
-
-TEST(ranges_test, format_to) {
-  char buf[10];
-  auto end = fmt::format_to(buf, "{}", std::vector<int>{1, 2, 3});
-  *end = '\0';
-  EXPECT_STREQ(buf, "[1, 2, 3]");
-}
-
-struct path_like {
-  const path_like* begin() const;
-  const path_like* end() const;
-
-  operator std::string() const;
-};
-
-TEST(ranges_test, path_like) {
-  EXPECT_FALSE((fmt::is_range<path_like, char>::value));
-}
-
-#ifdef FMT_USE_STRING_VIEW
-struct string_like {
-  const char* begin();
-  const char* end();
-  explicit operator fmt::string_view() const { return "foo"; }
-  explicit operator std::string_view() const { return "foo"; }
-};
-
-TEST(ranges_test, format_string_like) {
-  EXPECT_EQ(fmt::format("{}", string_like()), "foo");
-}
-#endif  // FMT_USE_STRING_VIEW
-
-// A range that provides non-const only begin()/end() to test fmt::join handles
-// that.
-//
-// Some ranges (e.g. those produced by range-v3's views::filter()) can cache
-// information during iteration so they only provide non-const begin()/end().
-template <typename T> class non_const_only_range {
- private:
-  std::vector<T> vec;
-
- public:
-  using const_iterator = typename ::std::vector<T>::const_iterator;
-
-  template <typename... Args>
-  explicit non_const_only_range(Args&&... args)
-      : vec(std::forward<Args>(args)...) {}
-
-  const_iterator begin() { return vec.begin(); }
-  const_iterator end() { return vec.end(); }
-};
-
-template <typename T> class noncopyable_range {
- private:
-  std::vector<T> vec;
-
- public:
-  using const_iterator = typename ::std::vector<T>::const_iterator;
-
-  template <typename... Args>
-  explicit noncopyable_range(Args&&... args)
-      : vec(std::forward<Args>(args)...) {}
-
-  noncopyable_range(noncopyable_range const&) = delete;
-  noncopyable_range(noncopyable_range&) = delete;
-
-  const_iterator begin() const { return vec.begin(); }
-  const_iterator end() const { return vec.end(); }
-};
-
-TEST(ranges_test, range) {
-  noncopyable_range<int> w(3u, 0);
-  EXPECT_EQ(fmt::format("{}", w), "[0, 0, 0]");
-  EXPECT_EQ(fmt::format("{}", noncopyable_range<int>(3u, 0)), "[0, 0, 0]");
-
-  non_const_only_range<int> x(3u, 0);
-  EXPECT_EQ(fmt::format("{}", x), "[0, 0, 0]");
-  EXPECT_EQ(fmt::format("{}", non_const_only_range<int>(3u, 0)), "[0, 0, 0]");
-
-  auto y = std::vector<int>(3u, 0);
-  EXPECT_EQ(fmt::format("{}", y), "[0, 0, 0]");
-  EXPECT_EQ(fmt::format("{}", std::vector<int>(3u, 0)), "[0, 0, 0]");
-
-  const auto z = std::vector<int>(3u, 0);
-  EXPECT_EQ(fmt::format("{}", z), "[0, 0, 0]");
-}
-
-enum test_enum { foo };
-
-TEST(ranges_test, enum_range) {
-  auto v = std::vector<test_enum>{test_enum::foo};
-  EXPECT_EQ(fmt::format("{}", v), "[0]");
-}
-
-#if !FMT_MSC_VER
-struct unformattable {};
-
-TEST(ranges_test, unformattable_range) {
-  EXPECT_FALSE((fmt::has_formatter<std::vector<unformattable>,
-                                   fmt::format_context>::value));
-}
-#endif
-
-#ifdef FMT_RANGES_TEST_ENABLE_JOIN
-TEST(ranges_test, join_tuple) {
-  // Value tuple args.
-  auto t1 = std::tuple<char, int, float>('a', 1, 2.0f);
-  EXPECT_EQ(fmt::format("({})", fmt::join(t1, ", ")), "(a, 1, 2)");
-
-  // Testing lvalue tuple args.
-  int x = 4;
-  auto t2 = std::tuple<char, int&>('b', x);
-  EXPECT_EQ(fmt::format("{}", fmt::join(t2, " + ")), "b + 4");
-
-  // Empty tuple.
-  auto t3 = std::tuple<>();
-  EXPECT_EQ(fmt::format("{}", fmt::join(t3, "|")), "");
-
-  // Single element tuple.
-  auto t4 = std::tuple<float>(4.0f);
-  EXPECT_EQ(fmt::format("{}", fmt::join(t4, "/")), "4");
-
-#  if FMT_TUPLE_JOIN_SPECIFIERS
-  // Specs applied to each element.
-  auto t5 = std::tuple<int, int, long>(-3, 100, 1);
-  EXPECT_EQ(fmt::format("{:+03}", fmt::join(t5, ", ")), "-03, +100, +01");
-
-  auto t6 = std::tuple<float, double, long double>(3, 3.14, 3.1415);
-  EXPECT_EQ(fmt::format("{:5.5f}", fmt::join(t6, ", ")),
-            "3.00000, 3.14000, 3.14150");
-
-  // Testing lvalue tuple args.
-  int y = -1;
-  auto t7 = std::tuple<int, int&, const int&>(3, y, y);
-  EXPECT_EQ(fmt::format("{:03}", fmt::join(t7, ", ")), "003, -01, -01");
-#  endif
-}
-
-TEST(ranges_test, join_initializer_list) {
-  EXPECT_EQ(fmt::format("{}", fmt::join({1, 2, 3}, ", ")), "1, 2, 3");
-  EXPECT_EQ(fmt::format("{}", fmt::join({"fmt", "rocks", "!"}, " ")),
-            "fmt rocks !");
-}
-
-struct zstring_sentinel {};
-
-bool operator==(const char* p, zstring_sentinel) { return *p == '\0'; }
-bool operator!=(const char* p, zstring_sentinel) { return *p != '\0'; }
-
-struct zstring {
-  const char* p;
-  const char* begin() const { return p; }
-  zstring_sentinel end() const { return {}; }
-};
-
-#  ifdef __cpp_lib_ranges
-struct cpp20_only_range {
-  struct iterator {
-    int val = 0;
-
-    using value_type = int;
-    using difference_type = std::ptrdiff_t;
-    using iterator_concept = std::input_iterator_tag;
-
-    iterator() = default;
-    iterator(int i) : val(i) {}
-    int operator*() const { return val; }
-    iterator& operator++() {
-      ++val;
-      return *this;
-    }
-    void operator++(int) { ++*this; }
-    bool operator==(const iterator& rhs) const { return val == rhs.val; }
-  };
-
-  int lo;
-  int hi;
-
-  iterator begin() const { return iterator(lo); }
-  iterator end() const { return iterator(hi); }
-};
-
-static_assert(std::input_iterator<cpp20_only_range::iterator>);
-#  endif
-
-TEST(ranges_test, join_sentinel) {
-  auto hello = zstring{"hello"};
-  EXPECT_EQ(fmt::format("{}", hello), "['h', 'e', 'l', 'l', 'o']");
-  EXPECT_EQ(fmt::format("{}", fmt::join(hello, "_")), "h_e_l_l_o");
-}
-
-TEST(ranges_test, join_range) {
-  noncopyable_range<int> w(3u, 0);
-  EXPECT_EQ(fmt::format("{}", fmt::join(w, ",")), "0,0,0");
-  EXPECT_EQ(fmt::format("{}", fmt::join(noncopyable_range<int>(3u, 0), ",")),
-            "0,0,0");
-
-  non_const_only_range<int> x(3u, 0);
-  EXPECT_EQ(fmt::format("{}", fmt::join(x, ",")), "0,0,0");
-  EXPECT_EQ(fmt::format("{}", fmt::join(non_const_only_range<int>(3u, 0), ",")),
-            "0,0,0");
-
-  auto y = std::vector<int>(3u, 0);
-  EXPECT_EQ(fmt::format("{}", fmt::join(y, ",")), "0,0,0");
-  EXPECT_EQ(fmt::format("{}", fmt::join(std::vector<int>(3u, 0), ",")),
-            "0,0,0");
-
-  const auto z = std::vector<int>(3u, 0);
-  EXPECT_EQ(fmt::format("{}", fmt::join(z, ",")), "0,0,0");
-
-#  ifdef __cpp_lib_ranges
-  EXPECT_EQ(fmt::format("{}", cpp20_only_range{.lo = 0, .hi = 5}),
-            "[0, 1, 2, 3, 4]");
-  EXPECT_EQ(
-      fmt::format("{}", fmt::join(cpp20_only_range{.lo = 0, .hi = 5}, ",")),
-      "0,1,2,3,4");
-#  endif
-}
-#endif  // FMT_RANGES_TEST_ENABLE_JOIN
-
-TEST(ranges_test, is_printable) {
-  using fmt::detail::is_printable;
-  EXPECT_TRUE(is_printable(0x0323));
-  EXPECT_FALSE(is_printable(0x0378));
-  EXPECT_FALSE(is_printable(0x110000));
-}
-
-TEST(ranges_test, escape_string) {
-  using vec = std::vector<std::string>;
-  EXPECT_EQ(fmt::format("{}", vec{"\n\r\t\"\\"}), "[\"\\n\\r\\t\\\"\\\\\"]");
-  EXPECT_EQ(fmt::format("{}", vec{"\x07"}), "[\"\\x07\"]");
-  EXPECT_EQ(fmt::format("{}", vec{"\x7f"}), "[\"\\x7f\"]");
-  EXPECT_EQ(fmt::format("{}", vec{"n\xcc\x83"}), "[\"n\xcc\x83\"]");
-
-  if (fmt::detail::is_utf8()) {
-    EXPECT_EQ(fmt::format("{}", vec{"\xcd\xb8"}), "[\"\\u0378\"]");
-    // Unassigned Unicode code points.
-    EXPECT_EQ(fmt::format("{}", vec{"\xf0\xaa\x9b\x9e"}), "[\"\\U0002a6de\"]");
-    EXPECT_EQ(fmt::format("{}", vec{"\xf4\x8f\xbf\xc0"}),
-              "[\"\\xf4\\x8f\\xbf\\xc0\"]");
-  }
-}
-
-#ifdef FMT_USE_STRING_VIEW
-struct convertible_to_string_view {
-  operator std::string_view() const { return "foo"; }
-};
-
-TEST(ranges_test, escape_convertible_to_string_view) {
-  EXPECT_EQ(fmt::format("{}", std::vector<convertible_to_string_view>(1)),
-            "[\"foo\"]");
-}
-#endif  // FMT_USE_STRING_VIEW
diff --git a/contrib/libs/fmt/test/ranges-test/ya.make b/contrib/libs/fmt/test/ranges-test/ya.make
deleted file mode 100644
index 251070a677..0000000000
--- a/contrib/libs/fmt/test/ranges-test/ya.make
+++ /dev/null
@@ -1,32 +0,0 @@
-# Generated by devtools/yamaker.
-
-GTEST()
-
-WITHOUT_LICENSE_TEXTS()
-
-LICENSE(MIT)
-
-PEERDIR(
-    contrib/libs/fmt
-    contrib/libs/fmt/test
-)
-
-NO_COMPILER_WARNINGS()
-
-NO_UTIL()
-
-CFLAGS(
-    -DFMT_LOCALE
-    -DFMT_SHARED
-    -DGTEST_HAS_STD_WSTRING=1
-    -D_SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING=1
-)
-
-SRCDIR(contrib/libs/fmt/test)
-
-SRCS(
-    ranges-odr-test.cc
-    ranges-test.cc
-)
-
-END()
diff --git a/contrib/libs/fmt/test/scan-test.cc b/contrib/libs/fmt/test/scan-test.cc
deleted file mode 100644
index 7e327ea3f5..0000000000
--- a/contrib/libs/fmt/test/scan-test.cc
+++ /dev/null
@@ -1,116 +0,0 @@
-// Formatting library for C++ - scanning API test
-//
-// Copyright (c) 2019 - present, Victor Zverovich
-// All rights reserved.
-//
-// For the license information refer to format.h.
-
-#include "scan.h"
-
-#include <time.h>
-
-#include <climits>
-
-#include "gmock/gmock.h"
-#include "gtest-extra.h"
-
-TEST(scan_test, read_text) {
-  auto s = fmt::string_view("foo");
-  auto end = fmt::scan(s, "foo");
-  EXPECT_EQ(end, s.end());
-  EXPECT_THROW_MSG(fmt::scan("fob", "foo"), fmt::format_error, "invalid input");
-}
-
-TEST(scan_test, read_int) {
-  auto n = int();
-  fmt::scan("42", "{}", n);
-  EXPECT_EQ(n, 42);
-  fmt::scan("-42", "{}", n);
-  EXPECT_EQ(n, -42);
-}
-
-TEST(scan_test, read_longlong) {
-  long long n = 0;
-  fmt::scan("42", "{}", n);
-  EXPECT_EQ(n, 42);
-  fmt::scan("-42", "{}", n);
-  EXPECT_EQ(n, -42);
-}
-
-TEST(scan_test, read_uint) {
-  auto n = unsigned();
-  fmt::scan("42", "{}", n);
-  EXPECT_EQ(n, 42);
-  EXPECT_THROW_MSG(fmt::scan("-42", "{}", n), fmt::format_error,
-                   "invalid input");
-}
-
-TEST(scan_test, read_ulonglong) {
-  unsigned long long n = 0;
-  fmt::scan("42", "{}", n);
-  EXPECT_EQ(n, 42);
-  EXPECT_THROW_MSG(fmt::scan("-42", "{}", n), fmt::format_error,
-                   "invalid input");
-}
-
-TEST(scan_test, read_string) {
-  auto s = std::string();
-  fmt::scan("foo", "{}", s);
-  EXPECT_EQ(s, "foo");
-}
-
-TEST(scan_test, read_string_view) {
-  auto s = fmt::string_view();
-  fmt::scan("foo", "{}", s);
-  EXPECT_EQ(s, "foo");
-}
-
-#ifndef _WIN32
-namespace fmt {
-template <> struct scanner<tm> {
-  std::string format;
-
-  scan_parse_context::iterator parse(scan_parse_context& ctx) {
-    auto it = ctx.begin();
-    if (it != ctx.end() && *it == ':') ++it;
-    auto end = it;
-    while (end != ctx.end() && *end != '}') ++end;
-    format.reserve(detail::to_unsigned(end - it + 1));
-    format.append(it, end);
-    format.push_back('\0');
-    return end;
-  }
-
-  template <class ScanContext>
-  typename ScanContext::iterator scan(tm& t, ScanContext& ctx) {
-    auto result = strptime(ctx.begin(), format.c_str(), &t);
-    if (!result) throw format_error("failed to parse time");
-    return result;
-  }
-};
-}  // namespace fmt
-
-TEST(scan_test, read_custom) {
-  auto input = "Date: 1985-10-25";
-  auto t = tm();
-  fmt::scan(input, "Date: {0:%Y-%m-%d}", t);
-  EXPECT_EQ(t.tm_year, 85);
-  EXPECT_EQ(t.tm_mon, 9);
-  EXPECT_EQ(t.tm_mday, 25);
-}
-#endif
-
-TEST(scan_test, invalid_format) {
-  EXPECT_THROW_MSG(fmt::scan("", "{}"), fmt::format_error,
-                   "argument index out of range");
-  EXPECT_THROW_MSG(fmt::scan("", "{"), fmt::format_error,
-                   "invalid format string");
-}
-
-TEST(scan_test, example) {
-  auto key = std::string();
-  auto value = int();
-  fmt::scan("answer = 42", "{} = {}", key, value);
-  EXPECT_EQ(key, "answer");
-  EXPECT_EQ(value, 42);
-}
diff --git a/contrib/libs/fmt/test/scan-test/ya.make b/contrib/libs/fmt/test/scan-test/ya.make
deleted file mode 100644
index f1a6fff1c9..0000000000
--- a/contrib/libs/fmt/test/scan-test/ya.make
+++ /dev/null
@@ -1,31 +0,0 @@
-# Generated by devtools/yamaker.
-
-GTEST()
-
-WITHOUT_LICENSE_TEXTS()
-
-LICENSE(MIT)
-
-PEERDIR(
-    contrib/libs/fmt
-    contrib/libs/fmt/test
-)
-
-NO_COMPILER_WARNINGS()
-
-NO_UTIL()
-
-CFLAGS(
-    -DFMT_LOCALE
-    -DFMT_SHARED
-    -DGTEST_HAS_STD_WSTRING=1
-    -D_SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING=1
-)
-
-SRCDIR(contrib/libs/fmt/test)
-
-SRCS(
-    scan-test.cc
-)
-
-END()
diff --git a/contrib/libs/fmt/test/scan.h b/contrib/libs/fmt/test/scan.h
deleted file mode 100644
index 41748ae895..0000000000
--- a/contrib/libs/fmt/test/scan.h
+++ /dev/null
@@ -1,241 +0,0 @@
-// Formatting library for C++ - scanning API proof of concept
-//
-// Copyright (c) 2019 - present, Victor Zverovich
-// All rights reserved.
-//
-// For the license information refer to format.h.
-
-#include <array>
-#include <cassert>
-#include <climits>
-
-#include "fmt/format.h"
-
-FMT_BEGIN_NAMESPACE
-template <typename T, typename Char = char> struct scanner {
-  // A deleted default constructor indicates a disabled scanner.
-  scanner() = delete;
-};
-
-class scan_parse_context {
- private:
-  string_view format_;
-
- public:
-  using iterator = string_view::iterator;
-
-  explicit FMT_CONSTEXPR scan_parse_context(string_view format)
-      : format_(format) {}
-
-  FMT_CONSTEXPR iterator begin() const { return format_.begin(); }
-  FMT_CONSTEXPR iterator end() const { return format_.end(); }
-
-  void advance_to(iterator it) {
-    format_.remove_prefix(detail::to_unsigned(it - begin()));
-  }
-};
-
-struct scan_context {
- private:
-  string_view input_;
-
- public:
-  using iterator = const char*;
-
-  explicit scan_context(string_view input) : input_(input) {}
-
-  iterator begin() const { return input_.data(); }
-  iterator end() const { return begin() + input_.size(); }
-
-  void advance_to(iterator it) {
-    input_.remove_prefix(detail::to_unsigned(it - begin()));
-  }
-};
-
-namespace detail {
-enum class scan_type {
-  none_type,
-  int_type,
-  uint_type,
-  long_long_type,
-  ulong_long_type,
-  string_type,
-  string_view_type,
-  custom_type
-};
-
-struct custom_scan_arg {
-  void* value;
-  void (*scan)(void* arg, scan_parse_context& parse_ctx, scan_context& ctx);
-};
-
-class scan_arg {
- public:
-  scan_type type;
-  union {
-    int* int_value;
-    unsigned* uint_value;
-    long long* long_long_value;
-    unsigned long long* ulong_long_value;
-    std::string* string;
-    fmt::string_view* string_view;
-    custom_scan_arg custom;
-    // TODO: more types
-  };
-
-  scan_arg() : type(scan_type::none_type) {}
-  scan_arg(int& value) : type(scan_type::int_type), int_value(&value) {}
-  scan_arg(unsigned& value) : type(scan_type::uint_type), uint_value(&value) {}
-  scan_arg(long long& value)
-      : type(scan_type::long_long_type), long_long_value(&value) {}
-  scan_arg(unsigned long long& value)
-      : type(scan_type::ulong_long_type), ulong_long_value(&value) {}
-  scan_arg(std::string& value) : type(scan_type::string_type), string(&value) {}
-  scan_arg(fmt::string_view& value)
-      : type(scan_type::string_view_type), string_view(&value) {}
-  template <typename T> scan_arg(T& value) : type(scan_type::custom_type) {
-    custom.value = &value;
-    custom.scan = scan_custom_arg<T>;
-  }
-
- private:
-  template <typename T>
-  static void scan_custom_arg(void* arg, scan_parse_context& parse_ctx,
-                              scan_context& ctx) {
-    scanner<T> s;
-    parse_ctx.advance_to(s.parse(parse_ctx));
-    ctx.advance_to(s.scan(*static_cast<T*>(arg), ctx));
-  }
-};
-}  // namespace detail
-
-struct scan_args {
-  int size;
-  const detail::scan_arg* data;
-
-  template <size_t N>
-  scan_args(const std::array<detail::scan_arg, N>& store)
-      : size(N), data(store.data()) {
-    static_assert(N < INT_MAX, "too many arguments");
-  }
-};
-
-namespace detail {
-
-struct scan_handler : error_handler {
- private:
-  scan_parse_context parse_ctx_;
-  scan_context scan_ctx_;
-  scan_args args_;
-  int next_arg_id_;
-  scan_arg arg_;
-
-  template <typename T = unsigned> T read_uint() {
-    T value = 0;
-    auto it = scan_ctx_.begin(), end = scan_ctx_.end();
-    while (it != end) {
-      char c = *it++;
-      if (c < '0' || c > '9') on_error("invalid input");
-      // TODO: check overflow
-      value = value * 10 + static_cast<unsigned>(c - '0');
-    }
-    scan_ctx_.advance_to(it);
-    return value;
-  }
-
-  template <typename T = int> T read_int() {
-    auto it = scan_ctx_.begin(), end = scan_ctx_.end();
-    bool negative = it != end && *it == '-';
-    if (negative) ++it;
-    scan_ctx_.advance_to(it);
-    const auto value = read_uint<typename std::make_unsigned<T>::type>();
-    if (negative) return -static_cast<T>(value);
-    return static_cast<T>(value);
-  }
-
- public:
-  scan_handler(string_view format, string_view input, scan_args args)
-      : parse_ctx_(format), scan_ctx_(input), args_(args), next_arg_id_(0) {}
-
-  const char* pos() const { return scan_ctx_.begin(); }
-
-  void on_text(const char* begin, const char* end) {
-    auto size = to_unsigned(end - begin);
-    auto it = scan_ctx_.begin();
-    if (it + size > scan_ctx_.end() ||
-        !std::equal(begin, end, make_checked(it, size))) {
-      on_error("invalid input");
-    }
-    scan_ctx_.advance_to(it + size);
-  }
-
-  FMT_CONSTEXPR int on_arg_id() { return on_arg_id(next_arg_id_++); }
-  FMT_CONSTEXPR int on_arg_id(int id) {
-    if (id >= args_.size) on_error("argument index out of range");
-    arg_ = args_.data[id];
-    return id;
-  }
-  FMT_CONSTEXPR int on_arg_id(string_view id) {
-    if (id.data()) on_error("invalid format");
-    return 0;
-  }
-
-  void on_replacement_field(int, const char*) {
-    auto it = scan_ctx_.begin(), end = scan_ctx_.end();
-    switch (arg_.type) {
-    case scan_type::int_type:
-      *arg_.int_value = read_int();
-      break;
-    case scan_type::uint_type:
-      *arg_.uint_value = read_uint();
-      break;
-    case scan_type::long_long_type:
-      *arg_.long_long_value = read_int<long long>();
-      break;
-    case scan_type::ulong_long_type:
-      *arg_.ulong_long_value = read_uint<unsigned long long>();
-      break;
-    case scan_type::string_type:
-      while (it != end && *it != ' ') arg_.string->push_back(*it++);
-      scan_ctx_.advance_to(it);
-      break;
-    case scan_type::string_view_type: {
-      auto s = it;
-      while (it != end && *it != ' ') ++it;
-      *arg_.string_view = fmt::string_view(s, to_unsigned(it - s));
-      scan_ctx_.advance_to(it);
-      break;
-    }
-    case scan_type::none_type:
-    case scan_type::custom_type:
-      assert(false);
-    }
-  }
-
-  const char* on_format_specs(int, const char* begin, const char*) {
-    if (arg_.type != scan_type::custom_type) return begin;
-    parse_ctx_.advance_to(begin);
-    arg_.custom.scan(arg_.custom.value, parse_ctx_, scan_ctx_);
-    return parse_ctx_.begin();
-  }
-};
-}  // namespace detail
-
-template <typename... Args>
-std::array<detail::scan_arg, sizeof...(Args)> make_scan_args(Args&... args) {
-  return {{args...}};
-}
-
-string_view::iterator vscan(string_view input, string_view format_str,
-                            scan_args args) {
-  detail::scan_handler h(format_str, input, args);
-  detail::parse_format_string<false>(format_str, h);
-  return input.begin() + (h.pos() - &*input.begin());
-}
-
-template <typename... Args>
-string_view::iterator scan(string_view input, string_view format_str,
-                           Args&... args) {
-  return vscan(input, format_str, make_scan_args(args...));
-}
-FMT_END_NAMESPACE
diff --git a/contrib/libs/fmt/test/test-assert.h b/contrib/libs/fmt/test/test-assert.h
deleted file mode 100644
index ab7b2bf732..0000000000
--- a/contrib/libs/fmt/test/test-assert.h
+++ /dev/null
@@ -1,39 +0,0 @@
-// Formatting library for C++ - test version of FMT_ASSERT
-//
-// Copyright (c) 2012 - present, Victor Zverovich
-// All rights reserved.
-//
-// For the license information refer to format.h.
-
-#ifndef FMT_TEST_ASSERT_H_
-#define FMT_TEST_ASSERT_H_
-
-#include <stdexcept>
-
-void throw_assertion_failure(const char* message);
-#define FMT_ASSERT(condition, message) \
-  if (!(condition)) throw_assertion_failure(message);
-
-#include "gtest/gtest.h"
-
-class assertion_failure : public std::logic_error {
- public:
-  explicit assertion_failure(const char* message) : std::logic_error(message) {}
-
- private:
-  virtual void avoid_weak_vtable();
-};
-
-void assertion_failure::avoid_weak_vtable() {}
-
-// We use a separate function (rather than throw directly from FMT_ASSERT) to
-// avoid GCC's -Wterminate warning when FMT_ASSERT is used in a destructor.
-inline void throw_assertion_failure(const char* message) {
-  throw assertion_failure(message);
-}
-
-// Expects an assertion failure.
-#define EXPECT_ASSERT(stmt, message) \
-  FMT_TEST_THROW_(stmt, assertion_failure, message, GTEST_NONFATAL_FAILURE_)
-
-#endif  // FMT_TEST_ASSERT_H_
diff --git a/contrib/libs/fmt/test/unicode-test.cc b/contrib/libs/fmt/test/unicode-test.cc
deleted file mode 100644
index 63c828dd8f..0000000000
--- a/contrib/libs/fmt/test/unicode-test.cc
+++ /dev/null
@@ -1,48 +0,0 @@
-// Formatting library for C++ - Unicode tests
-//
-// Copyright (c) 2012 - present, Victor Zverovich
-// All rights reserved.
-//
-// For the license information refer to format.h.
-
-#include <iomanip>
-#include <locale>
-#include <vector>
-
-#include "fmt/chrono.h"
-#include "gmock/gmock.h"
-#include "util.h"  // get_locale
-
-using testing::Contains;
-
-TEST(unicode_test, is_utf8) { EXPECT_TRUE(fmt::detail::is_utf8()); }
-
-TEST(unicode_test, legacy_locale) {
-  auto loc = get_locale("ru_RU.CP1251", "Russian_Russia.1251");
-  if (loc == std::locale::classic()) return;
-
-  auto s = std::string();
-  try {
-    s = fmt::format(loc, "День недели: {:L}", fmt::weekday(1));
-  } catch (const fmt::format_error& e) {
-    // Formatting can fail due to an unsupported encoding.
-    fmt::print("Format error: {}\n", e.what());
-    return;
-  }
-
-#if !FMT_GCC_VERSION || FMT_GCC_VERSION >= 500
-  auto&& os = std::ostringstream();
-  os.imbue(loc);
-  auto tm = std::tm();
-  tm.tm_wday = 1;
-  os << std::put_time(&tm, "%a");
-  auto wd = os.str();
-  if (wd == "??") {
-    EXPECT_EQ(s, "День недели: ??");
-    fmt::print("std::locale gives ?? as a weekday.\n");
-    return;
-  }
-#endif
-  EXPECT_THAT((std::vector<std::string>{"День недели: пн", "День недели: Пн"}),
-              Contains(s));
-}
diff --git a/contrib/libs/fmt/test/unicode-test/ya.make b/contrib/libs/fmt/test/unicode-test/ya.make
deleted file mode 100644
index 96544c014b..0000000000
--- a/contrib/libs/fmt/test/unicode-test/ya.make
+++ /dev/null
@@ -1,32 +0,0 @@
-# Generated by devtools/yamaker.
-
-GTEST()
-
-WITHOUT_LICENSE_TEXTS()
-
-LICENSE(MIT)
-
-ADDINCL(
-    contrib/libs/fmt/include
-)
-
-NO_COMPILER_WARNINGS()
-
-NO_UTIL()
-
-CFLAGS(
-    -DFMT_HEADER_ONLY=1
-    -DGTEST_HAS_STD_WSTRING=1
-    -D_SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING=1
-)
-
-SRCDIR(contrib/libs/fmt)
-
-SRCS(
-    src/os.cc
-    test/gtest-extra.cc
-    test/unicode-test.cc
-    test/util.cc
-)
-
-END()
diff --git a/contrib/libs/fmt/test/util.cc b/contrib/libs/fmt/test/util.cc
deleted file mode 100644
index f4cb74ca0a..0000000000
--- a/contrib/libs/fmt/test/util.cc
+++ /dev/null
@@ -1,46 +0,0 @@
-// Formatting library for C++ - test utilities
-//
-// Copyright (c) 2012 - present, Victor Zverovich
-// All rights reserved.
-//
-// For the license information refer to format.h.
-
-#include "util.h"
-
-#include <cstring>
-
-const char* const file_content = "Don't panic!";
-
-fmt::buffered_file open_buffered_file(FILE** fp) {
-#if FMT_USE_FCNTL
-  fmt::file read_end, write_end;
-  fmt::file::pipe(read_end, write_end);
-  write_end.write(file_content, std::strlen(file_content));
-  write_end.close();
-  fmt::buffered_file f = read_end.fdopen("r");
-  if (fp) *fp = f.get();
-#else
-  fmt::buffered_file f("test-file", "w");
-  fputs(file_content, f.get());
-  if (fp) *fp = f.get();
-#endif
-  return f;
-}
-
-std::locale do_get_locale(const char* name) {
-  try {
-    return std::locale(name);
-  } catch (const std::runtime_error&) {
-  }
-  return std::locale::classic();
-}
-
-std::locale get_locale(const char* name, const char* alt_name) {
-  auto loc = do_get_locale(name);
-  if (loc == std::locale::classic() && alt_name) {
-    loc = do_get_locale(alt_name);
-  }
-  if (loc == std::locale::classic())
-    fmt::print(stderr, "{} locale is missing.\n", name);
-  return loc;
-}
diff --git a/contrib/libs/fmt/test/util.h b/contrib/libs/fmt/test/util.h
deleted file mode 100644
index 2e58ad950c..0000000000
--- a/contrib/libs/fmt/test/util.h
+++ /dev/null
@@ -1,85 +0,0 @@
-// Formatting library for C++ - test utilities
-//
-// Copyright (c) 2012 - present, Victor Zverovich
-// All rights reserved.
-//
-// For the license information refer to format.h.
-
-#include <cstdarg>
-#include <cstdio>
-#include <locale>
-#include <string>
-
-#ifdef FMT_MODULE_TEST
-import fmt;
-#else
-#  include "fmt/os.h"
-#endif  // FMT_MODULE_TEST
-
-#ifdef _MSC_VER
-#  define FMT_VSNPRINTF vsprintf_s
-#else
-#  define FMT_VSNPRINTF vsnprintf
-#endif
-
-template <size_t SIZE>
-void safe_sprintf(char (&buffer)[SIZE], const char* format, ...) {
-  std::va_list args;
-  va_start(args, format);
-  FMT_VSNPRINTF(buffer, SIZE, format, args);
-  va_end(args);
-}
-
-extern const char* const file_content;
-
-// Opens a buffered file for reading.
-fmt::buffered_file open_buffered_file(FILE** fp = nullptr);
-
-inline FILE* safe_fopen(const char* filename, const char* mode) {
-#if defined(_WIN32) && !defined(__MINGW32__)
-  // Fix MSVC warning about "unsafe" fopen.
-  FILE* f = nullptr;
-  errno = fopen_s(&f, filename, mode);
-  return f;
-#else
-  return std::fopen(filename, mode);
-#endif
-}
-
-template <typename Char> class basic_test_string {
- private:
-  std::basic_string<Char> value_;
-
-  static const Char empty[];
-
- public:
-  explicit basic_test_string(const Char* value = empty) : value_(value) {}
-
-  const std::basic_string<Char>& value() const { return value_; }
-};
-
-template <typename Char> const Char basic_test_string<Char>::empty[] = {0};
-
-typedef basic_test_string<char> test_string;
-typedef basic_test_string<wchar_t> test_wstring;
-
-template <typename Char>
-std::basic_ostream<Char>& operator<<(std::basic_ostream<Char>& os,
-                                     const basic_test_string<Char>& s) {
-  os << s.value();
-  return os;
-}
-
-class date {
-  int year_, month_, day_;
-
- public:
-  date(int year, int month, int day) : year_(year), month_(month), day_(day) {}
-
-  int year() const { return year_; }
-  int month() const { return month_; }
-  int day() const { return day_; }
-};
-
-// Returns a locale with the given name if available or classic locale othewise.
-std::locale get_locale(const char* name, const char* alt_name = nullptr);
diff --git a/contrib/libs/fmt/test/xchar-test.cc b/contrib/libs/fmt/test/xchar-test.cc
deleted file mode 100644
index 346cd21262..0000000000
--- a/contrib/libs/fmt/test/xchar-test.cc
+++ /dev/null
@@ -1,502 +0,0 @@
-// Formatting library for C++ - formatting library tests
-//
-// Copyright (c) 2012 - present, Victor Zverovich
-// All rights reserved.
-//
-// For the license information refer to format.h.
-
-#include "fmt/xchar.h"
-
-#include <complex>
-#include <cwchar>
-#include <vector>
-
-#include "fmt/chrono.h"
-#include "fmt/color.h"
-#include "fmt/ostream.h"
-#include "fmt/ranges.h"
-#include "gtest-extra.h"  // Contains
-#include "util.h"         // get_locale
-
-using fmt::detail::max_value;
-using testing::Contains;
-
-namespace test_ns {
-template <typename Char> class test_string {
- private:
-  std::basic_string<Char> s_;
-
- public:
-  test_string(const Char* s) : s_(s) {}
-  const Char* data() const { return s_.data(); }
-  size_t length() const { return s_.size(); }
-  operator const Char*() const { return s_.c_str(); }
-};
-
-template <typename Char>
-fmt::basic_string_view<Char> to_string_view(const test_string<Char>& s) {
-  return {s.data(), s.length()};
-}
-
-struct non_string {};
-}  // namespace test_ns
-
-template <typename T> class is_string_test : public testing::Test {};
-
-using string_char_types = testing::Types<char, wchar_t, char16_t, char32_t>;
-TYPED_TEST_SUITE(is_string_test, string_char_types);
-
-template <typename Char>
-struct derived_from_string_view : fmt::basic_string_view<Char> {};
-
-TYPED_TEST(is_string_test, is_string) {
-  EXPECT_TRUE(fmt::detail::is_string<TypeParam*>::value);
-  EXPECT_TRUE(fmt::detail::is_string<const TypeParam*>::value);
-  EXPECT_TRUE(fmt::detail::is_string<TypeParam[2]>::value);
-  EXPECT_TRUE(fmt::detail::is_string<const TypeParam[2]>::value);
-  EXPECT_TRUE(fmt::detail::is_string<std::basic_string<TypeParam>>::value);
-  EXPECT_TRUE(fmt::detail::is_string<fmt::basic_string_view<TypeParam>>::value);
-  EXPECT_TRUE(
-      fmt::detail::is_string<derived_from_string_view<TypeParam>>::value);
-  using fmt_string_view = fmt::detail::std_string_view<TypeParam>;
-  EXPECT_TRUE(std::is_empty<fmt_string_view>::value !=
-              fmt::detail::is_string<fmt_string_view>::value);
-  EXPECT_TRUE(fmt::detail::is_string<test_ns::test_string<TypeParam>>::value);
-  EXPECT_FALSE(fmt::detail::is_string<test_ns::non_string>::value);
-}
-
-// std::is_constructible is broken in MSVC until version 2015.
-#if !FMT_MSC_VER || FMT_MSC_VER >= 1900
-struct explicitly_convertible_to_wstring_view {
-  explicit operator fmt::wstring_view() const { return L"foo"; }
-};
-
-TEST(xchar_test, format_explicitly_convertible_to_wstring_view) {
-  EXPECT_EQ(L"foo",
-            fmt::format(L"{}", explicitly_convertible_to_wstring_view()));
-}
-#endif
-
-TEST(xchar_test, format) {
-  EXPECT_EQ(L"42", fmt::format(L"{}", 42));
-  EXPECT_EQ(L"4.2", fmt::format(L"{}", 4.2));
-  EXPECT_EQ(L"abc", fmt::format(L"{}", L"abc"));
-  EXPECT_EQ(L"z", fmt::format(L"{}", L'z'));
-  EXPECT_THROW(fmt::format(L"{:*\x343E}", 42), fmt::format_error);
-  EXPECT_EQ(L"true", fmt::format(L"{}", true));
-  EXPECT_EQ(L"a", fmt::format(L"{0}", 'a'));
-  EXPECT_EQ(L"a", fmt::format(L"{0}", L'a'));
-  EXPECT_EQ(L"Cyrillic letter \x42e",
-            fmt::format(L"Cyrillic letter {}", L'\x42e'));
-  EXPECT_EQ(L"abc1", fmt::format(L"{}c{}", L"ab", 1));
-}
-
-TEST(xchar_test, is_formattable) {
-  static_assert(!fmt::is_formattable<const wchar_t*>::value, "");
-}
-
-TEST(xchar_test, compile_time_string) {
-#if defined(FMT_USE_STRING_VIEW) && __cplusplus >= 201703L
-  EXPECT_EQ(L"42", fmt::format(FMT_STRING(std::wstring_view(L"{}")), 42));
-#endif
-}
-
-#if __cplusplus > 201103L
-struct custom_char {
-  int value;
-  custom_char() = default;
-
-  template <typename T>
-  constexpr custom_char(T val) : value(static_cast<int>(val)) {}
-
-  operator int() const { return value; }
-};
-
-int to_ascii(custom_char c) { return c; }
-
-FMT_BEGIN_NAMESPACE
-template <> struct is_char<custom_char> : std::true_type {};
-FMT_END_NAMESPACE
-
-TEST(xchar_test, format_custom_char) {
-  const custom_char format[] = {'{', '}', 0};
-  auto result = fmt::format(format, custom_char('x'));
-  EXPECT_EQ(result.size(), 1);
-  EXPECT_EQ(result[0], custom_char('x'));
-}
-#endif
-
-// Convert a char8_t string to std::string. Otherwise GTest will insist on
-// inserting `char8_t` NTBS into a `char` stream which is disabled by P1423.
-template <typename S> std::string from_u8str(const S& str) {
-  return std::string(str.begin(), str.end());
-}
-
-TEST(xchar_test, format_utf8_precision) {
-  using str_type = std::basic_string<fmt::detail::char8_type>;
-  auto format =
-      str_type(reinterpret_cast<const fmt::detail::char8_type*>(u8"{:.4}"));
-  auto str = str_type(reinterpret_cast<const fmt::detail::char8_type*>(
-      u8"caf\u00e9s"));  // cafés
-  auto result = fmt::format(format, str);
-  EXPECT_EQ(fmt::detail::compute_width(result), 4);
-  EXPECT_EQ(result.size(), 5);
-  EXPECT_EQ(from_u8str(result), from_u8str(str.substr(0, 5)));
-}
-
-TEST(xchar_test, format_to) {
-  auto buf = std::vector<wchar_t>();
-  fmt::format_to(std::back_inserter(buf), L"{}{}", 42, L'\0');
-  EXPECT_STREQ(buf.data(), L"42");
-}
-
-TEST(xchar_test, vformat_to) {
-  using wcontext = fmt::wformat_context;
-  fmt::basic_format_arg<wcontext> warg = fmt::detail::make_arg<wcontext>(42);
-  auto wargs = fmt::basic_format_args<wcontext>(&warg, 1);
-  auto w = std::wstring();
-  fmt::vformat_to(std::back_inserter(w), L"{}", wargs);
-  EXPECT_EQ(L"42", w);
-  w.clear();
-  fmt::vformat_to(std::back_inserter(w), FMT_STRING(L"{}"), wargs);
-  EXPECT_EQ(L"42", w);
-}
-
-TEST(format_test, wide_format_to_n) {
-  wchar_t buffer[4];
-  buffer[3] = L'x';
-  auto result = fmt::format_to_n(buffer, 3, L"{}", 12345);
-  EXPECT_EQ(5u, result.size);
-  EXPECT_EQ(buffer + 3, result.out);
-  EXPECT_EQ(L"123x", fmt::wstring_view(buffer, 4));
-  buffer[0] = L'x';
-  buffer[1] = L'x';
-  buffer[2] = L'x';
-  result = fmt::format_to_n(buffer, 3, L"{}", L'A');
-  EXPECT_EQ(1u, result.size);
-  EXPECT_EQ(buffer + 1, result.out);
-  EXPECT_EQ(L"Axxx", fmt::wstring_view(buffer, 4));
-  result = fmt::format_to_n(buffer, 3, L"{}{} ", L'B', L'C');
-  EXPECT_EQ(3u, result.size);
-  EXPECT_EQ(buffer + 3, result.out);
-  EXPECT_EQ(L"BC x", fmt::wstring_view(buffer, 4));
-}
-
-#if FMT_USE_USER_DEFINED_LITERALS
-TEST(xchar_test, format_udl) {
-  using namespace fmt::literals;
-  EXPECT_EQ(L"{}c{}"_format(L"ab", 1), fmt::format(L"{}c{}", L"ab", 1));
-}
-
-TEST(xchar_test, named_arg_udl) {
-  using namespace fmt::literals;
-  auto udl_a =
-      fmt::format(L"{first}{second}{first}{third}", L"first"_a = L"abra",
-                  L"second"_a = L"cad", L"third"_a = 99);
-  EXPECT_EQ(
-      fmt::format(L"{first}{second}{first}{third}", fmt::arg(L"first", L"abra"),
-                  fmt::arg(L"second", L"cad"), fmt::arg(L"third", 99)),
-      udl_a);
-}
-#endif  // FMT_USE_USER_DEFINED_LITERALS
-
-TEST(xchar_test, print) {
-  // Check that the wide print overload compiles.
-  if (fmt::detail::const_check(false)) fmt::print(L"test");
-}
-
-TEST(xchar_test, join) {
-  int v[3] = {1, 2, 3};
-  EXPECT_EQ(fmt::format(L"({})", fmt::join(v, v + 3, L", ")), L"(1, 2, 3)");
-  auto t = std::tuple<wchar_t, int, float>('a', 1, 2.0f);
-  EXPECT_EQ(fmt::format(L"({})", fmt::join(t, L", ")), L"(a, 1, 2)");
-}
-
-enum streamable_enum {};
-
-std::wostream& operator<<(std::wostream& os, streamable_enum) {
-  return os << L"streamable_enum";
-}
-
-enum unstreamable_enum {};
-
-TEST(xchar_test, enum) {
-  EXPECT_EQ(L"streamable_enum", fmt::format(L"{}", streamable_enum()));
-  EXPECT_EQ(L"0", fmt::format(L"{}", unstreamable_enum()));
-}
-
-TEST(xchar_test, sign_not_truncated) {
-  wchar_t format_str[] = {
-      L'{', L':',
-      '+' | static_cast<wchar_t>(1 << fmt::detail::num_bits<char>()), L'}', 0};
-  EXPECT_THROW(fmt::format(format_str, 42), fmt::format_error);
-}
-
-namespace fake_qt {
-class QString {
- public:
-  QString(const wchar_t* s) : s_(s) {}
-  const wchar_t* utf16() const FMT_NOEXCEPT { return s_.data(); }
-  int size() const FMT_NOEXCEPT { return static_cast<int>(s_.size()); }
-
- private:
-  std::wstring s_;
-};
-
-fmt::basic_string_view<wchar_t> to_string_view(const QString& s) FMT_NOEXCEPT {
-  return {s.utf16(), static_cast<size_t>(s.size())};
-}
-}  // namespace fake_qt
-
-TEST(format_test, format_foreign_strings) {
-  using fake_qt::QString;
-  EXPECT_EQ(fmt::format(QString(L"{}"), 42), L"42");
-  EXPECT_EQ(fmt::format(QString(L"{}"), QString(L"42")), L"42");
-}
-
-TEST(xchar_test, chrono) {
-  auto tm = std::tm();
-  tm.tm_year = 116;
-  tm.tm_mon = 3;
-  tm.tm_mday = 25;
-  tm.tm_hour = 11;
-  tm.tm_min = 22;
-  tm.tm_sec = 33;
-  EXPECT_EQ(fmt::format("The date is {:%Y-%m-%d %H:%M:%S}.", tm),
-            "The date is 2016-04-25 11:22:33.");
-  EXPECT_EQ(L"42s", fmt::format(L"{}", std::chrono::seconds(42)));
-  EXPECT_EQ(fmt::format(L"{:%F}", tm), L"2016-04-25");
-  EXPECT_EQ(fmt::format(L"{:%T}", tm), L"11:22:33");
-}
-
-std::wstring system_wcsftime(const std::wstring& format, const std::tm* timeptr,
-                             std::locale* locptr = nullptr) {
-  auto loc = locptr ? *locptr : std::locale::classic();
-  auto& facet = std::use_facet<std::time_put<wchar_t>>(loc);
-  std::wostringstream os;
-  os.imbue(loc);
-  facet.put(os, os, L' ', timeptr, format.c_str(),
-            format.c_str() + format.size());
-#ifdef _WIN32
-  // Workaround a bug in older versions of Universal CRT.
-  auto str = os.str();
-  if (str == L"-0000") str = L"+0000";
-  return str;
-#else
-  return os.str();
-#endif
-}
-
-TEST(chrono_test, time_point) {
-  auto t1 = std::chrono::system_clock::now();
-
-  std::vector<std::wstring> spec_list = {
-      L"%%",  L"%n",  L"%t",  L"%Y",  L"%EY", L"%y",  L"%Oy", L"%Ey", L"%C",
-      L"%EC", L"%G",  L"%g",  L"%b",  L"%h",  L"%B",  L"%m",  L"%Om", L"%U",
-      L"%OU", L"%W",  L"%OW", L"%V",  L"%OV", L"%j",  L"%d",  L"%Od", L"%e",
-      L"%Oe", L"%a",  L"%A",  L"%w",  L"%Ow", L"%u",  L"%Ou", L"%H",  L"%OH",
-      L"%I",  L"%OI", L"%M",  L"%OM", L"%S",  L"%OS", L"%x",  L"%Ex", L"%X",
-      L"%EX", L"%D",  L"%F",  L"%R",  L"%T",  L"%p",  L"%z",  L"%Z"};
-  spec_list.push_back(L"%Y-%m-%d %H:%M:%S");
-#ifndef _WIN32
-  // Disabled on Windows, because these formats is not consistent among
-  // platforms.
-  spec_list.insert(spec_list.end(), {L"%c", L"%Ec", L"%r"});
-#endif
-
-  for (const auto& spec : spec_list) {
-    auto t = std::chrono::system_clock::to_time_t(t1);
-    auto tm = *std::localtime(&t);
-
-    auto sys_output = system_wcsftime(spec, &tm);
-
-    auto fmt_spec = fmt::format(L"{{:{}}}", spec);
-    EXPECT_EQ(sys_output, fmt::format(fmt_spec, t1));
-    EXPECT_EQ(sys_output, fmt::format(fmt_spec, tm));
-  }
-}
-
-TEST(xchar_test, color) {
-  EXPECT_EQ(fmt::format(fg(fmt::rgb(255, 20, 30)), L"rgb(255,20,30) wide"),
-            L"\x1b[38;2;255;020;030mrgb(255,20,30) wide\x1b[0m");
-}
-
-TEST(xchar_test, ostream) {
-  std::wostringstream wos;
-  fmt::print(wos, L"Don't {}!", L"panic");
-  EXPECT_EQ(L"Don't panic!", wos.str());
-}
-
-TEST(xchar_test, to_wstring) { EXPECT_EQ(L"42", fmt::to_wstring(42)); }
-
-#ifndef FMT_STATIC_THOUSANDS_SEPARATOR
-template <typename Char> struct numpunct : std::numpunct<Char> {
- protected:
-  Char do_decimal_point() const override { return '?'; }
-  std::string do_grouping() const override { return "\03"; }
-  Char do_thousands_sep() const override { return '~'; }
-};
-
-template <typename Char> struct no_grouping : std::numpunct<Char> {
- protected:
-  Char do_decimal_point() const override { return '.'; }
-  std::string do_grouping() const override { return ""; }
-  Char do_thousands_sep() const override { return ','; }
-};
-
-template <typename Char> struct special_grouping : std::numpunct<Char> {
- protected:
-  Char do_decimal_point() const override { return '.'; }
-  std::string do_grouping() const override { return "\03\02"; }
-  Char do_thousands_sep() const override { return ','; }
-};
-
-template <typename Char> struct small_grouping : std::numpunct<Char> {
- protected:
-  Char do_decimal_point() const override { return '.'; }
-  std::string do_grouping() const override { return "\01"; }
-  Char do_thousands_sep() const override { return ','; }
-};
-
-TEST(locale_test, localized_double) {
-  auto loc = std::locale(std::locale(), new numpunct<char>());
-  EXPECT_EQ("1?23", fmt::format(loc, "{:L}", 1.23));
-  EXPECT_EQ("1?230000", fmt::format(loc, "{:Lf}", 1.23));
-  EXPECT_EQ("1~234?5", fmt::format(loc, "{:L}", 1234.5));
-  EXPECT_EQ("12~000", fmt::format(loc, "{:L}", 12000.0));
-}
-
-TEST(locale_test, format) {
-  auto loc = std::locale(std::locale(), new numpunct<char>());
-  EXPECT_EQ("1234567", fmt::format(std::locale(), "{:L}", 1234567));
-  EXPECT_EQ("1~234~567", fmt::format(loc, "{:L}", 1234567));
-  EXPECT_EQ("-1~234~567", fmt::format(loc, "{:L}", -1234567));
-  EXPECT_EQ("-256", fmt::format(loc, "{:L}", -256));
-  fmt::format_arg_store<fmt::format_context, int> as{1234567};
-  EXPECT_EQ("1~234~567", fmt::vformat(loc, "{:L}", fmt::format_args(as)));
-  auto s = std::string();
-  fmt::format_to(std::back_inserter(s), loc, "{:L}", 1234567);
-  EXPECT_EQ("1~234~567", s);
-
-  auto no_grouping_loc = std::locale(std::locale(), new no_grouping<char>());
-  EXPECT_EQ("1234567", fmt::format(no_grouping_loc, "{:L}", 1234567));
-
-  auto special_grouping_loc =
-      std::locale(std::locale(), new special_grouping<char>());
-  EXPECT_EQ("1,23,45,678", fmt::format(special_grouping_loc, "{:L}", 12345678));
-  EXPECT_EQ("12,345", fmt::format(special_grouping_loc, "{:L}", 12345));
-
-  auto small_grouping_loc =
-      std::locale(std::locale(), new small_grouping<char>());
-  EXPECT_EQ("4,2,9,4,9,6,7,2,9,5",
-            fmt::format(small_grouping_loc, "{:L}", max_value<uint32_t>()));
-}
-
-TEST(locale_test, format_detault_align) {
-  auto loc = std::locale({}, new special_grouping<char>());
-  EXPECT_EQ("  12,345", fmt::format(loc, "{:8L}", 12345));
-}
-
-TEST(locale_test, format_plus) {
-  auto loc = std::locale({}, new special_grouping<char>());
-  EXPECT_EQ("+100", fmt::format(loc, "{:+L}", 100));
-}
-
-TEST(locale_test, wformat) {
-  auto loc = std::locale(std::locale(), new numpunct<wchar_t>());
-  EXPECT_EQ(L"1234567", fmt::format(std::locale(), L"{:L}", 1234567));
-  EXPECT_EQ(L"1~234~567", fmt::format(loc, L"{:L}", 1234567));
-  using wcontext = fmt::buffer_context<wchar_t>;
-  fmt::format_arg_store<wcontext, int> as{1234567};
-  EXPECT_EQ(L"1~234~567",
-            fmt::vformat(loc, L"{:L}", fmt::basic_format_args<wcontext>(as)));
-  EXPECT_EQ(L"1234567", fmt::format(std::locale("C"), L"{:L}", 1234567));
-
-  auto no_grouping_loc = std::locale(std::locale(), new no_grouping<wchar_t>());
-  EXPECT_EQ(L"1234567", fmt::format(no_grouping_loc, L"{:L}", 1234567));
-
-  auto special_grouping_loc =
-      std::locale(std::locale(), new special_grouping<wchar_t>());
-  EXPECT_EQ(L"1,23,45,678",
-            fmt::format(special_grouping_loc, L"{:L}", 12345678));
-
-  auto small_grouping_loc =
-      std::locale(std::locale(), new small_grouping<wchar_t>());
-  EXPECT_EQ(L"4,2,9,4,9,6,7,2,9,5",
-            fmt::format(small_grouping_loc, L"{:L}", max_value<uint32_t>()));
-}
-
-TEST(locale_test, double_formatter) {
-  auto loc = std::locale(std::locale(), new special_grouping<char>());
-  auto f = fmt::formatter<int>();
-  auto parse_ctx = fmt::format_parse_context("L");
-  f.parse(parse_ctx);
-  char buf[10] = {};
-  fmt::basic_format_context<char*, char> format_ctx(
-      buf, {}, fmt::detail::locale_ref(loc));
-  *f.format(12345, format_ctx) = 0;
-  EXPECT_STREQ("12,345", buf);
-}
-
-FMT_BEGIN_NAMESPACE
-template <class charT> struct formatter<std::complex<double>, charT> {
- private:
-  detail::dynamic_format_specs<char> specs_;
-
- public:
-  FMT_CONSTEXPR typename basic_format_parse_context<charT>::iterator parse(
-      basic_format_parse_context<charT>& ctx) {
-    using handler_type =
-        detail::dynamic_specs_handler<basic_format_parse_context<charT>>;
-    detail::specs_checker<handler_type> handler(handler_type(specs_, ctx),
-                                                detail::type::string_type);
-    auto it = parse_format_specs(ctx.begin(), ctx.end(), handler);
-    detail::parse_float_type_spec(specs_, ctx.error_handler());
-    return it;
-  }
-
-  template <class FormatContext>
-  typename FormatContext::iterator format(const std::complex<double>& c,
-                                          FormatContext& ctx) {
-    detail::handle_dynamic_spec<detail::precision_checker>(
-        specs_.precision, specs_.precision_ref, ctx);
-    auto specs = std::string();
-    if (specs_.precision > 0) specs = fmt::format(".{}", specs_.precision);
-    if (specs_.type == presentation_type::fixed_lower) specs += 'f';
-    auto real = fmt::format(ctx.locale().template get<std::locale>(),
-                            fmt::runtime("{:" + specs + "}"), c.real());
-    auto imag = fmt::format(ctx.locale().template get<std::locale>(),
-                            fmt::runtime("{:" + specs + "}"), c.imag());
-    auto fill_align_width = std::string();
-    if (specs_.width > 0) fill_align_width = fmt::format(">{}", specs_.width);
-    return format_to(ctx.out(), runtime("{:" + fill_align_width + "}"),
-                     c.real() != 0 ? fmt::format("({}+{}i)", real, imag)
-                                   : fmt::format("{}i", imag));
-  }
-};
-FMT_END_NAMESPACE
-
-TEST(locale_test, complex) {
-  std::string s = fmt::format("{}", std::complex<double>(1, 2));
-  EXPECT_EQ(s, "(1+2i)");
-  EXPECT_EQ(fmt::format("{:.2f}", std::complex<double>(1, 2)), "(1.00+2.00i)");
-  EXPECT_EQ(fmt::format("{:8}", std::complex<double>(1, 2)), "  (1+2i)");
-}
-
-TEST(locale_test, chrono_weekday) {
-  auto loc = get_locale("ru_RU.UTF-8", "Russian_Russia.1251");
-  auto loc_old = std::locale::global(loc);
-  auto mon = fmt::weekday(1);
-  EXPECT_EQ(fmt::format(L"{}", mon), L"Mon");
-  if (loc != std::locale::classic()) {
-    // {L"\x43F\x43D", L"\x41F\x43D", L"\x43F\x43D\x434", L"\x41F\x43D\x434"}
-    // {L"пн", L"Пн", L"пнд", L"Пнд"}
-    EXPECT_THAT(
-        (std::vector<std::wstring>{L"\x43F\x43D", L"\x41F\x43D",
-                                   L"\x43F\x43D\x434", L"\x41F\x43D\x434"}),
-        Contains(fmt::format(loc, L"{:L}", mon)));
-  }
-  std::locale::global(loc_old);
-}
-
-#endif  // FMT_STATIC_THOUSANDS_SEPARATOR
diff --git a/contrib/libs/fmt/test/xchar-test/ya.make b/contrib/libs/fmt/test/xchar-test/ya.make
deleted file mode 100644
index d0a5e4c043..0000000000
--- a/contrib/libs/fmt/test/xchar-test/ya.make
+++ /dev/null
@@ -1,31 +0,0 @@
-# Generated by devtools/yamaker.
-
-GTEST()
-
-WITHOUT_LICENSE_TEXTS()
-
-LICENSE(MIT)
-
-PEERDIR(
-    contrib/libs/fmt
-    contrib/libs/fmt/test
-)
-
-NO_COMPILER_WARNINGS()
-
-NO_UTIL()
-
-CFLAGS(
-    -DFMT_LOCALE
-    -DFMT_SHARED
-    -DGTEST_HAS_STD_WSTRING=1
-    -D_SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING=1
-)
-
-SRCDIR(contrib/libs/fmt/test)
-
-SRCS(
-    xchar-test.cc
-)
-
-END()
diff --git a/contrib/libs/fmt/test/ya.make b/contrib/libs/fmt/test/ya.make
deleted file mode 100644
index 46905a71d7..0000000000
--- a/contrib/libs/fmt/test/ya.make
+++ /dev/null
@@ -1,57 +0,0 @@
-# Generated by devtools/yamaker.
-
-LIBRARY()
-
-WITHOUT_LICENSE_TEXTS()
-
-LICENSE(MIT)
-
-PEERDIR(
-    contrib/libs/fmt
-    contrib/restricted/googletest/googlemock
-    contrib/restricted/googletest/googletest
-)
-
-NO_COMPILER_WARNINGS()
-
-NO_UTIL()
-
-CFLAGS(
-    -DGTEST_HAS_STD_WSTRING=1
-    -D_SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING=1
-)
-
-SRCS(
-    gtest-extra.cc
-    util.cc
-)
-
-END()
-
-RECURSE(
-    args-test
-    assert-test
-    color-test
-    compile-fp-test
-    compile-test
-    core-test
-    enforce-checks-test
-    format-impl-test
-    format-test
-    gtest-extra-test
-    os-test
-    ostream-test
-    posix-mock-test
-    printf-test
-    ranges-test
-    scan-test
-)
-
-IF (NOT MUSL AND NOT OS_WINDOWS)
-    # Generated by devtools/yamaker.
-    RECURSE(
-        chrono-test
-        unicode-test
-        xchar-test
-    )
-ENDIF()
diff --git a/contrib/libs/fmt/ya.make b/contrib/libs/fmt/ya.make
index eb118a5dde..ad452c6e83 100644
--- a/contrib/libs/fmt/ya.make
+++ b/contrib/libs/fmt/ya.make
@@ -1,11 +1,7 @@
-# Generated by devtools/yamaker from nixpkgs 22.05.
+# Generated by devtools/yamaker from nixpkgs 22.11.
 
 LIBRARY()
 
-VERSION(8.1.1)
-
-ORIGINAL_SOURCE(https://github.com/fmtlib/fmt/archive/8.1.1.tar.gz)
-
 LICENSE(
     Apache-2.0 WITH LLVM-exception AND
     MIT AND
@@ -15,6 +11,10 @@ LICENSE(
 
 LICENSE_TEXTS(.yandex_meta/licenses.list.txt)
 
+VERSION(8.1.1)
+
+ORIGINAL_SOURCE(https://github.com/fmtlib/fmt/archive/8.1.1.tar.gz)
+
 ADDINCL(
     GLOBAL contrib/libs/fmt/include
 )
@@ -33,7 +33,3 @@ SRCS(
 )
 
 END()
-
-RECURSE(
-    test
-)
-- 
cgit v1.2.3


From 3cc4ef251feaa3bcfa6adfcc4d9f367e756c8954 Mon Sep 17 00:00:00 2001
From: sabdenovch <sabdenovch@yandex-team.com>
Date: Mon, 8 Apr 2024 15:03:00 +0300
Subject: Allow users to create secondary indices
 66582a84f5072ecf210d9f9452934c817dc3804c

---
 yt/yt/client/object_client/helpers.cpp | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/yt/yt/client/object_client/helpers.cpp b/yt/yt/client/object_client/helpers.cpp
index 21fc7e924f..cea2e62332 100644
--- a/yt/yt/client/object_client/helpers.cpp
+++ b/yt/yt/client/object_client/helpers.cpp
@@ -158,7 +158,8 @@ bool IsUserType(EObjectType type)
         type == EObjectType::SchedulerPool ||
         type == EObjectType::SchedulerPoolTree ||
         type == EObjectType::ChaosReplicatedTable ||
-        type == EObjectType::HunkStorage;
+        type == EObjectType::HunkStorage ||
+        type == EObjectType::SecondaryIndex;
 }
 
 bool IsSchemafulType(EObjectType type)
-- 
cgit v1.2.3


From 1fde6fefb7cbb1dd607069fc19c2cae955e57028 Mon Sep 17 00:00:00 2001
From: arkady-e1ppa <arkady-e1ppa@yandex-team.com>
Date: Mon, 8 Apr 2024 16:08:46 +0300
Subject: Make coroutine not require type-erasure
 fc121c32fb9b268c7c2df003f43ec5380115050e

---
 yt/yt/core/concurrency/coroutine-inl.h             | 146 ++++++++++++++-------
 yt/yt/core/concurrency/coroutine.cpp               |  30 +----
 yt/yt/core/concurrency/coroutine.h                 |  99 +++++++++-----
 yt/yt/core/concurrency/unittests/coroutines_ut.cpp |   8 +-
 4 files changed, 180 insertions(+), 103 deletions(-)

diff --git a/yt/yt/core/concurrency/coroutine-inl.h b/yt/yt/core/concurrency/coroutine-inl.h
index df05e67b9d..f9f28eab55 100644
--- a/yt/yt/core/concurrency/coroutine-inl.h
+++ b/yt/yt/core/concurrency/coroutine-inl.h
@@ -11,6 +11,55 @@ namespace NYT::NConcurrency {
 
 namespace NDetail {
 
+template <CInvocable<void()> TBody>
+TCoroutineBase::TCoroutineBase(TBody body, EExecutionStackKind stackKind)
+    : CoroutineStack_(CreateExecutionStack(stackKind))
+{
+    TTrampoLine trampoline(&body, this);
+
+    std::construct_at(
+        &CoroutineContext,
+        TContClosure{
+            .TrampoLine = &trampoline,
+            .Stack = TArrayRef(static_cast<char*>(CoroutineStack_->GetStack()), CoroutineStack_->GetSize())
+        });
+
+    Resume();
+}
+
+template <CInvocable<void()> TBody>
+TCoroutineBase::TTrampoLine<TBody>::TTrampoLine(TBody* body, TCoroutineBase* owner)
+    : Body_(body)
+    , Owner_(owner)
+{ }
+
+template <CInvocable<void()> TBody>
+void TCoroutineBase::TTrampoLine<TBody>::DoRun()
+{
+    // Move/Copy stuff on stack frame.
+    auto* owner = Owner_;
+
+    {
+        auto body = std::move(*Body_);
+
+        owner->Suspend();
+
+        // Actual execution.
+        try {
+            body();
+        } catch (...) {
+            owner->CoroutineException_ = std::current_exception();
+        }
+    }
+
+    owner->Completed_ = true;
+    owner->Suspend();
+
+    YT_ABORT();
+}
+
+////////////////////////////////////////////////////////////////////////////////
+
 template <class TCallee, class TCaller, class TArguments, size_t... Indexes>
 void Invoke(
     TCallee& callee,
@@ -28,10 +77,31 @@ void Invoke(
 ////////////////////////////////////////////////////////////////////////////////
 
 template <class R, class... TArgs>
-TCoroutine<R(TArgs...)>::TCoroutine(TCoroutine<R(TArgs...)>::TCallee&& callee, const EExecutionStackKind stackKind)
-    : NDetail::TCoroutineBase(stackKind)
-    , Callee_(std::move(callee))
-{ }
+template <class TCallee>
+CInvocable<void()> auto TCoroutine<R(TArgs...)>::MakeBody(TCallee&& callee)
+{
+    return [this, callee = std::forward<TCallee>(callee)] {
+        try {
+            NDetail::Invoke(
+                callee,
+                *this,
+                std::move(Arguments_),
+                std::make_index_sequence<sizeof...(TArgs)>());
+            Result_.reset();
+        } catch (...) {
+            Result_.reset();
+            throw;
+        }
+    };
+}
+
+template <class R, class... TArgs>
+template <class TCallee>
+TCoroutine<R(TArgs...)>::TCoroutine(TCallee&& callee, const EExecutionStackKind stackKind)
+    : NDetail::TCoroutineBase(MakeBody(std::forward<TCallee>(callee)), stackKind)
+{
+    static_assert(CInvocable<TCallee, void(TCoroutine<R(TArgs...)>&, TArgs...)>);
+}
 
 template <class R, class... TArgs>
 template <class... TParams>
@@ -40,7 +110,7 @@ const std::optional<R>& TCoroutine<R(TArgs...)>::Run(TParams&& ... params)
     static_assert(sizeof...(TParams) == sizeof...(TArgs),
         "TParams<> and TArgs<> have different length");
     Arguments_ = std::tuple(std::forward<TParams>(params)...);
-    JumpToCoroutine();
+    Resume();
     return Result_;
 }
 
@@ -49,33 +119,38 @@ template <class Q>
 typename TCoroutine<R(TArgs...)>::TArguments&& TCoroutine<R(TArgs...)>::Yield(Q&& result)
 {
     Result_ = std::forward<Q>(result);
-    JumpToCaller();
+    Suspend();
     return std::move(Arguments_);
 }
 
-template <class R, class... TArgs>
-void TCoroutine<R(TArgs...)>::Invoke()
+////////////////////////////////////////////////////////////////////////////////
+
+template <class... TArgs>
+template <class TCallee>
+CInvocable<void()> auto TCoroutine<void(TArgs...)>::MakeBody(TCallee&& callee)
 {
-    try {
-        NDetail::Invoke(
-            Callee_,
-            *this,
-            std::move(Arguments_),
-            std::make_index_sequence<sizeof...(TArgs)>());
-        Result_.reset();
-    } catch (...) {
-        Result_.reset();
-        throw;
-    }
+    return [this, callee = std::forward<TCallee>(callee)] {
+        try {
+            NDetail::Invoke(
+                callee,
+                *this,
+                std::move(Arguments_),
+                std::make_index_sequence<sizeof...(TArgs)>());
+            Result_ = false;
+        } catch (...) {
+            Result_ = false;
+            throw;
+        }
+    };
 }
 
-////////////////////////////////////////////////////////////////////////////////
-
 template <class... TArgs>
-TCoroutine<void(TArgs...)>::TCoroutine(TCoroutine<void(TArgs...)>::TCallee&& callee, const EExecutionStackKind stackKind)
-    : NDetail::TCoroutineBase(stackKind)
-    , Callee_(std::move(callee))
-{ }
+template <class TCallee>
+TCoroutine<void(TArgs...)>::TCoroutine(TCallee&& callee, const EExecutionStackKind stackKind)
+    : NDetail::TCoroutineBase(MakeBody(std::forward<TCallee>(callee)), stackKind)
+{
+    static_assert(CInvocable<TCallee, void(TCoroutine<void(TArgs...)>&, TArgs...)>);
+}
 
 template <class... TArgs>
 template <class... TParams>
@@ -84,32 +159,15 @@ bool TCoroutine<void(TArgs...)>::Run(TParams&& ... params)
     static_assert(sizeof...(TParams) == sizeof...(TArgs),
         "TParams<> and TArgs<> have different length");
     Arguments_ = std::tuple(std::forward<TParams>(params)...);
-    JumpToCoroutine();
+    Resume();
     return Result_;
 }
 
-template <class... TArgs>
-void TCoroutine<void(TArgs...)>::Invoke()
-{
-    try {
-        NDetail::Invoke(
-            Callee_,
-            *this,
-            std::move(Arguments_),
-            std::make_index_sequence<sizeof...(TArgs)>());
-        Result_ = false;
-    } catch (...) {
-        Result_ = false;
-        throw;
-    }
-}
-
-
 template <class... TArgs>
 typename TCoroutine<void(TArgs...)>::TArguments&& TCoroutine<void(TArgs...)>::Yield()
 {
     Result_ = true;
-    JumpToCaller();
+    Suspend();
     return std::move(Arguments_);
 }
 
diff --git a/yt/yt/core/concurrency/coroutine.cpp b/yt/yt/core/concurrency/coroutine.cpp
index a5d3c51fdd..af80580c9e 100644
--- a/yt/yt/core/concurrency/coroutine.cpp
+++ b/yt/yt/core/concurrency/coroutine.cpp
@@ -4,35 +4,19 @@ namespace NYT::NConcurrency::NDetail {
 
 ////////////////////////////////////////////////////////////////////////////////
 
-TCoroutineBase::TCoroutineBase(const EExecutionStackKind stackKind)
-    : CoroutineStack_(CreateExecutionStack(stackKind))
-    , CoroutineContext_({
-        this,
-        TArrayRef(static_cast<char*>(CoroutineStack_->GetStack()), CoroutineStack_->GetSize())})
-{ }
-
-void TCoroutineBase::DoRun()
+TCoroutineBase::~TCoroutineBase()
 {
-    try {
-        Invoke();
-    } catch (...) {
-        CoroutineException_ = std::current_exception();
-    }
-
-    Completed_ = true;
-    JumpToCaller();
-
-    YT_ABORT();
+    std::destroy_at(&CoroutineContext);
 }
 
-void TCoroutineBase::JumpToCaller()
+void TCoroutineBase::Suspend() noexcept
 {
-    CoroutineContext_.SwitchTo(&CallerContext_);
+    CoroutineContext.SwitchTo(&CallerContext_);
 }
 
-void TCoroutineBase::JumpToCoroutine()
+void TCoroutineBase::Resume()
 {
-    CallerContext_.SwitchTo(&CoroutineContext_);
+    CallerContext_.SwitchTo(&CoroutineContext);
 
     if (CoroutineException_) {
         std::exception_ptr exception;
@@ -41,7 +25,7 @@ void TCoroutineBase::JumpToCoroutine()
     }
 }
 
-bool TCoroutineBase::IsCompleted() const
+bool TCoroutineBase::IsCompleted() const noexcept
 {
     return Completed_;
 }
diff --git a/yt/yt/core/concurrency/coroutine.h b/yt/yt/core/concurrency/coroutine.h
index 98bd79e8a1..ba1ac139ac 100644
--- a/yt/yt/core/concurrency/coroutine.h
+++ b/yt/yt/core/concurrency/coroutine.h
@@ -21,36 +21,61 @@ namespace NYT::NConcurrency {
 namespace NDetail {
 
 class TCoroutineBase
-    : public ITrampoLine
 {
-protected:
-    bool Completed_ = false;
+public:
+    TCoroutineBase(const TCoroutineBase& other) = delete;
+    TCoroutineBase& operator=(const TCoroutineBase& other) = delete;
 
-    TExceptionSafeContext CallerContext_;
+    ~TCoroutineBase();
 
-    std::shared_ptr<TExecutionStack> CoroutineStack_;
-    TExceptionSafeContext CoroutineContext_;
-    std::exception_ptr CoroutineException_;
+    bool IsCompleted() const noexcept;
 
-    TCoroutineBase(const EExecutionStackKind stackKind);
+protected:
+    template <CInvocable<void()> TBody>
+    explicit TCoroutineBase(TBody body, EExecutionStackKind stackKind);
 
-    TCoroutineBase(const TCoroutineBase& other) = delete;
-    TCoroutineBase& operator=(const TCoroutineBase& other) = delete;
+    void Resume();
+    void Suspend() noexcept;
 
-    virtual ~TCoroutineBase() = default;
+private:
+    std::shared_ptr<TExecutionStack> CoroutineStack_;
 
-    virtual void Invoke() = 0;
+    TExceptionSafeContext CallerContext_;
 
-    // ITrampoLine implementation
-    void DoRun() override;
+    // We have to delay initialization of this object until the body
+    // of ctor.
+    union {
+        TExceptionSafeContext CoroutineContext;
+    };
 
-    void JumpToCaller();
-    void JumpToCoroutine();
+    std::exception_ptr CoroutineException_;
+    bool Completed_ = false;
 
-public:
-    bool IsCompleted() const;
+    // NB(arkady-e1ppa): We make a "proxy-trampoline"
+    // which DoRun consist of two parts:
+    // 1) Move relevant stuff on stack frame: in this case it is TBody object.
+    // 2) Execute the actual body.
+    // This way we save up space in the coroutine itself
+    // and eliminate type-erasure. If this class was more
+    // popular it would make sense to move the rest of the fields
+    // to the stack at the cost of much worse readability.
+    template <CInvocable<void()> TBody>
+    class TTrampoLine
+        : public ITrampoLine
+    {
+    public:
+        explicit TTrampoLine(TBody* body, TCoroutineBase* owner);
+
+        void DoRun() override;
+
+    private:
+        TBody* Body_;
+        TCoroutineBase* Owner_;
+    };
 };
 
+////////////////////////////////////////////////////////////////////////////////
+
 } // namespace NDetail
 
 ////////////////////////////////////////////////////////////////////////////////
@@ -60,11 +85,18 @@ class TCoroutine<R(TArgs...)>
     : public NDetail::TCoroutineBase
 {
 public:
-    using TCallee = TCallback<void(TCoroutine&, TArgs...)>;
     using TArguments = std::tuple<TArgs...>;
 
     TCoroutine() = default;
-    TCoroutine(TCallee&& callee, const EExecutionStackKind stackKind = EExecutionStackKind::Small);
+
+    // NB(arkady-e1ppa): clang can't parse out-of-line
+    // definition with concepts which refer to the class
+    // name, aliases or variables. That's why it is commented out.
+    template <class TCallee>
+    // requires CInvocable<TCallee, void(TCoroutine<R(TArgs...)>&, TArgs...)>
+    TCoroutine(
+        TCallee&& callee,
+        const EExecutionStackKind stackKind = EExecutionStackKind::Small);
 
     template <class... TParams>
     const std::optional<R>& Run(TParams&&... params);
@@ -73,13 +105,11 @@ public:
     TArguments&& Yield(Q&& result);
 
 private:
-    void Invoke() override;
-
-private:
-    const TCallee Callee_;
-
     TArguments Arguments_;
     std::optional<R> Result_;
+
+    template <class TCallee>
+    CInvocable<void()> auto MakeBody(TCallee&& callee);
 };
 
 ////////////////////////////////////////////////////////////////////////////////
@@ -89,11 +119,18 @@ class TCoroutine<void(TArgs...)>
     : public NDetail::TCoroutineBase
 {
 public:
-    using TCallee = TCallback<void(TCoroutine&, TArgs...)>;
     using TArguments = std::tuple<TArgs...>;
 
     TCoroutine() = default;
-    TCoroutine(TCallee&& callee, const EExecutionStackKind stackKind = EExecutionStackKind::Small);
+
+    // NB(arkady-e1ppa): clang can't parse out-of-line
+    // definition with concepts which refer to the class
+    // name, aliases or variables. That's why it is commented out.
+    template <class TCallee>
+    // requires CInvocable<TCallee, void(TCoroutine<R(TArgs...)>&, TArgs...)>
+    TCoroutine(
+        TCallee&& callee,
+        const EExecutionStackKind stackKind = EExecutionStackKind::Small);
 
     template <class... TParams>
     bool Run(TParams&&... params);
@@ -101,13 +138,11 @@ public:
     TArguments&& Yield();
 
 private:
-    void Invoke() override;
-
-private:
-    const TCallee Callee_;
-
     TArguments Arguments_;
     bool Result_ = false;
+
+    template <class TCallee>
+    CInvocable<void()> auto MakeBody(TCallee&& callee);
 };
 
 ////////////////////////////////////////////////////////////////////////////////
diff --git a/yt/yt/core/concurrency/unittests/coroutines_ut.cpp b/yt/yt/core/concurrency/unittests/coroutines_ut.cpp
index e13d191aa5..a8292d087c 100644
--- a/yt/yt/core/concurrency/unittests/coroutines_ut.cpp
+++ b/yt/yt/core/concurrency/unittests/coroutines_ut.cpp
@@ -27,7 +27,7 @@ void Coroutine0(TCoroutine<int()>& self)
 
 TEST_F(TCoroutineTest, Nullary)
 {
-    TCoroutine<int()> coro(BIND(&Coroutine0));
+    TCoroutine<int()> coro(&Coroutine0);
     EXPECT_FALSE(coro.IsCompleted());
 
     int i;
@@ -64,7 +64,7 @@ void Coroutine1(TCoroutine<int(int)>& self, int arg)
 
 TEST_F(TCoroutineTest, Unary)
 {
-    TCoroutine<int(int)> coro(BIND(&Coroutine1));
+    TCoroutine<int(int)> coro(&Coroutine1);
     EXPECT_FALSE(coro.IsCompleted());
 
     // Alternative syntax.
@@ -111,7 +111,7 @@ void Coroutine2(TCoroutine<int(int, int)>& self, int lhs, int rhs)
 
 TEST_F(TCoroutineTest, Binary)
 {
-    TCoroutine<int(int, int)> coro(BIND(&Coroutine2));
+    TCoroutine<int(int, int)> coro(&Coroutine2);
     EXPECT_FALSE(coro.IsCompleted());
 
     int i = 0;
@@ -142,7 +142,7 @@ void Coroutine3(TCoroutine<void()>& self)
 
 TEST_W(TCoroutineTest, WaitFor)
 {
-    TCoroutine<void()> coro(BIND(&Coroutine3));
+    TCoroutine<void()> coro(&Coroutine3);
     for (int i = 0; i < 11; ++i) {
         EXPECT_FALSE(coro.IsCompleted());
         coro.Run();
-- 
cgit v1.2.3


From 2bd82cf350fe68015970a14b6a5c44ce5ade8a01 Mon Sep 17 00:00:00 2001
From: don-dron <don-dron@yandex-team.com>
Date: Mon, 8 Apr 2024 18:30:30 +0300
Subject: YT-21493: Merge ITypedNodeMemoryTracker and IMemoryUsageTracker to
 IMemoryUsageTracker 817fcab7bf0d7774cf4a7e06667695792890d14b

---
 yt/yt/core/misc/memory_reference_tracker.cpp | 22 ++++++++++++++++++++++
 yt/yt/core/misc/memory_reference_tracker.h   |  4 ++++
 yt/yt/core/misc/memory_usage_tracker.cpp     | 22 ++++++++++++++++++++++
 yt/yt/core/misc/memory_usage_tracker.h       |  6 ++++++
 yt/yt/core/rpc/unittests/lib/common.cpp      |  2 +-
 yt/yt/core/rpc/unittests/lib/common.h        |  8 ++++----
 6 files changed, 59 insertions(+), 5 deletions(-)

diff --git a/yt/yt/core/misc/memory_reference_tracker.cpp b/yt/yt/core/misc/memory_reference_tracker.cpp
index 4fce3b0d2a..cb2f237543 100644
--- a/yt/yt/core/misc/memory_reference_tracker.cpp
+++ b/yt/yt/core/misc/memory_reference_tracker.cpp
@@ -1,9 +1,31 @@
 #include "memory_reference_tracker.h"
+#include "singleton.h"
 
 namespace NYT {
 
 ////////////////////////////////////////////////////////////////////////////////
 
+class TNullMemoryReferenceTracker
+    : public IMemoryReferenceTracker
+{
+public:
+    TSharedRef Track(
+        TSharedRef reference,
+        bool /*keepExistingTracking*/) override
+    {
+        return reference;
+    }
+};
+
+////////////////////////////////////////////////////////////////////////////////
+
+IMemoryReferenceTrackerPtr GetNullMemoryReferenceTracker()
+{
+    return LeakyRefCountedSingleton<TNullMemoryReferenceTracker>();
+}
+
+////////////////////////////////////////////////////////////////////////////////
+
 TSharedRef TrackMemory(
     const IMemoryReferenceTrackerPtr& tracker,
     TSharedRef reference,
diff --git a/yt/yt/core/misc/memory_reference_tracker.h b/yt/yt/core/misc/memory_reference_tracker.h
index b860002b3f..e80410b036 100644
--- a/yt/yt/core/misc/memory_reference_tracker.h
+++ b/yt/yt/core/misc/memory_reference_tracker.h
@@ -30,6 +30,10 @@ DEFINE_REFCOUNTED_TYPE(IMemoryReferenceTracker)
 
 ////////////////////////////////////////////////////////////////////////////////
 
+IMemoryReferenceTrackerPtr GetNullMemoryReferenceTracker();
+
+////////////////////////////////////////////////////////////////////////////////
+
 TSharedRef TrackMemory(
     const IMemoryReferenceTrackerPtr& tracker,
     TSharedRef reference,
diff --git a/yt/yt/core/misc/memory_usage_tracker.cpp b/yt/yt/core/misc/memory_usage_tracker.cpp
index c5cdd80e4d..dc628e4d70 100644
--- a/yt/yt/core/misc/memory_usage_tracker.cpp
+++ b/yt/yt/core/misc/memory_usage_tracker.cpp
@@ -29,8 +29,30 @@ public:
 
     void SetLimit(i64 /*size*/) override
     { }
+
+    i64 GetLimit()  const override
+    {
+        return std::numeric_limits<i64>::max();
+    }
+
+    i64 GetUsed() const override
+    {
+        return 0;
+    }
+
+    i64 GetFree() const override
+    {
+        return std::numeric_limits<i64>::max();
+    }
+
+    bool IsExceeded() const override
+    {
+        return false;
+    }
 };
 
+////////////////////////////////////////////////////////////////////////////////
+
 IMemoryUsageTrackerPtr GetNullMemoryUsageTracker()
 {
     return LeakyRefCountedSingleton<TNullMemoryUsageTracker>();
diff --git a/yt/yt/core/misc/memory_usage_tracker.h b/yt/yt/core/misc/memory_usage_tracker.h
index 417055528d..3054aca778 100644
--- a/yt/yt/core/misc/memory_usage_tracker.h
+++ b/yt/yt/core/misc/memory_usage_tracker.h
@@ -17,10 +17,16 @@ struct IMemoryUsageTracker
     virtual bool Acquire(i64 size) = 0;
     virtual void Release(i64 size) = 0;
     virtual void SetLimit(i64 size) = 0;
+    virtual i64 GetLimit() const = 0;
+    virtual i64 GetUsed() const = 0;
+    virtual i64 GetFree() const = 0;
+    virtual bool IsExceeded() const = 0;
 };
 
 DEFINE_REFCOUNTED_TYPE(IMemoryUsageTracker)
 
+////////////////////////////////////////////////////////////////////////////////
+
 IMemoryUsageTrackerPtr GetNullMemoryUsageTracker();
 
 ////////////////////////////////////////////////////////////////////////////////
diff --git a/yt/yt/core/rpc/unittests/lib/common.cpp b/yt/yt/core/rpc/unittests/lib/common.cpp
index 91697c38b1..751e2643e9 100644
--- a/yt/yt/core/rpc/unittests/lib/common.cpp
+++ b/yt/yt/core/rpc/unittests/lib/common.cpp
@@ -34,7 +34,7 @@ i64 TTestNodeMemoryTracker::GetFree() const
 bool TTestNodeMemoryTracker::IsExceeded() const
 {
     auto guard = Guard(Lock_);
-    return GetFree() > 0;
+    return Limit_ - Usage_ <= 0;
 }
 
 TError TTestNodeMemoryTracker::TryAcquire(i64 size)
diff --git a/yt/yt/core/rpc/unittests/lib/common.h b/yt/yt/core/rpc/unittests/lib/common.h
index 57fc7713d4..d80f8c4b19 100644
--- a/yt/yt/core/rpc/unittests/lib/common.h
+++ b/yt/yt/core/rpc/unittests/lib/common.h
@@ -115,10 +115,10 @@ class TTestNodeMemoryTracker
 public:
     explicit TTestNodeMemoryTracker(size_t limit);
 
-    i64 GetLimit() const;
-    i64 GetUsed() const;
-    i64 GetFree() const;
-    bool IsExceeded() const;
+    i64 GetLimit() const override;
+    i64 GetUsed() const override;
+    i64 GetFree() const override;
+    bool IsExceeded() const override;
 
     TError TryAcquire(i64 size) override;
     TError TryChange(i64 size) override;
-- 
cgit v1.2.3


From 54544cc8eaf350220e5ce6dd6630e52722652014 Mon Sep 17 00:00:00 2001
From: robot-piglet <robot-piglet@yandex-team.com>
Date: Mon, 8 Apr 2024 19:48:35 +0300
Subject: Intermediate changes

---
 contrib/restricted/libffi/ya.make | 1 +
 1 file changed, 1 insertion(+)

diff --git a/contrib/restricted/libffi/ya.make b/contrib/restricted/libffi/ya.make
index adafe1c0be..fff3d2fa00 100644
--- a/contrib/restricted/libffi/ya.make
+++ b/contrib/restricted/libffi/ya.make
@@ -115,6 +115,7 @@ ELSEIF (ARCH_I386 AND OS_WINDOWS)
         contrib/restricted/libffi/configs/i386-microsoft-windows
         GLOBAL contrib/restricted/libffi/configs/i386-microsoft-windows/include
     )
+    LDFLAGS(/safeseh:no)
     SRCS(
         configs/i386-microsoft-windows/sysv_intel.masm
         src/x86/ffi.c
-- 
cgit v1.2.3


From ac842f4a10ae7e4d3b2bd4a0826883b8de5dc256 Mon Sep 17 00:00:00 2001
From: thevery <thevery@yandex-team.com>
Date: Mon, 8 Apr 2024 19:48:41 +0300
Subject: replace `OWNER` with `SUBSCRIBER` for build/platform/
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Привет! В рамках [задачи по наведению порядка в Аркадии](https://clubs.at.yandex-team.ru/arcadia/30094) заменяем OWNER на SUBSCRIBER в ya.make, чтобы в будущем переключить ревью на a.yaml.
Этот пуллреквест приносит чисто технические изменения, правила и уведомления про ревью не меняются.
1f9a7aa0c0282a0c164f384a2c8112f0a4e566a3
---
 build/platform/java/jstyle_lib/ya.make | 2 +-
 build/platform/test_tool/ya.make       | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/build/platform/java/jstyle_lib/ya.make b/build/platform/java/jstyle_lib/ya.make
index bbfe6a1c48..5a5e0262e8 100644
--- a/build/platform/java/jstyle_lib/ya.make
+++ b/build/platform/java/jstyle_lib/ya.make
@@ -1,6 +1,6 @@
 RESOURCES_LIBRARY()
 
-OWNER(heretic)
+SUBSCRIBER(heretic)
 
 IF (USE_SYSTEM_JSTYLE_LIB)
     MESSAGE(WARNING System java codestyle library $USE_SYSTEM_JSTYLE_LIB will be used)
diff --git a/build/platform/test_tool/ya.make b/build/platform/test_tool/ya.make
index 4394136e14..a8a84a19e7 100644
--- a/build/platform/test_tool/ya.make
+++ b/build/platform/test_tool/ya.make
@@ -1,5 +1,5 @@
 RESOURCES_LIBRARY()
-OWNER(
+SUBSCRIBER(
     g:yatest
     heretic
 )
-- 
cgit v1.2.3


From a106791f655eec412494a6a3992be68ca28d6553 Mon Sep 17 00:00:00 2001
From: lukyan <lukyan@yandex-team.com>
Date: Tue, 9 Apr 2024 05:03:59 +0300
Subject: YT-21484: Remove fields Schema, LookupSupported and KeyWidth from
 TDataSource 0142af10c4920dfea9b0d910cc93069f9d406e74

---
 yt/yt/core/misc/protobuf_helpers-inl.h | 16 +++++++++-------
 yt/yt/core/misc/protobuf_helpers.h     |  5 +++--
 2 files changed, 12 insertions(+), 9 deletions(-)

diff --git a/yt/yt/core/misc/protobuf_helpers-inl.h b/yt/yt/core/misc/protobuf_helpers-inl.h
index c55ca941e9..bb5894c723 100644
--- a/yt/yt/core/misc/protobuf_helpers-inl.h
+++ b/yt/yt/core/misc/protobuf_helpers-inl.h
@@ -298,15 +298,16 @@ bool RemoveProtoExtension(NProto::TExtensionSet* extensions)
 
 namespace NDetail {
 
-template <class TSerializedArray, class TOriginalArray>
+template <class TSerializedArray, class TOriginalArray, class... TArgs>
 void ToProtoArrayImpl(
     TSerializedArray* serializedArray,
-    const TOriginalArray& originalArray)
+    const TOriginalArray& originalArray,
+    TArgs&&... args)
 {
     serializedArray->Clear();
     serializedArray->Reserve(originalArray.size());
     for (const auto& item : originalArray) {
-        ToProto(serializedArray->Add(), item);
+        ToProto(serializedArray->Add(), item, std::forward<TArgs>(args)...);
     }
 }
 
@@ -319,7 +320,7 @@ void FromProtoArrayImpl(
     originalArray->clear();
     originalArray->resize(serializedArray.size());
     for (int i = 0; i < serializedArray.size(); ++i) {
-        FromProto(&(*originalArray)[i], serializedArray.Get(i), args...);
+        FromProto(&(*originalArray)[i], serializedArray.Get(i), std::forward<TArgs>(args)...);
     }
 }
 
@@ -434,12 +435,13 @@ void FromProtoArrayImpl(
 
 } // namespace NDetail
 
-template <class TSerialized, class TOriginalArray>
+template <class TSerialized, class TOriginalArray, class... TArgs>
 void ToProto(
     ::google::protobuf::RepeatedPtrField<TSerialized>* serializedArray,
-    const TOriginalArray& originalArray)
+    const TOriginalArray& originalArray,
+    TArgs&&... args)
 {
-    NYT::NDetail::ToProtoArrayImpl(serializedArray, originalArray);
+    NYT::NDetail::ToProtoArrayImpl(serializedArray, originalArray, std::forward<TArgs>(args)...);
 }
 
 template <class TSerialized, class TOriginalArray>
diff --git a/yt/yt/core/misc/protobuf_helpers.h b/yt/yt/core/misc/protobuf_helpers.h
index 67727c754d..55caf57468 100644
--- a/yt/yt/core/misc/protobuf_helpers.h
+++ b/yt/yt/core/misc/protobuf_helpers.h
@@ -64,10 +64,11 @@ template <class T>
 void FromProto(T* original, ui64 serialized);
 
 ////////////////////////////////////////////////////////////////////////////////
-template <class TSerialized, class TOriginalArray>
+template <class TSerialized, class TOriginalArray, class... TArgs>
 void ToProto(
     ::google::protobuf::RepeatedPtrField<TSerialized>* serializedArray,
-    const TOriginalArray& originalArray);
+    const TOriginalArray& originalArray,
+    TArgs&&... args);
 
 template <class TSerialized, class TOriginalArray>
 void ToProto(
-- 
cgit v1.2.3


From a8b456d0e029cb11e445e66fb0dc7b609a546659 Mon Sep 17 00:00:00 2001
From: Konstantin Khlebnikov <koct9i@gmail.com>
Date: Tue, 9 Apr 2024 08:14:23 +0300
Subject: HTTP proxy TLS certificate update - follow-up

- Move TLS context commit time into impl

- Update TLS certificates in http proxy control invoker

---
94ebe9cd2c4ddb7b1fd520bf8c6bd6c56baa50fa

Pull Request resolved: https://github.com/ytsaurus/ytsaurus/pull/418
---
 yt/yt/core/crypto/tls.cpp   | 17 ++++++++++++-----
 yt/yt/core/crypto/tls.h     |  3 +--
 yt/yt/core/https/server.cpp | 23 +++++++++++++++--------
 yt/yt/core/https/server.h   |  5 ++++-
 4 files changed, 32 insertions(+), 16 deletions(-)

diff --git a/yt/yt/core/crypto/tls.cpp b/yt/yt/core/crypto/tls.cpp
index 8ec3bef4b6..5da176043d 100644
--- a/yt/yt/core/crypto/tls.cpp
+++ b/yt/yt/core/crypto/tls.cpp
@@ -102,7 +102,7 @@ struct TSslContextImpl
 #endif
     }
 
-    void Commit()
+    void Commit(TInstant time)
     {
         SSL_CTX* oldCtx;
         YT_ASSERT(Ctx);
@@ -111,12 +111,19 @@ struct TSslContextImpl
             oldCtx = ActiveCtx_;
             ActiveCtx_ = Ctx;
             Ctx = nullptr;
+            CommitTime_ = time;
         }
         if (oldCtx) {
             SSL_CTX_free(oldCtx);
         }
     }
 
+    TInstant GetCommitTime() const
+    {
+        auto guard = ReaderGuard(Lock_);
+        return CommitTime_;
+    }
+
     SSL* NewSsl()
     {
         auto guard = ReaderGuard(Lock_);
@@ -133,6 +140,7 @@ struct TSslContextImpl
 private:
     YT_DECLARE_SPIN_LOCK(NThreading::TReaderWriterSpinLock, Lock_);
     SSL_CTX* ActiveCtx_ = nullptr;
+    TInstant CommitTime_;
 };
 
 DEFINE_REFCOUNTED_TYPE(TSslContextImpl)
@@ -624,13 +632,12 @@ void TSslContext::Reset()
 
 void TSslContext::Commit(TInstant time)
 {
-    CommitTime_ = time;
-    Impl_->Commit();
+    Impl_->Commit(time);
 }
 
-TInstant TSslContext::GetCommitTime()
+TInstant TSslContext::GetCommitTime() const
 {
-    return CommitTime_;
+    return Impl_->GetCommitTime();
 }
 
 void TSslContext::UseBuiltinOpenSslX509Store()
diff --git a/yt/yt/core/crypto/tls.h b/yt/yt/core/crypto/tls.h
index bb9f85503f..7903cb3570 100644
--- a/yt/yt/core/crypto/tls.h
+++ b/yt/yt/core/crypto/tls.h
@@ -22,7 +22,7 @@ public:
 
     void Reset();
     void Commit(TInstant time = TInstant::Zero());
-    TInstant GetCommitTime();
+    TInstant GetCommitTime() const;
 
     void UseBuiltinOpenSslX509Store();
 
@@ -52,7 +52,6 @@ public:
 
 private:
     const TIntrusivePtr<TSslContextImpl> Impl_;
-    TInstant CommitTime_;
 };
 
 DEFINE_REFCOUNTED_TYPE(TSslContext)
diff --git a/yt/yt/core/https/server.cpp b/yt/yt/core/https/server.cpp
index 96fd155390..4f7179823b 100644
--- a/yt/yt/core/https/server.cpp
+++ b/yt/yt/core/https/server.cpp
@@ -30,7 +30,7 @@ class TServer
     : public IServer
 {
 public:
-    explicit TServer(IServerPtr underlying, TPeriodicExecutorPtr certificateUpdater)
+    TServer(IServerPtr underlying, TPeriodicExecutorPtr certificateUpdater)
         : Underlying_(std::move(underlying))
         , CertificateUpdater_(certificateUpdater)
     { }
@@ -101,7 +101,8 @@ static void ApplySslConfig(const TSslContextPtr&  sslContext, const TServerCrede
 IServerPtr CreateServer(
     const TServerConfigPtr& config,
     const IPollerPtr& poller,
-    const IPollerPtr& acceptor)
+    const IPollerPtr& acceptor,
+    const IInvokerPtr& controlInvoker)
 {
     auto sslContext =  New<TSslContext>();
     ApplySslConfig(sslContext, config->Credentials);
@@ -113,9 +114,10 @@ IServerPtr CreateServer(
         sslConfig->CertChain->FileName &&
         sslConfig->PrivateKey->FileName)
     {
+        YT_VERIFY(controlInvoker);
         certificateUpdater = New<TPeriodicExecutor>(
-            poller->GetInvoker(),
-            BIND([=, serverName = config->ServerName] {
+            controlInvoker,
+            BIND([=] {
                 try {
                     auto modificationTime = Max(
                         NFS::GetPathStatistics(*sslConfig->CertChain->FileName).ModificationTime,
@@ -125,14 +127,19 @@ IServerPtr CreateServer(
                     if (modificationTime > sslContext->GetCommitTime() &&
                         modificationTime + sslConfig->UpdatePeriod <= TInstant::Now())
                     {
-                        YT_LOG_INFO("Updating TLS certificates (ServerName: %v, ModificationTime: %v)", serverName, modificationTime);
+                        YT_LOG_INFO("Updating TLS certificates (ServerName: %v, ModificationTime: %v)",
+                            config->ServerName,
+                            modificationTime);
                         sslContext->Reset();
                         ApplySslConfig(sslContext, sslConfig);
                         sslContext->Commit(modificationTime);
-                        YT_LOG_INFO("TLS certificates updated (ServerName: %v)", serverName);
+                        YT_LOG_INFO("TLS certificates updated (ServerName: %v)",
+                            config->ServerName);
                     }
                 } catch (const std::exception& ex) {
-                    YT_LOG_WARNING(ex, "Unexpected exception while updating TLS certificates (ServerName: %v)", serverName);
+                    YT_LOG_WARNING(ex,
+                        "Unexpected exception while updating TLS certificates (ServerName: %v)",
+                        config->ServerName);
                 }
             }),
             sslConfig->UpdatePeriod);
@@ -150,7 +157,7 @@ IServerPtr CreateServer(
 
 IServerPtr CreateServer(const TServerConfigPtr& config, const IPollerPtr& poller)
 {
-    return CreateServer(config, poller, poller);
+    return CreateServer(config, poller, poller, /*controlInvoker*/ nullptr);
 }
 
 ////////////////////////////////////////////////////////////////////////////////
diff --git a/yt/yt/core/https/server.h b/yt/yt/core/https/server.h
index e07dc0f722..876e62fdd6 100644
--- a/yt/yt/core/https/server.h
+++ b/yt/yt/core/https/server.h
@@ -2,6 +2,8 @@
 
 #include "public.h"
 
+#include "yt/yt/core/actions/public.h"
+
 #include <yt/yt/core/concurrency/public.h>
 
 #include <yt/yt/core/http/public.h>
@@ -17,7 +19,8 @@ NHttp::IServerPtr CreateServer(
 NHttp::IServerPtr CreateServer(
     const TServerConfigPtr& config,
     const NConcurrency::IPollerPtr& poller,
-    const NConcurrency::IPollerPtr& acceptor);
+    const NConcurrency::IPollerPtr& acceptor,
+    const IInvokerPtr& controlInvoker);
 
 ////////////////////////////////////////////////////////////////////////////////
 
-- 
cgit v1.2.3


From d3a5d09ba52276f88b44a096dedc83f0a18d041d Mon Sep 17 00:00:00 2001
From: robot-piglet <robot-piglet@yandex-team.com>
Date: Tue, 9 Apr 2024 10:52:27 +0300
Subject: Intermediate changes

---
 .../x/oauth2/google/internal/externalaccount/ya.make           |  2 +-
 yt/python/yt/logger.py                                         | 10 ++++++++++
 2 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/vendor/golang.org/x/oauth2/google/internal/externalaccount/ya.make b/vendor/golang.org/x/oauth2/google/internal/externalaccount/ya.make
index 91bc37a76a..829ea3f036 100644
--- a/vendor/golang.org/x/oauth2/google/internal/externalaccount/ya.make
+++ b/vendor/golang.org/x/oauth2/google/internal/externalaccount/ya.make
@@ -3,10 +3,10 @@ GO_LIBRARY()
 LICENSE(BSD-3-Clause)
 
 GO_SKIP_TESTS(
-    TestRetrieveOutputFileSubjectTokenNotJSON
     TestRetrieveOutputFileSubjectTokenFailureTests
     TestRetrieveOutputFileSubjectTokenInvalidCache
     TestRetrieveOutputFileSubjectTokenJwt
+    TestRetrieveOutputFileSubjectTokenNotJSON
 )
 
 SRCS(
diff --git a/yt/python/yt/logger.py b/yt/python/yt/logger.py
index d2007eaca3..d3d5c933ab 100644
--- a/yt/python/yt/logger.py
+++ b/yt/python/yt/logger.py
@@ -114,5 +114,15 @@ def exception(msg, *args, **kwargs):
     LOGGER.exception(msg, *args, **kwargs)
 
 
+if hasattr(functools, 'lru_cache') and not os.environ.get("YT_LOG_NO_TIP"):
+    @functools.lru_cache(maxsize=128)
+    def tip(msg):
+        LOGGER.debug("[TIP] " + msg)
+else:
+    # py2
+    def tip(msg):
+        pass
+
+
 def log(level, msg, *args, **kwargs):
     LOGGER.log(level, msg, *args, **kwargs)
-- 
cgit v1.2.3


From b3230eabfae85a24140c46cb723bae72b9b32355 Mon Sep 17 00:00:00 2001
From: pg <pg@yandex-team.com>
Date: Tue, 9 Apr 2024 10:52:37 +0300
Subject: wip 1dd96051780874258d4894fb930966919335a2d6

---
 build/conf/proto.conf                         |  3 +++
 contrib/tools/protoc/plugins/ya.make          |  6 ------
 contrib/tools/protoc/ya.make                  | 16 --------------
 contrib/tools/protoc_old/main.c               |  0
 contrib/tools/protoc_old/resources.json       | 16 ++++++++++++++
 contrib/tools/protoc_old/ya.make              |  1 +
 contrib/tools/protoc_old/ya.make.induced_deps | 30 +++++++++++++++++++++++++++
 contrib/tools/protoc_old/ya.make.prebuilt     | 20 ++++++++++++++++++
 8 files changed, 70 insertions(+), 22 deletions(-)
 delete mode 100644 contrib/tools/protoc/plugins/ya.make
 delete mode 100644 contrib/tools/protoc/ya.make
 create mode 100644 contrib/tools/protoc_old/main.c
 create mode 100644 contrib/tools/protoc_old/resources.json
 create mode 100644 contrib/tools/protoc_old/ya.make
 create mode 100644 contrib/tools/protoc_old/ya.make.induced_deps
 create mode 100644 contrib/tools/protoc_old/ya.make.prebuilt

diff --git a/build/conf/proto.conf b/build/conf/proto.conf
index 1028a8c79a..4416f5ec57 100644
--- a/build/conf/proto.conf
+++ b/build/conf/proto.conf
@@ -1,5 +1,8 @@
 # tag:tool-specific tag:proto
 PROTOC=${tool:"contrib/tools/protoc"}
+when ($PYTHON2) {
+    PROTOC=${tool:"contrib/tools/protoc_old"}
+}
 JAVA_PROTOC=${tool:"contrib/tools/protoc"}
 NEW_JAVA_PROTOC=yes
 when ($NEW_JAVA_PROTOC == "yes") {
diff --git a/contrib/tools/protoc/plugins/ya.make b/contrib/tools/protoc/plugins/ya.make
deleted file mode 100644
index 44254ae111..0000000000
--- a/contrib/tools/protoc/plugins/ya.make
+++ /dev/null
@@ -1,6 +0,0 @@
-RECURSE(
-    cpp_styleguide
-    grpc_cpp
-    grpc_java
-    grpc_python
-)
diff --git a/contrib/tools/protoc/ya.make b/contrib/tools/protoc/ya.make
deleted file mode 100644
index 59b96b2a63..0000000000
--- a/contrib/tools/protoc/ya.make
+++ /dev/null
@@ -1,16 +0,0 @@
-# WARN:
-#   The Piglet sync service (abc:cc-piglet) relies on prebuiltness of protoc.
-#   DO NOT REMOVE ya.make.prebuilt.
-
-IF (USE_PREBUILT_TOOLS)
-    INCLUDE(ya.make.prebuilt)
-ENDIF()
-
-IF (NOT PREBUILT)
-    INCLUDE(bin/ya.make)
-ENDIF()
-
-RECURSE(
-    bin
-    plugins
-)
diff --git a/contrib/tools/protoc_old/main.c b/contrib/tools/protoc_old/main.c
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/contrib/tools/protoc_old/resources.json b/contrib/tools/protoc_old/resources.json
new file mode 100644
index 0000000000..78e8cf3696
--- /dev/null
+++ b/contrib/tools/protoc_old/resources.json
@@ -0,0 +1,16 @@
+{
+    "by_platform": {
+        "darwin": {
+            "uri": "sbr:5841615385"
+        },
+        "darwin-arm64": {
+            "uri": "sbr:5841614302"
+        },
+        "linux": {
+            "uri": "sbr:5841616607"
+        },
+        "win32": {
+            "uri": "sbr:5841613390"
+        }
+    }
+}
diff --git a/contrib/tools/protoc_old/ya.make b/contrib/tools/protoc_old/ya.make
new file mode 100644
index 0000000000..97296084ee
--- /dev/null
+++ b/contrib/tools/protoc_old/ya.make
@@ -0,0 +1 @@
+INCLUDE(ya.make.prebuilt)
diff --git a/contrib/tools/protoc_old/ya.make.induced_deps b/contrib/tools/protoc_old/ya.make.induced_deps
new file mode 100644
index 0000000000..55ede44772
--- /dev/null
+++ b/contrib/tools/protoc_old/ya.make.induced_deps
@@ -0,0 +1,30 @@
+INDUCED_DEPS(cpp
+    ${ARCADIA_ROOT}/contrib/libs/protobuf/src/google/protobuf/descriptor.h
+    ${ARCADIA_ROOT}/contrib/libs/protobuf/src/google/protobuf/generated_message_reflection.h
+    ${ARCADIA_ROOT}/contrib/libs/protobuf/src/google/protobuf/io/coded_stream.h
+    ${ARCADIA_ROOT}/contrib/libs/protobuf/src/google/protobuf/reflection_ops.h
+    ${ARCADIA_ROOT}/contrib/libs/protobuf/src/google/protobuf/stubs/common.h
+    ${ARCADIA_ROOT}/contrib/libs/protobuf/src/google/protobuf/stubs/once.h
+    ${ARCADIA_ROOT}/contrib/libs/protobuf/src/google/protobuf/stubs/port.h
+    ${ARCADIA_ROOT}/contrib/libs/protobuf/src/google/protobuf/wire_format.h
+)
+INDUCED_DEPS(h+cpp
+    ${ARCADIA_ROOT}/contrib/libs/protobuf/src/google/protobuf/arena.h
+    ${ARCADIA_ROOT}/contrib/libs/protobuf/src/google/protobuf/arenastring.h
+    ${ARCADIA_ROOT}/contrib/libs/protobuf/src/google/protobuf/extension_set.h
+    ${ARCADIA_ROOT}/contrib/libs/protobuf/src/google/protobuf/generated_enum_reflection.h
+    ${ARCADIA_ROOT}/contrib/libs/protobuf/src/google/protobuf/generated_message_bases.h
+    ${ARCADIA_ROOT}/contrib/libs/protobuf/src/google/protobuf/generated_message_table_driven.h
+    ${ARCADIA_ROOT}/contrib/libs/protobuf/src/google/protobuf/generated_message_util.h
+    ${ARCADIA_ROOT}/contrib/libs/protobuf/src/google/protobuf/io/coded_stream.h
+    ${ARCADIA_ROOT}/contrib/libs/protobuf/src/google/protobuf/map.h
+    ${ARCADIA_ROOT}/contrib/libs/protobuf/src/google/protobuf/map_entry.h
+    ${ARCADIA_ROOT}/contrib/libs/protobuf/src/google/protobuf/map_field_inl.h
+    ${ARCADIA_ROOT}/contrib/libs/protobuf/src/google/protobuf/message.h
+    ${ARCADIA_ROOT}/contrib/libs/protobuf/src/google/protobuf/metadata_lite.h
+    ${ARCADIA_ROOT}/contrib/libs/protobuf/src/google/protobuf/port_def.inc
+    ${ARCADIA_ROOT}/contrib/libs/protobuf/src/google/protobuf/port_undef.inc
+    ${ARCADIA_ROOT}/contrib/libs/protobuf/src/google/protobuf/repeated_field.h
+    ${ARCADIA_ROOT}/contrib/libs/protobuf/src/google/protobuf/stubs/common.h
+    ${ARCADIA_ROOT}/contrib/libs/protobuf/src/google/protobuf/unknown_field_set.h
+)
diff --git a/contrib/tools/protoc_old/ya.make.prebuilt b/contrib/tools/protoc_old/ya.make.prebuilt
new file mode 100644
index 0000000000..a0677fbf82
--- /dev/null
+++ b/contrib/tools/protoc_old/ya.make.prebuilt
@@ -0,0 +1,20 @@
+SET_RESOURCE_URI_FROM_JSON(SANDBOX_RESOURCE_URI resources.json)
+
+IF (SANDBOX_RESOURCE_URI != "")
+    ENABLE(PREBUILT)
+
+    PREBUILT_PROGRAM()
+
+    DECLARE_EXTERNAL_RESOURCE(PROTOC ${SANDBOX_RESOURCE_URI})
+
+    PRIMARY_OUTPUT(${PROTOC_RESOURCE_GLOBAL}/protoc${MODULE_SUFFIX})
+
+    INCLUDE(ya.make.induced_deps)
+
+    END()
+ELSE()
+    PROGRAM(protoc)
+    SRCS(main.c)
+    INCLUDE(ya.make.induced_deps)
+    END()
+ENDIF()
-- 
cgit v1.2.3


From 0f56c014df758b3128c3bb3738857d51c20a74e5 Mon Sep 17 00:00:00 2001
From: danilalexeev <danilalexeev@yandex-team.com>
Date: Tue, 9 Apr 2024 13:18:33 +0300
Subject: YT-21200: Add segment_id to get_master_consistent_state command
 dd3d1a533e9900b2f6a4779a6f06a6255746c3d7

---
 yt/yt/client/api/admin_client.h            | 10 ++++++++--
 yt/yt/client/api/delegating_client.h       |  2 +-
 yt/yt/client/api/rpc_proxy/client_impl.cpp |  2 +-
 yt/yt/client/api/rpc_proxy/client_impl.h   |  2 +-
 yt/yt/client/driver/admin_commands.cpp     |  7 ++++---
 yt/yt/client/federated/client.cpp          |  2 +-
 yt/yt/client/hedging/hedging.cpp           |  2 +-
 yt/yt/client/unittests/mock/client.h       |  2 +-
 8 files changed, 18 insertions(+), 11 deletions(-)

diff --git a/yt/yt/client/api/admin_client.h b/yt/yt/client/api/admin_client.h
index 1780ad0ab7..8a374df98c 100644
--- a/yt/yt/client/api/admin_client.h
+++ b/yt/yt/client/api/admin_client.h
@@ -158,8 +158,14 @@ struct TResurrectChunkLocationsResult
     std::vector<TGuid> LocationUuids;
 };
 
+struct TMasterConsistentState
+{
+    i64 SequenceNumber;
+    i64 SegmentId;
+};
+
 using TCellIdToSnapshotIdMap = THashMap<NHydra::TCellId, int>;
-using TCellIdToSequenceNumberMap = THashMap<NHydra::TCellId, i64>;
+using TCellIdToConsistentStateMap = THashMap<NHydra::TCellId, TMasterConsistentState>;
 
 struct TAddMaintenanceOptions
     : public TTimeoutOptions
@@ -205,7 +211,7 @@ struct IAdminClient
     virtual TFuture<TCellIdToSnapshotIdMap> BuildMasterSnapshots(
         const TBuildMasterSnapshotsOptions& options = {}) = 0;
 
-    virtual TFuture<TCellIdToSequenceNumberMap> GetMasterConsistentState(
+    virtual TFuture<TCellIdToConsistentStateMap> GetMasterConsistentState(
         const TGetMasterConsistentStateOptions& options = {}) = 0;
 
     virtual TFuture<void> ExitReadOnly(
diff --git a/yt/yt/client/api/delegating_client.h b/yt/yt/client/api/delegating_client.h
index e4d3341492..c5044d846b 100644
--- a/yt/yt/client/api/delegating_client.h
+++ b/yt/yt/client/api/delegating_client.h
@@ -558,7 +558,7 @@ public:
         const TBuildMasterSnapshotsOptions& options),
         (options))
 
-    DELEGATE_METHOD(TFuture<TCellIdToSequenceNumberMap>, GetMasterConsistentState, (
+    DELEGATE_METHOD(TFuture<TCellIdToConsistentStateMap>, GetMasterConsistentState, (
         const TGetMasterConsistentStateOptions& options),
         (options))
 
diff --git a/yt/yt/client/api/rpc_proxy/client_impl.cpp b/yt/yt/client/api/rpc_proxy/client_impl.cpp
index df1d4caada..37d17eacbf 100644
--- a/yt/yt/client/api/rpc_proxy/client_impl.cpp
+++ b/yt/yt/client/api/rpc_proxy/client_impl.cpp
@@ -1647,7 +1647,7 @@ TFuture<TCellIdToSnapshotIdMap> TClient::BuildMasterSnapshots(const TBuildMaster
     ThrowUnimplemented("BuildMasterSnapshots");
 }
 
-TFuture<TCellIdToSequenceNumberMap> TClient::GetMasterConsistentState(const TGetMasterConsistentStateOptions& /*options*/)
+TFuture<TCellIdToConsistentStateMap> TClient::GetMasterConsistentState(const TGetMasterConsistentStateOptions& /*options*/)
 {
     ThrowUnimplemented("GetMasterConsistentState");
 }
diff --git a/yt/yt/client/api/rpc_proxy/client_impl.h b/yt/yt/client/api/rpc_proxy/client_impl.h
index 3c66f30c87..77054ed4e5 100644
--- a/yt/yt/client/api/rpc_proxy/client_impl.h
+++ b/yt/yt/client/api/rpc_proxy/client_impl.h
@@ -323,7 +323,7 @@ public:
     TFuture<TCellIdToSnapshotIdMap> BuildMasterSnapshots(
         const TBuildMasterSnapshotsOptions& options) override;
 
-    TFuture<TCellIdToSequenceNumberMap> GetMasterConsistentState(
+    TFuture<TCellIdToConsistentStateMap> GetMasterConsistentState(
         const TGetMasterConsistentStateOptions& options) override;
 
     TFuture<void> ExitReadOnly(
diff --git a/yt/yt/client/driver/admin_commands.cpp b/yt/yt/client/driver/admin_commands.cpp
index 4586547f11..794e0cb204 100644
--- a/yt/yt/client/driver/admin_commands.cpp
+++ b/yt/yt/client/driver/admin_commands.cpp
@@ -106,15 +106,16 @@ void TGetMasterConsistentStateCommand::Register(TRegistrar /*registrar*/)
 
 void TGetMasterConsistentStateCommand::DoExecute(ICommandContextPtr context)
 {
-    auto cellIdToSequenceNumber = WaitFor(context->GetClient()->GetMasterConsistentState(Options))
+    auto cellIdToConsistentState = WaitFor(context->GetClient()->GetMasterConsistentState(Options))
         .ValueOrThrow();
 
     context->ProduceOutputValue(BuildYsonStringFluently()
-        .DoListFor(cellIdToSequenceNumber, [=] (TFluentList fluent, const auto& pair) {
+        .DoListFor(cellIdToConsistentState, [=] (TFluentList fluent, const auto& pair) {
             fluent
                 .Item().BeginMap()
                     .Item("cell_id").Value(pair.first)
-                    .Item("sequence_number").Value(pair.second)
+                    .Item("sequence_number").Value(pair.second.SequenceNumber)
+                    .Item("segment_id").Value(pair.second.SegmentId)
                 .EndMap();
         }));
 }
diff --git a/yt/yt/client/federated/client.cpp b/yt/yt/client/federated/client.cpp
index 1e43f174a0..fa7407095a 100644
--- a/yt/yt/client/federated/client.cpp
+++ b/yt/yt/client/federated/client.cpp
@@ -386,7 +386,7 @@ public:
     UNIMPLEMENTED_METHOD(TFuture<void>, CheckClusterLiveness, (const TCheckClusterLivenessOptions&));
     UNIMPLEMENTED_METHOD(TFuture<int>, BuildSnapshot, (const TBuildSnapshotOptions&));
     UNIMPLEMENTED_METHOD(TFuture<TCellIdToSnapshotIdMap>, BuildMasterSnapshots, (const TBuildMasterSnapshotsOptions&));
-    UNIMPLEMENTED_METHOD(TFuture<TCellIdToSequenceNumberMap>, GetMasterConsistentState, (const TGetMasterConsistentStateOptions&));
+    UNIMPLEMENTED_METHOD(TFuture<TCellIdToConsistentStateMap>, GetMasterConsistentState, (const TGetMasterConsistentStateOptions&));
     UNIMPLEMENTED_METHOD(TFuture<void>, ExitReadOnly, (NObjectClient::TCellId, const TExitReadOnlyOptions&));
     UNIMPLEMENTED_METHOD(TFuture<void>, MasterExitReadOnly, (const TMasterExitReadOnlyOptions&));
     UNIMPLEMENTED_METHOD(TFuture<void>, DiscombobulateNonvotingPeers, (NObjectClient::TCellId, const TDiscombobulateNonvotingPeersOptions&));
diff --git a/yt/yt/client/hedging/hedging.cpp b/yt/yt/client/hedging/hedging.cpp
index 6d0122b584..0ceb3aab9c 100644
--- a/yt/yt/client/hedging/hedging.cpp
+++ b/yt/yt/client/hedging/hedging.cpp
@@ -173,7 +173,7 @@ public:
     UNSUPPORTED_METHOD(TFuture<void>, CheckClusterLiveness, (const TCheckClusterLivenessOptions&));
     UNSUPPORTED_METHOD(TFuture<int>, BuildSnapshot, (const TBuildSnapshotOptions&));
     UNSUPPORTED_METHOD(TFuture<TCellIdToSnapshotIdMap>, BuildMasterSnapshots, (const TBuildMasterSnapshotsOptions&));
-    UNSUPPORTED_METHOD(TFuture<TCellIdToSequenceNumberMap>, GetMasterConsistentState, (const TGetMasterConsistentStateOptions&));
+    UNSUPPORTED_METHOD(TFuture<TCellIdToConsistentStateMap>, GetMasterConsistentState, (const TGetMasterConsistentStateOptions&));
     UNSUPPORTED_METHOD(TFuture<void>, ExitReadOnly, (NObjectClient::TCellId, const TExitReadOnlyOptions&));
     UNSUPPORTED_METHOD(TFuture<void>, MasterExitReadOnly, (const TMasterExitReadOnlyOptions&));
     UNSUPPORTED_METHOD(TFuture<void>, DiscombobulateNonvotingPeers, (NObjectClient::TCellId, const TDiscombobulateNonvotingPeersOptions&));
diff --git a/yt/yt/client/unittests/mock/client.h b/yt/yt/client/unittests/mock/client.h
index 0ab1250f20..ea199b554e 100644
--- a/yt/yt/client/unittests/mock/client.h
+++ b/yt/yt/client/unittests/mock/client.h
@@ -238,7 +238,7 @@ public:
         const TBuildMasterSnapshotsOptions& options),
         (override));
 
-    MOCK_METHOD(TFuture<TCellIdToSequenceNumberMap>, GetMasterConsistentState, (
+    MOCK_METHOD(TFuture<TCellIdToConsistentStateMap>, GetMasterConsistentState, (
         const TGetMasterConsistentStateOptions& options),
         (override));
 
-- 
cgit v1.2.3


From 69d061541bc434013f5d231ffbc701f6af01fd6e Mon Sep 17 00:00:00 2001
From: robot-piglet <robot-piglet@yandex-team.com>
Date: Wed, 10 Apr 2024 07:23:47 +0300
Subject: Intermediate changes

---
 build/mapping.conf.json           | 2 ++
 yt/yt/RpcProxyProtocolVersion.txt | 2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/build/mapping.conf.json b/build/mapping.conf.json
index ab40627f4d..9935e4a50c 100644
--- a/build/mapping.conf.json
+++ b/build/mapping.conf.json
@@ -111,6 +111,7 @@
         "5599878769": "https://devtools-registry.s3.yandex.net/5599878769",
         "5599877008": "https://devtools-registry.s3.yandex.net/5599877008",
         "5599878473": "https://devtools-registry.s3.yandex.net/5599878473",
+        "5841616607": "https://devtools-registry.s3.yandex.net/5841616607",
         "5786827409": "https://devtools-registry.s3.yandex.net/5786827409",
         "5786826723": "https://devtools-registry.s3.yandex.net/5786826723",
         "5786828167": "https://devtools-registry.s3.yandex.net/5786828167",
@@ -533,6 +534,7 @@
         "5599878769": "contrib/python/black/bin/black for linux",
         "5599877008": "contrib/python/black/bin/black for linux-aarch64",
         "5599878473": "contrib/python/black/bin/black for win32",
+        "5841616607": "contrib/tools/protoc/bin/protoc for linux",
         "5786827409": "contrib/tools/python3/python3 for darwin",
         "5786826723": "contrib/tools/python3/python3 for darwin-arm64",
         "5786828167": "contrib/tools/python3/python3 for linux",
diff --git a/yt/yt/RpcProxyProtocolVersion.txt b/yt/yt/RpcProxyProtocolVersion.txt
index 0e120bc485..11c57e2d37 100644
--- a/yt/yt/RpcProxyProtocolVersion.txt
+++ b/yt/yt/RpcProxyProtocolVersion.txt
@@ -19,7 +19,7 @@ SET(YT_RPC_MODIFY_ROWS_STRONG_LOCKS_VERSION 2)
 SET(YT_RPC_PYTHON_BINDINGS_PATCH_VERSION 18)
 
 # YT proto package has protocol version plus some patch version
-SET(YT_PROTO_PACKAGE_PATCH_VERSION 13)
+SET(YT_PROTO_PACKAGE_PATCH_VERSION 14)
 
 SET(YT_RPC_PROXY_PROTOCOL_VERSION "${YT_RPC_PROXY_PROTOCOL_VERSION_MAJOR}.${YT_RPC_PROXY_SERVER_PROTOCOL_VERSION_MINOR}")
 SET(YT_RPC_PYTHON_BINDINGS_VERSION "${YT_RPC_PROXY_PROTOCOL_VERSION}.${YT_RPC_PYTHON_BINDINGS_PATCH_VERSION}")
-- 
cgit v1.2.3


From 258f20d9a5d3556791dba211f871087f8a45b49e Mon Sep 17 00:00:00 2001
From: spreis <spreis@yandex-team.com>
Date: Wed, 10 Apr 2024 07:25:47 +0300
Subject: Make build PY3_LIBRARY cb9cbc829b52a8e064b3a67202396cb7b7523eba

---
 build/ymake_conf.py | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/build/ymake_conf.py b/build/ymake_conf.py
index df21e7d47a..1d0dcc2647 100755
--- a/build/ymake_conf.py
+++ b/build/ymake_conf.py
@@ -18,6 +18,8 @@ import tempfile
 
 import six
 
+from functools import total_ordering
+
 logger = logging.getLogger(__name__ if __name__ != '__main__' else 'ymake_conf.py')
 
 
@@ -82,6 +84,7 @@ class ConfigureError(Exception):
     pass
 
 
+@total_ordering
 class Platform(object):
     def __init__(self, name, os, arch):
         """
@@ -273,8 +276,8 @@ class Platform(object):
     def __eq__(self, other):
         return (self.name, self.os, self.arch) == (other.name, other.os, other.arch)
 
-    def __cmp__(self, other):
-        return cmp((self.name, self.os, self.arch), (other.name, other.os, other.arch))
+    def __lt__(self, other):
+        return (self.name, self.os, self.arch) < (other.name, other.os, other.arch)
 
     def __hash__(self):
         return hash((self.name, self.os, self.arch))
@@ -2406,7 +2409,7 @@ class Cuda(object):
             return False
 
         if host != target:
-            if not(host.is_linux_x86_64 and target.is_linux_armv8):
+            if not (host.is_linux_x86_64 and target.is_linux_armv8):
                 return False
             if not self.cuda_version.from_user:
                 return False
-- 
cgit v1.2.3


From 7315e46140303b2c46734ecb21ce5a9bd8e2e1d5 Mon Sep 17 00:00:00 2001
From: spreis <spreis@yandex-team.com>
Date: Wed, 10 Apr 2024 07:27:21 +0300
Subject: =?UTF-8?q?Make=20PY23=5FNATIVE=5FLIBRARY=20=D0=A1++=20(as=20it=20?=
 =?UTF-8?q?is)=20d463ca4e38a8e80051374b7cfe8b017ad224b768?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 build/conf/python.conf | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/build/conf/python.conf b/build/conf/python.conf
index 2df0e3e47e..a6a1719565 100644
--- a/build/conf/python.conf
+++ b/build/conf/python.conf
@@ -1037,7 +1037,7 @@ multimodule PY23_NATIVE_LIBRARY {
         .RESTRICTED=PY_SRCS USE_PYTHON2 USE_PYTHON3 PYTHON3_ADDINCL RUN_ANTLR4_PYTHON
         OBJ_SUF=.py2
         PYTHON2_ADDINCL()
-        SET(MODULE_LANG PY2)
+        SET(MODULE_LANG CPP)
     }
     module PY3: LIBRARY {
         .RESTRICTED=PY_SRCS USE_PYTHON2 USE_PYTHON3 RUN_ANTLR4_PYTHON
@@ -1045,7 +1045,7 @@ multimodule PY23_NATIVE_LIBRARY {
         .SEM=CPP_LIBRARY_SEM
         .GLOBAL_SEM=CPP_OBJ_LIBRARY_SEM
         PYTHON3_ADDINCL()
-        SET(MODULE_LANG PY3)
+        SET(MODULE_LANG CPP)
         when ($MSVC == "yes" || $CYGWIN == "yes") {
             MODULE_PREFIX=py3c
         }
-- 
cgit v1.2.3


From 41adc785d836315f9f0d47549c81bd5802a885c9 Mon Sep 17 00:00:00 2001
From: spreis <spreis@yandex-team.com>
Date: Wed, 10 Apr 2024 07:27:27 +0300
Subject: Allow PY3MODULE in package/union
 fa8b193757740ed87810be6d105c8bf036c2137c

---
 build/ymake.core.conf | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/build/ymake.core.conf b/build/ymake.core.conf
index 18b7851a4f..98cd9889fb 100644
--- a/build/ymake.core.conf
+++ b/build/ymake.core.conf
@@ -2391,7 +2391,7 @@ multimodule PACKAGE {
         .USE_PEERS_LATE_OUTS=yes
         .PEERDIR_POLICY=as_build_from
         .FINAL_TARGET=yes
-        SET(PEERDIR_TAGS CPP_PROTO CPP_FBS PY2 PY3 PY2_NATIVE YQL_UDF_SHARED __EMPTY__ RESOURCE_LIB DOCSBOOK JAR_RUNNABLE PY3_BIN PY3TEST_PROGRAM DLL GO_PROGRAM PACKAGE_UNION)
+        SET(PEERDIR_TAGS CPP_PROTO CPP_FBS PY2 PY3 PY2_NATIVE PY3_NATIVE YQL_UDF_SHARED __EMPTY__ RESOURCE_LIB DOCSBOOK JAR_RUNNABLE PY3_BIN PY3TEST_PROGRAM DLL GO_PROGRAM PACKAGE_UNION)
 
         SET(MODULE_SUFFIX .final.pkg.fake)
         SET(DONT_RESOLVE_INCLUDES yes)
@@ -2409,7 +2409,7 @@ multimodule PACKAGE {
         .IGNORED=VCS_INFO_FILE
 
         SET(MODULE_SUFFIX .pkg.fake)
-        SET(PEERDIR_TAGS CPP_PROTO CPP_FBS PY2 PY3 PY2_NATIVE YQL_UDF_SHARED __EMPTY__ RESOURCE_LIB DOCSBOOK JAR_RUNNABLE PY3_BIN PY3TEST_PROGRAM DLL GO_PROGRAM PACKAGE_UNION)
+        SET(PEERDIR_TAGS CPP_PROTO CPP_FBS PY2 PY3 PY2_NATIVE PY3_NATIVE YQL_UDF_SHARED __EMPTY__ RESOURCE_LIB DOCSBOOK JAR_RUNNABLE PY3_BIN PY3TEST_PROGRAM DLL GO_PROGRAM PACKAGE_UNION)
 
         DISABLE(START_TARGET)
         SET(_COPY_FILE_CONTEXT TEXT)
@@ -2456,7 +2456,7 @@ module UNION: _BASE_UNIT {
     SET(MODULE_SUFFIX .pkg.fake)
     SET(DONT_RESOLVE_INCLUDES yes)
     SET(NEED_PLATFORM_PEERDIRS no)
-    PEERDIR_TAGS=CPP_PROTO CPP_FBS PY2 PY2_NATIVE YQL_UDF_SHARED __EMPTY__ RESOURCE_LIB DOCSBOOK JAR_RUNNABLE PY3_BIN DLL PACKAGE_UNION
+    PEERDIR_TAGS=CPP_PROTO CPP_FBS PY2 PY2_NATIVE PY3_NATIVE YQL_UDF_SHARED __EMPTY__ RESOURCE_LIB DOCSBOOK JAR_RUNNABLE PY3_BIN DLL PACKAGE_UNION
 
     UNION_OUTS=${hide;late_out:AUTO_INPUT}
     when ($_UNION_EXPLICIT_OUTPUTS) {
-- 
cgit v1.2.3


From 20060e3d90d25b8098c71d85724212bffa068a2f Mon Sep 17 00:00:00 2001
From: don-dron <don-dron@yandex-team.com>
Date: Wed, 10 Apr 2024 09:07:43 +0300
Subject: YT-21428: Fixes after review f3a774faae3081b27bbf521b87eed915e53b706d

---
 yt/yt/client/table_client/adapters.cpp | 2 +-
 yt/yt/client/table_client/adapters.h   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/yt/yt/client/table_client/adapters.cpp b/yt/yt/client/table_client/adapters.cpp
index c64915f9d6..ef72ce1216 100644
--- a/yt/yt/client/table_client/adapters.cpp
+++ b/yt/yt/client/table_client/adapters.cpp
@@ -151,7 +151,7 @@ void PipeReaderToWriter(
             }
         } catch (const std::exception& ex) {
             if (options.ReaderErrorWrapper) {
-                THROW_ERROR(options.ReaderErrorWrapper(ex));
+                THROW_ERROR options.ReaderErrorWrapper(ex);
             } else {
                 throw;
             }
diff --git a/yt/yt/client/table_client/adapters.h b/yt/yt/client/table_client/adapters.h
index bbb568582b..70b51c110c 100644
--- a/yt/yt/client/table_client/adapters.h
+++ b/yt/yt/client/table_client/adapters.h
@@ -27,7 +27,7 @@ struct TPipeReaderToWriterOptions
     i64 BufferDataWeight = 16_MB;
     bool ValidateValues = false;
     NConcurrency::IThroughputThrottlerPtr Throttler;
-    std::function<TError(const TError& readerError)> ReaderErrorWrapper;
+    std::function<TError(TError readerError)> ReaderErrorWrapper;
     // Used only for testing.
     TDuration PipeDelay;
 };
-- 
cgit v1.2.3


From 446c5b32bc17a4ccab35973a9b8fb25291bf731e Mon Sep 17 00:00:00 2001
From: babenko <babenko@yandex-team.com>
Date: Wed, 10 Apr 2024 09:23:00 +0300
Subject: Refactor id hashing in Sequoia tables
 965a51fcb8258ba51ab6700ea18decc413a9a463

---
 yt/yt/client/table_client/schema.cpp           | 5 +++++
 yt/yt/client/table_client/schema.h             | 4 ++++
 yt/yt/client/tablet_client/table_mount_cache.h | 2 ++
 3 files changed, 11 insertions(+)

diff --git a/yt/yt/client/table_client/schema.cpp b/yt/yt/client/table_client/schema.cpp
index 672cb8a520..26b11be183 100644
--- a/yt/yt/client/table_client/schema.cpp
+++ b/yt/yt/client/table_client/schema.cpp
@@ -1028,6 +1028,11 @@ TTableSchemaPtr TTableSchema::ToDelete() const
     return ToLookup();
 }
 
+TTableSchemaPtr TTableSchema::ToLock() const
+{
+    return ToLookup();
+}
+
 TTableSchemaPtr TTableSchema::ToKeys() const
 {
     if (!ColumnInfo_) {
diff --git a/yt/yt/client/table_client/schema.h b/yt/yt/client/table_client/schema.h
index a556a0637d..c425f244a2 100644
--- a/yt/yt/client/table_client/schema.h
+++ b/yt/yt/client/table_client/schema.h
@@ -342,6 +342,10 @@ public:
     //! For ordered tables, returns an empty schema.
     TTableSchemaPtr ToDelete() const;
 
+    //! For sorted tables, returns the non-computed key columns.
+    //! For ordered tables, returns an empty schema.
+    TTableSchemaPtr ToLock() const;
+
     //! Returns just the key columns.
     TTableSchemaPtr ToKeys() const;
 
diff --git a/yt/yt/client/tablet_client/table_mount_cache.h b/yt/yt/client/tablet_client/table_mount_cache.h
index f12eba4a07..d9efe1929f 100644
--- a/yt/yt/client/tablet_client/table_mount_cache.h
+++ b/yt/yt/client/tablet_client/table_mount_cache.h
@@ -84,6 +84,8 @@ DEFINE_ENUM(ETableSchemaKind,
     (VersionedWrite)
     // Schema used for looking up rows.
     (Lookup)
+    // Schema used for locking rows.
+    (Lock)
     // For sorted schemas, coincides with primary.
     // For ordered, contains an additional tablet index columns.
     (PrimaryWithTabletIndex)
-- 
cgit v1.2.3


From 1e986085fe84d3e9e16751d6bc590edba8b50b23 Mon Sep 17 00:00:00 2001
From: gous32 <gous32@yandex-team.com>
Date: Wed, 10 Apr 2024 09:48:27 +0300
Subject: DebugPrint for THttpServerOptions
 ddffb1ebbc56036902fc8b93aac08ff45a8ef547

---
 library/cpp/http/server/options.cpp | 16 ++++++++++++++++
 library/cpp/http/server/options.h   |  4 ++++
 2 files changed, 20 insertions(+)

diff --git a/library/cpp/http/server/options.cpp b/library/cpp/http/server/options.cpp
index 05c954384a..5f10c42b8a 100644
--- a/library/cpp/http/server/options.cpp
+++ b/library/cpp/http/server/options.cpp
@@ -1,5 +1,6 @@
 #include "options.h"
 
+#include <util/stream/output.h>
 #include <util/string/cast.h>
 #include <util/digest/numeric.h>
 #include <util/network/ip.h>
@@ -41,3 +42,18 @@ void THttpServerOptions::BindAddresses(TBindAddresses& ret) const {
         ret.push_back(Host ? TNetworkAddress(Host, Port) : TNetworkAddress(Port));
     }
 }
+
+void THttpServerOptions::DebugPrint(IOutputStream& stream) const noexcept {
+    stream << "Port: " << Port << "\n";
+    stream << "Host: " << Host << "\n";
+    stream << "KeepAliveEnabled: " << KeepAliveEnabled << "\n";
+    stream << "CompressionEnabled: " << CompressionEnabled << "\n";
+    stream << "nThreads: " << nThreads << "\n";
+    stream << "nListenerThreads: " << nListenerThreads << "\n";
+    stream << "MaxQueueSize: " << MaxQueueSize << "\n";
+    stream << "nFThreads: " << nFThreads << "\n";
+    stream << "MaxFQueueSize: " << MaxFQueueSize << "\n";
+    stream << "MaxConnections: " << MaxConnections << "\n";
+    stream << "MaxRequestsPerConnection: " << MaxRequestsPerConnection << "\n";
+    stream << "ClientTimeout(ms): " << ClientTimeout.MilliSeconds() << "\n";
+}
diff --git a/library/cpp/http/server/options.h b/library/cpp/http/server/options.h
index cacd7ebeda..f03bd5250e 100644
--- a/library/cpp/http/server/options.h
+++ b/library/cpp/http/server/options.h
@@ -8,6 +8,8 @@
 #include <util/generic/vector.h>
 #include <util/datetime/base.h>
 
+class IOutputStream;
+
 class THttpServerOptions {
 public:
     inline THttpServerOptions(ui16 port = 17000) noexcept
@@ -151,6 +153,8 @@ public:
         return *this;
     }
 
+    void DebugPrint(IOutputStream& stream) const noexcept;
+
     struct TAddr {
         TString Addr;
         ui16 Port;
-- 
cgit v1.2.3


From e6da679c7da3c051eea421143d20114cb64c9c55 Mon Sep 17 00:00:00 2001
From: robot-piglet <robot-piglet@yandex-team.com>
Date: Wed, 10 Apr 2024 11:17:20 +0300
Subject: Intermediate changes

---
 .../python/pyasn1-modules/py3/.dist-info/METADATA  |  13 +--
 .../pyasn1-modules/py3/pyasn1_modules/__init__.py  |   2 +-
 .../pyasn1-modules/py3/pyasn1_modules/pem.py       |  11 +-
 contrib/python/pyasn1-modules/py3/ya.make          |   2 +-
 contrib/python/pyasn1/py3/.dist-info/METADATA      |  10 +-
 contrib/python/pyasn1/py3/README.md                |   2 +-
 contrib/python/pyasn1/py3/pyasn1/__init__.py       |   2 +-
 .../python/pyasn1/py3/pyasn1/codec/ber/decoder.py  |  51 ++++++++
 .../python/pyasn1/py3/pyasn1/codec/ber/encoder.py  |  35 ++++++
 .../pyasn1/py3/pyasn1/codec/native/decoder.py      |   3 +
 .../pyasn1/py3/pyasn1/codec/native/encoder.py      |   8 +-
 contrib/python/pyasn1/py3/pyasn1/type/univ.py      | 128 +++++++++++++++++++++
 .../pyasn1/py3/tests/codec/ber/test_decoder.py     |  74 +++++++++++-
 .../pyasn1/py3/tests/codec/ber/test_encoder.py     |  31 +++++
 contrib/python/pyasn1/py3/tests/type/test_univ.py  |  77 +++++++++++++
 contrib/python/pyasn1/py3/ya.make                  |   2 +-
 16 files changed, 418 insertions(+), 33 deletions(-)

diff --git a/contrib/python/pyasn1-modules/py3/.dist-info/METADATA b/contrib/python/pyasn1-modules/py3/.dist-info/METADATA
index 34a82a084a..7216c756f7 100644
--- a/contrib/python/pyasn1-modules/py3/.dist-info/METADATA
+++ b/contrib/python/pyasn1-modules/py3/.dist-info/METADATA
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
-Name: pyasn1-modules
-Version: 0.3.0
+Name: pyasn1_modules
+Version: 0.4.0
 Summary: A collection of ASN.1-based protocols modules
 Home-page: https://github.com/pyasn1/pyasn1-modules
 Author: Ilya Etingof
@@ -22,23 +22,20 @@ Classifier: Intended Audience :: Telecommunications Industry
 Classifier: License :: OSI Approved :: BSD License
 Classifier: Natural Language :: English
 Classifier: Operating System :: OS Independent
-Classifier: Programming Language :: Python :: 2
-Classifier: Programming Language :: Python :: 2.7
 Classifier: Programming Language :: Python :: 3
-Classifier: Programming Language :: Python :: 3.6
-Classifier: Programming Language :: Python :: 3.7
 Classifier: Programming Language :: Python :: 3.8
 Classifier: Programming Language :: Python :: 3.9
 Classifier: Programming Language :: Python :: 3.10
 Classifier: Programming Language :: Python :: 3.11
+Classifier: Programming Language :: Python :: 3.12
 Classifier: Programming Language :: Python :: Implementation :: CPython
 Classifier: Programming Language :: Python :: Implementation :: PyPy
 Classifier: Topic :: Communications
 Classifier: Topic :: Software Development :: Libraries :: Python Modules
-Requires-Python: !=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,>=2.7
+Requires-Python: >=3.8
 Description-Content-Type: text/markdown
 License-File: LICENSE.txt
-Requires-Dist: pyasn1 (<0.6.0,>=0.4.6)
+Requires-Dist: pyasn1 <0.7.0,>=0.4.6
 
 
 ASN.1 modules for Python
diff --git a/contrib/python/pyasn1-modules/py3/pyasn1_modules/__init__.py b/contrib/python/pyasn1-modules/py3/pyasn1_modules/__init__.py
index 95a220efd2..633dc1a0a2 100644
--- a/contrib/python/pyasn1-modules/py3/pyasn1_modules/__init__.py
+++ b/contrib/python/pyasn1-modules/py3/pyasn1_modules/__init__.py
@@ -1,2 +1,2 @@
 # http://www.python.org/dev/peps/pep-0396/
-__version__ = '0.3.0'
+__version__ = '0.4.0'
diff --git a/contrib/python/pyasn1-modules/py3/pyasn1_modules/pem.py b/contrib/python/pyasn1-modules/py3/pyasn1_modules/pem.py
index f7c80a9b9d..29235ab5cf 100644
--- a/contrib/python/pyasn1-modules/py3/pyasn1_modules/pem.py
+++ b/contrib/python/pyasn1-modules/py3/pyasn1_modules/pem.py
@@ -5,7 +5,6 @@
 # License: http://snmplabs.com/pyasn1/license.html
 #
 import base64
-import sys
 
 stSpam, stHam, stDump = 0, 1, 2
 
@@ -38,10 +37,7 @@ def readPemBlocksFromFile(fileObj, *markers):
             else:
                 certLines.append(certLine)
         if state == stDump:
-            if sys.version_info[0] <= 2:
-                substrate = ''.join([base64.b64decode(x) for x in certLines])
-            else:
-                substrate = ''.encode().join([base64.b64decode(x.encode()) for x in certLines])
+            substrate = ''.encode().join([base64.b64decode(x.encode()) for x in certLines])
             break
     return idx, substrate
 
@@ -55,10 +51,7 @@ def readPemFromFile(fileObj,
 
 
 def readBase64fromText(text):
-    if sys.version_info[0] <= 2:
-        return base64.b64decode(text)
-    else:
-        return base64.b64decode(text.encode())
+    return base64.b64decode(text.encode())
 
 
 def readBase64FromFile(fileObj):
diff --git a/contrib/python/pyasn1-modules/py3/ya.make b/contrib/python/pyasn1-modules/py3/ya.make
index 6f5441d5d8..626837de1b 100644
--- a/contrib/python/pyasn1-modules/py3/ya.make
+++ b/contrib/python/pyasn1-modules/py3/ya.make
@@ -2,7 +2,7 @@
 
 PY3_LIBRARY()
 
-VERSION(0.3.0)
+VERSION(0.4.0)
 
 LICENSE(BSD-2-Clause)
 
diff --git a/contrib/python/pyasn1/py3/.dist-info/METADATA b/contrib/python/pyasn1/py3/.dist-info/METADATA
index 1a6727cecc..10bf60c633 100644
--- a/contrib/python/pyasn1/py3/.dist-info/METADATA
+++ b/contrib/python/pyasn1/py3/.dist-info/METADATA
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: pyasn1
-Version: 0.5.1
+Version: 0.6.0
 Summary: Pure-Python implementation of ASN.1 types and DER/BER/CER codecs (X.208)
 Home-page: https://github.com/pyasn1/pyasn1
 Author: Ilya Etingof
@@ -23,11 +23,7 @@ Classifier: Intended Audience :: Telecommunications Industry
 Classifier: License :: OSI Approved :: BSD License
 Classifier: Natural Language :: English
 Classifier: Operating System :: OS Independent
-Classifier: Programming Language :: Python :: 2
-Classifier: Programming Language :: Python :: 2.7
 Classifier: Programming Language :: Python :: 3
-Classifier: Programming Language :: Python :: 3.6
-Classifier: Programming Language :: Python :: 3.7
 Classifier: Programming Language :: Python :: 3.8
 Classifier: Programming Language :: Python :: 3.9
 Classifier: Programming Language :: Python :: 3.10
@@ -37,7 +33,7 @@ Classifier: Programming Language :: Python :: Implementation :: CPython
 Classifier: Programming Language :: Python :: Implementation :: PyPy
 Classifier: Topic :: Communications
 Classifier: Topic :: Software Development :: Libraries :: Python Modules
-Requires-Python: !=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,>=2.7
+Requires-Python: >=3.8
 Description-Content-Type: text/markdown
 License-File: LICENSE.rst
 
@@ -66,7 +62,7 @@ Features
 * Standards compliant BER/CER/DER codecs
 * Can operate on streams of serialized data
 * Dumps/loads ASN.1 structures from Python types
-* 100% Python, works with Python 2.7 and 3.6+
+* 100% Python, works with Python 3.8+
 * MT-safe
 * Contributed ASN.1 compiler [Asn1ate](https://github.com/kimgr/asn1ate)
 
diff --git a/contrib/python/pyasn1/py3/README.md b/contrib/python/pyasn1/py3/README.md
index e1f9501b49..669463392f 100644
--- a/contrib/python/pyasn1/py3/README.md
+++ b/contrib/python/pyasn1/py3/README.md
@@ -23,7 +23,7 @@ Features
 * Standards compliant BER/CER/DER codecs
 * Can operate on streams of serialized data
 * Dumps/loads ASN.1 structures from Python types
-* 100% Python, works with Python 2.7 and 3.6+
+* 100% Python, works with Python 3.8+
 * MT-safe
 * Contributed ASN.1 compiler [Asn1ate](https://github.com/kimgr/asn1ate)
 
diff --git a/contrib/python/pyasn1/py3/pyasn1/__init__.py b/contrib/python/pyasn1/py3/pyasn1/__init__.py
index 73d47f3424..41a89c18d9 100644
--- a/contrib/python/pyasn1/py3/pyasn1/__init__.py
+++ b/contrib/python/pyasn1/py3/pyasn1/__init__.py
@@ -1,2 +1,2 @@
 # https://www.python.org/dev/peps/pep-0396/
-__version__ = '0.5.1'
+__version__ = '0.6.0'
diff --git a/contrib/python/pyasn1/py3/pyasn1/codec/ber/decoder.py b/contrib/python/pyasn1/py3/pyasn1/codec/ber/decoder.py
index 7cc863d1c7..fd80fc8eb2 100644
--- a/contrib/python/pyasn1/py3/pyasn1/codec/ber/decoder.py
+++ b/contrib/python/pyasn1/py3/pyasn1/codec/ber/decoder.py
@@ -460,6 +460,56 @@ class ObjectIdentifierPayloadDecoder(AbstractSimplePayloadDecoder):
         yield self._createComponent(asn1Spec, tagSet, oid, **options)
 
 
+class RelativeOIDPayloadDecoder(AbstractSimplePayloadDecoder):
+    protoComponent = univ.RelativeOID(())
+
+    def valueDecoder(self, substrate, asn1Spec,
+                     tagSet=None, length=None, state=None,
+                     decodeFun=None, substrateFun=None,
+                     **options):
+        if tagSet[0].tagFormat != tag.tagFormatSimple:
+            raise error.PyAsn1Error('Simple tag format expected')
+
+        for chunk in readFromStream(substrate, length, options):
+            if isinstance(chunk, SubstrateUnderrunError):
+                yield chunk
+
+        if not chunk:
+            raise error.PyAsn1Error('Empty substrate')
+
+        chunk = octs2ints(chunk)
+
+        reloid = ()
+        index = 0
+        substrateLen = len(chunk)
+        while index < substrateLen:
+            subId = chunk[index]
+            index += 1
+            if subId < 128:
+                reloid += (subId,)
+            elif subId > 128:
+                # Construct subid from a number of octets
+                nextSubId = subId
+                subId = 0
+                while nextSubId >= 128:
+                    subId = (subId << 7) + (nextSubId & 0x7F)
+                    if index >= substrateLen:
+                        raise error.SubstrateUnderrunError(
+                            'Short substrate for sub-OID past %s' % (reloid,)
+                        )
+                    nextSubId = chunk[index]
+                    index += 1
+                reloid += ((subId << 7) + nextSubId,)
+            elif subId == 128:
+                # ASN.1 spec forbids leading zeros (0x80) in OID
+                # encoding, tolerating it opens a vulnerability. See
+                # https://www.esat.kuleuven.be/cosic/publications/article-1432.pdf
+                # page 7
+                raise error.PyAsn1Error('Invalid octet 0x80 in RELATIVE-OID encoding')
+
+        yield self._createComponent(asn1Spec, tagSet, reloid, **options)
+
+
 class RealPayloadDecoder(AbstractSimplePayloadDecoder):
     protoComponent = univ.Real()
 
@@ -1421,6 +1471,7 @@ TAG_MAP = {
     univ.OctetString.tagSet: OctetStringPayloadDecoder(),
     univ.Null.tagSet: NullPayloadDecoder(),
     univ.ObjectIdentifier.tagSet: ObjectIdentifierPayloadDecoder(),
+    univ.RelativeOID.tagSet: RelativeOIDPayloadDecoder(),
     univ.Enumerated.tagSet: IntegerPayloadDecoder(),
     univ.Real.tagSet: RealPayloadDecoder(),
     univ.Sequence.tagSet: SequenceOrSequenceOfPayloadDecoder(),  # conflicts with SequenceOf
diff --git a/contrib/python/pyasn1/py3/pyasn1/codec/ber/encoder.py b/contrib/python/pyasn1/py3/pyasn1/codec/ber/encoder.py
index c59b43e455..7cc758ff2b 100644
--- a/contrib/python/pyasn1/py3/pyasn1/codec/ber/encoder.py
+++ b/contrib/python/pyasn1/py3/pyasn1/codec/ber/encoder.py
@@ -353,6 +353,39 @@ class ObjectIdentifierEncoder(AbstractItemEncoder):
         return octets, False, False
 
 
+class RelativeOIDEncoder(AbstractItemEncoder):
+    supportIndefLenMode = False
+
+    def encodeValue(self, value, asn1Spec, encodeFun, **options):
+        if asn1Spec is not None:
+            value = asn1Spec.clone(value)
+
+        octets = ()
+
+        # Cycle through subIds
+        for subOid in value.asTuple():
+            if 0 <= subOid <= 127:
+                # Optimize for the common case
+                octets += (subOid,)
+
+            elif subOid > 127:
+                # Pack large Sub-Object IDs
+                res = (subOid & 0x7f,)
+                subOid >>= 7
+
+                while subOid:
+                    res = (0x80 | (subOid & 0x7f),) + res
+                    subOid >>= 7
+
+                # Add packed Sub-Object ID to resulted RELATIVE-OID
+                octets += res
+
+            else:
+                raise error.PyAsn1Error('Negative RELATIVE-OID arc %s at %s' % (subOid, value))
+
+        return octets, False, False
+
+
 class RealEncoder(AbstractItemEncoder):
     supportIndefLenMode = False
     binEncBase = 2  # set to None to choose encoding base automatically
@@ -715,6 +748,7 @@ TAG_MAP = {
     univ.OctetString.tagSet: OctetStringEncoder(),
     univ.Null.tagSet: NullEncoder(),
     univ.ObjectIdentifier.tagSet: ObjectIdentifierEncoder(),
+    univ.RelativeOID.tagSet: RelativeOIDEncoder(),
     univ.Enumerated.tagSet: IntegerEncoder(),
     univ.Real.tagSet: RealEncoder(),
     # Sequence & Set have same tags as SequenceOf & SetOf
@@ -747,6 +781,7 @@ TYPE_MAP = {
     univ.OctetString.typeId: OctetStringEncoder(),
     univ.Null.typeId: NullEncoder(),
     univ.ObjectIdentifier.typeId: ObjectIdentifierEncoder(),
+    univ.RelativeOID.typeId: RelativeOIDEncoder(),
     univ.Enumerated.typeId: IntegerEncoder(),
     univ.Real.typeId: RealEncoder(),
     # Sequence & Set have same tags as SequenceOf & SetOf
diff --git a/contrib/python/pyasn1/py3/pyasn1/codec/native/decoder.py b/contrib/python/pyasn1/py3/pyasn1/codec/native/decoder.py
index e23f40ca4b..a63bfce9b3 100644
--- a/contrib/python/pyasn1/py3/pyasn1/codec/native/decoder.py
+++ b/contrib/python/pyasn1/py3/pyasn1/codec/native/decoder.py
@@ -72,6 +72,7 @@ TAG_MAP = {
     univ.OctetString.tagSet: AbstractScalarPayloadDecoder(),
     univ.Null.tagSet: AbstractScalarPayloadDecoder(),
     univ.ObjectIdentifier.tagSet: AbstractScalarPayloadDecoder(),
+    univ.RelativeOID.tagSet: AbstractScalarPayloadDecoder(),
     univ.Enumerated.tagSet: AbstractScalarPayloadDecoder(),
     univ.Real.tagSet: AbstractScalarPayloadDecoder(),
     univ.Sequence.tagSet: SequenceOrSetPayloadDecoder(),  # conflicts with SequenceOf
@@ -103,6 +104,7 @@ TYPE_MAP = {
     univ.OctetString.typeId: AbstractScalarPayloadDecoder(),
     univ.Null.typeId: AbstractScalarPayloadDecoder(),
     univ.ObjectIdentifier.typeId: AbstractScalarPayloadDecoder(),
+    univ.RelativeOID.typeId: AbstractScalarPayloadDecoder(),
     univ.Enumerated.typeId: AbstractScalarPayloadDecoder(),
     univ.Real.typeId: AbstractScalarPayloadDecoder(),
     # ambiguous base types
@@ -130,6 +132,7 @@ TYPE_MAP = {
     useful.UTCTime.typeId: AbstractScalarPayloadDecoder()
 }
 
+
 # deprecated aliases, https://github.com/pyasn1/pyasn1/issues/9
 tagMap = TAG_MAP
 typeMap = TYPE_MAP
diff --git a/contrib/python/pyasn1/py3/pyasn1/codec/native/encoder.py b/contrib/python/pyasn1/py3/pyasn1/codec/native/encoder.py
index a0d9f1c444..421815e806 100644
--- a/contrib/python/pyasn1/py3/pyasn1/codec/native/encoder.py
+++ b/contrib/python/pyasn1/py3/pyasn1/codec/native/encoder.py
@@ -60,6 +60,11 @@ class ObjectIdentifierEncoder(AbstractItemEncoder):
         return str(value)
 
 
+class RelativeOIDEncoder(AbstractItemEncoder):
+    def encode(self, value, encodeFun, **options):
+        return str(value)
+
+
 class RealEncoder(AbstractItemEncoder):
     def encode(self, value, encodeFun, **options):
         return float(value)
@@ -111,6 +116,7 @@ TAG_MAP = {
     univ.OctetString.tagSet: OctetStringEncoder(),
     univ.Null.tagSet: NullEncoder(),
     univ.ObjectIdentifier.tagSet: ObjectIdentifierEncoder(),
+    univ.RelativeOID.tagSet: RelativeOIDEncoder(),
     univ.Enumerated.tagSet: IntegerEncoder(),
     univ.Real.tagSet: RealEncoder(),
     # Sequence & Set have same tags as SequenceOf & SetOf
@@ -135,7 +141,6 @@ TAG_MAP = {
     useful.UTCTime.tagSet: OctetStringEncoder()
 }
 
-
 # Put in ambiguous & non-ambiguous types for faster codec lookup
 TYPE_MAP = {
     univ.Boolean.typeId: BooleanEncoder(),
@@ -144,6 +149,7 @@ TYPE_MAP = {
     univ.OctetString.typeId: OctetStringEncoder(),
     univ.Null.typeId: NullEncoder(),
     univ.ObjectIdentifier.typeId: ObjectIdentifierEncoder(),
+    univ.RelativeOID.typeId: RelativeOIDEncoder(),
     univ.Enumerated.typeId: IntegerEncoder(),
     univ.Real.typeId: RealEncoder(),
     # Sequence & Set have same tags as SequenceOf & SetOf
diff --git a/contrib/python/pyasn1/py3/pyasn1/type/univ.py b/contrib/python/pyasn1/py3/pyasn1/type/univ.py
index c5d0778096..28e32bd9d0 100644
--- a/contrib/python/pyasn1/py3/pyasn1/type/univ.py
+++ b/contrib/python/pyasn1/py3/pyasn1/type/univ.py
@@ -1244,6 +1244,134 @@ class ObjectIdentifier(base.SimpleAsn1Type):
         return '.'.join([str(x) for x in value])
 
 
+class RelativeOID(base.SimpleAsn1Type):
+    """Create |ASN.1| schema or value object.
+    |ASN.1| class is based on :class:`~pyasn1.type.base.SimpleAsn1Type`, its
+    objects are immutable and duck-type Python :class:`tuple` objects
+    (tuple of non-negative integers).
+    Keyword Args
+    ------------
+    value: :class:`tuple`, :class:`str` or |ASN.1| object
+        Python sequence of :class:`int` or :class:`str` literal or |ASN.1| object.
+        If `value` is not given, schema object will be created.
+    tagSet: :py:class:`~pyasn1.type.tag.TagSet`
+        Object representing non-default ASN.1 tag(s)
+    subtypeSpec: :py:class:`~pyasn1.type.constraint.ConstraintsIntersection`
+        Object representing non-default ASN.1 subtype constraint(s). Constraints
+        verification for |ASN.1| type occurs automatically on object
+        instantiation.
+    Raises
+    ------
+    ~pyasn1.error.ValueConstraintError, ~pyasn1.error.PyAsn1Error
+        On constraint violation or bad initializer.
+    Examples
+    --------
+    .. code-block:: python
+        class RelOID(RelativeOID):
+            '''
+            ASN.1 specification:
+            id-pad-null RELATIVE-OID ::= { 0 }
+            id-pad-once RELATIVE-OID ::= { 5 6 }
+            id-pad-twice RELATIVE-OID ::= { 5 6 7 }
+            '''
+        id_pad_null = RelOID('0')
+        id_pad_once = RelOID('5.6')
+        id_pad_twice = id_pad_once + (7,)
+    """
+    #: Set (on class, not on instance) or return a
+    #: :py:class:`~pyasn1.type.tag.TagSet` object representing ASN.1 tag(s)
+    #: associated with |ASN.1| type.
+    tagSet = tag.initTagSet(
+        tag.Tag(tag.tagClassUniversal, tag.tagFormatSimple, 0x0d)
+    )
+
+    #: Set (on class, not on instance) or return a
+    #: :py:class:`~pyasn1.type.constraint.ConstraintsIntersection` object
+    #: imposing constraints on |ASN.1| type initialization values.
+    subtypeSpec = constraint.ConstraintsIntersection()
+
+    # Optimization for faster codec lookup
+    typeId = base.SimpleAsn1Type.getTypeId()
+
+    def __add__(self, other):
+        return self.clone(self._value + other)
+
+    def __radd__(self, other):
+        return self.clone(other + self._value)
+
+    def asTuple(self):
+        return self._value
+
+    # Sequence object protocol
+
+    def __len__(self):
+        return len(self._value)
+
+    def __getitem__(self, i):
+        if i.__class__ is slice:
+            return self.clone(self._value[i])
+        else:
+            return self._value[i]
+
+    def __iter__(self):
+        return iter(self._value)
+
+    def __contains__(self, value):
+        return value in self._value
+
+    def index(self, suboid):
+        return self._value.index(suboid)
+
+    def isPrefixOf(self, other):
+        """Indicate if this |ASN.1| object is a prefix of other |ASN.1| object.
+        Parameters
+        ----------
+        other: |ASN.1| object
+            |ASN.1| object
+        Returns
+        -------
+        : :class:`bool`
+            :obj:`True` if this |ASN.1| object is a parent (e.g. prefix) of the other |ASN.1| object
+            or :obj:`False` otherwise.
+        """
+        l = len(self)
+        if l <= len(other):
+            if self._value[:l] == other[:l]:
+                return True
+        return False
+
+    def prettyIn(self, value):
+        if isinstance(value, RelativeOID):
+            return tuple(value)
+        elif octets.isStringType(value):
+            if '-' in value:
+                raise error.PyAsn1Error(
+                    'Malformed RELATIVE-OID %s at %s: %s' % (value, self.__class__.__name__, sys.exc_info()[1])
+                )
+            try:
+                return tuple([int(subOid) for subOid in value.split('.') if subOid])
+            except ValueError:
+                raise error.PyAsn1Error(
+                    'Malformed RELATIVE-OID %s at %s: %s' % (value, self.__class__.__name__, sys.exc_info()[1])
+                )
+
+        try:
+            tupleOfInts = tuple([int(subOid) for subOid in value if subOid >= 0])
+
+        except (ValueError, TypeError):
+            raise error.PyAsn1Error(
+                'Malformed RELATIVE-OID %s at %s: %s' % (value, self.__class__.__name__, sys.exc_info()[1])
+            )
+
+        if len(tupleOfInts) == len(value):
+            return tupleOfInts
+
+        raise error.PyAsn1Error('Malformed RELATIVE-OID %s at %s' % (value, self.__class__.__name__))
+
+    def prettyOut(self, value):
+        return '.'.join([str(x) for x in value])
+
+
 class Real(base.SimpleAsn1Type):
     """Create |ASN.1| schema or value object.
 
diff --git a/contrib/python/pyasn1/py3/tests/codec/ber/test_decoder.py b/contrib/python/pyasn1/py3/tests/codec/ber/test_decoder.py
index 35d12d0536..20da0abc30 100644
--- a/contrib/python/pyasn1/py3/tests/codec/ber/test_decoder.py
+++ b/contrib/python/pyasn1/py3/tests/codec/ber/test_decoder.py
@@ -451,6 +451,75 @@ class ObjectIdentifierDecoderTestCase(BaseTestCase):
         ) == ((2, 999, 18446744073709551535184467440737095), null)
 
 
+class RelativeOIDDecoderTestCase(BaseTestCase):
+    def testOne(self):
+        obj, rest = decoder.decode(ints2octs((13, 1, 39)))
+        assert str(obj) == '39'
+        assert rest == null
+
+    def testTwo(self):
+        assert decoder.decode(
+            ints2octs((13, 2, 5, 6))
+        ) == ((5, 6), null)
+
+    def testThree(self):
+        assert decoder.decode(
+            ints2octs((13, 3, 5, 6, 7))
+        ) == ((5, 6, 7), null)
+
+    def testNonLeading0x80(self):
+        assert decoder.decode(
+            ints2octs((13, 5, 85, 4, 129, 128, 0)),
+        ) == ((85, 4, 16384), null)
+
+    def testLeading0x80(self):
+        try:
+            decoder.decode(
+                ints2octs((13, 5, 85, 4, 128, 129, 0))
+            )
+        except error.PyAsn1Error:
+            pass
+        else:
+            assert 0, 'Leading 0x80 tolerated'
+
+    def testTagFormat(self):
+        try:
+            decoder.decode(ints2octs((38, 1, 239)))
+        except error.PyAsn1Error:
+            pass
+        else:
+            assert 0, 'wrong tagFormat worked out'
+
+    def testZeroLength(self):
+        try:
+            decoder.decode(ints2octs((13, 0, 0)))
+        except error.PyAsn1Error:
+            pass
+        else:
+            assert 0, 'zero length tolerated'
+
+    def testIndefiniteLength(self):
+        try:
+            decoder.decode(ints2octs((13, 128, 0)))
+        except error.PyAsn1Error:
+            pass
+        else:
+            assert 0, 'indefinite length tolerated'
+
+    def testReservedLength(self):
+        try:
+            decoder.decode(ints2octs((13, 255, 0)))
+        except error.PyAsn1Error:
+            pass
+        else:
+            assert 0, 'reserved length tolerated'
+
+    def testLarge(self):
+        assert decoder.decode(
+            ints2octs((0x0D, 0x13, 0x88, 0x37, 0x83, 0xC6, 0xDF, 0xD4, 0xCC, 0xB3, 0xFF, 0xFF, 0xFE, 0xF0, 0xB8, 0xD6, 0xB8, 0xCB, 0xE2, 0xB6, 0x47))
+        ) == ((1079, 18446744073709551535184467440737095), null)
+
+
 class RealDecoderTestCase(BaseTestCase):
     def testChar(self):
         assert decoder.decode(
@@ -1766,7 +1835,7 @@ class BytesIOTestCase(BaseTestCase):
 
 class UnicodeTestCase(BaseTestCase):
     def testFail(self):
-        # This ensures that unicode objects in Python 2 & str objects in Python 3.7 cannot be parsed.
+        # This ensures that str objects in Python 3.7 cannot be parsed.
         source = ints2octs((2, 1, 12, 35, 128, 3, 2, 0, 169, 3, 2, 1, 138, 0, 0)).decode("latin-1")
         try:
             next(decoder.StreamingDecoder(source))
@@ -1894,8 +1963,7 @@ class CompressedFilesTestCase(BaseTestCase):
             os.remove(path)
 
     def testZipfile(self):
-        # File from ZIP archive is a good example of non-seekable stream in Python 2.7
-        #   In Python 3.7, it is a seekable stream.
+        # It is a seekable stream.
         _, path = tempfile.mkstemp(suffix=".zip")
         try:
             with zipfile.ZipFile(path, "w") as myzip:
diff --git a/contrib/python/pyasn1/py3/tests/codec/ber/test_encoder.py b/contrib/python/pyasn1/py3/tests/codec/ber/test_encoder.py
index 7701348d06..4cce526be9 100644
--- a/contrib/python/pyasn1/py3/tests/codec/ber/test_encoder.py
+++ b/contrib/python/pyasn1/py3/tests/codec/ber/test_encoder.py
@@ -357,6 +357,37 @@ class ObjectIdentifierWithSchemaEncoderTestCase(BaseTestCase):
         ) == ints2octs((6, 6, 43, 6, 0, 191, 255, 126))
 
 
+class RelativeOIDEncoderTestCase(BaseTestCase):
+    def testOne(self):
+        assert encoder.encode(
+            univ.RelativeOID((39,))
+        ) == ints2octs((13, 1, 39))
+
+    def testTwo(self):
+        assert encoder.encode(
+            univ.RelativeOID((5, 6))
+        ) == ints2octs((13, 2, 5, 6))
+
+    def testThree(self):
+        assert encoder.encode(
+            univ.RelativeOID((5, 6, 7))
+        ) == ints2octs((13, 3, 5, 6, 7))
+
+    def testLarge(self):
+        assert encoder.encode(
+            univ.RelativeOID((1079, 18446744073709551535184467440737095))
+        ) == ints2octs((0x0D, 0x13, 0x88, 0x37, 0x83, 0xC6, 0xDF, 0xD4, 0xCC,
+                        0xB3, 0xFF, 0xFF, 0xFE, 0xF0, 0xB8, 0xD6, 0xB8, 0xCB,
+                        0xE2, 0xB6, 0x47))
+
+
+class RelativeOIDWithSchemaEncoderTestCase(BaseTestCase):
+    def testOne(self):
+        assert encoder.encode(
+            (5, 6, 7), asn1Spec=univ.RelativeOID()
+        ) == ints2octs((13, 3, 5, 6, 7))
+
+
 class RealEncoderTestCase(BaseTestCase):
     def testChar(self):
         assert encoder.encode(
diff --git a/contrib/python/pyasn1/py3/tests/type/test_univ.py b/contrib/python/pyasn1/py3/tests/type/test_univ.py
index 001f978d48..16b3d61465 100644
--- a/contrib/python/pyasn1/py3/tests/type/test_univ.py
+++ b/contrib/python/pyasn1/py3/tests/type/test_univ.py
@@ -949,6 +949,83 @@ class ObjectIdentifierPicklingTestCase(unittest.TestCase):
         assert new_asn1 == (2, 3, 1, 1, 2)
 
 
+class RelativeOID(BaseTestCase):
+    def testStr(self):
+        assert str(univ.RelativeOID((1, 3, 6))) == '1.3.6', 'str() fails'
+
+    def testRepr(self):
+        assert '1.3.6' in repr(univ.RelativeOID('1.3.6'))
+
+    def testEq(self):
+        assert univ.RelativeOID((1, 3, 6)) == (1, 3, 6), '__cmp__() fails'
+
+    def testAdd(self):
+        assert univ.RelativeOID((1, 3)) + (6,) == (1, 3, 6), '__add__() fails'
+
+    def testRadd(self):
+        assert (1,) + univ.RelativeOID((3, 6)) == (1, 3, 6), '__radd__() fails'
+
+    def testLen(self):
+        assert len(univ.RelativeOID((1, 3))) == 2, '__len__() fails'
+
+    def testPrefix(self):
+        o = univ.RelativeOID('1.3.6')
+        assert o.isPrefixOf((1, 3, 6)), 'isPrefixOf() fails'
+        assert o.isPrefixOf((1, 3, 6, 1)), 'isPrefixOf() fails'
+        assert not o.isPrefixOf((1, 3)), 'isPrefixOf() fails'
+
+    def testInput1(self):
+        assert univ.RelativeOID('1.3.6') == (1, 3, 6), 'prettyIn() fails'
+
+    def testInput2(self):
+        assert univ.RelativeOID((1, 3, 6)) == (1, 3, 6), 'prettyIn() fails'
+
+    def testInput3(self):
+        assert univ.RelativeOID(univ.RelativeOID('1.3') + (6,)) == (1, 3, 6), 'prettyIn() fails'
+
+    def testUnicode(self):
+        s = '1.3.6'
+        if sys.version_info[0] < 3:
+            s = s.decode()
+        assert univ.RelativeOID(s) == (1, 3, 6), 'unicode init fails'
+
+    def testTag(self):
+        assert univ.RelativeOID().tagSet == tag.TagSet(
+            (),
+            tag.Tag(tag.tagClassUniversal, tag.tagFormatSimple, 0x0d)
+        )
+
+    def testContains(self):
+        s = univ.RelativeOID('1.3.6.1234.99999')
+        assert 1234 in s
+        assert 4321 not in s
+
+    def testStaticDef(self):
+
+        class RelOID(univ.ObjectIdentifier):
+            pass
+
+        assert str(RelOID((1, 3, 6))) == '1.3.6'
+
+
+class RelativeOIDPicklingTestCase(unittest.TestCase):
+
+    def testSchemaPickling(self):
+        old_asn1 = univ.RelativeOID()
+        serialised = pickle.dumps(old_asn1)
+        assert serialised
+        new_asn1 = pickle.loads(serialised)
+        assert type(new_asn1) == univ.RelativeOID
+        assert old_asn1.isSameTypeWith(new_asn1)
+
+    def testValuePickling(self):
+        old_asn1 = univ.RelativeOID('2.3.1.1.2')
+        serialised = pickle.dumps(old_asn1)
+        assert serialised
+        new_asn1 = pickle.loads(serialised)
+        assert new_asn1 == (2, 3, 1, 1, 2)
+
+
 class SequenceOf(BaseTestCase):
     def setUp(self):
         BaseTestCase.setUp(self)
diff --git a/contrib/python/pyasn1/py3/ya.make b/contrib/python/pyasn1/py3/ya.make
index 4e59f746fa..966cbc6695 100644
--- a/contrib/python/pyasn1/py3/ya.make
+++ b/contrib/python/pyasn1/py3/ya.make
@@ -2,7 +2,7 @@
 
 PY3_LIBRARY()
 
-VERSION(0.5.1)
+VERSION(0.6.0)
 
 LICENSE(BSD-3-Clause)
 
-- 
cgit v1.2.3


From 6b5a00bd8cfac864a0ffd782a8c4c3fc839885d1 Mon Sep 17 00:00:00 2001
From: don-dron <don-dron@yandex-team.com>
Date: Wed, 10 Apr 2024 11:17:23 +0300
Subject: YT-21495: Merge MemoryReferenceTracker with MemoryUsageTracker
 ac1cd521bc04982c82067d235d8e6b9281638785

---
 yt/yt/client/chunk_client/config.h                 |  4 +-
 yt/yt/core/misc/memory_reference_tracker.cpp       | 57 ----------------------
 yt/yt/core/misc/memory_reference_tracker.h         | 48 ------------------
 yt/yt/core/misc/memory_usage_tracker.cpp           | 35 +++++++++++++
 yt/yt/core/misc/memory_usage_tracker.h             | 24 +++++++++
 yt/yt/core/misc/public.h                           |  4 +-
 yt/yt/core/rpc/client.cpp                          |  2 +-
 yt/yt/core/rpc/unittests/lib/common.cpp            |  7 +++
 yt/yt/core/rpc/unittests/lib/common.h              |  5 +-
 .../core/rpc/unittests/rpc_allocation_tags_ut.cpp  |  2 +-
 yt/yt/core/rpc/unittests/rpc_ut.cpp                |  6 +--
 yt/yt/core/ya.make                                 |  1 -
 12 files changed, 77 insertions(+), 118 deletions(-)
 delete mode 100644 yt/yt/core/misc/memory_reference_tracker.cpp
 delete mode 100644 yt/yt/core/misc/memory_reference_tracker.h

diff --git a/yt/yt/client/chunk_client/config.h b/yt/yt/client/chunk_client/config.h
index 8b4b02638f..b5efb3ed2c 100644
--- a/yt/yt/client/chunk_client/config.h
+++ b/yt/yt/client/chunk_client/config.h
@@ -425,9 +425,7 @@ class TMemoryTrackedWriterOptions
     : public NYTree::TYsonStruct
 {
 public:
-    IMemoryUsageTrackerPtr MemoryTracker;
-
-    IMemoryReferenceTrackerPtr MemoryReferenceTracker;
+    IMemoryUsageTrackerPtr MemoryUsageTracker;
 };
 
 ////////////////////////////////////////////////////////////////////////////////
diff --git a/yt/yt/core/misc/memory_reference_tracker.cpp b/yt/yt/core/misc/memory_reference_tracker.cpp
deleted file mode 100644
index cb2f237543..0000000000
--- a/yt/yt/core/misc/memory_reference_tracker.cpp
+++ /dev/null
@@ -1,57 +0,0 @@
-#include "memory_reference_tracker.h"
-#include "singleton.h"
-
-namespace NYT {
-
-////////////////////////////////////////////////////////////////////////////////
-
-class TNullMemoryReferenceTracker
-    : public IMemoryReferenceTracker
-{
-public:
-    TSharedRef Track(
-        TSharedRef reference,
-        bool /*keepExistingTracking*/) override
-    {
-        return reference;
-    }
-};
-
-////////////////////////////////////////////////////////////////////////////////
-
-IMemoryReferenceTrackerPtr GetNullMemoryReferenceTracker()
-{
-    return LeakyRefCountedSingleton<TNullMemoryReferenceTracker>();
-}
-
-////////////////////////////////////////////////////////////////////////////////
-
-TSharedRef TrackMemory(
-    const IMemoryReferenceTrackerPtr& tracker,
-    TSharedRef reference,
-    bool keepExistingTracking)
-{
-    if (!tracker || !reference) {
-        return reference;
-    }
-    return tracker->Track(reference, keepExistingTracking);
-}
-
-TSharedRefArray TrackMemory(
-    const IMemoryReferenceTrackerPtr& tracker,
-    TSharedRefArray array,
-    bool keepExistingTracking)
-{
-    if (!tracker || !array) {
-        return array;
-    }
-    TSharedRefArrayBuilder builder(array.Size());
-    for (const auto& part : array) {
-        builder.Add(tracker->Track(part, keepExistingTracking));
-    }
-    return builder.Finish();
-}
-
-////////////////////////////////////////////////////////////////////////////////
-
-} // namespace NYT
diff --git a/yt/yt/core/misc/memory_reference_tracker.h b/yt/yt/core/misc/memory_reference_tracker.h
deleted file mode 100644
index e80410b036..0000000000
--- a/yt/yt/core/misc/memory_reference_tracker.h
+++ /dev/null
@@ -1,48 +0,0 @@
-#pragma once
-
-#include "public.h"
-
-#include <library/cpp/yt/memory/ref.h>
-
-namespace NYT {
-
-////////////////////////////////////////////////////////////////////////////////
-
-//! Tracks memory used by references.
-/*!
- * Memory tracking is implemented by specific shared ref holders.
- * #Track returns reference with a holder that wraps the old one and also
- * enables accounting memory in memory tracker's internal state.
-
- * Subsequent #Track calls for this reference drop memory reference tracker's
- * holder unless #keepExistingTracking is true.
- */
-struct IMemoryReferenceTracker
-    : public TRefCounted
-{
-    //! Tracks reference in a tracker while the reference itself is alive.
-    virtual TSharedRef Track(
-        TSharedRef reference,
-        bool keepExistingTracking = false) = 0;
-};
-
-DEFINE_REFCOUNTED_TYPE(IMemoryReferenceTracker)
-
-////////////////////////////////////////////////////////////////////////////////
-
-IMemoryReferenceTrackerPtr GetNullMemoryReferenceTracker();
-
-////////////////////////////////////////////////////////////////////////////////
-
-TSharedRef TrackMemory(
-    const IMemoryReferenceTrackerPtr& tracker,
-    TSharedRef reference,
-    bool keepExistingTracking = false);
-TSharedRefArray TrackMemory(
-    const IMemoryReferenceTrackerPtr& tracker,
-    TSharedRefArray array,
-    bool keepExistingTracking = false);
-
-////////////////////////////////////////////////////////////////////////////////
-
-} // namespace NYT
diff --git a/yt/yt/core/misc/memory_usage_tracker.cpp b/yt/yt/core/misc/memory_usage_tracker.cpp
index dc628e4d70..7d100e8254 100644
--- a/yt/yt/core/misc/memory_usage_tracker.cpp
+++ b/yt/yt/core/misc/memory_usage_tracker.cpp
@@ -49,6 +49,13 @@ public:
     {
         return false;
     }
+
+    TSharedRef Track(
+        TSharedRef reference,
+        bool /*keepExistingTracking*/) override
+    {
+        return reference;
+    }
 };
 
 ////////////////////////////////////////////////////////////////////////////////
@@ -342,5 +349,33 @@ void TMemoryTrackedBlob::Clear()
 
 ////////////////////////////////////////////////////////////////////////////////
 
+TSharedRef TrackMemory(
+    const IMemoryUsageTrackerPtr& tracker,
+    TSharedRef reference,
+    bool keepExistingTracking)
+{
+    if (!tracker || !reference) {
+        return reference;
+    }
+    return tracker->Track(reference, keepExistingTracking);
+}
+
+TSharedRefArray TrackMemory(
+    const IMemoryUsageTrackerPtr& tracker,
+    TSharedRefArray array,
+    bool keepExistingTracking)
+{
+    if (!tracker || !array) {
+        return array;
+    }
+    TSharedRefArrayBuilder builder(array.Size());
+    for (const auto& part : array) {
+        builder.Add(tracker->Track(part, keepExistingTracking));
+    }
+    return builder.Finish();
+}
+
+////////////////////////////////////////////////////////////////////////////////
+
 } // namespace NYT
 
diff --git a/yt/yt/core/misc/memory_usage_tracker.h b/yt/yt/core/misc/memory_usage_tracker.h
index 3054aca778..74957dfb00 100644
--- a/yt/yt/core/misc/memory_usage_tracker.h
+++ b/yt/yt/core/misc/memory_usage_tracker.h
@@ -21,6 +21,19 @@ struct IMemoryUsageTracker
     virtual i64 GetUsed() const = 0;
     virtual i64 GetFree() const = 0;
     virtual bool IsExceeded() const = 0;
+
+    //! Tracks memory used by references.
+    /*!
+    * Memory tracking is implemented by specific shared ref holders.
+    * #Track returns reference with a holder that wraps the old one and also
+    * enables accounting memory in memory tracker's internal state.
+
+    * Subsequent #Track calls for this reference drop memory reference tracker's
+    * holder unless #keepExistingTracking is true.
+    */
+    virtual TSharedRef Track(
+        TSharedRef reference,
+        bool keepHolder = false) = 0;
 };
 
 DEFINE_REFCOUNTED_TYPE(IMemoryUsageTracker)
@@ -131,4 +144,15 @@ private:
 
 ////////////////////////////////////////////////////////////////////////////////
 
+TSharedRef TrackMemory(
+    const IMemoryUsageTrackerPtr& tracker,
+    TSharedRef reference,
+    bool keepExistingTracking = false);
+TSharedRefArray TrackMemory(
+    const IMemoryUsageTrackerPtr& tracker,
+    TSharedRefArray array,
+    bool keepExistingTracking = false);
+
+////////////////////////////////////////////////////////////////////////////////
+
 } // namespace NYT
diff --git a/yt/yt/core/misc/public.h b/yt/yt/core/misc/public.h
index 234d88d734..7d002624e2 100644
--- a/yt/yt/core/misc/public.h
+++ b/yt/yt/core/misc/public.h
@@ -138,8 +138,6 @@ using TInternedObjectDataPtr = TIntrusivePtr<TInternedObjectData<T>>;
 template <class T>
 class TInternedObject;
 
-DECLARE_REFCOUNTED_STRUCT(IMemoryUsageTracker)
-
 class TStatistics;
 class TSummary;
 
@@ -171,7 +169,7 @@ DEFINE_ENUM(EProcessErrorCode,
 
 ////////////////////////////////////////////////////////////////////////////////
 
-DECLARE_REFCOUNTED_STRUCT(IMemoryReferenceTracker)
+DECLARE_REFCOUNTED_STRUCT(IMemoryUsageTracker)
 
 ////////////////////////////////////////////////////////////////////////////////
 
diff --git a/yt/yt/core/rpc/client.cpp b/yt/yt/core/rpc/client.cpp
index 162830c21f..37e3cf42c3 100644
--- a/yt/yt/core/rpc/client.cpp
+++ b/yt/yt/core/rpc/client.cpp
@@ -7,7 +7,7 @@
 #include <yt/yt/core/net/local_address.h>
 
 #include <yt/yt/core/misc/checksum.h>
-#include <yt/yt/core/misc/memory_reference_tracker.h>
+#include <yt/yt/core/misc/memory_usage_tracker.h>
 
 #include <yt/yt/core/profiling/timing.h>
 
diff --git a/yt/yt/core/rpc/unittests/lib/common.cpp b/yt/yt/core/rpc/unittests/lib/common.cpp
index 751e2643e9..089d3b90cd 100644
--- a/yt/yt/core/rpc/unittests/lib/common.cpp
+++ b/yt/yt/core/rpc/unittests/lib/common.cpp
@@ -108,6 +108,13 @@ i64 TTestNodeMemoryTracker::GetTotalUsage() const
     return TotalUsage_;
 }
 
+TSharedRef TTestNodeMemoryTracker::Track(
+    TSharedRef reference,
+    bool /*keepHolder*/)
+{
+    return reference;
+}
+
 ////////////////////////////////////////////////////////////////////////////////
 
 } // namespace NYT::NRpc
diff --git a/yt/yt/core/rpc/unittests/lib/common.h b/yt/yt/core/rpc/unittests/lib/common.h
index d80f8c4b19..ccb272df66 100644
--- a/yt/yt/core/rpc/unittests/lib/common.h
+++ b/yt/yt/core/rpc/unittests/lib/common.h
@@ -129,6 +129,9 @@ public:
     void ClearTotalUsage();
     i64 GetTotalUsage() const;
 
+    TSharedRef Track(
+        TSharedRef reference,
+        bool keepHolder = false) override;
 private:
     YT_DECLARE_SPIN_LOCK(NThreading::TSpinLock, Lock_);
     i64 Usage_;
@@ -170,7 +173,7 @@ public:
         TTestServerHost::TearDown();
     }
 
-    TTestNodeMemoryTrackerPtr GetMemoryUsageTracker()
+    TTestNodeMemoryTrackerPtr GetNodeMemoryUsageTracker()
     {
         return MemoryUsageTracker_;
     }
diff --git a/yt/yt/core/rpc/unittests/rpc_allocation_tags_ut.cpp b/yt/yt/core/rpc/unittests/rpc_allocation_tags_ut.cpp
index 52466ee3a5..dce15890fd 100644
--- a/yt/yt/core/rpc/unittests/rpc_allocation_tags_ut.cpp
+++ b/yt/yt/core/rpc/unittests/rpc_allocation_tags_ut.cpp
@@ -29,7 +29,7 @@ TYPED_TEST_SUITE(TRpcTest, TAllTransports);
 
 TYPED_TEST(TRpcTest, ResponseWithAllocationTags)
 {
-    auto memoryUsageTracker = this->GetMemoryUsageTracker();
+    auto memoryUsageTracker = this->GetNodeMemoryUsageTracker();
     auto previousLimit = memoryUsageTracker->GetLimit();
     memoryUsageTracker->SetLimit(2_GB);
     static TMemoryTag testMemoryTag = 1 << 20;
diff --git a/yt/yt/core/rpc/unittests/rpc_ut.cpp b/yt/yt/core/rpc/unittests/rpc_ut.cpp
index af3a679024..a28e9e0a37 100644
--- a/yt/yt/core/rpc/unittests/rpc_ut.cpp
+++ b/yt/yt/core/rpc/unittests/rpc_ut.cpp
@@ -770,7 +770,7 @@ TYPED_TEST(TRpcTest, RequestQueueSizeLimit)
 TYPED_TEST(TNotGrpcTest, MemoryTracking)
 {
     TTestProxy proxy(this->CreateChannel());
-    auto memoryUsageTracker = this->GetMemoryUsageTracker();
+    auto memoryUsageTracker = this->GetNodeMemoryUsageTracker();
     memoryUsageTracker->ClearTotalUsage();
     proxy.SetDefaultTimeout(TDuration::Seconds(10.0));
     for (int i = 0; i < 300; ++i) {
@@ -787,7 +787,7 @@ TYPED_TEST(TNotGrpcTest, MemoryTracking)
 
 TYPED_TEST(TNotGrpcTest, MemoryTrackingMultipleConnections)
 {
-    auto memoryUsageTracker = this->GetMemoryUsageTracker();
+    auto memoryUsageTracker = this->GetNodeMemoryUsageTracker();
     memoryUsageTracker->ClearTotalUsage();
     for (int i = 0; i < 300; ++i) {
         TTestProxy proxy(this->CreateChannel());
@@ -805,7 +805,7 @@ TYPED_TEST(TNotGrpcTest, MemoryTrackingMultipleConnections)
 
 TYPED_TEST(TNotGrpcTest, MemoryTrackingMultipleConcurrent)
 {
-    auto memoryUsageTracker = this->GetMemoryUsageTracker();
+    auto memoryUsageTracker = this->GetNodeMemoryUsageTracker();
     memoryUsageTracker->ClearTotalUsage();
     std::vector<TFuture<void>> futures;
     std::vector<TTestProxy> proxies;
diff --git a/yt/yt/core/ya.make b/yt/yt/core/ya.make
index e262fa8cc4..80afdd3e95 100644
--- a/yt/yt/core/ya.make
+++ b/yt/yt/core/ya.make
@@ -131,7 +131,6 @@ SRCS(
     misc/adjusted_exponential_moving_average.cpp
     misc/id_generator.cpp
     misc/linear_probe.cpp
-    misc/memory_reference_tracker.cpp
     misc/memory_usage_tracker.cpp
     misc/relaxed_mpsc_queue.cpp
     misc/parser_helpers.cpp
-- 
cgit v1.2.3


From 908385834c122b8d44d0fdf2372b2445b86705e1 Mon Sep 17 00:00:00 2001
From: robot-piglet <robot-piglet@yandex-team.com>
Date: Wed, 10 Apr 2024 11:34:09 +0300
Subject: Intermediate changes

---
 contrib/python/numpy/py3/numpy/core/src/multiarray/nditer_api.c | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/contrib/python/numpy/py3/numpy/core/src/multiarray/nditer_api.c b/contrib/python/numpy/py3/numpy/core/src/multiarray/nditer_api.c
index 0501c146b1..28b7bf6e63 100644
--- a/contrib/python/numpy/py3/numpy/core/src/multiarray/nditer_api.c
+++ b/contrib/python/numpy/py3/numpy/core/src/multiarray/nditer_api.c
@@ -1355,11 +1355,6 @@ NpyIter_GetInnerFixedStrideArray(NpyIter *iter, npy_intp *out_strides)
 
         for (iop = 0; iop < nop; ++iop) {
             stride = strides[iop];
-#if defined(__has_feature)
-#  if __has_feature(memory_sanitizer)
-            __msan_unpoison(&stride, sizeof(stride));
-#  endif
-#endif
             /*
              * Operands which are always/never buffered have fixed strides,
              * and everything has fixed strides when ndim is 0 or 1
-- 
cgit v1.2.3


From ce49046255d74900ee2f807a2c421f52c50ee7f1 Mon Sep 17 00:00:00 2001
From: robot-contrib <robot-contrib@yandex-team.com>
Date: Wed, 10 Apr 2024 11:34:11 +0300
Subject: Update contrib/libs/snappy to 1.2.0
 eb017c6cebd9382319a1c949f016369420906729

---
 contrib/libs/snappy/config-linux.h          |   3 +
 contrib/libs/snappy/snappy-internal.h       |  29 +++
 contrib/libs/snappy/snappy-stubs-internal.h |   6 +
 contrib/libs/snappy/snappy.cc               | 274 +++++++++++++++++++++++-----
 contrib/libs/snappy/snappy.h                |  45 +++--
 contrib/libs/snappy/ya.make                 |   4 +-
 6 files changed, 307 insertions(+), 54 deletions(-)

diff --git a/contrib/libs/snappy/config-linux.h b/contrib/libs/snappy/config-linux.h
index d7997787fa..34d0dbf7d4 100644
--- a/contrib/libs/snappy/config-linux.h
+++ b/contrib/libs/snappy/config-linux.h
@@ -10,6 +10,9 @@
 /* Define to 1 if the compiler supports __builtin_expect. */
 #define HAVE_BUILTIN_EXPECT 1
 
+/* Define to 1 if the compiler supports __builtin_prefetch. */
+#define HAVE_BUILTIN_PREFETCH 1
+
 /* Define to 1 if you have a definition for mmap() in <sys/mman.h>. */
 #define HAVE_FUNC_MMAP 1
 
diff --git a/contrib/libs/snappy/snappy-internal.h b/contrib/libs/snappy/snappy-internal.h
index 0923f399a3..ae78247dbb 100644
--- a/contrib/libs/snappy/snappy-internal.h
+++ b/contrib/libs/snappy/snappy-internal.h
@@ -31,6 +31,8 @@
 #ifndef THIRD_PARTY_SNAPPY_SNAPPY_INTERNAL_H_
 #define THIRD_PARTY_SNAPPY_SNAPPY_INTERNAL_H_
 
+#include <utility>
+
 #include "snappy-stubs-internal.h"
 
 #if SNAPPY_HAVE_SSSE3
@@ -256,6 +258,8 @@ static inline std::pair<size_t, bool> FindMatchLength(const char* s1,
       s2 += 8;
     }
   }
+  SNAPPY_PREFETCH(s1 + 64);
+  SNAPPY_PREFETCH(s2 + 64);
 
   // Find out how long the match is. We loop over the data 64 bits at a
   // time until we find a 64-bit block that doesn't match; then we find
@@ -330,6 +334,31 @@ static inline std::pair<size_t, bool> FindMatchLength(const char* s1,
 }
 #endif
 
+static inline size_t FindMatchLengthPlain(const char* s1, const char* s2,
+                                          const char* s2_limit) {
+  // Implementation based on the x86-64 version, above.
+  assert(s2_limit >= s2);
+  int matched = 0;
+
+  while (s2 <= s2_limit - 8 &&
+         UNALIGNED_LOAD64(s2) == UNALIGNED_LOAD64(s1 + matched)) {
+    s2 += 8;
+    matched += 8;
+  }
+  if (LittleEndian::IsLittleEndian() && s2 <= s2_limit - 8) {
+    uint64_t x = UNALIGNED_LOAD64(s2) ^ UNALIGNED_LOAD64(s1 + matched);
+    int matching_bits = Bits::FindLSBSetNonZero64(x);
+    matched += matching_bits >> 3;
+    s2 += matching_bits >> 3;
+  } else {
+    while ((s2 < s2_limit) && (s1[matched] == *s2)) {
+      ++s2;
+      ++matched;
+    }
+  }
+  return matched;
+}
+
 // Lookup tables for decompression code.  Give --snappy_dump_decompression_table
 // to the unit test to recompute char_table.
 
diff --git a/contrib/libs/snappy/snappy-stubs-internal.h b/contrib/libs/snappy/snappy-stubs-internal.h
index 1548ed7ac7..526c38b700 100644
--- a/contrib/libs/snappy/snappy-stubs-internal.h
+++ b/contrib/libs/snappy/snappy-stubs-internal.h
@@ -105,6 +105,12 @@
 #define SNAPPY_ATTRIBUTE_ALWAYS_INLINE
 #endif  // HAVE_ATTRIBUTE_ALWAYS_INLINE
 
+#if HAVE_BUILTIN_PREFETCH
+#define SNAPPY_PREFETCH(ptr) __builtin_prefetch(ptr, 0, 3)
+#else
+#define SNAPPY_PREFETCH(ptr) (void)(ptr)
+#endif
+
 // Stubbed version of ABSL_FLAG.
 //
 // In the open source version, flags can only be changed at compile time.
diff --git a/contrib/libs/snappy/snappy.cc b/contrib/libs/snappy/snappy.cc
index 075e0d7dbf..0aaedbfd52 100644
--- a/contrib/libs/snappy/snappy.cc
+++ b/contrib/libs/snappy/snappy.cc
@@ -68,18 +68,13 @@
 #include <arm_acle.h>
 #endif
 
-#if defined(__GNUC__)
-#define SNAPPY_PREFETCH(ptr) __builtin_prefetch(ptr, 0, 3)
-#else
-#define SNAPPY_PREFETCH(ptr) (void)(ptr)
-#endif
-
 #include <algorithm>
 #include <array>
 #include <cstddef>
 #include <cstdint>
 #include <cstdio>
 #include <cstring>
+#include <memory>
 #include <string>
 #include <utility>
 #include <vector>
@@ -181,6 +176,22 @@ inline uint16_t* TableEntry(uint16_t* table, uint32_t bytes, uint32_t mask) {
                                      (hash & mask));
 }
 
+inline uint16_t* TableEntry4ByteMatch(uint16_t* table, uint32_t bytes,
+                                      uint32_t mask) {
+  constexpr uint32_t kMagic = 2654435761U;
+  const uint32_t hash = (kMagic * bytes) >> (32 - kMaxHashTableBits);
+  return reinterpret_cast<uint16_t*>(reinterpret_cast<uintptr_t>(table) +
+                                     (hash & mask));
+}
+
+inline uint16_t* TableEntry8ByteMatch(uint16_t* table, uint64_t bytes,
+                                      uint32_t mask) {
+  constexpr uint64_t kMagic = 58295818150454627ULL;
+  const uint32_t hash = (kMagic * bytes) >> (64 - kMaxHashTableBits);
+  return reinterpret_cast<uint16_t*>(reinterpret_cast<uintptr_t>(table) +
+                                     (hash & mask));
+}
+
 }  // namespace
 
 size_t MaxCompressedLength(size_t source_bytes) {
@@ -937,6 +948,174 @@ char* CompressFragment(const char* input, size_t input_size, char* op,
     }
   }
 
+emit_remainder:
+  // Emit the remaining bytes as a literal
+  if (ip < ip_end) {
+    op = EmitLiteral</*allow_fast_path=*/false>(op, ip, ip_end - ip);
+  }
+
+  return op;
+}
+
+char* CompressFragmentDoubleHash(const char* input, size_t input_size, char* op,
+                                 uint16_t* table, const int table_size,
+                                 uint16_t* table2, const int table_size2) {
+  (void)table_size2;
+  assert(table_size == table_size2);
+  // "ip" is the input pointer, and "op" is the output pointer.
+  const char* ip = input;
+  assert(input_size <= kBlockSize);
+  assert((table_size & (table_size - 1)) == 0);  // table must be power of two
+  const uint32_t mask = 2 * (table_size - 1);
+  const char* ip_end = input + input_size;
+  const char* base_ip = ip;
+
+  const size_t kInputMarginBytes = 15;
+  if (SNAPPY_PREDICT_TRUE(input_size >= kInputMarginBytes)) {
+    const char* ip_limit = input + input_size - kInputMarginBytes;
+
+    for (;;) {
+      const char* next_emit = ip++;
+      uint64_t data = LittleEndian::Load64(ip);
+      uint32_t skip = 512;
+
+      const char* candidate;
+      uint32_t candidate_length;
+      while (true) {
+        assert(static_cast<uint32_t>(data) == LittleEndian::Load32(ip));
+        uint16_t* table_entry2 = TableEntry8ByteMatch(table2, data, mask);
+        uint32_t bytes_between_hash_lookups = skip >> 9;
+        skip++;
+        const char* next_ip = ip + bytes_between_hash_lookups;
+        if (SNAPPY_PREDICT_FALSE(next_ip > ip_limit)) {
+          ip = next_emit;
+          goto emit_remainder;
+        }
+        candidate = base_ip + *table_entry2;
+        assert(candidate >= base_ip);
+        assert(candidate < ip);
+
+        *table_entry2 = ip - base_ip;
+        if (SNAPPY_PREDICT_FALSE(static_cast<uint32_t>(data) ==
+                                LittleEndian::Load32(candidate))) {
+          candidate_length =
+              FindMatchLengthPlain(candidate + 4, ip + 4, ip_end) + 4;
+          break;
+        }
+
+        uint16_t* table_entry = TableEntry4ByteMatch(table, data, mask);
+        candidate = base_ip + *table_entry;
+        assert(candidate >= base_ip);
+        assert(candidate < ip);
+
+        *table_entry = ip - base_ip;
+        if (SNAPPY_PREDICT_FALSE(static_cast<uint32_t>(data) ==
+                                LittleEndian::Load32(candidate))) {
+          candidate_length =
+              FindMatchLengthPlain(candidate + 4, ip + 4, ip_end) + 4;
+          table_entry2 =
+              TableEntry8ByteMatch(table2, LittleEndian::Load64(ip + 1), mask);
+          auto candidate2 = base_ip + *table_entry2;
+          size_t candidate_length2 =
+              FindMatchLengthPlain(candidate2, ip + 1, ip_end);
+          if (candidate_length2 > candidate_length) {
+            *table_entry2 = ip - base_ip;
+            candidate = candidate2;
+            candidate_length = candidate_length2;
+            ++ip;
+          }
+          break;
+        }
+        data = LittleEndian::Load64(next_ip);
+        ip = next_ip;
+      }
+      // Backtrack to the point it matches fully.
+      while (ip > next_emit && candidate > base_ip &&
+             *(ip - 1) == *(candidate - 1)) {
+        --ip;
+        --candidate;
+        ++candidate_length;
+      }
+      *TableEntry8ByteMatch(table2, LittleEndian::Load64(ip + 1), mask) =
+          ip - base_ip + 1;
+      *TableEntry8ByteMatch(table2, LittleEndian::Load64(ip + 2), mask) =
+          ip - base_ip + 2;
+      *TableEntry4ByteMatch(table, LittleEndian::Load32(ip + 1), mask) =
+          ip - base_ip + 1;
+      // Step 2: A 4-byte or 8-byte match has been found.
+      // We'll later see if more than 4 bytes match.  But, prior to the match,
+      // input bytes [next_emit, ip) are unmatched.  Emit them as
+      // "literal bytes."
+      assert(next_emit + 16 <= ip_end);
+      if (ip - next_emit > 0) {
+        op = EmitLiteral</*allow_fast_path=*/true>(op, next_emit,
+                                                   ip - next_emit);
+      }
+      // Step 3: Call EmitCopy, and then see if another EmitCopy could
+      // be our next move.  Repeat until we find no match for the
+      // input immediately after what was consumed by the last EmitCopy call.
+      //
+      // If we exit this loop normally then we need to call EmitLiteral next,
+      // though we don't yet know how big the literal will be.  We handle that
+      // by proceeding to the next iteration of the main loop.  We also can exit
+      // this loop via goto if we get close to exhausting the input.
+      do {
+        // We have a 4-byte match at ip, and no need to emit any
+        // "literal bytes" prior to ip.
+        const char* base = ip;
+        ip += candidate_length;
+        size_t offset = base - candidate;
+        if (candidate_length < 12) {
+          op =
+              EmitCopy</*len_less_than_12=*/true>(op, offset, candidate_length);
+        } else {
+          op = EmitCopy</*len_less_than_12=*/false>(op, offset,
+                                                    candidate_length);
+        }
+        if (SNAPPY_PREDICT_FALSE(ip >= ip_limit)) {
+          goto emit_remainder;
+        }
+        // We are now looking for a 4-byte match again.  We read
+        // table[Hash(ip, mask)] for that. To improve compression,
+        // we also update several previous table entries.
+        if (ip - base_ip > 7) {
+          *TableEntry8ByteMatch(table2, LittleEndian::Load64(ip - 7), mask) =
+              ip - base_ip - 7;
+          *TableEntry8ByteMatch(table2, LittleEndian::Load64(ip - 4), mask) =
+              ip - base_ip - 4;
+        }
+        *TableEntry8ByteMatch(table2, LittleEndian::Load64(ip - 3), mask) =
+            ip - base_ip - 3;
+        *TableEntry8ByteMatch(table2, LittleEndian::Load64(ip - 2), mask) =
+            ip - base_ip - 2;
+        *TableEntry4ByteMatch(table, LittleEndian::Load32(ip - 2), mask) =
+            ip - base_ip - 2;
+        *TableEntry4ByteMatch(table, LittleEndian::Load32(ip - 1), mask) =
+            ip - base_ip - 1;
+
+        uint16_t* table_entry =
+            TableEntry8ByteMatch(table2, LittleEndian::Load64(ip), mask);
+        candidate = base_ip + *table_entry;
+        *table_entry = ip - base_ip;
+        if (LittleEndian::Load32(ip) == LittleEndian::Load32(candidate)) {
+          candidate_length =
+              FindMatchLengthPlain(candidate + 4, ip + 4, ip_end) + 4;
+          continue;
+        }
+        table_entry =
+            TableEntry4ByteMatch(table, LittleEndian::Load32(ip), mask);
+        candidate = base_ip + *table_entry;
+        *table_entry = ip - base_ip;
+        if (LittleEndian::Load32(ip) == LittleEndian::Load32(candidate)) {
+          candidate_length =
+              FindMatchLengthPlain(candidate + 4, ip + 4, ip_end) + 4;
+          continue;
+        }
+        break;
+      } while (true);
+    }
+  }
+
 emit_remainder:
   // Emit the remaining bytes as a literal
   if (ip < ip_end) {
@@ -947,10 +1126,10 @@ emit_remainder:
 }
 }  // end namespace internal
 
-// Called back at avery compression call to trace parameters and sizes.
-static inline void Report(const char *algorithm, size_t compressed_size,
-                          size_t uncompressed_size) {
+static inline void Report(int token, const char *algorithm, size_t
+compressed_size, size_t uncompressed_size) {
   // TODO: Switch to [[maybe_unused]] when we can assume C++17.
+  (void)token;
   (void)algorithm;
   (void)compressed_size;
   (void)uncompressed_size;
@@ -1235,16 +1414,21 @@ std::pair<const uint8_t*, ptrdiff_t> DecompressBranchless(
         assert(tag == ip[-1]);
         // For literals tag_type = 0, hence we will always obtain 0 from
         // ExtractLowBytes. For literals offset will thus be kLiteralOffset.
-        ptrdiff_t len_min_offset = kLengthMinusOffset[tag];
+        ptrdiff_t len_minus_offset = kLengthMinusOffset[tag];
+        uint32_t next;
 #if defined(__aarch64__)
         size_t tag_type = AdvanceToNextTagARMOptimized(&ip, &tag);
+        // We never need more than 16 bits. Doing a Load16 allows the compiler
+        // to elide the masking operation in ExtractOffset.
+        next = LittleEndian::Load16(old_ip);
 #else
         size_t tag_type = AdvanceToNextTagX86Optimized(&ip, &tag);
+        next = LittleEndian::Load32(old_ip);
 #endif
-        uint32_t next = LittleEndian::Load32(old_ip);
-        size_t len = len_min_offset & 0xFF;
-        len_min_offset -= ExtractOffset(next, tag_type);
-        if (SNAPPY_PREDICT_FALSE(len_min_offset > 0)) {
+        size_t len = len_minus_offset & 0xFF;
+        ptrdiff_t extracted = ExtractOffset(next, tag_type);
+        ptrdiff_t len_min_offset = len_minus_offset - extracted;
+        if (SNAPPY_PREDICT_FALSE(len_minus_offset > extracted)) {
           if (SNAPPY_PREDICT_FALSE(len & 0x80)) {
             // Exceptional case (long literal or copy 4).
             // Actually doing the copy here is negatively impacting the main
@@ -1291,7 +1475,7 @@ std::pair<const uint8_t*, ptrdiff_t> DecompressBranchless(
         DeferMemCopy(&deferred_src, &deferred_length, from, len);
       }
     } while (ip < ip_limit_min_slop &&
-             (op + deferred_length) < op_limit_min_slop);
+             static_cast<ptrdiff_t>(op + deferred_length) < op_limit_min_slop);
   exit:
     ip--;
     assert(ip <= ip_limit);
@@ -1593,7 +1777,8 @@ template <typename Writer>
 static bool InternalUncompressAllTags(SnappyDecompressor* decompressor,
                                       Writer* writer, uint32_t compressed_len,
                                       uint32_t uncompressed_len) {
-  Report("snappy_uncompress", compressed_len, uncompressed_len);
+    int token = 0;
+  Report(token, "snappy_uncompress", compressed_len, uncompressed_len);
 
   writer->SetExpectedLength(uncompressed_len);
 
@@ -1608,7 +1793,9 @@ bool GetUncompressedLength(Source* source, uint32_t* result) {
   return decompressor.ReadUncompressedLength(result);
 }
 
-size_t Compress(Source* reader, Sink* writer) {
+size_t Compress(Source* reader, Sink* writer, CompressionOptions options) {
+  assert(options.level == 1 || options.level == 2);
+  int token = 0;
   size_t written = 0;
   size_t N = reader->Available();
   const size_t uncompressed_size = N;
@@ -1655,17 +1842,23 @@ size_t Compress(Source* reader, Sink* writer) {
     uint16_t* table = wmem.GetHashTable(num_to_read, &table_size);
 
     // Compress input_fragment and append to dest
-    const int max_output = MaxCompressedLength(num_to_read);
-
-    // Need a scratch buffer for the output, in case the byte sink doesn't
-    // have room for us directly.
+    int max_output = MaxCompressedLength(num_to_read);
 
     // Since we encode kBlockSize regions followed by a region
     // which is <= kBlockSize in length, a previously allocated
     // scratch_output[] region is big enough for this iteration.
+    // Need a scratch buffer for the output, in case the byte sink doesn't
+    // have room for us directly.
     char* dest = writer->GetAppendBuffer(max_output, wmem.GetScratchOutput());
-    char* end = internal::CompressFragment(fragment, fragment_size, dest, table,
-                                           table_size);
+    char* end = nullptr;
+    if (options.level == 1) {
+      end = internal::CompressFragment(fragment, fragment_size, dest, table,
+                                       table_size);
+    } else if (options.level == 2) {
+      end = internal::CompressFragmentDoubleHash(
+          fragment, fragment_size, dest, table, table_size >> 1,
+          table + (table_size >> 1), table_size >> 1);
+    }
     writer->Append(dest, end - dest);
     written += (end - dest);
 
@@ -1673,8 +1866,7 @@ size_t Compress(Source* reader, Sink* writer) {
     reader->Skip(pending_advance);
   }
 
-  Report("snappy_compress", written, uncompressed_size);
-
+  Report(token, "snappy_compress", written, uncompressed_size);
   return written;
 }
 
@@ -1697,16 +1889,16 @@ class SnappyIOVecReader : public Source {
     if (total_size > 0 && curr_size_remaining_ == 0) Advance();
   }
 
-  ~SnappyIOVecReader() = default;
+  ~SnappyIOVecReader() override = default;
 
-  size_t Available() const { return total_size_remaining_; }
+  size_t Available() const override { return total_size_remaining_; }
 
-  const char* Peek(size_t* len) {
+  const char* Peek(size_t* len) override {
     *len = curr_size_remaining_;
     return curr_pos_;
   }
 
-  void Skip(size_t n) {
+  void Skip(size_t n) override {
     while (n >= curr_size_remaining_ && n > 0) {
       n -= curr_size_remaining_;
       Advance();
@@ -2122,39 +2314,40 @@ bool IsValidCompressed(Source* compressed) {
 }
 
 void RawCompress(const char* input, size_t input_length, char* compressed,
-                 size_t* compressed_length) {
+                 size_t* compressed_length, CompressionOptions options) {
   ByteArraySource reader(input, input_length);
   UncheckedByteArraySink writer(compressed);
-  Compress(&reader, &writer);
+  Compress(&reader, &writer, options);
 
   // Compute how many bytes were added
   *compressed_length = (writer.CurrentDestination() - compressed);
 }
 
 void RawCompressFromIOVec(const struct iovec* iov, size_t uncompressed_length,
-                          char* compressed, size_t* compressed_length) {
+                          char* compressed, size_t* compressed_length,
+                          CompressionOptions options) {
   SnappyIOVecReader reader(iov, uncompressed_length);
   UncheckedByteArraySink writer(compressed);
-  Compress(&reader, &writer);
+  Compress(&reader, &writer, options);
 
   // Compute how many bytes were added.
   *compressed_length = writer.CurrentDestination() - compressed;
 }
 
-size_t Compress(const char* input, size_t input_length,
-                std::string* compressed) {
+size_t Compress(const char* input, size_t input_length, std::string* compressed,
+                CompressionOptions options) {
   // Pre-grow the buffer to the max length of the compressed output
   STLStringResizeUninitialized(compressed, MaxCompressedLength(input_length));
 
   size_t compressed_length;
   RawCompress(input, input_length, string_as_array(compressed),
-              &compressed_length);
+              &compressed_length, options);
   compressed->erase(compressed_length);
   return compressed_length;
 }
 
 size_t CompressFromIOVec(const struct iovec* iov, size_t iov_cnt,
-                         std::string* compressed) {
+                         std::string* compressed, CompressionOptions options) {
   // Compute the number of bytes to be compressed.
   size_t uncompressed_length = 0;
   for (size_t i = 0; i < iov_cnt; ++i) {
@@ -2167,19 +2360,19 @@ size_t CompressFromIOVec(const struct iovec* iov, size_t iov_cnt,
 
   size_t compressed_length;
   RawCompressFromIOVec(iov, uncompressed_length, string_as_array(compressed),
-                       &compressed_length);
+                       &compressed_length, options);
   compressed->erase(compressed_length);
   return compressed_length;
 }
 
 size_t Compress(const char* input, size_t input_length,
-                TString* compressed) {
+                TString* compressed, CompressionOptions options) {
   // Pre-grow the buffer to the max length of the compressed output
   compressed->ReserveAndResize(MaxCompressedLength(input_length));
 
   size_t compressed_length;
   RawCompress(input, input_length, compressed->begin(),
-              &compressed_length);
+              &compressed_length, options);
   compressed->resize(compressed_length);
   return compressed_length;
 }
@@ -2369,7 +2562,6 @@ bool SnappyScatteredWriter<Allocator>::SlowAppendFromSelf(size_t offset,
 class SnappySinkAllocator {
  public:
   explicit SnappySinkAllocator(Sink* dest) : dest_(dest) {}
-  ~SnappySinkAllocator() {}
 
   char* Allocate(int size) {
     Datablock block(new char[size], size);
diff --git a/contrib/libs/snappy/snappy.h b/contrib/libs/snappy/snappy.h
index 3fe79b0b58..0ad7bd6b9b 100644
--- a/contrib/libs/snappy/snappy.h
+++ b/contrib/libs/snappy/snappy.h
@@ -51,13 +51,36 @@ namespace snappy {
   class Source;
   class Sink;
 
+  struct CompressionOptions {
+    // Compression level.
+    // Level 1 is the fastest
+    // Level 2 is a little slower but provides better compression. Level 2 is
+    // **EXPERIMENTAL** for the time being. It might happen that we decide to
+    // fall back to level 1 in the future.
+    // Levels 3+ are currently not supported. We plan to support levels up to
+    // 9 in the future.
+    // If you played with other compression algorithms, level 1 is equivalent to
+    // fast mode (level 1) of LZ4, level 2 is equivalent to LZ4's level 2 mode
+    // and compresses somewhere around zstd:-3 and zstd:-2 but generally with
+    // faster decompression speeds than snappy:1 and zstd:-3.
+    int level = DefaultCompressionLevel();
+
+    constexpr CompressionOptions() = default;
+    constexpr CompressionOptions(int compression_level)
+        : level(compression_level) {}
+    static constexpr int MinCompressionLevel() { return 1; }
+    static constexpr int MaxCompressionLevel() { return 2; }
+    static constexpr int DefaultCompressionLevel() { return 1; }
+  };
+
   // ------------------------------------------------------------------------
   // Generic compression/decompression routines.
   // ------------------------------------------------------------------------
 
-  // Compress the bytes read from "*source" and append to "*sink". Return the
+  // Compress the bytes read from "*reader" and append to "*writer". Return the
   // number of bytes written.
-  size_t Compress(Source* source, Sink* sink);
+  size_t Compress(Source* reader, Sink* writer,
+                  CompressionOptions options = {});
 
   // Find the uncompressed length of the given stream, as given by the header.
   // Note that the true length could deviate from this; the stream could e.g.
@@ -77,16 +100,17 @@ namespace snappy {
   //
   // REQUIRES: "input[]" is not an alias of "*compressed".
   size_t Compress(const char* input, size_t input_length,
-                  std::string* compressed);
+                  std::string* compressed, CompressionOptions options = {});
   size_t Compress(const char* input, size_t input_length,
-                  TString* compressed);
+                  TString* compressed, CompressionOptions options = {});
 
   // Same as `Compress` above but taking an `iovec` array as input. Note that
   // this function preprocesses the inputs to compute the sum of
   // `iov[0..iov_cnt-1].iov_len` before reading. To avoid this, use
   // `RawCompressFromIOVec` below.
   size_t CompressFromIOVec(const struct iovec* iov, size_t iov_cnt,
-                           std::string* compressed);
+                           std::string* compressed,
+                           CompressionOptions options = {});
 
   // Decompresses "compressed[0..compressed_length-1]" to "*uncompressed".
   // Original contents of "*uncompressed" are lost.
@@ -131,16 +155,15 @@ namespace snappy {
   //    RawCompress(input, input_length, output, &output_length);
   //    ... Process(output, output_length) ...
   //    delete [] output;
-  void RawCompress(const char* input,
-                   size_t input_length,
-                   char* compressed,
-                   size_t* compressed_length);
+  void RawCompress(const char* input, size_t input_length, char* compressed,
+                   size_t* compressed_length, CompressionOptions options = {});
 
   // Same as `RawCompress` above but taking an `iovec` array as input. Note that
   // `uncompressed_length` is the total number of bytes to be read from the
   // elements of `iov` (_not_ the number of elements in `iov`).
   void RawCompressFromIOVec(const struct iovec* iov, size_t uncompressed_length,
-                            char* compressed, size_t* compressed_length);
+                            char* compressed, size_t* compressed_length,
+                            CompressionOptions options = {});
 
   // Given data in "compressed[0..compressed_length-1]" generated by
   // calling the Snappy::Compress routine, this routine
@@ -220,7 +243,7 @@ namespace snappy {
   static constexpr int kMinHashTableBits = 8;
   static constexpr size_t kMinHashTableSize = 1 << kMinHashTableBits;
 
-  static constexpr int kMaxHashTableBits = 14;
+  static constexpr int kMaxHashTableBits = 15;
   static constexpr size_t kMaxHashTableSize = 1 << kMaxHashTableBits;
 }  // end namespace snappy
 
diff --git a/contrib/libs/snappy/ya.make b/contrib/libs/snappy/ya.make
index f567bd1e9b..a0e906cb66 100644
--- a/contrib/libs/snappy/ya.make
+++ b/contrib/libs/snappy/ya.make
@@ -6,9 +6,9 @@ LICENSE(BSD-3-Clause)
 
 LICENSE_TEXTS(.yandex_meta/licenses.list.txt)
 
-VERSION(1.1.10)
+VERSION(1.2.0)
 
-ORIGINAL_SOURCE(https://github.com/google/snappy/archive/1.1.10.tar.gz)
+ORIGINAL_SOURCE(https://github.com/google/snappy/archive/1.2.0.tar.gz)
 
 PEERDIR(
     library/cpp/sanitizer/include
-- 
cgit v1.2.3


From aad444d84b2ade0084c1c83079c33ed24edb36f8 Mon Sep 17 00:00:00 2001
From: robot-contrib <robot-contrib@yandex-team.com>
Date: Wed, 10 Apr 2024 11:36:11 +0300
Subject: Update contrib/restricted/abseil-cpp to 20240116.2
 28e28ecedcb1a34c53d9705068794258e5baa2b9

---
 .../restricted/abseil-cpp/absl/algorithm/ya.make   |  4 ++--
 contrib/restricted/abseil-cpp/absl/base/config.h   |  2 +-
 .../restricted/abseil-cpp/absl/functional/ya.make  |  4 ++--
 contrib/restricted/abseil-cpp/absl/memory/ya.make  |  4 ++--
 contrib/restricted/abseil-cpp/absl/meta/ya.make    |  4 ++--
 .../restricted/abseil-cpp/absl/strings/escaping.cc | 26 ++++++++++++++++++----
 .../restricted/abseil-cpp/absl/strings/str_cat.h   | 23 +++++++++----------
 contrib/restricted/abseil-cpp/absl/utility/ya.make |  4 ++--
 contrib/restricted/abseil-cpp/ya.make              |  4 ++--
 9 files changed, 46 insertions(+), 29 deletions(-)

diff --git a/contrib/restricted/abseil-cpp/absl/algorithm/ya.make b/contrib/restricted/abseil-cpp/absl/algorithm/ya.make
index 939d073731..ac5695f072 100644
--- a/contrib/restricted/abseil-cpp/absl/algorithm/ya.make
+++ b/contrib/restricted/abseil-cpp/absl/algorithm/ya.make
@@ -6,9 +6,9 @@ LICENSE(Apache-2.0)
 
 LICENSE_TEXTS(.yandex_meta/licenses.list.txt)
 
-VERSION(20240116.1)
+VERSION(20240116.2)
 
-ORIGINAL_SOURCE(https://github.com/abseil/abseil-cpp/archive/20240116.1.tar.gz)
+ORIGINAL_SOURCE(https://github.com/abseil/abseil-cpp/archive/20240116.2.tar.gz)
 
 NO_RUNTIME()
 
diff --git a/contrib/restricted/abseil-cpp/absl/base/config.h b/contrib/restricted/abseil-cpp/absl/base/config.h
index 436b98048b..cbd9eac58e 100644
--- a/contrib/restricted/abseil-cpp/absl/base/config.h
+++ b/contrib/restricted/abseil-cpp/absl/base/config.h
@@ -118,7 +118,7 @@
 // LTS releases can be obtained from
 // https://github.com/abseil/abseil-cpp/releases.
 #define ABSL_LTS_RELEASE_VERSION 20240116
-#define ABSL_LTS_RELEASE_PATCH_LEVEL 1
+#define ABSL_LTS_RELEASE_PATCH_LEVEL 2
 
 // Helper macro to convert a CPP variable to a string literal.
 #define ABSL_INTERNAL_DO_TOKEN_STR(x) #x
diff --git a/contrib/restricted/abseil-cpp/absl/functional/ya.make b/contrib/restricted/abseil-cpp/absl/functional/ya.make
index 939d073731..ac5695f072 100644
--- a/contrib/restricted/abseil-cpp/absl/functional/ya.make
+++ b/contrib/restricted/abseil-cpp/absl/functional/ya.make
@@ -6,9 +6,9 @@ LICENSE(Apache-2.0)
 
 LICENSE_TEXTS(.yandex_meta/licenses.list.txt)
 
-VERSION(20240116.1)
+VERSION(20240116.2)
 
-ORIGINAL_SOURCE(https://github.com/abseil/abseil-cpp/archive/20240116.1.tar.gz)
+ORIGINAL_SOURCE(https://github.com/abseil/abseil-cpp/archive/20240116.2.tar.gz)
 
 NO_RUNTIME()
 
diff --git a/contrib/restricted/abseil-cpp/absl/memory/ya.make b/contrib/restricted/abseil-cpp/absl/memory/ya.make
index f3510dc19e..bdd57c2b35 100644
--- a/contrib/restricted/abseil-cpp/absl/memory/ya.make
+++ b/contrib/restricted/abseil-cpp/absl/memory/ya.make
@@ -6,9 +6,9 @@ LICENSE(Apache-2.0)
 
 LICENSE_TEXTS(.yandex_meta/licenses.list.txt)
 
-VERSION(20240116.1)
+VERSION(20240116.2)
 
-ORIGINAL_SOURCE(https://github.com/abseil/abseil-cpp/archive/20240116.1.tar.gz)
+ORIGINAL_SOURCE(https://github.com/abseil/abseil-cpp/archive/20240116.2.tar.gz)
 
 PEERDIR(
     contrib/restricted/abseil-cpp/absl/meta
diff --git a/contrib/restricted/abseil-cpp/absl/meta/ya.make b/contrib/restricted/abseil-cpp/absl/meta/ya.make
index 956cefbe8b..9d5d65c475 100644
--- a/contrib/restricted/abseil-cpp/absl/meta/ya.make
+++ b/contrib/restricted/abseil-cpp/absl/meta/ya.make
@@ -6,9 +6,9 @@ LICENSE(Apache-2.0)
 
 LICENSE_TEXTS(.yandex_meta/licenses.list.txt)
 
-VERSION(20240116.1)
+VERSION(20240116.2)
 
-ORIGINAL_SOURCE(https://github.com/abseil/abseil-cpp/archive/20240116.1.tar.gz)
+ORIGINAL_SOURCE(https://github.com/abseil/abseil-cpp/archive/20240116.2.tar.gz)
 
 PEERDIR(
     contrib/restricted/abseil-cpp/absl/base
diff --git a/contrib/restricted/abseil-cpp/absl/strings/escaping.cc b/contrib/restricted/abseil-cpp/absl/strings/escaping.cc
index 1c0eac42d7..27d3d98c28 100644
--- a/contrib/restricted/abseil-cpp/absl/strings/escaping.cc
+++ b/contrib/restricted/abseil-cpp/absl/strings/escaping.cc
@@ -362,7 +362,7 @@ std::string CEscapeInternal(absl::string_view src, bool use_hex,
 }
 
 /* clang-format off */
-constexpr unsigned char c_escaped_len[256] = {
+constexpr unsigned char kCEscapedLen[256] = {
     4, 4, 4, 4, 4, 4, 4, 4, 4, 2, 2, 4, 4, 2, 4, 4,  // \t, \n, \r
     4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
     1, 1, 2, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1,  // ", '
@@ -387,8 +387,23 @@ constexpr unsigned char c_escaped_len[256] = {
 // that UTF-8 bytes are not handled specially.
 inline size_t CEscapedLength(absl::string_view src) {
   size_t escaped_len = 0;
-  for (char c : src)
-    escaped_len += c_escaped_len[static_cast<unsigned char>(c)];
+  // The maximum value of kCEscapedLen[x] is 4, so we can escape any string of
+  // length size_t_max/4 without checking for overflow.
+  size_t unchecked_limit =
+      std::min<size_t>(src.size(), std::numeric_limits<size_t>::max() / 4);
+  size_t i = 0;
+  while (i < unchecked_limit) {
+    // Common case: No need to check for overflow.
+    escaped_len += kCEscapedLen[static_cast<unsigned char>(src[i++])];
+  }
+  while (i < src.size()) {
+    // Beyond unchecked_limit we need to check for overflow before adding.
+    size_t char_len = kCEscapedLen[static_cast<unsigned char>(src[i++])];
+    ABSL_INTERNAL_CHECK(
+        escaped_len <= std::numeric_limits<size_t>::max() - char_len,
+        "escaped_len overflow");
+    escaped_len += char_len;
+  }
   return escaped_len;
 }
 
@@ -400,12 +415,15 @@ void CEscapeAndAppendInternal(absl::string_view src, std::string* dest) {
   }
 
   size_t cur_dest_len = dest->size();
+  ABSL_INTERNAL_CHECK(
+      cur_dest_len <= std::numeric_limits<size_t>::max() - escaped_len,
+      "std::string size overflow");
   strings_internal::STLStringResizeUninitialized(dest,
                                                  cur_dest_len + escaped_len);
   char* append_ptr = &(*dest)[cur_dest_len];
 
   for (char c : src) {
-    size_t char_len = c_escaped_len[static_cast<unsigned char>(c)];
+    size_t char_len = kCEscapedLen[static_cast<unsigned char>(c)];
     if (char_len == 1) {
       *append_ptr++ = c;
     } else if (char_len == 2) {
diff --git a/contrib/restricted/abseil-cpp/absl/strings/str_cat.h b/contrib/restricted/abseil-cpp/absl/strings/str_cat.h
index ea2c4dcad8..1b52a36f4c 100644
--- a/contrib/restricted/abseil-cpp/absl/strings/str_cat.h
+++ b/contrib/restricted/abseil-cpp/absl/strings/str_cat.h
@@ -601,18 +601,17 @@ StrAppend(absl::Nonnull<String*> str, T... args) {
   ptrdiff_t n;   // The length of the current argument
   typename String::pointer pos = &(*str)[old_size];
   using SomeTrivialEmptyType = std::false_type;
-  // Ugly code due to the lack of C++14 fold expression makes us.
-  const SomeTrivialEmptyType dummy1;
-  for (const SomeTrivialEmptyType& dummy2 :
-       {(/* Comma expressions are poor man's C++17 fold expression for C++14 */
-         (void)(n = lengths[i]),
-         (void)(n < 0 ? (void)(*pos++ = '-'), (n = ~n) : 0),
-         (void)absl::numbers_internal::FastIntToBufferBackward(
-             absl::numbers_internal::UnsignedAbsoluteValue(std::move(args)),
-             pos += n, static_cast<uint32_t>(n)),
-         (void)++i, dummy1)...}) {
-    (void)dummy2;  // Remove & migrate to fold expressions in C++17
-  }
+  const SomeTrivialEmptyType dummy;
+  // Ugly code due to the lack of C++17 fold expressions
+  const SomeTrivialEmptyType dummies[] = {
+      (/* Comma expressions are poor man's C++17 fold expression for C++14 */
+       (void)(n = lengths[i]),
+       (void)(n < 0 ? (void)(*pos++ = '-'), (n = ~n) : 0),
+       (void)absl::numbers_internal::FastIntToBufferBackward(
+           absl::numbers_internal::UnsignedAbsoluteValue(std::move(args)),
+           pos += n, static_cast<uint32_t>(n)),
+       (void)++i, dummy)...};
+  (void)dummies;  // Remove & migrate to fold expressions in C++17
 }
 
 // Helper function for the future StrCat default floating-point format, %.6g
diff --git a/contrib/restricted/abseil-cpp/absl/utility/ya.make b/contrib/restricted/abseil-cpp/absl/utility/ya.make
index 939d073731..ac5695f072 100644
--- a/contrib/restricted/abseil-cpp/absl/utility/ya.make
+++ b/contrib/restricted/abseil-cpp/absl/utility/ya.make
@@ -6,9 +6,9 @@ LICENSE(Apache-2.0)
 
 LICENSE_TEXTS(.yandex_meta/licenses.list.txt)
 
-VERSION(20240116.1)
+VERSION(20240116.2)
 
-ORIGINAL_SOURCE(https://github.com/abseil/abseil-cpp/archive/20240116.1.tar.gz)
+ORIGINAL_SOURCE(https://github.com/abseil/abseil-cpp/archive/20240116.2.tar.gz)
 
 NO_RUNTIME()
 
diff --git a/contrib/restricted/abseil-cpp/ya.make b/contrib/restricted/abseil-cpp/ya.make
index 486a428c77..384f80ac5f 100644
--- a/contrib/restricted/abseil-cpp/ya.make
+++ b/contrib/restricted/abseil-cpp/ya.make
@@ -6,9 +6,9 @@ LICENSE(Apache-2.0)
 
 LICENSE_TEXTS(.yandex_meta/licenses.list.txt)
 
-VERSION(20240116.1)
+VERSION(20240116.2)
 
-ORIGINAL_SOURCE(https://github.com/abseil/abseil-cpp/archive/20240116.1.tar.gz)
+ORIGINAL_SOURCE(https://github.com/abseil/abseil-cpp/archive/20240116.2.tar.gz)
 
 PEERDIR(
     contrib/restricted/abseil-cpp/absl/algorithm
-- 
cgit v1.2.3


From 1ef9ef51901357fdbd0144a532d8ba9cac13b6ba Mon Sep 17 00:00:00 2001
From: robot-contrib <robot-contrib@yandex-team.com>
Date: Wed, 10 Apr 2024 11:36:11 +0300
Subject: Update contrib/restricted/abseil-cpp-tstring to 20240116.2
 b9bec68338edf6d889e826f149efea190e76ac4a

---
 .../abseil-cpp-tstring/y_absl/algorithm/ya.make    |  4 ++--
 .../abseil-cpp-tstring/y_absl/base/config.h        |  2 +-
 .../abseil-cpp-tstring/y_absl/functional/ya.make   |  4 ++--
 .../abseil-cpp-tstring/y_absl/memory/ya.make       |  4 ++--
 .../abseil-cpp-tstring/y_absl/meta/ya.make         |  4 ++--
 .../abseil-cpp-tstring/y_absl/strings/escaping.cc  | 26 ++++++++++++++++++----
 .../abseil-cpp-tstring/y_absl/utility/ya.make      |  4 ++--
 7 files changed, 33 insertions(+), 15 deletions(-)

diff --git a/contrib/restricted/abseil-cpp-tstring/y_absl/algorithm/ya.make b/contrib/restricted/abseil-cpp-tstring/y_absl/algorithm/ya.make
index 939d073731..ac5695f072 100644
--- a/contrib/restricted/abseil-cpp-tstring/y_absl/algorithm/ya.make
+++ b/contrib/restricted/abseil-cpp-tstring/y_absl/algorithm/ya.make
@@ -6,9 +6,9 @@ LICENSE(Apache-2.0)
 
 LICENSE_TEXTS(.yandex_meta/licenses.list.txt)
 
-VERSION(20240116.1)
+VERSION(20240116.2)
 
-ORIGINAL_SOURCE(https://github.com/abseil/abseil-cpp/archive/20240116.1.tar.gz)
+ORIGINAL_SOURCE(https://github.com/abseil/abseil-cpp/archive/20240116.2.tar.gz)
 
 NO_RUNTIME()
 
diff --git a/contrib/restricted/abseil-cpp-tstring/y_absl/base/config.h b/contrib/restricted/abseil-cpp-tstring/y_absl/base/config.h
index ad8b509e7e..22bbf3c0b5 100644
--- a/contrib/restricted/abseil-cpp-tstring/y_absl/base/config.h
+++ b/contrib/restricted/abseil-cpp-tstring/y_absl/base/config.h
@@ -118,7 +118,7 @@
 // LTS releases can be obtained from
 // https://github.com/abseil/abseil-cpp/releases.
 #define Y_ABSL_LTS_RELEASE_VERSION 20240116
-#define Y_ABSL_LTS_RELEASE_PATCH_LEVEL 1
+#define Y_ABSL_LTS_RELEASE_PATCH_LEVEL 2
 
 // Helper macro to convert a CPP variable to a string literal.
 #define Y_ABSL_INTERNAL_DO_TOKEN_STR(x) #x
diff --git a/contrib/restricted/abseil-cpp-tstring/y_absl/functional/ya.make b/contrib/restricted/abseil-cpp-tstring/y_absl/functional/ya.make
index 939d073731..ac5695f072 100644
--- a/contrib/restricted/abseil-cpp-tstring/y_absl/functional/ya.make
+++ b/contrib/restricted/abseil-cpp-tstring/y_absl/functional/ya.make
@@ -6,9 +6,9 @@ LICENSE(Apache-2.0)
 
 LICENSE_TEXTS(.yandex_meta/licenses.list.txt)
 
-VERSION(20240116.1)
+VERSION(20240116.2)
 
-ORIGINAL_SOURCE(https://github.com/abseil/abseil-cpp/archive/20240116.1.tar.gz)
+ORIGINAL_SOURCE(https://github.com/abseil/abseil-cpp/archive/20240116.2.tar.gz)
 
 NO_RUNTIME()
 
diff --git a/contrib/restricted/abseil-cpp-tstring/y_absl/memory/ya.make b/contrib/restricted/abseil-cpp-tstring/y_absl/memory/ya.make
index 9599f83eeb..d1894c43e5 100644
--- a/contrib/restricted/abseil-cpp-tstring/y_absl/memory/ya.make
+++ b/contrib/restricted/abseil-cpp-tstring/y_absl/memory/ya.make
@@ -6,9 +6,9 @@ LICENSE(Apache-2.0)
 
 LICENSE_TEXTS(.yandex_meta/licenses.list.txt)
 
-VERSION(20240116.1)
+VERSION(20240116.2)
 
-ORIGINAL_SOURCE(https://github.com/abseil/abseil-cpp/archive/20240116.1.tar.gz)
+ORIGINAL_SOURCE(https://github.com/abseil/abseil-cpp/archive/20240116.2.tar.gz)
 
 PEERDIR(
     contrib/restricted/abseil-cpp-tstring/y_absl/meta
diff --git a/contrib/restricted/abseil-cpp-tstring/y_absl/meta/ya.make b/contrib/restricted/abseil-cpp-tstring/y_absl/meta/ya.make
index 3c9373d1ef..1b4070658f 100644
--- a/contrib/restricted/abseil-cpp-tstring/y_absl/meta/ya.make
+++ b/contrib/restricted/abseil-cpp-tstring/y_absl/meta/ya.make
@@ -6,9 +6,9 @@ LICENSE(Apache-2.0)
 
 LICENSE_TEXTS(.yandex_meta/licenses.list.txt)
 
-VERSION(20240116.1)
+VERSION(20240116.2)
 
-ORIGINAL_SOURCE(https://github.com/abseil/abseil-cpp/archive/20240116.1.tar.gz)
+ORIGINAL_SOURCE(https://github.com/abseil/abseil-cpp/archive/20240116.2.tar.gz)
 
 PEERDIR(
     contrib/restricted/abseil-cpp-tstring/y_absl/base
diff --git a/contrib/restricted/abseil-cpp-tstring/y_absl/strings/escaping.cc b/contrib/restricted/abseil-cpp-tstring/y_absl/strings/escaping.cc
index 28fa5ad969..78a706a1be 100644
--- a/contrib/restricted/abseil-cpp-tstring/y_absl/strings/escaping.cc
+++ b/contrib/restricted/abseil-cpp-tstring/y_absl/strings/escaping.cc
@@ -362,7 +362,7 @@ TString CEscapeInternal(y_absl::string_view src, bool use_hex,
 }
 
 /* clang-format off */
-constexpr unsigned char c_escaped_len[256] = {
+constexpr unsigned char kCEscapedLen[256] = {
     4, 4, 4, 4, 4, 4, 4, 4, 4, 2, 2, 4, 4, 2, 4, 4,  // \t, \n, \r
     4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
     1, 1, 2, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1,  // ", '
@@ -387,8 +387,23 @@ constexpr unsigned char c_escaped_len[256] = {
 // that UTF-8 bytes are not handled specially.
 inline size_t CEscapedLength(y_absl::string_view src) {
   size_t escaped_len = 0;
-  for (char c : src)
-    escaped_len += c_escaped_len[static_cast<unsigned char>(c)];
+  // The maximum value of kCEscapedLen[x] is 4, so we can escape any string of
+  // length size_t_max/4 without checking for overflow.
+  size_t unchecked_limit =
+      std::min<size_t>(src.size(), std::numeric_limits<size_t>::max() / 4);
+  size_t i = 0;
+  while (i < unchecked_limit) {
+    // Common case: No need to check for overflow.
+    escaped_len += kCEscapedLen[static_cast<unsigned char>(src[i++])];
+  }
+  while (i < src.size()) {
+    // Beyond unchecked_limit we need to check for overflow before adding.
+    size_t char_len = kCEscapedLen[static_cast<unsigned char>(src[i++])];
+    Y_ABSL_INTERNAL_CHECK(
+        escaped_len <= std::numeric_limits<size_t>::max() - char_len,
+        "escaped_len overflow");
+    escaped_len += char_len;
+  }
   return escaped_len;
 }
 
@@ -400,12 +415,15 @@ void CEscapeAndAppendInternal(y_absl::string_view src, TString* dest) {
   }
 
   size_t cur_dest_len = dest->size();
+  Y_ABSL_INTERNAL_CHECK(
+      cur_dest_len <= std::numeric_limits<size_t>::max() - escaped_len,
+      "TString size overflow");
   strings_internal::STLStringResizeUninitialized(dest,
                                                  cur_dest_len + escaped_len);
   char* append_ptr = &(*dest)[cur_dest_len];
 
   for (char c : src) {
-    size_t char_len = c_escaped_len[static_cast<unsigned char>(c)];
+    size_t char_len = kCEscapedLen[static_cast<unsigned char>(c)];
     if (char_len == 1) {
       *append_ptr++ = c;
     } else if (char_len == 2) {
diff --git a/contrib/restricted/abseil-cpp-tstring/y_absl/utility/ya.make b/contrib/restricted/abseil-cpp-tstring/y_absl/utility/ya.make
index 939d073731..ac5695f072 100644
--- a/contrib/restricted/abseil-cpp-tstring/y_absl/utility/ya.make
+++ b/contrib/restricted/abseil-cpp-tstring/y_absl/utility/ya.make
@@ -6,9 +6,9 @@ LICENSE(Apache-2.0)
 
 LICENSE_TEXTS(.yandex_meta/licenses.list.txt)
 
-VERSION(20240116.1)
+VERSION(20240116.2)
 
-ORIGINAL_SOURCE(https://github.com/abseil/abseil-cpp/archive/20240116.1.tar.gz)
+ORIGINAL_SOURCE(https://github.com/abseil/abseil-cpp/archive/20240116.2.tar.gz)
 
 NO_RUNTIME()
 
-- 
cgit v1.2.3


From 381118f6a4bd7b2f2439171e6e39c33f45b25a70 Mon Sep 17 00:00:00 2001
From: robot-brewer <robot-brewer@yandex-team.com>
Date: Wed, 10 Apr 2024 11:44:58 +0300
Subject: Release clang16 #4

https://github.com/yandex/toolchain-registry/releases/tag/clang16-v4
bd791eb38e9bb5efd12a5469c1c941876d59e515
---
 build/mapping.conf.json           | 10 ++++++++++
 build/platform/clang/clang16.json | 10 +++++-----
 2 files changed, 15 insertions(+), 5 deletions(-)

diff --git a/build/mapping.conf.json b/build/mapping.conf.json
index 9935e4a50c..47d2094f7f 100644
--- a/build/mapping.conf.json
+++ b/build/mapping.conf.json
@@ -80,18 +80,23 @@
         "360916612": "https://devtools-registry.s3.yandex.net/360916612",
         "4312064267": "https://devtools-registry.s3.yandex.net/4312064267",
         "4312063561": "https://devtools-registry.s3.yandex.net/4312063561",
+        "6140209067": "https://devtools-registry.s3.yandex.net/6140209067",
         "6033368058": "https://devtools-registry.s3.yandex.net/6033368058",
         "6016439034": "https://devtools-registry.s3.yandex.net/6016439034",
         "6023726156": "https://devtools-registry.s3.yandex.net/6023726156",
+        "6139882607": "https://devtools-registry.s3.yandex.net/6139882607",
         "6033369023": "https://devtools-registry.s3.yandex.net/6033369023",
         "6016474886": "https://devtools-registry.s3.yandex.net/6016474886",
         "6023744448": "https://devtools-registry.s3.yandex.net/6023744448",
+        "6139820676": "https://devtools-registry.s3.yandex.net/6139820676",
         "6033489391": "https://devtools-registry.s3.yandex.net/6033489391",
         "6016673656": "https://devtools-registry.s3.yandex.net/6016673656",
         "6023846084": "https://devtools-registry.s3.yandex.net/6023846084",
+        "6139782997": "https://devtools-registry.s3.yandex.net/6139782997",
         "6033465229": "https://devtools-registry.s3.yandex.net/6033465229",
         "6016864019": "https://devtools-registry.s3.yandex.net/6016864019",
         "6023877997": "https://devtools-registry.s3.yandex.net/6023877997",
+        "6139792533": "https://devtools-registry.s3.yandex.net/6139792533",
         "6033421763": "https://devtools-registry.s3.yandex.net/6033421763",
         "6017210355": "https://devtools-registry.s3.yandex.net/6017210355",
         "6024131244": "https://devtools-registry.s3.yandex.net/6024131244",
@@ -503,18 +508,23 @@
         "360916612": "binutils 2.26 for linux_ubuntu_10.04_lucid",
         "4312064267": "black_linter for linux",
         "4312063561": "black_linter for linux-aarch64",
+        "6140209067": "clang-16-darwin-arm64-29085bdbacf3a977f3f7e0e53f553dd1445da84f",
         "6033368058": "clang-16-darwin-arm64-4a1002ac4598237a2d1439e314fbecda678cbb8e",
         "6016439034": "clang-16-darwin-arm64-f116dc6707c5baf24345777e6c4730785eff4535",
         "6023726156": "clang-16-darwin-arm64-f116dc6707c5baf24345777e6c4730785eff4535",
+        "6139882607": "clang-16-darwin-x86_64-29085bdbacf3a977f3f7e0e53f553dd1445da84f",
         "6033369023": "clang-16-darwin-x86_64-4a1002ac4598237a2d1439e314fbecda678cbb8e",
         "6016474886": "clang-16-darwin-x86_64-f116dc6707c5baf24345777e6c4730785eff4535",
         "6023744448": "clang-16-darwin-x86_64-f116dc6707c5baf24345777e6c4730785eff4535",
+        "6139820676": "clang-16-linux-aarch64-29085bdbacf3a977f3f7e0e53f553dd1445da84f",
         "6033489391": "clang-16-linux-aarch64-4a1002ac4598237a2d1439e314fbecda678cbb8e",
         "6016673656": "clang-16-linux-aarch64-f116dc6707c5baf24345777e6c4730785eff4535",
         "6023846084": "clang-16-linux-aarch64-f116dc6707c5baf24345777e6c4730785eff4535",
+        "6139782997": "clang-16-linux-x86_64-29085bdbacf3a977f3f7e0e53f553dd1445da84f",
         "6033465229": "clang-16-linux-x86_64-4a1002ac4598237a2d1439e314fbecda678cbb8e",
         "6016864019": "clang-16-linux-x86_64-f116dc6707c5baf24345777e6c4730785eff4535",
         "6023877997": "clang-16-linux-x86_64-f116dc6707c5baf24345777e6c4730785eff4535",
+        "6139792533": "clang-16-mingw-w64-x86_64-29085bdbacf3a977f3f7e0e53f553dd1445da84f",
         "6033421763": "clang-16-mingw-w64-x86_64-4a1002ac4598237a2d1439e314fbecda678cbb8e",
         "6017210355": "clang-16-mingw-w64-x86_64-f116dc6707c5baf24345777e6c4730785eff4535",
         "6024131244": "clang-16-mingw-w64-x86_64-f116dc6707c5baf24345777e6c4730785eff4535",
diff --git a/build/platform/clang/clang16.json b/build/platform/clang/clang16.json
index f9d6146a0f..3ac0b53b62 100644
--- a/build/platform/clang/clang16.json
+++ b/build/platform/clang/clang16.json
@@ -1,19 +1,19 @@
 {
     "by_platform": {
         "darwin-arm64": {
-            "uri": "sbr:6033368058"
+            "uri": "sbr:6140209067"
         },
         "darwin-x86_64": {
-            "uri": "sbr:6033369023"
+            "uri": "sbr:6139882607"
         },
         "linux-aarch64": {
-            "uri": "sbr:6033489391"
+            "uri": "sbr:6139820676"
         },
         "linux-x86_64": {
-            "uri": "sbr:6033465229"
+            "uri": "sbr:6139782997"
         },
         "win32-x86_64": {
-            "uri": "sbr:6033421763"
+            "uri": "sbr:6139792533"
         }
     }
 }
-- 
cgit v1.2.3


From de913c5eab1470b85e31fe69ba6dc0cabb7a990b Mon Sep 17 00:00:00 2001
From: thevery <thevery@yandex-team.com>
Date: Wed, 10 Apr 2024 13:04:56 +0300
Subject: replace `OWNER` with `SUBSCRIBER` for build/
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Привет! В рамках [задачи по наведению порядка в Аркадии](https://clubs.at.yandex-team.ru/arcadia/30094) заменяем OWNER на SUBSCRIBER в ya.make, чтобы в будущем переключить ревью на a.yaml.
Этот пуллреквест приносит чисто технические изменения, правила и уведомления про ревью не меняются.
66643ef2ea3057cb2bdcd789ca7302eceeb936b1
---
 build/config/tests/flake8/ya.make                                  | 2 +-
 build/plugins/lib/nots/package_manager/base/tests/ya.make          | 2 +-
 build/plugins/lib/nots/package_manager/base/ya.make                | 2 +-
 build/plugins/lib/nots/package_manager/pnpm/tests/ya.make          | 2 +-
 build/plugins/lib/nots/package_manager/pnpm/ya.make                | 2 +-
 build/plugins/lib/nots/package_manager/ya.make                     | 2 +-
 build/plugins/lib/nots/semver/tests/ya.make                        | 2 +-
 build/plugins/lib/nots/semver/ya.make                              | 2 +-
 build/plugins/lib/nots/test_utils/ya.make                          | 2 +-
 build/plugins/lib/nots/typescript/tests/ya.make                    | 2 +-
 build/plugins/lib/nots/typescript/ya.make                          | 2 +-
 build/plugins/lib/nots/ya.make                                     | 2 +-
 build/plugins/lib/proxy/ya.make                                    | 2 +-
 build/plugins/lib/test_const/proxy/ya.make                         | 2 +-
 build/plugins/lib/test_const/ya.make                               | 2 +-
 build/plugins/lib/tests/ruff/ya.make                               | 2 +-
 build/plugins/lib/ya.make                                          | 2 +-
 build/plugins/tests/fake_ymake/ya.make                             | 2 +-
 build/plugins/tests/ya.make                                        | 2 +-
 build/plugins/ya.make                                              | 2 +-
 build/prebuilt/contrib/tools/protoc/plugins/cpp_styleguide/ya.make | 2 +-
 build/prebuilt/tools/rorescompiler/ya.make                         | 2 +-
 build/scripts/c_templates/ya.make                                  | 2 +-
 build/scripts/ya.make                                              | 2 +-
 build/sysincl/check/ya.make                                        | 2 +-
 25 files changed, 25 insertions(+), 25 deletions(-)

diff --git a/build/config/tests/flake8/ya.make b/build/config/tests/flake8/ya.make
index c4ba4105e0..26fea17afd 100644
--- a/build/config/tests/flake8/ya.make
+++ b/build/config/tests/flake8/ya.make
@@ -1,4 +1,4 @@
-OWNER(
+SUBSCRIBER(
     g:python-committee
     g:yatest
 )
diff --git a/build/plugins/lib/nots/package_manager/base/tests/ya.make b/build/plugins/lib/nots/package_manager/base/tests/ya.make
index bd7cefd3e0..2b19692dae 100644
--- a/build/plugins/lib/nots/package_manager/base/tests/ya.make
+++ b/build/plugins/lib/nots/package_manager/base/tests/ya.make
@@ -1,4 +1,4 @@
-OWNER(g:frontend-build-platform)
+SUBSCRIBER(g:frontend-build-platform)
 
 PY3TEST()
 
diff --git a/build/plugins/lib/nots/package_manager/base/ya.make b/build/plugins/lib/nots/package_manager/base/ya.make
index bf17567398..d377a48cf4 100644
--- a/build/plugins/lib/nots/package_manager/base/ya.make
+++ b/build/plugins/lib/nots/package_manager/base/ya.make
@@ -1,4 +1,4 @@
-OWNER(g:frontend-build-platform)
+SUBSCRIBER(g:frontend-build-platform)
 
 PY3_LIBRARY()
 
diff --git a/build/plugins/lib/nots/package_manager/pnpm/tests/ya.make b/build/plugins/lib/nots/package_manager/pnpm/tests/ya.make
index db3c4f866a..cdfe9a7a30 100644
--- a/build/plugins/lib/nots/package_manager/pnpm/tests/ya.make
+++ b/build/plugins/lib/nots/package_manager/pnpm/tests/ya.make
@@ -1,4 +1,4 @@
-OWNER(g:frontend-build-platform)
+SUBSCRIBER(g:frontend-build-platform)
 
 PY3TEST()
 
diff --git a/build/plugins/lib/nots/package_manager/pnpm/ya.make b/build/plugins/lib/nots/package_manager/pnpm/ya.make
index fb63704ad7..e91015a350 100644
--- a/build/plugins/lib/nots/package_manager/pnpm/ya.make
+++ b/build/plugins/lib/nots/package_manager/pnpm/ya.make
@@ -1,4 +1,4 @@
-OWNER(g:frontend-build-platform)
+SUBSCRIBER(g:frontend-build-platform)
 
 PY3_LIBRARY()
 
diff --git a/build/plugins/lib/nots/package_manager/ya.make b/build/plugins/lib/nots/package_manager/ya.make
index 0f95528ffd..b521d20ba7 100644
--- a/build/plugins/lib/nots/package_manager/ya.make
+++ b/build/plugins/lib/nots/package_manager/ya.make
@@ -1,4 +1,4 @@
-OWNER(g:frontend-build-platform)
+SUBSCRIBER(g:frontend-build-platform)
 
 PY3_LIBRARY()
 
diff --git a/build/plugins/lib/nots/semver/tests/ya.make b/build/plugins/lib/nots/semver/tests/ya.make
index b7605505f3..af08df2580 100644
--- a/build/plugins/lib/nots/semver/tests/ya.make
+++ b/build/plugins/lib/nots/semver/tests/ya.make
@@ -1,6 +1,6 @@
 PY3TEST()
 
-OWNER(g:frontend-build-platform)
+SUBSCRIBER(g:frontend-build-platform)
 
 PEERDIR(
     build/plugins/lib/nots/semver
diff --git a/build/plugins/lib/nots/semver/ya.make b/build/plugins/lib/nots/semver/ya.make
index 7cd83c2036..05addc2ac0 100644
--- a/build/plugins/lib/nots/semver/ya.make
+++ b/build/plugins/lib/nots/semver/ya.make
@@ -1,4 +1,4 @@
-OWNER(g:frontend-build-platform)
+SUBSCRIBER(g:frontend-build-platform)
 
 PY3_LIBRARY()
 
diff --git a/build/plugins/lib/nots/test_utils/ya.make b/build/plugins/lib/nots/test_utils/ya.make
index db2eb6af4b..4719052d4b 100644
--- a/build/plugins/lib/nots/test_utils/ya.make
+++ b/build/plugins/lib/nots/test_utils/ya.make
@@ -1,4 +1,4 @@
-OWNER(g:frontend-build-platform)
+SUBSCRIBER(g:frontend-build-platform)
 
 PY3_LIBRARY()
 
diff --git a/build/plugins/lib/nots/typescript/tests/ya.make b/build/plugins/lib/nots/typescript/tests/ya.make
index 5af512f420..3f6d1a7a54 100644
--- a/build/plugins/lib/nots/typescript/tests/ya.make
+++ b/build/plugins/lib/nots/typescript/tests/ya.make
@@ -1,6 +1,6 @@
 PY3TEST()
 
-OWNER(g:frontend-build-platform)
+SUBSCRIBER(g:frontend-build-platform)
 
 TEST_SRCS(
     test_ts_config.py
diff --git a/build/plugins/lib/nots/typescript/ya.make b/build/plugins/lib/nots/typescript/ya.make
index 2d37bf54ea..384db313e6 100644
--- a/build/plugins/lib/nots/typescript/ya.make
+++ b/build/plugins/lib/nots/typescript/ya.make
@@ -1,4 +1,4 @@
-OWNER(g:frontend-build-platform)
+SUBSCRIBER(g:frontend-build-platform)
 
 PY3_LIBRARY()
 
diff --git a/build/plugins/lib/nots/ya.make b/build/plugins/lib/nots/ya.make
index 4bccf87497..03690bbf3b 100644
--- a/build/plugins/lib/nots/ya.make
+++ b/build/plugins/lib/nots/ya.make
@@ -1,4 +1,4 @@
-OWNER(g:frontend-build-platform)
+SUBSCRIBER(g:frontend-build-platform)
 
 PY3_LIBRARY()
 
diff --git a/build/plugins/lib/proxy/ya.make b/build/plugins/lib/proxy/ya.make
index 4bf76a7d14..25633426c5 100644
--- a/build/plugins/lib/proxy/ya.make
+++ b/build/plugins/lib/proxy/ya.make
@@ -1,4 +1,4 @@
-OWNER(g:ymake)
+SUBSCRIBER(g:ymake)
 
 PY23_LIBRARY()
 
diff --git a/build/plugins/lib/test_const/proxy/ya.make b/build/plugins/lib/test_const/proxy/ya.make
index 1f01ef9e13..19099f18cb 100644
--- a/build/plugins/lib/test_const/proxy/ya.make
+++ b/build/plugins/lib/test_const/proxy/ya.make
@@ -1,4 +1,4 @@
-OWNER(g:ymake)
+SUBSCRIBER(g:ymake)
 
 PY23_LIBRARY()
 
diff --git a/build/plugins/lib/test_const/ya.make b/build/plugins/lib/test_const/ya.make
index 1d5c87e041..0d2fd8361c 100644
--- a/build/plugins/lib/test_const/ya.make
+++ b/build/plugins/lib/test_const/ya.make
@@ -1,4 +1,4 @@
-OWNER(g:ymake)
+SUBSCRIBER(g:ymake)
 
 PY23_LIBRARY()
 
diff --git a/build/plugins/lib/tests/ruff/ya.make b/build/plugins/lib/tests/ruff/ya.make
index 1d5c87e041..0d2fd8361c 100644
--- a/build/plugins/lib/tests/ruff/ya.make
+++ b/build/plugins/lib/tests/ruff/ya.make
@@ -1,4 +1,4 @@
-OWNER(g:ymake)
+SUBSCRIBER(g:ymake)
 
 PY23_LIBRARY()
 
diff --git a/build/plugins/lib/ya.make b/build/plugins/lib/ya.make
index f2a8fbf0ab..dd74124645 100644
--- a/build/plugins/lib/ya.make
+++ b/build/plugins/lib/ya.make
@@ -1,4 +1,4 @@
-OWNER(g:ymake)
+SUBSCRIBER(g:ymake)
 
 PY23_LIBRARY()
 
diff --git a/build/plugins/tests/fake_ymake/ya.make b/build/plugins/tests/fake_ymake/ya.make
index 500755e223..4d054ab72a 100644
--- a/build/plugins/tests/fake_ymake/ya.make
+++ b/build/plugins/tests/fake_ymake/ya.make
@@ -1,4 +1,4 @@
-OWNER(g:ymake)
+SUBSCRIBER(g:ymake)
 
 PY23_LIBRARY()
 
diff --git a/build/plugins/tests/ya.make b/build/plugins/tests/ya.make
index c1c0860791..e058b41b3f 100644
--- a/build/plugins/tests/ya.make
+++ b/build/plugins/tests/ya.make
@@ -1,6 +1,6 @@
 PY3TEST()
 
-OWNER(g:ymake)
+SUBSCRIBER(g:ymake)
 
 TEST_SRCS(
     test_common.py
diff --git a/build/plugins/ya.make b/build/plugins/ya.make
index e55053fb9f..e4368474ea 100644
--- a/build/plugins/ya.make
+++ b/build/plugins/ya.make
@@ -1,4 +1,4 @@
-OWNER(g:ymake)
+SUBSCRIBER(g:ymake)
 
 PY3_LIBRARY()
 
diff --git a/build/prebuilt/contrib/tools/protoc/plugins/cpp_styleguide/ya.make b/build/prebuilt/contrib/tools/protoc/plugins/cpp_styleguide/ya.make
index a829e49648..f3771b8cf9 100644
--- a/build/prebuilt/contrib/tools/protoc/plugins/cpp_styleguide/ya.make
+++ b/build/prebuilt/contrib/tools/protoc/plugins/cpp_styleguide/ya.make
@@ -1,4 +1,4 @@
-OWNER(g:ymake)
+SUBSCRIBER(g:ymake)
 
 INCLUDE(ya.make.prebuilt)
 
diff --git a/build/prebuilt/tools/rorescompiler/ya.make b/build/prebuilt/tools/rorescompiler/ya.make
index 2b1798c435..e3925e2550 100644
--- a/build/prebuilt/tools/rorescompiler/ya.make
+++ b/build/prebuilt/tools/rorescompiler/ya.make
@@ -1,4 +1,4 @@
-OWNER(g:ymake)
+SUBSCRIBER(g:ymake)
 
 INCLUDE(ya.make.prebuilt)
 
diff --git a/build/scripts/c_templates/ya.make b/build/scripts/c_templates/ya.make
index 232f3b86de..dd5b27e787 100644
--- a/build/scripts/c_templates/ya.make
+++ b/build/scripts/c_templates/ya.make
@@ -1,4 +1,4 @@
-OWNER(g:ymake)
+SUBSCRIBER(g:ymake)
 
 LIBRARY(dummy-vcs)
 
diff --git a/build/scripts/ya.make b/build/scripts/ya.make
index 1433d4e738..c5e310d387 100644
--- a/build/scripts/ya.make
+++ b/build/scripts/ya.make
@@ -1,4 +1,4 @@
-OWNER(g:ymake)
+SUBSCRIBER(g:ymake)
 
 PY23_TEST()
 
diff --git a/build/sysincl/check/ya.make b/build/sysincl/check/ya.make
index af09f4695d..6a03ed6c29 100644
--- a/build/sysincl/check/ya.make
+++ b/build/sysincl/check/ya.make
@@ -1,4 +1,4 @@
-OWNER(g:ymake)
+SUBSCRIBER(g:ymake)
 
 LIBRARY()
 
-- 
cgit v1.2.3


From 3140423be6b60b852ae783b8c77918080f3ed5dc Mon Sep 17 00:00:00 2001
From: robot-brewer <robot-brewer@yandex-team.com>
Date: Wed, 10 Apr 2024 13:13:06 +0300
Subject: Release gdb14 #6

https://github.com/yandex/toolchain-registry/releases/tag/gdb14-v6
e34413315b5e531a8360c47b097cf82c51f1b612
---
 build/external_resources/gdb/resources.json | 16 ++++++++--------
 build/mapping.conf.json                     |  4 ++++
 2 files changed, 12 insertions(+), 8 deletions(-)

diff --git a/build/external_resources/gdb/resources.json b/build/external_resources/gdb/resources.json
index f6fb23fc8b..2ac3f573e2 100644
--- a/build/external_resources/gdb/resources.json
+++ b/build/external_resources/gdb/resources.json
@@ -1,18 +1,18 @@
 {
     "by_platform": {
-        "darwin-x86_64": {
-            "uri": "sbr:3833498694"
-        },
         "darwin-arm64": {
             "uri": "sbr:2319130389"
         },
-        "linux-x86_64": {
-            "uri": "sbr:5829731950"
+        "darwin-x86_64": {
+            "uri": "sbr:3833498694"
         },
         "linux-aarch64": {
-            "uri": "sbr:5720688825"
+            "uri": "sbr:6133337898"
+        },
+        "linux-x86_64": {
+            "uri": "sbr:6133419349"
         }
     },
-    "platform_replacements": {},
-    "match": "GDB"
+    "match": "GDB",
+    "platform_replacements": {}
 }
diff --git a/build/mapping.conf.json b/build/mapping.conf.json
index 47d2094f7f..56a96edd45 100644
--- a/build/mapping.conf.json
+++ b/build/mapping.conf.json
@@ -326,6 +326,8 @@
         "4307901240": "https://devtools-registry.s3.yandex.net/4307901240",
         "5517239368": "https://devtools-registry.s3.yandex.net/5517239368",
         "3833498694": "https://devtools-registry.s3.yandex.net/3833498694",
+        "6133337898": "https://devtools-registry.s3.yandex.net/6133337898",
+        "6133419349": "https://devtools-registry.s3.yandex.net/6133419349",
         "1277521710": "https://devtools-registry.s3.yandex.net/1277521710",
         "5776380974": "https://devtools-registry.s3.yandex.net/5776380974",
         "5777101734": "https://devtools-registry.s3.yandex.net/5777101734",
@@ -754,6 +756,8 @@
         "4307901240": "flake8_linter for linux-aarch64",
         "5517239368": "flake8_linter for linux-aarch64",
         "3833498694": "gdb 11.2 for osx_10.15_catalina",
+        "6133337898": "gdb-14-linux-aarch64-b1fa9be28bbf4ee845d6a39a049c7b60018a3695",
+        "6133419349": "gdb-14-linux-x86_64-b1fa9be28bbf4ee845d6a39a049c7b60018a3695",
         "1277521710": "infra/kernel/tools/atop/build/atop-static.tar.gz",
         "5776380974": "none-none-none-result_resources/jdk-darwin-aarch64.yandex.tgz",
         "5777101734": "none-none-none-result_resources/jdk-darwin-aarch64.yandex.tgz",
-- 
cgit v1.2.3


From bdc46f7c95745f1208bd629fe35758738b0d2a9d Mon Sep 17 00:00:00 2001
From: aleksandra-zh <aleksandra-zh@yandex-team.com>
Date: Wed, 10 Apr 2024 13:28:50 +0300
Subject: Fix Sequoia transaction ids 1bebbbb33625250f0c9e78165219b3dc27200b01

---
 yt/yt/client/api/transaction_client.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/yt/yt/client/api/transaction_client.h b/yt/yt/client/api/transaction_client.h
index 7b22f1e6d0..5b45016029 100644
--- a/yt/yt/client/api/transaction_client.h
+++ b/yt/yt/client/api/transaction_client.h
@@ -16,6 +16,8 @@ struct TTransactionStartOptions
     //! If not null then the transaction must use this externally provided id.
     //! Only applicable to tablet transactions.
     NTransactionClient::TTransactionId Id;
+    //! Cell tag used for id generation. Used for Sequoia transactions.
+    std::optional<NObjectClient::TCellTag> CellTag;
 
     NTransactionClient::TTransactionId ParentId;
     std::vector<NTransactionClient::TTransactionId> PrerequisiteTransactionIds;
-- 
cgit v1.2.3


From 52603dfdb4ba2e1e9d91b983b7bdaebf46d80fc0 Mon Sep 17 00:00:00 2001
From: mikhailche <mikhailche@yandex-team.com>
Date: Wed, 10 Apr 2024 14:01:09 +0300
Subject: Change "build/ymake.core.conf"
 81d323704caa7ff3a58fc18b7216bd9242c01a1d

---
 build/ymake.core.conf | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/build/ymake.core.conf b/build/ymake.core.conf
index 98cd9889fb..55b6f2c56d 100644
--- a/build/ymake.core.conf
+++ b/build/ymake.core.conf
@@ -1641,7 +1641,7 @@ macro NO_LINT(ktlint?"ktlint":"none") {
     SET(_NO_LINT_VALUE ${ktlint})
 }
 
-### @usage: LINT(<none|base|strict>)
+### @usage: LINT(<none|base|strict|extended>)
 ###
 ### Set linting level for sources of the module
 macro LINT(level) {
-- 
cgit v1.2.3


From 7af3451bbcc191bea04a7d6eb191af072971aca9 Mon Sep 17 00:00:00 2001
From: khoden <khoden@yandex-team.com>
Date: Wed, 10 Apr 2024 14:56:14 +0300
Subject: =?UTF-8?q?docs:=20=D0=97=D0=B0=D0=BA=D0=BE=D0=BF=D0=B0=D1=82?=
 =?UTF-8?q?=D1=8C=20=D1=81=D1=82=D0=B0=D1=80=D1=83=D1=8E=20=D0=B4=D0=BE?=
 =?UTF-8?q?=D0=BA=D1=83=D0=BC=D0=B5=D0=BD=D1=82=D0=B0=D1=86=D0=B8=D1=8E=20?=
 =?UTF-8?q?(FBP=20related)?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Результат работы нового инструмента `/junk/khoden/arc_replacer` для нашего кода

Изменения в других местах (у пользователей) - в [отдельном PR](https://a.yandex-team.ru/review/5706083)
dd84e51222d99393858aee390598bfb15c3162d5
---
 build/plugins/nots.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/build/plugins/nots.py b/build/plugins/nots.py
index dac4628082..f40e2b4155 100644
--- a/build/plugins/nots.py
+++ b/build/plugins/nots.py
@@ -531,7 +531,7 @@ def _select_matching_version(erm_json, resource_name, range_str, dep_is_required
                 resource_name,
                 range_str,
                 ", ".join(map(str, toolchain_versions)),
-                "https://docs.yandex-team.ru/ya-make/manual/typescript/toolchain",
+                "https://docs.yandex-team.ru/frontend-in-arcadia/_generated/toolchain",
                 str(error),
             )
         )
-- 
cgit v1.2.3


From 4ab2eba58c83838f0830a1f200a3c3bbb81592da Mon Sep 17 00:00:00 2001
From: robot-ydb-importer <robot-ydb-importer@yandex-team.com>
Date: Wed, 10 Apr 2024 15:34:01 +0300
Subject: YDB Import 593 3c9be2821637ff70380f40cad2d26b1db536740c

---
 contrib/libs/dtl/ya.make                           |    2 -
 contrib/libs/libpq/COPYRIGHT                       |   23 -
 contrib/libs/libpq/README                          |   27 -
 contrib/libs/libpq/README.git                      |   14 -
 .../libpq/src/backend/catalog/pg_tablespace_d.h    |   38 -
 .../src/backend/utils/README.Gen_dummy_probes      |   27 -
 contrib/libs/libpq/src/backend/utils/errcodes.h    |  354 -
 contrib/libs/libpq/src/common/archive.c            |   60 -
 contrib/libs/libpq/src/common/base64.c             |  242 -
 contrib/libs/libpq/src/common/checksum_helper.c    |  232 -
 contrib/libs/libpq/src/common/compression.c        |  476 -
 contrib/libs/libpq/src/common/config_info.c        |  201 -
 contrib/libs/libpq/src/common/controldata_utils.c  |  269 -
 contrib/libs/libpq/src/common/cryptohash_openssl.c |  353 -
 contrib/libs/libpq/src/common/d2s.c                | 1076 ---
 contrib/libs/libpq/src/common/d2s_full_table.h     |  358 -
 contrib/libs/libpq/src/common/d2s_intrinsics.h     |  202 -
 contrib/libs/libpq/src/common/digit_table.h        |   21 -
 contrib/libs/libpq/src/common/encnames.c           |  598 --
 contrib/libs/libpq/src/common/exec.c               |  719 --
 contrib/libs/libpq/src/common/f2s.c                |  803 --
 contrib/libs/libpq/src/common/fe_memutils.c        |  175 -
 contrib/libs/libpq/src/common/file_perm.c          |   91 -
 contrib/libs/libpq/src/common/file_utils.c         |  582 --
 contrib/libs/libpq/src/common/hashfn.c             |  692 --
 contrib/libs/libpq/src/common/hmac_openssl.c       |  348 -
 contrib/libs/libpq/src/common/ip.c                 |  262 -
 contrib/libs/libpq/src/common/jsonapi.c            | 1206 ---
 contrib/libs/libpq/src/common/keywords.c           |   48 -
 contrib/libs/libpq/src/common/kwlist_d.h           | 1119 ---
 contrib/libs/libpq/src/common/kwlookup.c           |   85 -
 contrib/libs/libpq/src/common/link-canary.c        |   36 -
 contrib/libs/libpq/src/common/logging.c            |  334 -
 contrib/libs/libpq/src/common/md5_common.c         |  172 -
 contrib/libs/libpq/src/common/percentrepl.c        |  137 -
 contrib/libs/libpq/src/common/pg_get_line.c        |  180 -
 contrib/libs/libpq/src/common/pg_lzcompress.c      |  876 --
 contrib/libs/libpq/src/common/pg_prng.c            |  282 -
 contrib/libs/libpq/src/common/pgfnames.c           |   94 -
 contrib/libs/libpq/src/common/protocol_openssl.c   |  117 -
 contrib/libs/libpq/src/common/psprintf.c           |  151 -
 contrib/libs/libpq/src/common/relpath.c            |  210 -
 contrib/libs/libpq/src/common/restricted_token.c   |  174 -
 contrib/libs/libpq/src/common/rmtree.c             |  130 -
 contrib/libs/libpq/src/common/ryu_common.h         |  133 -
 contrib/libs/libpq/src/common/saslprep.c           | 1245 ---
 contrib/libs/libpq/src/common/scram-common.c       |  330 -
 contrib/libs/libpq/src/common/sprompt.c            |  181 -
 contrib/libs/libpq/src/common/string.c             |  164 -
 contrib/libs/libpq/src/common/stringinfo.c         |  343 -
 contrib/libs/libpq/src/common/unicode_norm.c       |  634 --
 contrib/libs/libpq/src/common/username.c           |   87 -
 contrib/libs/libpq/src/common/wait_error.c         |  148 -
 contrib/libs/libpq/src/common/wchar.c              | 2194 -----
 contrib/libs/libpq/src/include/access/rmgr.h       |   62 -
 contrib/libs/libpq/src/include/access/rmgrlist.h   |   49 -
 contrib/libs/libpq/src/include/access/transam.h    |  375 -
 .../libs/libpq/src/include/access/xlog_internal.h  |  404 -
 contrib/libs/libpq/src/include/access/xlogdefs.h   |   82 -
 contrib/libs/libpq/src/include/access/xlogreader.h |  444 -
 contrib/libs/libpq/src/include/access/xlogrecord.h |  248 -
 contrib/libs/libpq/src/include/c.h                 | 1383 ---
 .../libs/libpq/src/include/catalog/catversion.h    |   62 -
 .../libs/libpq/src/include/catalog/pg_control.h    |  258 -
 contrib/libs/libpq/src/include/common/archive.h    |   21 -
 contrib/libs/libpq/src/include/common/base64.h     |   19 -
 .../libpq/src/include/common/checksum_helper.h     |   72 -
 .../libs/libpq/src/include/common/compression.h    |   53 -
 .../libs/libpq/src/include/common/config_info.h    |   21 -
 .../libpq/src/include/common/controldata_utils.h   |   19 -
 contrib/libs/libpq/src/include/common/cryptohash.h |   39 -
 .../libs/libpq/src/include/common/fe_memutils.h    |   73 -
 contrib/libs/libpq/src/include/common/file_perm.h  |   56 -
 contrib/libs/libpq/src/include/common/file_utils.h |   49 -
 contrib/libs/libpq/src/include/common/hashfn.h     |  104 -
 contrib/libs/libpq/src/include/common/hmac.h       |   30 -
 contrib/libs/libpq/src/include/common/ip.h         |   33 -
 contrib/libs/libpq/src/include/common/jsonapi.h    |  177 -
 contrib/libs/libpq/src/include/common/keywords.h   |   29 -
 contrib/libs/libpq/src/include/common/kwlookup.h   |   44 -
 .../libs/libpq/src/include/common/link-canary.h    |   17 -
 contrib/libs/libpq/src/include/common/logging.h    |  156 -
 contrib/libs/libpq/src/include/common/md5.h        |   37 -
 contrib/libs/libpq/src/include/common/openssl.h    |   49 -
 .../libs/libpq/src/include/common/percentrepl.h    |   18 -
 .../libs/libpq/src/include/common/pg_lzcompress.h  |   93 -
 contrib/libs/libpq/src/include/common/pg_prng.h    |   61 -
 contrib/libs/libpq/src/include/common/relpath.h    |   97 -
 .../libpq/src/include/common/restricted_token.h    |   24 -
 contrib/libs/libpq/src/include/common/saslprep.h   |   30 -
 .../libs/libpq/src/include/common/scram-common.h   |   70 -
 contrib/libs/libpq/src/include/common/sha1.h       |   21 -
 contrib/libs/libpq/src/include/common/sha2.h       |   32 -
 .../libs/libpq/src/include/common/shortest_dec.h   |   63 -
 contrib/libs/libpq/src/include/common/string.h     |   44 -
 .../include/common/unicode_east_asian_fw_table.h   |  125 -
 .../src/include/common/unicode_nonspacing_table.h  |  326 -
 .../libs/libpq/src/include/common/unicode_norm.h   |   39 -
 .../libpq/src/include/common/unicode_norm_table.h  | 9114 --------------------
 contrib/libs/libpq/src/include/common/username.h   |   15 -
 .../libs/libpq/src/include/datatype/timestamp.h    |  243 -
 contrib/libs/libpq/src/include/lib/sort_template.h |  432 -
 contrib/libs/libpq/src/include/lib/stringinfo.h    |  161 -
 contrib/libs/libpq/src/include/libpq/libpq-fs.h    |   24 -
 contrib/libs/libpq/src/include/libpq/pqcomm.h      |  163 -
 contrib/libs/libpq/src/include/mb/pg_wchar.h       |  703 --
 contrib/libs/libpq/src/include/parser/kwlist.h     |  498 --
 .../libpq/src/include/pg_config-linux-aarch64.h    |    6 -
 contrib/libs/libpq/src/include/pg_config-linux.h   |  825 --
 .../libs/libpq/src/include/pg_config-osx-arm64.h   |  159 -
 contrib/libs/libpq/src/include/pg_config-osx.h     |  156 -
 contrib/libs/libpq/src/include/pg_config-win.h     |  318 -
 contrib/libs/libpq/src/include/pg_config.h         |   13 -
 contrib/libs/libpq/src/include/pg_config_ext.h     |    8 -
 contrib/libs/libpq/src/include/pg_config_manual.h  |  372 -
 .../libs/libpq/src/include/pg_config_os-linux.h    |    1 -
 contrib/libs/libpq/src/include/pg_config_os-osx.h  |    1 -
 contrib/libs/libpq/src/include/pg_config_os-win.h  |    1 -
 contrib/libs/libpq/src/include/pg_config_os.h      |    9 -
 contrib/libs/libpq/src/include/pgtar.h             |   45 -
 contrib/libs/libpq/src/include/pgtime.h            |   94 -
 contrib/libs/libpq/src/include/port.h              |  520 --
 contrib/libs/libpq/src/include/port/darwin.h       |    8 -
 contrib/libs/libpq/src/include/port/linux.h        |   22 -
 contrib/libs/libpq/src/include/port/pg_bitutils.h  |  339 -
 contrib/libs/libpq/src/include/port/pg_bswap.h     |  161 -
 contrib/libs/libpq/src/include/port/pg_crc32c.h    |  101 -
 contrib/libs/libpq/src/include/port/pg_iovec.h     |   55 -
 contrib/libs/libpq/src/include/port/pg_lfind.h     |  180 -
 contrib/libs/libpq/src/include/port/simd.h         |  375 -
 contrib/libs/libpq/src/include/port/win32.h        |   60 -
 .../libs/libpq/src/include/port/win32/arpa/inet.h  |    3 -
 contrib/libs/libpq/src/include/port/win32/netdb.h  |    7 -
 .../libs/libpq/src/include/port/win32/netinet/in.h |    3 -
 .../libpq/src/include/port/win32/netinet/tcp.h     |    7 -
 contrib/libs/libpq/src/include/port/win32/pwd.h    |    3 -
 .../libs/libpq/src/include/port/win32/sys/select.h |    3 -
 .../libs/libpq/src/include/port/win32/sys/socket.h |   26 -
 contrib/libs/libpq/src/include/port/win32/sys/un.h |   17 -
 .../libs/libpq/src/include/port/win32/sys/wait.h   |    3 -
 .../libpq/src/include/port/win32_msvc/dirent.h     |   34 -
 .../libpq/src/include/port/win32_msvc/sys/file.h   |    1 -
 .../libpq/src/include/port/win32_msvc/sys/param.h  |    1 -
 .../libpq/src/include/port/win32_msvc/sys/time.h   |    1 -
 .../libpq/src/include/port/win32_msvc/unistd.h     |    9 -
 contrib/libs/libpq/src/include/port/win32_port.h   |  594 --
 contrib/libs/libpq/src/include/port/win32ntdll.h   |   34 -
 contrib/libs/libpq/src/include/postgres.h          |  579 --
 contrib/libs/libpq/src/include/postgres_ext.h      |   73 -
 contrib/libs/libpq/src/include/postgres_fe.h       |   29 -
 contrib/libs/libpq/src/include/storage/backendid.h |   37 -
 contrib/libs/libpq/src/include/storage/block.h     |  108 -
 contrib/libs/libpq/src/include/storage/buf.h       |   46 -
 .../libpq/src/include/storage/relfilelocator.h     |   99 -
 contrib/libs/libpq/src/include/utils/ascii.h       |   84 -
 contrib/libs/libpq/src/include/utils/elog.h        |  545 --
 contrib/libs/libpq/src/include/utils/palloc.h      |  165 -
 contrib/libs/libpq/src/interfaces/libpq/README     |    3 -
 .../libs/libpq/src/interfaces/libpq/exports.txt    |  189 -
 .../libs/libpq/src/interfaces/libpq/fe-auth-sasl.h |  131 -
 .../libpq/src/interfaces/libpq/fe-auth-scram.c     |  936 --
 contrib/libs/libpq/src/interfaces/libpq/fe-auth.c  | 1385 ---
 contrib/libs/libpq/src/interfaces/libpq/fe-auth.h  |   32 -
 .../libs/libpq/src/interfaces/libpq/fe-connect.c   | 7831 -----------------
 contrib/libs/libpq/src/interfaces/libpq/fe-exec.c  | 4474 ----------
 contrib/libs/libpq/src/interfaces/libpq/fe-lobj.c  | 1064 ---
 contrib/libs/libpq/src/interfaces/libpq/fe-misc.c  | 1333 ---
 contrib/libs/libpq/src/interfaces/libpq/fe-print.c |  773 --
 .../libs/libpq/src/interfaces/libpq/fe-protocol3.c | 2301 -----
 .../libpq/src/interfaces/libpq/fe-secure-common.c  |  307 -
 .../libpq/src/interfaces/libpq/fe-secure-common.h  |   30 -
 .../libpq/src/interfaces/libpq/fe-secure-openssl.c | 2093 -----
 .../libs/libpq/src/interfaces/libpq/fe-secure.c    |  618 --
 contrib/libs/libpq/src/interfaces/libpq/fe-trace.c |  729 --
 .../libs/libpq/src/interfaces/libpq/libpq-events.c |  211 -
 .../libs/libpq/src/interfaces/libpq/libpq-events.h |   94 -
 contrib/libs/libpq/src/interfaces/libpq/libpq-fe.h |  675 --
 .../libs/libpq/src/interfaces/libpq/libpq-int.h    |  940 --
 .../libs/libpq/src/interfaces/libpq/pqexpbuffer.c  |  412 -
 .../libs/libpq/src/interfaces/libpq/pqexpbuffer.h  |  192 -
 .../libpq/src/interfaces/libpq/pthread-win32.c     |   60 -
 contrib/libs/libpq/src/interfaces/libpq/win32.c    |  320 -
 contrib/libs/libpq/src/port/README                 |   32 -
 contrib/libs/libpq/src/port/bsearch_arg.c          |   78 -
 contrib/libs/libpq/src/port/chklocale.c            |  433 -
 contrib/libs/libpq/src/port/dirmod.c               |  422 -
 contrib/libs/libpq/src/port/getpeereid.c           |   78 -
 contrib/libs/libpq/src/port/inet_aton.c            |  149 -
 contrib/libs/libpq/src/port/inet_net_ntop.c        |  296 -
 contrib/libs/libpq/src/port/noblock.c              |   66 -
 contrib/libs/libpq/src/port/open.c                 |  222 -
 contrib/libs/libpq/src/port/path.c                 | 1057 ---
 contrib/libs/libpq/src/port/pg_bitutils.c          |  335 -
 contrib/libs/libpq/src/port/pg_config_paths.h      |   12 -
 contrib/libs/libpq/src/port/pg_crc32c_sb8.c        | 1169 ---
 contrib/libs/libpq/src/port/pg_crc32c_sse42.c      |   69 -
 .../libs/libpq/src/port/pg_crc32c_sse42_choose.c   |   64 -
 contrib/libs/libpq/src/port/pg_strong_random.c     |  182 -
 contrib/libs/libpq/src/port/pgcheckdir.c           |   92 -
 contrib/libs/libpq/src/port/pgmkdirp.c             |  148 -
 contrib/libs/libpq/src/port/pgsleep.c              |   57 -
 contrib/libs/libpq/src/port/pgstrcasecmp.c         |  151 -
 contrib/libs/libpq/src/port/pgstrsignal.c          |   64 -
 contrib/libs/libpq/src/port/pqsignal.c             |   62 -
 contrib/libs/libpq/src/port/pthread-win32.h        |   22 -
 contrib/libs/libpq/src/port/qsort.c                |   22 -
 contrib/libs/libpq/src/port/qsort_arg.c            |   14 -
 contrib/libs/libpq/src/port/quotes.c               |   51 -
 contrib/libs/libpq/src/port/snprintf.c             | 1535 ----
 contrib/libs/libpq/src/port/strerror.c             |  312 -
 contrib/libs/libpq/src/port/tar.c                  |  206 -
 contrib/libs/libpq/src/port/thread.c               |   96 -
 contrib/libs/libpq/src/port/win32common.c          |   68 -
 contrib/libs/libpq/src/port/win32error.c           |  214 -
 contrib/libs/libpq/src/port/win32gettimeofday.c    |   75 -
 contrib/libs/libpq/src/port/win32ntdll.c           |   71 -
 contrib/libs/libpq/src/port/win32setlocale.c       |  193 -
 contrib/libs/libpq/src/port/win32stat.c            |  306 -
 contrib/libs/libpq/ya.make                         |  155 -
 contrib/libs/libpqxx/AUTHORS                       |    4 -
 contrib/libs/libpqxx/COPYING                       |   27 -
 contrib/libs/libpqxx/INSTALL                       |  212 -
 contrib/libs/libpqxx/NEWS                          |  750 --
 contrib/libs/libpqxx/README-UPGRADE                |   11 -
 contrib/libs/libpqxx/README.md                     |  489 --
 contrib/libs/libpqxx/include/pqxx/array            |    4 -
 contrib/libs/libpqxx/include/pqxx/array.hxx        |  101 -
 .../libs/libpqxx/include/pqxx/basic_connection.hxx |  107 -
 contrib/libs/libpqxx/include/pqxx/binarystring     |    4 -
 contrib/libs/libpqxx/include/pqxx/binarystring.hxx |  157 -
 .../include/pqxx/compiler-internal-post.hxx        |   21 -
 .../libpqxx/include/pqxx/compiler-internal-pre.hxx |   35 -
 .../libpqxx/include/pqxx/compiler-internal.hxx     |   42 -
 .../libs/libpqxx/include/pqxx/compiler-public.hxx  |  122 -
 .../include/pqxx/config-internal-compiler.h        |   14 -
 .../libpqxx/include/pqxx/config-public-compiler.h  |   11 -
 contrib/libs/libpqxx/include/pqxx/connection       |    6 -
 contrib/libs/libpqxx/include/pqxx/connection.hxx   |  170 -
 contrib/libs/libpqxx/include/pqxx/connection_base  |    6 -
 .../libs/libpqxx/include/pqxx/connection_base.hxx  |  940 --
 .../libs/libpqxx/include/pqxx/connectionpolicy.hxx |   59 -
 contrib/libs/libpqxx/include/pqxx/cursor           |    6 -
 contrib/libs/libpqxx/include/pqxx/cursor.hxx       |  437 -
 contrib/libs/libpqxx/include/pqxx/dbtransaction    |    6 -
 .../libs/libpqxx/include/pqxx/dbtransaction.hxx    |  109 -
 contrib/libs/libpqxx/include/pqxx/errorhandler     |    6 -
 contrib/libs/libpqxx/include/pqxx/errorhandler.hxx |   96 -
 contrib/libs/libpqxx/include/pqxx/except           |    6 -
 contrib/libs/libpqxx/include/pqxx/except.hxx       |  532 --
 contrib/libs/libpqxx/include/pqxx/field            |    6 -
 contrib/libs/libpqxx/include/pqxx/field.hxx        |  373 -
 .../libpqxx/include/pqxx/internal/callgate.hxx     |   79 -
 .../include/pqxx/internal/encoding_group.hxx       |   46 -
 .../libpqxx/include/pqxx/internal/encodings.hxx    |   99 -
 .../internal/gates/connection-dbtransaction.hxx    |   22 -
 .../internal/gates/connection-errorhandler.hxx     |   25 -
 .../pqxx/internal/gates/connection-largeobject.hxx |   35 -
 .../gates/connection-notification_receiver.hxx     |   27 -
 .../gates/connection-parameterized_invocation.hxx  |   37 -
 .../pqxx/internal/gates/connection-pipeline.hxx    |   27 -
 .../gates/connection-prepare-invocation.hxx        |   45 -
 ...connection-reactivation_avoidance_exemption.hxx |   24 -
 .../pqxx/internal/gates/connection-sql_cursor.hxx  |   25 -
 .../pqxx/internal/gates/connection-transaction.hxx |   77 -
 .../internal/gates/errorhandler-connection.hxx     |   19 -
 .../gates/icursor_iterator-icursorstream.hxx       |   28 -
 .../gates/icursorstream-icursor_iterator.hxx       |   30 -
 .../pqxx/internal/gates/result-connection.hxx      |   20 -
 .../pqxx/internal/gates/result-creation.hxx        |   28 -
 .../include/pqxx/internal/gates/result-row.hxx     |   22 -
 .../pqxx/internal/gates/transaction-sql_cursor.hxx |   16 -
 .../internal/gates/transaction-stream_from.hxx     |   23 -
 .../pqxx/internal/gates/transaction-stream_to.hxx  |   27 -
 .../internal/gates/transaction-subtransaction.hxx  |   20 -
 .../internal/gates/transaction-tablereader.hxx     |   23 -
 .../internal/gates/transaction-tablewriter.hxx     |   27 -
 .../gates/transaction-transactionfocus.hxx         |   23 -
 .../pqxx/internal/ignore-deprecated-post.hxx       |    6 -
 .../pqxx/internal/ignore-deprecated-pre.hxx        |   19 -
 .../include/pqxx/internal/libpq-forward.hxx        |   34 -
 .../libpqxx/include/pqxx/internal/sql_cursor.hxx   |  122 -
 .../include/pqxx/internal/statement_parameters.hxx |  227 -
 .../libpqxx/include/pqxx/internal/type_utils.hxx   |  211 -
 contrib/libs/libpqxx/include/pqxx/isolation.hxx    |   87 -
 contrib/libs/libpqxx/include/pqxx/largeobject      |    6 -
 contrib/libs/libpqxx/include/pqxx/largeobject.hxx  |  672 --
 contrib/libs/libpqxx/include/pqxx/nontransaction   |    6 -
 .../libs/libpqxx/include/pqxx/nontransaction.hxx   |   80 -
 contrib/libs/libpqxx/include/pqxx/notification     |    6 -
 contrib/libs/libpqxx/include/pqxx/notification.hxx |   91 -
 contrib/libs/libpqxx/include/pqxx/pipeline         |    6 -
 contrib/libs/libpqxx/include/pqxx/pipeline.hxx     |  210 -
 contrib/libs/libpqxx/include/pqxx/pqxx             |   19 -
 .../libs/libpqxx/include/pqxx/prepared_statement   |    6 -
 .../libpqxx/include/pqxx/prepared_statement.hxx    |  177 -
 contrib/libs/libpqxx/include/pqxx/result           |   11 -
 contrib/libs/libpqxx/include/pqxx/result.hxx       |  249 -
 .../libs/libpqxx/include/pqxx/result_iterator.hxx  |  245 -
 .../libs/libpqxx/include/pqxx/robusttransaction    |    6 -
 .../libpqxx/include/pqxx/robusttransaction.hxx     |  168 -
 contrib/libs/libpqxx/include/pqxx/row.hxx          |  403 -
 contrib/libs/libpqxx/include/pqxx/strconv          |    4 -
 contrib/libs/libpqxx/include/pqxx/strconv.hxx      |  341 -
 contrib/libs/libpqxx/include/pqxx/stream_base.hxx  |   62 -
 contrib/libs/libpqxx/include/pqxx/stream_from      |    6 -
 contrib/libs/libpqxx/include/pqxx/stream_from.hxx  |  210 -
 contrib/libs/libpqxx/include/pqxx/stream_to        |    6 -
 contrib/libs/libpqxx/include/pqxx/stream_to.hxx    |  192 -
 contrib/libs/libpqxx/include/pqxx/subtransaction   |    6 -
 .../libs/libpqxx/include/pqxx/subtransaction.hxx   |  105 -
 contrib/libs/libpqxx/include/pqxx/tablereader      |    6 -
 contrib/libs/libpqxx/include/pqxx/tablereader.hxx  |  118 -
 contrib/libs/libpqxx/include/pqxx/tablestream      |    6 -
 contrib/libs/libpqxx/include/pqxx/tablestream.hxx  |   59 -
 contrib/libs/libpqxx/include/pqxx/tablewriter      |    6 -
 contrib/libs/libpqxx/include/pqxx/tablewriter.hxx  |  209 -
 contrib/libs/libpqxx/include/pqxx/transaction      |    6 -
 contrib/libs/libpqxx/include/pqxx/transaction.hxx  |  116 -
 contrib/libs/libpqxx/include/pqxx/transaction_base |    7 -
 .../libs/libpqxx/include/pqxx/transaction_base.hxx |  664 --
 contrib/libs/libpqxx/include/pqxx/transactor       |    6 -
 contrib/libs/libpqxx/include/pqxx/transactor.hxx   |  274 -
 contrib/libs/libpqxx/include/pqxx/types.hxx        |   57 -
 contrib/libs/libpqxx/include/pqxx/util             |    5 -
 contrib/libs/libpqxx/include/pqxx/util.hxx         |  309 -
 contrib/libs/libpqxx/include/pqxx/version          |    4 -
 contrib/libs/libpqxx/include/pqxx/version.hxx      |   57 -
 contrib/libs/libpqxx/src/array.cxx                 |  312 -
 contrib/libs/libpqxx/src/binarystring.cxx          |  150 -
 contrib/libs/libpqxx/src/connection.cxx            |  182 -
 contrib/libs/libpqxx/src/connection_base.cxx       | 1475 ----
 contrib/libs/libpqxx/src/cursor.cxx                |  321 -
 contrib/libs/libpqxx/src/dbtransaction.cxx         |   99 -
 contrib/libs/libpqxx/src/encodings.cxx             |  826 --
 contrib/libs/libpqxx/src/errorhandler.cxx          |   44 -
 contrib/libs/libpqxx/src/except.cxx                |  124 -
 contrib/libs/libpqxx/src/field.cxx                 |   77 -
 contrib/libs/libpqxx/src/largeobject.cxx           |  313 -
 contrib/libs/libpqxx/src/nontransaction.cxx        |   25 -
 contrib/libs/libpqxx/src/notification.cxx          |   36 -
 contrib/libs/libpqxx/src/pipeline.cxx              |  413 -
 contrib/libs/libpqxx/src/prepared_statement.cxx    |   69 -
 contrib/libs/libpqxx/src/result.cxx                |  454 -
 contrib/libs/libpqxx/src/robusttransaction.cxx     |  317 -
 contrib/libs/libpqxx/src/row.cxx                   |  276 -
 contrib/libs/libpqxx/src/sql_cursor.cxx            |  309 -
 contrib/libs/libpqxx/src/statement_parameters.cxx  |   58 -
 contrib/libs/libpqxx/src/strconv.cxx               |  724 --
 contrib/libs/libpqxx/src/stream_base.cxx           |   43 -
 contrib/libs/libpqxx/src/stream_from.cxx           |  261 -
 contrib/libs/libpqxx/src/stream_to.cxx             |  142 -
 contrib/libs/libpqxx/src/subtransaction.cxx        |   74 -
 contrib/libs/libpqxx/src/tablereader.cxx           |  227 -
 contrib/libs/libpqxx/src/tablestream.cxx           |   38 -
 contrib/libs/libpqxx/src/tablewriter.cxx           |  160 -
 contrib/libs/libpqxx/src/transaction.cxx           |   72 -
 contrib/libs/libpqxx/src/transaction_base.cxx      |  577 --
 contrib/libs/libpqxx/src/util.cxx                  |  121 -
 contrib/libs/libpqxx/src/version.cxx               |   18 -
 contrib/libs/libpqxx/ya.make                       |   66 -
 library/cpp/clickhouse/client/base/coded.cpp       |  101 -
 library/cpp/clickhouse/client/base/coded.h         |   64 -
 library/cpp/clickhouse/client/base/compressed.cpp  |   88 -
 library/cpp/clickhouse/client/base/compressed.h    |   27 -
 library/cpp/clickhouse/client/base/wire_format.h   |  103 -
 library/cpp/clickhouse/client/base/ya.make         |    9 -
 library/cpp/clickhouse/client/block.cpp            |  107 -
 library/cpp/clickhouse/client/block.h              |   74 -
 library/cpp/clickhouse/client/client.cpp           |  768 --
 library/cpp/clickhouse/client/client.h             |  105 -
 library/cpp/clickhouse/client/columns/array.cpp    |   87 -
 library/cpp/clickhouse/client/columns/array.h      |   55 -
 library/cpp/clickhouse/client/columns/column.h     |   60 -
 library/cpp/clickhouse/client/columns/date.cpp     |  126 -
 library/cpp/clickhouse/client/columns/date.h       |   84 -
 library/cpp/clickhouse/client/columns/enum.cpp     |  157 -
 library/cpp/clickhouse/client/columns/enum.h       |   57 -
 library/cpp/clickhouse/client/columns/factory.cpp  |  118 -
 library/cpp/clickhouse/client/columns/factory.h    |    7 -
 library/cpp/clickhouse/client/columns/nullable.cpp |   70 -
 library/cpp/clickhouse/client/columns/nullable.h   |   44 -
 library/cpp/clickhouse/client/columns/numeric.cpp  |  103 -
 library/cpp/clickhouse/client/columns/numeric.h    |   65 -
 library/cpp/clickhouse/client/columns/string.cpp   |  241 -
 library/cpp/clickhouse/client/columns/string.h     |  142 -
 library/cpp/clickhouse/client/columns/tuple.cpp    |   42 -
 library/cpp/clickhouse/client/columns/tuple.h      |   37 -
 library/cpp/clickhouse/client/columns/utils.h      |   19 -
 library/cpp/clickhouse/client/columns/ya.make      |   19 -
 library/cpp/clickhouse/client/exceptions.h         |   27 -
 library/cpp/clickhouse/client/protocol.h           |   52 -
 library/cpp/clickhouse/client/query.cpp            |   26 -
 library/cpp/clickhouse/client/query.h              |  159 -
 .../cpp/clickhouse/client/types/type_parser.cpp    |  231 -
 library/cpp/clickhouse/client/types/type_parser.h  |   68 -
 library/cpp/clickhouse/client/types/types.cpp      |  197 -
 library/cpp/clickhouse/client/types/types.h        |  163 -
 library/cpp/clickhouse/client/types/ya.make        |    8 -
 library/cpp/clickhouse/client/ya.make              |   18 -
 399 files changed, 101949 deletions(-)
 delete mode 100644 contrib/libs/libpq/COPYRIGHT
 delete mode 100644 contrib/libs/libpq/README
 delete mode 100644 contrib/libs/libpq/README.git
 delete mode 100644 contrib/libs/libpq/src/backend/catalog/pg_tablespace_d.h
 delete mode 100644 contrib/libs/libpq/src/backend/utils/README.Gen_dummy_probes
 delete mode 100644 contrib/libs/libpq/src/backend/utils/errcodes.h
 delete mode 100644 contrib/libs/libpq/src/common/archive.c
 delete mode 100644 contrib/libs/libpq/src/common/base64.c
 delete mode 100644 contrib/libs/libpq/src/common/checksum_helper.c
 delete mode 100644 contrib/libs/libpq/src/common/compression.c
 delete mode 100644 contrib/libs/libpq/src/common/config_info.c
 delete mode 100644 contrib/libs/libpq/src/common/controldata_utils.c
 delete mode 100644 contrib/libs/libpq/src/common/cryptohash_openssl.c
 delete mode 100644 contrib/libs/libpq/src/common/d2s.c
 delete mode 100644 contrib/libs/libpq/src/common/d2s_full_table.h
 delete mode 100644 contrib/libs/libpq/src/common/d2s_intrinsics.h
 delete mode 100644 contrib/libs/libpq/src/common/digit_table.h
 delete mode 100644 contrib/libs/libpq/src/common/encnames.c
 delete mode 100644 contrib/libs/libpq/src/common/exec.c
 delete mode 100644 contrib/libs/libpq/src/common/f2s.c
 delete mode 100644 contrib/libs/libpq/src/common/fe_memutils.c
 delete mode 100644 contrib/libs/libpq/src/common/file_perm.c
 delete mode 100644 contrib/libs/libpq/src/common/file_utils.c
 delete mode 100644 contrib/libs/libpq/src/common/hashfn.c
 delete mode 100644 contrib/libs/libpq/src/common/hmac_openssl.c
 delete mode 100644 contrib/libs/libpq/src/common/ip.c
 delete mode 100644 contrib/libs/libpq/src/common/jsonapi.c
 delete mode 100644 contrib/libs/libpq/src/common/keywords.c
 delete mode 100644 contrib/libs/libpq/src/common/kwlist_d.h
 delete mode 100644 contrib/libs/libpq/src/common/kwlookup.c
 delete mode 100644 contrib/libs/libpq/src/common/link-canary.c
 delete mode 100644 contrib/libs/libpq/src/common/logging.c
 delete mode 100644 contrib/libs/libpq/src/common/md5_common.c
 delete mode 100644 contrib/libs/libpq/src/common/percentrepl.c
 delete mode 100644 contrib/libs/libpq/src/common/pg_get_line.c
 delete mode 100644 contrib/libs/libpq/src/common/pg_lzcompress.c
 delete mode 100644 contrib/libs/libpq/src/common/pg_prng.c
 delete mode 100644 contrib/libs/libpq/src/common/pgfnames.c
 delete mode 100644 contrib/libs/libpq/src/common/protocol_openssl.c
 delete mode 100644 contrib/libs/libpq/src/common/psprintf.c
 delete mode 100644 contrib/libs/libpq/src/common/relpath.c
 delete mode 100644 contrib/libs/libpq/src/common/restricted_token.c
 delete mode 100644 contrib/libs/libpq/src/common/rmtree.c
 delete mode 100644 contrib/libs/libpq/src/common/ryu_common.h
 delete mode 100644 contrib/libs/libpq/src/common/saslprep.c
 delete mode 100644 contrib/libs/libpq/src/common/scram-common.c
 delete mode 100644 contrib/libs/libpq/src/common/sprompt.c
 delete mode 100644 contrib/libs/libpq/src/common/string.c
 delete mode 100644 contrib/libs/libpq/src/common/stringinfo.c
 delete mode 100644 contrib/libs/libpq/src/common/unicode_norm.c
 delete mode 100644 contrib/libs/libpq/src/common/username.c
 delete mode 100644 contrib/libs/libpq/src/common/wait_error.c
 delete mode 100644 contrib/libs/libpq/src/common/wchar.c
 delete mode 100644 contrib/libs/libpq/src/include/access/rmgr.h
 delete mode 100644 contrib/libs/libpq/src/include/access/rmgrlist.h
 delete mode 100644 contrib/libs/libpq/src/include/access/transam.h
 delete mode 100644 contrib/libs/libpq/src/include/access/xlog_internal.h
 delete mode 100644 contrib/libs/libpq/src/include/access/xlogdefs.h
 delete mode 100644 contrib/libs/libpq/src/include/access/xlogreader.h
 delete mode 100644 contrib/libs/libpq/src/include/access/xlogrecord.h
 delete mode 100644 contrib/libs/libpq/src/include/c.h
 delete mode 100644 contrib/libs/libpq/src/include/catalog/catversion.h
 delete mode 100644 contrib/libs/libpq/src/include/catalog/pg_control.h
 delete mode 100644 contrib/libs/libpq/src/include/common/archive.h
 delete mode 100644 contrib/libs/libpq/src/include/common/base64.h
 delete mode 100644 contrib/libs/libpq/src/include/common/checksum_helper.h
 delete mode 100644 contrib/libs/libpq/src/include/common/compression.h
 delete mode 100644 contrib/libs/libpq/src/include/common/config_info.h
 delete mode 100644 contrib/libs/libpq/src/include/common/controldata_utils.h
 delete mode 100644 contrib/libs/libpq/src/include/common/cryptohash.h
 delete mode 100644 contrib/libs/libpq/src/include/common/fe_memutils.h
 delete mode 100644 contrib/libs/libpq/src/include/common/file_perm.h
 delete mode 100644 contrib/libs/libpq/src/include/common/file_utils.h
 delete mode 100644 contrib/libs/libpq/src/include/common/hashfn.h
 delete mode 100644 contrib/libs/libpq/src/include/common/hmac.h
 delete mode 100644 contrib/libs/libpq/src/include/common/ip.h
 delete mode 100644 contrib/libs/libpq/src/include/common/jsonapi.h
 delete mode 100644 contrib/libs/libpq/src/include/common/keywords.h
 delete mode 100644 contrib/libs/libpq/src/include/common/kwlookup.h
 delete mode 100644 contrib/libs/libpq/src/include/common/link-canary.h
 delete mode 100644 contrib/libs/libpq/src/include/common/logging.h
 delete mode 100644 contrib/libs/libpq/src/include/common/md5.h
 delete mode 100644 contrib/libs/libpq/src/include/common/openssl.h
 delete mode 100644 contrib/libs/libpq/src/include/common/percentrepl.h
 delete mode 100644 contrib/libs/libpq/src/include/common/pg_lzcompress.h
 delete mode 100644 contrib/libs/libpq/src/include/common/pg_prng.h
 delete mode 100644 contrib/libs/libpq/src/include/common/relpath.h
 delete mode 100644 contrib/libs/libpq/src/include/common/restricted_token.h
 delete mode 100644 contrib/libs/libpq/src/include/common/saslprep.h
 delete mode 100644 contrib/libs/libpq/src/include/common/scram-common.h
 delete mode 100644 contrib/libs/libpq/src/include/common/sha1.h
 delete mode 100644 contrib/libs/libpq/src/include/common/sha2.h
 delete mode 100644 contrib/libs/libpq/src/include/common/shortest_dec.h
 delete mode 100644 contrib/libs/libpq/src/include/common/string.h
 delete mode 100644 contrib/libs/libpq/src/include/common/unicode_east_asian_fw_table.h
 delete mode 100644 contrib/libs/libpq/src/include/common/unicode_nonspacing_table.h
 delete mode 100644 contrib/libs/libpq/src/include/common/unicode_norm.h
 delete mode 100644 contrib/libs/libpq/src/include/common/unicode_norm_table.h
 delete mode 100644 contrib/libs/libpq/src/include/common/username.h
 delete mode 100644 contrib/libs/libpq/src/include/datatype/timestamp.h
 delete mode 100644 contrib/libs/libpq/src/include/lib/sort_template.h
 delete mode 100644 contrib/libs/libpq/src/include/lib/stringinfo.h
 delete mode 100644 contrib/libs/libpq/src/include/libpq/libpq-fs.h
 delete mode 100644 contrib/libs/libpq/src/include/libpq/pqcomm.h
 delete mode 100644 contrib/libs/libpq/src/include/mb/pg_wchar.h
 delete mode 100644 contrib/libs/libpq/src/include/parser/kwlist.h
 delete mode 100644 contrib/libs/libpq/src/include/pg_config-linux-aarch64.h
 delete mode 100644 contrib/libs/libpq/src/include/pg_config-linux.h
 delete mode 100644 contrib/libs/libpq/src/include/pg_config-osx-arm64.h
 delete mode 100644 contrib/libs/libpq/src/include/pg_config-osx.h
 delete mode 100644 contrib/libs/libpq/src/include/pg_config-win.h
 delete mode 100644 contrib/libs/libpq/src/include/pg_config.h
 delete mode 100644 contrib/libs/libpq/src/include/pg_config_ext.h
 delete mode 100644 contrib/libs/libpq/src/include/pg_config_manual.h
 delete mode 100644 contrib/libs/libpq/src/include/pg_config_os-linux.h
 delete mode 100644 contrib/libs/libpq/src/include/pg_config_os-osx.h
 delete mode 100644 contrib/libs/libpq/src/include/pg_config_os-win.h
 delete mode 100644 contrib/libs/libpq/src/include/pg_config_os.h
 delete mode 100644 contrib/libs/libpq/src/include/pgtar.h
 delete mode 100644 contrib/libs/libpq/src/include/pgtime.h
 delete mode 100644 contrib/libs/libpq/src/include/port.h
 delete mode 100644 contrib/libs/libpq/src/include/port/darwin.h
 delete mode 100644 contrib/libs/libpq/src/include/port/linux.h
 delete mode 100644 contrib/libs/libpq/src/include/port/pg_bitutils.h
 delete mode 100644 contrib/libs/libpq/src/include/port/pg_bswap.h
 delete mode 100644 contrib/libs/libpq/src/include/port/pg_crc32c.h
 delete mode 100644 contrib/libs/libpq/src/include/port/pg_iovec.h
 delete mode 100644 contrib/libs/libpq/src/include/port/pg_lfind.h
 delete mode 100644 contrib/libs/libpq/src/include/port/simd.h
 delete mode 100644 contrib/libs/libpq/src/include/port/win32.h
 delete mode 100644 contrib/libs/libpq/src/include/port/win32/arpa/inet.h
 delete mode 100644 contrib/libs/libpq/src/include/port/win32/netdb.h
 delete mode 100644 contrib/libs/libpq/src/include/port/win32/netinet/in.h
 delete mode 100644 contrib/libs/libpq/src/include/port/win32/netinet/tcp.h
 delete mode 100644 contrib/libs/libpq/src/include/port/win32/pwd.h
 delete mode 100644 contrib/libs/libpq/src/include/port/win32/sys/select.h
 delete mode 100644 contrib/libs/libpq/src/include/port/win32/sys/socket.h
 delete mode 100644 contrib/libs/libpq/src/include/port/win32/sys/un.h
 delete mode 100644 contrib/libs/libpq/src/include/port/win32/sys/wait.h
 delete mode 100644 contrib/libs/libpq/src/include/port/win32_msvc/dirent.h
 delete mode 100644 contrib/libs/libpq/src/include/port/win32_msvc/sys/file.h
 delete mode 100644 contrib/libs/libpq/src/include/port/win32_msvc/sys/param.h
 delete mode 100644 contrib/libs/libpq/src/include/port/win32_msvc/sys/time.h
 delete mode 100644 contrib/libs/libpq/src/include/port/win32_msvc/unistd.h
 delete mode 100644 contrib/libs/libpq/src/include/port/win32_port.h
 delete mode 100644 contrib/libs/libpq/src/include/port/win32ntdll.h
 delete mode 100644 contrib/libs/libpq/src/include/postgres.h
 delete mode 100644 contrib/libs/libpq/src/include/postgres_ext.h
 delete mode 100644 contrib/libs/libpq/src/include/postgres_fe.h
 delete mode 100644 contrib/libs/libpq/src/include/storage/backendid.h
 delete mode 100644 contrib/libs/libpq/src/include/storage/block.h
 delete mode 100644 contrib/libs/libpq/src/include/storage/buf.h
 delete mode 100644 contrib/libs/libpq/src/include/storage/relfilelocator.h
 delete mode 100644 contrib/libs/libpq/src/include/utils/ascii.h
 delete mode 100644 contrib/libs/libpq/src/include/utils/elog.h
 delete mode 100644 contrib/libs/libpq/src/include/utils/palloc.h
 delete mode 100644 contrib/libs/libpq/src/interfaces/libpq/README
 delete mode 100644 contrib/libs/libpq/src/interfaces/libpq/exports.txt
 delete mode 100644 contrib/libs/libpq/src/interfaces/libpq/fe-auth-sasl.h
 delete mode 100644 contrib/libs/libpq/src/interfaces/libpq/fe-auth-scram.c
 delete mode 100644 contrib/libs/libpq/src/interfaces/libpq/fe-auth.c
 delete mode 100644 contrib/libs/libpq/src/interfaces/libpq/fe-auth.h
 delete mode 100644 contrib/libs/libpq/src/interfaces/libpq/fe-connect.c
 delete mode 100644 contrib/libs/libpq/src/interfaces/libpq/fe-exec.c
 delete mode 100644 contrib/libs/libpq/src/interfaces/libpq/fe-lobj.c
 delete mode 100644 contrib/libs/libpq/src/interfaces/libpq/fe-misc.c
 delete mode 100644 contrib/libs/libpq/src/interfaces/libpq/fe-print.c
 delete mode 100644 contrib/libs/libpq/src/interfaces/libpq/fe-protocol3.c
 delete mode 100644 contrib/libs/libpq/src/interfaces/libpq/fe-secure-common.c
 delete mode 100644 contrib/libs/libpq/src/interfaces/libpq/fe-secure-common.h
 delete mode 100644 contrib/libs/libpq/src/interfaces/libpq/fe-secure-openssl.c
 delete mode 100644 contrib/libs/libpq/src/interfaces/libpq/fe-secure.c
 delete mode 100644 contrib/libs/libpq/src/interfaces/libpq/fe-trace.c
 delete mode 100644 contrib/libs/libpq/src/interfaces/libpq/libpq-events.c
 delete mode 100644 contrib/libs/libpq/src/interfaces/libpq/libpq-events.h
 delete mode 100644 contrib/libs/libpq/src/interfaces/libpq/libpq-fe.h
 delete mode 100644 contrib/libs/libpq/src/interfaces/libpq/libpq-int.h
 delete mode 100644 contrib/libs/libpq/src/interfaces/libpq/pqexpbuffer.c
 delete mode 100644 contrib/libs/libpq/src/interfaces/libpq/pqexpbuffer.h
 delete mode 100644 contrib/libs/libpq/src/interfaces/libpq/pthread-win32.c
 delete mode 100644 contrib/libs/libpq/src/interfaces/libpq/win32.c
 delete mode 100644 contrib/libs/libpq/src/port/README
 delete mode 100644 contrib/libs/libpq/src/port/bsearch_arg.c
 delete mode 100644 contrib/libs/libpq/src/port/chklocale.c
 delete mode 100644 contrib/libs/libpq/src/port/dirmod.c
 delete mode 100644 contrib/libs/libpq/src/port/getpeereid.c
 delete mode 100644 contrib/libs/libpq/src/port/inet_aton.c
 delete mode 100644 contrib/libs/libpq/src/port/inet_net_ntop.c
 delete mode 100644 contrib/libs/libpq/src/port/noblock.c
 delete mode 100644 contrib/libs/libpq/src/port/open.c
 delete mode 100644 contrib/libs/libpq/src/port/path.c
 delete mode 100644 contrib/libs/libpq/src/port/pg_bitutils.c
 delete mode 100644 contrib/libs/libpq/src/port/pg_config_paths.h
 delete mode 100644 contrib/libs/libpq/src/port/pg_crc32c_sb8.c
 delete mode 100644 contrib/libs/libpq/src/port/pg_crc32c_sse42.c
 delete mode 100644 contrib/libs/libpq/src/port/pg_crc32c_sse42_choose.c
 delete mode 100644 contrib/libs/libpq/src/port/pg_strong_random.c
 delete mode 100644 contrib/libs/libpq/src/port/pgcheckdir.c
 delete mode 100644 contrib/libs/libpq/src/port/pgmkdirp.c
 delete mode 100644 contrib/libs/libpq/src/port/pgsleep.c
 delete mode 100644 contrib/libs/libpq/src/port/pgstrcasecmp.c
 delete mode 100644 contrib/libs/libpq/src/port/pgstrsignal.c
 delete mode 100644 contrib/libs/libpq/src/port/pqsignal.c
 delete mode 100644 contrib/libs/libpq/src/port/pthread-win32.h
 delete mode 100644 contrib/libs/libpq/src/port/qsort.c
 delete mode 100644 contrib/libs/libpq/src/port/qsort_arg.c
 delete mode 100644 contrib/libs/libpq/src/port/quotes.c
 delete mode 100644 contrib/libs/libpq/src/port/snprintf.c
 delete mode 100644 contrib/libs/libpq/src/port/strerror.c
 delete mode 100644 contrib/libs/libpq/src/port/tar.c
 delete mode 100644 contrib/libs/libpq/src/port/thread.c
 delete mode 100644 contrib/libs/libpq/src/port/win32common.c
 delete mode 100644 contrib/libs/libpq/src/port/win32error.c
 delete mode 100644 contrib/libs/libpq/src/port/win32gettimeofday.c
 delete mode 100644 contrib/libs/libpq/src/port/win32ntdll.c
 delete mode 100644 contrib/libs/libpq/src/port/win32setlocale.c
 delete mode 100644 contrib/libs/libpq/src/port/win32stat.c
 delete mode 100644 contrib/libs/libpq/ya.make
 delete mode 100644 contrib/libs/libpqxx/AUTHORS
 delete mode 100755 contrib/libs/libpqxx/COPYING
 delete mode 100755 contrib/libs/libpqxx/INSTALL
 delete mode 100644 contrib/libs/libpqxx/NEWS
 delete mode 100644 contrib/libs/libpqxx/README-UPGRADE
 delete mode 100644 contrib/libs/libpqxx/README.md
 delete mode 100644 contrib/libs/libpqxx/include/pqxx/array
 delete mode 100644 contrib/libs/libpqxx/include/pqxx/array.hxx
 delete mode 100644 contrib/libs/libpqxx/include/pqxx/basic_connection.hxx
 delete mode 100644 contrib/libs/libpqxx/include/pqxx/binarystring
 delete mode 100644 contrib/libs/libpqxx/include/pqxx/binarystring.hxx
 delete mode 100644 contrib/libs/libpqxx/include/pqxx/compiler-internal-post.hxx
 delete mode 100644 contrib/libs/libpqxx/include/pqxx/compiler-internal-pre.hxx
 delete mode 100644 contrib/libs/libpqxx/include/pqxx/compiler-internal.hxx
 delete mode 100644 contrib/libs/libpqxx/include/pqxx/compiler-public.hxx
 delete mode 100644 contrib/libs/libpqxx/include/pqxx/config-internal-compiler.h
 delete mode 100644 contrib/libs/libpqxx/include/pqxx/config-public-compiler.h
 delete mode 100644 contrib/libs/libpqxx/include/pqxx/connection
 delete mode 100644 contrib/libs/libpqxx/include/pqxx/connection.hxx
 delete mode 100644 contrib/libs/libpqxx/include/pqxx/connection_base
 delete mode 100644 contrib/libs/libpqxx/include/pqxx/connection_base.hxx
 delete mode 100644 contrib/libs/libpqxx/include/pqxx/connectionpolicy.hxx
 delete mode 100644 contrib/libs/libpqxx/include/pqxx/cursor
 delete mode 100644 contrib/libs/libpqxx/include/pqxx/cursor.hxx
 delete mode 100644 contrib/libs/libpqxx/include/pqxx/dbtransaction
 delete mode 100644 contrib/libs/libpqxx/include/pqxx/dbtransaction.hxx
 delete mode 100644 contrib/libs/libpqxx/include/pqxx/errorhandler
 delete mode 100644 contrib/libs/libpqxx/include/pqxx/errorhandler.hxx
 delete mode 100644 contrib/libs/libpqxx/include/pqxx/except
 delete mode 100644 contrib/libs/libpqxx/include/pqxx/except.hxx
 delete mode 100644 contrib/libs/libpqxx/include/pqxx/field
 delete mode 100644 contrib/libs/libpqxx/include/pqxx/field.hxx
 delete mode 100644 contrib/libs/libpqxx/include/pqxx/internal/callgate.hxx
 delete mode 100644 contrib/libs/libpqxx/include/pqxx/internal/encoding_group.hxx
 delete mode 100644 contrib/libs/libpqxx/include/pqxx/internal/encodings.hxx
 delete mode 100644 contrib/libs/libpqxx/include/pqxx/internal/gates/connection-dbtransaction.hxx
 delete mode 100644 contrib/libs/libpqxx/include/pqxx/internal/gates/connection-errorhandler.hxx
 delete mode 100644 contrib/libs/libpqxx/include/pqxx/internal/gates/connection-largeobject.hxx
 delete mode 100644 contrib/libs/libpqxx/include/pqxx/internal/gates/connection-notification_receiver.hxx
 delete mode 100644 contrib/libs/libpqxx/include/pqxx/internal/gates/connection-parameterized_invocation.hxx
 delete mode 100644 contrib/libs/libpqxx/include/pqxx/internal/gates/connection-pipeline.hxx
 delete mode 100644 contrib/libs/libpqxx/include/pqxx/internal/gates/connection-prepare-invocation.hxx
 delete mode 100644 contrib/libs/libpqxx/include/pqxx/internal/gates/connection-reactivation_avoidance_exemption.hxx
 delete mode 100644 contrib/libs/libpqxx/include/pqxx/internal/gates/connection-sql_cursor.hxx
 delete mode 100644 contrib/libs/libpqxx/include/pqxx/internal/gates/connection-transaction.hxx
 delete mode 100644 contrib/libs/libpqxx/include/pqxx/internal/gates/errorhandler-connection.hxx
 delete mode 100644 contrib/libs/libpqxx/include/pqxx/internal/gates/icursor_iterator-icursorstream.hxx
 delete mode 100644 contrib/libs/libpqxx/include/pqxx/internal/gates/icursorstream-icursor_iterator.hxx
 delete mode 100644 contrib/libs/libpqxx/include/pqxx/internal/gates/result-connection.hxx
 delete mode 100644 contrib/libs/libpqxx/include/pqxx/internal/gates/result-creation.hxx
 delete mode 100644 contrib/libs/libpqxx/include/pqxx/internal/gates/result-row.hxx
 delete mode 100644 contrib/libs/libpqxx/include/pqxx/internal/gates/transaction-sql_cursor.hxx
 delete mode 100644 contrib/libs/libpqxx/include/pqxx/internal/gates/transaction-stream_from.hxx
 delete mode 100644 contrib/libs/libpqxx/include/pqxx/internal/gates/transaction-stream_to.hxx
 delete mode 100644 contrib/libs/libpqxx/include/pqxx/internal/gates/transaction-subtransaction.hxx
 delete mode 100644 contrib/libs/libpqxx/include/pqxx/internal/gates/transaction-tablereader.hxx
 delete mode 100644 contrib/libs/libpqxx/include/pqxx/internal/gates/transaction-tablewriter.hxx
 delete mode 100644 contrib/libs/libpqxx/include/pqxx/internal/gates/transaction-transactionfocus.hxx
 delete mode 100644 contrib/libs/libpqxx/include/pqxx/internal/ignore-deprecated-post.hxx
 delete mode 100644 contrib/libs/libpqxx/include/pqxx/internal/ignore-deprecated-pre.hxx
 delete mode 100644 contrib/libs/libpqxx/include/pqxx/internal/libpq-forward.hxx
 delete mode 100644 contrib/libs/libpqxx/include/pqxx/internal/sql_cursor.hxx
 delete mode 100644 contrib/libs/libpqxx/include/pqxx/internal/statement_parameters.hxx
 delete mode 100644 contrib/libs/libpqxx/include/pqxx/internal/type_utils.hxx
 delete mode 100644 contrib/libs/libpqxx/include/pqxx/isolation.hxx
 delete mode 100644 contrib/libs/libpqxx/include/pqxx/largeobject
 delete mode 100644 contrib/libs/libpqxx/include/pqxx/largeobject.hxx
 delete mode 100644 contrib/libs/libpqxx/include/pqxx/nontransaction
 delete mode 100644 contrib/libs/libpqxx/include/pqxx/nontransaction.hxx
 delete mode 100644 contrib/libs/libpqxx/include/pqxx/notification
 delete mode 100644 contrib/libs/libpqxx/include/pqxx/notification.hxx
 delete mode 100644 contrib/libs/libpqxx/include/pqxx/pipeline
 delete mode 100644 contrib/libs/libpqxx/include/pqxx/pipeline.hxx
 delete mode 100644 contrib/libs/libpqxx/include/pqxx/pqxx
 delete mode 100644 contrib/libs/libpqxx/include/pqxx/prepared_statement
 delete mode 100644 contrib/libs/libpqxx/include/pqxx/prepared_statement.hxx
 delete mode 100644 contrib/libs/libpqxx/include/pqxx/result
 delete mode 100644 contrib/libs/libpqxx/include/pqxx/result.hxx
 delete mode 100644 contrib/libs/libpqxx/include/pqxx/result_iterator.hxx
 delete mode 100644 contrib/libs/libpqxx/include/pqxx/robusttransaction
 delete mode 100644 contrib/libs/libpqxx/include/pqxx/robusttransaction.hxx
 delete mode 100644 contrib/libs/libpqxx/include/pqxx/row.hxx
 delete mode 100644 contrib/libs/libpqxx/include/pqxx/strconv
 delete mode 100644 contrib/libs/libpqxx/include/pqxx/strconv.hxx
 delete mode 100644 contrib/libs/libpqxx/include/pqxx/stream_base.hxx
 delete mode 100644 contrib/libs/libpqxx/include/pqxx/stream_from
 delete mode 100644 contrib/libs/libpqxx/include/pqxx/stream_from.hxx
 delete mode 100644 contrib/libs/libpqxx/include/pqxx/stream_to
 delete mode 100644 contrib/libs/libpqxx/include/pqxx/stream_to.hxx
 delete mode 100644 contrib/libs/libpqxx/include/pqxx/subtransaction
 delete mode 100644 contrib/libs/libpqxx/include/pqxx/subtransaction.hxx
 delete mode 100644 contrib/libs/libpqxx/include/pqxx/tablereader
 delete mode 100644 contrib/libs/libpqxx/include/pqxx/tablereader.hxx
 delete mode 100644 contrib/libs/libpqxx/include/pqxx/tablestream
 delete mode 100644 contrib/libs/libpqxx/include/pqxx/tablestream.hxx
 delete mode 100644 contrib/libs/libpqxx/include/pqxx/tablewriter
 delete mode 100644 contrib/libs/libpqxx/include/pqxx/tablewriter.hxx
 delete mode 100644 contrib/libs/libpqxx/include/pqxx/transaction
 delete mode 100644 contrib/libs/libpqxx/include/pqxx/transaction.hxx
 delete mode 100644 contrib/libs/libpqxx/include/pqxx/transaction_base
 delete mode 100644 contrib/libs/libpqxx/include/pqxx/transaction_base.hxx
 delete mode 100644 contrib/libs/libpqxx/include/pqxx/transactor
 delete mode 100644 contrib/libs/libpqxx/include/pqxx/transactor.hxx
 delete mode 100644 contrib/libs/libpqxx/include/pqxx/types.hxx
 delete mode 100644 contrib/libs/libpqxx/include/pqxx/util
 delete mode 100644 contrib/libs/libpqxx/include/pqxx/util.hxx
 delete mode 100644 contrib/libs/libpqxx/include/pqxx/version
 delete mode 100644 contrib/libs/libpqxx/include/pqxx/version.hxx
 delete mode 100644 contrib/libs/libpqxx/src/array.cxx
 delete mode 100644 contrib/libs/libpqxx/src/binarystring.cxx
 delete mode 100644 contrib/libs/libpqxx/src/connection.cxx
 delete mode 100644 contrib/libs/libpqxx/src/connection_base.cxx
 delete mode 100644 contrib/libs/libpqxx/src/cursor.cxx
 delete mode 100644 contrib/libs/libpqxx/src/dbtransaction.cxx
 delete mode 100644 contrib/libs/libpqxx/src/encodings.cxx
 delete mode 100644 contrib/libs/libpqxx/src/errorhandler.cxx
 delete mode 100644 contrib/libs/libpqxx/src/except.cxx
 delete mode 100644 contrib/libs/libpqxx/src/field.cxx
 delete mode 100644 contrib/libs/libpqxx/src/largeobject.cxx
 delete mode 100644 contrib/libs/libpqxx/src/nontransaction.cxx
 delete mode 100644 contrib/libs/libpqxx/src/notification.cxx
 delete mode 100644 contrib/libs/libpqxx/src/pipeline.cxx
 delete mode 100644 contrib/libs/libpqxx/src/prepared_statement.cxx
 delete mode 100644 contrib/libs/libpqxx/src/result.cxx
 delete mode 100644 contrib/libs/libpqxx/src/robusttransaction.cxx
 delete mode 100644 contrib/libs/libpqxx/src/row.cxx
 delete mode 100644 contrib/libs/libpqxx/src/sql_cursor.cxx
 delete mode 100644 contrib/libs/libpqxx/src/statement_parameters.cxx
 delete mode 100644 contrib/libs/libpqxx/src/strconv.cxx
 delete mode 100644 contrib/libs/libpqxx/src/stream_base.cxx
 delete mode 100644 contrib/libs/libpqxx/src/stream_from.cxx
 delete mode 100644 contrib/libs/libpqxx/src/stream_to.cxx
 delete mode 100644 contrib/libs/libpqxx/src/subtransaction.cxx
 delete mode 100644 contrib/libs/libpqxx/src/tablereader.cxx
 delete mode 100644 contrib/libs/libpqxx/src/tablestream.cxx
 delete mode 100644 contrib/libs/libpqxx/src/tablewriter.cxx
 delete mode 100644 contrib/libs/libpqxx/src/transaction.cxx
 delete mode 100644 contrib/libs/libpqxx/src/transaction_base.cxx
 delete mode 100644 contrib/libs/libpqxx/src/util.cxx
 delete mode 100644 contrib/libs/libpqxx/src/version.cxx
 delete mode 100644 contrib/libs/libpqxx/ya.make
 delete mode 100644 library/cpp/clickhouse/client/base/coded.cpp
 delete mode 100644 library/cpp/clickhouse/client/base/coded.h
 delete mode 100644 library/cpp/clickhouse/client/base/compressed.cpp
 delete mode 100644 library/cpp/clickhouse/client/base/compressed.h
 delete mode 100644 library/cpp/clickhouse/client/base/wire_format.h
 delete mode 100644 library/cpp/clickhouse/client/base/ya.make
 delete mode 100644 library/cpp/clickhouse/client/block.cpp
 delete mode 100644 library/cpp/clickhouse/client/block.h
 delete mode 100644 library/cpp/clickhouse/client/client.cpp
 delete mode 100644 library/cpp/clickhouse/client/client.h
 delete mode 100644 library/cpp/clickhouse/client/columns/array.cpp
 delete mode 100644 library/cpp/clickhouse/client/columns/array.h
 delete mode 100644 library/cpp/clickhouse/client/columns/column.h
 delete mode 100644 library/cpp/clickhouse/client/columns/date.cpp
 delete mode 100644 library/cpp/clickhouse/client/columns/date.h
 delete mode 100644 library/cpp/clickhouse/client/columns/enum.cpp
 delete mode 100644 library/cpp/clickhouse/client/columns/enum.h
 delete mode 100644 library/cpp/clickhouse/client/columns/factory.cpp
 delete mode 100644 library/cpp/clickhouse/client/columns/factory.h
 delete mode 100644 library/cpp/clickhouse/client/columns/nullable.cpp
 delete mode 100644 library/cpp/clickhouse/client/columns/nullable.h
 delete mode 100644 library/cpp/clickhouse/client/columns/numeric.cpp
 delete mode 100644 library/cpp/clickhouse/client/columns/numeric.h
 delete mode 100644 library/cpp/clickhouse/client/columns/string.cpp
 delete mode 100644 library/cpp/clickhouse/client/columns/string.h
 delete mode 100644 library/cpp/clickhouse/client/columns/tuple.cpp
 delete mode 100644 library/cpp/clickhouse/client/columns/tuple.h
 delete mode 100644 library/cpp/clickhouse/client/columns/utils.h
 delete mode 100644 library/cpp/clickhouse/client/columns/ya.make
 delete mode 100644 library/cpp/clickhouse/client/exceptions.h
 delete mode 100644 library/cpp/clickhouse/client/protocol.h
 delete mode 100644 library/cpp/clickhouse/client/query.cpp
 delete mode 100644 library/cpp/clickhouse/client/query.h
 delete mode 100644 library/cpp/clickhouse/client/types/type_parser.cpp
 delete mode 100644 library/cpp/clickhouse/client/types/type_parser.h
 delete mode 100644 library/cpp/clickhouse/client/types/types.cpp
 delete mode 100644 library/cpp/clickhouse/client/types/types.h
 delete mode 100644 library/cpp/clickhouse/client/types/ya.make
 delete mode 100644 library/cpp/clickhouse/client/ya.make

diff --git a/contrib/libs/dtl/ya.make b/contrib/libs/dtl/ya.make
index de589603ba..80028875ce 100644
--- a/contrib/libs/dtl/ya.make
+++ b/contrib/libs/dtl/ya.make
@@ -9,8 +9,6 @@ LICENSE(
 
 LICENSE_TEXTS(.yandex_meta/licenses.list.txt)
 
-OWNER(g:cpp-contrib)
-
 VERSION(1.20)
 
 ORIGINAL_SOURCE(https://github.com/cubicdaiya/dtl/archive/v1.20.tar.gz)
diff --git a/contrib/libs/libpq/COPYRIGHT b/contrib/libs/libpq/COPYRIGHT
deleted file mode 100644
index 16f9b46a3f..0000000000
--- a/contrib/libs/libpq/COPYRIGHT
+++ /dev/null
@@ -1,23 +0,0 @@
-PostgreSQL Database Management System
-(formerly known as Postgres, then as Postgres95)
-
-Portions Copyright (c) 1996-2024, PostgreSQL Global Development Group
-
-Portions Copyright (c) 1994, The Regents of the University of California
-
-Permission to use, copy, modify, and distribute this software and its
-documentation for any purpose, without fee, and without a written agreement
-is hereby granted, provided that the above copyright notice and this
-paragraph and the following two paragraphs appear in all copies.
-
-IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR
-DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING
-LOST PROFITS, ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS
-DOCUMENTATION, EVEN IF THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGE.
-
-THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES,
-INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
-AND FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS
-ON AN "AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATIONS TO
-PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
diff --git a/contrib/libs/libpq/README b/contrib/libs/libpq/README
deleted file mode 100644
index 6416a8cf3b..0000000000
--- a/contrib/libs/libpq/README
+++ /dev/null
@@ -1,27 +0,0 @@
-PostgreSQL Database Management System
-=====================================
-
-This directory contains the source code distribution of the PostgreSQL
-database management system.
-
-PostgreSQL is an advanced object-relational database management system
-that supports an extended subset of the SQL standard, including
-transactions, foreign keys, subqueries, triggers, user-defined types
-and functions.  This distribution also contains C language bindings.
-
-PostgreSQL has many language interfaces, many of which are listed here:
-
-	https://www.postgresql.org/download/
-
-See the file INSTALL for instructions on how to build and install
-PostgreSQL.  That file also lists supported operating systems and
-hardware platforms and contains information regarding any other
-software packages that are required to build or run the PostgreSQL
-system.  Copyright and license information can be found in the
-file COPYRIGHT.  A comprehensive documentation set is included in this
-distribution; it can be read as described in the installation
-instructions.
-
-The latest version of this software may be obtained at
-https://www.postgresql.org/download/.  For more information look at our
-web site located at https://www.postgresql.org/.
diff --git a/contrib/libs/libpq/README.git b/contrib/libs/libpq/README.git
deleted file mode 100644
index 4bf614eea4..0000000000
--- a/contrib/libs/libpq/README.git
+++ /dev/null
@@ -1,14 +0,0 @@
-(This file does not appear in release tarballs.)
-
-In a release or snapshot tarball of PostgreSQL, a documentation file named
-INSTALL will appear in this directory.  However, this file is not stored in
-git and so will not be present if you are using a git checkout.
-
-If you are using a git checkout, you can view the most recent installation
-instructions at:
-	https://www.postgresql.org/docs/devel/installation.html
-
-Users compiling from git will also need compatible versions of Bison, Flex,
-and Perl, as discussed in the install documentation.  These programs are not
-needed when using a tarball, since the files they are needed to build are
-already present in the tarball.  (On Windows, however, you need Perl anyway.)
diff --git a/contrib/libs/libpq/src/backend/catalog/pg_tablespace_d.h b/contrib/libs/libpq/src/backend/catalog/pg_tablespace_d.h
deleted file mode 100644
index 064e58d758..0000000000
--- a/contrib/libs/libpq/src/backend/catalog/pg_tablespace_d.h
+++ /dev/null
@@ -1,38 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * pg_tablespace_d.h
- *    Macro definitions for pg_tablespace
- *
- * Portions Copyright (c) 1996-2023, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- * NOTES
- *  ******************************
- *  *** DO NOT EDIT THIS FILE! ***
- *  ******************************
- *
- *  It has been GENERATED by src/backend/catalog/genbki.pl
- *
- *-------------------------------------------------------------------------
- */
-#ifndef PG_TABLESPACE_D_H
-#define PG_TABLESPACE_D_H
-
-#define TableSpaceRelationId 1213
-#define PgTablespaceToastTable 4185
-#define PgTablespaceToastIndex 4186
-#define TablespaceOidIndexId 2697
-#define TablespaceNameIndexId 2698
-
-#define Anum_pg_tablespace_oid 1
-#define Anum_pg_tablespace_spcname 2
-#define Anum_pg_tablespace_spcowner 3
-#define Anum_pg_tablespace_spcacl 4
-#define Anum_pg_tablespace_spcoptions 5
-
-#define Natts_pg_tablespace 5
-
-#define DEFAULTTABLESPACE_OID 1663
-#define GLOBALTABLESPACE_OID 1664
-
-#endif							/* PG_TABLESPACE_D_H */
diff --git a/contrib/libs/libpq/src/backend/utils/README.Gen_dummy_probes b/contrib/libs/libpq/src/backend/utils/README.Gen_dummy_probes
deleted file mode 100644
index e17060ef24..0000000000
--- a/contrib/libs/libpq/src/backend/utils/README.Gen_dummy_probes
+++ /dev/null
@@ -1,27 +0,0 @@
-# Generating dummy probes
-
-If Postgres isn't configured with dtrace enabled, we need to generate
-dummy probes for the entries in probes.d, that do nothing.
-
-This is accomplished in Unix via the sed script `Gen_dummy_probes.sed`. We
-used to use this in MSVC builds using the perl utility `psed`, which mimicked
-sed. However, that utility disappeared from Windows perl distributions and so
-we converted the sed script to a perl script to be used in MSVC builds.
-
-We still keep the sed script as the authoritative source for generating
-these dummy probes because except on Windows perl is not a hard requirement
-when building from a tarball.
-
-So, if you need to change the way dummy probes are generated, first change
-the sed script, and when it's working generate the perl script. This can
-be accomplished by using the perl utility s2p.
-
-s2p is no longer part of the perl core, so it might not be on your system,
-but it is available on CPAN and also in many package systems. e.g.
-on Fedora it can be installed using `cpan App::s2p` or
-`dnf install perl-App-s2p`.
-
-The Makefile contains a recipe for regenerating Gen_dummy_probes.pl, so all
-you need to do is once you have s2p installed is `make Gen_dummy_probes.pl`
-Note that in a VPATH build this will generate the file in the vpath tree,
-not the source tree.
diff --git a/contrib/libs/libpq/src/backend/utils/errcodes.h b/contrib/libs/libpq/src/backend/utils/errcodes.h
deleted file mode 100644
index a2f604c2fa..0000000000
--- a/contrib/libs/libpq/src/backend/utils/errcodes.h
+++ /dev/null
@@ -1,354 +0,0 @@
-/* autogenerated from src/backend/utils/errcodes.txt, do not edit */
-/* there is deliberately not an #ifndef ERRCODES_H here */
-
-/* Class 00 - Successful Completion */
-#define ERRCODE_SUCCESSFUL_COMPLETION MAKE_SQLSTATE('0','0','0','0','0')
-
-/* Class 01 - Warning */
-#define ERRCODE_WARNING MAKE_SQLSTATE('0','1','0','0','0')
-#define ERRCODE_WARNING_DYNAMIC_RESULT_SETS_RETURNED MAKE_SQLSTATE('0','1','0','0','C')
-#define ERRCODE_WARNING_IMPLICIT_ZERO_BIT_PADDING MAKE_SQLSTATE('0','1','0','0','8')
-#define ERRCODE_WARNING_NULL_VALUE_ELIMINATED_IN_SET_FUNCTION MAKE_SQLSTATE('0','1','0','0','3')
-#define ERRCODE_WARNING_PRIVILEGE_NOT_GRANTED MAKE_SQLSTATE('0','1','0','0','7')
-#define ERRCODE_WARNING_PRIVILEGE_NOT_REVOKED MAKE_SQLSTATE('0','1','0','0','6')
-#define ERRCODE_WARNING_STRING_DATA_RIGHT_TRUNCATION MAKE_SQLSTATE('0','1','0','0','4')
-#define ERRCODE_WARNING_DEPRECATED_FEATURE MAKE_SQLSTATE('0','1','P','0','1')
-
-/* Class 02 - No Data (this is also a warning class per the SQL standard) */
-#define ERRCODE_NO_DATA MAKE_SQLSTATE('0','2','0','0','0')
-#define ERRCODE_NO_ADDITIONAL_DYNAMIC_RESULT_SETS_RETURNED MAKE_SQLSTATE('0','2','0','0','1')
-
-/* Class 03 - SQL Statement Not Yet Complete */
-#define ERRCODE_SQL_STATEMENT_NOT_YET_COMPLETE MAKE_SQLSTATE('0','3','0','0','0')
-
-/* Class 08 - Connection Exception */
-#define ERRCODE_CONNECTION_EXCEPTION MAKE_SQLSTATE('0','8','0','0','0')
-#define ERRCODE_CONNECTION_DOES_NOT_EXIST MAKE_SQLSTATE('0','8','0','0','3')
-#define ERRCODE_CONNECTION_FAILURE MAKE_SQLSTATE('0','8','0','0','6')
-#define ERRCODE_SQLCLIENT_UNABLE_TO_ESTABLISH_SQLCONNECTION MAKE_SQLSTATE('0','8','0','0','1')
-#define ERRCODE_SQLSERVER_REJECTED_ESTABLISHMENT_OF_SQLCONNECTION MAKE_SQLSTATE('0','8','0','0','4')
-#define ERRCODE_TRANSACTION_RESOLUTION_UNKNOWN MAKE_SQLSTATE('0','8','0','0','7')
-#define ERRCODE_PROTOCOL_VIOLATION MAKE_SQLSTATE('0','8','P','0','1')
-
-/* Class 09 - Triggered Action Exception */
-#define ERRCODE_TRIGGERED_ACTION_EXCEPTION MAKE_SQLSTATE('0','9','0','0','0')
-
-/* Class 0A - Feature Not Supported */
-#define ERRCODE_FEATURE_NOT_SUPPORTED MAKE_SQLSTATE('0','A','0','0','0')
-
-/* Class 0B - Invalid Transaction Initiation */
-#define ERRCODE_INVALID_TRANSACTION_INITIATION MAKE_SQLSTATE('0','B','0','0','0')
-
-/* Class 0F - Locator Exception */
-#define ERRCODE_LOCATOR_EXCEPTION MAKE_SQLSTATE('0','F','0','0','0')
-#define ERRCODE_L_E_INVALID_SPECIFICATION MAKE_SQLSTATE('0','F','0','0','1')
-
-/* Class 0L - Invalid Grantor */
-#define ERRCODE_INVALID_GRANTOR MAKE_SQLSTATE('0','L','0','0','0')
-#define ERRCODE_INVALID_GRANT_OPERATION MAKE_SQLSTATE('0','L','P','0','1')
-
-/* Class 0P - Invalid Role Specification */
-#define ERRCODE_INVALID_ROLE_SPECIFICATION MAKE_SQLSTATE('0','P','0','0','0')
-
-/* Class 0Z - Diagnostics Exception */
-#define ERRCODE_DIAGNOSTICS_EXCEPTION MAKE_SQLSTATE('0','Z','0','0','0')
-#define ERRCODE_STACKED_DIAGNOSTICS_ACCESSED_WITHOUT_ACTIVE_HANDLER MAKE_SQLSTATE('0','Z','0','0','2')
-
-/* Class 20 - Case Not Found */
-#define ERRCODE_CASE_NOT_FOUND MAKE_SQLSTATE('2','0','0','0','0')
-
-/* Class 21 - Cardinality Violation */
-#define ERRCODE_CARDINALITY_VIOLATION MAKE_SQLSTATE('2','1','0','0','0')
-
-/* Class 22 - Data Exception */
-#define ERRCODE_DATA_EXCEPTION MAKE_SQLSTATE('2','2','0','0','0')
-#define ERRCODE_ARRAY_ELEMENT_ERROR MAKE_SQLSTATE('2','2','0','2','E')
-#define ERRCODE_ARRAY_SUBSCRIPT_ERROR MAKE_SQLSTATE('2','2','0','2','E')
-#define ERRCODE_CHARACTER_NOT_IN_REPERTOIRE MAKE_SQLSTATE('2','2','0','2','1')
-#define ERRCODE_DATETIME_FIELD_OVERFLOW MAKE_SQLSTATE('2','2','0','0','8')
-#define ERRCODE_DATETIME_VALUE_OUT_OF_RANGE MAKE_SQLSTATE('2','2','0','0','8')
-#define ERRCODE_DIVISION_BY_ZERO MAKE_SQLSTATE('2','2','0','1','2')
-#define ERRCODE_ERROR_IN_ASSIGNMENT MAKE_SQLSTATE('2','2','0','0','5')
-#define ERRCODE_ESCAPE_CHARACTER_CONFLICT MAKE_SQLSTATE('2','2','0','0','B')
-#define ERRCODE_INDICATOR_OVERFLOW MAKE_SQLSTATE('2','2','0','2','2')
-#define ERRCODE_INTERVAL_FIELD_OVERFLOW MAKE_SQLSTATE('2','2','0','1','5')
-#define ERRCODE_INVALID_ARGUMENT_FOR_LOG MAKE_SQLSTATE('2','2','0','1','E')
-#define ERRCODE_INVALID_ARGUMENT_FOR_NTILE MAKE_SQLSTATE('2','2','0','1','4')
-#define ERRCODE_INVALID_ARGUMENT_FOR_NTH_VALUE MAKE_SQLSTATE('2','2','0','1','6')
-#define ERRCODE_INVALID_ARGUMENT_FOR_POWER_FUNCTION MAKE_SQLSTATE('2','2','0','1','F')
-#define ERRCODE_INVALID_ARGUMENT_FOR_WIDTH_BUCKET_FUNCTION MAKE_SQLSTATE('2','2','0','1','G')
-#define ERRCODE_INVALID_CHARACTER_VALUE_FOR_CAST MAKE_SQLSTATE('2','2','0','1','8')
-#define ERRCODE_INVALID_DATETIME_FORMAT MAKE_SQLSTATE('2','2','0','0','7')
-#define ERRCODE_INVALID_ESCAPE_CHARACTER MAKE_SQLSTATE('2','2','0','1','9')
-#define ERRCODE_INVALID_ESCAPE_OCTET MAKE_SQLSTATE('2','2','0','0','D')
-#define ERRCODE_INVALID_ESCAPE_SEQUENCE MAKE_SQLSTATE('2','2','0','2','5')
-#define ERRCODE_NONSTANDARD_USE_OF_ESCAPE_CHARACTER MAKE_SQLSTATE('2','2','P','0','6')
-#define ERRCODE_INVALID_INDICATOR_PARAMETER_VALUE MAKE_SQLSTATE('2','2','0','1','0')
-#define ERRCODE_INVALID_PARAMETER_VALUE MAKE_SQLSTATE('2','2','0','2','3')
-#define ERRCODE_INVALID_PRECEDING_OR_FOLLOWING_SIZE MAKE_SQLSTATE('2','2','0','1','3')
-#define ERRCODE_INVALID_REGULAR_EXPRESSION MAKE_SQLSTATE('2','2','0','1','B')
-#define ERRCODE_INVALID_ROW_COUNT_IN_LIMIT_CLAUSE MAKE_SQLSTATE('2','2','0','1','W')
-#define ERRCODE_INVALID_ROW_COUNT_IN_RESULT_OFFSET_CLAUSE MAKE_SQLSTATE('2','2','0','1','X')
-#define ERRCODE_INVALID_TABLESAMPLE_ARGUMENT MAKE_SQLSTATE('2','2','0','2','H')
-#define ERRCODE_INVALID_TABLESAMPLE_REPEAT MAKE_SQLSTATE('2','2','0','2','G')
-#define ERRCODE_INVALID_TIME_ZONE_DISPLACEMENT_VALUE MAKE_SQLSTATE('2','2','0','0','9')
-#define ERRCODE_INVALID_USE_OF_ESCAPE_CHARACTER MAKE_SQLSTATE('2','2','0','0','C')
-#define ERRCODE_MOST_SPECIFIC_TYPE_MISMATCH MAKE_SQLSTATE('2','2','0','0','G')
-#define ERRCODE_NULL_VALUE_NOT_ALLOWED MAKE_SQLSTATE('2','2','0','0','4')
-#define ERRCODE_NULL_VALUE_NO_INDICATOR_PARAMETER MAKE_SQLSTATE('2','2','0','0','2')
-#define ERRCODE_NUMERIC_VALUE_OUT_OF_RANGE MAKE_SQLSTATE('2','2','0','0','3')
-#define ERRCODE_SEQUENCE_GENERATOR_LIMIT_EXCEEDED MAKE_SQLSTATE('2','2','0','0','H')
-#define ERRCODE_STRING_DATA_LENGTH_MISMATCH MAKE_SQLSTATE('2','2','0','2','6')
-#define ERRCODE_STRING_DATA_RIGHT_TRUNCATION MAKE_SQLSTATE('2','2','0','0','1')
-#define ERRCODE_SUBSTRING_ERROR MAKE_SQLSTATE('2','2','0','1','1')
-#define ERRCODE_TRIM_ERROR MAKE_SQLSTATE('2','2','0','2','7')
-#define ERRCODE_UNTERMINATED_C_STRING MAKE_SQLSTATE('2','2','0','2','4')
-#define ERRCODE_ZERO_LENGTH_CHARACTER_STRING MAKE_SQLSTATE('2','2','0','0','F')
-#define ERRCODE_FLOATING_POINT_EXCEPTION MAKE_SQLSTATE('2','2','P','0','1')
-#define ERRCODE_INVALID_TEXT_REPRESENTATION MAKE_SQLSTATE('2','2','P','0','2')
-#define ERRCODE_INVALID_BINARY_REPRESENTATION MAKE_SQLSTATE('2','2','P','0','3')
-#define ERRCODE_BAD_COPY_FILE_FORMAT MAKE_SQLSTATE('2','2','P','0','4')
-#define ERRCODE_UNTRANSLATABLE_CHARACTER MAKE_SQLSTATE('2','2','P','0','5')
-#define ERRCODE_NOT_AN_XML_DOCUMENT MAKE_SQLSTATE('2','2','0','0','L')
-#define ERRCODE_INVALID_XML_DOCUMENT MAKE_SQLSTATE('2','2','0','0','M')
-#define ERRCODE_INVALID_XML_CONTENT MAKE_SQLSTATE('2','2','0','0','N')
-#define ERRCODE_INVALID_XML_COMMENT MAKE_SQLSTATE('2','2','0','0','S')
-#define ERRCODE_INVALID_XML_PROCESSING_INSTRUCTION MAKE_SQLSTATE('2','2','0','0','T')
-#define ERRCODE_DUPLICATE_JSON_OBJECT_KEY_VALUE MAKE_SQLSTATE('2','2','0','3','0')
-#define ERRCODE_INVALID_ARGUMENT_FOR_SQL_JSON_DATETIME_FUNCTION MAKE_SQLSTATE('2','2','0','3','1')
-#define ERRCODE_INVALID_JSON_TEXT MAKE_SQLSTATE('2','2','0','3','2')
-#define ERRCODE_INVALID_SQL_JSON_SUBSCRIPT MAKE_SQLSTATE('2','2','0','3','3')
-#define ERRCODE_MORE_THAN_ONE_SQL_JSON_ITEM MAKE_SQLSTATE('2','2','0','3','4')
-#define ERRCODE_NO_SQL_JSON_ITEM MAKE_SQLSTATE('2','2','0','3','5')
-#define ERRCODE_NON_NUMERIC_SQL_JSON_ITEM MAKE_SQLSTATE('2','2','0','3','6')
-#define ERRCODE_NON_UNIQUE_KEYS_IN_A_JSON_OBJECT MAKE_SQLSTATE('2','2','0','3','7')
-#define ERRCODE_SINGLETON_SQL_JSON_ITEM_REQUIRED MAKE_SQLSTATE('2','2','0','3','8')
-#define ERRCODE_SQL_JSON_ARRAY_NOT_FOUND MAKE_SQLSTATE('2','2','0','3','9')
-#define ERRCODE_SQL_JSON_MEMBER_NOT_FOUND MAKE_SQLSTATE('2','2','0','3','A')
-#define ERRCODE_SQL_JSON_NUMBER_NOT_FOUND MAKE_SQLSTATE('2','2','0','3','B')
-#define ERRCODE_SQL_JSON_OBJECT_NOT_FOUND MAKE_SQLSTATE('2','2','0','3','C')
-#define ERRCODE_TOO_MANY_JSON_ARRAY_ELEMENTS MAKE_SQLSTATE('2','2','0','3','D')
-#define ERRCODE_TOO_MANY_JSON_OBJECT_MEMBERS MAKE_SQLSTATE('2','2','0','3','E')
-#define ERRCODE_SQL_JSON_SCALAR_REQUIRED MAKE_SQLSTATE('2','2','0','3','F')
-#define ERRCODE_SQL_JSON_ITEM_CANNOT_BE_CAST_TO_TARGET_TYPE MAKE_SQLSTATE('2','2','0','3','G')
-
-/* Class 23 - Integrity Constraint Violation */
-#define ERRCODE_INTEGRITY_CONSTRAINT_VIOLATION MAKE_SQLSTATE('2','3','0','0','0')
-#define ERRCODE_RESTRICT_VIOLATION MAKE_SQLSTATE('2','3','0','0','1')
-#define ERRCODE_NOT_NULL_VIOLATION MAKE_SQLSTATE('2','3','5','0','2')
-#define ERRCODE_FOREIGN_KEY_VIOLATION MAKE_SQLSTATE('2','3','5','0','3')
-#define ERRCODE_UNIQUE_VIOLATION MAKE_SQLSTATE('2','3','5','0','5')
-#define ERRCODE_CHECK_VIOLATION MAKE_SQLSTATE('2','3','5','1','4')
-#define ERRCODE_EXCLUSION_VIOLATION MAKE_SQLSTATE('2','3','P','0','1')
-
-/* Class 24 - Invalid Cursor State */
-#define ERRCODE_INVALID_CURSOR_STATE MAKE_SQLSTATE('2','4','0','0','0')
-
-/* Class 25 - Invalid Transaction State */
-#define ERRCODE_INVALID_TRANSACTION_STATE MAKE_SQLSTATE('2','5','0','0','0')
-#define ERRCODE_ACTIVE_SQL_TRANSACTION MAKE_SQLSTATE('2','5','0','0','1')
-#define ERRCODE_BRANCH_TRANSACTION_ALREADY_ACTIVE MAKE_SQLSTATE('2','5','0','0','2')
-#define ERRCODE_HELD_CURSOR_REQUIRES_SAME_ISOLATION_LEVEL MAKE_SQLSTATE('2','5','0','0','8')
-#define ERRCODE_INAPPROPRIATE_ACCESS_MODE_FOR_BRANCH_TRANSACTION MAKE_SQLSTATE('2','5','0','0','3')
-#define ERRCODE_INAPPROPRIATE_ISOLATION_LEVEL_FOR_BRANCH_TRANSACTION MAKE_SQLSTATE('2','5','0','0','4')
-#define ERRCODE_NO_ACTIVE_SQL_TRANSACTION_FOR_BRANCH_TRANSACTION MAKE_SQLSTATE('2','5','0','0','5')
-#define ERRCODE_READ_ONLY_SQL_TRANSACTION MAKE_SQLSTATE('2','5','0','0','6')
-#define ERRCODE_SCHEMA_AND_DATA_STATEMENT_MIXING_NOT_SUPPORTED MAKE_SQLSTATE('2','5','0','0','7')
-#define ERRCODE_NO_ACTIVE_SQL_TRANSACTION MAKE_SQLSTATE('2','5','P','0','1')
-#define ERRCODE_IN_FAILED_SQL_TRANSACTION MAKE_SQLSTATE('2','5','P','0','2')
-#define ERRCODE_IDLE_IN_TRANSACTION_SESSION_TIMEOUT MAKE_SQLSTATE('2','5','P','0','3')
-
-/* Class 26 - Invalid SQL Statement Name */
-#define ERRCODE_INVALID_SQL_STATEMENT_NAME MAKE_SQLSTATE('2','6','0','0','0')
-
-/* Class 27 - Triggered Data Change Violation */
-#define ERRCODE_TRIGGERED_DATA_CHANGE_VIOLATION MAKE_SQLSTATE('2','7','0','0','0')
-
-/* Class 28 - Invalid Authorization Specification */
-#define ERRCODE_INVALID_AUTHORIZATION_SPECIFICATION MAKE_SQLSTATE('2','8','0','0','0')
-#define ERRCODE_INVALID_PASSWORD MAKE_SQLSTATE('2','8','P','0','1')
-
-/* Class 2B - Dependent Privilege Descriptors Still Exist */
-#define ERRCODE_DEPENDENT_PRIVILEGE_DESCRIPTORS_STILL_EXIST MAKE_SQLSTATE('2','B','0','0','0')
-#define ERRCODE_DEPENDENT_OBJECTS_STILL_EXIST MAKE_SQLSTATE('2','B','P','0','1')
-
-/* Class 2D - Invalid Transaction Termination */
-#define ERRCODE_INVALID_TRANSACTION_TERMINATION MAKE_SQLSTATE('2','D','0','0','0')
-
-/* Class 2F - SQL Routine Exception */
-#define ERRCODE_SQL_ROUTINE_EXCEPTION MAKE_SQLSTATE('2','F','0','0','0')
-#define ERRCODE_S_R_E_FUNCTION_EXECUTED_NO_RETURN_STATEMENT MAKE_SQLSTATE('2','F','0','0','5')
-#define ERRCODE_S_R_E_MODIFYING_SQL_DATA_NOT_PERMITTED MAKE_SQLSTATE('2','F','0','0','2')
-#define ERRCODE_S_R_E_PROHIBITED_SQL_STATEMENT_ATTEMPTED MAKE_SQLSTATE('2','F','0','0','3')
-#define ERRCODE_S_R_E_READING_SQL_DATA_NOT_PERMITTED MAKE_SQLSTATE('2','F','0','0','4')
-
-/* Class 34 - Invalid Cursor Name */
-#define ERRCODE_INVALID_CURSOR_NAME MAKE_SQLSTATE('3','4','0','0','0')
-
-/* Class 38 - External Routine Exception */
-#define ERRCODE_EXTERNAL_ROUTINE_EXCEPTION MAKE_SQLSTATE('3','8','0','0','0')
-#define ERRCODE_E_R_E_CONTAINING_SQL_NOT_PERMITTED MAKE_SQLSTATE('3','8','0','0','1')
-#define ERRCODE_E_R_E_MODIFYING_SQL_DATA_NOT_PERMITTED MAKE_SQLSTATE('3','8','0','0','2')
-#define ERRCODE_E_R_E_PROHIBITED_SQL_STATEMENT_ATTEMPTED MAKE_SQLSTATE('3','8','0','0','3')
-#define ERRCODE_E_R_E_READING_SQL_DATA_NOT_PERMITTED MAKE_SQLSTATE('3','8','0','0','4')
-
-/* Class 39 - External Routine Invocation Exception */
-#define ERRCODE_EXTERNAL_ROUTINE_INVOCATION_EXCEPTION MAKE_SQLSTATE('3','9','0','0','0')
-#define ERRCODE_E_R_I_E_INVALID_SQLSTATE_RETURNED MAKE_SQLSTATE('3','9','0','0','1')
-#define ERRCODE_E_R_I_E_NULL_VALUE_NOT_ALLOWED MAKE_SQLSTATE('3','9','0','0','4')
-#define ERRCODE_E_R_I_E_TRIGGER_PROTOCOL_VIOLATED MAKE_SQLSTATE('3','9','P','0','1')
-#define ERRCODE_E_R_I_E_SRF_PROTOCOL_VIOLATED MAKE_SQLSTATE('3','9','P','0','2')
-#define ERRCODE_E_R_I_E_EVENT_TRIGGER_PROTOCOL_VIOLATED MAKE_SQLSTATE('3','9','P','0','3')
-
-/* Class 3B - Savepoint Exception */
-#define ERRCODE_SAVEPOINT_EXCEPTION MAKE_SQLSTATE('3','B','0','0','0')
-#define ERRCODE_S_E_INVALID_SPECIFICATION MAKE_SQLSTATE('3','B','0','0','1')
-
-/* Class 3D - Invalid Catalog Name */
-#define ERRCODE_INVALID_CATALOG_NAME MAKE_SQLSTATE('3','D','0','0','0')
-
-/* Class 3F - Invalid Schema Name */
-#define ERRCODE_INVALID_SCHEMA_NAME MAKE_SQLSTATE('3','F','0','0','0')
-
-/* Class 40 - Transaction Rollback */
-#define ERRCODE_TRANSACTION_ROLLBACK MAKE_SQLSTATE('4','0','0','0','0')
-#define ERRCODE_T_R_INTEGRITY_CONSTRAINT_VIOLATION MAKE_SQLSTATE('4','0','0','0','2')
-#define ERRCODE_T_R_SERIALIZATION_FAILURE MAKE_SQLSTATE('4','0','0','0','1')
-#define ERRCODE_T_R_STATEMENT_COMPLETION_UNKNOWN MAKE_SQLSTATE('4','0','0','0','3')
-#define ERRCODE_T_R_DEADLOCK_DETECTED MAKE_SQLSTATE('4','0','P','0','1')
-
-/* Class 42 - Syntax Error or Access Rule Violation */
-#define ERRCODE_SYNTAX_ERROR_OR_ACCESS_RULE_VIOLATION MAKE_SQLSTATE('4','2','0','0','0')
-#define ERRCODE_SYNTAX_ERROR MAKE_SQLSTATE('4','2','6','0','1')
-#define ERRCODE_INSUFFICIENT_PRIVILEGE MAKE_SQLSTATE('4','2','5','0','1')
-#define ERRCODE_CANNOT_COERCE MAKE_SQLSTATE('4','2','8','4','6')
-#define ERRCODE_GROUPING_ERROR MAKE_SQLSTATE('4','2','8','0','3')
-#define ERRCODE_WINDOWING_ERROR MAKE_SQLSTATE('4','2','P','2','0')
-#define ERRCODE_INVALID_RECURSION MAKE_SQLSTATE('4','2','P','1','9')
-#define ERRCODE_INVALID_FOREIGN_KEY MAKE_SQLSTATE('4','2','8','3','0')
-#define ERRCODE_INVALID_NAME MAKE_SQLSTATE('4','2','6','0','2')
-#define ERRCODE_NAME_TOO_LONG MAKE_SQLSTATE('4','2','6','2','2')
-#define ERRCODE_RESERVED_NAME MAKE_SQLSTATE('4','2','9','3','9')
-#define ERRCODE_DATATYPE_MISMATCH MAKE_SQLSTATE('4','2','8','0','4')
-#define ERRCODE_INDETERMINATE_DATATYPE MAKE_SQLSTATE('4','2','P','1','8')
-#define ERRCODE_COLLATION_MISMATCH MAKE_SQLSTATE('4','2','P','2','1')
-#define ERRCODE_INDETERMINATE_COLLATION MAKE_SQLSTATE('4','2','P','2','2')
-#define ERRCODE_WRONG_OBJECT_TYPE MAKE_SQLSTATE('4','2','8','0','9')
-#define ERRCODE_GENERATED_ALWAYS MAKE_SQLSTATE('4','2','8','C','9')
-#define ERRCODE_UNDEFINED_COLUMN MAKE_SQLSTATE('4','2','7','0','3')
-#define ERRCODE_UNDEFINED_CURSOR MAKE_SQLSTATE('3','4','0','0','0')
-#define ERRCODE_UNDEFINED_DATABASE MAKE_SQLSTATE('3','D','0','0','0')
-#define ERRCODE_UNDEFINED_FUNCTION MAKE_SQLSTATE('4','2','8','8','3')
-#define ERRCODE_UNDEFINED_PSTATEMENT MAKE_SQLSTATE('2','6','0','0','0')
-#define ERRCODE_UNDEFINED_SCHEMA MAKE_SQLSTATE('3','F','0','0','0')
-#define ERRCODE_UNDEFINED_TABLE MAKE_SQLSTATE('4','2','P','0','1')
-#define ERRCODE_UNDEFINED_PARAMETER MAKE_SQLSTATE('4','2','P','0','2')
-#define ERRCODE_UNDEFINED_OBJECT MAKE_SQLSTATE('4','2','7','0','4')
-#define ERRCODE_DUPLICATE_COLUMN MAKE_SQLSTATE('4','2','7','0','1')
-#define ERRCODE_DUPLICATE_CURSOR MAKE_SQLSTATE('4','2','P','0','3')
-#define ERRCODE_DUPLICATE_DATABASE MAKE_SQLSTATE('4','2','P','0','4')
-#define ERRCODE_DUPLICATE_FUNCTION MAKE_SQLSTATE('4','2','7','2','3')
-#define ERRCODE_DUPLICATE_PSTATEMENT MAKE_SQLSTATE('4','2','P','0','5')
-#define ERRCODE_DUPLICATE_SCHEMA MAKE_SQLSTATE('4','2','P','0','6')
-#define ERRCODE_DUPLICATE_TABLE MAKE_SQLSTATE('4','2','P','0','7')
-#define ERRCODE_DUPLICATE_ALIAS MAKE_SQLSTATE('4','2','7','1','2')
-#define ERRCODE_DUPLICATE_OBJECT MAKE_SQLSTATE('4','2','7','1','0')
-#define ERRCODE_AMBIGUOUS_COLUMN MAKE_SQLSTATE('4','2','7','0','2')
-#define ERRCODE_AMBIGUOUS_FUNCTION MAKE_SQLSTATE('4','2','7','2','5')
-#define ERRCODE_AMBIGUOUS_PARAMETER MAKE_SQLSTATE('4','2','P','0','8')
-#define ERRCODE_AMBIGUOUS_ALIAS MAKE_SQLSTATE('4','2','P','0','9')
-#define ERRCODE_INVALID_COLUMN_REFERENCE MAKE_SQLSTATE('4','2','P','1','0')
-#define ERRCODE_INVALID_COLUMN_DEFINITION MAKE_SQLSTATE('4','2','6','1','1')
-#define ERRCODE_INVALID_CURSOR_DEFINITION MAKE_SQLSTATE('4','2','P','1','1')
-#define ERRCODE_INVALID_DATABASE_DEFINITION MAKE_SQLSTATE('4','2','P','1','2')
-#define ERRCODE_INVALID_FUNCTION_DEFINITION MAKE_SQLSTATE('4','2','P','1','3')
-#define ERRCODE_INVALID_PSTATEMENT_DEFINITION MAKE_SQLSTATE('4','2','P','1','4')
-#define ERRCODE_INVALID_SCHEMA_DEFINITION MAKE_SQLSTATE('4','2','P','1','5')
-#define ERRCODE_INVALID_TABLE_DEFINITION MAKE_SQLSTATE('4','2','P','1','6')
-#define ERRCODE_INVALID_OBJECT_DEFINITION MAKE_SQLSTATE('4','2','P','1','7')
-
-/* Class 44 - WITH CHECK OPTION Violation */
-#define ERRCODE_WITH_CHECK_OPTION_VIOLATION MAKE_SQLSTATE('4','4','0','0','0')
-
-/* Class 53 - Insufficient Resources */
-#define ERRCODE_INSUFFICIENT_RESOURCES MAKE_SQLSTATE('5','3','0','0','0')
-#define ERRCODE_DISK_FULL MAKE_SQLSTATE('5','3','1','0','0')
-#define ERRCODE_OUT_OF_MEMORY MAKE_SQLSTATE('5','3','2','0','0')
-#define ERRCODE_TOO_MANY_CONNECTIONS MAKE_SQLSTATE('5','3','3','0','0')
-#define ERRCODE_CONFIGURATION_LIMIT_EXCEEDED MAKE_SQLSTATE('5','3','4','0','0')
-
-/* Class 54 - Program Limit Exceeded */
-#define ERRCODE_PROGRAM_LIMIT_EXCEEDED MAKE_SQLSTATE('5','4','0','0','0')
-#define ERRCODE_STATEMENT_TOO_COMPLEX MAKE_SQLSTATE('5','4','0','0','1')
-#define ERRCODE_TOO_MANY_COLUMNS MAKE_SQLSTATE('5','4','0','1','1')
-#define ERRCODE_TOO_MANY_ARGUMENTS MAKE_SQLSTATE('5','4','0','2','3')
-
-/* Class 55 - Object Not In Prerequisite State */
-#define ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE MAKE_SQLSTATE('5','5','0','0','0')
-#define ERRCODE_OBJECT_IN_USE MAKE_SQLSTATE('5','5','0','0','6')
-#define ERRCODE_CANT_CHANGE_RUNTIME_PARAM MAKE_SQLSTATE('5','5','P','0','2')
-#define ERRCODE_LOCK_NOT_AVAILABLE MAKE_SQLSTATE('5','5','P','0','3')
-#define ERRCODE_UNSAFE_NEW_ENUM_VALUE_USAGE MAKE_SQLSTATE('5','5','P','0','4')
-
-/* Class 57 - Operator Intervention */
-#define ERRCODE_OPERATOR_INTERVENTION MAKE_SQLSTATE('5','7','0','0','0')
-#define ERRCODE_QUERY_CANCELED MAKE_SQLSTATE('5','7','0','1','4')
-#define ERRCODE_ADMIN_SHUTDOWN MAKE_SQLSTATE('5','7','P','0','1')
-#define ERRCODE_CRASH_SHUTDOWN MAKE_SQLSTATE('5','7','P','0','2')
-#define ERRCODE_CANNOT_CONNECT_NOW MAKE_SQLSTATE('5','7','P','0','3')
-#define ERRCODE_DATABASE_DROPPED MAKE_SQLSTATE('5','7','P','0','4')
-#define ERRCODE_IDLE_SESSION_TIMEOUT MAKE_SQLSTATE('5','7','P','0','5')
-
-/* Class 58 - System Error (errors external to PostgreSQL itself) */
-#define ERRCODE_SYSTEM_ERROR MAKE_SQLSTATE('5','8','0','0','0')
-#define ERRCODE_IO_ERROR MAKE_SQLSTATE('5','8','0','3','0')
-#define ERRCODE_UNDEFINED_FILE MAKE_SQLSTATE('5','8','P','0','1')
-#define ERRCODE_DUPLICATE_FILE MAKE_SQLSTATE('5','8','P','0','2')
-
-/* Class 72 - Snapshot Failure */
-#define ERRCODE_SNAPSHOT_TOO_OLD MAKE_SQLSTATE('7','2','0','0','0')
-
-/* Class F0 - Configuration File Error */
-#define ERRCODE_CONFIG_FILE_ERROR MAKE_SQLSTATE('F','0','0','0','0')
-#define ERRCODE_LOCK_FILE_EXISTS MAKE_SQLSTATE('F','0','0','0','1')
-
-/* Class HV - Foreign Data Wrapper Error (SQL/MED) */
-#define ERRCODE_FDW_ERROR MAKE_SQLSTATE('H','V','0','0','0')
-#define ERRCODE_FDW_COLUMN_NAME_NOT_FOUND MAKE_SQLSTATE('H','V','0','0','5')
-#define ERRCODE_FDW_DYNAMIC_PARAMETER_VALUE_NEEDED MAKE_SQLSTATE('H','V','0','0','2')
-#define ERRCODE_FDW_FUNCTION_SEQUENCE_ERROR MAKE_SQLSTATE('H','V','0','1','0')
-#define ERRCODE_FDW_INCONSISTENT_DESCRIPTOR_INFORMATION MAKE_SQLSTATE('H','V','0','2','1')
-#define ERRCODE_FDW_INVALID_ATTRIBUTE_VALUE MAKE_SQLSTATE('H','V','0','2','4')
-#define ERRCODE_FDW_INVALID_COLUMN_NAME MAKE_SQLSTATE('H','V','0','0','7')
-#define ERRCODE_FDW_INVALID_COLUMN_NUMBER MAKE_SQLSTATE('H','V','0','0','8')
-#define ERRCODE_FDW_INVALID_DATA_TYPE MAKE_SQLSTATE('H','V','0','0','4')
-#define ERRCODE_FDW_INVALID_DATA_TYPE_DESCRIPTORS MAKE_SQLSTATE('H','V','0','0','6')
-#define ERRCODE_FDW_INVALID_DESCRIPTOR_FIELD_IDENTIFIER MAKE_SQLSTATE('H','V','0','9','1')
-#define ERRCODE_FDW_INVALID_HANDLE MAKE_SQLSTATE('H','V','0','0','B')
-#define ERRCODE_FDW_INVALID_OPTION_INDEX MAKE_SQLSTATE('H','V','0','0','C')
-#define ERRCODE_FDW_INVALID_OPTION_NAME MAKE_SQLSTATE('H','V','0','0','D')
-#define ERRCODE_FDW_INVALID_STRING_LENGTH_OR_BUFFER_LENGTH MAKE_SQLSTATE('H','V','0','9','0')
-#define ERRCODE_FDW_INVALID_STRING_FORMAT MAKE_SQLSTATE('H','V','0','0','A')
-#define ERRCODE_FDW_INVALID_USE_OF_NULL_POINTER MAKE_SQLSTATE('H','V','0','0','9')
-#define ERRCODE_FDW_TOO_MANY_HANDLES MAKE_SQLSTATE('H','V','0','1','4')
-#define ERRCODE_FDW_OUT_OF_MEMORY MAKE_SQLSTATE('H','V','0','0','1')
-#define ERRCODE_FDW_NO_SCHEMAS MAKE_SQLSTATE('H','V','0','0','P')
-#define ERRCODE_FDW_OPTION_NAME_NOT_FOUND MAKE_SQLSTATE('H','V','0','0','J')
-#define ERRCODE_FDW_REPLY_HANDLE MAKE_SQLSTATE('H','V','0','0','K')
-#define ERRCODE_FDW_SCHEMA_NOT_FOUND MAKE_SQLSTATE('H','V','0','0','Q')
-#define ERRCODE_FDW_TABLE_NOT_FOUND MAKE_SQLSTATE('H','V','0','0','R')
-#define ERRCODE_FDW_UNABLE_TO_CREATE_EXECUTION MAKE_SQLSTATE('H','V','0','0','L')
-#define ERRCODE_FDW_UNABLE_TO_CREATE_REPLY MAKE_SQLSTATE('H','V','0','0','M')
-#define ERRCODE_FDW_UNABLE_TO_ESTABLISH_CONNECTION MAKE_SQLSTATE('H','V','0','0','N')
-
-/* Class P0 - PL/pgSQL Error */
-#define ERRCODE_PLPGSQL_ERROR MAKE_SQLSTATE('P','0','0','0','0')
-#define ERRCODE_RAISE_EXCEPTION MAKE_SQLSTATE('P','0','0','0','1')
-#define ERRCODE_NO_DATA_FOUND MAKE_SQLSTATE('P','0','0','0','2')
-#define ERRCODE_TOO_MANY_ROWS MAKE_SQLSTATE('P','0','0','0','3')
-#define ERRCODE_ASSERT_FAILURE MAKE_SQLSTATE('P','0','0','0','4')
-
-/* Class XX - Internal Error */
-#define ERRCODE_INTERNAL_ERROR MAKE_SQLSTATE('X','X','0','0','0')
-#define ERRCODE_DATA_CORRUPTED MAKE_SQLSTATE('X','X','0','0','1')
-#define ERRCODE_INDEX_CORRUPTED MAKE_SQLSTATE('X','X','0','0','2')
diff --git a/contrib/libs/libpq/src/common/archive.c b/contrib/libs/libpq/src/common/archive.c
deleted file mode 100644
index 641a58ee88..0000000000
--- a/contrib/libs/libpq/src/common/archive.c
+++ /dev/null
@@ -1,60 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * archive.c
- *	  Common WAL archive routines
- *
- * Portions Copyright (c) 1996-2023, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- *
- * IDENTIFICATION
- *	  src/common/archive.c
- *
- *-------------------------------------------------------------------------
- */
-
-#ifndef FRONTEND
-#include "postgres.h"
-#else
-#include "postgres_fe.h"
-#endif
-
-#include "common/archive.h"
-#include "common/percentrepl.h"
-
-/*
- * BuildRestoreCommand
- *
- * Builds a restore command to retrieve a file from WAL archives, replacing
- * the supported aliases with values supplied by the caller as defined by
- * the GUC parameter restore_command: xlogpath for %p, xlogfname for %f and
- * lastRestartPointFname for %r.
- *
- * The result is a palloc'd string for the restore command built.  The
- * caller is responsible for freeing it.  If any of the required arguments
- * is NULL and that the corresponding alias is found in the command given
- * by the caller, then an error is thrown.
- */
-char *
-BuildRestoreCommand(const char *restoreCommand,
-					const char *xlogpath,
-					const char *xlogfname,
-					const char *lastRestartPointFname)
-{
-	char	   *nativePath = NULL;
-	char	   *result;
-
-	if (xlogpath)
-	{
-		nativePath = pstrdup(xlogpath);
-		make_native_path(nativePath);
-	}
-
-	result = replace_percent_placeholders(restoreCommand, "restore_command", "frp",
-										  xlogfname, lastRestartPointFname, nativePath);
-
-	if (nativePath)
-		pfree(nativePath);
-
-	return result;
-}
diff --git a/contrib/libs/libpq/src/common/base64.c b/contrib/libs/libpq/src/common/base64.c
deleted file mode 100644
index ec4eb49382..0000000000
--- a/contrib/libs/libpq/src/common/base64.c
+++ /dev/null
@@ -1,242 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * base64.c
- *	  Encoding and decoding routines for base64 without whitespace.
- *
- * Copyright (c) 2001-2023, PostgreSQL Global Development Group
- *
- *
- * IDENTIFICATION
- *	  src/common/base64.c
- *
- *-------------------------------------------------------------------------
- */
-
-#ifndef FRONTEND
-#include "postgres.h"
-#else
-#include "postgres_fe.h"
-#endif
-
-#include "common/base64.h"
-
-/*
- * BASE64
- */
-
-static const char _base64[] =
-"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
-
-static const int8 b64lookup[128] = {
-	-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-	-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-	-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 62, -1, -1, -1, 63,
-	52, 53, 54, 55, 56, 57, 58, 59, 60, 61, -1, -1, -1, -1, -1, -1,
-	-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
-	15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, -1, -1, -1, -1, -1,
-	-1, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
-	41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, -1, -1, -1, -1, -1,
-};
-
-/*
- * pg_b64_encode
- *
- * Encode into base64 the given string.  Returns the length of the encoded
- * string, and -1 in the event of an error with the result buffer zeroed
- * for safety.
- */
-int
-pg_b64_encode(const char *src, int len, char *dst, int dstlen)
-{
-	char	   *p;
-	const char *s,
-			   *end = src + len;
-	int			pos = 2;
-	uint32		buf = 0;
-
-	s = src;
-	p = dst;
-
-	while (s < end)
-	{
-		buf |= (unsigned char) *s << (pos << 3);
-		pos--;
-		s++;
-
-		/* write it out */
-		if (pos < 0)
-		{
-			/*
-			 * Leave if there is an overflow in the area allocated for the
-			 * encoded string.
-			 */
-			if ((p - dst + 4) > dstlen)
-				goto error;
-
-			*p++ = _base64[(buf >> 18) & 0x3f];
-			*p++ = _base64[(buf >> 12) & 0x3f];
-			*p++ = _base64[(buf >> 6) & 0x3f];
-			*p++ = _base64[buf & 0x3f];
-
-			pos = 2;
-			buf = 0;
-		}
-	}
-	if (pos != 2)
-	{
-		/*
-		 * Leave if there is an overflow in the area allocated for the encoded
-		 * string.
-		 */
-		if ((p - dst + 4) > dstlen)
-			goto error;
-
-		*p++ = _base64[(buf >> 18) & 0x3f];
-		*p++ = _base64[(buf >> 12) & 0x3f];
-		*p++ = (pos == 0) ? _base64[(buf >> 6) & 0x3f] : '=';
-		*p++ = '=';
-	}
-
-	Assert((p - dst) <= dstlen);
-	return p - dst;
-
-error:
-	memset(dst, 0, dstlen);
-	return -1;
-}
-
-/*
- * pg_b64_decode
- *
- * Decode the given base64 string.  Returns the length of the decoded
- * string on success, and -1 in the event of an error with the result
- * buffer zeroed for safety.
- */
-int
-pg_b64_decode(const char *src, int len, char *dst, int dstlen)
-{
-	const char *srcend = src + len,
-			   *s = src;
-	char	   *p = dst;
-	char		c;
-	int			b = 0;
-	uint32		buf = 0;
-	int			pos = 0,
-				end = 0;
-
-	while (s < srcend)
-	{
-		c = *s++;
-
-		/* Leave if a whitespace is found */
-		if (c == ' ' || c == '\t' || c == '\n' || c == '\r')
-			goto error;
-
-		if (c == '=')
-		{
-			/* end sequence */
-			if (!end)
-			{
-				if (pos == 2)
-					end = 1;
-				else if (pos == 3)
-					end = 2;
-				else
-				{
-					/*
-					 * Unexpected "=" character found while decoding base64
-					 * sequence.
-					 */
-					goto error;
-				}
-			}
-			b = 0;
-		}
-		else
-		{
-			b = -1;
-			if (c > 0 && c < 127)
-				b = b64lookup[(unsigned char) c];
-			if (b < 0)
-			{
-				/* invalid symbol found */
-				goto error;
-			}
-		}
-		/* add it to buffer */
-		buf = (buf << 6) + b;
-		pos++;
-		if (pos == 4)
-		{
-			/*
-			 * Leave if there is an overflow in the area allocated for the
-			 * decoded string.
-			 */
-			if ((p - dst + 1) > dstlen)
-				goto error;
-			*p++ = (buf >> 16) & 255;
-
-			if (end == 0 || end > 1)
-			{
-				/* overflow check */
-				if ((p - dst + 1) > dstlen)
-					goto error;
-				*p++ = (buf >> 8) & 255;
-			}
-			if (end == 0 || end > 2)
-			{
-				/* overflow check */
-				if ((p - dst + 1) > dstlen)
-					goto error;
-				*p++ = buf & 255;
-			}
-			buf = 0;
-			pos = 0;
-		}
-	}
-
-	if (pos != 0)
-	{
-		/*
-		 * base64 end sequence is invalid.  Input data is missing padding, is
-		 * truncated or is otherwise corrupted.
-		 */
-		goto error;
-	}
-
-	Assert((p - dst) <= dstlen);
-	return p - dst;
-
-error:
-	memset(dst, 0, dstlen);
-	return -1;
-}
-
-/*
- * pg_b64_enc_len
- *
- * Returns to caller the length of the string if it were encoded with
- * base64 based on the length provided by caller.  This is useful to
- * estimate how large a buffer allocation needs to be done before doing
- * the actual encoding.
- */
-int
-pg_b64_enc_len(int srclen)
-{
-	/* 3 bytes will be converted to 4 */
-	return (srclen + 2) / 3 * 4;
-}
-
-/*
- * pg_b64_dec_len
- *
- * Returns to caller the length of the string if it were to be decoded
- * with base64, based on the length given by caller.  This is useful to
- * estimate how large a buffer allocation needs to be done before doing
- * the actual decoding.
- */
-int
-pg_b64_dec_len(int srclen)
-{
-	return (srclen * 3) >> 2;
-}
diff --git a/contrib/libs/libpq/src/common/checksum_helper.c b/contrib/libs/libpq/src/common/checksum_helper.c
deleted file mode 100644
index 21ff8954fd..0000000000
--- a/contrib/libs/libpq/src/common/checksum_helper.c
+++ /dev/null
@@ -1,232 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * checksum_helper.c
- *	  Compute a checksum of any of various types using common routines
- *
- * Portions Copyright (c) 2016-2023, PostgreSQL Global Development Group
- *
- * IDENTIFICATION
- *		  src/common/checksum_helper.c
- *
- *-------------------------------------------------------------------------
- */
-
-#ifndef FRONTEND
-#include "postgres.h"
-#else
-#include "postgres_fe.h"
-#endif
-
-#include "common/checksum_helper.h"
-
-/*
- * If 'name' is a recognized checksum type, set *type to the corresponding
- * constant and return true. Otherwise, set *type to CHECKSUM_TYPE_NONE and
- * return false.
- */
-bool
-pg_checksum_parse_type(char *name, pg_checksum_type *type)
-{
-	pg_checksum_type result_type = CHECKSUM_TYPE_NONE;
-	bool		result = true;
-
-	if (pg_strcasecmp(name, "none") == 0)
-		result_type = CHECKSUM_TYPE_NONE;
-	else if (pg_strcasecmp(name, "crc32c") == 0)
-		result_type = CHECKSUM_TYPE_CRC32C;
-	else if (pg_strcasecmp(name, "sha224") == 0)
-		result_type = CHECKSUM_TYPE_SHA224;
-	else if (pg_strcasecmp(name, "sha256") == 0)
-		result_type = CHECKSUM_TYPE_SHA256;
-	else if (pg_strcasecmp(name, "sha384") == 0)
-		result_type = CHECKSUM_TYPE_SHA384;
-	else if (pg_strcasecmp(name, "sha512") == 0)
-		result_type = CHECKSUM_TYPE_SHA512;
-	else
-		result = false;
-
-	*type = result_type;
-	return result;
-}
-
-/*
- * Get the canonical human-readable name corresponding to a checksum type.
- */
-char *
-pg_checksum_type_name(pg_checksum_type type)
-{
-	switch (type)
-	{
-		case CHECKSUM_TYPE_NONE:
-			return "NONE";
-		case CHECKSUM_TYPE_CRC32C:
-			return "CRC32C";
-		case CHECKSUM_TYPE_SHA224:
-			return "SHA224";
-		case CHECKSUM_TYPE_SHA256:
-			return "SHA256";
-		case CHECKSUM_TYPE_SHA384:
-			return "SHA384";
-		case CHECKSUM_TYPE_SHA512:
-			return "SHA512";
-	}
-
-	Assert(false);
-	return "???";
-}
-
-/*
- * Initialize a checksum context for checksums of the given type.
- * Returns 0 for a success, -1 for a failure.
- */
-int
-pg_checksum_init(pg_checksum_context *context, pg_checksum_type type)
-{
-	context->type = type;
-
-	switch (type)
-	{
-		case CHECKSUM_TYPE_NONE:
-			/* do nothing */
-			break;
-		case CHECKSUM_TYPE_CRC32C:
-			INIT_CRC32C(context->raw_context.c_crc32c);
-			break;
-		case CHECKSUM_TYPE_SHA224:
-			context->raw_context.c_sha2 = pg_cryptohash_create(PG_SHA224);
-			if (context->raw_context.c_sha2 == NULL)
-				return -1;
-			if (pg_cryptohash_init(context->raw_context.c_sha2) < 0)
-			{
-				pg_cryptohash_free(context->raw_context.c_sha2);
-				return -1;
-			}
-			break;
-		case CHECKSUM_TYPE_SHA256:
-			context->raw_context.c_sha2 = pg_cryptohash_create(PG_SHA256);
-			if (context->raw_context.c_sha2 == NULL)
-				return -1;
-			if (pg_cryptohash_init(context->raw_context.c_sha2) < 0)
-			{
-				pg_cryptohash_free(context->raw_context.c_sha2);
-				return -1;
-			}
-			break;
-		case CHECKSUM_TYPE_SHA384:
-			context->raw_context.c_sha2 = pg_cryptohash_create(PG_SHA384);
-			if (context->raw_context.c_sha2 == NULL)
-				return -1;
-			if (pg_cryptohash_init(context->raw_context.c_sha2) < 0)
-			{
-				pg_cryptohash_free(context->raw_context.c_sha2);
-				return -1;
-			}
-			break;
-		case CHECKSUM_TYPE_SHA512:
-			context->raw_context.c_sha2 = pg_cryptohash_create(PG_SHA512);
-			if (context->raw_context.c_sha2 == NULL)
-				return -1;
-			if (pg_cryptohash_init(context->raw_context.c_sha2) < 0)
-			{
-				pg_cryptohash_free(context->raw_context.c_sha2);
-				return -1;
-			}
-			break;
-	}
-
-	return 0;
-}
-
-/*
- * Update a checksum context with new data.
- * Returns 0 for a success, -1 for a failure.
- */
-int
-pg_checksum_update(pg_checksum_context *context, const uint8 *input,
-				   size_t len)
-{
-	switch (context->type)
-	{
-		case CHECKSUM_TYPE_NONE:
-			/* do nothing */
-			break;
-		case CHECKSUM_TYPE_CRC32C:
-			COMP_CRC32C(context->raw_context.c_crc32c, input, len);
-			break;
-		case CHECKSUM_TYPE_SHA224:
-		case CHECKSUM_TYPE_SHA256:
-		case CHECKSUM_TYPE_SHA384:
-		case CHECKSUM_TYPE_SHA512:
-			if (pg_cryptohash_update(context->raw_context.c_sha2, input, len) < 0)
-				return -1;
-			break;
-	}
-
-	return 0;
-}
-
-/*
- * Finalize a checksum computation and write the result to an output buffer.
- *
- * The caller must ensure that the buffer is at least PG_CHECKSUM_MAX_LENGTH
- * bytes in length. The return value is the number of bytes actually written,
- * or -1 for a failure.
- */
-int
-pg_checksum_final(pg_checksum_context *context, uint8 *output)
-{
-	int			retval = 0;
-
-	StaticAssertDecl(sizeof(pg_crc32c) <= PG_CHECKSUM_MAX_LENGTH,
-					 "CRC-32C digest too big for PG_CHECKSUM_MAX_LENGTH");
-	StaticAssertDecl(PG_SHA224_DIGEST_LENGTH <= PG_CHECKSUM_MAX_LENGTH,
-					 "SHA224 digest too big for PG_CHECKSUM_MAX_LENGTH");
-	StaticAssertDecl(PG_SHA256_DIGEST_LENGTH <= PG_CHECKSUM_MAX_LENGTH,
-					 "SHA256 digest too big for PG_CHECKSUM_MAX_LENGTH");
-	StaticAssertDecl(PG_SHA384_DIGEST_LENGTH <= PG_CHECKSUM_MAX_LENGTH,
-					 "SHA384 digest too big for PG_CHECKSUM_MAX_LENGTH");
-	StaticAssertDecl(PG_SHA512_DIGEST_LENGTH <= PG_CHECKSUM_MAX_LENGTH,
-					 "SHA512 digest too big for PG_CHECKSUM_MAX_LENGTH");
-
-	switch (context->type)
-	{
-		case CHECKSUM_TYPE_NONE:
-			break;
-		case CHECKSUM_TYPE_CRC32C:
-			FIN_CRC32C(context->raw_context.c_crc32c);
-			retval = sizeof(pg_crc32c);
-			memcpy(output, &context->raw_context.c_crc32c, retval);
-			break;
-		case CHECKSUM_TYPE_SHA224:
-			retval = PG_SHA224_DIGEST_LENGTH;
-			if (pg_cryptohash_final(context->raw_context.c_sha2,
-									output, retval) < 0)
-				return -1;
-			pg_cryptohash_free(context->raw_context.c_sha2);
-			break;
-		case CHECKSUM_TYPE_SHA256:
-			retval = PG_SHA256_DIGEST_LENGTH;
-			if (pg_cryptohash_final(context->raw_context.c_sha2,
-									output, retval) < 0)
-				return -1;
-			pg_cryptohash_free(context->raw_context.c_sha2);
-			break;
-		case CHECKSUM_TYPE_SHA384:
-			retval = PG_SHA384_DIGEST_LENGTH;
-			if (pg_cryptohash_final(context->raw_context.c_sha2,
-									output, retval) < 0)
-				return -1;
-			pg_cryptohash_free(context->raw_context.c_sha2);
-			break;
-		case CHECKSUM_TYPE_SHA512:
-			retval = PG_SHA512_DIGEST_LENGTH;
-			if (pg_cryptohash_final(context->raw_context.c_sha2,
-									output, retval) < 0)
-				return -1;
-			pg_cryptohash_free(context->raw_context.c_sha2);
-			break;
-	}
-
-	Assert(retval <= PG_CHECKSUM_MAX_LENGTH);
-	return retval;
-}
diff --git a/contrib/libs/libpq/src/common/compression.c b/contrib/libs/libpq/src/common/compression.c
deleted file mode 100644
index 47b18b8c60..0000000000
--- a/contrib/libs/libpq/src/common/compression.c
+++ /dev/null
@@ -1,476 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * compression.c
- *
- * Shared code for compression methods and specifications.
- *
- * A compression specification specifies the parameters that should be used
- * when performing compression with a specific algorithm. The simplest
- * possible compression specification is an integer, which sets the
- * compression level.
- *
- * Otherwise, a compression specification is a comma-separated list of items,
- * each having the form keyword or keyword=value.
- *
- * Currently, the supported keywords are "level", "long", and "workers".
- *
- * Portions Copyright (c) 1996-2023, PostgreSQL Global Development Group
- *
- * IDENTIFICATION
- *		  src/common/compression.c
- *-------------------------------------------------------------------------
- */
-
-#ifndef FRONTEND
-#include "postgres.h"
-#else
-#include "postgres_fe.h"
-#endif
-
-#ifdef USE_ZSTD
-#error #include <zstd.h>
-#endif
-#ifdef HAVE_LIBZ
-#include <zlib.h>
-#endif
-
-#include "common/compression.h"
-
-static int	expect_integer_value(char *keyword, char *value,
-								 pg_compress_specification *result);
-static bool expect_boolean_value(char *keyword, char *value,
-								 pg_compress_specification *result);
-
-/*
- * Look up a compression algorithm by name. Returns true and sets *algorithm
- * if the name is recognized. Otherwise returns false.
- */
-bool
-parse_compress_algorithm(char *name, pg_compress_algorithm *algorithm)
-{
-	if (strcmp(name, "none") == 0)
-		*algorithm = PG_COMPRESSION_NONE;
-	else if (strcmp(name, "gzip") == 0)
-		*algorithm = PG_COMPRESSION_GZIP;
-	else if (strcmp(name, "lz4") == 0)
-		*algorithm = PG_COMPRESSION_LZ4;
-	else if (strcmp(name, "zstd") == 0)
-		*algorithm = PG_COMPRESSION_ZSTD;
-	else
-		return false;
-	return true;
-}
-
-/*
- * Get the human-readable name corresponding to a particular compression
- * algorithm.
- */
-const char *
-get_compress_algorithm_name(pg_compress_algorithm algorithm)
-{
-	switch (algorithm)
-	{
-		case PG_COMPRESSION_NONE:
-			return "none";
-		case PG_COMPRESSION_GZIP:
-			return "gzip";
-		case PG_COMPRESSION_LZ4:
-			return "lz4";
-		case PG_COMPRESSION_ZSTD:
-			return "zstd";
-			/* no default, to provoke compiler warnings if values are added */
-	}
-	Assert(false);
-	return "???";				/* placate compiler */
-}
-
-/*
- * Parse a compression specification for a specified algorithm.
- *
- * See the file header comments for a brief description of what a compression
- * specification is expected to look like.
- *
- * On return, all fields of the result object will be initialized.
- * In particular, result->parse_error will be NULL if no errors occurred
- * during parsing, and will otherwise contain an appropriate error message.
- * The caller may free this error message string using pfree, if desired.
- * Note, however, even if there's no parse error, the string might not make
- * sense: e.g. for gzip, level=12 is not sensible, but it does parse OK.
- *
- * The compression level is assigned by default if not directly specified
- * by the specification.
- *
- * Use validate_compress_specification() to find out whether a compression
- * specification is semantically sensible.
- */
-void
-parse_compress_specification(pg_compress_algorithm algorithm, char *specification,
-							 pg_compress_specification *result)
-{
-	int			bare_level;
-	char	   *bare_level_endp;
-
-	/* Initial setup of result object. */
-	result->algorithm = algorithm;
-	result->options = 0;
-	result->parse_error = NULL;
-
-	/*
-	 * Assign a default level depending on the compression method.  This may
-	 * be enforced later.
-	 */
-	switch (result->algorithm)
-	{
-		case PG_COMPRESSION_NONE:
-			result->level = 0;
-			break;
-		case PG_COMPRESSION_LZ4:
-#ifdef USE_LZ4
-			result->level = 0;	/* fast compression mode */
-#else
-			result->parse_error =
-				psprintf(_("this build does not support compression with %s"),
-						 "LZ4");
-#endif
-			break;
-		case PG_COMPRESSION_ZSTD:
-#ifdef USE_ZSTD
-			result->level = ZSTD_CLEVEL_DEFAULT;
-#else
-			result->parse_error =
-				psprintf(_("this build does not support compression with %s"),
-						 "ZSTD");
-#endif
-			break;
-		case PG_COMPRESSION_GZIP:
-#ifdef HAVE_LIBZ
-			result->level = Z_DEFAULT_COMPRESSION;
-#else
-			result->parse_error =
-				psprintf(_("this build does not support compression with %s"),
-						 "gzip");
-#endif
-			break;
-	}
-
-	/* If there is no specification, we're done already. */
-	if (specification == NULL)
-		return;
-
-	/* As a special case, the specification can be a bare integer. */
-	bare_level = strtol(specification, &bare_level_endp, 10);
-	if (specification != bare_level_endp && *bare_level_endp == '\0')
-	{
-		result->level = bare_level;
-		return;
-	}
-
-	/* Look for comma-separated keyword or keyword=value entries. */
-	while (1)
-	{
-		char	   *kwstart;
-		char	   *kwend;
-		char	   *vstart;
-		char	   *vend;
-		int			kwlen;
-		int			vlen;
-		bool		has_value;
-		char	   *keyword;
-		char	   *value;
-
-		/* Figure start, end, and length of next keyword and any value. */
-		kwstart = kwend = specification;
-		while (*kwend != '\0' && *kwend != ',' && *kwend != '=')
-			++kwend;
-		kwlen = kwend - kwstart;
-		if (*kwend != '=')
-		{
-			vstart = vend = NULL;
-			vlen = 0;
-			has_value = false;
-		}
-		else
-		{
-			vstart = vend = kwend + 1;
-			while (*vend != '\0' && *vend != ',')
-				++vend;
-			vlen = vend - vstart;
-			has_value = true;
-		}
-
-		/* Reject empty keyword. */
-		if (kwlen == 0)
-		{
-			result->parse_error =
-				pstrdup(_("found empty string where a compression option was expected"));
-			break;
-		}
-
-		/* Extract keyword and value as separate C strings. */
-		keyword = palloc(kwlen + 1);
-		memcpy(keyword, kwstart, kwlen);
-		keyword[kwlen] = '\0';
-		if (!has_value)
-			value = NULL;
-		else
-		{
-			value = palloc(vlen + 1);
-			memcpy(value, vstart, vlen);
-			value[vlen] = '\0';
-		}
-
-		/* Handle whatever keyword we found. */
-		if (strcmp(keyword, "level") == 0)
-		{
-			result->level = expect_integer_value(keyword, value, result);
-
-			/*
-			 * No need to set a flag in "options", there is a default level
-			 * set at least thanks to the logic above.
-			 */
-		}
-		else if (strcmp(keyword, "workers") == 0)
-		{
-			result->workers = expect_integer_value(keyword, value, result);
-			result->options |= PG_COMPRESSION_OPTION_WORKERS;
-		}
-		else if (strcmp(keyword, "long") == 0)
-		{
-			result->long_distance = expect_boolean_value(keyword, value, result);
-			result->options |= PG_COMPRESSION_OPTION_LONG_DISTANCE;
-		}
-		else
-			result->parse_error =
-				psprintf(_("unrecognized compression option: \"%s\""), keyword);
-
-		/* Release memory, just to be tidy. */
-		pfree(keyword);
-		if (value != NULL)
-			pfree(value);
-
-		/*
-		 * If we got an error or have reached the end of the string, stop.
-		 *
-		 * If there is no value, then the end of the keyword might have been
-		 * the end of the string. If there is a value, then the end of the
-		 * keyword cannot have been the end of the string, but the end of the
-		 * value might have been.
-		 */
-		if (result->parse_error != NULL ||
-			(vend == NULL ? *kwend == '\0' : *vend == '\0'))
-			break;
-
-		/* Advance to next entry and loop around. */
-		specification = vend == NULL ? kwend + 1 : vend + 1;
-	}
-}
-
-/*
- * Parse 'value' as an integer and return the result.
- *
- * If parsing fails, set result->parse_error to an appropriate message
- * and return -1.
- */
-static int
-expect_integer_value(char *keyword, char *value, pg_compress_specification *result)
-{
-	int			ivalue;
-	char	   *ivalue_endp;
-
-	if (value == NULL)
-	{
-		result->parse_error =
-			psprintf(_("compression option \"%s\" requires a value"),
-					 keyword);
-		return -1;
-	}
-
-	ivalue = strtol(value, &ivalue_endp, 10);
-	if (ivalue_endp == value || *ivalue_endp != '\0')
-	{
-		result->parse_error =
-			psprintf(_("value for compression option \"%s\" must be an integer"),
-					 keyword);
-		return -1;
-	}
-	return ivalue;
-}
-
-/*
- * Parse 'value' as a boolean and return the result.
- *
- * If parsing fails, set result->parse_error to an appropriate message
- * and return -1.  The caller must check result->parse_error to determine if
- * the call was successful.
- *
- * Valid values are: yes, no, on, off, 1, 0.
- *
- * Inspired by ParseVariableBool().
- */
-static bool
-expect_boolean_value(char *keyword, char *value, pg_compress_specification *result)
-{
-	if (value == NULL)
-		return true;
-
-	if (pg_strcasecmp(value, "yes") == 0)
-		return true;
-	if (pg_strcasecmp(value, "on") == 0)
-		return true;
-	if (pg_strcasecmp(value, "1") == 0)
-		return true;
-
-	if (pg_strcasecmp(value, "no") == 0)
-		return false;
-	if (pg_strcasecmp(value, "off") == 0)
-		return false;
-	if (pg_strcasecmp(value, "0") == 0)
-		return false;
-
-	result->parse_error =
-		psprintf(_("value for compression option \"%s\" must be a Boolean value"),
-				 keyword);
-	return false;
-}
-
-/*
- * Returns NULL if the compression specification string was syntactically
- * valid and semantically sensible.  Otherwise, returns an error message.
- *
- * Does not test whether this build of PostgreSQL supports the requested
- * compression method.
- */
-char *
-validate_compress_specification(pg_compress_specification *spec)
-{
-	int			min_level = 1;
-	int			max_level = 1;
-	int			default_level = 0;
-
-	/* If it didn't even parse OK, it's definitely no good. */
-	if (spec->parse_error != NULL)
-		return spec->parse_error;
-
-	/*
-	 * Check that the algorithm expects a compression level and it is within
-	 * the legal range for the algorithm.
-	 */
-	switch (spec->algorithm)
-	{
-		case PG_COMPRESSION_GZIP:
-			max_level = 9;
-#ifdef HAVE_LIBZ
-			default_level = Z_DEFAULT_COMPRESSION;
-#endif
-			break;
-		case PG_COMPRESSION_LZ4:
-			max_level = 12;
-			default_level = 0;	/* fast mode */
-			break;
-		case PG_COMPRESSION_ZSTD:
-#ifdef USE_ZSTD
-			max_level = ZSTD_maxCLevel();
-			min_level = ZSTD_minCLevel();
-			default_level = ZSTD_CLEVEL_DEFAULT;
-#endif
-			break;
-		case PG_COMPRESSION_NONE:
-			if (spec->level != 0)
-				return psprintf(_("compression algorithm \"%s\" does not accept a compression level"),
-								get_compress_algorithm_name(spec->algorithm));
-			break;
-	}
-
-	if ((spec->level < min_level || spec->level > max_level) &&
-		spec->level != default_level)
-		return psprintf(_("compression algorithm \"%s\" expects a compression level between %d and %d (default at %d)"),
-						get_compress_algorithm_name(spec->algorithm),
-						min_level, max_level, default_level);
-
-	/*
-	 * Of the compression algorithms that we currently support, only zstd
-	 * allows parallel workers.
-	 */
-	if ((spec->options & PG_COMPRESSION_OPTION_WORKERS) != 0 &&
-		(spec->algorithm != PG_COMPRESSION_ZSTD))
-	{
-		return psprintf(_("compression algorithm \"%s\" does not accept a worker count"),
-						get_compress_algorithm_name(spec->algorithm));
-	}
-
-	/*
-	 * Of the compression algorithms that we currently support, only zstd
-	 * supports long-distance mode.
-	 */
-	if ((spec->options & PG_COMPRESSION_OPTION_LONG_DISTANCE) != 0 &&
-		(spec->algorithm != PG_COMPRESSION_ZSTD))
-	{
-		return psprintf(_("compression algorithm \"%s\" does not support long-distance mode"),
-						get_compress_algorithm_name(spec->algorithm));
-	}
-
-	return NULL;
-}
-
-#ifdef FRONTEND
-
-/*
- * Basic parsing of a value specified through a command-line option, commonly
- * -Z/--compress.
- *
- * The parsing consists of a METHOD:DETAIL string fed later to
- * parse_compress_specification().  This only extracts METHOD and DETAIL.
- * If only an integer is found, the method is implied by the value specified.
- */
-void
-parse_compress_options(const char *option, char **algorithm, char **detail)
-{
-	char	   *sep;
-	char	   *endp;
-	long		result;
-
-	/*
-	 * Check whether the compression specification consists of a bare integer.
-	 *
-	 * For backward-compatibility, assume "none" if the integer found is zero
-	 * and "gzip" otherwise.
-	 */
-	result = strtol(option, &endp, 10);
-	if (*endp == '\0')
-	{
-		if (result == 0)
-		{
-			*algorithm = pstrdup("none");
-			*detail = NULL;
-		}
-		else
-		{
-			*algorithm = pstrdup("gzip");
-			*detail = pstrdup(option);
-		}
-		return;
-	}
-
-	/*
-	 * Check whether there is a compression detail following the algorithm
-	 * name.
-	 */
-	sep = strchr(option, ':');
-	if (sep == NULL)
-	{
-		*algorithm = pstrdup(option);
-		*detail = NULL;
-	}
-	else
-	{
-		char	   *alg;
-
-		alg = palloc((sep - option) + 1);
-		memcpy(alg, option, sep - option);
-		alg[sep - option] = '\0';
-
-		*algorithm = alg;
-		*detail = pstrdup(sep + 1);
-	}
-}
-#endif							/* FRONTEND */
diff --git a/contrib/libs/libpq/src/common/config_info.c b/contrib/libs/libpq/src/common/config_info.c
deleted file mode 100644
index 09e78a6efb..0000000000
--- a/contrib/libs/libpq/src/common/config_info.c
+++ /dev/null
@@ -1,201 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * config_info.c
- *		Common code for pg_config output
- *
- *
- * Portions Copyright (c) 1996-2023, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- *
- * IDENTIFICATION
- *	  src/common/config_info.c
- *
- *-------------------------------------------------------------------------
- */
-
-#ifndef FRONTEND
-#include "postgres.h"
-#else
-#include "postgres_fe.h"
-#endif
-
-#include "common/config_info.h"
-
-
-/*
- * get_configdata(const char *my_exec_path, size_t *configdata_len)
- *
- * Get configure-time constants. The caller is responsible
- * for pfreeing the result.
- */
-ConfigData *
-get_configdata(const char *my_exec_path, size_t *configdata_len)
-{
-	ConfigData *configdata;
-	char		path[MAXPGPATH];
-	char	   *lastsep;
-	int			i = 0;
-
-	/* Adjust this to match the number of items filled below */
-	*configdata_len = 23;
-	configdata = palloc_array(ConfigData, *configdata_len);
-
-	configdata[i].name = pstrdup("BINDIR");
-	strlcpy(path, my_exec_path, sizeof(path));
-	lastsep = strrchr(path, '/');
-	if (lastsep)
-		*lastsep = '\0';
-	cleanup_path(path);
-	configdata[i].setting = pstrdup(path);
-	i++;
-
-	configdata[i].name = pstrdup("DOCDIR");
-	get_doc_path(my_exec_path, path);
-	cleanup_path(path);
-	configdata[i].setting = pstrdup(path);
-	i++;
-
-	configdata[i].name = pstrdup("HTMLDIR");
-	get_html_path(my_exec_path, path);
-	cleanup_path(path);
-	configdata[i].setting = pstrdup(path);
-	i++;
-
-	configdata[i].name = pstrdup("INCLUDEDIR");
-	get_include_path(my_exec_path, path);
-	cleanup_path(path);
-	configdata[i].setting = pstrdup(path);
-	i++;
-
-	configdata[i].name = pstrdup("PKGINCLUDEDIR");
-	get_pkginclude_path(my_exec_path, path);
-	cleanup_path(path);
-	configdata[i].setting = pstrdup(path);
-	i++;
-
-	configdata[i].name = pstrdup("INCLUDEDIR-SERVER");
-	get_includeserver_path(my_exec_path, path);
-	cleanup_path(path);
-	configdata[i].setting = pstrdup(path);
-	i++;
-
-	configdata[i].name = pstrdup("LIBDIR");
-	get_lib_path(my_exec_path, path);
-	cleanup_path(path);
-	configdata[i].setting = pstrdup(path);
-	i++;
-
-	configdata[i].name = pstrdup("PKGLIBDIR");
-	get_pkglib_path(my_exec_path, path);
-	cleanup_path(path);
-	configdata[i].setting = pstrdup(path);
-	i++;
-
-	configdata[i].name = pstrdup("LOCALEDIR");
-	get_locale_path(my_exec_path, path);
-	cleanup_path(path);
-	configdata[i].setting = pstrdup(path);
-	i++;
-
-	configdata[i].name = pstrdup("MANDIR");
-	get_man_path(my_exec_path, path);
-	cleanup_path(path);
-	configdata[i].setting = pstrdup(path);
-	i++;
-
-	configdata[i].name = pstrdup("SHAREDIR");
-	get_share_path(my_exec_path, path);
-	cleanup_path(path);
-	configdata[i].setting = pstrdup(path);
-	i++;
-
-	configdata[i].name = pstrdup("SYSCONFDIR");
-	get_etc_path(my_exec_path, path);
-	cleanup_path(path);
-	configdata[i].setting = pstrdup(path);
-	i++;
-
-	configdata[i].name = pstrdup("PGXS");
-	get_pkglib_path(my_exec_path, path);
-	strlcat(path, "/pgxs/src/makefiles/pgxs.mk", sizeof(path));
-	cleanup_path(path);
-	configdata[i].setting = pstrdup(path);
-	i++;
-
-	configdata[i].name = pstrdup("CONFIGURE");
-	configdata[i].setting = pstrdup(CONFIGURE_ARGS);
-	i++;
-
-	configdata[i].name = pstrdup("CC");
-#ifdef VAL_CC
-	configdata[i].setting = pstrdup(VAL_CC);
-#else
-	configdata[i].setting = pstrdup(_("not recorded"));
-#endif
-	i++;
-
-	configdata[i].name = pstrdup("CPPFLAGS");
-#ifdef VAL_CPPFLAGS
-	configdata[i].setting = pstrdup(VAL_CPPFLAGS);
-#else
-	configdata[i].setting = pstrdup(_("not recorded"));
-#endif
-	i++;
-
-	configdata[i].name = pstrdup("CFLAGS");
-#ifdef VAL_CFLAGS
-	configdata[i].setting = pstrdup(VAL_CFLAGS);
-#else
-	configdata[i].setting = pstrdup(_("not recorded"));
-#endif
-	i++;
-
-	configdata[i].name = pstrdup("CFLAGS_SL");
-#ifdef VAL_CFLAGS_SL
-	configdata[i].setting = pstrdup(VAL_CFLAGS_SL);
-#else
-	configdata[i].setting = pstrdup(_("not recorded"));
-#endif
-	i++;
-
-	configdata[i].name = pstrdup("LDFLAGS");
-#ifdef VAL_LDFLAGS
-	configdata[i].setting = pstrdup(VAL_LDFLAGS);
-#else
-	configdata[i].setting = pstrdup(_("not recorded"));
-#endif
-	i++;
-
-	configdata[i].name = pstrdup("LDFLAGS_EX");
-#ifdef VAL_LDFLAGS_EX
-	configdata[i].setting = pstrdup(VAL_LDFLAGS_EX);
-#else
-	configdata[i].setting = pstrdup(_("not recorded"));
-#endif
-	i++;
-
-	configdata[i].name = pstrdup("LDFLAGS_SL");
-#ifdef VAL_LDFLAGS_SL
-	configdata[i].setting = pstrdup(VAL_LDFLAGS_SL);
-#else
-	configdata[i].setting = pstrdup(_("not recorded"));
-#endif
-	i++;
-
-	configdata[i].name = pstrdup("LIBS");
-#ifdef VAL_LIBS
-	configdata[i].setting = pstrdup(VAL_LIBS);
-#else
-	configdata[i].setting = pstrdup(_("not recorded"));
-#endif
-	i++;
-
-	configdata[i].name = pstrdup("VERSION");
-	configdata[i].setting = pstrdup("PostgreSQL " PG_VERSION);
-	i++;
-
-	Assert(i == *configdata_len);
-
-	return configdata;
-}
diff --git a/contrib/libs/libpq/src/common/controldata_utils.c b/contrib/libs/libpq/src/common/controldata_utils.c
deleted file mode 100644
index 19305fa07a..0000000000
--- a/contrib/libs/libpq/src/common/controldata_utils.c
+++ /dev/null
@@ -1,269 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * controldata_utils.c
- *		Common code for control data file output.
- *
- *
- * Portions Copyright (c) 1996-2023, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- *
- * IDENTIFICATION
- *	  src/common/controldata_utils.c
- *
- *-------------------------------------------------------------------------
- */
-
-#ifndef FRONTEND
-#include "postgres.h"
-#else
-#include "postgres_fe.h"
-#endif
-
-#include <unistd.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <time.h>
-
-#include "access/xlog_internal.h"
-#include "catalog/pg_control.h"
-#include "common/controldata_utils.h"
-#include "common/file_perm.h"
-#ifdef FRONTEND
-#include "common/logging.h"
-#endif
-#include "port/pg_crc32c.h"
-
-#ifndef FRONTEND
-#error #include "pgstat.h"
-#error #include "storage/fd.h"
-#endif
-
-/*
- * get_controlfile()
- *
- * Get controlfile values.  The result is returned as a palloc'd copy of the
- * control file data.
- *
- * crc_ok_p can be used by the caller to see whether the CRC of the control
- * file data is correct.
- */
-ControlFileData *
-get_controlfile(const char *DataDir, bool *crc_ok_p)
-{
-	ControlFileData *ControlFile;
-	int			fd;
-	char		ControlFilePath[MAXPGPATH];
-	pg_crc32c	crc;
-	int			r;
-#ifdef FRONTEND
-	pg_crc32c	last_crc;
-	int			retries = 0;
-#endif
-
-	Assert(crc_ok_p);
-
-	ControlFile = palloc_object(ControlFileData);
-	snprintf(ControlFilePath, MAXPGPATH, "%s/global/pg_control", DataDir);
-
-#ifdef FRONTEND
-	INIT_CRC32C(last_crc);
-
-retry:
-#endif
-
-#ifndef FRONTEND
-	if ((fd = OpenTransientFile(ControlFilePath, O_RDONLY | PG_BINARY)) == -1)
-		ereport(ERROR,
-				(errcode_for_file_access(),
-				 errmsg("could not open file \"%s\" for reading: %m",
-						ControlFilePath)));
-#else
-	if ((fd = open(ControlFilePath, O_RDONLY | PG_BINARY, 0)) == -1)
-		pg_fatal("could not open file \"%s\" for reading: %m",
-				 ControlFilePath);
-#endif
-
-	r = read(fd, ControlFile, sizeof(ControlFileData));
-	if (r != sizeof(ControlFileData))
-	{
-		if (r < 0)
-#ifndef FRONTEND
-			ereport(ERROR,
-					(errcode_for_file_access(),
-					 errmsg("could not read file \"%s\": %m", ControlFilePath)));
-#else
-			pg_fatal("could not read file \"%s\": %m", ControlFilePath);
-#endif
-		else
-#ifndef FRONTEND
-			ereport(ERROR,
-					(errcode(ERRCODE_DATA_CORRUPTED),
-					 errmsg("could not read file \"%s\": read %d of %zu",
-							ControlFilePath, r, sizeof(ControlFileData))));
-#else
-			pg_fatal("could not read file \"%s\": read %d of %zu",
-					 ControlFilePath, r, sizeof(ControlFileData));
-#endif
-	}
-
-#ifndef FRONTEND
-	if (CloseTransientFile(fd) != 0)
-		ereport(ERROR,
-				(errcode_for_file_access(),
-				 errmsg("could not close file \"%s\": %m",
-						ControlFilePath)));
-#else
-	if (close(fd) != 0)
-		pg_fatal("could not close file \"%s\": %m", ControlFilePath);
-#endif
-
-	/* Check the CRC. */
-	INIT_CRC32C(crc);
-	COMP_CRC32C(crc,
-				(char *) ControlFile,
-				offsetof(ControlFileData, crc));
-	FIN_CRC32C(crc);
-
-	*crc_ok_p = EQ_CRC32C(crc, ControlFile->crc);
-
-#ifdef FRONTEND
-
-	/*
-	 * If the server was writing at the same time, it is possible that we read
-	 * partially updated contents on some systems.  If the CRC doesn't match,
-	 * retry a limited number of times until we compute the same bad CRC twice
-	 * in a row with a short sleep in between.  Then the failure is unlikely
-	 * to be due to a concurrent write.
-	 */
-	if (!*crc_ok_p &&
-		(retries == 0 || !EQ_CRC32C(crc, last_crc)) &&
-		retries < 10)
-	{
-		retries++;
-		last_crc = crc;
-		pg_usleep(10000);
-		goto retry;
-	}
-#endif
-
-	/* Make sure the control file is valid byte order. */
-	if (ControlFile->pg_control_version % 65536 == 0 &&
-		ControlFile->pg_control_version / 65536 != 0)
-#ifndef FRONTEND
-		elog(ERROR, _("byte ordering mismatch"));
-#else
-		pg_log_warning("possible byte ordering mismatch\n"
-					   "The byte ordering used to store the pg_control file might not match the one\n"
-					   "used by this program.  In that case the results below would be incorrect, and\n"
-					   "the PostgreSQL installation would be incompatible with this data directory.");
-#endif
-
-	return ControlFile;
-}
-
-/*
- * update_controlfile()
- *
- * Update controlfile values with the contents given by caller.  The
- * contents to write are included in "ControlFile". "do_sync" can be
- * optionally used to flush the updated control file.  Note that it is up
- * to the caller to properly lock ControlFileLock when calling this
- * routine in the backend.
- */
-void
-update_controlfile(const char *DataDir,
-				   ControlFileData *ControlFile, bool do_sync)
-{
-	int			fd;
-	char		buffer[PG_CONTROL_FILE_SIZE];
-	char		ControlFilePath[MAXPGPATH];
-
-	/* Update timestamp  */
-	ControlFile->time = (pg_time_t) time(NULL);
-
-	/* Recalculate CRC of control file */
-	INIT_CRC32C(ControlFile->crc);
-	COMP_CRC32C(ControlFile->crc,
-				(char *) ControlFile,
-				offsetof(ControlFileData, crc));
-	FIN_CRC32C(ControlFile->crc);
-
-	/*
-	 * Write out PG_CONTROL_FILE_SIZE bytes into pg_control by zero-padding
-	 * the excess over sizeof(ControlFileData), to avoid premature EOF related
-	 * errors when reading it.
-	 */
-	memset(buffer, 0, PG_CONTROL_FILE_SIZE);
-	memcpy(buffer, ControlFile, sizeof(ControlFileData));
-
-	snprintf(ControlFilePath, sizeof(ControlFilePath), "%s/%s", DataDir, XLOG_CONTROL_FILE);
-
-#ifndef FRONTEND
-
-	/*
-	 * All errors issue a PANIC, so no need to use OpenTransientFile() and to
-	 * worry about file descriptor leaks.
-	 */
-	if ((fd = BasicOpenFile(ControlFilePath, O_RDWR | PG_BINARY)) < 0)
-		ereport(PANIC,
-				(errcode_for_file_access(),
-				 errmsg("could not open file \"%s\": %m",
-						ControlFilePath)));
-#else
-	if ((fd = open(ControlFilePath, O_WRONLY | PG_BINARY,
-				   pg_file_create_mode)) == -1)
-		pg_fatal("could not open file \"%s\": %m", ControlFilePath);
-#endif
-
-	errno = 0;
-#ifndef FRONTEND
-	pgstat_report_wait_start(WAIT_EVENT_CONTROL_FILE_WRITE_UPDATE);
-#endif
-	if (write(fd, buffer, PG_CONTROL_FILE_SIZE) != PG_CONTROL_FILE_SIZE)
-	{
-		/* if write didn't set errno, assume problem is no disk space */
-		if (errno == 0)
-			errno = ENOSPC;
-
-#ifndef FRONTEND
-		ereport(PANIC,
-				(errcode_for_file_access(),
-				 errmsg("could not write file \"%s\": %m",
-						ControlFilePath)));
-#else
-		pg_fatal("could not write file \"%s\": %m", ControlFilePath);
-#endif
-	}
-#ifndef FRONTEND
-	pgstat_report_wait_end();
-#endif
-
-	if (do_sync)
-	{
-#ifndef FRONTEND
-		pgstat_report_wait_start(WAIT_EVENT_CONTROL_FILE_SYNC_UPDATE);
-		if (pg_fsync(fd) != 0)
-			ereport(PANIC,
-					(errcode_for_file_access(),
-					 errmsg("could not fsync file \"%s\": %m",
-							ControlFilePath)));
-		pgstat_report_wait_end();
-#else
-		if (fsync(fd) != 0)
-			pg_fatal("could not fsync file \"%s\": %m", ControlFilePath);
-#endif
-	}
-
-	if (close(fd) != 0)
-	{
-#ifndef FRONTEND
-		ereport(PANIC,
-				(errcode_for_file_access(),
-				 errmsg("could not close file \"%s\": %m",
-						ControlFilePath)));
-#else
-		pg_fatal("could not close file \"%s\": %m", ControlFilePath);
-#endif
-	}
-}
diff --git a/contrib/libs/libpq/src/common/cryptohash_openssl.c b/contrib/libs/libpq/src/common/cryptohash_openssl.c
deleted file mode 100644
index ac2cff0759..0000000000
--- a/contrib/libs/libpq/src/common/cryptohash_openssl.c
+++ /dev/null
@@ -1,353 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * cryptohash_openssl.c
- *	  Set of wrapper routines on top of OpenSSL to support cryptographic
- *	  hash functions.
- *
- * This should only be used if code is compiled with OpenSSL support.
- *
- * Portions Copyright (c) 1996-2023, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- * IDENTIFICATION
- *		  src/common/cryptohash_openssl.c
- *
- *-------------------------------------------------------------------------
- */
-
-#ifndef FRONTEND
-#include "postgres.h"
-#else
-#include "postgres_fe.h"
-#endif
-
-#include <openssl/err.h>
-#include <openssl/evp.h>
-
-#include "common/cryptohash.h"
-#include "common/md5.h"
-#include "common/sha1.h"
-#include "common/sha2.h"
-#ifndef FRONTEND
-#error #include "utils/memutils.h"
-#error #include "utils/resowner.h"
-#error #include "utils/resowner_private.h"
-#endif
-
-/*
- * In the backend, use an allocation in TopMemoryContext to count for
- * resowner cleanup handling.  In the frontend, use malloc to be able
- * to return a failure status back to the caller.
- */
-#ifndef FRONTEND
-#define ALLOC(size) MemoryContextAlloc(TopMemoryContext, size)
-#define FREE(ptr) pfree(ptr)
-#else
-#define ALLOC(size) malloc(size)
-#define FREE(ptr) free(ptr)
-#endif
-
-/* Set of error states */
-typedef enum pg_cryptohash_errno
-{
-	PG_CRYPTOHASH_ERROR_NONE = 0,
-	PG_CRYPTOHASH_ERROR_DEST_LEN,
-	PG_CRYPTOHASH_ERROR_OPENSSL
-} pg_cryptohash_errno;
-
-/*
- * Internal pg_cryptohash_ctx structure.
- *
- * This tracks the resource owner associated to each EVP context data
- * for the backend.
- */
-struct pg_cryptohash_ctx
-{
-	pg_cryptohash_type type;
-	pg_cryptohash_errno error;
-	const char *errreason;
-
-	EVP_MD_CTX *evpctx;
-
-#ifndef FRONTEND
-	ResourceOwner resowner;
-#endif
-};
-
-static const char *
-SSLerrmessage(unsigned long ecode)
-{
-	if (ecode == 0)
-		return NULL;
-
-	/*
-	 * This may return NULL, but we would fall back to a default error path if
-	 * that were the case.
-	 */
-	return ERR_reason_error_string(ecode);
-}
-
-/*
- * pg_cryptohash_create
- *
- * Allocate a hash context.  Returns NULL on failure for an OOM.  The
- * backend issues an error, without returning.
- */
-pg_cryptohash_ctx *
-pg_cryptohash_create(pg_cryptohash_type type)
-{
-	pg_cryptohash_ctx *ctx;
-
-	/*
-	 * Make sure that the resource owner has space to remember this reference.
-	 * This can error out with "out of memory", so do this before any other
-	 * allocation to avoid leaking.
-	 */
-#ifndef FRONTEND
-	ResourceOwnerEnlargeCryptoHash(CurrentResourceOwner);
-#endif
-
-	ctx = ALLOC(sizeof(pg_cryptohash_ctx));
-	if (ctx == NULL)
-		return NULL;
-	memset(ctx, 0, sizeof(pg_cryptohash_ctx));
-	ctx->type = type;
-	ctx->error = PG_CRYPTOHASH_ERROR_NONE;
-	ctx->errreason = NULL;
-
-	/*
-	 * Initialization takes care of assigning the correct type for OpenSSL.
-	 * Also ensure that there aren't any unconsumed errors in the queue from
-	 * previous runs.
-	 */
-	ERR_clear_error();
-	ctx->evpctx = EVP_MD_CTX_create();
-
-	if (ctx->evpctx == NULL)
-	{
-		explicit_bzero(ctx, sizeof(pg_cryptohash_ctx));
-		FREE(ctx);
-#ifndef FRONTEND
-		ereport(ERROR,
-				(errcode(ERRCODE_OUT_OF_MEMORY),
-				 errmsg("out of memory")));
-#else
-		return NULL;
-#endif
-	}
-
-#ifndef FRONTEND
-	ctx->resowner = CurrentResourceOwner;
-	ResourceOwnerRememberCryptoHash(CurrentResourceOwner,
-									PointerGetDatum(ctx));
-#endif
-
-	return ctx;
-}
-
-/*
- * pg_cryptohash_init
- *
- * Initialize a hash context.  Returns 0 on success, and -1 on failure.
- */
-int
-pg_cryptohash_init(pg_cryptohash_ctx *ctx)
-{
-	int			status = 0;
-
-	if (ctx == NULL)
-		return -1;
-
-	switch (ctx->type)
-	{
-		case PG_MD5:
-			status = EVP_DigestInit_ex(ctx->evpctx, EVP_md5(), NULL);
-			break;
-		case PG_SHA1:
-			status = EVP_DigestInit_ex(ctx->evpctx, EVP_sha1(), NULL);
-			break;
-		case PG_SHA224:
-			status = EVP_DigestInit_ex(ctx->evpctx, EVP_sha224(), NULL);
-			break;
-		case PG_SHA256:
-			status = EVP_DigestInit_ex(ctx->evpctx, EVP_sha256(), NULL);
-			break;
-		case PG_SHA384:
-			status = EVP_DigestInit_ex(ctx->evpctx, EVP_sha384(), NULL);
-			break;
-		case PG_SHA512:
-			status = EVP_DigestInit_ex(ctx->evpctx, EVP_sha512(), NULL);
-			break;
-	}
-
-	/* OpenSSL internals return 1 on success, 0 on failure */
-	if (status <= 0)
-	{
-		ctx->errreason = SSLerrmessage(ERR_get_error());
-		ctx->error = PG_CRYPTOHASH_ERROR_OPENSSL;
-
-		/*
-		 * The OpenSSL error queue should normally be empty since we've
-		 * consumed an error, but cipher initialization can in FIPS-enabled
-		 * OpenSSL builds generate two errors so clear the queue here as well.
-		 */
-		ERR_clear_error();
-		return -1;
-	}
-	return 0;
-}
-
-/*
- * pg_cryptohash_update
- *
- * Update a hash context.  Returns 0 on success, and -1 on failure.
- */
-int
-pg_cryptohash_update(pg_cryptohash_ctx *ctx, const uint8 *data, size_t len)
-{
-	int			status = 0;
-
-	if (ctx == NULL)
-		return -1;
-
-	status = EVP_DigestUpdate(ctx->evpctx, data, len);
-
-	/* OpenSSL internals return 1 on success, 0 on failure */
-	if (status <= 0)
-	{
-		ctx->errreason = SSLerrmessage(ERR_get_error());
-		ctx->error = PG_CRYPTOHASH_ERROR_OPENSSL;
-		return -1;
-	}
-	return 0;
-}
-
-/*
- * pg_cryptohash_final
- *
- * Finalize a hash context.  Returns 0 on success, and -1 on failure.
- */
-int
-pg_cryptohash_final(pg_cryptohash_ctx *ctx, uint8 *dest, size_t len)
-{
-	int			status = 0;
-
-	if (ctx == NULL)
-		return -1;
-
-	switch (ctx->type)
-	{
-		case PG_MD5:
-			if (len < MD5_DIGEST_LENGTH)
-			{
-				ctx->error = PG_CRYPTOHASH_ERROR_DEST_LEN;
-				return -1;
-			}
-			break;
-		case PG_SHA1:
-			if (len < SHA1_DIGEST_LENGTH)
-			{
-				ctx->error = PG_CRYPTOHASH_ERROR_DEST_LEN;
-				return -1;
-			}
-			break;
-		case PG_SHA224:
-			if (len < PG_SHA224_DIGEST_LENGTH)
-			{
-				ctx->error = PG_CRYPTOHASH_ERROR_DEST_LEN;
-				return -1;
-			}
-			break;
-		case PG_SHA256:
-			if (len < PG_SHA256_DIGEST_LENGTH)
-			{
-				ctx->error = PG_CRYPTOHASH_ERROR_DEST_LEN;
-				return -1;
-			}
-			break;
-		case PG_SHA384:
-			if (len < PG_SHA384_DIGEST_LENGTH)
-			{
-				ctx->error = PG_CRYPTOHASH_ERROR_DEST_LEN;
-				return -1;
-			}
-			break;
-		case PG_SHA512:
-			if (len < PG_SHA512_DIGEST_LENGTH)
-			{
-				ctx->error = PG_CRYPTOHASH_ERROR_DEST_LEN;
-				return -1;
-			}
-			break;
-	}
-
-	status = EVP_DigestFinal_ex(ctx->evpctx, dest, 0);
-
-	/* OpenSSL internals return 1 on success, 0 on failure */
-	if (status <= 0)
-	{
-		ctx->errreason = SSLerrmessage(ERR_get_error());
-		ctx->error = PG_CRYPTOHASH_ERROR_OPENSSL;
-		return -1;
-	}
-	return 0;
-}
-
-/*
- * pg_cryptohash_free
- *
- * Free a hash context.
- */
-void
-pg_cryptohash_free(pg_cryptohash_ctx *ctx)
-{
-	if (ctx == NULL)
-		return;
-
-	EVP_MD_CTX_destroy(ctx->evpctx);
-
-#ifndef FRONTEND
-	ResourceOwnerForgetCryptoHash(ctx->resowner,
-								  PointerGetDatum(ctx));
-#endif
-
-	explicit_bzero(ctx, sizeof(pg_cryptohash_ctx));
-	FREE(ctx);
-}
-
-/*
- * pg_cryptohash_error
- *
- * Returns a static string providing details about an error that
- * happened during a computation.
- */
-const char *
-pg_cryptohash_error(pg_cryptohash_ctx *ctx)
-{
-	/*
-	 * This implementation would never fail because of an out-of-memory error,
-	 * except when creating the context.
-	 */
-	if (ctx == NULL)
-		return _("out of memory");
-
-	/*
-	 * If a reason is provided, rely on it, else fallback to any error code
-	 * set.
-	 */
-	if (ctx->errreason)
-		return ctx->errreason;
-
-	switch (ctx->error)
-	{
-		case PG_CRYPTOHASH_ERROR_NONE:
-			return _("success");
-		case PG_CRYPTOHASH_ERROR_DEST_LEN:
-			return _("destination buffer too small");
-		case PG_CRYPTOHASH_ERROR_OPENSSL:
-			return _("OpenSSL failure");
-	}
-
-	Assert(false);				/* cannot be reached */
-	return _("success");
-}
diff --git a/contrib/libs/libpq/src/common/d2s.c b/contrib/libs/libpq/src/common/d2s.c
deleted file mode 100644
index 614e98192a..0000000000
--- a/contrib/libs/libpq/src/common/d2s.c
+++ /dev/null
@@ -1,1076 +0,0 @@
-/*---------------------------------------------------------------------------
- *
- * Ryu floating-point output for double precision.
- *
- * Portions Copyright (c) 2018-2023, PostgreSQL Global Development Group
- *
- * IDENTIFICATION
- *	  src/common/d2s.c
- *
- * This is a modification of code taken from github.com/ulfjack/ryu under the
- * terms of the Boost license (not the Apache license). The original copyright
- * notice follows:
- *
- * Copyright 2018 Ulf Adams
- *
- * The contents of this file may be used under the terms of the Apache
- * License, Version 2.0.
- *
- *     (See accompanying file LICENSE-Apache or copy at
- *      http://www.apache.org/licenses/LICENSE-2.0)
- *
- * Alternatively, the contents of this file may be used under the terms of the
- * Boost Software License, Version 1.0.
- *
- *     (See accompanying file LICENSE-Boost or copy at
- *      https://www.boost.org/LICENSE_1_0.txt)
- *
- * Unless required by applicable law or agreed to in writing, this software is
- * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.
- *
- *---------------------------------------------------------------------------
- */
-
-/*
- *  Runtime compiler options:
- *
- *  -DRYU_ONLY_64_BIT_OPS Avoid using uint128 or 64-bit intrinsics. Slower,
- *      depending on your compiler.
- */
-
-#ifndef FRONTEND
-#include "postgres.h"
-#else
-#include "postgres_fe.h"
-#endif
-
-#include "common/shortest_dec.h"
-
-/*
- * For consistency, we use 128-bit types if and only if the rest of PG also
- * does, even though we could use them here without worrying about the
- * alignment concerns that apply elsewhere.
- */
-#if !defined(HAVE_INT128) && defined(_MSC_VER) \
-	&& !defined(RYU_ONLY_64_BIT_OPS) && defined(_M_X64)
-#define HAS_64_BIT_INTRINSICS
-#endif
-
-#include "ryu_common.h"
-#include "digit_table.h"
-#include "d2s_full_table.h"
-#include "d2s_intrinsics.h"
-
-#define DOUBLE_MANTISSA_BITS 52
-#define DOUBLE_EXPONENT_BITS 11
-#define DOUBLE_BIAS 1023
-
-#define DOUBLE_POW5_INV_BITCOUNT 122
-#define DOUBLE_POW5_BITCOUNT 121
-
-
-static inline uint32
-pow5Factor(uint64 value)
-{
-	uint32		count = 0;
-
-	for (;;)
-	{
-		Assert(value != 0);
-		const uint64 q = div5(value);
-		const uint32 r = (uint32) (value - 5 * q);
-
-		if (r != 0)
-			break;
-
-		value = q;
-		++count;
-	}
-	return count;
-}
-
-/*  Returns true if value is divisible by 5^p. */
-static inline bool
-multipleOfPowerOf5(const uint64 value, const uint32 p)
-{
-	/*
-	 * I tried a case distinction on p, but there was no performance
-	 * difference.
-	 */
-	return pow5Factor(value) >= p;
-}
-
-/*  Returns true if value is divisible by 2^p. */
-static inline bool
-multipleOfPowerOf2(const uint64 value, const uint32 p)
-{
-	/* return __builtin_ctzll(value) >= p; */
-	return (value & ((UINT64CONST(1) << p) - 1)) == 0;
-}
-
-/*
- * We need a 64x128-bit multiplication and a subsequent 128-bit shift.
- *
- * Multiplication:
- *
- *    The 64-bit factor is variable and passed in, the 128-bit factor comes
- *    from a lookup table. We know that the 64-bit factor only has 55
- *    significant bits (i.e., the 9 topmost bits are zeros). The 128-bit
- *    factor only has 124 significant bits (i.e., the 4 topmost bits are
- *    zeros).
- *
- * Shift:
- *
- *    In principle, the multiplication result requires 55 + 124 = 179 bits to
- *    represent. However, we then shift this value to the right by j, which is
- *    at least j >= 115, so the result is guaranteed to fit into 179 - 115 =
- *    64 bits. This means that we only need the topmost 64 significant bits of
- *    the 64x128-bit multiplication.
- *
- * There are several ways to do this:
- *
- *  1. Best case: the compiler exposes a 128-bit type.
- *     We perform two 64x64-bit multiplications, add the higher 64 bits of the
- *     lower result to the higher result, and shift by j - 64 bits.
- *
- *     We explicitly cast from 64-bit to 128-bit, so the compiler can tell
- *     that these are only 64-bit inputs, and can map these to the best
- *     possible sequence of assembly instructions. x86-64 machines happen to
- *     have matching assembly instructions for 64x64-bit multiplications and
- *     128-bit shifts.
- *
- *  2. Second best case: the compiler exposes intrinsics for the x86-64
- *     assembly instructions mentioned in 1.
- *
- *  3. We only have 64x64 bit instructions that return the lower 64 bits of
- *     the result, i.e., we have to use plain C.
- *
- *     Our inputs are less than the full width, so we have three options:
- *     a. Ignore this fact and just implement the intrinsics manually.
- *     b. Split both into 31-bit pieces, which guarantees no internal
- *        overflow, but requires extra work upfront (unless we change the
- *        lookup table).
- *     c. Split only the first factor into 31-bit pieces, which also
- *        guarantees no internal overflow, but requires extra work since the
- *        intermediate results are not perfectly aligned.
- */
-#if defined(HAVE_INT128)
-
-/*  Best case: use 128-bit type. */
-static inline uint64
-mulShift(const uint64 m, const uint64 *const mul, const int32 j)
-{
-	const uint128 b0 = ((uint128) m) * mul[0];
-	const uint128 b2 = ((uint128) m) * mul[1];
-
-	return (uint64) (((b0 >> 64) + b2) >> (j - 64));
-}
-
-static inline uint64
-mulShiftAll(const uint64 m, const uint64 *const mul, const int32 j,
-			uint64 *const vp, uint64 *const vm, const uint32 mmShift)
-{
-	*vp = mulShift(4 * m + 2, mul, j);
-	*vm = mulShift(4 * m - 1 - mmShift, mul, j);
-	return mulShift(4 * m, mul, j);
-}
-
-#elif defined(HAS_64_BIT_INTRINSICS)
-
-static inline uint64
-mulShift(const uint64 m, const uint64 *const mul, const int32 j)
-{
-	/* m is maximum 55 bits */
-	uint64		high1;
-
-	/* 128 */
-	const uint64 low1 = umul128(m, mul[1], &high1);
-
-	/* 64 */
-	uint64		high0;
-	uint64		sum;
-
-	/* 64 */
-	umul128(m, mul[0], &high0);
-	/* 0 */
-	sum = high0 + low1;
-
-	if (sum < high0)
-	{
-		++high1;
-		/* overflow into high1 */
-	}
-	return shiftright128(sum, high1, j - 64);
-}
-
-static inline uint64
-mulShiftAll(const uint64 m, const uint64 *const mul, const int32 j,
-			uint64 *const vp, uint64 *const vm, const uint32 mmShift)
-{
-	*vp = mulShift(4 * m + 2, mul, j);
-	*vm = mulShift(4 * m - 1 - mmShift, mul, j);
-	return mulShift(4 * m, mul, j);
-}
-
-#else							/* // !defined(HAVE_INT128) &&
-								 * !defined(HAS_64_BIT_INTRINSICS) */
-
-static inline uint64
-mulShiftAll(uint64 m, const uint64 *const mul, const int32 j,
-			uint64 *const vp, uint64 *const vm, const uint32 mmShift)
-{
-	m <<= 1;					/* m is maximum 55 bits */
-
-	uint64		tmp;
-	const uint64 lo = umul128(m, mul[0], &tmp);
-	uint64		hi;
-	const uint64 mid = tmp + umul128(m, mul[1], &hi);
-
-	hi += mid < tmp;			/* overflow into hi */
-
-	const uint64 lo2 = lo + mul[0];
-	const uint64 mid2 = mid + mul[1] + (lo2 < lo);
-	const uint64 hi2 = hi + (mid2 < mid);
-
-	*vp = shiftright128(mid2, hi2, j - 64 - 1);
-
-	if (mmShift == 1)
-	{
-		const uint64 lo3 = lo - mul[0];
-		const uint64 mid3 = mid - mul[1] - (lo3 > lo);
-		const uint64 hi3 = hi - (mid3 > mid);
-
-		*vm = shiftright128(mid3, hi3, j - 64 - 1);
-	}
-	else
-	{
-		const uint64 lo3 = lo + lo;
-		const uint64 mid3 = mid + mid + (lo3 < lo);
-		const uint64 hi3 = hi + hi + (mid3 < mid);
-		const uint64 lo4 = lo3 - mul[0];
-		const uint64 mid4 = mid3 - mul[1] - (lo4 > lo3);
-		const uint64 hi4 = hi3 - (mid4 > mid3);
-
-		*vm = shiftright128(mid4, hi4, j - 64);
-	}
-
-	return shiftright128(mid, hi, j - 64 - 1);
-}
-
-#endif							/* // HAS_64_BIT_INTRINSICS */
-
-static inline uint32
-decimalLength(const uint64 v)
-{
-	/* This is slightly faster than a loop. */
-	/* The average output length is 16.38 digits, so we check high-to-low. */
-	/* Function precondition: v is not an 18, 19, or 20-digit number. */
-	/* (17 digits are sufficient for round-tripping.) */
-	Assert(v < 100000000000000000L);
-	if (v >= 10000000000000000L)
-	{
-		return 17;
-	}
-	if (v >= 1000000000000000L)
-	{
-		return 16;
-	}
-	if (v >= 100000000000000L)
-	{
-		return 15;
-	}
-	if (v >= 10000000000000L)
-	{
-		return 14;
-	}
-	if (v >= 1000000000000L)
-	{
-		return 13;
-	}
-	if (v >= 100000000000L)
-	{
-		return 12;
-	}
-	if (v >= 10000000000L)
-	{
-		return 11;
-	}
-	if (v >= 1000000000L)
-	{
-		return 10;
-	}
-	if (v >= 100000000L)
-	{
-		return 9;
-	}
-	if (v >= 10000000L)
-	{
-		return 8;
-	}
-	if (v >= 1000000L)
-	{
-		return 7;
-	}
-	if (v >= 100000L)
-	{
-		return 6;
-	}
-	if (v >= 10000L)
-	{
-		return 5;
-	}
-	if (v >= 1000L)
-	{
-		return 4;
-	}
-	if (v >= 100L)
-	{
-		return 3;
-	}
-	if (v >= 10L)
-	{
-		return 2;
-	}
-	return 1;
-}
-
-/*  A floating decimal representing m * 10^e. */
-typedef struct floating_decimal_64
-{
-	uint64		mantissa;
-	int32		exponent;
-} floating_decimal_64;
-
-static inline floating_decimal_64
-d2d(const uint64 ieeeMantissa, const uint32 ieeeExponent)
-{
-	int32		e2;
-	uint64		m2;
-
-	if (ieeeExponent == 0)
-	{
-		/* We subtract 2 so that the bounds computation has 2 additional bits. */
-		e2 = 1 - DOUBLE_BIAS - DOUBLE_MANTISSA_BITS - 2;
-		m2 = ieeeMantissa;
-	}
-	else
-	{
-		e2 = ieeeExponent - DOUBLE_BIAS - DOUBLE_MANTISSA_BITS - 2;
-		m2 = (UINT64CONST(1) << DOUBLE_MANTISSA_BITS) | ieeeMantissa;
-	}
-
-#if STRICTLY_SHORTEST
-	const bool	even = (m2 & 1) == 0;
-	const bool	acceptBounds = even;
-#else
-	const bool	acceptBounds = false;
-#endif
-
-	/* Step 2: Determine the interval of legal decimal representations. */
-	const uint64 mv = 4 * m2;
-
-	/* Implicit bool -> int conversion. True is 1, false is 0. */
-	const uint32 mmShift = ieeeMantissa != 0 || ieeeExponent <= 1;
-
-	/* We would compute mp and mm like this: */
-	/* uint64 mp = 4 * m2 + 2; */
-	/* uint64 mm = mv - 1 - mmShift; */
-
-	/* Step 3: Convert to a decimal power base using 128-bit arithmetic. */
-	uint64		vr,
-				vp,
-				vm;
-	int32		e10;
-	bool		vmIsTrailingZeros = false;
-	bool		vrIsTrailingZeros = false;
-
-	if (e2 >= 0)
-	{
-		/*
-		 * I tried special-casing q == 0, but there was no effect on
-		 * performance.
-		 *
-		 * This expr is slightly faster than max(0, log10Pow2(e2) - 1).
-		 */
-		const uint32 q = log10Pow2(e2) - (e2 > 3);
-		const int32 k = DOUBLE_POW5_INV_BITCOUNT + pow5bits(q) - 1;
-		const int32 i = -e2 + q + k;
-
-		e10 = q;
-
-		vr = mulShiftAll(m2, DOUBLE_POW5_INV_SPLIT[q], i, &vp, &vm, mmShift);
-
-		if (q <= 21)
-		{
-			/*
-			 * This should use q <= 22, but I think 21 is also safe. Smaller
-			 * values may still be safe, but it's more difficult to reason
-			 * about them.
-			 *
-			 * Only one of mp, mv, and mm can be a multiple of 5, if any.
-			 */
-			const uint32 mvMod5 = (uint32) (mv - 5 * div5(mv));
-
-			if (mvMod5 == 0)
-			{
-				vrIsTrailingZeros = multipleOfPowerOf5(mv, q);
-			}
-			else if (acceptBounds)
-			{
-				/*----
-				 * Same as min(e2 + (~mm & 1), pow5Factor(mm)) >= q
-				 * <=> e2 + (~mm & 1) >= q && pow5Factor(mm) >= q
-				 * <=> true && pow5Factor(mm) >= q, since e2 >= q.
-				 *----
-				 */
-				vmIsTrailingZeros = multipleOfPowerOf5(mv - 1 - mmShift, q);
-			}
-			else
-			{
-				/* Same as min(e2 + 1, pow5Factor(mp)) >= q. */
-				vp -= multipleOfPowerOf5(mv + 2, q);
-			}
-		}
-	}
-	else
-	{
-		/*
-		 * This expression is slightly faster than max(0, log10Pow5(-e2) - 1).
-		 */
-		const uint32 q = log10Pow5(-e2) - (-e2 > 1);
-		const int32 i = -e2 - q;
-		const int32 k = pow5bits(i) - DOUBLE_POW5_BITCOUNT;
-		const int32 j = q - k;
-
-		e10 = q + e2;
-
-		vr = mulShiftAll(m2, DOUBLE_POW5_SPLIT[i], j, &vp, &vm, mmShift);
-
-		if (q <= 1)
-		{
-			/*
-			 * {vr,vp,vm} is trailing zeros if {mv,mp,mm} has at least q
-			 * trailing 0 bits.
-			 */
-			/* mv = 4 * m2, so it always has at least two trailing 0 bits. */
-			vrIsTrailingZeros = true;
-			if (acceptBounds)
-			{
-				/*
-				 * mm = mv - 1 - mmShift, so it has 1 trailing 0 bit iff
-				 * mmShift == 1.
-				 */
-				vmIsTrailingZeros = mmShift == 1;
-			}
-			else
-			{
-				/*
-				 * mp = mv + 2, so it always has at least one trailing 0 bit.
-				 */
-				--vp;
-			}
-		}
-		else if (q < 63)
-		{
-			/* TODO(ulfjack):Use a tighter bound here. */
-			/*
-			 * We need to compute min(ntz(mv), pow5Factor(mv) - e2) >= q - 1
-			 */
-			/* <=> ntz(mv) >= q - 1 && pow5Factor(mv) - e2 >= q - 1 */
-			/* <=> ntz(mv) >= q - 1 (e2 is negative and -e2 >= q) */
-			/* <=> (mv & ((1 << (q - 1)) - 1)) == 0 */
-
-			/*
-			 * We also need to make sure that the left shift does not
-			 * overflow.
-			 */
-			vrIsTrailingZeros = multipleOfPowerOf2(mv, q - 1);
-		}
-	}
-
-	/*
-	 * Step 4: Find the shortest decimal representation in the interval of
-	 * legal representations.
-	 */
-	uint32		removed = 0;
-	uint8		lastRemovedDigit = 0;
-	uint64		output;
-
-	/* On average, we remove ~2 digits. */
-	if (vmIsTrailingZeros || vrIsTrailingZeros)
-	{
-		/* General case, which happens rarely (~0.7%). */
-		for (;;)
-		{
-			const uint64 vpDiv10 = div10(vp);
-			const uint64 vmDiv10 = div10(vm);
-
-			if (vpDiv10 <= vmDiv10)
-				break;
-
-			const uint32 vmMod10 = (uint32) (vm - 10 * vmDiv10);
-			const uint64 vrDiv10 = div10(vr);
-			const uint32 vrMod10 = (uint32) (vr - 10 * vrDiv10);
-
-			vmIsTrailingZeros &= vmMod10 == 0;
-			vrIsTrailingZeros &= lastRemovedDigit == 0;
-			lastRemovedDigit = (uint8) vrMod10;
-			vr = vrDiv10;
-			vp = vpDiv10;
-			vm = vmDiv10;
-			++removed;
-		}
-
-		if (vmIsTrailingZeros)
-		{
-			for (;;)
-			{
-				const uint64 vmDiv10 = div10(vm);
-				const uint32 vmMod10 = (uint32) (vm - 10 * vmDiv10);
-
-				if (vmMod10 != 0)
-					break;
-
-				const uint64 vpDiv10 = div10(vp);
-				const uint64 vrDiv10 = div10(vr);
-				const uint32 vrMod10 = (uint32) (vr - 10 * vrDiv10);
-
-				vrIsTrailingZeros &= lastRemovedDigit == 0;
-				lastRemovedDigit = (uint8) vrMod10;
-				vr = vrDiv10;
-				vp = vpDiv10;
-				vm = vmDiv10;
-				++removed;
-			}
-		}
-
-		if (vrIsTrailingZeros && lastRemovedDigit == 5 && vr % 2 == 0)
-		{
-			/* Round even if the exact number is .....50..0. */
-			lastRemovedDigit = 4;
-		}
-
-		/*
-		 * We need to take vr + 1 if vr is outside bounds or we need to round
-		 * up.
-		 */
-		output = vr + ((vr == vm && (!acceptBounds || !vmIsTrailingZeros)) || lastRemovedDigit >= 5);
-	}
-	else
-	{
-		/*
-		 * Specialized for the common case (~99.3%). Percentages below are
-		 * relative to this.
-		 */
-		bool		roundUp = false;
-		const uint64 vpDiv100 = div100(vp);
-		const uint64 vmDiv100 = div100(vm);
-
-		if (vpDiv100 > vmDiv100)
-		{
-			/* Optimization:remove two digits at a time(~86.2 %). */
-			const uint64 vrDiv100 = div100(vr);
-			const uint32 vrMod100 = (uint32) (vr - 100 * vrDiv100);
-
-			roundUp = vrMod100 >= 50;
-			vr = vrDiv100;
-			vp = vpDiv100;
-			vm = vmDiv100;
-			removed += 2;
-		}
-
-		/*----
-		 * Loop iterations below (approximately), without optimization
-		 * above:
-		 *
-		 * 0: 0.03%, 1: 13.8%, 2: 70.6%, 3: 14.0%, 4: 1.40%, 5: 0.14%,
-		 * 6+: 0.02%
-		 *
-		 * Loop iterations below (approximately), with optimization
-		 * above:
-		 *
-		 * 0: 70.6%, 1: 27.8%, 2: 1.40%, 3: 0.14%, 4+: 0.02%
-		 *----
-		 */
-		for (;;)
-		{
-			const uint64 vpDiv10 = div10(vp);
-			const uint64 vmDiv10 = div10(vm);
-
-			if (vpDiv10 <= vmDiv10)
-				break;
-
-			const uint64 vrDiv10 = div10(vr);
-			const uint32 vrMod10 = (uint32) (vr - 10 * vrDiv10);
-
-			roundUp = vrMod10 >= 5;
-			vr = vrDiv10;
-			vp = vpDiv10;
-			vm = vmDiv10;
-			++removed;
-		}
-
-		/*
-		 * We need to take vr + 1 if vr is outside bounds or we need to round
-		 * up.
-		 */
-		output = vr + (vr == vm || roundUp);
-	}
-
-	const int32 exp = e10 + removed;
-
-	floating_decimal_64 fd;
-
-	fd.exponent = exp;
-	fd.mantissa = output;
-	return fd;
-}
-
-static inline int
-to_chars_df(const floating_decimal_64 v, const uint32 olength, char *const result)
-{
-	/* Step 5: Print the decimal representation. */
-	int			index = 0;
-
-	uint64		output = v.mantissa;
-	int32		exp = v.exponent;
-
-	/*----
-	 * On entry, mantissa * 10^exp is the result to be output.
-	 * Caller has already done the - sign if needed.
-	 *
-	 * We want to insert the point somewhere depending on the output length
-	 * and exponent, which might mean adding zeros:
-	 *
-	 *            exp  | format
-	 *            1+   |  ddddddddd000000
-	 *            0    |  ddddddddd
-	 *  -1 .. -len+1   |  dddddddd.d to d.ddddddddd
-	 *  -len ...       |  0.ddddddddd to 0.000dddddd
-	 */
-	uint32		i = 0;
-	int32		nexp = exp + olength;
-
-	if (nexp <= 0)
-	{
-		/* -nexp is number of 0s to add after '.' */
-		Assert(nexp >= -3);
-		/* 0.000ddddd */
-		index = 2 - nexp;
-		/* won't need more than this many 0s */
-		memcpy(result, "0.000000", 8);
-	}
-	else if (exp < 0)
-	{
-		/*
-		 * dddd.dddd; leave space at the start and move the '.' in after
-		 */
-		index = 1;
-	}
-	else
-	{
-		/*
-		 * We can save some code later by pre-filling with zeros. We know that
-		 * there can be no more than 16 output digits in this form, otherwise
-		 * we would not choose fixed-point output.
-		 */
-		Assert(exp < 16 && exp + olength <= 16);
-		memset(result, '0', 16);
-	}
-
-	/*
-	 * We prefer 32-bit operations, even on 64-bit platforms. We have at most
-	 * 17 digits, and uint32 can store 9 digits. If output doesn't fit into
-	 * uint32, we cut off 8 digits, so the rest will fit into uint32.
-	 */
-	if ((output >> 32) != 0)
-	{
-		/* Expensive 64-bit division. */
-		const uint64 q = div1e8(output);
-		uint32		output2 = (uint32) (output - 100000000 * q);
-		const uint32 c = output2 % 10000;
-
-		output = q;
-		output2 /= 10000;
-
-		const uint32 d = output2 % 10000;
-		const uint32 c0 = (c % 100) << 1;
-		const uint32 c1 = (c / 100) << 1;
-		const uint32 d0 = (d % 100) << 1;
-		const uint32 d1 = (d / 100) << 1;
-
-		memcpy(result + index + olength - i - 2, DIGIT_TABLE + c0, 2);
-		memcpy(result + index + olength - i - 4, DIGIT_TABLE + c1, 2);
-		memcpy(result + index + olength - i - 6, DIGIT_TABLE + d0, 2);
-		memcpy(result + index + olength - i - 8, DIGIT_TABLE + d1, 2);
-		i += 8;
-	}
-
-	uint32		output2 = (uint32) output;
-
-	while (output2 >= 10000)
-	{
-		const uint32 c = output2 - 10000 * (output2 / 10000);
-		const uint32 c0 = (c % 100) << 1;
-		const uint32 c1 = (c / 100) << 1;
-
-		output2 /= 10000;
-		memcpy(result + index + olength - i - 2, DIGIT_TABLE + c0, 2);
-		memcpy(result + index + olength - i - 4, DIGIT_TABLE + c1, 2);
-		i += 4;
-	}
-	if (output2 >= 100)
-	{
-		const uint32 c = (output2 % 100) << 1;
-
-		output2 /= 100;
-		memcpy(result + index + olength - i - 2, DIGIT_TABLE + c, 2);
-		i += 2;
-	}
-	if (output2 >= 10)
-	{
-		const uint32 c = output2 << 1;
-
-		memcpy(result + index + olength - i - 2, DIGIT_TABLE + c, 2);
-	}
-	else
-	{
-		result[index] = (char) ('0' + output2);
-	}
-
-	if (index == 1)
-	{
-		/*
-		 * nexp is 1..15 here, representing the number of digits before the
-		 * point. A value of 16 is not possible because we switch to
-		 * scientific notation when the display exponent reaches 15.
-		 */
-		Assert(nexp < 16);
-		/* gcc only seems to want to optimize memmove for small 2^n */
-		if (nexp & 8)
-		{
-			memmove(result + index - 1, result + index, 8);
-			index += 8;
-		}
-		if (nexp & 4)
-		{
-			memmove(result + index - 1, result + index, 4);
-			index += 4;
-		}
-		if (nexp & 2)
-		{
-			memmove(result + index - 1, result + index, 2);
-			index += 2;
-		}
-		if (nexp & 1)
-		{
-			result[index - 1] = result[index];
-		}
-		result[nexp] = '.';
-		index = olength + 1;
-	}
-	else if (exp >= 0)
-	{
-		/* we supplied the trailing zeros earlier, now just set the length. */
-		index = olength + exp;
-	}
-	else
-	{
-		index = olength + (2 - nexp);
-	}
-
-	return index;
-}
-
-static inline int
-to_chars(floating_decimal_64 v, const bool sign, char *const result)
-{
-	/* Step 5: Print the decimal representation. */
-	int			index = 0;
-
-	uint64		output = v.mantissa;
-	uint32		olength = decimalLength(output);
-	int32		exp = v.exponent + olength - 1;
-
-	if (sign)
-	{
-		result[index++] = '-';
-	}
-
-	/*
-	 * The thresholds for fixed-point output are chosen to match printf
-	 * defaults. Beware that both the code of to_chars_df and the value of
-	 * DOUBLE_SHORTEST_DECIMAL_LEN are sensitive to these thresholds.
-	 */
-	if (exp >= -4 && exp < 15)
-		return to_chars_df(v, olength, result + index) + sign;
-
-	/*
-	 * If v.exponent is exactly 0, we might have reached here via the small
-	 * integer fast path, in which case v.mantissa might contain trailing
-	 * (decimal) zeros. For scientific notation we need to move these zeros
-	 * into the exponent. (For fixed point this doesn't matter, which is why
-	 * we do this here rather than above.)
-	 *
-	 * Since we already calculated the display exponent (exp) above based on
-	 * the old decimal length, that value does not change here. Instead, we
-	 * just reduce the display length for each digit removed.
-	 *
-	 * If we didn't get here via the fast path, the raw exponent will not
-	 * usually be 0, and there will be no trailing zeros, so we pay no more
-	 * than one div10/multiply extra cost. We claw back half of that by
-	 * checking for divisibility by 2 before dividing by 10.
-	 */
-	if (v.exponent == 0)
-	{
-		while ((output & 1) == 0)
-		{
-			const uint64 q = div10(output);
-			const uint32 r = (uint32) (output - 10 * q);
-
-			if (r != 0)
-				break;
-			output = q;
-			--olength;
-		}
-	}
-
-	/*----
-	 * Print the decimal digits.
-	 *
-	 * The following code is equivalent to:
-	 *
-	 * for (uint32 i = 0; i < olength - 1; ++i) {
-	 *   const uint32 c = output % 10; output /= 10;
-	 *   result[index + olength - i] = (char) ('0' + c);
-	 * }
-	 * result[index] = '0' + output % 10;
-	 *----
-	 */
-
-	uint32		i = 0;
-
-	/*
-	 * We prefer 32-bit operations, even on 64-bit platforms. We have at most
-	 * 17 digits, and uint32 can store 9 digits. If output doesn't fit into
-	 * uint32, we cut off 8 digits, so the rest will fit into uint32.
-	 */
-	if ((output >> 32) != 0)
-	{
-		/* Expensive 64-bit division. */
-		const uint64 q = div1e8(output);
-		uint32		output2 = (uint32) (output - 100000000 * q);
-
-		output = q;
-
-		const uint32 c = output2 % 10000;
-
-		output2 /= 10000;
-
-		const uint32 d = output2 % 10000;
-		const uint32 c0 = (c % 100) << 1;
-		const uint32 c1 = (c / 100) << 1;
-		const uint32 d0 = (d % 100) << 1;
-		const uint32 d1 = (d / 100) << 1;
-
-		memcpy(result + index + olength - i - 1, DIGIT_TABLE + c0, 2);
-		memcpy(result + index + olength - i - 3, DIGIT_TABLE + c1, 2);
-		memcpy(result + index + olength - i - 5, DIGIT_TABLE + d0, 2);
-		memcpy(result + index + olength - i - 7, DIGIT_TABLE + d1, 2);
-		i += 8;
-	}
-
-	uint32		output2 = (uint32) output;
-
-	while (output2 >= 10000)
-	{
-		const uint32 c = output2 - 10000 * (output2 / 10000);
-
-		output2 /= 10000;
-
-		const uint32 c0 = (c % 100) << 1;
-		const uint32 c1 = (c / 100) << 1;
-
-		memcpy(result + index + olength - i - 1, DIGIT_TABLE + c0, 2);
-		memcpy(result + index + olength - i - 3, DIGIT_TABLE + c1, 2);
-		i += 4;
-	}
-	if (output2 >= 100)
-	{
-		const uint32 c = (output2 % 100) << 1;
-
-		output2 /= 100;
-		memcpy(result + index + olength - i - 1, DIGIT_TABLE + c, 2);
-		i += 2;
-	}
-	if (output2 >= 10)
-	{
-		const uint32 c = output2 << 1;
-
-		/*
-		 * We can't use memcpy here: the decimal dot goes between these two
-		 * digits.
-		 */
-		result[index + olength - i] = DIGIT_TABLE[c + 1];
-		result[index] = DIGIT_TABLE[c];
-	}
-	else
-	{
-		result[index] = (char) ('0' + output2);
-	}
-
-	/* Print decimal point if needed. */
-	if (olength > 1)
-	{
-		result[index + 1] = '.';
-		index += olength + 1;
-	}
-	else
-	{
-		++index;
-	}
-
-	/* Print the exponent. */
-	result[index++] = 'e';
-	if (exp < 0)
-	{
-		result[index++] = '-';
-		exp = -exp;
-	}
-	else
-		result[index++] = '+';
-
-	if (exp >= 100)
-	{
-		const int32 c = exp % 10;
-
-		memcpy(result + index, DIGIT_TABLE + 2 * (exp / 10), 2);
-		result[index + 2] = (char) ('0' + c);
-		index += 3;
-	}
-	else
-	{
-		memcpy(result + index, DIGIT_TABLE + 2 * exp, 2);
-		index += 2;
-	}
-
-	return index;
-}
-
-static inline bool
-d2d_small_int(const uint64 ieeeMantissa,
-			  const uint32 ieeeExponent,
-			  floating_decimal_64 *v)
-{
-	const int32 e2 = (int32) ieeeExponent - DOUBLE_BIAS - DOUBLE_MANTISSA_BITS;
-
-	/*
-	 * Avoid using multiple "return false;" here since it tends to provoke the
-	 * compiler into inlining multiple copies of d2d, which is undesirable.
-	 */
-
-	if (e2 >= -DOUBLE_MANTISSA_BITS && e2 <= 0)
-	{
-		/*----
-		 * Since 2^52 <= m2 < 2^53 and 0 <= -e2 <= 52:
-		 *   1 <= f = m2 / 2^-e2 < 2^53.
-		 *
-		 * Test if the lower -e2 bits of the significand are 0, i.e. whether
-		 * the fraction is 0. We can use ieeeMantissa here, since the implied
-		 * 1 bit can never be tested by this; the implied 1 can only be part
-		 * of a fraction if e2 < -DOUBLE_MANTISSA_BITS which we already
-		 * checked. (e.g. 0.5 gives ieeeMantissa == 0 and e2 == -53)
-		 */
-		const uint64 mask = (UINT64CONST(1) << -e2) - 1;
-		const uint64 fraction = ieeeMantissa & mask;
-
-		if (fraction == 0)
-		{
-			/*----
-			 * f is an integer in the range [1, 2^53).
-			 * Note: mantissa might contain trailing (decimal) 0's.
-			 * Note: since 2^53 < 10^16, there is no need to adjust
-			 * decimalLength().
-			 */
-			const uint64 m2 = (UINT64CONST(1) << DOUBLE_MANTISSA_BITS) | ieeeMantissa;
-
-			v->mantissa = m2 >> -e2;
-			v->exponent = 0;
-			return true;
-		}
-	}
-
-	return false;
-}
-
-/*
- * Store the shortest decimal representation of the given double as an
- * UNTERMINATED string in the caller's supplied buffer (which must be at least
- * DOUBLE_SHORTEST_DECIMAL_LEN-1 bytes long).
- *
- * Returns the number of bytes stored.
- */
-int
-double_to_shortest_decimal_bufn(double f, char *result)
-{
-	/*
-	 * Step 1: Decode the floating-point number, and unify normalized and
-	 * subnormal cases.
-	 */
-	const uint64 bits = double_to_bits(f);
-
-	/* Decode bits into sign, mantissa, and exponent. */
-	const bool	ieeeSign = ((bits >> (DOUBLE_MANTISSA_BITS + DOUBLE_EXPONENT_BITS)) & 1) != 0;
-	const uint64 ieeeMantissa = bits & ((UINT64CONST(1) << DOUBLE_MANTISSA_BITS) - 1);
-	const uint32 ieeeExponent = (uint32) ((bits >> DOUBLE_MANTISSA_BITS) & ((1u << DOUBLE_EXPONENT_BITS) - 1));
-
-	/* Case distinction; exit early for the easy cases. */
-	if (ieeeExponent == ((1u << DOUBLE_EXPONENT_BITS) - 1u) || (ieeeExponent == 0 && ieeeMantissa == 0))
-	{
-		return copy_special_str(result, ieeeSign, (ieeeExponent != 0), (ieeeMantissa != 0));
-	}
-
-	floating_decimal_64 v;
-	const bool	isSmallInt = d2d_small_int(ieeeMantissa, ieeeExponent, &v);
-
-	if (!isSmallInt)
-	{
-		v = d2d(ieeeMantissa, ieeeExponent);
-	}
-
-	return to_chars(v, ieeeSign, result);
-}
-
-/*
- * Store the shortest decimal representation of the given double as a
- * null-terminated string in the caller's supplied buffer (which must be at
- * least DOUBLE_SHORTEST_DECIMAL_LEN bytes long).
- *
- * Returns the string length.
- */
-int
-double_to_shortest_decimal_buf(double f, char *result)
-{
-	const int	index = double_to_shortest_decimal_bufn(f, result);
-
-	/* Terminate the string. */
-	Assert(index < DOUBLE_SHORTEST_DECIMAL_LEN);
-	result[index] = '\0';
-	return index;
-}
-
-/*
- * Return the shortest decimal representation as a null-terminated palloc'd
- * string (outside the backend, uses malloc() instead).
- *
- * Caller is responsible for freeing the result.
- */
-char *
-double_to_shortest_decimal(double f)
-{
-	char	   *const result = (char *) palloc(DOUBLE_SHORTEST_DECIMAL_LEN);
-
-	double_to_shortest_decimal_buf(f, result);
-	return result;
-}
diff --git a/contrib/libs/libpq/src/common/d2s_full_table.h b/contrib/libs/libpq/src/common/d2s_full_table.h
deleted file mode 100644
index 23f5e9a45e..0000000000
--- a/contrib/libs/libpq/src/common/d2s_full_table.h
+++ /dev/null
@@ -1,358 +0,0 @@
-/*---------------------------------------------------------------------------
- *
- * Ryu floating-point output for double precision.
- *
- * Portions Copyright (c) 2018-2023, PostgreSQL Global Development Group
- *
- * IDENTIFICATION
- *	  src/common/d2s_full_table.h
- *
- * This is a modification of code taken from github.com/ulfjack/ryu under the
- * terms of the Boost license (not the Apache license). The original copyright
- * notice follows:
- *
- * Copyright 2018 Ulf Adams
- *
- * The contents of this file may be used under the terms of the Apache
- * License, Version 2.0.
- *
- *     (See accompanying file LICENSE-Apache or copy at
- *      http://www.apache.org/licenses/LICENSE-2.0)
- *
- * Alternatively, the contents of this file may be used under the terms of the
- * Boost Software License, Version 1.0.
- *
- *     (See accompanying file LICENSE-Boost or copy at
- *      https://www.boost.org/LICENSE_1_0.txt)
- *
- * Unless required by applicable law or agreed to in writing, this software is
- * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.
- *
- *---------------------------------------------------------------------------
- */
-
-#ifndef RYU_D2S_FULL_TABLE_H
-#define RYU_D2S_FULL_TABLE_H
-
-/*
- * These tables are generated (by the upstream) using PrintDoubleLookupTable
- * from the upstream sources at github.com/ulfjack/ryu, and then modified (by
- * us) by adding UINT64CONST.
- */
-static const uint64 DOUBLE_POW5_INV_SPLIT[292][2] = {
-	{UINT64CONST(1), UINT64CONST(288230376151711744)}, {UINT64CONST(3689348814741910324), UINT64CONST(230584300921369395)},
-	{UINT64CONST(2951479051793528259), UINT64CONST(184467440737095516)}, {UINT64CONST(17118578500402463900), UINT64CONST(147573952589676412)},
-	{UINT64CONST(12632330341676300947), UINT64CONST(236118324143482260)}, {UINT64CONST(10105864273341040758), UINT64CONST(188894659314785808)},
-	{UINT64CONST(15463389048156653253), UINT64CONST(151115727451828646)}, {UINT64CONST(17362724847566824558), UINT64CONST(241785163922925834)},
-	{UINT64CONST(17579528692795369969), UINT64CONST(193428131138340667)}, {UINT64CONST(6684925324752475329), UINT64CONST(154742504910672534)},
-	{UINT64CONST(18074578149087781173), UINT64CONST(247588007857076054)}, {UINT64CONST(18149011334012135262), UINT64CONST(198070406285660843)},
-	{UINT64CONST(3451162622983977240), UINT64CONST(158456325028528675)}, {UINT64CONST(5521860196774363583), UINT64CONST(253530120045645880)},
-	{UINT64CONST(4417488157419490867), UINT64CONST(202824096036516704)}, {UINT64CONST(7223339340677503017), UINT64CONST(162259276829213363)},
-	{UINT64CONST(7867994130342094503), UINT64CONST(259614842926741381)}, {UINT64CONST(2605046489531765280), UINT64CONST(207691874341393105)},
-	{UINT64CONST(2084037191625412224), UINT64CONST(166153499473114484)}, {UINT64CONST(10713157136084480204), UINT64CONST(265845599156983174)},
-	{UINT64CONST(12259874523609494487), UINT64CONST(212676479325586539)}, {UINT64CONST(13497248433629505913), UINT64CONST(170141183460469231)},
-	{UINT64CONST(14216899864323388813), UINT64CONST(272225893536750770)}, {UINT64CONST(11373519891458711051), UINT64CONST(217780714829400616)},
-	{UINT64CONST(5409467098425058518), UINT64CONST(174224571863520493)}, {UINT64CONST(4965798542738183305), UINT64CONST(278759314981632789)},
-	{UINT64CONST(7661987648932456967), UINT64CONST(223007451985306231)}, {UINT64CONST(2440241304404055250), UINT64CONST(178405961588244985)},
-	{UINT64CONST(3904386087046488400), UINT64CONST(285449538541191976)}, {UINT64CONST(17880904128604832013), UINT64CONST(228359630832953580)},
-	{UINT64CONST(14304723302883865611), UINT64CONST(182687704666362864)}, {UINT64CONST(15133127457049002812), UINT64CONST(146150163733090291)},
-	{UINT64CONST(16834306301794583852), UINT64CONST(233840261972944466)}, {UINT64CONST(9778096226693756759), UINT64CONST(187072209578355573)},
-	{UINT64CONST(15201174610838826053), UINT64CONST(149657767662684458)}, {UINT64CONST(2185786488890659746), UINT64CONST(239452428260295134)},
-	{UINT64CONST(5437978005854438120), UINT64CONST(191561942608236107)}, {UINT64CONST(15418428848909281466), UINT64CONST(153249554086588885)},
-	{UINT64CONST(6222742084545298729), UINT64CONST(245199286538542217)}, {UINT64CONST(16046240111861969953), UINT64CONST(196159429230833773)},
-	{UINT64CONST(1768945645263844993), UINT64CONST(156927543384667019)}, {UINT64CONST(10209010661905972635), UINT64CONST(251084069415467230)},
-	{UINT64CONST(8167208529524778108), UINT64CONST(200867255532373784)}, {UINT64CONST(10223115638361732810), UINT64CONST(160693804425899027)},
-	{UINT64CONST(1599589762411131202), UINT64CONST(257110087081438444)}, {UINT64CONST(4969020624670815285), UINT64CONST(205688069665150755)},
-	{UINT64CONST(3975216499736652228), UINT64CONST(164550455732120604)}, {UINT64CONST(13739044029062464211), UINT64CONST(263280729171392966)},
-	{UINT64CONST(7301886408508061046), UINT64CONST(210624583337114373)}, {UINT64CONST(13220206756290269483), UINT64CONST(168499666669691498)},
-	{UINT64CONST(17462981995322520850), UINT64CONST(269599466671506397)}, {UINT64CONST(6591687966774196033), UINT64CONST(215679573337205118)},
-	{UINT64CONST(12652048002903177473), UINT64CONST(172543658669764094)}, {UINT64CONST(9175230360419352987), UINT64CONST(276069853871622551)},
-	{UINT64CONST(3650835473593572067), UINT64CONST(220855883097298041)}, {UINT64CONST(17678063637842498946), UINT64CONST(176684706477838432)},
-	{UINT64CONST(13527506561580357021), UINT64CONST(282695530364541492)}, {UINT64CONST(3443307619780464970), UINT64CONST(226156424291633194)},
-	{UINT64CONST(6443994910566282300), UINT64CONST(180925139433306555)}, {UINT64CONST(5155195928453025840), UINT64CONST(144740111546645244)},
-	{UINT64CONST(15627011115008661990), UINT64CONST(231584178474632390)}, {UINT64CONST(12501608892006929592), UINT64CONST(185267342779705912)},
-	{UINT64CONST(2622589484121723027), UINT64CONST(148213874223764730)}, {UINT64CONST(4196143174594756843), UINT64CONST(237142198758023568)},
-	{UINT64CONST(10735612169159626121), UINT64CONST(189713759006418854)}, {UINT64CONST(12277838550069611220), UINT64CONST(151771007205135083)},
-	{UINT64CONST(15955192865369467629), UINT64CONST(242833611528216133)}, {UINT64CONST(1696107848069843133), UINT64CONST(194266889222572907)},
-	{UINT64CONST(12424932722681605476), UINT64CONST(155413511378058325)}, {UINT64CONST(1433148282581017146), UINT64CONST(248661618204893321)},
-	{UINT64CONST(15903913885032455010), UINT64CONST(198929294563914656)}, {UINT64CONST(9033782293284053685), UINT64CONST(159143435651131725)},
-	{UINT64CONST(14454051669254485895), UINT64CONST(254629497041810760)}, {UINT64CONST(11563241335403588716), UINT64CONST(203703597633448608)},
-	{UINT64CONST(16629290697806691620), UINT64CONST(162962878106758886)}, {UINT64CONST(781423413297334329), UINT64CONST(260740604970814219)},
-	{UINT64CONST(4314487545379777786), UINT64CONST(208592483976651375)}, {UINT64CONST(3451590036303822229), UINT64CONST(166873987181321100)},
-	{UINT64CONST(5522544058086115566), UINT64CONST(266998379490113760)}, {UINT64CONST(4418035246468892453), UINT64CONST(213598703592091008)},
-	{UINT64CONST(10913125826658934609), UINT64CONST(170878962873672806)}, {UINT64CONST(10082303693170474728), UINT64CONST(273406340597876490)},
-	{UINT64CONST(8065842954536379782), UINT64CONST(218725072478301192)}, {UINT64CONST(17520720807854834795), UINT64CONST(174980057982640953)},
-	{UINT64CONST(5897060404116273733), UINT64CONST(279968092772225526)}, {UINT64CONST(1028299508551108663), UINT64CONST(223974474217780421)},
-	{UINT64CONST(15580034865808528224), UINT64CONST(179179579374224336)}, {UINT64CONST(17549358155809824511), UINT64CONST(286687326998758938)},
-	{UINT64CONST(2971440080422128639), UINT64CONST(229349861599007151)}, {UINT64CONST(17134547323305344204), UINT64CONST(183479889279205720)},
-	{UINT64CONST(13707637858644275364), UINT64CONST(146783911423364576)}, {UINT64CONST(14553522944347019935), UINT64CONST(234854258277383322)},
-	{UINT64CONST(4264120725993795302), UINT64CONST(187883406621906658)}, {UINT64CONST(10789994210278856888), UINT64CONST(150306725297525326)},
-	{UINT64CONST(9885293106962350374), UINT64CONST(240490760476040522)}, {UINT64CONST(529536856086059653), UINT64CONST(192392608380832418)},
-	{UINT64CONST(7802327114352668369), UINT64CONST(153914086704665934)}, {UINT64CONST(1415676938738538420), UINT64CONST(246262538727465495)},
-	{UINT64CONST(1132541550990830736), UINT64CONST(197010030981972396)}, {UINT64CONST(15663428499760305882), UINT64CONST(157608024785577916)},
-	{UINT64CONST(17682787970132668764), UINT64CONST(252172839656924666)}, {UINT64CONST(10456881561364224688), UINT64CONST(201738271725539733)},
-	{UINT64CONST(15744202878575200397), UINT64CONST(161390617380431786)}, {UINT64CONST(17812026976236499989), UINT64CONST(258224987808690858)},
-	{UINT64CONST(3181575136763469022), UINT64CONST(206579990246952687)}, {UINT64CONST(13613306553636506187), UINT64CONST(165263992197562149)},
-	{UINT64CONST(10713244041592678929), UINT64CONST(264422387516099439)}, {UINT64CONST(12259944048016053467), UINT64CONST(211537910012879551)},
-	{UINT64CONST(6118606423670932450), UINT64CONST(169230328010303641)}, {UINT64CONST(2411072648389671274), UINT64CONST(270768524816485826)},
-	{UINT64CONST(16686253377679378312), UINT64CONST(216614819853188660)}, {UINT64CONST(13349002702143502650), UINT64CONST(173291855882550928)},
-	{UINT64CONST(17669055508687693916), UINT64CONST(277266969412081485)}, {UINT64CONST(14135244406950155133), UINT64CONST(221813575529665188)},
-	{UINT64CONST(240149081334393137), UINT64CONST(177450860423732151)}, {UINT64CONST(11452284974360759988), UINT64CONST(283921376677971441)},
-	{UINT64CONST(5472479164746697667), UINT64CONST(227137101342377153)}, {UINT64CONST(11756680961281178780), UINT64CONST(181709681073901722)},
-	{UINT64CONST(2026647139541122378), UINT64CONST(145367744859121378)}, {UINT64CONST(18000030682233437097), UINT64CONST(232588391774594204)},
-	{UINT64CONST(18089373360528660001), UINT64CONST(186070713419675363)}, {UINT64CONST(3403452244197197031), UINT64CONST(148856570735740291)},
-	{UINT64CONST(16513570034941246220), UINT64CONST(238170513177184465)}, {UINT64CONST(13210856027952996976), UINT64CONST(190536410541747572)},
-	{UINT64CONST(3189987192878576934), UINT64CONST(152429128433398058)}, {UINT64CONST(1414630693863812771), UINT64CONST(243886605493436893)},
-	{UINT64CONST(8510402184574870864), UINT64CONST(195109284394749514)}, {UINT64CONST(10497670562401807014), UINT64CONST(156087427515799611)},
-	{UINT64CONST(9417575270359070576), UINT64CONST(249739884025279378)}, {UINT64CONST(14912757845771077107), UINT64CONST(199791907220223502)},
-	{UINT64CONST(4551508647133041040), UINT64CONST(159833525776178802)}, {UINT64CONST(10971762650154775986), UINT64CONST(255733641241886083)},
-	{UINT64CONST(16156107749607641435), UINT64CONST(204586912993508866)}, {UINT64CONST(9235537384944202825), UINT64CONST(163669530394807093)},
-	{UINT64CONST(11087511001168814197), UINT64CONST(261871248631691349)}, {UINT64CONST(12559357615676961681), UINT64CONST(209496998905353079)},
-	{UINT64CONST(13736834907283479668), UINT64CONST(167597599124282463)}, {UINT64CONST(18289587036911657145), UINT64CONST(268156158598851941)},
-	{UINT64CONST(10942320814787415393), UINT64CONST(214524926879081553)}, {UINT64CONST(16132554281313752961), UINT64CONST(171619941503265242)},
-	{UINT64CONST(11054691591134363444), UINT64CONST(274591906405224388)}, {UINT64CONST(16222450902391311402), UINT64CONST(219673525124179510)},
-	{UINT64CONST(12977960721913049122), UINT64CONST(175738820099343608)}, {UINT64CONST(17075388340318968271), UINT64CONST(281182112158949773)},
-	{UINT64CONST(2592264228029443648), UINT64CONST(224945689727159819)}, {UINT64CONST(5763160197165465241), UINT64CONST(179956551781727855)},
-	{UINT64CONST(9221056315464744386), UINT64CONST(287930482850764568)}, {UINT64CONST(14755542681855616155), UINT64CONST(230344386280611654)},
-	{UINT64CONST(15493782960226403247), UINT64CONST(184275509024489323)}, {UINT64CONST(1326979923955391628), UINT64CONST(147420407219591459)},
-	{UINT64CONST(9501865507812447252), UINT64CONST(235872651551346334)}, {UINT64CONST(11290841220991868125), UINT64CONST(188698121241077067)},
-	{UINT64CONST(1653975347309673853), UINT64CONST(150958496992861654)}, {UINT64CONST(10025058185179298811), UINT64CONST(241533595188578646)},
-	{UINT64CONST(4330697733401528726), UINT64CONST(193226876150862917)}, {UINT64CONST(14532604630946953951), UINT64CONST(154581500920690333)},
-	{UINT64CONST(1116074521063664381), UINT64CONST(247330401473104534)}, {UINT64CONST(4582208431592841828), UINT64CONST(197864321178483627)},
-	{UINT64CONST(14733813189500004432), UINT64CONST(158291456942786901)}, {UINT64CONST(16195403473716186445), UINT64CONST(253266331108459042)},
-	{UINT64CONST(5577625149489128510), UINT64CONST(202613064886767234)}, {UINT64CONST(8151448934333213131), UINT64CONST(162090451909413787)},
-	{UINT64CONST(16731667109675051333), UINT64CONST(259344723055062059)}, {UINT64CONST(17074682502481951390), UINT64CONST(207475778444049647)},
-	{UINT64CONST(6281048372501740465), UINT64CONST(165980622755239718)}, {UINT64CONST(6360328581260874421), UINT64CONST(265568996408383549)},
-	{UINT64CONST(8777611679750609860), UINT64CONST(212455197126706839)}, {UINT64CONST(10711438158542398211), UINT64CONST(169964157701365471)},
-	{UINT64CONST(9759603424184016492), UINT64CONST(271942652322184754)}, {UINT64CONST(11497031554089123517), UINT64CONST(217554121857747803)},
-	{UINT64CONST(16576322872755119460), UINT64CONST(174043297486198242)}, {UINT64CONST(11764721337440549842), UINT64CONST(278469275977917188)},
-	{UINT64CONST(16790474699436260520), UINT64CONST(222775420782333750)}, {UINT64CONST(13432379759549008416), UINT64CONST(178220336625867000)},
-	{UINT64CONST(3045063541568861850), UINT64CONST(285152538601387201)}, {UINT64CONST(17193446092222730773), UINT64CONST(228122030881109760)},
-	{UINT64CONST(13754756873778184618), UINT64CONST(182497624704887808)}, {UINT64CONST(18382503128506368341), UINT64CONST(145998099763910246)},
-	{UINT64CONST(3586563302416817083), UINT64CONST(233596959622256395)}, {UINT64CONST(2869250641933453667), UINT64CONST(186877567697805116)},
-	{UINT64CONST(17052795772514404226), UINT64CONST(149502054158244092)}, {UINT64CONST(12527077977055405469), UINT64CONST(239203286653190548)},
-	{UINT64CONST(17400360011128145022), UINT64CONST(191362629322552438)}, {UINT64CONST(2852241564676785048), UINT64CONST(153090103458041951)},
-	{UINT64CONST(15631632947708587046), UINT64CONST(244944165532867121)}, {UINT64CONST(8815957543424959314), UINT64CONST(195955332426293697)},
-	{UINT64CONST(18120812478965698421), UINT64CONST(156764265941034957)}, {UINT64CONST(14235904707377476180), UINT64CONST(250822825505655932)},
-	{UINT64CONST(4010026136418160298), UINT64CONST(200658260404524746)}, {UINT64CONST(17965416168102169531), UINT64CONST(160526608323619796)},
-	{UINT64CONST(2919224165770098987), UINT64CONST(256842573317791675)}, {UINT64CONST(2335379332616079190), UINT64CONST(205474058654233340)},
-	{UINT64CONST(1868303466092863352), UINT64CONST(164379246923386672)}, {UINT64CONST(6678634360490491686), UINT64CONST(263006795077418675)},
-	{UINT64CONST(5342907488392393349), UINT64CONST(210405436061934940)}, {UINT64CONST(4274325990713914679), UINT64CONST(168324348849547952)},
-	{UINT64CONST(10528270399884173809), UINT64CONST(269318958159276723)}, {UINT64CONST(15801313949391159694), UINT64CONST(215455166527421378)},
-	{UINT64CONST(1573004715287196786), UINT64CONST(172364133221937103)}, {UINT64CONST(17274202803427156150), UINT64CONST(275782613155099364)},
-	{UINT64CONST(17508711057483635243), UINT64CONST(220626090524079491)}, {UINT64CONST(10317620031244997871), UINT64CONST(176500872419263593)},
-	{UINT64CONST(12818843235250086271), UINT64CONST(282401395870821749)}, {UINT64CONST(13944423402941979340), UINT64CONST(225921116696657399)},
-	{UINT64CONST(14844887537095493795), UINT64CONST(180736893357325919)}, {UINT64CONST(15565258844418305359), UINT64CONST(144589514685860735)},
-	{UINT64CONST(6457670077359736959), UINT64CONST(231343223497377177)}, {UINT64CONST(16234182506113520537), UINT64CONST(185074578797901741)},
-	{UINT64CONST(9297997190148906106), UINT64CONST(148059663038321393)}, {UINT64CONST(11187446689496339446), UINT64CONST(236895460861314229)},
-	{UINT64CONST(12639306166338981880), UINT64CONST(189516368689051383)}, {UINT64CONST(17490142562555006151), UINT64CONST(151613094951241106)},
-	{UINT64CONST(2158786396894637579), UINT64CONST(242580951921985771)}, {UINT64CONST(16484424376483351356), UINT64CONST(194064761537588616)},
-	{UINT64CONST(9498190686444770762), UINT64CONST(155251809230070893)}, {UINT64CONST(11507756283569722895), UINT64CONST(248402894768113429)},
-	{UINT64CONST(12895553841597688639), UINT64CONST(198722315814490743)}, {UINT64CONST(17695140702761971558), UINT64CONST(158977852651592594)},
-	{UINT64CONST(17244178680193423523), UINT64CONST(254364564242548151)}, {UINT64CONST(10105994129412828495), UINT64CONST(203491651394038521)},
-	{UINT64CONST(4395446488788352473), UINT64CONST(162793321115230817)}, {UINT64CONST(10722063196803274280), UINT64CONST(260469313784369307)},
-	{UINT64CONST(1198952927958798777), UINT64CONST(208375451027495446)}, {UINT64CONST(15716557601334680315), UINT64CONST(166700360821996356)},
-	{UINT64CONST(17767794532651667857), UINT64CONST(266720577315194170)}, {UINT64CONST(14214235626121334286), UINT64CONST(213376461852155336)},
-	{UINT64CONST(7682039686155157106), UINT64CONST(170701169481724269)}, {UINT64CONST(1223217053622520399), UINT64CONST(273121871170758831)},
-	{UINT64CONST(15735968901865657612), UINT64CONST(218497496936607064)}, {UINT64CONST(16278123936234436413), UINT64CONST(174797997549285651)},
-	{UINT64CONST(219556594781725998), UINT64CONST(279676796078857043)}, {UINT64CONST(7554342905309201445), UINT64CONST(223741436863085634)},
-	{UINT64CONST(9732823138989271479), UINT64CONST(178993149490468507)}, {UINT64CONST(815121763415193074), UINT64CONST(286389039184749612)},
-	{UINT64CONST(11720143854957885429), UINT64CONST(229111231347799689)}, {UINT64CONST(13065463898708218666), UINT64CONST(183288985078239751)},
-	{UINT64CONST(6763022304224664610), UINT64CONST(146631188062591801)}, {UINT64CONST(3442138057275642729), UINT64CONST(234609900900146882)},
-	{UINT64CONST(13821756890046245153), UINT64CONST(187687920720117505)}, {UINT64CONST(11057405512036996122), UINT64CONST(150150336576094004)},
-	{UINT64CONST(6623802375033462826), UINT64CONST(240240538521750407)}, {UINT64CONST(16367088344252501231), UINT64CONST(192192430817400325)},
-	{UINT64CONST(13093670675402000985), UINT64CONST(153753944653920260)}, {UINT64CONST(2503129006933649959), UINT64CONST(246006311446272417)},
-	{UINT64CONST(13070549649772650937), UINT64CONST(196805049157017933)}, {UINT64CONST(17835137349301941396), UINT64CONST(157444039325614346)},
-	{UINT64CONST(2710778055689733971), UINT64CONST(251910462920982955)}, {UINT64CONST(2168622444551787177), UINT64CONST(201528370336786364)},
-	{UINT64CONST(5424246770383340065), UINT64CONST(161222696269429091)}, {UINT64CONST(1300097203129523457), UINT64CONST(257956314031086546)},
-	{UINT64CONST(15797473021471260058), UINT64CONST(206365051224869236)}, {UINT64CONST(8948629602435097724), UINT64CONST(165092040979895389)},
-	{UINT64CONST(3249760919670425388), UINT64CONST(264147265567832623)}, {UINT64CONST(9978506365220160957), UINT64CONST(211317812454266098)},
-	{UINT64CONST(15361502721659949412), UINT64CONST(169054249963412878)}, {UINT64CONST(2442311466204457120), UINT64CONST(270486799941460606)},
-	{UINT64CONST(16711244431931206989), UINT64CONST(216389439953168484)}, {UINT64CONST(17058344360286875914), UINT64CONST(173111551962534787)},
-	{UINT64CONST(12535955717491360170), UINT64CONST(276978483140055660)}, {UINT64CONST(10028764573993088136), UINT64CONST(221582786512044528)},
-	{UINT64CONST(15401709288678291155), UINT64CONST(177266229209635622)}, {UINT64CONST(9885339602917624555), UINT64CONST(283625966735416996)},
-	{UINT64CONST(4218922867592189321), UINT64CONST(226900773388333597)}, {UINT64CONST(14443184738299482427), UINT64CONST(181520618710666877)},
-	{UINT64CONST(4175850161155765295), UINT64CONST(145216494968533502)}, {UINT64CONST(10370709072591134795), UINT64CONST(232346391949653603)},
-	{UINT64CONST(15675264887556728482), UINT64CONST(185877113559722882)}, {UINT64CONST(5161514280561562140), UINT64CONST(148701690847778306)},
-	{UINT64CONST(879725219414678777), UINT64CONST(237922705356445290)}, {UINT64CONST(703780175531743021), UINT64CONST(190338164285156232)},
-	{UINT64CONST(11631070584651125387), UINT64CONST(152270531428124985)}, {UINT64CONST(162968861732249003), UINT64CONST(243632850284999977)},
-	{UINT64CONST(11198421533611530172), UINT64CONST(194906280227999981)}, {UINT64CONST(5269388412147313814), UINT64CONST(155925024182399985)},
-	{UINT64CONST(8431021459435702103), UINT64CONST(249480038691839976)}, {UINT64CONST(3055468352806651359), UINT64CONST(199584030953471981)},
-	{UINT64CONST(17201769941212962380), UINT64CONST(159667224762777584)}, {UINT64CONST(16454785461715008838), UINT64CONST(255467559620444135)},
-	{UINT64CONST(13163828369372007071), UINT64CONST(204374047696355308)}, {UINT64CONST(17909760324981426303), UINT64CONST(163499238157084246)},
-	{UINT64CONST(2830174816776909822), UINT64CONST(261598781051334795)}, {UINT64CONST(2264139853421527858), UINT64CONST(209279024841067836)},
-	{UINT64CONST(16568707141704863579), UINT64CONST(167423219872854268)}, {UINT64CONST(4373838538276319787), UINT64CONST(267877151796566830)},
-	{UINT64CONST(3499070830621055830), UINT64CONST(214301721437253464)}, {UINT64CONST(6488605479238754987), UINT64CONST(171441377149802771)},
-	{UINT64CONST(3003071137298187333), UINT64CONST(274306203439684434)}, {UINT64CONST(6091805724580460189), UINT64CONST(219444962751747547)},
-	{UINT64CONST(15941491023890099121), UINT64CONST(175555970201398037)}, {UINT64CONST(10748990379256517301), UINT64CONST(280889552322236860)},
-	{UINT64CONST(8599192303405213841), UINT64CONST(224711641857789488)}, {UINT64CONST(14258051472207991719), UINT64CONST(179769313486231590)}
-};
-
-static const uint64 DOUBLE_POW5_SPLIT[326][2] = {
-	{UINT64CONST(0), UINT64CONST(72057594037927936)}, {UINT64CONST(0), UINT64CONST(90071992547409920)},
-	{UINT64CONST(0), UINT64CONST(112589990684262400)}, {UINT64CONST(0), UINT64CONST(140737488355328000)},
-	{UINT64CONST(0), UINT64CONST(87960930222080000)}, {UINT64CONST(0), UINT64CONST(109951162777600000)},
-	{UINT64CONST(0), UINT64CONST(137438953472000000)}, {UINT64CONST(0), UINT64CONST(85899345920000000)},
-	{UINT64CONST(0), UINT64CONST(107374182400000000)}, {UINT64CONST(0), UINT64CONST(134217728000000000)},
-	{UINT64CONST(0), UINT64CONST(83886080000000000)}, {UINT64CONST(0), UINT64CONST(104857600000000000)},
-	{UINT64CONST(0), UINT64CONST(131072000000000000)}, {UINT64CONST(0), UINT64CONST(81920000000000000)},
-	{UINT64CONST(0), UINT64CONST(102400000000000000)}, {UINT64CONST(0), UINT64CONST(128000000000000000)},
-	{UINT64CONST(0), UINT64CONST(80000000000000000)}, {UINT64CONST(0), UINT64CONST(100000000000000000)},
-	{UINT64CONST(0), UINT64CONST(125000000000000000)}, {UINT64CONST(0), UINT64CONST(78125000000000000)},
-	{UINT64CONST(0), UINT64CONST(97656250000000000)}, {UINT64CONST(0), UINT64CONST(122070312500000000)},
-	{UINT64CONST(0), UINT64CONST(76293945312500000)}, {UINT64CONST(0), UINT64CONST(95367431640625000)},
-	{UINT64CONST(0), UINT64CONST(119209289550781250)}, {UINT64CONST(4611686018427387904), UINT64CONST(74505805969238281)},
-	{UINT64CONST(10376293541461622784), UINT64CONST(93132257461547851)}, {UINT64CONST(8358680908399640576), UINT64CONST(116415321826934814)},
-	{UINT64CONST(612489549322387456), UINT64CONST(72759576141834259)}, {UINT64CONST(14600669991935148032), UINT64CONST(90949470177292823)},
-	{UINT64CONST(13639151471491547136), UINT64CONST(113686837721616029)}, {UINT64CONST(3213881284082270208), UINT64CONST(142108547152020037)},
-	{UINT64CONST(4314518811765112832), UINT64CONST(88817841970012523)}, {UINT64CONST(781462496279003136), UINT64CONST(111022302462515654)},
-	{UINT64CONST(10200200157203529728), UINT64CONST(138777878078144567)}, {UINT64CONST(13292654125893287936), UINT64CONST(86736173798840354)},
-	{UINT64CONST(7392445620511834112), UINT64CONST(108420217248550443)}, {UINT64CONST(4628871007212404736), UINT64CONST(135525271560688054)},
-	{UINT64CONST(16728102434789916672), UINT64CONST(84703294725430033)}, {UINT64CONST(7075069988205232128), UINT64CONST(105879118406787542)},
-	{UINT64CONST(18067209522111315968), UINT64CONST(132348898008484427)}, {UINT64CONST(8986162942105878528), UINT64CONST(82718061255302767)},
-	{UINT64CONST(6621017659204960256), UINT64CONST(103397576569128459)}, {UINT64CONST(3664586055578812416), UINT64CONST(129246970711410574)},
-	{UINT64CONST(16125424340018921472), UINT64CONST(80779356694631608)}, {UINT64CONST(1710036351314100224), UINT64CONST(100974195868289511)},
-	{UINT64CONST(15972603494424788992), UINT64CONST(126217744835361888)}, {UINT64CONST(9982877184015493120), UINT64CONST(78886090522101180)},
-	{UINT64CONST(12478596480019366400), UINT64CONST(98607613152626475)}, {UINT64CONST(10986559581596820096), UINT64CONST(123259516440783094)},
-	{UINT64CONST(2254913720070624656), UINT64CONST(77037197775489434)}, {UINT64CONST(12042014186943056628), UINT64CONST(96296497219361792)},
-	{UINT64CONST(15052517733678820785), UINT64CONST(120370621524202240)}, {UINT64CONST(9407823583549262990), UINT64CONST(75231638452626400)},
-	{UINT64CONST(11759779479436578738), UINT64CONST(94039548065783000)}, {UINT64CONST(14699724349295723422), UINT64CONST(117549435082228750)},
-	{UINT64CONST(4575641699882439235), UINT64CONST(73468396926392969)}, {UINT64CONST(10331238143280436948), UINT64CONST(91835496157991211)},
-	{UINT64CONST(8302361660673158281), UINT64CONST(114794370197489014)}, {UINT64CONST(1154580038986672043), UINT64CONST(143492962746861268)},
-	{UINT64CONST(9944984561221445835), UINT64CONST(89683101716788292)}, {UINT64CONST(12431230701526807293), UINT64CONST(112103877145985365)},
-	{UINT64CONST(1703980321626345405), UINT64CONST(140129846432481707)}, {UINT64CONST(17205888765512323542), UINT64CONST(87581154020301066)},
-	{UINT64CONST(12283988920035628619), UINT64CONST(109476442525376333)}, {UINT64CONST(1519928094762372062), UINT64CONST(136845553156720417)},
-	{UINT64CONST(12479170105294952299), UINT64CONST(85528470722950260)}, {UINT64CONST(15598962631618690374), UINT64CONST(106910588403687825)},
-	{UINT64CONST(5663645234241199255), UINT64CONST(133638235504609782)}, {UINT64CONST(17374836326682913246), UINT64CONST(83523897190381113)},
-	{UINT64CONST(7883487353071477846), UINT64CONST(104404871487976392)}, {UINT64CONST(9854359191339347308), UINT64CONST(130506089359970490)},
-	{UINT64CONST(10770660513014479971), UINT64CONST(81566305849981556)}, {UINT64CONST(13463325641268099964), UINT64CONST(101957882312476945)},
-	{UINT64CONST(2994098996302961243), UINT64CONST(127447352890596182)}, {UINT64CONST(15706369927971514489), UINT64CONST(79654595556622613)},
-	{UINT64CONST(5797904354682229399), UINT64CONST(99568244445778267)}, {UINT64CONST(2635694424925398845), UINT64CONST(124460305557222834)},
-	{UINT64CONST(6258995034005762182), UINT64CONST(77787690973264271)}, {UINT64CONST(3212057774079814824), UINT64CONST(97234613716580339)},
-	{UINT64CONST(17850130272881932242), UINT64CONST(121543267145725423)}, {UINT64CONST(18073860448192289507), UINT64CONST(75964541966078389)},
-	{UINT64CONST(8757267504958198172), UINT64CONST(94955677457597987)}, {UINT64CONST(6334898362770359811), UINT64CONST(118694596821997484)},
-	{UINT64CONST(13182683513586250689), UINT64CONST(74184123013748427)}, {UINT64CONST(11866668373555425458), UINT64CONST(92730153767185534)},
-	{UINT64CONST(5609963430089506015), UINT64CONST(115912692208981918)}, {UINT64CONST(17341285199088104971), UINT64CONST(72445432630613698)},
-	{UINT64CONST(12453234462005355406), UINT64CONST(90556790788267123)}, {UINT64CONST(10954857059079306353), UINT64CONST(113195988485333904)},
-	{UINT64CONST(13693571323849132942), UINT64CONST(141494985606667380)}, {UINT64CONST(17781854114260483896), UINT64CONST(88434366004167112)},
-	{UINT64CONST(3780573569116053255), UINT64CONST(110542957505208891)}, {UINT64CONST(114030942967678664), UINT64CONST(138178696881511114)},
-	{UINT64CONST(4682955357782187069), UINT64CONST(86361685550944446)}, {UINT64CONST(15077066234082509644), UINT64CONST(107952106938680557)},
-	{UINT64CONST(5011274737320973344), UINT64CONST(134940133673350697)}, {UINT64CONST(14661261756894078100), UINT64CONST(84337583545844185)},
-	{UINT64CONST(4491519140835433913), UINT64CONST(105421979432305232)}, {UINT64CONST(5614398926044292391), UINT64CONST(131777474290381540)},
-	{UINT64CONST(12732371365632458552), UINT64CONST(82360921431488462)}, {UINT64CONST(6692092170185797382), UINT64CONST(102951151789360578)},
-	{UINT64CONST(17588487249587022536), UINT64CONST(128688939736700722)}, {UINT64CONST(15604490549419276989), UINT64CONST(80430587335437951)},
-	{UINT64CONST(14893927168346708332), UINT64CONST(100538234169297439)}, {UINT64CONST(14005722942005997511), UINT64CONST(125672792711621799)},
-	{UINT64CONST(15671105866394830300), UINT64CONST(78545495444763624)}, {UINT64CONST(1142138259283986260), UINT64CONST(98181869305954531)},
-	{UINT64CONST(15262730879387146537), UINT64CONST(122727336632443163)}, {UINT64CONST(7233363790403272633), UINT64CONST(76704585395276977)},
-	{UINT64CONST(13653390756431478696), UINT64CONST(95880731744096221)}, {UINT64CONST(3231680390257184658), UINT64CONST(119850914680120277)},
-	{UINT64CONST(4325643253124434363), UINT64CONST(74906821675075173)}, {UINT64CONST(10018740084832930858), UINT64CONST(93633527093843966)},
-	{UINT64CONST(3300053069186387764), UINT64CONST(117041908867304958)}, {UINT64CONST(15897591223523656064), UINT64CONST(73151193042065598)},
-	{UINT64CONST(10648616992549794273), UINT64CONST(91438991302581998)}, {UINT64CONST(4087399203832467033), UINT64CONST(114298739128227498)},
-	{UINT64CONST(14332621041645359599), UINT64CONST(142873423910284372)}, {UINT64CONST(18181260187883125557), UINT64CONST(89295889943927732)},
-	{UINT64CONST(4279831161144355331), UINT64CONST(111619862429909666)}, {UINT64CONST(14573160988285219972), UINT64CONST(139524828037387082)},
-	{UINT64CONST(13719911636105650386), UINT64CONST(87203017523366926)}, {UINT64CONST(7926517508277287175), UINT64CONST(109003771904208658)},
-	{UINT64CONST(684774848491833161), UINT64CONST(136254714880260823)}, {UINT64CONST(7345513307948477581), UINT64CONST(85159196800163014)},
-	{UINT64CONST(18405263671790372785), UINT64CONST(106448996000203767)}, {UINT64CONST(18394893571310578077), UINT64CONST(133061245000254709)},
-	{UINT64CONST(13802651491282805250), UINT64CONST(83163278125159193)}, {UINT64CONST(3418256308821342851), UINT64CONST(103954097656448992)},
-	{UINT64CONST(4272820386026678563), UINT64CONST(129942622070561240)}, {UINT64CONST(2670512741266674102), UINT64CONST(81214138794100775)},
-	{UINT64CONST(17173198981865506339), UINT64CONST(101517673492625968)}, {UINT64CONST(3019754653622331308), UINT64CONST(126897091865782461)},
-	{UINT64CONST(4193189667727651020), UINT64CONST(79310682416114038)}, {UINT64CONST(14464859121514339583), UINT64CONST(99138353020142547)},
-	{UINT64CONST(13469387883465536574), UINT64CONST(123922941275178184)}, {UINT64CONST(8418367427165960359), UINT64CONST(77451838296986365)},
-	{UINT64CONST(15134645302384838353), UINT64CONST(96814797871232956)}, {UINT64CONST(471562554271496325), UINT64CONST(121018497339041196)},
-	{UINT64CONST(9518098633274461011), UINT64CONST(75636560836900747)}, {UINT64CONST(7285937273165688360), UINT64CONST(94545701046125934)},
-	{UINT64CONST(18330793628311886258), UINT64CONST(118182126307657417)}, {UINT64CONST(4539216990053847055), UINT64CONST(73863828942285886)},
-	{UINT64CONST(14897393274422084627), UINT64CONST(92329786177857357)}, {UINT64CONST(4786683537745442072), UINT64CONST(115412232722321697)},
-	{UINT64CONST(14520892257159371055), UINT64CONST(72132645451451060)}, {UINT64CONST(18151115321449213818), UINT64CONST(90165806814313825)},
-	{UINT64CONST(8853836096529353561), UINT64CONST(112707258517892282)}, {UINT64CONST(1843923083806916143), UINT64CONST(140884073147365353)},
-	{UINT64CONST(12681666973447792349), UINT64CONST(88052545717103345)}, {UINT64CONST(2017025661527576725), UINT64CONST(110065682146379182)},
-	{UINT64CONST(11744654113764246714), UINT64CONST(137582102682973977)}, {UINT64CONST(422879793461572340), UINT64CONST(85988814176858736)},
-	{UINT64CONST(528599741826965425), UINT64CONST(107486017721073420)}, {UINT64CONST(660749677283706782), UINT64CONST(134357522151341775)},
-	{UINT64CONST(7330497575943398595), UINT64CONST(83973451344588609)}, {UINT64CONST(13774807988356636147), UINT64CONST(104966814180735761)},
-	{UINT64CONST(3383451930163631472), UINT64CONST(131208517725919702)}, {UINT64CONST(15949715511634433382), UINT64CONST(82005323578699813)},
-	{UINT64CONST(6102086334260878016), UINT64CONST(102506654473374767)}, {UINT64CONST(3015921899398709616), UINT64CONST(128133318091718459)},
-	{UINT64CONST(18025852251620051174), UINT64CONST(80083323807324036)}, {UINT64CONST(4085571240815512351), UINT64CONST(100104154759155046)},
-	{UINT64CONST(14330336087874166247), UINT64CONST(125130193448943807)}, {UINT64CONST(15873989082562435760), UINT64CONST(78206370905589879)},
-	{UINT64CONST(15230800334775656796), UINT64CONST(97757963631987349)}, {UINT64CONST(5203442363187407284), UINT64CONST(122197454539984187)},
-	{UINT64CONST(946308467778435600), UINT64CONST(76373409087490117)}, {UINT64CONST(5794571603150432404), UINT64CONST(95466761359362646)},
-	{UINT64CONST(16466586540792816313), UINT64CONST(119333451699203307)}, {UINT64CONST(7985773578781816244), UINT64CONST(74583407312002067)},
-	{UINT64CONST(5370530955049882401), UINT64CONST(93229259140002584)}, {UINT64CONST(6713163693812353001), UINT64CONST(116536573925003230)},
-	{UINT64CONST(18030785363914884337), UINT64CONST(72835358703127018)}, {UINT64CONST(13315109668038829614), UINT64CONST(91044198378908773)},
-	{UINT64CONST(2808829029766373305), UINT64CONST(113805247973635967)}, {UINT64CONST(17346094342490130344), UINT64CONST(142256559967044958)},
-	{UINT64CONST(6229622945628943561), UINT64CONST(88910349979403099)}, {UINT64CONST(3175342663608791547), UINT64CONST(111137937474253874)},
-	{UINT64CONST(13192550366365765242), UINT64CONST(138922421842817342)}, {UINT64CONST(3633657960551215372), UINT64CONST(86826513651760839)},
-	{UINT64CONST(18377130505971182927), UINT64CONST(108533142064701048)}, {UINT64CONST(4524669058754427043), UINT64CONST(135666427580876311)},
-	{UINT64CONST(9745447189362598758), UINT64CONST(84791517238047694)}, {UINT64CONST(2958436949848472639), UINT64CONST(105989396547559618)},
-	{UINT64CONST(12921418224165366607), UINT64CONST(132486745684449522)}, {UINT64CONST(12687572408530742033), UINT64CONST(82804216052780951)},
-	{UINT64CONST(11247779492236039638), UINT64CONST(103505270065976189)}, {UINT64CONST(224666310012885835), UINT64CONST(129381587582470237)},
-	{UINT64CONST(2446259452971747599), UINT64CONST(80863492239043898)}, {UINT64CONST(12281196353069460307), UINT64CONST(101079365298804872)},
-	{UINT64CONST(15351495441336825384), UINT64CONST(126349206623506090)}, {UINT64CONST(14206370669262903769), UINT64CONST(78968254139691306)},
-	{UINT64CONST(8534591299723853903), UINT64CONST(98710317674614133)}, {UINT64CONST(15279925143082205283), UINT64CONST(123387897093267666)},
-	{UINT64CONST(14161639232853766206), UINT64CONST(77117435683292291)}, {UINT64CONST(13090363022639819853), UINT64CONST(96396794604115364)},
-	{UINT64CONST(16362953778299774816), UINT64CONST(120495993255144205)}, {UINT64CONST(12532689120651053212), UINT64CONST(75309995784465128)},
-	{UINT64CONST(15665861400813816515), UINT64CONST(94137494730581410)}, {UINT64CONST(10358954714162494836), UINT64CONST(117671868413226763)},
-	{UINT64CONST(4168503687137865320), UINT64CONST(73544917758266727)}, {UINT64CONST(598943590494943747), UINT64CONST(91931147197833409)},
-	{UINT64CONST(5360365506546067587), UINT64CONST(114913933997291761)}, {UINT64CONST(11312142901609972388), UINT64CONST(143642417496614701)},
-	{UINT64CONST(9375932322719926695), UINT64CONST(89776510935384188)}, {UINT64CONST(11719915403399908368), UINT64CONST(112220638669230235)},
-	{UINT64CONST(10038208235822497557), UINT64CONST(140275798336537794)}, {UINT64CONST(10885566165816448877), UINT64CONST(87672373960336121)},
-	{UINT64CONST(18218643725697949000), UINT64CONST(109590467450420151)}, {UINT64CONST(18161618638695048346), UINT64CONST(136988084313025189)},
-	{UINT64CONST(13656854658398099168), UINT64CONST(85617552695640743)}, {UINT64CONST(12459382304570236056), UINT64CONST(107021940869550929)},
-	{UINT64CONST(1739169825430631358), UINT64CONST(133777426086938662)}, {UINT64CONST(14922039196176308311), UINT64CONST(83610891304336663)},
-	{UINT64CONST(14040862976792997485), UINT64CONST(104513614130420829)}, {UINT64CONST(3716020665709083144), UINT64CONST(130642017663026037)},
-	{UINT64CONST(4628355925281870917), UINT64CONST(81651261039391273)}, {UINT64CONST(10397130925029726550), UINT64CONST(102064076299239091)},
-	{UINT64CONST(8384727637859770284), UINT64CONST(127580095374048864)}, {UINT64CONST(5240454773662356427), UINT64CONST(79737559608780540)},
-	{UINT64CONST(6550568467077945534), UINT64CONST(99671949510975675)}, {UINT64CONST(3576524565420044014), UINT64CONST(124589936888719594)},
-	{UINT64CONST(6847013871814915412), UINT64CONST(77868710555449746)}, {UINT64CONST(17782139376623420074), UINT64CONST(97335888194312182)},
-	{UINT64CONST(13004302183924499284), UINT64CONST(121669860242890228)}, {UINT64CONST(17351060901807587860), UINT64CONST(76043662651806392)},
-	{UINT64CONST(3242082053549933210), UINT64CONST(95054578314757991)}, {UINT64CONST(17887660622219580224), UINT64CONST(118818222893447488)},
-	{UINT64CONST(11179787888887237640), UINT64CONST(74261389308404680)}, {UINT64CONST(13974734861109047050), UINT64CONST(92826736635505850)},
-	{UINT64CONST(8245046539531533005), UINT64CONST(116033420794382313)}, {UINT64CONST(16682369133275677888), UINT64CONST(72520887996488945)},
-	{UINT64CONST(7017903361312433648), UINT64CONST(90651109995611182)}, {UINT64CONST(17995751238495317868), UINT64CONST(113313887494513977)},
-	{UINT64CONST(8659630992836983623), UINT64CONST(141642359368142472)}, {UINT64CONST(5412269370523114764), UINT64CONST(88526474605089045)},
-	{UINT64CONST(11377022731581281359), UINT64CONST(110658093256361306)}, {UINT64CONST(4997906377621825891), UINT64CONST(138322616570451633)},
-	{UINT64CONST(14652906532082110942), UINT64CONST(86451635356532270)}, {UINT64CONST(9092761128247862869), UINT64CONST(108064544195665338)},
-	{UINT64CONST(2142579373455052779), UINT64CONST(135080680244581673)}, {UINT64CONST(12868327154477877747), UINT64CONST(84425425152863545)},
-	{UINT64CONST(2250350887815183471), UINT64CONST(105531781441079432)}, {UINT64CONST(2812938609768979339), UINT64CONST(131914726801349290)},
-	{UINT64CONST(6369772649532999991), UINT64CONST(82446704250843306)}, {UINT64CONST(17185587848771025797), UINT64CONST(103058380313554132)},
-	{UINT64CONST(3035240737254230630), UINT64CONST(128822975391942666)}, {UINT64CONST(6508711479211282048), UINT64CONST(80514359619964166)},
-	{UINT64CONST(17359261385868878368), UINT64CONST(100642949524955207)}, {UINT64CONST(17087390713908710056), UINT64CONST(125803686906194009)},
-	{UINT64CONST(3762090168551861929), UINT64CONST(78627304316371256)}, {UINT64CONST(4702612710689827411), UINT64CONST(98284130395464070)},
-	{UINT64CONST(15101637925217060072), UINT64CONST(122855162994330087)}, {UINT64CONST(16356052730901744401), UINT64CONST(76784476871456304)},
-	{UINT64CONST(1998321839917628885), UINT64CONST(95980596089320381)}, {UINT64CONST(7109588318324424010), UINT64CONST(119975745111650476)},
-	{UINT64CONST(13666864735807540814), UINT64CONST(74984840694781547)}, {UINT64CONST(12471894901332038114), UINT64CONST(93731050868476934)},
-	{UINT64CONST(6366496589810271835), UINT64CONST(117163813585596168)}, {UINT64CONST(3979060368631419896), UINT64CONST(73227383490997605)},
-	{UINT64CONST(9585511479216662775), UINT64CONST(91534229363747006)}, {UINT64CONST(2758517312166052660), UINT64CONST(114417786704683758)},
-	{UINT64CONST(12671518677062341634), UINT64CONST(143022233380854697)}, {UINT64CONST(1002170145522881665), UINT64CONST(89388895863034186)},
-	{UINT64CONST(10476084718758377889), UINT64CONST(111736119828792732)}, {UINT64CONST(13095105898447972362), UINT64CONST(139670149785990915)},
-	{UINT64CONST(5878598177316288774), UINT64CONST(87293843616244322)}, {UINT64CONST(16571619758500136775), UINT64CONST(109117304520305402)},
-	{UINT64CONST(11491152661270395161), UINT64CONST(136396630650381753)}, {UINT64CONST(264441385652915120), UINT64CONST(85247894156488596)},
-	{UINT64CONST(330551732066143900), UINT64CONST(106559867695610745)}, {UINT64CONST(5024875683510067779), UINT64CONST(133199834619513431)},
-	{UINT64CONST(10058076329834874218), UINT64CONST(83249896637195894)}, {UINT64CONST(3349223375438816964), UINT64CONST(104062370796494868)},
-	{UINT64CONST(4186529219298521205), UINT64CONST(130077963495618585)}, {UINT64CONST(14145795808130045513), UINT64CONST(81298727184761615)},
-	{UINT64CONST(13070558741735168987), UINT64CONST(101623408980952019)}, {UINT64CONST(11726512408741573330), UINT64CONST(127029261226190024)},
-	{UINT64CONST(7329070255463483331), UINT64CONST(79393288266368765)}, {UINT64CONST(13773023837756742068), UINT64CONST(99241610332960956)},
-	{UINT64CONST(17216279797195927585), UINT64CONST(124052012916201195)}, {UINT64CONST(8454331864033760789), UINT64CONST(77532508072625747)},
-	{UINT64CONST(5956228811614813082), UINT64CONST(96915635090782184)}, {UINT64CONST(7445286014518516353), UINT64CONST(121144543863477730)},
-	{UINT64CONST(9264989777501460624), UINT64CONST(75715339914673581)}, {UINT64CONST(16192923240304213684), UINT64CONST(94644174893341976)},
-	{UINT64CONST(1794409976670715490), UINT64CONST(118305218616677471)}, {UINT64CONST(8039035263060279037), UINT64CONST(73940761635423419)},
-	{UINT64CONST(5437108060397960892), UINT64CONST(92425952044279274)}, {UINT64CONST(16019757112352226923), UINT64CONST(115532440055349092)},
-	{UINT64CONST(788976158365366019), UINT64CONST(72207775034593183)}, {UINT64CONST(14821278253238871236), UINT64CONST(90259718793241478)},
-	{UINT64CONST(9303225779693813237), UINT64CONST(112824648491551848)}, {UINT64CONST(11629032224617266546), UINT64CONST(141030810614439810)},
-	{UINT64CONST(11879831158813179495), UINT64CONST(88144256634024881)}, {UINT64CONST(1014730893234310657), UINT64CONST(110180320792531102)},
-	{UINT64CONST(10491785653397664129), UINT64CONST(137725400990663877)}, {UINT64CONST(8863209042587234033), UINT64CONST(86078375619164923)},
-	{UINT64CONST(6467325284806654637), UINT64CONST(107597969523956154)}, {UINT64CONST(17307528642863094104), UINT64CONST(134497461904945192)},
-	{UINT64CONST(10817205401789433815), UINT64CONST(84060913690590745)}, {UINT64CONST(18133192770664180173), UINT64CONST(105076142113238431)},
-	{UINT64CONST(18054804944902837312), UINT64CONST(131345177641548039)}, {UINT64CONST(18201782118205355176), UINT64CONST(82090736025967524)},
-	{UINT64CONST(4305483574047142354), UINT64CONST(102613420032459406)}, {UINT64CONST(14605226504413703751), UINT64CONST(128266775040574257)},
-	{UINT64CONST(2210737537617482988), UINT64CONST(80166734400358911)}, {UINT64CONST(16598479977304017447), UINT64CONST(100208418000448638)},
-	{UINT64CONST(11524727934775246001), UINT64CONST(125260522500560798)}, {UINT64CONST(2591268940807140847), UINT64CONST(78287826562850499)},
-	{UINT64CONST(17074144231291089770), UINT64CONST(97859783203563123)}, {UINT64CONST(16730994270686474309), UINT64CONST(122324729004453904)},
-	{UINT64CONST(10456871419179046443), UINT64CONST(76452955627783690)}, {UINT64CONST(3847717237119032246), UINT64CONST(95566194534729613)},
-	{UINT64CONST(9421332564826178211), UINT64CONST(119457743168412016)}, {UINT64CONST(5888332853016361382), UINT64CONST(74661089480257510)},
-	{UINT64CONST(16583788103125227536), UINT64CONST(93326361850321887)}, {UINT64CONST(16118049110479146516), UINT64CONST(116657952312902359)},
-	{UINT64CONST(16991309721690548428), UINT64CONST(72911220195563974)}, {UINT64CONST(12015765115258409727), UINT64CONST(91139025244454968)},
-	{UINT64CONST(15019706394073012159), UINT64CONST(113923781555568710)}, {UINT64CONST(9551260955736489391), UINT64CONST(142404726944460888)},
-	{UINT64CONST(5969538097335305869), UINT64CONST(89002954340288055)}, {UINT64CONST(2850236603241744433), UINT64CONST(111253692925360069)}
-};
-
-#endif							/* RYU_D2S_FULL_TABLE_H */
diff --git a/contrib/libs/libpq/src/common/d2s_intrinsics.h b/contrib/libs/libpq/src/common/d2s_intrinsics.h
deleted file mode 100644
index ae0f28dbb2..0000000000
--- a/contrib/libs/libpq/src/common/d2s_intrinsics.h
+++ /dev/null
@@ -1,202 +0,0 @@
-/*---------------------------------------------------------------------------
- *
- * Ryu floating-point output for double precision.
- *
- * Portions Copyright (c) 2018-2023, PostgreSQL Global Development Group
- *
- * IDENTIFICATION
- *	  src/common/d2s_intrinsics.h
- *
- * This is a modification of code taken from github.com/ulfjack/ryu under the
- * terms of the Boost license (not the Apache license). The original copyright
- * notice follows:
- *
- * Copyright 2018 Ulf Adams
- *
- * The contents of this file may be used under the terms of the Apache
- * License, Version 2.0.
- *
- *     (See accompanying file LICENSE-Apache or copy at
- *      http://www.apache.org/licenses/LICENSE-2.0)
- *
- * Alternatively, the contents of this file may be used under the terms of the
- * Boost Software License, Version 1.0.
- *
- *     (See accompanying file LICENSE-Boost or copy at
- *      https://www.boost.org/LICENSE_1_0.txt)
- *
- * Unless required by applicable law or agreed to in writing, this software is
- * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.
- *
- *---------------------------------------------------------------------------
- */
-#ifndef RYU_D2S_INTRINSICS_H
-#define RYU_D2S_INTRINSICS_H
-
-#if defined(HAS_64_BIT_INTRINSICS)
-
-#include <intrin.h>
-
-static inline uint64
-umul128(const uint64 a, const uint64 b, uint64 *const productHi)
-{
-	return _umul128(a, b, productHi);
-}
-
-static inline uint64
-shiftright128(const uint64 lo, const uint64 hi, const uint32 dist)
-{
-	/*
-	 * For the __shiftright128 intrinsic, the shift value is always modulo 64.
-	 * In the current implementation of the double-precision version of Ryu,
-	 * the shift value is always < 64. (In the case RYU_OPTIMIZE_SIZE == 0,
-	 * the shift value is in the range [49, 58]. Otherwise in the range [2,
-	 * 59].) Check this here in case a future change requires larger shift
-	 * values. In this case this function needs to be adjusted.
-	 */
-	Assert(dist < 64);
-	return __shiftright128(lo, hi, (unsigned char) dist);
-}
-
-#else							/* defined(HAS_64_BIT_INTRINSICS) */
-
-static inline uint64
-umul128(const uint64 a, const uint64 b, uint64 *const productHi)
-{
-	/*
-	 * The casts here help MSVC to avoid calls to the __allmul library
-	 * function.
-	 */
-	const uint32 aLo = (uint32) a;
-	const uint32 aHi = (uint32) (a >> 32);
-	const uint32 bLo = (uint32) b;
-	const uint32 bHi = (uint32) (b >> 32);
-
-	const uint64 b00 = (uint64) aLo * bLo;
-	const uint64 b01 = (uint64) aLo * bHi;
-	const uint64 b10 = (uint64) aHi * bLo;
-	const uint64 b11 = (uint64) aHi * bHi;
-
-	const uint32 b00Lo = (uint32) b00;
-	const uint32 b00Hi = (uint32) (b00 >> 32);
-
-	const uint64 mid1 = b10 + b00Hi;
-	const uint32 mid1Lo = (uint32) (mid1);
-	const uint32 mid1Hi = (uint32) (mid1 >> 32);
-
-	const uint64 mid2 = b01 + mid1Lo;
-	const uint32 mid2Lo = (uint32) (mid2);
-	const uint32 mid2Hi = (uint32) (mid2 >> 32);
-
-	const uint64 pHi = b11 + mid1Hi + mid2Hi;
-	const uint64 pLo = ((uint64) mid2Lo << 32) + b00Lo;
-
-	*productHi = pHi;
-	return pLo;
-}
-
-static inline uint64
-shiftright128(const uint64 lo, const uint64 hi, const uint32 dist)
-{
-	/* We don't need to handle the case dist >= 64 here (see above). */
-	Assert(dist < 64);
-#if !defined(RYU_32_BIT_PLATFORM)
-	Assert(dist > 0);
-	return (hi << (64 - dist)) | (lo >> dist);
-#else
-	/* Avoid a 64-bit shift by taking advantage of the range of shift values. */
-	Assert(dist >= 32);
-	return (hi << (64 - dist)) | ((uint32) (lo >> 32) >> (dist - 32));
-#endif
-}
-
-#endif							/* // defined(HAS_64_BIT_INTRINSICS) */
-
-#ifdef RYU_32_BIT_PLATFORM
-
-/*  Returns the high 64 bits of the 128-bit product of a and b. */
-static inline uint64
-umulh(const uint64 a, const uint64 b)
-{
-	/*
-	 * Reuse the umul128 implementation. Optimizers will likely eliminate the
-	 * instructions used to compute the low part of the product.
-	 */
-	uint64		hi;
-
-	umul128(a, b, &hi);
-	return hi;
-}
-
-/*----
- *  On 32-bit platforms, compilers typically generate calls to library
- *  functions for 64-bit divisions, even if the divisor is a constant.
- *
- *  E.g.:
- *  https://bugs.llvm.org/show_bug.cgi?id=37932
- *  https://gcc.gnu.org/bugzilla/show_bug.cgi?id=17958
- *  https://gcc.gnu.org/bugzilla/show_bug.cgi?id=37443
- *
- *  The functions here perform division-by-constant using multiplications
- *  in the same way as 64-bit compilers would do.
- *
- *  NB:
- *  The multipliers and shift values are the ones generated by clang x64
- *  for expressions like x/5, x/10, etc.
- *----
- */
-
-static inline uint64
-div5(const uint64 x)
-{
-	return umulh(x, UINT64CONST(0xCCCCCCCCCCCCCCCD)) >> 2;
-}
-
-static inline uint64
-div10(const uint64 x)
-{
-	return umulh(x, UINT64CONST(0xCCCCCCCCCCCCCCCD)) >> 3;
-}
-
-static inline uint64
-div100(const uint64 x)
-{
-	return umulh(x >> 2, UINT64CONST(0x28F5C28F5C28F5C3)) >> 2;
-}
-
-static inline uint64
-div1e8(const uint64 x)
-{
-	return umulh(x, UINT64CONST(0xABCC77118461CEFD)) >> 26;
-}
-
-#else							/* RYU_32_BIT_PLATFORM */
-
-static inline uint64
-div5(const uint64 x)
-{
-	return x / 5;
-}
-
-static inline uint64
-div10(const uint64 x)
-{
-	return x / 10;
-}
-
-static inline uint64
-div100(const uint64 x)
-{
-	return x / 100;
-}
-
-static inline uint64
-div1e8(const uint64 x)
-{
-	return x / 100000000;
-}
-
-#endif							/* RYU_32_BIT_PLATFORM */
-
-#endif							/* RYU_D2S_INTRINSICS_H */
diff --git a/contrib/libs/libpq/src/common/digit_table.h b/contrib/libs/libpq/src/common/digit_table.h
deleted file mode 100644
index 483aa17142..0000000000
--- a/contrib/libs/libpq/src/common/digit_table.h
+++ /dev/null
@@ -1,21 +0,0 @@
-#ifndef RYU_DIGIT_TABLE_H
-#define RYU_DIGIT_TABLE_H
-
-/*
- * A table of all two-digit numbers. This is used to speed up decimal digit
- * generation by copying pairs of digits into the final output.
- */
-static const char DIGIT_TABLE[200] = {
-	'0', '0', '0', '1', '0', '2', '0', '3', '0', '4', '0', '5', '0', '6', '0', '7', '0', '8', '0', '9',
-	'1', '0', '1', '1', '1', '2', '1', '3', '1', '4', '1', '5', '1', '6', '1', '7', '1', '8', '1', '9',
-	'2', '0', '2', '1', '2', '2', '2', '3', '2', '4', '2', '5', '2', '6', '2', '7', '2', '8', '2', '9',
-	'3', '0', '3', '1', '3', '2', '3', '3', '3', '4', '3', '5', '3', '6', '3', '7', '3', '8', '3', '9',
-	'4', '0', '4', '1', '4', '2', '4', '3', '4', '4', '4', '5', '4', '6', '4', '7', '4', '8', '4', '9',
-	'5', '0', '5', '1', '5', '2', '5', '3', '5', '4', '5', '5', '5', '6', '5', '7', '5', '8', '5', '9',
-	'6', '0', '6', '1', '6', '2', '6', '3', '6', '4', '6', '5', '6', '6', '6', '7', '6', '8', '6', '9',
-	'7', '0', '7', '1', '7', '2', '7', '3', '7', '4', '7', '5', '7', '6', '7', '7', '7', '8', '7', '9',
-	'8', '0', '8', '1', '8', '2', '8', '3', '8', '4', '8', '5', '8', '6', '8', '7', '8', '8', '8', '9',
-	'9', '0', '9', '1', '9', '2', '9', '3', '9', '4', '9', '5', '9', '6', '9', '7', '9', '8', '9', '9'
-};
-
-#endif							/* RYU_DIGIT_TABLE_H */
diff --git a/contrib/libs/libpq/src/common/encnames.c b/contrib/libs/libpq/src/common/encnames.c
deleted file mode 100644
index 0412a8220e..0000000000
--- a/contrib/libs/libpq/src/common/encnames.c
+++ /dev/null
@@ -1,598 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * encnames.c
- *	  Encoding names and routines for working with them.
- *
- * Portions Copyright (c) 2001-2023, PostgreSQL Global Development Group
- *
- * IDENTIFICATION
- *	  src/common/encnames.c
- *
- *-------------------------------------------------------------------------
- */
-#include "c.h"
-
-#include <ctype.h>
-#include <unistd.h>
-
-#include "mb/pg_wchar.h"
-
-
-/* ----------
- * All encoding names, sorted:		 *** A L P H A B E T I C ***
- *
- * All names must be without irrelevant chars, search routines use
- * isalnum() chars only. It means ISO-8859-1, iso_8859-1 and Iso8859_1
- * are always converted to 'iso88591'. All must be lower case.
- *
- * The table doesn't contain 'cs' aliases (like csISOLatin1). It's needed?
- *
- * Karel Zak, Aug 2001
- * ----------
- */
-typedef struct pg_encname
-{
-	const char *name;
-	pg_enc		encoding;
-} pg_encname;
-
-static const pg_encname pg_encname_tbl[] =
-{
-	{
-		"abc", PG_WIN1258
-	},							/* alias for WIN1258 */
-	{
-		"alt", PG_WIN866
-	},							/* IBM866 */
-	{
-		"big5", PG_BIG5
-	},							/* Big5; Chinese for Taiwan multibyte set */
-	{
-		"euccn", PG_EUC_CN
-	},							/* EUC-CN; Extended Unix Code for simplified
-								 * Chinese */
-	{
-		"eucjis2004", PG_EUC_JIS_2004
-	},							/* EUC-JIS-2004; Extended UNIX Code fixed
-								 * Width for Japanese, standard JIS X 0213 */
-	{
-		"eucjp", PG_EUC_JP
-	},							/* EUC-JP; Extended UNIX Code fixed Width for
-								 * Japanese, standard OSF */
-	{
-		"euckr", PG_EUC_KR
-	},							/* EUC-KR; Extended Unix Code for Korean , KS
-								 * X 1001 standard */
-	{
-		"euctw", PG_EUC_TW
-	},							/* EUC-TW; Extended Unix Code for
-								 *
-								 * traditional Chinese */
-	{
-		"gb18030", PG_GB18030
-	},							/* GB18030;GB18030 */
-	{
-		"gbk", PG_GBK
-	},							/* GBK; Chinese Windows CodePage 936
-								 * simplified Chinese */
-	{
-		"iso88591", PG_LATIN1
-	},							/* ISO-8859-1; RFC1345,KXS2 */
-	{
-		"iso885910", PG_LATIN6
-	},							/* ISO-8859-10; RFC1345,KXS2 */
-	{
-		"iso885913", PG_LATIN7
-	},							/* ISO-8859-13; RFC1345,KXS2 */
-	{
-		"iso885914", PG_LATIN8
-	},							/* ISO-8859-14; RFC1345,KXS2 */
-	{
-		"iso885915", PG_LATIN9
-	},							/* ISO-8859-15; RFC1345,KXS2 */
-	{
-		"iso885916", PG_LATIN10
-	},							/* ISO-8859-16; RFC1345,KXS2 */
-	{
-		"iso88592", PG_LATIN2
-	},							/* ISO-8859-2; RFC1345,KXS2 */
-	{
-		"iso88593", PG_LATIN3
-	},							/* ISO-8859-3; RFC1345,KXS2 */
-	{
-		"iso88594", PG_LATIN4
-	},							/* ISO-8859-4; RFC1345,KXS2 */
-	{
-		"iso88595", PG_ISO_8859_5
-	},							/* ISO-8859-5; RFC1345,KXS2 */
-	{
-		"iso88596", PG_ISO_8859_6
-	},							/* ISO-8859-6; RFC1345,KXS2 */
-	{
-		"iso88597", PG_ISO_8859_7
-	},							/* ISO-8859-7; RFC1345,KXS2 */
-	{
-		"iso88598", PG_ISO_8859_8
-	},							/* ISO-8859-8; RFC1345,KXS2 */
-	{
-		"iso88599", PG_LATIN5
-	},							/* ISO-8859-9; RFC1345,KXS2 */
-	{
-		"johab", PG_JOHAB
-	},							/* JOHAB; Extended Unix Code for simplified
-								 * Chinese */
-	{
-		"koi8", PG_KOI8R
-	},							/* _dirty_ alias for KOI8-R (backward
-								 * compatibility) */
-	{
-		"koi8r", PG_KOI8R
-	},							/* KOI8-R; RFC1489 */
-	{
-		"koi8u", PG_KOI8U
-	},							/* KOI8-U; RFC2319 */
-	{
-		"latin1", PG_LATIN1
-	},							/* alias for ISO-8859-1 */
-	{
-		"latin10", PG_LATIN10
-	},							/* alias for ISO-8859-16 */
-	{
-		"latin2", PG_LATIN2
-	},							/* alias for ISO-8859-2 */
-	{
-		"latin3", PG_LATIN3
-	},							/* alias for ISO-8859-3 */
-	{
-		"latin4", PG_LATIN4
-	},							/* alias for ISO-8859-4 */
-	{
-		"latin5", PG_LATIN5
-	},							/* alias for ISO-8859-9 */
-	{
-		"latin6", PG_LATIN6
-	},							/* alias for ISO-8859-10 */
-	{
-		"latin7", PG_LATIN7
-	},							/* alias for ISO-8859-13 */
-	{
-		"latin8", PG_LATIN8
-	},							/* alias for ISO-8859-14 */
-	{
-		"latin9", PG_LATIN9
-	},							/* alias for ISO-8859-15 */
-	{
-		"mskanji", PG_SJIS
-	},							/* alias for Shift_JIS */
-	{
-		"muleinternal", PG_MULE_INTERNAL
-	},
-	{
-		"shiftjis", PG_SJIS
-	},							/* Shift_JIS; JIS X 0202-1991 */
-
-	{
-		"shiftjis2004", PG_SHIFT_JIS_2004
-	},							/* SHIFT-JIS-2004; Shift JIS for Japanese,
-								 * standard JIS X 0213 */
-	{
-		"sjis", PG_SJIS
-	},							/* alias for Shift_JIS */
-	{
-		"sqlascii", PG_SQL_ASCII
-	},
-	{
-		"tcvn", PG_WIN1258
-	},							/* alias for WIN1258 */
-	{
-		"tcvn5712", PG_WIN1258
-	},							/* alias for WIN1258 */
-	{
-		"uhc", PG_UHC
-	},							/* UHC; Korean Windows CodePage 949 */
-	{
-		"unicode", PG_UTF8
-	},							/* alias for UTF8 */
-	{
-		"utf8", PG_UTF8
-	},							/* alias for UTF8 */
-	{
-		"vscii", PG_WIN1258
-	},							/* alias for WIN1258 */
-	{
-		"win", PG_WIN1251
-	},							/* _dirty_ alias for windows-1251 (backward
-								 * compatibility) */
-	{
-		"win1250", PG_WIN1250
-	},							/* alias for Windows-1250 */
-	{
-		"win1251", PG_WIN1251
-	},							/* alias for Windows-1251 */
-	{
-		"win1252", PG_WIN1252
-	},							/* alias for Windows-1252 */
-	{
-		"win1253", PG_WIN1253
-	},							/* alias for Windows-1253 */
-	{
-		"win1254", PG_WIN1254
-	},							/* alias for Windows-1254 */
-	{
-		"win1255", PG_WIN1255
-	},							/* alias for Windows-1255 */
-	{
-		"win1256", PG_WIN1256
-	},							/* alias for Windows-1256 */
-	{
-		"win1257", PG_WIN1257
-	},							/* alias for Windows-1257 */
-	{
-		"win1258", PG_WIN1258
-	},							/* alias for Windows-1258 */
-	{
-		"win866", PG_WIN866
-	},							/* IBM866 */
-	{
-		"win874", PG_WIN874
-	},							/* alias for Windows-874 */
-	{
-		"win932", PG_SJIS
-	},							/* alias for Shift_JIS */
-	{
-		"win936", PG_GBK
-	},							/* alias for GBK */
-	{
-		"win949", PG_UHC
-	},							/* alias for UHC */
-	{
-		"win950", PG_BIG5
-	},							/* alias for BIG5 */
-	{
-		"windows1250", PG_WIN1250
-	},							/* Windows-1251; Microsoft */
-	{
-		"windows1251", PG_WIN1251
-	},							/* Windows-1251; Microsoft */
-	{
-		"windows1252", PG_WIN1252
-	},							/* Windows-1252; Microsoft */
-	{
-		"windows1253", PG_WIN1253
-	},							/* Windows-1253; Microsoft */
-	{
-		"windows1254", PG_WIN1254
-	},							/* Windows-1254; Microsoft */
-	{
-		"windows1255", PG_WIN1255
-	},							/* Windows-1255; Microsoft */
-	{
-		"windows1256", PG_WIN1256
-	},							/* Windows-1256; Microsoft */
-	{
-		"windows1257", PG_WIN1257
-	},							/* Windows-1257; Microsoft */
-	{
-		"windows1258", PG_WIN1258
-	},							/* Windows-1258; Microsoft */
-	{
-		"windows866", PG_WIN866
-	},							/* IBM866 */
-	{
-		"windows874", PG_WIN874
-	},							/* Windows-874; Microsoft */
-	{
-		"windows932", PG_SJIS
-	},							/* alias for Shift_JIS */
-	{
-		"windows936", PG_GBK
-	},							/* alias for GBK */
-	{
-		"windows949", PG_UHC
-	},							/* alias for UHC */
-	{
-		"windows950", PG_BIG5
-	}							/* alias for BIG5 */
-};
-
-/* ----------
- * These are "official" encoding names.
- * XXX must be sorted by the same order as enum pg_enc (in mb/pg_wchar.h)
- * ----------
- */
-#ifndef WIN32
-#define DEF_ENC2NAME(name, codepage) { #name, PG_##name }
-#else
-#define DEF_ENC2NAME(name, codepage) { #name, PG_##name, codepage }
-#endif
-
-const pg_enc2name pg_enc2name_tbl[] =
-{
-	DEF_ENC2NAME(SQL_ASCII, 0),
-	DEF_ENC2NAME(EUC_JP, 20932),
-	DEF_ENC2NAME(EUC_CN, 20936),
-	DEF_ENC2NAME(EUC_KR, 51949),
-	DEF_ENC2NAME(EUC_TW, 0),
-	DEF_ENC2NAME(EUC_JIS_2004, 20932),
-	DEF_ENC2NAME(UTF8, 65001),
-	DEF_ENC2NAME(MULE_INTERNAL, 0),
-	DEF_ENC2NAME(LATIN1, 28591),
-	DEF_ENC2NAME(LATIN2, 28592),
-	DEF_ENC2NAME(LATIN3, 28593),
-	DEF_ENC2NAME(LATIN4, 28594),
-	DEF_ENC2NAME(LATIN5, 28599),
-	DEF_ENC2NAME(LATIN6, 0),
-	DEF_ENC2NAME(LATIN7, 0),
-	DEF_ENC2NAME(LATIN8, 0),
-	DEF_ENC2NAME(LATIN9, 28605),
-	DEF_ENC2NAME(LATIN10, 0),
-	DEF_ENC2NAME(WIN1256, 1256),
-	DEF_ENC2NAME(WIN1258, 1258),
-	DEF_ENC2NAME(WIN866, 866),
-	DEF_ENC2NAME(WIN874, 874),
-	DEF_ENC2NAME(KOI8R, 20866),
-	DEF_ENC2NAME(WIN1251, 1251),
-	DEF_ENC2NAME(WIN1252, 1252),
-	DEF_ENC2NAME(ISO_8859_5, 28595),
-	DEF_ENC2NAME(ISO_8859_6, 28596),
-	DEF_ENC2NAME(ISO_8859_7, 28597),
-	DEF_ENC2NAME(ISO_8859_8, 28598),
-	DEF_ENC2NAME(WIN1250, 1250),
-	DEF_ENC2NAME(WIN1253, 1253),
-	DEF_ENC2NAME(WIN1254, 1254),
-	DEF_ENC2NAME(WIN1255, 1255),
-	DEF_ENC2NAME(WIN1257, 1257),
-	DEF_ENC2NAME(KOI8U, 21866),
-	DEF_ENC2NAME(SJIS, 932),
-	DEF_ENC2NAME(BIG5, 950),
-	DEF_ENC2NAME(GBK, 936),
-	DEF_ENC2NAME(UHC, 949),
-	DEF_ENC2NAME(GB18030, 54936),
-	DEF_ENC2NAME(JOHAB, 0),
-	DEF_ENC2NAME(SHIFT_JIS_2004, 932)
-};
-
-/* ----------
- * These are encoding names for gettext.
- *
- * This covers all encodings except MULE_INTERNAL, which is alien to gettext.
- * ----------
- */
-const pg_enc2gettext pg_enc2gettext_tbl[] =
-{
-	{PG_SQL_ASCII, "US-ASCII"},
-	{PG_UTF8, "UTF-8"},
-	{PG_LATIN1, "LATIN1"},
-	{PG_LATIN2, "LATIN2"},
-	{PG_LATIN3, "LATIN3"},
-	{PG_LATIN4, "LATIN4"},
-	{PG_ISO_8859_5, "ISO-8859-5"},
-	{PG_ISO_8859_6, "ISO_8859-6"},
-	{PG_ISO_8859_7, "ISO-8859-7"},
-	{PG_ISO_8859_8, "ISO-8859-8"},
-	{PG_LATIN5, "LATIN5"},
-	{PG_LATIN6, "LATIN6"},
-	{PG_LATIN7, "LATIN7"},
-	{PG_LATIN8, "LATIN8"},
-	{PG_LATIN9, "LATIN-9"},
-	{PG_LATIN10, "LATIN10"},
-	{PG_KOI8R, "KOI8-R"},
-	{PG_KOI8U, "KOI8-U"},
-	{PG_WIN1250, "CP1250"},
-	{PG_WIN1251, "CP1251"},
-	{PG_WIN1252, "CP1252"},
-	{PG_WIN1253, "CP1253"},
-	{PG_WIN1254, "CP1254"},
-	{PG_WIN1255, "CP1255"},
-	{PG_WIN1256, "CP1256"},
-	{PG_WIN1257, "CP1257"},
-	{PG_WIN1258, "CP1258"},
-	{PG_WIN866, "CP866"},
-	{PG_WIN874, "CP874"},
-	{PG_EUC_CN, "EUC-CN"},
-	{PG_EUC_JP, "EUC-JP"},
-	{PG_EUC_KR, "EUC-KR"},
-	{PG_EUC_TW, "EUC-TW"},
-	{PG_EUC_JIS_2004, "EUC-JP"},
-	{PG_SJIS, "SHIFT-JIS"},
-	{PG_BIG5, "BIG5"},
-	{PG_GBK, "GBK"},
-	{PG_UHC, "UHC"},
-	{PG_GB18030, "GB18030"},
-	{PG_JOHAB, "JOHAB"},
-	{PG_SHIFT_JIS_2004, "SHIFT_JISX0213"},
-	{0, NULL}
-};
-
-
-/*
- * Table of encoding names for ICU (currently covers backend encodings only)
- *
- * Reference: <https://ssl.icu-project.org/icu-bin/convexp>
- *
- * NULL entries are not supported by ICU, or their mapping is unclear.
- */
-static const char *const pg_enc2icu_tbl[] =
-{
-	NULL,						/* PG_SQL_ASCII */
-	"EUC-JP",					/* PG_EUC_JP */
-	"EUC-CN",					/* PG_EUC_CN */
-	"EUC-KR",					/* PG_EUC_KR */
-	"EUC-TW",					/* PG_EUC_TW */
-	NULL,						/* PG_EUC_JIS_2004 */
-	"UTF-8",					/* PG_UTF8 */
-	NULL,						/* PG_MULE_INTERNAL */
-	"ISO-8859-1",				/* PG_LATIN1 */
-	"ISO-8859-2",				/* PG_LATIN2 */
-	"ISO-8859-3",				/* PG_LATIN3 */
-	"ISO-8859-4",				/* PG_LATIN4 */
-	"ISO-8859-9",				/* PG_LATIN5 */
-	"ISO-8859-10",				/* PG_LATIN6 */
-	"ISO-8859-13",				/* PG_LATIN7 */
-	"ISO-8859-14",				/* PG_LATIN8 */
-	"ISO-8859-15",				/* PG_LATIN9 */
-	NULL,						/* PG_LATIN10 */
-	"CP1256",					/* PG_WIN1256 */
-	"CP1258",					/* PG_WIN1258 */
-	"CP866",					/* PG_WIN866 */
-	NULL,						/* PG_WIN874 */
-	"KOI8-R",					/* PG_KOI8R */
-	"CP1251",					/* PG_WIN1251 */
-	"CP1252",					/* PG_WIN1252 */
-	"ISO-8859-5",				/* PG_ISO_8859_5 */
-	"ISO-8859-6",				/* PG_ISO_8859_6 */
-	"ISO-8859-7",				/* PG_ISO_8859_7 */
-	"ISO-8859-8",				/* PG_ISO_8859_8 */
-	"CP1250",					/* PG_WIN1250 */
-	"CP1253",					/* PG_WIN1253 */
-	"CP1254",					/* PG_WIN1254 */
-	"CP1255",					/* PG_WIN1255 */
-	"CP1257",					/* PG_WIN1257 */
-	"KOI8-U",					/* PG_KOI8U */
-};
-
-StaticAssertDecl(lengthof(pg_enc2icu_tbl) == PG_ENCODING_BE_LAST + 1,
-				 "pg_enc2icu_tbl incomplete");
-
-
-/*
- * Is this encoding supported by ICU?
- */
-bool
-is_encoding_supported_by_icu(int encoding)
-{
-	if (!PG_VALID_BE_ENCODING(encoding))
-		return false;
-	return (pg_enc2icu_tbl[encoding] != NULL);
-}
-
-/*
- * Returns ICU's name for encoding, or NULL if not supported
- */
-const char *
-get_encoding_name_for_icu(int encoding)
-{
-	if (!PG_VALID_BE_ENCODING(encoding))
-		return NULL;
-	return pg_enc2icu_tbl[encoding];
-}
-
-
-/* ----------
- * Encoding checks, for error returns -1 else encoding id
- * ----------
- */
-int
-pg_valid_client_encoding(const char *name)
-{
-	int			enc;
-
-	if ((enc = pg_char_to_encoding(name)) < 0)
-		return -1;
-
-	if (!PG_VALID_FE_ENCODING(enc))
-		return -1;
-
-	return enc;
-}
-
-int
-pg_valid_server_encoding(const char *name)
-{
-	int			enc;
-
-	if ((enc = pg_char_to_encoding(name)) < 0)
-		return -1;
-
-	if (!PG_VALID_BE_ENCODING(enc))
-		return -1;
-
-	return enc;
-}
-
-int
-pg_valid_server_encoding_id(int encoding)
-{
-	return PG_VALID_BE_ENCODING(encoding);
-}
-
-/*
- * Remove irrelevant chars from encoding name, store at *newkey
- *
- * (Caller's responsibility to provide a large enough buffer)
- */
-static char *
-clean_encoding_name(const char *key, char *newkey)
-{
-	const char *p;
-	char	   *np;
-
-	for (p = key, np = newkey; *p != '\0'; p++)
-	{
-		if (isalnum((unsigned char) *p))
-		{
-			if (*p >= 'A' && *p <= 'Z')
-				*np++ = *p + 'a' - 'A';
-			else
-				*np++ = *p;
-		}
-	}
-	*np = '\0';
-	return newkey;
-}
-
-/*
- * Search encoding by encoding name
- *
- * Returns encoding ID, or -1 if not recognized
- */
-int
-pg_char_to_encoding(const char *name)
-{
-	unsigned int nel = lengthof(pg_encname_tbl);
-	const pg_encname *base = pg_encname_tbl,
-			   *last = base + nel - 1,
-			   *position;
-	int			result;
-	char		buff[NAMEDATALEN],
-			   *key;
-
-	if (name == NULL || *name == '\0')
-		return -1;
-
-	if (strlen(name) >= NAMEDATALEN)
-		return -1;				/* it's certainly not in the table */
-
-	key = clean_encoding_name(name, buff);
-
-	while (last >= base)
-	{
-		position = base + ((last - base) >> 1);
-		result = key[0] - position->name[0];
-
-		if (result == 0)
-		{
-			result = strcmp(key, position->name);
-			if (result == 0)
-				return position->encoding;
-		}
-		if (result < 0)
-			last = position - 1;
-		else
-			base = position + 1;
-	}
-	return -1;
-}
-
-const char *
-pg_encoding_to_char(int encoding)
-{
-	if (PG_VALID_ENCODING(encoding))
-	{
-		const pg_enc2name *p = &pg_enc2name_tbl[encoding];
-
-		Assert(encoding == p->encoding);
-		return p->name;
-	}
-	return "";
-}
diff --git a/contrib/libs/libpq/src/common/exec.c b/contrib/libs/libpq/src/common/exec.c
deleted file mode 100644
index d3a967baa4..0000000000
--- a/contrib/libs/libpq/src/common/exec.c
+++ /dev/null
@@ -1,719 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * exec.c
- *		Functions for finding and validating executable files
- *
- *
- * Portions Copyright (c) 1996-2023, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- *
- * IDENTIFICATION
- *	  src/common/exec.c
- *
- *-------------------------------------------------------------------------
- */
-
-/*
- * On macOS, "man realpath" avers:
- *    Defining _DARWIN_C_SOURCE or _DARWIN_BETTER_REALPATH before including
- *    stdlib.h will cause the provided implementation of realpath() to use
- *    F_GETPATH from fcntl(2) to discover the path.
- * This should be harmless everywhere else.
- */
-#define _DARWIN_BETTER_REALPATH
-
-#ifndef FRONTEND
-#include "postgres.h"
-#else
-#include "postgres_fe.h"
-#endif
-
-#include <signal.h>
-#include <sys/stat.h>
-#include <sys/wait.h>
-#include <unistd.h>
-
-#ifdef EXEC_BACKEND
-#if defined(HAVE_SYS_PERSONALITY_H)
-#include <sys/personality.h>
-#elif defined(HAVE_SYS_PROCCTL_H)
-#error #include <sys/procctl.h>
-#endif
-#endif
-
-/* Inhibit mingw CRT's auto-globbing of command line arguments */
-#if defined(WIN32) && !defined(_MSC_VER)
-extern int	_CRT_glob = 0;		/* 0 turns off globbing; 1 turns it on */
-#endif
-
-/*
- * Hacky solution to allow expressing both frontend and backend error reports
- * in one macro call.  First argument of log_error is an errcode() call of
- * some sort (ignored if FRONTEND); the rest are errmsg_internal() arguments,
- * i.e. message string and any parameters for it.
- *
- * Caller must provide the gettext wrapper around the message string, if
- * appropriate, so that it gets translated in the FRONTEND case; this
- * motivates using errmsg_internal() not errmsg().  We handle appending a
- * newline, if needed, inside the macro, so that there's only one translatable
- * string per call not two.
- */
-#ifndef FRONTEND
-#define log_error(errcodefn, ...) \
-	ereport(LOG, (errcodefn, errmsg_internal(__VA_ARGS__)))
-#else
-#define log_error(errcodefn, ...) \
-	(fprintf(stderr, __VA_ARGS__), fputc('\n', stderr))
-#endif
-
-static int	normalize_exec_path(char *path);
-static char *pg_realpath(const char *fname);
-
-#ifdef WIN32
-static BOOL GetTokenUser(HANDLE hToken, PTOKEN_USER *ppTokenUser);
-#endif
-
-/*
- * validate_exec -- validate "path" as an executable file
- *
- * returns 0 if the file is found and no error is encountered.
- *		  -1 if the regular file "path" does not exist or cannot be executed.
- *		  -2 if the file is otherwise valid but cannot be read.
- * in the failure cases, errno is set appropriately
- */
-int
-validate_exec(const char *path)
-{
-	struct stat buf;
-	int			is_r;
-	int			is_x;
-
-#ifdef WIN32
-	char		path_exe[MAXPGPATH + sizeof(".exe") - 1];
-
-	/* Win32 requires a .exe suffix for stat() */
-	if (strlen(path) < strlen(".exe") ||
-		pg_strcasecmp(path + strlen(path) - strlen(".exe"), ".exe") != 0)
-	{
-		strlcpy(path_exe, path, sizeof(path_exe) - 4);
-		strcat(path_exe, ".exe");
-		path = path_exe;
-	}
-#endif
-
-	/*
-	 * Ensure that the file exists and is a regular file.
-	 *
-	 * XXX if you have a broken system where stat() looks at the symlink
-	 * instead of the underlying file, you lose.
-	 */
-	if (stat(path, &buf) < 0)
-		return -1;
-
-	if (!S_ISREG(buf.st_mode))
-	{
-		/*
-		 * POSIX offers no errno code that's simply "not a regular file".  If
-		 * it's a directory we can use EISDIR.  Otherwise, it's most likely a
-		 * device special file, and EPERM (Operation not permitted) isn't too
-		 * horribly off base.
-		 */
-		errno = S_ISDIR(buf.st_mode) ? EISDIR : EPERM;
-		return -1;
-	}
-
-	/*
-	 * Ensure that the file is both executable and readable (required for
-	 * dynamic loading).
-	 */
-#ifndef WIN32
-	is_r = (access(path, R_OK) == 0);
-	is_x = (access(path, X_OK) == 0);
-	/* access() will set errno if it returns -1 */
-#else
-	is_r = buf.st_mode & S_IRUSR;
-	is_x = buf.st_mode & S_IXUSR;
-	errno = EACCES;				/* appropriate thing if we return nonzero */
-#endif
-	return is_x ? (is_r ? 0 : -2) : -1;
-}
-
-
-/*
- * find_my_exec -- find an absolute path to this program's executable
- *
- *	argv0 is the name passed on the command line
- *	retpath is the output area (must be of size MAXPGPATH)
- *	Returns 0 if OK, -1 if error.
- *
- * The reason we have to work so hard to find an absolute path is that
- * on some platforms we can't do dynamic loading unless we know the
- * executable's location.  Also, we need an absolute path not a relative
- * path because we may later change working directory.  Finally, we want
- * a true path not a symlink location, so that we can locate other files
- * that are part of our installation relative to the executable.
- */
-int
-find_my_exec(const char *argv0, char *retpath)
-{
-	char	   *path;
-
-	/*
-	 * If argv0 contains a separator, then PATH wasn't used.
-	 */
-	strlcpy(retpath, argv0, MAXPGPATH);
-	if (first_dir_separator(retpath) != NULL)
-	{
-		if (validate_exec(retpath) == 0)
-			return normalize_exec_path(retpath);
-
-		log_error(errcode(ERRCODE_WRONG_OBJECT_TYPE),
-				  _("invalid binary \"%s\": %m"), retpath);
-		return -1;
-	}
-
-#ifdef WIN32
-	/* Win32 checks the current directory first for names without slashes */
-	if (validate_exec(retpath) == 0)
-		return normalize_exec_path(retpath);
-#endif
-
-	/*
-	 * Since no explicit path was supplied, the user must have been relying on
-	 * PATH.  We'll search the same PATH.
-	 */
-	if ((path = getenv("PATH")) && *path)
-	{
-		char	   *startp = NULL,
-				   *endp = NULL;
-
-		do
-		{
-			if (!startp)
-				startp = path;
-			else
-				startp = endp + 1;
-
-			endp = first_path_var_separator(startp);
-			if (!endp)
-				endp = startp + strlen(startp); /* point to end */
-
-			strlcpy(retpath, startp, Min(endp - startp + 1, MAXPGPATH));
-
-			join_path_components(retpath, retpath, argv0);
-			canonicalize_path(retpath);
-
-			switch (validate_exec(retpath))
-			{
-				case 0:			/* found ok */
-					return normalize_exec_path(retpath);
-				case -1:		/* wasn't even a candidate, keep looking */
-					break;
-				case -2:		/* found but disqualified */
-					log_error(errcode(ERRCODE_WRONG_OBJECT_TYPE),
-							  _("could not read binary \"%s\": %m"),
-							  retpath);
-					break;
-			}
-		} while (*endp);
-	}
-
-	log_error(errcode(ERRCODE_UNDEFINED_FILE),
-			  _("could not find a \"%s\" to execute"), argv0);
-	return -1;
-}
-
-
-/*
- * normalize_exec_path - resolve symlinks and convert to absolute path
- *
- * Given a path that refers to an executable, chase through any symlinks
- * to find the real file location; then convert that to an absolute path.
- *
- * On success, replaces the contents of "path" with the absolute path.
- * ("path" is assumed to be of size MAXPGPATH.)
- * Returns 0 if OK, -1 if error.
- */
-static int
-normalize_exec_path(char *path)
-{
-	/*
-	 * We used to do a lot of work ourselves here, but now we just let
-	 * realpath(3) do all the heavy lifting.
-	 */
-	char	   *abspath = pg_realpath(path);
-
-	if (abspath == NULL)
-	{
-		log_error(errcode_for_file_access(),
-				  _("could not resolve path \"%s\" to absolute form: %m"),
-				  path);
-		return -1;
-	}
-	strlcpy(path, abspath, MAXPGPATH);
-	free(abspath);
-
-#ifdef WIN32
-	/* On Windows, be sure to convert '\' to '/' */
-	canonicalize_path(path);
-#endif
-
-	return 0;
-}
-
-
-/*
- * pg_realpath() - realpath(3) with POSIX.1-2008 semantics
- *
- * This is equivalent to realpath(fname, NULL), in that it returns a
- * malloc'd buffer containing the absolute path equivalent to fname.
- * On error, returns NULL with errno set.
- *
- * On Windows, what you get is spelled per platform conventions,
- * so you probably want to apply canonicalize_path() to the result.
- *
- * For now, this is needed only here so mark it static.  If you choose to
- * move it into its own file, move the _DARWIN_BETTER_REALPATH #define too!
- */
-static char *
-pg_realpath(const char *fname)
-{
-	char	   *path;
-
-#ifndef WIN32
-	path = realpath(fname, NULL);
-	if (path == NULL && errno == EINVAL)
-	{
-		/*
-		 * Cope with old-POSIX systems that require a user-provided buffer.
-		 * Assume MAXPGPATH is enough room on all such systems.
-		 */
-		char	   *buf = malloc(MAXPGPATH);
-
-		if (buf == NULL)
-			return NULL;		/* assume errno is set */
-		path = realpath(fname, buf);
-		if (path == NULL)		/* don't leak memory */
-		{
-			int			save_errno = errno;
-
-			free(buf);
-			errno = save_errno;
-		}
-	}
-#else							/* WIN32 */
-
-	/*
-	 * Microsoft is resolutely non-POSIX, but _fullpath() does the same thing.
-	 * The documentation claims it reports errors by setting errno, which is a
-	 * bit surprising for Microsoft, but we'll believe that until it's proven
-	 * wrong.  Clear errno first, though, so we can at least tell if a failure
-	 * occurs and doesn't set it.
-	 */
-	errno = 0;
-	path = _fullpath(NULL, fname, 0);
-#endif
-
-	return path;
-}
-
-
-/*
- * Find another program in our binary's directory,
- * then make sure it is the proper version.
- */
-int
-find_other_exec(const char *argv0, const char *target,
-				const char *versionstr, char *retpath)
-{
-	char		cmd[MAXPGPATH];
-	char		line[MAXPGPATH];
-
-	if (find_my_exec(argv0, retpath) < 0)
-		return -1;
-
-	/* Trim off program name and keep just directory */
-	*last_dir_separator(retpath) = '\0';
-	canonicalize_path(retpath);
-
-	/* Now append the other program's name */
-	snprintf(retpath + strlen(retpath), MAXPGPATH - strlen(retpath),
-			 "/%s%s", target, EXE);
-
-	if (validate_exec(retpath) != 0)
-		return -1;
-
-	snprintf(cmd, sizeof(cmd), "\"%s\" -V", retpath);
-
-	if (!pipe_read_line(cmd, line, sizeof(line)))
-		return -1;
-
-	if (strcmp(line, versionstr) != 0)
-		return -2;
-
-	return 0;
-}
-
-
-/*
- * Execute a command in a pipe and read the first line from it.
- */
-char *
-pipe_read_line(char *cmd, char *line, int maxsize)
-{
-	FILE	   *pgver;
-
-	fflush(NULL);
-
-	errno = 0;
-	if ((pgver = popen(cmd, "r")) == NULL)
-	{
-		perror("popen failure");
-		return NULL;
-	}
-
-	errno = 0;
-	if (fgets(line, maxsize, pgver) == NULL)
-	{
-		if (feof(pgver))
-			fprintf(stderr, "no data was returned by command \"%s\"\n", cmd);
-		else
-			perror("fgets failure");
-		pclose(pgver);			/* no error checking */
-		return NULL;
-	}
-
-	if (pclose_check(pgver))
-		return NULL;
-
-	return line;
-}
-
-
-/*
- * pclose() plus useful error reporting
- */
-int
-pclose_check(FILE *stream)
-{
-	int			exitstatus;
-	char	   *reason;
-
-	exitstatus = pclose(stream);
-
-	if (exitstatus == 0)
-		return 0;				/* all is well */
-
-	if (exitstatus == -1)
-	{
-		/* pclose() itself failed, and hopefully set errno */
-		log_error(errcode(ERRCODE_SYSTEM_ERROR),
-				  _("%s() failed: %m"), "pclose");
-	}
-	else
-	{
-		reason = wait_result_to_str(exitstatus);
-		log_error(errcode(ERRCODE_SYSTEM_ERROR),
-				  "%s", reason);
-		pfree(reason);
-	}
-	return exitstatus;
-}
-
-/*
- *	set_pglocale_pgservice
- *
- *	Set application-specific locale and service directory
- *
- *	This function takes the value of argv[0] rather than a full path.
- *
- * (You may be wondering why this is in exec.c.  It requires this module's
- * services and doesn't introduce any new dependencies, so this seems as
- * good as anyplace.)
- */
-void
-set_pglocale_pgservice(const char *argv0, const char *app)
-{
-	char		path[MAXPGPATH];
-	char		my_exec_path[MAXPGPATH];
-
-	/* don't set LC_ALL in the backend */
-	if (strcmp(app, PG_TEXTDOMAIN("postgres")) != 0)
-	{
-		setlocale(LC_ALL, "");
-
-		/*
-		 * One could make a case for reproducing here PostmasterMain()'s test
-		 * for whether the process is multithreaded.  Unlike the postmaster,
-		 * no frontend program calls sigprocmask() or otherwise provides for
-		 * mutual exclusion between signal handlers.  While frontends using
-		 * fork(), if multithreaded, are formally exposed to undefined
-		 * behavior, we have not witnessed a concrete bug.  Therefore,
-		 * complaining about multithreading here may be mere pedantry.
-		 */
-	}
-
-	if (find_my_exec(argv0, my_exec_path) < 0)
-		return;
-
-#ifdef ENABLE_NLS
-	get_locale_path(my_exec_path, path);
-	bindtextdomain(app, path);
-	textdomain(app);
-	/* set for libpq to use, but don't override existing setting */
-	setenv("PGLOCALEDIR", path, 0);
-#endif
-
-	if (getenv("PGSYSCONFDIR") == NULL)
-	{
-		get_etc_path(my_exec_path, path);
-		/* set for libpq to use */
-		setenv("PGSYSCONFDIR", path, 0);
-	}
-}
-
-#ifdef EXEC_BACKEND
-/*
- * For the benefit of PostgreSQL developers testing EXEC_BACKEND on Unix
- * systems (code paths normally exercised only on Windows), provide a way to
- * disable address space layout randomization, if we know how on this platform.
- * Otherwise, backends may fail to attach to shared memory at the fixed address
- * chosen by the postmaster.  (See also the macOS-specific hack in
- * sysv_shmem.c.)
- */
-int
-pg_disable_aslr(void)
-{
-#if defined(HAVE_SYS_PERSONALITY_H)
-	return personality(ADDR_NO_RANDOMIZE);
-#elif defined(HAVE_SYS_PROCCTL_H) && defined(PROC_ASLR_FORCE_DISABLE)
-	int			data = PROC_ASLR_FORCE_DISABLE;
-
-	return procctl(P_PID, 0, PROC_ASLR_CTL, &data);
-#else
-	errno = ENOSYS;
-	return -1;
-#endif
-}
-#endif
-
-#ifdef WIN32
-
-/*
- * AddUserToTokenDacl(HANDLE hToken)
- *
- * This function adds the current user account to the restricted
- * token used when we create a restricted process.
- *
- * This is required because of some security changes in Windows
- * that appeared in patches to XP/2K3 and in Vista/2008.
- *
- * On these machines, the Administrator account is not included in
- * the default DACL - you just get Administrators + System. For
- * regular users you get User + System. Because we strip Administrators
- * when we create the restricted token, we are left with only System
- * in the DACL which leads to access denied errors for later CreatePipe()
- * and CreateProcess() calls when running as Administrator.
- *
- * This function fixes this problem by modifying the DACL of the
- * token the process will use, and explicitly re-adding the current
- * user account.  This is still secure because the Administrator account
- * inherits its privileges from the Administrators group - it doesn't
- * have any of its own.
- */
-BOOL
-AddUserToTokenDacl(HANDLE hToken)
-{
-	int			i;
-	ACL_SIZE_INFORMATION asi;
-	ACCESS_ALLOWED_ACE *pace;
-	DWORD		dwNewAclSize;
-	DWORD		dwSize = 0;
-	DWORD		dwTokenInfoLength = 0;
-	PACL		pacl = NULL;
-	PTOKEN_USER pTokenUser = NULL;
-	TOKEN_DEFAULT_DACL tddNew;
-	TOKEN_DEFAULT_DACL *ptdd = NULL;
-	TOKEN_INFORMATION_CLASS tic = TokenDefaultDacl;
-	BOOL		ret = FALSE;
-
-	/* Figure out the buffer size for the DACL info */
-	if (!GetTokenInformation(hToken, tic, (LPVOID) NULL, dwTokenInfoLength, &dwSize))
-	{
-		if (GetLastError() == ERROR_INSUFFICIENT_BUFFER)
-		{
-			ptdd = (TOKEN_DEFAULT_DACL *) LocalAlloc(LPTR, dwSize);
-			if (ptdd == NULL)
-			{
-				log_error(errcode(ERRCODE_OUT_OF_MEMORY),
-						  _("out of memory"));
-				goto cleanup;
-			}
-
-			if (!GetTokenInformation(hToken, tic, (LPVOID) ptdd, dwSize, &dwSize))
-			{
-				log_error(errcode(ERRCODE_SYSTEM_ERROR),
-						  "could not get token information: error code %lu",
-						  GetLastError());
-				goto cleanup;
-			}
-		}
-		else
-		{
-			log_error(errcode(ERRCODE_SYSTEM_ERROR),
-					  "could not get token information buffer size: error code %lu",
-					  GetLastError());
-			goto cleanup;
-		}
-	}
-
-	/* Get the ACL info */
-	if (!GetAclInformation(ptdd->DefaultDacl, (LPVOID) &asi,
-						   (DWORD) sizeof(ACL_SIZE_INFORMATION),
-						   AclSizeInformation))
-	{
-		log_error(errcode(ERRCODE_SYSTEM_ERROR),
-				  "could not get ACL information: error code %lu",
-				  GetLastError());
-		goto cleanup;
-	}
-
-	/* Get the current user SID */
-	if (!GetTokenUser(hToken, &pTokenUser))
-		goto cleanup;			/* callee printed a message */
-
-	/* Figure out the size of the new ACL */
-	dwNewAclSize = asi.AclBytesInUse + sizeof(ACCESS_ALLOWED_ACE) +
-		GetLengthSid(pTokenUser->User.Sid) - sizeof(DWORD);
-
-	/* Allocate the ACL buffer & initialize it */
-	pacl = (PACL) LocalAlloc(LPTR, dwNewAclSize);
-	if (pacl == NULL)
-	{
-		log_error(errcode(ERRCODE_OUT_OF_MEMORY),
-				  _("out of memory"));
-		goto cleanup;
-	}
-
-	if (!InitializeAcl(pacl, dwNewAclSize, ACL_REVISION))
-	{
-		log_error(errcode(ERRCODE_SYSTEM_ERROR),
-				  "could not initialize ACL: error code %lu", GetLastError());
-		goto cleanup;
-	}
-
-	/* Loop through the existing ACEs, and build the new ACL */
-	for (i = 0; i < (int) asi.AceCount; i++)
-	{
-		if (!GetAce(ptdd->DefaultDacl, i, (LPVOID *) &pace))
-		{
-			log_error(errcode(ERRCODE_SYSTEM_ERROR),
-					  "could not get ACE: error code %lu", GetLastError());
-			goto cleanup;
-		}
-
-		if (!AddAce(pacl, ACL_REVISION, MAXDWORD, pace, ((PACE_HEADER) pace)->AceSize))
-		{
-			log_error(errcode(ERRCODE_SYSTEM_ERROR),
-					  "could not add ACE: error code %lu", GetLastError());
-			goto cleanup;
-		}
-	}
-
-	/* Add the new ACE for the current user */
-	if (!AddAccessAllowedAceEx(pacl, ACL_REVISION, OBJECT_INHERIT_ACE, GENERIC_ALL, pTokenUser->User.Sid))
-	{
-		log_error(errcode(ERRCODE_SYSTEM_ERROR),
-				  "could not add access allowed ACE: error code %lu",
-				  GetLastError());
-		goto cleanup;
-	}
-
-	/* Set the new DACL in the token */
-	tddNew.DefaultDacl = pacl;
-
-	if (!SetTokenInformation(hToken, tic, (LPVOID) &tddNew, dwNewAclSize))
-	{
-		log_error(errcode(ERRCODE_SYSTEM_ERROR),
-				  "could not set token information: error code %lu",
-				  GetLastError());
-		goto cleanup;
-	}
-
-	ret = TRUE;
-
-cleanup:
-	if (pTokenUser)
-		LocalFree((HLOCAL) pTokenUser);
-
-	if (pacl)
-		LocalFree((HLOCAL) pacl);
-
-	if (ptdd)
-		LocalFree((HLOCAL) ptdd);
-
-	return ret;
-}
-
-/*
- * GetTokenUser(HANDLE hToken, PTOKEN_USER *ppTokenUser)
- *
- * Get the users token information from a process token.
- *
- * The caller of this function is responsible for calling LocalFree() on the
- * returned TOKEN_USER memory.
- */
-static BOOL
-GetTokenUser(HANDLE hToken, PTOKEN_USER *ppTokenUser)
-{
-	DWORD		dwLength;
-
-	*ppTokenUser = NULL;
-
-	if (!GetTokenInformation(hToken,
-							 TokenUser,
-							 NULL,
-							 0,
-							 &dwLength))
-	{
-		if (GetLastError() == ERROR_INSUFFICIENT_BUFFER)
-		{
-			*ppTokenUser = (PTOKEN_USER) LocalAlloc(LPTR, dwLength);
-
-			if (*ppTokenUser == NULL)
-			{
-				log_error(errcode(ERRCODE_OUT_OF_MEMORY),
-						  _("out of memory"));
-				return FALSE;
-			}
-		}
-		else
-		{
-			log_error(errcode(ERRCODE_SYSTEM_ERROR),
-					  "could not get token information buffer size: error code %lu",
-					  GetLastError());
-			return FALSE;
-		}
-	}
-
-	if (!GetTokenInformation(hToken,
-							 TokenUser,
-							 *ppTokenUser,
-							 dwLength,
-							 &dwLength))
-	{
-		LocalFree(*ppTokenUser);
-		*ppTokenUser = NULL;
-
-		log_error(errcode(ERRCODE_SYSTEM_ERROR),
-				  "could not get token information: error code %lu",
-				  GetLastError());
-		return FALSE;
-	}
-
-	/* Memory in *ppTokenUser is LocalFree():d by the caller */
-	return TRUE;
-}
-
-#endif
diff --git a/contrib/libs/libpq/src/common/f2s.c b/contrib/libs/libpq/src/common/f2s.c
deleted file mode 100644
index ba08dcb6aa..0000000000
--- a/contrib/libs/libpq/src/common/f2s.c
+++ /dev/null
@@ -1,803 +0,0 @@
-/*---------------------------------------------------------------------------
- *
- * Ryu floating-point output for single precision.
- *
- * Portions Copyright (c) 2018-2023, PostgreSQL Global Development Group
- *
- * IDENTIFICATION
- *	  src/common/f2s.c
- *
- * This is a modification of code taken from github.com/ulfjack/ryu under the
- * terms of the Boost license (not the Apache license). The original copyright
- * notice follows:
- *
- * Copyright 2018 Ulf Adams
- *
- * The contents of this file may be used under the terms of the Apache
- * License, Version 2.0.
- *
- *     (See accompanying file LICENSE-Apache or copy at
- *      http://www.apache.org/licenses/LICENSE-2.0)
- *
- * Alternatively, the contents of this file may be used under the terms of the
- * Boost Software License, Version 1.0.
- *
- *     (See accompanying file LICENSE-Boost or copy at
- *      https://www.boost.org/LICENSE_1_0.txt)
- *
- * Unless required by applicable law or agreed to in writing, this software is
- * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.
- *
- *---------------------------------------------------------------------------
- */
-
-#ifndef FRONTEND
-#include "postgres.h"
-#else
-#include "postgres_fe.h"
-#endif
-
-#include "common/shortest_dec.h"
-#include "digit_table.h"
-#include "ryu_common.h"
-
-#define FLOAT_MANTISSA_BITS 23
-#define FLOAT_EXPONENT_BITS 8
-#define FLOAT_BIAS 127
-
-/*
- * This table is generated (by the upstream) by PrintFloatLookupTable,
- * and modified (by us) to add UINT64CONST.
- */
-#define FLOAT_POW5_INV_BITCOUNT 59
-static const uint64 FLOAT_POW5_INV_SPLIT[31] = {
-	UINT64CONST(576460752303423489), UINT64CONST(461168601842738791), UINT64CONST(368934881474191033), UINT64CONST(295147905179352826),
-	UINT64CONST(472236648286964522), UINT64CONST(377789318629571618), UINT64CONST(302231454903657294), UINT64CONST(483570327845851670),
-	UINT64CONST(386856262276681336), UINT64CONST(309485009821345069), UINT64CONST(495176015714152110), UINT64CONST(396140812571321688),
-	UINT64CONST(316912650057057351), UINT64CONST(507060240091291761), UINT64CONST(405648192073033409), UINT64CONST(324518553658426727),
-	UINT64CONST(519229685853482763), UINT64CONST(415383748682786211), UINT64CONST(332306998946228969), UINT64CONST(531691198313966350),
-	UINT64CONST(425352958651173080), UINT64CONST(340282366920938464), UINT64CONST(544451787073501542), UINT64CONST(435561429658801234),
-	UINT64CONST(348449143727040987), UINT64CONST(557518629963265579), UINT64CONST(446014903970612463), UINT64CONST(356811923176489971),
-	UINT64CONST(570899077082383953), UINT64CONST(456719261665907162), UINT64CONST(365375409332725730)
-};
-#define FLOAT_POW5_BITCOUNT 61
-static const uint64 FLOAT_POW5_SPLIT[47] = {
-	UINT64CONST(1152921504606846976), UINT64CONST(1441151880758558720), UINT64CONST(1801439850948198400), UINT64CONST(2251799813685248000),
-	UINT64CONST(1407374883553280000), UINT64CONST(1759218604441600000), UINT64CONST(2199023255552000000), UINT64CONST(1374389534720000000),
-	UINT64CONST(1717986918400000000), UINT64CONST(2147483648000000000), UINT64CONST(1342177280000000000), UINT64CONST(1677721600000000000),
-	UINT64CONST(2097152000000000000), UINT64CONST(1310720000000000000), UINT64CONST(1638400000000000000), UINT64CONST(2048000000000000000),
-	UINT64CONST(1280000000000000000), UINT64CONST(1600000000000000000), UINT64CONST(2000000000000000000), UINT64CONST(1250000000000000000),
-	UINT64CONST(1562500000000000000), UINT64CONST(1953125000000000000), UINT64CONST(1220703125000000000), UINT64CONST(1525878906250000000),
-	UINT64CONST(1907348632812500000), UINT64CONST(1192092895507812500), UINT64CONST(1490116119384765625), UINT64CONST(1862645149230957031),
-	UINT64CONST(1164153218269348144), UINT64CONST(1455191522836685180), UINT64CONST(1818989403545856475), UINT64CONST(2273736754432320594),
-	UINT64CONST(1421085471520200371), UINT64CONST(1776356839400250464), UINT64CONST(2220446049250313080), UINT64CONST(1387778780781445675),
-	UINT64CONST(1734723475976807094), UINT64CONST(2168404344971008868), UINT64CONST(1355252715606880542), UINT64CONST(1694065894508600678),
-	UINT64CONST(2117582368135750847), UINT64CONST(1323488980084844279), UINT64CONST(1654361225106055349), UINT64CONST(2067951531382569187),
-	UINT64CONST(1292469707114105741), UINT64CONST(1615587133892632177), UINT64CONST(2019483917365790221)
-};
-
-static inline uint32
-pow5Factor(uint32 value)
-{
-	uint32		count = 0;
-
-	for (;;)
-	{
-		Assert(value != 0);
-		const uint32 q = value / 5;
-		const uint32 r = value % 5;
-
-		if (r != 0)
-			break;
-
-		value = q;
-		++count;
-	}
-	return count;
-}
-
-/*  Returns true if value is divisible by 5^p. */
-static inline bool
-multipleOfPowerOf5(const uint32 value, const uint32 p)
-{
-	return pow5Factor(value) >= p;
-}
-
-/*  Returns true if value is divisible by 2^p. */
-static inline bool
-multipleOfPowerOf2(const uint32 value, const uint32 p)
-{
-	/* return __builtin_ctz(value) >= p; */
-	return (value & ((1u << p) - 1)) == 0;
-}
-
-/*
- * It seems to be slightly faster to avoid uint128_t here, although the
- * generated code for uint128_t looks slightly nicer.
- */
-static inline uint32
-mulShift(const uint32 m, const uint64 factor, const int32 shift)
-{
-	/*
-	 * The casts here help MSVC to avoid calls to the __allmul library
-	 * function.
-	 */
-	const uint32 factorLo = (uint32) (factor);
-	const uint32 factorHi = (uint32) (factor >> 32);
-	const uint64 bits0 = (uint64) m * factorLo;
-	const uint64 bits1 = (uint64) m * factorHi;
-
-	Assert(shift > 32);
-
-#ifdef RYU_32_BIT_PLATFORM
-
-	/*
-	 * On 32-bit platforms we can avoid a 64-bit shift-right since we only
-	 * need the upper 32 bits of the result and the shift value is > 32.
-	 */
-	const uint32 bits0Hi = (uint32) (bits0 >> 32);
-	uint32		bits1Lo = (uint32) (bits1);
-	uint32		bits1Hi = (uint32) (bits1 >> 32);
-
-	bits1Lo += bits0Hi;
-	bits1Hi += (bits1Lo < bits0Hi);
-
-	const int32 s = shift - 32;
-
-	return (bits1Hi << (32 - s)) | (bits1Lo >> s);
-
-#else							/* RYU_32_BIT_PLATFORM */
-
-	const uint64 sum = (bits0 >> 32) + bits1;
-	const uint64 shiftedSum = sum >> (shift - 32);
-
-	Assert(shiftedSum <= PG_UINT32_MAX);
-	return (uint32) shiftedSum;
-
-#endif							/* RYU_32_BIT_PLATFORM */
-}
-
-static inline uint32
-mulPow5InvDivPow2(const uint32 m, const uint32 q, const int32 j)
-{
-	return mulShift(m, FLOAT_POW5_INV_SPLIT[q], j);
-}
-
-static inline uint32
-mulPow5divPow2(const uint32 m, const uint32 i, const int32 j)
-{
-	return mulShift(m, FLOAT_POW5_SPLIT[i], j);
-}
-
-static inline uint32
-decimalLength(const uint32 v)
-{
-	/* Function precondition: v is not a 10-digit number. */
-	/* (9 digits are sufficient for round-tripping.) */
-	Assert(v < 1000000000);
-	if (v >= 100000000)
-	{
-		return 9;
-	}
-	if (v >= 10000000)
-	{
-		return 8;
-	}
-	if (v >= 1000000)
-	{
-		return 7;
-	}
-	if (v >= 100000)
-	{
-		return 6;
-	}
-	if (v >= 10000)
-	{
-		return 5;
-	}
-	if (v >= 1000)
-	{
-		return 4;
-	}
-	if (v >= 100)
-	{
-		return 3;
-	}
-	if (v >= 10)
-	{
-		return 2;
-	}
-	return 1;
-}
-
-/*  A floating decimal representing m * 10^e. */
-typedef struct floating_decimal_32
-{
-	uint32		mantissa;
-	int32		exponent;
-} floating_decimal_32;
-
-static inline floating_decimal_32
-f2d(const uint32 ieeeMantissa, const uint32 ieeeExponent)
-{
-	int32		e2;
-	uint32		m2;
-
-	if (ieeeExponent == 0)
-	{
-		/* We subtract 2 so that the bounds computation has 2 additional bits. */
-		e2 = 1 - FLOAT_BIAS - FLOAT_MANTISSA_BITS - 2;
-		m2 = ieeeMantissa;
-	}
-	else
-	{
-		e2 = ieeeExponent - FLOAT_BIAS - FLOAT_MANTISSA_BITS - 2;
-		m2 = (1u << FLOAT_MANTISSA_BITS) | ieeeMantissa;
-	}
-
-#if STRICTLY_SHORTEST
-	const bool	even = (m2 & 1) == 0;
-	const bool	acceptBounds = even;
-#else
-	const bool	acceptBounds = false;
-#endif
-
-	/* Step 2: Determine the interval of legal decimal representations. */
-	const uint32 mv = 4 * m2;
-	const uint32 mp = 4 * m2 + 2;
-
-	/* Implicit bool -> int conversion. True is 1, false is 0. */
-	const uint32 mmShift = ieeeMantissa != 0 || ieeeExponent <= 1;
-	const uint32 mm = 4 * m2 - 1 - mmShift;
-
-	/* Step 3: Convert to a decimal power base using 64-bit arithmetic. */
-	uint32		vr,
-				vp,
-				vm;
-	int32		e10;
-	bool		vmIsTrailingZeros = false;
-	bool		vrIsTrailingZeros = false;
-	uint8		lastRemovedDigit = 0;
-
-	if (e2 >= 0)
-	{
-		const uint32 q = log10Pow2(e2);
-
-		e10 = q;
-
-		const int32 k = FLOAT_POW5_INV_BITCOUNT + pow5bits(q) - 1;
-		const int32 i = -e2 + q + k;
-
-		vr = mulPow5InvDivPow2(mv, q, i);
-		vp = mulPow5InvDivPow2(mp, q, i);
-		vm = mulPow5InvDivPow2(mm, q, i);
-
-		if (q != 0 && (vp - 1) / 10 <= vm / 10)
-		{
-			/*
-			 * We need to know one removed digit even if we are not going to
-			 * loop below. We could use q = X - 1 above, except that would
-			 * require 33 bits for the result, and we've found that 32-bit
-			 * arithmetic is faster even on 64-bit machines.
-			 */
-			const int32 l = FLOAT_POW5_INV_BITCOUNT + pow5bits(q - 1) - 1;
-
-			lastRemovedDigit = (uint8) (mulPow5InvDivPow2(mv, q - 1, -e2 + q - 1 + l) % 10);
-		}
-		if (q <= 9)
-		{
-			/*
-			 * The largest power of 5 that fits in 24 bits is 5^10, but q <= 9
-			 * seems to be safe as well.
-			 *
-			 * Only one of mp, mv, and mm can be a multiple of 5, if any.
-			 */
-			if (mv % 5 == 0)
-			{
-				vrIsTrailingZeros = multipleOfPowerOf5(mv, q);
-			}
-			else if (acceptBounds)
-			{
-				vmIsTrailingZeros = multipleOfPowerOf5(mm, q);
-			}
-			else
-			{
-				vp -= multipleOfPowerOf5(mp, q);
-			}
-		}
-	}
-	else
-	{
-		const uint32 q = log10Pow5(-e2);
-
-		e10 = q + e2;
-
-		const int32 i = -e2 - q;
-		const int32 k = pow5bits(i) - FLOAT_POW5_BITCOUNT;
-		int32		j = q - k;
-
-		vr = mulPow5divPow2(mv, i, j);
-		vp = mulPow5divPow2(mp, i, j);
-		vm = mulPow5divPow2(mm, i, j);
-
-		if (q != 0 && (vp - 1) / 10 <= vm / 10)
-		{
-			j = q - 1 - (pow5bits(i + 1) - FLOAT_POW5_BITCOUNT);
-			lastRemovedDigit = (uint8) (mulPow5divPow2(mv, i + 1, j) % 10);
-		}
-		if (q <= 1)
-		{
-			/*
-			 * {vr,vp,vm} is trailing zeros if {mv,mp,mm} has at least q
-			 * trailing 0 bits.
-			 */
-			/* mv = 4 * m2, so it always has at least two trailing 0 bits. */
-			vrIsTrailingZeros = true;
-			if (acceptBounds)
-			{
-				/*
-				 * mm = mv - 1 - mmShift, so it has 1 trailing 0 bit iff
-				 * mmShift == 1.
-				 */
-				vmIsTrailingZeros = mmShift == 1;
-			}
-			else
-			{
-				/*
-				 * mp = mv + 2, so it always has at least one trailing 0 bit.
-				 */
-				--vp;
-			}
-		}
-		else if (q < 31)
-		{
-			/* TODO(ulfjack):Use a tighter bound here. */
-			vrIsTrailingZeros = multipleOfPowerOf2(mv, q - 1);
-		}
-	}
-
-	/*
-	 * Step 4: Find the shortest decimal representation in the interval of
-	 * legal representations.
-	 */
-	uint32		removed = 0;
-	uint32		output;
-
-	if (vmIsTrailingZeros || vrIsTrailingZeros)
-	{
-		/* General case, which happens rarely (~4.0%). */
-		while (vp / 10 > vm / 10)
-		{
-			vmIsTrailingZeros &= vm - (vm / 10) * 10 == 0;
-			vrIsTrailingZeros &= lastRemovedDigit == 0;
-			lastRemovedDigit = (uint8) (vr % 10);
-			vr /= 10;
-			vp /= 10;
-			vm /= 10;
-			++removed;
-		}
-		if (vmIsTrailingZeros)
-		{
-			while (vm % 10 == 0)
-			{
-				vrIsTrailingZeros &= lastRemovedDigit == 0;
-				lastRemovedDigit = (uint8) (vr % 10);
-				vr /= 10;
-				vp /= 10;
-				vm /= 10;
-				++removed;
-			}
-		}
-
-		if (vrIsTrailingZeros && lastRemovedDigit == 5 && vr % 2 == 0)
-		{
-			/* Round even if the exact number is .....50..0. */
-			lastRemovedDigit = 4;
-		}
-
-		/*
-		 * We need to take vr + 1 if vr is outside bounds or we need to round
-		 * up.
-		 */
-		output = vr + ((vr == vm && (!acceptBounds || !vmIsTrailingZeros)) || lastRemovedDigit >= 5);
-	}
-	else
-	{
-		/*
-		 * Specialized for the common case (~96.0%). Percentages below are
-		 * relative to this.
-		 *
-		 * Loop iterations below (approximately): 0: 13.6%, 1: 70.7%, 2:
-		 * 14.1%, 3: 1.39%, 4: 0.14%, 5+: 0.01%
-		 */
-		while (vp / 10 > vm / 10)
-		{
-			lastRemovedDigit = (uint8) (vr % 10);
-			vr /= 10;
-			vp /= 10;
-			vm /= 10;
-			++removed;
-		}
-
-		/*
-		 * We need to take vr + 1 if vr is outside bounds or we need to round
-		 * up.
-		 */
-		output = vr + (vr == vm || lastRemovedDigit >= 5);
-	}
-
-	const int32 exp = e10 + removed;
-
-	floating_decimal_32 fd;
-
-	fd.exponent = exp;
-	fd.mantissa = output;
-	return fd;
-}
-
-static inline int
-to_chars_f(const floating_decimal_32 v, const uint32 olength, char *const result)
-{
-	/* Step 5: Print the decimal representation. */
-	int			index = 0;
-
-	uint32		output = v.mantissa;
-	int32		exp = v.exponent;
-
-	/*----
-	 * On entry, mantissa * 10^exp is the result to be output.
-	 * Caller has already done the - sign if needed.
-	 *
-	 * We want to insert the point somewhere depending on the output length
-	 * and exponent, which might mean adding zeros:
-	 *
-	 *            exp  | format
-	 *            1+   |  ddddddddd000000
-	 *            0    |  ddddddddd
-	 *  -1 .. -len+1   |  dddddddd.d to d.ddddddddd
-	 *  -len ...       |  0.ddddddddd to 0.000dddddd
-	 */
-	uint32		i = 0;
-	int32		nexp = exp + olength;
-
-	if (nexp <= 0)
-	{
-		/* -nexp is number of 0s to add after '.' */
-		Assert(nexp >= -3);
-		/* 0.000ddddd */
-		index = 2 - nexp;
-		/* copy 8 bytes rather than 5 to let compiler optimize */
-		memcpy(result, "0.000000", 8);
-	}
-	else if (exp < 0)
-	{
-		/*
-		 * dddd.dddd; leave space at the start and move the '.' in after
-		 */
-		index = 1;
-	}
-	else
-	{
-		/*
-		 * We can save some code later by pre-filling with zeros. We know that
-		 * there can be no more than 6 output digits in this form, otherwise
-		 * we would not choose fixed-point output. memset 8 rather than 6
-		 * bytes to let the compiler optimize it.
-		 */
-		Assert(exp < 6 && exp + olength <= 6);
-		memset(result, '0', 8);
-	}
-
-	while (output >= 10000)
-	{
-		const uint32 c = output - 10000 * (output / 10000);
-		const uint32 c0 = (c % 100) << 1;
-		const uint32 c1 = (c / 100) << 1;
-
-		output /= 10000;
-
-		memcpy(result + index + olength - i - 2, DIGIT_TABLE + c0, 2);
-		memcpy(result + index + olength - i - 4, DIGIT_TABLE + c1, 2);
-		i += 4;
-	}
-	if (output >= 100)
-	{
-		const uint32 c = (output % 100) << 1;
-
-		output /= 100;
-		memcpy(result + index + olength - i - 2, DIGIT_TABLE + c, 2);
-		i += 2;
-	}
-	if (output >= 10)
-	{
-		const uint32 c = output << 1;
-
-		memcpy(result + index + olength - i - 2, DIGIT_TABLE + c, 2);
-	}
-	else
-	{
-		result[index] = (char) ('0' + output);
-	}
-
-	if (index == 1)
-	{
-		/*
-		 * nexp is 1..6 here, representing the number of digits before the
-		 * point. A value of 7+ is not possible because we switch to
-		 * scientific notation when the display exponent reaches 6.
-		 */
-		Assert(nexp < 7);
-		/* gcc only seems to want to optimize memmove for small 2^n */
-		if (nexp & 4)
-		{
-			memmove(result + index - 1, result + index, 4);
-			index += 4;
-		}
-		if (nexp & 2)
-		{
-			memmove(result + index - 1, result + index, 2);
-			index += 2;
-		}
-		if (nexp & 1)
-		{
-			result[index - 1] = result[index];
-		}
-		result[nexp] = '.';
-		index = olength + 1;
-	}
-	else if (exp >= 0)
-	{
-		/* we supplied the trailing zeros earlier, now just set the length. */
-		index = olength + exp;
-	}
-	else
-	{
-		index = olength + (2 - nexp);
-	}
-
-	return index;
-}
-
-static inline int
-to_chars(const floating_decimal_32 v, const bool sign, char *const result)
-{
-	/* Step 5: Print the decimal representation. */
-	int			index = 0;
-
-	uint32		output = v.mantissa;
-	uint32		olength = decimalLength(output);
-	int32		exp = v.exponent + olength - 1;
-
-	if (sign)
-		result[index++] = '-';
-
-	/*
-	 * The thresholds for fixed-point output are chosen to match printf
-	 * defaults. Beware that both the code of to_chars_f and the value of
-	 * FLOAT_SHORTEST_DECIMAL_LEN are sensitive to these thresholds.
-	 */
-	if (exp >= -4 && exp < 6)
-		return to_chars_f(v, olength, result + index) + sign;
-
-	/*
-	 * If v.exponent is exactly 0, we might have reached here via the small
-	 * integer fast path, in which case v.mantissa might contain trailing
-	 * (decimal) zeros. For scientific notation we need to move these zeros
-	 * into the exponent. (For fixed point this doesn't matter, which is why
-	 * we do this here rather than above.)
-	 *
-	 * Since we already calculated the display exponent (exp) above based on
-	 * the old decimal length, that value does not change here. Instead, we
-	 * just reduce the display length for each digit removed.
-	 *
-	 * If we didn't get here via the fast path, the raw exponent will not
-	 * usually be 0, and there will be no trailing zeros, so we pay no more
-	 * than one div10/multiply extra cost. We claw back half of that by
-	 * checking for divisibility by 2 before dividing by 10.
-	 */
-	if (v.exponent == 0)
-	{
-		while ((output & 1) == 0)
-		{
-			const uint32 q = output / 10;
-			const uint32 r = output - 10 * q;
-
-			if (r != 0)
-				break;
-			output = q;
-			--olength;
-		}
-	}
-
-	/*----
-	 * Print the decimal digits.
-	 * The following code is equivalent to:
-	 *
-	 * for (uint32 i = 0; i < olength - 1; ++i) {
-	 *   const uint32 c = output % 10; output /= 10;
-	 *   result[index + olength - i] = (char) ('0' + c);
-	 * }
-	 * result[index] = '0' + output % 10;
-	 */
-	uint32		i = 0;
-
-	while (output >= 10000)
-	{
-		const uint32 c = output - 10000 * (output / 10000);
-		const uint32 c0 = (c % 100) << 1;
-		const uint32 c1 = (c / 100) << 1;
-
-		output /= 10000;
-
-		memcpy(result + index + olength - i - 1, DIGIT_TABLE + c0, 2);
-		memcpy(result + index + olength - i - 3, DIGIT_TABLE + c1, 2);
-		i += 4;
-	}
-	if (output >= 100)
-	{
-		const uint32 c = (output % 100) << 1;
-
-		output /= 100;
-		memcpy(result + index + olength - i - 1, DIGIT_TABLE + c, 2);
-		i += 2;
-	}
-	if (output >= 10)
-	{
-		const uint32 c = output << 1;
-
-		/*
-		 * We can't use memcpy here: the decimal dot goes between these two
-		 * digits.
-		 */
-		result[index + olength - i] = DIGIT_TABLE[c + 1];
-		result[index] = DIGIT_TABLE[c];
-	}
-	else
-	{
-		result[index] = (char) ('0' + output);
-	}
-
-	/* Print decimal point if needed. */
-	if (olength > 1)
-	{
-		result[index + 1] = '.';
-		index += olength + 1;
-	}
-	else
-	{
-		++index;
-	}
-
-	/* Print the exponent. */
-	result[index++] = 'e';
-	if (exp < 0)
-	{
-		result[index++] = '-';
-		exp = -exp;
-	}
-	else
-		result[index++] = '+';
-
-	memcpy(result + index, DIGIT_TABLE + 2 * exp, 2);
-	index += 2;
-
-	return index;
-}
-
-static inline bool
-f2d_small_int(const uint32 ieeeMantissa,
-			  const uint32 ieeeExponent,
-			  floating_decimal_32 *v)
-{
-	const int32 e2 = (int32) ieeeExponent - FLOAT_BIAS - FLOAT_MANTISSA_BITS;
-
-	/*
-	 * Avoid using multiple "return false;" here since it tends to provoke the
-	 * compiler into inlining multiple copies of f2d, which is undesirable.
-	 */
-
-	if (e2 >= -FLOAT_MANTISSA_BITS && e2 <= 0)
-	{
-		/*----
-		 * Since 2^23 <= m2 < 2^24 and 0 <= -e2 <= 23:
-		 *   1 <= f = m2 / 2^-e2 < 2^24.
-		 *
-		 * Test if the lower -e2 bits of the significand are 0, i.e. whether
-		 * the fraction is 0. We can use ieeeMantissa here, since the implied
-		 * 1 bit can never be tested by this; the implied 1 can only be part
-		 * of a fraction if e2 < -FLOAT_MANTISSA_BITS which we already
-		 * checked. (e.g. 0.5 gives ieeeMantissa == 0 and e2 == -24)
-		 */
-		const uint32 mask = (1U << -e2) - 1;
-		const uint32 fraction = ieeeMantissa & mask;
-
-		if (fraction == 0)
-		{
-			/*----
-			 * f is an integer in the range [1, 2^24).
-			 * Note: mantissa might contain trailing (decimal) 0's.
-			 * Note: since 2^24 < 10^9, there is no need to adjust
-			 * decimalLength().
-			 */
-			const uint32 m2 = (1U << FLOAT_MANTISSA_BITS) | ieeeMantissa;
-
-			v->mantissa = m2 >> -e2;
-			v->exponent = 0;
-			return true;
-		}
-	}
-
-	return false;
-}
-
-/*
- * Store the shortest decimal representation of the given float as an
- * UNTERMINATED string in the caller's supplied buffer (which must be at least
- * FLOAT_SHORTEST_DECIMAL_LEN-1 bytes long).
- *
- * Returns the number of bytes stored.
- */
-int
-float_to_shortest_decimal_bufn(float f, char *result)
-{
-	/*
-	 * Step 1: Decode the floating-point number, and unify normalized and
-	 * subnormal cases.
-	 */
-	const uint32 bits = float_to_bits(f);
-
-	/* Decode bits into sign, mantissa, and exponent. */
-	const bool	ieeeSign = ((bits >> (FLOAT_MANTISSA_BITS + FLOAT_EXPONENT_BITS)) & 1) != 0;
-	const uint32 ieeeMantissa = bits & ((1u << FLOAT_MANTISSA_BITS) - 1);
-	const uint32 ieeeExponent = (bits >> FLOAT_MANTISSA_BITS) & ((1u << FLOAT_EXPONENT_BITS) - 1);
-
-	/* Case distinction; exit early for the easy cases. */
-	if (ieeeExponent == ((1u << FLOAT_EXPONENT_BITS) - 1u) || (ieeeExponent == 0 && ieeeMantissa == 0))
-	{
-		return copy_special_str(result, ieeeSign, (ieeeExponent != 0), (ieeeMantissa != 0));
-	}
-
-	floating_decimal_32 v;
-	const bool	isSmallInt = f2d_small_int(ieeeMantissa, ieeeExponent, &v);
-
-	if (!isSmallInt)
-	{
-		v = f2d(ieeeMantissa, ieeeExponent);
-	}
-
-	return to_chars(v, ieeeSign, result);
-}
-
-/*
- * Store the shortest decimal representation of the given float as a
- * null-terminated string in the caller's supplied buffer (which must be at
- * least FLOAT_SHORTEST_DECIMAL_LEN bytes long).
- *
- * Returns the string length.
- */
-int
-float_to_shortest_decimal_buf(float f, char *result)
-{
-	const int	index = float_to_shortest_decimal_bufn(f, result);
-
-	/* Terminate the string. */
-	Assert(index < FLOAT_SHORTEST_DECIMAL_LEN);
-	result[index] = '\0';
-	return index;
-}
-
-/*
- * Return the shortest decimal representation as a null-terminated palloc'd
- * string (outside the backend, uses malloc() instead).
- *
- * Caller is responsible for freeing the result.
- */
-char *
-float_to_shortest_decimal(float f)
-{
-	char	   *const result = (char *) palloc(FLOAT_SHORTEST_DECIMAL_LEN);
-
-	float_to_shortest_decimal_buf(f, result);
-	return result;
-}
diff --git a/contrib/libs/libpq/src/common/fe_memutils.c b/contrib/libs/libpq/src/common/fe_memutils.c
deleted file mode 100644
index 3bad81eafc..0000000000
--- a/contrib/libs/libpq/src/common/fe_memutils.c
+++ /dev/null
@@ -1,175 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * fe_memutils.c
- *	  memory management support for frontend code
- *
- * Portions Copyright (c) 1996-2023, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- *
- * IDENTIFICATION
- *	  src/common/fe_memutils.c
- *
- *-------------------------------------------------------------------------
- */
-
-#ifndef FRONTEND
-#error "This file is not expected to be compiled for backend code"
-#endif
-
-#include "postgres_fe.h"
-
-static inline void *
-pg_malloc_internal(size_t size, int flags)
-{
-	void	   *tmp;
-
-	/* Avoid unportable behavior of malloc(0) */
-	if (size == 0)
-		size = 1;
-	tmp = malloc(size);
-	if (tmp == NULL)
-	{
-		if ((flags & MCXT_ALLOC_NO_OOM) == 0)
-		{
-			fprintf(stderr, _("out of memory\n"));
-			exit(EXIT_FAILURE);
-		}
-		return NULL;
-	}
-
-	if ((flags & MCXT_ALLOC_ZERO) != 0)
-		MemSet(tmp, 0, size);
-	return tmp;
-}
-
-void *
-pg_malloc(size_t size)
-{
-	return pg_malloc_internal(size, 0);
-}
-
-void *
-pg_malloc0(size_t size)
-{
-	return pg_malloc_internal(size, MCXT_ALLOC_ZERO);
-}
-
-void *
-pg_malloc_extended(size_t size, int flags)
-{
-	return pg_malloc_internal(size, flags);
-}
-
-void *
-pg_realloc(void *ptr, size_t size)
-{
-	void	   *tmp;
-
-	/* Avoid unportable behavior of realloc(NULL, 0) */
-	if (ptr == NULL && size == 0)
-		size = 1;
-	tmp = realloc(ptr, size);
-	if (!tmp)
-	{
-		fprintf(stderr, _("out of memory\n"));
-		exit(EXIT_FAILURE);
-	}
-	return tmp;
-}
-
-/*
- * "Safe" wrapper around strdup().
- */
-char *
-pg_strdup(const char *in)
-{
-	char	   *tmp;
-
-	if (!in)
-	{
-		fprintf(stderr,
-				_("cannot duplicate null pointer (internal error)\n"));
-		exit(EXIT_FAILURE);
-	}
-	tmp = strdup(in);
-	if (!tmp)
-	{
-		fprintf(stderr, _("out of memory\n"));
-		exit(EXIT_FAILURE);
-	}
-	return tmp;
-}
-
-void
-pg_free(void *ptr)
-{
-	free(ptr);
-}
-
-/*
- * Frontend emulation of backend memory management functions.  Useful for
- * programs that compile backend files.
- */
-void *
-palloc(Size size)
-{
-	return pg_malloc_internal(size, 0);
-}
-
-void *
-palloc0(Size size)
-{
-	return pg_malloc_internal(size, MCXT_ALLOC_ZERO);
-}
-
-void *
-palloc_extended(Size size, int flags)
-{
-	return pg_malloc_internal(size, flags);
-}
-
-void
-pfree(void *pointer)
-{
-	pg_free(pointer);
-}
-
-char *
-pstrdup(const char *in)
-{
-	return pg_strdup(in);
-}
-
-char *
-pnstrdup(const char *in, Size size)
-{
-	char	   *tmp;
-	int			len;
-
-	if (!in)
-	{
-		fprintf(stderr,
-				_("cannot duplicate null pointer (internal error)\n"));
-		exit(EXIT_FAILURE);
-	}
-
-	len = strnlen(in, size);
-	tmp = malloc(len + 1);
-	if (tmp == NULL)
-	{
-		fprintf(stderr, _("out of memory\n"));
-		exit(EXIT_FAILURE);
-	}
-
-	memcpy(tmp, in, len);
-	tmp[len] = '\0';
-
-	return tmp;
-}
-
-void *
-repalloc(void *pointer, Size size)
-{
-	return pg_realloc(pointer, size);
-}
diff --git a/contrib/libs/libpq/src/common/file_perm.c b/contrib/libs/libpq/src/common/file_perm.c
deleted file mode 100644
index 60f88d2caf..0000000000
--- a/contrib/libs/libpq/src/common/file_perm.c
+++ /dev/null
@@ -1,91 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * File and directory permission routines
- *
- *
- * Portions Copyright (c) 1996-2023, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- * src/common/file_perm.c
- *
- *-------------------------------------------------------------------------
- */
-#include "c.h"
-
-#include "common/file_perm.h"
-
-/* Modes for creating directories and files in the data directory */
-int			pg_dir_create_mode = PG_DIR_MODE_OWNER;
-int			pg_file_create_mode = PG_FILE_MODE_OWNER;
-
-/*
- * Mode mask to pass to umask().  This is more of a preventative measure since
- * all file/directory creates should be performed using the create modes above.
- */
-int			pg_mode_mask = PG_MODE_MASK_OWNER;
-
-/*
- * Set create modes and mask to use when writing to PGDATA based on the data
- * directory mode passed.  If group read/execute are present in the mode, then
- * create modes and mask will be relaxed to allow group read/execute on all
- * newly created files and directories.
- */
-void
-SetDataDirectoryCreatePerm(int dataDirMode)
-{
-	/* If the data directory mode has group access */
-	if ((PG_DIR_MODE_GROUP & dataDirMode) == PG_DIR_MODE_GROUP)
-	{
-		pg_dir_create_mode = PG_DIR_MODE_GROUP;
-		pg_file_create_mode = PG_FILE_MODE_GROUP;
-		pg_mode_mask = PG_MODE_MASK_GROUP;
-	}
-	/* Else use default permissions */
-	else
-	{
-		pg_dir_create_mode = PG_DIR_MODE_OWNER;
-		pg_file_create_mode = PG_FILE_MODE_OWNER;
-		pg_mode_mask = PG_MODE_MASK_OWNER;
-	}
-}
-
-#ifdef FRONTEND
-
-/*
- * Get the create modes and mask to use when writing to PGDATA by examining the
- * mode of the PGDATA directory and calling SetDataDirectoryCreatePerm().
- *
- * Errors are not handled here and should be reported by the application when
- * false is returned.
- *
- * Suppress when on Windows, because there may not be proper support for Unix-y
- * file permissions.
- */
-bool
-GetDataDirectoryCreatePerm(const char *dataDir)
-{
-#if !defined(WIN32) && !defined(__CYGWIN__)
-	struct stat statBuf;
-
-	/*
-	 * If an error occurs getting the mode then return false.  The caller is
-	 * responsible for generating an error, if appropriate, indicating that we
-	 * were unable to access the data directory.
-	 */
-	if (stat(dataDir, &statBuf) == -1)
-		return false;
-
-	/* Set permissions */
-	SetDataDirectoryCreatePerm(statBuf.st_mode);
-	return true;
-#else							/* !defined(WIN32) && !defined(__CYGWIN__) */
-	/*
-	 * On Windows, we don't have anything to do here since they don't have
-	 * Unix-y permissions.
-	 */
-	return true;
-#endif
-}
-
-
-#endif							/* FRONTEND */
diff --git a/contrib/libs/libpq/src/common/file_utils.c b/contrib/libs/libpq/src/common/file_utils.c
deleted file mode 100644
index 74833c4acb..0000000000
--- a/contrib/libs/libpq/src/common/file_utils.c
+++ /dev/null
@@ -1,582 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * File-processing utility routines.
- *
- * Assorted utility functions to work on files.
- *
- *
- * Portions Copyright (c) 1996-2023, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- * src/common/file_utils.c
- *
- *-------------------------------------------------------------------------
- */
-
-#ifndef FRONTEND
-#include "postgres.h"
-#else
-#include "postgres_fe.h"
-#endif
-
-#include <dirent.h>
-#include <fcntl.h>
-#include <sys/stat.h>
-#include <unistd.h>
-
-#include "common/file_utils.h"
-#ifdef FRONTEND
-#include "common/logging.h"
-#endif
-#include "port/pg_iovec.h"
-
-#ifdef FRONTEND
-
-/* Define PG_FLUSH_DATA_WORKS if we have an implementation for pg_flush_data */
-#if defined(HAVE_SYNC_FILE_RANGE)
-#define PG_FLUSH_DATA_WORKS 1
-#elif defined(USE_POSIX_FADVISE) && defined(POSIX_FADV_DONTNEED)
-#define PG_FLUSH_DATA_WORKS 1
-#endif
-
-/*
- * pg_xlog has been renamed to pg_wal in version 10.
- */
-#define MINIMUM_VERSION_FOR_PG_WAL	100000
-
-#ifdef PG_FLUSH_DATA_WORKS
-static int	pre_sync_fname(const char *fname, bool isdir);
-#endif
-static void walkdir(const char *path,
-					int (*action) (const char *fname, bool isdir),
-					bool process_symlinks);
-
-/*
- * Issue fsync recursively on PGDATA and all its contents.
- *
- * We fsync regular files and directories wherever they are, but we follow
- * symlinks only for pg_wal (or pg_xlog) and immediately under pg_tblspc.
- * Other symlinks are presumed to point at files we're not responsible for
- * fsyncing, and might not have privileges to write at all.
- *
- * serverVersion indicates the version of the server to be fsync'd.
- */
-void
-fsync_pgdata(const char *pg_data,
-			 int serverVersion)
-{
-	bool		xlog_is_symlink;
-	char		pg_wal[MAXPGPATH];
-	char		pg_tblspc[MAXPGPATH];
-
-	/* handle renaming of pg_xlog to pg_wal in post-10 clusters */
-	snprintf(pg_wal, MAXPGPATH, "%s/%s", pg_data,
-			 serverVersion < MINIMUM_VERSION_FOR_PG_WAL ? "pg_xlog" : "pg_wal");
-	snprintf(pg_tblspc, MAXPGPATH, "%s/pg_tblspc", pg_data);
-
-	/*
-	 * If pg_wal is a symlink, we'll need to recurse into it separately,
-	 * because the first walkdir below will ignore it.
-	 */
-	xlog_is_symlink = false;
-
-	{
-		struct stat st;
-
-		if (lstat(pg_wal, &st) < 0)
-			pg_log_error("could not stat file \"%s\": %m", pg_wal);
-		else if (S_ISLNK(st.st_mode))
-			xlog_is_symlink = true;
-	}
-
-	/*
-	 * If possible, hint to the kernel that we're soon going to fsync the data
-	 * directory and its contents.
-	 */
-#ifdef PG_FLUSH_DATA_WORKS
-	walkdir(pg_data, pre_sync_fname, false);
-	if (xlog_is_symlink)
-		walkdir(pg_wal, pre_sync_fname, false);
-	walkdir(pg_tblspc, pre_sync_fname, true);
-#endif
-
-	/*
-	 * Now we do the fsync()s in the same order.
-	 *
-	 * The main call ignores symlinks, so in addition to specially processing
-	 * pg_wal if it's a symlink, pg_tblspc has to be visited separately with
-	 * process_symlinks = true.  Note that if there are any plain directories
-	 * in pg_tblspc, they'll get fsync'd twice.  That's not an expected case
-	 * so we don't worry about optimizing it.
-	 */
-	walkdir(pg_data, fsync_fname, false);
-	if (xlog_is_symlink)
-		walkdir(pg_wal, fsync_fname, false);
-	walkdir(pg_tblspc, fsync_fname, true);
-}
-
-/*
- * Issue fsync recursively on the given directory and all its contents.
- *
- * This is a convenient wrapper on top of walkdir().
- */
-void
-fsync_dir_recurse(const char *dir)
-{
-	/*
-	 * If possible, hint to the kernel that we're soon going to fsync the data
-	 * directory and its contents.
-	 */
-#ifdef PG_FLUSH_DATA_WORKS
-	walkdir(dir, pre_sync_fname, false);
-#endif
-
-	walkdir(dir, fsync_fname, false);
-}
-
-/*
- * walkdir: recursively walk a directory, applying the action to each
- * regular file and directory (including the named directory itself).
- *
- * If process_symlinks is true, the action and recursion are also applied
- * to regular files and directories that are pointed to by symlinks in the
- * given directory; otherwise symlinks are ignored.  Symlinks are always
- * ignored in subdirectories, ie we intentionally don't pass down the
- * process_symlinks flag to recursive calls.
- *
- * Errors are reported but not considered fatal.
- *
- * See also walkdir in fd.c, which is a backend version of this logic.
- */
-static void
-walkdir(const char *path,
-		int (*action) (const char *fname, bool isdir),
-		bool process_symlinks)
-{
-	DIR		   *dir;
-	struct dirent *de;
-
-	dir = opendir(path);
-	if (dir == NULL)
-	{
-		pg_log_error("could not open directory \"%s\": %m", path);
-		return;
-	}
-
-	while (errno = 0, (de = readdir(dir)) != NULL)
-	{
-		char		subpath[MAXPGPATH * 2];
-
-		if (strcmp(de->d_name, ".") == 0 ||
-			strcmp(de->d_name, "..") == 0)
-			continue;
-
-		snprintf(subpath, sizeof(subpath), "%s/%s", path, de->d_name);
-
-		switch (get_dirent_type(subpath, de, process_symlinks, PG_LOG_ERROR))
-		{
-			case PGFILETYPE_REG:
-				(*action) (subpath, false);
-				break;
-			case PGFILETYPE_DIR:
-				walkdir(subpath, action, false);
-				break;
-			default:
-
-				/*
-				 * Errors are already reported directly by get_dirent_type(),
-				 * and any remaining symlinks and unknown file types are
-				 * ignored.
-				 */
-				break;
-		}
-	}
-
-	if (errno)
-		pg_log_error("could not read directory \"%s\": %m", path);
-
-	(void) closedir(dir);
-
-	/*
-	 * It's important to fsync the destination directory itself as individual
-	 * file fsyncs don't guarantee that the directory entry for the file is
-	 * synced.  Recent versions of ext4 have made the window much wider but
-	 * it's been an issue for ext3 and other filesystems in the past.
-	 */
-	(*action) (path, true);
-}
-
-/*
- * Hint to the OS that it should get ready to fsync() this file.
- *
- * Ignores errors trying to open unreadable files, and reports other errors
- * non-fatally.
- */
-#ifdef PG_FLUSH_DATA_WORKS
-
-static int
-pre_sync_fname(const char *fname, bool isdir)
-{
-	int			fd;
-
-	fd = open(fname, O_RDONLY | PG_BINARY, 0);
-
-	if (fd < 0)
-	{
-		if (errno == EACCES || (isdir && errno == EISDIR))
-			return 0;
-		pg_log_error("could not open file \"%s\": %m", fname);
-		return -1;
-	}
-
-	/*
-	 * We do what pg_flush_data() would do in the backend: prefer to use
-	 * sync_file_range, but fall back to posix_fadvise.  We ignore errors
-	 * because this is only a hint.
-	 */
-#if defined(HAVE_SYNC_FILE_RANGE)
-	(void) sync_file_range(fd, 0, 0, SYNC_FILE_RANGE_WRITE);
-#elif defined(USE_POSIX_FADVISE) && defined(POSIX_FADV_DONTNEED)
-	(void) posix_fadvise(fd, 0, 0, POSIX_FADV_DONTNEED);
-#else
-#error PG_FLUSH_DATA_WORKS should not have been defined
-#endif
-
-	(void) close(fd);
-	return 0;
-}
-
-#endif							/* PG_FLUSH_DATA_WORKS */
-
-/*
- * fsync_fname -- Try to fsync a file or directory
- *
- * Ignores errors trying to open unreadable files, or trying to fsync
- * directories on systems where that isn't allowed/required.  All other errors
- * are fatal.
- */
-int
-fsync_fname(const char *fname, bool isdir)
-{
-	int			fd;
-	int			flags;
-	int			returncode;
-
-	/*
-	 * Some OSs require directories to be opened read-only whereas other
-	 * systems don't allow us to fsync files opened read-only; so we need both
-	 * cases here.  Using O_RDWR will cause us to fail to fsync files that are
-	 * not writable by our userid, but we assume that's OK.
-	 */
-	flags = PG_BINARY;
-	if (!isdir)
-		flags |= O_RDWR;
-	else
-		flags |= O_RDONLY;
-
-	/*
-	 * Open the file, silently ignoring errors about unreadable files (or
-	 * unsupported operations, e.g. opening a directory under Windows), and
-	 * logging others.
-	 */
-	fd = open(fname, flags, 0);
-	if (fd < 0)
-	{
-		if (errno == EACCES || (isdir && errno == EISDIR))
-			return 0;
-		pg_log_error("could not open file \"%s\": %m", fname);
-		return -1;
-	}
-
-	returncode = fsync(fd);
-
-	/*
-	 * Some OSes don't allow us to fsync directories at all, so we can ignore
-	 * those errors. Anything else needs to be reported.
-	 */
-	if (returncode != 0 && !(isdir && (errno == EBADF || errno == EINVAL)))
-	{
-		pg_log_error("could not fsync file \"%s\": %m", fname);
-		(void) close(fd);
-		exit(EXIT_FAILURE);
-	}
-
-	(void) close(fd);
-	return 0;
-}
-
-/*
- * fsync_parent_path -- fsync the parent path of a file or directory
- *
- * This is aimed at making file operations persistent on disk in case of
- * an OS crash or power failure.
- */
-int
-fsync_parent_path(const char *fname)
-{
-	char		parentpath[MAXPGPATH];
-
-	strlcpy(parentpath, fname, MAXPGPATH);
-	get_parent_directory(parentpath);
-
-	/*
-	 * get_parent_directory() returns an empty string if the input argument is
-	 * just a file name (see comments in path.c), so handle that as being the
-	 * current directory.
-	 */
-	if (strlen(parentpath) == 0)
-		strlcpy(parentpath, ".", MAXPGPATH);
-
-	if (fsync_fname(parentpath, true) != 0)
-		return -1;
-
-	return 0;
-}
-
-/*
- * durable_rename -- rename(2) wrapper, issuing fsyncs required for durability
- *
- * Wrapper around rename, similar to the backend version.
- */
-int
-durable_rename(const char *oldfile, const char *newfile)
-{
-	int			fd;
-
-	/*
-	 * First fsync the old and target path (if it exists), to ensure that they
-	 * are properly persistent on disk. Syncing the target file is not
-	 * strictly necessary, but it makes it easier to reason about crashes;
-	 * because it's then guaranteed that either source or target file exists
-	 * after a crash.
-	 */
-	if (fsync_fname(oldfile, false) != 0)
-		return -1;
-
-	fd = open(newfile, PG_BINARY | O_RDWR, 0);
-	if (fd < 0)
-	{
-		if (errno != ENOENT)
-		{
-			pg_log_error("could not open file \"%s\": %m", newfile);
-			return -1;
-		}
-	}
-	else
-	{
-		if (fsync(fd) != 0)
-		{
-			pg_log_error("could not fsync file \"%s\": %m", newfile);
-			close(fd);
-			exit(EXIT_FAILURE);
-		}
-		close(fd);
-	}
-
-	/* Time to do the real deal... */
-	if (rename(oldfile, newfile) != 0)
-	{
-		pg_log_error("could not rename file \"%s\" to \"%s\": %m",
-					 oldfile, newfile);
-		return -1;
-	}
-
-	/*
-	 * To guarantee renaming the file is persistent, fsync the file with its
-	 * new name, and its containing directory.
-	 */
-	if (fsync_fname(newfile, false) != 0)
-		return -1;
-
-	if (fsync_parent_path(newfile) != 0)
-		return -1;
-
-	return 0;
-}
-
-#endif							/* FRONTEND */
-
-/*
- * Return the type of a directory entry.
- *
- * In frontend code, elevel should be a level from logging.h; in backend code
- * it should be a level from elog.h.
- */
-PGFileType
-get_dirent_type(const char *path,
-				const struct dirent *de,
-				bool look_through_symlinks,
-				int elevel)
-{
-	PGFileType	result;
-
-	/*
-	 * Some systems tell us the type directly in the dirent struct, but that's
-	 * a BSD and Linux extension not required by POSIX.  Even when the
-	 * interface is present, sometimes the type is unknown, depending on the
-	 * filesystem.
-	 */
-#if defined(DT_REG) && defined(DT_DIR) && defined(DT_LNK)
-	if (de->d_type == DT_REG)
-		result = PGFILETYPE_REG;
-	else if (de->d_type == DT_DIR)
-		result = PGFILETYPE_DIR;
-	else if (de->d_type == DT_LNK && !look_through_symlinks)
-		result = PGFILETYPE_LNK;
-	else
-		result = PGFILETYPE_UNKNOWN;
-#else
-	result = PGFILETYPE_UNKNOWN;
-#endif
-
-	if (result == PGFILETYPE_UNKNOWN)
-	{
-		struct stat fst;
-		int			sret;
-
-
-		if (look_through_symlinks)
-			sret = stat(path, &fst);
-		else
-			sret = lstat(path, &fst);
-
-		if (sret < 0)
-		{
-			result = PGFILETYPE_ERROR;
-#ifdef FRONTEND
-			pg_log_generic(elevel, PG_LOG_PRIMARY, "could not stat file \"%s\": %m", path);
-#else
-			ereport(elevel,
-					(errcode_for_file_access(),
-					 errmsg("could not stat file \"%s\": %m", path)));
-#endif
-		}
-		else if (S_ISREG(fst.st_mode))
-			result = PGFILETYPE_REG;
-		else if (S_ISDIR(fst.st_mode))
-			result = PGFILETYPE_DIR;
-		else if (S_ISLNK(fst.st_mode))
-			result = PGFILETYPE_LNK;
-	}
-
-	return result;
-}
-
-/*
- * pg_pwritev_with_retry
- *
- * Convenience wrapper for pg_pwritev() that retries on partial write.  If an
- * error is returned, it is unspecified how much has been written.
- */
-ssize_t
-pg_pwritev_with_retry(int fd, const struct iovec *iov, int iovcnt, off_t offset)
-{
-	struct iovec iov_copy[PG_IOV_MAX];
-	ssize_t		sum = 0;
-	ssize_t		part;
-
-	/* We'd better have space to make a copy, in case we need to retry. */
-	if (iovcnt > PG_IOV_MAX)
-	{
-		errno = EINVAL;
-		return -1;
-	}
-
-	for (;;)
-	{
-		/* Write as much as we can. */
-		part = pg_pwritev(fd, iov, iovcnt, offset);
-		if (part < 0)
-			return -1;
-
-#ifdef SIMULATE_SHORT_WRITE
-		part = Min(part, 4096);
-#endif
-
-		/* Count our progress. */
-		sum += part;
-		offset += part;
-
-		/* Step over iovecs that are done. */
-		while (iovcnt > 0 && iov->iov_len <= part)
-		{
-			part -= iov->iov_len;
-			++iov;
-			--iovcnt;
-		}
-
-		/* Are they all done? */
-		if (iovcnt == 0)
-		{
-			/* We don't expect the kernel to write more than requested. */
-			Assert(part == 0);
-			break;
-		}
-
-		/*
-		 * Move whatever's left to the front of our mutable copy and adjust
-		 * the leading iovec.
-		 */
-		Assert(iovcnt > 0);
-		memmove(iov_copy, iov, sizeof(*iov) * iovcnt);
-		Assert(iov->iov_len > part);
-		iov_copy[0].iov_base = (char *) iov_copy[0].iov_base + part;
-		iov_copy[0].iov_len -= part;
-		iov = iov_copy;
-	}
-
-	return sum;
-}
-
-/*
- * pg_pwrite_zeros
- *
- * Writes zeros to file worth "size" bytes at "offset" (from the start of the
- * file), using vectored I/O.
- *
- * Returns the total amount of data written.  On failure, a negative value
- * is returned with errno set.
- */
-ssize_t
-pg_pwrite_zeros(int fd, size_t size, off_t offset)
-{
-	static const PGIOAlignedBlock zbuffer = {{0}};	/* worth BLCKSZ */
-	void	   *zerobuf_addr = unconstify(PGIOAlignedBlock *, &zbuffer)->data;
-	struct iovec iov[PG_IOV_MAX];
-	size_t		remaining_size = size;
-	ssize_t		total_written = 0;
-
-	/* Loop, writing as many blocks as we can for each system call. */
-	while (remaining_size > 0)
-	{
-		int			iovcnt = 0;
-		ssize_t		written;
-
-		for (; iovcnt < PG_IOV_MAX && remaining_size > 0; iovcnt++)
-		{
-			size_t		this_iov_size;
-
-			iov[iovcnt].iov_base = zerobuf_addr;
-
-			if (remaining_size < BLCKSZ)
-				this_iov_size = remaining_size;
-			else
-				this_iov_size = BLCKSZ;
-
-			iov[iovcnt].iov_len = this_iov_size;
-			remaining_size -= this_iov_size;
-		}
-
-		written = pg_pwritev_with_retry(fd, iov, iovcnt, offset);
-
-		if (written < 0)
-			return written;
-
-		offset += written;
-		total_written += written;
-	}
-
-	Assert(total_written == size);
-
-	return total_written;
-}
diff --git a/contrib/libs/libpq/src/common/hashfn.c b/contrib/libs/libpq/src/common/hashfn.c
deleted file mode 100644
index 2490607eea..0000000000
--- a/contrib/libs/libpq/src/common/hashfn.c
+++ /dev/null
@@ -1,692 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * hashfn.c
- *		Generic hashing functions, and hash functions for use in dynahash.c
- *		hashtables
- *
- *
- * Portions Copyright (c) 1996-2023, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- *
- * IDENTIFICATION
- *	  src/common/hashfn.c
- *
- * NOTES
- *	  It is expected that every bit of a hash function's 32-bit result is
- *	  as random as every other; failure to ensure this is likely to lead
- *	  to poor performance of hash tables.  In most cases a hash
- *	  function should use hash_bytes() or its variant hash_bytes_uint32(),
- *	  or the wrappers hash_any() and hash_uint32 defined in hashfn.h.
- *
- *-------------------------------------------------------------------------
- */
-#include "postgres.h"
-
-#include "common/hashfn.h"
-#include "port/pg_bitutils.h"
-
-
-/*
- * This hash function was written by Bob Jenkins
- * (bob_jenkins@burtleburtle.net), and superficially adapted
- * for PostgreSQL by Neil Conway. For more information on this
- * hash function, see http://burtleburtle.net/bob/hash/doobs.html,
- * or Bob's article in Dr. Dobb's Journal, Sept. 1997.
- *
- * In the current code, we have adopted Bob's 2006 update of his hash
- * function to fetch the data a word at a time when it is suitably aligned.
- * This makes for a useful speedup, at the cost of having to maintain
- * four code paths (aligned vs unaligned, and little-endian vs big-endian).
- * It also uses two separate mixing functions mix() and final(), instead
- * of a slower multi-purpose function.
- */
-
-/* Get a bit mask of the bits set in non-uint32 aligned addresses */
-#define UINT32_ALIGN_MASK (sizeof(uint32) - 1)
-
-#define rot(x,k) pg_rotate_left32(x, k)
-
-/*----------
- * mix -- mix 3 32-bit values reversibly.
- *
- * This is reversible, so any information in (a,b,c) before mix() is
- * still in (a,b,c) after mix().
- *
- * If four pairs of (a,b,c) inputs are run through mix(), or through
- * mix() in reverse, there are at least 32 bits of the output that
- * are sometimes the same for one pair and different for another pair.
- * This was tested for:
- * * pairs that differed by one bit, by two bits, in any combination
- *	 of top bits of (a,b,c), or in any combination of bottom bits of
- *	 (a,b,c).
- * * "differ" is defined as +, -, ^, or ~^.  For + and -, I transformed
- *	 the output delta to a Gray code (a^(a>>1)) so a string of 1's (as
- *	 is commonly produced by subtraction) look like a single 1-bit
- *	 difference.
- * * the base values were pseudorandom, all zero but one bit set, or
- *	 all zero plus a counter that starts at zero.
- *
- * This does not achieve avalanche.  There are input bits of (a,b,c)
- * that fail to affect some output bits of (a,b,c), especially of a.  The
- * most thoroughly mixed value is c, but it doesn't really even achieve
- * avalanche in c.
- *
- * This allows some parallelism.  Read-after-writes are good at doubling
- * the number of bits affected, so the goal of mixing pulls in the opposite
- * direction from the goal of parallelism.  I did what I could.  Rotates
- * seem to cost as much as shifts on every machine I could lay my hands on,
- * and rotates are much kinder to the top and bottom bits, so I used rotates.
- *----------
- */
-#define mix(a,b,c) \
-{ \
-  a -= c;  a ^= rot(c, 4);	c += b; \
-  b -= a;  b ^= rot(a, 6);	a += c; \
-  c -= b;  c ^= rot(b, 8);	b += a; \
-  a -= c;  a ^= rot(c,16);	c += b; \
-  b -= a;  b ^= rot(a,19);	a += c; \
-  c -= b;  c ^= rot(b, 4);	b += a; \
-}
-
-/*----------
- * final -- final mixing of 3 32-bit values (a,b,c) into c
- *
- * Pairs of (a,b,c) values differing in only a few bits will usually
- * produce values of c that look totally different.  This was tested for
- * * pairs that differed by one bit, by two bits, in any combination
- *	 of top bits of (a,b,c), or in any combination of bottom bits of
- *	 (a,b,c).
- * * "differ" is defined as +, -, ^, or ~^.  For + and -, I transformed
- *	 the output delta to a Gray code (a^(a>>1)) so a string of 1's (as
- *	 is commonly produced by subtraction) look like a single 1-bit
- *	 difference.
- * * the base values were pseudorandom, all zero but one bit set, or
- *	 all zero plus a counter that starts at zero.
- *
- * The use of separate functions for mix() and final() allow for a
- * substantial performance increase since final() does not need to
- * do well in reverse, but is does need to affect all output bits.
- * mix(), on the other hand, does not need to affect all output
- * bits (affecting 32 bits is enough).  The original hash function had
- * a single mixing operation that had to satisfy both sets of requirements
- * and was slower as a result.
- *----------
- */
-#define final(a,b,c) \
-{ \
-  c ^= b; c -= rot(b,14); \
-  a ^= c; a -= rot(c,11); \
-  b ^= a; b -= rot(a,25); \
-  c ^= b; c -= rot(b,16); \
-  a ^= c; a -= rot(c, 4); \
-  b ^= a; b -= rot(a,14); \
-  c ^= b; c -= rot(b,24); \
-}
-
-/*
- * hash_bytes() -- hash a variable-length key into a 32-bit value
- *		k		: the key (the unaligned variable-length array of bytes)
- *		len		: the length of the key, counting by bytes
- *
- * Returns a uint32 value.  Every bit of the key affects every bit of
- * the return value.  Every 1-bit and 2-bit delta achieves avalanche.
- * About 6*len+35 instructions. The best hash table sizes are powers
- * of 2.  There is no need to do mod a prime (mod is sooo slow!).
- * If you need less than 32 bits, use a bitmask.
- *
- * This procedure must never throw elog(ERROR); the ResourceOwner code
- * relies on this not to fail.
- *
- * Note: we could easily change this function to return a 64-bit hash value
- * by using the final values of both b and c.  b is perhaps a little less
- * well mixed than c, however.
- */
-uint32
-hash_bytes(const unsigned char *k, int keylen)
-{
-	uint32		a,
-				b,
-				c,
-				len;
-
-	/* Set up the internal state */
-	len = keylen;
-	a = b = c = 0x9e3779b9 + len + 3923095;
-
-	/* If the source pointer is word-aligned, we use word-wide fetches */
-	if (((uintptr_t) k & UINT32_ALIGN_MASK) == 0)
-	{
-		/* Code path for aligned source data */
-		const uint32 *ka = (const uint32 *) k;
-
-		/* handle most of the key */
-		while (len >= 12)
-		{
-			a += ka[0];
-			b += ka[1];
-			c += ka[2];
-			mix(a, b, c);
-			ka += 3;
-			len -= 12;
-		}
-
-		/* handle the last 11 bytes */
-		k = (const unsigned char *) ka;
-#ifdef WORDS_BIGENDIAN
-		switch (len)
-		{
-			case 11:
-				c += ((uint32) k[10] << 8);
-				/* fall through */
-			case 10:
-				c += ((uint32) k[9] << 16);
-				/* fall through */
-			case 9:
-				c += ((uint32) k[8] << 24);
-				/* fall through */
-			case 8:
-				/* the lowest byte of c is reserved for the length */
-				b += ka[1];
-				a += ka[0];
-				break;
-			case 7:
-				b += ((uint32) k[6] << 8);
-				/* fall through */
-			case 6:
-				b += ((uint32) k[5] << 16);
-				/* fall through */
-			case 5:
-				b += ((uint32) k[4] << 24);
-				/* fall through */
-			case 4:
-				a += ka[0];
-				break;
-			case 3:
-				a += ((uint32) k[2] << 8);
-				/* fall through */
-			case 2:
-				a += ((uint32) k[1] << 16);
-				/* fall through */
-			case 1:
-				a += ((uint32) k[0] << 24);
-				/* case 0: nothing left to add */
-		}
-#else							/* !WORDS_BIGENDIAN */
-		switch (len)
-		{
-			case 11:
-				c += ((uint32) k[10] << 24);
-				/* fall through */
-			case 10:
-				c += ((uint32) k[9] << 16);
-				/* fall through */
-			case 9:
-				c += ((uint32) k[8] << 8);
-				/* fall through */
-			case 8:
-				/* the lowest byte of c is reserved for the length */
-				b += ka[1];
-				a += ka[0];
-				break;
-			case 7:
-				b += ((uint32) k[6] << 16);
-				/* fall through */
-			case 6:
-				b += ((uint32) k[5] << 8);
-				/* fall through */
-			case 5:
-				b += k[4];
-				/* fall through */
-			case 4:
-				a += ka[0];
-				break;
-			case 3:
-				a += ((uint32) k[2] << 16);
-				/* fall through */
-			case 2:
-				a += ((uint32) k[1] << 8);
-				/* fall through */
-			case 1:
-				a += k[0];
-				/* case 0: nothing left to add */
-		}
-#endif							/* WORDS_BIGENDIAN */
-	}
-	else
-	{
-		/* Code path for non-aligned source data */
-
-		/* handle most of the key */
-		while (len >= 12)
-		{
-#ifdef WORDS_BIGENDIAN
-			a += (k[3] + ((uint32) k[2] << 8) + ((uint32) k[1] << 16) + ((uint32) k[0] << 24));
-			b += (k[7] + ((uint32) k[6] << 8) + ((uint32) k[5] << 16) + ((uint32) k[4] << 24));
-			c += (k[11] + ((uint32) k[10] << 8) + ((uint32) k[9] << 16) + ((uint32) k[8] << 24));
-#else							/* !WORDS_BIGENDIAN */
-			a += (k[0] + ((uint32) k[1] << 8) + ((uint32) k[2] << 16) + ((uint32) k[3] << 24));
-			b += (k[4] + ((uint32) k[5] << 8) + ((uint32) k[6] << 16) + ((uint32) k[7] << 24));
-			c += (k[8] + ((uint32) k[9] << 8) + ((uint32) k[10] << 16) + ((uint32) k[11] << 24));
-#endif							/* WORDS_BIGENDIAN */
-			mix(a, b, c);
-			k += 12;
-			len -= 12;
-		}
-
-		/* handle the last 11 bytes */
-#ifdef WORDS_BIGENDIAN
-		switch (len)
-		{
-			case 11:
-				c += ((uint32) k[10] << 8);
-				/* fall through */
-			case 10:
-				c += ((uint32) k[9] << 16);
-				/* fall through */
-			case 9:
-				c += ((uint32) k[8] << 24);
-				/* fall through */
-			case 8:
-				/* the lowest byte of c is reserved for the length */
-				b += k[7];
-				/* fall through */
-			case 7:
-				b += ((uint32) k[6] << 8);
-				/* fall through */
-			case 6:
-				b += ((uint32) k[5] << 16);
-				/* fall through */
-			case 5:
-				b += ((uint32) k[4] << 24);
-				/* fall through */
-			case 4:
-				a += k[3];
-				/* fall through */
-			case 3:
-				a += ((uint32) k[2] << 8);
-				/* fall through */
-			case 2:
-				a += ((uint32) k[1] << 16);
-				/* fall through */
-			case 1:
-				a += ((uint32) k[0] << 24);
-				/* case 0: nothing left to add */
-		}
-#else							/* !WORDS_BIGENDIAN */
-		switch (len)
-		{
-			case 11:
-				c += ((uint32) k[10] << 24);
-				/* fall through */
-			case 10:
-				c += ((uint32) k[9] << 16);
-				/* fall through */
-			case 9:
-				c += ((uint32) k[8] << 8);
-				/* fall through */
-			case 8:
-				/* the lowest byte of c is reserved for the length */
-				b += ((uint32) k[7] << 24);
-				/* fall through */
-			case 7:
-				b += ((uint32) k[6] << 16);
-				/* fall through */
-			case 6:
-				b += ((uint32) k[5] << 8);
-				/* fall through */
-			case 5:
-				b += k[4];
-				/* fall through */
-			case 4:
-				a += ((uint32) k[3] << 24);
-				/* fall through */
-			case 3:
-				a += ((uint32) k[2] << 16);
-				/* fall through */
-			case 2:
-				a += ((uint32) k[1] << 8);
-				/* fall through */
-			case 1:
-				a += k[0];
-				/* case 0: nothing left to add */
-		}
-#endif							/* WORDS_BIGENDIAN */
-	}
-
-	final(a, b, c);
-
-	/* report the result */
-	return c;
-}
-
-/*
- * hash_bytes_extended() -- hash into a 64-bit value, using an optional seed
- *		k		: the key (the unaligned variable-length array of bytes)
- *		len		: the length of the key, counting by bytes
- *		seed	: a 64-bit seed (0 means no seed)
- *
- * Returns a uint64 value.  Otherwise similar to hash_bytes.
- */
-uint64
-hash_bytes_extended(const unsigned char *k, int keylen, uint64 seed)
-{
-	uint32		a,
-				b,
-				c,
-				len;
-
-	/* Set up the internal state */
-	len = keylen;
-	a = b = c = 0x9e3779b9 + len + 3923095;
-
-	/* If the seed is non-zero, use it to perturb the internal state. */
-	if (seed != 0)
-	{
-		/*
-		 * In essence, the seed is treated as part of the data being hashed,
-		 * but for simplicity, we pretend that it's padded with four bytes of
-		 * zeroes so that the seed constitutes a 12-byte chunk.
-		 */
-		a += (uint32) (seed >> 32);
-		b += (uint32) seed;
-		mix(a, b, c);
-	}
-
-	/* If the source pointer is word-aligned, we use word-wide fetches */
-	if (((uintptr_t) k & UINT32_ALIGN_MASK) == 0)
-	{
-		/* Code path for aligned source data */
-		const uint32 *ka = (const uint32 *) k;
-
-		/* handle most of the key */
-		while (len >= 12)
-		{
-			a += ka[0];
-			b += ka[1];
-			c += ka[2];
-			mix(a, b, c);
-			ka += 3;
-			len -= 12;
-		}
-
-		/* handle the last 11 bytes */
-		k = (const unsigned char *) ka;
-#ifdef WORDS_BIGENDIAN
-		switch (len)
-		{
-			case 11:
-				c += ((uint32) k[10] << 8);
-				/* fall through */
-			case 10:
-				c += ((uint32) k[9] << 16);
-				/* fall through */
-			case 9:
-				c += ((uint32) k[8] << 24);
-				/* fall through */
-			case 8:
-				/* the lowest byte of c is reserved for the length */
-				b += ka[1];
-				a += ka[0];
-				break;
-			case 7:
-				b += ((uint32) k[6] << 8);
-				/* fall through */
-			case 6:
-				b += ((uint32) k[5] << 16);
-				/* fall through */
-			case 5:
-				b += ((uint32) k[4] << 24);
-				/* fall through */
-			case 4:
-				a += ka[0];
-				break;
-			case 3:
-				a += ((uint32) k[2] << 8);
-				/* fall through */
-			case 2:
-				a += ((uint32) k[1] << 16);
-				/* fall through */
-			case 1:
-				a += ((uint32) k[0] << 24);
-				/* case 0: nothing left to add */
-		}
-#else							/* !WORDS_BIGENDIAN */
-		switch (len)
-		{
-			case 11:
-				c += ((uint32) k[10] << 24);
-				/* fall through */
-			case 10:
-				c += ((uint32) k[9] << 16);
-				/* fall through */
-			case 9:
-				c += ((uint32) k[8] << 8);
-				/* fall through */
-			case 8:
-				/* the lowest byte of c is reserved for the length */
-				b += ka[1];
-				a += ka[0];
-				break;
-			case 7:
-				b += ((uint32) k[6] << 16);
-				/* fall through */
-			case 6:
-				b += ((uint32) k[5] << 8);
-				/* fall through */
-			case 5:
-				b += k[4];
-				/* fall through */
-			case 4:
-				a += ka[0];
-				break;
-			case 3:
-				a += ((uint32) k[2] << 16);
-				/* fall through */
-			case 2:
-				a += ((uint32) k[1] << 8);
-				/* fall through */
-			case 1:
-				a += k[0];
-				/* case 0: nothing left to add */
-		}
-#endif							/* WORDS_BIGENDIAN */
-	}
-	else
-	{
-		/* Code path for non-aligned source data */
-
-		/* handle most of the key */
-		while (len >= 12)
-		{
-#ifdef WORDS_BIGENDIAN
-			a += (k[3] + ((uint32) k[2] << 8) + ((uint32) k[1] << 16) + ((uint32) k[0] << 24));
-			b += (k[7] + ((uint32) k[6] << 8) + ((uint32) k[5] << 16) + ((uint32) k[4] << 24));
-			c += (k[11] + ((uint32) k[10] << 8) + ((uint32) k[9] << 16) + ((uint32) k[8] << 24));
-#else							/* !WORDS_BIGENDIAN */
-			a += (k[0] + ((uint32) k[1] << 8) + ((uint32) k[2] << 16) + ((uint32) k[3] << 24));
-			b += (k[4] + ((uint32) k[5] << 8) + ((uint32) k[6] << 16) + ((uint32) k[7] << 24));
-			c += (k[8] + ((uint32) k[9] << 8) + ((uint32) k[10] << 16) + ((uint32) k[11] << 24));
-#endif							/* WORDS_BIGENDIAN */
-			mix(a, b, c);
-			k += 12;
-			len -= 12;
-		}
-
-		/* handle the last 11 bytes */
-#ifdef WORDS_BIGENDIAN
-		switch (len)
-		{
-			case 11:
-				c += ((uint32) k[10] << 8);
-				/* fall through */
-			case 10:
-				c += ((uint32) k[9] << 16);
-				/* fall through */
-			case 9:
-				c += ((uint32) k[8] << 24);
-				/* fall through */
-			case 8:
-				/* the lowest byte of c is reserved for the length */
-				b += k[7];
-				/* fall through */
-			case 7:
-				b += ((uint32) k[6] << 8);
-				/* fall through */
-			case 6:
-				b += ((uint32) k[5] << 16);
-				/* fall through */
-			case 5:
-				b += ((uint32) k[4] << 24);
-				/* fall through */
-			case 4:
-				a += k[3];
-				/* fall through */
-			case 3:
-				a += ((uint32) k[2] << 8);
-				/* fall through */
-			case 2:
-				a += ((uint32) k[1] << 16);
-				/* fall through */
-			case 1:
-				a += ((uint32) k[0] << 24);
-				/* case 0: nothing left to add */
-		}
-#else							/* !WORDS_BIGENDIAN */
-		switch (len)
-		{
-			case 11:
-				c += ((uint32) k[10] << 24);
-				/* fall through */
-			case 10:
-				c += ((uint32) k[9] << 16);
-				/* fall through */
-			case 9:
-				c += ((uint32) k[8] << 8);
-				/* fall through */
-			case 8:
-				/* the lowest byte of c is reserved for the length */
-				b += ((uint32) k[7] << 24);
-				/* fall through */
-			case 7:
-				b += ((uint32) k[6] << 16);
-				/* fall through */
-			case 6:
-				b += ((uint32) k[5] << 8);
-				/* fall through */
-			case 5:
-				b += k[4];
-				/* fall through */
-			case 4:
-				a += ((uint32) k[3] << 24);
-				/* fall through */
-			case 3:
-				a += ((uint32) k[2] << 16);
-				/* fall through */
-			case 2:
-				a += ((uint32) k[1] << 8);
-				/* fall through */
-			case 1:
-				a += k[0];
-				/* case 0: nothing left to add */
-		}
-#endif							/* WORDS_BIGENDIAN */
-	}
-
-	final(a, b, c);
-
-	/* report the result */
-	return ((uint64) b << 32) | c;
-}
-
-/*
- * hash_bytes_uint32() -- hash a 32-bit value to a 32-bit value
- *
- * This has the same result as
- *		hash_bytes(&k, sizeof(uint32))
- * but is faster and doesn't force the caller to store k into memory.
- */
-uint32
-hash_bytes_uint32(uint32 k)
-{
-	uint32		a,
-				b,
-				c;
-
-	a = b = c = 0x9e3779b9 + (uint32) sizeof(uint32) + 3923095;
-	a += k;
-
-	final(a, b, c);
-
-	/* report the result */
-	return c;
-}
-
-/*
- * hash_bytes_uint32_extended() -- hash 32-bit value to 64-bit value, with seed
- *
- * Like hash_bytes_uint32, this is a convenience function.
- */
-uint64
-hash_bytes_uint32_extended(uint32 k, uint64 seed)
-{
-	uint32		a,
-				b,
-				c;
-
-	a = b = c = 0x9e3779b9 + (uint32) sizeof(uint32) + 3923095;
-
-	if (seed != 0)
-	{
-		a += (uint32) (seed >> 32);
-		b += (uint32) seed;
-		mix(a, b, c);
-	}
-
-	a += k;
-
-	final(a, b, c);
-
-	/* report the result */
-	return ((uint64) b << 32) | c;
-}
-
-/*
- * string_hash: hash function for keys that are NUL-terminated strings.
- *
- * NOTE: this is the default hash function if none is specified.
- */
-uint32
-string_hash(const void *key, Size keysize)
-{
-	/*
-	 * If the string exceeds keysize-1 bytes, we want to hash only that many,
-	 * because when it is copied into the hash table it will be truncated at
-	 * that length.
-	 */
-	Size		s_len = strlen((const char *) key);
-
-	s_len = Min(s_len, keysize - 1);
-	return hash_bytes((const unsigned char *) key, (int) s_len);
-}
-
-/*
- * tag_hash: hash function for fixed-size tag values
- */
-uint32
-tag_hash(const void *key, Size keysize)
-{
-	return hash_bytes((const unsigned char *) key, (int) keysize);
-}
-
-/*
- * uint32_hash: hash function for keys that are uint32 or int32
- *
- * (tag_hash works for this case too, but is slower)
- */
-uint32
-uint32_hash(const void *key, Size keysize)
-{
-	Assert(keysize == sizeof(uint32));
-	return hash_bytes_uint32(*((const uint32 *) key));
-}
diff --git a/contrib/libs/libpq/src/common/hmac_openssl.c b/contrib/libs/libpq/src/common/hmac_openssl.c
deleted file mode 100644
index 9aadbb886c..0000000000
--- a/contrib/libs/libpq/src/common/hmac_openssl.c
+++ /dev/null
@@ -1,348 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * hmac_openssl.c
- *	  Implementation of HMAC with OpenSSL.
- *
- * This should only be used if code is compiled with OpenSSL support.
- *
- * Portions Copyright (c) 1996-2023, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- * IDENTIFICATION
- *	  src/common/hmac_openssl.c
- *
- *-------------------------------------------------------------------------
- */
-
-#ifndef FRONTEND
-#include "postgres.h"
-#else
-#include "postgres_fe.h"
-#endif
-
-
-#include <openssl/err.h>
-#include <openssl/hmac.h>
-
-#include "common/hmac.h"
-#include "common/md5.h"
-#include "common/sha1.h"
-#include "common/sha2.h"
-#ifndef FRONTEND
-#error #include "utils/memutils.h"
-#error #include "utils/resowner.h"
-#error #include "utils/resowner_private.h"
-#endif
-
-/*
- * In backend, use an allocation in TopMemoryContext to count for resowner
- * cleanup handling if necessary.  For versions of OpenSSL where HMAC_CTX is
- * known, just use palloc().  In frontend, use malloc to be able to return
- * a failure status back to the caller.
- */
-#ifndef FRONTEND
-#ifdef HAVE_HMAC_CTX_NEW
-#define ALLOC(size) MemoryContextAlloc(TopMemoryContext, size)
-#else
-#define ALLOC(size) palloc(size)
-#endif
-#define FREE(ptr) pfree(ptr)
-#else							/* FRONTEND */
-#define ALLOC(size) malloc(size)
-#define FREE(ptr) free(ptr)
-#endif							/* FRONTEND */
-
-/* Set of error states */
-typedef enum pg_hmac_errno
-{
-	PG_HMAC_ERROR_NONE = 0,
-	PG_HMAC_ERROR_DEST_LEN,
-	PG_HMAC_ERROR_OPENSSL
-} pg_hmac_errno;
-
-/* Internal pg_hmac_ctx structure */
-struct pg_hmac_ctx
-{
-	HMAC_CTX   *hmacctx;
-	pg_cryptohash_type type;
-	pg_hmac_errno error;
-	const char *errreason;
-
-#ifndef FRONTEND
-	ResourceOwner resowner;
-#endif
-};
-
-static const char *
-SSLerrmessage(unsigned long ecode)
-{
-	if (ecode == 0)
-		return NULL;
-
-	/*
-	 * This may return NULL, but we would fall back to a default error path if
-	 * that were the case.
-	 */
-	return ERR_reason_error_string(ecode);
-}
-
-/*
- * pg_hmac_create
- *
- * Allocate a hash context.  Returns NULL on failure for an OOM.  The
- * backend issues an error, without returning.
- */
-pg_hmac_ctx *
-pg_hmac_create(pg_cryptohash_type type)
-{
-	pg_hmac_ctx *ctx;
-
-	ctx = ALLOC(sizeof(pg_hmac_ctx));
-	if (ctx == NULL)
-		return NULL;
-	memset(ctx, 0, sizeof(pg_hmac_ctx));
-
-	ctx->type = type;
-	ctx->error = PG_HMAC_ERROR_NONE;
-	ctx->errreason = NULL;
-
-
-	/*
-	 * Initialization takes care of assigning the correct type for OpenSSL.
-	 * Also ensure that there aren't any unconsumed errors in the queue from
-	 * previous runs.
-	 */
-	ERR_clear_error();
-#ifdef HAVE_HMAC_CTX_NEW
-#ifndef FRONTEND
-	ResourceOwnerEnlargeHMAC(CurrentResourceOwner);
-#endif
-	ctx->hmacctx = HMAC_CTX_new();
-#else
-	ctx->hmacctx = ALLOC(sizeof(HMAC_CTX));
-#endif
-
-	if (ctx->hmacctx == NULL)
-	{
-		explicit_bzero(ctx, sizeof(pg_hmac_ctx));
-		FREE(ctx);
-#ifndef FRONTEND
-		ereport(ERROR,
-				(errcode(ERRCODE_OUT_OF_MEMORY),
-				 errmsg("out of memory")));
-#endif
-		return NULL;
-	}
-
-#ifdef HAVE_HMAC_CTX_NEW
-#ifndef FRONTEND
-	ctx->resowner = CurrentResourceOwner;
-	ResourceOwnerRememberHMAC(CurrentResourceOwner, PointerGetDatum(ctx));
-#endif
-#else
-	memset(ctx->hmacctx, 0, sizeof(HMAC_CTX));
-#endif							/* HAVE_HMAC_CTX_NEW */
-
-	return ctx;
-}
-
-/*
- * pg_hmac_init
- *
- * Initialize a HMAC context.  Returns 0 on success, -1 on failure.
- */
-int
-pg_hmac_init(pg_hmac_ctx *ctx, const uint8 *key, size_t len)
-{
-	int			status = 0;
-
-	if (ctx == NULL)
-		return -1;
-
-	switch (ctx->type)
-	{
-		case PG_MD5:
-			status = HMAC_Init_ex(ctx->hmacctx, key, len, EVP_md5(), NULL);
-			break;
-		case PG_SHA1:
-			status = HMAC_Init_ex(ctx->hmacctx, key, len, EVP_sha1(), NULL);
-			break;
-		case PG_SHA224:
-			status = HMAC_Init_ex(ctx->hmacctx, key, len, EVP_sha224(), NULL);
-			break;
-		case PG_SHA256:
-			status = HMAC_Init_ex(ctx->hmacctx, key, len, EVP_sha256(), NULL);
-			break;
-		case PG_SHA384:
-			status = HMAC_Init_ex(ctx->hmacctx, key, len, EVP_sha384(), NULL);
-			break;
-		case PG_SHA512:
-			status = HMAC_Init_ex(ctx->hmacctx, key, len, EVP_sha512(), NULL);
-			break;
-	}
-
-	/* OpenSSL internals return 1 on success, 0 on failure */
-	if (status <= 0)
-	{
-		ctx->errreason = SSLerrmessage(ERR_get_error());
-		ctx->error = PG_HMAC_ERROR_OPENSSL;
-		return -1;
-	}
-
-	return 0;
-}
-
-/*
- * pg_hmac_update
- *
- * Update a HMAC context.  Returns 0 on success, -1 on failure.
- */
-int
-pg_hmac_update(pg_hmac_ctx *ctx, const uint8 *data, size_t len)
-{
-	int			status = 0;
-
-	if (ctx == NULL)
-		return -1;
-
-	status = HMAC_Update(ctx->hmacctx, data, len);
-
-	/* OpenSSL internals return 1 on success, 0 on failure */
-	if (status <= 0)
-	{
-		ctx->errreason = SSLerrmessage(ERR_get_error());
-		ctx->error = PG_HMAC_ERROR_OPENSSL;
-		return -1;
-	}
-	return 0;
-}
-
-/*
- * pg_hmac_final
- *
- * Finalize a HMAC context.  Returns 0 on success, -1 on failure.
- */
-int
-pg_hmac_final(pg_hmac_ctx *ctx, uint8 *dest, size_t len)
-{
-	int			status = 0;
-	uint32		outlen;
-
-	if (ctx == NULL)
-		return -1;
-
-	switch (ctx->type)
-	{
-		case PG_MD5:
-			if (len < MD5_DIGEST_LENGTH)
-			{
-				ctx->error = PG_HMAC_ERROR_DEST_LEN;
-				return -1;
-			}
-			break;
-		case PG_SHA1:
-			if (len < SHA1_DIGEST_LENGTH)
-			{
-				ctx->error = PG_HMAC_ERROR_DEST_LEN;
-				return -1;
-			}
-			break;
-		case PG_SHA224:
-			if (len < PG_SHA224_DIGEST_LENGTH)
-			{
-				ctx->error = PG_HMAC_ERROR_DEST_LEN;
-				return -1;
-			}
-			break;
-		case PG_SHA256:
-			if (len < PG_SHA256_DIGEST_LENGTH)
-			{
-				ctx->error = PG_HMAC_ERROR_DEST_LEN;
-				return -1;
-			}
-			break;
-		case PG_SHA384:
-			if (len < PG_SHA384_DIGEST_LENGTH)
-			{
-				ctx->error = PG_HMAC_ERROR_DEST_LEN;
-				return -1;
-			}
-			break;
-		case PG_SHA512:
-			if (len < PG_SHA512_DIGEST_LENGTH)
-			{
-				ctx->error = PG_HMAC_ERROR_DEST_LEN;
-				return -1;
-			}
-			break;
-	}
-
-	status = HMAC_Final(ctx->hmacctx, dest, &outlen);
-
-	/* OpenSSL internals return 1 on success, 0 on failure */
-	if (status <= 0)
-	{
-		ctx->errreason = SSLerrmessage(ERR_get_error());
-		ctx->error = PG_HMAC_ERROR_OPENSSL;
-		return -1;
-	}
-	return 0;
-}
-
-/*
- * pg_hmac_free
- *
- * Free a HMAC context.
- */
-void
-pg_hmac_free(pg_hmac_ctx *ctx)
-{
-	if (ctx == NULL)
-		return;
-
-#ifdef HAVE_HMAC_CTX_FREE
-	HMAC_CTX_free(ctx->hmacctx);
-#ifndef FRONTEND
-	ResourceOwnerForgetHMAC(ctx->resowner, PointerGetDatum(ctx));
-#endif
-#else
-	explicit_bzero(ctx->hmacctx, sizeof(HMAC_CTX));
-	FREE(ctx->hmacctx);
-#endif
-
-	explicit_bzero(ctx, sizeof(pg_hmac_ctx));
-	FREE(ctx);
-}
-
-/*
- * pg_hmac_error
- *
- * Returns a static string providing details about an error that happened
- * during a HMAC computation.
- */
-const char *
-pg_hmac_error(pg_hmac_ctx *ctx)
-{
-	if (ctx == NULL)
-		return _("out of memory");
-
-	/*
-	 * If a reason is provided, rely on it, else fallback to any error code
-	 * set.
-	 */
-	if (ctx->errreason)
-		return ctx->errreason;
-
-	switch (ctx->error)
-	{
-		case PG_HMAC_ERROR_NONE:
-			return _("success");
-		case PG_HMAC_ERROR_DEST_LEN:
-			return _("destination buffer too small");
-		case PG_HMAC_ERROR_OPENSSL:
-			return _("OpenSSL failure");
-	}
-
-	Assert(false);				/* cannot be reached */
-	return _("success");
-}
diff --git a/contrib/libs/libpq/src/common/ip.c b/contrib/libs/libpq/src/common/ip.c
deleted file mode 100644
index 9baad3a337..0000000000
--- a/contrib/libs/libpq/src/common/ip.c
+++ /dev/null
@@ -1,262 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * ip.c
- *	  IPv6-aware network access.
- *
- * Portions Copyright (c) 1996-2023, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- *
- * IDENTIFICATION
- *	  src/common/ip.c
- *
- * This file and the IPV6 implementation were initially provided by
- * Nigel Kukard <nkukard@lbsd.net>, Linux Based Systems Design
- * http://www.lbsd.net.
- *
- *-------------------------------------------------------------------------
- */
-
-#ifndef FRONTEND
-#include "postgres.h"
-#else
-#include "postgres_fe.h"
-#endif
-
-#include <unistd.h>
-#include <sys/stat.h>
-#include <sys/socket.h>
-#include <netdb.h>
-#include <netinet/in.h>
-#include <netinet/tcp.h>
-#include <arpa/inet.h>
-#include <sys/file.h>
-
-#include "common/ip.h"
-
-
-
-static int	getaddrinfo_unix(const char *path,
-							 const struct addrinfo *hintsp,
-							 struct addrinfo **result);
-
-static int	getnameinfo_unix(const struct sockaddr_un *sa, int salen,
-							 char *node, int nodelen,
-							 char *service, int servicelen,
-							 int flags);
-
-
-/*
- *	pg_getaddrinfo_all - get address info for Unix, IPv4 and IPv6 sockets
- */
-int
-pg_getaddrinfo_all(const char *hostname, const char *servname,
-				   const struct addrinfo *hintp, struct addrinfo **result)
-{
-	int			rc;
-
-	/* not all versions of getaddrinfo() zero *result on failure */
-	*result = NULL;
-
-	if (hintp->ai_family == AF_UNIX)
-		return getaddrinfo_unix(servname, hintp, result);
-
-	/* NULL has special meaning to getaddrinfo(). */
-	rc = getaddrinfo((!hostname || hostname[0] == '\0') ? NULL : hostname,
-					 servname, hintp, result);
-
-	return rc;
-}
-
-
-/*
- *	pg_freeaddrinfo_all - free addrinfo structures for IPv4, IPv6, or Unix
- *
- * Note: the ai_family field of the original hint structure must be passed
- * so that we can tell whether the addrinfo struct was built by the system's
- * getaddrinfo() routine or our own getaddrinfo_unix() routine.  Some versions
- * of getaddrinfo() might be willing to return AF_UNIX addresses, so it's
- * not safe to look at ai_family in the addrinfo itself.
- */
-void
-pg_freeaddrinfo_all(int hint_ai_family, struct addrinfo *ai)
-{
-	if (hint_ai_family == AF_UNIX)
-	{
-		/* struct was built by getaddrinfo_unix (see pg_getaddrinfo_all) */
-		while (ai != NULL)
-		{
-			struct addrinfo *p = ai;
-
-			ai = ai->ai_next;
-			free(p->ai_addr);
-			free(p);
-		}
-	}
-	else
-	{
-		/* struct was built by getaddrinfo() */
-		if (ai != NULL)
-			freeaddrinfo(ai);
-	}
-}
-
-
-/*
- *	pg_getnameinfo_all - get name info for Unix, IPv4 and IPv6 sockets
- *
- * The API of this routine differs from the standard getnameinfo() definition
- * in two ways: first, the addr parameter is declared as sockaddr_storage
- * rather than struct sockaddr, and second, the node and service fields are
- * guaranteed to be filled with something even on failure return.
- */
-int
-pg_getnameinfo_all(const struct sockaddr_storage *addr, int salen,
-				   char *node, int nodelen,
-				   char *service, int servicelen,
-				   int flags)
-{
-	int			rc;
-
-	if (addr && addr->ss_family == AF_UNIX)
-		rc = getnameinfo_unix((const struct sockaddr_un *) addr, salen,
-							  node, nodelen,
-							  service, servicelen,
-							  flags);
-	else
-		rc = getnameinfo((const struct sockaddr *) addr, salen,
-						 node, nodelen,
-						 service, servicelen,
-						 flags);
-
-	if (rc != 0)
-	{
-		if (node)
-			strlcpy(node, "???", nodelen);
-		if (service)
-			strlcpy(service, "???", servicelen);
-	}
-
-	return rc;
-}
-
-
-/* -------
- *	getaddrinfo_unix - get unix socket info using IPv6-compatible API
- *
- *	Bugs: only one addrinfo is set even though hintsp is NULL or
- *		  ai_socktype is 0
- *		  AI_CANONNAME is not supported.
- * -------
- */
-static int
-getaddrinfo_unix(const char *path, const struct addrinfo *hintsp,
-				 struct addrinfo **result)
-{
-	struct addrinfo hints = {0};
-	struct addrinfo *aip;
-	struct sockaddr_un *unp;
-
-	*result = NULL;
-
-	if (strlen(path) >= sizeof(unp->sun_path))
-		return EAI_FAIL;
-
-	if (hintsp == NULL)
-	{
-		hints.ai_family = AF_UNIX;
-		hints.ai_socktype = SOCK_STREAM;
-	}
-	else
-		memcpy(&hints, hintsp, sizeof(hints));
-
-	if (hints.ai_socktype == 0)
-		hints.ai_socktype = SOCK_STREAM;
-
-	if (hints.ai_family != AF_UNIX)
-	{
-		/* shouldn't have been called */
-		return EAI_FAIL;
-	}
-
-	aip = calloc(1, sizeof(struct addrinfo));
-	if (aip == NULL)
-		return EAI_MEMORY;
-
-	unp = calloc(1, sizeof(struct sockaddr_un));
-	if (unp == NULL)
-	{
-		free(aip);
-		return EAI_MEMORY;
-	}
-
-	aip->ai_family = AF_UNIX;
-	aip->ai_socktype = hints.ai_socktype;
-	aip->ai_protocol = hints.ai_protocol;
-	aip->ai_next = NULL;
-	aip->ai_canonname = NULL;
-	*result = aip;
-
-	unp->sun_family = AF_UNIX;
-	aip->ai_addr = (struct sockaddr *) unp;
-	aip->ai_addrlen = sizeof(struct sockaddr_un);
-
-	strcpy(unp->sun_path, path);
-
-	/*
-	 * If the supplied path starts with @, replace that with a zero byte for
-	 * the internal representation.  In that mode, the entire sun_path is the
-	 * address, including trailing zero bytes.  But we set the address length
-	 * to only include the length of the original string.  That way the
-	 * trailing zero bytes won't show up in any network or socket lists of the
-	 * operating system.  This is just a convention, also followed by other
-	 * packages.
-	 */
-	if (path[0] == '@')
-	{
-		unp->sun_path[0] = '\0';
-		aip->ai_addrlen = offsetof(struct sockaddr_un, sun_path) + strlen(path);
-	}
-
-	return 0;
-}
-
-/*
- * Convert an address to a hostname.
- */
-static int
-getnameinfo_unix(const struct sockaddr_un *sa, int salen,
-				 char *node, int nodelen,
-				 char *service, int servicelen,
-				 int flags)
-{
-	int			ret;
-
-	/* Invalid arguments. */
-	if (sa == NULL || sa->sun_family != AF_UNIX ||
-		(node == NULL && service == NULL))
-		return EAI_FAIL;
-
-	if (node)
-	{
-		ret = snprintf(node, nodelen, "%s", "[local]");
-		if (ret < 0 || ret >= nodelen)
-			return EAI_MEMORY;
-	}
-
-	if (service)
-	{
-		/*
-		 * Check whether it looks like an abstract socket, but it could also
-		 * just be an empty string.
-		 */
-		if (sa->sun_path[0] == '\0' && sa->sun_path[1] != '\0')
-			ret = snprintf(service, servicelen, "@%s", sa->sun_path + 1);
-		else
-			ret = snprintf(service, servicelen, "%s", sa->sun_path);
-		if (ret < 0 || ret >= servicelen)
-			return EAI_MEMORY;
-	}
-
-	return 0;
-}
diff --git a/contrib/libs/libpq/src/common/jsonapi.c b/contrib/libs/libpq/src/common/jsonapi.c
deleted file mode 100644
index bb8178e91d..0000000000
--- a/contrib/libs/libpq/src/common/jsonapi.c
+++ /dev/null
@@ -1,1206 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * jsonapi.c
- *		JSON parser and lexer interfaces
- *
- * Portions Copyright (c) 1996-2023, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- * IDENTIFICATION
- *	  src/common/jsonapi.c
- *
- *-------------------------------------------------------------------------
- */
-#ifndef FRONTEND
-#include "postgres.h"
-#else
-#include "postgres_fe.h"
-#endif
-
-#include "common/jsonapi.h"
-#include "mb/pg_wchar.h"
-#include "port/pg_lfind.h"
-
-#ifndef FRONTEND
-#error #include "miscadmin.h"
-#endif
-
-/*
- * The context of the parser is maintained by the recursive descent
- * mechanism, but is passed explicitly to the error reporting routine
- * for better diagnostics.
- */
-typedef enum					/* contexts of JSON parser */
-{
-	JSON_PARSE_VALUE,			/* expecting a value */
-	JSON_PARSE_STRING,			/* expecting a string (for a field name) */
-	JSON_PARSE_ARRAY_START,		/* saw '[', expecting value or ']' */
-	JSON_PARSE_ARRAY_NEXT,		/* saw array element, expecting ',' or ']' */
-	JSON_PARSE_OBJECT_START,	/* saw '{', expecting label or '}' */
-	JSON_PARSE_OBJECT_LABEL,	/* saw object label, expecting ':' */
-	JSON_PARSE_OBJECT_NEXT,		/* saw object value, expecting ',' or '}' */
-	JSON_PARSE_OBJECT_COMMA,	/* saw object ',', expecting next label */
-	JSON_PARSE_END				/* saw the end of a document, expect nothing */
-} JsonParseContext;
-
-static inline JsonParseErrorType json_lex_string(JsonLexContext *lex);
-static inline JsonParseErrorType json_lex_number(JsonLexContext *lex, char *s,
-												 bool *num_err, int *total_len);
-static inline JsonParseErrorType parse_scalar(JsonLexContext *lex, JsonSemAction *sem);
-static JsonParseErrorType parse_object_field(JsonLexContext *lex, JsonSemAction *sem);
-static JsonParseErrorType parse_object(JsonLexContext *lex, JsonSemAction *sem);
-static JsonParseErrorType parse_array_element(JsonLexContext *lex, JsonSemAction *sem);
-static JsonParseErrorType parse_array(JsonLexContext *lex, JsonSemAction *sem);
-static JsonParseErrorType report_parse_error(JsonParseContext ctx, JsonLexContext *lex);
-
-/* the null action object used for pure validation */
-JsonSemAction nullSemAction =
-{
-	NULL, NULL, NULL, NULL, NULL,
-	NULL, NULL, NULL, NULL, NULL
-};
-
-/* Recursive Descent parser support routines */
-
-/*
- * lex_peek
- *
- * what is the current look_ahead token?
-*/
-static inline JsonTokenType
-lex_peek(JsonLexContext *lex)
-{
-	return lex->token_type;
-}
-
-/*
- * lex_expect
- *
- * move the lexer to the next token if the current look_ahead token matches
- * the parameter token. Otherwise, report an error.
- */
-static inline JsonParseErrorType
-lex_expect(JsonParseContext ctx, JsonLexContext *lex, JsonTokenType token)
-{
-	if (lex_peek(lex) == token)
-		return json_lex(lex);
-	else
-		return report_parse_error(ctx, lex);
-}
-
-/* chars to consider as part of an alphanumeric token */
-#define JSON_ALPHANUMERIC_CHAR(c)  \
-	(((c) >= 'a' && (c) <= 'z') || \
-	 ((c) >= 'A' && (c) <= 'Z') || \
-	 ((c) >= '0' && (c) <= '9') || \
-	 (c) == '_' || \
-	 IS_HIGHBIT_SET(c))
-
-/*
- * Utility function to check if a string is a valid JSON number.
- *
- * str is of length len, and need not be null-terminated.
- */
-bool
-IsValidJsonNumber(const char *str, int len)
-{
-	bool		numeric_error;
-	int			total_len;
-	JsonLexContext dummy_lex;
-
-	if (len <= 0)
-		return false;
-
-	/*
-	 * json_lex_number expects a leading  '-' to have been eaten already.
-	 *
-	 * having to cast away the constness of str is ugly, but there's not much
-	 * easy alternative.
-	 */
-	if (*str == '-')
-	{
-		dummy_lex.input = unconstify(char *, str) + 1;
-		dummy_lex.input_length = len - 1;
-	}
-	else
-	{
-		dummy_lex.input = unconstify(char *, str);
-		dummy_lex.input_length = len;
-	}
-
-	json_lex_number(&dummy_lex, dummy_lex.input, &numeric_error, &total_len);
-
-	return (!numeric_error) && (total_len == dummy_lex.input_length);
-}
-
-/*
- * makeJsonLexContextCstringLen
- *
- * lex constructor, with or without StringInfo object for de-escaped lexemes.
- *
- * Without is better as it makes the processing faster, so only make one
- * if really required.
- */
-JsonLexContext *
-makeJsonLexContextCstringLen(char *json, int len, int encoding, bool need_escapes)
-{
-	JsonLexContext *lex = palloc0(sizeof(JsonLexContext));
-
-	lex->input = lex->token_terminator = lex->line_start = json;
-	lex->line_number = 1;
-	lex->input_length = len;
-	lex->input_encoding = encoding;
-	if (need_escapes)
-		lex->strval = makeStringInfo();
-	return lex;
-}
-
-/*
- * pg_parse_json
- *
- * Publicly visible entry point for the JSON parser.
- *
- * lex is a lexing context, set up for the json to be processed by calling
- * makeJsonLexContext(). sem is a structure of function pointers to semantic
- * action routines to be called at appropriate spots during parsing, and a
- * pointer to a state object to be passed to those routines.
- */
-JsonParseErrorType
-pg_parse_json(JsonLexContext *lex, JsonSemAction *sem)
-{
-	JsonTokenType tok;
-	JsonParseErrorType result;
-
-	/* get the initial token */
-	result = json_lex(lex);
-	if (result != JSON_SUCCESS)
-		return result;
-
-	tok = lex_peek(lex);
-
-	/* parse by recursive descent */
-	switch (tok)
-	{
-		case JSON_TOKEN_OBJECT_START:
-			result = parse_object(lex, sem);
-			break;
-		case JSON_TOKEN_ARRAY_START:
-			result = parse_array(lex, sem);
-			break;
-		default:
-			result = parse_scalar(lex, sem);	/* json can be a bare scalar */
-	}
-
-	if (result == JSON_SUCCESS)
-		result = lex_expect(JSON_PARSE_END, lex, JSON_TOKEN_END);
-
-	return result;
-}
-
-/*
- * json_count_array_elements
- *
- * Returns number of array elements in lex context at start of array token
- * until end of array token at same nesting level.
- *
- * Designed to be called from array_start routines.
- */
-JsonParseErrorType
-json_count_array_elements(JsonLexContext *lex, int *elements)
-{
-	JsonLexContext copylex;
-	int			count;
-	JsonParseErrorType result;
-
-	/*
-	 * It's safe to do this with a shallow copy because the lexical routines
-	 * don't scribble on the input. They do scribble on the other pointers
-	 * etc, so doing this with a copy makes that safe.
-	 */
-	memcpy(&copylex, lex, sizeof(JsonLexContext));
-	copylex.strval = NULL;		/* not interested in values here */
-	copylex.lex_level++;
-
-	count = 0;
-	result = lex_expect(JSON_PARSE_ARRAY_START, &copylex,
-						JSON_TOKEN_ARRAY_START);
-	if (result != JSON_SUCCESS)
-		return result;
-	if (lex_peek(&copylex) != JSON_TOKEN_ARRAY_END)
-	{
-		while (1)
-		{
-			count++;
-			result = parse_array_element(&copylex, &nullSemAction);
-			if (result != JSON_SUCCESS)
-				return result;
-			if (copylex.token_type != JSON_TOKEN_COMMA)
-				break;
-			result = json_lex(&copylex);
-			if (result != JSON_SUCCESS)
-				return result;
-		}
-	}
-	result = lex_expect(JSON_PARSE_ARRAY_NEXT, &copylex,
-						JSON_TOKEN_ARRAY_END);
-	if (result != JSON_SUCCESS)
-		return result;
-
-	*elements = count;
-	return JSON_SUCCESS;
-}
-
-/*
- *	Recursive Descent parse routines. There is one for each structural
- *	element in a json document:
- *	  - scalar (string, number, true, false, null)
- *	  - array  ( [ ] )
- *	  - array element
- *	  - object ( { } )
- *	  - object field
- */
-static inline JsonParseErrorType
-parse_scalar(JsonLexContext *lex, JsonSemAction *sem)
-{
-	char	   *val = NULL;
-	json_scalar_action sfunc = sem->scalar;
-	JsonTokenType tok = lex_peek(lex);
-	JsonParseErrorType result;
-
-	/* a scalar must be a string, a number, true, false, or null */
-	if (tok != JSON_TOKEN_STRING && tok != JSON_TOKEN_NUMBER &&
-		tok != JSON_TOKEN_TRUE && tok != JSON_TOKEN_FALSE &&
-		tok != JSON_TOKEN_NULL)
-		return report_parse_error(JSON_PARSE_VALUE, lex);
-
-	/* if no semantic function, just consume the token */
-	if (sfunc == NULL)
-		return json_lex(lex);
-
-	/* extract the de-escaped string value, or the raw lexeme */
-	if (lex_peek(lex) == JSON_TOKEN_STRING)
-	{
-		if (lex->strval != NULL)
-			val = pstrdup(lex->strval->data);
-	}
-	else
-	{
-		int			len = (lex->token_terminator - lex->token_start);
-
-		val = palloc(len + 1);
-		memcpy(val, lex->token_start, len);
-		val[len] = '\0';
-	}
-
-	/* consume the token */
-	result = json_lex(lex);
-	if (result != JSON_SUCCESS)
-		return result;
-
-	/* invoke the callback */
-	result = (*sfunc) (sem->semstate, val, tok);
-
-	return result;
-}
-
-static JsonParseErrorType
-parse_object_field(JsonLexContext *lex, JsonSemAction *sem)
-{
-	/*
-	 * An object field is "fieldname" : value where value can be a scalar,
-	 * object or array.  Note: in user-facing docs and error messages, we
-	 * generally call a field name a "key".
-	 */
-
-	char	   *fname = NULL;	/* keep compiler quiet */
-	json_ofield_action ostart = sem->object_field_start;
-	json_ofield_action oend = sem->object_field_end;
-	bool		isnull;
-	JsonTokenType tok;
-	JsonParseErrorType result;
-
-	if (lex_peek(lex) != JSON_TOKEN_STRING)
-		return report_parse_error(JSON_PARSE_STRING, lex);
-	if ((ostart != NULL || oend != NULL) && lex->strval != NULL)
-		fname = pstrdup(lex->strval->data);
-	result = json_lex(lex);
-	if (result != JSON_SUCCESS)
-		return result;
-
-	result = lex_expect(JSON_PARSE_OBJECT_LABEL, lex, JSON_TOKEN_COLON);
-	if (result != JSON_SUCCESS)
-		return result;
-
-	tok = lex_peek(lex);
-	isnull = tok == JSON_TOKEN_NULL;
-
-	if (ostart != NULL)
-	{
-		result = (*ostart) (sem->semstate, fname, isnull);
-		if (result != JSON_SUCCESS)
-			return result;
-	}
-
-	switch (tok)
-	{
-		case JSON_TOKEN_OBJECT_START:
-			result = parse_object(lex, sem);
-			break;
-		case JSON_TOKEN_ARRAY_START:
-			result = parse_array(lex, sem);
-			break;
-		default:
-			result = parse_scalar(lex, sem);
-	}
-	if (result != JSON_SUCCESS)
-		return result;
-
-	if (oend != NULL)
-	{
-		result = (*oend) (sem->semstate, fname, isnull);
-		if (result != JSON_SUCCESS)
-			return result;
-	}
-
-	return JSON_SUCCESS;
-}
-
-static JsonParseErrorType
-parse_object(JsonLexContext *lex, JsonSemAction *sem)
-{
-	/*
-	 * an object is a possibly empty sequence of object fields, separated by
-	 * commas and surrounded by curly braces.
-	 */
-	json_struct_action ostart = sem->object_start;
-	json_struct_action oend = sem->object_end;
-	JsonTokenType tok;
-	JsonParseErrorType result;
-
-#ifndef FRONTEND
-	check_stack_depth();
-#endif
-
-	if (ostart != NULL)
-	{
-		result = (*ostart) (sem->semstate);
-		if (result != JSON_SUCCESS)
-			return result;
-	}
-
-	/*
-	 * Data inside an object is at a higher nesting level than the object
-	 * itself. Note that we increment this after we call the semantic routine
-	 * for the object start and restore it before we call the routine for the
-	 * object end.
-	 */
-	lex->lex_level++;
-
-	Assert(lex_peek(lex) == JSON_TOKEN_OBJECT_START);
-	result = json_lex(lex);
-	if (result != JSON_SUCCESS)
-		return result;
-
-	tok = lex_peek(lex);
-	switch (tok)
-	{
-		case JSON_TOKEN_STRING:
-			result = parse_object_field(lex, sem);
-			while (result == JSON_SUCCESS && lex_peek(lex) == JSON_TOKEN_COMMA)
-			{
-				result = json_lex(lex);
-				if (result != JSON_SUCCESS)
-					break;
-				result = parse_object_field(lex, sem);
-			}
-			break;
-		case JSON_TOKEN_OBJECT_END:
-			break;
-		default:
-			/* case of an invalid initial token inside the object */
-			result = report_parse_error(JSON_PARSE_OBJECT_START, lex);
-	}
-	if (result != JSON_SUCCESS)
-		return result;
-
-	result = lex_expect(JSON_PARSE_OBJECT_NEXT, lex, JSON_TOKEN_OBJECT_END);
-	if (result != JSON_SUCCESS)
-		return result;
-
-	lex->lex_level--;
-
-	if (oend != NULL)
-	{
-		result = (*oend) (sem->semstate);
-		if (result != JSON_SUCCESS)
-			return result;
-	}
-
-	return JSON_SUCCESS;
-}
-
-static JsonParseErrorType
-parse_array_element(JsonLexContext *lex, JsonSemAction *sem)
-{
-	json_aelem_action astart = sem->array_element_start;
-	json_aelem_action aend = sem->array_element_end;
-	JsonTokenType tok = lex_peek(lex);
-	JsonParseErrorType result;
-	bool		isnull;
-
-	isnull = tok == JSON_TOKEN_NULL;
-
-	if (astart != NULL)
-	{
-		result = (*astart) (sem->semstate, isnull);
-		if (result != JSON_SUCCESS)
-			return result;
-	}
-
-	/* an array element is any object, array or scalar */
-	switch (tok)
-	{
-		case JSON_TOKEN_OBJECT_START:
-			result = parse_object(lex, sem);
-			break;
-		case JSON_TOKEN_ARRAY_START:
-			result = parse_array(lex, sem);
-			break;
-		default:
-			result = parse_scalar(lex, sem);
-	}
-
-	if (result != JSON_SUCCESS)
-		return result;
-
-	if (aend != NULL)
-	{
-		result = (*aend) (sem->semstate, isnull);
-		if (result != JSON_SUCCESS)
-			return result;
-	}
-
-	return JSON_SUCCESS;
-}
-
-static JsonParseErrorType
-parse_array(JsonLexContext *lex, JsonSemAction *sem)
-{
-	/*
-	 * an array is a possibly empty sequence of array elements, separated by
-	 * commas and surrounded by square brackets.
-	 */
-	json_struct_action astart = sem->array_start;
-	json_struct_action aend = sem->array_end;
-	JsonParseErrorType result;
-
-#ifndef FRONTEND
-	check_stack_depth();
-#endif
-
-	if (astart != NULL)
-	{
-		result = (*astart) (sem->semstate);
-		if (result != JSON_SUCCESS)
-			return result;
-	}
-
-	/*
-	 * Data inside an array is at a higher nesting level than the array
-	 * itself. Note that we increment this after we call the semantic routine
-	 * for the array start and restore it before we call the routine for the
-	 * array end.
-	 */
-	lex->lex_level++;
-
-	result = lex_expect(JSON_PARSE_ARRAY_START, lex, JSON_TOKEN_ARRAY_START);
-	if (result == JSON_SUCCESS && lex_peek(lex) != JSON_TOKEN_ARRAY_END)
-	{
-		result = parse_array_element(lex, sem);
-
-		while (result == JSON_SUCCESS && lex_peek(lex) == JSON_TOKEN_COMMA)
-		{
-			result = json_lex(lex);
-			if (result != JSON_SUCCESS)
-				break;
-			result = parse_array_element(lex, sem);
-		}
-	}
-	if (result != JSON_SUCCESS)
-		return result;
-
-	result = lex_expect(JSON_PARSE_ARRAY_NEXT, lex, JSON_TOKEN_ARRAY_END);
-	if (result != JSON_SUCCESS)
-		return result;
-
-	lex->lex_level--;
-
-	if (aend != NULL)
-	{
-		result = (*aend) (sem->semstate);
-		if (result != JSON_SUCCESS)
-			return result;
-	}
-
-	return JSON_SUCCESS;
-}
-
-/*
- * Lex one token from the input stream.
- */
-JsonParseErrorType
-json_lex(JsonLexContext *lex)
-{
-	char	   *s;
-	char	   *const end = lex->input + lex->input_length;
-	JsonParseErrorType result;
-
-	/* Skip leading whitespace. */
-	s = lex->token_terminator;
-	while (s < end && (*s == ' ' || *s == '\t' || *s == '\n' || *s == '\r'))
-	{
-		if (*s++ == '\n')
-		{
-			++lex->line_number;
-			lex->line_start = s;
-		}
-	}
-	lex->token_start = s;
-
-	/* Determine token type. */
-	if (s >= end)
-	{
-		lex->token_start = NULL;
-		lex->prev_token_terminator = lex->token_terminator;
-		lex->token_terminator = s;
-		lex->token_type = JSON_TOKEN_END;
-	}
-	else
-	{
-		switch (*s)
-		{
-				/* Single-character token, some kind of punctuation mark. */
-			case '{':
-				lex->prev_token_terminator = lex->token_terminator;
-				lex->token_terminator = s + 1;
-				lex->token_type = JSON_TOKEN_OBJECT_START;
-				break;
-			case '}':
-				lex->prev_token_terminator = lex->token_terminator;
-				lex->token_terminator = s + 1;
-				lex->token_type = JSON_TOKEN_OBJECT_END;
-				break;
-			case '[':
-				lex->prev_token_terminator = lex->token_terminator;
-				lex->token_terminator = s + 1;
-				lex->token_type = JSON_TOKEN_ARRAY_START;
-				break;
-			case ']':
-				lex->prev_token_terminator = lex->token_terminator;
-				lex->token_terminator = s + 1;
-				lex->token_type = JSON_TOKEN_ARRAY_END;
-				break;
-			case ',':
-				lex->prev_token_terminator = lex->token_terminator;
-				lex->token_terminator = s + 1;
-				lex->token_type = JSON_TOKEN_COMMA;
-				break;
-			case ':':
-				lex->prev_token_terminator = lex->token_terminator;
-				lex->token_terminator = s + 1;
-				lex->token_type = JSON_TOKEN_COLON;
-				break;
-			case '"':
-				/* string */
-				result = json_lex_string(lex);
-				if (result != JSON_SUCCESS)
-					return result;
-				lex->token_type = JSON_TOKEN_STRING;
-				break;
-			case '-':
-				/* Negative number. */
-				result = json_lex_number(lex, s + 1, NULL, NULL);
-				if (result != JSON_SUCCESS)
-					return result;
-				lex->token_type = JSON_TOKEN_NUMBER;
-				break;
-			case '0':
-			case '1':
-			case '2':
-			case '3':
-			case '4':
-			case '5':
-			case '6':
-			case '7':
-			case '8':
-			case '9':
-				/* Positive number. */
-				result = json_lex_number(lex, s, NULL, NULL);
-				if (result != JSON_SUCCESS)
-					return result;
-				lex->token_type = JSON_TOKEN_NUMBER;
-				break;
-			default:
-				{
-					char	   *p;
-
-					/*
-					 * We're not dealing with a string, number, legal
-					 * punctuation mark, or end of string.  The only legal
-					 * tokens we might find here are true, false, and null,
-					 * but for error reporting purposes we scan until we see a
-					 * non-alphanumeric character.  That way, we can report
-					 * the whole word as an unexpected token, rather than just
-					 * some unintuitive prefix thereof.
-					 */
-					for (p = s; p < end && JSON_ALPHANUMERIC_CHAR(*p); p++)
-						 /* skip */ ;
-
-					/*
-					 * We got some sort of unexpected punctuation or an
-					 * otherwise unexpected character, so just complain about
-					 * that one character.
-					 */
-					if (p == s)
-					{
-						lex->prev_token_terminator = lex->token_terminator;
-						lex->token_terminator = s + 1;
-						return JSON_INVALID_TOKEN;
-					}
-
-					/*
-					 * We've got a real alphanumeric token here.  If it
-					 * happens to be true, false, or null, all is well.  If
-					 * not, error out.
-					 */
-					lex->prev_token_terminator = lex->token_terminator;
-					lex->token_terminator = p;
-					if (p - s == 4)
-					{
-						if (memcmp(s, "true", 4) == 0)
-							lex->token_type = JSON_TOKEN_TRUE;
-						else if (memcmp(s, "null", 4) == 0)
-							lex->token_type = JSON_TOKEN_NULL;
-						else
-							return JSON_INVALID_TOKEN;
-					}
-					else if (p - s == 5 && memcmp(s, "false", 5) == 0)
-						lex->token_type = JSON_TOKEN_FALSE;
-					else
-						return JSON_INVALID_TOKEN;
-				}
-		}						/* end of switch */
-	}
-
-	return JSON_SUCCESS;
-}
-
-/*
- * The next token in the input stream is known to be a string; lex it.
- *
- * If lex->strval isn't NULL, fill it with the decoded string.
- * Set lex->token_terminator to the end of the decoded input, and in
- * success cases, transfer its previous value to lex->prev_token_terminator.
- * Return JSON_SUCCESS or an error code.
- *
- * Note: be careful that all error exits advance lex->token_terminator
- * to the point after the character we detected the error on.
- */
-static inline JsonParseErrorType
-json_lex_string(JsonLexContext *lex)
-{
-	char	   *s;
-	char	   *const end = lex->input + lex->input_length;
-	int			hi_surrogate = -1;
-
-	/* Convenience macros for error exits */
-#define FAIL_AT_CHAR_START(code) \
-	do { \
-		lex->token_terminator = s; \
-		return code; \
-	} while (0)
-#define FAIL_AT_CHAR_END(code) \
-	do { \
-		lex->token_terminator = \
-			s + pg_encoding_mblen_bounded(lex->input_encoding, s); \
-		return code; \
-	} while (0)
-
-	if (lex->strval != NULL)
-		resetStringInfo(lex->strval);
-
-	Assert(lex->input_length > 0);
-	s = lex->token_start;
-	for (;;)
-	{
-		s++;
-		/* Premature end of the string. */
-		if (s >= end)
-			FAIL_AT_CHAR_START(JSON_INVALID_TOKEN);
-		else if (*s == '"')
-			break;
-		else if (*s == '\\')
-		{
-			/* OK, we have an escape character. */
-			s++;
-			if (s >= end)
-				FAIL_AT_CHAR_START(JSON_INVALID_TOKEN);
-			else if (*s == 'u')
-			{
-				int			i;
-				int			ch = 0;
-
-				for (i = 1; i <= 4; i++)
-				{
-					s++;
-					if (s >= end)
-						FAIL_AT_CHAR_START(JSON_INVALID_TOKEN);
-					else if (*s >= '0' && *s <= '9')
-						ch = (ch * 16) + (*s - '0');
-					else if (*s >= 'a' && *s <= 'f')
-						ch = (ch * 16) + (*s - 'a') + 10;
-					else if (*s >= 'A' && *s <= 'F')
-						ch = (ch * 16) + (*s - 'A') + 10;
-					else
-						FAIL_AT_CHAR_END(JSON_UNICODE_ESCAPE_FORMAT);
-				}
-				if (lex->strval != NULL)
-				{
-					/*
-					 * Combine surrogate pairs.
-					 */
-					if (is_utf16_surrogate_first(ch))
-					{
-						if (hi_surrogate != -1)
-							FAIL_AT_CHAR_END(JSON_UNICODE_HIGH_SURROGATE);
-						hi_surrogate = ch;
-						continue;
-					}
-					else if (is_utf16_surrogate_second(ch))
-					{
-						if (hi_surrogate == -1)
-							FAIL_AT_CHAR_END(JSON_UNICODE_LOW_SURROGATE);
-						ch = surrogate_pair_to_codepoint(hi_surrogate, ch);
-						hi_surrogate = -1;
-					}
-
-					if (hi_surrogate != -1)
-						FAIL_AT_CHAR_END(JSON_UNICODE_LOW_SURROGATE);
-
-					/*
-					 * Reject invalid cases.  We can't have a value above
-					 * 0xFFFF here (since we only accepted 4 hex digits
-					 * above), so no need to test for out-of-range chars.
-					 */
-					if (ch == 0)
-					{
-						/* We can't allow this, since our TEXT type doesn't */
-						FAIL_AT_CHAR_END(JSON_UNICODE_CODE_POINT_ZERO);
-					}
-
-					/*
-					 * Add the represented character to lex->strval.  In the
-					 * backend, we can let pg_unicode_to_server_noerror()
-					 * handle any required character set conversion; in
-					 * frontend, we can only deal with trivial conversions.
-					 */
-#ifndef FRONTEND
-					{
-						char		cbuf[MAX_UNICODE_EQUIVALENT_STRING + 1];
-
-						if (!pg_unicode_to_server_noerror(ch, (unsigned char *) cbuf))
-							FAIL_AT_CHAR_END(JSON_UNICODE_UNTRANSLATABLE);
-						appendStringInfoString(lex->strval, cbuf);
-					}
-#else
-					if (lex->input_encoding == PG_UTF8)
-					{
-						/* OK, we can map the code point to UTF8 easily */
-						char		utf8str[5];
-						int			utf8len;
-
-						unicode_to_utf8(ch, (unsigned char *) utf8str);
-						utf8len = pg_utf_mblen((unsigned char *) utf8str);
-						appendBinaryStringInfo(lex->strval, utf8str, utf8len);
-					}
-					else if (ch <= 0x007f)
-					{
-						/* The ASCII range is the same in all encodings */
-						appendStringInfoChar(lex->strval, (char) ch);
-					}
-					else
-						FAIL_AT_CHAR_END(JSON_UNICODE_HIGH_ESCAPE);
-#endif							/* FRONTEND */
-				}
-			}
-			else if (lex->strval != NULL)
-			{
-				if (hi_surrogate != -1)
-					FAIL_AT_CHAR_END(JSON_UNICODE_LOW_SURROGATE);
-
-				switch (*s)
-				{
-					case '"':
-					case '\\':
-					case '/':
-						appendStringInfoChar(lex->strval, *s);
-						break;
-					case 'b':
-						appendStringInfoChar(lex->strval, '\b');
-						break;
-					case 'f':
-						appendStringInfoChar(lex->strval, '\f');
-						break;
-					case 'n':
-						appendStringInfoChar(lex->strval, '\n');
-						break;
-					case 'r':
-						appendStringInfoChar(lex->strval, '\r');
-						break;
-					case 't':
-						appendStringInfoChar(lex->strval, '\t');
-						break;
-					default:
-
-						/*
-						 * Not a valid string escape, so signal error.  We
-						 * adjust token_start so that just the escape sequence
-						 * is reported, not the whole string.
-						 */
-						lex->token_start = s;
-						FAIL_AT_CHAR_END(JSON_ESCAPING_INVALID);
-				}
-			}
-			else if (strchr("\"\\/bfnrt", *s) == NULL)
-			{
-				/*
-				 * Simpler processing if we're not bothered about de-escaping
-				 *
-				 * It's very tempting to remove the strchr() call here and
-				 * replace it with a switch statement, but testing so far has
-				 * shown it's not a performance win.
-				 */
-				lex->token_start = s;
-				FAIL_AT_CHAR_END(JSON_ESCAPING_INVALID);
-			}
-		}
-		else
-		{
-			char	   *p = s;
-
-			if (hi_surrogate != -1)
-				FAIL_AT_CHAR_END(JSON_UNICODE_LOW_SURROGATE);
-
-			/*
-			 * Skip to the first byte that requires special handling, so we
-			 * can batch calls to appendBinaryStringInfo.
-			 */
-			while (p < end - sizeof(Vector8) &&
-				   !pg_lfind8('\\', (uint8 *) p, sizeof(Vector8)) &&
-				   !pg_lfind8('"', (uint8 *) p, sizeof(Vector8)) &&
-				   !pg_lfind8_le(31, (uint8 *) p, sizeof(Vector8)))
-				p += sizeof(Vector8);
-
-			for (; p < end; p++)
-			{
-				if (*p == '\\' || *p == '"')
-					break;
-				else if ((unsigned char) *p <= 31)
-				{
-					/* Per RFC4627, these characters MUST be escaped. */
-					/*
-					 * Since *p isn't printable, exclude it from the context
-					 * string
-					 */
-					lex->token_terminator = p;
-					return JSON_ESCAPING_REQUIRED;
-				}
-			}
-
-			if (lex->strval != NULL)
-				appendBinaryStringInfo(lex->strval, s, p - s);
-
-			/*
-			 * s will be incremented at the top of the loop, so set it to just
-			 * behind our lookahead position
-			 */
-			s = p - 1;
-		}
-	}
-
-	if (hi_surrogate != -1)
-	{
-		lex->token_terminator = s + 1;
-		return JSON_UNICODE_LOW_SURROGATE;
-	}
-
-	/* Hooray, we found the end of the string! */
-	lex->prev_token_terminator = lex->token_terminator;
-	lex->token_terminator = s + 1;
-	return JSON_SUCCESS;
-
-#undef FAIL_AT_CHAR_START
-#undef FAIL_AT_CHAR_END
-}
-
-/*
- * The next token in the input stream is known to be a number; lex it.
- *
- * In JSON, a number consists of four parts:
- *
- * (1) An optional minus sign ('-').
- *
- * (2) Either a single '0', or a string of one or more digits that does not
- *	   begin with a '0'.
- *
- * (3) An optional decimal part, consisting of a period ('.') followed by
- *	   one or more digits.  (Note: While this part can be omitted
- *	   completely, it's not OK to have only the decimal point without
- *	   any digits afterwards.)
- *
- * (4) An optional exponent part, consisting of 'e' or 'E', optionally
- *	   followed by '+' or '-', followed by one or more digits.  (Note:
- *	   As with the decimal part, if 'e' or 'E' is present, it must be
- *	   followed by at least one digit.)
- *
- * The 's' argument to this function points to the ostensible beginning
- * of part 2 - i.e. the character after any optional minus sign, or the
- * first character of the string if there is none.
- *
- * If num_err is not NULL, we return an error flag to *num_err rather than
- * raising an error for a badly-formed number.  Also, if total_len is not NULL
- * the distance from lex->input to the token end+1 is returned to *total_len.
- */
-static inline JsonParseErrorType
-json_lex_number(JsonLexContext *lex, char *s,
-				bool *num_err, int *total_len)
-{
-	bool		error = false;
-	int			len = s - lex->input;
-
-	/* Part (1): leading sign indicator. */
-	/* Caller already did this for us; so do nothing. */
-
-	/* Part (2): parse main digit string. */
-	if (len < lex->input_length && *s == '0')
-	{
-		s++;
-		len++;
-	}
-	else if (len < lex->input_length && *s >= '1' && *s <= '9')
-	{
-		do
-		{
-			s++;
-			len++;
-		} while (len < lex->input_length && *s >= '0' && *s <= '9');
-	}
-	else
-		error = true;
-
-	/* Part (3): parse optional decimal portion. */
-	if (len < lex->input_length && *s == '.')
-	{
-		s++;
-		len++;
-		if (len == lex->input_length || *s < '0' || *s > '9')
-			error = true;
-		else
-		{
-			do
-			{
-				s++;
-				len++;
-			} while (len < lex->input_length && *s >= '0' && *s <= '9');
-		}
-	}
-
-	/* Part (4): parse optional exponent. */
-	if (len < lex->input_length && (*s == 'e' || *s == 'E'))
-	{
-		s++;
-		len++;
-		if (len < lex->input_length && (*s == '+' || *s == '-'))
-		{
-			s++;
-			len++;
-		}
-		if (len == lex->input_length || *s < '0' || *s > '9')
-			error = true;
-		else
-		{
-			do
-			{
-				s++;
-				len++;
-			} while (len < lex->input_length && *s >= '0' && *s <= '9');
-		}
-	}
-
-	/*
-	 * Check for trailing garbage.  As in json_lex(), any alphanumeric stuff
-	 * here should be considered part of the token for error-reporting
-	 * purposes.
-	 */
-	for (; len < lex->input_length && JSON_ALPHANUMERIC_CHAR(*s); s++, len++)
-		error = true;
-
-	if (total_len != NULL)
-		*total_len = len;
-
-	if (num_err != NULL)
-	{
-		/* let the caller handle any error */
-		*num_err = error;
-	}
-	else
-	{
-		/* return token endpoint */
-		lex->prev_token_terminator = lex->token_terminator;
-		lex->token_terminator = s;
-		/* handle error if any */
-		if (error)
-			return JSON_INVALID_TOKEN;
-	}
-
-	return JSON_SUCCESS;
-}
-
-/*
- * Report a parse error.
- *
- * lex->token_start and lex->token_terminator must identify the current token.
- */
-static JsonParseErrorType
-report_parse_error(JsonParseContext ctx, JsonLexContext *lex)
-{
-	/* Handle case where the input ended prematurely. */
-	if (lex->token_start == NULL || lex->token_type == JSON_TOKEN_END)
-		return JSON_EXPECTED_MORE;
-
-	/* Otherwise choose the error type based on the parsing context. */
-	switch (ctx)
-	{
-		case JSON_PARSE_END:
-			return JSON_EXPECTED_END;
-		case JSON_PARSE_VALUE:
-			return JSON_EXPECTED_JSON;
-		case JSON_PARSE_STRING:
-			return JSON_EXPECTED_STRING;
-		case JSON_PARSE_ARRAY_START:
-			return JSON_EXPECTED_ARRAY_FIRST;
-		case JSON_PARSE_ARRAY_NEXT:
-			return JSON_EXPECTED_ARRAY_NEXT;
-		case JSON_PARSE_OBJECT_START:
-			return JSON_EXPECTED_OBJECT_FIRST;
-		case JSON_PARSE_OBJECT_LABEL:
-			return JSON_EXPECTED_COLON;
-		case JSON_PARSE_OBJECT_NEXT:
-			return JSON_EXPECTED_OBJECT_NEXT;
-		case JSON_PARSE_OBJECT_COMMA:
-			return JSON_EXPECTED_STRING;
-	}
-
-	/*
-	 * We don't use a default: case, so that the compiler will warn about
-	 * unhandled enum values.
-	 */
-	Assert(false);
-	return JSON_SUCCESS;		/* silence stupider compilers */
-}
-
-
-#ifndef FRONTEND
-/*
- * Extract the current token from a lexing context, for error reporting.
- */
-static char *
-extract_token(JsonLexContext *lex)
-{
-	int			toklen = lex->token_terminator - lex->token_start;
-	char	   *token = palloc(toklen + 1);
-
-	memcpy(token, lex->token_start, toklen);
-	token[toklen] = '\0';
-	return token;
-}
-
-/*
- * Construct an (already translated) detail message for a JSON error.
- *
- * Note that the error message generated by this routine may not be
- * palloc'd, making it unsafe for frontend code as there is no way to
- * know if this can be safely pfree'd or not.
- */
-char *
-json_errdetail(JsonParseErrorType error, JsonLexContext *lex)
-{
-	switch (error)
-	{
-		case JSON_SUCCESS:
-			/* fall through to the error code after switch */
-			break;
-		case JSON_ESCAPING_INVALID:
-			return psprintf(_("Escape sequence \"\\%s\" is invalid."),
-							extract_token(lex));
-		case JSON_ESCAPING_REQUIRED:
-			return psprintf(_("Character with value 0x%02x must be escaped."),
-							(unsigned char) *(lex->token_terminator));
-		case JSON_EXPECTED_END:
-			return psprintf(_("Expected end of input, but found \"%s\"."),
-							extract_token(lex));
-		case JSON_EXPECTED_ARRAY_FIRST:
-			return psprintf(_("Expected array element or \"]\", but found \"%s\"."),
-							extract_token(lex));
-		case JSON_EXPECTED_ARRAY_NEXT:
-			return psprintf(_("Expected \",\" or \"]\", but found \"%s\"."),
-							extract_token(lex));
-		case JSON_EXPECTED_COLON:
-			return psprintf(_("Expected \":\", but found \"%s\"."),
-							extract_token(lex));
-		case JSON_EXPECTED_JSON:
-			return psprintf(_("Expected JSON value, but found \"%s\"."),
-							extract_token(lex));
-		case JSON_EXPECTED_MORE:
-			return _("The input string ended unexpectedly.");
-		case JSON_EXPECTED_OBJECT_FIRST:
-			return psprintf(_("Expected string or \"}\", but found \"%s\"."),
-							extract_token(lex));
-		case JSON_EXPECTED_OBJECT_NEXT:
-			return psprintf(_("Expected \",\" or \"}\", but found \"%s\"."),
-							extract_token(lex));
-		case JSON_EXPECTED_STRING:
-			return psprintf(_("Expected string, but found \"%s\"."),
-							extract_token(lex));
-		case JSON_INVALID_TOKEN:
-			return psprintf(_("Token \"%s\" is invalid."),
-							extract_token(lex));
-		case JSON_UNICODE_CODE_POINT_ZERO:
-			return _("\\u0000 cannot be converted to text.");
-		case JSON_UNICODE_ESCAPE_FORMAT:
-			return _("\"\\u\" must be followed by four hexadecimal digits.");
-		case JSON_UNICODE_HIGH_ESCAPE:
-			/* note: this case is only reachable in frontend not backend */
-			return _("Unicode escape values cannot be used for code point values above 007F when the encoding is not UTF8.");
-		case JSON_UNICODE_UNTRANSLATABLE:
-			/* note: this case is only reachable in backend not frontend */
-			return psprintf(_("Unicode escape value could not be translated to the server's encoding %s."),
-							GetDatabaseEncodingName());
-		case JSON_UNICODE_HIGH_SURROGATE:
-			return _("Unicode high surrogate must not follow a high surrogate.");
-		case JSON_UNICODE_LOW_SURROGATE:
-			return _("Unicode low surrogate must follow a high surrogate.");
-		case JSON_SEM_ACTION_FAILED:
-			/* fall through to the error code after switch */
-			break;
-	}
-
-	/*
-	 * We don't use a default: case, so that the compiler will warn about
-	 * unhandled enum values.  But this needs to be here anyway to cover the
-	 * possibility of an incorrect input.
-	 */
-	elog(ERROR, "unexpected json parse error type: %d", (int) error);
-	return NULL;
-}
-#endif
diff --git a/contrib/libs/libpq/src/common/keywords.c b/contrib/libs/libpq/src/common/keywords.c
deleted file mode 100644
index b72f0d554f..0000000000
--- a/contrib/libs/libpq/src/common/keywords.c
+++ /dev/null
@@ -1,48 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * keywords.c
- *	  PostgreSQL's list of SQL keywords
- *
- *
- * Portions Copyright (c) 1996-2023, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- *
- * IDENTIFICATION
- *	  src/common/keywords.c
- *
- *-------------------------------------------------------------------------
- */
-#include "c.h"
-
-#include "common/keywords.h"
-
-
-/* ScanKeywordList lookup data for SQL keywords */
-
-#include "kwlist_d.h"
-
-/* Keyword categories for SQL keywords */
-
-#define PG_KEYWORD(kwname, value, category, collabel) category,
-
-const uint8 ScanKeywordCategories[SCANKEYWORDS_NUM_KEYWORDS] = {
-#include "parser/kwlist.h"
-};
-
-#undef PG_KEYWORD
-
-/* Keyword can-be-bare-label flags for SQL keywords */
-
-#define PG_KEYWORD(kwname, value, category, collabel) collabel,
-
-#define BARE_LABEL true
-#define AS_LABEL false
-
-const bool	ScanKeywordBareLabel[SCANKEYWORDS_NUM_KEYWORDS] = {
-#include "parser/kwlist.h"
-};
-
-#undef PG_KEYWORD
-#undef BARE_LABEL
-#undef AS_LABEL
diff --git a/contrib/libs/libpq/src/common/kwlist_d.h b/contrib/libs/libpq/src/common/kwlist_d.h
deleted file mode 100644
index e8af260237..0000000000
--- a/contrib/libs/libpq/src/common/kwlist_d.h
+++ /dev/null
@@ -1,1119 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * kwlist_d.h
- *    List of keywords represented as a ScanKeywordList.
- *
- * Portions Copyright (c) 1996-2023, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- * NOTES
- *  ******************************
- *  *** DO NOT EDIT THIS FILE! ***
- *  ******************************
- *
- *  It has been GENERATED by src/tools/gen_keywordlist.pl
- *
- *-------------------------------------------------------------------------
- */
-
-#ifndef KWLIST_D_H
-#define KWLIST_D_H
-
-#include "common/kwlookup.h"
-
-static const char ScanKeywords_kw_string[] =
-	"abort\0"
-	"absent\0"
-	"absolute\0"
-	"access\0"
-	"action\0"
-	"add\0"
-	"admin\0"
-	"after\0"
-	"aggregate\0"
-	"all\0"
-	"also\0"
-	"alter\0"
-	"always\0"
-	"analyse\0"
-	"analyze\0"
-	"and\0"
-	"any\0"
-	"array\0"
-	"as\0"
-	"asc\0"
-	"asensitive\0"
-	"assertion\0"
-	"assignment\0"
-	"asymmetric\0"
-	"at\0"
-	"atomic\0"
-	"attach\0"
-	"attribute\0"
-	"authorization\0"
-	"backward\0"
-	"before\0"
-	"begin\0"
-	"between\0"
-	"bigint\0"
-	"binary\0"
-	"bit\0"
-	"boolean\0"
-	"both\0"
-	"breadth\0"
-	"by\0"
-	"cache\0"
-	"call\0"
-	"called\0"
-	"cascade\0"
-	"cascaded\0"
-	"case\0"
-	"cast\0"
-	"catalog\0"
-	"chain\0"
-	"char\0"
-	"character\0"
-	"characteristics\0"
-	"check\0"
-	"checkpoint\0"
-	"class\0"
-	"close\0"
-	"cluster\0"
-	"coalesce\0"
-	"collate\0"
-	"collation\0"
-	"column\0"
-	"columns\0"
-	"comment\0"
-	"comments\0"
-	"commit\0"
-	"committed\0"
-	"compression\0"
-	"concurrently\0"
-	"configuration\0"
-	"conflict\0"
-	"connection\0"
-	"constraint\0"
-	"constraints\0"
-	"content\0"
-	"continue\0"
-	"conversion\0"
-	"copy\0"
-	"cost\0"
-	"create\0"
-	"cross\0"
-	"csv\0"
-	"cube\0"
-	"current\0"
-	"current_catalog\0"
-	"current_date\0"
-	"current_role\0"
-	"current_schema\0"
-	"current_time\0"
-	"current_timestamp\0"
-	"current_user\0"
-	"cursor\0"
-	"cycle\0"
-	"data\0"
-	"database\0"
-	"day\0"
-	"deallocate\0"
-	"dec\0"
-	"decimal\0"
-	"declare\0"
-	"default\0"
-	"defaults\0"
-	"deferrable\0"
-	"deferred\0"
-	"definer\0"
-	"delete\0"
-	"delimiter\0"
-	"delimiters\0"
-	"depends\0"
-	"depth\0"
-	"desc\0"
-	"detach\0"
-	"dictionary\0"
-	"disable\0"
-	"discard\0"
-	"distinct\0"
-	"do\0"
-	"document\0"
-	"domain\0"
-	"double\0"
-	"drop\0"
-	"each\0"
-	"else\0"
-	"enable\0"
-	"encoding\0"
-	"encrypted\0"
-	"end\0"
-	"enum\0"
-	"escape\0"
-	"event\0"
-	"except\0"
-	"exclude\0"
-	"excluding\0"
-	"exclusive\0"
-	"execute\0"
-	"exists\0"
-	"explain\0"
-	"expression\0"
-	"extension\0"
-	"external\0"
-	"extract\0"
-	"false\0"
-	"family\0"
-	"fetch\0"
-	"filter\0"
-	"finalize\0"
-	"first\0"
-	"float\0"
-	"following\0"
-	"for\0"
-	"force\0"
-	"foreign\0"
-	"format\0"
-	"forward\0"
-	"freeze\0"
-	"from\0"
-	"full\0"
-	"function\0"
-	"functions\0"
-	"generated\0"
-	"global\0"
-	"grant\0"
-	"granted\0"
-	"greatest\0"
-	"group\0"
-	"grouping\0"
-	"groups\0"
-	"handler\0"
-	"having\0"
-	"header\0"
-	"hold\0"
-	"hour\0"
-	"identity\0"
-	"if\0"
-	"ilike\0"
-	"immediate\0"
-	"immutable\0"
-	"implicit\0"
-	"import\0"
-	"in\0"
-	"include\0"
-	"including\0"
-	"increment\0"
-	"indent\0"
-	"index\0"
-	"indexes\0"
-	"inherit\0"
-	"inherits\0"
-	"initially\0"
-	"inline\0"
-	"inner\0"
-	"inout\0"
-	"input\0"
-	"insensitive\0"
-	"insert\0"
-	"instead\0"
-	"int\0"
-	"integer\0"
-	"intersect\0"
-	"interval\0"
-	"into\0"
-	"invoker\0"
-	"is\0"
-	"isnull\0"
-	"isolation\0"
-	"join\0"
-	"json\0"
-	"json_array\0"
-	"json_arrayagg\0"
-	"json_object\0"
-	"json_objectagg\0"
-	"key\0"
-	"keys\0"
-	"label\0"
-	"language\0"
-	"large\0"
-	"last\0"
-	"lateral\0"
-	"leading\0"
-	"leakproof\0"
-	"least\0"
-	"left\0"
-	"level\0"
-	"like\0"
-	"limit\0"
-	"listen\0"
-	"load\0"
-	"local\0"
-	"localtime\0"
-	"localtimestamp\0"
-	"location\0"
-	"lock\0"
-	"locked\0"
-	"logged\0"
-	"mapping\0"
-	"match\0"
-	"matched\0"
-	"materialized\0"
-	"maxvalue\0"
-	"merge\0"
-	"method\0"
-	"minute\0"
-	"minvalue\0"
-	"mode\0"
-	"month\0"
-	"move\0"
-	"name\0"
-	"names\0"
-	"national\0"
-	"natural\0"
-	"nchar\0"
-	"new\0"
-	"next\0"
-	"nfc\0"
-	"nfd\0"
-	"nfkc\0"
-	"nfkd\0"
-	"no\0"
-	"none\0"
-	"normalize\0"
-	"normalized\0"
-	"not\0"
-	"nothing\0"
-	"notify\0"
-	"notnull\0"
-	"nowait\0"
-	"null\0"
-	"nullif\0"
-	"nulls\0"
-	"numeric\0"
-	"object\0"
-	"of\0"
-	"off\0"
-	"offset\0"
-	"oids\0"
-	"old\0"
-	"on\0"
-	"only\0"
-	"operator\0"
-	"option\0"
-	"options\0"
-	"or\0"
-	"order\0"
-	"ordinality\0"
-	"others\0"
-	"out\0"
-	"outer\0"
-	"over\0"
-	"overlaps\0"
-	"overlay\0"
-	"overriding\0"
-	"owned\0"
-	"owner\0"
-	"parallel\0"
-	"parameter\0"
-	"parser\0"
-	"partial\0"
-	"partition\0"
-	"passing\0"
-	"password\0"
-	"placing\0"
-	"plans\0"
-	"policy\0"
-	"position\0"
-	"preceding\0"
-	"precision\0"
-	"prepare\0"
-	"prepared\0"
-	"preserve\0"
-	"primary\0"
-	"prior\0"
-	"privileges\0"
-	"procedural\0"
-	"procedure\0"
-	"procedures\0"
-	"program\0"
-	"publication\0"
-	"quote\0"
-	"range\0"
-	"read\0"
-	"real\0"
-	"reassign\0"
-	"recheck\0"
-	"recursive\0"
-	"ref\0"
-	"references\0"
-	"referencing\0"
-	"refresh\0"
-	"reindex\0"
-	"relative\0"
-	"release\0"
-	"rename\0"
-	"repeatable\0"
-	"replace\0"
-	"replica\0"
-	"reset\0"
-	"restart\0"
-	"restrict\0"
-	"return\0"
-	"returning\0"
-	"returns\0"
-	"revoke\0"
-	"right\0"
-	"role\0"
-	"rollback\0"
-	"rollup\0"
-	"routine\0"
-	"routines\0"
-	"row\0"
-	"rows\0"
-	"rule\0"
-	"savepoint\0"
-	"scalar\0"
-	"schema\0"
-	"schemas\0"
-	"scroll\0"
-	"search\0"
-	"second\0"
-	"security\0"
-	"select\0"
-	"sequence\0"
-	"sequences\0"
-	"serializable\0"
-	"server\0"
-	"session\0"
-	"session_user\0"
-	"set\0"
-	"setof\0"
-	"sets\0"
-	"share\0"
-	"show\0"
-	"similar\0"
-	"simple\0"
-	"skip\0"
-	"smallint\0"
-	"snapshot\0"
-	"some\0"
-	"sql\0"
-	"stable\0"
-	"standalone\0"
-	"start\0"
-	"statement\0"
-	"statistics\0"
-	"stdin\0"
-	"stdout\0"
-	"storage\0"
-	"stored\0"
-	"strict\0"
-	"strip\0"
-	"subscription\0"
-	"substring\0"
-	"support\0"
-	"symmetric\0"
-	"sysid\0"
-	"system\0"
-	"system_user\0"
-	"table\0"
-	"tables\0"
-	"tablesample\0"
-	"tablespace\0"
-	"temp\0"
-	"template\0"
-	"temporary\0"
-	"text\0"
-	"then\0"
-	"ties\0"
-	"time\0"
-	"timestamp\0"
-	"to\0"
-	"trailing\0"
-	"transaction\0"
-	"transform\0"
-	"treat\0"
-	"trigger\0"
-	"trim\0"
-	"true\0"
-	"truncate\0"
-	"trusted\0"
-	"type\0"
-	"types\0"
-	"uescape\0"
-	"unbounded\0"
-	"uncommitted\0"
-	"unencrypted\0"
-	"union\0"
-	"unique\0"
-	"unknown\0"
-	"unlisten\0"
-	"unlogged\0"
-	"until\0"
-	"update\0"
-	"user\0"
-	"using\0"
-	"vacuum\0"
-	"valid\0"
-	"validate\0"
-	"validator\0"
-	"value\0"
-	"values\0"
-	"varchar\0"
-	"variadic\0"
-	"varying\0"
-	"verbose\0"
-	"version\0"
-	"view\0"
-	"views\0"
-	"volatile\0"
-	"when\0"
-	"where\0"
-	"whitespace\0"
-	"window\0"
-	"with\0"
-	"within\0"
-	"without\0"
-	"work\0"
-	"wrapper\0"
-	"write\0"
-	"xml\0"
-	"xmlattributes\0"
-	"xmlconcat\0"
-	"xmlelement\0"
-	"xmlexists\0"
-	"xmlforest\0"
-	"xmlnamespaces\0"
-	"xmlparse\0"
-	"xmlpi\0"
-	"xmlroot\0"
-	"xmlserialize\0"
-	"xmltable\0"
-	"year\0"
-	"yes\0"
-	"zone";
-
-static const uint16 ScanKeywords_kw_offsets[] = {
-	0,
-	6,
-	13,
-	22,
-	29,
-	36,
-	40,
-	46,
-	52,
-	62,
-	66,
-	71,
-	77,
-	84,
-	92,
-	100,
-	104,
-	108,
-	114,
-	117,
-	121,
-	132,
-	142,
-	153,
-	164,
-	167,
-	174,
-	181,
-	191,
-	205,
-	214,
-	221,
-	227,
-	235,
-	242,
-	249,
-	253,
-	261,
-	266,
-	274,
-	277,
-	283,
-	288,
-	295,
-	303,
-	312,
-	317,
-	322,
-	330,
-	336,
-	341,
-	351,
-	367,
-	373,
-	384,
-	390,
-	396,
-	404,
-	413,
-	421,
-	431,
-	438,
-	446,
-	454,
-	463,
-	470,
-	480,
-	492,
-	505,
-	519,
-	528,
-	539,
-	550,
-	562,
-	570,
-	579,
-	590,
-	595,
-	600,
-	607,
-	613,
-	617,
-	622,
-	630,
-	646,
-	659,
-	672,
-	687,
-	700,
-	718,
-	731,
-	738,
-	744,
-	749,
-	758,
-	762,
-	773,
-	777,
-	785,
-	793,
-	801,
-	810,
-	821,
-	830,
-	838,
-	845,
-	855,
-	866,
-	874,
-	880,
-	885,
-	892,
-	903,
-	911,
-	919,
-	928,
-	931,
-	940,
-	947,
-	954,
-	959,
-	964,
-	969,
-	976,
-	985,
-	995,
-	999,
-	1004,
-	1011,
-	1017,
-	1024,
-	1032,
-	1042,
-	1052,
-	1060,
-	1067,
-	1075,
-	1086,
-	1096,
-	1105,
-	1113,
-	1119,
-	1126,
-	1132,
-	1139,
-	1148,
-	1154,
-	1160,
-	1170,
-	1174,
-	1180,
-	1188,
-	1195,
-	1203,
-	1210,
-	1215,
-	1220,
-	1229,
-	1239,
-	1249,
-	1256,
-	1262,
-	1270,
-	1279,
-	1285,
-	1294,
-	1301,
-	1309,
-	1316,
-	1323,
-	1328,
-	1333,
-	1342,
-	1345,
-	1351,
-	1361,
-	1371,
-	1380,
-	1387,
-	1390,
-	1398,
-	1408,
-	1418,
-	1425,
-	1431,
-	1439,
-	1447,
-	1456,
-	1466,
-	1473,
-	1479,
-	1485,
-	1491,
-	1503,
-	1510,
-	1518,
-	1522,
-	1530,
-	1540,
-	1549,
-	1554,
-	1562,
-	1565,
-	1572,
-	1582,
-	1587,
-	1592,
-	1603,
-	1617,
-	1629,
-	1644,
-	1648,
-	1653,
-	1659,
-	1668,
-	1674,
-	1679,
-	1687,
-	1695,
-	1705,
-	1711,
-	1716,
-	1722,
-	1727,
-	1733,
-	1740,
-	1745,
-	1751,
-	1761,
-	1776,
-	1785,
-	1790,
-	1797,
-	1804,
-	1812,
-	1818,
-	1826,
-	1839,
-	1848,
-	1854,
-	1861,
-	1868,
-	1877,
-	1882,
-	1888,
-	1893,
-	1898,
-	1904,
-	1913,
-	1921,
-	1927,
-	1931,
-	1936,
-	1940,
-	1944,
-	1949,
-	1954,
-	1957,
-	1962,
-	1972,
-	1983,
-	1987,
-	1995,
-	2002,
-	2010,
-	2017,
-	2022,
-	2029,
-	2035,
-	2043,
-	2050,
-	2053,
-	2057,
-	2064,
-	2069,
-	2073,
-	2076,
-	2081,
-	2090,
-	2097,
-	2105,
-	2108,
-	2114,
-	2125,
-	2132,
-	2136,
-	2142,
-	2147,
-	2156,
-	2164,
-	2175,
-	2181,
-	2187,
-	2196,
-	2206,
-	2213,
-	2221,
-	2231,
-	2239,
-	2248,
-	2256,
-	2262,
-	2269,
-	2278,
-	2288,
-	2298,
-	2306,
-	2315,
-	2324,
-	2332,
-	2338,
-	2349,
-	2360,
-	2370,
-	2381,
-	2389,
-	2401,
-	2407,
-	2413,
-	2418,
-	2423,
-	2432,
-	2440,
-	2450,
-	2454,
-	2465,
-	2477,
-	2485,
-	2493,
-	2502,
-	2510,
-	2517,
-	2528,
-	2536,
-	2544,
-	2550,
-	2558,
-	2567,
-	2574,
-	2584,
-	2592,
-	2599,
-	2605,
-	2610,
-	2619,
-	2626,
-	2634,
-	2643,
-	2647,
-	2652,
-	2657,
-	2667,
-	2674,
-	2681,
-	2689,
-	2696,
-	2703,
-	2710,
-	2719,
-	2726,
-	2735,
-	2745,
-	2758,
-	2765,
-	2773,
-	2786,
-	2790,
-	2796,
-	2801,
-	2807,
-	2812,
-	2820,
-	2827,
-	2832,
-	2841,
-	2850,
-	2855,
-	2859,
-	2866,
-	2877,
-	2883,
-	2893,
-	2904,
-	2910,
-	2917,
-	2925,
-	2932,
-	2939,
-	2945,
-	2958,
-	2968,
-	2976,
-	2986,
-	2992,
-	2999,
-	3011,
-	3017,
-	3024,
-	3036,
-	3047,
-	3052,
-	3061,
-	3071,
-	3076,
-	3081,
-	3086,
-	3091,
-	3101,
-	3104,
-	3113,
-	3125,
-	3135,
-	3141,
-	3149,
-	3154,
-	3159,
-	3168,
-	3176,
-	3181,
-	3187,
-	3195,
-	3205,
-	3217,
-	3229,
-	3235,
-	3242,
-	3250,
-	3259,
-	3268,
-	3274,
-	3281,
-	3286,
-	3292,
-	3299,
-	3305,
-	3314,
-	3324,
-	3330,
-	3337,
-	3345,
-	3354,
-	3362,
-	3370,
-	3378,
-	3383,
-	3389,
-	3398,
-	3403,
-	3409,
-	3420,
-	3427,
-	3432,
-	3439,
-	3447,
-	3452,
-	3460,
-	3466,
-	3470,
-	3484,
-	3494,
-	3505,
-	3515,
-	3525,
-	3539,
-	3548,
-	3554,
-	3562,
-	3575,
-	3584,
-	3589,
-	3593,
-};
-
-#define SCANKEYWORDS_NUM_KEYWORDS 471
-
-static int
-ScanKeywords_hash_func(const void *key, size_t keylen)
-{
-	static const int16 h[943] = {
-		543,   -186,  201,   0,     32767, 32767, 32767, 32767,
-		221,   -207,  32767, 0,     135,   283,   32767, 454,
-		14,    79,    32767, 32767, 77,    32767, 102,   160,
-		0,     32767, 151,   32767, 30,    392,   -322,  452,
-		32767, 0,     32767, 0,     0,     32767, 32767, 32767,
-		234,   32767, 0,     32767, 0,     631,   32767, 368,
-		80,    0,     0,     -115,  32767, 285,   32767, 423,
-		0,     32767, 155,   229,   32767, 126,   291,   165,
-		-22,   400,   327,   32767, 32767, 32767, 32767, -399,
-		0,     406,   32767, 210,   1102,  -203,  32767, 32767,
-		32767, -944,  0,     -188,  32767, 32767, 0,     347,
-		32767, 0,     559,   316,   133,   32767, 202,   32767,
-		305,   0,     32767, -94,   32767, 0,     32767, -222,
-		32767, 138,   32767, -52,   32767, 32767, 279,   69,
-		-136,  0,     32767, 32767, 189,   32767, 32767, 88,
-		0,     32767, 32767, 274,   32767, 514,   769,   248,
-		32767, 32767, 32767, 32767, 32767, 32767, 0,     81,
-		8,     -29,   32767, 32767, 32767, -174,  258,   0,
-		465,   211,   32767, 0,     -229,  32767, -191,  32767,
-		1263,  48,    32767, 343,   0,     58,    0,     32767,
-		32767, 855,   0,     415,   0,     -217,  32767, 1195,
-		32767, 32767, 166,   32767, 42,    262,   -736,  0,
-		32767, 32767, 418,   178,   122,   32767, 46,    32767,
-		32767, 32767, 229,   443,   32767, 32767, 250,   32767,
-		-300,  0,     32767, 1153,  32767, 108,   32767, -462,
-		266,   32767, 478,   -220,  235,   32767, 32767, -127,
-		32767, 32767, 32767, 427,   -231,  156,   32767, 0,
-		0,     148,   -218,  142,   73,    420,   32767, 32767,
-		523,   32767, -36,   32767, 32767, 467,   844,   -415,
-		32767, 32767, -148,  179,   361,   32767, 151,   0,
-		0,     32767, 145,   32767, 248,   110,   29,    125,
-		282,   32767, -36,   43,    32767, 1125,  32767, 530,
-		251,   519,   191,   0,     32767, -34,   -502,  313,
-		462,   845,   32767, 32767, -255,  412,   32767, 78,
-		0,     32767, 444,   161,   0,     32767, 308,   32767,
-		-273,  400,   32767, 296,   32767, 32767, 72,    32767,
-		32767, 34,    32767, 364,   151,   -63,   4,     229,
-		0,     -276,  32767, 32767, 32767, 32767, -406,  32767,
-		203,   32767, 140,   187,   160,   32767, 286,   0,
-		32767, 32767, -88,   0,     100,   -361,  32767, 9,
-		0,     -456,  32767, -37,   -404,  32767, -969,  32767,
-		371,   95,    0,     703,   -31,   263,   373,   -745,
-		507,   14,    32767, -159,  0,     32767, 47,    299,
-		-126,  0,     32767, 83,    32767, 32767, 420,   236,
-		32767, 32767, 0,     310,   89,    233,   32767, 93,
-		32767, 0,     816,   60,    301,   211,   193,   0,
-		452,   -107,  -403,  -242,  353,   18,    32767, 32767,
-		32767, 243,   104,   32767, 32767, 32767, -305,  32767,
-		-1048, 54,    0,     383,   32767, 32767, 32767, 226,
-		319,   0,     32767, 32767, 32767, -130,  537,   32767,
-		0,     -206,  240,   696,   121,   32767, 180,   164,
-		32767, 390,   185,   32767, 220,   545,   29,    32767,
-		0,     32767, 32767, 1120,  -163,  32767, 32767, 32767,
-		-368,  136,   445,   171,   233,   32767, 73,    32767,
-		92,    32767, 0,     32767, 0,     208,   354,   32767,
-		54,    32767, 32767, -246,  -93,   389,   32767, 32767,
-		32767, 32767, 50,    32767, 32767, 308,   32767, -278,
-		0,     32767, 32767, -1172, 32767, 8,     32767, 0,
-		32767, 341,   304,   242,   -174,  -92,   76,    419,
-		32767, 87,    32767, -262,  32767, 32767, 32767, 109,
-		200,   0,     32767, 0,     85,    530,   32767, -316,
-		32767, 0,     -286,  32767, 193,   268,   32767, 32767,
-		278,   32767, 32767, 155,   445,   95,    -310,  32767,
-		207,   -56,   32767, 32767, 0,     -127,  232,   -283,
-		103,   32767, 1,     0,     32767, 32767, -485,  350,
-		79,    -56,   -354,  32767, 121,   24,    81,    20,
-		325,   40,    248,   32767, 32767, 32767, 358,   32767,
-		-56,   32767, 0,     174,   -28,   -301,  -92,   32767,
-		114,   295,   32767, 363,   -355,  32767, 290,   0,
-		32767, 32767, 32767, 122,   55,    -142,  32767, 50,
-		32767, 32767, 152,   571,   1397,  0,     472,   -448,
-		185,   140,   228,   435,   0,     32767, 32767, 414,
-		32767, 379,   92,    185,   23,    299,   32767, 32767,
-		0,     32767, 32767, 32767, 306,   439,   -198,  219,
-		340,   32767, 416,   0,     -123,  377,   32767, 32767,
-		0,     32767, 670,   -670,  339,   32767, 32767, 32767,
-		0,     -256,  70,    514,   331,   0,     302,   469,
-		0,     370,   32767, 32767, 42,    255,   212,   0,
-		322,   277,   32767, -163,  32767, 216,   32767, 32767,
-		0,     32767, 190,   32767, 32767, 0,     32767, 0,
-		-409,  1366,  32767, 32767, 32767, 193,   32767, 325,
-		32767, 0,     142,   466,   32767, 32767, 32767, 113,
-		32767, 32767, 62,    0,     -62,   113,   -90,   34,
-		-256,  32767, 32767, -936,  32767, 32767, 32767, 0,
-		-64,   0,     -34,   451,   290,   108,   32767, 276,
-		842,   0,     556,   -153,  32767, 412,   -168,  32767,
-		32767, 1331,  407,   234,   -60,   115,   457,   -73,
-		502,   772,   32767, 33,    404,   -925,  32767, 32767,
-		421,   -123,  32767, 32767, 32767, 0,     0,     32767,
-		32767, 32767, 429,   0,     3,     769,   -81,   306,
-		64,    32767, 192,   96,    0,     63,    44,    32767,
-		32767, 32767, 32767, 0,     284,   32767, 575,   32767,
-		32767, 12,    32767, 516,   116,   32767, 32767, 150,
-		442,   134,   32767, 198,   -45,   249,   40,    373,
-		32767, 0,     32767, 32767, 0,     0,     352,   32767,
-		117,   32767, 426,   0,     0,     32767, 32767, 32767,
-		32767, -92,   32767, -442,  32767, 269,   32767, 32767,
-		32767, 429,   32767, 0,     32767, 0,     143,   32767,
-		508,   -66,   32767, 280,   32767, 39,    162,   32767,
-		32767, 0,     32767, 31,    32767, 32767, 32767, 0,
-		32767, 257,   -90,   -249,  224,   272,   32767, 32767,
-		313,   -467,  214,   0,     -85,   32767, 48,    0,
-		32767, -336,  202,   0,     447,   90,    264,   32767,
-		32767, 0,     101,   32767, 32767, 32767, 0,     32767,
-		32767, 227,   -1093, 32767, 0,     32767, 27,    174,
-		32767, 7,     32767, -621,  146,   32767, 32767, 32767,
-		854,   0,     32767, 161,   0,     137,   32767, 32767,
-		32767, 32767, 0,     391,   219,   276,   32767, 168,
-		32767, 32767, 0,     32767, 32767, 32767, 1,     -4,
-		32767, 0,     293,   0,     374,   256,   0,     0,
-		32767, 355,   212,   404,   0,     186,   32767, 0,
-		359,   32767, 32767, 172,   32767, 32767, -131,  0,
-		402,   0,     56,    32767, 462,   389,   82,    0,
-		32767, 0,     32767, 0,     32767, 32767, 32767, 32767,
-		106,   425,   -160,  31,    32767, 55,    0,     0,
-		32767, 32767, 430,   1224,  179,   -179,  0,     397,
-		32767, 0,     0,     0,     -60,   47,    32767, 396,
-		32767, 326,   383,   369,   32767, 368,   32767
-	};
-
-	const unsigned char *k = (const unsigned char *) key;
-	uint32		a = 0;
-	uint32		b = 0;
-
-	while (keylen--)
-	{
-		unsigned char c = *k++ | 0x20;
-
-		a = a * 257 + c;
-		b = b * 31 + c;
-	}
-	return h[a % 943] + h[b % 943];
-}
-
-const ScanKeywordList ScanKeywords = {
-	ScanKeywords_kw_string,
-	ScanKeywords_kw_offsets,
-	ScanKeywords_hash_func,
-	SCANKEYWORDS_NUM_KEYWORDS,
-	17
-};
-
-#endif							/* KWLIST_D_H */
diff --git a/contrib/libs/libpq/src/common/kwlookup.c b/contrib/libs/libpq/src/common/kwlookup.c
deleted file mode 100644
index 7e49825c7b..0000000000
--- a/contrib/libs/libpq/src/common/kwlookup.c
+++ /dev/null
@@ -1,85 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * kwlookup.c
- *	  Key word lookup for PostgreSQL
- *
- *
- * Portions Copyright (c) 1996-2023, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- *
- * IDENTIFICATION
- *	  src/common/kwlookup.c
- *
- *-------------------------------------------------------------------------
- */
-#include "c.h"
-
-#include "common/kwlookup.h"
-
-
-/*
- * ScanKeywordLookup - see if a given word is a keyword
- *
- * The list of keywords to be matched against is passed as a ScanKeywordList.
- *
- * Returns the keyword number (0..N-1) of the keyword, or -1 if no match.
- * Callers typically use the keyword number to index into information
- * arrays, but that is no concern of this code.
- *
- * The match is done case-insensitively.  Note that we deliberately use a
- * dumbed-down case conversion that will only translate 'A'-'Z' into 'a'-'z',
- * even if we are in a locale where tolower() would produce more or different
- * translations.  This is to conform to the SQL99 spec, which says that
- * keywords are to be matched in this way even though non-keyword identifiers
- * receive a different case-normalization mapping.
- */
-int
-ScanKeywordLookup(const char *str,
-				  const ScanKeywordList *keywords)
-{
-	size_t		len;
-	int			h;
-	const char *kw;
-
-	/*
-	 * Reject immediately if too long to be any keyword.  This saves useless
-	 * hashing and downcasing work on long strings.
-	 */
-	len = strlen(str);
-	if (len > keywords->max_kw_len)
-		return -1;
-
-	/*
-	 * Compute the hash function.  We assume it was generated to produce
-	 * case-insensitive results.  Since it's a perfect hash, we need only
-	 * match to the specific keyword it identifies.
-	 */
-	h = keywords->hash(str, len);
-
-	/* An out-of-range result implies no match */
-	if (h < 0 || h >= keywords->num_keywords)
-		return -1;
-
-	/*
-	 * Compare character-by-character to see if we have a match, applying an
-	 * ASCII-only downcasing to the input characters.  We must not use
-	 * tolower() since it may produce the wrong translation in some locales
-	 * (eg, Turkish).
-	 */
-	kw = GetScanKeyword(h, keywords);
-	while (*str != '\0')
-	{
-		char		ch = *str++;
-
-		if (ch >= 'A' && ch <= 'Z')
-			ch += 'a' - 'A';
-		if (ch != *kw++)
-			return -1;
-	}
-	if (*kw != '\0')
-		return -1;
-
-	/* Success! */
-	return h;
-}
diff --git a/contrib/libs/libpq/src/common/link-canary.c b/contrib/libs/libpq/src/common/link-canary.c
deleted file mode 100644
index f84331a9a4..0000000000
--- a/contrib/libs/libpq/src/common/link-canary.c
+++ /dev/null
@@ -1,36 +0,0 @@
-/*-------------------------------------------------------------------------
- * link-canary.c
- *	  Detect whether src/common functions came from frontend or backend.
- *
- * Copyright (c) 2018-2023, PostgreSQL Global Development Group
- *
- * IDENTIFICATION
- *	  src/common/link-canary.c
- *
- *-------------------------------------------------------------------------
- */
-#include "c.h"
-
-#include "common/link-canary.h"
-
-/*
- * This function just reports whether this file was compiled for frontend
- * or backend environment.  We need this because in some systems, mainly
- * ELF-based platforms, it is possible for a shlib (such as libpq) loaded
- * into the backend to call a backend function named XYZ in preference to
- * the shlib's own function XYZ.  That's bad if the two functions don't
- * act identically.  This exact situation comes up for many functions in
- * src/common and src/port, where the same function names exist in both
- * libpq and the backend but they don't act quite identically.  To verify
- * that appropriate measures have been taken to prevent incorrect symbol
- * resolution, libpq should test that this function returns true.
- */
-bool
-pg_link_canary_is_frontend(void)
-{
-#ifdef FRONTEND
-	return true;
-#else
-	return false;
-#endif
-}
diff --git a/contrib/libs/libpq/src/common/logging.c b/contrib/libs/libpq/src/common/logging.c
deleted file mode 100644
index dab718b482..0000000000
--- a/contrib/libs/libpq/src/common/logging.c
+++ /dev/null
@@ -1,334 +0,0 @@
-/*-------------------------------------------------------------------------
- * Logging framework for frontend programs
- *
- * Copyright (c) 2018-2023, PostgreSQL Global Development Group
- *
- * src/common/logging.c
- *
- *-------------------------------------------------------------------------
- */
-
-#ifndef FRONTEND
-#error "This file is not expected to be compiled for backend code"
-#endif
-
-#include "postgres_fe.h"
-
-#include <unistd.h>
-
-#include "common/logging.h"
-
-enum pg_log_level __pg_log_level;
-
-static const char *progname;
-static int	log_flags;
-
-static void (*log_pre_callback) (void);
-static void (*log_locus_callback) (const char **, uint64 *);
-
-static const char *sgr_error = NULL;
-static const char *sgr_warning = NULL;
-static const char *sgr_note = NULL;
-static const char *sgr_locus = NULL;
-
-#define SGR_ERROR_DEFAULT "01;31"
-#define SGR_WARNING_DEFAULT "01;35"
-#define SGR_NOTE_DEFAULT "01;36"
-#define SGR_LOCUS_DEFAULT "01"
-
-#define ANSI_ESCAPE_FMT "\x1b[%sm"
-#define ANSI_ESCAPE_RESET "\x1b[0m"
-
-#ifdef WIN32
-
-#ifndef ENABLE_VIRTUAL_TERMINAL_PROCESSING
-#define ENABLE_VIRTUAL_TERMINAL_PROCESSING 0x0004
-#endif
-
-/*
- * Attempt to enable VT100 sequence processing for colorization on Windows.
- * If current environment is not VT100-compatible or if this mode could not
- * be enabled, return false.
- */
-static bool
-enable_vt_processing(void)
-{
-	/* Check stderr */
-	HANDLE		hOut = GetStdHandle(STD_ERROR_HANDLE);
-	DWORD		dwMode = 0;
-
-	if (hOut == INVALID_HANDLE_VALUE)
-		return false;
-
-	/*
-	 * Look for the current console settings and check if VT100 is already
-	 * enabled.
-	 */
-	if (!GetConsoleMode(hOut, &dwMode))
-		return false;
-	if ((dwMode & ENABLE_VIRTUAL_TERMINAL_PROCESSING) != 0)
-		return true;
-
-	dwMode |= ENABLE_VIRTUAL_TERMINAL_PROCESSING;
-	if (!SetConsoleMode(hOut, dwMode))
-		return false;
-	return true;
-}
-#endif							/* WIN32 */
-
-/*
- * This should be called before any output happens.
- */
-void
-pg_logging_init(const char *argv0)
-{
-	const char *pg_color_env = getenv("PG_COLOR");
-	bool		log_color = false;
-	bool		color_terminal = isatty(fileno(stderr));
-
-#ifdef WIN32
-
-	/*
-	 * On Windows, check if environment is VT100-compatible if using a
-	 * terminal.
-	 */
-	if (color_terminal)
-		color_terminal = enable_vt_processing();
-#endif
-
-	/* usually the default, but not on Windows */
-	setvbuf(stderr, NULL, _IONBF, 0);
-
-	progname = get_progname(argv0);
-	__pg_log_level = PG_LOG_INFO;
-
-	if (pg_color_env)
-	{
-		if (strcmp(pg_color_env, "always") == 0 ||
-			(strcmp(pg_color_env, "auto") == 0 && color_terminal))
-			log_color = true;
-	}
-
-	if (log_color)
-	{
-		const char *pg_colors_env = getenv("PG_COLORS");
-
-		if (pg_colors_env)
-		{
-			char	   *colors = strdup(pg_colors_env);
-
-			if (colors)
-			{
-				for (char *token = strtok(colors, ":"); token; token = strtok(NULL, ":"))
-				{
-					char	   *e = strchr(token, '=');
-
-					if (e)
-					{
-						char	   *name;
-						char	   *value;
-
-						*e = '\0';
-						name = token;
-						value = e + 1;
-
-						if (strcmp(name, "error") == 0)
-							sgr_error = strdup(value);
-						if (strcmp(name, "warning") == 0)
-							sgr_warning = strdup(value);
-						if (strcmp(name, "note") == 0)
-							sgr_note = strdup(value);
-						if (strcmp(name, "locus") == 0)
-							sgr_locus = strdup(value);
-					}
-				}
-
-				free(colors);
-			}
-		}
-		else
-		{
-			sgr_error = SGR_ERROR_DEFAULT;
-			sgr_warning = SGR_WARNING_DEFAULT;
-			sgr_note = SGR_NOTE_DEFAULT;
-			sgr_locus = SGR_LOCUS_DEFAULT;
-		}
-	}
-}
-
-/*
- * Change the logging flags.
- */
-void
-pg_logging_config(int new_flags)
-{
-	log_flags = new_flags;
-}
-
-/*
- * pg_logging_init sets the default log level to INFO.  Programs that prefer
- * a different default should use this to set it, immediately afterward.
- */
-void
-pg_logging_set_level(enum pg_log_level new_level)
-{
-	__pg_log_level = new_level;
-}
-
-/*
- * Command line switches such as --verbose should invoke this.
- */
-void
-pg_logging_increase_verbosity(void)
-{
-	/*
-	 * The enum values are chosen such that we have to decrease __pg_log_level
-	 * in order to become more verbose.
-	 */
-	if (__pg_log_level > PG_LOG_NOTSET + 1)
-		__pg_log_level--;
-}
-
-void
-pg_logging_set_pre_callback(void (*cb) (void))
-{
-	log_pre_callback = cb;
-}
-
-void
-pg_logging_set_locus_callback(void (*cb) (const char **filename, uint64 *lineno))
-{
-	log_locus_callback = cb;
-}
-
-void
-pg_log_generic(enum pg_log_level level, enum pg_log_part part,
-			   const char *pg_restrict fmt,...)
-{
-	va_list		ap;
-
-	va_start(ap, fmt);
-	pg_log_generic_v(level, part, fmt, ap);
-	va_end(ap);
-}
-
-void
-pg_log_generic_v(enum pg_log_level level, enum pg_log_part part,
-				 const char *pg_restrict fmt, va_list ap)
-{
-	int			save_errno = errno;
-	const char *filename = NULL;
-	uint64		lineno = 0;
-	va_list		ap2;
-	size_t		required_len;
-	char	   *buf;
-
-	Assert(progname);
-	Assert(level);
-	Assert(fmt);
-	Assert(fmt[strlen(fmt) - 1] != '\n');
-
-	/* Do nothing if log level is too low. */
-	if (level < __pg_log_level)
-		return;
-
-	/*
-	 * Flush stdout before output to stderr, to ensure sync even when stdout
-	 * is buffered.
-	 */
-	fflush(stdout);
-
-	if (log_pre_callback)
-		log_pre_callback();
-
-	if (log_locus_callback)
-		log_locus_callback(&filename, &lineno);
-
-	fmt = _(fmt);
-
-	if (!(log_flags & PG_LOG_FLAG_TERSE) || filename)
-	{
-		if (sgr_locus)
-			fprintf(stderr, ANSI_ESCAPE_FMT, sgr_locus);
-		if (!(log_flags & PG_LOG_FLAG_TERSE))
-			fprintf(stderr, "%s:", progname);
-		if (filename)
-		{
-			fprintf(stderr, "%s:", filename);
-			if (lineno > 0)
-				fprintf(stderr, UINT64_FORMAT ":", lineno);
-		}
-		fprintf(stderr, " ");
-		if (sgr_locus)
-			fprintf(stderr, ANSI_ESCAPE_RESET);
-	}
-
-	if (!(log_flags & PG_LOG_FLAG_TERSE))
-	{
-		switch (part)
-		{
-			case PG_LOG_PRIMARY:
-				switch (level)
-				{
-					case PG_LOG_ERROR:
-						if (sgr_error)
-							fprintf(stderr, ANSI_ESCAPE_FMT, sgr_error);
-						fprintf(stderr, _("error: "));
-						if (sgr_error)
-							fprintf(stderr, ANSI_ESCAPE_RESET);
-						break;
-					case PG_LOG_WARNING:
-						if (sgr_warning)
-							fprintf(stderr, ANSI_ESCAPE_FMT, sgr_warning);
-						fprintf(stderr, _("warning: "));
-						if (sgr_warning)
-							fprintf(stderr, ANSI_ESCAPE_RESET);
-						break;
-					default:
-						break;
-				}
-				break;
-			case PG_LOG_DETAIL:
-				if (sgr_note)
-					fprintf(stderr, ANSI_ESCAPE_FMT, sgr_note);
-				fprintf(stderr, _("detail: "));
-				if (sgr_note)
-					fprintf(stderr, ANSI_ESCAPE_RESET);
-				break;
-			case PG_LOG_HINT:
-				if (sgr_note)
-					fprintf(stderr, ANSI_ESCAPE_FMT, sgr_note);
-				fprintf(stderr, _("hint: "));
-				if (sgr_note)
-					fprintf(stderr, ANSI_ESCAPE_RESET);
-				break;
-		}
-	}
-
-	errno = save_errno;
-
-	va_copy(ap2, ap);
-	required_len = vsnprintf(NULL, 0, fmt, ap2) + 1;
-	va_end(ap2);
-
-	buf = pg_malloc_extended(required_len, MCXT_ALLOC_NO_OOM);
-
-	errno = save_errno;			/* malloc might change errno */
-
-	if (!buf)
-	{
-		/* memory trouble, just print what we can and get out of here */
-		vfprintf(stderr, fmt, ap);
-		return;
-	}
-
-	vsnprintf(buf, required_len, fmt, ap);
-
-	/* strip one newline, for PQerrorMessage() */
-	if (required_len >= 2 && buf[required_len - 2] == '\n')
-		buf[required_len - 2] = '\0';
-
-	fprintf(stderr, "%s\n", buf);
-
-	free(buf);
-}
diff --git a/contrib/libs/libpq/src/common/md5_common.c b/contrib/libs/libpq/src/common/md5_common.c
deleted file mode 100644
index 82ce75dcf2..0000000000
--- a/contrib/libs/libpq/src/common/md5_common.c
+++ /dev/null
@@ -1,172 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * md5_common.c
- *	  Routines shared between all MD5 implementations used for encrypted
- *	  passwords.
- *
- * Sverre H. Huseby <sverrehu@online.no>
- *
- * Portions Copyright (c) 1996-2023, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- * IDENTIFICATION
- *	  src/common/md5_common.c
- *
- *-------------------------------------------------------------------------
- */
-
-#ifndef FRONTEND
-#include "postgres.h"
-#else
-#include "postgres_fe.h"
-#endif
-
-#include "common/cryptohash.h"
-#include "common/md5.h"
-
-static void
-bytesToHex(uint8 b[16], char *s)
-{
-	static const char *hex = "0123456789abcdef";
-	int			q,
-				w;
-
-	for (q = 0, w = 0; q < 16; q++)
-	{
-		s[w++] = hex[(b[q] >> 4) & 0x0F];
-		s[w++] = hex[b[q] & 0x0F];
-	}
-	s[w] = '\0';
-}
-
-/*
- *	pg_md5_hash
- *
- *	Calculates the MD5 sum of the bytes in a buffer.
- *
- *	SYNOPSIS	  #include "md5.h"
- *				  int pg_md5_hash(const void *buff, size_t len, char *hexsum)
- *
- *	INPUT		  buff	  the buffer containing the bytes that you want
- *						  the MD5 sum of.
- *				  len	  number of bytes in the buffer.
- *
- *	OUTPUT		  hexsum  the MD5 sum as a '\0'-terminated string of
- *						  hexadecimal digits.  an MD5 sum is 16 bytes long.
- *						  each byte is represented by two hexadecimal
- *						  characters.  you thus need to provide an array
- *						  of 33 characters, including the trailing '\0'.
- *
- *				  errstr  filled with a constant-string error message
- *						  on failure return; NULL on success.
- *
- *	RETURNS		  false on failure (out of memory for internal buffers
- *				  or MD5 computation failure) or true on success.
- *
- *	STANDARDS	  MD5 is described in RFC 1321.
- *
- *	AUTHOR		  Sverre H. Huseby <sverrehu@online.no>
- *
- */
-
-bool
-pg_md5_hash(const void *buff, size_t len, char *hexsum, const char **errstr)
-{
-	uint8		sum[MD5_DIGEST_LENGTH];
-	pg_cryptohash_ctx *ctx;
-
-	*errstr = NULL;
-	ctx = pg_cryptohash_create(PG_MD5);
-	if (ctx == NULL)
-	{
-		*errstr = pg_cryptohash_error(NULL);	/* returns OOM */
-		return false;
-	}
-
-	if (pg_cryptohash_init(ctx) < 0 ||
-		pg_cryptohash_update(ctx, buff, len) < 0 ||
-		pg_cryptohash_final(ctx, sum, sizeof(sum)) < 0)
-	{
-		*errstr = pg_cryptohash_error(ctx);
-		pg_cryptohash_free(ctx);
-		return false;
-	}
-
-	bytesToHex(sum, hexsum);
-	pg_cryptohash_free(ctx);
-	return true;
-}
-
-/*
- * pg_md5_binary
- *
- * As above, except that the MD5 digest is returned as a binary string
- * (of size MD5_DIGEST_LENGTH) rather than being converted to ASCII hex.
- */
-bool
-pg_md5_binary(const void *buff, size_t len, void *outbuf, const char **errstr)
-{
-	pg_cryptohash_ctx *ctx;
-
-	*errstr = NULL;
-	ctx = pg_cryptohash_create(PG_MD5);
-	if (ctx == NULL)
-	{
-		*errstr = pg_cryptohash_error(NULL);	/* returns OOM */
-		return false;
-	}
-
-	if (pg_cryptohash_init(ctx) < 0 ||
-		pg_cryptohash_update(ctx, buff, len) < 0 ||
-		pg_cryptohash_final(ctx, outbuf, MD5_DIGEST_LENGTH) < 0)
-	{
-		*errstr = pg_cryptohash_error(ctx);
-		pg_cryptohash_free(ctx);
-		return false;
-	}
-
-	pg_cryptohash_free(ctx);
-	return true;
-}
-
-
-/*
- * Computes MD5 checksum of "passwd" (a null-terminated string) followed
- * by "salt" (which need not be null-terminated).
- *
- * Output format is "md5" followed by a 32-hex-digit MD5 checksum.
- * Hence, the output buffer "buf" must be at least 36 bytes long.
- *
- * Returns true if okay, false on error with *errstr providing some
- * error context.
- */
-bool
-pg_md5_encrypt(const char *passwd, const char *salt, size_t salt_len,
-			   char *buf, const char **errstr)
-{
-	size_t		passwd_len = strlen(passwd);
-
-	/* +1 here is just to avoid risk of unportable malloc(0) */
-	char	   *crypt_buf = malloc(passwd_len + salt_len + 1);
-	bool		ret;
-
-	if (!crypt_buf)
-	{
-		*errstr = _("out of memory");
-		return false;
-	}
-
-	/*
-	 * Place salt at the end because it may be known by users trying to crack
-	 * the MD5 output.
-	 */
-	memcpy(crypt_buf, passwd, passwd_len);
-	memcpy(crypt_buf + passwd_len, salt, salt_len);
-
-	strcpy(buf, "md5");
-	ret = pg_md5_hash(crypt_buf, passwd_len + salt_len, buf + 3, errstr);
-
-	free(crypt_buf);
-
-	return ret;
-}
diff --git a/contrib/libs/libpq/src/common/percentrepl.c b/contrib/libs/libpq/src/common/percentrepl.c
deleted file mode 100644
index 7aa85fdc94..0000000000
--- a/contrib/libs/libpq/src/common/percentrepl.c
+++ /dev/null
@@ -1,137 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * percentrepl.c
- *	  Common routines to replace percent placeholders in strings
- *
- * Portions Copyright (c) 1996-2023, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- *
- * IDENTIFICATION
- *	  src/common/percentrepl.c
- *
- *-------------------------------------------------------------------------
- */
-
-#ifndef FRONTEND
-#include "postgres.h"
-#else
-#include "postgres_fe.h"
-#include "common/logging.h"
-#endif
-
-#include "common/percentrepl.h"
-#include "lib/stringinfo.h"
-
-/*
- * replace_percent_placeholders
- *
- * Replace percent-letter placeholders in input string with the supplied
- * values.  For example, to replace %f with foo and %b with bar, call
- *
- * replace_percent_placeholders(instr, "param_name", "bf", bar, foo);
- *
- * The return value is palloc'd.
- *
- * "%%" is replaced by a single "%".
- *
- * This throws an error for an unsupported placeholder or a "%" at the end of
- * the input string.
- *
- * A value may be NULL.  If the corresponding placeholder is found in the
- * input string, it will be treated as if an unsupported placeholder was used.
- * This allows callers to share a "letters" specification but vary the
- * actually supported placeholders at run time.
- *
- * This functions is meant for cases where all the values are readily
- * available or cheap to compute and most invocations will use most values
- * (for example for archive_command).  Also, it requires that all values are
- * strings.  It won't be a good match for things like log prefixes or prompts
- * that use a mix of data types and any invocation will only use a few of the
- * possible values.
- *
- * param_name is the name of the underlying GUC parameter, for error
- * reporting.  At the moment, this function is only used for GUC parameters.
- * If other kinds of uses were added, the error reporting would need to be
- * revised.
- */
-char *
-replace_percent_placeholders(const char *instr, const char *param_name, const char *letters,...)
-{
-	StringInfoData result;
-
-	initStringInfo(&result);
-
-	for (const char *sp = instr; *sp; sp++)
-	{
-		if (*sp == '%')
-		{
-			if (sp[1] == '%')
-			{
-				/* Convert %% to a single % */
-				sp++;
-				appendStringInfoChar(&result, *sp);
-			}
-			else if (sp[1] == '\0')
-			{
-				/* Incomplete escape sequence, expected a character afterward */
-#ifdef FRONTEND
-				pg_log_error("invalid value for parameter \"%s\": \"%s\"", param_name, instr);
-				pg_log_error_detail("String ends unexpectedly after escape character \"%%\".");
-				exit(1);
-#else
-				ereport(ERROR,
-						errcode(ERRCODE_INVALID_PARAMETER_VALUE),
-						errmsg("invalid value for parameter \"%s\": \"%s\"", param_name, instr),
-						errdetail("String ends unexpectedly after escape character \"%%\"."));
-#endif
-			}
-			else
-			{
-				/* Look up placeholder character */
-				bool		found = false;
-				va_list		ap;
-
-				sp++;
-
-				va_start(ap, letters);
-				for (const char *lp = letters; *lp; lp++)
-				{
-					char	   *val = va_arg(ap, char *);
-
-					if (*sp == *lp)
-					{
-						if (val)
-						{
-							appendStringInfoString(&result, val);
-							found = true;
-						}
-						/* If val is NULL, we will report an error. */
-						break;
-					}
-				}
-				va_end(ap);
-				if (!found)
-				{
-					/* Unknown placeholder */
-#ifdef FRONTEND
-					pg_log_error("invalid value for parameter \"%s\": \"%s\"", param_name, instr);
-					pg_log_error_detail("String contains unexpected placeholder \"%%%c\".", *sp);
-					exit(1);
-#else
-					ereport(ERROR,
-							errcode(ERRCODE_INVALID_PARAMETER_VALUE),
-							errmsg("invalid value for parameter \"%s\": \"%s\"", param_name, instr),
-							errdetail("String contains unexpected placeholder \"%%%c\".", *sp));
-#endif
-				}
-			}
-		}
-		else
-		{
-			appendStringInfoChar(&result, *sp);
-		}
-	}
-
-	return result.data;
-}
diff --git a/contrib/libs/libpq/src/common/pg_get_line.c b/contrib/libs/libpq/src/common/pg_get_line.c
deleted file mode 100644
index 3cdf0908d2..0000000000
--- a/contrib/libs/libpq/src/common/pg_get_line.c
+++ /dev/null
@@ -1,180 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * pg_get_line.c
- *	  fgets() with an expansible result buffer
- *
- * Portions Copyright (c) 1996-2023, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- *
- * IDENTIFICATION
- *	  src/common/pg_get_line.c
- *
- *-------------------------------------------------------------------------
- */
-#ifndef FRONTEND
-#include "postgres.h"
-#else
-#include "postgres_fe.h"
-#endif
-
-#include <setjmp.h>
-
-#include "common/string.h"
-#include "lib/stringinfo.h"
-
-
-/*
- * pg_get_line()
- *
- * This is meant to be equivalent to fgets(), except that instead of
- * reading into a caller-supplied, fixed-size buffer, it reads into
- * a palloc'd (in frontend, really malloc'd) string, which is resized
- * as needed to handle indefinitely long input lines.  The caller is
- * responsible for pfree'ing the result string when appropriate.
- *
- * As with fgets(), returns NULL if there is a read error or if no
- * characters are available before EOF.  The caller can distinguish
- * these cases by checking ferror(stream).
- *
- * Since this is meant to be equivalent to fgets(), the trailing newline
- * (if any) is not stripped.  Callers may wish to apply pg_strip_crlf().
- *
- * Note that while I/O errors are reflected back to the caller to be
- * dealt with, an OOM condition for the palloc'd buffer will not be;
- * there'll be an ereport(ERROR) or exit(1) inside stringinfo.c.
- *
- * Also note that the palloc'd buffer is usually a lot longer than
- * strictly necessary, so it may be inadvisable to use this function
- * to collect lots of long-lived data.  A less memory-hungry option
- * is to use pg_get_line_buf() or pg_get_line_append() in a loop,
- * then pstrdup() each line.
- *
- * prompt_ctx can optionally be provided to allow this function to be
- * canceled via an existing SIGINT signal handler that will longjmp to the
- * specified place only when *(prompt_ctx->enabled) is true.  If canceled,
- * this function returns NULL, and prompt_ctx->canceled is set to true.
- */
-char *
-pg_get_line(FILE *stream, PromptInterruptContext *prompt_ctx)
-{
-	StringInfoData buf;
-
-	initStringInfo(&buf);
-
-	if (!pg_get_line_append(stream, &buf, prompt_ctx))
-	{
-		/* ensure that free() doesn't mess up errno */
-		int			save_errno = errno;
-
-		pfree(buf.data);
-		errno = save_errno;
-		return NULL;
-	}
-
-	return buf.data;
-}
-
-/*
- * pg_get_line_buf()
- *
- * This has similar behavior to pg_get_line(), and thence to fgets(),
- * except that the collected data is returned in a caller-supplied
- * StringInfo buffer.  This is a convenient API for code that just
- * wants to read and process one line at a time, without any artificial
- * limit on line length.
- *
- * Returns true if a line was successfully collected (including the
- * case of a non-newline-terminated line at EOF).  Returns false if
- * there was an I/O error or no data was available before EOF.
- * (Check ferror(stream) to distinguish these cases.)
- *
- * In the false-result case, buf is reset to empty.
- */
-bool
-pg_get_line_buf(FILE *stream, StringInfo buf)
-{
-	/* We just need to drop any data from the previous call */
-	resetStringInfo(buf);
-	return pg_get_line_append(stream, buf, NULL);
-}
-
-/*
- * pg_get_line_append()
- *
- * This has similar behavior to pg_get_line(), and thence to fgets(),
- * except that the collected data is appended to whatever is in *buf.
- * This is useful in preference to pg_get_line_buf() if the caller wants
- * to merge some lines together, e.g. to implement backslash continuation.
- *
- * Returns true if a line was successfully collected (including the
- * case of a non-newline-terminated line at EOF).  Returns false if
- * there was an I/O error or no data was available before EOF.
- * (Check ferror(stream) to distinguish these cases.)
- *
- * In the false-result case, the contents of *buf are logically unmodified,
- * though it's possible that the buffer has been resized.
- *
- * prompt_ctx can optionally be provided to allow this function to be
- * canceled via an existing SIGINT signal handler that will longjmp to the
- * specified place only when *(prompt_ctx->enabled) is true.  If canceled,
- * this function returns false, and prompt_ctx->canceled is set to true.
- */
-bool
-pg_get_line_append(FILE *stream, StringInfo buf,
-				   PromptInterruptContext *prompt_ctx)
-{
-	int			orig_len = buf->len;
-
-	if (prompt_ctx && sigsetjmp(*((sigjmp_buf *) prompt_ctx->jmpbuf), 1) != 0)
-	{
-		/* Got here with longjmp */
-		prompt_ctx->canceled = true;
-		/* Discard any data we collected before detecting error */
-		buf->len = orig_len;
-		buf->data[orig_len] = '\0';
-		return false;
-	}
-
-	/* Loop until newline or EOF/error */
-	for (;;)
-	{
-		char	   *res;
-
-		/* Enable longjmp while waiting for input */
-		if (prompt_ctx)
-			*(prompt_ctx->enabled) = true;
-
-		/* Read some data, appending it to whatever we already have */
-		res = fgets(buf->data + buf->len, buf->maxlen - buf->len, stream);
-
-		/* Disable longjmp again, then break if fgets failed */
-		if (prompt_ctx)
-			*(prompt_ctx->enabled) = false;
-
-		if (res == NULL)
-			break;
-
-		/* Got data, so update buf->len */
-		buf->len += strlen(buf->data + buf->len);
-
-		/* Done if we have collected a newline */
-		if (buf->len > orig_len && buf->data[buf->len - 1] == '\n')
-			return true;
-
-		/* Make some more room in the buffer, and loop to read more data */
-		enlargeStringInfo(buf, 128);
-	}
-
-	/* Check for I/O errors and EOF */
-	if (ferror(stream) || buf->len == orig_len)
-	{
-		/* Discard any data we collected before detecting error */
-		buf->len = orig_len;
-		buf->data[orig_len] = '\0';
-		return false;
-	}
-
-	/* No newline at EOF, but we did collect some data */
-	return true;
-}
diff --git a/contrib/libs/libpq/src/common/pg_lzcompress.c b/contrib/libs/libpq/src/common/pg_lzcompress.c
deleted file mode 100644
index 95ad3388ef..0000000000
--- a/contrib/libs/libpq/src/common/pg_lzcompress.c
+++ /dev/null
@@ -1,876 +0,0 @@
-/* ----------
- * pg_lzcompress.c -
- *
- *		This is an implementation of LZ compression for PostgreSQL.
- *		It uses a simple history table and generates 2-3 byte tags
- *		capable of backward copy information for 3-273 bytes with
- *		a max offset of 4095.
- *
- *		Entry routines:
- *
- *			int32
- *			pglz_compress(const char *source, int32 slen, char *dest,
- *						  const PGLZ_Strategy *strategy);
- *
- *				source is the input data to be compressed.
- *
- *				slen is the length of the input data.
- *
- *				dest is the output area for the compressed result.
- *					It must be at least as big as PGLZ_MAX_OUTPUT(slen).
- *
- *				strategy is a pointer to some information controlling
- *					the compression algorithm. If NULL, the compiled
- *					in default strategy is used.
- *
- *				The return value is the number of bytes written in the
- *				buffer dest, or -1 if compression fails; in the latter
- *				case the contents of dest are undefined.
- *
- *			int32
- *			pglz_decompress(const char *source, int32 slen, char *dest,
- *							int32 rawsize, bool check_complete)
- *
- *				source is the compressed input.
- *
- *				slen is the length of the compressed input.
- *
- *				dest is the area where the uncompressed data will be
- *					written to. It is the callers responsibility to
- *					provide enough space.
- *
- *					The data is written to buff exactly as it was handed
- *					to pglz_compress(). No terminating zero byte is added.
- *
- *				rawsize is the length of the uncompressed data.
- *
- *				check_complete is a flag to let us know if -1 should be
- *					returned in cases where we don't reach the end of the
- *					source or dest buffers, or not.  This should be false
- *					if the caller is asking for only a partial result and
- *					true otherwise.
- *
- *				The return value is the number of bytes written in the
- *				buffer dest, or -1 if decompression fails.
- *
- *		The decompression algorithm and internal data format:
- *
- *			It is made with the compressed data itself.
- *
- *			The data representation is easiest explained by describing
- *			the process of decompression.
- *
- *			If compressed_size == rawsize, then the data
- *			is stored uncompressed as plain bytes. Thus, the decompressor
- *			simply copies rawsize bytes to the destination.
- *
- *			Otherwise the first byte tells what to do the next 8 times.
- *			We call this the control byte.
- *
- *			An unset bit in the control byte means, that one uncompressed
- *			byte follows, which is copied from input to output.
- *
- *			A set bit in the control byte means, that a tag of 2-3 bytes
- *			follows. A tag contains information to copy some bytes, that
- *			are already in the output buffer, to the current location in
- *			the output. Let's call the three tag bytes T1, T2 and T3. The
- *			position of the data to copy is coded as an offset from the
- *			actual output position.
- *
- *			The offset is in the upper nibble of T1 and in T2.
- *			The length is in the lower nibble of T1.
- *
- *			So the 16 bits of a 2 byte tag are coded as
- *
- *				7---T1--0  7---T2--0
- *				OOOO LLLL  OOOO OOOO
- *
- *			This limits the offset to 1-4095 (12 bits) and the length
- *			to 3-18 (4 bits) because 3 is always added to it. To emit
- *			a tag of 2 bytes with a length of 2 only saves one control
- *			bit. But we lose one byte in the possible length of a tag.
- *
- *			In the actual implementation, the 2 byte tag's length is
- *			limited to 3-17, because the value 0xF in the length nibble
- *			has special meaning. It means, that the next following
- *			byte (T3) has to be added to the length value of 18. That
- *			makes total limits of 1-4095 for offset and 3-273 for length.
- *
- *			Now that we have successfully decoded a tag. We simply copy
- *			the output that occurred <offset> bytes back to the current
- *			output location in the specified <length>. Thus, a
- *			sequence of 200 spaces (think about bpchar fields) could be
- *			coded in 4 bytes. One literal space and a three byte tag to
- *			copy 199 bytes with a -1 offset. Whow - that's a compression
- *			rate of 98%! Well, the implementation needs to save the
- *			original data size too, so we need another 4 bytes for it
- *			and end up with a total compression rate of 96%, what's still
- *			worth a Whow.
- *
- *		The compression algorithm
- *
- *			The following uses numbers used in the default strategy.
- *
- *			The compressor works best for attributes of a size between
- *			1K and 1M. For smaller items there's not that much chance of
- *			redundancy in the character sequence (except for large areas
- *			of identical bytes like trailing spaces) and for bigger ones
- *			our 4K maximum look-back distance is too small.
- *
- *			The compressor creates a table for lists of positions.
- *			For each input position (except the last 3), a hash key is
- *			built from the 4 next input bytes and the position remembered
- *			in the appropriate list. Thus, the table points to linked
- *			lists of likely to be at least in the first 4 characters
- *			matching strings. This is done on the fly while the input
- *			is compressed into the output area.  Table entries are only
- *			kept for the last 4096 input positions, since we cannot use
- *			back-pointers larger than that anyway.  The size of the hash
- *			table is chosen based on the size of the input - a larger table
- *			has a larger startup cost, as it needs to be initialized to
- *			zero, but reduces the number of hash collisions on long inputs.
- *
- *			For each byte in the input, its hash key (built from this
- *			byte and the next 3) is used to find the appropriate list
- *			in the table. The lists remember the positions of all bytes
- *			that had the same hash key in the past in increasing backward
- *			offset order. Now for all entries in the used lists, the
- *			match length is computed by comparing the characters from the
- *			entries position with the characters from the actual input
- *			position.
- *
- *			The compressor starts with a so called "good_match" of 128.
- *			It is a "prefer speed against compression ratio" optimizer.
- *			So if the first entry looked at already has 128 or more
- *			matching characters, the lookup stops and that position is
- *			used for the next tag in the output.
- *
- *			For each subsequent entry in the history list, the "good_match"
- *			is lowered by 10%. So the compressor will be more happy with
- *			short matches the further it has to go back in the history.
- *			Another "speed against ratio" preference characteristic of
- *			the algorithm.
- *
- *			Thus there are 3 stop conditions for the lookup of matches:
- *
- *				- a match >= good_match is found
- *				- there are no more history entries to look at
- *				- the next history entry is already too far back
- *				  to be coded into a tag.
- *
- *			Finally the match algorithm checks that at least a match
- *			of 3 or more bytes has been found, because that is the smallest
- *			amount of copy information to code into a tag. If so, a tag
- *			is omitted and all the input bytes covered by that are just
- *			scanned for the history add's, otherwise a literal character
- *			is omitted and only his history entry added.
- *
- *		Acknowledgments:
- *
- *			Many thanks to Adisak Pochanayon, who's article about SLZ
- *			inspired me to write the PostgreSQL compression this way.
- *
- *			Jan Wieck
- *
- * Copyright (c) 1999-2023, PostgreSQL Global Development Group
- *
- * src/common/pg_lzcompress.c
- * ----------
- */
-#ifndef FRONTEND
-#include "postgres.h"
-#else
-#include "postgres_fe.h"
-#endif
-
-#include <limits.h>
-
-#include "common/pg_lzcompress.h"
-
-
-/* ----------
- * Local definitions
- * ----------
- */
-#define PGLZ_MAX_HISTORY_LISTS	8192	/* must be power of 2 */
-#define PGLZ_HISTORY_SIZE		4096
-#define PGLZ_MAX_MATCH			273
-
-
-/* ----------
- * PGLZ_HistEntry -
- *
- *		Linked list for the backward history lookup
- *
- * All the entries sharing a hash key are linked in a doubly linked list.
- * This makes it easy to remove an entry when it's time to recycle it
- * (because it's more than 4K positions old).
- * ----------
- */
-typedef struct PGLZ_HistEntry
-{
-	struct PGLZ_HistEntry *next;	/* links for my hash key's list */
-	struct PGLZ_HistEntry *prev;
-	int			hindex;			/* my current hash key */
-	const char *pos;			/* my input position */
-} PGLZ_HistEntry;
-
-
-/* ----------
- * The provided standard strategies
- * ----------
- */
-static const PGLZ_Strategy strategy_default_data = {
-	32,							/* Data chunks less than 32 bytes are not
-								 * compressed */
-	INT_MAX,					/* No upper limit on what we'll try to
-								 * compress */
-	25,							/* Require 25% compression rate, or not worth
-								 * it */
-	1024,						/* Give up if no compression in the first 1KB */
-	128,						/* Stop history lookup if a match of 128 bytes
-								 * is found */
-	10							/* Lower good match size by 10% at every loop
-								 * iteration */
-};
-const PGLZ_Strategy *const PGLZ_strategy_default = &strategy_default_data;
-
-
-static const PGLZ_Strategy strategy_always_data = {
-	0,							/* Chunks of any size are compressed */
-	INT_MAX,
-	0,							/* It's enough to save one single byte */
-	INT_MAX,					/* Never give up early */
-	128,						/* Stop history lookup if a match of 128 bytes
-								 * is found */
-	6							/* Look harder for a good match */
-};
-const PGLZ_Strategy *const PGLZ_strategy_always = &strategy_always_data;
-
-
-/* ----------
- * Statically allocated work arrays for history
- * ----------
- */
-static int16 hist_start[PGLZ_MAX_HISTORY_LISTS];
-static PGLZ_HistEntry hist_entries[PGLZ_HISTORY_SIZE + 1];
-
-/*
- * Element 0 in hist_entries is unused, and means 'invalid'. Likewise,
- * INVALID_ENTRY_PTR in next/prev pointers mean 'invalid'.
- */
-#define INVALID_ENTRY			0
-#define INVALID_ENTRY_PTR		(&hist_entries[INVALID_ENTRY])
-
-/* ----------
- * pglz_hist_idx -
- *
- *		Computes the history table slot for the lookup by the next 4
- *		characters in the input.
- *
- * NB: because we use the next 4 characters, we are not guaranteed to
- * find 3-character matches; they very possibly will be in the wrong
- * hash list.  This seems an acceptable tradeoff for spreading out the
- * hash keys more.
- * ----------
- */
-#define pglz_hist_idx(_s,_e, _mask) (										\
-			((((_e) - (_s)) < 4) ? (int) (_s)[0] :							\
-			 (((_s)[0] << 6) ^ ((_s)[1] << 4) ^								\
-			  ((_s)[2] << 2) ^ (_s)[3])) & (_mask)				\
-		)
-
-
-/* ----------
- * pglz_hist_add -
- *
- *		Adds a new entry to the history table.
- *
- * If _recycle is true, then we are recycling a previously used entry,
- * and must first delink it from its old hashcode's linked list.
- *
- * NOTE: beware of multiple evaluations of macro's arguments, and note that
- * _hn and _recycle are modified in the macro.
- * ----------
- */
-#define pglz_hist_add(_hs,_he,_hn,_recycle,_s,_e, _mask)	\
-do {									\
-			int __hindex = pglz_hist_idx((_s),(_e), (_mask));				\
-			int16 *__myhsp = &(_hs)[__hindex];								\
-			PGLZ_HistEntry *__myhe = &(_he)[_hn];							\
-			if (_recycle) {													\
-				if (__myhe->prev == NULL)									\
-					(_hs)[__myhe->hindex] = __myhe->next - (_he);			\
-				else														\
-					__myhe->prev->next = __myhe->next;						\
-				if (__myhe->next != NULL)									\
-					__myhe->next->prev = __myhe->prev;						\
-			}																\
-			__myhe->next = &(_he)[*__myhsp];								\
-			__myhe->prev = NULL;											\
-			__myhe->hindex = __hindex;										\
-			__myhe->pos  = (_s);											\
-			/* If there was an existing entry in this hash slot, link */	\
-			/* this new entry to it. However, the 0th entry in the */		\
-			/* entries table is unused, so we can freely scribble on it. */ \
-			/* So don't bother checking if the slot was used - we'll */		\
-			/* scribble on the unused entry if it was not, but that's */	\
-			/* harmless. Avoiding the branch in this critical path */		\
-			/* speeds this up a little bit. */								\
-			/* if (*__myhsp != INVALID_ENTRY) */							\
-				(_he)[(*__myhsp)].prev = __myhe;							\
-			*__myhsp = _hn;													\
-			if (++(_hn) >= PGLZ_HISTORY_SIZE + 1) {							\
-				(_hn) = 1;													\
-				(_recycle) = true;											\
-			}																\
-} while (0)
-
-
-/* ----------
- * pglz_out_ctrl -
- *
- *		Outputs the last and allocates a new control byte if needed.
- * ----------
- */
-#define pglz_out_ctrl(__ctrlp,__ctrlb,__ctrl,__buf) \
-do { \
-	if ((__ctrl & 0xff) == 0)												\
-	{																		\
-		*(__ctrlp) = __ctrlb;												\
-		__ctrlp = (__buf)++;												\
-		__ctrlb = 0;														\
-		__ctrl = 1;															\
-	}																		\
-} while (0)
-
-
-/* ----------
- * pglz_out_literal -
- *
- *		Outputs a literal byte to the destination buffer including the
- *		appropriate control bit.
- * ----------
- */
-#define pglz_out_literal(_ctrlp,_ctrlb,_ctrl,_buf,_byte) \
-do { \
-	pglz_out_ctrl(_ctrlp,_ctrlb,_ctrl,_buf);								\
-	*(_buf)++ = (unsigned char)(_byte);										\
-	_ctrl <<= 1;															\
-} while (0)
-
-
-/* ----------
- * pglz_out_tag -
- *
- *		Outputs a backward reference tag of 2-4 bytes (depending on
- *		offset and length) to the destination buffer including the
- *		appropriate control bit.
- * ----------
- */
-#define pglz_out_tag(_ctrlp,_ctrlb,_ctrl,_buf,_len,_off) \
-do { \
-	pglz_out_ctrl(_ctrlp,_ctrlb,_ctrl,_buf);								\
-	_ctrlb |= _ctrl;														\
-	_ctrl <<= 1;															\
-	if (_len > 17)															\
-	{																		\
-		(_buf)[0] = (unsigned char)((((_off) & 0xf00) >> 4) | 0x0f);		\
-		(_buf)[1] = (unsigned char)(((_off) & 0xff));						\
-		(_buf)[2] = (unsigned char)((_len) - 18);							\
-		(_buf) += 3;														\
-	} else {																\
-		(_buf)[0] = (unsigned char)((((_off) & 0xf00) >> 4) | ((_len) - 3)); \
-		(_buf)[1] = (unsigned char)((_off) & 0xff);							\
-		(_buf) += 2;														\
-	}																		\
-} while (0)
-
-
-/* ----------
- * pglz_find_match -
- *
- *		Lookup the history table if the actual input stream matches
- *		another sequence of characters, starting somewhere earlier
- *		in the input buffer.
- * ----------
- */
-static inline int
-pglz_find_match(int16 *hstart, const char *input, const char *end,
-				int *lenp, int *offp, int good_match, int good_drop, int mask)
-{
-	PGLZ_HistEntry *hent;
-	int16		hentno;
-	int32		len = 0;
-	int32		off = 0;
-
-	/*
-	 * Traverse the linked history list until a good enough match is found.
-	 */
-	hentno = hstart[pglz_hist_idx(input, end, mask)];
-	hent = &hist_entries[hentno];
-	while (hent != INVALID_ENTRY_PTR)
-	{
-		const char *ip = input;
-		const char *hp = hent->pos;
-		int32		thisoff;
-		int32		thislen;
-
-		/*
-		 * Stop if the offset does not fit into our tag anymore.
-		 */
-		thisoff = ip - hp;
-		if (thisoff >= 0x0fff)
-			break;
-
-		/*
-		 * Determine length of match. A better match must be larger than the
-		 * best so far. And if we already have a match of 16 or more bytes,
-		 * it's worth the call overhead to use memcmp() to check if this match
-		 * is equal for the same size. After that we must fallback to
-		 * character by character comparison to know the exact position where
-		 * the diff occurred.
-		 */
-		thislen = 0;
-		if (len >= 16)
-		{
-			if (memcmp(ip, hp, len) == 0)
-			{
-				thislen = len;
-				ip += len;
-				hp += len;
-				while (ip < end && *ip == *hp && thislen < PGLZ_MAX_MATCH)
-				{
-					thislen++;
-					ip++;
-					hp++;
-				}
-			}
-		}
-		else
-		{
-			while (ip < end && *ip == *hp && thislen < PGLZ_MAX_MATCH)
-			{
-				thislen++;
-				ip++;
-				hp++;
-			}
-		}
-
-		/*
-		 * Remember this match as the best (if it is)
-		 */
-		if (thislen > len)
-		{
-			len = thislen;
-			off = thisoff;
-		}
-
-		/*
-		 * Advance to the next history entry
-		 */
-		hent = hent->next;
-
-		/*
-		 * Be happy with lesser good matches the more entries we visited. But
-		 * no point in doing calculation if we're at end of list.
-		 */
-		if (hent != INVALID_ENTRY_PTR)
-		{
-			if (len >= good_match)
-				break;
-			good_match -= (good_match * good_drop) / 100;
-		}
-	}
-
-	/*
-	 * Return match information only if it results at least in one byte
-	 * reduction.
-	 */
-	if (len > 2)
-	{
-		*lenp = len;
-		*offp = off;
-		return 1;
-	}
-
-	return 0;
-}
-
-
-/* ----------
- * pglz_compress -
- *
- *		Compresses source into dest using strategy. Returns the number of
- *		bytes written in buffer dest, or -1 if compression fails.
- * ----------
- */
-int32
-pglz_compress(const char *source, int32 slen, char *dest,
-			  const PGLZ_Strategy *strategy)
-{
-	unsigned char *bp = (unsigned char *) dest;
-	unsigned char *bstart = bp;
-	int			hist_next = 1;
-	bool		hist_recycle = false;
-	const char *dp = source;
-	const char *dend = source + slen;
-	unsigned char ctrl_dummy = 0;
-	unsigned char *ctrlp = &ctrl_dummy;
-	unsigned char ctrlb = 0;
-	unsigned char ctrl = 0;
-	bool		found_match = false;
-	int32		match_len;
-	int32		match_off;
-	int32		good_match;
-	int32		good_drop;
-	int32		result_size;
-	int32		result_max;
-	int32		need_rate;
-	int			hashsz;
-	int			mask;
-
-	/*
-	 * Our fallback strategy is the default.
-	 */
-	if (strategy == NULL)
-		strategy = PGLZ_strategy_default;
-
-	/*
-	 * If the strategy forbids compression (at all or if source chunk size out
-	 * of range), fail.
-	 */
-	if (strategy->match_size_good <= 0 ||
-		slen < strategy->min_input_size ||
-		slen > strategy->max_input_size)
-		return -1;
-
-	/*
-	 * Limit the match parameters to the supported range.
-	 */
-	good_match = strategy->match_size_good;
-	if (good_match > PGLZ_MAX_MATCH)
-		good_match = PGLZ_MAX_MATCH;
-	else if (good_match < 17)
-		good_match = 17;
-
-	good_drop = strategy->match_size_drop;
-	if (good_drop < 0)
-		good_drop = 0;
-	else if (good_drop > 100)
-		good_drop = 100;
-
-	need_rate = strategy->min_comp_rate;
-	if (need_rate < 0)
-		need_rate = 0;
-	else if (need_rate > 99)
-		need_rate = 99;
-
-	/*
-	 * Compute the maximum result size allowed by the strategy, namely the
-	 * input size minus the minimum wanted compression rate.  This had better
-	 * be <= slen, else we might overrun the provided output buffer.
-	 */
-	if (slen > (INT_MAX / 100))
-	{
-		/* Approximate to avoid overflow */
-		result_max = (slen / 100) * (100 - need_rate);
-	}
-	else
-		result_max = (slen * (100 - need_rate)) / 100;
-
-	/*
-	 * Experiments suggest that these hash sizes work pretty well. A large
-	 * hash table minimizes collision, but has a higher startup cost. For a
-	 * small input, the startup cost dominates. The table size must be a power
-	 * of two.
-	 */
-	if (slen < 128)
-		hashsz = 512;
-	else if (slen < 256)
-		hashsz = 1024;
-	else if (slen < 512)
-		hashsz = 2048;
-	else if (slen < 1024)
-		hashsz = 4096;
-	else
-		hashsz = 8192;
-	mask = hashsz - 1;
-
-	/*
-	 * Initialize the history lists to empty.  We do not need to zero the
-	 * hist_entries[] array; its entries are initialized as they are used.
-	 */
-	memset(hist_start, 0, hashsz * sizeof(int16));
-
-	/*
-	 * Compress the source directly into the output buffer.
-	 */
-	while (dp < dend)
-	{
-		/*
-		 * If we already exceeded the maximum result size, fail.
-		 *
-		 * We check once per loop; since the loop body could emit as many as 4
-		 * bytes (a control byte and 3-byte tag), PGLZ_MAX_OUTPUT() had better
-		 * allow 4 slop bytes.
-		 */
-		if (bp - bstart >= result_max)
-			return -1;
-
-		/*
-		 * If we've emitted more than first_success_by bytes without finding
-		 * anything compressible at all, fail.  This lets us fall out
-		 * reasonably quickly when looking at incompressible input (such as
-		 * pre-compressed data).
-		 */
-		if (!found_match && bp - bstart >= strategy->first_success_by)
-			return -1;
-
-		/*
-		 * Try to find a match in the history
-		 */
-		if (pglz_find_match(hist_start, dp, dend, &match_len,
-							&match_off, good_match, good_drop, mask))
-		{
-			/*
-			 * Create the tag and add history entries for all matched
-			 * characters.
-			 */
-			pglz_out_tag(ctrlp, ctrlb, ctrl, bp, match_len, match_off);
-			while (match_len--)
-			{
-				pglz_hist_add(hist_start, hist_entries,
-							  hist_next, hist_recycle,
-							  dp, dend, mask);
-				dp++;			/* Do not do this ++ in the line above! */
-				/* The macro would do it four times - Jan.  */
-			}
-			found_match = true;
-		}
-		else
-		{
-			/*
-			 * No match found. Copy one literal byte.
-			 */
-			pglz_out_literal(ctrlp, ctrlb, ctrl, bp, *dp);
-			pglz_hist_add(hist_start, hist_entries,
-						  hist_next, hist_recycle,
-						  dp, dend, mask);
-			dp++;				/* Do not do this ++ in the line above! */
-			/* The macro would do it four times - Jan.  */
-		}
-	}
-
-	/*
-	 * Write out the last control byte and check that we haven't overrun the
-	 * output size allowed by the strategy.
-	 */
-	*ctrlp = ctrlb;
-	result_size = bp - bstart;
-	if (result_size >= result_max)
-		return -1;
-
-	/* success */
-	return result_size;
-}
-
-
-/* ----------
- * pglz_decompress -
- *
- *		Decompresses source into dest. Returns the number of bytes
- *		decompressed into the destination buffer, or -1 if the
- *		compressed data is corrupted.
- *
- *		If check_complete is true, the data is considered corrupted
- *		if we don't exactly fill the destination buffer.  Callers that
- *		are extracting a slice typically can't apply this check.
- * ----------
- */
-int32
-pglz_decompress(const char *source, int32 slen, char *dest,
-				int32 rawsize, bool check_complete)
-{
-	const unsigned char *sp;
-	const unsigned char *srcend;
-	unsigned char *dp;
-	unsigned char *destend;
-
-	sp = (const unsigned char *) source;
-	srcend = ((const unsigned char *) source) + slen;
-	dp = (unsigned char *) dest;
-	destend = dp + rawsize;
-
-	while (sp < srcend && dp < destend)
-	{
-		/*
-		 * Read one control byte and process the next 8 items (or as many as
-		 * remain in the compressed input).
-		 */
-		unsigned char ctrl = *sp++;
-		int			ctrlc;
-
-		for (ctrlc = 0; ctrlc < 8 && sp < srcend && dp < destend; ctrlc++)
-		{
-			if (ctrl & 1)
-			{
-				/*
-				 * Set control bit means we must read a match tag. The match
-				 * is coded with two bytes. First byte uses lower nibble to
-				 * code length - 3. Higher nibble contains upper 4 bits of the
-				 * offset. The next following byte contains the lower 8 bits
-				 * of the offset. If the length is coded as 18, another
-				 * extension tag byte tells how much longer the match really
-				 * was (0-255).
-				 */
-				int32		len;
-				int32		off;
-
-				len = (sp[0] & 0x0f) + 3;
-				off = ((sp[0] & 0xf0) << 4) | sp[1];
-				sp += 2;
-				if (len == 18)
-					len += *sp++;
-
-				/*
-				 * Check for corrupt data: if we fell off the end of the
-				 * source, or if we obtained off = 0, or if off is more than
-				 * the distance back to the buffer start, we have problems.
-				 * (We must check for off = 0, else we risk an infinite loop
-				 * below in the face of corrupt data.  Likewise, the upper
-				 * limit on off prevents accessing outside the buffer
-				 * boundaries.)
-				 */
-				if (unlikely(sp > srcend || off == 0 ||
-							 off > (dp - (unsigned char *) dest)))
-					return -1;
-
-				/*
-				 * Don't emit more data than requested.
-				 */
-				len = Min(len, destend - dp);
-
-				/*
-				 * Now we copy the bytes specified by the tag from OUTPUT to
-				 * OUTPUT (copy len bytes from dp - off to dp).  The copied
-				 * areas could overlap, so to avoid undefined behavior in
-				 * memcpy(), be careful to copy only non-overlapping regions.
-				 *
-				 * Note that we cannot use memmove() instead, since while its
-				 * behavior is well-defined, it's also not what we want.
-				 */
-				while (off < len)
-				{
-					/*
-					 * We can safely copy "off" bytes since that clearly
-					 * results in non-overlapping source and destination.
-					 */
-					memcpy(dp, dp - off, off);
-					len -= off;
-					dp += off;
-
-					/*----------
-					 * This bit is less obvious: we can double "off" after
-					 * each such step.  Consider this raw input:
-					 *		112341234123412341234
-					 * This will be encoded as 5 literal bytes "11234" and
-					 * then a match tag with length 16 and offset 4.  After
-					 * memcpy'ing the first 4 bytes, we will have emitted
-					 *		112341234
-					 * so we can double "off" to 8, then after the next step
-					 * we have emitted
-					 *		11234123412341234
-					 * Then we can double "off" again, after which it is more
-					 * than the remaining "len" so we fall out of this loop
-					 * and finish with a non-overlapping copy of the
-					 * remainder.  In general, a match tag with off < len
-					 * implies that the decoded data has a repeat length of
-					 * "off".  We can handle 1, 2, 4, etc repetitions of the
-					 * repeated string per memcpy until we get to a situation
-					 * where the final copy step is non-overlapping.
-					 *
-					 * (Another way to understand this is that we are keeping
-					 * the copy source point dp - off the same throughout.)
-					 *----------
-					 */
-					off += off;
-				}
-				memcpy(dp, dp - off, len);
-				dp += len;
-			}
-			else
-			{
-				/*
-				 * An unset control bit means LITERAL BYTE. So we just copy
-				 * one from INPUT to OUTPUT.
-				 */
-				*dp++ = *sp++;
-			}
-
-			/*
-			 * Advance the control bit
-			 */
-			ctrl >>= 1;
-		}
-	}
-
-	/*
-	 * If requested, check we decompressed the right amount.
-	 */
-	if (check_complete && (dp != destend || sp != srcend))
-		return -1;
-
-	/*
-	 * That's it.
-	 */
-	return (char *) dp - dest;
-}
-
-
-/* ----------
- * pglz_maximum_compressed_size -
- *
- *		Calculate the maximum compressed size for a given amount of raw data.
- *		Return the maximum size, or total compressed size if maximum size is
- *		larger than total compressed size.
- *
- * We can't use PGLZ_MAX_OUTPUT for this purpose, because that's used to size
- * the compression buffer (and abort the compression). It does not really say
- * what's the maximum compressed size for an input of a given length, and it
- * may happen that while the whole value is compressible (and thus fits into
- * PGLZ_MAX_OUTPUT nicely), the prefix is not compressible at all.
- * ----------
- */
-int32
-pglz_maximum_compressed_size(int32 rawsize, int32 total_compressed_size)
-{
-	int64		compressed_size;
-
-	/*
-	 * pglz uses one control bit per byte, so if the entire desired prefix is
-	 * represented as literal bytes, we'll need (rawsize * 9) bits.  We care
-	 * about bytes though, so be sure to round up not down.
-	 *
-	 * Use int64 here to prevent overflow during calculation.
-	 */
-	compressed_size = ((int64) rawsize * 9 + 7) / 8;
-
-	/*
-	 * The above fails to account for a corner case: we could have compressed
-	 * data that starts with N-1 or N-2 literal bytes and then has a match tag
-	 * of 2 or 3 bytes.  It's therefore possible that we need to fetch 1 or 2
-	 * more bytes in order to have the whole match tag.  (Match tags earlier
-	 * in the compressed data don't cause a problem, since they should
-	 * represent more decompressed bytes than they occupy themselves.)
-	 */
-	compressed_size += 2;
-
-	/*
-	 * Maximum compressed size can't be larger than total compressed size.
-	 * (This also ensures that our result fits in int32.)
-	 */
-	compressed_size = Min(compressed_size, total_compressed_size);
-
-	return (int32) compressed_size;
-}
diff --git a/contrib/libs/libpq/src/common/pg_prng.c b/contrib/libs/libpq/src/common/pg_prng.c
deleted file mode 100644
index c7bb92ede3..0000000000
--- a/contrib/libs/libpq/src/common/pg_prng.c
+++ /dev/null
@@ -1,282 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * Pseudo-Random Number Generator
- *
- * We use Blackman and Vigna's xoroshiro128** 1.0 algorithm
- * to have a small, fast PRNG suitable for generating reasonably
- * good-quality 64-bit data.  This should not be considered
- * cryptographically strong, however.
- *
- * About these generators: https://prng.di.unimi.it/
- * See also https://en.wikipedia.org/wiki/List_of_random_number_generators
- *
- * Copyright (c) 2021-2023, PostgreSQL Global Development Group
- *
- * src/common/pg_prng.c
- *
- *-------------------------------------------------------------------------
- */
-
-#include "c.h"
-
-#include <math.h>
-
-#include "common/pg_prng.h"
-#include "port/pg_bitutils.h"
-
-/* X/Open (XSI) requires <math.h> to provide M_PI, but core POSIX does not */
-#ifndef M_PI
-#define M_PI 3.14159265358979323846
-#endif
-
-
-/* process-wide state vector */
-pg_prng_state pg_global_prng_state;
-
-
-/*
- * 64-bit rotate left
- */
-static inline uint64
-rotl(uint64 x, int bits)
-{
-	return (x << bits) | (x >> (64 - bits));
-}
-
-/*
- * The basic xoroshiro128** algorithm.
- * Generates and returns a 64-bit uniformly distributed number,
- * updating the state vector for next time.
- *
- * Note: the state vector must not be all-zeroes, as that is a fixed point.
- */
-static uint64
-xoroshiro128ss(pg_prng_state *state)
-{
-	uint64		s0 = state->s0,
-				sx = state->s1 ^ s0,
-				val = rotl(s0 * 5, 7) * 9;
-
-	/* update state */
-	state->s0 = rotl(s0, 24) ^ sx ^ (sx << 16);
-	state->s1 = rotl(sx, 37);
-
-	return val;
-}
-
-/*
- * We use this generator just to fill the xoroshiro128** state vector
- * from a 64-bit seed.
- */
-static uint64
-splitmix64(uint64 *state)
-{
-	/* state update */
-	uint64		val = (*state += UINT64CONST(0x9E3779B97f4A7C15));
-
-	/* value extraction */
-	val = (val ^ (val >> 30)) * UINT64CONST(0xBF58476D1CE4E5B9);
-	val = (val ^ (val >> 27)) * UINT64CONST(0x94D049BB133111EB);
-
-	return val ^ (val >> 31);
-}
-
-/*
- * Initialize the PRNG state from a 64-bit integer,
- * taking care that we don't produce all-zeroes.
- */
-void
-pg_prng_seed(pg_prng_state *state, uint64 seed)
-{
-	state->s0 = splitmix64(&seed);
-	state->s1 = splitmix64(&seed);
-	/* Let's just make sure we didn't get all-zeroes */
-	(void) pg_prng_seed_check(state);
-}
-
-/*
- * Initialize the PRNG state from a double in the range [-1.0, 1.0],
- * taking care that we don't produce all-zeroes.
- */
-void
-pg_prng_fseed(pg_prng_state *state, double fseed)
-{
-	/* Assume there's about 52 mantissa bits; the sign contributes too. */
-	int64		seed = ((double) ((UINT64CONST(1) << 52) - 1)) * fseed;
-
-	pg_prng_seed(state, (uint64) seed);
-}
-
-/*
- * Validate a PRNG seed value.
- */
-bool
-pg_prng_seed_check(pg_prng_state *state)
-{
-	/*
-	 * If the seeding mechanism chanced to produce all-zeroes, insert
-	 * something nonzero.  Anything would do; use Knuth's LCG parameters.
-	 */
-	if (unlikely(state->s0 == 0 && state->s1 == 0))
-	{
-		state->s0 = UINT64CONST(0x5851F42D4C957F2D);
-		state->s1 = UINT64CONST(0x14057B7EF767814F);
-	}
-
-	/* As a convenience for the pg_prng_strong_seed macro, return true */
-	return true;
-}
-
-/*
- * Select a random uint64 uniformly from the range [0, PG_UINT64_MAX].
- */
-uint64
-pg_prng_uint64(pg_prng_state *state)
-{
-	return xoroshiro128ss(state);
-}
-
-/*
- * Select a random uint64 uniformly from the range [rmin, rmax].
- * If the range is empty, rmin is always produced.
- */
-uint64
-pg_prng_uint64_range(pg_prng_state *state, uint64 rmin, uint64 rmax)
-{
-	uint64		val;
-
-	if (likely(rmax > rmin))
-	{
-		/*
-		 * Use bitmask rejection method to generate an offset in 0..range.
-		 * Each generated val is less than twice "range", so on average we
-		 * should not have to iterate more than twice.
-		 */
-		uint64		range = rmax - rmin;
-		uint32		rshift = 63 - pg_leftmost_one_pos64(range);
-
-		do
-		{
-			val = xoroshiro128ss(state) >> rshift;
-		} while (val > range);
-	}
-	else
-		val = 0;
-
-	return rmin + val;
-}
-
-/*
- * Select a random int64 uniformly from the range [PG_INT64_MIN, PG_INT64_MAX].
- */
-int64
-pg_prng_int64(pg_prng_state *state)
-{
-	return (int64) xoroshiro128ss(state);
-}
-
-/*
- * Select a random int64 uniformly from the range [0, PG_INT64_MAX].
- */
-int64
-pg_prng_int64p(pg_prng_state *state)
-{
-	return (int64) (xoroshiro128ss(state) & UINT64CONST(0x7FFFFFFFFFFFFFFF));
-}
-
-/*
- * Select a random uint32 uniformly from the range [0, PG_UINT32_MAX].
- */
-uint32
-pg_prng_uint32(pg_prng_state *state)
-{
-	/*
-	 * Although xoroshiro128** is not known to have any weaknesses in
-	 * randomness of low-order bits, we prefer to use the upper bits of its
-	 * result here and below.
-	 */
-	uint64		v = xoroshiro128ss(state);
-
-	return (uint32) (v >> 32);
-}
-
-/*
- * Select a random int32 uniformly from the range [PG_INT32_MIN, PG_INT32_MAX].
- */
-int32
-pg_prng_int32(pg_prng_state *state)
-{
-	uint64		v = xoroshiro128ss(state);
-
-	return (int32) (v >> 32);
-}
-
-/*
- * Select a random int32 uniformly from the range [0, PG_INT32_MAX].
- */
-int32
-pg_prng_int32p(pg_prng_state *state)
-{
-	uint64		v = xoroshiro128ss(state);
-
-	return (int32) (v >> 33);
-}
-
-/*
- * Select a random double uniformly from the range [0.0, 1.0).
- *
- * Note: if you want a result in the range (0.0, 1.0], the standard way
- * to get that is "1.0 - pg_prng_double(state)".
- */
-double
-pg_prng_double(pg_prng_state *state)
-{
-	uint64		v = xoroshiro128ss(state);
-
-	/*
-	 * As above, assume there's 52 mantissa bits in a double.  This result
-	 * could round to 1.0 if double's precision is less than that; but we
-	 * assume IEEE float arithmetic elsewhere in Postgres, so this seems OK.
-	 */
-	return ldexp((double) (v >> (64 - 52)), -52);
-}
-
-/*
- * Select a random double from the normal distribution with
- * mean = 0.0 and stddev = 1.0.
- *
- * To get a result from a different normal distribution use
- *   STDDEV * pg_prng_double_normal() + MEAN
- *
- * Uses https://en.wikipedia.org/wiki/Box%E2%80%93Muller_transform
- */
-double
-pg_prng_double_normal(pg_prng_state *state)
-{
-	double		u1,
-				u2,
-				z0;
-
-	/*
-	 * pg_prng_double generates [0, 1), but for the basic version of the
-	 * Box-Muller transform the two uniformly distributed random numbers are
-	 * expected to be in (0, 1]; in particular we'd better not compute log(0).
-	 */
-	u1 = 1.0 - pg_prng_double(state);
-	u2 = 1.0 - pg_prng_double(state);
-
-	/* Apply Box-Muller transform to get one normal-valued output */
-	z0 = sqrt(-2.0 * log(u1)) * sin(2.0 * M_PI * u2);
-	return z0;
-}
-
-/*
- * Select a random boolean value.
- */
-bool
-pg_prng_bool(pg_prng_state *state)
-{
-	uint64		v = xoroshiro128ss(state);
-
-	return (bool) (v >> 63);
-}
diff --git a/contrib/libs/libpq/src/common/pgfnames.c b/contrib/libs/libpq/src/common/pgfnames.c
deleted file mode 100644
index 9d2fe9d659..0000000000
--- a/contrib/libs/libpq/src/common/pgfnames.c
+++ /dev/null
@@ -1,94 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * pgfnames.c
- *	  directory handling functions
- *
- * Portions Copyright (c) 1996-2023, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- * IDENTIFICATION
- *	  src/common/pgfnames.c
- *
- *-------------------------------------------------------------------------
- */
-
-#ifndef FRONTEND
-#include "postgres.h"
-#else
-#include "postgres_fe.h"
-#endif
-
-#include <dirent.h>
-
-#ifndef FRONTEND
-#define pg_log_warning(...) elog(WARNING, __VA_ARGS__)
-#else
-#include "common/logging.h"
-#endif
-
-/*
- * pgfnames
- *
- * return a list of the names of objects in the argument directory.  Caller
- * must call pgfnames_cleanup later to free the memory allocated by this
- * function.
- */
-char	  **
-pgfnames(const char *path)
-{
-	DIR		   *dir;
-	struct dirent *file;
-	char	  **filenames;
-	int			numnames = 0;
-	int			fnsize = 200;	/* enough for many small dbs */
-
-	dir = opendir(path);
-	if (dir == NULL)
-	{
-		pg_log_warning("could not open directory \"%s\": %m", path);
-		return NULL;
-	}
-
-	filenames = (char **) palloc(fnsize * sizeof(char *));
-
-	while (errno = 0, (file = readdir(dir)) != NULL)
-	{
-		if (strcmp(file->d_name, ".") != 0 && strcmp(file->d_name, "..") != 0)
-		{
-			if (numnames + 1 >= fnsize)
-			{
-				fnsize *= 2;
-				filenames = (char **) repalloc(filenames,
-											   fnsize * sizeof(char *));
-			}
-			filenames[numnames++] = pstrdup(file->d_name);
-		}
-	}
-
-	if (errno)
-		pg_log_warning("could not read directory \"%s\": %m", path);
-
-	filenames[numnames] = NULL;
-
-	if (closedir(dir))
-		pg_log_warning("could not close directory \"%s\": %m", path);
-
-	return filenames;
-}
-
-
-/*
- *	pgfnames_cleanup
- *
- *	deallocate memory used for filenames
- */
-void
-pgfnames_cleanup(char **filenames)
-{
-	char	  **fn;
-
-	for (fn = filenames; *fn; fn++)
-		pfree(*fn);
-
-	pfree(filenames);
-}
diff --git a/contrib/libs/libpq/src/common/protocol_openssl.c b/contrib/libs/libpq/src/common/protocol_openssl.c
deleted file mode 100644
index 089cbd33cc..0000000000
--- a/contrib/libs/libpq/src/common/protocol_openssl.c
+++ /dev/null
@@ -1,117 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * protocol_openssl.c
- *	  OpenSSL functionality shared between frontend and backend
- *
- * This should only be used if code is compiled with OpenSSL support.
- *
- * Portions Copyright (c) 1996-2023, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- * IDENTIFICATION
- *		  src/common/protocol_openssl.c
- *
- *-------------------------------------------------------------------------
- */
-
-#ifndef FRONTEND
-#include "postgres.h"
-#else
-#include "postgres_fe.h"
-#endif
-
-#include "common/openssl.h"
-
-/*
- * Replacements for APIs introduced in OpenSSL 1.1.0.
- */
-#ifndef SSL_CTX_set_min_proto_version
-
-/*
- * OpenSSL versions that support TLS 1.3 shouldn't get here because they
- * already have these functions.  So we don't have to keep updating the below
- * code for every new TLS version, and eventually it can go away.  But let's
- * just check this to make sure ...
- */
-#ifdef TLS1_3_VERSION
-#error OpenSSL version mismatch
-#endif
-
-int
-SSL_CTX_set_min_proto_version(SSL_CTX *ctx, int version)
-{
-	int			ssl_options = SSL_OP_NO_SSLv2 | SSL_OP_NO_SSLv3;
-
-	if (version > TLS1_VERSION)
-		ssl_options |= SSL_OP_NO_TLSv1;
-
-	/*
-	 * Some OpenSSL versions define TLS*_VERSION macros but not the
-	 * corresponding SSL_OP_NO_* macro, so in those cases we have to return
-	 * unsuccessfully here.
-	 */
-#ifdef TLS1_1_VERSION
-	if (version > TLS1_1_VERSION)
-	{
-#ifdef SSL_OP_NO_TLSv1_1
-		ssl_options |= SSL_OP_NO_TLSv1_1;
-#else
-		return 0;
-#endif
-	}
-#endif
-#ifdef TLS1_2_VERSION
-	if (version > TLS1_2_VERSION)
-	{
-#ifdef SSL_OP_NO_TLSv1_2
-		ssl_options |= SSL_OP_NO_TLSv1_2;
-#else
-		return 0;
-#endif
-	}
-#endif
-
-	SSL_CTX_set_options(ctx, ssl_options);
-
-	return 1;					/* success */
-}
-
-int
-SSL_CTX_set_max_proto_version(SSL_CTX *ctx, int version)
-{
-	int			ssl_options = 0;
-
-	Assert(version != 0);
-
-	/*
-	 * Some OpenSSL versions define TLS*_VERSION macros but not the
-	 * corresponding SSL_OP_NO_* macro, so in those cases we have to return
-	 * unsuccessfully here.
-	 */
-#ifdef TLS1_1_VERSION
-	if (version < TLS1_1_VERSION)
-	{
-#ifdef SSL_OP_NO_TLSv1_1
-		ssl_options |= SSL_OP_NO_TLSv1_1;
-#else
-		return 0;
-#endif
-	}
-#endif
-#ifdef TLS1_2_VERSION
-	if (version < TLS1_2_VERSION)
-	{
-#ifdef SSL_OP_NO_TLSv1_2
-		ssl_options |= SSL_OP_NO_TLSv1_2;
-#else
-		return 0;
-#endif
-	}
-#endif
-
-	SSL_CTX_set_options(ctx, ssl_options);
-
-	return 1;					/* success */
-}
-
-#endif							/* !SSL_CTX_set_min_proto_version */
diff --git a/contrib/libs/libpq/src/common/psprintf.c b/contrib/libs/libpq/src/common/psprintf.c
deleted file mode 100644
index c8280c0880..0000000000
--- a/contrib/libs/libpq/src/common/psprintf.c
+++ /dev/null
@@ -1,151 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * psprintf.c
- *		sprintf into an allocated-on-demand buffer
- *
- *
- * Portions Copyright (c) 1996-2023, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- *
- * IDENTIFICATION
- *	  src/common/psprintf.c
- *
- *-------------------------------------------------------------------------
- */
-
-#ifndef FRONTEND
-
-#include "postgres.h"
-
-#error #include "utils/memutils.h"
-
-#else
-
-#include "postgres_fe.h"
-
-/* It's possible we could use a different value for this in frontend code */
-#define MaxAllocSize	((Size) 0x3fffffff) /* 1 gigabyte - 1 */
-
-#endif
-
-
-/*
- * psprintf
- *
- * Format text data under the control of fmt (an sprintf-style format string)
- * and return it in an allocated-on-demand buffer.  The buffer is allocated
- * with palloc in the backend, or malloc in frontend builds.  Caller is
- * responsible to free the buffer when no longer needed, if appropriate.
- *
- * Errors are not returned to the caller, but are reported via elog(ERROR)
- * in the backend, or printf-to-stderr-and-exit() in frontend builds.
- * One should therefore think twice about using this in libpq.
- */
-char *
-psprintf(const char *fmt,...)
-{
-	int			save_errno = errno;
-	size_t		len = 128;		/* initial assumption about buffer size */
-
-	for (;;)
-	{
-		char	   *result;
-		va_list		args;
-		size_t		newlen;
-
-		/*
-		 * Allocate result buffer.  Note that in frontend this maps to malloc
-		 * with exit-on-error.
-		 */
-		result = (char *) palloc(len);
-
-		/* Try to format the data. */
-		errno = save_errno;
-		va_start(args, fmt);
-		newlen = pvsnprintf(result, len, fmt, args);
-		va_end(args);
-
-		if (newlen < len)
-			return result;		/* success */
-
-		/* Release buffer and loop around to try again with larger len. */
-		pfree(result);
-		len = newlen;
-	}
-}
-
-/*
- * pvsnprintf
- *
- * Attempt to format text data under the control of fmt (an sprintf-style
- * format string) and insert it into buf (which has length len).
- *
- * If successful, return the number of bytes emitted, not counting the
- * trailing zero byte.  This will always be strictly less than len.
- *
- * If there's not enough space in buf, return an estimate of the buffer size
- * needed to succeed (this *must* be more than the given len, else callers
- * might loop infinitely).
- *
- * Other error cases do not return, but exit via elog(ERROR) or exit().
- * Hence, this shouldn't be used inside libpq.
- *
- * Caution: callers must be sure to preserve their entry-time errno
- * when looping, in case the fmt contains "%m".
- *
- * Note that the semantics of the return value are not exactly C99's.
- * First, we don't promise that the estimated buffer size is exactly right;
- * callers must be prepared to loop multiple times to get the right size.
- * (Given a C99-compliant vsnprintf, that won't happen, but it is rumored
- * that some implementations don't always return the same value ...)
- * Second, we return the recommended buffer size, not one less than that;
- * this lets overflow concerns be handled here rather than in the callers.
- */
-size_t
-pvsnprintf(char *buf, size_t len, const char *fmt, va_list args)
-{
-	int			nprinted;
-
-	nprinted = vsnprintf(buf, len, fmt, args);
-
-	/* We assume failure means the fmt is bogus, hence hard failure is OK */
-	if (unlikely(nprinted < 0))
-	{
-#ifndef FRONTEND
-		elog(ERROR, "vsnprintf failed: %m with format string \"%s\"", fmt);
-#else
-		fprintf(stderr, "vsnprintf failed: %s with format string \"%s\"\n",
-				strerror(errno), fmt);
-		exit(EXIT_FAILURE);
-#endif
-	}
-
-	if ((size_t) nprinted < len)
-	{
-		/* Success.  Note nprinted does not include trailing null. */
-		return (size_t) nprinted;
-	}
-
-	/*
-	 * We assume a C99-compliant vsnprintf, so believe its estimate of the
-	 * required space, and add one for the trailing null.  (If it's wrong, the
-	 * logic will still work, but we may loop multiple times.)
-	 *
-	 * Choke if the required space would exceed MaxAllocSize.  Note we use
-	 * this palloc-oriented overflow limit even when in frontend.
-	 */
-	if (unlikely((size_t) nprinted > MaxAllocSize - 1))
-	{
-#ifndef FRONTEND
-		ereport(ERROR,
-				(errcode(ERRCODE_PROGRAM_LIMIT_EXCEEDED),
-				 errmsg("out of memory")));
-#else
-		fprintf(stderr, _("out of memory\n"));
-		exit(EXIT_FAILURE);
-#endif
-	}
-
-	return nprinted + 1;
-}
diff --git a/contrib/libs/libpq/src/common/relpath.c b/contrib/libs/libpq/src/common/relpath.c
deleted file mode 100644
index 87de5f6c96..0000000000
--- a/contrib/libs/libpq/src/common/relpath.c
+++ /dev/null
@@ -1,210 +0,0 @@
-/*-------------------------------------------------------------------------
- * relpath.c
- *		Shared frontend/backend code to compute pathnames of relation files
- *
- * This module also contains some logic associated with fork names.
- *
- * Portions Copyright (c) 1996-2023, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- * IDENTIFICATION
- *	  src/common/relpath.c
- *
- *-------------------------------------------------------------------------
- */
-#ifndef FRONTEND
-#include "postgres.h"
-#else
-#include "postgres_fe.h"
-#endif
-
-#include "catalog/pg_tablespace_d.h"
-#include "common/relpath.h"
-#include "storage/backendid.h"
-
-
-/*
- * Lookup table of fork name by fork number.
- *
- * If you add a new entry, remember to update the errhint in
- * forkname_to_number() below, and update the SGML documentation for
- * pg_relation_size().
- */
-const char *const forkNames[] = {
-	"main",						/* MAIN_FORKNUM */
-	"fsm",						/* FSM_FORKNUM */
-	"vm",						/* VISIBILITYMAP_FORKNUM */
-	"init"						/* INIT_FORKNUM */
-};
-
-StaticAssertDecl(lengthof(forkNames) == (MAX_FORKNUM + 1),
-				 "array length mismatch");
-
-/*
- * forkname_to_number - look up fork number by name
- *
- * In backend, we throw an error for no match; in frontend, we just
- * return InvalidForkNumber.
- */
-ForkNumber
-forkname_to_number(const char *forkName)
-{
-	ForkNumber	forkNum;
-
-	for (forkNum = 0; forkNum <= MAX_FORKNUM; forkNum++)
-		if (strcmp(forkNames[forkNum], forkName) == 0)
-			return forkNum;
-
-#ifndef FRONTEND
-	ereport(ERROR,
-			(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
-			 errmsg("invalid fork name"),
-			 errhint("Valid fork names are \"main\", \"fsm\", "
-					 "\"vm\", and \"init\".")));
-#endif
-
-	return InvalidForkNumber;
-}
-
-/*
- * forkname_chars
- *		We use this to figure out whether a filename could be a relation
- *		fork (as opposed to an oddly named stray file that somehow ended
- *		up in the database directory).  If the passed string begins with
- *		a fork name (other than the main fork name), we return its length,
- *		and set *fork (if not NULL) to the fork number.  If not, we return 0.
- *
- * Note that the present coding assumes that there are no fork names which
- * are prefixes of other fork names.
- */
-int
-forkname_chars(const char *str, ForkNumber *fork)
-{
-	ForkNumber	forkNum;
-
-	for (forkNum = 1; forkNum <= MAX_FORKNUM; forkNum++)
-	{
-		int			len = strlen(forkNames[forkNum]);
-
-		if (strncmp(forkNames[forkNum], str, len) == 0)
-		{
-			if (fork)
-				*fork = forkNum;
-			return len;
-		}
-	}
-	if (fork)
-		*fork = InvalidForkNumber;
-	return 0;
-}
-
-
-/*
- * GetDatabasePath - construct path to a database directory
- *
- * Result is a palloc'd string.
- *
- * XXX this must agree with GetRelationPath()!
- */
-char *
-GetDatabasePath(Oid dbOid, Oid spcOid)
-{
-	if (spcOid == GLOBALTABLESPACE_OID)
-	{
-		/* Shared system relations live in {datadir}/global */
-		Assert(dbOid == 0);
-		return pstrdup("global");
-	}
-	else if (spcOid == DEFAULTTABLESPACE_OID)
-	{
-		/* The default tablespace is {datadir}/base */
-		return psprintf("base/%u", dbOid);
-	}
-	else
-	{
-		/* All other tablespaces are accessed via symlinks */
-		return psprintf("pg_tblspc/%u/%s/%u",
-						spcOid, TABLESPACE_VERSION_DIRECTORY, dbOid);
-	}
-}
-
-/*
- * GetRelationPath - construct path to a relation's file
- *
- * Result is a palloc'd string.
- *
- * Note: ideally, backendId would be declared as type BackendId, but relpath.h
- * would have to include a backend-only header to do that; doesn't seem worth
- * the trouble considering BackendId is just int anyway.
- */
-char *
-GetRelationPath(Oid dbOid, Oid spcOid, RelFileNumber relNumber,
-				int backendId, ForkNumber forkNumber)
-{
-	char	   *path;
-
-	if (spcOid == GLOBALTABLESPACE_OID)
-	{
-		/* Shared system relations live in {datadir}/global */
-		Assert(dbOid == 0);
-		Assert(backendId == InvalidBackendId);
-		if (forkNumber != MAIN_FORKNUM)
-			path = psprintf("global/%u_%s",
-							relNumber, forkNames[forkNumber]);
-		else
-			path = psprintf("global/%u", relNumber);
-	}
-	else if (spcOid == DEFAULTTABLESPACE_OID)
-	{
-		/* The default tablespace is {datadir}/base */
-		if (backendId == InvalidBackendId)
-		{
-			if (forkNumber != MAIN_FORKNUM)
-				path = psprintf("base/%u/%u_%s",
-								dbOid, relNumber,
-								forkNames[forkNumber]);
-			else
-				path = psprintf("base/%u/%u",
-								dbOid, relNumber);
-		}
-		else
-		{
-			if (forkNumber != MAIN_FORKNUM)
-				path = psprintf("base/%u/t%d_%u_%s",
-								dbOid, backendId, relNumber,
-								forkNames[forkNumber]);
-			else
-				path = psprintf("base/%u/t%d_%u",
-								dbOid, backendId, relNumber);
-		}
-	}
-	else
-	{
-		/* All other tablespaces are accessed via symlinks */
-		if (backendId == InvalidBackendId)
-		{
-			if (forkNumber != MAIN_FORKNUM)
-				path = psprintf("pg_tblspc/%u/%s/%u/%u_%s",
-								spcOid, TABLESPACE_VERSION_DIRECTORY,
-								dbOid, relNumber,
-								forkNames[forkNumber]);
-			else
-				path = psprintf("pg_tblspc/%u/%s/%u/%u",
-								spcOid, TABLESPACE_VERSION_DIRECTORY,
-								dbOid, relNumber);
-		}
-		else
-		{
-			if (forkNumber != MAIN_FORKNUM)
-				path = psprintf("pg_tblspc/%u/%s/%u/t%d_%u_%s",
-								spcOid, TABLESPACE_VERSION_DIRECTORY,
-								dbOid, backendId, relNumber,
-								forkNames[forkNumber]);
-			else
-				path = psprintf("pg_tblspc/%u/%s/%u/t%d_%u",
-								spcOid, TABLESPACE_VERSION_DIRECTORY,
-								dbOid, backendId, relNumber);
-		}
-	}
-	return path;
-}
diff --git a/contrib/libs/libpq/src/common/restricted_token.c b/contrib/libs/libpq/src/common/restricted_token.c
deleted file mode 100644
index 4ae1ed1e8a..0000000000
--- a/contrib/libs/libpq/src/common/restricted_token.c
+++ /dev/null
@@ -1,174 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * restricted_token.c
- *		helper routine to ensure restricted token on Windows
- *
- *
- * Portions Copyright (c) 1996-2023, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- *
- * IDENTIFICATION
- *	  src/common/restricted_token.c
- *
- *-------------------------------------------------------------------------
- */
-
-#ifndef FRONTEND
-#error "This file is not expected to be compiled for backend code"
-#endif
-
-#include "postgres_fe.h"
-
-#include "common/logging.h"
-#include "common/restricted_token.h"
-
-#ifdef WIN32
-
-/* internal vars */
-char	   *restrict_env;
-
-/* Windows API define missing from some versions of MingW headers */
-#ifndef  DISABLE_MAX_PRIVILEGE
-#define DISABLE_MAX_PRIVILEGE	0x1
-#endif
-
-/*
- * Create a restricted token and execute the specified process with it.
- *
- * Returns restricted token on success and 0 on failure.
- *
- * On any system not containing the required functions, do nothing
- * but still report an error.
- */
-HANDLE
-CreateRestrictedProcess(char *cmd, PROCESS_INFORMATION *processInfo)
-{
-	BOOL		b;
-	STARTUPINFO si;
-	HANDLE		origToken;
-	HANDLE		restrictedToken;
-	SID_IDENTIFIER_AUTHORITY NtAuthority = {SECURITY_NT_AUTHORITY};
-	SID_AND_ATTRIBUTES dropSids[2];
-
-	ZeroMemory(&si, sizeof(si));
-	si.cb = sizeof(si);
-
-	/* Open the current token to use as a base for the restricted one */
-	if (!OpenProcessToken(GetCurrentProcess(), TOKEN_ALL_ACCESS, &origToken))
-	{
-		pg_log_error("could not open process token: error code %lu",
-					 GetLastError());
-		return 0;
-	}
-
-	/* Allocate list of SIDs to remove */
-	ZeroMemory(&dropSids, sizeof(dropSids));
-	if (!AllocateAndInitializeSid(&NtAuthority, 2,
-								  SECURITY_BUILTIN_DOMAIN_RID, DOMAIN_ALIAS_RID_ADMINS, 0, 0, 0, 0, 0,
-								  0, &dropSids[0].Sid) ||
-		!AllocateAndInitializeSid(&NtAuthority, 2,
-								  SECURITY_BUILTIN_DOMAIN_RID, DOMAIN_ALIAS_RID_POWER_USERS, 0, 0, 0, 0, 0,
-								  0, &dropSids[1].Sid))
-	{
-		pg_log_error("could not allocate SIDs: error code %lu",
-					 GetLastError());
-		CloseHandle(origToken);
-		return 0;
-	}
-
-	b = CreateRestrictedToken(origToken,
-							  DISABLE_MAX_PRIVILEGE,
-							  sizeof(dropSids) / sizeof(dropSids[0]),
-							  dropSids,
-							  0, NULL,
-							  0, NULL,
-							  &restrictedToken);
-
-	FreeSid(dropSids[1].Sid);
-	FreeSid(dropSids[0].Sid);
-	CloseHandle(origToken);
-
-	if (!b)
-	{
-		pg_log_error("could not create restricted token: error code %lu", GetLastError());
-		return 0;
-	}
-
-#ifndef __CYGWIN__
-	AddUserToTokenDacl(restrictedToken);
-#endif
-
-	if (!CreateProcessAsUser(restrictedToken,
-							 NULL,
-							 cmd,
-							 NULL,
-							 NULL,
-							 TRUE,
-							 CREATE_SUSPENDED,
-							 NULL,
-							 NULL,
-							 &si,
-							 processInfo))
-
-	{
-		pg_log_error("could not start process for command \"%s\": error code %lu", cmd, GetLastError());
-		return 0;
-	}
-
-	ResumeThread(processInfo->hThread);
-	return restrictedToken;
-}
-#endif
-
-/*
- * On Windows make sure that we are running with a restricted token,
- * On other platforms do nothing.
- */
-void
-get_restricted_token(void)
-{
-#ifdef WIN32
-	HANDLE		restrictedToken;
-
-	/*
-	 * Before we execute another program, make sure that we are running with a
-	 * restricted token. If not, re-execute ourselves with one.
-	 */
-
-	if ((restrict_env = getenv("PG_RESTRICT_EXEC")) == NULL
-		|| strcmp(restrict_env, "1") != 0)
-	{
-		PROCESS_INFORMATION pi;
-		char	   *cmdline;
-
-		ZeroMemory(&pi, sizeof(pi));
-
-		cmdline = pg_strdup(GetCommandLine());
-
-		setenv("PG_RESTRICT_EXEC", "1", 1);
-
-		if ((restrictedToken = CreateRestrictedProcess(cmdline, &pi)) == 0)
-		{
-			pg_log_error("could not re-execute with restricted token: error code %lu", GetLastError());
-		}
-		else
-		{
-			/*
-			 * Successfully re-executed. Now wait for child process to capture
-			 * the exit code.
-			 */
-			DWORD		x;
-
-			CloseHandle(restrictedToken);
-			CloseHandle(pi.hThread);
-			WaitForSingleObject(pi.hProcess, INFINITE);
-
-			if (!GetExitCodeProcess(pi.hProcess, &x))
-				pg_fatal("could not get exit code from subprocess: error code %lu", GetLastError());
-			exit(x);
-		}
-		pg_free(cmdline);
-	}
-#endif
-}
diff --git a/contrib/libs/libpq/src/common/rmtree.c b/contrib/libs/libpq/src/common/rmtree.c
deleted file mode 100644
index 9d0c32955a..0000000000
--- a/contrib/libs/libpq/src/common/rmtree.c
+++ /dev/null
@@ -1,130 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * rmtree.c
- *
- * Portions Copyright (c) 1996-2023, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- * IDENTIFICATION
- *	  src/common/rmtree.c
- *
- *-------------------------------------------------------------------------
- */
-
-#ifndef FRONTEND
-#include "postgres.h"
-#else
-#include "postgres_fe.h"
-#endif
-
-#include <unistd.h>
-#include <sys/stat.h>
-
-#include "common/file_utils.h"
-
-#ifndef FRONTEND
-#error #include "storage/fd.h"
-#define pg_log_warning(...) elog(WARNING, __VA_ARGS__)
-#define LOG_LEVEL WARNING
-#define OPENDIR(x) AllocateDir(x)
-#define CLOSEDIR(x) FreeDir(x)
-#else
-#include "common/logging.h"
-#define LOG_LEVEL PG_LOG_WARNING
-#define OPENDIR(x) opendir(x)
-#define CLOSEDIR(x) closedir(x)
-#endif
-
-/*
- *	rmtree
- *
- *	Delete a directory tree recursively.
- *	Assumes path points to a valid directory.
- *	Deletes everything under path.
- *	If rmtopdir is true deletes the directory too.
- *	Returns true if successful, false if there was any problem.
- *	(The details of the problem are reported already, so caller
- *	doesn't really have to say anything more, but most do.)
- */
-bool
-rmtree(const char *path, bool rmtopdir)
-{
-	char		pathbuf[MAXPGPATH];
-	DIR		   *dir;
-	struct dirent *de;
-	bool		result = true;
-	size_t		dirnames_size = 0;
-	size_t		dirnames_capacity = 8;
-	char	  **dirnames = palloc(sizeof(char *) * dirnames_capacity);
-
-	dir = OPENDIR(path);
-	if (dir == NULL)
-	{
-		pg_log_warning("could not open directory \"%s\": %m", path);
-		return false;
-	}
-
-	while (errno = 0, (de = readdir(dir)))
-	{
-		if (strcmp(de->d_name, ".") == 0 ||
-			strcmp(de->d_name, "..") == 0)
-			continue;
-		snprintf(pathbuf, sizeof(pathbuf), "%s/%s", path, de->d_name);
-		switch (get_dirent_type(pathbuf, de, false, LOG_LEVEL))
-		{
-			case PGFILETYPE_ERROR:
-				/* already logged, press on */
-				break;
-			case PGFILETYPE_DIR:
-
-				/*
-				 * Defer recursion until after we've closed this directory, to
-				 * avoid using more than one file descriptor at a time.
-				 */
-				if (dirnames_size == dirnames_capacity)
-				{
-					dirnames = repalloc(dirnames,
-										sizeof(char *) * dirnames_capacity * 2);
-					dirnames_capacity *= 2;
-				}
-				dirnames[dirnames_size++] = pstrdup(pathbuf);
-				break;
-			default:
-				if (unlink(pathbuf) != 0 && errno != ENOENT)
-				{
-					pg_log_warning("could not remove file \"%s\": %m", pathbuf);
-					result = false;
-				}
-				break;
-		}
-	}
-
-	if (errno != 0)
-	{
-		pg_log_warning("could not read directory \"%s\": %m", path);
-		result = false;
-	}
-
-	CLOSEDIR(dir);
-
-	/* Now recurse into the subdirectories we found. */
-	for (size_t i = 0; i < dirnames_size; ++i)
-	{
-		if (!rmtree(dirnames[i], true))
-			result = false;
-		pfree(dirnames[i]);
-	}
-
-	if (rmtopdir)
-	{
-		if (rmdir(path) != 0)
-		{
-			pg_log_warning("could not remove directory \"%s\": %m", path);
-			result = false;
-		}
-	}
-
-	pfree(dirnames);
-
-	return result;
-}
diff --git a/contrib/libs/libpq/src/common/ryu_common.h b/contrib/libs/libpq/src/common/ryu_common.h
deleted file mode 100644
index ad850acf62..0000000000
--- a/contrib/libs/libpq/src/common/ryu_common.h
+++ /dev/null
@@ -1,133 +0,0 @@
-/*---------------------------------------------------------------------------
- *
- * Common routines for Ryu floating-point output.
- *
- * Portions Copyright (c) 2018-2023, PostgreSQL Global Development Group
- *
- * IDENTIFICATION
- *	  src/common/ryu_common.h
- *
- * This is a modification of code taken from github.com/ulfjack/ryu under the
- * terms of the Boost license (not the Apache license). The original copyright
- * notice follows:
- *
- * Copyright 2018 Ulf Adams
- *
- * The contents of this file may be used under the terms of the Apache
- * License, Version 2.0.
- *
- *     (See accompanying file LICENSE-Apache or copy at
- *      http://www.apache.org/licenses/LICENSE-2.0)
- *
- * Alternatively, the contents of this file may be used under the terms of the
- * Boost Software License, Version 1.0.
- *
- *     (See accompanying file LICENSE-Boost or copy at
- *      https://www.boost.org/LICENSE_1_0.txt)
- *
- * Unless required by applicable law or agreed to in writing, this software is
- * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.
- *
- *---------------------------------------------------------------------------
- */
-#ifndef RYU_COMMON_H
-#define RYU_COMMON_H
-
-/*
- * Upstream Ryu's output is always the shortest possible. But we adjust that
- * slightly to improve portability: we avoid outputting the exact midpoint
- * value between two representable floats, since that relies on the reader
- * getting the round-to-even rule correct, which seems to be the common
- * failure mode.
- *
- * Defining this to 1 would restore the upstream behavior.
- */
-#define STRICTLY_SHORTEST 0
-
-#if SIZEOF_SIZE_T < 8
-#define RYU_32_BIT_PLATFORM
-#endif
-
-/*  Returns e == 0 ? 1 : ceil(log_2(5^e)). */
-static inline uint32
-pow5bits(const int32 e)
-{
-	/*
-	 * This approximation works up to the point that the multiplication
-	 * overflows at e = 3529.
-	 *
-	 * If the multiplication were done in 64 bits, it would fail at 5^4004
-	 * which is just greater than 2^9297.
-	 */
-	Assert(e >= 0);
-	Assert(e <= 3528);
-	return ((((uint32) e) * 1217359) >> 19) + 1;
-}
-
-/*  Returns floor(log_10(2^e)). */
-static inline int32
-log10Pow2(const int32 e)
-{
-	/*
-	 * The first value this approximation fails for is 2^1651 which is just
-	 * greater than 10^297.
-	 */
-	Assert(e >= 0);
-	Assert(e <= 1650);
-	return (int32) ((((uint32) e) * 78913) >> 18);
-}
-
-/*  Returns floor(log_10(5^e)). */
-static inline int32
-log10Pow5(const int32 e)
-{
-	/*
-	 * The first value this approximation fails for is 5^2621 which is just
-	 * greater than 10^1832.
-	 */
-	Assert(e >= 0);
-	Assert(e <= 2620);
-	return (int32) ((((uint32) e) * 732923) >> 20);
-}
-
-static inline int
-copy_special_str(char *const result, const bool sign, const bool exponent, const bool mantissa)
-{
-	if (mantissa)
-	{
-		memcpy(result, "NaN", 3);
-		return 3;
-	}
-	if (sign)
-	{
-		result[0] = '-';
-	}
-	if (exponent)
-	{
-		memcpy(result + sign, "Infinity", 8);
-		return sign + 8;
-	}
-	result[sign] = '0';
-	return sign + 1;
-}
-
-static inline uint32
-float_to_bits(const float f)
-{
-	uint32		bits = 0;
-
-	memcpy(&bits, &f, sizeof(float));
-	return bits;
-}
-
-static inline uint64
-double_to_bits(const double d)
-{
-	uint64		bits = 0;
-
-	memcpy(&bits, &d, sizeof(double));
-	return bits;
-}
-
-#endif							/* RYU_COMMON_H */
diff --git a/contrib/libs/libpq/src/common/saslprep.c b/contrib/libs/libpq/src/common/saslprep.c
deleted file mode 100644
index 3cf498866a..0000000000
--- a/contrib/libs/libpq/src/common/saslprep.c
+++ /dev/null
@@ -1,1245 +0,0 @@
-/*-------------------------------------------------------------------------
- * saslprep.c
- *		SASLprep normalization, for SCRAM authentication
- *
- * The SASLprep algorithm is used to process a user-supplied password into
- * canonical form.  For more details, see:
- *
- * [RFC3454] Preparation of Internationalized Strings ("stringprep"),
- *	  http://www.ietf.org/rfc/rfc3454.txt
- *
- * [RFC4013] SASLprep: Stringprep Profile for User Names and Passwords
- *	  http://www.ietf.org/rfc/rfc4013.txt
- *
- *
- * Portions Copyright (c) 2017-2023, PostgreSQL Global Development Group
- *
- * IDENTIFICATION
- *	  src/common/saslprep.c
- *
- *-------------------------------------------------------------------------
- */
-#ifndef FRONTEND
-#include "postgres.h"
-#else
-#include "postgres_fe.h"
-#endif
-
-#include "common/saslprep.h"
-#include "common/string.h"
-#include "common/unicode_norm.h"
-#include "mb/pg_wchar.h"
-
-/*
- * In backend, we will use palloc/pfree.  In frontend, use malloc, and
- * return SASLPREP_OOM on out-of-memory.
- */
-#ifndef FRONTEND
-#define STRDUP(s) pstrdup(s)
-#define ALLOC(size) palloc(size)
-#define FREE(size) pfree(size)
-#else
-#define STRDUP(s) strdup(s)
-#define ALLOC(size) malloc(size)
-#define FREE(size) free(size)
-#endif
-
-/* Prototypes for local functions */
-static int	codepoint_range_cmp(const void *a, const void *b);
-static bool is_code_in_table(pg_wchar code, const pg_wchar *map, int mapsize);
-static int	pg_utf8_string_len(const char *source);
-
-/*
- * Stringprep Mapping Tables.
- *
- * The stringprep specification includes a number of tables of Unicode
- * codepoints, used in different parts of the algorithm.  They are below,
- * as arrays of codepoint ranges.  Each range is a pair of codepoints,
- * for the first and last codepoint included the range (inclusive!).
- */
-
-/*
- * C.1.2 Non-ASCII space characters
- *
- * These are all mapped to the ASCII space character (U+00A0).
- */
-static const pg_wchar non_ascii_space_ranges[] =
-{
-	0x00A0, 0x00A0,
-	0x1680, 0x1680,
-	0x2000, 0x200B,
-	0x202F, 0x202F,
-	0x205F, 0x205F,
-	0x3000, 0x3000
-};
-
-/*
- * B.1 Commonly mapped to nothing
- *
- * If any of these appear in the input, they are removed.
- */
-static const pg_wchar commonly_mapped_to_nothing_ranges[] =
-{
-	0x00AD, 0x00AD,
-	0x034F, 0x034F,
-	0x1806, 0x1806,
-	0x180B, 0x180D,
-	0x200B, 0x200D,
-	0x2060, 0x2060,
-	0xFE00, 0xFE0F,
-	0xFEFF, 0xFEFF
-};
-
-/*
- * prohibited_output_ranges is a union of all the characters from
- * the following tables:
- *
- * C.1.2 Non-ASCII space characters
- * C.2.1 ASCII control characters
- * C.2.2 Non-ASCII control characters
- * C.3 Private Use characters
- * C.4 Non-character code points
- * C.5 Surrogate code points
- * C.6 Inappropriate for plain text characters
- * C.7 Inappropriate for canonical representation characters
- * C.7 Change display properties or deprecated characters
- * C.8 Tagging characters
- *
- * These are the tables that are listed as "prohibited output"
- * characters in the SASLprep profile.
- *
- * The comment after each code range indicates which source table
- * the code came from.  Note that there is some overlap in the source
- * tables, so one code might originate from multiple source tables.
- * Adjacent ranges have also been merged together, to save space.
- */
-static const pg_wchar prohibited_output_ranges[] =
-{
-	0x0000, 0x001F,				/* C.2.1 */
-	0x007F, 0x00A0,				/* C.1.2, C.2.1, C.2.2 */
-	0x0340, 0x0341,				/* C.8 */
-	0x06DD, 0x06DD,				/* C.2.2 */
-	0x070F, 0x070F,				/* C.2.2 */
-	0x1680, 0x1680,				/* C.1.2 */
-	0x180E, 0x180E,				/* C.2.2 */
-	0x2000, 0x200F,				/* C.1.2, C.2.2, C.8 */
-	0x2028, 0x202F,				/* C.1.2, C.2.2, C.8 */
-	0x205F, 0x2063,				/* C.1.2, C.2.2 */
-	0x206A, 0x206F,				/* C.2.2, C.8 */
-	0x2FF0, 0x2FFB,				/* C.7 */
-	0x3000, 0x3000,				/* C.1.2 */
-	0xD800, 0xF8FF,				/* C.3, C.5 */
-	0xFDD0, 0xFDEF,				/* C.4 */
-	0xFEFF, 0xFEFF,				/* C.2.2 */
-	0xFFF9, 0xFFFF,				/* C.2.2, C.4, C.6 */
-	0x1D173, 0x1D17A,			/* C.2.2 */
-	0x1FFFE, 0x1FFFF,			/* C.4 */
-	0x2FFFE, 0x2FFFF,			/* C.4 */
-	0x3FFFE, 0x3FFFF,			/* C.4 */
-	0x4FFFE, 0x4FFFF,			/* C.4 */
-	0x5FFFE, 0x5FFFF,			/* C.4 */
-	0x6FFFE, 0x6FFFF,			/* C.4 */
-	0x7FFFE, 0x7FFFF,			/* C.4 */
-	0x8FFFE, 0x8FFFF,			/* C.4 */
-	0x9FFFE, 0x9FFFF,			/* C.4 */
-	0xAFFFE, 0xAFFFF,			/* C.4 */
-	0xBFFFE, 0xBFFFF,			/* C.4 */
-	0xCFFFE, 0xCFFFF,			/* C.4 */
-	0xDFFFE, 0xDFFFF,			/* C.4 */
-	0xE0001, 0xE0001,			/* C.9 */
-	0xE0020, 0xE007F,			/* C.9 */
-	0xEFFFE, 0xEFFFF,			/* C.4 */
-	0xF0000, 0xFFFFF,			/* C.3, C.4 */
-	0x100000, 0x10FFFF			/* C.3, C.4 */
-};
-
-/* A.1 Unassigned code points in Unicode 3.2 */
-static const pg_wchar unassigned_codepoint_ranges[] =
-{
-	0x0221, 0x0221,
-	0x0234, 0x024F,
-	0x02AE, 0x02AF,
-	0x02EF, 0x02FF,
-	0x0350, 0x035F,
-	0x0370, 0x0373,
-	0x0376, 0x0379,
-	0x037B, 0x037D,
-	0x037F, 0x0383,
-	0x038B, 0x038B,
-	0x038D, 0x038D,
-	0x03A2, 0x03A2,
-	0x03CF, 0x03CF,
-	0x03F7, 0x03FF,
-	0x0487, 0x0487,
-	0x04CF, 0x04CF,
-	0x04F6, 0x04F7,
-	0x04FA, 0x04FF,
-	0x0510, 0x0530,
-	0x0557, 0x0558,
-	0x0560, 0x0560,
-	0x0588, 0x0588,
-	0x058B, 0x0590,
-	0x05A2, 0x05A2,
-	0x05BA, 0x05BA,
-	0x05C5, 0x05CF,
-	0x05EB, 0x05EF,
-	0x05F5, 0x060B,
-	0x060D, 0x061A,
-	0x061C, 0x061E,
-	0x0620, 0x0620,
-	0x063B, 0x063F,
-	0x0656, 0x065F,
-	0x06EE, 0x06EF,
-	0x06FF, 0x06FF,
-	0x070E, 0x070E,
-	0x072D, 0x072F,
-	0x074B, 0x077F,
-	0x07B2, 0x0900,
-	0x0904, 0x0904,
-	0x093A, 0x093B,
-	0x094E, 0x094F,
-	0x0955, 0x0957,
-	0x0971, 0x0980,
-	0x0984, 0x0984,
-	0x098D, 0x098E,
-	0x0991, 0x0992,
-	0x09A9, 0x09A9,
-	0x09B1, 0x09B1,
-	0x09B3, 0x09B5,
-	0x09BA, 0x09BB,
-	0x09BD, 0x09BD,
-	0x09C5, 0x09C6,
-	0x09C9, 0x09CA,
-	0x09CE, 0x09D6,
-	0x09D8, 0x09DB,
-	0x09DE, 0x09DE,
-	0x09E4, 0x09E5,
-	0x09FB, 0x0A01,
-	0x0A03, 0x0A04,
-	0x0A0B, 0x0A0E,
-	0x0A11, 0x0A12,
-	0x0A29, 0x0A29,
-	0x0A31, 0x0A31,
-	0x0A34, 0x0A34,
-	0x0A37, 0x0A37,
-	0x0A3A, 0x0A3B,
-	0x0A3D, 0x0A3D,
-	0x0A43, 0x0A46,
-	0x0A49, 0x0A4A,
-	0x0A4E, 0x0A58,
-	0x0A5D, 0x0A5D,
-	0x0A5F, 0x0A65,
-	0x0A75, 0x0A80,
-	0x0A84, 0x0A84,
-	0x0A8C, 0x0A8C,
-	0x0A8E, 0x0A8E,
-	0x0A92, 0x0A92,
-	0x0AA9, 0x0AA9,
-	0x0AB1, 0x0AB1,
-	0x0AB4, 0x0AB4,
-	0x0ABA, 0x0ABB,
-	0x0AC6, 0x0AC6,
-	0x0ACA, 0x0ACA,
-	0x0ACE, 0x0ACF,
-	0x0AD1, 0x0ADF,
-	0x0AE1, 0x0AE5,
-	0x0AF0, 0x0B00,
-	0x0B04, 0x0B04,
-	0x0B0D, 0x0B0E,
-	0x0B11, 0x0B12,
-	0x0B29, 0x0B29,
-	0x0B31, 0x0B31,
-	0x0B34, 0x0B35,
-	0x0B3A, 0x0B3B,
-	0x0B44, 0x0B46,
-	0x0B49, 0x0B4A,
-	0x0B4E, 0x0B55,
-	0x0B58, 0x0B5B,
-	0x0B5E, 0x0B5E,
-	0x0B62, 0x0B65,
-	0x0B71, 0x0B81,
-	0x0B84, 0x0B84,
-	0x0B8B, 0x0B8D,
-	0x0B91, 0x0B91,
-	0x0B96, 0x0B98,
-	0x0B9B, 0x0B9B,
-	0x0B9D, 0x0B9D,
-	0x0BA0, 0x0BA2,
-	0x0BA5, 0x0BA7,
-	0x0BAB, 0x0BAD,
-	0x0BB6, 0x0BB6,
-	0x0BBA, 0x0BBD,
-	0x0BC3, 0x0BC5,
-	0x0BC9, 0x0BC9,
-	0x0BCE, 0x0BD6,
-	0x0BD8, 0x0BE6,
-	0x0BF3, 0x0C00,
-	0x0C04, 0x0C04,
-	0x0C0D, 0x0C0D,
-	0x0C11, 0x0C11,
-	0x0C29, 0x0C29,
-	0x0C34, 0x0C34,
-	0x0C3A, 0x0C3D,
-	0x0C45, 0x0C45,
-	0x0C49, 0x0C49,
-	0x0C4E, 0x0C54,
-	0x0C57, 0x0C5F,
-	0x0C62, 0x0C65,
-	0x0C70, 0x0C81,
-	0x0C84, 0x0C84,
-	0x0C8D, 0x0C8D,
-	0x0C91, 0x0C91,
-	0x0CA9, 0x0CA9,
-	0x0CB4, 0x0CB4,
-	0x0CBA, 0x0CBD,
-	0x0CC5, 0x0CC5,
-	0x0CC9, 0x0CC9,
-	0x0CCE, 0x0CD4,
-	0x0CD7, 0x0CDD,
-	0x0CDF, 0x0CDF,
-	0x0CE2, 0x0CE5,
-	0x0CF0, 0x0D01,
-	0x0D04, 0x0D04,
-	0x0D0D, 0x0D0D,
-	0x0D11, 0x0D11,
-	0x0D29, 0x0D29,
-	0x0D3A, 0x0D3D,
-	0x0D44, 0x0D45,
-	0x0D49, 0x0D49,
-	0x0D4E, 0x0D56,
-	0x0D58, 0x0D5F,
-	0x0D62, 0x0D65,
-	0x0D70, 0x0D81,
-	0x0D84, 0x0D84,
-	0x0D97, 0x0D99,
-	0x0DB2, 0x0DB2,
-	0x0DBC, 0x0DBC,
-	0x0DBE, 0x0DBF,
-	0x0DC7, 0x0DC9,
-	0x0DCB, 0x0DCE,
-	0x0DD5, 0x0DD5,
-	0x0DD7, 0x0DD7,
-	0x0DE0, 0x0DF1,
-	0x0DF5, 0x0E00,
-	0x0E3B, 0x0E3E,
-	0x0E5C, 0x0E80,
-	0x0E83, 0x0E83,
-	0x0E85, 0x0E86,
-	0x0E89, 0x0E89,
-	0x0E8B, 0x0E8C,
-	0x0E8E, 0x0E93,
-	0x0E98, 0x0E98,
-	0x0EA0, 0x0EA0,
-	0x0EA4, 0x0EA4,
-	0x0EA6, 0x0EA6,
-	0x0EA8, 0x0EA9,
-	0x0EAC, 0x0EAC,
-	0x0EBA, 0x0EBA,
-	0x0EBE, 0x0EBF,
-	0x0EC5, 0x0EC5,
-	0x0EC7, 0x0EC7,
-	0x0ECE, 0x0ECF,
-	0x0EDA, 0x0EDB,
-	0x0EDE, 0x0EFF,
-	0x0F48, 0x0F48,
-	0x0F6B, 0x0F70,
-	0x0F8C, 0x0F8F,
-	0x0F98, 0x0F98,
-	0x0FBD, 0x0FBD,
-	0x0FCD, 0x0FCE,
-	0x0FD0, 0x0FFF,
-	0x1022, 0x1022,
-	0x1028, 0x1028,
-	0x102B, 0x102B,
-	0x1033, 0x1035,
-	0x103A, 0x103F,
-	0x105A, 0x109F,
-	0x10C6, 0x10CF,
-	0x10F9, 0x10FA,
-	0x10FC, 0x10FF,
-	0x115A, 0x115E,
-	0x11A3, 0x11A7,
-	0x11FA, 0x11FF,
-	0x1207, 0x1207,
-	0x1247, 0x1247,
-	0x1249, 0x1249,
-	0x124E, 0x124F,
-	0x1257, 0x1257,
-	0x1259, 0x1259,
-	0x125E, 0x125F,
-	0x1287, 0x1287,
-	0x1289, 0x1289,
-	0x128E, 0x128F,
-	0x12AF, 0x12AF,
-	0x12B1, 0x12B1,
-	0x12B6, 0x12B7,
-	0x12BF, 0x12BF,
-	0x12C1, 0x12C1,
-	0x12C6, 0x12C7,
-	0x12CF, 0x12CF,
-	0x12D7, 0x12D7,
-	0x12EF, 0x12EF,
-	0x130F, 0x130F,
-	0x1311, 0x1311,
-	0x1316, 0x1317,
-	0x131F, 0x131F,
-	0x1347, 0x1347,
-	0x135B, 0x1360,
-	0x137D, 0x139F,
-	0x13F5, 0x1400,
-	0x1677, 0x167F,
-	0x169D, 0x169F,
-	0x16F1, 0x16FF,
-	0x170D, 0x170D,
-	0x1715, 0x171F,
-	0x1737, 0x173F,
-	0x1754, 0x175F,
-	0x176D, 0x176D,
-	0x1771, 0x1771,
-	0x1774, 0x177F,
-	0x17DD, 0x17DF,
-	0x17EA, 0x17FF,
-	0x180F, 0x180F,
-	0x181A, 0x181F,
-	0x1878, 0x187F,
-	0x18AA, 0x1DFF,
-	0x1E9C, 0x1E9F,
-	0x1EFA, 0x1EFF,
-	0x1F16, 0x1F17,
-	0x1F1E, 0x1F1F,
-	0x1F46, 0x1F47,
-	0x1F4E, 0x1F4F,
-	0x1F58, 0x1F58,
-	0x1F5A, 0x1F5A,
-	0x1F5C, 0x1F5C,
-	0x1F5E, 0x1F5E,
-	0x1F7E, 0x1F7F,
-	0x1FB5, 0x1FB5,
-	0x1FC5, 0x1FC5,
-	0x1FD4, 0x1FD5,
-	0x1FDC, 0x1FDC,
-	0x1FF0, 0x1FF1,
-	0x1FF5, 0x1FF5,
-	0x1FFF, 0x1FFF,
-	0x2053, 0x2056,
-	0x2058, 0x205E,
-	0x2064, 0x2069,
-	0x2072, 0x2073,
-	0x208F, 0x209F,
-	0x20B2, 0x20CF,
-	0x20EB, 0x20FF,
-	0x213B, 0x213C,
-	0x214C, 0x2152,
-	0x2184, 0x218F,
-	0x23CF, 0x23FF,
-	0x2427, 0x243F,
-	0x244B, 0x245F,
-	0x24FF, 0x24FF,
-	0x2614, 0x2615,
-	0x2618, 0x2618,
-	0x267E, 0x267F,
-	0x268A, 0x2700,
-	0x2705, 0x2705,
-	0x270A, 0x270B,
-	0x2728, 0x2728,
-	0x274C, 0x274C,
-	0x274E, 0x274E,
-	0x2753, 0x2755,
-	0x2757, 0x2757,
-	0x275F, 0x2760,
-	0x2795, 0x2797,
-	0x27B0, 0x27B0,
-	0x27BF, 0x27CF,
-	0x27EC, 0x27EF,
-	0x2B00, 0x2E7F,
-	0x2E9A, 0x2E9A,
-	0x2EF4, 0x2EFF,
-	0x2FD6, 0x2FEF,
-	0x2FFC, 0x2FFF,
-	0x3040, 0x3040,
-	0x3097, 0x3098,
-	0x3100, 0x3104,
-	0x312D, 0x3130,
-	0x318F, 0x318F,
-	0x31B8, 0x31EF,
-	0x321D, 0x321F,
-	0x3244, 0x3250,
-	0x327C, 0x327E,
-	0x32CC, 0x32CF,
-	0x32FF, 0x32FF,
-	0x3377, 0x337A,
-	0x33DE, 0x33DF,
-	0x33FF, 0x33FF,
-	0x4DB6, 0x4DFF,
-	0x9FA6, 0x9FFF,
-	0xA48D, 0xA48F,
-	0xA4C7, 0xABFF,
-	0xD7A4, 0xD7FF,
-	0xFA2E, 0xFA2F,
-	0xFA6B, 0xFAFF,
-	0xFB07, 0xFB12,
-	0xFB18, 0xFB1C,
-	0xFB37, 0xFB37,
-	0xFB3D, 0xFB3D,
-	0xFB3F, 0xFB3F,
-	0xFB42, 0xFB42,
-	0xFB45, 0xFB45,
-	0xFBB2, 0xFBD2,
-	0xFD40, 0xFD4F,
-	0xFD90, 0xFD91,
-	0xFDC8, 0xFDCF,
-	0xFDFD, 0xFDFF,
-	0xFE10, 0xFE1F,
-	0xFE24, 0xFE2F,
-	0xFE47, 0xFE48,
-	0xFE53, 0xFE53,
-	0xFE67, 0xFE67,
-	0xFE6C, 0xFE6F,
-	0xFE75, 0xFE75,
-	0xFEFD, 0xFEFE,
-	0xFF00, 0xFF00,
-	0xFFBF, 0xFFC1,
-	0xFFC8, 0xFFC9,
-	0xFFD0, 0xFFD1,
-	0xFFD8, 0xFFD9,
-	0xFFDD, 0xFFDF,
-	0xFFE7, 0xFFE7,
-	0xFFEF, 0xFFF8,
-	0x10000, 0x102FF,
-	0x1031F, 0x1031F,
-	0x10324, 0x1032F,
-	0x1034B, 0x103FF,
-	0x10426, 0x10427,
-	0x1044E, 0x1CFFF,
-	0x1D0F6, 0x1D0FF,
-	0x1D127, 0x1D129,
-	0x1D1DE, 0x1D3FF,
-	0x1D455, 0x1D455,
-	0x1D49D, 0x1D49D,
-	0x1D4A0, 0x1D4A1,
-	0x1D4A3, 0x1D4A4,
-	0x1D4A7, 0x1D4A8,
-	0x1D4AD, 0x1D4AD,
-	0x1D4BA, 0x1D4BA,
-	0x1D4BC, 0x1D4BC,
-	0x1D4C1, 0x1D4C1,
-	0x1D4C4, 0x1D4C4,
-	0x1D506, 0x1D506,
-	0x1D50B, 0x1D50C,
-	0x1D515, 0x1D515,
-	0x1D51D, 0x1D51D,
-	0x1D53A, 0x1D53A,
-	0x1D53F, 0x1D53F,
-	0x1D545, 0x1D545,
-	0x1D547, 0x1D549,
-	0x1D551, 0x1D551,
-	0x1D6A4, 0x1D6A7,
-	0x1D7CA, 0x1D7CD,
-	0x1D800, 0x1FFFD,
-	0x2A6D7, 0x2F7FF,
-	0x2FA1E, 0x2FFFD,
-	0x30000, 0x3FFFD,
-	0x40000, 0x4FFFD,
-	0x50000, 0x5FFFD,
-	0x60000, 0x6FFFD,
-	0x70000, 0x7FFFD,
-	0x80000, 0x8FFFD,
-	0x90000, 0x9FFFD,
-	0xA0000, 0xAFFFD,
-	0xB0000, 0xBFFFD,
-	0xC0000, 0xCFFFD,
-	0xD0000, 0xDFFFD,
-	0xE0000, 0xE0000,
-	0xE0002, 0xE001F,
-	0xE0080, 0xEFFFD
-};
-
-/* D.1 Characters with bidirectional property "R" or "AL" */
-static const pg_wchar RandALCat_codepoint_ranges[] =
-{
-	0x05BE, 0x05BE,
-	0x05C0, 0x05C0,
-	0x05C3, 0x05C3,
-	0x05D0, 0x05EA,
-	0x05F0, 0x05F4,
-	0x061B, 0x061B,
-	0x061F, 0x061F,
-	0x0621, 0x063A,
-	0x0640, 0x064A,
-	0x066D, 0x066F,
-	0x0671, 0x06D5,
-	0x06DD, 0x06DD,
-	0x06E5, 0x06E6,
-	0x06FA, 0x06FE,
-	0x0700, 0x070D,
-	0x0710, 0x0710,
-	0x0712, 0x072C,
-	0x0780, 0x07A5,
-	0x07B1, 0x07B1,
-	0x200F, 0x200F,
-	0xFB1D, 0xFB1D,
-	0xFB1F, 0xFB28,
-	0xFB2A, 0xFB36,
-	0xFB38, 0xFB3C,
-	0xFB3E, 0xFB3E,
-	0xFB40, 0xFB41,
-	0xFB43, 0xFB44,
-	0xFB46, 0xFBB1,
-	0xFBD3, 0xFD3D,
-	0xFD50, 0xFD8F,
-	0xFD92, 0xFDC7,
-	0xFDF0, 0xFDFC,
-	0xFE70, 0xFE74,
-	0xFE76, 0xFEFC
-};
-
-/* D.2 Characters with bidirectional property "L" */
-static const pg_wchar LCat_codepoint_ranges[] =
-{
-	0x0041, 0x005A,
-	0x0061, 0x007A,
-	0x00AA, 0x00AA,
-	0x00B5, 0x00B5,
-	0x00BA, 0x00BA,
-	0x00C0, 0x00D6,
-	0x00D8, 0x00F6,
-	0x00F8, 0x0220,
-	0x0222, 0x0233,
-	0x0250, 0x02AD,
-	0x02B0, 0x02B8,
-	0x02BB, 0x02C1,
-	0x02D0, 0x02D1,
-	0x02E0, 0x02E4,
-	0x02EE, 0x02EE,
-	0x037A, 0x037A,
-	0x0386, 0x0386,
-	0x0388, 0x038A,
-	0x038C, 0x038C,
-	0x038E, 0x03A1,
-	0x03A3, 0x03CE,
-	0x03D0, 0x03F5,
-	0x0400, 0x0482,
-	0x048A, 0x04CE,
-	0x04D0, 0x04F5,
-	0x04F8, 0x04F9,
-	0x0500, 0x050F,
-	0x0531, 0x0556,
-	0x0559, 0x055F,
-	0x0561, 0x0587,
-	0x0589, 0x0589,
-	0x0903, 0x0903,
-	0x0905, 0x0939,
-	0x093D, 0x0940,
-	0x0949, 0x094C,
-	0x0950, 0x0950,
-	0x0958, 0x0961,
-	0x0964, 0x0970,
-	0x0982, 0x0983,
-	0x0985, 0x098C,
-	0x098F, 0x0990,
-	0x0993, 0x09A8,
-	0x09AA, 0x09B0,
-	0x09B2, 0x09B2,
-	0x09B6, 0x09B9,
-	0x09BE, 0x09C0,
-	0x09C7, 0x09C8,
-	0x09CB, 0x09CC,
-	0x09D7, 0x09D7,
-	0x09DC, 0x09DD,
-	0x09DF, 0x09E1,
-	0x09E6, 0x09F1,
-	0x09F4, 0x09FA,
-	0x0A05, 0x0A0A,
-	0x0A0F, 0x0A10,
-	0x0A13, 0x0A28,
-	0x0A2A, 0x0A30,
-	0x0A32, 0x0A33,
-	0x0A35, 0x0A36,
-	0x0A38, 0x0A39,
-	0x0A3E, 0x0A40,
-	0x0A59, 0x0A5C,
-	0x0A5E, 0x0A5E,
-	0x0A66, 0x0A6F,
-	0x0A72, 0x0A74,
-	0x0A83, 0x0A83,
-	0x0A85, 0x0A8B,
-	0x0A8D, 0x0A8D,
-	0x0A8F, 0x0A91,
-	0x0A93, 0x0AA8,
-	0x0AAA, 0x0AB0,
-	0x0AB2, 0x0AB3,
-	0x0AB5, 0x0AB9,
-	0x0ABD, 0x0AC0,
-	0x0AC9, 0x0AC9,
-	0x0ACB, 0x0ACC,
-	0x0AD0, 0x0AD0,
-	0x0AE0, 0x0AE0,
-	0x0AE6, 0x0AEF,
-	0x0B02, 0x0B03,
-	0x0B05, 0x0B0C,
-	0x0B0F, 0x0B10,
-	0x0B13, 0x0B28,
-	0x0B2A, 0x0B30,
-	0x0B32, 0x0B33,
-	0x0B36, 0x0B39,
-	0x0B3D, 0x0B3E,
-	0x0B40, 0x0B40,
-	0x0B47, 0x0B48,
-	0x0B4B, 0x0B4C,
-	0x0B57, 0x0B57,
-	0x0B5C, 0x0B5D,
-	0x0B5F, 0x0B61,
-	0x0B66, 0x0B70,
-	0x0B83, 0x0B83,
-	0x0B85, 0x0B8A,
-	0x0B8E, 0x0B90,
-	0x0B92, 0x0B95,
-	0x0B99, 0x0B9A,
-	0x0B9C, 0x0B9C,
-	0x0B9E, 0x0B9F,
-	0x0BA3, 0x0BA4,
-	0x0BA8, 0x0BAA,
-	0x0BAE, 0x0BB5,
-	0x0BB7, 0x0BB9,
-	0x0BBE, 0x0BBF,
-	0x0BC1, 0x0BC2,
-	0x0BC6, 0x0BC8,
-	0x0BCA, 0x0BCC,
-	0x0BD7, 0x0BD7,
-	0x0BE7, 0x0BF2,
-	0x0C01, 0x0C03,
-	0x0C05, 0x0C0C,
-	0x0C0E, 0x0C10,
-	0x0C12, 0x0C28,
-	0x0C2A, 0x0C33,
-	0x0C35, 0x0C39,
-	0x0C41, 0x0C44,
-	0x0C60, 0x0C61,
-	0x0C66, 0x0C6F,
-	0x0C82, 0x0C83,
-	0x0C85, 0x0C8C,
-	0x0C8E, 0x0C90,
-	0x0C92, 0x0CA8,
-	0x0CAA, 0x0CB3,
-	0x0CB5, 0x0CB9,
-	0x0CBE, 0x0CBE,
-	0x0CC0, 0x0CC4,
-	0x0CC7, 0x0CC8,
-	0x0CCA, 0x0CCB,
-	0x0CD5, 0x0CD6,
-	0x0CDE, 0x0CDE,
-	0x0CE0, 0x0CE1,
-	0x0CE6, 0x0CEF,
-	0x0D02, 0x0D03,
-	0x0D05, 0x0D0C,
-	0x0D0E, 0x0D10,
-	0x0D12, 0x0D28,
-	0x0D2A, 0x0D39,
-	0x0D3E, 0x0D40,
-	0x0D46, 0x0D48,
-	0x0D4A, 0x0D4C,
-	0x0D57, 0x0D57,
-	0x0D60, 0x0D61,
-	0x0D66, 0x0D6F,
-	0x0D82, 0x0D83,
-	0x0D85, 0x0D96,
-	0x0D9A, 0x0DB1,
-	0x0DB3, 0x0DBB,
-	0x0DBD, 0x0DBD,
-	0x0DC0, 0x0DC6,
-	0x0DCF, 0x0DD1,
-	0x0DD8, 0x0DDF,
-	0x0DF2, 0x0DF4,
-	0x0E01, 0x0E30,
-	0x0E32, 0x0E33,
-	0x0E40, 0x0E46,
-	0x0E4F, 0x0E5B,
-	0x0E81, 0x0E82,
-	0x0E84, 0x0E84,
-	0x0E87, 0x0E88,
-	0x0E8A, 0x0E8A,
-	0x0E8D, 0x0E8D,
-	0x0E94, 0x0E97,
-	0x0E99, 0x0E9F,
-	0x0EA1, 0x0EA3,
-	0x0EA5, 0x0EA5,
-	0x0EA7, 0x0EA7,
-	0x0EAA, 0x0EAB,
-	0x0EAD, 0x0EB0,
-	0x0EB2, 0x0EB3,
-	0x0EBD, 0x0EBD,
-	0x0EC0, 0x0EC4,
-	0x0EC6, 0x0EC6,
-	0x0ED0, 0x0ED9,
-	0x0EDC, 0x0EDD,
-	0x0F00, 0x0F17,
-	0x0F1A, 0x0F34,
-	0x0F36, 0x0F36,
-	0x0F38, 0x0F38,
-	0x0F3E, 0x0F47,
-	0x0F49, 0x0F6A,
-	0x0F7F, 0x0F7F,
-	0x0F85, 0x0F85,
-	0x0F88, 0x0F8B,
-	0x0FBE, 0x0FC5,
-	0x0FC7, 0x0FCC,
-	0x0FCF, 0x0FCF,
-	0x1000, 0x1021,
-	0x1023, 0x1027,
-	0x1029, 0x102A,
-	0x102C, 0x102C,
-	0x1031, 0x1031,
-	0x1038, 0x1038,
-	0x1040, 0x1057,
-	0x10A0, 0x10C5,
-	0x10D0, 0x10F8,
-	0x10FB, 0x10FB,
-	0x1100, 0x1159,
-	0x115F, 0x11A2,
-	0x11A8, 0x11F9,
-	0x1200, 0x1206,
-	0x1208, 0x1246,
-	0x1248, 0x1248,
-	0x124A, 0x124D,
-	0x1250, 0x1256,
-	0x1258, 0x1258,
-	0x125A, 0x125D,
-	0x1260, 0x1286,
-	0x1288, 0x1288,
-	0x128A, 0x128D,
-	0x1290, 0x12AE,
-	0x12B0, 0x12B0,
-	0x12B2, 0x12B5,
-	0x12B8, 0x12BE,
-	0x12C0, 0x12C0,
-	0x12C2, 0x12C5,
-	0x12C8, 0x12CE,
-	0x12D0, 0x12D6,
-	0x12D8, 0x12EE,
-	0x12F0, 0x130E,
-	0x1310, 0x1310,
-	0x1312, 0x1315,
-	0x1318, 0x131E,
-	0x1320, 0x1346,
-	0x1348, 0x135A,
-	0x1361, 0x137C,
-	0x13A0, 0x13F4,
-	0x1401, 0x1676,
-	0x1681, 0x169A,
-	0x16A0, 0x16F0,
-	0x1700, 0x170C,
-	0x170E, 0x1711,
-	0x1720, 0x1731,
-	0x1735, 0x1736,
-	0x1740, 0x1751,
-	0x1760, 0x176C,
-	0x176E, 0x1770,
-	0x1780, 0x17B6,
-	0x17BE, 0x17C5,
-	0x17C7, 0x17C8,
-	0x17D4, 0x17DA,
-	0x17DC, 0x17DC,
-	0x17E0, 0x17E9,
-	0x1810, 0x1819,
-	0x1820, 0x1877,
-	0x1880, 0x18A8,
-	0x1E00, 0x1E9B,
-	0x1EA0, 0x1EF9,
-	0x1F00, 0x1F15,
-	0x1F18, 0x1F1D,
-	0x1F20, 0x1F45,
-	0x1F48, 0x1F4D,
-	0x1F50, 0x1F57,
-	0x1F59, 0x1F59,
-	0x1F5B, 0x1F5B,
-	0x1F5D, 0x1F5D,
-	0x1F5F, 0x1F7D,
-	0x1F80, 0x1FB4,
-	0x1FB6, 0x1FBC,
-	0x1FBE, 0x1FBE,
-	0x1FC2, 0x1FC4,
-	0x1FC6, 0x1FCC,
-	0x1FD0, 0x1FD3,
-	0x1FD6, 0x1FDB,
-	0x1FE0, 0x1FEC,
-	0x1FF2, 0x1FF4,
-	0x1FF6, 0x1FFC,
-	0x200E, 0x200E,
-	0x2071, 0x2071,
-	0x207F, 0x207F,
-	0x2102, 0x2102,
-	0x2107, 0x2107,
-	0x210A, 0x2113,
-	0x2115, 0x2115,
-	0x2119, 0x211D,
-	0x2124, 0x2124,
-	0x2126, 0x2126,
-	0x2128, 0x2128,
-	0x212A, 0x212D,
-	0x212F, 0x2131,
-	0x2133, 0x2139,
-	0x213D, 0x213F,
-	0x2145, 0x2149,
-	0x2160, 0x2183,
-	0x2336, 0x237A,
-	0x2395, 0x2395,
-	0x249C, 0x24E9,
-	0x3005, 0x3007,
-	0x3021, 0x3029,
-	0x3031, 0x3035,
-	0x3038, 0x303C,
-	0x3041, 0x3096,
-	0x309D, 0x309F,
-	0x30A1, 0x30FA,
-	0x30FC, 0x30FF,
-	0x3105, 0x312C,
-	0x3131, 0x318E,
-	0x3190, 0x31B7,
-	0x31F0, 0x321C,
-	0x3220, 0x3243,
-	0x3260, 0x327B,
-	0x327F, 0x32B0,
-	0x32C0, 0x32CB,
-	0x32D0, 0x32FE,
-	0x3300, 0x3376,
-	0x337B, 0x33DD,
-	0x33E0, 0x33FE,
-	0x3400, 0x4DB5,
-	0x4E00, 0x9FA5,
-	0xA000, 0xA48C,
-	0xAC00, 0xD7A3,
-	0xD800, 0xFA2D,
-	0xFA30, 0xFA6A,
-	0xFB00, 0xFB06,
-	0xFB13, 0xFB17,
-	0xFF21, 0xFF3A,
-	0xFF41, 0xFF5A,
-	0xFF66, 0xFFBE,
-	0xFFC2, 0xFFC7,
-	0xFFCA, 0xFFCF,
-	0xFFD2, 0xFFD7,
-	0xFFDA, 0xFFDC,
-	0x10300, 0x1031E,
-	0x10320, 0x10323,
-	0x10330, 0x1034A,
-	0x10400, 0x10425,
-	0x10428, 0x1044D,
-	0x1D000, 0x1D0F5,
-	0x1D100, 0x1D126,
-	0x1D12A, 0x1D166,
-	0x1D16A, 0x1D172,
-	0x1D183, 0x1D184,
-	0x1D18C, 0x1D1A9,
-	0x1D1AE, 0x1D1DD,
-	0x1D400, 0x1D454,
-	0x1D456, 0x1D49C,
-	0x1D49E, 0x1D49F,
-	0x1D4A2, 0x1D4A2,
-	0x1D4A5, 0x1D4A6,
-	0x1D4A9, 0x1D4AC,
-	0x1D4AE, 0x1D4B9,
-	0x1D4BB, 0x1D4BB,
-	0x1D4BD, 0x1D4C0,
-	0x1D4C2, 0x1D4C3,
-	0x1D4C5, 0x1D505,
-	0x1D507, 0x1D50A,
-	0x1D50D, 0x1D514,
-	0x1D516, 0x1D51C,
-	0x1D51E, 0x1D539,
-	0x1D53B, 0x1D53E,
-	0x1D540, 0x1D544,
-	0x1D546, 0x1D546,
-	0x1D54A, 0x1D550,
-	0x1D552, 0x1D6A3,
-	0x1D6A8, 0x1D7C9,
-	0x20000, 0x2A6D6,
-	0x2F800, 0x2FA1D,
-	0xF0000, 0xFFFFD,
-	0x100000, 0x10FFFD
-};
-
-/* End of stringprep tables */
-
-
-/* Is the given Unicode codepoint in the given table of ranges? */
-#define IS_CODE_IN_TABLE(code, map) is_code_in_table(code, map, lengthof(map))
-
-static int
-codepoint_range_cmp(const void *a, const void *b)
-{
-	const pg_wchar *key = (const pg_wchar *) a;
-	const pg_wchar *range = (const pg_wchar *) b;
-
-	if (*key < range[0])
-		return -1;				/* less than lower bound */
-	if (*key > range[1])
-		return 1;				/* greater than upper bound */
-
-	return 0;					/* within range */
-}
-
-static bool
-is_code_in_table(pg_wchar code, const pg_wchar *map, int mapsize)
-{
-	Assert(mapsize % 2 == 0);
-
-	if (code < map[0] || code > map[mapsize - 1])
-		return false;
-
-	if (bsearch(&code, map, mapsize / 2, sizeof(pg_wchar) * 2,
-				codepoint_range_cmp))
-		return true;
-	else
-		return false;
-}
-
-/*
- * Calculate the length in characters of a null-terminated UTF-8 string.
- *
- * Returns -1 if the input is not valid UTF-8.
- */
-static int
-pg_utf8_string_len(const char *source)
-{
-	const unsigned char *p = (const unsigned char *) source;
-	int			l;
-	int			num_chars = 0;
-
-	while (*p)
-	{
-		l = pg_utf_mblen(p);
-
-		if (!pg_utf8_islegal(p, l))
-			return -1;
-
-		p += l;
-		num_chars++;
-	}
-
-	return num_chars;
-}
-
-
-/*
- * pg_saslprep - Normalize a password with SASLprep.
- *
- * SASLprep requires the input to be in UTF-8 encoding, but PostgreSQL
- * supports many encodings, so we don't blindly assume that.  pg_saslprep
- * will check if the input looks like valid UTF-8, and returns
- * SASLPREP_INVALID_UTF8 if not.
- *
- * If the string contains prohibited characters (or more precisely, if the
- * output string would contain prohibited characters after normalization),
- * returns SASLPREP_PROHIBITED.
- *
- * On success, returns SASLPREP_SUCCESS, and the normalized string in
- * *output.
- *
- * In frontend, the normalized string is malloc'd, and the caller is
- * responsible for freeing it.  If an allocation fails, returns
- * SASLPREP_OOM.  In backend, the normalized string is palloc'd instead,
- * and a failed allocation leads to ereport(ERROR).
- */
-pg_saslprep_rc
-pg_saslprep(const char *input, char **output)
-{
-	pg_wchar   *input_chars = NULL;
-	pg_wchar   *output_chars = NULL;
-	int			input_size;
-	char	   *result;
-	int			result_size;
-	int			count;
-	int			i;
-	bool		contains_RandALCat;
-	unsigned char *p;
-	pg_wchar   *wp;
-
-	/* Ensure we return *output as NULL on failure */
-	*output = NULL;
-
-	/*
-	 * Quick check if the input is pure ASCII.  An ASCII string requires no
-	 * further processing.
-	 */
-	if (pg_is_ascii(input))
-	{
-		*output = STRDUP(input);
-		if (!(*output))
-			goto oom;
-		return SASLPREP_SUCCESS;
-	}
-
-	/*
-	 * Convert the input from UTF-8 to an array of Unicode codepoints.
-	 *
-	 * This also checks that the input is a legal UTF-8 string.
-	 */
-	input_size = pg_utf8_string_len(input);
-	if (input_size < 0)
-		return SASLPREP_INVALID_UTF8;
-
-	input_chars = ALLOC((input_size + 1) * sizeof(pg_wchar));
-	if (!input_chars)
-		goto oom;
-
-	p = (unsigned char *) input;
-	for (i = 0; i < input_size; i++)
-	{
-		input_chars[i] = utf8_to_unicode(p);
-		p += pg_utf_mblen(p);
-	}
-	input_chars[i] = (pg_wchar) '\0';
-
-	/*
-	 * The steps below correspond to the steps listed in [RFC3454], Section
-	 * "2. Preparation Overview"
-	 */
-
-	/*
-	 * 1) Map -- For each character in the input, check if it has a mapping
-	 * and, if so, replace it with its mapping.
-	 */
-	count = 0;
-	for (i = 0; i < input_size; i++)
-	{
-		pg_wchar	code = input_chars[i];
-
-		if (IS_CODE_IN_TABLE(code, non_ascii_space_ranges))
-			input_chars[count++] = 0x0020;
-		else if (IS_CODE_IN_TABLE(code, commonly_mapped_to_nothing_ranges))
-		{
-			/* map to nothing */
-		}
-		else
-			input_chars[count++] = code;
-	}
-	input_chars[count] = (pg_wchar) '\0';
-	input_size = count;
-
-	if (input_size == 0)
-		goto prohibited;		/* don't allow empty password */
-
-	/*
-	 * 2) Normalize -- Normalize the result of step 1 using Unicode
-	 * normalization.
-	 */
-	output_chars = unicode_normalize(UNICODE_NFKC, input_chars);
-	if (!output_chars)
-		goto oom;
-
-	/*
-	 * 3) Prohibit -- Check for any characters that are not allowed in the
-	 * output.  If any are found, return an error.
-	 */
-	for (i = 0; i < input_size; i++)
-	{
-		pg_wchar	code = input_chars[i];
-
-		if (IS_CODE_IN_TABLE(code, prohibited_output_ranges))
-			goto prohibited;
-		if (IS_CODE_IN_TABLE(code, unassigned_codepoint_ranges))
-			goto prohibited;
-	}
-
-	/*
-	 * 4) Check bidi -- Possibly check for right-to-left characters, and if
-	 * any are found, make sure that the whole string satisfies the
-	 * requirements for bidirectional strings.  If the string does not satisfy
-	 * the requirements for bidirectional strings, return an error.
-	 *
-	 * [RFC3454], Section "6. Bidirectional Characters" explains in more
-	 * detail what that means:
-	 *
-	 * "In any profile that specifies bidirectional character handling, all
-	 * three of the following requirements MUST be met:
-	 *
-	 * 1) The characters in section 5.8 MUST be prohibited.
-	 *
-	 * 2) If a string contains any RandALCat character, the string MUST NOT
-	 * contain any LCat character.
-	 *
-	 * 3) If a string contains any RandALCat character, a RandALCat character
-	 * MUST be the first character of the string, and a RandALCat character
-	 * MUST be the last character of the string."
-	 */
-	contains_RandALCat = false;
-	for (i = 0; i < input_size; i++)
-	{
-		pg_wchar	code = input_chars[i];
-
-		if (IS_CODE_IN_TABLE(code, RandALCat_codepoint_ranges))
-		{
-			contains_RandALCat = true;
-			break;
-		}
-	}
-
-	if (contains_RandALCat)
-	{
-		pg_wchar	first = input_chars[0];
-		pg_wchar	last = input_chars[input_size - 1];
-
-		for (i = 0; i < input_size; i++)
-		{
-			pg_wchar	code = input_chars[i];
-
-			if (IS_CODE_IN_TABLE(code, LCat_codepoint_ranges))
-				goto prohibited;
-		}
-
-		if (!IS_CODE_IN_TABLE(first, RandALCat_codepoint_ranges) ||
-			!IS_CODE_IN_TABLE(last, RandALCat_codepoint_ranges))
-			goto prohibited;
-	}
-
-	/*
-	 * Finally, convert the result back to UTF-8.
-	 */
-	result_size = 0;
-	for (wp = output_chars; *wp; wp++)
-	{
-		unsigned char buf[4];
-
-		unicode_to_utf8(*wp, buf);
-		result_size += pg_utf_mblen(buf);
-	}
-
-	result = ALLOC(result_size + 1);
-	if (!result)
-		goto oom;
-
-	/*
-	 * There are no error exits below here, so the error exit paths don't need
-	 * to worry about possibly freeing "result".
-	 */
-	p = (unsigned char *) result;
-	for (wp = output_chars; *wp; wp++)
-	{
-		unicode_to_utf8(*wp, p);
-		p += pg_utf_mblen(p);
-	}
-	Assert((char *) p == result + result_size);
-	*p = '\0';
-
-	FREE(input_chars);
-	FREE(output_chars);
-
-	*output = result;
-	return SASLPREP_SUCCESS;
-
-prohibited:
-	if (input_chars)
-		FREE(input_chars);
-	if (output_chars)
-		FREE(output_chars);
-
-	return SASLPREP_PROHIBITED;
-
-oom:
-	if (input_chars)
-		FREE(input_chars);
-	if (output_chars)
-		FREE(output_chars);
-
-	return SASLPREP_OOM;
-}
diff --git a/contrib/libs/libpq/src/common/scram-common.c b/contrib/libs/libpq/src/common/scram-common.c
deleted file mode 100644
index 22ad929218..0000000000
--- a/contrib/libs/libpq/src/common/scram-common.c
+++ /dev/null
@@ -1,330 +0,0 @@
-/*-------------------------------------------------------------------------
- * scram-common.c
- *		Shared frontend/backend code for SCRAM authentication
- *
- * This contains the common low-level functions needed in both frontend and
- * backend, for implement the Salted Challenge Response Authentication
- * Mechanism (SCRAM), per IETF's RFC 5802.
- *
- * Portions Copyright (c) 2017-2023, PostgreSQL Global Development Group
- *
- * IDENTIFICATION
- *	  src/common/scram-common.c
- *
- *-------------------------------------------------------------------------
- */
-#ifndef FRONTEND
-#include "postgres.h"
-#else
-#include "postgres_fe.h"
-#endif
-
-#include "common/base64.h"
-#include "common/hmac.h"
-#include "common/scram-common.h"
-#ifndef FRONTEND
-#error #include "miscadmin.h"
-#endif
-#include "port/pg_bswap.h"
-
-/*
- * Calculate SaltedPassword.
- *
- * The password should already be normalized by SASLprep.  Returns 0 on
- * success, -1 on failure with *errstr pointing to a message about the
- * error details.
- */
-int
-scram_SaltedPassword(const char *password,
-					 pg_cryptohash_type hash_type, int key_length,
-					 const char *salt, int saltlen, int iterations,
-					 uint8 *result, const char **errstr)
-{
-	int			password_len = strlen(password);
-	uint32		one = pg_hton32(1);
-	int			i,
-				j;
-	uint8		Ui[SCRAM_MAX_KEY_LEN];
-	uint8		Ui_prev[SCRAM_MAX_KEY_LEN];
-	pg_hmac_ctx *hmac_ctx = pg_hmac_create(hash_type);
-
-	if (hmac_ctx == NULL)
-	{
-		*errstr = pg_hmac_error(NULL);	/* returns OOM */
-		return -1;
-	}
-
-	/*
-	 * Iterate hash calculation of HMAC entry using given salt.  This is
-	 * essentially PBKDF2 (see RFC2898) with HMAC() as the pseudorandom
-	 * function.
-	 */
-
-	/* First iteration */
-	if (pg_hmac_init(hmac_ctx, (uint8 *) password, password_len) < 0 ||
-		pg_hmac_update(hmac_ctx, (uint8 *) salt, saltlen) < 0 ||
-		pg_hmac_update(hmac_ctx, (uint8 *) &one, sizeof(uint32)) < 0 ||
-		pg_hmac_final(hmac_ctx, Ui_prev, key_length) < 0)
-	{
-		*errstr = pg_hmac_error(hmac_ctx);
-		pg_hmac_free(hmac_ctx);
-		return -1;
-	}
-
-	memcpy(result, Ui_prev, key_length);
-
-	/* Subsequent iterations */
-	for (i = 2; i <= iterations; i++)
-	{
-#ifndef FRONTEND
-		/*
-		 * Make sure that this is interruptible as scram_iterations could be
-		 * set to a large value.
-		 */
-		CHECK_FOR_INTERRUPTS();
-#endif
-
-		if (pg_hmac_init(hmac_ctx, (uint8 *) password, password_len) < 0 ||
-			pg_hmac_update(hmac_ctx, (uint8 *) Ui_prev, key_length) < 0 ||
-			pg_hmac_final(hmac_ctx, Ui, key_length) < 0)
-		{
-			*errstr = pg_hmac_error(hmac_ctx);
-			pg_hmac_free(hmac_ctx);
-			return -1;
-		}
-
-		for (j = 0; j < key_length; j++)
-			result[j] ^= Ui[j];
-		memcpy(Ui_prev, Ui, key_length);
-	}
-
-	pg_hmac_free(hmac_ctx);
-	return 0;
-}
-
-
-/*
- * Calculate hash for a NULL-terminated string. (The NULL terminator is
- * not included in the hash).  Returns 0 on success, -1 on failure with *errstr
- * pointing to a message about the error details.
- */
-int
-scram_H(const uint8 *input, pg_cryptohash_type hash_type, int key_length,
-		uint8 *result, const char **errstr)
-{
-	pg_cryptohash_ctx *ctx;
-
-	ctx = pg_cryptohash_create(hash_type);
-	if (ctx == NULL)
-	{
-		*errstr = pg_cryptohash_error(NULL);	/* returns OOM */
-		return -1;
-	}
-
-	if (pg_cryptohash_init(ctx) < 0 ||
-		pg_cryptohash_update(ctx, input, key_length) < 0 ||
-		pg_cryptohash_final(ctx, result, key_length) < 0)
-	{
-		*errstr = pg_cryptohash_error(ctx);
-		pg_cryptohash_free(ctx);
-		return -1;
-	}
-
-	pg_cryptohash_free(ctx);
-	return 0;
-}
-
-/*
- * Calculate ClientKey.  Returns 0 on success, -1 on failure with *errstr
- * pointing to a message about the error details.
- */
-int
-scram_ClientKey(const uint8 *salted_password,
-				pg_cryptohash_type hash_type, int key_length,
-				uint8 *result, const char **errstr)
-{
-	pg_hmac_ctx *ctx = pg_hmac_create(hash_type);
-
-	if (ctx == NULL)
-	{
-		*errstr = pg_hmac_error(NULL);	/* returns OOM */
-		return -1;
-	}
-
-	if (pg_hmac_init(ctx, salted_password, key_length) < 0 ||
-		pg_hmac_update(ctx, (uint8 *) "Client Key", strlen("Client Key")) < 0 ||
-		pg_hmac_final(ctx, result, key_length) < 0)
-	{
-		*errstr = pg_hmac_error(ctx);
-		pg_hmac_free(ctx);
-		return -1;
-	}
-
-	pg_hmac_free(ctx);
-	return 0;
-}
-
-/*
- * Calculate ServerKey.  Returns 0 on success, -1 on failure with *errstr
- * pointing to a message about the error details.
- */
-int
-scram_ServerKey(const uint8 *salted_password,
-				pg_cryptohash_type hash_type, int key_length,
-				uint8 *result, const char **errstr)
-{
-	pg_hmac_ctx *ctx = pg_hmac_create(hash_type);
-
-	if (ctx == NULL)
-	{
-		*errstr = pg_hmac_error(NULL);	/* returns OOM */
-		return -1;
-	}
-
-	if (pg_hmac_init(ctx, salted_password, key_length) < 0 ||
-		pg_hmac_update(ctx, (uint8 *) "Server Key", strlen("Server Key")) < 0 ||
-		pg_hmac_final(ctx, result, key_length) < 0)
-	{
-		*errstr = pg_hmac_error(ctx);
-		pg_hmac_free(ctx);
-		return -1;
-	}
-
-	pg_hmac_free(ctx);
-	return 0;
-}
-
-
-/*
- * Construct a SCRAM secret, for storing in pg_authid.rolpassword.
- *
- * The password should already have been processed with SASLprep, if necessary!
- *
- * If iterations is 0, default number of iterations is used.  The result is
- * palloc'd or malloc'd, so caller is responsible for freeing it.
- *
- * On error, returns NULL and sets *errstr to point to a message about the
- * error details.
- */
-char *
-scram_build_secret(pg_cryptohash_type hash_type, int key_length,
-				   const char *salt, int saltlen, int iterations,
-				   const char *password, const char **errstr)
-{
-	uint8		salted_password[SCRAM_MAX_KEY_LEN];
-	uint8		stored_key[SCRAM_MAX_KEY_LEN];
-	uint8		server_key[SCRAM_MAX_KEY_LEN];
-	char	   *result;
-	char	   *p;
-	int			maxlen;
-	int			encoded_salt_len;
-	int			encoded_stored_len;
-	int			encoded_server_len;
-	int			encoded_result;
-
-	/* Only this hash method is supported currently */
-	Assert(hash_type == PG_SHA256);
-
-	Assert(iterations > 0);
-
-	/* Calculate StoredKey and ServerKey */
-	if (scram_SaltedPassword(password, hash_type, key_length,
-							 salt, saltlen, iterations,
-							 salted_password, errstr) < 0 ||
-		scram_ClientKey(salted_password, hash_type, key_length,
-						stored_key, errstr) < 0 ||
-		scram_H(stored_key, hash_type, key_length,
-				stored_key, errstr) < 0 ||
-		scram_ServerKey(salted_password, hash_type, key_length,
-						server_key, errstr) < 0)
-	{
-		/* errstr is filled already here */
-#ifdef FRONTEND
-		return NULL;
-#else
-		elog(ERROR, "could not calculate stored key and server key: %s",
-			 *errstr);
-#endif
-	}
-
-	/*----------
-	 * The format is:
-	 * SCRAM-SHA-256$<iteration count>:<salt>$<StoredKey>:<ServerKey>
-	 *----------
-	 */
-	encoded_salt_len = pg_b64_enc_len(saltlen);
-	encoded_stored_len = pg_b64_enc_len(key_length);
-	encoded_server_len = pg_b64_enc_len(key_length);
-
-	maxlen = strlen("SCRAM-SHA-256") + 1
-		+ 10 + 1				/* iteration count */
-		+ encoded_salt_len + 1	/* Base64-encoded salt */
-		+ encoded_stored_len + 1	/* Base64-encoded StoredKey */
-		+ encoded_server_len + 1;	/* Base64-encoded ServerKey */
-
-#ifdef FRONTEND
-	result = malloc(maxlen);
-	if (!result)
-	{
-		*errstr = _("out of memory");
-		return NULL;
-	}
-#else
-	result = palloc(maxlen);
-#endif
-
-	p = result + sprintf(result, "SCRAM-SHA-256$%d:", iterations);
-
-	/* salt */
-	encoded_result = pg_b64_encode(salt, saltlen, p, encoded_salt_len);
-	if (encoded_result < 0)
-	{
-		*errstr = _("could not encode salt");
-#ifdef FRONTEND
-		free(result);
-		return NULL;
-#else
-		elog(ERROR, "%s", *errstr);
-#endif
-	}
-	p += encoded_result;
-	*(p++) = '$';
-
-	/* stored key */
-	encoded_result = pg_b64_encode((char *) stored_key, key_length, p,
-								   encoded_stored_len);
-	if (encoded_result < 0)
-	{
-		*errstr = _("could not encode stored key");
-#ifdef FRONTEND
-		free(result);
-		return NULL;
-#else
-		elog(ERROR, "%s", *errstr);
-#endif
-	}
-
-	p += encoded_result;
-	*(p++) = ':';
-
-	/* server key */
-	encoded_result = pg_b64_encode((char *) server_key, key_length, p,
-								   encoded_server_len);
-	if (encoded_result < 0)
-	{
-		*errstr = _("could not encode server key");
-#ifdef FRONTEND
-		free(result);
-		return NULL;
-#else
-		elog(ERROR, "%s", *errstr);
-#endif
-	}
-
-	p += encoded_result;
-	*(p++) = '\0';
-
-	Assert(p - result <= maxlen);
-
-	return result;
-}
diff --git a/contrib/libs/libpq/src/common/sprompt.c b/contrib/libs/libpq/src/common/sprompt.c
deleted file mode 100644
index 201c831746..0000000000
--- a/contrib/libs/libpq/src/common/sprompt.c
+++ /dev/null
@@ -1,181 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * sprompt.c
- *	  simple_prompt() routine
- *
- * Portions Copyright (c) 1996-2023, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- *
- * IDENTIFICATION
- *	  src/common/sprompt.c
- *
- *-------------------------------------------------------------------------
- */
-#include "c.h"
-
-#include "common/fe_memutils.h"
-#include "common/string.h"
-
-#ifdef HAVE_TERMIOS_H
-#include <termios.h>
-#endif
-
-
-/*
- * simple_prompt
- *
- * Generalized function especially intended for reading in usernames and
- * passwords interactively.  Reads from /dev/tty or stdin/stderr.
- *
- * prompt:		The prompt to print, or NULL if none (automatically localized)
- * echo:		Set to false if you want to hide what is entered (for passwords)
- *
- * The input (without trailing newline) is returned as a malloc'd string.
- * Caller is responsible for freeing it when done.
- */
-char *
-simple_prompt(const char *prompt, bool echo)
-{
-	return simple_prompt_extended(prompt, echo, NULL);
-}
-
-/*
- * simple_prompt_extended
- *
- * This is the same as simple_prompt(), except that prompt_ctx can
- * optionally be provided to allow this function to be canceled via an
- * existing SIGINT signal handler that will longjmp to the specified place
- * only when *(prompt_ctx->enabled) is true.  If canceled, this function
- * returns an empty string, and prompt_ctx->canceled is set to true.
- */
-char *
-simple_prompt_extended(const char *prompt, bool echo,
-					   PromptInterruptContext *prompt_ctx)
-{
-	char	   *result;
-	FILE	   *termin,
-			   *termout;
-#if defined(HAVE_TERMIOS_H)
-	struct termios t_orig,
-				t;
-#elif defined(WIN32)
-	HANDLE		t = NULL;
-	DWORD		t_orig = 0;
-#endif
-
-#ifdef WIN32
-
-	/*
-	 * A Windows console has an "input code page" and an "output code page";
-	 * these usually match each other, but they rarely match the "Windows ANSI
-	 * code page" defined at system boot and expected of "char *" arguments to
-	 * Windows API functions.  The Microsoft CRT write() implementation
-	 * automatically converts text between these code pages when writing to a
-	 * console.  To identify such file descriptors, it calls GetConsoleMode()
-	 * on the underlying HANDLE, which in turn requires GENERIC_READ access on
-	 * the HANDLE.  Opening termout in mode "w+" allows that detection to
-	 * succeed.  Otherwise, write() would not recognize the descriptor as a
-	 * console, and non-ASCII characters would display incorrectly.
-	 *
-	 * XXX fgets() still receives text in the console's input code page.  This
-	 * makes non-ASCII credentials unportable.
-	 *
-	 * Unintuitively, we also open termin in mode "w+", even though we only
-	 * read it; that's needed for SetConsoleMode() to succeed.
-	 */
-	termin = fopen("CONIN$", "w+");
-	termout = fopen("CONOUT$", "w+");
-#else
-
-	/*
-	 * Do not try to collapse these into one "w+" mode file. Doesn't work on
-	 * some platforms (eg, HPUX 10.20).
-	 */
-	termin = fopen("/dev/tty", "r");
-	termout = fopen("/dev/tty", "w");
-#endif
-	if (!termin || !termout
-#ifdef WIN32
-
-	/*
-	 * Direct console I/O does not work from the MSYS 1.0.10 console.  Writes
-	 * reach nowhere user-visible; reads block indefinitely.  XXX This affects
-	 * most Windows terminal environments, including rxvt, mintty, Cygwin
-	 * xterm, Cygwin sshd, and PowerShell ISE.  Switch to a more-generic test.
-	 */
-		|| (getenv("OSTYPE") && strcmp(getenv("OSTYPE"), "msys") == 0)
-#endif
-		)
-	{
-		if (termin)
-			fclose(termin);
-		if (termout)
-			fclose(termout);
-		termin = stdin;
-		termout = stderr;
-	}
-
-	if (!echo)
-	{
-#if defined(HAVE_TERMIOS_H)
-		/* disable echo via tcgetattr/tcsetattr */
-		tcgetattr(fileno(termin), &t);
-		t_orig = t;
-		t.c_lflag &= ~ECHO;
-		tcsetattr(fileno(termin), TCSAFLUSH, &t);
-#elif defined(WIN32)
-		/* need the file's HANDLE to turn echo off */
-		t = (HANDLE) _get_osfhandle(_fileno(termin));
-
-		/* save the old configuration first */
-		GetConsoleMode(t, &t_orig);
-
-		/* set to the new mode */
-		SetConsoleMode(t, ENABLE_LINE_INPUT | ENABLE_PROCESSED_INPUT);
-#endif
-	}
-
-	if (prompt)
-	{
-		fputs(_(prompt), termout);
-		fflush(termout);
-	}
-
-	result = pg_get_line(termin, prompt_ctx);
-
-	/* If we failed to read anything, just return an empty string */
-	if (result == NULL)
-		result = pg_strdup("");
-
-	/* strip trailing newline, including \r in case we're on Windows */
-	(void) pg_strip_crlf(result);
-
-	if (!echo)
-	{
-		/* restore previous echo behavior, then echo \n */
-#if defined(HAVE_TERMIOS_H)
-		tcsetattr(fileno(termin), TCSAFLUSH, &t_orig);
-		fputs("\n", termout);
-		fflush(termout);
-#elif defined(WIN32)
-		SetConsoleMode(t, t_orig);
-		fputs("\n", termout);
-		fflush(termout);
-#endif
-	}
-	else if (prompt_ctx && prompt_ctx->canceled)
-	{
-		/* also echo \n if prompt was canceled */
-		fputs("\n", termout);
-		fflush(termout);
-	}
-
-	if (termin != stdin)
-	{
-		fclose(termin);
-		fclose(termout);
-	}
-
-	return result;
-}
diff --git a/contrib/libs/libpq/src/common/string.c b/contrib/libs/libpq/src/common/string.c
deleted file mode 100644
index de97413635..0000000000
--- a/contrib/libs/libpq/src/common/string.c
+++ /dev/null
@@ -1,164 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * string.c
- *		string handling helpers
- *
- *
- * Portions Copyright (c) 1996-2023, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- *
- * IDENTIFICATION
- *	  src/common/string.c
- *
- *-------------------------------------------------------------------------
- */
-
-
-#ifndef FRONTEND
-#include "postgres.h"
-#else
-#include "postgres_fe.h"
-#endif
-
-#include "common/string.h"
-#include "lib/stringinfo.h"
-
-
-/*
- * Returns whether the string `str' has the postfix `end'.
- */
-bool
-pg_str_endswith(const char *str, const char *end)
-{
-	size_t		slen = strlen(str);
-	size_t		elen = strlen(end);
-
-	/* can't be a postfix if longer */
-	if (elen > slen)
-		return false;
-
-	/* compare the end of the strings */
-	str += slen - elen;
-	return strcmp(str, end) == 0;
-}
-
-
-/*
- * strtoint --- just like strtol, but returns int not long
- */
-int
-strtoint(const char *pg_restrict str, char **pg_restrict endptr, int base)
-{
-	long		val;
-
-	val = strtol(str, endptr, base);
-	if (val != (int) val)
-		errno = ERANGE;
-	return (int) val;
-}
-
-
-/*
- * pg_clean_ascii -- Replace any non-ASCII chars with a "\xXX" string
- *
- * Makes a newly allocated copy of the string passed in, which must be
- * '\0'-terminated. In the backend, additional alloc_flags may be provided and
- * will be passed as-is to palloc_extended(); in the frontend, alloc_flags is
- * ignored and the copy is malloc'd.
- *
- * This function exists specifically to deal with filtering out
- * non-ASCII characters in a few places where the client can provide an almost
- * arbitrary string (and it isn't checked to ensure it's a valid username or
- * database name or similar) and we don't want to have control characters or other
- * things ending up in the log file where server admins might end up with a
- * messed up terminal when looking at them.
- *
- * In general, this function should NOT be used- instead, consider how to handle
- * the string without needing to filter out the non-ASCII characters.
- *
- * Ultimately, we'd like to improve the situation to not require replacing all
- * non-ASCII but perform more intelligent filtering which would allow UTF or
- * similar, but it's unclear exactly what we should allow, so stick to ASCII only
- * for now.
- */
-char *
-pg_clean_ascii(const char *str, int alloc_flags)
-{
-	size_t		dstlen;
-	char	   *dst;
-	const char *p;
-	size_t		i = 0;
-
-	/* Worst case, each byte can become four bytes, plus a null terminator. */
-	dstlen = strlen(str) * 4 + 1;
-
-#ifdef FRONTEND
-	dst = malloc(dstlen);
-#else
-	dst = palloc_extended(dstlen, alloc_flags);
-#endif
-
-	if (!dst)
-		return NULL;
-
-	for (p = str; *p != '\0'; p++)
-	{
-
-		/* Only allow clean ASCII chars in the string */
-		if (*p < 32 || *p > 126)
-		{
-			Assert(i < (dstlen - 3));
-			snprintf(&dst[i], dstlen - i, "\\x%02x", (unsigned char) *p);
-			i += 4;
-		}
-		else
-		{
-			Assert(i < dstlen);
-			dst[i] = *p;
-			i++;
-		}
-	}
-
-	Assert(i < dstlen);
-	dst[i] = '\0';
-	return dst;
-}
-
-
-/*
- * pg_is_ascii -- Check if string is made only of ASCII characters
- */
-bool
-pg_is_ascii(const char *str)
-{
-	while (*str)
-	{
-		if (IS_HIGHBIT_SET(*str))
-			return false;
-		str++;
-	}
-	return true;
-}
-
-
-/*
- * pg_strip_crlf -- Remove any trailing newline and carriage return
- *
- * Removes any trailing newline and carriage return characters (\r on
- * Windows) in the input string, zero-terminating it.
- *
- * The passed in string must be zero-terminated.  This function returns
- * the new length of the string.
- */
-int
-pg_strip_crlf(char *str)
-{
-	int			len = strlen(str);
-
-	while (len > 0 && (str[len - 1] == '\n' ||
-					   str[len - 1] == '\r'))
-		str[--len] = '\0';
-
-	return len;
-}
diff --git a/contrib/libs/libpq/src/common/stringinfo.c b/contrib/libs/libpq/src/common/stringinfo.c
deleted file mode 100644
index 230dafd6c8..0000000000
--- a/contrib/libs/libpq/src/common/stringinfo.c
+++ /dev/null
@@ -1,343 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * stringinfo.c
- *
- * StringInfo provides an extensible string data type (currently limited to a
- * length of 1GB).  It can be used to buffer either ordinary C strings
- * (null-terminated text) or arbitrary binary data.  All storage is allocated
- * with palloc() (falling back to malloc in frontend code).
- *
- * Portions Copyright (c) 1996-2023, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- *	  src/common/stringinfo.c
- *
- *-------------------------------------------------------------------------
- */
-
-#ifndef FRONTEND
-
-#include "postgres.h"
-#error #include "utils/memutils.h"
-
-#else
-
-#include "postgres_fe.h"
-
-/* It's possible we could use a different value for this in frontend code */
-#define MaxAllocSize	((Size) 0x3fffffff) /* 1 gigabyte - 1 */
-
-#endif
-
-#include "lib/stringinfo.h"
-
-
-/*
- * makeStringInfo
- *
- * Create an empty 'StringInfoData' & return a pointer to it.
- */
-StringInfo
-makeStringInfo(void)
-{
-	StringInfo	res;
-
-	res = (StringInfo) palloc(sizeof(StringInfoData));
-
-	initStringInfo(res);
-
-	return res;
-}
-
-/*
- * initStringInfo
- *
- * Initialize a StringInfoData struct (with previously undefined contents)
- * to describe an empty string.
- */
-void
-initStringInfo(StringInfo str)
-{
-	int			size = 1024;	/* initial default buffer size */
-
-	str->data = (char *) palloc(size);
-	str->maxlen = size;
-	resetStringInfo(str);
-}
-
-/*
- * resetStringInfo
- *
- * Reset the StringInfo: the data buffer remains valid, but its
- * previous content, if any, is cleared.
- */
-void
-resetStringInfo(StringInfo str)
-{
-	str->data[0] = '\0';
-	str->len = 0;
-	str->cursor = 0;
-}
-
-/*
- * appendStringInfo
- *
- * Format text data under the control of fmt (an sprintf-style format string)
- * and append it to whatever is already in str.  More space is allocated
- * to str if necessary.  This is sort of like a combination of sprintf and
- * strcat.
- */
-void
-appendStringInfo(StringInfo str, const char *fmt,...)
-{
-	int			save_errno = errno;
-
-	for (;;)
-	{
-		va_list		args;
-		int			needed;
-
-		/* Try to format the data. */
-		errno = save_errno;
-		va_start(args, fmt);
-		needed = appendStringInfoVA(str, fmt, args);
-		va_end(args);
-
-		if (needed == 0)
-			break;				/* success */
-
-		/* Increase the buffer size and try again. */
-		enlargeStringInfo(str, needed);
-	}
-}
-
-/*
- * appendStringInfoVA
- *
- * Attempt to format text data under the control of fmt (an sprintf-style
- * format string) and append it to whatever is already in str.  If successful
- * return zero; if not (because there's not enough space), return an estimate
- * of the space needed, without modifying str.  Typically the caller should
- * pass the return value to enlargeStringInfo() before trying again; see
- * appendStringInfo for standard usage pattern.
- *
- * Caution: callers must be sure to preserve their entry-time errno
- * when looping, in case the fmt contains "%m".
- *
- * XXX This API is ugly, but there seems no alternative given the C spec's
- * restrictions on what can portably be done with va_list arguments: you have
- * to redo va_start before you can rescan the argument list, and we can't do
- * that from here.
- */
-int
-appendStringInfoVA(StringInfo str, const char *fmt, va_list args)
-{
-	int			avail;
-	size_t		nprinted;
-
-	Assert(str != NULL);
-
-	/*
-	 * If there's hardly any space, don't bother trying, just fail to make the
-	 * caller enlarge the buffer first.  We have to guess at how much to
-	 * enlarge, since we're skipping the formatting work.
-	 */
-	avail = str->maxlen - str->len;
-	if (avail < 16)
-		return 32;
-
-	nprinted = pvsnprintf(str->data + str->len, (size_t) avail, fmt, args);
-
-	if (nprinted < (size_t) avail)
-	{
-		/* Success.  Note nprinted does not include trailing null. */
-		str->len += (int) nprinted;
-		return 0;
-	}
-
-	/* Restore the trailing null so that str is unmodified. */
-	str->data[str->len] = '\0';
-
-	/*
-	 * Return pvsnprintf's estimate of the space needed.  (Although this is
-	 * given as a size_t, we know it will fit in int because it's not more
-	 * than MaxAllocSize.)
-	 */
-	return (int) nprinted;
-}
-
-/*
- * appendStringInfoString
- *
- * Append a null-terminated string to str.
- * Like appendStringInfo(str, "%s", s) but faster.
- */
-void
-appendStringInfoString(StringInfo str, const char *s)
-{
-	appendBinaryStringInfo(str, s, strlen(s));
-}
-
-/*
- * appendStringInfoChar
- *
- * Append a single byte to str.
- * Like appendStringInfo(str, "%c", ch) but much faster.
- */
-void
-appendStringInfoChar(StringInfo str, char ch)
-{
-	/* Make more room if needed */
-	if (str->len + 1 >= str->maxlen)
-		enlargeStringInfo(str, 1);
-
-	/* OK, append the character */
-	str->data[str->len] = ch;
-	str->len++;
-	str->data[str->len] = '\0';
-}
-
-/*
- * appendStringInfoSpaces
- *
- * Append the specified number of spaces to a buffer.
- */
-void
-appendStringInfoSpaces(StringInfo str, int count)
-{
-	if (count > 0)
-	{
-		/* Make more room if needed */
-		enlargeStringInfo(str, count);
-
-		/* OK, append the spaces */
-		memset(&str->data[str->len], ' ', count);
-		str->len += count;
-		str->data[str->len] = '\0';
-	}
-}
-
-/*
- * appendBinaryStringInfo
- *
- * Append arbitrary binary data to a StringInfo, allocating more space
- * if necessary. Ensures that a trailing null byte is present.
- */
-void
-appendBinaryStringInfo(StringInfo str, const void *data, int datalen)
-{
-	Assert(str != NULL);
-
-	/* Make more room if needed */
-	enlargeStringInfo(str, datalen);
-
-	/* OK, append the data */
-	memcpy(str->data + str->len, data, datalen);
-	str->len += datalen;
-
-	/*
-	 * Keep a trailing null in place, even though it's probably useless for
-	 * binary data.  (Some callers are dealing with text but call this because
-	 * their input isn't null-terminated.)
-	 */
-	str->data[str->len] = '\0';
-}
-
-/*
- * appendBinaryStringInfoNT
- *
- * Append arbitrary binary data to a StringInfo, allocating more space
- * if necessary. Does not ensure a trailing null-byte exists.
- */
-void
-appendBinaryStringInfoNT(StringInfo str, const void *data, int datalen)
-{
-	Assert(str != NULL);
-
-	/* Make more room if needed */
-	enlargeStringInfo(str, datalen);
-
-	/* OK, append the data */
-	memcpy(str->data + str->len, data, datalen);
-	str->len += datalen;
-}
-
-/*
- * enlargeStringInfo
- *
- * Make sure there is enough space for 'needed' more bytes
- * ('needed' does not include the terminating null).
- *
- * External callers usually need not concern themselves with this, since
- * all stringinfo.c routines do it automatically.  However, if a caller
- * knows that a StringInfo will eventually become X bytes large, it
- * can save some palloc overhead by enlarging the buffer before starting
- * to store data in it.
- *
- * NB: In the backend, because we use repalloc() to enlarge the buffer, the
- * string buffer will remain allocated in the same memory context that was
- * current when initStringInfo was called, even if another context is now
- * current.  This is the desired and indeed critical behavior!
- */
-void
-enlargeStringInfo(StringInfo str, int needed)
-{
-	int			newlen;
-
-	/*
-	 * Guard against out-of-range "needed" values.  Without this, we can get
-	 * an overflow or infinite loop in the following.
-	 */
-	if (needed < 0)				/* should not happen */
-	{
-#ifndef FRONTEND
-		elog(ERROR, "invalid string enlargement request size: %d", needed);
-#else
-		fprintf(stderr, "invalid string enlargement request size: %d\n", needed);
-		exit(EXIT_FAILURE);
-#endif
-	}
-	if (((Size) needed) >= (MaxAllocSize - (Size) str->len))
-	{
-#ifndef FRONTEND
-		ereport(ERROR,
-				(errcode(ERRCODE_PROGRAM_LIMIT_EXCEEDED),
-				 errmsg("out of memory"),
-				 errdetail("Cannot enlarge string buffer containing %d bytes by %d more bytes.",
-						   str->len, needed)));
-#else
-		fprintf(stderr,
-				_("out of memory\n\nCannot enlarge string buffer containing %d bytes by %d more bytes.\n"),
-				str->len, needed);
-		exit(EXIT_FAILURE);
-#endif
-	}
-
-	needed += str->len + 1;		/* total space required now */
-
-	/* Because of the above test, we now have needed <= MaxAllocSize */
-
-	if (needed <= str->maxlen)
-		return;					/* got enough space already */
-
-	/*
-	 * We don't want to allocate just a little more space with each append;
-	 * for efficiency, double the buffer size each time it overflows.
-	 * Actually, we might need to more than double it if 'needed' is big...
-	 */
-	newlen = 2 * str->maxlen;
-	while (needed > newlen)
-		newlen = 2 * newlen;
-
-	/*
-	 * Clamp to MaxAllocSize in case we went past it.  Note we are assuming
-	 * here that MaxAllocSize <= INT_MAX/2, else the above loop could
-	 * overflow.  We will still have newlen >= needed.
-	 */
-	if (newlen > (int) MaxAllocSize)
-		newlen = (int) MaxAllocSize;
-
-	str->data = (char *) repalloc(str->data, newlen);
-
-	str->maxlen = newlen;
-}
diff --git a/contrib/libs/libpq/src/common/unicode_norm.c b/contrib/libs/libpq/src/common/unicode_norm.c
deleted file mode 100644
index 6b40bdfeb4..0000000000
--- a/contrib/libs/libpq/src/common/unicode_norm.c
+++ /dev/null
@@ -1,634 +0,0 @@
-/*-------------------------------------------------------------------------
- * unicode_norm.c
- *		Normalize a Unicode string
- *
- * This implements Unicode normalization, per the documentation at
- * https://www.unicode.org/reports/tr15/.
- *
- * Portions Copyright (c) 2017-2023, PostgreSQL Global Development Group
- *
- * IDENTIFICATION
- *	  src/common/unicode_norm.c
- *
- *-------------------------------------------------------------------------
- */
-#ifndef FRONTEND
-#include "postgres.h"
-#else
-#include "postgres_fe.h"
-#endif
-
-#include "common/unicode_norm.h"
-#ifndef FRONTEND
-#error #include "common/unicode_norm_hashfunc.h"
-#error #include "common/unicode_normprops_table.h"
-#include "port/pg_bswap.h"
-#else
-#include "common/unicode_norm_table.h"
-#endif
-
-#ifndef FRONTEND
-#define ALLOC(size) palloc(size)
-#define FREE(size) pfree(size)
-#else
-#define ALLOC(size) malloc(size)
-#define FREE(size) free(size)
-#endif
-
-/* Constants for calculations with Hangul characters */
-#define SBASE		0xAC00		/* U+AC00 */
-#define LBASE		0x1100		/* U+1100 */
-#define VBASE		0x1161		/* U+1161 */
-#define TBASE		0x11A7		/* U+11A7 */
-#define LCOUNT		19
-#define VCOUNT		21
-#define TCOUNT		28
-#define NCOUNT		VCOUNT * TCOUNT
-#define SCOUNT		LCOUNT * NCOUNT
-
-#ifdef FRONTEND
-/* comparison routine for bsearch() of decomposition lookup table. */
-static int
-conv_compare(const void *p1, const void *p2)
-{
-	uint32		v1,
-				v2;
-
-	v1 = *(const uint32 *) p1;
-	v2 = ((const pg_unicode_decomposition *) p2)->codepoint;
-	return (v1 > v2) ? 1 : ((v1 == v2) ? 0 : -1);
-}
-
-#endif
-
-/*
- * get_code_entry
- *
- * Get the entry corresponding to code in the decomposition lookup table.
- * The backend version of this code uses a perfect hash function for the
- * lookup, while the frontend version uses a binary search.
- */
-static const pg_unicode_decomposition *
-get_code_entry(pg_wchar code)
-{
-#ifndef FRONTEND
-	int			h;
-	uint32		hashkey;
-	pg_unicode_decompinfo decompinfo = UnicodeDecompInfo;
-
-	/*
-	 * Compute the hash function. The hash key is the codepoint with the bytes
-	 * in network order.
-	 */
-	hashkey = pg_hton32(code);
-	h = decompinfo.hash(&hashkey);
-
-	/* An out-of-range result implies no match */
-	if (h < 0 || h >= decompinfo.num_decomps)
-		return NULL;
-
-	/*
-	 * Since it's a perfect hash, we need only match to the specific codepoint
-	 * it identifies.
-	 */
-	if (code != decompinfo.decomps[h].codepoint)
-		return NULL;
-
-	/* Success! */
-	return &decompinfo.decomps[h];
-#else
-	return bsearch(&(code),
-				   UnicodeDecompMain,
-				   lengthof(UnicodeDecompMain),
-				   sizeof(pg_unicode_decomposition),
-				   conv_compare);
-#endif
-}
-
-/*
- * Get the combining class of the given codepoint.
- */
-static uint8
-get_canonical_class(pg_wchar code)
-{
-	const pg_unicode_decomposition *entry = get_code_entry(code);
-
-	/*
-	 * If no entries are found, the character used is either an Hangul
-	 * character or a character with a class of 0 and no decompositions.
-	 */
-	if (!entry)
-		return 0;
-	else
-		return entry->comb_class;
-}
-
-/*
- * Given a decomposition entry looked up earlier, get the decomposed
- * characters.
- *
- * Note: the returned pointer can point to statically allocated buffer, and
- * is only valid until next call to this function!
- */
-static const pg_wchar *
-get_code_decomposition(const pg_unicode_decomposition *entry, int *dec_size)
-{
-	static pg_wchar x;
-
-	if (DECOMPOSITION_IS_INLINE(entry))
-	{
-		Assert(DECOMPOSITION_SIZE(entry) == 1);
-		x = (pg_wchar) entry->dec_index;
-		*dec_size = 1;
-		return &x;
-	}
-	else
-	{
-		*dec_size = DECOMPOSITION_SIZE(entry);
-		return &UnicodeDecomp_codepoints[entry->dec_index];
-	}
-}
-
-/*
- * Calculate how many characters a given character will decompose to.
- *
- * This needs to recurse, if the character decomposes into characters that
- * are, in turn, decomposable.
- */
-static int
-get_decomposed_size(pg_wchar code, bool compat)
-{
-	const pg_unicode_decomposition *entry;
-	int			size = 0;
-	int			i;
-	const uint32 *decomp;
-	int			dec_size;
-
-	/*
-	 * Fast path for Hangul characters not stored in tables to save memory as
-	 * decomposition is algorithmic. See
-	 * https://www.unicode.org/reports/tr15/tr15-18.html, annex 10 for details
-	 * on the matter.
-	 */
-	if (code >= SBASE && code < SBASE + SCOUNT)
-	{
-		uint32		tindex,
-					sindex;
-
-		sindex = code - SBASE;
-		tindex = sindex % TCOUNT;
-
-		if (tindex != 0)
-			return 3;
-		return 2;
-	}
-
-	entry = get_code_entry(code);
-
-	/*
-	 * Just count current code if no other decompositions.  A NULL entry is
-	 * equivalent to a character with class 0 and no decompositions.
-	 */
-	if (entry == NULL || DECOMPOSITION_SIZE(entry) == 0 ||
-		(!compat && DECOMPOSITION_IS_COMPAT(entry)))
-		return 1;
-
-	/*
-	 * If this entry has other decomposition codes look at them as well. First
-	 * get its decomposition in the list of tables available.
-	 */
-	decomp = get_code_decomposition(entry, &dec_size);
-	for (i = 0; i < dec_size; i++)
-	{
-		uint32		lcode = decomp[i];
-
-		size += get_decomposed_size(lcode, compat);
-	}
-
-	return size;
-}
-
-/*
- * Recompose a set of characters. For hangul characters, the calculation
- * is algorithmic. For others, an inverse lookup at the decomposition
- * table is necessary. Returns true if a recomposition can be done, and
- * false otherwise.
- */
-static bool
-recompose_code(uint32 start, uint32 code, uint32 *result)
-{
-	/*
-	 * Handle Hangul characters algorithmically, per the Unicode spec.
-	 *
-	 * Check if two current characters are L and V.
-	 */
-	if (start >= LBASE && start < LBASE + LCOUNT &&
-		code >= VBASE && code < VBASE + VCOUNT)
-	{
-		/* make syllable of form LV */
-		uint32		lindex = start - LBASE;
-		uint32		vindex = code - VBASE;
-
-		*result = SBASE + (lindex * VCOUNT + vindex) * TCOUNT;
-		return true;
-	}
-	/* Check if two current characters are LV and T */
-	else if (start >= SBASE && start < (SBASE + SCOUNT) &&
-			 ((start - SBASE) % TCOUNT) == 0 &&
-			 code >= TBASE && code < (TBASE + TCOUNT))
-	{
-		/* make syllable of form LVT */
-		uint32		tindex = code - TBASE;
-
-		*result = start + tindex;
-		return true;
-	}
-	else
-	{
-		const pg_unicode_decomposition *entry;
-
-		/*
-		 * Do an inverse lookup of the decomposition tables to see if anything
-		 * matches. The comparison just needs to be a perfect match on the
-		 * sub-table of size two, because the start character has already been
-		 * recomposed partially.  This lookup uses a perfect hash function for
-		 * the backend code.
-		 */
-#ifndef FRONTEND
-
-		int			h,
-					inv_lookup_index;
-		uint64		hashkey;
-		pg_unicode_recompinfo recompinfo = UnicodeRecompInfo;
-
-		/*
-		 * Compute the hash function. The hash key is formed by concatenating
-		 * bytes of the two codepoints in network order. See also
-		 * src/common/unicode/generate-unicode_norm_table.pl.
-		 */
-		hashkey = pg_hton64(((uint64) start << 32) | (uint64) code);
-		h = recompinfo.hash(&hashkey);
-
-		/* An out-of-range result implies no match */
-		if (h < 0 || h >= recompinfo.num_recomps)
-			return false;
-
-		inv_lookup_index = recompinfo.inverse_lookup[h];
-		entry = &UnicodeDecompMain[inv_lookup_index];
-
-		if (start == UnicodeDecomp_codepoints[entry->dec_index] &&
-			code == UnicodeDecomp_codepoints[entry->dec_index + 1])
-		{
-			*result = entry->codepoint;
-			return true;
-		}
-
-#else
-
-		int			i;
-
-		for (i = 0; i < lengthof(UnicodeDecompMain); i++)
-		{
-			entry = &UnicodeDecompMain[i];
-
-			if (DECOMPOSITION_SIZE(entry) != 2)
-				continue;
-
-			if (DECOMPOSITION_NO_COMPOSE(entry))
-				continue;
-
-			if (start == UnicodeDecomp_codepoints[entry->dec_index] &&
-				code == UnicodeDecomp_codepoints[entry->dec_index + 1])
-			{
-				*result = entry->codepoint;
-				return true;
-			}
-		}
-#endif							/* !FRONTEND */
-	}
-
-	return false;
-}
-
-/*
- * Decompose the given code into the array given by caller. The
- * decomposition begins at the position given by caller, saving one
- * lookup on the decomposition table. The current position needs to be
- * updated here to let the caller know from where to continue filling
- * in the array result.
- */
-static void
-decompose_code(pg_wchar code, bool compat, pg_wchar **result, int *current)
-{
-	const pg_unicode_decomposition *entry;
-	int			i;
-	const uint32 *decomp;
-	int			dec_size;
-
-	/*
-	 * Fast path for Hangul characters not stored in tables to save memory as
-	 * decomposition is algorithmic. See
-	 * https://www.unicode.org/reports/tr15/tr15-18.html, annex 10 for details
-	 * on the matter.
-	 */
-	if (code >= SBASE && code < SBASE + SCOUNT)
-	{
-		uint32		l,
-					v,
-					tindex,
-					sindex;
-		pg_wchar   *res = *result;
-
-		sindex = code - SBASE;
-		l = LBASE + sindex / (VCOUNT * TCOUNT);
-		v = VBASE + (sindex % (VCOUNT * TCOUNT)) / TCOUNT;
-		tindex = sindex % TCOUNT;
-
-		res[*current] = l;
-		(*current)++;
-		res[*current] = v;
-		(*current)++;
-
-		if (tindex != 0)
-		{
-			res[*current] = TBASE + tindex;
-			(*current)++;
-		}
-
-		return;
-	}
-
-	entry = get_code_entry(code);
-
-	/*
-	 * Just fill in with the current decomposition if there are no
-	 * decomposition codes to recurse to.  A NULL entry is equivalent to a
-	 * character with class 0 and no decompositions, so just leave also in
-	 * this case.
-	 */
-	if (entry == NULL || DECOMPOSITION_SIZE(entry) == 0 ||
-		(!compat && DECOMPOSITION_IS_COMPAT(entry)))
-	{
-		pg_wchar   *res = *result;
-
-		res[*current] = code;
-		(*current)++;
-		return;
-	}
-
-	/*
-	 * If this entry has other decomposition codes look at them as well.
-	 */
-	decomp = get_code_decomposition(entry, &dec_size);
-	for (i = 0; i < dec_size; i++)
-	{
-		pg_wchar	lcode = (pg_wchar) decomp[i];
-
-		/* Leave if no more decompositions */
-		decompose_code(lcode, compat, result, current);
-	}
-}
-
-/*
- * unicode_normalize - Normalize a Unicode string to the specified form.
- *
- * The input is a 0-terminated array of codepoints.
- *
- * In frontend, returns a 0-terminated array of codepoints, allocated with
- * malloc. Or NULL if we run out of memory. In backend, the returned
- * string is palloc'd instead, and OOM is reported with ereport().
- */
-pg_wchar *
-unicode_normalize(UnicodeNormalizationForm form, const pg_wchar *input)
-{
-	bool		compat = (form == UNICODE_NFKC || form == UNICODE_NFKD);
-	bool		recompose = (form == UNICODE_NFC || form == UNICODE_NFKC);
-	pg_wchar   *decomp_chars;
-	pg_wchar   *recomp_chars;
-	int			decomp_size,
-				current_size;
-	int			count;
-	const pg_wchar *p;
-
-	/* variables for recomposition */
-	int			last_class;
-	int			starter_pos;
-	int			target_pos;
-	uint32		starter_ch;
-
-	/* First, do character decomposition */
-
-	/*
-	 * Calculate how many characters long the decomposed version will be.
-	 */
-	decomp_size = 0;
-	for (p = input; *p; p++)
-		decomp_size += get_decomposed_size(*p, compat);
-
-	decomp_chars = (pg_wchar *) ALLOC((decomp_size + 1) * sizeof(pg_wchar));
-	if (decomp_chars == NULL)
-		return NULL;
-
-	/*
-	 * Now fill in each entry recursively. This needs a second pass on the
-	 * decomposition table.
-	 */
-	current_size = 0;
-	for (p = input; *p; p++)
-		decompose_code(*p, compat, &decomp_chars, &current_size);
-	decomp_chars[decomp_size] = '\0';
-	Assert(decomp_size == current_size);
-
-	/* Leave if there is nothing to decompose */
-	if (decomp_size == 0)
-		return decomp_chars;
-
-	/*
-	 * Now apply canonical ordering.
-	 */
-	for (count = 1; count < decomp_size; count++)
-	{
-		pg_wchar	prev = decomp_chars[count - 1];
-		pg_wchar	next = decomp_chars[count];
-		pg_wchar	tmp;
-		const uint8 prevClass = get_canonical_class(prev);
-		const uint8 nextClass = get_canonical_class(next);
-
-		/*
-		 * Per Unicode (https://www.unicode.org/reports/tr15/tr15-18.html)
-		 * annex 4, a sequence of two adjacent characters in a string is an
-		 * exchangeable pair if the combining class (from the Unicode
-		 * Character Database) for the first character is greater than the
-		 * combining class for the second, and the second is not a starter.  A
-		 * character is a starter if its combining class is 0.
-		 */
-		if (prevClass == 0 || nextClass == 0)
-			continue;
-
-		if (prevClass <= nextClass)
-			continue;
-
-		/* exchange can happen */
-		tmp = decomp_chars[count - 1];
-		decomp_chars[count - 1] = decomp_chars[count];
-		decomp_chars[count] = tmp;
-
-		/* backtrack to check again */
-		if (count > 1)
-			count -= 2;
-	}
-
-	if (!recompose)
-		return decomp_chars;
-
-	/*
-	 * The last phase of NFC and NFKC is the recomposition of the reordered
-	 * Unicode string using combining classes. The recomposed string cannot be
-	 * longer than the decomposed one, so make the allocation of the output
-	 * string based on that assumption.
-	 */
-	recomp_chars = (pg_wchar *) ALLOC((decomp_size + 1) * sizeof(pg_wchar));
-	if (!recomp_chars)
-	{
-		FREE(decomp_chars);
-		return NULL;
-	}
-
-	last_class = -1;			/* this eliminates a special check */
-	starter_pos = 0;
-	target_pos = 1;
-	starter_ch = recomp_chars[0] = decomp_chars[0];
-
-	for (count = 1; count < decomp_size; count++)
-	{
-		pg_wchar	ch = decomp_chars[count];
-		int			ch_class = get_canonical_class(ch);
-		pg_wchar	composite;
-
-		if (last_class < ch_class &&
-			recompose_code(starter_ch, ch, &composite))
-		{
-			recomp_chars[starter_pos] = composite;
-			starter_ch = composite;
-		}
-		else if (ch_class == 0)
-		{
-			starter_pos = target_pos;
-			starter_ch = ch;
-			last_class = -1;
-			recomp_chars[target_pos++] = ch;
-		}
-		else
-		{
-			last_class = ch_class;
-			recomp_chars[target_pos++] = ch;
-		}
-	}
-	recomp_chars[target_pos] = (pg_wchar) '\0';
-
-	FREE(decomp_chars);
-
-	return recomp_chars;
-}
-
-/*
- * Normalization "quick check" algorithm; see
- * <http://www.unicode.org/reports/tr15/#Detecting_Normalization_Forms>
- */
-
-/* We only need this in the backend. */
-#ifndef FRONTEND
-
-static const pg_unicode_normprops *
-qc_hash_lookup(pg_wchar ch, const pg_unicode_norminfo *norminfo)
-{
-	int			h;
-	uint32		hashkey;
-
-	/*
-	 * Compute the hash function. The hash key is the codepoint with the bytes
-	 * in network order.
-	 */
-	hashkey = pg_hton32(ch);
-	h = norminfo->hash(&hashkey);
-
-	/* An out-of-range result implies no match */
-	if (h < 0 || h >= norminfo->num_normprops)
-		return NULL;
-
-	/*
-	 * Since it's a perfect hash, we need only match to the specific codepoint
-	 * it identifies.
-	 */
-	if (ch != norminfo->normprops[h].codepoint)
-		return NULL;
-
-	/* Success! */
-	return &norminfo->normprops[h];
-}
-
-/*
- * Look up the normalization quick check character property
- */
-static UnicodeNormalizationQC
-qc_is_allowed(UnicodeNormalizationForm form, pg_wchar ch)
-{
-	const pg_unicode_normprops *found = NULL;
-
-	switch (form)
-	{
-		case UNICODE_NFC:
-			found = qc_hash_lookup(ch, &UnicodeNormInfo_NFC_QC);
-			break;
-		case UNICODE_NFKC:
-			found = qc_hash_lookup(ch, &UnicodeNormInfo_NFKC_QC);
-			break;
-		default:
-			Assert(false);
-			break;
-	}
-
-	if (found)
-		return found->quickcheck;
-	else
-		return UNICODE_NORM_QC_YES;
-}
-
-UnicodeNormalizationQC
-unicode_is_normalized_quickcheck(UnicodeNormalizationForm form, const pg_wchar *input)
-{
-	uint8		lastCanonicalClass = 0;
-	UnicodeNormalizationQC result = UNICODE_NORM_QC_YES;
-
-	/*
-	 * For the "D" forms, we don't run the quickcheck.  We don't include the
-	 * lookup tables for those because they are huge, checking for these
-	 * particular forms is less common, and running the slow path is faster
-	 * for the "D" forms than the "C" forms because you don't need to
-	 * recompose, which is slow.
-	 */
-	if (form == UNICODE_NFD || form == UNICODE_NFKD)
-		return UNICODE_NORM_QC_MAYBE;
-
-	for (const pg_wchar *p = input; *p; p++)
-	{
-		pg_wchar	ch = *p;
-		uint8		canonicalClass;
-		UnicodeNormalizationQC check;
-
-		canonicalClass = get_canonical_class(ch);
-		if (lastCanonicalClass > canonicalClass && canonicalClass != 0)
-			return UNICODE_NORM_QC_NO;
-
-		check = qc_is_allowed(form, ch);
-		if (check == UNICODE_NORM_QC_NO)
-			return UNICODE_NORM_QC_NO;
-		else if (check == UNICODE_NORM_QC_MAYBE)
-			result = UNICODE_NORM_QC_MAYBE;
-
-		lastCanonicalClass = canonicalClass;
-	}
-	return result;
-}
-
-#endif							/* !FRONTEND */
diff --git a/contrib/libs/libpq/src/common/username.c b/contrib/libs/libpq/src/common/username.c
deleted file mode 100644
index e8ac4c4977..0000000000
--- a/contrib/libs/libpq/src/common/username.c
+++ /dev/null
@@ -1,87 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * username.c
- *	  get user name
- *
- * Portions Copyright (c) 1996-2023, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- * IDENTIFICATION
- *	  src/common/username.c
- *
- *-------------------------------------------------------------------------
- */
-
-#ifndef FRONTEND
-#include "postgres.h"
-#else
-#include "postgres_fe.h"
-#endif
-
-#include <pwd.h>
-#include <unistd.h>
-
-#include "common/username.h"
-
-/*
- * Returns the current user name in a static buffer
- * On error, returns NULL and sets *errstr to point to a palloc'd message
- */
-const char *
-get_user_name(char **errstr)
-{
-#ifndef WIN32
-	struct passwd *pw;
-	uid_t		user_id = geteuid();
-
-	*errstr = NULL;
-
-	errno = 0;					/* clear errno before call */
-	pw = getpwuid(user_id);
-	if (!pw)
-	{
-		*errstr = psprintf(_("could not look up effective user ID %ld: %s"),
-						   (long) user_id,
-						   errno ? strerror(errno) : _("user does not exist"));
-		return NULL;
-	}
-
-	return pw->pw_name;
-#else
-	/* Microsoft recommends buffer size of UNLEN+1, where UNLEN = 256 */
-	/* "static" variable remains after function exit */
-	static char username[256 + 1];
-	DWORD		len = sizeof(username);
-
-	*errstr = NULL;
-
-	if (!GetUserName(username, &len))
-	{
-		*errstr = psprintf(_("user name lookup failure: error code %lu"),
-						   GetLastError());
-		return NULL;
-	}
-
-	return username;
-#endif
-}
-
-
-/*
- * Returns the current user name in a static buffer or exits
- */
-const char *
-get_user_name_or_exit(const char *progname)
-{
-	const char *user_name;
-	char	   *errstr;
-
-	user_name = get_user_name(&errstr);
-
-	if (!user_name)
-	{
-		fprintf(stderr, "%s: %s\n", progname, errstr);
-		exit(1);
-	}
-	return user_name;
-}
diff --git a/contrib/libs/libpq/src/common/wait_error.c b/contrib/libs/libpq/src/common/wait_error.c
deleted file mode 100644
index a90b745f07..0000000000
--- a/contrib/libs/libpq/src/common/wait_error.c
+++ /dev/null
@@ -1,148 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * wait_error.c
- *		Convert a wait/waitpid(2) result code to a human-readable string
- *
- *
- * Portions Copyright (c) 1996-2023, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- *
- * IDENTIFICATION
- *	  src/common/wait_error.c
- *
- *-------------------------------------------------------------------------
- */
-
-#ifndef FRONTEND
-#include "postgres.h"
-#else
-#include "postgres_fe.h"
-#endif
-
-#include <signal.h>
-#include <sys/wait.h>
-
-/*
- * Return a human-readable string explaining the reason a child process
- * terminated. The argument is a return code returned by wait(2) or
- * waitpid(2), which also applies to pclose(3) and system(3). The result is a
- * translated, palloc'd or malloc'd string.
- */
-char *
-wait_result_to_str(int exitstatus)
-{
-	char		str[512];
-
-	/*
-	 * To simplify using this after pclose() and system(), handle status -1
-	 * first.  In that case, there is no wait result but some error indicated
-	 * by errno.
-	 */
-	if (exitstatus == -1)
-	{
-		snprintf(str, sizeof(str), "%m");
-	}
-	else if (WIFEXITED(exitstatus))
-	{
-		/*
-		 * Give more specific error message for some common exit codes that
-		 * have a special meaning in shells.
-		 */
-		switch (WEXITSTATUS(exitstatus))
-		{
-			case 126:
-				snprintf(str, sizeof(str), _("command not executable"));
-				break;
-
-			case 127:
-				snprintf(str, sizeof(str), _("command not found"));
-				break;
-
-			default:
-				snprintf(str, sizeof(str),
-						 _("child process exited with exit code %d"),
-						 WEXITSTATUS(exitstatus));
-		}
-	}
-	else if (WIFSIGNALED(exitstatus))
-	{
-#if defined(WIN32)
-		snprintf(str, sizeof(str),
-				 _("child process was terminated by exception 0x%X"),
-				 WTERMSIG(exitstatus));
-#else
-		snprintf(str, sizeof(str),
-				 _("child process was terminated by signal %d: %s"),
-				 WTERMSIG(exitstatus), pg_strsignal(WTERMSIG(exitstatus)));
-#endif
-	}
-	else
-		snprintf(str, sizeof(str),
-				 _("child process exited with unrecognized status %d"),
-				 exitstatus);
-
-	return pstrdup(str);
-}
-
-/*
- * Return true if a wait(2) result indicates that the child process
- * died due to the specified signal.
- *
- * The reason this is worth having a wrapper function for is that
- * there are two cases: the signal might have been received by our
- * immediate child process, or there might've been a shell process
- * between us and the child that died.  The shell will, per POSIX,
- * report the child death using exit code 128 + signal number.
- *
- * If there is no possibility of an intermediate shell, this function
- * need not (and probably should not) be used.
- */
-bool
-wait_result_is_signal(int exit_status, int signum)
-{
-	if (WIFSIGNALED(exit_status) && WTERMSIG(exit_status) == signum)
-		return true;
-	if (WIFEXITED(exit_status) && WEXITSTATUS(exit_status) == 128 + signum)
-		return true;
-	return false;
-}
-
-/*
- * Return true if a wait(2) result indicates that the child process
- * died due to any signal.  We consider either direct child death
- * or a shell report of child process death as matching the condition.
- *
- * If include_command_not_found is true, also return true for shell
- * exit codes indicating "command not found" and the like
- * (specifically, exit codes 126 and 127; see above).
- */
-bool
-wait_result_is_any_signal(int exit_status, bool include_command_not_found)
-{
-	if (WIFSIGNALED(exit_status))
-		return true;
-	if (WIFEXITED(exit_status) &&
-		WEXITSTATUS(exit_status) > (include_command_not_found ? 125 : 128))
-		return true;
-	return false;
-}
-
-/*
- * Return the shell exit code (normally 0 to 255) that corresponds to the
- * given wait status.  The argument is a wait status as returned by wait(2)
- * or waitpid(2), which also applies to pclose(3) and system(3).  To support
- * the latter two cases, we pass through "-1" unchanged.
- */
-int
-wait_result_to_exit_code(int exit_status)
-{
-	if (exit_status == -1)
-		return -1;				/* failure of pclose() or system() */
-	if (WIFEXITED(exit_status))
-		return WEXITSTATUS(exit_status);
-	if (WIFSIGNALED(exit_status))
-		return 128 + WTERMSIG(exit_status);
-	/* On many systems, this is unreachable */
-	return -1;
-}
diff --git a/contrib/libs/libpq/src/common/wchar.c b/contrib/libs/libpq/src/common/wchar.c
deleted file mode 100644
index fbac11deb4..0000000000
--- a/contrib/libs/libpq/src/common/wchar.c
+++ /dev/null
@@ -1,2194 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * wchar.c
- *	  Functions for working with multibyte characters in various encodings.
- *
- * Portions Copyright (c) 1998-2023, PostgreSQL Global Development Group
- *
- * IDENTIFICATION
- *	  src/common/wchar.c
- *
- *-------------------------------------------------------------------------
- */
-#include "c.h"
-
-#include "mb/pg_wchar.h"
-#include "utils/ascii.h"
-
-
-/*
- * Operations on multi-byte encodings are driven by a table of helper
- * functions.
- *
- * To add an encoding support, define mblen(), dsplen(), verifychar() and
- * verifystr() for the encoding.  For server-encodings, also define mb2wchar()
- * and wchar2mb() conversion functions.
- *
- * These functions generally assume that their input is validly formed.
- * The "verifier" functions, further down in the file, have to be more
- * paranoid.
- *
- * We expect that mblen() does not need to examine more than the first byte
- * of the character to discover the correct length.  GB18030 is an exception
- * to that rule, though, as it also looks at second byte.  But even that
- * behaves in a predictable way, if you only pass the first byte: it will
- * treat 4-byte encoded characters as two 2-byte encoded characters, which is
- * good enough for all current uses.
- *
- * Note: for the display output of psql to work properly, the return values
- * of the dsplen functions must conform to the Unicode standard. In particular
- * the NUL character is zero width and control characters are generally
- * width -1. It is recommended that non-ASCII encodings refer their ASCII
- * subset to the ASCII routines to ensure consistency.
- */
-
-/*
- * SQL/ASCII
- */
-static int
-pg_ascii2wchar_with_len(const unsigned char *from, pg_wchar *to, int len)
-{
-	int			cnt = 0;
-
-	while (len > 0 && *from)
-	{
-		*to++ = *from++;
-		len--;
-		cnt++;
-	}
-	*to = 0;
-	return cnt;
-}
-
-static int
-pg_ascii_mblen(const unsigned char *s)
-{
-	return 1;
-}
-
-static int
-pg_ascii_dsplen(const unsigned char *s)
-{
-	if (*s == '\0')
-		return 0;
-	if (*s < 0x20 || *s == 0x7f)
-		return -1;
-
-	return 1;
-}
-
-/*
- * EUC
- */
-static int
-pg_euc2wchar_with_len(const unsigned char *from, pg_wchar *to, int len)
-{
-	int			cnt = 0;
-
-	while (len > 0 && *from)
-	{
-		if (*from == SS2 && len >= 2)	/* JIS X 0201 (so called "1 byte
-										 * KANA") */
-		{
-			from++;
-			*to = (SS2 << 8) | *from++;
-			len -= 2;
-		}
-		else if (*from == SS3 && len >= 3)	/* JIS X 0212 KANJI */
-		{
-			from++;
-			*to = (SS3 << 16) | (*from++ << 8);
-			*to |= *from++;
-			len -= 3;
-		}
-		else if (IS_HIGHBIT_SET(*from) && len >= 2) /* JIS X 0208 KANJI */
-		{
-			*to = *from++ << 8;
-			*to |= *from++;
-			len -= 2;
-		}
-		else					/* must be ASCII */
-		{
-			*to = *from++;
-			len--;
-		}
-		to++;
-		cnt++;
-	}
-	*to = 0;
-	return cnt;
-}
-
-static inline int
-pg_euc_mblen(const unsigned char *s)
-{
-	int			len;
-
-	if (*s == SS2)
-		len = 2;
-	else if (*s == SS3)
-		len = 3;
-	else if (IS_HIGHBIT_SET(*s))
-		len = 2;
-	else
-		len = 1;
-	return len;
-}
-
-static inline int
-pg_euc_dsplen(const unsigned char *s)
-{
-	int			len;
-
-	if (*s == SS2)
-		len = 2;
-	else if (*s == SS3)
-		len = 2;
-	else if (IS_HIGHBIT_SET(*s))
-		len = 2;
-	else
-		len = pg_ascii_dsplen(s);
-	return len;
-}
-
-/*
- * EUC_JP
- */
-static int
-pg_eucjp2wchar_with_len(const unsigned char *from, pg_wchar *to, int len)
-{
-	return pg_euc2wchar_with_len(from, to, len);
-}
-
-static int
-pg_eucjp_mblen(const unsigned char *s)
-{
-	return pg_euc_mblen(s);
-}
-
-static int
-pg_eucjp_dsplen(const unsigned char *s)
-{
-	int			len;
-
-	if (*s == SS2)
-		len = 1;
-	else if (*s == SS3)
-		len = 2;
-	else if (IS_HIGHBIT_SET(*s))
-		len = 2;
-	else
-		len = pg_ascii_dsplen(s);
-	return len;
-}
-
-/*
- * EUC_KR
- */
-static int
-pg_euckr2wchar_with_len(const unsigned char *from, pg_wchar *to, int len)
-{
-	return pg_euc2wchar_with_len(from, to, len);
-}
-
-static int
-pg_euckr_mblen(const unsigned char *s)
-{
-	return pg_euc_mblen(s);
-}
-
-static int
-pg_euckr_dsplen(const unsigned char *s)
-{
-	return pg_euc_dsplen(s);
-}
-
-/*
- * EUC_CN
- *
- */
-static int
-pg_euccn2wchar_with_len(const unsigned char *from, pg_wchar *to, int len)
-{
-	int			cnt = 0;
-
-	while (len > 0 && *from)
-	{
-		if (*from == SS2 && len >= 3)	/* code set 2 (unused?) */
-		{
-			from++;
-			*to = (SS2 << 16) | (*from++ << 8);
-			*to |= *from++;
-			len -= 3;
-		}
-		else if (*from == SS3 && len >= 3)	/* code set 3 (unused ?) */
-		{
-			from++;
-			*to = (SS3 << 16) | (*from++ << 8);
-			*to |= *from++;
-			len -= 3;
-		}
-		else if (IS_HIGHBIT_SET(*from) && len >= 2) /* code set 1 */
-		{
-			*to = *from++ << 8;
-			*to |= *from++;
-			len -= 2;
-		}
-		else
-		{
-			*to = *from++;
-			len--;
-		}
-		to++;
-		cnt++;
-	}
-	*to = 0;
-	return cnt;
-}
-
-static int
-pg_euccn_mblen(const unsigned char *s)
-{
-	int			len;
-
-	if (IS_HIGHBIT_SET(*s))
-		len = 2;
-	else
-		len = 1;
-	return len;
-}
-
-static int
-pg_euccn_dsplen(const unsigned char *s)
-{
-	int			len;
-
-	if (IS_HIGHBIT_SET(*s))
-		len = 2;
-	else
-		len = pg_ascii_dsplen(s);
-	return len;
-}
-
-/*
- * EUC_TW
- *
- */
-static int
-pg_euctw2wchar_with_len(const unsigned char *from, pg_wchar *to, int len)
-{
-	int			cnt = 0;
-
-	while (len > 0 && *from)
-	{
-		if (*from == SS2 && len >= 4)	/* code set 2 */
-		{
-			from++;
-			*to = (((uint32) SS2) << 24) | (*from++ << 16);
-			*to |= *from++ << 8;
-			*to |= *from++;
-			len -= 4;
-		}
-		else if (*from == SS3 && len >= 3)	/* code set 3 (unused?) */
-		{
-			from++;
-			*to = (SS3 << 16) | (*from++ << 8);
-			*to |= *from++;
-			len -= 3;
-		}
-		else if (IS_HIGHBIT_SET(*from) && len >= 2) /* code set 2 */
-		{
-			*to = *from++ << 8;
-			*to |= *from++;
-			len -= 2;
-		}
-		else
-		{
-			*to = *from++;
-			len--;
-		}
-		to++;
-		cnt++;
-	}
-	*to = 0;
-	return cnt;
-}
-
-static int
-pg_euctw_mblen(const unsigned char *s)
-{
-	int			len;
-
-	if (*s == SS2)
-		len = 4;
-	else if (*s == SS3)
-		len = 3;
-	else if (IS_HIGHBIT_SET(*s))
-		len = 2;
-	else
-		len = 1;
-	return len;
-}
-
-static int
-pg_euctw_dsplen(const unsigned char *s)
-{
-	int			len;
-
-	if (*s == SS2)
-		len = 2;
-	else if (*s == SS3)
-		len = 2;
-	else if (IS_HIGHBIT_SET(*s))
-		len = 2;
-	else
-		len = pg_ascii_dsplen(s);
-	return len;
-}
-
-/*
- * Convert pg_wchar to EUC_* encoding.
- * caller must allocate enough space for "to", including a trailing zero!
- * len: length of from.
- * "from" not necessarily null terminated.
- */
-static int
-pg_wchar2euc_with_len(const pg_wchar *from, unsigned char *to, int len)
-{
-	int			cnt = 0;
-
-	while (len > 0 && *from)
-	{
-		unsigned char c;
-
-		if ((c = (*from >> 24)))
-		{
-			*to++ = c;
-			*to++ = (*from >> 16) & 0xff;
-			*to++ = (*from >> 8) & 0xff;
-			*to++ = *from & 0xff;
-			cnt += 4;
-		}
-		else if ((c = (*from >> 16)))
-		{
-			*to++ = c;
-			*to++ = (*from >> 8) & 0xff;
-			*to++ = *from & 0xff;
-			cnt += 3;
-		}
-		else if ((c = (*from >> 8)))
-		{
-			*to++ = c;
-			*to++ = *from & 0xff;
-			cnt += 2;
-		}
-		else
-		{
-			*to++ = *from;
-			cnt++;
-		}
-		from++;
-		len--;
-	}
-	*to = 0;
-	return cnt;
-}
-
-
-/*
- * JOHAB
- */
-static int
-pg_johab_mblen(const unsigned char *s)
-{
-	return pg_euc_mblen(s);
-}
-
-static int
-pg_johab_dsplen(const unsigned char *s)
-{
-	return pg_euc_dsplen(s);
-}
-
-/*
- * convert UTF8 string to pg_wchar (UCS-4)
- * caller must allocate enough space for "to", including a trailing zero!
- * len: length of from.
- * "from" not necessarily null terminated.
- */
-static int
-pg_utf2wchar_with_len(const unsigned char *from, pg_wchar *to, int len)
-{
-	int			cnt = 0;
-	uint32		c1,
-				c2,
-				c3,
-				c4;
-
-	while (len > 0 && *from)
-	{
-		if ((*from & 0x80) == 0)
-		{
-			*to = *from++;
-			len--;
-		}
-		else if ((*from & 0xe0) == 0xc0)
-		{
-			if (len < 2)
-				break;			/* drop trailing incomplete char */
-			c1 = *from++ & 0x1f;
-			c2 = *from++ & 0x3f;
-			*to = (c1 << 6) | c2;
-			len -= 2;
-		}
-		else if ((*from & 0xf0) == 0xe0)
-		{
-			if (len < 3)
-				break;			/* drop trailing incomplete char */
-			c1 = *from++ & 0x0f;
-			c2 = *from++ & 0x3f;
-			c3 = *from++ & 0x3f;
-			*to = (c1 << 12) | (c2 << 6) | c3;
-			len -= 3;
-		}
-		else if ((*from & 0xf8) == 0xf0)
-		{
-			if (len < 4)
-				break;			/* drop trailing incomplete char */
-			c1 = *from++ & 0x07;
-			c2 = *from++ & 0x3f;
-			c3 = *from++ & 0x3f;
-			c4 = *from++ & 0x3f;
-			*to = (c1 << 18) | (c2 << 12) | (c3 << 6) | c4;
-			len -= 4;
-		}
-		else
-		{
-			/* treat a bogus char as length 1; not ours to raise error */
-			*to = *from++;
-			len--;
-		}
-		to++;
-		cnt++;
-	}
-	*to = 0;
-	return cnt;
-}
-
-
-/*
- * Map a Unicode code point to UTF-8.  utf8string must have 4 bytes of
- * space allocated.
- */
-unsigned char *
-unicode_to_utf8(pg_wchar c, unsigned char *utf8string)
-{
-	if (c <= 0x7F)
-	{
-		utf8string[0] = c;
-	}
-	else if (c <= 0x7FF)
-	{
-		utf8string[0] = 0xC0 | ((c >> 6) & 0x1F);
-		utf8string[1] = 0x80 | (c & 0x3F);
-	}
-	else if (c <= 0xFFFF)
-	{
-		utf8string[0] = 0xE0 | ((c >> 12) & 0x0F);
-		utf8string[1] = 0x80 | ((c >> 6) & 0x3F);
-		utf8string[2] = 0x80 | (c & 0x3F);
-	}
-	else
-	{
-		utf8string[0] = 0xF0 | ((c >> 18) & 0x07);
-		utf8string[1] = 0x80 | ((c >> 12) & 0x3F);
-		utf8string[2] = 0x80 | ((c >> 6) & 0x3F);
-		utf8string[3] = 0x80 | (c & 0x3F);
-	}
-
-	return utf8string;
-}
-
-/*
- * Trivial conversion from pg_wchar to UTF-8.
- * caller should allocate enough space for "to"
- * len: length of from.
- * "from" not necessarily null terminated.
- */
-static int
-pg_wchar2utf_with_len(const pg_wchar *from, unsigned char *to, int len)
-{
-	int			cnt = 0;
-
-	while (len > 0 && *from)
-	{
-		int			char_len;
-
-		unicode_to_utf8(*from, to);
-		char_len = pg_utf_mblen(to);
-		cnt += char_len;
-		to += char_len;
-		from++;
-		len--;
-	}
-	*to = 0;
-	return cnt;
-}
-
-/*
- * Return the byte length of a UTF8 character pointed to by s
- *
- * Note: in the current implementation we do not support UTF8 sequences
- * of more than 4 bytes; hence do NOT return a value larger than 4.
- * We return "1" for any leading byte that is either flat-out illegal or
- * indicates a length larger than we support.
- *
- * pg_utf2wchar_with_len(), utf8_to_unicode(), pg_utf8_islegal(), and perhaps
- * other places would need to be fixed to change this.
- */
-int
-pg_utf_mblen(const unsigned char *s)
-{
-	int			len;
-
-	if ((*s & 0x80) == 0)
-		len = 1;
-	else if ((*s & 0xe0) == 0xc0)
-		len = 2;
-	else if ((*s & 0xf0) == 0xe0)
-		len = 3;
-	else if ((*s & 0xf8) == 0xf0)
-		len = 4;
-#ifdef NOT_USED
-	else if ((*s & 0xfc) == 0xf8)
-		len = 5;
-	else if ((*s & 0xfe) == 0xfc)
-		len = 6;
-#endif
-	else
-		len = 1;
-	return len;
-}
-
-/*
- * This is an implementation of wcwidth() and wcswidth() as defined in
- * "The Single UNIX Specification, Version 2, The Open Group, 1997"
- * <http://www.unix.org/online.html>
- *
- * Markus Kuhn -- 2001-09-08 -- public domain
- *
- * customised for PostgreSQL
- *
- * original available at : http://www.cl.cam.ac.uk/~mgk25/ucs/wcwidth.c
- */
-
-struct mbinterval
-{
-	unsigned int first;
-	unsigned int last;
-};
-
-/* auxiliary function for binary search in interval table */
-static int
-mbbisearch(pg_wchar ucs, const struct mbinterval *table, int max)
-{
-	int			min = 0;
-	int			mid;
-
-	if (ucs < table[0].first || ucs > table[max].last)
-		return 0;
-	while (max >= min)
-	{
-		mid = (min + max) / 2;
-		if (ucs > table[mid].last)
-			min = mid + 1;
-		else if (ucs < table[mid].first)
-			max = mid - 1;
-		else
-			return 1;
-	}
-
-	return 0;
-}
-
-
-/* The following functions define the column width of an ISO 10646
- * character as follows:
- *
- *	  - The null character (U+0000) has a column width of 0.
- *
- *	  - Other C0/C1 control characters and DEL will lead to a return
- *		value of -1.
- *
- *	  - Non-spacing and enclosing combining characters (general
- *		category code Mn, Me or Cf in the Unicode database) have a
- *		column width of 0.
- *
- *	  - Spacing characters in the East Asian Wide (W) or East Asian
- *		FullWidth (F) category as defined in Unicode Technical
- *		Report #11 have a column width of 2.
- *
- *	  - All remaining characters (including all printable
- *		ISO 8859-1 and WGL4 characters, Unicode control characters,
- *		etc.) have a column width of 1.
- *
- * This implementation assumes that wchar_t characters are encoded
- * in ISO 10646.
- */
-
-static int
-ucs_wcwidth(pg_wchar ucs)
-{
-#include "common/unicode_nonspacing_table.h"
-#include "common/unicode_east_asian_fw_table.h"
-
-	/* test for 8-bit control characters */
-	if (ucs == 0)
-		return 0;
-
-	if (ucs < 0x20 || (ucs >= 0x7f && ucs < 0xa0) || ucs > 0x0010ffff)
-		return -1;
-
-	/*
-	 * binary search in table of non-spacing characters
-	 *
-	 * XXX: In the official Unicode sources, it is possible for a character to
-	 * be described as both non-spacing and wide at the same time. As of
-	 * Unicode 13.0, treating the non-spacing property as the determining
-	 * factor for display width leads to the correct behavior, so do that
-	 * search first.
-	 */
-	if (mbbisearch(ucs, nonspacing,
-				   sizeof(nonspacing) / sizeof(struct mbinterval) - 1))
-		return 0;
-
-	/* binary search in table of wide characters */
-	if (mbbisearch(ucs, east_asian_fw,
-				   sizeof(east_asian_fw) / sizeof(struct mbinterval) - 1))
-		return 2;
-
-	return 1;
-}
-
-/*
- * Convert a UTF-8 character to a Unicode code point.
- * This is a one-character version of pg_utf2wchar_with_len.
- *
- * No error checks here, c must point to a long-enough string.
- */
-pg_wchar
-utf8_to_unicode(const unsigned char *c)
-{
-	if ((*c & 0x80) == 0)
-		return (pg_wchar) c[0];
-	else if ((*c & 0xe0) == 0xc0)
-		return (pg_wchar) (((c[0] & 0x1f) << 6) |
-						   (c[1] & 0x3f));
-	else if ((*c & 0xf0) == 0xe0)
-		return (pg_wchar) (((c[0] & 0x0f) << 12) |
-						   ((c[1] & 0x3f) << 6) |
-						   (c[2] & 0x3f));
-	else if ((*c & 0xf8) == 0xf0)
-		return (pg_wchar) (((c[0] & 0x07) << 18) |
-						   ((c[1] & 0x3f) << 12) |
-						   ((c[2] & 0x3f) << 6) |
-						   (c[3] & 0x3f));
-	else
-		/* that is an invalid code on purpose */
-		return 0xffffffff;
-}
-
-static int
-pg_utf_dsplen(const unsigned char *s)
-{
-	return ucs_wcwidth(utf8_to_unicode(s));
-}
-
-/*
- * convert mule internal code to pg_wchar
- * caller should allocate enough space for "to"
- * len: length of from.
- * "from" not necessarily null terminated.
- */
-static int
-pg_mule2wchar_with_len(const unsigned char *from, pg_wchar *to, int len)
-{
-	int			cnt = 0;
-
-	while (len > 0 && *from)
-	{
-		if (IS_LC1(*from) && len >= 2)
-		{
-			*to = *from++ << 16;
-			*to |= *from++;
-			len -= 2;
-		}
-		else if (IS_LCPRV1(*from) && len >= 3)
-		{
-			from++;
-			*to = *from++ << 16;
-			*to |= *from++;
-			len -= 3;
-		}
-		else if (IS_LC2(*from) && len >= 3)
-		{
-			*to = *from++ << 16;
-			*to |= *from++ << 8;
-			*to |= *from++;
-			len -= 3;
-		}
-		else if (IS_LCPRV2(*from) && len >= 4)
-		{
-			from++;
-			*to = *from++ << 16;
-			*to |= *from++ << 8;
-			*to |= *from++;
-			len -= 4;
-		}
-		else
-		{						/* assume ASCII */
-			*to = (unsigned char) *from++;
-			len--;
-		}
-		to++;
-		cnt++;
-	}
-	*to = 0;
-	return cnt;
-}
-
-/*
- * convert pg_wchar to mule internal code
- * caller should allocate enough space for "to"
- * len: length of from.
- * "from" not necessarily null terminated.
- */
-static int
-pg_wchar2mule_with_len(const pg_wchar *from, unsigned char *to, int len)
-{
-	int			cnt = 0;
-
-	while (len > 0 && *from)
-	{
-		unsigned char lb;
-
-		lb = (*from >> 16) & 0xff;
-		if (IS_LC1(lb))
-		{
-			*to++ = lb;
-			*to++ = *from & 0xff;
-			cnt += 2;
-		}
-		else if (IS_LC2(lb))
-		{
-			*to++ = lb;
-			*to++ = (*from >> 8) & 0xff;
-			*to++ = *from & 0xff;
-			cnt += 3;
-		}
-		else if (IS_LCPRV1_A_RANGE(lb))
-		{
-			*to++ = LCPRV1_A;
-			*to++ = lb;
-			*to++ = *from & 0xff;
-			cnt += 3;
-		}
-		else if (IS_LCPRV1_B_RANGE(lb))
-		{
-			*to++ = LCPRV1_B;
-			*to++ = lb;
-			*to++ = *from & 0xff;
-			cnt += 3;
-		}
-		else if (IS_LCPRV2_A_RANGE(lb))
-		{
-			*to++ = LCPRV2_A;
-			*to++ = lb;
-			*to++ = (*from >> 8) & 0xff;
-			*to++ = *from & 0xff;
-			cnt += 4;
-		}
-		else if (IS_LCPRV2_B_RANGE(lb))
-		{
-			*to++ = LCPRV2_B;
-			*to++ = lb;
-			*to++ = (*from >> 8) & 0xff;
-			*to++ = *from & 0xff;
-			cnt += 4;
-		}
-		else
-		{
-			*to++ = *from & 0xff;
-			cnt += 1;
-		}
-		from++;
-		len--;
-	}
-	*to = 0;
-	return cnt;
-}
-
-/* exported for direct use by conv.c */
-int
-pg_mule_mblen(const unsigned char *s)
-{
-	int			len;
-
-	if (IS_LC1(*s))
-		len = 2;
-	else if (IS_LCPRV1(*s))
-		len = 3;
-	else if (IS_LC2(*s))
-		len = 3;
-	else if (IS_LCPRV2(*s))
-		len = 4;
-	else
-		len = 1;				/* assume ASCII */
-	return len;
-}
-
-static int
-pg_mule_dsplen(const unsigned char *s)
-{
-	int			len;
-
-	/*
-	 * Note: it's not really appropriate to assume that all multibyte charsets
-	 * are double-wide on screen.  But this seems an okay approximation for
-	 * the MULE charsets we currently support.
-	 */
-
-	if (IS_LC1(*s))
-		len = 1;
-	else if (IS_LCPRV1(*s))
-		len = 1;
-	else if (IS_LC2(*s))
-		len = 2;
-	else if (IS_LCPRV2(*s))
-		len = 2;
-	else
-		len = 1;				/* assume ASCII */
-
-	return len;
-}
-
-/*
- * ISO8859-1
- */
-static int
-pg_latin12wchar_with_len(const unsigned char *from, pg_wchar *to, int len)
-{
-	int			cnt = 0;
-
-	while (len > 0 && *from)
-	{
-		*to++ = *from++;
-		len--;
-		cnt++;
-	}
-	*to = 0;
-	return cnt;
-}
-
-/*
- * Trivial conversion from pg_wchar to single byte encoding. Just ignores
- * high bits.
- * caller should allocate enough space for "to"
- * len: length of from.
- * "from" not necessarily null terminated.
- */
-static int
-pg_wchar2single_with_len(const pg_wchar *from, unsigned char *to, int len)
-{
-	int			cnt = 0;
-
-	while (len > 0 && *from)
-	{
-		*to++ = *from++;
-		len--;
-		cnt++;
-	}
-	*to = 0;
-	return cnt;
-}
-
-static int
-pg_latin1_mblen(const unsigned char *s)
-{
-	return 1;
-}
-
-static int
-pg_latin1_dsplen(const unsigned char *s)
-{
-	return pg_ascii_dsplen(s);
-}
-
-/*
- * SJIS
- */
-static int
-pg_sjis_mblen(const unsigned char *s)
-{
-	int			len;
-
-	if (*s >= 0xa1 && *s <= 0xdf)
-		len = 1;				/* 1 byte kana? */
-	else if (IS_HIGHBIT_SET(*s))
-		len = 2;				/* kanji? */
-	else
-		len = 1;				/* should be ASCII */
-	return len;
-}
-
-static int
-pg_sjis_dsplen(const unsigned char *s)
-{
-	int			len;
-
-	if (*s >= 0xa1 && *s <= 0xdf)
-		len = 1;				/* 1 byte kana? */
-	else if (IS_HIGHBIT_SET(*s))
-		len = 2;				/* kanji? */
-	else
-		len = pg_ascii_dsplen(s);	/* should be ASCII */
-	return len;
-}
-
-/*
- * Big5
- */
-static int
-pg_big5_mblen(const unsigned char *s)
-{
-	int			len;
-
-	if (IS_HIGHBIT_SET(*s))
-		len = 2;				/* kanji? */
-	else
-		len = 1;				/* should be ASCII */
-	return len;
-}
-
-static int
-pg_big5_dsplen(const unsigned char *s)
-{
-	int			len;
-
-	if (IS_HIGHBIT_SET(*s))
-		len = 2;				/* kanji? */
-	else
-		len = pg_ascii_dsplen(s);	/* should be ASCII */
-	return len;
-}
-
-/*
- * GBK
- */
-static int
-pg_gbk_mblen(const unsigned char *s)
-{
-	int			len;
-
-	if (IS_HIGHBIT_SET(*s))
-		len = 2;				/* kanji? */
-	else
-		len = 1;				/* should be ASCII */
-	return len;
-}
-
-static int
-pg_gbk_dsplen(const unsigned char *s)
-{
-	int			len;
-
-	if (IS_HIGHBIT_SET(*s))
-		len = 2;				/* kanji? */
-	else
-		len = pg_ascii_dsplen(s);	/* should be ASCII */
-	return len;
-}
-
-/*
- * UHC
- */
-static int
-pg_uhc_mblen(const unsigned char *s)
-{
-	int			len;
-
-	if (IS_HIGHBIT_SET(*s))
-		len = 2;				/* 2byte? */
-	else
-		len = 1;				/* should be ASCII */
-	return len;
-}
-
-static int
-pg_uhc_dsplen(const unsigned char *s)
-{
-	int			len;
-
-	if (IS_HIGHBIT_SET(*s))
-		len = 2;				/* 2byte? */
-	else
-		len = pg_ascii_dsplen(s);	/* should be ASCII */
-	return len;
-}
-
-/*
- * GB18030
- *	Added by Bill Huang <bhuang@redhat.com>,<bill_huanghb@ybb.ne.jp>
- */
-
-/*
- * Unlike all other mblen() functions, this also looks at the second byte of
- * the input.  However, if you only pass the first byte of a multi-byte
- * string, and \0 as the second byte, this still works in a predictable way:
- * a 4-byte character will be reported as two 2-byte characters.  That's
- * enough for all current uses, as a client-only encoding.  It works that
- * way, because in any valid 4-byte GB18030-encoded character, the third and
- * fourth byte look like a 2-byte encoded character, when looked at
- * separately.
- */
-static int
-pg_gb18030_mblen(const unsigned char *s)
-{
-	int			len;
-
-	if (!IS_HIGHBIT_SET(*s))
-		len = 1;				/* ASCII */
-	else if (*(s + 1) >= 0x30 && *(s + 1) <= 0x39)
-		len = 4;
-	else
-		len = 2;
-	return len;
-}
-
-static int
-pg_gb18030_dsplen(const unsigned char *s)
-{
-	int			len;
-
-	if (IS_HIGHBIT_SET(*s))
-		len = 2;
-	else
-		len = pg_ascii_dsplen(s);	/* ASCII */
-	return len;
-}
-
-/*
- *-------------------------------------------------------------------
- * multibyte sequence validators
- *
- * The verifychar functions accept "s", a pointer to the first byte of a
- * string, and "len", the remaining length of the string.  If there is a
- * validly encoded character beginning at *s, return its length in bytes;
- * else return -1.
- *
- * The verifystr functions also accept "s", a pointer to a string and "len",
- * the length of the string.  They verify the whole string, and return the
- * number of input bytes (<= len) that are valid.  In other words, if the
- * whole string is valid, verifystr returns "len", otherwise it returns the
- * byte offset of the first invalid character.  The verifystr functions must
- * test for and reject zeroes in the input.
- *
- * The verifychar functions can assume that len > 0 and that *s != '\0', but
- * they must test for and reject zeroes in any additional bytes of a
- * multibyte character.  Note that this definition allows the function for a
- * single-byte encoding to be just "return 1".
- *-------------------------------------------------------------------
- */
-static int
-pg_ascii_verifychar(const unsigned char *s, int len)
-{
-	return 1;
-}
-
-static int
-pg_ascii_verifystr(const unsigned char *s, int len)
-{
-	const unsigned char *nullpos = memchr(s, 0, len);
-
-	if (nullpos == NULL)
-		return len;
-	else
-		return nullpos - s;
-}
-
-#define IS_EUC_RANGE_VALID(c)	((c) >= 0xa1 && (c) <= 0xfe)
-
-static int
-pg_eucjp_verifychar(const unsigned char *s, int len)
-{
-	int			l;
-	unsigned char c1,
-				c2;
-
-	c1 = *s++;
-
-	switch (c1)
-	{
-		case SS2:				/* JIS X 0201 */
-			l = 2;
-			if (l > len)
-				return -1;
-			c2 = *s++;
-			if (c2 < 0xa1 || c2 > 0xdf)
-				return -1;
-			break;
-
-		case SS3:				/* JIS X 0212 */
-			l = 3;
-			if (l > len)
-				return -1;
-			c2 = *s++;
-			if (!IS_EUC_RANGE_VALID(c2))
-				return -1;
-			c2 = *s++;
-			if (!IS_EUC_RANGE_VALID(c2))
-				return -1;
-			break;
-
-		default:
-			if (IS_HIGHBIT_SET(c1)) /* JIS X 0208? */
-			{
-				l = 2;
-				if (l > len)
-					return -1;
-				if (!IS_EUC_RANGE_VALID(c1))
-					return -1;
-				c2 = *s++;
-				if (!IS_EUC_RANGE_VALID(c2))
-					return -1;
-			}
-			else
-				/* must be ASCII */
-			{
-				l = 1;
-			}
-			break;
-	}
-
-	return l;
-}
-
-static int
-pg_eucjp_verifystr(const unsigned char *s, int len)
-{
-	const unsigned char *start = s;
-
-	while (len > 0)
-	{
-		int			l;
-
-		/* fast path for ASCII-subset characters */
-		if (!IS_HIGHBIT_SET(*s))
-		{
-			if (*s == '\0')
-				break;
-			l = 1;
-		}
-		else
-		{
-			l = pg_eucjp_verifychar(s, len);
-			if (l == -1)
-				break;
-		}
-		s += l;
-		len -= l;
-	}
-
-	return s - start;
-}
-
-static int
-pg_euckr_verifychar(const unsigned char *s, int len)
-{
-	int			l;
-	unsigned char c1,
-				c2;
-
-	c1 = *s++;
-
-	if (IS_HIGHBIT_SET(c1))
-	{
-		l = 2;
-		if (l > len)
-			return -1;
-		if (!IS_EUC_RANGE_VALID(c1))
-			return -1;
-		c2 = *s++;
-		if (!IS_EUC_RANGE_VALID(c2))
-			return -1;
-	}
-	else
-		/* must be ASCII */
-	{
-		l = 1;
-	}
-
-	return l;
-}
-
-static int
-pg_euckr_verifystr(const unsigned char *s, int len)
-{
-	const unsigned char *start = s;
-
-	while (len > 0)
-	{
-		int			l;
-
-		/* fast path for ASCII-subset characters */
-		if (!IS_HIGHBIT_SET(*s))
-		{
-			if (*s == '\0')
-				break;
-			l = 1;
-		}
-		else
-		{
-			l = pg_euckr_verifychar(s, len);
-			if (l == -1)
-				break;
-		}
-		s += l;
-		len -= l;
-	}
-
-	return s - start;
-}
-
-/* EUC-CN byte sequences are exactly same as EUC-KR */
-#define pg_euccn_verifychar	pg_euckr_verifychar
-#define pg_euccn_verifystr	pg_euckr_verifystr
-
-static int
-pg_euctw_verifychar(const unsigned char *s, int len)
-{
-	int			l;
-	unsigned char c1,
-				c2;
-
-	c1 = *s++;
-
-	switch (c1)
-	{
-		case SS2:				/* CNS 11643 Plane 1-7 */
-			l = 4;
-			if (l > len)
-				return -1;
-			c2 = *s++;
-			if (c2 < 0xa1 || c2 > 0xa7)
-				return -1;
-			c2 = *s++;
-			if (!IS_EUC_RANGE_VALID(c2))
-				return -1;
-			c2 = *s++;
-			if (!IS_EUC_RANGE_VALID(c2))
-				return -1;
-			break;
-
-		case SS3:				/* unused */
-			return -1;
-
-		default:
-			if (IS_HIGHBIT_SET(c1)) /* CNS 11643 Plane 1 */
-			{
-				l = 2;
-				if (l > len)
-					return -1;
-				/* no further range check on c1? */
-				c2 = *s++;
-				if (!IS_EUC_RANGE_VALID(c2))
-					return -1;
-			}
-			else
-				/* must be ASCII */
-			{
-				l = 1;
-			}
-			break;
-	}
-	return l;
-}
-
-static int
-pg_euctw_verifystr(const unsigned char *s, int len)
-{
-	const unsigned char *start = s;
-
-	while (len > 0)
-	{
-		int			l;
-
-		/* fast path for ASCII-subset characters */
-		if (!IS_HIGHBIT_SET(*s))
-		{
-			if (*s == '\0')
-				break;
-			l = 1;
-		}
-		else
-		{
-			l = pg_euctw_verifychar(s, len);
-			if (l == -1)
-				break;
-		}
-		s += l;
-		len -= l;
-	}
-
-	return s - start;
-}
-
-static int
-pg_johab_verifychar(const unsigned char *s, int len)
-{
-	int			l,
-				mbl;
-	unsigned char c;
-
-	l = mbl = pg_johab_mblen(s);
-
-	if (len < l)
-		return -1;
-
-	if (!IS_HIGHBIT_SET(*s))
-		return mbl;
-
-	while (--l > 0)
-	{
-		c = *++s;
-		if (!IS_EUC_RANGE_VALID(c))
-			return -1;
-	}
-	return mbl;
-}
-
-static int
-pg_johab_verifystr(const unsigned char *s, int len)
-{
-	const unsigned char *start = s;
-
-	while (len > 0)
-	{
-		int			l;
-
-		/* fast path for ASCII-subset characters */
-		if (!IS_HIGHBIT_SET(*s))
-		{
-			if (*s == '\0')
-				break;
-			l = 1;
-		}
-		else
-		{
-			l = pg_johab_verifychar(s, len);
-			if (l == -1)
-				break;
-		}
-		s += l;
-		len -= l;
-	}
-
-	return s - start;
-}
-
-static int
-pg_mule_verifychar(const unsigned char *s, int len)
-{
-	int			l,
-				mbl;
-	unsigned char c;
-
-	l = mbl = pg_mule_mblen(s);
-
-	if (len < l)
-		return -1;
-
-	while (--l > 0)
-	{
-		c = *++s;
-		if (!IS_HIGHBIT_SET(c))
-			return -1;
-	}
-	return mbl;
-}
-
-static int
-pg_mule_verifystr(const unsigned char *s, int len)
-{
-	const unsigned char *start = s;
-
-	while (len > 0)
-	{
-		int			l;
-
-		/* fast path for ASCII-subset characters */
-		if (!IS_HIGHBIT_SET(*s))
-		{
-			if (*s == '\0')
-				break;
-			l = 1;
-		}
-		else
-		{
-			l = pg_mule_verifychar(s, len);
-			if (l == -1)
-				break;
-		}
-		s += l;
-		len -= l;
-	}
-
-	return s - start;
-}
-
-static int
-pg_latin1_verifychar(const unsigned char *s, int len)
-{
-	return 1;
-}
-
-static int
-pg_latin1_verifystr(const unsigned char *s, int len)
-{
-	const unsigned char *nullpos = memchr(s, 0, len);
-
-	if (nullpos == NULL)
-		return len;
-	else
-		return nullpos - s;
-}
-
-static int
-pg_sjis_verifychar(const unsigned char *s, int len)
-{
-	int			l,
-				mbl;
-	unsigned char c1,
-				c2;
-
-	l = mbl = pg_sjis_mblen(s);
-
-	if (len < l)
-		return -1;
-
-	if (l == 1)					/* pg_sjis_mblen already verified it */
-		return mbl;
-
-	c1 = *s++;
-	c2 = *s;
-	if (!ISSJISHEAD(c1) || !ISSJISTAIL(c2))
-		return -1;
-	return mbl;
-}
-
-static int
-pg_sjis_verifystr(const unsigned char *s, int len)
-{
-	const unsigned char *start = s;
-
-	while (len > 0)
-	{
-		int			l;
-
-		/* fast path for ASCII-subset characters */
-		if (!IS_HIGHBIT_SET(*s))
-		{
-			if (*s == '\0')
-				break;
-			l = 1;
-		}
-		else
-		{
-			l = pg_sjis_verifychar(s, len);
-			if (l == -1)
-				break;
-		}
-		s += l;
-		len -= l;
-	}
-
-	return s - start;
-}
-
-static int
-pg_big5_verifychar(const unsigned char *s, int len)
-{
-	int			l,
-				mbl;
-
-	l = mbl = pg_big5_mblen(s);
-
-	if (len < l)
-		return -1;
-
-	while (--l > 0)
-	{
-		if (*++s == '\0')
-			return -1;
-	}
-
-	return mbl;
-}
-
-static int
-pg_big5_verifystr(const unsigned char *s, int len)
-{
-	const unsigned char *start = s;
-
-	while (len > 0)
-	{
-		int			l;
-
-		/* fast path for ASCII-subset characters */
-		if (!IS_HIGHBIT_SET(*s))
-		{
-			if (*s == '\0')
-				break;
-			l = 1;
-		}
-		else
-		{
-			l = pg_big5_verifychar(s, len);
-			if (l == -1)
-				break;
-		}
-		s += l;
-		len -= l;
-	}
-
-	return s - start;
-}
-
-static int
-pg_gbk_verifychar(const unsigned char *s, int len)
-{
-	int			l,
-				mbl;
-
-	l = mbl = pg_gbk_mblen(s);
-
-	if (len < l)
-		return -1;
-
-	while (--l > 0)
-	{
-		if (*++s == '\0')
-			return -1;
-	}
-
-	return mbl;
-}
-
-static int
-pg_gbk_verifystr(const unsigned char *s, int len)
-{
-	const unsigned char *start = s;
-
-	while (len > 0)
-	{
-		int			l;
-
-		/* fast path for ASCII-subset characters */
-		if (!IS_HIGHBIT_SET(*s))
-		{
-			if (*s == '\0')
-				break;
-			l = 1;
-		}
-		else
-		{
-			l = pg_gbk_verifychar(s, len);
-			if (l == -1)
-				break;
-		}
-		s += l;
-		len -= l;
-	}
-
-	return s - start;
-}
-
-static int
-pg_uhc_verifychar(const unsigned char *s, int len)
-{
-	int			l,
-				mbl;
-
-	l = mbl = pg_uhc_mblen(s);
-
-	if (len < l)
-		return -1;
-
-	while (--l > 0)
-	{
-		if (*++s == '\0')
-			return -1;
-	}
-
-	return mbl;
-}
-
-static int
-pg_uhc_verifystr(const unsigned char *s, int len)
-{
-	const unsigned char *start = s;
-
-	while (len > 0)
-	{
-		int			l;
-
-		/* fast path for ASCII-subset characters */
-		if (!IS_HIGHBIT_SET(*s))
-		{
-			if (*s == '\0')
-				break;
-			l = 1;
-		}
-		else
-		{
-			l = pg_uhc_verifychar(s, len);
-			if (l == -1)
-				break;
-		}
-		s += l;
-		len -= l;
-	}
-
-	return s - start;
-}
-
-static int
-pg_gb18030_verifychar(const unsigned char *s, int len)
-{
-	int			l;
-
-	if (!IS_HIGHBIT_SET(*s))
-		l = 1;					/* ASCII */
-	else if (len >= 4 && *(s + 1) >= 0x30 && *(s + 1) <= 0x39)
-	{
-		/* Should be 4-byte, validate remaining bytes */
-		if (*s >= 0x81 && *s <= 0xfe &&
-			*(s + 2) >= 0x81 && *(s + 2) <= 0xfe &&
-			*(s + 3) >= 0x30 && *(s + 3) <= 0x39)
-			l = 4;
-		else
-			l = -1;
-	}
-	else if (len >= 2 && *s >= 0x81 && *s <= 0xfe)
-	{
-		/* Should be 2-byte, validate */
-		if ((*(s + 1) >= 0x40 && *(s + 1) <= 0x7e) ||
-			(*(s + 1) >= 0x80 && *(s + 1) <= 0xfe))
-			l = 2;
-		else
-			l = -1;
-	}
-	else
-		l = -1;
-	return l;
-}
-
-static int
-pg_gb18030_verifystr(const unsigned char *s, int len)
-{
-	const unsigned char *start = s;
-
-	while (len > 0)
-	{
-		int			l;
-
-		/* fast path for ASCII-subset characters */
-		if (!IS_HIGHBIT_SET(*s))
-		{
-			if (*s == '\0')
-				break;
-			l = 1;
-		}
-		else
-		{
-			l = pg_gb18030_verifychar(s, len);
-			if (l == -1)
-				break;
-		}
-		s += l;
-		len -= l;
-	}
-
-	return s - start;
-}
-
-static int
-pg_utf8_verifychar(const unsigned char *s, int len)
-{
-	int			l;
-
-	if ((*s & 0x80) == 0)
-	{
-		if (*s == '\0')
-			return -1;
-		return 1;
-	}
-	else if ((*s & 0xe0) == 0xc0)
-		l = 2;
-	else if ((*s & 0xf0) == 0xe0)
-		l = 3;
-	else if ((*s & 0xf8) == 0xf0)
-		l = 4;
-	else
-		l = 1;
-
-	if (l > len)
-		return -1;
-
-	if (!pg_utf8_islegal(s, l))
-		return -1;
-
-	return l;
-}
-
-/*
- * The fast path of the UTF-8 verifier uses a deterministic finite automaton
- * (DFA) for multibyte characters. In a traditional table-driven DFA, the
- * input byte and current state are used to compute an index into an array of
- * state transitions. Since the address of the next transition is dependent
- * on this computation, there is latency in executing the load instruction,
- * and the CPU is not kept busy.
- *
- * Instead, we use a "shift-based" DFA as described by Per Vognsen:
- *
- * https://gist.github.com/pervognsen/218ea17743e1442e59bb60d29b1aa725
- *
- * In a shift-based DFA, the input byte is an index into array of integers
- * whose bit pattern encodes the state transitions. To compute the next
- * state, we simply right-shift the integer by the current state and apply a
- * mask. In this scheme, the address of the transition only depends on the
- * input byte, so there is better pipelining.
- *
- * The naming convention for states and transitions was adopted from a UTF-8
- * to UTF-16/32 transcoder, whose table is reproduced below:
- *
- * https://github.com/BobSteagall/utf_utils/blob/6b7a465265de2f5fa6133d653df0c9bdd73bbcf8/src/utf_utils.cpp
- *
- * ILL  ASC  CR1  CR2  CR3  L2A  L3A  L3B  L3C  L4A  L4B  L4C CLASS / STATE
- * ==========================================================================
- * err, END, err, err, err, CS1, P3A, CS2, P3B, P4A, CS3, P4B,      | BGN/END
- * err, err, err, err, err, err, err, err, err, err, err, err,      | ERR
- *                                                                  |
- * err, err, END, END, END, err, err, err, err, err, err, err,      | CS1
- * err, err, CS1, CS1, CS1, err, err, err, err, err, err, err,      | CS2
- * err, err, CS2, CS2, CS2, err, err, err, err, err, err, err,      | CS3
- *                                                                  |
- * err, err, err, err, CS1, err, err, err, err, err, err, err,      | P3A
- * err, err, CS1, CS1, err, err, err, err, err, err, err, err,      | P3B
- *                                                                  |
- * err, err, err, CS2, CS2, err, err, err, err, err, err, err,      | P4A
- * err, err, CS2, err, err, err, err, err, err, err, err, err,      | P4B
- *
- * In the most straightforward implementation, a shift-based DFA for UTF-8
- * requires 64-bit integers to encode the transitions, but with an SMT solver
- * it's possible to find state numbers such that the transitions fit within
- * 32-bit integers, as Dougall Johnson demonstrated:
- *
- * https://gist.github.com/dougallj/166e326de6ad4cf2c94be97a204c025f
- *
- * This packed representation is the reason for the seemingly odd choice of
- * state values below.
- */
-
-/* Error */
-#define	ERR  0
-/* Begin */
-#define	BGN 11
-/* Continuation states, expect 1/2/3 continuation bytes */
-#define	CS1 16
-#define	CS2  1
-#define	CS3  5
-/* Partial states, where the first continuation byte has a restricted range */
-#define	P3A  6					/* Lead was E0, check for 3-byte overlong */
-#define	P3B 20					/* Lead was ED, check for surrogate */
-#define	P4A 25					/* Lead was F0, check for 4-byte overlong */
-#define	P4B 30					/* Lead was F4, check for too-large */
-/* Begin and End are the same state */
-#define	END BGN
-
-/* the encoded state transitions for the lookup table */
-
-/* ASCII */
-#define ASC (END << BGN)
-/* 2-byte lead */
-#define L2A (CS1 << BGN)
-/* 3-byte lead */
-#define L3A (P3A << BGN)
-#define L3B (CS2 << BGN)
-#define L3C (P3B << BGN)
-/* 4-byte lead */
-#define L4A (P4A << BGN)
-#define L4B (CS3 << BGN)
-#define L4C (P4B << BGN)
-/* continuation byte */
-#define CR1 (END << CS1) | (CS1 << CS2) | (CS2 << CS3) | (CS1 << P3B) | (CS2 << P4B)
-#define CR2 (END << CS1) | (CS1 << CS2) | (CS2 << CS3) | (CS1 << P3B) | (CS2 << P4A)
-#define CR3 (END << CS1) | (CS1 << CS2) | (CS2 << CS3) | (CS1 << P3A) | (CS2 << P4A)
-/* invalid byte */
-#define ILL ERR
-
-static const uint32 Utf8Transition[256] =
-{
-	/* ASCII */
-
-	ILL, ASC, ASC, ASC, ASC, ASC, ASC, ASC,
-	ASC, ASC, ASC, ASC, ASC, ASC, ASC, ASC,
-	ASC, ASC, ASC, ASC, ASC, ASC, ASC, ASC,
-	ASC, ASC, ASC, ASC, ASC, ASC, ASC, ASC,
-
-	ASC, ASC, ASC, ASC, ASC, ASC, ASC, ASC,
-	ASC, ASC, ASC, ASC, ASC, ASC, ASC, ASC,
-	ASC, ASC, ASC, ASC, ASC, ASC, ASC, ASC,
-	ASC, ASC, ASC, ASC, ASC, ASC, ASC, ASC,
-
-	ASC, ASC, ASC, ASC, ASC, ASC, ASC, ASC,
-	ASC, ASC, ASC, ASC, ASC, ASC, ASC, ASC,
-	ASC, ASC, ASC, ASC, ASC, ASC, ASC, ASC,
-	ASC, ASC, ASC, ASC, ASC, ASC, ASC, ASC,
-
-	ASC, ASC, ASC, ASC, ASC, ASC, ASC, ASC,
-	ASC, ASC, ASC, ASC, ASC, ASC, ASC, ASC,
-	ASC, ASC, ASC, ASC, ASC, ASC, ASC, ASC,
-	ASC, ASC, ASC, ASC, ASC, ASC, ASC, ASC,
-
-	/* continuation bytes */
-
-	/* 80..8F */
-	CR1, CR1, CR1, CR1, CR1, CR1, CR1, CR1,
-	CR1, CR1, CR1, CR1, CR1, CR1, CR1, CR1,
-
-	/* 90..9F */
-	CR2, CR2, CR2, CR2, CR2, CR2, CR2, CR2,
-	CR2, CR2, CR2, CR2, CR2, CR2, CR2, CR2,
-
-	/* A0..BF */
-	CR3, CR3, CR3, CR3, CR3, CR3, CR3, CR3,
-	CR3, CR3, CR3, CR3, CR3, CR3, CR3, CR3,
-	CR3, CR3, CR3, CR3, CR3, CR3, CR3, CR3,
-	CR3, CR3, CR3, CR3, CR3, CR3, CR3, CR3,
-
-	/* leading bytes */
-
-	/* C0..DF */
-	ILL, ILL, L2A, L2A, L2A, L2A, L2A, L2A,
-	L2A, L2A, L2A, L2A, L2A, L2A, L2A, L2A,
-	L2A, L2A, L2A, L2A, L2A, L2A, L2A, L2A,
-	L2A, L2A, L2A, L2A, L2A, L2A, L2A, L2A,
-
-	/* E0..EF */
-	L3A, L3B, L3B, L3B, L3B, L3B, L3B, L3B,
-	L3B, L3B, L3B, L3B, L3B, L3C, L3B, L3B,
-
-	/* F0..FF */
-	L4A, L4B, L4B, L4B, L4C, ILL, ILL, ILL,
-	ILL, ILL, ILL, ILL, ILL, ILL, ILL, ILL
-};
-
-static void
-utf8_advance(const unsigned char *s, uint32 *state, int len)
-{
-	/* Note: We deliberately don't check the state's value here. */
-	while (len > 0)
-	{
-		/*
-		 * It's important that the mask value is 31: In most instruction sets,
-		 * a shift by a 32-bit operand is understood to be a shift by its mod
-		 * 32, so the compiler should elide the mask operation.
-		 */
-		*state = Utf8Transition[*s++] >> (*state & 31);
-		len--;
-	}
-
-	*state &= 31;
-}
-
-static int
-pg_utf8_verifystr(const unsigned char *s, int len)
-{
-	const unsigned char *start = s;
-	const int	orig_len = len;
-	uint32		state = BGN;
-
-/*
- * With a stride of two vector widths, gcc will unroll the loop. Even if
- * the compiler can unroll a longer loop, it's not worth it because we
- * must fall back to the byte-wise algorithm if we find any non-ASCII.
- */
-#define STRIDE_LENGTH (2 * sizeof(Vector8))
-
-	if (len >= STRIDE_LENGTH)
-	{
-		while (len >= STRIDE_LENGTH)
-		{
-			/*
-			 * If the chunk is all ASCII, we can skip the full UTF-8 check,
-			 * but we must first check for a non-END state, which means the
-			 * previous chunk ended in the middle of a multibyte sequence.
-			 */
-			if (state != END || !is_valid_ascii(s, STRIDE_LENGTH))
-				utf8_advance(s, &state, STRIDE_LENGTH);
-
-			s += STRIDE_LENGTH;
-			len -= STRIDE_LENGTH;
-		}
-
-		/* The error state persists, so we only need to check for it here. */
-		if (state == ERR)
-		{
-			/*
-			 * Start over from the beginning with the slow path so we can
-			 * count the valid bytes.
-			 */
-			len = orig_len;
-			s = start;
-		}
-		else if (state != END)
-		{
-			/*
-			 * The fast path exited in the middle of a multibyte sequence.
-			 * Walk backwards to find the leading byte so that the slow path
-			 * can resume checking from there. We must always backtrack at
-			 * least one byte, since the current byte could be e.g. an ASCII
-			 * byte after a 2-byte lead, which is invalid.
-			 */
-			do
-			{
-				Assert(s > start);
-				s--;
-				len++;
-				Assert(IS_HIGHBIT_SET(*s));
-			} while (pg_utf_mblen(s) <= 1);
-		}
-	}
-
-	/* check remaining bytes */
-	while (len > 0)
-	{
-		int			l;
-
-		/* fast path for ASCII-subset characters */
-		if (!IS_HIGHBIT_SET(*s))
-		{
-			if (*s == '\0')
-				break;
-			l = 1;
-		}
-		else
-		{
-			l = pg_utf8_verifychar(s, len);
-			if (l == -1)
-				break;
-		}
-		s += l;
-		len -= l;
-	}
-
-	return s - start;
-}
-
-/*
- * Check for validity of a single UTF-8 encoded character
- *
- * This directly implements the rules in RFC3629.  The bizarre-looking
- * restrictions on the second byte are meant to ensure that there isn't
- * more than one encoding of a given Unicode character point; that is,
- * you may not use a longer-than-necessary byte sequence with high order
- * zero bits to represent a character that would fit in fewer bytes.
- * To do otherwise is to create security hazards (eg, create an apparent
- * non-ASCII character that decodes to plain ASCII).
- *
- * length is assumed to have been obtained by pg_utf_mblen(), and the
- * caller must have checked that that many bytes are present in the buffer.
- */
-bool
-pg_utf8_islegal(const unsigned char *source, int length)
-{
-	unsigned char a;
-
-	switch (length)
-	{
-		default:
-			/* reject lengths 5 and 6 for now */
-			return false;
-		case 4:
-			a = source[3];
-			if (a < 0x80 || a > 0xBF)
-				return false;
-			/* FALL THRU */
-		case 3:
-			a = source[2];
-			if (a < 0x80 || a > 0xBF)
-				return false;
-			/* FALL THRU */
-		case 2:
-			a = source[1];
-			switch (*source)
-			{
-				case 0xE0:
-					if (a < 0xA0 || a > 0xBF)
-						return false;
-					break;
-				case 0xED:
-					if (a < 0x80 || a > 0x9F)
-						return false;
-					break;
-				case 0xF0:
-					if (a < 0x90 || a > 0xBF)
-						return false;
-					break;
-				case 0xF4:
-					if (a < 0x80 || a > 0x8F)
-						return false;
-					break;
-				default:
-					if (a < 0x80 || a > 0xBF)
-						return false;
-					break;
-			}
-			/* FALL THRU */
-		case 1:
-			a = *source;
-			if (a >= 0x80 && a < 0xC2)
-				return false;
-			if (a > 0xF4)
-				return false;
-			break;
-	}
-	return true;
-}
-
-
-/*
- *-------------------------------------------------------------------
- * encoding info table
- * XXX must be sorted by the same order as enum pg_enc (in mb/pg_wchar.h)
- *-------------------------------------------------------------------
- */
-const pg_wchar_tbl pg_wchar_table[] = {
-	{pg_ascii2wchar_with_len, pg_wchar2single_with_len, pg_ascii_mblen, pg_ascii_dsplen, pg_ascii_verifychar, pg_ascii_verifystr, 1},	/* PG_SQL_ASCII */
-	{pg_eucjp2wchar_with_len, pg_wchar2euc_with_len, pg_eucjp_mblen, pg_eucjp_dsplen, pg_eucjp_verifychar, pg_eucjp_verifystr, 3},	/* PG_EUC_JP */
-	{pg_euccn2wchar_with_len, pg_wchar2euc_with_len, pg_euccn_mblen, pg_euccn_dsplen, pg_euccn_verifychar, pg_euccn_verifystr, 2},	/* PG_EUC_CN */
-	{pg_euckr2wchar_with_len, pg_wchar2euc_with_len, pg_euckr_mblen, pg_euckr_dsplen, pg_euckr_verifychar, pg_euckr_verifystr, 3},	/* PG_EUC_KR */
-	{pg_euctw2wchar_with_len, pg_wchar2euc_with_len, pg_euctw_mblen, pg_euctw_dsplen, pg_euctw_verifychar, pg_euctw_verifystr, 4},	/* PG_EUC_TW */
-	{pg_eucjp2wchar_with_len, pg_wchar2euc_with_len, pg_eucjp_mblen, pg_eucjp_dsplen, pg_eucjp_verifychar, pg_eucjp_verifystr, 3},	/* PG_EUC_JIS_2004 */
-	{pg_utf2wchar_with_len, pg_wchar2utf_with_len, pg_utf_mblen, pg_utf_dsplen, pg_utf8_verifychar, pg_utf8_verifystr, 4},	/* PG_UTF8 */
-	{pg_mule2wchar_with_len, pg_wchar2mule_with_len, pg_mule_mblen, pg_mule_dsplen, pg_mule_verifychar, pg_mule_verifystr, 4},	/* PG_MULE_INTERNAL */
-	{pg_latin12wchar_with_len, pg_wchar2single_with_len, pg_latin1_mblen, pg_latin1_dsplen, pg_latin1_verifychar, pg_latin1_verifystr, 1},	/* PG_LATIN1 */
-	{pg_latin12wchar_with_len, pg_wchar2single_with_len, pg_latin1_mblen, pg_latin1_dsplen, pg_latin1_verifychar, pg_latin1_verifystr, 1},	/* PG_LATIN2 */
-	{pg_latin12wchar_with_len, pg_wchar2single_with_len, pg_latin1_mblen, pg_latin1_dsplen, pg_latin1_verifychar, pg_latin1_verifystr, 1},	/* PG_LATIN3 */
-	{pg_latin12wchar_with_len, pg_wchar2single_with_len, pg_latin1_mblen, pg_latin1_dsplen, pg_latin1_verifychar, pg_latin1_verifystr, 1},	/* PG_LATIN4 */
-	{pg_latin12wchar_with_len, pg_wchar2single_with_len, pg_latin1_mblen, pg_latin1_dsplen, pg_latin1_verifychar, pg_latin1_verifystr, 1},	/* PG_LATIN5 */
-	{pg_latin12wchar_with_len, pg_wchar2single_with_len, pg_latin1_mblen, pg_latin1_dsplen, pg_latin1_verifychar, pg_latin1_verifystr, 1},	/* PG_LATIN6 */
-	{pg_latin12wchar_with_len, pg_wchar2single_with_len, pg_latin1_mblen, pg_latin1_dsplen, pg_latin1_verifychar, pg_latin1_verifystr, 1},	/* PG_LATIN7 */
-	{pg_latin12wchar_with_len, pg_wchar2single_with_len, pg_latin1_mblen, pg_latin1_dsplen, pg_latin1_verifychar, pg_latin1_verifystr, 1},	/* PG_LATIN8 */
-	{pg_latin12wchar_with_len, pg_wchar2single_with_len, pg_latin1_mblen, pg_latin1_dsplen, pg_latin1_verifychar, pg_latin1_verifystr, 1},	/* PG_LATIN9 */
-	{pg_latin12wchar_with_len, pg_wchar2single_with_len, pg_latin1_mblen, pg_latin1_dsplen, pg_latin1_verifychar, pg_latin1_verifystr, 1},	/* PG_LATIN10 */
-	{pg_latin12wchar_with_len, pg_wchar2single_with_len, pg_latin1_mblen, pg_latin1_dsplen, pg_latin1_verifychar, pg_latin1_verifystr, 1},	/* PG_WIN1256 */
-	{pg_latin12wchar_with_len, pg_wchar2single_with_len, pg_latin1_mblen, pg_latin1_dsplen, pg_latin1_verifychar, pg_latin1_verifystr, 1},	/* PG_WIN1258 */
-	{pg_latin12wchar_with_len, pg_wchar2single_with_len, pg_latin1_mblen, pg_latin1_dsplen, pg_latin1_verifychar, pg_latin1_verifystr, 1},	/* PG_WIN866 */
-	{pg_latin12wchar_with_len, pg_wchar2single_with_len, pg_latin1_mblen, pg_latin1_dsplen, pg_latin1_verifychar, pg_latin1_verifystr, 1},	/* PG_WIN874 */
-	{pg_latin12wchar_with_len, pg_wchar2single_with_len, pg_latin1_mblen, pg_latin1_dsplen, pg_latin1_verifychar, pg_latin1_verifystr, 1},	/* PG_KOI8R */
-	{pg_latin12wchar_with_len, pg_wchar2single_with_len, pg_latin1_mblen, pg_latin1_dsplen, pg_latin1_verifychar, pg_latin1_verifystr, 1},	/* PG_WIN1251 */
-	{pg_latin12wchar_with_len, pg_wchar2single_with_len, pg_latin1_mblen, pg_latin1_dsplen, pg_latin1_verifychar, pg_latin1_verifystr, 1},	/* PG_WIN1252 */
-	{pg_latin12wchar_with_len, pg_wchar2single_with_len, pg_latin1_mblen, pg_latin1_dsplen, pg_latin1_verifychar, pg_latin1_verifystr, 1},	/* ISO-8859-5 */
-	{pg_latin12wchar_with_len, pg_wchar2single_with_len, pg_latin1_mblen, pg_latin1_dsplen, pg_latin1_verifychar, pg_latin1_verifystr, 1},	/* ISO-8859-6 */
-	{pg_latin12wchar_with_len, pg_wchar2single_with_len, pg_latin1_mblen, pg_latin1_dsplen, pg_latin1_verifychar, pg_latin1_verifystr, 1},	/* ISO-8859-7 */
-	{pg_latin12wchar_with_len, pg_wchar2single_with_len, pg_latin1_mblen, pg_latin1_dsplen, pg_latin1_verifychar, pg_latin1_verifystr, 1},	/* ISO-8859-8 */
-	{pg_latin12wchar_with_len, pg_wchar2single_with_len, pg_latin1_mblen, pg_latin1_dsplen, pg_latin1_verifychar, pg_latin1_verifystr, 1},	/* PG_WIN1250 */
-	{pg_latin12wchar_with_len, pg_wchar2single_with_len, pg_latin1_mblen, pg_latin1_dsplen, pg_latin1_verifychar, pg_latin1_verifystr, 1},	/* PG_WIN1253 */
-	{pg_latin12wchar_with_len, pg_wchar2single_with_len, pg_latin1_mblen, pg_latin1_dsplen, pg_latin1_verifychar, pg_latin1_verifystr, 1},	/* PG_WIN1254 */
-	{pg_latin12wchar_with_len, pg_wchar2single_with_len, pg_latin1_mblen, pg_latin1_dsplen, pg_latin1_verifychar, pg_latin1_verifystr, 1},	/* PG_WIN1255 */
-	{pg_latin12wchar_with_len, pg_wchar2single_with_len, pg_latin1_mblen, pg_latin1_dsplen, pg_latin1_verifychar, pg_latin1_verifystr, 1},	/* PG_WIN1257 */
-	{pg_latin12wchar_with_len, pg_wchar2single_with_len, pg_latin1_mblen, pg_latin1_dsplen, pg_latin1_verifychar, pg_latin1_verifystr, 1},	/* PG_KOI8U */
-	{0, 0, pg_sjis_mblen, pg_sjis_dsplen, pg_sjis_verifychar, pg_sjis_verifystr, 2},	/* PG_SJIS */
-	{0, 0, pg_big5_mblen, pg_big5_dsplen, pg_big5_verifychar, pg_big5_verifystr, 2},	/* PG_BIG5 */
-	{0, 0, pg_gbk_mblen, pg_gbk_dsplen, pg_gbk_verifychar, pg_gbk_verifystr, 2},	/* PG_GBK */
-	{0, 0, pg_uhc_mblen, pg_uhc_dsplen, pg_uhc_verifychar, pg_uhc_verifystr, 2},	/* PG_UHC */
-	{0, 0, pg_gb18030_mblen, pg_gb18030_dsplen, pg_gb18030_verifychar, pg_gb18030_verifystr, 4},	/* PG_GB18030 */
-	{0, 0, pg_johab_mblen, pg_johab_dsplen, pg_johab_verifychar, pg_johab_verifystr, 3},	/* PG_JOHAB */
-	{0, 0, pg_sjis_mblen, pg_sjis_dsplen, pg_sjis_verifychar, pg_sjis_verifystr, 2} /* PG_SHIFT_JIS_2004 */
-};
-
-/*
- * Returns the byte length of a multibyte character.
- *
- * Caution: when dealing with text that is not certainly valid in the
- * specified encoding, the result may exceed the actual remaining
- * string length.  Callers that are not prepared to deal with that
- * should use pg_encoding_mblen_bounded() instead.
- */
-int
-pg_encoding_mblen(int encoding, const char *mbstr)
-{
-	return (PG_VALID_ENCODING(encoding) ?
-			pg_wchar_table[encoding].mblen((const unsigned char *) mbstr) :
-			pg_wchar_table[PG_SQL_ASCII].mblen((const unsigned char *) mbstr));
-}
-
-/*
- * Returns the byte length of a multibyte character; but not more than
- * the distance to end of string.
- */
-int
-pg_encoding_mblen_bounded(int encoding, const char *mbstr)
-{
-	return strnlen(mbstr, pg_encoding_mblen(encoding, mbstr));
-}
-
-/*
- * Returns the display length of a multibyte character.
- */
-int
-pg_encoding_dsplen(int encoding, const char *mbstr)
-{
-	return (PG_VALID_ENCODING(encoding) ?
-			pg_wchar_table[encoding].dsplen((const unsigned char *) mbstr) :
-			pg_wchar_table[PG_SQL_ASCII].dsplen((const unsigned char *) mbstr));
-}
-
-/*
- * Verify the first multibyte character of the given string.
- * Return its byte length if good, -1 if bad.  (See comments above for
- * full details of the mbverifychar API.)
- */
-int
-pg_encoding_verifymbchar(int encoding, const char *mbstr, int len)
-{
-	return (PG_VALID_ENCODING(encoding) ?
-			pg_wchar_table[encoding].mbverifychar((const unsigned char *) mbstr, len) :
-			pg_wchar_table[PG_SQL_ASCII].mbverifychar((const unsigned char *) mbstr, len));
-}
-
-/*
- * Verify that a string is valid for the given encoding.
- * Returns the number of input bytes (<= len) that form a valid string.
- * (See comments above for full details of the mbverifystr API.)
- */
-int
-pg_encoding_verifymbstr(int encoding, const char *mbstr, int len)
-{
-	return (PG_VALID_ENCODING(encoding) ?
-			pg_wchar_table[encoding].mbverifystr((const unsigned char *) mbstr, len) :
-			pg_wchar_table[PG_SQL_ASCII].mbverifystr((const unsigned char *) mbstr, len));
-}
-
-/*
- * fetch maximum length of a given encoding
- */
-int
-pg_encoding_max_length(int encoding)
-{
-	Assert(PG_VALID_ENCODING(encoding));
-
-	return pg_wchar_table[encoding].maxmblen;
-}
diff --git a/contrib/libs/libpq/src/include/access/rmgr.h b/contrib/libs/libpq/src/include/access/rmgr.h
deleted file mode 100644
index 3b6a497e1b..0000000000
--- a/contrib/libs/libpq/src/include/access/rmgr.h
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * rmgr.h
- *
- * Resource managers definition
- *
- * src/include/access/rmgr.h
- */
-#ifndef RMGR_H
-#define RMGR_H
-
-typedef uint8 RmgrId;
-
-/*
- * Built-in resource managers
- *
- * The actual numerical values for each rmgr ID are defined by the order
- * of entries in rmgrlist.h.
- *
- * Note: RM_MAX_ID must fit in RmgrId; widening that type will affect the XLOG
- * file format.
- */
-#define PG_RMGR(symname,name,redo,desc,identify,startup,cleanup,mask,decode) \
-	symname,
-
-typedef enum RmgrIds
-{
-#include "access/rmgrlist.h"
-	RM_NEXT_ID
-}			RmgrIds;
-
-#undef PG_RMGR
-
-#define RM_MAX_ID			UINT8_MAX
-#define RM_MAX_BUILTIN_ID	(RM_NEXT_ID - 1)
-#define RM_MIN_CUSTOM_ID	128
-#define RM_MAX_CUSTOM_ID	UINT8_MAX
-#define RM_N_IDS			(UINT8_MAX + 1)
-#define RM_N_BUILTIN_IDS	(RM_MAX_BUILTIN_ID + 1)
-#define RM_N_CUSTOM_IDS		(RM_MAX_CUSTOM_ID - RM_MIN_CUSTOM_ID + 1)
-
-static inline bool
-RmgrIdIsBuiltin(int rmid)
-{
-	return rmid <= RM_MAX_BUILTIN_ID;
-}
-
-static inline bool
-RmgrIdIsCustom(int rmid)
-{
-	return rmid >= RM_MIN_CUSTOM_ID && rmid <= RM_MAX_CUSTOM_ID;
-}
-
-#define RmgrIdIsValid(rmid) (RmgrIdIsBuiltin((rmid)) || RmgrIdIsCustom((rmid)))
-
-/*
- * RmgrId to use for extensions that require an RmgrId, but are still in
- * development and have not reserved their own unique RmgrId yet. See:
- * https://wiki.postgresql.org/wiki/CustomWALResourceManagers
- */
-#define RM_EXPERIMENTAL_ID		128
-
-#endif							/* RMGR_H */
diff --git a/contrib/libs/libpq/src/include/access/rmgrlist.h b/contrib/libs/libpq/src/include/access/rmgrlist.h
deleted file mode 100644
index 463bcb67c5..0000000000
--- a/contrib/libs/libpq/src/include/access/rmgrlist.h
+++ /dev/null
@@ -1,49 +0,0 @@
-/*---------------------------------------------------------------------------
- * rmgrlist.h
- *
- * The resource manager list is kept in its own source file for possible
- * use by automatic tools.  The exact representation of a rmgr is determined
- * by the PG_RMGR macro, which is not defined in this file; it can be
- * defined by the caller for special purposes.
- *
- * Portions Copyright (c) 1996-2023, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- * src/include/access/rmgrlist.h
- *---------------------------------------------------------------------------
- */
-
-/* there is deliberately not an #ifndef RMGRLIST_H here */
-
-/*
- * List of resource manager entries.  Note that order of entries defines the
- * numerical values of each rmgr's ID, which is stored in WAL records.  New
- * entries should be added at the end, to avoid changing IDs of existing
- * entries.
- *
- * Changes to this list possibly need an XLOG_PAGE_MAGIC bump.
- */
-
-/* symbol name, textual name, redo, desc, identify, startup, cleanup, mask, decode */
-PG_RMGR(RM_XLOG_ID, "XLOG", xlog_redo, xlog_desc, xlog_identify, NULL, NULL, NULL, xlog_decode)
-PG_RMGR(RM_XACT_ID, "Transaction", xact_redo, xact_desc, xact_identify, NULL, NULL, NULL, xact_decode)
-PG_RMGR(RM_SMGR_ID, "Storage", smgr_redo, smgr_desc, smgr_identify, NULL, NULL, NULL, NULL)
-PG_RMGR(RM_CLOG_ID, "CLOG", clog_redo, clog_desc, clog_identify, NULL, NULL, NULL, NULL)
-PG_RMGR(RM_DBASE_ID, "Database", dbase_redo, dbase_desc, dbase_identify, NULL, NULL, NULL, NULL)
-PG_RMGR(RM_TBLSPC_ID, "Tablespace", tblspc_redo, tblspc_desc, tblspc_identify, NULL, NULL, NULL, NULL)
-PG_RMGR(RM_MULTIXACT_ID, "MultiXact", multixact_redo, multixact_desc, multixact_identify, NULL, NULL, NULL, NULL)
-PG_RMGR(RM_RELMAP_ID, "RelMap", relmap_redo, relmap_desc, relmap_identify, NULL, NULL, NULL, NULL)
-PG_RMGR(RM_STANDBY_ID, "Standby", standby_redo, standby_desc, standby_identify, NULL, NULL, NULL, standby_decode)
-PG_RMGR(RM_HEAP2_ID, "Heap2", heap2_redo, heap2_desc, heap2_identify, NULL, NULL, heap_mask, heap2_decode)
-PG_RMGR(RM_HEAP_ID, "Heap", heap_redo, heap_desc, heap_identify, NULL, NULL, heap_mask, heap_decode)
-PG_RMGR(RM_BTREE_ID, "Btree", btree_redo, btree_desc, btree_identify, btree_xlog_startup, btree_xlog_cleanup, btree_mask, NULL)
-PG_RMGR(RM_HASH_ID, "Hash", hash_redo, hash_desc, hash_identify, NULL, NULL, hash_mask, NULL)
-PG_RMGR(RM_GIN_ID, "Gin", gin_redo, gin_desc, gin_identify, gin_xlog_startup, gin_xlog_cleanup, gin_mask, NULL)
-PG_RMGR(RM_GIST_ID, "Gist", gist_redo, gist_desc, gist_identify, gist_xlog_startup, gist_xlog_cleanup, gist_mask, NULL)
-PG_RMGR(RM_SEQ_ID, "Sequence", seq_redo, seq_desc, seq_identify, NULL, NULL, seq_mask, NULL)
-PG_RMGR(RM_SPGIST_ID, "SPGist", spg_redo, spg_desc, spg_identify, spg_xlog_startup, spg_xlog_cleanup, spg_mask, NULL)
-PG_RMGR(RM_BRIN_ID, "BRIN", brin_redo, brin_desc, brin_identify, NULL, NULL, brin_mask, NULL)
-PG_RMGR(RM_COMMIT_TS_ID, "CommitTs", commit_ts_redo, commit_ts_desc, commit_ts_identify, NULL, NULL, NULL, NULL)
-PG_RMGR(RM_REPLORIGIN_ID, "ReplicationOrigin", replorigin_redo, replorigin_desc, replorigin_identify, NULL, NULL, NULL, NULL)
-PG_RMGR(RM_GENERIC_ID, "Generic", generic_redo, generic_desc, generic_identify, NULL, NULL, generic_mask, NULL)
-PG_RMGR(RM_LOGICALMSG_ID, "LogicalMessage", logicalmsg_redo, logicalmsg_desc, logicalmsg_identify, NULL, NULL, NULL, logicalmsg_decode)
diff --git a/contrib/libs/libpq/src/include/access/transam.h b/contrib/libs/libpq/src/include/access/transam.h
deleted file mode 100644
index f5af6d3055..0000000000
--- a/contrib/libs/libpq/src/include/access/transam.h
+++ /dev/null
@@ -1,375 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * transam.h
- *	  postgres transaction access method support code
- *
- *
- * Portions Copyright (c) 1996-2023, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- * src/include/access/transam.h
- *
- *-------------------------------------------------------------------------
- */
-#ifndef TRANSAM_H
-#define TRANSAM_H
-
-#include "access/xlogdefs.h"
-
-
-/* ----------------
- *		Special transaction ID values
- *
- * BootstrapTransactionId is the XID for "bootstrap" operations, and
- * FrozenTransactionId is used for very old tuples.  Both should
- * always be considered valid.
- *
- * FirstNormalTransactionId is the first "normal" transaction id.
- * Note: if you need to change it, you must change pg_class.h as well.
- * ----------------
- */
-#define InvalidTransactionId		((TransactionId) 0)
-#define BootstrapTransactionId		((TransactionId) 1)
-#define FrozenTransactionId			((TransactionId) 2)
-#define FirstNormalTransactionId	((TransactionId) 3)
-#define MaxTransactionId			((TransactionId) 0xFFFFFFFF)
-
-/* ----------------
- *		transaction ID manipulation macros
- * ----------------
- */
-#define TransactionIdIsValid(xid)		((xid) != InvalidTransactionId)
-#define TransactionIdIsNormal(xid)		((xid) >= FirstNormalTransactionId)
-#define TransactionIdEquals(id1, id2)	((id1) == (id2))
-#define TransactionIdStore(xid, dest)	(*(dest) = (xid))
-#define StoreInvalidTransactionId(dest) (*(dest) = InvalidTransactionId)
-
-#define EpochFromFullTransactionId(x)	((uint32) ((x).value >> 32))
-#define XidFromFullTransactionId(x)		((uint32) (x).value)
-#define U64FromFullTransactionId(x)		((x).value)
-#define FullTransactionIdEquals(a, b)	((a).value == (b).value)
-#define FullTransactionIdPrecedes(a, b)	((a).value < (b).value)
-#define FullTransactionIdPrecedesOrEquals(a, b) ((a).value <= (b).value)
-#define FullTransactionIdFollows(a, b) ((a).value > (b).value)
-#define FullTransactionIdFollowsOrEquals(a, b) ((a).value >= (b).value)
-#define FullTransactionIdIsValid(x)		TransactionIdIsValid(XidFromFullTransactionId(x))
-#define InvalidFullTransactionId		FullTransactionIdFromEpochAndXid(0, InvalidTransactionId)
-#define FirstNormalFullTransactionId	FullTransactionIdFromEpochAndXid(0, FirstNormalTransactionId)
-#define FullTransactionIdIsNormal(x)	FullTransactionIdFollowsOrEquals(x, FirstNormalFullTransactionId)
-
-/*
- * A 64 bit value that contains an epoch and a TransactionId.  This is
- * wrapped in a struct to prevent implicit conversion to/from TransactionId.
- * Not all values represent valid normal XIDs.
- */
-typedef struct FullTransactionId
-{
-	uint64		value;
-} FullTransactionId;
-
-static inline FullTransactionId
-FullTransactionIdFromEpochAndXid(uint32 epoch, TransactionId xid)
-{
-	FullTransactionId result;
-
-	result.value = ((uint64) epoch) << 32 | xid;
-
-	return result;
-}
-
-static inline FullTransactionId
-FullTransactionIdFromU64(uint64 value)
-{
-	FullTransactionId result;
-
-	result.value = value;
-
-	return result;
-}
-
-/* advance a transaction ID variable, handling wraparound correctly */
-#define TransactionIdAdvance(dest)	\
-	do { \
-		(dest)++; \
-		if ((dest) < FirstNormalTransactionId) \
-			(dest) = FirstNormalTransactionId; \
-	} while(0)
-
-/*
- * Retreat a FullTransactionId variable, stepping over xids that would appear
- * to be special only when viewed as 32bit XIDs.
- */
-static inline void
-FullTransactionIdRetreat(FullTransactionId *dest)
-{
-	dest->value--;
-
-	/*
-	 * In contrast to 32bit XIDs don't step over the "actual" special xids.
-	 * For 64bit xids these can't be reached as part of a wraparound as they
-	 * can in the 32bit case.
-	 */
-	if (FullTransactionIdPrecedes(*dest, FirstNormalFullTransactionId))
-		return;
-
-	/*
-	 * But we do need to step over XIDs that'd appear special only for 32bit
-	 * XIDs.
-	 */
-	while (XidFromFullTransactionId(*dest) < FirstNormalTransactionId)
-		dest->value--;
-}
-
-/*
- * Advance a FullTransactionId variable, stepping over xids that would appear
- * to be special only when viewed as 32bit XIDs.
- */
-static inline void
-FullTransactionIdAdvance(FullTransactionId *dest)
-{
-	dest->value++;
-
-	/* see FullTransactionIdAdvance() */
-	if (FullTransactionIdPrecedes(*dest, FirstNormalFullTransactionId))
-		return;
-
-	while (XidFromFullTransactionId(*dest) < FirstNormalTransactionId)
-		dest->value++;
-}
-
-/* back up a transaction ID variable, handling wraparound correctly */
-#define TransactionIdRetreat(dest)	\
-	do { \
-		(dest)--; \
-	} while ((dest) < FirstNormalTransactionId)
-
-/* compare two XIDs already known to be normal; this is a macro for speed */
-#define NormalTransactionIdPrecedes(id1, id2) \
-	(AssertMacro(TransactionIdIsNormal(id1) && TransactionIdIsNormal(id2)), \
-	(int32) ((id1) - (id2)) < 0)
-
-/* compare two XIDs already known to be normal; this is a macro for speed */
-#define NormalTransactionIdFollows(id1, id2) \
-	(AssertMacro(TransactionIdIsNormal(id1) && TransactionIdIsNormal(id2)), \
-	(int32) ((id1) - (id2)) > 0)
-
-/* ----------
- *		Object ID (OID) zero is InvalidOid.
- *
- *		OIDs 1-9999 are reserved for manual assignment (see .dat files in
- *		src/include/catalog/).  Of these, 8000-9999 are reserved for
- *		development purposes (such as in-progress patches and forks);
- *		they should not appear in released versions.
- *
- *		OIDs 10000-11999 are reserved for assignment by genbki.pl, for use
- *		when the .dat files in src/include/catalog/ do not specify an OID
- *		for a catalog entry that requires one.  Note that genbki.pl assigns
- *		these OIDs independently in each catalog, so they're not guaranteed
- *		to be globally unique.  Furthermore, the bootstrap backend and
- *		initdb's post-bootstrap processing can also assign OIDs in this range.
- *		The normal OID-generation logic takes care of any OID conflicts that
- *		might arise from that.
- *
- *		OIDs 12000-16383 are reserved for unpinned objects created by initdb's
- *		post-bootstrap processing.  initdb forces the OID generator up to
- *		12000 as soon as it's made the pinned objects it's responsible for.
- *
- *		OIDs beginning at 16384 are assigned from the OID generator
- *		during normal multiuser operation.  (We force the generator up to
- *		16384 as soon as we are in normal operation.)
- *
- * The choices of 8000, 10000 and 12000 are completely arbitrary, and can be
- * moved if we run low on OIDs in any category.  Changing the macros below,
- * and updating relevant documentation (see bki.sgml and RELEASE_CHANGES),
- * should be sufficient to do this.  Moving the 16384 boundary between
- * initdb-assigned OIDs and user-defined objects would be substantially
- * more painful, however, since some user-defined OIDs will appear in
- * on-disk data; such a change would probably break pg_upgrade.
- *
- * NOTE: if the OID generator wraps around, we skip over OIDs 0-16383
- * and resume with 16384.  This minimizes the odds of OID conflict, by not
- * reassigning OIDs that might have been assigned during initdb.  Critically,
- * it also ensures that no user-created object will be considered pinned.
- * ----------
- */
-#define FirstGenbkiObjectId		10000
-#define FirstUnpinnedObjectId	12000
-#define FirstNormalObjectId		16384
-
-/*
- * VariableCache is a data structure in shared memory that is used to track
- * OID and XID assignment state.  For largely historical reasons, there is
- * just one struct with different fields that are protected by different
- * LWLocks.
- *
- * Note: xidWrapLimit and oldestXidDB are not "active" values, but are
- * used just to generate useful messages when xidWarnLimit or xidStopLimit
- * are exceeded.
- */
-typedef struct VariableCacheData
-{
-	/*
-	 * These fields are protected by OidGenLock.
-	 */
-	Oid			nextOid;		/* next OID to assign */
-	uint32		oidCount;		/* OIDs available before must do XLOG work */
-
-	/*
-	 * These fields are protected by XidGenLock.
-	 */
-	FullTransactionId nextXid;	/* next XID to assign */
-
-	TransactionId oldestXid;	/* cluster-wide minimum datfrozenxid */
-	TransactionId xidVacLimit;	/* start forcing autovacuums here */
-	TransactionId xidWarnLimit; /* start complaining here */
-	TransactionId xidStopLimit; /* refuse to advance nextXid beyond here */
-	TransactionId xidWrapLimit; /* where the world ends */
-	Oid			oldestXidDB;	/* database with minimum datfrozenxid */
-
-	/*
-	 * These fields are protected by CommitTsLock
-	 */
-	TransactionId oldestCommitTsXid;
-	TransactionId newestCommitTsXid;
-
-	/*
-	 * These fields are protected by ProcArrayLock.
-	 */
-	FullTransactionId latestCompletedXid;	/* newest full XID that has
-											 * committed or aborted */
-
-	/*
-	 * Number of top-level transactions with xids (i.e. which may have
-	 * modified the database) that completed in some form since the start of
-	 * the server. This currently is solely used to check whether
-	 * GetSnapshotData() needs to recompute the contents of the snapshot, or
-	 * not. There are likely other users of this.  Always above 1.
-	 */
-	uint64		xactCompletionCount;
-
-	/*
-	 * These fields are protected by XactTruncationLock
-	 */
-	TransactionId oldestClogXid;	/* oldest it's safe to look up in clog */
-
-} VariableCacheData;
-
-typedef VariableCacheData *VariableCache;
-
-
-/* ----------------
- *		extern declarations
- * ----------------
- */
-
-/* in transam/xact.c */
-extern bool TransactionStartedDuringRecovery(void);
-
-/* in transam/varsup.c */
-extern PGDLLIMPORT VariableCache ShmemVariableCache;
-
-/*
- * prototypes for functions in transam/transam.c
- */
-extern bool TransactionIdDidCommit(TransactionId transactionId);
-extern bool TransactionIdDidAbort(TransactionId transactionId);
-extern void TransactionIdCommitTree(TransactionId xid, int nxids, TransactionId *xids);
-extern void TransactionIdAsyncCommitTree(TransactionId xid, int nxids, TransactionId *xids, XLogRecPtr lsn);
-extern void TransactionIdAbortTree(TransactionId xid, int nxids, TransactionId *xids);
-extern bool TransactionIdPrecedes(TransactionId id1, TransactionId id2);
-extern bool TransactionIdPrecedesOrEquals(TransactionId id1, TransactionId id2);
-extern bool TransactionIdFollows(TransactionId id1, TransactionId id2);
-extern bool TransactionIdFollowsOrEquals(TransactionId id1, TransactionId id2);
-extern TransactionId TransactionIdLatest(TransactionId mainxid,
-										 int nxids, const TransactionId *xids);
-extern XLogRecPtr TransactionIdGetCommitLSN(TransactionId xid);
-
-/* in transam/varsup.c */
-extern FullTransactionId GetNewTransactionId(bool isSubXact);
-extern void AdvanceNextFullTransactionIdPastXid(TransactionId xid);
-extern FullTransactionId ReadNextFullTransactionId(void);
-extern void SetTransactionIdLimit(TransactionId oldest_datfrozenxid,
-								  Oid oldest_datoid);
-extern void AdvanceOldestClogXid(TransactionId oldest_datfrozenxid);
-extern bool ForceTransactionIdLimitUpdate(void);
-extern Oid	GetNewObjectId(void);
-extern void StopGeneratingPinnedObjectIds(void);
-
-#ifdef USE_ASSERT_CHECKING
-extern void AssertTransactionIdInAllowableRange(TransactionId xid);
-#else
-#define AssertTransactionIdInAllowableRange(xid) ((void)true)
-#endif
-
-/*
- * Some frontend programs include this header.  For compilers that emit static
- * inline functions even when they're unused, that leads to unsatisfied
- * external references; hence hide them with #ifndef FRONTEND.
- */
-#ifndef FRONTEND
-
-/*
- * For callers that just need the XID part of the next transaction ID.
- */
-static inline TransactionId
-ReadNextTransactionId(void)
-{
-	return XidFromFullTransactionId(ReadNextFullTransactionId());
-}
-
-/* return transaction ID backed up by amount, handling wraparound correctly */
-static inline TransactionId
-TransactionIdRetreatedBy(TransactionId xid, uint32 amount)
-{
-	xid -= amount;
-
-	while (xid < FirstNormalTransactionId)
-		xid--;
-
-	return xid;
-}
-
-/* return the older of the two IDs */
-static inline TransactionId
-TransactionIdOlder(TransactionId a, TransactionId b)
-{
-	if (!TransactionIdIsValid(a))
-		return b;
-
-	if (!TransactionIdIsValid(b))
-		return a;
-
-	if (TransactionIdPrecedes(a, b))
-		return a;
-	return b;
-}
-
-/* return the older of the two IDs, assuming they're both normal */
-static inline TransactionId
-NormalTransactionIdOlder(TransactionId a, TransactionId b)
-{
-	Assert(TransactionIdIsNormal(a));
-	Assert(TransactionIdIsNormal(b));
-	if (NormalTransactionIdPrecedes(a, b))
-		return a;
-	return b;
-}
-
-/* return the newer of the two IDs */
-static inline FullTransactionId
-FullTransactionIdNewer(FullTransactionId a, FullTransactionId b)
-{
-	if (!FullTransactionIdIsValid(a))
-		return b;
-
-	if (!FullTransactionIdIsValid(b))
-		return a;
-
-	if (FullTransactionIdFollows(a, b))
-		return a;
-	return b;
-}
-
-#endif							/* FRONTEND */
-
-#endif							/* TRANSAM_H */
diff --git a/contrib/libs/libpq/src/include/access/xlog_internal.h b/contrib/libs/libpq/src/include/access/xlog_internal.h
deleted file mode 100644
index b0fd338a00..0000000000
--- a/contrib/libs/libpq/src/include/access/xlog_internal.h
+++ /dev/null
@@ -1,404 +0,0 @@
-/*
- * xlog_internal.h
- *
- * PostgreSQL write-ahead log internal declarations
- *
- * NOTE: this file is intended to contain declarations useful for
- * manipulating the XLOG files directly, but it is not supposed to be
- * needed by rmgr routines (redo support for individual record types).
- * So the XLogRecord typedef and associated stuff appear in xlogrecord.h.
- *
- * Note: This file must be includable in both frontend and backend contexts,
- * to allow stand-alone tools like pg_receivewal to deal with WAL files.
- *
- * Portions Copyright (c) 1996-2023, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- * src/include/access/xlog_internal.h
- */
-#ifndef XLOG_INTERNAL_H
-#define XLOG_INTERNAL_H
-
-#include "access/xlogdefs.h"
-#include "access/xlogreader.h"
-#include "datatype/timestamp.h"
-#include "lib/stringinfo.h"
-#include "pgtime.h"
-#include "storage/block.h"
-#include "storage/relfilelocator.h"
-
-
-/*
- * Each page of XLOG file has a header like this:
- */
-#define XLOG_PAGE_MAGIC 0xD113	/* can be used as WAL version indicator */
-
-typedef struct XLogPageHeaderData
-{
-	uint16		xlp_magic;		/* magic value for correctness checks */
-	uint16		xlp_info;		/* flag bits, see below */
-	TimeLineID	xlp_tli;		/* TimeLineID of first record on page */
-	XLogRecPtr	xlp_pageaddr;	/* XLOG address of this page */
-
-	/*
-	 * When there is not enough space on current page for whole record, we
-	 * continue on the next page.  xlp_rem_len is the number of bytes
-	 * remaining from a previous page; it tracks xl_tot_len in the initial
-	 * header.  Note that the continuation data isn't necessarily aligned.
-	 */
-	uint32		xlp_rem_len;	/* total len of remaining data for record */
-} XLogPageHeaderData;
-
-#define SizeOfXLogShortPHD	MAXALIGN(sizeof(XLogPageHeaderData))
-
-typedef XLogPageHeaderData *XLogPageHeader;
-
-/*
- * When the XLP_LONG_HEADER flag is set, we store additional fields in the
- * page header.  (This is ordinarily done just in the first page of an
- * XLOG file.)	The additional fields serve to identify the file accurately.
- */
-typedef struct XLogLongPageHeaderData
-{
-	XLogPageHeaderData std;		/* standard header fields */
-	uint64		xlp_sysid;		/* system identifier from pg_control */
-	uint32		xlp_seg_size;	/* just as a cross-check */
-	uint32		xlp_xlog_blcksz;	/* just as a cross-check */
-} XLogLongPageHeaderData;
-
-#define SizeOfXLogLongPHD	MAXALIGN(sizeof(XLogLongPageHeaderData))
-
-typedef XLogLongPageHeaderData *XLogLongPageHeader;
-
-/* When record crosses page boundary, set this flag in new page's header */
-#define XLP_FIRST_IS_CONTRECORD		0x0001
-/* This flag indicates a "long" page header */
-#define XLP_LONG_HEADER				0x0002
-/* This flag indicates backup blocks starting in this page are optional */
-#define XLP_BKP_REMOVABLE			0x0004
-/* Replaces a missing contrecord; see CreateOverwriteContrecordRecord */
-#define XLP_FIRST_IS_OVERWRITE_CONTRECORD 0x0008
-/* All defined flag bits in xlp_info (used for validity checking of header) */
-#define XLP_ALL_FLAGS				0x000F
-
-#define XLogPageHeaderSize(hdr)		\
-	(((hdr)->xlp_info & XLP_LONG_HEADER) ? SizeOfXLogLongPHD : SizeOfXLogShortPHD)
-
-/* wal_segment_size can range from 1MB to 1GB */
-#define WalSegMinSize 1024 * 1024
-#define WalSegMaxSize 1024 * 1024 * 1024
-/* default number of min and max wal segments */
-#define DEFAULT_MIN_WAL_SEGS 5
-#define DEFAULT_MAX_WAL_SEGS 64
-
-/* check that the given size is a valid wal_segment_size */
-#define IsPowerOf2(x) (x > 0 && ((x) & ((x)-1)) == 0)
-#define IsValidWalSegSize(size) \
-	 (IsPowerOf2(size) && \
-	 ((size) >= WalSegMinSize && (size) <= WalSegMaxSize))
-
-#define XLogSegmentsPerXLogId(wal_segsz_bytes)	\
-	(UINT64CONST(0x100000000) / (wal_segsz_bytes))
-
-#define XLogSegNoOffsetToRecPtr(segno, offset, wal_segsz_bytes, dest) \
-		(dest) = (segno) * (wal_segsz_bytes) + (offset)
-
-#define XLogSegmentOffset(xlogptr, wal_segsz_bytes)	\
-	((xlogptr) & ((wal_segsz_bytes) - 1))
-
-/*
- * Compute a segment number from an XLogRecPtr.
- *
- * For XLByteToSeg, do the computation at face value.  For XLByteToPrevSeg,
- * a boundary byte is taken to be in the previous segment.  This is suitable
- * for deciding which segment to write given a pointer to a record end,
- * for example.
- */
-#define XLByteToSeg(xlrp, logSegNo, wal_segsz_bytes) \
-	logSegNo = (xlrp) / (wal_segsz_bytes)
-
-#define XLByteToPrevSeg(xlrp, logSegNo, wal_segsz_bytes) \
-	logSegNo = ((xlrp) - 1) / (wal_segsz_bytes)
-
-/*
- * Convert values of GUCs measured in megabytes to equiv. segment count.
- * Rounds down.
- */
-#define XLogMBVarToSegs(mbvar, wal_segsz_bytes) \
-	((mbvar) / ((wal_segsz_bytes) / (1024 * 1024)))
-
-/*
- * Is an XLogRecPtr within a particular XLOG segment?
- *
- * For XLByteInSeg, do the computation at face value.  For XLByteInPrevSeg,
- * a boundary byte is taken to be in the previous segment.
- */
-#define XLByteInSeg(xlrp, logSegNo, wal_segsz_bytes) \
-	(((xlrp) / (wal_segsz_bytes)) == (logSegNo))
-
-#define XLByteInPrevSeg(xlrp, logSegNo, wal_segsz_bytes) \
-	((((xlrp) - 1) / (wal_segsz_bytes)) == (logSegNo))
-
-/* Check if an XLogRecPtr value is in a plausible range */
-#define XRecOffIsValid(xlrp) \
-		((xlrp) % XLOG_BLCKSZ >= SizeOfXLogShortPHD)
-
-/*
- * The XLog directory and control file (relative to $PGDATA)
- */
-#define XLOGDIR				"pg_wal"
-#define XLOG_CONTROL_FILE	"global/pg_control"
-
-/*
- * These macros encapsulate knowledge about the exact layout of XLog file
- * names, timeline history file names, and archive-status file names.
- */
-#define MAXFNAMELEN		64
-
-/* Length of XLog file name */
-#define XLOG_FNAME_LEN	   24
-
-/*
- * Generate a WAL segment file name.  Do not use this function in a helper
- * function allocating the result generated.
- */
-static inline void
-XLogFileName(char *fname, TimeLineID tli, XLogSegNo logSegNo, int wal_segsz_bytes)
-{
-	snprintf(fname, MAXFNAMELEN, "%08X%08X%08X", tli,
-			 (uint32) (logSegNo / XLogSegmentsPerXLogId(wal_segsz_bytes)),
-			 (uint32) (logSegNo % XLogSegmentsPerXLogId(wal_segsz_bytes)));
-}
-
-static inline void
-XLogFileNameById(char *fname, TimeLineID tli, uint32 log, uint32 seg)
-{
-	snprintf(fname, MAXFNAMELEN, "%08X%08X%08X", tli, log, seg);
-}
-
-static inline bool
-IsXLogFileName(const char *fname)
-{
-	return (strlen(fname) == XLOG_FNAME_LEN && \
-			strspn(fname, "0123456789ABCDEF") == XLOG_FNAME_LEN);
-}
-
-/*
- * XLOG segment with .partial suffix.  Used by pg_receivewal and at end of
- * archive recovery, when we want to archive a WAL segment but it might not
- * be complete yet.
- */
-static inline bool
-IsPartialXLogFileName(const char *fname)
-{
-	return (strlen(fname) == XLOG_FNAME_LEN + strlen(".partial") &&
-			strspn(fname, "0123456789ABCDEF") == XLOG_FNAME_LEN &&
-			strcmp(fname + XLOG_FNAME_LEN, ".partial") == 0);
-}
-
-static inline void
-XLogFromFileName(const char *fname, TimeLineID *tli, XLogSegNo *logSegNo, int wal_segsz_bytes)
-{
-	uint32		log;
-	uint32		seg;
-
-	sscanf(fname, "%08X%08X%08X", tli, &log, &seg);
-	*logSegNo = (uint64) log * XLogSegmentsPerXLogId(wal_segsz_bytes) + seg;
-}
-
-static inline void
-XLogFilePath(char *path, TimeLineID tli, XLogSegNo logSegNo, int wal_segsz_bytes)
-{
-	snprintf(path, MAXPGPATH, XLOGDIR "/%08X%08X%08X", tli,
-			 (uint32) (logSegNo / XLogSegmentsPerXLogId(wal_segsz_bytes)),
-			 (uint32) (logSegNo % XLogSegmentsPerXLogId(wal_segsz_bytes)));
-}
-
-static inline void
-TLHistoryFileName(char *fname, TimeLineID tli)
-{
-	snprintf(fname, MAXFNAMELEN, "%08X.history", tli);
-}
-
-static inline bool
-IsTLHistoryFileName(const char *fname)
-{
-	return (strlen(fname) == 8 + strlen(".history") &&
-			strspn(fname, "0123456789ABCDEF") == 8 &&
-			strcmp(fname + 8, ".history") == 0);
-}
-
-static inline void
-TLHistoryFilePath(char *path, TimeLineID tli)
-{
-	snprintf(path, MAXPGPATH, XLOGDIR "/%08X.history", tli);
-}
-
-static inline void
-StatusFilePath(char *path, const char *xlog, const char *suffix)
-{
-	snprintf(path, MAXPGPATH, XLOGDIR "/archive_status/%s%s", xlog, suffix);
-}
-
-static inline void
-BackupHistoryFileName(char *fname, TimeLineID tli, XLogSegNo logSegNo, XLogRecPtr startpoint, int wal_segsz_bytes)
-{
-	snprintf(fname, MAXFNAMELEN, "%08X%08X%08X.%08X.backup", tli,
-			 (uint32) (logSegNo / XLogSegmentsPerXLogId(wal_segsz_bytes)),
-			 (uint32) (logSegNo % XLogSegmentsPerXLogId(wal_segsz_bytes)),
-			 (uint32) (XLogSegmentOffset(startpoint, wal_segsz_bytes)));
-}
-
-static inline bool
-IsBackupHistoryFileName(const char *fname)
-{
-	return (strlen(fname) > XLOG_FNAME_LEN &&
-			strspn(fname, "0123456789ABCDEF") == XLOG_FNAME_LEN &&
-			strcmp(fname + strlen(fname) - strlen(".backup"), ".backup") == 0);
-}
-
-static inline void
-BackupHistoryFilePath(char *path, TimeLineID tli, XLogSegNo logSegNo, XLogRecPtr startpoint, int wal_segsz_bytes)
-{
-	snprintf(path, MAXPGPATH, XLOGDIR "/%08X%08X%08X.%08X.backup", tli,
-			 (uint32) (logSegNo / XLogSegmentsPerXLogId(wal_segsz_bytes)),
-			 (uint32) (logSegNo % XLogSegmentsPerXLogId(wal_segsz_bytes)),
-			 (uint32) (XLogSegmentOffset((startpoint), wal_segsz_bytes)));
-}
-
-/*
- * Information logged when we detect a change in one of the parameters
- * important for Hot Standby.
- */
-typedef struct xl_parameter_change
-{
-	int			MaxConnections;
-	int			max_worker_processes;
-	int			max_wal_senders;
-	int			max_prepared_xacts;
-	int			max_locks_per_xact;
-	int			wal_level;
-	bool		wal_log_hints;
-	bool		track_commit_timestamp;
-} xl_parameter_change;
-
-/* logs restore point */
-typedef struct xl_restore_point
-{
-	TimestampTz rp_time;
-	char		rp_name[MAXFNAMELEN];
-} xl_restore_point;
-
-/* Overwrite of prior contrecord */
-typedef struct xl_overwrite_contrecord
-{
-	XLogRecPtr	overwritten_lsn;
-	TimestampTz overwrite_time;
-} xl_overwrite_contrecord;
-
-/* End of recovery mark, when we don't do an END_OF_RECOVERY checkpoint */
-typedef struct xl_end_of_recovery
-{
-	TimestampTz end_time;
-	TimeLineID	ThisTimeLineID; /* new TLI */
-	TimeLineID	PrevTimeLineID; /* previous TLI we forked off from */
-} xl_end_of_recovery;
-
-/*
- * The functions in xloginsert.c construct a chain of XLogRecData structs
- * to represent the final WAL record.
- */
-typedef struct XLogRecData
-{
-	struct XLogRecData *next;	/* next struct in chain, or NULL */
-	char	   *data;			/* start of rmgr data to include */
-	uint32		len;			/* length of rmgr data to include */
-} XLogRecData;
-
-/*
- * Recovery target action.
- */
-typedef enum
-{
-	RECOVERY_TARGET_ACTION_PAUSE,
-	RECOVERY_TARGET_ACTION_PROMOTE,
-	RECOVERY_TARGET_ACTION_SHUTDOWN
-}			RecoveryTargetAction;
-
-struct LogicalDecodingContext;
-struct XLogRecordBuffer;
-
-/*
- * Method table for resource managers.
- *
- * This struct must be kept in sync with the PG_RMGR definition in
- * rmgr.c.
- *
- * rm_identify must return a name for the record based on xl_info (without
- * reference to the rmid). For example, XLOG_BTREE_VACUUM would be named
- * "VACUUM". rm_desc can then be called to obtain additional detail for the
- * record, if available (e.g. the last block).
- *
- * rm_mask takes as input a page modified by the resource manager and masks
- * out bits that shouldn't be flagged by wal_consistency_checking.
- *
- * RmgrTable[] is indexed by RmgrId values (see rmgrlist.h). If rm_name is
- * NULL, the corresponding RmgrTable entry is considered invalid.
- */
-typedef struct RmgrData
-{
-	const char *rm_name;
-	void		(*rm_redo) (XLogReaderState *record);
-	void		(*rm_desc) (StringInfo buf, XLogReaderState *record);
-	const char *(*rm_identify) (uint8 info);
-	void		(*rm_startup) (void);
-	void		(*rm_cleanup) (void);
-	void		(*rm_mask) (char *pagedata, BlockNumber blkno);
-	void		(*rm_decode) (struct LogicalDecodingContext *ctx,
-							  struct XLogRecordBuffer *buf);
-} RmgrData;
-
-extern PGDLLIMPORT RmgrData RmgrTable[];
-extern void RmgrStartup(void);
-extern void RmgrCleanup(void);
-extern void RmgrNotFound(RmgrId rmid);
-extern void RegisterCustomRmgr(RmgrId rmid, const RmgrData *rmgr);
-
-#ifndef FRONTEND
-static inline bool
-RmgrIdExists(RmgrId rmid)
-{
-	return RmgrTable[rmid].rm_name != NULL;
-}
-
-static inline RmgrData
-GetRmgr(RmgrId rmid)
-{
-	if (unlikely(!RmgrIdExists(rmid)))
-		RmgrNotFound(rmid);
-	return RmgrTable[rmid];
-}
-#endif
-
-/*
- * Exported to support xlog switching from checkpointer
- */
-extern pg_time_t GetLastSegSwitchData(XLogRecPtr *lastSwitchLSN);
-extern XLogRecPtr RequestXLogSwitch(bool mark_unimportant);
-
-extern void GetOldestRestartPoint(XLogRecPtr *oldrecptr, TimeLineID *oldtli);
-
-extern void XLogRecGetBlockRefInfo(XLogReaderState *record, bool pretty,
-								   bool detailed_format, StringInfo buf,
-								   uint32 *fpi_len);
-
-/*
- * Exported for the functions in timeline.c and xlogarchive.c.  Only valid
- * in the startup process.
- */
-extern PGDLLIMPORT bool ArchiveRecoveryRequested;
-extern PGDLLIMPORT bool InArchiveRecovery;
-extern PGDLLIMPORT bool StandbyMode;
-extern PGDLLIMPORT char *recoveryRestoreCommand;
-
-#endif							/* XLOG_INTERNAL_H */
diff --git a/contrib/libs/libpq/src/include/access/xlogdefs.h b/contrib/libs/libpq/src/include/access/xlogdefs.h
deleted file mode 100644
index fe794c7740..0000000000
--- a/contrib/libs/libpq/src/include/access/xlogdefs.h
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * xlogdefs.h
- *
- * Postgres write-ahead log manager record pointer and
- * timeline number definitions
- *
- * Portions Copyright (c) 1996-2023, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- * src/include/access/xlogdefs.h
- */
-#ifndef XLOG_DEFS_H
-#define XLOG_DEFS_H
-
-#include <fcntl.h>				/* need open() flags */
-
-/*
- * Pointer to a location in the XLOG.  These pointers are 64 bits wide,
- * because we don't want them ever to overflow.
- */
-typedef uint64 XLogRecPtr;
-
-/*
- * Zero is used indicate an invalid pointer. Bootstrap skips the first possible
- * WAL segment, initializing the first WAL page at WAL segment size, so no XLOG
- * record can begin at zero.
- */
-#define InvalidXLogRecPtr	0
-#define XLogRecPtrIsInvalid(r)	((r) == InvalidXLogRecPtr)
-
-/*
- * First LSN to use for "fake" LSNs.
- *
- * Values smaller than this can be used for special per-AM purposes.
- */
-#define FirstNormalUnloggedLSN	((XLogRecPtr) 1000)
-
-/*
- * Handy macro for printing XLogRecPtr in conventional format, e.g.,
- *
- * printf("%X/%X", LSN_FORMAT_ARGS(lsn));
- */
-#define LSN_FORMAT_ARGS(lsn) (AssertVariableIsOfTypeMacro((lsn), XLogRecPtr), (uint32) ((lsn) >> 32)), ((uint32) (lsn))
-
-/*
- * XLogSegNo - physical log file sequence number.
- */
-typedef uint64 XLogSegNo;
-
-/*
- * TimeLineID (TLI) - identifies different database histories to prevent
- * confusion after restoring a prior state of a database installation.
- * TLI does not change in a normal stop/restart of the database (including
- * crash-and-recover cases); but we must assign a new TLI after doing
- * a recovery to a prior state, a/k/a point-in-time recovery.  This makes
- * the new WAL logfile sequence we generate distinguishable from the
- * sequence that was generated in the previous incarnation.
- */
-typedef uint32 TimeLineID;
-
-/*
- * Replication origin id - this is located in this file to avoid having to
- * include origin.h in a bunch of xlog related places.
- */
-typedef uint16 RepOriginId;
-
-/*
- * This chunk of hackery attempts to determine which file sync methods
- * are available on the current platform, and to choose an appropriate
- * default method.
- *
- * Note that we define our own O_DSYNC on Windows, but not O_SYNC.
- */
-#if defined(PLATFORM_DEFAULT_SYNC_METHOD)
-#define DEFAULT_SYNC_METHOD		PLATFORM_DEFAULT_SYNC_METHOD
-#elif defined(O_DSYNC) && (!defined(O_SYNC) || O_DSYNC != O_SYNC)
-#define DEFAULT_SYNC_METHOD		SYNC_METHOD_OPEN_DSYNC
-#else
-#define DEFAULT_SYNC_METHOD		SYNC_METHOD_FDATASYNC
-#endif
-
-#endif							/* XLOG_DEFS_H */
diff --git a/contrib/libs/libpq/src/include/access/xlogreader.h b/contrib/libs/libpq/src/include/access/xlogreader.h
deleted file mode 100644
index da32c7db77..0000000000
--- a/contrib/libs/libpq/src/include/access/xlogreader.h
+++ /dev/null
@@ -1,444 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * xlogreader.h
- *		Definitions for the generic XLog reading facility
- *
- * Portions Copyright (c) 2013-2023, PostgreSQL Global Development Group
- *
- * IDENTIFICATION
- *		src/include/access/xlogreader.h
- *
- * NOTES
- *		See the definition of the XLogReaderState struct for instructions on
- *		how to use the XLogReader infrastructure.
- *
- *		The basic idea is to allocate an XLogReaderState via
- *		XLogReaderAllocate(), position the reader to the first record with
- *		XLogBeginRead() or XLogFindNextRecord(), and call XLogReadRecord()
- *		until it returns NULL.
- *
- *		Callers supply a page_read callback if they want to call
- *		XLogReadRecord or XLogFindNextRecord; it can be passed in as NULL
- *		otherwise.  The WALRead function can be used as a helper to write
- *		page_read callbacks, but it is not mandatory; callers that use it,
- *		must supply segment_open callbacks.  The segment_close callback
- *		must always be supplied.
- *
- *		After reading a record with XLogReadRecord(), it's decomposed into
- *		the per-block and main data parts, and the parts can be accessed
- *		with the XLogRec* macros and functions. You can also decode a
- *		record that's already constructed in memory, without reading from
- *		disk, by calling the DecodeXLogRecord() function.
- *-------------------------------------------------------------------------
- */
-#ifndef XLOGREADER_H
-#define XLOGREADER_H
-
-#ifndef FRONTEND
-#include "access/transam.h"
-#endif
-
-#include "access/xlogrecord.h"
-#include "storage/buf.h"
-
-/* WALOpenSegment represents a WAL segment being read. */
-typedef struct WALOpenSegment
-{
-	int			ws_file;		/* segment file descriptor */
-	XLogSegNo	ws_segno;		/* segment number */
-	TimeLineID	ws_tli;			/* timeline ID of the currently open file */
-} WALOpenSegment;
-
-/* WALSegmentContext carries context information about WAL segments to read */
-typedef struct WALSegmentContext
-{
-	char		ws_dir[MAXPGPATH];
-	int			ws_segsize;
-} WALSegmentContext;
-
-typedef struct XLogReaderState XLogReaderState;
-
-/* Function type definitions for various xlogreader interactions */
-typedef int (*XLogPageReadCB) (XLogReaderState *xlogreader,
-							   XLogRecPtr targetPagePtr,
-							   int reqLen,
-							   XLogRecPtr targetRecPtr,
-							   char *readBuf);
-typedef void (*WALSegmentOpenCB) (XLogReaderState *xlogreader,
-								  XLogSegNo nextSegNo,
-								  TimeLineID *tli_p);
-typedef void (*WALSegmentCloseCB) (XLogReaderState *xlogreader);
-
-typedef struct XLogReaderRoutine
-{
-	/*
-	 * Data input callback
-	 *
-	 * This callback shall read at least reqLen valid bytes of the xlog page
-	 * starting at targetPagePtr, and store them in readBuf.  The callback
-	 * shall return the number of bytes read (never more than XLOG_BLCKSZ), or
-	 * -1 on failure.  The callback shall sleep, if necessary, to wait for the
-	 * requested bytes to become available.  The callback will not be invoked
-	 * again for the same page unless more than the returned number of bytes
-	 * are needed.
-	 *
-	 * targetRecPtr is the position of the WAL record we're reading.  Usually
-	 * it is equal to targetPagePtr + reqLen, but sometimes xlogreader needs
-	 * to read and verify the page or segment header, before it reads the
-	 * actual WAL record it's interested in.  In that case, targetRecPtr can
-	 * be used to determine which timeline to read the page from.
-	 *
-	 * The callback shall set ->seg.ws_tli to the TLI of the file the page was
-	 * read from.
-	 */
-	XLogPageReadCB page_read;
-
-	/*
-	 * Callback to open the specified WAL segment for reading.  ->seg.ws_file
-	 * shall be set to the file descriptor of the opened segment.  In case of
-	 * failure, an error shall be raised by the callback and it shall not
-	 * return.
-	 *
-	 * "nextSegNo" is the number of the segment to be opened.
-	 *
-	 * "tli_p" is an input/output argument. WALRead() uses it to pass the
-	 * timeline in which the new segment should be found, but the callback can
-	 * use it to return the TLI that it actually opened.
-	 */
-	WALSegmentOpenCB segment_open;
-
-	/*
-	 * WAL segment close callback.  ->seg.ws_file shall be set to a negative
-	 * number.
-	 */
-	WALSegmentCloseCB segment_close;
-} XLogReaderRoutine;
-
-#define XL_ROUTINE(...) &(XLogReaderRoutine){__VA_ARGS__}
-
-typedef struct
-{
-	/* Is this block ref in use? */
-	bool		in_use;
-
-	/* Identify the block this refers to */
-	RelFileLocator rlocator;
-	ForkNumber	forknum;
-	BlockNumber blkno;
-
-	/* Prefetching workspace. */
-	Buffer		prefetch_buffer;
-
-	/* copy of the fork_flags field from the XLogRecordBlockHeader */
-	uint8		flags;
-
-	/* Information on full-page image, if any */
-	bool		has_image;		/* has image, even for consistency checking */
-	bool		apply_image;	/* has image that should be restored */
-	char	   *bkp_image;
-	uint16		hole_offset;
-	uint16		hole_length;
-	uint16		bimg_len;
-	uint8		bimg_info;
-
-	/* Buffer holding the rmgr-specific data associated with this block */
-	bool		has_data;
-	char	   *data;
-	uint16		data_len;
-	uint16		data_bufsz;
-} DecodedBkpBlock;
-
-/*
- * The decoded contents of a record.  This occupies a contiguous region of
- * memory, with main_data and blocks[n].data pointing to memory after the
- * members declared here.
- */
-typedef struct DecodedXLogRecord
-{
-	/* Private member used for resource management. */
-	size_t		size;			/* total size of decoded record */
-	bool		oversized;		/* outside the regular decode buffer? */
-	struct DecodedXLogRecord *next; /* decoded record queue link */
-
-	/* Public members. */
-	XLogRecPtr	lsn;			/* location */
-	XLogRecPtr	next_lsn;		/* location of next record */
-	XLogRecord	header;			/* header */
-	RepOriginId record_origin;
-	TransactionId toplevel_xid; /* XID of top-level transaction */
-	char	   *main_data;		/* record's main data portion */
-	uint32		main_data_len;	/* main data portion's length */
-	int			max_block_id;	/* highest block_id in use (-1 if none) */
-	DecodedBkpBlock blocks[FLEXIBLE_ARRAY_MEMBER];
-} DecodedXLogRecord;
-
-struct XLogReaderState
-{
-	/*
-	 * Operational callbacks
-	 */
-	XLogReaderRoutine routine;
-
-	/* ----------------------------------------
-	 * Public parameters
-	 * ----------------------------------------
-	 */
-
-	/*
-	 * System identifier of the xlog files we're about to read.  Set to zero
-	 * (the default value) if unknown or unimportant.
-	 */
-	uint64		system_identifier;
-
-	/*
-	 * Opaque data for callbacks to use.  Not used by XLogReader.
-	 */
-	void	   *private_data;
-
-	/*
-	 * Start and end point of last record read.  EndRecPtr is also used as the
-	 * position to read next.  Calling XLogBeginRead() sets EndRecPtr to the
-	 * starting position and ReadRecPtr to invalid.
-	 *
-	 * Start and end point of last record returned by XLogReadRecord().  These
-	 * are also available as record->lsn and record->next_lsn.
-	 */
-	XLogRecPtr	ReadRecPtr;		/* start of last record read */
-	XLogRecPtr	EndRecPtr;		/* end+1 of last record read */
-
-	/*
-	 * Set at the end of recovery: the start point of a partial record at the
-	 * end of WAL (InvalidXLogRecPtr if there wasn't one), and the start
-	 * location of its first contrecord that went missing.
-	 */
-	XLogRecPtr	abortedRecPtr;
-	XLogRecPtr	missingContrecPtr;
-	/* Set when XLP_FIRST_IS_OVERWRITE_CONTRECORD is found */
-	XLogRecPtr	overwrittenRecPtr;
-
-
-	/* ----------------------------------------
-	 * Decoded representation of current record
-	 *
-	 * Use XLogRecGet* functions to investigate the record; these fields
-	 * should not be accessed directly.
-	 * ----------------------------------------
-	 * Start and end point of the last record read and decoded by
-	 * XLogReadRecordInternal().  NextRecPtr is also used as the position to
-	 * decode next.  Calling XLogBeginRead() sets NextRecPtr and EndRecPtr to
-	 * the requested starting position.
-	 */
-	XLogRecPtr	DecodeRecPtr;	/* start of last record decoded */
-	XLogRecPtr	NextRecPtr;		/* end+1 of last record decoded */
-	XLogRecPtr	PrevRecPtr;		/* start of previous record decoded */
-
-	/* Last record returned by XLogReadRecord(). */
-	DecodedXLogRecord *record;
-
-	/* ----------------------------------------
-	 * private/internal state
-	 * ----------------------------------------
-	 */
-
-	/*
-	 * Buffer for decoded records.  This is a circular buffer, though
-	 * individual records can't be split in the middle, so some space is often
-	 * wasted at the end.  Oversized records that don't fit in this space are
-	 * allocated separately.
-	 */
-	char	   *decode_buffer;
-	size_t		decode_buffer_size;
-	bool		free_decode_buffer; /* need to free? */
-	char	   *decode_buffer_head; /* data is read from the head */
-	char	   *decode_buffer_tail; /* new data is written at the tail */
-
-	/*
-	 * Queue of records that have been decoded.  This is a linked list that
-	 * usually consists of consecutive records in decode_buffer, but may also
-	 * contain oversized records allocated with palloc().
-	 */
-	DecodedXLogRecord *decode_queue_head;	/* oldest decoded record */
-	DecodedXLogRecord *decode_queue_tail;	/* newest decoded record */
-
-	/*
-	 * Buffer for currently read page (XLOG_BLCKSZ bytes, valid up to at least
-	 * readLen bytes)
-	 */
-	char	   *readBuf;
-	uint32		readLen;
-
-	/* last read XLOG position for data currently in readBuf */
-	WALSegmentContext segcxt;
-	WALOpenSegment seg;
-	uint32		segoff;
-
-	/*
-	 * beginning of prior page read, and its TLI.  Doesn't necessarily
-	 * correspond to what's in readBuf; used for timeline sanity checks.
-	 */
-	XLogRecPtr	latestPagePtr;
-	TimeLineID	latestPageTLI;
-
-	/* beginning of the WAL record being read. */
-	XLogRecPtr	currRecPtr;
-	/* timeline to read it from, 0 if a lookup is required */
-	TimeLineID	currTLI;
-
-	/*
-	 * Safe point to read to in currTLI if current TLI is historical
-	 * (tliSwitchPoint) or InvalidXLogRecPtr if on current timeline.
-	 *
-	 * Actually set to the start of the segment containing the timeline switch
-	 * that ends currTLI's validity, not the LSN of the switch its self, since
-	 * we can't assume the old segment will be present.
-	 */
-	XLogRecPtr	currTLIValidUntil;
-
-	/*
-	 * If currTLI is not the most recent known timeline, the next timeline to
-	 * read from when currTLIValidUntil is reached.
-	 */
-	TimeLineID	nextTLI;
-
-	/*
-	 * Buffer for current ReadRecord result (expandable), used when a record
-	 * crosses a page boundary.
-	 */
-	char	   *readRecordBuf;
-	uint32		readRecordBufSize;
-
-	/* Buffer to hold error message */
-	char	   *errormsg_buf;
-	bool		errormsg_deferred;
-
-	/*
-	 * Flag to indicate to XLogPageReadCB that it should not block waiting for
-	 * data.
-	 */
-	bool		nonblocking;
-};
-
-/*
- * Check if XLogNextRecord() has any more queued records or an error to return.
- */
-static inline bool
-XLogReaderHasQueuedRecordOrError(XLogReaderState *state)
-{
-	return (state->decode_queue_head != NULL) || state->errormsg_deferred;
-}
-
-/* Get a new XLogReader */
-extern XLogReaderState *XLogReaderAllocate(int wal_segment_size,
-										   const char *waldir,
-										   XLogReaderRoutine *routine,
-										   void *private_data);
-
-/* Free an XLogReader */
-extern void XLogReaderFree(XLogReaderState *state);
-
-/* Optionally provide a circular decoding buffer to allow readahead. */
-extern void XLogReaderSetDecodeBuffer(XLogReaderState *state,
-									  void *buffer,
-									  size_t size);
-
-/* Position the XLogReader to given record */
-extern void XLogBeginRead(XLogReaderState *state, XLogRecPtr RecPtr);
-extern XLogRecPtr XLogFindNextRecord(XLogReaderState *state, XLogRecPtr RecPtr);
-
-/* Return values from XLogPageReadCB. */
-typedef enum XLogPageReadResult
-{
-	XLREAD_SUCCESS = 0,			/* record is successfully read */
-	XLREAD_FAIL = -1,			/* failed during reading a record */
-	XLREAD_WOULDBLOCK = -2		/* nonblocking mode only, no data */
-} XLogPageReadResult;
-
-/* Read the next XLog record. Returns NULL on end-of-WAL or failure */
-extern struct XLogRecord *XLogReadRecord(XLogReaderState *state,
-										 char **errormsg);
-
-/* Consume the next record or error. */
-extern DecodedXLogRecord *XLogNextRecord(XLogReaderState *state,
-										 char **errormsg);
-
-/* Release the previously returned record, if necessary. */
-extern XLogRecPtr XLogReleasePreviousRecord(XLogReaderState *state);
-
-/* Try to read ahead, if there is data and space. */
-extern DecodedXLogRecord *XLogReadAhead(XLogReaderState *state,
-										bool nonblocking);
-
-/* Validate a page */
-extern bool XLogReaderValidatePageHeader(XLogReaderState *state,
-										 XLogRecPtr recptr, char *phdr);
-
-/* Forget error produced by XLogReaderValidatePageHeader(). */
-extern void XLogReaderResetError(XLogReaderState *state);
-
-/*
- * Error information from WALRead that both backend and frontend caller can
- * process.  Currently only errors from pg_pread can be reported.
- */
-typedef struct WALReadError
-{
-	int			wre_errno;		/* errno set by the last pg_pread() */
-	int			wre_off;		/* Offset we tried to read from. */
-	int			wre_req;		/* Bytes requested to be read. */
-	int			wre_read;		/* Bytes read by the last read(). */
-	WALOpenSegment wre_seg;		/* Segment we tried to read from. */
-} WALReadError;
-
-extern bool WALRead(XLogReaderState *state,
-					char *buf, XLogRecPtr startptr, Size count,
-					TimeLineID tli, WALReadError *errinfo);
-
-/* Functions for decoding an XLogRecord */
-
-extern size_t DecodeXLogRecordRequiredSpace(size_t xl_tot_len);
-extern bool DecodeXLogRecord(XLogReaderState *state,
-							 DecodedXLogRecord *decoded,
-							 XLogRecord *record,
-							 XLogRecPtr lsn,
-							 char **errormsg);
-
-/*
- * Macros that provide access to parts of the record most recently returned by
- * XLogReadRecord() or XLogNextRecord().
- */
-#define XLogRecGetTotalLen(decoder) ((decoder)->record->header.xl_tot_len)
-#define XLogRecGetPrev(decoder) ((decoder)->record->header.xl_prev)
-#define XLogRecGetInfo(decoder) ((decoder)->record->header.xl_info)
-#define XLogRecGetRmid(decoder) ((decoder)->record->header.xl_rmid)
-#define XLogRecGetXid(decoder) ((decoder)->record->header.xl_xid)
-#define XLogRecGetOrigin(decoder) ((decoder)->record->record_origin)
-#define XLogRecGetTopXid(decoder) ((decoder)->record->toplevel_xid)
-#define XLogRecGetData(decoder) ((decoder)->record->main_data)
-#define XLogRecGetDataLen(decoder) ((decoder)->record->main_data_len)
-#define XLogRecHasAnyBlockRefs(decoder) ((decoder)->record->max_block_id >= 0)
-#define XLogRecMaxBlockId(decoder) ((decoder)->record->max_block_id)
-#define XLogRecGetBlock(decoder, i) (&(decoder)->record->blocks[(i)])
-#define XLogRecHasBlockRef(decoder, block_id)			\
-	(((decoder)->record->max_block_id >= (block_id)) &&	\
-	 ((decoder)->record->blocks[block_id].in_use))
-#define XLogRecHasBlockImage(decoder, block_id)		\
-	((decoder)->record->blocks[block_id].has_image)
-#define XLogRecBlockImageApply(decoder, block_id)		\
-	((decoder)->record->blocks[block_id].apply_image)
-#define XLogRecHasBlockData(decoder, block_id)		\
-	((decoder)->record->blocks[block_id].has_data)
-
-#ifndef FRONTEND
-extern FullTransactionId XLogRecGetFullXid(XLogReaderState *record);
-#endif
-
-extern bool RestoreBlockImage(XLogReaderState *record, uint8 block_id, char *page);
-extern char *XLogRecGetBlockData(XLogReaderState *record, uint8 block_id, Size *len);
-extern void XLogRecGetBlockTag(XLogReaderState *record, uint8 block_id,
-							   RelFileLocator *rlocator, ForkNumber *forknum,
-							   BlockNumber *blknum);
-extern bool XLogRecGetBlockTagExtended(XLogReaderState *record, uint8 block_id,
-									   RelFileLocator *rlocator, ForkNumber *forknum,
-									   BlockNumber *blknum,
-									   Buffer *prefetch_buffer);
-
-#endif							/* XLOGREADER_H */
diff --git a/contrib/libs/libpq/src/include/access/xlogrecord.h b/contrib/libs/libpq/src/include/access/xlogrecord.h
deleted file mode 100644
index f355e08e1d..0000000000
--- a/contrib/libs/libpq/src/include/access/xlogrecord.h
+++ /dev/null
@@ -1,248 +0,0 @@
-/*
- * xlogrecord.h
- *
- * Definitions for the WAL record format.
- *
- * Portions Copyright (c) 1996-2023, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- * src/include/access/xlogrecord.h
- */
-#ifndef XLOGRECORD_H
-#define XLOGRECORD_H
-
-#include "access/rmgr.h"
-#include "access/xlogdefs.h"
-#include "port/pg_crc32c.h"
-#include "storage/block.h"
-#include "storage/relfilelocator.h"
-
-/*
- * The overall layout of an XLOG record is:
- *		Fixed-size header (XLogRecord struct)
- *		XLogRecordBlockHeader struct
- *		XLogRecordBlockHeader struct
- *		...
- *		XLogRecordDataHeader[Short|Long] struct
- *		block data
- *		block data
- *		...
- *		main data
- *
- * There can be zero or more XLogRecordBlockHeaders, and 0 or more bytes of
- * rmgr-specific data not associated with a block.  XLogRecord structs
- * always start on MAXALIGN boundaries in the WAL files, but the rest of
- * the fields are not aligned.
- *
- * The XLogRecordBlockHeader, XLogRecordDataHeaderShort and
- * XLogRecordDataHeaderLong structs all begin with a single 'id' byte. It's
- * used to distinguish between block references, and the main data structs.
- */
-typedef struct XLogRecord
-{
-	uint32		xl_tot_len;		/* total len of entire record */
-	TransactionId xl_xid;		/* xact id */
-	XLogRecPtr	xl_prev;		/* ptr to previous record in log */
-	uint8		xl_info;		/* flag bits, see below */
-	RmgrId		xl_rmid;		/* resource manager for this record */
-	/* 2 bytes of padding here, initialize to zero */
-	pg_crc32c	xl_crc;			/* CRC for this record */
-
-	/* XLogRecordBlockHeaders and XLogRecordDataHeader follow, no padding */
-
-} XLogRecord;
-
-#define SizeOfXLogRecord	(offsetof(XLogRecord, xl_crc) + sizeof(pg_crc32c))
-
-/*
- * The high 4 bits in xl_info may be used freely by rmgr. The
- * XLR_SPECIAL_REL_UPDATE and XLR_CHECK_CONSISTENCY bits can be passed by
- * XLogInsert caller. The rest are set internally by XLogInsert.
- */
-#define XLR_INFO_MASK			0x0F
-#define XLR_RMGR_INFO_MASK		0xF0
-
-/*
- * XLogReader needs to allocate all the data of a WAL record in a single
- * chunk.  This means that a single XLogRecord cannot exceed MaxAllocSize
- * in length if we ignore any allocation overhead of the XLogReader.
- *
- * To accommodate some overhead, this value allows for 4M of allocation
- * overhead, that should be plenty enough for what
- * DecodeXLogRecordRequiredSpace() expects as extra.
- */
-#define XLogRecordMaxSize	(1020 * 1024 * 1024)
-
-/*
- * If a WAL record modifies any relation files, in ways not covered by the
- * usual block references, this flag is set. This is not used for anything
- * by PostgreSQL itself, but it allows external tools that read WAL and keep
- * track of modified blocks to recognize such special record types.
- */
-#define XLR_SPECIAL_REL_UPDATE	0x01
-
-/*
- * Enforces consistency checks of replayed WAL at recovery. If enabled,
- * each record will log a full-page write for each block modified by the
- * record and will reuse it afterwards for consistency checks. The caller
- * of XLogInsert can use this value if necessary, but if
- * wal_consistency_checking is enabled for a rmgr this is set unconditionally.
- */
-#define XLR_CHECK_CONSISTENCY	0x02
-
-/*
- * Header info for block data appended to an XLOG record.
- *
- * 'data_length' is the length of the rmgr-specific payload data associated
- * with this block. It does not include the possible full page image, nor
- * XLogRecordBlockHeader struct itself.
- *
- * Note that we don't attempt to align the XLogRecordBlockHeader struct!
- * So, the struct must be copied to aligned local storage before use.
- */
-typedef struct XLogRecordBlockHeader
-{
-	uint8		id;				/* block reference ID */
-	uint8		fork_flags;		/* fork within the relation, and flags */
-	uint16		data_length;	/* number of payload bytes (not including page
-								 * image) */
-
-	/* If BKPBLOCK_HAS_IMAGE, an XLogRecordBlockImageHeader struct follows */
-	/* If BKPBLOCK_SAME_REL is not set, a RelFileLocator follows */
-	/* BlockNumber follows */
-} XLogRecordBlockHeader;
-
-#define SizeOfXLogRecordBlockHeader (offsetof(XLogRecordBlockHeader, data_length) + sizeof(uint16))
-
-/*
- * Additional header information when a full-page image is included
- * (i.e. when BKPBLOCK_HAS_IMAGE is set).
- *
- * The XLOG code is aware that PG data pages usually contain an unused "hole"
- * in the middle, which contains only zero bytes.  Since we know that the
- * "hole" is all zeros, we remove it from the stored data (and it's not counted
- * in the XLOG record's CRC, either).  Hence, the amount of block data actually
- * present is (BLCKSZ - <length of "hole" bytes>).
- *
- * Additionally, when wal_compression is enabled, we will try to compress full
- * page images using one of the supported algorithms, after removing the
- * "hole". This can reduce the WAL volume, but at some extra cost of CPU spent
- * on the compression during WAL logging. In this case, since the "hole"
- * length cannot be calculated by subtracting the number of page image bytes
- * from BLCKSZ, basically it needs to be stored as an extra information.
- * But when no "hole" exists, we can assume that the "hole" length is zero
- * and no such an extra information needs to be stored. Note that
- * the original version of page image is stored in WAL instead of the
- * compressed one if the number of bytes saved by compression is less than
- * the length of extra information. Hence, when a page image is successfully
- * compressed, the amount of block data actually present is less than
- * BLCKSZ - the length of "hole" bytes - the length of extra information.
- */
-typedef struct XLogRecordBlockImageHeader
-{
-	uint16		length;			/* number of page image bytes */
-	uint16		hole_offset;	/* number of bytes before "hole" */
-	uint8		bimg_info;		/* flag bits, see below */
-
-	/*
-	 * If BKPIMAGE_HAS_HOLE and BKPIMAGE_COMPRESSED(), an
-	 * XLogRecordBlockCompressHeader struct follows.
-	 */
-} XLogRecordBlockImageHeader;
-
-#define SizeOfXLogRecordBlockImageHeader	\
-	(offsetof(XLogRecordBlockImageHeader, bimg_info) + sizeof(uint8))
-
-/* Information stored in bimg_info */
-#define BKPIMAGE_HAS_HOLE		0x01	/* page image has "hole" */
-#define BKPIMAGE_APPLY			0x02	/* page image should be restored
-										 * during replay */
-/* compression methods supported */
-#define BKPIMAGE_COMPRESS_PGLZ	0x04
-#define BKPIMAGE_COMPRESS_LZ4	0x08
-#define BKPIMAGE_COMPRESS_ZSTD	0x10
-
-#define	BKPIMAGE_COMPRESSED(info) \
-	((info & (BKPIMAGE_COMPRESS_PGLZ | BKPIMAGE_COMPRESS_LZ4 | \
-			  BKPIMAGE_COMPRESS_ZSTD)) != 0)
-
-/*
- * Extra header information used when page image has "hole" and
- * is compressed.
- */
-typedef struct XLogRecordBlockCompressHeader
-{
-	uint16		hole_length;	/* number of bytes in "hole" */
-} XLogRecordBlockCompressHeader;
-
-#define SizeOfXLogRecordBlockCompressHeader \
-	sizeof(XLogRecordBlockCompressHeader)
-
-/*
- * Maximum size of the header for a block reference. This is used to size a
- * temporary buffer for constructing the header.
- */
-#define MaxSizeOfXLogRecordBlockHeader \
-	(SizeOfXLogRecordBlockHeader + \
-	 SizeOfXLogRecordBlockImageHeader + \
-	 SizeOfXLogRecordBlockCompressHeader + \
-	 sizeof(RelFileLocator) + \
-	 sizeof(BlockNumber))
-
-/*
- * The fork number fits in the lower 4 bits in the fork_flags field. The upper
- * bits are used for flags.
- */
-#define BKPBLOCK_FORK_MASK	0x0F
-#define BKPBLOCK_FLAG_MASK	0xF0
-#define BKPBLOCK_HAS_IMAGE	0x10	/* block data is an XLogRecordBlockImage */
-#define BKPBLOCK_HAS_DATA	0x20
-#define BKPBLOCK_WILL_INIT	0x40	/* redo will re-init the page */
-#define BKPBLOCK_SAME_REL	0x80	/* RelFileLocator omitted, same as
-									 * previous */
-
-/*
- * XLogRecordDataHeaderShort/Long are used for the "main data" portion of
- * the record. If the length of the data is less than 256 bytes, the short
- * form is used, with a single byte to hold the length. Otherwise the long
- * form is used.
- *
- * (These structs are currently not used in the code, they are here just for
- * documentation purposes).
- */
-typedef struct XLogRecordDataHeaderShort
-{
-	uint8		id;				/* XLR_BLOCK_ID_DATA_SHORT */
-	uint8		data_length;	/* number of payload bytes */
-}			XLogRecordDataHeaderShort;
-
-#define SizeOfXLogRecordDataHeaderShort (sizeof(uint8) * 2)
-
-typedef struct XLogRecordDataHeaderLong
-{
-	uint8		id;				/* XLR_BLOCK_ID_DATA_LONG */
-	/* followed by uint32 data_length, unaligned */
-}			XLogRecordDataHeaderLong;
-
-#define SizeOfXLogRecordDataHeaderLong (sizeof(uint8) + sizeof(uint32))
-
-/*
- * Block IDs used to distinguish different kinds of record fragments. Block
- * references are numbered from 0 to XLR_MAX_BLOCK_ID. A rmgr is free to use
- * any ID number in that range (although you should stick to small numbers,
- * because the WAL machinery is optimized for that case). A few ID
- * numbers are reserved to denote the "main" data portion of the record,
- * as well as replication-supporting transaction metadata.
- *
- * The maximum is currently set at 32, quite arbitrarily. Most records only
- * need a handful of block references, but there are a few exceptions that
- * need more.
- */
-#define XLR_MAX_BLOCK_ID			32
-
-#define XLR_BLOCK_ID_DATA_SHORT		255
-#define XLR_BLOCK_ID_DATA_LONG		254
-#define XLR_BLOCK_ID_ORIGIN			253
-#define XLR_BLOCK_ID_TOPLEVEL_XID	252
-
-#endif							/* XLOGRECORD_H */
diff --git a/contrib/libs/libpq/src/include/c.h b/contrib/libs/libpq/src/include/c.h
deleted file mode 100644
index ab459d646e..0000000000
--- a/contrib/libs/libpq/src/include/c.h
+++ /dev/null
@@ -1,1383 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * c.h
- *	  Fundamental C definitions.  This is included by every .c file in
- *	  PostgreSQL (via either postgres.h or postgres_fe.h, as appropriate).
- *
- *	  Note that the definitions here are not intended to be exposed to clients
- *	  of the frontend interface libraries --- so we don't worry much about
- *	  polluting the namespace with lots of stuff...
- *
- *
- * Portions Copyright (c) 1996-2023, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- * src/include/c.h
- *
- *-------------------------------------------------------------------------
- */
-/*
- *----------------------------------------------------------------
- *	 TABLE OF CONTENTS
- *
- *		When adding stuff to this file, please try to put stuff
- *		into the relevant section, or add new sections as appropriate.
- *
- *	  section	description
- *	  -------	------------------------------------------------
- *		0)		pg_config.h and standard system headers
- *		1)		compiler characteristics
- *		2)		bool, true, false
- *		3)		standard system types
- *		4)		IsValid macros for system types
- *		5)		lengthof, alignment
- *		6)		assertions
- *		7)		widely useful macros
- *		8)		random stuff
- *		9)		system-specific hacks
- *
- * NOTE: since this file is included by both frontend and backend modules,
- * it's usually wrong to put an "extern" declaration here, unless it's
- * ifdef'd so that it's seen in only one case or the other.
- * typedefs and macros are the kind of thing that might go here.
- *
- *----------------------------------------------------------------
- */
-#ifndef C_H
-#define C_H
-
-#include "postgres_ext.h"
-
-/* Must undef pg_config_ext.h symbols before including pg_config.h */
-#undef PG_INT64_TYPE
-
-#include "pg_config.h"
-#include "pg_config_manual.h"	/* must be after pg_config.h */
-#include "pg_config_os.h"		/* must be before any system header files */
-
-/* System header files that should be available everywhere in Postgres */
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <stddef.h>
-#include <stdarg.h>
-#ifdef HAVE_STRINGS_H
-#include <strings.h>
-#endif
-#include <stdint.h>
-#include <sys/types.h>
-#include <errno.h>
-#if defined(WIN32) || defined(__CYGWIN__)
-#include <fcntl.h>				/* ensure O_BINARY is available */
-#endif
-#include <locale.h>
-#ifdef ENABLE_NLS
-#include <libintl.h>
-#endif
-
-
-/* ----------------------------------------------------------------
- *				Section 1: compiler characteristics
- *
- * type prefixes (const, signed, volatile, inline) are handled in pg_config.h.
- * ----------------------------------------------------------------
- */
-
-/*
- * Disable "inline" if PG_FORCE_DISABLE_INLINE is defined.
- * This is used to work around compiler bugs and might also be useful for
- * investigatory purposes.
- */
-#ifdef PG_FORCE_DISABLE_INLINE
-#undef inline
-#define inline
-#endif
-
-/*
- * Attribute macros
- *
- * GCC: https://gcc.gnu.org/onlinedocs/gcc/Function-Attributes.html
- * GCC: https://gcc.gnu.org/onlinedocs/gcc/Type-Attributes.html
- * Clang: https://clang.llvm.org/docs/AttributeReference.html
- * Sunpro: https://docs.oracle.com/cd/E18659_01/html/821-1384/gjzke.html
- * XLC: https://www.ibm.com/support/knowledgecenter/SSGH2K_13.1.2/com.ibm.xlc131.aix.doc/language_ref/function_attributes.html
- * XLC: https://www.ibm.com/support/knowledgecenter/SSGH2K_13.1.2/com.ibm.xlc131.aix.doc/language_ref/type_attrib.html
- */
-
-/*
- * For compilers which don't support __has_attribute, we just define
- * __has_attribute(x) to 0 so that we can define macros for various
- * __attribute__s more easily below.
- */
-#ifndef __has_attribute
-#define __has_attribute(attribute) 0
-#endif
-
-/* only GCC supports the unused attribute */
-#ifdef __GNUC__
-#define pg_attribute_unused() __attribute__((unused))
-#else
-#define pg_attribute_unused()
-#endif
-
-/*
- * pg_nodiscard means the compiler should warn if the result of a function
- * call is ignored.  The name "nodiscard" is chosen in alignment with
- * (possibly future) C and C++ standards.  For maximum compatibility, use it
- * as a function declaration specifier, so it goes before the return type.
- */
-#ifdef __GNUC__
-#define pg_nodiscard __attribute__((warn_unused_result))
-#else
-#define pg_nodiscard
-#endif
-
-/*
- * Place this macro before functions that should be allowed to make misaligned
- * accesses.  Think twice before using it on non-x86-specific code!
- * Testing can be done with "-fsanitize=alignment -fsanitize-trap=alignment"
- * on clang, or "-fsanitize=alignment -fno-sanitize-recover=alignment" on gcc.
- */
-#if __clang_major__ >= 7 || __GNUC__ >= 8
-#define pg_attribute_no_sanitize_alignment() __attribute__((no_sanitize("alignment")))
-#else
-#define pg_attribute_no_sanitize_alignment()
-#endif
-
-/*
- * pg_attribute_nonnull means the compiler should warn if the function is
- * called with the listed arguments set to NULL.  If no arguments are
- * listed, the compiler should warn if any pointer arguments are set to NULL.
- */
-#if __has_attribute (nonnull)
-#define pg_attribute_nonnull(...) __attribute__((nonnull(__VA_ARGS__)))
-#else
-#define pg_attribute_nonnull(...)
-#endif
-
-/*
- * Append PG_USED_FOR_ASSERTS_ONLY to definitions of variables that are only
- * used in assert-enabled builds, to avoid compiler warnings about unused
- * variables in assert-disabled builds.
- */
-#ifdef USE_ASSERT_CHECKING
-#define PG_USED_FOR_ASSERTS_ONLY
-#else
-#define PG_USED_FOR_ASSERTS_ONLY pg_attribute_unused()
-#endif
-
-/* GCC and XLC support format attributes */
-#if defined(__GNUC__) || defined(__IBMC__)
-#define pg_attribute_format_arg(a) __attribute__((format_arg(a)))
-#define pg_attribute_printf(f,a) __attribute__((format(PG_PRINTF_ATTRIBUTE, f, a)))
-#else
-#define pg_attribute_format_arg(a)
-#define pg_attribute_printf(f,a)
-#endif
-
-/* GCC, Sunpro and XLC support aligned, packed and noreturn */
-#if defined(__GNUC__) || defined(__SUNPRO_C) || defined(__IBMC__)
-#define pg_attribute_aligned(a) __attribute__((aligned(a)))
-#define pg_attribute_noreturn() __attribute__((noreturn))
-#define pg_attribute_packed() __attribute__((packed))
-#define HAVE_PG_ATTRIBUTE_NORETURN 1
-#elif defined(_MSC_VER)
-/*
- * MSVC supports aligned.  noreturn is also possible but in MSVC it is
- * declared before the definition while pg_attribute_noreturn() macro
- * is currently used after the definition.
- *
- * Packing is also possible but only by wrapping the entire struct definition
- * which doesn't fit into our current macro declarations.
- */
-#define pg_attribute_aligned(a) __declspec(align(a))
-#define pg_attribute_noreturn()
-#else
-/*
- * NB: aligned and packed are not given default definitions because they
- * affect code functionality; they *must* be implemented by the compiler
- * if they are to be used.
- */
-#define pg_attribute_noreturn()
-#endif
-
-/*
- * Use "pg_attribute_always_inline" in place of "inline" for functions that
- * we wish to force inlining of, even when the compiler's heuristics would
- * choose not to.  But, if possible, don't force inlining in unoptimized
- * debug builds.
- */
-#if (defined(__GNUC__) && __GNUC__ > 3 && defined(__OPTIMIZE__)) || defined(__SUNPRO_C) || defined(__IBMC__)
-/* GCC > 3, Sunpro and XLC support always_inline via __attribute__ */
-#define pg_attribute_always_inline __attribute__((always_inline)) inline
-#elif defined(_MSC_VER)
-/* MSVC has a special keyword for this */
-#define pg_attribute_always_inline __forceinline
-#else
-/* Otherwise, the best we can do is to say "inline" */
-#define pg_attribute_always_inline inline
-#endif
-
-/*
- * Forcing a function not to be inlined can be useful if it's the slow path of
- * a performance-critical function, or should be visible in profiles to allow
- * for proper cost attribution.  Note that unlike the pg_attribute_XXX macros
- * above, this should be placed before the function's return type and name.
- */
-/* GCC, Sunpro and XLC support noinline via __attribute__ */
-#if (defined(__GNUC__) && __GNUC__ > 2) || defined(__SUNPRO_C) || defined(__IBMC__)
-#define pg_noinline __attribute__((noinline))
-/* msvc via declspec */
-#elif defined(_MSC_VER)
-#define pg_noinline __declspec(noinline)
-#else
-#define pg_noinline
-#endif
-
-/*
- * For now, just define pg_attribute_cold and pg_attribute_hot to be empty
- * macros on minGW 8.1.  There appears to be a compiler bug that results in
- * compilation failure.  At this time, we still have at least one buildfarm
- * animal running that compiler, so this should make that green again. It's
- * likely this compiler is not popular enough to warrant keeping this code
- * around forever, so let's just remove it once the last buildfarm animal
- * upgrades.
- */
-#if defined(__MINGW64__) && __GNUC__ == 8 && __GNUC_MINOR__ == 1
-
-#define pg_attribute_cold
-#define pg_attribute_hot
-
-#else
-/*
- * Marking certain functions as "hot" or "cold" can be useful to assist the
- * compiler in arranging the assembly code in a more efficient way.
- */
-#if __has_attribute (cold)
-#define pg_attribute_cold __attribute__((cold))
-#else
-#define pg_attribute_cold
-#endif
-
-#if __has_attribute (hot)
-#define pg_attribute_hot __attribute__((hot))
-#else
-#define pg_attribute_hot
-#endif
-
-#endif							/* defined(__MINGW64__) && __GNUC__ == 8 &&
-								 * __GNUC_MINOR__ == 1 */
-/*
- * Mark a point as unreachable in a portable fashion.  This should preferably
- * be something that the compiler understands, to aid code generation.
- * In assert-enabled builds, we prefer abort() for debugging reasons.
- */
-#if defined(HAVE__BUILTIN_UNREACHABLE) && !defined(USE_ASSERT_CHECKING)
-#define pg_unreachable() __builtin_unreachable()
-#elif defined(_MSC_VER) && !defined(USE_ASSERT_CHECKING)
-#define pg_unreachable() __assume(0)
-#else
-#define pg_unreachable() abort()
-#endif
-
-/*
- * Hints to the compiler about the likelihood of a branch. Both likely() and
- * unlikely() return the boolean value of the contained expression.
- *
- * These should only be used sparingly, in very hot code paths. It's very easy
- * to mis-estimate likelihoods.
- */
-#if __GNUC__ >= 3
-#define likely(x)	__builtin_expect((x) != 0, 1)
-#define unlikely(x) __builtin_expect((x) != 0, 0)
-#else
-#define likely(x)	((x) != 0)
-#define unlikely(x) ((x) != 0)
-#endif
-
-/*
- * CppAsString
- *		Convert the argument to a string, using the C preprocessor.
- * CppAsString2
- *		Convert the argument to a string, after one round of macro expansion.
- * CppConcat
- *		Concatenate two arguments together, using the C preprocessor.
- *
- * Note: There used to be support here for pre-ANSI C compilers that didn't
- * support # and ##.  Nowadays, these macros are just for clarity and/or
- * backward compatibility with existing PostgreSQL code.
- */
-#define CppAsString(identifier) #identifier
-#define CppAsString2(x)			CppAsString(x)
-#define CppConcat(x, y)			x##y
-
-/*
- * VA_ARGS_NARGS
- *		Returns the number of macro arguments it is passed.
- *
- * An empty argument still counts as an argument, so effectively, this is
- * "one more than the number of commas in the argument list".
- *
- * This works for up to 63 arguments.  Internally, VA_ARGS_NARGS_() is passed
- * 64+N arguments, and the C99 standard only requires macros to allow up to
- * 127 arguments, so we can't portably go higher.  The implementation is
- * pretty trivial: VA_ARGS_NARGS_() returns its 64th argument, and we set up
- * the call so that that is the appropriate one of the list of constants.
- * This idea is due to Laurent Deniau.
- *
- * MSVC has an implementation of __VA_ARGS__ that doesn't conform to the
- * standard unless you use the /Zc:preprocessor compiler flag, but that
- * isn't available before Visual Studio 2019.  For now, use a different
- * definition that also works on older compilers.
- */
-#ifdef _MSC_VER
-#define EXPAND(args) args
-#define VA_ARGS_NARGS(...) \
-	VA_ARGS_NARGS_ EXPAND((__VA_ARGS__, \
-				   63,62,61,60,                   \
-				   59,58,57,56,55,54,53,52,51,50, \
-				   49,48,47,46,45,44,43,42,41,40, \
-				   39,38,37,36,35,34,33,32,31,30, \
-				   29,28,27,26,25,24,23,22,21,20, \
-				   19,18,17,16,15,14,13,12,11,10, \
-				   9, 8, 7, 6, 5, 4, 3, 2, 1, 0))
-#else
-
-#define VA_ARGS_NARGS(...) \
-	VA_ARGS_NARGS_(__VA_ARGS__, \
-				   63,62,61,60,                   \
-				   59,58,57,56,55,54,53,52,51,50, \
-				   49,48,47,46,45,44,43,42,41,40, \
-				   39,38,37,36,35,34,33,32,31,30, \
-				   29,28,27,26,25,24,23,22,21,20, \
-				   19,18,17,16,15,14,13,12,11,10, \
-				   9, 8, 7, 6, 5, 4, 3, 2, 1, 0)
-#endif
-
-#define VA_ARGS_NARGS_( \
-	_01,_02,_03,_04,_05,_06,_07,_08,_09,_10, \
-	_11,_12,_13,_14,_15,_16,_17,_18,_19,_20, \
-	_21,_22,_23,_24,_25,_26,_27,_28,_29,_30, \
-	_31,_32,_33,_34,_35,_36,_37,_38,_39,_40, \
-	_41,_42,_43,_44,_45,_46,_47,_48,_49,_50, \
-	_51,_52,_53,_54,_55,_56,_57,_58,_59,_60, \
-	_61,_62,_63,  N, ...) \
-	(N)
-
-/*
- * Generic function pointer.  This can be used in the rare cases where it's
- * necessary to cast a function pointer to a seemingly incompatible function
- * pointer type while avoiding gcc's -Wcast-function-type warnings.
- */
-typedef void (*pg_funcptr_t) (void);
-
-/*
- * We require C99, hence the compiler should understand flexible array
- * members.  However, for documentation purposes we still consider it to be
- * project style to write "field[FLEXIBLE_ARRAY_MEMBER]" not just "field[]".
- * When computing the size of such an object, use "offsetof(struct s, f)"
- * for portability.  Don't use "offsetof(struct s, f[0])", as this doesn't
- * work with MSVC and with C++ compilers.
- */
-#define FLEXIBLE_ARRAY_MEMBER	/* empty */
-
-/*
- * Does the compiler support #pragma GCC system_header? We optionally use it
- * to avoid warnings that we can't fix (e.g. in the perl headers).
- * See https://gcc.gnu.org/onlinedocs/cpp/System-Headers.html
- *
- * Headers for which we do not want to show compiler warnings can,
- * conditionally, use #pragma GCC system_header to avoid warnings. Obviously
- * this should only be used for external headers over which we do not have
- * control.
- *
- * Support for the pragma is tested here, instead of during configure, as gcc
- * also warns about the pragma being used in a .c file. It's surprisingly hard
- * to get autoconf to use .h as the file-ending. Looks like gcc has
- * implemented the pragma since the 2000, so this test should suffice.
- *
- *
- * Alternatively, we could add the include paths for problematic headers with
- * -isystem, but that is a larger hammer and is harder to search for.
- *
- * A more granular alternative would be to use #pragma GCC diagnostic
- * push/ignored/pop, but gcc warns about unknown warnings being ignored, so
- * every to-be-ignored-temporarily compiler warning would require its own
- * pg_config.h symbol and #ifdef.
- */
-#ifdef __GNUC__
-#define HAVE_PRAGMA_GCC_SYSTEM_HEADER	1
-#endif
-
-
-/* ----------------------------------------------------------------
- *				Section 2:	bool, true, false
- * ----------------------------------------------------------------
- */
-
-/*
- * bool
- *		Boolean value, either true or false.
- *
- * We use stdbool.h if available and its bool has size 1.  That's useful for
- * better compiler and debugger output and for compatibility with third-party
- * libraries.  But PostgreSQL currently cannot deal with bool of other sizes;
- * there are static assertions around the code to prevent that.
- *
- * For C++ compilers, we assume the compiler has a compatible built-in
- * definition of bool.
- *
- * See also the version of this code in src/interfaces/ecpg/include/ecpglib.h.
- */
-
-#ifndef __cplusplus
-
-#ifdef PG_USE_STDBOOL
-#include <stdbool.h>
-#else
-
-#ifndef bool
-typedef unsigned char bool;
-#endif
-
-#ifndef true
-#define true	((bool) 1)
-#endif
-
-#ifndef false
-#define false	((bool) 0)
-#endif
-
-#endif							/* not PG_USE_STDBOOL */
-#endif							/* not C++ */
-
-
-/* ----------------------------------------------------------------
- *				Section 3:	standard system types
- * ----------------------------------------------------------------
- */
-
-/*
- * Pointer
- *		Variable holding address of any memory resident object.
- *
- *		XXX Pointer arithmetic is done with this, so it can't be void *
- *		under "true" ANSI compilers.
- */
-typedef char *Pointer;
-
-/*
- * intN
- *		Signed integer, EXACTLY N BITS IN SIZE,
- *		used for numerical computations and the
- *		frontend/backend protocol.
- */
-#ifndef HAVE_INT8
-typedef signed char int8;		/* == 8 bits */
-typedef signed short int16;		/* == 16 bits */
-typedef signed int int32;		/* == 32 bits */
-#endif							/* not HAVE_INT8 */
-
-/*
- * uintN
- *		Unsigned integer, EXACTLY N BITS IN SIZE,
- *		used for numerical computations and the
- *		frontend/backend protocol.
- */
-#ifndef HAVE_UINT8
-typedef unsigned char uint8;	/* == 8 bits */
-typedef unsigned short uint16;	/* == 16 bits */
-typedef unsigned int uint32;	/* == 32 bits */
-#endif							/* not HAVE_UINT8 */
-
-/*
- * bitsN
- *		Unit of bitwise operation, AT LEAST N BITS IN SIZE.
- */
-typedef uint8 bits8;			/* >= 8 bits */
-typedef uint16 bits16;			/* >= 16 bits */
-typedef uint32 bits32;			/* >= 32 bits */
-
-/*
- * 64-bit integers
- */
-#ifdef HAVE_LONG_INT_64
-/* Plain "long int" fits, use it */
-
-#ifndef HAVE_INT64
-typedef long int int64;
-#endif
-#ifndef HAVE_UINT64
-typedef unsigned long int uint64;
-#endif
-#define INT64CONST(x)  (x##L)
-#define UINT64CONST(x) (x##UL)
-#elif defined(HAVE_LONG_LONG_INT_64)
-/* We have working support for "long long int", use that */
-
-#ifndef HAVE_INT64
-typedef long long int int64;
-#endif
-#ifndef HAVE_UINT64
-typedef unsigned long long int uint64;
-#endif
-#define INT64CONST(x)  (x##LL)
-#define UINT64CONST(x) (x##ULL)
-#else
-/* neither HAVE_LONG_INT_64 nor HAVE_LONG_LONG_INT_64 */
-#error must have a working 64-bit integer datatype
-#endif
-
-/* snprintf format strings to use for 64-bit integers */
-#define INT64_FORMAT "%" INT64_MODIFIER "d"
-#define UINT64_FORMAT "%" INT64_MODIFIER "u"
-
-/*
- * 128-bit signed and unsigned integers
- *		There currently is only limited support for such types.
- *		E.g. 128bit literals and snprintf are not supported; but math is.
- *		Also, because we exclude such types when choosing MAXIMUM_ALIGNOF,
- *		it must be possible to coerce the compiler to allocate them on no
- *		more than MAXALIGN boundaries.
- */
-#if defined(PG_INT128_TYPE)
-#if defined(pg_attribute_aligned) || ALIGNOF_PG_INT128_TYPE <= MAXIMUM_ALIGNOF
-#define HAVE_INT128 1
-
-typedef PG_INT128_TYPE int128
-#if defined(pg_attribute_aligned)
-			pg_attribute_aligned(MAXIMUM_ALIGNOF)
-#endif
-		   ;
-
-typedef unsigned PG_INT128_TYPE uint128
-#if defined(pg_attribute_aligned)
-			pg_attribute_aligned(MAXIMUM_ALIGNOF)
-#endif
-		   ;
-
-#endif
-#endif
-
-/*
- * stdint.h limits aren't guaranteed to have compatible types with our fixed
- * width types. So just define our own.
- */
-#define PG_INT8_MIN		(-0x7F-1)
-#define PG_INT8_MAX		(0x7F)
-#define PG_UINT8_MAX	(0xFF)
-#define PG_INT16_MIN	(-0x7FFF-1)
-#define PG_INT16_MAX	(0x7FFF)
-#define PG_UINT16_MAX	(0xFFFF)
-#define PG_INT32_MIN	(-0x7FFFFFFF-1)
-#define PG_INT32_MAX	(0x7FFFFFFF)
-#define PG_UINT32_MAX	(0xFFFFFFFFU)
-#define PG_INT64_MIN	(-INT64CONST(0x7FFFFFFFFFFFFFFF) - 1)
-#define PG_INT64_MAX	INT64CONST(0x7FFFFFFFFFFFFFFF)
-#define PG_UINT64_MAX	UINT64CONST(0xFFFFFFFFFFFFFFFF)
-
-/*
- * We now always use int64 timestamps, but keep this symbol defined for the
- * benefit of external code that might test it.
- */
-#define HAVE_INT64_TIMESTAMP
-
-/*
- * Size
- *		Size of any memory resident object, as returned by sizeof.
- */
-typedef size_t Size;
-
-/*
- * Index
- *		Index into any memory resident array.
- *
- * Note:
- *		Indices are non negative.
- */
-typedef unsigned int Index;
-
-/*
- * Offset
- *		Offset into any memory resident array.
- *
- * Note:
- *		This differs from an Index in that an Index is always
- *		non negative, whereas Offset may be negative.
- */
-typedef signed int Offset;
-
-/*
- * Common Postgres datatype names (as used in the catalogs)
- */
-typedef float float4;
-typedef double float8;
-
-#ifdef USE_FLOAT8_BYVAL
-#define FLOAT8PASSBYVAL true
-#else
-#define FLOAT8PASSBYVAL false
-#endif
-
-/*
- * Oid, RegProcedure, TransactionId, SubTransactionId, MultiXactId,
- * CommandId
- */
-
-/* typedef Oid is in postgres_ext.h */
-
-/*
- * regproc is the type name used in the include/catalog headers, but
- * RegProcedure is the preferred name in C code.
- */
-typedef Oid regproc;
-typedef regproc RegProcedure;
-
-typedef uint32 TransactionId;
-
-typedef uint32 LocalTransactionId;
-
-typedef uint32 SubTransactionId;
-
-#define InvalidSubTransactionId		((SubTransactionId) 0)
-#define TopSubTransactionId			((SubTransactionId) 1)
-
-/* MultiXactId must be equivalent to TransactionId, to fit in t_xmax */
-typedef TransactionId MultiXactId;
-
-typedef uint32 MultiXactOffset;
-
-typedef uint32 CommandId;
-
-#define FirstCommandId	((CommandId) 0)
-#define InvalidCommandId	(~(CommandId)0)
-
-
-/* ----------------
- *		Variable-length datatypes all share the 'struct varlena' header.
- *
- * NOTE: for TOASTable types, this is an oversimplification, since the value
- * may be compressed or moved out-of-line.  However datatype-specific routines
- * are mostly content to deal with de-TOASTed values only, and of course
- * client-side routines should never see a TOASTed value.  But even in a
- * de-TOASTed value, beware of touching vl_len_ directly, as its
- * representation is no longer convenient.  It's recommended that code always
- * use macros VARDATA_ANY, VARSIZE_ANY, VARSIZE_ANY_EXHDR, VARDATA, VARSIZE,
- * and SET_VARSIZE instead of relying on direct mentions of the struct fields.
- * See postgres.h for details of the TOASTed form.
- * ----------------
- */
-struct varlena
-{
-	char		vl_len_[4];		/* Do not touch this field directly! */
-	char		vl_dat[FLEXIBLE_ARRAY_MEMBER];	/* Data content is here */
-};
-
-#define VARHDRSZ		((int32) sizeof(int32))
-
-/*
- * These widely-used datatypes are just a varlena header and the data bytes.
- * There is no terminating null or anything like that --- the data length is
- * always VARSIZE_ANY_EXHDR(ptr).
- */
-typedef struct varlena bytea;
-typedef struct varlena text;
-typedef struct varlena BpChar;	/* blank-padded char, ie SQL char(n) */
-typedef struct varlena VarChar; /* var-length char, ie SQL varchar(n) */
-
-/*
- * Specialized array types.  These are physically laid out just the same
- * as regular arrays (so that the regular array subscripting code works
- * with them).  They exist as distinct types mostly for historical reasons:
- * they have nonstandard I/O behavior which we don't want to change for fear
- * of breaking applications that look at the system catalogs.  There is also
- * an implementation issue for oidvector: it's part of the primary key for
- * pg_proc, and we can't use the normal btree array support routines for that
- * without circularity.
- */
-typedef struct
-{
-	int32		vl_len_;		/* these fields must match ArrayType! */
-	int			ndim;			/* always 1 for int2vector */
-	int32		dataoffset;		/* always 0 for int2vector */
-	Oid			elemtype;
-	int			dim1;
-	int			lbound1;
-	int16		values[FLEXIBLE_ARRAY_MEMBER];
-} int2vector;
-
-typedef struct
-{
-	int32		vl_len_;		/* these fields must match ArrayType! */
-	int			ndim;			/* always 1 for oidvector */
-	int32		dataoffset;		/* always 0 for oidvector */
-	Oid			elemtype;
-	int			dim1;
-	int			lbound1;
-	Oid			values[FLEXIBLE_ARRAY_MEMBER];
-} oidvector;
-
-/*
- * Representation of a Name: effectively just a C string, but null-padded to
- * exactly NAMEDATALEN bytes.  The use of a struct is historical.
- */
-typedef struct nameData
-{
-	char		data[NAMEDATALEN];
-} NameData;
-typedef NameData *Name;
-
-#define NameStr(name)	((name).data)
-
-
-/* ----------------------------------------------------------------
- *				Section 4:	IsValid macros for system types
- * ----------------------------------------------------------------
- */
-/*
- * BoolIsValid
- *		True iff bool is valid.
- */
-#define BoolIsValid(boolean)	((boolean) == false || (boolean) == true)
-
-/*
- * PointerIsValid
- *		True iff pointer is valid.
- */
-#define PointerIsValid(pointer) ((const void*)(pointer) != NULL)
-
-/*
- * PointerIsAligned
- *		True iff pointer is properly aligned to point to the given type.
- */
-#define PointerIsAligned(pointer, type) \
-		(((uintptr_t)(pointer) % (sizeof (type))) == 0)
-
-#define OffsetToPointer(base, offset) \
-		((void *)((char *) base + offset))
-
-#define OidIsValid(objectId)  ((bool) ((objectId) != InvalidOid))
-
-#define RegProcedureIsValid(p)	OidIsValid(p)
-
-
-/* ----------------------------------------------------------------
- *				Section 5:	lengthof, alignment
- * ----------------------------------------------------------------
- */
-/*
- * lengthof
- *		Number of elements in an array.
- */
-#define lengthof(array) (sizeof (array) / sizeof ((array)[0]))
-
-/* ----------------
- * Alignment macros: align a length or address appropriately for a given type.
- * The fooALIGN() macros round up to a multiple of the required alignment,
- * while the fooALIGN_DOWN() macros round down.  The latter are more useful
- * for problems like "how many X-sized structures will fit in a page?".
- *
- * NOTE: TYPEALIGN[_DOWN] will not work if ALIGNVAL is not a power of 2.
- * That case seems extremely unlikely to be needed in practice, however.
- *
- * NOTE: MAXIMUM_ALIGNOF, and hence MAXALIGN(), intentionally exclude any
- * larger-than-8-byte types the compiler might have.
- * ----------------
- */
-
-#define TYPEALIGN(ALIGNVAL,LEN)  \
-	(((uintptr_t) (LEN) + ((ALIGNVAL) - 1)) & ~((uintptr_t) ((ALIGNVAL) - 1)))
-
-#define SHORTALIGN(LEN)			TYPEALIGN(ALIGNOF_SHORT, (LEN))
-#define INTALIGN(LEN)			TYPEALIGN(ALIGNOF_INT, (LEN))
-#define LONGALIGN(LEN)			TYPEALIGN(ALIGNOF_LONG, (LEN))
-#define DOUBLEALIGN(LEN)		TYPEALIGN(ALIGNOF_DOUBLE, (LEN))
-#define MAXALIGN(LEN)			TYPEALIGN(MAXIMUM_ALIGNOF, (LEN))
-/* MAXALIGN covers only built-in types, not buffers */
-#define BUFFERALIGN(LEN)		TYPEALIGN(ALIGNOF_BUFFER, (LEN))
-#define CACHELINEALIGN(LEN)		TYPEALIGN(PG_CACHE_LINE_SIZE, (LEN))
-
-#define TYPEALIGN_DOWN(ALIGNVAL,LEN)  \
-	(((uintptr_t) (LEN)) & ~((uintptr_t) ((ALIGNVAL) - 1)))
-
-#define SHORTALIGN_DOWN(LEN)	TYPEALIGN_DOWN(ALIGNOF_SHORT, (LEN))
-#define INTALIGN_DOWN(LEN)		TYPEALIGN_DOWN(ALIGNOF_INT, (LEN))
-#define LONGALIGN_DOWN(LEN)		TYPEALIGN_DOWN(ALIGNOF_LONG, (LEN))
-#define DOUBLEALIGN_DOWN(LEN)	TYPEALIGN_DOWN(ALIGNOF_DOUBLE, (LEN))
-#define MAXALIGN_DOWN(LEN)		TYPEALIGN_DOWN(MAXIMUM_ALIGNOF, (LEN))
-#define BUFFERALIGN_DOWN(LEN)	TYPEALIGN_DOWN(ALIGNOF_BUFFER, (LEN))
-
-/*
- * The above macros will not work with types wider than uintptr_t, like with
- * uint64 on 32-bit platforms.  That's not problem for the usual use where a
- * pointer or a length is aligned, but for the odd case that you need to
- * align something (potentially) wider, use TYPEALIGN64.
- */
-#define TYPEALIGN64(ALIGNVAL,LEN)  \
-	(((uint64) (LEN) + ((ALIGNVAL) - 1)) & ~((uint64) ((ALIGNVAL) - 1)))
-
-/* we don't currently need wider versions of the other ALIGN macros */
-#define MAXALIGN64(LEN)			TYPEALIGN64(MAXIMUM_ALIGNOF, (LEN))
-
-
-/* ----------------------------------------------------------------
- *				Section 6:	assertions
- * ----------------------------------------------------------------
- */
-
-/*
- * USE_ASSERT_CHECKING, if defined, turns on all the assertions.
- * - plai  9/5/90
- *
- * It should _NOT_ be defined in releases or in benchmark copies
- */
-
-/*
- * Assert() can be used in both frontend and backend code. In frontend code it
- * just calls the standard assert, if it's available. If use of assertions is
- * not configured, it does nothing.
- */
-#ifndef USE_ASSERT_CHECKING
-
-#define Assert(condition)	((void)true)
-#define AssertMacro(condition)	((void)true)
-
-#elif defined(FRONTEND)
-
-#include <assert.h>
-#define Assert(p) assert(p)
-#define AssertMacro(p)	((void) assert(p))
-
-#else							/* USE_ASSERT_CHECKING && !FRONTEND */
-
-/*
- * Assert
- *		Generates a fatal exception if the given condition is false.
- */
-#define Assert(condition) \
-	do { \
-		if (!(condition)) \
-			ExceptionalCondition(#condition, __FILE__, __LINE__); \
-	} while (0)
-
-/*
- * AssertMacro is the same as Assert but it's suitable for use in
- * expression-like macros, for example:
- *
- *		#define foo(x) (AssertMacro(x != 0), bar(x))
- */
-#define AssertMacro(condition) \
-	((void) ((condition) || \
-			 (ExceptionalCondition(#condition, __FILE__, __LINE__), 0)))
-
-#endif							/* USE_ASSERT_CHECKING && !FRONTEND */
-
-/*
- * Check that `ptr' is `bndr' aligned.
- */
-#define AssertPointerAlignment(ptr, bndr) \
-	Assert(TYPEALIGN(bndr, (uintptr_t)(ptr)) == (uintptr_t)(ptr))
-
-/*
- * ExceptionalCondition is compiled into the backend whether or not
- * USE_ASSERT_CHECKING is defined, so as to support use of extensions
- * that are built with that #define with a backend that isn't.  Hence,
- * we should declare it as long as !FRONTEND.
- */
-#ifndef FRONTEND
-extern void ExceptionalCondition(const char *conditionName,
-								 const char *fileName, int lineNumber) pg_attribute_noreturn();
-#endif
-
-/*
- * Macros to support compile-time assertion checks.
- *
- * If the "condition" (a compile-time-constant expression) evaluates to false,
- * throw a compile error using the "errmessage" (a string literal).
- *
- * C11 has _Static_assert(), and most C99 compilers already support that.  For
- * portability, we wrap it into StaticAssertDecl().  _Static_assert() is a
- * "declaration", and so it must be placed where for example a variable
- * declaration would be valid.  As long as we compile with
- * -Wno-declaration-after-statement, that also means it cannot be placed after
- * statements in a function.  Macros StaticAssertStmt() and StaticAssertExpr()
- * make it safe to use as a statement or in an expression, respectively.
- *
- * For compilers without _Static_assert(), we fall back on a kluge that
- * assumes the compiler will complain about a negative width for a struct
- * bit-field.  This will not include a helpful error message, but it beats not
- * getting an error at all.
- */
-#ifndef __cplusplus
-#ifdef HAVE__STATIC_ASSERT
-#define StaticAssertDecl(condition, errmessage) \
-	_Static_assert(condition, errmessage)
-#define StaticAssertStmt(condition, errmessage) \
-	do { _Static_assert(condition, errmessage); } while(0)
-#define StaticAssertExpr(condition, errmessage) \
-	((void) ({ StaticAssertStmt(condition, errmessage); true; }))
-#else							/* !HAVE__STATIC_ASSERT */
-#define StaticAssertDecl(condition, errmessage) \
-	extern void static_assert_func(int static_assert_failure[(condition) ? 1 : -1])
-#define StaticAssertStmt(condition, errmessage) \
-	((void) sizeof(struct { int static_assert_failure : (condition) ? 1 : -1; }))
-#define StaticAssertExpr(condition, errmessage) \
-	StaticAssertStmt(condition, errmessage)
-#endif							/* HAVE__STATIC_ASSERT */
-#else							/* C++ */
-#if defined(__cpp_static_assert) && __cpp_static_assert >= 200410
-#define StaticAssertDecl(condition, errmessage) \
-	static_assert(condition, errmessage)
-#define StaticAssertStmt(condition, errmessage) \
-	static_assert(condition, errmessage)
-#define StaticAssertExpr(condition, errmessage) \
-	({ static_assert(condition, errmessage); })
-#else							/* !__cpp_static_assert */
-#define StaticAssertDecl(condition, errmessage) \
-	extern void static_assert_func(int static_assert_failure[(condition) ? 1 : -1])
-#define StaticAssertStmt(condition, errmessage) \
-	do { struct static_assert_struct { int static_assert_failure : (condition) ? 1 : -1; }; } while(0)
-#define StaticAssertExpr(condition, errmessage) \
-	((void) ({ StaticAssertStmt(condition, errmessage); }))
-#endif							/* __cpp_static_assert */
-#endif							/* C++ */
-
-#ifdef _MSC_VER
-#undef StaticAssertStmt
-#undef StaticAssertDecl
-#define StaticAssertStmt(condition, errmessage)
-#define StaticAssertDecl(condition, errmessage)
-#endif
-
-/*
- * Compile-time checks that a variable (or expression) has the specified type.
- *
- * AssertVariableIsOfType() can be used as a statement.
- * AssertVariableIsOfTypeMacro() is intended for use in macros, eg
- *		#define foo(x) (AssertVariableIsOfTypeMacro(x, int), bar(x))
- *
- * If we don't have __builtin_types_compatible_p, we can still assert that
- * the types have the same size.  This is far from ideal (especially on 32-bit
- * platforms) but it provides at least some coverage.
- */
-#ifdef HAVE__BUILTIN_TYPES_COMPATIBLE_P
-#define AssertVariableIsOfType(varname, typename) \
-	StaticAssertStmt(__builtin_types_compatible_p(__typeof__(varname), typename), \
-	CppAsString(varname) " does not have type " CppAsString(typename))
-#define AssertVariableIsOfTypeMacro(varname, typename) \
-	(StaticAssertExpr(__builtin_types_compatible_p(__typeof__(varname), typename), \
-	 CppAsString(varname) " does not have type " CppAsString(typename)))
-#else							/* !HAVE__BUILTIN_TYPES_COMPATIBLE_P */
-#define AssertVariableIsOfType(varname, typename) \
-	StaticAssertStmt(sizeof(varname) == sizeof(typename), \
-	CppAsString(varname) " does not have type " CppAsString(typename))
-#define AssertVariableIsOfTypeMacro(varname, typename) \
-	(StaticAssertExpr(sizeof(varname) == sizeof(typename), \
-	 CppAsString(varname) " does not have type " CppAsString(typename)))
-#endif							/* HAVE__BUILTIN_TYPES_COMPATIBLE_P */
-
-
-/* ----------------------------------------------------------------
- *				Section 7:	widely useful macros
- * ----------------------------------------------------------------
- */
-/*
- * Max
- *		Return the maximum of two numbers.
- */
-#define Max(x, y)		((x) > (y) ? (x) : (y))
-
-/*
- * Min
- *		Return the minimum of two numbers.
- */
-#define Min(x, y)		((x) < (y) ? (x) : (y))
-
-
-/* Get a bit mask of the bits set in non-long aligned addresses */
-#define LONG_ALIGN_MASK (sizeof(long) - 1)
-
-/*
- * MemSet
- *	Exactly the same as standard library function memset(), but considerably
- *	faster for zeroing small word-aligned structures (such as parsetree nodes).
- *	This has to be a macro because the main point is to avoid function-call
- *	overhead.   However, we have also found that the loop is faster than
- *	native libc memset() on some platforms, even those with assembler
- *	memset() functions.  More research needs to be done, perhaps with
- *	MEMSET_LOOP_LIMIT tests in configure.
- */
-#define MemSet(start, val, len) \
-	do \
-	{ \
-		/* must be void* because we don't know if it is integer aligned yet */ \
-		void   *_vstart = (void *) (start); \
-		int		_val = (val); \
-		Size	_len = (len); \
-\
-		if ((((uintptr_t) _vstart) & LONG_ALIGN_MASK) == 0 && \
-			(_len & LONG_ALIGN_MASK) == 0 && \
-			_val == 0 && \
-			_len <= MEMSET_LOOP_LIMIT && \
-			/* \
-			 *	If MEMSET_LOOP_LIMIT == 0, optimizer should find \
-			 *	the whole "if" false at compile time. \
-			 */ \
-			MEMSET_LOOP_LIMIT != 0) \
-		{ \
-			long *_start = (long *) _vstart; \
-			long *_stop = (long *) ((char *) _start + _len); \
-			while (_start < _stop) \
-				*_start++ = 0; \
-		} \
-		else \
-			memset(_vstart, _val, _len); \
-	} while (0)
-
-/*
- * MemSetAligned is the same as MemSet except it omits the test to see if
- * "start" is word-aligned.  This is okay to use if the caller knows a-priori
- * that the pointer is suitably aligned (typically, because he just got it
- * from palloc(), which always delivers a max-aligned pointer).
- */
-#define MemSetAligned(start, val, len) \
-	do \
-	{ \
-		long   *_start = (long *) (start); \
-		int		_val = (val); \
-		Size	_len = (len); \
-\
-		if ((_len & LONG_ALIGN_MASK) == 0 && \
-			_val == 0 && \
-			_len <= MEMSET_LOOP_LIMIT && \
-			MEMSET_LOOP_LIMIT != 0) \
-		{ \
-			long *_stop = (long *) ((char *) _start + _len); \
-			while (_start < _stop) \
-				*_start++ = 0; \
-		} \
-		else \
-			memset(_start, _val, _len); \
-	} while (0)
-
-
-/*
- * MemSetTest/MemSetLoop are a variant version that allow all the tests in
- * MemSet to be done at compile time in cases where "val" and "len" are
- * constants *and* we know the "start" pointer must be word-aligned.
- * If MemSetTest succeeds, then it is okay to use MemSetLoop, otherwise use
- * MemSetAligned.  Beware of multiple evaluations of the arguments when using
- * this approach.
- */
-#define MemSetTest(val, len) \
-	( ((len) & LONG_ALIGN_MASK) == 0 && \
-	(len) <= MEMSET_LOOP_LIMIT && \
-	MEMSET_LOOP_LIMIT != 0 && \
-	(val) == 0 )
-
-#define MemSetLoop(start, val, len) \
-	do \
-	{ \
-		long * _start = (long *) (start); \
-		long * _stop = (long *) ((char *) _start + (Size) (len)); \
-	\
-		while (_start < _stop) \
-			*_start++ = 0; \
-	} while (0)
-
-/*
- * Macros for range-checking float values before converting to integer.
- * We must be careful here that the boundary values are expressed exactly
- * in the float domain.  PG_INTnn_MIN is an exact power of 2, so it will
- * be represented exactly; but PG_INTnn_MAX isn't, and might get rounded
- * off, so avoid using that.
- * The input must be rounded to an integer beforehand, typically with rint(),
- * else we might draw the wrong conclusion about close-to-the-limit values.
- * These macros will do the right thing for Inf, but not necessarily for NaN,
- * so check isnan(num) first if that's a possibility.
- */
-#define FLOAT4_FITS_IN_INT16(num) \
-	((num) >= (float4) PG_INT16_MIN && (num) < -((float4) PG_INT16_MIN))
-#define FLOAT4_FITS_IN_INT32(num) \
-	((num) >= (float4) PG_INT32_MIN && (num) < -((float4) PG_INT32_MIN))
-#define FLOAT4_FITS_IN_INT64(num) \
-	((num) >= (float4) PG_INT64_MIN && (num) < -((float4) PG_INT64_MIN))
-#define FLOAT8_FITS_IN_INT16(num) \
-	((num) >= (float8) PG_INT16_MIN && (num) < -((float8) PG_INT16_MIN))
-#define FLOAT8_FITS_IN_INT32(num) \
-	((num) >= (float8) PG_INT32_MIN && (num) < -((float8) PG_INT32_MIN))
-#define FLOAT8_FITS_IN_INT64(num) \
-	((num) >= (float8) PG_INT64_MIN && (num) < -((float8) PG_INT64_MIN))
-
-
-/* ----------------------------------------------------------------
- *				Section 8:	random stuff
- * ----------------------------------------------------------------
- */
-
-/*
- * Invert the sign of a qsort-style comparison result, ie, exchange negative
- * and positive integer values, being careful not to get the wrong answer
- * for INT_MIN.  The argument should be an integral variable.
- */
-#define INVERT_COMPARE_RESULT(var) \
-	((var) = ((var) < 0) ? 1 : -(var))
-
-/*
- * Use this, not "char buf[BLCKSZ]", to declare a field or local variable
- * holding a page buffer, if that page might be accessed as a page.  Otherwise
- * the variable might be under-aligned, causing problems on alignment-picky
- * hardware.  We include both "double" and "int64" in the union to ensure that
- * the compiler knows the value must be MAXALIGN'ed (cf. configure's
- * computation of MAXIMUM_ALIGNOF).
- */
-typedef union PGAlignedBlock
-{
-	char		data[BLCKSZ];
-	double		force_align_d;
-	int64		force_align_i64;
-} PGAlignedBlock;
-
-/*
- * Use this to declare a field or local variable holding a page buffer, if that
- * page might be accessed as a page or passed to an SMgr I/O function.  If
- * allocating using the MemoryContext API, the aligned allocation functions
- * should be used with PG_IO_ALIGN_SIZE.  This alignment may be more efficient
- * for I/O in general, but may be strictly required on some platforms when
- * using direct I/O.
- */
-typedef union PGIOAlignedBlock
-{
-#ifdef pg_attribute_aligned
-	pg_attribute_aligned(PG_IO_ALIGN_SIZE)
-#endif
-	char		data[BLCKSZ];
-	double		force_align_d;
-	int64		force_align_i64;
-} PGIOAlignedBlock;
-
-/* Same, but for an XLOG_BLCKSZ-sized buffer */
-typedef union PGAlignedXLogBlock
-{
-#ifdef pg_attribute_aligned
-	pg_attribute_aligned(PG_IO_ALIGN_SIZE)
-#endif
-	char		data[XLOG_BLCKSZ];
-	double		force_align_d;
-	int64		force_align_i64;
-} PGAlignedXLogBlock;
-
-/* msb for char */
-#define HIGHBIT					(0x80)
-#define IS_HIGHBIT_SET(ch)		((unsigned char)(ch) & HIGHBIT)
-
-/*
- * Support macros for escaping strings.  escape_backslash should be true
- * if generating a non-standard-conforming string.  Prefixing a string
- * with ESCAPE_STRING_SYNTAX guarantees it is non-standard-conforming.
- * Beware of multiple evaluation of the "ch" argument!
- */
-#define SQL_STR_DOUBLE(ch, escape_backslash)	\
-	((ch) == '\'' || ((ch) == '\\' && (escape_backslash)))
-
-#define ESCAPE_STRING_SYNTAX	'E'
-
-
-#define STATUS_OK				(0)
-#define STATUS_ERROR			(-1)
-#define STATUS_EOF				(-2)
-
-/*
- * gettext support
- */
-
-#ifndef ENABLE_NLS
-/* stuff we'd otherwise get from <libintl.h> */
-#define gettext(x) (x)
-#define dgettext(d,x) (x)
-#define ngettext(s,p,n) ((n) == 1 ? (s) : (p))
-#define dngettext(d,s,p,n) ((n) == 1 ? (s) : (p))
-#endif
-
-#define _(x) gettext(x)
-
-/*
- *	Use this to mark string constants as needing translation at some later
- *	time, rather than immediately.  This is useful for cases where you need
- *	access to the original string and translated string, and for cases where
- *	immediate translation is not possible, like when initializing global
- *	variables.
- *
- *	https://www.gnu.org/software/gettext/manual/html_node/Special-cases.html
- */
-#define gettext_noop(x) (x)
-
-/*
- * To better support parallel installations of major PostgreSQL
- * versions as well as parallel installations of major library soname
- * versions, we mangle the gettext domain name by appending those
- * version numbers.  The coding rule ought to be that wherever the
- * domain name is mentioned as a literal, it must be wrapped into
- * PG_TEXTDOMAIN().  The macros below do not work on non-literals; but
- * that is somewhat intentional because it avoids having to worry
- * about multiple states of premangling and postmangling as the values
- * are being passed around.
- *
- * Make sure this matches the installation rules in nls-global.mk.
- */
-#ifdef SO_MAJOR_VERSION
-#define PG_TEXTDOMAIN(domain) (domain CppAsString2(SO_MAJOR_VERSION) "-" PG_MAJORVERSION)
-#else
-#define PG_TEXTDOMAIN(domain) (domain "-" PG_MAJORVERSION)
-#endif
-
-/*
- * Macro that allows to cast constness and volatile away from an expression, but doesn't
- * allow changing the underlying type.  Enforcement of the latter
- * currently only works for gcc like compilers.
- *
- * Please note IT IS NOT SAFE to cast constness away if the result will ever
- * be modified (it would be undefined behaviour). Doing so anyway can cause
- * compiler misoptimizations or runtime crashes (modifying readonly memory).
- * It is only safe to use when the result will not be modified, but API
- * design or language restrictions prevent you from declaring that
- * (e.g. because a function returns both const and non-const variables).
- *
- * Note that this only works in function scope, not for global variables (it'd
- * be nice, but not trivial, to improve that).
- */
-#if defined(HAVE__BUILTIN_TYPES_COMPATIBLE_P)
-#define unconstify(underlying_type, expr) \
-	(StaticAssertExpr(__builtin_types_compatible_p(__typeof(expr), const underlying_type), \
-					  "wrong cast"), \
-	 (underlying_type) (expr))
-#define unvolatize(underlying_type, expr) \
-	(StaticAssertExpr(__builtin_types_compatible_p(__typeof(expr), volatile underlying_type), \
-					  "wrong cast"), \
-	 (underlying_type) (expr))
-#else
-#define unconstify(underlying_type, expr) \
-	((underlying_type) (expr))
-#define unvolatize(underlying_type, expr) \
-	((underlying_type) (expr))
-#endif
-
-/* ----------------------------------------------------------------
- *				Section 9: system-specific hacks
- *
- *		This should be limited to things that absolutely have to be
- *		included in every source file.  The port-specific header file
- *		is usually a better place for this sort of thing.
- * ----------------------------------------------------------------
- */
-
-/*
- *	NOTE:  this is also used for opening text files.
- *	WIN32 treats Control-Z as EOF in files opened in text mode.
- *	Therefore, we open files in binary mode on Win32 so we can read
- *	literal control-Z.  The other affect is that we see CRLF, but
- *	that is OK because we can already handle those cleanly.
- */
-#if defined(WIN32) || defined(__CYGWIN__)
-#define PG_BINARY	O_BINARY
-#define PG_BINARY_A "ab"
-#define PG_BINARY_R "rb"
-#define PG_BINARY_W "wb"
-#else
-#define PG_BINARY	0
-#define PG_BINARY_A "a"
-#define PG_BINARY_R "r"
-#define PG_BINARY_W "w"
-#endif
-
-/*
- * Provide prototypes for routines not present in a particular machine's
- * standard C library.
- */
-
-#if !HAVE_DECL_FDATASYNC
-extern int	fdatasync(int fildes);
-#endif
-
-/*
- * Thin wrappers that convert strings to exactly 64-bit integers, matching our
- * definition of int64.  (For the naming, compare that POSIX has
- * strtoimax()/strtoumax() which return intmax_t/uintmax_t.)
- */
-#ifdef HAVE_LONG_INT_64
-#define strtoi64(str, endptr, base) ((int64) strtol(str, endptr, base))
-#define strtou64(str, endptr, base) ((uint64) strtoul(str, endptr, base))
-#else
-#define strtoi64(str, endptr, base) ((int64) strtoll(str, endptr, base))
-#define strtou64(str, endptr, base) ((uint64) strtoull(str, endptr, base))
-#endif
-
-/*
- * Similarly, wrappers around labs()/llabs() matching our int64.
- */
-#ifdef HAVE_LONG_INT_64
-#define i64abs(i) labs(i)
-#else
-#define i64abs(i) llabs(i)
-#endif
-
-/*
- * Use "extern PGDLLIMPORT ..." to declare variables that are defined
- * in the core backend and need to be accessible by loadable modules.
- * No special marking is required on most ports.
- */
-#ifndef PGDLLIMPORT
-#define PGDLLIMPORT
-#endif
-
-/*
- * Use "extern PGDLLEXPORT ..." to declare functions that are defined in
- * loadable modules and need to be callable by the core backend or other
- * loadable modules.
- * If the compiler knows __attribute__((visibility("*"))), we use that,
- * unless we already have a platform-specific definition.  Otherwise,
- * no special marking is required.
- */
-#ifndef PGDLLEXPORT
-#ifdef HAVE_VISIBILITY_ATTRIBUTE
-#define PGDLLEXPORT __attribute__((visibility("default")))
-#else
-#define PGDLLEXPORT
-#endif
-#endif
-
-/*
- * The following is used as the arg list for signal handlers.  Any ports
- * that take something other than an int argument should override this in
- * their pg_config_os.h file.  Note that variable names are required
- * because it is used in both the prototypes as well as the definitions.
- * Note also the long name.  We expect that this won't collide with
- * other names causing compiler warnings.
- */
-
-#ifndef SIGNAL_ARGS
-#define SIGNAL_ARGS  int postgres_signal_arg
-#endif
-
-/*
- * When there is no sigsetjmp, its functionality is provided by plain
- * setjmp.  We now support the case only on Windows.  However, it seems
- * that MinGW-64 has some longstanding issues in its setjmp support,
- * so on that toolchain we cheat and use gcc's builtins.
- */
-#ifdef WIN32
-#ifdef __MINGW64__
-typedef intptr_t sigjmp_buf[5];
-#define sigsetjmp(x,y) __builtin_setjmp(x)
-#define siglongjmp __builtin_longjmp
-#else							/* !__MINGW64__ */
-#define sigjmp_buf jmp_buf
-#define sigsetjmp(x,y) setjmp(x)
-#define siglongjmp longjmp
-#endif							/* __MINGW64__ */
-#endif							/* WIN32 */
-
-/* /port compatibility functions */
-#include "port.h"
-
-#endif							/* C_H */
diff --git a/contrib/libs/libpq/src/include/catalog/catversion.h b/contrib/libs/libpq/src/include/catalog/catversion.h
deleted file mode 100644
index cc1de6e65a..0000000000
--- a/contrib/libs/libpq/src/include/catalog/catversion.h
+++ /dev/null
@@ -1,62 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * catversion.h
- *	  "Catalog version number" for PostgreSQL.
- *
- * The catalog version number is used to flag incompatible changes in
- * the PostgreSQL system catalogs.  Whenever anyone changes the format of
- * a system catalog relation, or adds, deletes, or modifies standard
- * catalog entries in such a way that an updated backend wouldn't work
- * with an old database (or vice versa), the catalog version number
- * should be changed.  The version number stored in pg_control by initdb
- * is checked against the version number compiled into the backend at
- * startup time, so that a backend can refuse to run in an incompatible
- * database.
- *
- * The point of this feature is to provide a finer grain of compatibility
- * checking than is possible from looking at the major version number
- * stored in PG_VERSION.  It shouldn't matter to end users, but during
- * development cycles we usually make quite a few incompatible changes
- * to the contents of the system catalogs, and we don't want to bump the
- * major version number for each one.  What we can do instead is bump
- * this internal version number.  This should save some grief for
- * developers who might otherwise waste time tracking down "bugs" that
- * are really just code-vs-database incompatibilities.
- *
- * The rule for developers is: if you commit a change that requires
- * an initdb, you should update the catalog version number (as well as
- * notifying the pgsql-hackers mailing list, which has been the
- * informal practice for a long time).
- *
- * The catalog version number is placed here since modifying files in
- * include/catalog is the most common kind of initdb-forcing change.
- * But it could be used to protect any kind of incompatible change in
- * database contents or layout, such as altering tuple headers.
- * Another common reason for a catversion update is a change in parsetree
- * external representation, since serialized parsetrees appear in stored
- * rules and new-style SQL functions.  Almost any change in primnodes.h or
- * parsenodes.h will warrant a catversion update.
- *
- *
- * Portions Copyright (c) 1996-2023, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- * src/include/catalog/catversion.h
- *
- *-------------------------------------------------------------------------
- */
-#ifndef CATVERSION_H
-#define CATVERSION_H
-
-/*
- * We could use anything we wanted for version numbers, but I recommend
- * following the "YYYYMMDDN" style often used for DNS zone serial numbers.
- * YYYYMMDD are the date of the change, and N is the number of the change
- * on that day.  (Hopefully we'll never commit ten independent sets of
- * catalog changes on the same day...)
- */
-
-/*							yyyymmddN */
-#define CATALOG_VERSION_NO	202307071
-
-#endif
diff --git a/contrib/libs/libpq/src/include/catalog/pg_control.h b/contrib/libs/libpq/src/include/catalog/pg_control.h
deleted file mode 100644
index dc953977c5..0000000000
--- a/contrib/libs/libpq/src/include/catalog/pg_control.h
+++ /dev/null
@@ -1,258 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * pg_control.h
- *	  The system control file "pg_control" is not a heap relation.
- *	  However, we define it here so that the format is documented.
- *
- *
- * Portions Copyright (c) 1996-2023, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- * src/include/catalog/pg_control.h
- *
- *-------------------------------------------------------------------------
- */
-#ifndef PG_CONTROL_H
-#define PG_CONTROL_H
-
-#include "access/transam.h"
-#include "access/xlogdefs.h"
-#include "pgtime.h"				/* for pg_time_t */
-#include "port/pg_crc32c.h"
-
-
-/* Version identifier for this pg_control format */
-#define PG_CONTROL_VERSION	1300
-
-/* Nonce key length, see below */
-#define MOCK_AUTH_NONCE_LEN		32
-
-/*
- * Body of CheckPoint XLOG records.  This is declared here because we keep
- * a copy of the latest one in pg_control for possible disaster recovery.
- * Changing this struct requires a PG_CONTROL_VERSION bump.
- */
-typedef struct CheckPoint
-{
-	XLogRecPtr	redo;			/* next RecPtr available when we began to
-								 * create CheckPoint (i.e. REDO start point) */
-	TimeLineID	ThisTimeLineID; /* current TLI */
-	TimeLineID	PrevTimeLineID; /* previous TLI, if this record begins a new
-								 * timeline (equals ThisTimeLineID otherwise) */
-	bool		fullPageWrites; /* current full_page_writes */
-	FullTransactionId nextXid;	/* next free transaction ID */
-	Oid			nextOid;		/* next free OID */
-	MultiXactId nextMulti;		/* next free MultiXactId */
-	MultiXactOffset nextMultiOffset;	/* next free MultiXact offset */
-	TransactionId oldestXid;	/* cluster-wide minimum datfrozenxid */
-	Oid			oldestXidDB;	/* database with minimum datfrozenxid */
-	MultiXactId oldestMulti;	/* cluster-wide minimum datminmxid */
-	Oid			oldestMultiDB;	/* database with minimum datminmxid */
-	pg_time_t	time;			/* time stamp of checkpoint */
-	TransactionId oldestCommitTsXid;	/* oldest Xid with valid commit
-										 * timestamp */
-	TransactionId newestCommitTsXid;	/* newest Xid with valid commit
-										 * timestamp */
-
-	/*
-	 * Oldest XID still running. This is only needed to initialize hot standby
-	 * mode from an online checkpoint, so we only bother calculating this for
-	 * online checkpoints and only when wal_level is replica. Otherwise it's
-	 * set to InvalidTransactionId.
-	 */
-	TransactionId oldestActiveXid;
-} CheckPoint;
-
-/* XLOG info values for XLOG rmgr */
-#define XLOG_CHECKPOINT_SHUTDOWN		0x00
-#define XLOG_CHECKPOINT_ONLINE			0x10
-#define XLOG_NOOP						0x20
-#define XLOG_NEXTOID					0x30
-#define XLOG_SWITCH						0x40
-#define XLOG_BACKUP_END					0x50
-#define XLOG_PARAMETER_CHANGE			0x60
-#define XLOG_RESTORE_POINT				0x70
-#define XLOG_FPW_CHANGE					0x80
-#define XLOG_END_OF_RECOVERY			0x90
-#define XLOG_FPI_FOR_HINT				0xA0
-#define XLOG_FPI						0xB0
-/* 0xC0 is used in Postgres 9.5-11 */
-#define XLOG_OVERWRITE_CONTRECORD		0xD0
-
-
-/*
- * System status indicator.  Note this is stored in pg_control; if you change
- * it, you must bump PG_CONTROL_VERSION
- */
-typedef enum DBState
-{
-	DB_STARTUP = 0,
-	DB_SHUTDOWNED,
-	DB_SHUTDOWNED_IN_RECOVERY,
-	DB_SHUTDOWNING,
-	DB_IN_CRASH_RECOVERY,
-	DB_IN_ARCHIVE_RECOVERY,
-	DB_IN_PRODUCTION
-} DBState;
-
-/*
- * Contents of pg_control.
- */
-
-typedef struct ControlFileData
-{
-	/*
-	 * Unique system identifier --- to ensure we match up xlog files with the
-	 * installation that produced them.
-	 */
-	uint64		system_identifier;
-
-	/*
-	 * Version identifier information.  Keep these fields at the same offset,
-	 * especially pg_control_version; they won't be real useful if they move
-	 * around.  (For historical reasons they must be 8 bytes into the file
-	 * rather than immediately at the front.)
-	 *
-	 * pg_control_version identifies the format of pg_control itself.
-	 * catalog_version_no identifies the format of the system catalogs.
-	 *
-	 * There are additional version identifiers in individual files; for
-	 * example, WAL logs contain per-page magic numbers that can serve as
-	 * version cues for the WAL log.
-	 */
-	uint32		pg_control_version; /* PG_CONTROL_VERSION */
-	uint32		catalog_version_no; /* see catversion.h */
-
-	/*
-	 * System status data
-	 */
-	DBState		state;			/* see enum above */
-	pg_time_t	time;			/* time stamp of last pg_control update */
-	XLogRecPtr	checkPoint;		/* last check point record ptr */
-
-	CheckPoint	checkPointCopy; /* copy of last check point record */
-
-	XLogRecPtr	unloggedLSN;	/* current fake LSN value, for unlogged rels */
-
-	/*
-	 * These two values determine the minimum point we must recover up to
-	 * before starting up:
-	 *
-	 * minRecoveryPoint is updated to the latest replayed LSN whenever we
-	 * flush a data change during archive recovery. That guards against
-	 * starting archive recovery, aborting it, and restarting with an earlier
-	 * stop location. If we've already flushed data changes from WAL record X
-	 * to disk, we mustn't start up until we reach X again. Zero when not
-	 * doing archive recovery.
-	 *
-	 * backupStartPoint is the redo pointer of the backup start checkpoint, if
-	 * we are recovering from an online backup and haven't reached the end of
-	 * backup yet. It is reset to zero when the end of backup is reached, and
-	 * we mustn't start up before that. A boolean would suffice otherwise, but
-	 * we use the redo pointer as a cross-check when we see an end-of-backup
-	 * record, to make sure the end-of-backup record corresponds the base
-	 * backup we're recovering from.
-	 *
-	 * backupEndPoint is the backup end location, if we are recovering from an
-	 * online backup which was taken from the standby and haven't reached the
-	 * end of backup yet. It is initialized to the minimum recovery point in
-	 * pg_control which was backed up last. It is reset to zero when the end
-	 * of backup is reached, and we mustn't start up before that.
-	 *
-	 * If backupEndRequired is true, we know for sure that we're restoring
-	 * from a backup, and must see a backup-end record before we can safely
-	 * start up.
-	 */
-	XLogRecPtr	minRecoveryPoint;
-	TimeLineID	minRecoveryPointTLI;
-	XLogRecPtr	backupStartPoint;
-	XLogRecPtr	backupEndPoint;
-	bool		backupEndRequired;
-
-	/*
-	 * Parameter settings that determine if the WAL can be used for archival
-	 * or hot standby.
-	 */
-	int			wal_level;
-	bool		wal_log_hints;
-	int			MaxConnections;
-	int			max_worker_processes;
-	int			max_wal_senders;
-	int			max_prepared_xacts;
-	int			max_locks_per_xact;
-	bool		track_commit_timestamp;
-
-	/*
-	 * This data is used to check for hardware-architecture compatibility of
-	 * the database and the backend executable.  We need not check endianness
-	 * explicitly, since the pg_control version will surely look wrong to a
-	 * machine of different endianness, but we do need to worry about MAXALIGN
-	 * and floating-point format.  (Note: storage layout nominally also
-	 * depends on SHORTALIGN and INTALIGN, but in practice these are the same
-	 * on all architectures of interest.)
-	 *
-	 * Testing just one double value is not a very bulletproof test for
-	 * floating-point compatibility, but it will catch most cases.
-	 */
-	uint32		maxAlign;		/* alignment requirement for tuples */
-	double		floatFormat;	/* constant 1234567.0 */
-#define FLOATFORMAT_VALUE	1234567.0
-
-	/*
-	 * This data is used to make sure that configuration of this database is
-	 * compatible with the backend executable.
-	 */
-	uint32		blcksz;			/* data block size for this DB */
-	uint32		relseg_size;	/* blocks per segment of large relation */
-
-	uint32		xlog_blcksz;	/* block size within WAL files */
-	uint32		xlog_seg_size;	/* size of each WAL segment */
-
-	uint32		nameDataLen;	/* catalog name field width */
-	uint32		indexMaxKeys;	/* max number of columns in an index */
-
-	uint32		toast_max_chunk_size;	/* chunk size in TOAST tables */
-	uint32		loblksize;		/* chunk size in pg_largeobject */
-
-	bool		float8ByVal;	/* float8, int8, etc pass-by-value? */
-
-	/* Are data pages protected by checksums? Zero if no checksum version */
-	uint32		data_checksum_version;
-
-	/*
-	 * Random nonce, used in authentication requests that need to proceed
-	 * based on values that are cluster-unique, like a SASL exchange that
-	 * failed at an early stage.
-	 */
-	char		mock_authentication_nonce[MOCK_AUTH_NONCE_LEN];
-
-	/* CRC of all above ... MUST BE LAST! */
-	pg_crc32c	crc;
-} ControlFileData;
-
-/*
- * Maximum safe value of sizeof(ControlFileData).  For reliability's sake,
- * it's critical that pg_control updates be atomic writes.  That generally
- * means the active data can't be more than one disk sector, which is 512
- * bytes on common hardware.  Be very careful about raising this limit.
- */
-#define PG_CONTROL_MAX_SAFE_SIZE	512
-
-/*
- * Physical size of the pg_control file.  Note that this is considerably
- * bigger than the actually used size (ie, sizeof(ControlFileData)).
- * The idea is to keep the physical size constant independent of format
- * changes, so that ReadControlFile will deliver a suitable wrong-version
- * message instead of a read error if it's looking at an incompatible file.
- */
-#define PG_CONTROL_FILE_SIZE		8192
-
-/*
- * Ensure that the size of the pg_control data structure is sane.
- */
-StaticAssertDecl(sizeof(ControlFileData) <= PG_CONTROL_MAX_SAFE_SIZE,
-				 "pg_control is too large for atomic disk writes");
-StaticAssertDecl(sizeof(ControlFileData) <= PG_CONTROL_FILE_SIZE,
-				 "sizeof(ControlFileData) exceeds PG_CONTROL_FILE_SIZE");
-
-#endif							/* PG_CONTROL_H */
diff --git a/contrib/libs/libpq/src/include/common/archive.h b/contrib/libs/libpq/src/include/common/archive.h
deleted file mode 100644
index 95196772c9..0000000000
--- a/contrib/libs/libpq/src/include/common/archive.h
+++ /dev/null
@@ -1,21 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * archive.h
- *	  Common WAL archive routines
- *
- * Portions Copyright (c) 1996-2023, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- * src/include/common/archive.h
- *
- *-------------------------------------------------------------------------
- */
-#ifndef ARCHIVE_H
-#define ARCHIVE_H
-
-extern char *BuildRestoreCommand(const char *restoreCommand,
-								 const char *xlogpath,	/* %p */
-								 const char *xlogfname, /* %f */
-								 const char *lastRestartPointFname);	/* %r */
-
-#endif							/* ARCHIVE_H */
diff --git a/contrib/libs/libpq/src/include/common/base64.h b/contrib/libs/libpq/src/include/common/base64.h
deleted file mode 100644
index 5bd8186c79..0000000000
--- a/contrib/libs/libpq/src/include/common/base64.h
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
- * base64.h
- *	  Encoding and decoding routines for base64 without whitespace
- *	  support.
- *
- * Portions Copyright (c) 2001-2023, PostgreSQL Global Development Group
- *
- * src/include/common/base64.h
- */
-#ifndef BASE64_H
-#define BASE64_H
-
-/* base 64 */
-extern int	pg_b64_encode(const char *src, int len, char *dst, int dstlen);
-extern int	pg_b64_decode(const char *src, int len, char *dst, int dstlen);
-extern int	pg_b64_enc_len(int srclen);
-extern int	pg_b64_dec_len(int srclen);
-
-#endif							/* BASE64_H */
diff --git a/contrib/libs/libpq/src/include/common/checksum_helper.h b/contrib/libs/libpq/src/include/common/checksum_helper.h
deleted file mode 100644
index a74deef67b..0000000000
--- a/contrib/libs/libpq/src/include/common/checksum_helper.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * checksum_helper.h
- *	  Compute a checksum of any of various types using common routines
- *
- * Portions Copyright (c) 2016-2023, PostgreSQL Global Development Group
- *
- * IDENTIFICATION
- *		  src/include/common/checksum_helper.h
- *
- *-------------------------------------------------------------------------
- */
-
-#ifndef CHECKSUM_HELPER_H
-#define CHECKSUM_HELPER_H
-
-#include "common/cryptohash.h"
-#include "common/sha2.h"
-#include "port/pg_crc32c.h"
-
-/*
- * Supported checksum types. It's not necessarily the case that code using
- * these functions needs a cryptographically strong checksum; it may only
- * need to detect accidental modification. That's why we include CRC-32C: it's
- * much faster than any of the other algorithms. On the other hand, we omit
- * MD5 here because any new that does need a cryptographically strong checksum
- * should use something better.
- */
-typedef enum pg_checksum_type
-{
-	CHECKSUM_TYPE_NONE,
-	CHECKSUM_TYPE_CRC32C,
-	CHECKSUM_TYPE_SHA224,
-	CHECKSUM_TYPE_SHA256,
-	CHECKSUM_TYPE_SHA384,
-	CHECKSUM_TYPE_SHA512
-} pg_checksum_type;
-
-/*
- * This is just a union of all applicable context types.
- */
-typedef union pg_checksum_raw_context
-{
-	pg_crc32c	c_crc32c;
-	pg_cryptohash_ctx *c_sha2;
-} pg_checksum_raw_context;
-
-/*
- * This structure provides a convenient way to pass the checksum type and the
- * checksum context around together.
- */
-typedef struct pg_checksum_context
-{
-	pg_checksum_type type;
-	pg_checksum_raw_context raw_context;
-} pg_checksum_context;
-
-/*
- * This is the longest possible output for any checksum algorithm supported
- * by this file.
- */
-#define PG_CHECKSUM_MAX_LENGTH		PG_SHA512_DIGEST_LENGTH
-
-extern bool pg_checksum_parse_type(char *name, pg_checksum_type *);
-extern char *pg_checksum_type_name(pg_checksum_type);
-
-extern int	pg_checksum_init(pg_checksum_context *, pg_checksum_type);
-extern int	pg_checksum_update(pg_checksum_context *, const uint8 *input,
-							   size_t len);
-extern int	pg_checksum_final(pg_checksum_context *, uint8 *output);
-
-#endif
diff --git a/contrib/libs/libpq/src/include/common/compression.h b/contrib/libs/libpq/src/include/common/compression.h
deleted file mode 100644
index 38aae9dd87..0000000000
--- a/contrib/libs/libpq/src/include/common/compression.h
+++ /dev/null
@@ -1,53 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * compression.h
- *
- * Shared definitions for compression methods and specifications.
- *
- * Portions Copyright (c) 1996-2023, PostgreSQL Global Development Group
- *
- * IDENTIFICATION
- *		  src/include/common/compression.h
- *-------------------------------------------------------------------------
- */
-
-#ifndef PG_COMPRESSION_H
-#define PG_COMPRESSION_H
-
-/*
- * These values are stored in disk, for example in files generated by pg_dump.
- * Create the necessary backwards compatibility layers if their order changes.
- */
-typedef enum pg_compress_algorithm
-{
-	PG_COMPRESSION_NONE,
-	PG_COMPRESSION_GZIP,
-	PG_COMPRESSION_LZ4,
-	PG_COMPRESSION_ZSTD
-} pg_compress_algorithm;
-
-#define PG_COMPRESSION_OPTION_WORKERS		(1 << 0)
-#define PG_COMPRESSION_OPTION_LONG_DISTANCE	(1 << 1)
-
-typedef struct pg_compress_specification
-{
-	pg_compress_algorithm algorithm;
-	unsigned	options;		/* OR of PG_COMPRESSION_OPTION constants */
-	int			level;
-	int			workers;
-	bool		long_distance;
-	char	   *parse_error;	/* NULL if parsing was OK, else message */
-} pg_compress_specification;
-
-extern void parse_compress_options(const char *option, char **algorithm,
-								   char **detail);
-extern bool parse_compress_algorithm(char *name, pg_compress_algorithm *algorithm);
-extern const char *get_compress_algorithm_name(pg_compress_algorithm algorithm);
-
-extern void parse_compress_specification(pg_compress_algorithm algorithm,
-										 char *specification,
-										 pg_compress_specification *result);
-
-extern char *validate_compress_specification(pg_compress_specification *);
-
-#endif
diff --git a/contrib/libs/libpq/src/include/common/config_info.h b/contrib/libs/libpq/src/include/common/config_info.h
deleted file mode 100644
index a6d076d5e9..0000000000
--- a/contrib/libs/libpq/src/include/common/config_info.h
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * config_info.h
- *		Common code for pg_config output
- *
- *	Copyright (c) 2016-2023, PostgreSQL Global Development Group
- *
- *	src/include/common/config_info.h
- */
-#ifndef COMMON_CONFIG_INFO_H
-#define COMMON_CONFIG_INFO_H
-
-typedef struct ConfigData
-{
-	char	   *name;
-	char	   *setting;
-} ConfigData;
-
-extern ConfigData *get_configdata(const char *my_exec_path,
-								  size_t *configdata_len);
-
-#endif							/* COMMON_CONFIG_INFO_H */
diff --git a/contrib/libs/libpq/src/include/common/controldata_utils.h b/contrib/libs/libpq/src/include/common/controldata_utils.h
deleted file mode 100644
index 49e7c52d31..0000000000
--- a/contrib/libs/libpq/src/include/common/controldata_utils.h
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
- * controldata_utils.h
- *		Common code for pg_controldata output
- *
- *	Portions Copyright (c) 1996-2023, PostgreSQL Global Development Group
- *	Portions Copyright (c) 1994, Regents of the University of California
- *
- *	src/include/common/controldata_utils.h
- */
-#ifndef COMMON_CONTROLDATA_UTILS_H
-#define COMMON_CONTROLDATA_UTILS_H
-
-#include "catalog/pg_control.h"
-
-extern ControlFileData *get_controlfile(const char *DataDir, bool *crc_ok_p);
-extern void update_controlfile(const char *DataDir,
-							   ControlFileData *ControlFile, bool do_sync);
-
-#endif							/* COMMON_CONTROLDATA_UTILS_H */
diff --git a/contrib/libs/libpq/src/include/common/cryptohash.h b/contrib/libs/libpq/src/include/common/cryptohash.h
deleted file mode 100644
index 24b6dbebbd..0000000000
--- a/contrib/libs/libpq/src/include/common/cryptohash.h
+++ /dev/null
@@ -1,39 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * cryptohash.h
- *	  Generic headers for cryptographic hash functions.
- *
- * Portions Copyright (c) 1996-2023, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- * IDENTIFICATION
- *		  src/include/common/cryptohash.h
- *
- *-------------------------------------------------------------------------
- */
-
-#ifndef PG_CRYPTOHASH_H
-#define PG_CRYPTOHASH_H
-
-/* Context Structures for each hash function */
-typedef enum
-{
-	PG_MD5 = 0,
-	PG_SHA1,
-	PG_SHA224,
-	PG_SHA256,
-	PG_SHA384,
-	PG_SHA512
-} pg_cryptohash_type;
-
-/* opaque context, private to each cryptohash implementation */
-typedef struct pg_cryptohash_ctx pg_cryptohash_ctx;
-
-extern pg_cryptohash_ctx *pg_cryptohash_create(pg_cryptohash_type type);
-extern int	pg_cryptohash_init(pg_cryptohash_ctx *ctx);
-extern int	pg_cryptohash_update(pg_cryptohash_ctx *ctx, const uint8 *data, size_t len);
-extern int	pg_cryptohash_final(pg_cryptohash_ctx *ctx, uint8 *dest, size_t len);
-extern void pg_cryptohash_free(pg_cryptohash_ctx *ctx);
-extern const char *pg_cryptohash_error(pg_cryptohash_ctx *ctx);
-
-#endif							/* PG_CRYPTOHASH_H */
diff --git a/contrib/libs/libpq/src/include/common/fe_memutils.h b/contrib/libs/libpq/src/include/common/fe_memutils.h
deleted file mode 100644
index 89601cc778..0000000000
--- a/contrib/libs/libpq/src/include/common/fe_memutils.h
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- *	fe_memutils.h
- *		memory management support for frontend code
- *
- *	Copyright (c) 2003-2023, PostgreSQL Global Development Group
- *
- *	src/include/common/fe_memutils.h
- */
-#ifndef FE_MEMUTILS_H
-#define FE_MEMUTILS_H
-
-/*
- * Flags for pg_malloc_extended and palloc_extended, deliberately named
- * the same as the backend flags.
- */
-#define MCXT_ALLOC_HUGE			0x01	/* allow huge allocation (> 1 GB) not
-										 * actually used for frontends */
-#define MCXT_ALLOC_NO_OOM		0x02	/* no failure if out-of-memory */
-#define MCXT_ALLOC_ZERO			0x04	/* zero allocated memory */
-
-/*
- * "Safe" memory allocation functions --- these exit(1) on failure
- * (except pg_malloc_extended with MCXT_ALLOC_NO_OOM)
- */
-extern char *pg_strdup(const char *in);
-extern void *pg_malloc(size_t size);
-extern void *pg_malloc0(size_t size);
-extern void *pg_malloc_extended(size_t size, int flags);
-extern void *pg_realloc(void *ptr, size_t size);
-extern void pg_free(void *ptr);
-
-/*
- * Variants with easier notation and more type safety
- */
-
-/*
- * Allocate space for one object of type "type"
- */
-#define pg_malloc_object(type) ((type *) pg_malloc(sizeof(type)))
-#define pg_malloc0_object(type) ((type *) pg_malloc0(sizeof(type)))
-
-/*
- * Allocate space for "count" objects of type "type"
- */
-#define pg_malloc_array(type, count) ((type *) pg_malloc(sizeof(type) * (count)))
-#define pg_malloc0_array(type, count) ((type *) pg_malloc0(sizeof(type) * (count)))
-
-/*
- * Change size of allocation pointed to by "pointer" to have space for "count"
- * objects of type "type"
- */
-#define pg_realloc_array(pointer, type, count) ((type *) pg_realloc(pointer, sizeof(type) * (count)))
-
-/* Equivalent functions, deliberately named the same as backend functions */
-extern char *pstrdup(const char *in);
-extern char *pnstrdup(const char *in, Size size);
-extern void *palloc(Size size);
-extern void *palloc0(Size size);
-extern void *palloc_extended(Size size, int flags);
-extern void *repalloc(void *pointer, Size size);
-extern void pfree(void *pointer);
-
-#define palloc_object(type) ((type *) palloc(sizeof(type)))
-#define palloc0_object(type) ((type *) palloc0(sizeof(type)))
-#define palloc_array(type, count) ((type *) palloc(sizeof(type) * (count)))
-#define palloc0_array(type, count) ((type *) palloc0(sizeof(type) * (count)))
-#define repalloc_array(pointer, type, count) ((type *) repalloc(pointer, sizeof(type) * (count)))
-
-/* sprintf into a palloc'd buffer --- these are in psprintf.c */
-extern char *psprintf(const char *fmt,...) pg_attribute_printf(1, 2);
-extern size_t pvsnprintf(char *buf, size_t len, const char *fmt, va_list args) pg_attribute_printf(3, 0);
-
-#endif							/* FE_MEMUTILS_H */
diff --git a/contrib/libs/libpq/src/include/common/file_perm.h b/contrib/libs/libpq/src/include/common/file_perm.h
deleted file mode 100644
index 978c0d072f..0000000000
--- a/contrib/libs/libpq/src/include/common/file_perm.h
+++ /dev/null
@@ -1,56 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * File and directory permission definitions
- *
- *
- * Portions Copyright (c) 1996-2023, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- * src/include/common/file_perm.h
- *
- *-------------------------------------------------------------------------
- */
-#ifndef FILE_PERM_H
-#define FILE_PERM_H
-
-#include <sys/stat.h>
-
-/*
- * Mode mask for data directory permissions that only allows the owner to
- * read/write directories and files.
- *
- * This is the default.
- */
-#define PG_MODE_MASK_OWNER		    (S_IRWXG | S_IRWXO)
-
-/*
- * Mode mask for data directory permissions that also allows group read/execute.
- */
-#define PG_MODE_MASK_GROUP			(S_IWGRP | S_IRWXO)
-
-/* Default mode for creating directories */
-#define PG_DIR_MODE_OWNER			S_IRWXU
-
-/* Mode for creating directories that allows group read/execute */
-#define PG_DIR_MODE_GROUP			(S_IRWXU | S_IRGRP | S_IXGRP)
-
-/* Default mode for creating files */
-#define PG_FILE_MODE_OWNER		    (S_IRUSR | S_IWUSR)
-
-/* Mode for creating files that allows group read */
-#define PG_FILE_MODE_GROUP			(S_IRUSR | S_IWUSR | S_IRGRP)
-
-/* Modes for creating directories and files in the data directory */
-extern PGDLLIMPORT int pg_dir_create_mode;
-extern PGDLLIMPORT int pg_file_create_mode;
-
-/* Mode mask to pass to umask() */
-extern PGDLLIMPORT int pg_mode_mask;
-
-/* Set permissions and mask based on the provided mode */
-extern void SetDataDirectoryCreatePerm(int dataDirMode);
-
-/* Set permissions and mask based on the mode of the data directory */
-extern bool GetDataDirectoryCreatePerm(const char *dataDir);
-
-#endif							/* FILE_PERM_H */
diff --git a/contrib/libs/libpq/src/include/common/file_utils.h b/contrib/libs/libpq/src/include/common/file_utils.h
deleted file mode 100644
index b7efa1226d..0000000000
--- a/contrib/libs/libpq/src/include/common/file_utils.h
+++ /dev/null
@@ -1,49 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * Assorted utility functions to work on files.
- *
- *
- * Portions Copyright (c) 1996-2023, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- * src/include/common/file_utils.h
- *
- *-------------------------------------------------------------------------
- */
-#ifndef FILE_UTILS_H
-#define FILE_UTILS_H
-
-#include <dirent.h>
-
-typedef enum PGFileType
-{
-	PGFILETYPE_ERROR,
-	PGFILETYPE_UNKNOWN,
-	PGFILETYPE_REG,
-	PGFILETYPE_DIR,
-	PGFILETYPE_LNK
-} PGFileType;
-
-struct iovec;					/* avoid including port/pg_iovec.h here */
-
-#ifdef FRONTEND
-extern int	fsync_fname(const char *fname, bool isdir);
-extern void fsync_pgdata(const char *pg_data, int serverVersion);
-extern void fsync_dir_recurse(const char *dir);
-extern int	durable_rename(const char *oldfile, const char *newfile);
-extern int	fsync_parent_path(const char *fname);
-#endif
-
-extern PGFileType get_dirent_type(const char *path,
-								  const struct dirent *de,
-								  bool look_through_symlinks,
-								  int elevel);
-
-extern ssize_t pg_pwritev_with_retry(int fd,
-									 const struct iovec *iov,
-									 int iovcnt,
-									 off_t offset);
-
-extern ssize_t pg_pwrite_zeros(int fd, size_t size, off_t offset);
-
-#endif							/* FILE_UTILS_H */
diff --git a/contrib/libs/libpq/src/include/common/hashfn.h b/contrib/libs/libpq/src/include/common/hashfn.h
deleted file mode 100644
index 5e89aef987..0000000000
--- a/contrib/libs/libpq/src/include/common/hashfn.h
+++ /dev/null
@@ -1,104 +0,0 @@
-/*
- * Utilities for working with hash values.
- *
- * Portions Copyright (c) 2017-2023, PostgreSQL Global Development Group
- */
-
-#ifndef HASHFN_H
-#define HASHFN_H
-
-
-/*
- * Rotate the high 32 bits and the low 32 bits separately.  The standard
- * hash function sometimes rotates the low 32 bits by one bit when
- * combining elements.  We want extended hash functions to be compatible with
- * that algorithm when the seed is 0, so we can't just do a normal rotation.
- * This works, though.
- */
-#define ROTATE_HIGH_AND_LOW_32BITS(v) \
-	((((v) << 1) & UINT64CONST(0xfffffffefffffffe)) | \
-	(((v) >> 31) & UINT64CONST(0x100000001)))
-
-
-extern uint32 hash_bytes(const unsigned char *k, int keylen);
-extern uint64 hash_bytes_extended(const unsigned char *k,
-								  int keylen, uint64 seed);
-extern uint32 hash_bytes_uint32(uint32 k);
-extern uint64 hash_bytes_uint32_extended(uint32 k, uint64 seed);
-
-#ifndef FRONTEND
-static inline Datum
-hash_any(const unsigned char *k, int keylen)
-{
-	return UInt32GetDatum(hash_bytes(k, keylen));
-}
-
-static inline Datum
-hash_any_extended(const unsigned char *k, int keylen, uint64 seed)
-{
-	return UInt64GetDatum(hash_bytes_extended(k, keylen, seed));
-}
-
-static inline Datum
-hash_uint32(uint32 k)
-{
-	return UInt32GetDatum(hash_bytes_uint32(k));
-}
-
-static inline Datum
-hash_uint32_extended(uint32 k, uint64 seed)
-{
-	return UInt64GetDatum(hash_bytes_uint32_extended(k, seed));
-}
-#endif
-
-extern uint32 string_hash(const void *key, Size keysize);
-extern uint32 tag_hash(const void *key, Size keysize);
-extern uint32 uint32_hash(const void *key, Size keysize);
-
-#define oid_hash uint32_hash	/* Remove me eventually */
-
-/*
- * Combine two 32-bit hash values, resulting in another hash value, with
- * decent bit mixing.
- *
- * Similar to boost's hash_combine().
- */
-static inline uint32
-hash_combine(uint32 a, uint32 b)
-{
-	a ^= b + 0x9e3779b9 + (a << 6) + (a >> 2);
-	return a;
-}
-
-/*
- * Combine two 64-bit hash values, resulting in another hash value, using the
- * same kind of technique as hash_combine().  Testing shows that this also
- * produces good bit mixing.
- */
-static inline uint64
-hash_combine64(uint64 a, uint64 b)
-{
-	/* 0x49a0f4dd15e5a8e3 is 64bit random data */
-	a ^= b + UINT64CONST(0x49a0f4dd15e5a8e3) + (a << 54) + (a >> 7);
-	return a;
-}
-
-/*
- * Simple inline murmur hash implementation hashing a 32 bit integer, for
- * performance.
- */
-static inline uint32
-murmurhash32(uint32 data)
-{
-	uint32		h = data;
-
-	h ^= h >> 16;
-	h *= 0x85ebca6b;
-	h ^= h >> 13;
-	h *= 0xc2b2ae35;
-	h ^= h >> 16;
-	return h;
-}
-
-#endif							/* HASHFN_H */
diff --git a/contrib/libs/libpq/src/include/common/hmac.h b/contrib/libs/libpq/src/include/common/hmac.h
deleted file mode 100644
index e0b2ed2024..0000000000
--- a/contrib/libs/libpq/src/include/common/hmac.h
+++ /dev/null
@@ -1,30 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * hmac.h
- *	  Generic headers for HMAC
- *
- * Portions Copyright (c) 1996-2023, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- * IDENTIFICATION
- *		  src/include/common/hmac.h
- *
- *-------------------------------------------------------------------------
- */
-
-#ifndef PG_HMAC_H
-#define PG_HMAC_H
-
-#include "common/cryptohash.h"
-
-/* opaque context, private to each HMAC implementation */
-typedef struct pg_hmac_ctx pg_hmac_ctx;
-
-extern pg_hmac_ctx *pg_hmac_create(pg_cryptohash_type type);
-extern int	pg_hmac_init(pg_hmac_ctx *ctx, const uint8 *key, size_t len);
-extern int	pg_hmac_update(pg_hmac_ctx *ctx, const uint8 *data, size_t len);
-extern int	pg_hmac_final(pg_hmac_ctx *ctx, uint8 *dest, size_t len);
-extern void pg_hmac_free(pg_hmac_ctx *ctx);
-extern const char *pg_hmac_error(pg_hmac_ctx *ctx);
-
-#endif							/* PG_HMAC_H */
diff --git a/contrib/libs/libpq/src/include/common/ip.h b/contrib/libs/libpq/src/include/common/ip.h
deleted file mode 100644
index 9f2ed5fe0a..0000000000
--- a/contrib/libs/libpq/src/include/common/ip.h
+++ /dev/null
@@ -1,33 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * ip.h
- *	  Definitions for IPv6-aware network access.
- *
- * These definitions are used by both frontend and backend code.
- *
- * Copyright (c) 2003-2023, PostgreSQL Global Development Group
- *
- * src/include/common/ip.h
- *
- *-------------------------------------------------------------------------
- */
-#ifndef IP_H
-#define IP_H
-
-#include <netdb.h>
-#include <sys/socket.h>
-
-#include "libpq/pqcomm.h"		/* pgrminclude ignore */
-
-
-extern int	pg_getaddrinfo_all(const char *hostname, const char *servname,
-							   const struct addrinfo *hintp,
-							   struct addrinfo **result);
-extern void pg_freeaddrinfo_all(int hint_ai_family, struct addrinfo *ai);
-
-extern int	pg_getnameinfo_all(const struct sockaddr_storage *addr, int salen,
-							   char *node, int nodelen,
-							   char *service, int servicelen,
-							   int flags);
-
-#endif							/* IP_H */
diff --git a/contrib/libs/libpq/src/include/common/jsonapi.h b/contrib/libs/libpq/src/include/common/jsonapi.h
deleted file mode 100644
index 4310084b2b..0000000000
--- a/contrib/libs/libpq/src/include/common/jsonapi.h
+++ /dev/null
@@ -1,177 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * jsonapi.h
- *	  Declarations for JSON API support.
- *
- * Portions Copyright (c) 1996-2023, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- * src/include/common/jsonapi.h
- *
- *-------------------------------------------------------------------------
- */
-
-#ifndef JSONAPI_H
-#define JSONAPI_H
-
-#include "lib/stringinfo.h"
-
-typedef enum JsonTokenType
-{
-	JSON_TOKEN_INVALID,
-	JSON_TOKEN_STRING,
-	JSON_TOKEN_NUMBER,
-	JSON_TOKEN_OBJECT_START,
-	JSON_TOKEN_OBJECT_END,
-	JSON_TOKEN_ARRAY_START,
-	JSON_TOKEN_ARRAY_END,
-	JSON_TOKEN_COMMA,
-	JSON_TOKEN_COLON,
-	JSON_TOKEN_TRUE,
-	JSON_TOKEN_FALSE,
-	JSON_TOKEN_NULL,
-	JSON_TOKEN_END
-} JsonTokenType;
-
-typedef enum JsonParseErrorType
-{
-	JSON_SUCCESS,
-	JSON_ESCAPING_INVALID,
-	JSON_ESCAPING_REQUIRED,
-	JSON_EXPECTED_ARRAY_FIRST,
-	JSON_EXPECTED_ARRAY_NEXT,
-	JSON_EXPECTED_COLON,
-	JSON_EXPECTED_END,
-	JSON_EXPECTED_JSON,
-	JSON_EXPECTED_MORE,
-	JSON_EXPECTED_OBJECT_FIRST,
-	JSON_EXPECTED_OBJECT_NEXT,
-	JSON_EXPECTED_STRING,
-	JSON_INVALID_TOKEN,
-	JSON_UNICODE_CODE_POINT_ZERO,
-	JSON_UNICODE_ESCAPE_FORMAT,
-	JSON_UNICODE_HIGH_ESCAPE,
-	JSON_UNICODE_UNTRANSLATABLE,
-	JSON_UNICODE_HIGH_SURROGATE,
-	JSON_UNICODE_LOW_SURROGATE,
-	JSON_SEM_ACTION_FAILED		/* error should already be reported */
-} JsonParseErrorType;
-
-
-/*
- * All the fields in this structure should be treated as read-only.
- *
- * If strval is not null, then it should contain the de-escaped value
- * of the lexeme if it's a string. Otherwise most of these field names
- * should be self-explanatory.
- *
- * line_number and line_start are principally for use by the parser's
- * error reporting routines.
- * token_terminator and prev_token_terminator point to the character
- * AFTER the end of the token, i.e. where there would be a nul byte
- * if we were using nul-terminated strings.
- */
-typedef struct JsonLexContext
-{
-	char	   *input;
-	int			input_length;
-	int			input_encoding;
-	char	   *token_start;
-	char	   *token_terminator;
-	char	   *prev_token_terminator;
-	JsonTokenType token_type;
-	int			lex_level;
-	int			line_number;	/* line number, starting from 1 */
-	char	   *line_start;		/* where that line starts within input */
-	StringInfo	strval;
-} JsonLexContext;
-
-typedef JsonParseErrorType (*json_struct_action) (void *state);
-typedef JsonParseErrorType (*json_ofield_action) (void *state, char *fname, bool isnull);
-typedef JsonParseErrorType (*json_aelem_action) (void *state, bool isnull);
-typedef JsonParseErrorType (*json_scalar_action) (void *state, char *token, JsonTokenType tokentype);
-
-
-/*
- * Semantic Action structure for use in parsing json.
- *
- * Any of these actions can be NULL, in which case nothing is done at that
- * point, Likewise, semstate can be NULL. Using an all-NULL structure amounts
- * to doing a pure parse with no side-effects, and is therefore exactly
- * what the json input routines do.
- *
- * The 'fname' and 'token' strings passed to these actions are palloc'd.
- * They are not free'd or used further by the parser, so the action function
- * is free to do what it wishes with them.
- *
- * All action functions return JsonParseErrorType.  If the result isn't
- * JSON_SUCCESS, the parse is abandoned and that error code is returned.
- * If it is JSON_SEM_ACTION_FAILED, the action function is responsible
- * for having reported the error in some appropriate way.
- */
-typedef struct JsonSemAction
-{
-	void	   *semstate;
-	json_struct_action object_start;
-	json_struct_action object_end;
-	json_struct_action array_start;
-	json_struct_action array_end;
-	json_ofield_action object_field_start;
-	json_ofield_action object_field_end;
-	json_aelem_action array_element_start;
-	json_aelem_action array_element_end;
-	json_scalar_action scalar;
-} JsonSemAction;
-
-/*
- * pg_parse_json will parse the string in the lex calling the
- * action functions in sem at the appropriate points. It is
- * up to them to keep what state they need in semstate. If they
- * need access to the state of the lexer, then its pointer
- * should be passed to them as a member of whatever semstate
- * points to. If the action pointers are NULL the parser
- * does nothing and just continues.
- */
-extern JsonParseErrorType pg_parse_json(JsonLexContext *lex,
-										JsonSemAction *sem);
-
-/* the null action object used for pure validation */
-extern PGDLLIMPORT JsonSemAction nullSemAction;
-
-/*
- * json_count_array_elements performs a fast secondary parse to determine the
- * number of elements in passed array lex context. It should be called from an
- * array_start action.
- *
- * The return value indicates whether any error occurred, while the number
- * of elements is stored into *elements (but only if the return value is
- * JSON_SUCCESS).
- */
-extern JsonParseErrorType json_count_array_elements(JsonLexContext *lex,
-													int *elements);
-
-/*
- * constructor for JsonLexContext, with or without strval element.
- * If supplied, the strval element will contain a de-escaped version of
- * the lexeme. However, doing this imposes a performance penalty, so
- * it should be avoided if the de-escaped lexeme is not required.
- */
-extern JsonLexContext *makeJsonLexContextCstringLen(char *json,
-													int len,
-													int encoding,
-													bool need_escapes);
-
-/* lex one token */
-extern JsonParseErrorType json_lex(JsonLexContext *lex);
-
-/* construct an error detail string for a json error */
-extern char *json_errdetail(JsonParseErrorType error, JsonLexContext *lex);
-
-/*
- * Utility function to check if a string is a valid JSON number.
- *
- * str argument does not need to be nul-terminated.
- */
-extern bool IsValidJsonNumber(const char *str, int len);
-
-#endif							/* JSONAPI_H */
diff --git a/contrib/libs/libpq/src/include/common/keywords.h b/contrib/libs/libpq/src/include/common/keywords.h
deleted file mode 100644
index 6bb12d8edb..0000000000
--- a/contrib/libs/libpq/src/include/common/keywords.h
+++ /dev/null
@@ -1,29 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * keywords.h
- *	  PostgreSQL's list of SQL keywords
- *
- *
- * Portions Copyright (c) 1996-2023, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- * src/include/common/keywords.h
- *
- *-------------------------------------------------------------------------
- */
-#ifndef KEYWORDS_H
-#define KEYWORDS_H
-
-#include "common/kwlookup.h"
-
-/* Keyword categories --- should match lists in gram.y */
-#define UNRESERVED_KEYWORD		0
-#define COL_NAME_KEYWORD		1
-#define TYPE_FUNC_NAME_KEYWORD	2
-#define RESERVED_KEYWORD		3
-
-extern PGDLLIMPORT const ScanKeywordList ScanKeywords;
-extern PGDLLIMPORT const uint8 ScanKeywordCategories[];
-extern PGDLLIMPORT const bool ScanKeywordBareLabel[];
-
-#endif							/* KEYWORDS_H */
diff --git a/contrib/libs/libpq/src/include/common/kwlookup.h b/contrib/libs/libpq/src/include/common/kwlookup.h
deleted file mode 100644
index 3fc3faa043..0000000000
--- a/contrib/libs/libpq/src/include/common/kwlookup.h
+++ /dev/null
@@ -1,44 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * kwlookup.h
- *	  Key word lookup for PostgreSQL
- *
- *
- * Portions Copyright (c) 1996-2023, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- * src/include/common/kwlookup.h
- *
- *-------------------------------------------------------------------------
- */
-#ifndef KWLOOKUP_H
-#define KWLOOKUP_H
-
-/* Hash function used by ScanKeywordLookup */
-typedef int (*ScanKeywordHashFunc) (const void *key, size_t keylen);
-
-/*
- * This struct contains the data needed by ScanKeywordLookup to perform a
- * search within a set of keywords.  The contents are typically generated by
- * src/tools/gen_keywordlist.pl from a header containing PG_KEYWORD macros.
- */
-typedef struct ScanKeywordList
-{
-	const char *kw_string;		/* all keywords in order, separated by \0 */
-	const uint16 *kw_offsets;	/* offsets to the start of each keyword */
-	ScanKeywordHashFunc hash;	/* perfect hash function for keywords */
-	int			num_keywords;	/* number of keywords */
-	int			max_kw_len;		/* length of longest keyword */
-} ScanKeywordList;
-
-
-extern int	ScanKeywordLookup(const char *str, const ScanKeywordList *keywords);
-
-/* Code that wants to retrieve the text of the N'th keyword should use this. */
-static inline const char *
-GetScanKeyword(int n, const ScanKeywordList *keywords)
-{
-	return keywords->kw_string + keywords->kw_offsets[n];
-}
-
-#endif							/* KWLOOKUP_H */
diff --git a/contrib/libs/libpq/src/include/common/link-canary.h b/contrib/libs/libpq/src/include/common/link-canary.h
deleted file mode 100644
index 178d123b1a..0000000000
--- a/contrib/libs/libpq/src/include/common/link-canary.h
+++ /dev/null
@@ -1,17 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * link-canary.h
- *	  Detect whether src/common functions came from frontend or backend.
- *
- * Copyright (c) 2018-2023, PostgreSQL Global Development Group
- *
- * src/include/common/link-canary.h
- *
- *-------------------------------------------------------------------------
- */
-#ifndef LINK_CANARY_H
-#define LINK_CANARY_H
-
-extern bool pg_link_canary_is_frontend(void);
-
-#endif							/* LINK_CANARY_H */
diff --git a/contrib/libs/libpq/src/include/common/logging.h b/contrib/libs/libpq/src/include/common/logging.h
deleted file mode 100644
index 99e888af93..0000000000
--- a/contrib/libs/libpq/src/include/common/logging.h
+++ /dev/null
@@ -1,156 +0,0 @@
-/*-------------------------------------------------------------------------
- * Logging framework for frontend programs
- *
- * Copyright (c) 2018-2023, PostgreSQL Global Development Group
- *
- * src/include/common/logging.h
- *
- *-------------------------------------------------------------------------
- */
-#ifndef COMMON_LOGGING_H
-#define COMMON_LOGGING_H
-
-/*
- * Log levels are informational only.  They do not affect program flow.
- */
-enum pg_log_level
-{
-	/*
-	 * Not initialized yet (not to be used as an actual message log level).
-	 */
-	PG_LOG_NOTSET = 0,
-
-	/*
-	 * Low level messages that are normally off by default.
-	 */
-	PG_LOG_DEBUG,
-
-	/*
-	 * Any program messages that go to stderr, shown by default.  (The
-	 * program's normal output should go to stdout and not use the logging
-	 * system.)
-	 */
-	PG_LOG_INFO,
-
-	/*
-	 * Warnings and "almost" errors, depends on the program
-	 */
-	PG_LOG_WARNING,
-
-	/*
-	 * Errors
-	 */
-	PG_LOG_ERROR,
-
-	/*
-	 * Turn all logging off (not to be used as an actual message log level).
-	 */
-	PG_LOG_OFF,
-};
-
-/*
- * __pg_log_level is the minimum log level that will actually be shown.
- */
-extern enum pg_log_level __pg_log_level;
-
-/*
- * A log message can have several parts.  The primary message is required,
- * others are optional.  When emitting multiple parts, do so in the order of
- * this enum, for consistency.
- */
-enum pg_log_part
-{
-	/*
-	 * The primary message.  Try to keep it to one line; follow the backend's
-	 * style guideline for primary messages.
-	 */
-	PG_LOG_PRIMARY,
-
-	/*
-	 * Additional detail.  Follow the backend's style guideline for detail
-	 * messages.
-	 */
-	PG_LOG_DETAIL,
-
-	/*
-	 * Hint (not guaranteed correct) about how to fix the problem.  Follow the
-	 * backend's style guideline for hint messages.
-	 */
-	PG_LOG_HINT,
-};
-
-/*
- * Kind of a hack to be able to produce the psql output exactly as required by
- * the regression tests.
- */
-#define PG_LOG_FLAG_TERSE	1
-
-void		pg_logging_init(const char *argv0);
-void		pg_logging_config(int new_flags);
-void		pg_logging_set_level(enum pg_log_level new_level);
-void		pg_logging_increase_verbosity(void);
-void		pg_logging_set_pre_callback(void (*cb) (void));
-void		pg_logging_set_locus_callback(void (*cb) (const char **filename, uint64 *lineno));
-
-void		pg_log_generic(enum pg_log_level level, enum pg_log_part part,
-						   const char *pg_restrict fmt,...)
-			pg_attribute_printf(3, 4);
-void		pg_log_generic_v(enum pg_log_level level, enum pg_log_part part,
-							 const char *pg_restrict fmt, va_list ap)
-			pg_attribute_printf(3, 0);
-
-/*
- * Preferred style is to use these macros to perform logging; don't call
- * pg_log_generic[_v] directly, except perhaps in error interface code.
- */
-#define pg_log_error(...) \
-	pg_log_generic(PG_LOG_ERROR, PG_LOG_PRIMARY, __VA_ARGS__)
-
-#define pg_log_error_detail(...) \
-	pg_log_generic(PG_LOG_ERROR, PG_LOG_DETAIL, __VA_ARGS__)
-
-#define pg_log_error_hint(...) \
-	pg_log_generic(PG_LOG_ERROR, PG_LOG_HINT, __VA_ARGS__)
-
-#define pg_log_warning(...) \
-	pg_log_generic(PG_LOG_WARNING, PG_LOG_PRIMARY, __VA_ARGS__)
-
-#define pg_log_warning_detail(...) \
-	pg_log_generic(PG_LOG_WARNING, PG_LOG_DETAIL, __VA_ARGS__)
-
-#define pg_log_warning_hint(...) \
-	pg_log_generic(PG_LOG_WARNING, PG_LOG_HINT, __VA_ARGS__)
-
-#define pg_log_info(...) \
-	pg_log_generic(PG_LOG_INFO, PG_LOG_PRIMARY, __VA_ARGS__)
-
-#define pg_log_info_detail(...) \
-	pg_log_generic(PG_LOG_INFO, PG_LOG_DETAIL, __VA_ARGS__)
-
-#define pg_log_info_hint(...) \
-	pg_log_generic(PG_LOG_INFO, PG_LOG_HINT, __VA_ARGS__)
-
-#define pg_log_debug(...) do { \
-		if (unlikely(__pg_log_level <= PG_LOG_DEBUG)) \
-			pg_log_generic(PG_LOG_DEBUG, PG_LOG_PRIMARY, __VA_ARGS__); \
-	} while(0)
-
-#define pg_log_debug_detail(...) do { \
-		if (unlikely(__pg_log_level <= PG_LOG_DEBUG)) \
-			pg_log_generic(PG_LOG_DEBUG, PG_LOG_DETAIL, __VA_ARGS__); \
-	} while(0)
-
-#define pg_log_debug_hint(...) do { \
-		if (unlikely(__pg_log_level <= PG_LOG_DEBUG)) \
-			pg_log_generic(PG_LOG_DEBUG, PG_LOG_HINT, __VA_ARGS__); \
-	} while(0)
-
-/*
- * A common shortcut: pg_log_error() and immediately exit(1).
- */
-#define pg_fatal(...) do { \
-		pg_log_generic(PG_LOG_ERROR, PG_LOG_PRIMARY, __VA_ARGS__); \
-		exit(1); \
-	} while(0)
-
-#endif							/* COMMON_LOGGING_H */
diff --git a/contrib/libs/libpq/src/include/common/md5.h b/contrib/libs/libpq/src/include/common/md5.h
deleted file mode 100644
index b6089bacff..0000000000
--- a/contrib/libs/libpq/src/include/common/md5.h
+++ /dev/null
@@ -1,37 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * md5.h
- *	  Constants and common utilities related to MD5.
- *
- * These definitions are needed by both frontend and backend code to work
- * with MD5-encrypted passwords.
- *
- * Portions Copyright (c) 1996-2023, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- * src/include/common/md5.h
- *
- *-------------------------------------------------------------------------
- */
-#ifndef PG_MD5_H
-#define PG_MD5_H
-
-/* Size of result generated by MD5 computation */
-#define MD5_DIGEST_LENGTH 16
-/* Block size for MD5 */
-#define MD5_BLOCK_SIZE	64
-
-/* password-related data */
-#define MD5_PASSWD_CHARSET	"0123456789abcdef"
-#define MD5_PASSWD_LEN	35
-
-/* Utilities common to all the MD5 implementations, as of md5_common.c */
-extern bool pg_md5_hash(const void *buff, size_t len, char *hexsum,
-						const char **errstr);
-extern bool pg_md5_binary(const void *buff, size_t len, void *outbuf,
-						  const char **errstr);
-extern bool pg_md5_encrypt(const char *passwd, const char *salt,
-						   size_t salt_len, char *buf,
-						   const char **errstr);
-
-#endif							/* PG_MD5_H */
diff --git a/contrib/libs/libpq/src/include/common/openssl.h b/contrib/libs/libpq/src/include/common/openssl.h
deleted file mode 100644
index 060675ab33..0000000000
--- a/contrib/libs/libpq/src/include/common/openssl.h
+++ /dev/null
@@ -1,49 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * openssl.h
- *	  OpenSSL supporting functionality shared between frontend and backend
- *
- * Portions Copyright (c) 1996-2023, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- * IDENTIFICATION
- *		  src/include/common/openssl.h
- *
- *-------------------------------------------------------------------------
- */
-#ifndef COMMON_OPENSSL_H
-#define COMMON_OPENSSL_H
-
-#ifdef USE_OPENSSL
-#include <openssl/ssl.h>
-
-/*
- * OpenSSL doesn't provide any very nice way to identify the min/max
- * protocol versions the library supports, so we fake it as best we can.
- * Note in particular that this doesn't account for restrictions that
- * might be specified in the installation's openssl.cnf.
- *
- * We disable SSLv3 and older in library setup, so TLSv1 is the oldest
- * protocol version of interest.
- */
-#define MIN_OPENSSL_TLS_VERSION  "TLSv1"
-
-#if defined(TLS1_3_VERSION)
-#define MAX_OPENSSL_TLS_VERSION  "TLSv1.3"
-#elif defined(TLS1_2_VERSION)
-#define MAX_OPENSSL_TLS_VERSION  "TLSv1.2"
-#elif defined(TLS1_1_VERSION)
-#define MAX_OPENSSL_TLS_VERSION  "TLSv1.1"
-#else
-#define MAX_OPENSSL_TLS_VERSION  "TLSv1"
-#endif
-
-/* src/common/protocol_openssl.c */
-#ifndef SSL_CTX_set_min_proto_version
-extern int	SSL_CTX_set_min_proto_version(SSL_CTX *ctx, int version);
-extern int	SSL_CTX_set_max_proto_version(SSL_CTX *ctx, int version);
-#endif
-
-#endif							/* USE_OPENSSL */
-
-#endif							/* COMMON_OPENSSL_H */
diff --git a/contrib/libs/libpq/src/include/common/percentrepl.h b/contrib/libs/libpq/src/include/common/percentrepl.h
deleted file mode 100644
index 0efb6ecb5b..0000000000
--- a/contrib/libs/libpq/src/include/common/percentrepl.h
+++ /dev/null
@@ -1,18 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * percentrepl.h
- *	  Common routines to replace percent placeholders in strings
- *
- * Portions Copyright (c) 1996-2023, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- * src/include/common/percentrepl.h
- *
- *-------------------------------------------------------------------------
- */
-#ifndef PERCENTREPL_H
-#define PERCENTREPL_H
-
-extern char *replace_percent_placeholders(const char *instr, const char *param_name, const char *letters,...);
-
-#endif							/* PERCENTREPL_H */
diff --git a/contrib/libs/libpq/src/include/common/pg_lzcompress.h b/contrib/libs/libpq/src/include/common/pg_lzcompress.h
deleted file mode 100644
index 2a12b33a00..0000000000
--- a/contrib/libs/libpq/src/include/common/pg_lzcompress.h
+++ /dev/null
@@ -1,93 +0,0 @@
-/* ----------
- * pg_lzcompress.h -
- *
- *	Definitions for the builtin LZ compressor
- *
- * src/include/common/pg_lzcompress.h
- * ----------
- */
-
-#ifndef _PG_LZCOMPRESS_H_
-#define _PG_LZCOMPRESS_H_
-
-
-/* ----------
- * PGLZ_MAX_OUTPUT -
- *
- *		Macro to compute the buffer size required by pglz_compress().
- *		We allow 4 bytes for overrun before detecting compression failure.
- * ----------
- */
-#define PGLZ_MAX_OUTPUT(_dlen)			((_dlen) + 4)
-
-
-/* ----------
- * PGLZ_Strategy -
- *
- *		Some values that control the compression algorithm.
- *
- *		min_input_size		Minimum input data size to consider compression.
- *
- *		max_input_size		Maximum input data size to consider compression.
- *
- *		min_comp_rate		Minimum compression rate (0-99%) to require.
- *							Regardless of min_comp_rate, the output must be
- *							smaller than the input, else we don't store
- *							compressed.
- *
- *		first_success_by	Abandon compression if we find no compressible
- *							data within the first this-many bytes.
- *
- *		match_size_good		The initial GOOD match size when starting history
- *							lookup. When looking up the history to find a
- *							match that could be expressed as a tag, the
- *							algorithm does not always walk back entirely.
- *							A good match fast is usually better than the
- *							best possible one very late. For each iteration
- *							in the lookup, this value is lowered so the
- *							longer the lookup takes, the smaller matches
- *							are considered good.
- *
- *		match_size_drop		The percentage by which match_size_good is lowered
- *							after each history check. Allowed values are
- *							0 (no change until end) to 100 (only check
- *							latest history entry at all).
- * ----------
- */
-typedef struct PGLZ_Strategy
-{
-	int32		min_input_size;
-	int32		max_input_size;
-	int32		min_comp_rate;
-	int32		first_success_by;
-	int32		match_size_good;
-	int32		match_size_drop;
-} PGLZ_Strategy;
-
-
-/* ----------
- * The standard strategies
- *
- *		PGLZ_strategy_default		Recommended default strategy for TOAST.
- *
- *		PGLZ_strategy_always		Try to compress inputs of any length.
- *									Fallback to uncompressed storage only if
- *									output would be larger than input.
- * ----------
- */
-extern PGDLLIMPORT const PGLZ_Strategy *const PGLZ_strategy_default;
-extern PGDLLIMPORT const PGLZ_Strategy *const PGLZ_strategy_always;
-
-
-/* ----------
- * Global function declarations
- * ----------
- */
-extern int32 pglz_compress(const char *source, int32 slen, char *dest,
-						   const PGLZ_Strategy *strategy);
-extern int32 pglz_decompress(const char *source, int32 slen, char *dest,
-							 int32 rawsize, bool check_complete);
-extern int32 pglz_maximum_compressed_size(int32 rawsize,
-										  int32 total_compressed_size);
-
-#endif							/* _PG_LZCOMPRESS_H_ */
diff --git a/contrib/libs/libpq/src/include/common/pg_prng.h b/contrib/libs/libpq/src/include/common/pg_prng.h
deleted file mode 100644
index b5c0b8d288..0000000000
--- a/contrib/libs/libpq/src/include/common/pg_prng.h
+++ /dev/null
@@ -1,61 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * Pseudo-Random Number Generator
- *
- * Copyright (c) 2021-2023, PostgreSQL Global Development Group
- *
- * src/include/common/pg_prng.h
- *
- *-------------------------------------------------------------------------
- */
-#ifndef PG_PRNG_H
-#define PG_PRNG_H
-
-/*
- * State vector for PRNG generation.  Callers should treat this as an
- * opaque typedef, but we expose its definition to allow it to be
- * embedded in other structs.
- */
-typedef struct pg_prng_state
-{
-	uint64		s0,
-				s1;
-} pg_prng_state;
-
-/*
- * Callers not needing local PRNG series may use this global state vector,
- * after initializing it with one of the pg_prng_...seed functions.
- */
-extern PGDLLIMPORT pg_prng_state pg_global_prng_state;
-
-extern void pg_prng_seed(pg_prng_state *state, uint64 seed);
-extern void pg_prng_fseed(pg_prng_state *state, double fseed);
-extern bool pg_prng_seed_check(pg_prng_state *state);
-
-/*
- * Initialize the PRNG state from the pg_strong_random source,
- * taking care that we don't produce all-zeroes.  If this returns false,
- * caller should initialize the PRNG state from some other random seed,
- * using pg_prng_[f]seed.
- *
- * We implement this as a macro, so that the pg_strong_random() call is
- * in the caller.  If it were in pg_prng.c, programs using pg_prng.c
- * but not needing strong seeding would nonetheless be forced to pull in
- * pg_strong_random.c and thence OpenSSL.
- */
-#define pg_prng_strong_seed(state) \
-	(pg_strong_random((void *) (state), sizeof(pg_prng_state)) ? \
-	 pg_prng_seed_check(state) : false)
-
-extern uint64 pg_prng_uint64(pg_prng_state *state);
-extern uint64 pg_prng_uint64_range(pg_prng_state *state, uint64 rmin, uint64 rmax);
-extern int64 pg_prng_int64(pg_prng_state *state);
-extern int64 pg_prng_int64p(pg_prng_state *state);
-extern uint32 pg_prng_uint32(pg_prng_state *state);
-extern int32 pg_prng_int32(pg_prng_state *state);
-extern int32 pg_prng_int32p(pg_prng_state *state);
-extern double pg_prng_double(pg_prng_state *state);
-extern double pg_prng_double_normal(pg_prng_state *state);
-extern bool pg_prng_bool(pg_prng_state *state);
-
-#endif							/* PG_PRNG_H */
diff --git a/contrib/libs/libpq/src/include/common/relpath.h b/contrib/libs/libpq/src/include/common/relpath.h
deleted file mode 100644
index 511c21682e..0000000000
--- a/contrib/libs/libpq/src/include/common/relpath.h
+++ /dev/null
@@ -1,97 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * relpath.h
- *		Declarations for GetRelationPath() and friends
- *
- * Portions Copyright (c) 1996-2023, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- * src/include/common/relpath.h
- *
- *-------------------------------------------------------------------------
- */
-#ifndef RELPATH_H
-#define RELPATH_H
-
-/*
- *	'pgrminclude ignore' needed here because CppAsString2() does not throw
- *	an error if the symbol is not defined.
- */
-#include "catalog/catversion.h" /* pgrminclude ignore */
-
-/*
- * RelFileNumber data type identifies the specific relation file name.
- */
-typedef Oid RelFileNumber;
-#define InvalidRelFileNumber		((RelFileNumber) InvalidOid)
-#define RelFileNumberIsValid(relnumber) \
-				((bool) ((relnumber) != InvalidRelFileNumber))
-
-/*
- * Name of major-version-specific tablespace subdirectories
- */
-#define TABLESPACE_VERSION_DIRECTORY	"PG_" PG_MAJORVERSION "_" \
-									CppAsString2(CATALOG_VERSION_NO)
-
-/* Characters to allow for an OID in a relation path */
-#define OIDCHARS		10		/* max chars printed by %u */
-
-/*
- * Stuff for fork names.
- *
- * The physical storage of a relation consists of one or more forks.
- * The main fork is always created, but in addition to that there can be
- * additional forks for storing various metadata. ForkNumber is used when
- * we need to refer to a specific fork in a relation.
- */
-typedef enum ForkNumber
-{
-	InvalidForkNumber = -1,
-	MAIN_FORKNUM = 0,
-	FSM_FORKNUM,
-	VISIBILITYMAP_FORKNUM,
-	INIT_FORKNUM
-
-	/*
-	 * NOTE: if you add a new fork, change MAX_FORKNUM and possibly
-	 * FORKNAMECHARS below, and update the forkNames array in
-	 * src/common/relpath.c
-	 */
-} ForkNumber;
-
-#define MAX_FORKNUM		INIT_FORKNUM
-
-#define FORKNAMECHARS	4		/* max chars for a fork name */
-
-extern PGDLLIMPORT const char *const forkNames[];
-
-extern ForkNumber forkname_to_number(const char *forkName);
-extern int	forkname_chars(const char *str, ForkNumber *fork);
-
-/*
- * Stuff for computing filesystem pathnames for relations.
- */
-extern char *GetDatabasePath(Oid dbOid, Oid spcOid);
-
-extern char *GetRelationPath(Oid dbOid, Oid spcOid, RelFileNumber relNumber,
-							 int backendId, ForkNumber forkNumber);
-
-/*
- * Wrapper macros for GetRelationPath.  Beware of multiple
- * evaluation of the RelFileLocator or RelFileLocatorBackend argument!
- */
-
-/* First argument is a RelFileLocator */
-#define relpathbackend(rlocator, backend, forknum) \
-	GetRelationPath((rlocator).dbOid, (rlocator).spcOid, (rlocator).relNumber, \
-					backend, forknum)
-
-/* First argument is a RelFileLocator */
-#define relpathperm(rlocator, forknum) \
-	relpathbackend(rlocator, InvalidBackendId, forknum)
-
-/* First argument is a RelFileLocatorBackend */
-#define relpath(rlocator, forknum) \
-	relpathbackend((rlocator).locator, (rlocator).backend, forknum)
-
-#endif							/* RELPATH_H */
diff --git a/contrib/libs/libpq/src/include/common/restricted_token.h b/contrib/libs/libpq/src/include/common/restricted_token.h
deleted file mode 100644
index d4077c7661..0000000000
--- a/contrib/libs/libpq/src/include/common/restricted_token.h
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- *	restricted_token.h
- *		helper routine to ensure restricted token on Windows
- *
- *	Portions Copyright (c) 1996-2023, PostgreSQL Global Development Group
- *	Portions Copyright (c) 1994, Regents of the University of California
- *
- *	src/include/common/restricted_token.h
- */
-#ifndef COMMON_RESTRICTED_TOKEN_H
-#define COMMON_RESTRICTED_TOKEN_H
-
-/*
- * On Windows make sure that we are running with a restricted token,
- * On other platforms do nothing.
- */
-void		get_restricted_token(void);
-
-#ifdef WIN32
-/* Create a restricted token and execute the specified process with it. */
-HANDLE		CreateRestrictedProcess(char *cmd, PROCESS_INFORMATION *processInfo);
-#endif
-
-#endif							/* COMMON_RESTRICTED_TOKEN_H */
diff --git a/contrib/libs/libpq/src/include/common/saslprep.h b/contrib/libs/libpq/src/include/common/saslprep.h
deleted file mode 100644
index f622db962f..0000000000
--- a/contrib/libs/libpq/src/include/common/saslprep.h
+++ /dev/null
@@ -1,30 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * saslprep.h
- *	  SASLprep normalization, for SCRAM authentication
- *
- * These definitions are used by both frontend and backend code.
- *
- * Copyright (c) 2017-2023, PostgreSQL Global Development Group
- *
- * src/include/common/saslprep.h
- *
- *-------------------------------------------------------------------------
- */
-#ifndef SASLPREP_H
-#define SASLPREP_H
-
-/*
- * Return codes for pg_saslprep() function.
- */
-typedef enum
-{
-	SASLPREP_SUCCESS = 0,
-	SASLPREP_OOM = -1,			/* out of memory (only in frontend) */
-	SASLPREP_INVALID_UTF8 = -2, /* input is not a valid UTF-8 string */
-	SASLPREP_PROHIBITED = -3	/* output would contain prohibited characters */
-} pg_saslprep_rc;
-
-extern pg_saslprep_rc pg_saslprep(const char *input, char **output);
-
-#endif							/* SASLPREP_H */
diff --git a/contrib/libs/libpq/src/include/common/scram-common.h b/contrib/libs/libpq/src/include/common/scram-common.h
deleted file mode 100644
index 5ccff96ece..0000000000
--- a/contrib/libs/libpq/src/include/common/scram-common.h
+++ /dev/null
@@ -1,70 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * scram-common.h
- *		Declarations for helper functions used for SCRAM authentication
- *
- * Portions Copyright (c) 1996-2023, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- * src/include/common/scram-common.h
- *
- *-------------------------------------------------------------------------
- */
-#ifndef SCRAM_COMMON_H
-#define SCRAM_COMMON_H
-
-#include "common/cryptohash.h"
-#include "common/sha2.h"
-
-/* Name of SCRAM mechanisms per IANA */
-#define SCRAM_SHA_256_NAME "SCRAM-SHA-256"
-#define SCRAM_SHA_256_PLUS_NAME "SCRAM-SHA-256-PLUS"	/* with channel binding */
-
-/* Length of SCRAM keys (client and server) */
-#define SCRAM_SHA_256_KEY_LEN				PG_SHA256_DIGEST_LENGTH
-
-/*
- * Size of buffers used internally by SCRAM routines, that should be the
- * maximum of SCRAM_SHA_*_KEY_LEN among the hash methods supported.
- */
-#define SCRAM_MAX_KEY_LEN					SCRAM_SHA_256_KEY_LEN
-
-/*
- * Size of random nonce generated in the authentication exchange.  This
- * is in "raw" number of bytes, the actual nonces sent over the wire are
- * encoded using only ASCII-printable characters.
- */
-#define SCRAM_RAW_NONCE_LEN			18
-
-/*
- * Length of salt when generating new secrets, in bytes.  (It will be stored
- * and sent over the wire encoded in Base64.)  16 bytes is what the example in
- * RFC 7677 uses.
- */
-#define SCRAM_DEFAULT_SALT_LEN		16
-
-/*
- * Default number of iterations when generating secret.  Should be at least
- * 4096 per RFC 7677.
- */
-#define SCRAM_SHA_256_DEFAULT_ITERATIONS	4096
-
-extern int	scram_SaltedPassword(const char *password,
-								 pg_cryptohash_type hash_type, int key_length,
-								 const char *salt, int saltlen, int iterations,
-								 uint8 *result, const char **errstr);
-extern int	scram_H(const uint8 *input, pg_cryptohash_type hash_type,
-					int key_length, uint8 *result,
-					const char **errstr);
-extern int	scram_ClientKey(const uint8 *salted_password,
-							pg_cryptohash_type hash_type, int key_length,
-							uint8 *result, const char **errstr);
-extern int	scram_ServerKey(const uint8 *salted_password,
-							pg_cryptohash_type hash_type, int key_length,
-							uint8 *result, const char **errstr);
-
-extern char *scram_build_secret(pg_cryptohash_type hash_type, int key_length,
-								const char *salt, int saltlen, int iterations,
-								const char *password, const char **errstr);
-
-#endif							/* SCRAM_COMMON_H */
diff --git a/contrib/libs/libpq/src/include/common/sha1.h b/contrib/libs/libpq/src/include/common/sha1.h
deleted file mode 100644
index e6933d96bb..0000000000
--- a/contrib/libs/libpq/src/include/common/sha1.h
+++ /dev/null
@@ -1,21 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * sha1.h
- *	  Constants related to SHA1.
- *
- * Portions Copyright (c) 1996-2023, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- * src/include/common/sha1.h
- *
- *-------------------------------------------------------------------------
- */
-#ifndef PG_SHA1_H
-#define PG_SHA1_H
-
-/* Size of result generated by SHA1 computation */
-#define SHA1_DIGEST_LENGTH 20
-/* Block size for SHA1 */
-#define SHA1_BLOCK_SIZE 64
-
-#endif							/* PG_SHA1_H */
diff --git a/contrib/libs/libpq/src/include/common/sha2.h b/contrib/libs/libpq/src/include/common/sha2.h
deleted file mode 100644
index 9b46cd1a37..0000000000
--- a/contrib/libs/libpq/src/include/common/sha2.h
+++ /dev/null
@@ -1,32 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * sha2.h
- *	  Constants related to SHA224, 256, 384 AND 512.
- *
- * Portions Copyright (c) 1996-2023, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- * IDENTIFICATION
- *		  src/include/common/sha2.h
- *
- *-------------------------------------------------------------------------
- */
-
-#ifndef _PG_SHA2_H_
-#define _PG_SHA2_H_
-
-/*** SHA224/256/384/512 Various Length Definitions ***********************/
-#define PG_SHA224_BLOCK_LENGTH			64
-#define PG_SHA224_DIGEST_LENGTH			28
-#define PG_SHA224_DIGEST_STRING_LENGTH	(PG_SHA224_DIGEST_LENGTH * 2 + 1)
-#define PG_SHA256_BLOCK_LENGTH			64
-#define PG_SHA256_DIGEST_LENGTH			32
-#define PG_SHA256_DIGEST_STRING_LENGTH	(PG_SHA256_DIGEST_LENGTH * 2 + 1)
-#define PG_SHA384_BLOCK_LENGTH			128
-#define PG_SHA384_DIGEST_LENGTH			48
-#define PG_SHA384_DIGEST_STRING_LENGTH	(PG_SHA384_DIGEST_LENGTH * 2 + 1)
-#define PG_SHA512_BLOCK_LENGTH			128
-#define PG_SHA512_DIGEST_LENGTH			64
-#define PG_SHA512_DIGEST_STRING_LENGTH	(PG_SHA512_DIGEST_LENGTH * 2 + 1)
-
-#endif							/* _PG_SHA2_H_ */
diff --git a/contrib/libs/libpq/src/include/common/shortest_dec.h b/contrib/libs/libpq/src/include/common/shortest_dec.h
deleted file mode 100644
index 8479b98575..0000000000
--- a/contrib/libs/libpq/src/include/common/shortest_dec.h
+++ /dev/null
@@ -1,63 +0,0 @@
-/*---------------------------------------------------------------------------
- *
- * Ryu floating-point output.
- *
- * Portions Copyright (c) 2018-2023, PostgreSQL Global Development Group
- *
- * IDENTIFICATION
- *	  src/include/common/shortest_dec.h
- *
- * This is a modification of code taken from github.com/ulfjack/ryu under the
- * terms of the Boost license (not the Apache license). The original copyright
- * notice follows:
- *
- * Copyright 2018 Ulf Adams
- *
- * The contents of this file may be used under the terms of the Apache
- * License, Version 2.0.
- *
- *     (See accompanying file LICENSE-Apache or copy at
- *      http://www.apache.org/licenses/LICENSE-2.0)
- *
- * Alternatively, the contents of this file may be used under the terms of the
- * Boost Software License, Version 1.0.
- *
- *     (See accompanying file LICENSE-Boost or copy at
- *      https://www.boost.org/LICENSE_1_0.txt)
- *
- * Unless required by applicable law or agreed to in writing, this software is
- * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.
- *
- *---------------------------------------------------------------------------
- */
-#ifndef SHORTEST_DEC_H
-#define SHORTEST_DEC_H
-
-/*----
- * The length of 25 comes from:
- *
- * Case 1: -9.9999999999999999e-299  = 24 bytes, plus 1 for null
- *
- * Case 2: -0.00099999999999999999   = 23 bytes, plus 1 for null
- */
-#define DOUBLE_SHORTEST_DECIMAL_LEN 25
-
-int			double_to_shortest_decimal_bufn(double f, char *result);
-int			double_to_shortest_decimal_buf(double f, char *result);
-char	   *double_to_shortest_decimal(double f);
-
-/*
- * The length of 16 comes from:
- *
- * Case 1: -9.99999999e+29  = 15 bytes, plus 1 for null
- *
- * Case 2: -0.000999999999  = 15 bytes, plus 1 for null
- */
-#define FLOAT_SHORTEST_DECIMAL_LEN 16
-
-int			float_to_shortest_decimal_bufn(float f, char *result);
-int			float_to_shortest_decimal_buf(float f, char *result);
-char	   *float_to_shortest_decimal(float f);
-
-#endif							/* SHORTEST_DEC_H */
diff --git a/contrib/libs/libpq/src/include/common/string.h b/contrib/libs/libpq/src/include/common/string.h
deleted file mode 100644
index 977ef327d0..0000000000
--- a/contrib/libs/libpq/src/include/common/string.h
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- *	string.h
- *		string handling helpers
- *
- *	Portions Copyright (c) 1996-2023, PostgreSQL Global Development Group
- *	Portions Copyright (c) 1994, Regents of the University of California
- *
- *	src/include/common/string.h
- */
-#ifndef COMMON_STRING_H
-#define COMMON_STRING_H
-
-#include <signal.h>
-
-struct StringInfoData;			/* avoid including stringinfo.h here */
-
-typedef struct PromptInterruptContext
-{
-	/* To avoid including <setjmp.h> here, jmpbuf is declared "void *" */
-	void	   *jmpbuf;			/* existing longjmp buffer */
-	volatile sig_atomic_t *enabled; /* flag that enables longjmp-on-interrupt */
-	bool		canceled;		/* indicates whether cancellation occurred */
-} PromptInterruptContext;
-
-/* functions in src/common/string.c */
-extern bool pg_str_endswith(const char *str, const char *end);
-extern int	strtoint(const char *pg_restrict str, char **pg_restrict endptr,
-					 int base);
-extern char *pg_clean_ascii(const char *str, int alloc_flags);
-extern int	pg_strip_crlf(char *str);
-extern bool pg_is_ascii(const char *str);
-
-/* functions in src/common/pg_get_line.c */
-extern char *pg_get_line(FILE *stream, PromptInterruptContext *prompt_ctx);
-extern bool pg_get_line_buf(FILE *stream, struct StringInfoData *buf);
-extern bool pg_get_line_append(FILE *stream, struct StringInfoData *buf,
-							   PromptInterruptContext *prompt_ctx);
-
-/* functions in src/common/sprompt.c */
-extern char *simple_prompt(const char *prompt, bool echo);
-extern char *simple_prompt_extended(const char *prompt, bool echo,
-									PromptInterruptContext *prompt_ctx);
-
-#endif							/* COMMON_STRING_H */
diff --git a/contrib/libs/libpq/src/include/common/unicode_east_asian_fw_table.h b/contrib/libs/libpq/src/include/common/unicode_east_asian_fw_table.h
deleted file mode 100644
index f77e6dfd42..0000000000
--- a/contrib/libs/libpq/src/include/common/unicode_east_asian_fw_table.h
+++ /dev/null
@@ -1,125 +0,0 @@
-/* generated by src/common/unicode/generate-unicode_east_asian_fw_table.pl, do not edit */
-
-static const struct mbinterval east_asian_fw[] = {
-	{0x1100, 0x115F},
-	{0x231A, 0x231B},
-	{0x2329, 0x232A},
-	{0x23E9, 0x23EC},
-	{0x23F0, 0x23F0},
-	{0x23F3, 0x23F3},
-	{0x25FD, 0x25FE},
-	{0x2614, 0x2615},
-	{0x2648, 0x2653},
-	{0x267F, 0x267F},
-	{0x2693, 0x2693},
-	{0x26A1, 0x26A1},
-	{0x26AA, 0x26AB},
-	{0x26BD, 0x26BE},
-	{0x26C4, 0x26C5},
-	{0x26CE, 0x26CE},
-	{0x26D4, 0x26D4},
-	{0x26EA, 0x26EA},
-	{0x26F2, 0x26F3},
-	{0x26F5, 0x26F5},
-	{0x26FA, 0x26FA},
-	{0x26FD, 0x26FD},
-	{0x2705, 0x2705},
-	{0x270A, 0x270B},
-	{0x2728, 0x2728},
-	{0x274C, 0x274C},
-	{0x274E, 0x274E},
-	{0x2753, 0x2755},
-	{0x2757, 0x2757},
-	{0x2795, 0x2797},
-	{0x27B0, 0x27B0},
-	{0x27BF, 0x27BF},
-	{0x2B1B, 0x2B1C},
-	{0x2B50, 0x2B50},
-	{0x2B55, 0x2B55},
-	{0x2E80, 0x2E99},
-	{0x2E9B, 0x2EF3},
-	{0x2F00, 0x2FD5},
-	{0x2FF0, 0x2FFB},
-	{0x3000, 0x303E},
-	{0x3041, 0x3096},
-	{0x3099, 0x30FF},
-	{0x3105, 0x312F},
-	{0x3131, 0x318E},
-	{0x3190, 0x31E3},
-	{0x31F0, 0x321E},
-	{0x3220, 0x3247},
-	{0x3250, 0x4DBF},
-	{0x4E00, 0xA48C},
-	{0xA490, 0xA4C6},
-	{0xA960, 0xA97C},
-	{0xAC00, 0xD7A3},
-	{0xF900, 0xFAFF},
-	{0xFE10, 0xFE19},
-	{0xFE30, 0xFE52},
-	{0xFE54, 0xFE66},
-	{0xFE68, 0xFE6B},
-	{0xFF01, 0xFF60},
-	{0xFFE0, 0xFFE6},
-	{0x16FE0, 0x16FE4},
-	{0x16FF0, 0x16FF1},
-	{0x17000, 0x187F7},
-	{0x18800, 0x18CD5},
-	{0x18D00, 0x18D08},
-	{0x1AFF0, 0x1AFF3},
-	{0x1AFF5, 0x1AFFB},
-	{0x1AFFD, 0x1AFFE},
-	{0x1B000, 0x1B122},
-	{0x1B132, 0x1B132},
-	{0x1B150, 0x1B152},
-	{0x1B155, 0x1B155},
-	{0x1B164, 0x1B167},
-	{0x1B170, 0x1B2FB},
-	{0x1F004, 0x1F004},
-	{0x1F0CF, 0x1F0CF},
-	{0x1F18E, 0x1F18E},
-	{0x1F191, 0x1F19A},
-	{0x1F200, 0x1F202},
-	{0x1F210, 0x1F23B},
-	{0x1F240, 0x1F248},
-	{0x1F250, 0x1F251},
-	{0x1F260, 0x1F265},
-	{0x1F300, 0x1F320},
-	{0x1F32D, 0x1F335},
-	{0x1F337, 0x1F37C},
-	{0x1F37E, 0x1F393},
-	{0x1F3A0, 0x1F3CA},
-	{0x1F3CF, 0x1F3D3},
-	{0x1F3E0, 0x1F3F0},
-	{0x1F3F4, 0x1F3F4},
-	{0x1F3F8, 0x1F43E},
-	{0x1F440, 0x1F440},
-	{0x1F442, 0x1F4FC},
-	{0x1F4FF, 0x1F53D},
-	{0x1F54B, 0x1F54E},
-	{0x1F550, 0x1F567},
-	{0x1F57A, 0x1F57A},
-	{0x1F595, 0x1F596},
-	{0x1F5A4, 0x1F5A4},
-	{0x1F5FB, 0x1F64F},
-	{0x1F680, 0x1F6C5},
-	{0x1F6CC, 0x1F6CC},
-	{0x1F6D0, 0x1F6D2},
-	{0x1F6D5, 0x1F6D7},
-	{0x1F6DC, 0x1F6DF},
-	{0x1F6EB, 0x1F6EC},
-	{0x1F6F4, 0x1F6FC},
-	{0x1F7E0, 0x1F7EB},
-	{0x1F7F0, 0x1F7F0},
-	{0x1F90C, 0x1F93A},
-	{0x1F93C, 0x1F945},
-	{0x1F947, 0x1F9FF},
-	{0x1FA70, 0x1FA7C},
-	{0x1FA80, 0x1FA88},
-	{0x1FA90, 0x1FABD},
-	{0x1FABF, 0x1FAC5},
-	{0x1FACE, 0x1FADB},
-	{0x1FAE0, 0x1FAE8},
-	{0x1FAF0, 0x1FAF8},
-	{0x20000, 0x2FFFD},
-	{0x30000, 0x3FFFD},
-};
diff --git a/contrib/libs/libpq/src/include/common/unicode_nonspacing_table.h b/contrib/libs/libpq/src/include/common/unicode_nonspacing_table.h
deleted file mode 100644
index 8d00e127fc..0000000000
--- a/contrib/libs/libpq/src/include/common/unicode_nonspacing_table.h
+++ /dev/null
@@ -1,326 +0,0 @@
-/* generated by src/common/unicode/generate-unicode_nonspacing_table.pl, do not edit */
-
-static const struct mbinterval nonspacing[] = {
-	{0x00AD, 0x00AD},
-	{0x0300, 0x036F},
-	{0x0483, 0x0489},
-	{0x0591, 0x05BD},
-	{0x05BF, 0x05BF},
-	{0x05C1, 0x05C2},
-	{0x05C4, 0x05C5},
-	{0x05C7, 0x05C7},
-	{0x0600, 0x0605},
-	{0x0610, 0x061A},
-	{0x061C, 0x061C},
-	{0x064B, 0x065F},
-	{0x0670, 0x0670},
-	{0x06D6, 0x06DD},
-	{0x06DF, 0x06E4},
-	{0x06E7, 0x06E8},
-	{0x06EA, 0x06ED},
-	{0x070F, 0x070F},
-	{0x0711, 0x0711},
-	{0x0730, 0x074A},
-	{0x07A6, 0x07B0},
-	{0x07EB, 0x07F3},
-	{0x07FD, 0x07FD},
-	{0x0816, 0x0819},
-	{0x081B, 0x0823},
-	{0x0825, 0x0827},
-	{0x0829, 0x082D},
-	{0x0859, 0x085B},
-	{0x0890, 0x089F},
-	{0x08CA, 0x0902},
-	{0x093A, 0x093A},
-	{0x093C, 0x093C},
-	{0x0941, 0x0948},
-	{0x094D, 0x094D},
-	{0x0951, 0x0957},
-	{0x0962, 0x0963},
-	{0x0981, 0x0981},
-	{0x09BC, 0x09BC},
-	{0x09C1, 0x09C4},
-	{0x09CD, 0x09CD},
-	{0x09E2, 0x09E3},
-	{0x09FE, 0x0A02},
-	{0x0A3C, 0x0A3C},
-	{0x0A41, 0x0A51},
-	{0x0A70, 0x0A71},
-	{0x0A75, 0x0A75},
-	{0x0A81, 0x0A82},
-	{0x0ABC, 0x0ABC},
-	{0x0AC1, 0x0AC8},
-	{0x0ACD, 0x0ACD},
-	{0x0AE2, 0x0AE3},
-	{0x0AFA, 0x0B01},
-	{0x0B3C, 0x0B3C},
-	{0x0B3F, 0x0B3F},
-	{0x0B41, 0x0B44},
-	{0x0B4D, 0x0B56},
-	{0x0B62, 0x0B63},
-	{0x0B82, 0x0B82},
-	{0x0BC0, 0x0BC0},
-	{0x0BCD, 0x0BCD},
-	{0x0C00, 0x0C00},
-	{0x0C04, 0x0C04},
-	{0x0C3C, 0x0C3C},
-	{0x0C3E, 0x0C40},
-	{0x0C46, 0x0C56},
-	{0x0C62, 0x0C63},
-	{0x0C81, 0x0C81},
-	{0x0CBC, 0x0CBC},
-	{0x0CBF, 0x0CBF},
-	{0x0CC6, 0x0CC6},
-	{0x0CCC, 0x0CCD},
-	{0x0CE2, 0x0CE3},
-	{0x0D00, 0x0D01},
-	{0x0D3B, 0x0D3C},
-	{0x0D41, 0x0D44},
-	{0x0D4D, 0x0D4D},
-	{0x0D62, 0x0D63},
-	{0x0D81, 0x0D81},
-	{0x0DCA, 0x0DCA},
-	{0x0DD2, 0x0DD6},
-	{0x0E31, 0x0E31},
-	{0x0E34, 0x0E3A},
-	{0x0E47, 0x0E4E},
-	{0x0EB1, 0x0EB1},
-	{0x0EB4, 0x0EBC},
-	{0x0EC8, 0x0ECE},
-	{0x0F18, 0x0F19},
-	{0x0F35, 0x0F35},
-	{0x0F37, 0x0F37},
-	{0x0F39, 0x0F39},
-	{0x0F71, 0x0F7E},
-	{0x0F80, 0x0F84},
-	{0x0F86, 0x0F87},
-	{0x0F8D, 0x0FBC},
-	{0x0FC6, 0x0FC6},
-	{0x102D, 0x1030},
-	{0x1032, 0x1037},
-	{0x1039, 0x103A},
-	{0x103D, 0x103E},
-	{0x1058, 0x1059},
-	{0x105E, 0x1060},
-	{0x1071, 0x1074},
-	{0x1082, 0x1082},
-	{0x1085, 0x1086},
-	{0x108D, 0x108D},
-	{0x109D, 0x109D},
-	{0x135D, 0x135F},
-	{0x1712, 0x1714},
-	{0x1732, 0x1733},
-	{0x1752, 0x1753},
-	{0x1772, 0x1773},
-	{0x17B4, 0x17B5},
-	{0x17B7, 0x17BD},
-	{0x17C6, 0x17C6},
-	{0x17C9, 0x17D3},
-	{0x17DD, 0x17DD},
-	{0x180B, 0x180F},
-	{0x1885, 0x1886},
-	{0x18A9, 0x18A9},
-	{0x1920, 0x1922},
-	{0x1927, 0x1928},
-	{0x1932, 0x1932},
-	{0x1939, 0x193B},
-	{0x1A17, 0x1A18},
-	{0x1A1B, 0x1A1B},
-	{0x1A56, 0x1A56},
-	{0x1A58, 0x1A60},
-	{0x1A62, 0x1A62},
-	{0x1A65, 0x1A6C},
-	{0x1A73, 0x1A7F},
-	{0x1AB0, 0x1B03},
-	{0x1B34, 0x1B34},
-	{0x1B36, 0x1B3A},
-	{0x1B3C, 0x1B3C},
-	{0x1B42, 0x1B42},
-	{0x1B6B, 0x1B73},
-	{0x1B80, 0x1B81},
-	{0x1BA2, 0x1BA5},
-	{0x1BA8, 0x1BA9},
-	{0x1BAB, 0x1BAD},
-	{0x1BE6, 0x1BE6},
-	{0x1BE8, 0x1BE9},
-	{0x1BED, 0x1BED},
-	{0x1BEF, 0x1BF1},
-	{0x1C2C, 0x1C33},
-	{0x1C36, 0x1C37},
-	{0x1CD0, 0x1CD2},
-	{0x1CD4, 0x1CE0},
-	{0x1CE2, 0x1CE8},
-	{0x1CED, 0x1CED},
-	{0x1CF4, 0x1CF4},
-	{0x1CF8, 0x1CF9},
-	{0x1DC0, 0x1DFF},
-	{0x200B, 0x200F},
-	{0x202A, 0x202E},
-	{0x2060, 0x206F},
-	{0x20D0, 0x20F0},
-	{0x2CEF, 0x2CF1},
-	{0x2D7F, 0x2D7F},
-	{0x2DE0, 0x2DFF},
-	{0x302A, 0x302D},
-	{0x3099, 0x309A},
-	{0xA66F, 0xA672},
-	{0xA674, 0xA67D},
-	{0xA69E, 0xA69F},
-	{0xA6F0, 0xA6F1},
-	{0xA802, 0xA802},
-	{0xA806, 0xA806},
-	{0xA80B, 0xA80B},
-	{0xA825, 0xA826},
-	{0xA82C, 0xA82C},
-	{0xA8C4, 0xA8C5},
-	{0xA8E0, 0xA8F1},
-	{0xA8FF, 0xA8FF},
-	{0xA926, 0xA92D},
-	{0xA947, 0xA951},
-	{0xA980, 0xA982},
-	{0xA9B3, 0xA9B3},
-	{0xA9B6, 0xA9B9},
-	{0xA9BC, 0xA9BD},
-	{0xA9E5, 0xA9E5},
-	{0xAA29, 0xAA2E},
-	{0xAA31, 0xAA32},
-	{0xAA35, 0xAA36},
-	{0xAA43, 0xAA43},
-	{0xAA4C, 0xAA4C},
-	{0xAA7C, 0xAA7C},
-	{0xAAB0, 0xAAB0},
-	{0xAAB2, 0xAAB4},
-	{0xAAB7, 0xAAB8},
-	{0xAABE, 0xAABF},
-	{0xAAC1, 0xAAC1},
-	{0xAAEC, 0xAAED},
-	{0xAAF6, 0xAAF6},
-	{0xABE5, 0xABE5},
-	{0xABE8, 0xABE8},
-	{0xABED, 0xABED},
-	{0xFB1E, 0xFB1E},
-	{0xFE00, 0xFE0F},
-	{0xFE20, 0xFE2F},
-	{0xFEFF, 0xFEFF},
-	{0xFFF9, 0xFFFB},
-	{0x101FD, 0x101FD},
-	{0x102E0, 0x102E0},
-	{0x10376, 0x1037A},
-	{0x10A01, 0x10A0F},
-	{0x10A38, 0x10A3F},
-	{0x10AE5, 0x10AE6},
-	{0x10D24, 0x10D27},
-	{0x10EAB, 0x10EAC},
-	{0x10EFD, 0x10EFF},
-	{0x10F46, 0x10F50},
-	{0x10F82, 0x10F85},
-	{0x11001, 0x11001},
-	{0x11038, 0x11046},
-	{0x11070, 0x11070},
-	{0x11073, 0x11074},
-	{0x1107F, 0x11081},
-	{0x110B3, 0x110B6},
-	{0x110B9, 0x110BA},
-	{0x110BD, 0x110BD},
-	{0x110C2, 0x110CD},
-	{0x11100, 0x11102},
-	{0x11127, 0x1112B},
-	{0x1112D, 0x11134},
-	{0x11173, 0x11173},
-	{0x11180, 0x11181},
-	{0x111B6, 0x111BE},
-	{0x111C9, 0x111CC},
-	{0x111CF, 0x111CF},
-	{0x1122F, 0x11231},
-	{0x11234, 0x11234},
-	{0x11236, 0x11237},
-	{0x1123E, 0x1123E},
-	{0x11241, 0x11241},
-	{0x112DF, 0x112DF},
-	{0x112E3, 0x112EA},
-	{0x11300, 0x11301},
-	{0x1133B, 0x1133C},
-	{0x11340, 0x11340},
-	{0x11366, 0x11374},
-	{0x11438, 0x1143F},
-	{0x11442, 0x11444},
-	{0x11446, 0x11446},
-	{0x1145E, 0x1145E},
-	{0x114B3, 0x114B8},
-	{0x114BA, 0x114BA},
-	{0x114BF, 0x114C0},
-	{0x114C2, 0x114C3},
-	{0x115B2, 0x115B5},
-	{0x115BC, 0x115BD},
-	{0x115BF, 0x115C0},
-	{0x115DC, 0x115DD},
-	{0x11633, 0x1163A},
-	{0x1163D, 0x1163D},
-	{0x1163F, 0x11640},
-	{0x116AB, 0x116AB},
-	{0x116AD, 0x116AD},
-	{0x116B0, 0x116B5},
-	{0x116B7, 0x116B7},
-	{0x1171D, 0x1171F},
-	{0x11722, 0x11725},
-	{0x11727, 0x1172B},
-	{0x1182F, 0x11837},
-	{0x11839, 0x1183A},
-	{0x1193B, 0x1193C},
-	{0x1193E, 0x1193E},
-	{0x11943, 0x11943},
-	{0x119D4, 0x119DB},
-	{0x119E0, 0x119E0},
-	{0x11A01, 0x11A0A},
-	{0x11A33, 0x11A38},
-	{0x11A3B, 0x11A3E},
-	{0x11A47, 0x11A47},
-	{0x11A51, 0x11A56},
-	{0x11A59, 0x11A5B},
-	{0x11A8A, 0x11A96},
-	{0x11A98, 0x11A99},
-	{0x11C30, 0x11C3D},
-	{0x11C3F, 0x11C3F},
-	{0x11C92, 0x11CA7},
-	{0x11CAA, 0x11CB0},
-	{0x11CB2, 0x11CB3},
-	{0x11CB5, 0x11CB6},
-	{0x11D31, 0x11D45},
-	{0x11D47, 0x11D47},
-	{0x11D90, 0x11D91},
-	{0x11D95, 0x11D95},
-	{0x11D97, 0x11D97},
-	{0x11EF3, 0x11EF4},
-	{0x11F00, 0x11F01},
-	{0x11F36, 0x11F3A},
-	{0x11F40, 0x11F40},
-	{0x11F42, 0x11F42},
-	{0x13430, 0x13440},
-	{0x13447, 0x13455},
-	{0x16AF0, 0x16AF4},
-	{0x16B30, 0x16B36},
-	{0x16F4F, 0x16F4F},
-	{0x16F8F, 0x16F92},
-	{0x16FE4, 0x16FE4},
-	{0x1BC9D, 0x1BC9E},
-	{0x1BCA0, 0x1CF46},
-	{0x1D167, 0x1D169},
-	{0x1D173, 0x1D182},
-	{0x1D185, 0x1D18B},
-	{0x1D1AA, 0x1D1AD},
-	{0x1D242, 0x1D244},
-	{0x1DA00, 0x1DA36},
-	{0x1DA3B, 0x1DA6C},
-	{0x1DA75, 0x1DA75},
-	{0x1DA84, 0x1DA84},
-	{0x1DA9B, 0x1DAAF},
-	{0x1E000, 0x1E02A},
-	{0x1E08F, 0x1E08F},
-	{0x1E130, 0x1E136},
-	{0x1E2AE, 0x1E2AE},
-	{0x1E2EC, 0x1E2EF},
-	{0x1E4EC, 0x1E4EF},
-	{0x1E8D0, 0x1E8D6},
-	{0x1E944, 0x1E94A},
-	{0xE0001, 0xE01EF},
-};
diff --git a/contrib/libs/libpq/src/include/common/unicode_norm.h b/contrib/libs/libpq/src/include/common/unicode_norm.h
deleted file mode 100644
index c6627aeb7c..0000000000
--- a/contrib/libs/libpq/src/include/common/unicode_norm.h
+++ /dev/null
@@ -1,39 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * unicode_norm.h
- *	  Routines for normalizing Unicode strings
- *
- * These definitions are used by both frontend and backend code.
- *
- * Copyright (c) 2017-2023, PostgreSQL Global Development Group
- *
- * src/include/common/unicode_norm.h
- *
- *-------------------------------------------------------------------------
- */
-#ifndef UNICODE_NORM_H
-#define UNICODE_NORM_H
-
-#include "mb/pg_wchar.h"
-
-typedef enum
-{
-	UNICODE_NFC = 0,
-	UNICODE_NFD = 1,
-	UNICODE_NFKC = 2,
-	UNICODE_NFKD = 3,
-} UnicodeNormalizationForm;
-
-/* see UAX #15 */
-typedef enum
-{
-	UNICODE_NORM_QC_NO = 0,
-	UNICODE_NORM_QC_YES = 1,
-	UNICODE_NORM_QC_MAYBE = -1,
-} UnicodeNormalizationQC;
-
-extern pg_wchar *unicode_normalize(UnicodeNormalizationForm form, const pg_wchar *input);
-
-extern UnicodeNormalizationQC unicode_is_normalized_quickcheck(UnicodeNormalizationForm form, const pg_wchar *input);
-
-#endif							/* UNICODE_NORM_H */
diff --git a/contrib/libs/libpq/src/include/common/unicode_norm_table.h b/contrib/libs/libpq/src/include/common/unicode_norm_table.h
deleted file mode 100644
index 36b6ca4044..0000000000
--- a/contrib/libs/libpq/src/include/common/unicode_norm_table.h
+++ /dev/null
@@ -1,9114 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * unicode_norm_table.h
- *	  Composition table used for Unicode normalization
- *
- * Portions Copyright (c) 1996-2023, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- * src/include/common/unicode_norm_table.h
- *
- *-------------------------------------------------------------------------
- */
-
-/*
- * File auto-generated by src/common/unicode/generate-unicode_norm_table.pl,
- * do not edit. There is deliberately not an #ifndef PG_UNICODE_NORM_TABLE_H
- * here.
- */
-typedef struct
-{
-	uint32		codepoint;		/* Unicode codepoint */
-	uint8		comb_class;		/* combining class of character */
-	uint8		dec_size_flags; /* size and flags of decomposition code list */
-	uint16		dec_index;		/* index into UnicodeDecomp_codepoints, or the
-								 * decomposition itself if DECOMP_INLINE */
-} pg_unicode_decomposition;
-
-#define DECOMP_NO_COMPOSE	0x80	/* don't use for re-composition */
-#define DECOMP_INLINE		0x40	/* decomposition is stored inline in
-									 * dec_index */
-#define DECOMP_COMPAT		0x20	/* compatibility mapping */
-
-#define DECOMPOSITION_SIZE(x) ((x)->dec_size_flags & 0x1F)
-#define DECOMPOSITION_NO_COMPOSE(x) (((x)->dec_size_flags & (DECOMP_NO_COMPOSE | DECOMP_COMPAT)) != 0)
-#define DECOMPOSITION_IS_INLINE(x) (((x)->dec_size_flags & DECOMP_INLINE) != 0)
-#define DECOMPOSITION_IS_COMPAT(x) (((x)->dec_size_flags & DECOMP_COMPAT) != 0)
-
-/* Table of Unicode codepoints and their decompositions */
-static const pg_unicode_decomposition UnicodeDecompMain[6775] =
-{
-	{0x00A0, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0020},
-	{0x00A8, 0, 2 | DECOMP_COMPAT, 0},
-	{0x00AA, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0061},
-	{0x00AF, 0, 2 | DECOMP_COMPAT, 2},
-	{0x00B2, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0032},
-	{0x00B3, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0033},
-	{0x00B4, 0, 2 | DECOMP_COMPAT, 4},
-	{0x00B5, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03BC},
-	{0x00B8, 0, 2 | DECOMP_COMPAT, 6},
-	{0x00B9, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0031},
-	{0x00BA, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x006F},
-	{0x00BC, 0, 3 | DECOMP_COMPAT, 8},
-	{0x00BD, 0, 3 | DECOMP_COMPAT, 11},
-	{0x00BE, 0, 3 | DECOMP_COMPAT, 14},
-	{0x00C0, 0, 2, 17},
-	{0x00C1, 0, 2, 19},
-	{0x00C2, 0, 2, 21},
-	{0x00C3, 0, 2, 23},
-	{0x00C4, 0, 2, 25},
-	{0x00C5, 0, 2, 27},
-	{0x00C7, 0, 2, 29},
-	{0x00C8, 0, 2, 31},
-	{0x00C9, 0, 2, 33},
-	{0x00CA, 0, 2, 35},
-	{0x00CB, 0, 2, 37},
-	{0x00CC, 0, 2, 39},
-	{0x00CD, 0, 2, 41},
-	{0x00CE, 0, 2, 43},
-	{0x00CF, 0, 2, 45},
-	{0x00D1, 0, 2, 47},
-	{0x00D2, 0, 2, 49},
-	{0x00D3, 0, 2, 51},
-	{0x00D4, 0, 2, 53},
-	{0x00D5, 0, 2, 55},
-	{0x00D6, 0, 2, 57},
-	{0x00D9, 0, 2, 59},
-	{0x00DA, 0, 2, 61},
-	{0x00DB, 0, 2, 63},
-	{0x00DC, 0, 2, 65},
-	{0x00DD, 0, 2, 67},
-	{0x00E0, 0, 2, 69},
-	{0x00E1, 0, 2, 71},
-	{0x00E2, 0, 2, 73},
-	{0x00E3, 0, 2, 75},
-	{0x00E4, 0, 2, 77},
-	{0x00E5, 0, 2, 79},
-	{0x00E7, 0, 2, 81},
-	{0x00E8, 0, 2, 83},
-	{0x00E9, 0, 2, 85},
-	{0x00EA, 0, 2, 87},
-	{0x00EB, 0, 2, 89},
-	{0x00EC, 0, 2, 91},
-	{0x00ED, 0, 2, 93},
-	{0x00EE, 0, 2, 95},
-	{0x00EF, 0, 2, 97},
-	{0x00F1, 0, 2, 99},
-	{0x00F2, 0, 2, 101},
-	{0x00F3, 0, 2, 103},
-	{0x00F4, 0, 2, 105},
-	{0x00F5, 0, 2, 107},
-	{0x00F6, 0, 2, 109},
-	{0x00F9, 0, 2, 111},
-	{0x00FA, 0, 2, 113},
-	{0x00FB, 0, 2, 115},
-	{0x00FC, 0, 2, 117},
-	{0x00FD, 0, 2, 119},
-	{0x00FF, 0, 2, 121},
-	{0x0100, 0, 2, 123},
-	{0x0101, 0, 2, 125},
-	{0x0102, 0, 2, 127},
-	{0x0103, 0, 2, 129},
-	{0x0104, 0, 2, 131},
-	{0x0105, 0, 2, 133},
-	{0x0106, 0, 2, 135},
-	{0x0107, 0, 2, 137},
-	{0x0108, 0, 2, 139},
-	{0x0109, 0, 2, 141},
-	{0x010A, 0, 2, 143},
-	{0x010B, 0, 2, 145},
-	{0x010C, 0, 2, 147},
-	{0x010D, 0, 2, 149},
-	{0x010E, 0, 2, 151},
-	{0x010F, 0, 2, 153},
-	{0x0112, 0, 2, 155},
-	{0x0113, 0, 2, 157},
-	{0x0114, 0, 2, 159},
-	{0x0115, 0, 2, 161},
-	{0x0116, 0, 2, 163},
-	{0x0117, 0, 2, 165},
-	{0x0118, 0, 2, 167},
-	{0x0119, 0, 2, 169},
-	{0x011A, 0, 2, 171},
-	{0x011B, 0, 2, 173},
-	{0x011C, 0, 2, 175},
-	{0x011D, 0, 2, 177},
-	{0x011E, 0, 2, 179},
-	{0x011F, 0, 2, 181},
-	{0x0120, 0, 2, 183},
-	{0x0121, 0, 2, 185},
-	{0x0122, 0, 2, 187},
-	{0x0123, 0, 2, 189},
-	{0x0124, 0, 2, 191},
-	{0x0125, 0, 2, 193},
-	{0x0128, 0, 2, 195},
-	{0x0129, 0, 2, 197},
-	{0x012A, 0, 2, 199},
-	{0x012B, 0, 2, 201},
-	{0x012C, 0, 2, 203},
-	{0x012D, 0, 2, 205},
-	{0x012E, 0, 2, 207},
-	{0x012F, 0, 2, 209},
-	{0x0130, 0, 2, 211},
-	{0x0132, 0, 2 | DECOMP_COMPAT, 213},
-	{0x0133, 0, 2 | DECOMP_COMPAT, 215},
-	{0x0134, 0, 2, 217},
-	{0x0135, 0, 2, 219},
-	{0x0136, 0, 2, 221},
-	{0x0137, 0, 2, 223},
-	{0x0139, 0, 2, 225},
-	{0x013A, 0, 2, 227},
-	{0x013B, 0, 2, 229},
-	{0x013C, 0, 2, 231},
-	{0x013D, 0, 2, 233},
-	{0x013E, 0, 2, 235},
-	{0x013F, 0, 2 | DECOMP_COMPAT, 237},
-	{0x0140, 0, 2 | DECOMP_COMPAT, 239},
-	{0x0143, 0, 2, 241},
-	{0x0144, 0, 2, 243},
-	{0x0145, 0, 2, 245},
-	{0x0146, 0, 2, 247},
-	{0x0147, 0, 2, 249},
-	{0x0148, 0, 2, 251},
-	{0x0149, 0, 2 | DECOMP_COMPAT, 253},
-	{0x014C, 0, 2, 255},
-	{0x014D, 0, 2, 257},
-	{0x014E, 0, 2, 259},
-	{0x014F, 0, 2, 261},
-	{0x0150, 0, 2, 263},
-	{0x0151, 0, 2, 265},
-	{0x0154, 0, 2, 267},
-	{0x0155, 0, 2, 269},
-	{0x0156, 0, 2, 271},
-	{0x0157, 0, 2, 273},
-	{0x0158, 0, 2, 275},
-	{0x0159, 0, 2, 277},
-	{0x015A, 0, 2, 279},
-	{0x015B, 0, 2, 281},
-	{0x015C, 0, 2, 283},
-	{0x015D, 0, 2, 285},
-	{0x015E, 0, 2, 287},
-	{0x015F, 0, 2, 289},
-	{0x0160, 0, 2, 291},
-	{0x0161, 0, 2, 293},
-	{0x0162, 0, 2, 295},
-	{0x0163, 0, 2, 297},
-	{0x0164, 0, 2, 299},
-	{0x0165, 0, 2, 301},
-	{0x0168, 0, 2, 303},
-	{0x0169, 0, 2, 305},
-	{0x016A, 0, 2, 307},
-	{0x016B, 0, 2, 309},
-	{0x016C, 0, 2, 311},
-	{0x016D, 0, 2, 313},
-	{0x016E, 0, 2, 315},
-	{0x016F, 0, 2, 317},
-	{0x0170, 0, 2, 319},
-	{0x0171, 0, 2, 321},
-	{0x0172, 0, 2, 323},
-	{0x0173, 0, 2, 325},
-	{0x0174, 0, 2, 327},
-	{0x0175, 0, 2, 329},
-	{0x0176, 0, 2, 331},
-	{0x0177, 0, 2, 333},
-	{0x0178, 0, 2, 335},
-	{0x0179, 0, 2, 337},
-	{0x017A, 0, 2, 339},
-	{0x017B, 0, 2, 341},
-	{0x017C, 0, 2, 343},
-	{0x017D, 0, 2, 345},
-	{0x017E, 0, 2, 347},
-	{0x017F, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0073},
-	{0x01A0, 0, 2, 349},
-	{0x01A1, 0, 2, 351},
-	{0x01AF, 0, 2, 353},
-	{0x01B0, 0, 2, 355},
-	{0x01C4, 0, 2 | DECOMP_COMPAT, 357},
-	{0x01C5, 0, 2 | DECOMP_COMPAT, 359},
-	{0x01C6, 0, 2 | DECOMP_COMPAT, 361},
-	{0x01C7, 0, 2 | DECOMP_COMPAT, 363},
-	{0x01C8, 0, 2 | DECOMP_COMPAT, 365},
-	{0x01C9, 0, 2 | DECOMP_COMPAT, 367},
-	{0x01CA, 0, 2 | DECOMP_COMPAT, 369},
-	{0x01CB, 0, 2 | DECOMP_COMPAT, 371},
-	{0x01CC, 0, 2 | DECOMP_COMPAT, 373},
-	{0x01CD, 0, 2, 375},
-	{0x01CE, 0, 2, 377},
-	{0x01CF, 0, 2, 379},
-	{0x01D0, 0, 2, 381},
-	{0x01D1, 0, 2, 383},
-	{0x01D2, 0, 2, 385},
-	{0x01D3, 0, 2, 387},
-	{0x01D4, 0, 2, 389},
-	{0x01D5, 0, 2, 391},
-	{0x01D6, 0, 2, 393},
-	{0x01D7, 0, 2, 395},
-	{0x01D8, 0, 2, 397},
-	{0x01D9, 0, 2, 399},
-	{0x01DA, 0, 2, 401},
-	{0x01DB, 0, 2, 403},
-	{0x01DC, 0, 2, 405},
-	{0x01DE, 0, 2, 407},
-	{0x01DF, 0, 2, 409},
-	{0x01E0, 0, 2, 411},
-	{0x01E1, 0, 2, 413},
-	{0x01E2, 0, 2, 415},
-	{0x01E3, 0, 2, 417},
-	{0x01E6, 0, 2, 419},
-	{0x01E7, 0, 2, 421},
-	{0x01E8, 0, 2, 423},
-	{0x01E9, 0, 2, 425},
-	{0x01EA, 0, 2, 427},
-	{0x01EB, 0, 2, 429},
-	{0x01EC, 0, 2, 431},
-	{0x01ED, 0, 2, 433},
-	{0x01EE, 0, 2, 435},
-	{0x01EF, 0, 2, 437},
-	{0x01F0, 0, 2, 439},
-	{0x01F1, 0, 2 | DECOMP_COMPAT, 441},
-	{0x01F2, 0, 2 | DECOMP_COMPAT, 443},
-	{0x01F3, 0, 2 | DECOMP_COMPAT, 445},
-	{0x01F4, 0, 2, 447},
-	{0x01F5, 0, 2, 449},
-	{0x01F8, 0, 2, 451},
-	{0x01F9, 0, 2, 453},
-	{0x01FA, 0, 2, 455},
-	{0x01FB, 0, 2, 457},
-	{0x01FC, 0, 2, 459},
-	{0x01FD, 0, 2, 461},
-	{0x01FE, 0, 2, 463},
-	{0x01FF, 0, 2, 465},
-	{0x0200, 0, 2, 467},
-	{0x0201, 0, 2, 469},
-	{0x0202, 0, 2, 471},
-	{0x0203, 0, 2, 473},
-	{0x0204, 0, 2, 475},
-	{0x0205, 0, 2, 477},
-	{0x0206, 0, 2, 479},
-	{0x0207, 0, 2, 481},
-	{0x0208, 0, 2, 483},
-	{0x0209, 0, 2, 485},
-	{0x020A, 0, 2, 487},
-	{0x020B, 0, 2, 489},
-	{0x020C, 0, 2, 491},
-	{0x020D, 0, 2, 493},
-	{0x020E, 0, 2, 495},
-	{0x020F, 0, 2, 497},
-	{0x0210, 0, 2, 499},
-	{0x0211, 0, 2, 501},
-	{0x0212, 0, 2, 503},
-	{0x0213, 0, 2, 505},
-	{0x0214, 0, 2, 507},
-	{0x0215, 0, 2, 509},
-	{0x0216, 0, 2, 511},
-	{0x0217, 0, 2, 513},
-	{0x0218, 0, 2, 515},
-	{0x0219, 0, 2, 517},
-	{0x021A, 0, 2, 519},
-	{0x021B, 0, 2, 521},
-	{0x021E, 0, 2, 523},
-	{0x021F, 0, 2, 525},
-	{0x0226, 0, 2, 527},
-	{0x0227, 0, 2, 529},
-	{0x0228, 0, 2, 531},
-	{0x0229, 0, 2, 533},
-	{0x022A, 0, 2, 535},
-	{0x022B, 0, 2, 537},
-	{0x022C, 0, 2, 539},
-	{0x022D, 0, 2, 541},
-	{0x022E, 0, 2, 543},
-	{0x022F, 0, 2, 545},
-	{0x0230, 0, 2, 547},
-	{0x0231, 0, 2, 549},
-	{0x0232, 0, 2, 551},
-	{0x0233, 0, 2, 553},
-	{0x02B0, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0068},
-	{0x02B1, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0266},
-	{0x02B2, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x006A},
-	{0x02B3, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0072},
-	{0x02B4, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0279},
-	{0x02B5, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x027B},
-	{0x02B6, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0281},
-	{0x02B7, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0077},
-	{0x02B8, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0079},
-	{0x02D8, 0, 2 | DECOMP_COMPAT, 555},
-	{0x02D9, 0, 2 | DECOMP_COMPAT, 557},
-	{0x02DA, 0, 2 | DECOMP_COMPAT, 559},
-	{0x02DB, 0, 2 | DECOMP_COMPAT, 561},
-	{0x02DC, 0, 2 | DECOMP_COMPAT, 563},
-	{0x02DD, 0, 2 | DECOMP_COMPAT, 565},
-	{0x02E0, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0263},
-	{0x02E1, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x006C},
-	{0x02E2, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0073},
-	{0x02E3, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0078},
-	{0x02E4, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0295},
-	{0x0300, 230, 0, 0},
-	{0x0301, 230, 0, 0},
-	{0x0302, 230, 0, 0},
-	{0x0303, 230, 0, 0},
-	{0x0304, 230, 0, 0},
-	{0x0305, 230, 0, 0},
-	{0x0306, 230, 0, 0},
-	{0x0307, 230, 0, 0},
-	{0x0308, 230, 0, 0},
-	{0x0309, 230, 0, 0},
-	{0x030A, 230, 0, 0},
-	{0x030B, 230, 0, 0},
-	{0x030C, 230, 0, 0},
-	{0x030D, 230, 0, 0},
-	{0x030E, 230, 0, 0},
-	{0x030F, 230, 0, 0},
-	{0x0310, 230, 0, 0},
-	{0x0311, 230, 0, 0},
-	{0x0312, 230, 0, 0},
-	{0x0313, 230, 0, 0},
-	{0x0314, 230, 0, 0},
-	{0x0315, 232, 0, 0},
-	{0x0316, 220, 0, 0},
-	{0x0317, 220, 0, 0},
-	{0x0318, 220, 0, 0},
-	{0x0319, 220, 0, 0},
-	{0x031A, 232, 0, 0},
-	{0x031B, 216, 0, 0},
-	{0x031C, 220, 0, 0},
-	{0x031D, 220, 0, 0},
-	{0x031E, 220, 0, 0},
-	{0x031F, 220, 0, 0},
-	{0x0320, 220, 0, 0},
-	{0x0321, 202, 0, 0},
-	{0x0322, 202, 0, 0},
-	{0x0323, 220, 0, 0},
-	{0x0324, 220, 0, 0},
-	{0x0325, 220, 0, 0},
-	{0x0326, 220, 0, 0},
-	{0x0327, 202, 0, 0},
-	{0x0328, 202, 0, 0},
-	{0x0329, 220, 0, 0},
-	{0x032A, 220, 0, 0},
-	{0x032B, 220, 0, 0},
-	{0x032C, 220, 0, 0},
-	{0x032D, 220, 0, 0},
-	{0x032E, 220, 0, 0},
-	{0x032F, 220, 0, 0},
-	{0x0330, 220, 0, 0},
-	{0x0331, 220, 0, 0},
-	{0x0332, 220, 0, 0},
-	{0x0333, 220, 0, 0},
-	{0x0334, 1, 0, 0},
-	{0x0335, 1, 0, 0},
-	{0x0336, 1, 0, 0},
-	{0x0337, 1, 0, 0},
-	{0x0338, 1, 0, 0},
-	{0x0339, 220, 0, 0},
-	{0x033A, 220, 0, 0},
-	{0x033B, 220, 0, 0},
-	{0x033C, 220, 0, 0},
-	{0x033D, 230, 0, 0},
-	{0x033E, 230, 0, 0},
-	{0x033F, 230, 0, 0},
-	{0x0340, 230, 1 | DECOMP_INLINE, 0x0300},
-	{0x0341, 230, 1 | DECOMP_INLINE, 0x0301},
-	{0x0342, 230, 0, 0},
-	{0x0343, 230, 1 | DECOMP_INLINE, 0x0313},
-	{0x0344, 230, 2 | DECOMP_NO_COMPOSE, 567},	/* non-starter decomposition */
-	{0x0345, 240, 0, 0},
-	{0x0346, 230, 0, 0},
-	{0x0347, 220, 0, 0},
-	{0x0348, 220, 0, 0},
-	{0x0349, 220, 0, 0},
-	{0x034A, 230, 0, 0},
-	{0x034B, 230, 0, 0},
-	{0x034C, 230, 0, 0},
-	{0x034D, 220, 0, 0},
-	{0x034E, 220, 0, 0},
-	{0x0350, 230, 0, 0},
-	{0x0351, 230, 0, 0},
-	{0x0352, 230, 0, 0},
-	{0x0353, 220, 0, 0},
-	{0x0354, 220, 0, 0},
-	{0x0355, 220, 0, 0},
-	{0x0356, 220, 0, 0},
-	{0x0357, 230, 0, 0},
-	{0x0358, 232, 0, 0},
-	{0x0359, 220, 0, 0},
-	{0x035A, 220, 0, 0},
-	{0x035B, 230, 0, 0},
-	{0x035C, 233, 0, 0},
-	{0x035D, 234, 0, 0},
-	{0x035E, 234, 0, 0},
-	{0x035F, 233, 0, 0},
-	{0x0360, 234, 0, 0},
-	{0x0361, 234, 0, 0},
-	{0x0362, 233, 0, 0},
-	{0x0363, 230, 0, 0},
-	{0x0364, 230, 0, 0},
-	{0x0365, 230, 0, 0},
-	{0x0366, 230, 0, 0},
-	{0x0367, 230, 0, 0},
-	{0x0368, 230, 0, 0},
-	{0x0369, 230, 0, 0},
-	{0x036A, 230, 0, 0},
-	{0x036B, 230, 0, 0},
-	{0x036C, 230, 0, 0},
-	{0x036D, 230, 0, 0},
-	{0x036E, 230, 0, 0},
-	{0x036F, 230, 0, 0},
-	{0x0374, 0, 1 | DECOMP_INLINE, 0x02B9},
-	{0x037A, 0, 2 | DECOMP_COMPAT, 569},
-	{0x037E, 0, 1 | DECOMP_INLINE, 0x003B},
-	{0x0384, 0, 2 | DECOMP_COMPAT, 571},
-	{0x0385, 0, 2, 573},
-	{0x0386, 0, 2, 575},
-	{0x0387, 0, 1 | DECOMP_INLINE, 0x00B7},
-	{0x0388, 0, 2, 577},
-	{0x0389, 0, 2, 579},
-	{0x038A, 0, 2, 581},
-	{0x038C, 0, 2, 583},
-	{0x038E, 0, 2, 585},
-	{0x038F, 0, 2, 587},
-	{0x0390, 0, 2, 589},
-	{0x03AA, 0, 2, 591},
-	{0x03AB, 0, 2, 593},
-	{0x03AC, 0, 2, 595},
-	{0x03AD, 0, 2, 597},
-	{0x03AE, 0, 2, 599},
-	{0x03AF, 0, 2, 601},
-	{0x03B0, 0, 2, 603},
-	{0x03CA, 0, 2, 605},
-	{0x03CB, 0, 2, 607},
-	{0x03CC, 0, 2, 609},
-	{0x03CD, 0, 2, 611},
-	{0x03CE, 0, 2, 613},
-	{0x03D0, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03B2},
-	{0x03D1, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03B8},
-	{0x03D2, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03A5},
-	{0x03D3, 0, 2, 615},
-	{0x03D4, 0, 2, 617},
-	{0x03D5, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03C6},
-	{0x03D6, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03C0},
-	{0x03F0, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03BA},
-	{0x03F1, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03C1},
-	{0x03F2, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03C2},
-	{0x03F4, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0398},
-	{0x03F5, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03B5},
-	{0x03F9, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03A3},
-	{0x0400, 0, 2, 619},
-	{0x0401, 0, 2, 621},
-	{0x0403, 0, 2, 623},
-	{0x0407, 0, 2, 625},
-	{0x040C, 0, 2, 627},
-	{0x040D, 0, 2, 629},
-	{0x040E, 0, 2, 631},
-	{0x0419, 0, 2, 633},
-	{0x0439, 0, 2, 635},
-	{0x0450, 0, 2, 637},
-	{0x0451, 0, 2, 639},
-	{0x0453, 0, 2, 641},
-	{0x0457, 0, 2, 643},
-	{0x045C, 0, 2, 645},
-	{0x045D, 0, 2, 647},
-	{0x045E, 0, 2, 649},
-	{0x0476, 0, 2, 651},
-	{0x0477, 0, 2, 653},
-	{0x0483, 230, 0, 0},
-	{0x0484, 230, 0, 0},
-	{0x0485, 230, 0, 0},
-	{0x0486, 230, 0, 0},
-	{0x0487, 230, 0, 0},
-	{0x04C1, 0, 2, 655},
-	{0x04C2, 0, 2, 657},
-	{0x04D0, 0, 2, 659},
-	{0x04D1, 0, 2, 661},
-	{0x04D2, 0, 2, 663},
-	{0x04D3, 0, 2, 665},
-	{0x04D6, 0, 2, 667},
-	{0x04D7, 0, 2, 669},
-	{0x04DA, 0, 2, 671},
-	{0x04DB, 0, 2, 673},
-	{0x04DC, 0, 2, 675},
-	{0x04DD, 0, 2, 677},
-	{0x04DE, 0, 2, 679},
-	{0x04DF, 0, 2, 681},
-	{0x04E2, 0, 2, 683},
-	{0x04E3, 0, 2, 685},
-	{0x04E4, 0, 2, 687},
-	{0x04E5, 0, 2, 689},
-	{0x04E6, 0, 2, 691},
-	{0x04E7, 0, 2, 693},
-	{0x04EA, 0, 2, 695},
-	{0x04EB, 0, 2, 697},
-	{0x04EC, 0, 2, 699},
-	{0x04ED, 0, 2, 701},
-	{0x04EE, 0, 2, 703},
-	{0x04EF, 0, 2, 705},
-	{0x04F0, 0, 2, 707},
-	{0x04F1, 0, 2, 709},
-	{0x04F2, 0, 2, 711},
-	{0x04F3, 0, 2, 713},
-	{0x04F4, 0, 2, 715},
-	{0x04F5, 0, 2, 717},
-	{0x04F8, 0, 2, 719},
-	{0x04F9, 0, 2, 721},
-	{0x0587, 0, 2 | DECOMP_COMPAT, 723},
-	{0x0591, 220, 0, 0},
-	{0x0592, 230, 0, 0},
-	{0x0593, 230, 0, 0},
-	{0x0594, 230, 0, 0},
-	{0x0595, 230, 0, 0},
-	{0x0596, 220, 0, 0},
-	{0x0597, 230, 0, 0},
-	{0x0598, 230, 0, 0},
-	{0x0599, 230, 0, 0},
-	{0x059A, 222, 0, 0},
-	{0x059B, 220, 0, 0},
-	{0x059C, 230, 0, 0},
-	{0x059D, 230, 0, 0},
-	{0x059E, 230, 0, 0},
-	{0x059F, 230, 0, 0},
-	{0x05A0, 230, 0, 0},
-	{0x05A1, 230, 0, 0},
-	{0x05A2, 220, 0, 0},
-	{0x05A3, 220, 0, 0},
-	{0x05A4, 220, 0, 0},
-	{0x05A5, 220, 0, 0},
-	{0x05A6, 220, 0, 0},
-	{0x05A7, 220, 0, 0},
-	{0x05A8, 230, 0, 0},
-	{0x05A9, 230, 0, 0},
-	{0x05AA, 220, 0, 0},
-	{0x05AB, 230, 0, 0},
-	{0x05AC, 230, 0, 0},
-	{0x05AD, 222, 0, 0},
-	{0x05AE, 228, 0, 0},
-	{0x05AF, 230, 0, 0},
-	{0x05B0, 10, 0, 0},
-	{0x05B1, 11, 0, 0},
-	{0x05B2, 12, 0, 0},
-	{0x05B3, 13, 0, 0},
-	{0x05B4, 14, 0, 0},
-	{0x05B5, 15, 0, 0},
-	{0x05B6, 16, 0, 0},
-	{0x05B7, 17, 0, 0},
-	{0x05B8, 18, 0, 0},
-	{0x05B9, 19, 0, 0},
-	{0x05BA, 19, 0, 0},
-	{0x05BB, 20, 0, 0},
-	{0x05BC, 21, 0, 0},
-	{0x05BD, 22, 0, 0},
-	{0x05BF, 23, 0, 0},
-	{0x05C1, 24, 0, 0},
-	{0x05C2, 25, 0, 0},
-	{0x05C4, 230, 0, 0},
-	{0x05C5, 220, 0, 0},
-	{0x05C7, 18, 0, 0},
-	{0x0610, 230, 0, 0},
-	{0x0611, 230, 0, 0},
-	{0x0612, 230, 0, 0},
-	{0x0613, 230, 0, 0},
-	{0x0614, 230, 0, 0},
-	{0x0615, 230, 0, 0},
-	{0x0616, 230, 0, 0},
-	{0x0617, 230, 0, 0},
-	{0x0618, 30, 0, 0},
-	{0x0619, 31, 0, 0},
-	{0x061A, 32, 0, 0},
-	{0x0622, 0, 2, 725},
-	{0x0623, 0, 2, 727},
-	{0x0624, 0, 2, 729},
-	{0x0625, 0, 2, 731},
-	{0x0626, 0, 2, 733},
-	{0x064B, 27, 0, 0},
-	{0x064C, 28, 0, 0},
-	{0x064D, 29, 0, 0},
-	{0x064E, 30, 0, 0},
-	{0x064F, 31, 0, 0},
-	{0x0650, 32, 0, 0},
-	{0x0651, 33, 0, 0},
-	{0x0652, 34, 0, 0},
-	{0x0653, 230, 0, 0},
-	{0x0654, 230, 0, 0},
-	{0x0655, 220, 0, 0},
-	{0x0656, 220, 0, 0},
-	{0x0657, 230, 0, 0},
-	{0x0658, 230, 0, 0},
-	{0x0659, 230, 0, 0},
-	{0x065A, 230, 0, 0},
-	{0x065B, 230, 0, 0},
-	{0x065C, 220, 0, 0},
-	{0x065D, 230, 0, 0},
-	{0x065E, 230, 0, 0},
-	{0x065F, 220, 0, 0},
-	{0x0670, 35, 0, 0},
-	{0x0675, 0, 2 | DECOMP_COMPAT, 735},
-	{0x0676, 0, 2 | DECOMP_COMPAT, 737},
-	{0x0677, 0, 2 | DECOMP_COMPAT, 739},
-	{0x0678, 0, 2 | DECOMP_COMPAT, 741},
-	{0x06C0, 0, 2, 743},
-	{0x06C2, 0, 2, 745},
-	{0x06D3, 0, 2, 747},
-	{0x06D6, 230, 0, 0},
-	{0x06D7, 230, 0, 0},
-	{0x06D8, 230, 0, 0},
-	{0x06D9, 230, 0, 0},
-	{0x06DA, 230, 0, 0},
-	{0x06DB, 230, 0, 0},
-	{0x06DC, 230, 0, 0},
-	{0x06DF, 230, 0, 0},
-	{0x06E0, 230, 0, 0},
-	{0x06E1, 230, 0, 0},
-	{0x06E2, 230, 0, 0},
-	{0x06E3, 220, 0, 0},
-	{0x06E4, 230, 0, 0},
-	{0x06E7, 230, 0, 0},
-	{0x06E8, 230, 0, 0},
-	{0x06EA, 220, 0, 0},
-	{0x06EB, 230, 0, 0},
-	{0x06EC, 230, 0, 0},
-	{0x06ED, 220, 0, 0},
-	{0x0711, 36, 0, 0},
-	{0x0730, 230, 0, 0},
-	{0x0731, 220, 0, 0},
-	{0x0732, 230, 0, 0},
-	{0x0733, 230, 0, 0},
-	{0x0734, 220, 0, 0},
-	{0x0735, 230, 0, 0},
-	{0x0736, 230, 0, 0},
-	{0x0737, 220, 0, 0},
-	{0x0738, 220, 0, 0},
-	{0x0739, 220, 0, 0},
-	{0x073A, 230, 0, 0},
-	{0x073B, 220, 0, 0},
-	{0x073C, 220, 0, 0},
-	{0x073D, 230, 0, 0},
-	{0x073E, 220, 0, 0},
-	{0x073F, 230, 0, 0},
-	{0x0740, 230, 0, 0},
-	{0x0741, 230, 0, 0},
-	{0x0742, 220, 0, 0},
-	{0x0743, 230, 0, 0},
-	{0x0744, 220, 0, 0},
-	{0x0745, 230, 0, 0},
-	{0x0746, 220, 0, 0},
-	{0x0747, 230, 0, 0},
-	{0x0748, 220, 0, 0},
-	{0x0749, 230, 0, 0},
-	{0x074A, 230, 0, 0},
-	{0x07EB, 230, 0, 0},
-	{0x07EC, 230, 0, 0},
-	{0x07ED, 230, 0, 0},
-	{0x07EE, 230, 0, 0},
-	{0x07EF, 230, 0, 0},
-	{0x07F0, 230, 0, 0},
-	{0x07F1, 230, 0, 0},
-	{0x07F2, 220, 0, 0},
-	{0x07F3, 230, 0, 0},
-	{0x07FD, 220, 0, 0},
-	{0x0816, 230, 0, 0},
-	{0x0817, 230, 0, 0},
-	{0x0818, 230, 0, 0},
-	{0x0819, 230, 0, 0},
-	{0x081B, 230, 0, 0},
-	{0x081C, 230, 0, 0},
-	{0x081D, 230, 0, 0},
-	{0x081E, 230, 0, 0},
-	{0x081F, 230, 0, 0},
-	{0x0820, 230, 0, 0},
-	{0x0821, 230, 0, 0},
-	{0x0822, 230, 0, 0},
-	{0x0823, 230, 0, 0},
-	{0x0825, 230, 0, 0},
-	{0x0826, 230, 0, 0},
-	{0x0827, 230, 0, 0},
-	{0x0829, 230, 0, 0},
-	{0x082A, 230, 0, 0},
-	{0x082B, 230, 0, 0},
-	{0x082C, 230, 0, 0},
-	{0x082D, 230, 0, 0},
-	{0x0859, 220, 0, 0},
-	{0x085A, 220, 0, 0},
-	{0x085B, 220, 0, 0},
-	{0x0898, 230, 0, 0},
-	{0x0899, 220, 0, 0},
-	{0x089A, 220, 0, 0},
-	{0x089B, 220, 0, 0},
-	{0x089C, 230, 0, 0},
-	{0x089D, 230, 0, 0},
-	{0x089E, 230, 0, 0},
-	{0x089F, 230, 0, 0},
-	{0x08CA, 230, 0, 0},
-	{0x08CB, 230, 0, 0},
-	{0x08CC, 230, 0, 0},
-	{0x08CD, 230, 0, 0},
-	{0x08CE, 230, 0, 0},
-	{0x08CF, 220, 0, 0},
-	{0x08D0, 220, 0, 0},
-	{0x08D1, 220, 0, 0},
-	{0x08D2, 220, 0, 0},
-	{0x08D3, 220, 0, 0},
-	{0x08D4, 230, 0, 0},
-	{0x08D5, 230, 0, 0},
-	{0x08D6, 230, 0, 0},
-	{0x08D7, 230, 0, 0},
-	{0x08D8, 230, 0, 0},
-	{0x08D9, 230, 0, 0},
-	{0x08DA, 230, 0, 0},
-	{0x08DB, 230, 0, 0},
-	{0x08DC, 230, 0, 0},
-	{0x08DD, 230, 0, 0},
-	{0x08DE, 230, 0, 0},
-	{0x08DF, 230, 0, 0},
-	{0x08E0, 230, 0, 0},
-	{0x08E1, 230, 0, 0},
-	{0x08E3, 220, 0, 0},
-	{0x08E4, 230, 0, 0},
-	{0x08E5, 230, 0, 0},
-	{0x08E6, 220, 0, 0},
-	{0x08E7, 230, 0, 0},
-	{0x08E8, 230, 0, 0},
-	{0x08E9, 220, 0, 0},
-	{0x08EA, 230, 0, 0},
-	{0x08EB, 230, 0, 0},
-	{0x08EC, 230, 0, 0},
-	{0x08ED, 220, 0, 0},
-	{0x08EE, 220, 0, 0},
-	{0x08EF, 220, 0, 0},
-	{0x08F0, 27, 0, 0},
-	{0x08F1, 28, 0, 0},
-	{0x08F2, 29, 0, 0},
-	{0x08F3, 230, 0, 0},
-	{0x08F4, 230, 0, 0},
-	{0x08F5, 230, 0, 0},
-	{0x08F6, 220, 0, 0},
-	{0x08F7, 230, 0, 0},
-	{0x08F8, 230, 0, 0},
-	{0x08F9, 220, 0, 0},
-	{0x08FA, 220, 0, 0},
-	{0x08FB, 230, 0, 0},
-	{0x08FC, 230, 0, 0},
-	{0x08FD, 230, 0, 0},
-	{0x08FE, 230, 0, 0},
-	{0x08FF, 230, 0, 0},
-	{0x0929, 0, 2, 749},
-	{0x0931, 0, 2, 751},
-	{0x0934, 0, 2, 753},
-	{0x093C, 7, 0, 0},
-	{0x094D, 9, 0, 0},
-	{0x0951, 230, 0, 0},
-	{0x0952, 220, 0, 0},
-	{0x0953, 230, 0, 0},
-	{0x0954, 230, 0, 0},
-	{0x0958, 0, 2 | DECOMP_NO_COMPOSE, 755},	/* in exclusion list */
-	{0x0959, 0, 2 | DECOMP_NO_COMPOSE, 757},	/* in exclusion list */
-	{0x095A, 0, 2 | DECOMP_NO_COMPOSE, 759},	/* in exclusion list */
-	{0x095B, 0, 2 | DECOMP_NO_COMPOSE, 761},	/* in exclusion list */
-	{0x095C, 0, 2 | DECOMP_NO_COMPOSE, 763},	/* in exclusion list */
-	{0x095D, 0, 2 | DECOMP_NO_COMPOSE, 765},	/* in exclusion list */
-	{0x095E, 0, 2 | DECOMP_NO_COMPOSE, 767},	/* in exclusion list */
-	{0x095F, 0, 2 | DECOMP_NO_COMPOSE, 769},	/* in exclusion list */
-	{0x09BC, 7, 0, 0},
-	{0x09CB, 0, 2, 771},
-	{0x09CC, 0, 2, 773},
-	{0x09CD, 9, 0, 0},
-	{0x09DC, 0, 2 | DECOMP_NO_COMPOSE, 775},	/* in exclusion list */
-	{0x09DD, 0, 2 | DECOMP_NO_COMPOSE, 777},	/* in exclusion list */
-	{0x09DF, 0, 2 | DECOMP_NO_COMPOSE, 779},	/* in exclusion list */
-	{0x09FE, 230, 0, 0},
-	{0x0A33, 0, 2 | DECOMP_NO_COMPOSE, 781},	/* in exclusion list */
-	{0x0A36, 0, 2 | DECOMP_NO_COMPOSE, 783},	/* in exclusion list */
-	{0x0A3C, 7, 0, 0},
-	{0x0A4D, 9, 0, 0},
-	{0x0A59, 0, 2 | DECOMP_NO_COMPOSE, 785},	/* in exclusion list */
-	{0x0A5A, 0, 2 | DECOMP_NO_COMPOSE, 787},	/* in exclusion list */
-	{0x0A5B, 0, 2 | DECOMP_NO_COMPOSE, 789},	/* in exclusion list */
-	{0x0A5E, 0, 2 | DECOMP_NO_COMPOSE, 791},	/* in exclusion list */
-	{0x0ABC, 7, 0, 0},
-	{0x0ACD, 9, 0, 0},
-	{0x0B3C, 7, 0, 0},
-	{0x0B48, 0, 2, 793},
-	{0x0B4B, 0, 2, 795},
-	{0x0B4C, 0, 2, 797},
-	{0x0B4D, 9, 0, 0},
-	{0x0B5C, 0, 2 | DECOMP_NO_COMPOSE, 799},	/* in exclusion list */
-	{0x0B5D, 0, 2 | DECOMP_NO_COMPOSE, 801},	/* in exclusion list */
-	{0x0B94, 0, 2, 803},
-	{0x0BCA, 0, 2, 805},
-	{0x0BCB, 0, 2, 807},
-	{0x0BCC, 0, 2, 809},
-	{0x0BCD, 9, 0, 0},
-	{0x0C3C, 7, 0, 0},
-	{0x0C48, 0, 2, 811},
-	{0x0C4D, 9, 0, 0},
-	{0x0C55, 84, 0, 0},
-	{0x0C56, 91, 0, 0},
-	{0x0CBC, 7, 0, 0},
-	{0x0CC0, 0, 2, 813},
-	{0x0CC7, 0, 2, 815},
-	{0x0CC8, 0, 2, 817},
-	{0x0CCA, 0, 2, 819},
-	{0x0CCB, 0, 2, 821},
-	{0x0CCD, 9, 0, 0},
-	{0x0D3B, 9, 0, 0},
-	{0x0D3C, 9, 0, 0},
-	{0x0D4A, 0, 2, 823},
-	{0x0D4B, 0, 2, 825},
-	{0x0D4C, 0, 2, 827},
-	{0x0D4D, 9, 0, 0},
-	{0x0DCA, 9, 0, 0},
-	{0x0DDA, 0, 2, 829},
-	{0x0DDC, 0, 2, 831},
-	{0x0DDD, 0, 2, 833},
-	{0x0DDE, 0, 2, 835},
-	{0x0E33, 0, 2 | DECOMP_COMPAT, 837},
-	{0x0E38, 103, 0, 0},
-	{0x0E39, 103, 0, 0},
-	{0x0E3A, 9, 0, 0},
-	{0x0E48, 107, 0, 0},
-	{0x0E49, 107, 0, 0},
-	{0x0E4A, 107, 0, 0},
-	{0x0E4B, 107, 0, 0},
-	{0x0EB3, 0, 2 | DECOMP_COMPAT, 839},
-	{0x0EB8, 118, 0, 0},
-	{0x0EB9, 118, 0, 0},
-	{0x0EBA, 9, 0, 0},
-	{0x0EC8, 122, 0, 0},
-	{0x0EC9, 122, 0, 0},
-	{0x0ECA, 122, 0, 0},
-	{0x0ECB, 122, 0, 0},
-	{0x0EDC, 0, 2 | DECOMP_COMPAT, 841},
-	{0x0EDD, 0, 2 | DECOMP_COMPAT, 843},
-	{0x0F0C, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0F0B},
-	{0x0F18, 220, 0, 0},
-	{0x0F19, 220, 0, 0},
-	{0x0F35, 220, 0, 0},
-	{0x0F37, 220, 0, 0},
-	{0x0F39, 216, 0, 0},
-	{0x0F43, 0, 2 | DECOMP_NO_COMPOSE, 845},	/* in exclusion list */
-	{0x0F4D, 0, 2 | DECOMP_NO_COMPOSE, 847},	/* in exclusion list */
-	{0x0F52, 0, 2 | DECOMP_NO_COMPOSE, 849},	/* in exclusion list */
-	{0x0F57, 0, 2 | DECOMP_NO_COMPOSE, 851},	/* in exclusion list */
-	{0x0F5C, 0, 2 | DECOMP_NO_COMPOSE, 853},	/* in exclusion list */
-	{0x0F69, 0, 2 | DECOMP_NO_COMPOSE, 855},	/* in exclusion list */
-	{0x0F71, 129, 0, 0},
-	{0x0F72, 130, 0, 0},
-	{0x0F73, 0, 2 | DECOMP_NO_COMPOSE, 857},	/* non-starter decomposition */
-	{0x0F74, 132, 0, 0},
-	{0x0F75, 0, 2 | DECOMP_NO_COMPOSE, 859},	/* non-starter decomposition */
-	{0x0F76, 0, 2 | DECOMP_NO_COMPOSE, 861},	/* in exclusion list */
-	{0x0F77, 0, 2 | DECOMP_COMPAT, 863},
-	{0x0F78, 0, 2 | DECOMP_NO_COMPOSE, 865},	/* in exclusion list */
-	{0x0F79, 0, 2 | DECOMP_COMPAT, 867},
-	{0x0F7A, 130, 0, 0},
-	{0x0F7B, 130, 0, 0},
-	{0x0F7C, 130, 0, 0},
-	{0x0F7D, 130, 0, 0},
-	{0x0F80, 130, 0, 0},
-	{0x0F81, 0, 2 | DECOMP_NO_COMPOSE, 869},	/* non-starter decomposition */
-	{0x0F82, 230, 0, 0},
-	{0x0F83, 230, 0, 0},
-	{0x0F84, 9, 0, 0},
-	{0x0F86, 230, 0, 0},
-	{0x0F87, 230, 0, 0},
-	{0x0F93, 0, 2 | DECOMP_NO_COMPOSE, 871},	/* in exclusion list */
-	{0x0F9D, 0, 2 | DECOMP_NO_COMPOSE, 873},	/* in exclusion list */
-	{0x0FA2, 0, 2 | DECOMP_NO_COMPOSE, 875},	/* in exclusion list */
-	{0x0FA7, 0, 2 | DECOMP_NO_COMPOSE, 877},	/* in exclusion list */
-	{0x0FAC, 0, 2 | DECOMP_NO_COMPOSE, 879},	/* in exclusion list */
-	{0x0FB9, 0, 2 | DECOMP_NO_COMPOSE, 881},	/* in exclusion list */
-	{0x0FC6, 220, 0, 0},
-	{0x1026, 0, 2, 883},
-	{0x1037, 7, 0, 0},
-	{0x1039, 9, 0, 0},
-	{0x103A, 9, 0, 0},
-	{0x108D, 220, 0, 0},
-	{0x10FC, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x10DC},
-	{0x135D, 230, 0, 0},
-	{0x135E, 230, 0, 0},
-	{0x135F, 230, 0, 0},
-	{0x1714, 9, 0, 0},
-	{0x1715, 9, 0, 0},
-	{0x1734, 9, 0, 0},
-	{0x17D2, 9, 0, 0},
-	{0x17DD, 230, 0, 0},
-	{0x18A9, 228, 0, 0},
-	{0x1939, 222, 0, 0},
-	{0x193A, 230, 0, 0},
-	{0x193B, 220, 0, 0},
-	{0x1A17, 230, 0, 0},
-	{0x1A18, 220, 0, 0},
-	{0x1A60, 9, 0, 0},
-	{0x1A75, 230, 0, 0},
-	{0x1A76, 230, 0, 0},
-	{0x1A77, 230, 0, 0},
-	{0x1A78, 230, 0, 0},
-	{0x1A79, 230, 0, 0},
-	{0x1A7A, 230, 0, 0},
-	{0x1A7B, 230, 0, 0},
-	{0x1A7C, 230, 0, 0},
-	{0x1A7F, 220, 0, 0},
-	{0x1AB0, 230, 0, 0},
-	{0x1AB1, 230, 0, 0},
-	{0x1AB2, 230, 0, 0},
-	{0x1AB3, 230, 0, 0},
-	{0x1AB4, 230, 0, 0},
-	{0x1AB5, 220, 0, 0},
-	{0x1AB6, 220, 0, 0},
-	{0x1AB7, 220, 0, 0},
-	{0x1AB8, 220, 0, 0},
-	{0x1AB9, 220, 0, 0},
-	{0x1ABA, 220, 0, 0},
-	{0x1ABB, 230, 0, 0},
-	{0x1ABC, 230, 0, 0},
-	{0x1ABD, 220, 0, 0},
-	{0x1ABF, 220, 0, 0},
-	{0x1AC0, 220, 0, 0},
-	{0x1AC1, 230, 0, 0},
-	{0x1AC2, 230, 0, 0},
-	{0x1AC3, 220, 0, 0},
-	{0x1AC4, 220, 0, 0},
-	{0x1AC5, 230, 0, 0},
-	{0x1AC6, 230, 0, 0},
-	{0x1AC7, 230, 0, 0},
-	{0x1AC8, 230, 0, 0},
-	{0x1AC9, 230, 0, 0},
-	{0x1ACA, 220, 0, 0},
-	{0x1ACB, 230, 0, 0},
-	{0x1ACC, 230, 0, 0},
-	{0x1ACD, 230, 0, 0},
-	{0x1ACE, 230, 0, 0},
-	{0x1B06, 0, 2, 885},
-	{0x1B08, 0, 2, 887},
-	{0x1B0A, 0, 2, 889},
-	{0x1B0C, 0, 2, 891},
-	{0x1B0E, 0, 2, 893},
-	{0x1B12, 0, 2, 895},
-	{0x1B34, 7, 0, 0},
-	{0x1B3B, 0, 2, 897},
-	{0x1B3D, 0, 2, 899},
-	{0x1B40, 0, 2, 901},
-	{0x1B41, 0, 2, 903},
-	{0x1B43, 0, 2, 905},
-	{0x1B44, 9, 0, 0},
-	{0x1B6B, 230, 0, 0},
-	{0x1B6C, 220, 0, 0},
-	{0x1B6D, 230, 0, 0},
-	{0x1B6E, 230, 0, 0},
-	{0x1B6F, 230, 0, 0},
-	{0x1B70, 230, 0, 0},
-	{0x1B71, 230, 0, 0},
-	{0x1B72, 230, 0, 0},
-	{0x1B73, 230, 0, 0},
-	{0x1BAA, 9, 0, 0},
-	{0x1BAB, 9, 0, 0},
-	{0x1BE6, 7, 0, 0},
-	{0x1BF2, 9, 0, 0},
-	{0x1BF3, 9, 0, 0},
-	{0x1C37, 7, 0, 0},
-	{0x1CD0, 230, 0, 0},
-	{0x1CD1, 230, 0, 0},
-	{0x1CD2, 230, 0, 0},
-	{0x1CD4, 1, 0, 0},
-	{0x1CD5, 220, 0, 0},
-	{0x1CD6, 220, 0, 0},
-	{0x1CD7, 220, 0, 0},
-	{0x1CD8, 220, 0, 0},
-	{0x1CD9, 220, 0, 0},
-	{0x1CDA, 230, 0, 0},
-	{0x1CDB, 230, 0, 0},
-	{0x1CDC, 220, 0, 0},
-	{0x1CDD, 220, 0, 0},
-	{0x1CDE, 220, 0, 0},
-	{0x1CDF, 220, 0, 0},
-	{0x1CE0, 230, 0, 0},
-	{0x1CE2, 1, 0, 0},
-	{0x1CE3, 1, 0, 0},
-	{0x1CE4, 1, 0, 0},
-	{0x1CE5, 1, 0, 0},
-	{0x1CE6, 1, 0, 0},
-	{0x1CE7, 1, 0, 0},
-	{0x1CE8, 1, 0, 0},
-	{0x1CED, 220, 0, 0},
-	{0x1CF4, 230, 0, 0},
-	{0x1CF8, 230, 0, 0},
-	{0x1CF9, 230, 0, 0},
-	{0x1D2C, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0041},
-	{0x1D2D, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x00C6},
-	{0x1D2E, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0042},
-	{0x1D30, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0044},
-	{0x1D31, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0045},
-	{0x1D32, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x018E},
-	{0x1D33, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0047},
-	{0x1D34, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0048},
-	{0x1D35, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0049},
-	{0x1D36, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x004A},
-	{0x1D37, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x004B},
-	{0x1D38, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x004C},
-	{0x1D39, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x004D},
-	{0x1D3A, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x004E},
-	{0x1D3C, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x004F},
-	{0x1D3D, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0222},
-	{0x1D3E, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0050},
-	{0x1D3F, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0052},
-	{0x1D40, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0054},
-	{0x1D41, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0055},
-	{0x1D42, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0057},
-	{0x1D43, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0061},
-	{0x1D44, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0250},
-	{0x1D45, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0251},
-	{0x1D46, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x1D02},
-	{0x1D47, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0062},
-	{0x1D48, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0064},
-	{0x1D49, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0065},
-	{0x1D4A, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0259},
-	{0x1D4B, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x025B},
-	{0x1D4C, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x025C},
-	{0x1D4D, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0067},
-	{0x1D4F, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x006B},
-	{0x1D50, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x006D},
-	{0x1D51, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x014B},
-	{0x1D52, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x006F},
-	{0x1D53, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0254},
-	{0x1D54, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x1D16},
-	{0x1D55, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x1D17},
-	{0x1D56, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0070},
-	{0x1D57, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0074},
-	{0x1D58, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0075},
-	{0x1D59, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x1D1D},
-	{0x1D5A, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x026F},
-	{0x1D5B, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0076},
-	{0x1D5C, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x1D25},
-	{0x1D5D, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03B2},
-	{0x1D5E, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03B3},
-	{0x1D5F, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03B4},
-	{0x1D60, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03C6},
-	{0x1D61, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03C7},
-	{0x1D62, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0069},
-	{0x1D63, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0072},
-	{0x1D64, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0075},
-	{0x1D65, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0076},
-	{0x1D66, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03B2},
-	{0x1D67, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03B3},
-	{0x1D68, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03C1},
-	{0x1D69, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03C6},
-	{0x1D6A, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03C7},
-	{0x1D78, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x043D},
-	{0x1D9B, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0252},
-	{0x1D9C, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0063},
-	{0x1D9D, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0255},
-	{0x1D9E, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x00F0},
-	{0x1D9F, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x025C},
-	{0x1DA0, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0066},
-	{0x1DA1, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x025F},
-	{0x1DA2, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0261},
-	{0x1DA3, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0265},
-	{0x1DA4, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0268},
-	{0x1DA5, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0269},
-	{0x1DA6, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x026A},
-	{0x1DA7, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x1D7B},
-	{0x1DA8, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x029D},
-	{0x1DA9, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x026D},
-	{0x1DAA, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x1D85},
-	{0x1DAB, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x029F},
-	{0x1DAC, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0271},
-	{0x1DAD, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0270},
-	{0x1DAE, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0272},
-	{0x1DAF, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0273},
-	{0x1DB0, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0274},
-	{0x1DB1, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0275},
-	{0x1DB2, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0278},
-	{0x1DB3, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0282},
-	{0x1DB4, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0283},
-	{0x1DB5, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x01AB},
-	{0x1DB6, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0289},
-	{0x1DB7, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x028A},
-	{0x1DB8, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x1D1C},
-	{0x1DB9, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x028B},
-	{0x1DBA, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x028C},
-	{0x1DBB, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x007A},
-	{0x1DBC, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0290},
-	{0x1DBD, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0291},
-	{0x1DBE, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0292},
-	{0x1DBF, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03B8},
-	{0x1DC0, 230, 0, 0},
-	{0x1DC1, 230, 0, 0},
-	{0x1DC2, 220, 0, 0},
-	{0x1DC3, 230, 0, 0},
-	{0x1DC4, 230, 0, 0},
-	{0x1DC5, 230, 0, 0},
-	{0x1DC6, 230, 0, 0},
-	{0x1DC7, 230, 0, 0},
-	{0x1DC8, 230, 0, 0},
-	{0x1DC9, 230, 0, 0},
-	{0x1DCA, 220, 0, 0},
-	{0x1DCB, 230, 0, 0},
-	{0x1DCC, 230, 0, 0},
-	{0x1DCD, 234, 0, 0},
-	{0x1DCE, 214, 0, 0},
-	{0x1DCF, 220, 0, 0},
-	{0x1DD0, 202, 0, 0},
-	{0x1DD1, 230, 0, 0},
-	{0x1DD2, 230, 0, 0},
-	{0x1DD3, 230, 0, 0},
-	{0x1DD4, 230, 0, 0},
-	{0x1DD5, 230, 0, 0},
-	{0x1DD6, 230, 0, 0},
-	{0x1DD7, 230, 0, 0},
-	{0x1DD8, 230, 0, 0},
-	{0x1DD9, 230, 0, 0},
-	{0x1DDA, 230, 0, 0},
-	{0x1DDB, 230, 0, 0},
-	{0x1DDC, 230, 0, 0},
-	{0x1DDD, 230, 0, 0},
-	{0x1DDE, 230, 0, 0},
-	{0x1DDF, 230, 0, 0},
-	{0x1DE0, 230, 0, 0},
-	{0x1DE1, 230, 0, 0},
-	{0x1DE2, 230, 0, 0},
-	{0x1DE3, 230, 0, 0},
-	{0x1DE4, 230, 0, 0},
-	{0x1DE5, 230, 0, 0},
-	{0x1DE6, 230, 0, 0},
-	{0x1DE7, 230, 0, 0},
-	{0x1DE8, 230, 0, 0},
-	{0x1DE9, 230, 0, 0},
-	{0x1DEA, 230, 0, 0},
-	{0x1DEB, 230, 0, 0},
-	{0x1DEC, 230, 0, 0},
-	{0x1DED, 230, 0, 0},
-	{0x1DEE, 230, 0, 0},
-	{0x1DEF, 230, 0, 0},
-	{0x1DF0, 230, 0, 0},
-	{0x1DF1, 230, 0, 0},
-	{0x1DF2, 230, 0, 0},
-	{0x1DF3, 230, 0, 0},
-	{0x1DF4, 230, 0, 0},
-	{0x1DF5, 230, 0, 0},
-	{0x1DF6, 232, 0, 0},
-	{0x1DF7, 228, 0, 0},
-	{0x1DF8, 228, 0, 0},
-	{0x1DF9, 220, 0, 0},
-	{0x1DFA, 218, 0, 0},
-	{0x1DFB, 230, 0, 0},
-	{0x1DFC, 233, 0, 0},
-	{0x1DFD, 220, 0, 0},
-	{0x1DFE, 230, 0, 0},
-	{0x1DFF, 220, 0, 0},
-	{0x1E00, 0, 2, 907},
-	{0x1E01, 0, 2, 909},
-	{0x1E02, 0, 2, 911},
-	{0x1E03, 0, 2, 913},
-	{0x1E04, 0, 2, 915},
-	{0x1E05, 0, 2, 917},
-	{0x1E06, 0, 2, 919},
-	{0x1E07, 0, 2, 921},
-	{0x1E08, 0, 2, 923},
-	{0x1E09, 0, 2, 925},
-	{0x1E0A, 0, 2, 927},
-	{0x1E0B, 0, 2, 929},
-	{0x1E0C, 0, 2, 931},
-	{0x1E0D, 0, 2, 933},
-	{0x1E0E, 0, 2, 935},
-	{0x1E0F, 0, 2, 937},
-	{0x1E10, 0, 2, 939},
-	{0x1E11, 0, 2, 941},
-	{0x1E12, 0, 2, 943},
-	{0x1E13, 0, 2, 945},
-	{0x1E14, 0, 2, 947},
-	{0x1E15, 0, 2, 949},
-	{0x1E16, 0, 2, 951},
-	{0x1E17, 0, 2, 953},
-	{0x1E18, 0, 2, 955},
-	{0x1E19, 0, 2, 957},
-	{0x1E1A, 0, 2, 959},
-	{0x1E1B, 0, 2, 961},
-	{0x1E1C, 0, 2, 963},
-	{0x1E1D, 0, 2, 965},
-	{0x1E1E, 0, 2, 967},
-	{0x1E1F, 0, 2, 969},
-	{0x1E20, 0, 2, 971},
-	{0x1E21, 0, 2, 973},
-	{0x1E22, 0, 2, 975},
-	{0x1E23, 0, 2, 977},
-	{0x1E24, 0, 2, 979},
-	{0x1E25, 0, 2, 981},
-	{0x1E26, 0, 2, 983},
-	{0x1E27, 0, 2, 985},
-	{0x1E28, 0, 2, 987},
-	{0x1E29, 0, 2, 989},
-	{0x1E2A, 0, 2, 991},
-	{0x1E2B, 0, 2, 993},
-	{0x1E2C, 0, 2, 995},
-	{0x1E2D, 0, 2, 997},
-	{0x1E2E, 0, 2, 999},
-	{0x1E2F, 0, 2, 1001},
-	{0x1E30, 0, 2, 1003},
-	{0x1E31, 0, 2, 1005},
-	{0x1E32, 0, 2, 1007},
-	{0x1E33, 0, 2, 1009},
-	{0x1E34, 0, 2, 1011},
-	{0x1E35, 0, 2, 1013},
-	{0x1E36, 0, 2, 1015},
-	{0x1E37, 0, 2, 1017},
-	{0x1E38, 0, 2, 1019},
-	{0x1E39, 0, 2, 1021},
-	{0x1E3A, 0, 2, 1023},
-	{0x1E3B, 0, 2, 1025},
-	{0x1E3C, 0, 2, 1027},
-	{0x1E3D, 0, 2, 1029},
-	{0x1E3E, 0, 2, 1031},
-	{0x1E3F, 0, 2, 1033},
-	{0x1E40, 0, 2, 1035},
-	{0x1E41, 0, 2, 1037},
-	{0x1E42, 0, 2, 1039},
-	{0x1E43, 0, 2, 1041},
-	{0x1E44, 0, 2, 1043},
-	{0x1E45, 0, 2, 1045},
-	{0x1E46, 0, 2, 1047},
-	{0x1E47, 0, 2, 1049},
-	{0x1E48, 0, 2, 1051},
-	{0x1E49, 0, 2, 1053},
-	{0x1E4A, 0, 2, 1055},
-	{0x1E4B, 0, 2, 1057},
-	{0x1E4C, 0, 2, 1059},
-	{0x1E4D, 0, 2, 1061},
-	{0x1E4E, 0, 2, 1063},
-	{0x1E4F, 0, 2, 1065},
-	{0x1E50, 0, 2, 1067},
-	{0x1E51, 0, 2, 1069},
-	{0x1E52, 0, 2, 1071},
-	{0x1E53, 0, 2, 1073},
-	{0x1E54, 0, 2, 1075},
-	{0x1E55, 0, 2, 1077},
-	{0x1E56, 0, 2, 1079},
-	{0x1E57, 0, 2, 1081},
-	{0x1E58, 0, 2, 1083},
-	{0x1E59, 0, 2, 1085},
-	{0x1E5A, 0, 2, 1087},
-	{0x1E5B, 0, 2, 1089},
-	{0x1E5C, 0, 2, 1091},
-	{0x1E5D, 0, 2, 1093},
-	{0x1E5E, 0, 2, 1095},
-	{0x1E5F, 0, 2, 1097},
-	{0x1E60, 0, 2, 1099},
-	{0x1E61, 0, 2, 1101},
-	{0x1E62, 0, 2, 1103},
-	{0x1E63, 0, 2, 1105},
-	{0x1E64, 0, 2, 1107},
-	{0x1E65, 0, 2, 1109},
-	{0x1E66, 0, 2, 1111},
-	{0x1E67, 0, 2, 1113},
-	{0x1E68, 0, 2, 1115},
-	{0x1E69, 0, 2, 1117},
-	{0x1E6A, 0, 2, 1119},
-	{0x1E6B, 0, 2, 1121},
-	{0x1E6C, 0, 2, 1123},
-	{0x1E6D, 0, 2, 1125},
-	{0x1E6E, 0, 2, 1127},
-	{0x1E6F, 0, 2, 1129},
-	{0x1E70, 0, 2, 1131},
-	{0x1E71, 0, 2, 1133},
-	{0x1E72, 0, 2, 1135},
-	{0x1E73, 0, 2, 1137},
-	{0x1E74, 0, 2, 1139},
-	{0x1E75, 0, 2, 1141},
-	{0x1E76, 0, 2, 1143},
-	{0x1E77, 0, 2, 1145},
-	{0x1E78, 0, 2, 1147},
-	{0x1E79, 0, 2, 1149},
-	{0x1E7A, 0, 2, 1151},
-	{0x1E7B, 0, 2, 1153},
-	{0x1E7C, 0, 2, 1155},
-	{0x1E7D, 0, 2, 1157},
-	{0x1E7E, 0, 2, 1159},
-	{0x1E7F, 0, 2, 1161},
-	{0x1E80, 0, 2, 1163},
-	{0x1E81, 0, 2, 1165},
-	{0x1E82, 0, 2, 1167},
-	{0x1E83, 0, 2, 1169},
-	{0x1E84, 0, 2, 1171},
-	{0x1E85, 0, 2, 1173},
-	{0x1E86, 0, 2, 1175},
-	{0x1E87, 0, 2, 1177},
-	{0x1E88, 0, 2, 1179},
-	{0x1E89, 0, 2, 1181},
-	{0x1E8A, 0, 2, 1183},
-	{0x1E8B, 0, 2, 1185},
-	{0x1E8C, 0, 2, 1187},
-	{0x1E8D, 0, 2, 1189},
-	{0x1E8E, 0, 2, 1191},
-	{0x1E8F, 0, 2, 1193},
-	{0x1E90, 0, 2, 1195},
-	{0x1E91, 0, 2, 1197},
-	{0x1E92, 0, 2, 1199},
-	{0x1E93, 0, 2, 1201},
-	{0x1E94, 0, 2, 1203},
-	{0x1E95, 0, 2, 1205},
-	{0x1E96, 0, 2, 1207},
-	{0x1E97, 0, 2, 1209},
-	{0x1E98, 0, 2, 1211},
-	{0x1E99, 0, 2, 1213},
-	{0x1E9A, 0, 2 | DECOMP_COMPAT, 1215},
-	{0x1E9B, 0, 2, 1217},
-	{0x1EA0, 0, 2, 1219},
-	{0x1EA1, 0, 2, 1221},
-	{0x1EA2, 0, 2, 1223},
-	{0x1EA3, 0, 2, 1225},
-	{0x1EA4, 0, 2, 1227},
-	{0x1EA5, 0, 2, 1229},
-	{0x1EA6, 0, 2, 1231},
-	{0x1EA7, 0, 2, 1233},
-	{0x1EA8, 0, 2, 1235},
-	{0x1EA9, 0, 2, 1237},
-	{0x1EAA, 0, 2, 1239},
-	{0x1EAB, 0, 2, 1241},
-	{0x1EAC, 0, 2, 1243},
-	{0x1EAD, 0, 2, 1245},
-	{0x1EAE, 0, 2, 1247},
-	{0x1EAF, 0, 2, 1249},
-	{0x1EB0, 0, 2, 1251},
-	{0x1EB1, 0, 2, 1253},
-	{0x1EB2, 0, 2, 1255},
-	{0x1EB3, 0, 2, 1257},
-	{0x1EB4, 0, 2, 1259},
-	{0x1EB5, 0, 2, 1261},
-	{0x1EB6, 0, 2, 1263},
-	{0x1EB7, 0, 2, 1265},
-	{0x1EB8, 0, 2, 1267},
-	{0x1EB9, 0, 2, 1269},
-	{0x1EBA, 0, 2, 1271},
-	{0x1EBB, 0, 2, 1273},
-	{0x1EBC, 0, 2, 1275},
-	{0x1EBD, 0, 2, 1277},
-	{0x1EBE, 0, 2, 1279},
-	{0x1EBF, 0, 2, 1281},
-	{0x1EC0, 0, 2, 1283},
-	{0x1EC1, 0, 2, 1285},
-	{0x1EC2, 0, 2, 1287},
-	{0x1EC3, 0, 2, 1289},
-	{0x1EC4, 0, 2, 1291},
-	{0x1EC5, 0, 2, 1293},
-	{0x1EC6, 0, 2, 1295},
-	{0x1EC7, 0, 2, 1297},
-	{0x1EC8, 0, 2, 1299},
-	{0x1EC9, 0, 2, 1301},
-	{0x1ECA, 0, 2, 1303},
-	{0x1ECB, 0, 2, 1305},
-	{0x1ECC, 0, 2, 1307},
-	{0x1ECD, 0, 2, 1309},
-	{0x1ECE, 0, 2, 1311},
-	{0x1ECF, 0, 2, 1313},
-	{0x1ED0, 0, 2, 1315},
-	{0x1ED1, 0, 2, 1317},
-	{0x1ED2, 0, 2, 1319},
-	{0x1ED3, 0, 2, 1321},
-	{0x1ED4, 0, 2, 1323},
-	{0x1ED5, 0, 2, 1325},
-	{0x1ED6, 0, 2, 1327},
-	{0x1ED7, 0, 2, 1329},
-	{0x1ED8, 0, 2, 1331},
-	{0x1ED9, 0, 2, 1333},
-	{0x1EDA, 0, 2, 1335},
-	{0x1EDB, 0, 2, 1337},
-	{0x1EDC, 0, 2, 1339},
-	{0x1EDD, 0, 2, 1341},
-	{0x1EDE, 0, 2, 1343},
-	{0x1EDF, 0, 2, 1345},
-	{0x1EE0, 0, 2, 1347},
-	{0x1EE1, 0, 2, 1349},
-	{0x1EE2, 0, 2, 1351},
-	{0x1EE3, 0, 2, 1353},
-	{0x1EE4, 0, 2, 1355},
-	{0x1EE5, 0, 2, 1357},
-	{0x1EE6, 0, 2, 1359},
-	{0x1EE7, 0, 2, 1361},
-	{0x1EE8, 0, 2, 1363},
-	{0x1EE9, 0, 2, 1365},
-	{0x1EEA, 0, 2, 1367},
-	{0x1EEB, 0, 2, 1369},
-	{0x1EEC, 0, 2, 1371},
-	{0x1EED, 0, 2, 1373},
-	{0x1EEE, 0, 2, 1375},
-	{0x1EEF, 0, 2, 1377},
-	{0x1EF0, 0, 2, 1379},
-	{0x1EF1, 0, 2, 1381},
-	{0x1EF2, 0, 2, 1383},
-	{0x1EF3, 0, 2, 1385},
-	{0x1EF4, 0, 2, 1387},
-	{0x1EF5, 0, 2, 1389},
-	{0x1EF6, 0, 2, 1391},
-	{0x1EF7, 0, 2, 1393},
-	{0x1EF8, 0, 2, 1395},
-	{0x1EF9, 0, 2, 1397},
-	{0x1F00, 0, 2, 1399},
-	{0x1F01, 0, 2, 1401},
-	{0x1F02, 0, 2, 1403},
-	{0x1F03, 0, 2, 1405},
-	{0x1F04, 0, 2, 1407},
-	{0x1F05, 0, 2, 1409},
-	{0x1F06, 0, 2, 1411},
-	{0x1F07, 0, 2, 1413},
-	{0x1F08, 0, 2, 1415},
-	{0x1F09, 0, 2, 1417},
-	{0x1F0A, 0, 2, 1419},
-	{0x1F0B, 0, 2, 1421},
-	{0x1F0C, 0, 2, 1423},
-	{0x1F0D, 0, 2, 1425},
-	{0x1F0E, 0, 2, 1427},
-	{0x1F0F, 0, 2, 1429},
-	{0x1F10, 0, 2, 1431},
-	{0x1F11, 0, 2, 1433},
-	{0x1F12, 0, 2, 1435},
-	{0x1F13, 0, 2, 1437},
-	{0x1F14, 0, 2, 1439},
-	{0x1F15, 0, 2, 1441},
-	{0x1F18, 0, 2, 1443},
-	{0x1F19, 0, 2, 1445},
-	{0x1F1A, 0, 2, 1447},
-	{0x1F1B, 0, 2, 1449},
-	{0x1F1C, 0, 2, 1451},
-	{0x1F1D, 0, 2, 1453},
-	{0x1F20, 0, 2, 1455},
-	{0x1F21, 0, 2, 1457},
-	{0x1F22, 0, 2, 1459},
-	{0x1F23, 0, 2, 1461},
-	{0x1F24, 0, 2, 1463},
-	{0x1F25, 0, 2, 1465},
-	{0x1F26, 0, 2, 1467},
-	{0x1F27, 0, 2, 1469},
-	{0x1F28, 0, 2, 1471},
-	{0x1F29, 0, 2, 1473},
-	{0x1F2A, 0, 2, 1475},
-	{0x1F2B, 0, 2, 1477},
-	{0x1F2C, 0, 2, 1479},
-	{0x1F2D, 0, 2, 1481},
-	{0x1F2E, 0, 2, 1483},
-	{0x1F2F, 0, 2, 1485},
-	{0x1F30, 0, 2, 1487},
-	{0x1F31, 0, 2, 1489},
-	{0x1F32, 0, 2, 1491},
-	{0x1F33, 0, 2, 1493},
-	{0x1F34, 0, 2, 1495},
-	{0x1F35, 0, 2, 1497},
-	{0x1F36, 0, 2, 1499},
-	{0x1F37, 0, 2, 1501},
-	{0x1F38, 0, 2, 1503},
-	{0x1F39, 0, 2, 1505},
-	{0x1F3A, 0, 2, 1507},
-	{0x1F3B, 0, 2, 1509},
-	{0x1F3C, 0, 2, 1511},
-	{0x1F3D, 0, 2, 1513},
-	{0x1F3E, 0, 2, 1515},
-	{0x1F3F, 0, 2, 1517},
-	{0x1F40, 0, 2, 1519},
-	{0x1F41, 0, 2, 1521},
-	{0x1F42, 0, 2, 1523},
-	{0x1F43, 0, 2, 1525},
-	{0x1F44, 0, 2, 1527},
-	{0x1F45, 0, 2, 1529},
-	{0x1F48, 0, 2, 1531},
-	{0x1F49, 0, 2, 1533},
-	{0x1F4A, 0, 2, 1535},
-	{0x1F4B, 0, 2, 1537},
-	{0x1F4C, 0, 2, 1539},
-	{0x1F4D, 0, 2, 1541},
-	{0x1F50, 0, 2, 1543},
-	{0x1F51, 0, 2, 1545},
-	{0x1F52, 0, 2, 1547},
-	{0x1F53, 0, 2, 1549},
-	{0x1F54, 0, 2, 1551},
-	{0x1F55, 0, 2, 1553},
-	{0x1F56, 0, 2, 1555},
-	{0x1F57, 0, 2, 1557},
-	{0x1F59, 0, 2, 1559},
-	{0x1F5B, 0, 2, 1561},
-	{0x1F5D, 0, 2, 1563},
-	{0x1F5F, 0, 2, 1565},
-	{0x1F60, 0, 2, 1567},
-	{0x1F61, 0, 2, 1569},
-	{0x1F62, 0, 2, 1571},
-	{0x1F63, 0, 2, 1573},
-	{0x1F64, 0, 2, 1575},
-	{0x1F65, 0, 2, 1577},
-	{0x1F66, 0, 2, 1579},
-	{0x1F67, 0, 2, 1581},
-	{0x1F68, 0, 2, 1583},
-	{0x1F69, 0, 2, 1585},
-	{0x1F6A, 0, 2, 1587},
-	{0x1F6B, 0, 2, 1589},
-	{0x1F6C, 0, 2, 1591},
-	{0x1F6D, 0, 2, 1593},
-	{0x1F6E, 0, 2, 1595},
-	{0x1F6F, 0, 2, 1597},
-	{0x1F70, 0, 2, 1599},
-	{0x1F71, 0, 1 | DECOMP_INLINE, 0x03AC},
-	{0x1F72, 0, 2, 1601},
-	{0x1F73, 0, 1 | DECOMP_INLINE, 0x03AD},
-	{0x1F74, 0, 2, 1603},
-	{0x1F75, 0, 1 | DECOMP_INLINE, 0x03AE},
-	{0x1F76, 0, 2, 1605},
-	{0x1F77, 0, 1 | DECOMP_INLINE, 0x03AF},
-	{0x1F78, 0, 2, 1607},
-	{0x1F79, 0, 1 | DECOMP_INLINE, 0x03CC},
-	{0x1F7A, 0, 2, 1609},
-	{0x1F7B, 0, 1 | DECOMP_INLINE, 0x03CD},
-	{0x1F7C, 0, 2, 1611},
-	{0x1F7D, 0, 1 | DECOMP_INLINE, 0x03CE},
-	{0x1F80, 0, 2, 1613},
-	{0x1F81, 0, 2, 1615},
-	{0x1F82, 0, 2, 1617},
-	{0x1F83, 0, 2, 1619},
-	{0x1F84, 0, 2, 1621},
-	{0x1F85, 0, 2, 1623},
-	{0x1F86, 0, 2, 1625},
-	{0x1F87, 0, 2, 1627},
-	{0x1F88, 0, 2, 1629},
-	{0x1F89, 0, 2, 1631},
-	{0x1F8A, 0, 2, 1633},
-	{0x1F8B, 0, 2, 1635},
-	{0x1F8C, 0, 2, 1637},
-	{0x1F8D, 0, 2, 1639},
-	{0x1F8E, 0, 2, 1641},
-	{0x1F8F, 0, 2, 1643},
-	{0x1F90, 0, 2, 1645},
-	{0x1F91, 0, 2, 1647},
-	{0x1F92, 0, 2, 1649},
-	{0x1F93, 0, 2, 1651},
-	{0x1F94, 0, 2, 1653},
-	{0x1F95, 0, 2, 1655},
-	{0x1F96, 0, 2, 1657},
-	{0x1F97, 0, 2, 1659},
-	{0x1F98, 0, 2, 1661},
-	{0x1F99, 0, 2, 1663},
-	{0x1F9A, 0, 2, 1665},
-	{0x1F9B, 0, 2, 1667},
-	{0x1F9C, 0, 2, 1669},
-	{0x1F9D, 0, 2, 1671},
-	{0x1F9E, 0, 2, 1673},
-	{0x1F9F, 0, 2, 1675},
-	{0x1FA0, 0, 2, 1677},
-	{0x1FA1, 0, 2, 1679},
-	{0x1FA2, 0, 2, 1681},
-	{0x1FA3, 0, 2, 1683},
-	{0x1FA4, 0, 2, 1685},
-	{0x1FA5, 0, 2, 1687},
-	{0x1FA6, 0, 2, 1689},
-	{0x1FA7, 0, 2, 1691},
-	{0x1FA8, 0, 2, 1693},
-	{0x1FA9, 0, 2, 1695},
-	{0x1FAA, 0, 2, 1697},
-	{0x1FAB, 0, 2, 1699},
-	{0x1FAC, 0, 2, 1701},
-	{0x1FAD, 0, 2, 1703},
-	{0x1FAE, 0, 2, 1705},
-	{0x1FAF, 0, 2, 1707},
-	{0x1FB0, 0, 2, 1709},
-	{0x1FB1, 0, 2, 1711},
-	{0x1FB2, 0, 2, 1713},
-	{0x1FB3, 0, 2, 1715},
-	{0x1FB4, 0, 2, 1717},
-	{0x1FB6, 0, 2, 1719},
-	{0x1FB7, 0, 2, 1721},
-	{0x1FB8, 0, 2, 1723},
-	{0x1FB9, 0, 2, 1725},
-	{0x1FBA, 0, 2, 1727},
-	{0x1FBB, 0, 1 | DECOMP_INLINE, 0x0386},
-	{0x1FBC, 0, 2, 1729},
-	{0x1FBD, 0, 2 | DECOMP_COMPAT, 1731},
-	{0x1FBE, 0, 1 | DECOMP_INLINE, 0x03B9},
-	{0x1FBF, 0, 2 | DECOMP_COMPAT, 1733},
-	{0x1FC0, 0, 2 | DECOMP_COMPAT, 1735},
-	{0x1FC1, 0, 2, 1737},
-	{0x1FC2, 0, 2, 1739},
-	{0x1FC3, 0, 2, 1741},
-	{0x1FC4, 0, 2, 1743},
-	{0x1FC6, 0, 2, 1745},
-	{0x1FC7, 0, 2, 1747},
-	{0x1FC8, 0, 2, 1749},
-	{0x1FC9, 0, 1 | DECOMP_INLINE, 0x0388},
-	{0x1FCA, 0, 2, 1751},
-	{0x1FCB, 0, 1 | DECOMP_INLINE, 0x0389},
-	{0x1FCC, 0, 2, 1753},
-	{0x1FCD, 0, 2, 1755},
-	{0x1FCE, 0, 2, 1757},
-	{0x1FCF, 0, 2, 1759},
-	{0x1FD0, 0, 2, 1761},
-	{0x1FD1, 0, 2, 1763},
-	{0x1FD2, 0, 2, 1765},
-	{0x1FD3, 0, 1 | DECOMP_INLINE, 0x0390},
-	{0x1FD6, 0, 2, 1767},
-	{0x1FD7, 0, 2, 1769},
-	{0x1FD8, 0, 2, 1771},
-	{0x1FD9, 0, 2, 1773},
-	{0x1FDA, 0, 2, 1775},
-	{0x1FDB, 0, 1 | DECOMP_INLINE, 0x038A},
-	{0x1FDD, 0, 2, 1777},
-	{0x1FDE, 0, 2, 1779},
-	{0x1FDF, 0, 2, 1781},
-	{0x1FE0, 0, 2, 1783},
-	{0x1FE1, 0, 2, 1785},
-	{0x1FE2, 0, 2, 1787},
-	{0x1FE3, 0, 1 | DECOMP_INLINE, 0x03B0},
-	{0x1FE4, 0, 2, 1789},
-	{0x1FE5, 0, 2, 1791},
-	{0x1FE6, 0, 2, 1793},
-	{0x1FE7, 0, 2, 1795},
-	{0x1FE8, 0, 2, 1797},
-	{0x1FE9, 0, 2, 1799},
-	{0x1FEA, 0, 2, 1801},
-	{0x1FEB, 0, 1 | DECOMP_INLINE, 0x038E},
-	{0x1FEC, 0, 2, 1803},
-	{0x1FED, 0, 2, 1805},
-	{0x1FEE, 0, 1 | DECOMP_INLINE, 0x0385},
-	{0x1FEF, 0, 1 | DECOMP_INLINE, 0x0060},
-	{0x1FF2, 0, 2, 1807},
-	{0x1FF3, 0, 2, 1809},
-	{0x1FF4, 0, 2, 1811},
-	{0x1FF6, 0, 2, 1813},
-	{0x1FF7, 0, 2, 1815},
-	{0x1FF8, 0, 2, 1817},
-	{0x1FF9, 0, 1 | DECOMP_INLINE, 0x038C},
-	{0x1FFA, 0, 2, 1819},
-	{0x1FFB, 0, 1 | DECOMP_INLINE, 0x038F},
-	{0x1FFC, 0, 2, 1821},
-	{0x1FFD, 0, 1 | DECOMP_INLINE, 0x00B4},
-	{0x1FFE, 0, 2 | DECOMP_COMPAT, 1823},
-	{0x2000, 0, 1 | DECOMP_INLINE, 0x2002},
-	{0x2001, 0, 1 | DECOMP_INLINE, 0x2003},
-	{0x2002, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0020},
-	{0x2003, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0020},
-	{0x2004, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0020},
-	{0x2005, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0020},
-	{0x2006, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0020},
-	{0x2007, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0020},
-	{0x2008, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0020},
-	{0x2009, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0020},
-	{0x200A, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0020},
-	{0x2011, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x2010},
-	{0x2017, 0, 2 | DECOMP_COMPAT, 1825},
-	{0x2024, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x002E},
-	{0x2025, 0, 2 | DECOMP_COMPAT, 1827},
-	{0x2026, 0, 3 | DECOMP_COMPAT, 1829},
-	{0x202F, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0020},
-	{0x2033, 0, 2 | DECOMP_COMPAT, 1832},
-	{0x2034, 0, 3 | DECOMP_COMPAT, 1834},
-	{0x2036, 0, 2 | DECOMP_COMPAT, 1837},
-	{0x2037, 0, 3 | DECOMP_COMPAT, 1839},
-	{0x203C, 0, 2 | DECOMP_COMPAT, 1842},
-	{0x203E, 0, 2 | DECOMP_COMPAT, 1844},
-	{0x2047, 0, 2 | DECOMP_COMPAT, 1846},
-	{0x2048, 0, 2 | DECOMP_COMPAT, 1848},
-	{0x2049, 0, 2 | DECOMP_COMPAT, 1850},
-	{0x2057, 0, 4 | DECOMP_COMPAT, 1852},
-	{0x205F, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0020},
-	{0x2070, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0030},
-	{0x2071, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0069},
-	{0x2074, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0034},
-	{0x2075, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0035},
-	{0x2076, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0036},
-	{0x2077, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0037},
-	{0x2078, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0038},
-	{0x2079, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0039},
-	{0x207A, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x002B},
-	{0x207B, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x2212},
-	{0x207C, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x003D},
-	{0x207D, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0028},
-	{0x207E, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0029},
-	{0x207F, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x006E},
-	{0x2080, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0030},
-	{0x2081, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0031},
-	{0x2082, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0032},
-	{0x2083, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0033},
-	{0x2084, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0034},
-	{0x2085, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0035},
-	{0x2086, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0036},
-	{0x2087, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0037},
-	{0x2088, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0038},
-	{0x2089, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0039},
-	{0x208A, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x002B},
-	{0x208B, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x2212},
-	{0x208C, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x003D},
-	{0x208D, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0028},
-	{0x208E, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0029},
-	{0x2090, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0061},
-	{0x2091, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0065},
-	{0x2092, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x006F},
-	{0x2093, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0078},
-	{0x2094, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0259},
-	{0x2095, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0068},
-	{0x2096, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x006B},
-	{0x2097, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x006C},
-	{0x2098, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x006D},
-	{0x2099, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x006E},
-	{0x209A, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0070},
-	{0x209B, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0073},
-	{0x209C, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0074},
-	{0x20A8, 0, 2 | DECOMP_COMPAT, 1856},
-	{0x20D0, 230, 0, 0},
-	{0x20D1, 230, 0, 0},
-	{0x20D2, 1, 0, 0},
-	{0x20D3, 1, 0, 0},
-	{0x20D4, 230, 0, 0},
-	{0x20D5, 230, 0, 0},
-	{0x20D6, 230, 0, 0},
-	{0x20D7, 230, 0, 0},
-	{0x20D8, 1, 0, 0},
-	{0x20D9, 1, 0, 0},
-	{0x20DA, 1, 0, 0},
-	{0x20DB, 230, 0, 0},
-	{0x20DC, 230, 0, 0},
-	{0x20E1, 230, 0, 0},
-	{0x20E5, 1, 0, 0},
-	{0x20E6, 1, 0, 0},
-	{0x20E7, 230, 0, 0},
-	{0x20E8, 220, 0, 0},
-	{0x20E9, 230, 0, 0},
-	{0x20EA, 1, 0, 0},
-	{0x20EB, 1, 0, 0},
-	{0x20EC, 220, 0, 0},
-	{0x20ED, 220, 0, 0},
-	{0x20EE, 220, 0, 0},
-	{0x20EF, 220, 0, 0},
-	{0x20F0, 230, 0, 0},
-	{0x2100, 0, 3 | DECOMP_COMPAT, 1858},
-	{0x2101, 0, 3 | DECOMP_COMPAT, 1861},
-	{0x2102, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0043},
-	{0x2103, 0, 2 | DECOMP_COMPAT, 1864},
-	{0x2105, 0, 3 | DECOMP_COMPAT, 1866},
-	{0x2106, 0, 3 | DECOMP_COMPAT, 1869},
-	{0x2107, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0190},
-	{0x2109, 0, 2 | DECOMP_COMPAT, 1872},
-	{0x210A, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0067},
-	{0x210B, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0048},
-	{0x210C, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0048},
-	{0x210D, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0048},
-	{0x210E, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0068},
-	{0x210F, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0127},
-	{0x2110, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0049},
-	{0x2111, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0049},
-	{0x2112, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x004C},
-	{0x2113, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x006C},
-	{0x2115, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x004E},
-	{0x2116, 0, 2 | DECOMP_COMPAT, 1874},
-	{0x2119, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0050},
-	{0x211A, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0051},
-	{0x211B, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0052},
-	{0x211C, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0052},
-	{0x211D, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0052},
-	{0x2120, 0, 2 | DECOMP_COMPAT, 1876},
-	{0x2121, 0, 3 | DECOMP_COMPAT, 1878},
-	{0x2122, 0, 2 | DECOMP_COMPAT, 1881},
-	{0x2124, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x005A},
-	{0x2126, 0, 1 | DECOMP_INLINE, 0x03A9},
-	{0x2128, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x005A},
-	{0x212A, 0, 1 | DECOMP_INLINE, 0x004B},
-	{0x212B, 0, 1 | DECOMP_INLINE, 0x00C5},
-	{0x212C, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0042},
-	{0x212D, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0043},
-	{0x212F, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0065},
-	{0x2130, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0045},
-	{0x2131, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0046},
-	{0x2133, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x004D},
-	{0x2134, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x006F},
-	{0x2135, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x05D0},
-	{0x2136, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x05D1},
-	{0x2137, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x05D2},
-	{0x2138, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x05D3},
-	{0x2139, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0069},
-	{0x213B, 0, 3 | DECOMP_COMPAT, 1883},
-	{0x213C, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03C0},
-	{0x213D, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03B3},
-	{0x213E, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0393},
-	{0x213F, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03A0},
-	{0x2140, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x2211},
-	{0x2145, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0044},
-	{0x2146, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0064},
-	{0x2147, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0065},
-	{0x2148, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0069},
-	{0x2149, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x006A},
-	{0x2150, 0, 3 | DECOMP_COMPAT, 1886},
-	{0x2151, 0, 3 | DECOMP_COMPAT, 1889},
-	{0x2152, 0, 4 | DECOMP_COMPAT, 1892},
-	{0x2153, 0, 3 | DECOMP_COMPAT, 1896},
-	{0x2154, 0, 3 | DECOMP_COMPAT, 1899},
-	{0x2155, 0, 3 | DECOMP_COMPAT, 1902},
-	{0x2156, 0, 3 | DECOMP_COMPAT, 1905},
-	{0x2157, 0, 3 | DECOMP_COMPAT, 1908},
-	{0x2158, 0, 3 | DECOMP_COMPAT, 1911},
-	{0x2159, 0, 3 | DECOMP_COMPAT, 1914},
-	{0x215A, 0, 3 | DECOMP_COMPAT, 1917},
-	{0x215B, 0, 3 | DECOMP_COMPAT, 1920},
-	{0x215C, 0, 3 | DECOMP_COMPAT, 1923},
-	{0x215D, 0, 3 | DECOMP_COMPAT, 1926},
-	{0x215E, 0, 3 | DECOMP_COMPAT, 1929},
-	{0x215F, 0, 2 | DECOMP_COMPAT, 1932},
-	{0x2160, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0049},
-	{0x2161, 0, 2 | DECOMP_COMPAT, 1934},
-	{0x2162, 0, 3 | DECOMP_COMPAT, 1936},
-	{0x2163, 0, 2 | DECOMP_COMPAT, 1939},
-	{0x2164, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0056},
-	{0x2165, 0, 2 | DECOMP_COMPAT, 1941},
-	{0x2166, 0, 3 | DECOMP_COMPAT, 1943},
-	{0x2167, 0, 4 | DECOMP_COMPAT, 1946},
-	{0x2168, 0, 2 | DECOMP_COMPAT, 1950},
-	{0x2169, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0058},
-	{0x216A, 0, 2 | DECOMP_COMPAT, 1952},
-	{0x216B, 0, 3 | DECOMP_COMPAT, 1954},
-	{0x216C, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x004C},
-	{0x216D, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0043},
-	{0x216E, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0044},
-	{0x216F, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x004D},
-	{0x2170, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0069},
-	{0x2171, 0, 2 | DECOMP_COMPAT, 1957},
-	{0x2172, 0, 3 | DECOMP_COMPAT, 1959},
-	{0x2173, 0, 2 | DECOMP_COMPAT, 1962},
-	{0x2174, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0076},
-	{0x2175, 0, 2 | DECOMP_COMPAT, 1964},
-	{0x2176, 0, 3 | DECOMP_COMPAT, 1966},
-	{0x2177, 0, 4 | DECOMP_COMPAT, 1969},
-	{0x2178, 0, 2 | DECOMP_COMPAT, 1973},
-	{0x2179, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0078},
-	{0x217A, 0, 2 | DECOMP_COMPAT, 1975},
-	{0x217B, 0, 3 | DECOMP_COMPAT, 1977},
-	{0x217C, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x006C},
-	{0x217D, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0063},
-	{0x217E, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0064},
-	{0x217F, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x006D},
-	{0x2189, 0, 3 | DECOMP_COMPAT, 1980},
-	{0x219A, 0, 2, 1983},
-	{0x219B, 0, 2, 1985},
-	{0x21AE, 0, 2, 1987},
-	{0x21CD, 0, 2, 1989},
-	{0x21CE, 0, 2, 1991},
-	{0x21CF, 0, 2, 1993},
-	{0x2204, 0, 2, 1995},
-	{0x2209, 0, 2, 1997},
-	{0x220C, 0, 2, 1999},
-	{0x2224, 0, 2, 2001},
-	{0x2226, 0, 2, 2003},
-	{0x222C, 0, 2 | DECOMP_COMPAT, 2005},
-	{0x222D, 0, 3 | DECOMP_COMPAT, 2007},
-	{0x222F, 0, 2 | DECOMP_COMPAT, 2010},
-	{0x2230, 0, 3 | DECOMP_COMPAT, 2012},
-	{0x2241, 0, 2, 2015},
-	{0x2244, 0, 2, 2017},
-	{0x2247, 0, 2, 2019},
-	{0x2249, 0, 2, 2021},
-	{0x2260, 0, 2, 2023},
-	{0x2262, 0, 2, 2025},
-	{0x226D, 0, 2, 2027},
-	{0x226E, 0, 2, 2029},
-	{0x226F, 0, 2, 2031},
-	{0x2270, 0, 2, 2033},
-	{0x2271, 0, 2, 2035},
-	{0x2274, 0, 2, 2037},
-	{0x2275, 0, 2, 2039},
-	{0x2278, 0, 2, 2041},
-	{0x2279, 0, 2, 2043},
-	{0x2280, 0, 2, 2045},
-	{0x2281, 0, 2, 2047},
-	{0x2284, 0, 2, 2049},
-	{0x2285, 0, 2, 2051},
-	{0x2288, 0, 2, 2053},
-	{0x2289, 0, 2, 2055},
-	{0x22AC, 0, 2, 2057},
-	{0x22AD, 0, 2, 2059},
-	{0x22AE, 0, 2, 2061},
-	{0x22AF, 0, 2, 2063},
-	{0x22E0, 0, 2, 2065},
-	{0x22E1, 0, 2, 2067},
-	{0x22E2, 0, 2, 2069},
-	{0x22E3, 0, 2, 2071},
-	{0x22EA, 0, 2, 2073},
-	{0x22EB, 0, 2, 2075},
-	{0x22EC, 0, 2, 2077},
-	{0x22ED, 0, 2, 2079},
-	{0x2329, 0, 1 | DECOMP_INLINE, 0x3008},
-	{0x232A, 0, 1 | DECOMP_INLINE, 0x3009},
-	{0x2460, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0031},
-	{0x2461, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0032},
-	{0x2462, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0033},
-	{0x2463, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0034},
-	{0x2464, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0035},
-	{0x2465, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0036},
-	{0x2466, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0037},
-	{0x2467, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0038},
-	{0x2468, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0039},
-	{0x2469, 0, 2 | DECOMP_COMPAT, 2081},
-	{0x246A, 0, 2 | DECOMP_COMPAT, 2083},
-	{0x246B, 0, 2 | DECOMP_COMPAT, 2085},
-	{0x246C, 0, 2 | DECOMP_COMPAT, 2087},
-	{0x246D, 0, 2 | DECOMP_COMPAT, 2089},
-	{0x246E, 0, 2 | DECOMP_COMPAT, 2091},
-	{0x246F, 0, 2 | DECOMP_COMPAT, 2093},
-	{0x2470, 0, 2 | DECOMP_COMPAT, 2095},
-	{0x2471, 0, 2 | DECOMP_COMPAT, 2097},
-	{0x2472, 0, 2 | DECOMP_COMPAT, 2099},
-	{0x2473, 0, 2 | DECOMP_COMPAT, 2101},
-	{0x2474, 0, 3 | DECOMP_COMPAT, 2103},
-	{0x2475, 0, 3 | DECOMP_COMPAT, 2106},
-	{0x2476, 0, 3 | DECOMP_COMPAT, 2109},
-	{0x2477, 0, 3 | DECOMP_COMPAT, 2112},
-	{0x2478, 0, 3 | DECOMP_COMPAT, 2115},
-	{0x2479, 0, 3 | DECOMP_COMPAT, 2118},
-	{0x247A, 0, 3 | DECOMP_COMPAT, 2121},
-	{0x247B, 0, 3 | DECOMP_COMPAT, 2124},
-	{0x247C, 0, 3 | DECOMP_COMPAT, 2127},
-	{0x247D, 0, 4 | DECOMP_COMPAT, 2130},
-	{0x247E, 0, 4 | DECOMP_COMPAT, 2134},
-	{0x247F, 0, 4 | DECOMP_COMPAT, 2138},
-	{0x2480, 0, 4 | DECOMP_COMPAT, 2142},
-	{0x2481, 0, 4 | DECOMP_COMPAT, 2146},
-	{0x2482, 0, 4 | DECOMP_COMPAT, 2150},
-	{0x2483, 0, 4 | DECOMP_COMPAT, 2154},
-	{0x2484, 0, 4 | DECOMP_COMPAT, 2158},
-	{0x2485, 0, 4 | DECOMP_COMPAT, 2162},
-	{0x2486, 0, 4 | DECOMP_COMPAT, 2166},
-	{0x2487, 0, 4 | DECOMP_COMPAT, 2170},
-	{0x2488, 0, 2 | DECOMP_COMPAT, 2174},
-	{0x2489, 0, 2 | DECOMP_COMPAT, 2176},
-	{0x248A, 0, 2 | DECOMP_COMPAT, 2178},
-	{0x248B, 0, 2 | DECOMP_COMPAT, 2180},
-	{0x248C, 0, 2 | DECOMP_COMPAT, 2182},
-	{0x248D, 0, 2 | DECOMP_COMPAT, 2184},
-	{0x248E, 0, 2 | DECOMP_COMPAT, 2186},
-	{0x248F, 0, 2 | DECOMP_COMPAT, 2188},
-	{0x2490, 0, 2 | DECOMP_COMPAT, 2190},
-	{0x2491, 0, 3 | DECOMP_COMPAT, 2192},
-	{0x2492, 0, 3 | DECOMP_COMPAT, 2195},
-	{0x2493, 0, 3 | DECOMP_COMPAT, 2198},
-	{0x2494, 0, 3 | DECOMP_COMPAT, 2201},
-	{0x2495, 0, 3 | DECOMP_COMPAT, 2204},
-	{0x2496, 0, 3 | DECOMP_COMPAT, 2207},
-	{0x2497, 0, 3 | DECOMP_COMPAT, 2210},
-	{0x2498, 0, 3 | DECOMP_COMPAT, 2213},
-	{0x2499, 0, 3 | DECOMP_COMPAT, 2216},
-	{0x249A, 0, 3 | DECOMP_COMPAT, 2219},
-	{0x249B, 0, 3 | DECOMP_COMPAT, 2222},
-	{0x249C, 0, 3 | DECOMP_COMPAT, 2225},
-	{0x249D, 0, 3 | DECOMP_COMPAT, 2228},
-	{0x249E, 0, 3 | DECOMP_COMPAT, 2231},
-	{0x249F, 0, 3 | DECOMP_COMPAT, 2234},
-	{0x24A0, 0, 3 | DECOMP_COMPAT, 2237},
-	{0x24A1, 0, 3 | DECOMP_COMPAT, 2240},
-	{0x24A2, 0, 3 | DECOMP_COMPAT, 2243},
-	{0x24A3, 0, 3 | DECOMP_COMPAT, 2246},
-	{0x24A4, 0, 3 | DECOMP_COMPAT, 2249},
-	{0x24A5, 0, 3 | DECOMP_COMPAT, 2252},
-	{0x24A6, 0, 3 | DECOMP_COMPAT, 2255},
-	{0x24A7, 0, 3 | DECOMP_COMPAT, 2258},
-	{0x24A8, 0, 3 | DECOMP_COMPAT, 2261},
-	{0x24A9, 0, 3 | DECOMP_COMPAT, 2264},
-	{0x24AA, 0, 3 | DECOMP_COMPAT, 2267},
-	{0x24AB, 0, 3 | DECOMP_COMPAT, 2270},
-	{0x24AC, 0, 3 | DECOMP_COMPAT, 2273},
-	{0x24AD, 0, 3 | DECOMP_COMPAT, 2276},
-	{0x24AE, 0, 3 | DECOMP_COMPAT, 2279},
-	{0x24AF, 0, 3 | DECOMP_COMPAT, 2282},
-	{0x24B0, 0, 3 | DECOMP_COMPAT, 2285},
-	{0x24B1, 0, 3 | DECOMP_COMPAT, 2288},
-	{0x24B2, 0, 3 | DECOMP_COMPAT, 2291},
-	{0x24B3, 0, 3 | DECOMP_COMPAT, 2294},
-	{0x24B4, 0, 3 | DECOMP_COMPAT, 2297},
-	{0x24B5, 0, 3 | DECOMP_COMPAT, 2300},
-	{0x24B6, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0041},
-	{0x24B7, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0042},
-	{0x24B8, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0043},
-	{0x24B9, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0044},
-	{0x24BA, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0045},
-	{0x24BB, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0046},
-	{0x24BC, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0047},
-	{0x24BD, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0048},
-	{0x24BE, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0049},
-	{0x24BF, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x004A},
-	{0x24C0, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x004B},
-	{0x24C1, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x004C},
-	{0x24C2, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x004D},
-	{0x24C3, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x004E},
-	{0x24C4, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x004F},
-	{0x24C5, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0050},
-	{0x24C6, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0051},
-	{0x24C7, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0052},
-	{0x24C8, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0053},
-	{0x24C9, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0054},
-	{0x24CA, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0055},
-	{0x24CB, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0056},
-	{0x24CC, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0057},
-	{0x24CD, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0058},
-	{0x24CE, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0059},
-	{0x24CF, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x005A},
-	{0x24D0, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0061},
-	{0x24D1, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0062},
-	{0x24D2, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0063},
-	{0x24D3, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0064},
-	{0x24D4, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0065},
-	{0x24D5, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0066},
-	{0x24D6, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0067},
-	{0x24D7, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0068},
-	{0x24D8, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0069},
-	{0x24D9, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x006A},
-	{0x24DA, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x006B},
-	{0x24DB, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x006C},
-	{0x24DC, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x006D},
-	{0x24DD, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x006E},
-	{0x24DE, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x006F},
-	{0x24DF, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0070},
-	{0x24E0, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0071},
-	{0x24E1, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0072},
-	{0x24E2, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0073},
-	{0x24E3, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0074},
-	{0x24E4, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0075},
-	{0x24E5, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0076},
-	{0x24E6, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0077},
-	{0x24E7, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0078},
-	{0x24E8, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0079},
-	{0x24E9, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x007A},
-	{0x24EA, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0030},
-	{0x2A0C, 0, 4 | DECOMP_COMPAT, 2303},
-	{0x2A74, 0, 3 | DECOMP_COMPAT, 2307},
-	{0x2A75, 0, 2 | DECOMP_COMPAT, 2310},
-	{0x2A76, 0, 3 | DECOMP_COMPAT, 2312},
-	{0x2ADC, 0, 2 | DECOMP_NO_COMPOSE, 2315},	/* in exclusion list */
-	{0x2C7C, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x006A},
-	{0x2C7D, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0056},
-	{0x2CEF, 230, 0, 0},
-	{0x2CF0, 230, 0, 0},
-	{0x2CF1, 230, 0, 0},
-	{0x2D6F, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x2D61},
-	{0x2D7F, 9, 0, 0},
-	{0x2DE0, 230, 0, 0},
-	{0x2DE1, 230, 0, 0},
-	{0x2DE2, 230, 0, 0},
-	{0x2DE3, 230, 0, 0},
-	{0x2DE4, 230, 0, 0},
-	{0x2DE5, 230, 0, 0},
-	{0x2DE6, 230, 0, 0},
-	{0x2DE7, 230, 0, 0},
-	{0x2DE8, 230, 0, 0},
-	{0x2DE9, 230, 0, 0},
-	{0x2DEA, 230, 0, 0},
-	{0x2DEB, 230, 0, 0},
-	{0x2DEC, 230, 0, 0},
-	{0x2DED, 230, 0, 0},
-	{0x2DEE, 230, 0, 0},
-	{0x2DEF, 230, 0, 0},
-	{0x2DF0, 230, 0, 0},
-	{0x2DF1, 230, 0, 0},
-	{0x2DF2, 230, 0, 0},
-	{0x2DF3, 230, 0, 0},
-	{0x2DF4, 230, 0, 0},
-	{0x2DF5, 230, 0, 0},
-	{0x2DF6, 230, 0, 0},
-	{0x2DF7, 230, 0, 0},
-	{0x2DF8, 230, 0, 0},
-	{0x2DF9, 230, 0, 0},
-	{0x2DFA, 230, 0, 0},
-	{0x2DFB, 230, 0, 0},
-	{0x2DFC, 230, 0, 0},
-	{0x2DFD, 230, 0, 0},
-	{0x2DFE, 230, 0, 0},
-	{0x2DFF, 230, 0, 0},
-	{0x2E9F, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x6BCD},
-	{0x2EF3, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x9F9F},
-	{0x2F00, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x4E00},
-	{0x2F01, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x4E28},
-	{0x2F02, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x4E36},
-	{0x2F03, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x4E3F},
-	{0x2F04, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x4E59},
-	{0x2F05, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x4E85},
-	{0x2F06, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x4E8C},
-	{0x2F07, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x4EA0},
-	{0x2F08, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x4EBA},
-	{0x2F09, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x513F},
-	{0x2F0A, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x5165},
-	{0x2F0B, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x516B},
-	{0x2F0C, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x5182},
-	{0x2F0D, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x5196},
-	{0x2F0E, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x51AB},
-	{0x2F0F, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x51E0},
-	{0x2F10, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x51F5},
-	{0x2F11, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x5200},
-	{0x2F12, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x529B},
-	{0x2F13, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x52F9},
-	{0x2F14, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x5315},
-	{0x2F15, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x531A},
-	{0x2F16, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x5338},
-	{0x2F17, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x5341},
-	{0x2F18, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x535C},
-	{0x2F19, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x5369},
-	{0x2F1A, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x5382},
-	{0x2F1B, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x53B6},
-	{0x2F1C, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x53C8},
-	{0x2F1D, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x53E3},
-	{0x2F1E, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x56D7},
-	{0x2F1F, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x571F},
-	{0x2F20, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x58EB},
-	{0x2F21, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x5902},
-	{0x2F22, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x590A},
-	{0x2F23, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x5915},
-	{0x2F24, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x5927},
-	{0x2F25, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x5973},
-	{0x2F26, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x5B50},
-	{0x2F27, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x5B80},
-	{0x2F28, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x5BF8},
-	{0x2F29, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x5C0F},
-	{0x2F2A, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x5C22},
-	{0x2F2B, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x5C38},
-	{0x2F2C, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x5C6E},
-	{0x2F2D, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x5C71},
-	{0x2F2E, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x5DDB},
-	{0x2F2F, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x5DE5},
-	{0x2F30, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x5DF1},
-	{0x2F31, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x5DFE},
-	{0x2F32, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x5E72},
-	{0x2F33, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x5E7A},
-	{0x2F34, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x5E7F},
-	{0x2F35, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x5EF4},
-	{0x2F36, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x5EFE},
-	{0x2F37, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x5F0B},
-	{0x2F38, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x5F13},
-	{0x2F39, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x5F50},
-	{0x2F3A, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x5F61},
-	{0x2F3B, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x5F73},
-	{0x2F3C, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x5FC3},
-	{0x2F3D, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x6208},
-	{0x2F3E, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x6236},
-	{0x2F3F, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x624B},
-	{0x2F40, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x652F},
-	{0x2F41, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x6534},
-	{0x2F42, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x6587},
-	{0x2F43, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x6597},
-	{0x2F44, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x65A4},
-	{0x2F45, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x65B9},
-	{0x2F46, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x65E0},
-	{0x2F47, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x65E5},
-	{0x2F48, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x66F0},
-	{0x2F49, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x6708},
-	{0x2F4A, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x6728},
-	{0x2F4B, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x6B20},
-	{0x2F4C, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x6B62},
-	{0x2F4D, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x6B79},
-	{0x2F4E, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x6BB3},
-	{0x2F4F, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x6BCB},
-	{0x2F50, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x6BD4},
-	{0x2F51, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x6BDB},
-	{0x2F52, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x6C0F},
-	{0x2F53, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x6C14},
-	{0x2F54, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x6C34},
-	{0x2F55, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x706B},
-	{0x2F56, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x722A},
-	{0x2F57, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x7236},
-	{0x2F58, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x723B},
-	{0x2F59, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x723F},
-	{0x2F5A, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x7247},
-	{0x2F5B, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x7259},
-	{0x2F5C, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x725B},
-	{0x2F5D, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x72AC},
-	{0x2F5E, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x7384},
-	{0x2F5F, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x7389},
-	{0x2F60, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x74DC},
-	{0x2F61, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x74E6},
-	{0x2F62, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x7518},
-	{0x2F63, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x751F},
-	{0x2F64, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x7528},
-	{0x2F65, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x7530},
-	{0x2F66, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x758B},
-	{0x2F67, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x7592},
-	{0x2F68, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x7676},
-	{0x2F69, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x767D},
-	{0x2F6A, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x76AE},
-	{0x2F6B, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x76BF},
-	{0x2F6C, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x76EE},
-	{0x2F6D, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x77DB},
-	{0x2F6E, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x77E2},
-	{0x2F6F, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x77F3},
-	{0x2F70, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x793A},
-	{0x2F71, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x79B8},
-	{0x2F72, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x79BE},
-	{0x2F73, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x7A74},
-	{0x2F74, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x7ACB},
-	{0x2F75, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x7AF9},
-	{0x2F76, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x7C73},
-	{0x2F77, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x7CF8},
-	{0x2F78, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x7F36},
-	{0x2F79, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x7F51},
-	{0x2F7A, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x7F8A},
-	{0x2F7B, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x7FBD},
-	{0x2F7C, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x8001},
-	{0x2F7D, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x800C},
-	{0x2F7E, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x8012},
-	{0x2F7F, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x8033},
-	{0x2F80, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x807F},
-	{0x2F81, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x8089},
-	{0x2F82, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x81E3},
-	{0x2F83, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x81EA},
-	{0x2F84, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x81F3},
-	{0x2F85, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x81FC},
-	{0x2F86, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x820C},
-	{0x2F87, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x821B},
-	{0x2F88, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x821F},
-	{0x2F89, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x826E},
-	{0x2F8A, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x8272},
-	{0x2F8B, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x8278},
-	{0x2F8C, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x864D},
-	{0x2F8D, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x866B},
-	{0x2F8E, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x8840},
-	{0x2F8F, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x884C},
-	{0x2F90, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x8863},
-	{0x2F91, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x897E},
-	{0x2F92, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x898B},
-	{0x2F93, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x89D2},
-	{0x2F94, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x8A00},
-	{0x2F95, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x8C37},
-	{0x2F96, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x8C46},
-	{0x2F97, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x8C55},
-	{0x2F98, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x8C78},
-	{0x2F99, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x8C9D},
-	{0x2F9A, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x8D64},
-	{0x2F9B, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x8D70},
-	{0x2F9C, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x8DB3},
-	{0x2F9D, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x8EAB},
-	{0x2F9E, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x8ECA},
-	{0x2F9F, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x8F9B},
-	{0x2FA0, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x8FB0},
-	{0x2FA1, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x8FB5},
-	{0x2FA2, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x9091},
-	{0x2FA3, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x9149},
-	{0x2FA4, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x91C6},
-	{0x2FA5, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x91CC},
-	{0x2FA6, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x91D1},
-	{0x2FA7, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x9577},
-	{0x2FA8, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x9580},
-	{0x2FA9, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x961C},
-	{0x2FAA, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x96B6},
-	{0x2FAB, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x96B9},
-	{0x2FAC, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x96E8},
-	{0x2FAD, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x9751},
-	{0x2FAE, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x975E},
-	{0x2FAF, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x9762},
-	{0x2FB0, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x9769},
-	{0x2FB1, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x97CB},
-	{0x2FB2, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x97ED},
-	{0x2FB3, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x97F3},
-	{0x2FB4, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x9801},
-	{0x2FB5, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x98A8},
-	{0x2FB6, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x98DB},
-	{0x2FB7, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x98DF},
-	{0x2FB8, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x9996},
-	{0x2FB9, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x9999},
-	{0x2FBA, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x99AC},
-	{0x2FBB, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x9AA8},
-	{0x2FBC, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x9AD8},
-	{0x2FBD, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x9ADF},
-	{0x2FBE, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x9B25},
-	{0x2FBF, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x9B2F},
-	{0x2FC0, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x9B32},
-	{0x2FC1, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x9B3C},
-	{0x2FC2, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x9B5A},
-	{0x2FC3, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x9CE5},
-	{0x2FC4, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x9E75},
-	{0x2FC5, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x9E7F},
-	{0x2FC6, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x9EA5},
-	{0x2FC7, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x9EBB},
-	{0x2FC8, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x9EC3},
-	{0x2FC9, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x9ECD},
-	{0x2FCA, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x9ED1},
-	{0x2FCB, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x9EF9},
-	{0x2FCC, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x9EFD},
-	{0x2FCD, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x9F0E},
-	{0x2FCE, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x9F13},
-	{0x2FCF, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x9F20},
-	{0x2FD0, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x9F3B},
-	{0x2FD1, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x9F4A},
-	{0x2FD2, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x9F52},
-	{0x2FD3, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x9F8D},
-	{0x2FD4, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x9F9C},
-	{0x2FD5, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x9FA0},
-	{0x3000, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0020},
-	{0x302A, 218, 0, 0},
-	{0x302B, 228, 0, 0},
-	{0x302C, 232, 0, 0},
-	{0x302D, 222, 0, 0},
-	{0x302E, 224, 0, 0},
-	{0x302F, 224, 0, 0},
-	{0x3036, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x3012},
-	{0x3038, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x5341},
-	{0x3039, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x5344},
-	{0x303A, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x5345},
-	{0x304C, 0, 2, 2317},
-	{0x304E, 0, 2, 2319},
-	{0x3050, 0, 2, 2321},
-	{0x3052, 0, 2, 2323},
-	{0x3054, 0, 2, 2325},
-	{0x3056, 0, 2, 2327},
-	{0x3058, 0, 2, 2329},
-	{0x305A, 0, 2, 2331},
-	{0x305C, 0, 2, 2333},
-	{0x305E, 0, 2, 2335},
-	{0x3060, 0, 2, 2337},
-	{0x3062, 0, 2, 2339},
-	{0x3065, 0, 2, 2341},
-	{0x3067, 0, 2, 2343},
-	{0x3069, 0, 2, 2345},
-	{0x3070, 0, 2, 2347},
-	{0x3071, 0, 2, 2349},
-	{0x3073, 0, 2, 2351},
-	{0x3074, 0, 2, 2353},
-	{0x3076, 0, 2, 2355},
-	{0x3077, 0, 2, 2357},
-	{0x3079, 0, 2, 2359},
-	{0x307A, 0, 2, 2361},
-	{0x307C, 0, 2, 2363},
-	{0x307D, 0, 2, 2365},
-	{0x3094, 0, 2, 2367},
-	{0x3099, 8, 0, 0},
-	{0x309A, 8, 0, 0},
-	{0x309B, 0, 2 | DECOMP_COMPAT, 2369},
-	{0x309C, 0, 2 | DECOMP_COMPAT, 2371},
-	{0x309E, 0, 2, 2373},
-	{0x309F, 0, 2 | DECOMP_COMPAT, 2375},
-	{0x30AC, 0, 2, 2377},
-	{0x30AE, 0, 2, 2379},
-	{0x30B0, 0, 2, 2381},
-	{0x30B2, 0, 2, 2383},
-	{0x30B4, 0, 2, 2385},
-	{0x30B6, 0, 2, 2387},
-	{0x30B8, 0, 2, 2389},
-	{0x30BA, 0, 2, 2391},
-	{0x30BC, 0, 2, 2393},
-	{0x30BE, 0, 2, 2395},
-	{0x30C0, 0, 2, 2397},
-	{0x30C2, 0, 2, 2399},
-	{0x30C5, 0, 2, 2401},
-	{0x30C7, 0, 2, 2403},
-	{0x30C9, 0, 2, 2405},
-	{0x30D0, 0, 2, 2407},
-	{0x30D1, 0, 2, 2409},
-	{0x30D3, 0, 2, 2411},
-	{0x30D4, 0, 2, 2413},
-	{0x30D6, 0, 2, 2415},
-	{0x30D7, 0, 2, 2417},
-	{0x30D9, 0, 2, 2419},
-	{0x30DA, 0, 2, 2421},
-	{0x30DC, 0, 2, 2423},
-	{0x30DD, 0, 2, 2425},
-	{0x30F4, 0, 2, 2427},
-	{0x30F7, 0, 2, 2429},
-	{0x30F8, 0, 2, 2431},
-	{0x30F9, 0, 2, 2433},
-	{0x30FA, 0, 2, 2435},
-	{0x30FE, 0, 2, 2437},
-	{0x30FF, 0, 2 | DECOMP_COMPAT, 2439},
-	{0x3131, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x1100},
-	{0x3132, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x1101},
-	{0x3133, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x11AA},
-	{0x3134, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x1102},
-	{0x3135, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x11AC},
-	{0x3136, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x11AD},
-	{0x3137, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x1103},
-	{0x3138, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x1104},
-	{0x3139, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x1105},
-	{0x313A, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x11B0},
-	{0x313B, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x11B1},
-	{0x313C, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x11B2},
-	{0x313D, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x11B3},
-	{0x313E, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x11B4},
-	{0x313F, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x11B5},
-	{0x3140, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x111A},
-	{0x3141, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x1106},
-	{0x3142, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x1107},
-	{0x3143, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x1108},
-	{0x3144, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x1121},
-	{0x3145, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x1109},
-	{0x3146, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x110A},
-	{0x3147, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x110B},
-	{0x3148, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x110C},
-	{0x3149, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x110D},
-	{0x314A, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x110E},
-	{0x314B, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x110F},
-	{0x314C, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x1110},
-	{0x314D, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x1111},
-	{0x314E, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x1112},
-	{0x314F, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x1161},
-	{0x3150, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x1162},
-	{0x3151, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x1163},
-	{0x3152, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x1164},
-	{0x3153, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x1165},
-	{0x3154, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x1166},
-	{0x3155, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x1167},
-	{0x3156, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x1168},
-	{0x3157, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x1169},
-	{0x3158, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x116A},
-	{0x3159, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x116B},
-	{0x315A, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x116C},
-	{0x315B, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x116D},
-	{0x315C, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x116E},
-	{0x315D, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x116F},
-	{0x315E, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x1170},
-	{0x315F, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x1171},
-	{0x3160, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x1172},
-	{0x3161, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x1173},
-	{0x3162, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x1174},
-	{0x3163, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x1175},
-	{0x3164, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x1160},
-	{0x3165, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x1114},
-	{0x3166, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x1115},
-	{0x3167, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x11C7},
-	{0x3168, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x11C8},
-	{0x3169, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x11CC},
-	{0x316A, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x11CE},
-	{0x316B, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x11D3},
-	{0x316C, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x11D7},
-	{0x316D, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x11D9},
-	{0x316E, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x111C},
-	{0x316F, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x11DD},
-	{0x3170, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x11DF},
-	{0x3171, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x111D},
-	{0x3172, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x111E},
-	{0x3173, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x1120},
-	{0x3174, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x1122},
-	{0x3175, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x1123},
-	{0x3176, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x1127},
-	{0x3177, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x1129},
-	{0x3178, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x112B},
-	{0x3179, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x112C},
-	{0x317A, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x112D},
-	{0x317B, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x112E},
-	{0x317C, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x112F},
-	{0x317D, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x1132},
-	{0x317E, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x1136},
-	{0x317F, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x1140},
-	{0x3180, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x1147},
-	{0x3181, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x114C},
-	{0x3182, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x11F1},
-	{0x3183, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x11F2},
-	{0x3184, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x1157},
-	{0x3185, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x1158},
-	{0x3186, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x1159},
-	{0x3187, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x1184},
-	{0x3188, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x1185},
-	{0x3189, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x1188},
-	{0x318A, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x1191},
-	{0x318B, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x1192},
-	{0x318C, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x1194},
-	{0x318D, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x119E},
-	{0x318E, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x11A1},
-	{0x3192, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x4E00},
-	{0x3193, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x4E8C},
-	{0x3194, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x4E09},
-	{0x3195, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x56DB},
-	{0x3196, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x4E0A},
-	{0x3197, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x4E2D},
-	{0x3198, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x4E0B},
-	{0x3199, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x7532},
-	{0x319A, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x4E59},
-	{0x319B, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x4E19},
-	{0x319C, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x4E01},
-	{0x319D, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x5929},
-	{0x319E, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x5730},
-	{0x319F, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x4EBA},
-	{0x3200, 0, 3 | DECOMP_COMPAT, 2441},
-	{0x3201, 0, 3 | DECOMP_COMPAT, 2444},
-	{0x3202, 0, 3 | DECOMP_COMPAT, 2447},
-	{0x3203, 0, 3 | DECOMP_COMPAT, 2450},
-	{0x3204, 0, 3 | DECOMP_COMPAT, 2453},
-	{0x3205, 0, 3 | DECOMP_COMPAT, 2456},
-	{0x3206, 0, 3 | DECOMP_COMPAT, 2459},
-	{0x3207, 0, 3 | DECOMP_COMPAT, 2462},
-	{0x3208, 0, 3 | DECOMP_COMPAT, 2465},
-	{0x3209, 0, 3 | DECOMP_COMPAT, 2468},
-	{0x320A, 0, 3 | DECOMP_COMPAT, 2471},
-	{0x320B, 0, 3 | DECOMP_COMPAT, 2474},
-	{0x320C, 0, 3 | DECOMP_COMPAT, 2477},
-	{0x320D, 0, 3 | DECOMP_COMPAT, 2480},
-	{0x320E, 0, 4 | DECOMP_COMPAT, 2483},
-	{0x320F, 0, 4 | DECOMP_COMPAT, 2487},
-	{0x3210, 0, 4 | DECOMP_COMPAT, 2491},
-	{0x3211, 0, 4 | DECOMP_COMPAT, 2495},
-	{0x3212, 0, 4 | DECOMP_COMPAT, 2499},
-	{0x3213, 0, 4 | DECOMP_COMPAT, 2503},
-	{0x3214, 0, 4 | DECOMP_COMPAT, 2507},
-	{0x3215, 0, 4 | DECOMP_COMPAT, 2511},
-	{0x3216, 0, 4 | DECOMP_COMPAT, 2515},
-	{0x3217, 0, 4 | DECOMP_COMPAT, 2519},
-	{0x3218, 0, 4 | DECOMP_COMPAT, 2523},
-	{0x3219, 0, 4 | DECOMP_COMPAT, 2527},
-	{0x321A, 0, 4 | DECOMP_COMPAT, 2531},
-	{0x321B, 0, 4 | DECOMP_COMPAT, 2535},
-	{0x321C, 0, 4 | DECOMP_COMPAT, 2539},
-	{0x321D, 0, 7 | DECOMP_COMPAT, 2543},
-	{0x321E, 0, 6 | DECOMP_COMPAT, 2550},
-	{0x3220, 0, 3 | DECOMP_COMPAT, 2556},
-	{0x3221, 0, 3 | DECOMP_COMPAT, 2559},
-	{0x3222, 0, 3 | DECOMP_COMPAT, 2562},
-	{0x3223, 0, 3 | DECOMP_COMPAT, 2565},
-	{0x3224, 0, 3 | DECOMP_COMPAT, 2568},
-	{0x3225, 0, 3 | DECOMP_COMPAT, 2571},
-	{0x3226, 0, 3 | DECOMP_COMPAT, 2574},
-	{0x3227, 0, 3 | DECOMP_COMPAT, 2577},
-	{0x3228, 0, 3 | DECOMP_COMPAT, 2580},
-	{0x3229, 0, 3 | DECOMP_COMPAT, 2583},
-	{0x322A, 0, 3 | DECOMP_COMPAT, 2586},
-	{0x322B, 0, 3 | DECOMP_COMPAT, 2589},
-	{0x322C, 0, 3 | DECOMP_COMPAT, 2592},
-	{0x322D, 0, 3 | DECOMP_COMPAT, 2595},
-	{0x322E, 0, 3 | DECOMP_COMPAT, 2598},
-	{0x322F, 0, 3 | DECOMP_COMPAT, 2601},
-	{0x3230, 0, 3 | DECOMP_COMPAT, 2604},
-	{0x3231, 0, 3 | DECOMP_COMPAT, 2607},
-	{0x3232, 0, 3 | DECOMP_COMPAT, 2610},
-	{0x3233, 0, 3 | DECOMP_COMPAT, 2613},
-	{0x3234, 0, 3 | DECOMP_COMPAT, 2616},
-	{0x3235, 0, 3 | DECOMP_COMPAT, 2619},
-	{0x3236, 0, 3 | DECOMP_COMPAT, 2622},
-	{0x3237, 0, 3 | DECOMP_COMPAT, 2625},
-	{0x3238, 0, 3 | DECOMP_COMPAT, 2628},
-	{0x3239, 0, 3 | DECOMP_COMPAT, 2631},
-	{0x323A, 0, 3 | DECOMP_COMPAT, 2634},
-	{0x323B, 0, 3 | DECOMP_COMPAT, 2637},
-	{0x323C, 0, 3 | DECOMP_COMPAT, 2640},
-	{0x323D, 0, 3 | DECOMP_COMPAT, 2643},
-	{0x323E, 0, 3 | DECOMP_COMPAT, 2646},
-	{0x323F, 0, 3 | DECOMP_COMPAT, 2649},
-	{0x3240, 0, 3 | DECOMP_COMPAT, 2652},
-	{0x3241, 0, 3 | DECOMP_COMPAT, 2655},
-	{0x3242, 0, 3 | DECOMP_COMPAT, 2658},
-	{0x3243, 0, 3 | DECOMP_COMPAT, 2661},
-	{0x3244, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x554F},
-	{0x3245, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x5E7C},
-	{0x3246, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x6587},
-	{0x3247, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x7B8F},
-	{0x3250, 0, 3 | DECOMP_COMPAT, 2664},
-	{0x3251, 0, 2 | DECOMP_COMPAT, 2667},
-	{0x3252, 0, 2 | DECOMP_COMPAT, 2669},
-	{0x3253, 0, 2 | DECOMP_COMPAT, 2671},
-	{0x3254, 0, 2 | DECOMP_COMPAT, 2673},
-	{0x3255, 0, 2 | DECOMP_COMPAT, 2675},
-	{0x3256, 0, 2 | DECOMP_COMPAT, 2677},
-	{0x3257, 0, 2 | DECOMP_COMPAT, 2679},
-	{0x3258, 0, 2 | DECOMP_COMPAT, 2681},
-	{0x3259, 0, 2 | DECOMP_COMPAT, 2683},
-	{0x325A, 0, 2 | DECOMP_COMPAT, 2685},
-	{0x325B, 0, 2 | DECOMP_COMPAT, 2687},
-	{0x325C, 0, 2 | DECOMP_COMPAT, 2689},
-	{0x325D, 0, 2 | DECOMP_COMPAT, 2691},
-	{0x325E, 0, 2 | DECOMP_COMPAT, 2693},
-	{0x325F, 0, 2 | DECOMP_COMPAT, 2695},
-	{0x3260, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x1100},
-	{0x3261, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x1102},
-	{0x3262, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x1103},
-	{0x3263, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x1105},
-	{0x3264, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x1106},
-	{0x3265, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x1107},
-	{0x3266, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x1109},
-	{0x3267, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x110B},
-	{0x3268, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x110C},
-	{0x3269, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x110E},
-	{0x326A, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x110F},
-	{0x326B, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x1110},
-	{0x326C, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x1111},
-	{0x326D, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x1112},
-	{0x326E, 0, 2 | DECOMP_COMPAT, 2697},
-	{0x326F, 0, 2 | DECOMP_COMPAT, 2699},
-	{0x3270, 0, 2 | DECOMP_COMPAT, 2701},
-	{0x3271, 0, 2 | DECOMP_COMPAT, 2703},
-	{0x3272, 0, 2 | DECOMP_COMPAT, 2705},
-	{0x3273, 0, 2 | DECOMP_COMPAT, 2707},
-	{0x3274, 0, 2 | DECOMP_COMPAT, 2709},
-	{0x3275, 0, 2 | DECOMP_COMPAT, 2711},
-	{0x3276, 0, 2 | DECOMP_COMPAT, 2713},
-	{0x3277, 0, 2 | DECOMP_COMPAT, 2715},
-	{0x3278, 0, 2 | DECOMP_COMPAT, 2717},
-	{0x3279, 0, 2 | DECOMP_COMPAT, 2719},
-	{0x327A, 0, 2 | DECOMP_COMPAT, 2721},
-	{0x327B, 0, 2 | DECOMP_COMPAT, 2723},
-	{0x327C, 0, 5 | DECOMP_COMPAT, 2725},
-	{0x327D, 0, 4 | DECOMP_COMPAT, 2730},
-	{0x327E, 0, 2 | DECOMP_COMPAT, 2734},
-	{0x3280, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x4E00},
-	{0x3281, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x4E8C},
-	{0x3282, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x4E09},
-	{0x3283, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x56DB},
-	{0x3284, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x4E94},
-	{0x3285, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x516D},
-	{0x3286, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x4E03},
-	{0x3287, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x516B},
-	{0x3288, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x4E5D},
-	{0x3289, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x5341},
-	{0x328A, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x6708},
-	{0x328B, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x706B},
-	{0x328C, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x6C34},
-	{0x328D, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x6728},
-	{0x328E, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x91D1},
-	{0x328F, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x571F},
-	{0x3290, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x65E5},
-	{0x3291, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x682A},
-	{0x3292, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x6709},
-	{0x3293, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x793E},
-	{0x3294, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x540D},
-	{0x3295, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x7279},
-	{0x3296, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x8CA1},
-	{0x3297, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x795D},
-	{0x3298, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x52B4},
-	{0x3299, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x79D8},
-	{0x329A, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x7537},
-	{0x329B, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x5973},
-	{0x329C, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x9069},
-	{0x329D, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x512A},
-	{0x329E, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x5370},
-	{0x329F, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x6CE8},
-	{0x32A0, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x9805},
-	{0x32A1, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x4F11},
-	{0x32A2, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x5199},
-	{0x32A3, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x6B63},
-	{0x32A4, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x4E0A},
-	{0x32A5, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x4E2D},
-	{0x32A6, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x4E0B},
-	{0x32A7, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x5DE6},
-	{0x32A8, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x53F3},
-	{0x32A9, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x533B},
-	{0x32AA, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x5B97},
-	{0x32AB, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x5B66},
-	{0x32AC, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x76E3},
-	{0x32AD, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x4F01},
-	{0x32AE, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x8CC7},
-	{0x32AF, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x5354},
-	{0x32B0, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x591C},
-	{0x32B1, 0, 2 | DECOMP_COMPAT, 2736},
-	{0x32B2, 0, 2 | DECOMP_COMPAT, 2738},
-	{0x32B3, 0, 2 | DECOMP_COMPAT, 2740},
-	{0x32B4, 0, 2 | DECOMP_COMPAT, 2742},
-	{0x32B5, 0, 2 | DECOMP_COMPAT, 2744},
-	{0x32B6, 0, 2 | DECOMP_COMPAT, 2746},
-	{0x32B7, 0, 2 | DECOMP_COMPAT, 2748},
-	{0x32B8, 0, 2 | DECOMP_COMPAT, 2750},
-	{0x32B9, 0, 2 | DECOMP_COMPAT, 2752},
-	{0x32BA, 0, 2 | DECOMP_COMPAT, 2754},
-	{0x32BB, 0, 2 | DECOMP_COMPAT, 2756},
-	{0x32BC, 0, 2 | DECOMP_COMPAT, 2758},
-	{0x32BD, 0, 2 | DECOMP_COMPAT, 2760},
-	{0x32BE, 0, 2 | DECOMP_COMPAT, 2762},
-	{0x32BF, 0, 2 | DECOMP_COMPAT, 2764},
-	{0x32C0, 0, 2 | DECOMP_COMPAT, 2766},
-	{0x32C1, 0, 2 | DECOMP_COMPAT, 2768},
-	{0x32C2, 0, 2 | DECOMP_COMPAT, 2770},
-	{0x32C3, 0, 2 | DECOMP_COMPAT, 2772},
-	{0x32C4, 0, 2 | DECOMP_COMPAT, 2774},
-	{0x32C5, 0, 2 | DECOMP_COMPAT, 2776},
-	{0x32C6, 0, 2 | DECOMP_COMPAT, 2778},
-	{0x32C7, 0, 2 | DECOMP_COMPAT, 2780},
-	{0x32C8, 0, 2 | DECOMP_COMPAT, 2782},
-	{0x32C9, 0, 3 | DECOMP_COMPAT, 2784},
-	{0x32CA, 0, 3 | DECOMP_COMPAT, 2787},
-	{0x32CB, 0, 3 | DECOMP_COMPAT, 2790},
-	{0x32CC, 0, 2 | DECOMP_COMPAT, 2793},
-	{0x32CD, 0, 3 | DECOMP_COMPAT, 2795},
-	{0x32CE, 0, 2 | DECOMP_COMPAT, 2798},
-	{0x32CF, 0, 3 | DECOMP_COMPAT, 2800},
-	{0x32D0, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x30A2},
-	{0x32D1, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x30A4},
-	{0x32D2, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x30A6},
-	{0x32D3, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x30A8},
-	{0x32D4, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x30AA},
-	{0x32D5, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x30AB},
-	{0x32D6, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x30AD},
-	{0x32D7, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x30AF},
-	{0x32D8, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x30B1},
-	{0x32D9, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x30B3},
-	{0x32DA, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x30B5},
-	{0x32DB, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x30B7},
-	{0x32DC, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x30B9},
-	{0x32DD, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x30BB},
-	{0x32DE, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x30BD},
-	{0x32DF, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x30BF},
-	{0x32E0, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x30C1},
-	{0x32E1, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x30C4},
-	{0x32E2, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x30C6},
-	{0x32E3, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x30C8},
-	{0x32E4, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x30CA},
-	{0x32E5, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x30CB},
-	{0x32E6, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x30CC},
-	{0x32E7, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x30CD},
-	{0x32E8, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x30CE},
-	{0x32E9, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x30CF},
-	{0x32EA, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x30D2},
-	{0x32EB, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x30D5},
-	{0x32EC, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x30D8},
-	{0x32ED, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x30DB},
-	{0x32EE, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x30DE},
-	{0x32EF, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x30DF},
-	{0x32F0, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x30E0},
-	{0x32F1, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x30E1},
-	{0x32F2, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x30E2},
-	{0x32F3, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x30E4},
-	{0x32F4, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x30E6},
-	{0x32F5, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x30E8},
-	{0x32F6, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x30E9},
-	{0x32F7, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x30EA},
-	{0x32F8, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x30EB},
-	{0x32F9, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x30EC},
-	{0x32FA, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x30ED},
-	{0x32FB, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x30EF},
-	{0x32FC, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x30F0},
-	{0x32FD, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x30F1},
-	{0x32FE, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x30F2},
-	{0x32FF, 0, 2 | DECOMP_COMPAT, 2803},
-	{0x3300, 0, 4 | DECOMP_COMPAT, 2805},
-	{0x3301, 0, 4 | DECOMP_COMPAT, 2809},
-	{0x3302, 0, 4 | DECOMP_COMPAT, 2813},
-	{0x3303, 0, 3 | DECOMP_COMPAT, 2817},
-	{0x3304, 0, 4 | DECOMP_COMPAT, 2820},
-	{0x3305, 0, 3 | DECOMP_COMPAT, 2824},
-	{0x3306, 0, 3 | DECOMP_COMPAT, 2827},
-	{0x3307, 0, 5 | DECOMP_COMPAT, 2830},
-	{0x3308, 0, 4 | DECOMP_COMPAT, 2835},
-	{0x3309, 0, 3 | DECOMP_COMPAT, 2839},
-	{0x330A, 0, 3 | DECOMP_COMPAT, 2842},
-	{0x330B, 0, 3 | DECOMP_COMPAT, 2845},
-	{0x330C, 0, 4 | DECOMP_COMPAT, 2848},
-	{0x330D, 0, 4 | DECOMP_COMPAT, 2852},
-	{0x330E, 0, 3 | DECOMP_COMPAT, 2856},
-	{0x330F, 0, 3 | DECOMP_COMPAT, 2859},
-	{0x3310, 0, 2 | DECOMP_COMPAT, 2862},
-	{0x3311, 0, 3 | DECOMP_COMPAT, 2864},
-	{0x3312, 0, 4 | DECOMP_COMPAT, 2867},
-	{0x3313, 0, 4 | DECOMP_COMPAT, 2871},
-	{0x3314, 0, 2 | DECOMP_COMPAT, 2875},
-	{0x3315, 0, 5 | DECOMP_COMPAT, 2877},
-	{0x3316, 0, 6 | DECOMP_COMPAT, 2882},
-	{0x3317, 0, 5 | DECOMP_COMPAT, 2888},
-	{0x3318, 0, 3 | DECOMP_COMPAT, 2893},
-	{0x3319, 0, 5 | DECOMP_COMPAT, 2896},
-	{0x331A, 0, 5 | DECOMP_COMPAT, 2901},
-	{0x331B, 0, 4 | DECOMP_COMPAT, 2906},
-	{0x331C, 0, 3 | DECOMP_COMPAT, 2910},
-	{0x331D, 0, 3 | DECOMP_COMPAT, 2913},
-	{0x331E, 0, 3 | DECOMP_COMPAT, 2916},
-	{0x331F, 0, 4 | DECOMP_COMPAT, 2919},
-	{0x3320, 0, 5 | DECOMP_COMPAT, 2923},
-	{0x3321, 0, 4 | DECOMP_COMPAT, 2928},
-	{0x3322, 0, 3 | DECOMP_COMPAT, 2932},
-	{0x3323, 0, 3 | DECOMP_COMPAT, 2935},
-	{0x3324, 0, 3 | DECOMP_COMPAT, 2938},
-	{0x3325, 0, 2 | DECOMP_COMPAT, 2941},
-	{0x3326, 0, 2 | DECOMP_COMPAT, 2943},
-	{0x3327, 0, 2 | DECOMP_COMPAT, 2945},
-	{0x3328, 0, 2 | DECOMP_COMPAT, 2947},
-	{0x3329, 0, 3 | DECOMP_COMPAT, 2949},
-	{0x332A, 0, 3 | DECOMP_COMPAT, 2952},
-	{0x332B, 0, 5 | DECOMP_COMPAT, 2955},
-	{0x332C, 0, 3 | DECOMP_COMPAT, 2960},
-	{0x332D, 0, 4 | DECOMP_COMPAT, 2963},
-	{0x332E, 0, 5 | DECOMP_COMPAT, 2967},
-	{0x332F, 0, 3 | DECOMP_COMPAT, 2972},
-	{0x3330, 0, 2 | DECOMP_COMPAT, 2975},
-	{0x3331, 0, 2 | DECOMP_COMPAT, 2977},
-	{0x3332, 0, 5 | DECOMP_COMPAT, 2979},
-	{0x3333, 0, 4 | DECOMP_COMPAT, 2984},
-	{0x3334, 0, 5 | DECOMP_COMPAT, 2988},
-	{0x3335, 0, 3 | DECOMP_COMPAT, 2993},
-	{0x3336, 0, 5 | DECOMP_COMPAT, 2996},
-	{0x3337, 0, 2 | DECOMP_COMPAT, 3001},
-	{0x3338, 0, 3 | DECOMP_COMPAT, 3003},
-	{0x3339, 0, 3 | DECOMP_COMPAT, 3006},
-	{0x333A, 0, 3 | DECOMP_COMPAT, 3009},
-	{0x333B, 0, 3 | DECOMP_COMPAT, 3012},
-	{0x333C, 0, 3 | DECOMP_COMPAT, 3015},
-	{0x333D, 0, 4 | DECOMP_COMPAT, 3018},
-	{0x333E, 0, 3 | DECOMP_COMPAT, 3022},
-	{0x333F, 0, 2 | DECOMP_COMPAT, 3025},
-	{0x3340, 0, 3 | DECOMP_COMPAT, 3027},
-	{0x3341, 0, 3 | DECOMP_COMPAT, 3030},
-	{0x3342, 0, 3 | DECOMP_COMPAT, 3033},
-	{0x3343, 0, 4 | DECOMP_COMPAT, 3036},
-	{0x3344, 0, 3 | DECOMP_COMPAT, 3040},
-	{0x3345, 0, 3 | DECOMP_COMPAT, 3043},
-	{0x3346, 0, 3 | DECOMP_COMPAT, 3046},
-	{0x3347, 0, 5 | DECOMP_COMPAT, 3049},
-	{0x3348, 0, 4 | DECOMP_COMPAT, 3054},
-	{0x3349, 0, 2 | DECOMP_COMPAT, 3058},
-	{0x334A, 0, 5 | DECOMP_COMPAT, 3060},
-	{0x334B, 0, 2 | DECOMP_COMPAT, 3065},
-	{0x334C, 0, 4 | DECOMP_COMPAT, 3067},
-	{0x334D, 0, 4 | DECOMP_COMPAT, 3071},
-	{0x334E, 0, 3 | DECOMP_COMPAT, 3075},
-	{0x334F, 0, 3 | DECOMP_COMPAT, 3078},
-	{0x3350, 0, 3 | DECOMP_COMPAT, 3081},
-	{0x3351, 0, 4 | DECOMP_COMPAT, 3084},
-	{0x3352, 0, 2 | DECOMP_COMPAT, 3088},
-	{0x3353, 0, 3 | DECOMP_COMPAT, 3090},
-	{0x3354, 0, 4 | DECOMP_COMPAT, 3093},
-	{0x3355, 0, 2 | DECOMP_COMPAT, 3097},
-	{0x3356, 0, 5 | DECOMP_COMPAT, 3099},
-	{0x3357, 0, 3 | DECOMP_COMPAT, 3104},
-	{0x3358, 0, 2 | DECOMP_COMPAT, 3107},
-	{0x3359, 0, 2 | DECOMP_COMPAT, 3109},
-	{0x335A, 0, 2 | DECOMP_COMPAT, 3111},
-	{0x335B, 0, 2 | DECOMP_COMPAT, 3113},
-	{0x335C, 0, 2 | DECOMP_COMPAT, 3115},
-	{0x335D, 0, 2 | DECOMP_COMPAT, 3117},
-	{0x335E, 0, 2 | DECOMP_COMPAT, 3119},
-	{0x335F, 0, 2 | DECOMP_COMPAT, 3121},
-	{0x3360, 0, 2 | DECOMP_COMPAT, 3123},
-	{0x3361, 0, 2 | DECOMP_COMPAT, 3125},
-	{0x3362, 0, 3 | DECOMP_COMPAT, 3127},
-	{0x3363, 0, 3 | DECOMP_COMPAT, 3130},
-	{0x3364, 0, 3 | DECOMP_COMPAT, 3133},
-	{0x3365, 0, 3 | DECOMP_COMPAT, 3136},
-	{0x3366, 0, 3 | DECOMP_COMPAT, 3139},
-	{0x3367, 0, 3 | DECOMP_COMPAT, 3142},
-	{0x3368, 0, 3 | DECOMP_COMPAT, 3145},
-	{0x3369, 0, 3 | DECOMP_COMPAT, 3148},
-	{0x336A, 0, 3 | DECOMP_COMPAT, 3151},
-	{0x336B, 0, 3 | DECOMP_COMPAT, 3154},
-	{0x336C, 0, 3 | DECOMP_COMPAT, 3157},
-	{0x336D, 0, 3 | DECOMP_COMPAT, 3160},
-	{0x336E, 0, 3 | DECOMP_COMPAT, 3163},
-	{0x336F, 0, 3 | DECOMP_COMPAT, 3166},
-	{0x3370, 0, 3 | DECOMP_COMPAT, 3169},
-	{0x3371, 0, 3 | DECOMP_COMPAT, 3172},
-	{0x3372, 0, 2 | DECOMP_COMPAT, 3175},
-	{0x3373, 0, 2 | DECOMP_COMPAT, 3177},
-	{0x3374, 0, 3 | DECOMP_COMPAT, 3179},
-	{0x3375, 0, 2 | DECOMP_COMPAT, 3182},
-	{0x3376, 0, 2 | DECOMP_COMPAT, 3184},
-	{0x3377, 0, 2 | DECOMP_COMPAT, 3186},
-	{0x3378, 0, 3 | DECOMP_COMPAT, 3188},
-	{0x3379, 0, 3 | DECOMP_COMPAT, 3191},
-	{0x337A, 0, 2 | DECOMP_COMPAT, 3194},
-	{0x337B, 0, 2 | DECOMP_COMPAT, 3196},
-	{0x337C, 0, 2 | DECOMP_COMPAT, 3198},
-	{0x337D, 0, 2 | DECOMP_COMPAT, 3200},
-	{0x337E, 0, 2 | DECOMP_COMPAT, 3202},
-	{0x337F, 0, 4 | DECOMP_COMPAT, 3204},
-	{0x3380, 0, 2 | DECOMP_COMPAT, 3208},
-	{0x3381, 0, 2 | DECOMP_COMPAT, 3210},
-	{0x3382, 0, 2 | DECOMP_COMPAT, 3212},
-	{0x3383, 0, 2 | DECOMP_COMPAT, 3214},
-	{0x3384, 0, 2 | DECOMP_COMPAT, 3216},
-	{0x3385, 0, 2 | DECOMP_COMPAT, 3218},
-	{0x3386, 0, 2 | DECOMP_COMPAT, 3220},
-	{0x3387, 0, 2 | DECOMP_COMPAT, 3222},
-	{0x3388, 0, 3 | DECOMP_COMPAT, 3224},
-	{0x3389, 0, 4 | DECOMP_COMPAT, 3227},
-	{0x338A, 0, 2 | DECOMP_COMPAT, 3231},
-	{0x338B, 0, 2 | DECOMP_COMPAT, 3233},
-	{0x338C, 0, 2 | DECOMP_COMPAT, 3235},
-	{0x338D, 0, 2 | DECOMP_COMPAT, 3237},
-	{0x338E, 0, 2 | DECOMP_COMPAT, 3239},
-	{0x338F, 0, 2 | DECOMP_COMPAT, 3241},
-	{0x3390, 0, 2 | DECOMP_COMPAT, 3243},
-	{0x3391, 0, 3 | DECOMP_COMPAT, 3245},
-	{0x3392, 0, 3 | DECOMP_COMPAT, 3248},
-	{0x3393, 0, 3 | DECOMP_COMPAT, 3251},
-	{0x3394, 0, 3 | DECOMP_COMPAT, 3254},
-	{0x3395, 0, 2 | DECOMP_COMPAT, 3257},
-	{0x3396, 0, 2 | DECOMP_COMPAT, 3259},
-	{0x3397, 0, 2 | DECOMP_COMPAT, 3261},
-	{0x3398, 0, 2 | DECOMP_COMPAT, 3263},
-	{0x3399, 0, 2 | DECOMP_COMPAT, 3265},
-	{0x339A, 0, 2 | DECOMP_COMPAT, 3267},
-	{0x339B, 0, 2 | DECOMP_COMPAT, 3269},
-	{0x339C, 0, 2 | DECOMP_COMPAT, 3271},
-	{0x339D, 0, 2 | DECOMP_COMPAT, 3273},
-	{0x339E, 0, 2 | DECOMP_COMPAT, 3275},
-	{0x339F, 0, 3 | DECOMP_COMPAT, 3277},
-	{0x33A0, 0, 3 | DECOMP_COMPAT, 3280},
-	{0x33A1, 0, 2 | DECOMP_COMPAT, 3283},
-	{0x33A2, 0, 3 | DECOMP_COMPAT, 3285},
-	{0x33A3, 0, 3 | DECOMP_COMPAT, 3288},
-	{0x33A4, 0, 3 | DECOMP_COMPAT, 3291},
-	{0x33A5, 0, 2 | DECOMP_COMPAT, 3294},
-	{0x33A6, 0, 3 | DECOMP_COMPAT, 3296},
-	{0x33A7, 0, 3 | DECOMP_COMPAT, 3299},
-	{0x33A8, 0, 4 | DECOMP_COMPAT, 3302},
-	{0x33A9, 0, 2 | DECOMP_COMPAT, 3306},
-	{0x33AA, 0, 3 | DECOMP_COMPAT, 3308},
-	{0x33AB, 0, 3 | DECOMP_COMPAT, 3311},
-	{0x33AC, 0, 3 | DECOMP_COMPAT, 3314},
-	{0x33AD, 0, 3 | DECOMP_COMPAT, 3317},
-	{0x33AE, 0, 5 | DECOMP_COMPAT, 3320},
-	{0x33AF, 0, 6 | DECOMP_COMPAT, 3325},
-	{0x33B0, 0, 2 | DECOMP_COMPAT, 3331},
-	{0x33B1, 0, 2 | DECOMP_COMPAT, 3333},
-	{0x33B2, 0, 2 | DECOMP_COMPAT, 3335},
-	{0x33B3, 0, 2 | DECOMP_COMPAT, 3337},
-	{0x33B4, 0, 2 | DECOMP_COMPAT, 3339},
-	{0x33B5, 0, 2 | DECOMP_COMPAT, 3341},
-	{0x33B6, 0, 2 | DECOMP_COMPAT, 3343},
-	{0x33B7, 0, 2 | DECOMP_COMPAT, 3345},
-	{0x33B8, 0, 2 | DECOMP_COMPAT, 3347},
-	{0x33B9, 0, 2 | DECOMP_COMPAT, 3349},
-	{0x33BA, 0, 2 | DECOMP_COMPAT, 3351},
-	{0x33BB, 0, 2 | DECOMP_COMPAT, 3353},
-	{0x33BC, 0, 2 | DECOMP_COMPAT, 3355},
-	{0x33BD, 0, 2 | DECOMP_COMPAT, 3357},
-	{0x33BE, 0, 2 | DECOMP_COMPAT, 3359},
-	{0x33BF, 0, 2 | DECOMP_COMPAT, 3361},
-	{0x33C0, 0, 2 | DECOMP_COMPAT, 3363},
-	{0x33C1, 0, 2 | DECOMP_COMPAT, 3365},
-	{0x33C2, 0, 4 | DECOMP_COMPAT, 3367},
-	{0x33C3, 0, 2 | DECOMP_COMPAT, 3371},
-	{0x33C4, 0, 2 | DECOMP_COMPAT, 3373},
-	{0x33C5, 0, 2 | DECOMP_COMPAT, 3375},
-	{0x33C6, 0, 4 | DECOMP_COMPAT, 3377},
-	{0x33C7, 0, 3 | DECOMP_COMPAT, 3381},
-	{0x33C8, 0, 2 | DECOMP_COMPAT, 3384},
-	{0x33C9, 0, 2 | DECOMP_COMPAT, 3386},
-	{0x33CA, 0, 2 | DECOMP_COMPAT, 3388},
-	{0x33CB, 0, 2 | DECOMP_COMPAT, 3390},
-	{0x33CC, 0, 2 | DECOMP_COMPAT, 3392},
-	{0x33CD, 0, 2 | DECOMP_COMPAT, 3394},
-	{0x33CE, 0, 2 | DECOMP_COMPAT, 3396},
-	{0x33CF, 0, 2 | DECOMP_COMPAT, 3398},
-	{0x33D0, 0, 2 | DECOMP_COMPAT, 3400},
-	{0x33D1, 0, 2 | DECOMP_COMPAT, 3402},
-	{0x33D2, 0, 3 | DECOMP_COMPAT, 3404},
-	{0x33D3, 0, 2 | DECOMP_COMPAT, 3407},
-	{0x33D4, 0, 2 | DECOMP_COMPAT, 3409},
-	{0x33D5, 0, 3 | DECOMP_COMPAT, 3411},
-	{0x33D6, 0, 3 | DECOMP_COMPAT, 3414},
-	{0x33D7, 0, 2 | DECOMP_COMPAT, 3417},
-	{0x33D8, 0, 4 | DECOMP_COMPAT, 3419},
-	{0x33D9, 0, 3 | DECOMP_COMPAT, 3423},
-	{0x33DA, 0, 2 | DECOMP_COMPAT, 3426},
-	{0x33DB, 0, 2 | DECOMP_COMPAT, 3428},
-	{0x33DC, 0, 2 | DECOMP_COMPAT, 3430},
-	{0x33DD, 0, 2 | DECOMP_COMPAT, 3432},
-	{0x33DE, 0, 3 | DECOMP_COMPAT, 3434},
-	{0x33DF, 0, 3 | DECOMP_COMPAT, 3437},
-	{0x33E0, 0, 2 | DECOMP_COMPAT, 3440},
-	{0x33E1, 0, 2 | DECOMP_COMPAT, 3442},
-	{0x33E2, 0, 2 | DECOMP_COMPAT, 3444},
-	{0x33E3, 0, 2 | DECOMP_COMPAT, 3446},
-	{0x33E4, 0, 2 | DECOMP_COMPAT, 3448},
-	{0x33E5, 0, 2 | DECOMP_COMPAT, 3450},
-	{0x33E6, 0, 2 | DECOMP_COMPAT, 3452},
-	{0x33E7, 0, 2 | DECOMP_COMPAT, 3454},
-	{0x33E8, 0, 2 | DECOMP_COMPAT, 3456},
-	{0x33E9, 0, 3 | DECOMP_COMPAT, 3458},
-	{0x33EA, 0, 3 | DECOMP_COMPAT, 3461},
-	{0x33EB, 0, 3 | DECOMP_COMPAT, 3464},
-	{0x33EC, 0, 3 | DECOMP_COMPAT, 3467},
-	{0x33ED, 0, 3 | DECOMP_COMPAT, 3470},
-	{0x33EE, 0, 3 | DECOMP_COMPAT, 3473},
-	{0x33EF, 0, 3 | DECOMP_COMPAT, 3476},
-	{0x33F0, 0, 3 | DECOMP_COMPAT, 3479},
-	{0x33F1, 0, 3 | DECOMP_COMPAT, 3482},
-	{0x33F2, 0, 3 | DECOMP_COMPAT, 3485},
-	{0x33F3, 0, 3 | DECOMP_COMPAT, 3488},
-	{0x33F4, 0, 3 | DECOMP_COMPAT, 3491},
-	{0x33F5, 0, 3 | DECOMP_COMPAT, 3494},
-	{0x33F6, 0, 3 | DECOMP_COMPAT, 3497},
-	{0x33F7, 0, 3 | DECOMP_COMPAT, 3500},
-	{0x33F8, 0, 3 | DECOMP_COMPAT, 3503},
-	{0x33F9, 0, 3 | DECOMP_COMPAT, 3506},
-	{0x33FA, 0, 3 | DECOMP_COMPAT, 3509},
-	{0x33FB, 0, 3 | DECOMP_COMPAT, 3512},
-	{0x33FC, 0, 3 | DECOMP_COMPAT, 3515},
-	{0x33FD, 0, 3 | DECOMP_COMPAT, 3518},
-	{0x33FE, 0, 3 | DECOMP_COMPAT, 3521},
-	{0x33FF, 0, 3 | DECOMP_COMPAT, 3524},
-	{0xA66F, 230, 0, 0},
-	{0xA674, 230, 0, 0},
-	{0xA675, 230, 0, 0},
-	{0xA676, 230, 0, 0},
-	{0xA677, 230, 0, 0},
-	{0xA678, 230, 0, 0},
-	{0xA679, 230, 0, 0},
-	{0xA67A, 230, 0, 0},
-	{0xA67B, 230, 0, 0},
-	{0xA67C, 230, 0, 0},
-	{0xA67D, 230, 0, 0},
-	{0xA69C, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x044A},
-	{0xA69D, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x044C},
-	{0xA69E, 230, 0, 0},
-	{0xA69F, 230, 0, 0},
-	{0xA6F0, 230, 0, 0},
-	{0xA6F1, 230, 0, 0},
-	{0xA770, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0xA76F},
-	{0xA7F2, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0043},
-	{0xA7F3, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0046},
-	{0xA7F4, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0051},
-	{0xA7F8, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0126},
-	{0xA7F9, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0153},
-	{0xA806, 9, 0, 0},
-	{0xA82C, 9, 0, 0},
-	{0xA8C4, 9, 0, 0},
-	{0xA8E0, 230, 0, 0},
-	{0xA8E1, 230, 0, 0},
-	{0xA8E2, 230, 0, 0},
-	{0xA8E3, 230, 0, 0},
-	{0xA8E4, 230, 0, 0},
-	{0xA8E5, 230, 0, 0},
-	{0xA8E6, 230, 0, 0},
-	{0xA8E7, 230, 0, 0},
-	{0xA8E8, 230, 0, 0},
-	{0xA8E9, 230, 0, 0},
-	{0xA8EA, 230, 0, 0},
-	{0xA8EB, 230, 0, 0},
-	{0xA8EC, 230, 0, 0},
-	{0xA8ED, 230, 0, 0},
-	{0xA8EE, 230, 0, 0},
-	{0xA8EF, 230, 0, 0},
-	{0xA8F0, 230, 0, 0},
-	{0xA8F1, 230, 0, 0},
-	{0xA92B, 220, 0, 0},
-	{0xA92C, 220, 0, 0},
-	{0xA92D, 220, 0, 0},
-	{0xA953, 9, 0, 0},
-	{0xA9B3, 7, 0, 0},
-	{0xA9C0, 9, 0, 0},
-	{0xAAB0, 230, 0, 0},
-	{0xAAB2, 230, 0, 0},
-	{0xAAB3, 230, 0, 0},
-	{0xAAB4, 220, 0, 0},
-	{0xAAB7, 230, 0, 0},
-	{0xAAB8, 230, 0, 0},
-	{0xAABE, 230, 0, 0},
-	{0xAABF, 230, 0, 0},
-	{0xAAC1, 230, 0, 0},
-	{0xAAF6, 9, 0, 0},
-	{0xAB5C, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0xA727},
-	{0xAB5D, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0xAB37},
-	{0xAB5E, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x026B},
-	{0xAB5F, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0xAB52},
-	{0xAB69, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x028D},
-	{0xABED, 9, 0, 0},
-	{0xF900, 0, 1 | DECOMP_INLINE, 0x8C48},
-	{0xF901, 0, 1 | DECOMP_INLINE, 0x66F4},
-	{0xF902, 0, 1 | DECOMP_INLINE, 0x8ECA},
-	{0xF903, 0, 1 | DECOMP_INLINE, 0x8CC8},
-	{0xF904, 0, 1 | DECOMP_INLINE, 0x6ED1},
-	{0xF905, 0, 1 | DECOMP_INLINE, 0x4E32},
-	{0xF906, 0, 1 | DECOMP_INLINE, 0x53E5},
-	{0xF907, 0, 1 | DECOMP_INLINE, 0x9F9C},
-	{0xF908, 0, 1 | DECOMP_INLINE, 0x9F9C},
-	{0xF909, 0, 1 | DECOMP_INLINE, 0x5951},
-	{0xF90A, 0, 1 | DECOMP_INLINE, 0x91D1},
-	{0xF90B, 0, 1 | DECOMP_INLINE, 0x5587},
-	{0xF90C, 0, 1 | DECOMP_INLINE, 0x5948},
-	{0xF90D, 0, 1 | DECOMP_INLINE, 0x61F6},
-	{0xF90E, 0, 1 | DECOMP_INLINE, 0x7669},
-	{0xF90F, 0, 1 | DECOMP_INLINE, 0x7F85},
-	{0xF910, 0, 1 | DECOMP_INLINE, 0x863F},
-	{0xF911, 0, 1 | DECOMP_INLINE, 0x87BA},
-	{0xF912, 0, 1 | DECOMP_INLINE, 0x88F8},
-	{0xF913, 0, 1 | DECOMP_INLINE, 0x908F},
-	{0xF914, 0, 1 | DECOMP_INLINE, 0x6A02},
-	{0xF915, 0, 1 | DECOMP_INLINE, 0x6D1B},
-	{0xF916, 0, 1 | DECOMP_INLINE, 0x70D9},
-	{0xF917, 0, 1 | DECOMP_INLINE, 0x73DE},
-	{0xF918, 0, 1 | DECOMP_INLINE, 0x843D},
-	{0xF919, 0, 1 | DECOMP_INLINE, 0x916A},
-	{0xF91A, 0, 1 | DECOMP_INLINE, 0x99F1},
-	{0xF91B, 0, 1 | DECOMP_INLINE, 0x4E82},
-	{0xF91C, 0, 1 | DECOMP_INLINE, 0x5375},
-	{0xF91D, 0, 1 | DECOMP_INLINE, 0x6B04},
-	{0xF91E, 0, 1 | DECOMP_INLINE, 0x721B},
-	{0xF91F, 0, 1 | DECOMP_INLINE, 0x862D},
-	{0xF920, 0, 1 | DECOMP_INLINE, 0x9E1E},
-	{0xF921, 0, 1 | DECOMP_INLINE, 0x5D50},
-	{0xF922, 0, 1 | DECOMP_INLINE, 0x6FEB},
-	{0xF923, 0, 1 | DECOMP_INLINE, 0x85CD},
-	{0xF924, 0, 1 | DECOMP_INLINE, 0x8964},
-	{0xF925, 0, 1 | DECOMP_INLINE, 0x62C9},
-	{0xF926, 0, 1 | DECOMP_INLINE, 0x81D8},
-	{0xF927, 0, 1 | DECOMP_INLINE, 0x881F},
-	{0xF928, 0, 1 | DECOMP_INLINE, 0x5ECA},
-	{0xF929, 0, 1 | DECOMP_INLINE, 0x6717},
-	{0xF92A, 0, 1 | DECOMP_INLINE, 0x6D6A},
-	{0xF92B, 0, 1 | DECOMP_INLINE, 0x72FC},
-	{0xF92C, 0, 1 | DECOMP_INLINE, 0x90CE},
-	{0xF92D, 0, 1 | DECOMP_INLINE, 0x4F86},
-	{0xF92E, 0, 1 | DECOMP_INLINE, 0x51B7},
-	{0xF92F, 0, 1 | DECOMP_INLINE, 0x52DE},
-	{0xF930, 0, 1 | DECOMP_INLINE, 0x64C4},
-	{0xF931, 0, 1 | DECOMP_INLINE, 0x6AD3},
-	{0xF932, 0, 1 | DECOMP_INLINE, 0x7210},
-	{0xF933, 0, 1 | DECOMP_INLINE, 0x76E7},
-	{0xF934, 0, 1 | DECOMP_INLINE, 0x8001},
-	{0xF935, 0, 1 | DECOMP_INLINE, 0x8606},
-	{0xF936, 0, 1 | DECOMP_INLINE, 0x865C},
-	{0xF937, 0, 1 | DECOMP_INLINE, 0x8DEF},
-	{0xF938, 0, 1 | DECOMP_INLINE, 0x9732},
-	{0xF939, 0, 1 | DECOMP_INLINE, 0x9B6F},
-	{0xF93A, 0, 1 | DECOMP_INLINE, 0x9DFA},
-	{0xF93B, 0, 1 | DECOMP_INLINE, 0x788C},
-	{0xF93C, 0, 1 | DECOMP_INLINE, 0x797F},
-	{0xF93D, 0, 1 | DECOMP_INLINE, 0x7DA0},
-	{0xF93E, 0, 1 | DECOMP_INLINE, 0x83C9},
-	{0xF93F, 0, 1 | DECOMP_INLINE, 0x9304},
-	{0xF940, 0, 1 | DECOMP_INLINE, 0x9E7F},
-	{0xF941, 0, 1 | DECOMP_INLINE, 0x8AD6},
-	{0xF942, 0, 1 | DECOMP_INLINE, 0x58DF},
-	{0xF943, 0, 1 | DECOMP_INLINE, 0x5F04},
-	{0xF944, 0, 1 | DECOMP_INLINE, 0x7C60},
-	{0xF945, 0, 1 | DECOMP_INLINE, 0x807E},
-	{0xF946, 0, 1 | DECOMP_INLINE, 0x7262},
-	{0xF947, 0, 1 | DECOMP_INLINE, 0x78CA},
-	{0xF948, 0, 1 | DECOMP_INLINE, 0x8CC2},
-	{0xF949, 0, 1 | DECOMP_INLINE, 0x96F7},
-	{0xF94A, 0, 1 | DECOMP_INLINE, 0x58D8},
-	{0xF94B, 0, 1 | DECOMP_INLINE, 0x5C62},
-	{0xF94C, 0, 1 | DECOMP_INLINE, 0x6A13},
-	{0xF94D, 0, 1 | DECOMP_INLINE, 0x6DDA},
-	{0xF94E, 0, 1 | DECOMP_INLINE, 0x6F0F},
-	{0xF94F, 0, 1 | DECOMP_INLINE, 0x7D2F},
-	{0xF950, 0, 1 | DECOMP_INLINE, 0x7E37},
-	{0xF951, 0, 1 | DECOMP_INLINE, 0x964B},
-	{0xF952, 0, 1 | DECOMP_INLINE, 0x52D2},
-	{0xF953, 0, 1 | DECOMP_INLINE, 0x808B},
-	{0xF954, 0, 1 | DECOMP_INLINE, 0x51DC},
-	{0xF955, 0, 1 | DECOMP_INLINE, 0x51CC},
-	{0xF956, 0, 1 | DECOMP_INLINE, 0x7A1C},
-	{0xF957, 0, 1 | DECOMP_INLINE, 0x7DBE},
-	{0xF958, 0, 1 | DECOMP_INLINE, 0x83F1},
-	{0xF959, 0, 1 | DECOMP_INLINE, 0x9675},
-	{0xF95A, 0, 1 | DECOMP_INLINE, 0x8B80},
-	{0xF95B, 0, 1 | DECOMP_INLINE, 0x62CF},
-	{0xF95C, 0, 1 | DECOMP_INLINE, 0x6A02},
-	{0xF95D, 0, 1 | DECOMP_INLINE, 0x8AFE},
-	{0xF95E, 0, 1 | DECOMP_INLINE, 0x4E39},
-	{0xF95F, 0, 1 | DECOMP_INLINE, 0x5BE7},
-	{0xF960, 0, 1 | DECOMP_INLINE, 0x6012},
-	{0xF961, 0, 1 | DECOMP_INLINE, 0x7387},
-	{0xF962, 0, 1 | DECOMP_INLINE, 0x7570},
-	{0xF963, 0, 1 | DECOMP_INLINE, 0x5317},
-	{0xF964, 0, 1 | DECOMP_INLINE, 0x78FB},
-	{0xF965, 0, 1 | DECOMP_INLINE, 0x4FBF},
-	{0xF966, 0, 1 | DECOMP_INLINE, 0x5FA9},
-	{0xF967, 0, 1 | DECOMP_INLINE, 0x4E0D},
-	{0xF968, 0, 1 | DECOMP_INLINE, 0x6CCC},
-	{0xF969, 0, 1 | DECOMP_INLINE, 0x6578},
-	{0xF96A, 0, 1 | DECOMP_INLINE, 0x7D22},
-	{0xF96B, 0, 1 | DECOMP_INLINE, 0x53C3},
-	{0xF96C, 0, 1 | DECOMP_INLINE, 0x585E},
-	{0xF96D, 0, 1 | DECOMP_INLINE, 0x7701},
-	{0xF96E, 0, 1 | DECOMP_INLINE, 0x8449},
-	{0xF96F, 0, 1 | DECOMP_INLINE, 0x8AAA},
-	{0xF970, 0, 1 | DECOMP_INLINE, 0x6BBA},
-	{0xF971, 0, 1 | DECOMP_INLINE, 0x8FB0},
-	{0xF972, 0, 1 | DECOMP_INLINE, 0x6C88},
-	{0xF973, 0, 1 | DECOMP_INLINE, 0x62FE},
-	{0xF974, 0, 1 | DECOMP_INLINE, 0x82E5},
-	{0xF975, 0, 1 | DECOMP_INLINE, 0x63A0},
-	{0xF976, 0, 1 | DECOMP_INLINE, 0x7565},
-	{0xF977, 0, 1 | DECOMP_INLINE, 0x4EAE},
-	{0xF978, 0, 1 | DECOMP_INLINE, 0x5169},
-	{0xF979, 0, 1 | DECOMP_INLINE, 0x51C9},
-	{0xF97A, 0, 1 | DECOMP_INLINE, 0x6881},
-	{0xF97B, 0, 1 | DECOMP_INLINE, 0x7CE7},
-	{0xF97C, 0, 1 | DECOMP_INLINE, 0x826F},
-	{0xF97D, 0, 1 | DECOMP_INLINE, 0x8AD2},
-	{0xF97E, 0, 1 | DECOMP_INLINE, 0x91CF},
-	{0xF97F, 0, 1 | DECOMP_INLINE, 0x52F5},
-	{0xF980, 0, 1 | DECOMP_INLINE, 0x5442},
-	{0xF981, 0, 1 | DECOMP_INLINE, 0x5973},
-	{0xF982, 0, 1 | DECOMP_INLINE, 0x5EEC},
-	{0xF983, 0, 1 | DECOMP_INLINE, 0x65C5},
-	{0xF984, 0, 1 | DECOMP_INLINE, 0x6FFE},
-	{0xF985, 0, 1 | DECOMP_INLINE, 0x792A},
-	{0xF986, 0, 1 | DECOMP_INLINE, 0x95AD},
-	{0xF987, 0, 1 | DECOMP_INLINE, 0x9A6A},
-	{0xF988, 0, 1 | DECOMP_INLINE, 0x9E97},
-	{0xF989, 0, 1 | DECOMP_INLINE, 0x9ECE},
-	{0xF98A, 0, 1 | DECOMP_INLINE, 0x529B},
-	{0xF98B, 0, 1 | DECOMP_INLINE, 0x66C6},
-	{0xF98C, 0, 1 | DECOMP_INLINE, 0x6B77},
-	{0xF98D, 0, 1 | DECOMP_INLINE, 0x8F62},
-	{0xF98E, 0, 1 | DECOMP_INLINE, 0x5E74},
-	{0xF98F, 0, 1 | DECOMP_INLINE, 0x6190},
-	{0xF990, 0, 1 | DECOMP_INLINE, 0x6200},
-	{0xF991, 0, 1 | DECOMP_INLINE, 0x649A},
-	{0xF992, 0, 1 | DECOMP_INLINE, 0x6F23},
-	{0xF993, 0, 1 | DECOMP_INLINE, 0x7149},
-	{0xF994, 0, 1 | DECOMP_INLINE, 0x7489},
-	{0xF995, 0, 1 | DECOMP_INLINE, 0x79CA},
-	{0xF996, 0, 1 | DECOMP_INLINE, 0x7DF4},
-	{0xF997, 0, 1 | DECOMP_INLINE, 0x806F},
-	{0xF998, 0, 1 | DECOMP_INLINE, 0x8F26},
-	{0xF999, 0, 1 | DECOMP_INLINE, 0x84EE},
-	{0xF99A, 0, 1 | DECOMP_INLINE, 0x9023},
-	{0xF99B, 0, 1 | DECOMP_INLINE, 0x934A},
-	{0xF99C, 0, 1 | DECOMP_INLINE, 0x5217},
-	{0xF99D, 0, 1 | DECOMP_INLINE, 0x52A3},
-	{0xF99E, 0, 1 | DECOMP_INLINE, 0x54BD},
-	{0xF99F, 0, 1 | DECOMP_INLINE, 0x70C8},
-	{0xF9A0, 0, 1 | DECOMP_INLINE, 0x88C2},
-	{0xF9A1, 0, 1 | DECOMP_INLINE, 0x8AAA},
-	{0xF9A2, 0, 1 | DECOMP_INLINE, 0x5EC9},
-	{0xF9A3, 0, 1 | DECOMP_INLINE, 0x5FF5},
-	{0xF9A4, 0, 1 | DECOMP_INLINE, 0x637B},
-	{0xF9A5, 0, 1 | DECOMP_INLINE, 0x6BAE},
-	{0xF9A6, 0, 1 | DECOMP_INLINE, 0x7C3E},
-	{0xF9A7, 0, 1 | DECOMP_INLINE, 0x7375},
-	{0xF9A8, 0, 1 | DECOMP_INLINE, 0x4EE4},
-	{0xF9A9, 0, 1 | DECOMP_INLINE, 0x56F9},
-	{0xF9AA, 0, 1 | DECOMP_INLINE, 0x5BE7},
-	{0xF9AB, 0, 1 | DECOMP_INLINE, 0x5DBA},
-	{0xF9AC, 0, 1 | DECOMP_INLINE, 0x601C},
-	{0xF9AD, 0, 1 | DECOMP_INLINE, 0x73B2},
-	{0xF9AE, 0, 1 | DECOMP_INLINE, 0x7469},
-	{0xF9AF, 0, 1 | DECOMP_INLINE, 0x7F9A},
-	{0xF9B0, 0, 1 | DECOMP_INLINE, 0x8046},
-	{0xF9B1, 0, 1 | DECOMP_INLINE, 0x9234},
-	{0xF9B2, 0, 1 | DECOMP_INLINE, 0x96F6},
-	{0xF9B3, 0, 1 | DECOMP_INLINE, 0x9748},
-	{0xF9B4, 0, 1 | DECOMP_INLINE, 0x9818},
-	{0xF9B5, 0, 1 | DECOMP_INLINE, 0x4F8B},
-	{0xF9B6, 0, 1 | DECOMP_INLINE, 0x79AE},
-	{0xF9B7, 0, 1 | DECOMP_INLINE, 0x91B4},
-	{0xF9B8, 0, 1 | DECOMP_INLINE, 0x96B8},
-	{0xF9B9, 0, 1 | DECOMP_INLINE, 0x60E1},
-	{0xF9BA, 0, 1 | DECOMP_INLINE, 0x4E86},
-	{0xF9BB, 0, 1 | DECOMP_INLINE, 0x50DA},
-	{0xF9BC, 0, 1 | DECOMP_INLINE, 0x5BEE},
-	{0xF9BD, 0, 1 | DECOMP_INLINE, 0x5C3F},
-	{0xF9BE, 0, 1 | DECOMP_INLINE, 0x6599},
-	{0xF9BF, 0, 1 | DECOMP_INLINE, 0x6A02},
-	{0xF9C0, 0, 1 | DECOMP_INLINE, 0x71CE},
-	{0xF9C1, 0, 1 | DECOMP_INLINE, 0x7642},
-	{0xF9C2, 0, 1 | DECOMP_INLINE, 0x84FC},
-	{0xF9C3, 0, 1 | DECOMP_INLINE, 0x907C},
-	{0xF9C4, 0, 1 | DECOMP_INLINE, 0x9F8D},
-	{0xF9C5, 0, 1 | DECOMP_INLINE, 0x6688},
-	{0xF9C6, 0, 1 | DECOMP_INLINE, 0x962E},
-	{0xF9C7, 0, 1 | DECOMP_INLINE, 0x5289},
-	{0xF9C8, 0, 1 | DECOMP_INLINE, 0x677B},
-	{0xF9C9, 0, 1 | DECOMP_INLINE, 0x67F3},
-	{0xF9CA, 0, 1 | DECOMP_INLINE, 0x6D41},
-	{0xF9CB, 0, 1 | DECOMP_INLINE, 0x6E9C},
-	{0xF9CC, 0, 1 | DECOMP_INLINE, 0x7409},
-	{0xF9CD, 0, 1 | DECOMP_INLINE, 0x7559},
-	{0xF9CE, 0, 1 | DECOMP_INLINE, 0x786B},
-	{0xF9CF, 0, 1 | DECOMP_INLINE, 0x7D10},
-	{0xF9D0, 0, 1 | DECOMP_INLINE, 0x985E},
-	{0xF9D1, 0, 1 | DECOMP_INLINE, 0x516D},
-	{0xF9D2, 0, 1 | DECOMP_INLINE, 0x622E},
-	{0xF9D3, 0, 1 | DECOMP_INLINE, 0x9678},
-	{0xF9D4, 0, 1 | DECOMP_INLINE, 0x502B},
-	{0xF9D5, 0, 1 | DECOMP_INLINE, 0x5D19},
-	{0xF9D6, 0, 1 | DECOMP_INLINE, 0x6DEA},
-	{0xF9D7, 0, 1 | DECOMP_INLINE, 0x8F2A},
-	{0xF9D8, 0, 1 | DECOMP_INLINE, 0x5F8B},
-	{0xF9D9, 0, 1 | DECOMP_INLINE, 0x6144},
-	{0xF9DA, 0, 1 | DECOMP_INLINE, 0x6817},
-	{0xF9DB, 0, 1 | DECOMP_INLINE, 0x7387},
-	{0xF9DC, 0, 1 | DECOMP_INLINE, 0x9686},
-	{0xF9DD, 0, 1 | DECOMP_INLINE, 0x5229},
-	{0xF9DE, 0, 1 | DECOMP_INLINE, 0x540F},
-	{0xF9DF, 0, 1 | DECOMP_INLINE, 0x5C65},
-	{0xF9E0, 0, 1 | DECOMP_INLINE, 0x6613},
-	{0xF9E1, 0, 1 | DECOMP_INLINE, 0x674E},
-	{0xF9E2, 0, 1 | DECOMP_INLINE, 0x68A8},
-	{0xF9E3, 0, 1 | DECOMP_INLINE, 0x6CE5},
-	{0xF9E4, 0, 1 | DECOMP_INLINE, 0x7406},
-	{0xF9E5, 0, 1 | DECOMP_INLINE, 0x75E2},
-	{0xF9E6, 0, 1 | DECOMP_INLINE, 0x7F79},
-	{0xF9E7, 0, 1 | DECOMP_INLINE, 0x88CF},
-	{0xF9E8, 0, 1 | DECOMP_INLINE, 0x88E1},
-	{0xF9E9, 0, 1 | DECOMP_INLINE, 0x91CC},
-	{0xF9EA, 0, 1 | DECOMP_INLINE, 0x96E2},
-	{0xF9EB, 0, 1 | DECOMP_INLINE, 0x533F},
-	{0xF9EC, 0, 1 | DECOMP_INLINE, 0x6EBA},
-	{0xF9ED, 0, 1 | DECOMP_INLINE, 0x541D},
-	{0xF9EE, 0, 1 | DECOMP_INLINE, 0x71D0},
-	{0xF9EF, 0, 1 | DECOMP_INLINE, 0x7498},
-	{0xF9F0, 0, 1 | DECOMP_INLINE, 0x85FA},
-	{0xF9F1, 0, 1 | DECOMP_INLINE, 0x96A3},
-	{0xF9F2, 0, 1 | DECOMP_INLINE, 0x9C57},
-	{0xF9F3, 0, 1 | DECOMP_INLINE, 0x9E9F},
-	{0xF9F4, 0, 1 | DECOMP_INLINE, 0x6797},
-	{0xF9F5, 0, 1 | DECOMP_INLINE, 0x6DCB},
-	{0xF9F6, 0, 1 | DECOMP_INLINE, 0x81E8},
-	{0xF9F7, 0, 1 | DECOMP_INLINE, 0x7ACB},
-	{0xF9F8, 0, 1 | DECOMP_INLINE, 0x7B20},
-	{0xF9F9, 0, 1 | DECOMP_INLINE, 0x7C92},
-	{0xF9FA, 0, 1 | DECOMP_INLINE, 0x72C0},
-	{0xF9FB, 0, 1 | DECOMP_INLINE, 0x7099},
-	{0xF9FC, 0, 1 | DECOMP_INLINE, 0x8B58},
-	{0xF9FD, 0, 1 | DECOMP_INLINE, 0x4EC0},
-	{0xF9FE, 0, 1 | DECOMP_INLINE, 0x8336},
-	{0xF9FF, 0, 1 | DECOMP_INLINE, 0x523A},
-	{0xFA00, 0, 1 | DECOMP_INLINE, 0x5207},
-	{0xFA01, 0, 1 | DECOMP_INLINE, 0x5EA6},
-	{0xFA02, 0, 1 | DECOMP_INLINE, 0x62D3},
-	{0xFA03, 0, 1 | DECOMP_INLINE, 0x7CD6},
-	{0xFA04, 0, 1 | DECOMP_INLINE, 0x5B85},
-	{0xFA05, 0, 1 | DECOMP_INLINE, 0x6D1E},
-	{0xFA06, 0, 1 | DECOMP_INLINE, 0x66B4},
-	{0xFA07, 0, 1 | DECOMP_INLINE, 0x8F3B},
-	{0xFA08, 0, 1 | DECOMP_INLINE, 0x884C},
-	{0xFA09, 0, 1 | DECOMP_INLINE, 0x964D},
-	{0xFA0A, 0, 1 | DECOMP_INLINE, 0x898B},
-	{0xFA0B, 0, 1 | DECOMP_INLINE, 0x5ED3},
-	{0xFA0C, 0, 1 | DECOMP_INLINE, 0x5140},
-	{0xFA0D, 0, 1 | DECOMP_INLINE, 0x55C0},
-	{0xFA10, 0, 1 | DECOMP_INLINE, 0x585A},
-	{0xFA12, 0, 1 | DECOMP_INLINE, 0x6674},
-	{0xFA15, 0, 1 | DECOMP_INLINE, 0x51DE},
-	{0xFA16, 0, 1 | DECOMP_INLINE, 0x732A},
-	{0xFA17, 0, 1 | DECOMP_INLINE, 0x76CA},
-	{0xFA18, 0, 1 | DECOMP_INLINE, 0x793C},
-	{0xFA19, 0, 1 | DECOMP_INLINE, 0x795E},
-	{0xFA1A, 0, 1 | DECOMP_INLINE, 0x7965},
-	{0xFA1B, 0, 1 | DECOMP_INLINE, 0x798F},
-	{0xFA1C, 0, 1 | DECOMP_INLINE, 0x9756},
-	{0xFA1D, 0, 1 | DECOMP_INLINE, 0x7CBE},
-	{0xFA1E, 0, 1 | DECOMP_INLINE, 0x7FBD},
-	{0xFA20, 0, 1 | DECOMP_INLINE, 0x8612},
-	{0xFA22, 0, 1 | DECOMP_INLINE, 0x8AF8},
-	{0xFA25, 0, 1 | DECOMP_INLINE, 0x9038},
-	{0xFA26, 0, 1 | DECOMP_INLINE, 0x90FD},
-	{0xFA2A, 0, 1 | DECOMP_INLINE, 0x98EF},
-	{0xFA2B, 0, 1 | DECOMP_INLINE, 0x98FC},
-	{0xFA2C, 0, 1 | DECOMP_INLINE, 0x9928},
-	{0xFA2D, 0, 1 | DECOMP_INLINE, 0x9DB4},
-	{0xFA2E, 0, 1 | DECOMP_INLINE, 0x90DE},
-	{0xFA2F, 0, 1 | DECOMP_INLINE, 0x96B7},
-	{0xFA30, 0, 1 | DECOMP_INLINE, 0x4FAE},
-	{0xFA31, 0, 1 | DECOMP_INLINE, 0x50E7},
-	{0xFA32, 0, 1 | DECOMP_INLINE, 0x514D},
-	{0xFA33, 0, 1 | DECOMP_INLINE, 0x52C9},
-	{0xFA34, 0, 1 | DECOMP_INLINE, 0x52E4},
-	{0xFA35, 0, 1 | DECOMP_INLINE, 0x5351},
-	{0xFA36, 0, 1 | DECOMP_INLINE, 0x559D},
-	{0xFA37, 0, 1 | DECOMP_INLINE, 0x5606},
-	{0xFA38, 0, 1 | DECOMP_INLINE, 0x5668},
-	{0xFA39, 0, 1 | DECOMP_INLINE, 0x5840},
-	{0xFA3A, 0, 1 | DECOMP_INLINE, 0x58A8},
-	{0xFA3B, 0, 1 | DECOMP_INLINE, 0x5C64},
-	{0xFA3C, 0, 1 | DECOMP_INLINE, 0x5C6E},
-	{0xFA3D, 0, 1 | DECOMP_INLINE, 0x6094},
-	{0xFA3E, 0, 1 | DECOMP_INLINE, 0x6168},
-	{0xFA3F, 0, 1 | DECOMP_INLINE, 0x618E},
-	{0xFA40, 0, 1 | DECOMP_INLINE, 0x61F2},
-	{0xFA41, 0, 1 | DECOMP_INLINE, 0x654F},
-	{0xFA42, 0, 1 | DECOMP_INLINE, 0x65E2},
-	{0xFA43, 0, 1 | DECOMP_INLINE, 0x6691},
-	{0xFA44, 0, 1 | DECOMP_INLINE, 0x6885},
-	{0xFA45, 0, 1 | DECOMP_INLINE, 0x6D77},
-	{0xFA46, 0, 1 | DECOMP_INLINE, 0x6E1A},
-	{0xFA47, 0, 1 | DECOMP_INLINE, 0x6F22},
-	{0xFA48, 0, 1 | DECOMP_INLINE, 0x716E},
-	{0xFA49, 0, 1 | DECOMP_INLINE, 0x722B},
-	{0xFA4A, 0, 1 | DECOMP_INLINE, 0x7422},
-	{0xFA4B, 0, 1 | DECOMP_INLINE, 0x7891},
-	{0xFA4C, 0, 1 | DECOMP_INLINE, 0x793E},
-	{0xFA4D, 0, 1 | DECOMP_INLINE, 0x7949},
-	{0xFA4E, 0, 1 | DECOMP_INLINE, 0x7948},
-	{0xFA4F, 0, 1 | DECOMP_INLINE, 0x7950},
-	{0xFA50, 0, 1 | DECOMP_INLINE, 0x7956},
-	{0xFA51, 0, 1 | DECOMP_INLINE, 0x795D},
-	{0xFA52, 0, 1 | DECOMP_INLINE, 0x798D},
-	{0xFA53, 0, 1 | DECOMP_INLINE, 0x798E},
-	{0xFA54, 0, 1 | DECOMP_INLINE, 0x7A40},
-	{0xFA55, 0, 1 | DECOMP_INLINE, 0x7A81},
-	{0xFA56, 0, 1 | DECOMP_INLINE, 0x7BC0},
-	{0xFA57, 0, 1 | DECOMP_INLINE, 0x7DF4},
-	{0xFA58, 0, 1 | DECOMP_INLINE, 0x7E09},
-	{0xFA59, 0, 1 | DECOMP_INLINE, 0x7E41},
-	{0xFA5A, 0, 1 | DECOMP_INLINE, 0x7F72},
-	{0xFA5B, 0, 1 | DECOMP_INLINE, 0x8005},
-	{0xFA5C, 0, 1 | DECOMP_INLINE, 0x81ED},
-	{0xFA5D, 0, 1 | DECOMP_INLINE, 0x8279},
-	{0xFA5E, 0, 1 | DECOMP_INLINE, 0x8279},
-	{0xFA5F, 0, 1 | DECOMP_INLINE, 0x8457},
-	{0xFA60, 0, 1 | DECOMP_INLINE, 0x8910},
-	{0xFA61, 0, 1 | DECOMP_INLINE, 0x8996},
-	{0xFA62, 0, 1 | DECOMP_INLINE, 0x8B01},
-	{0xFA63, 0, 1 | DECOMP_INLINE, 0x8B39},
-	{0xFA64, 0, 1 | DECOMP_INLINE, 0x8CD3},
-	{0xFA65, 0, 1 | DECOMP_INLINE, 0x8D08},
-	{0xFA66, 0, 1 | DECOMP_INLINE, 0x8FB6},
-	{0xFA67, 0, 1 | DECOMP_INLINE, 0x9038},
-	{0xFA68, 0, 1 | DECOMP_INLINE, 0x96E3},
-	{0xFA69, 0, 1 | DECOMP_INLINE, 0x97FF},
-	{0xFA6A, 0, 1 | DECOMP_INLINE, 0x983B},
-	{0xFA6B, 0, 1 | DECOMP_INLINE, 0x6075},
-	{0xFA6C, 0, 1, 3527},
-	{0xFA6D, 0, 1 | DECOMP_INLINE, 0x8218},
-	{0xFA70, 0, 1 | DECOMP_INLINE, 0x4E26},
-	{0xFA71, 0, 1 | DECOMP_INLINE, 0x51B5},
-	{0xFA72, 0, 1 | DECOMP_INLINE, 0x5168},
-	{0xFA73, 0, 1 | DECOMP_INLINE, 0x4F80},
-	{0xFA74, 0, 1 | DECOMP_INLINE, 0x5145},
-	{0xFA75, 0, 1 | DECOMP_INLINE, 0x5180},
-	{0xFA76, 0, 1 | DECOMP_INLINE, 0x52C7},
-	{0xFA77, 0, 1 | DECOMP_INLINE, 0x52FA},
-	{0xFA78, 0, 1 | DECOMP_INLINE, 0x559D},
-	{0xFA79, 0, 1 | DECOMP_INLINE, 0x5555},
-	{0xFA7A, 0, 1 | DECOMP_INLINE, 0x5599},
-	{0xFA7B, 0, 1 | DECOMP_INLINE, 0x55E2},
-	{0xFA7C, 0, 1 | DECOMP_INLINE, 0x585A},
-	{0xFA7D, 0, 1 | DECOMP_INLINE, 0x58B3},
-	{0xFA7E, 0, 1 | DECOMP_INLINE, 0x5944},
-	{0xFA7F, 0, 1 | DECOMP_INLINE, 0x5954},
-	{0xFA80, 0, 1 | DECOMP_INLINE, 0x5A62},
-	{0xFA81, 0, 1 | DECOMP_INLINE, 0x5B28},
-	{0xFA82, 0, 1 | DECOMP_INLINE, 0x5ED2},
-	{0xFA83, 0, 1 | DECOMP_INLINE, 0x5ED9},
-	{0xFA84, 0, 1 | DECOMP_INLINE, 0x5F69},
-	{0xFA85, 0, 1 | DECOMP_INLINE, 0x5FAD},
-	{0xFA86, 0, 1 | DECOMP_INLINE, 0x60D8},
-	{0xFA87, 0, 1 | DECOMP_INLINE, 0x614E},
-	{0xFA88, 0, 1 | DECOMP_INLINE, 0x6108},
-	{0xFA89, 0, 1 | DECOMP_INLINE, 0x618E},
-	{0xFA8A, 0, 1 | DECOMP_INLINE, 0x6160},
-	{0xFA8B, 0, 1 | DECOMP_INLINE, 0x61F2},
-	{0xFA8C, 0, 1 | DECOMP_INLINE, 0x6234},
-	{0xFA8D, 0, 1 | DECOMP_INLINE, 0x63C4},
-	{0xFA8E, 0, 1 | DECOMP_INLINE, 0x641C},
-	{0xFA8F, 0, 1 | DECOMP_INLINE, 0x6452},
-	{0xFA90, 0, 1 | DECOMP_INLINE, 0x6556},
-	{0xFA91, 0, 1 | DECOMP_INLINE, 0x6674},
-	{0xFA92, 0, 1 | DECOMP_INLINE, 0x6717},
-	{0xFA93, 0, 1 | DECOMP_INLINE, 0x671B},
-	{0xFA94, 0, 1 | DECOMP_INLINE, 0x6756},
-	{0xFA95, 0, 1 | DECOMP_INLINE, 0x6B79},
-	{0xFA96, 0, 1 | DECOMP_INLINE, 0x6BBA},
-	{0xFA97, 0, 1 | DECOMP_INLINE, 0x6D41},
-	{0xFA98, 0, 1 | DECOMP_INLINE, 0x6EDB},
-	{0xFA99, 0, 1 | DECOMP_INLINE, 0x6ECB},
-	{0xFA9A, 0, 1 | DECOMP_INLINE, 0x6F22},
-	{0xFA9B, 0, 1 | DECOMP_INLINE, 0x701E},
-	{0xFA9C, 0, 1 | DECOMP_INLINE, 0x716E},
-	{0xFA9D, 0, 1 | DECOMP_INLINE, 0x77A7},
-	{0xFA9E, 0, 1 | DECOMP_INLINE, 0x7235},
-	{0xFA9F, 0, 1 | DECOMP_INLINE, 0x72AF},
-	{0xFAA0, 0, 1 | DECOMP_INLINE, 0x732A},
-	{0xFAA1, 0, 1 | DECOMP_INLINE, 0x7471},
-	{0xFAA2, 0, 1 | DECOMP_INLINE, 0x7506},
-	{0xFAA3, 0, 1 | DECOMP_INLINE, 0x753B},
-	{0xFAA4, 0, 1 | DECOMP_INLINE, 0x761D},
-	{0xFAA5, 0, 1 | DECOMP_INLINE, 0x761F},
-	{0xFAA6, 0, 1 | DECOMP_INLINE, 0x76CA},
-	{0xFAA7, 0, 1 | DECOMP_INLINE, 0x76DB},
-	{0xFAA8, 0, 1 | DECOMP_INLINE, 0x76F4},
-	{0xFAA9, 0, 1 | DECOMP_INLINE, 0x774A},
-	{0xFAAA, 0, 1 | DECOMP_INLINE, 0x7740},
-	{0xFAAB, 0, 1 | DECOMP_INLINE, 0x78CC},
-	{0xFAAC, 0, 1 | DECOMP_INLINE, 0x7AB1},
-	{0xFAAD, 0, 1 | DECOMP_INLINE, 0x7BC0},
-	{0xFAAE, 0, 1 | DECOMP_INLINE, 0x7C7B},
-	{0xFAAF, 0, 1 | DECOMP_INLINE, 0x7D5B},
-	{0xFAB0, 0, 1 | DECOMP_INLINE, 0x7DF4},
-	{0xFAB1, 0, 1 | DECOMP_INLINE, 0x7F3E},
-	{0xFAB2, 0, 1 | DECOMP_INLINE, 0x8005},
-	{0xFAB3, 0, 1 | DECOMP_INLINE, 0x8352},
-	{0xFAB4, 0, 1 | DECOMP_INLINE, 0x83EF},
-	{0xFAB5, 0, 1 | DECOMP_INLINE, 0x8779},
-	{0xFAB6, 0, 1 | DECOMP_INLINE, 0x8941},
-	{0xFAB7, 0, 1 | DECOMP_INLINE, 0x8986},
-	{0xFAB8, 0, 1 | DECOMP_INLINE, 0x8996},
-	{0xFAB9, 0, 1 | DECOMP_INLINE, 0x8ABF},
-	{0xFABA, 0, 1 | DECOMP_INLINE, 0x8AF8},
-	{0xFABB, 0, 1 | DECOMP_INLINE, 0x8ACB},
-	{0xFABC, 0, 1 | DECOMP_INLINE, 0x8B01},
-	{0xFABD, 0, 1 | DECOMP_INLINE, 0x8AFE},
-	{0xFABE, 0, 1 | DECOMP_INLINE, 0x8AED},
-	{0xFABF, 0, 1 | DECOMP_INLINE, 0x8B39},
-	{0xFAC0, 0, 1 | DECOMP_INLINE, 0x8B8A},
-	{0xFAC1, 0, 1 | DECOMP_INLINE, 0x8D08},
-	{0xFAC2, 0, 1 | DECOMP_INLINE, 0x8F38},
-	{0xFAC3, 0, 1 | DECOMP_INLINE, 0x9072},
-	{0xFAC4, 0, 1 | DECOMP_INLINE, 0x9199},
-	{0xFAC5, 0, 1 | DECOMP_INLINE, 0x9276},
-	{0xFAC6, 0, 1 | DECOMP_INLINE, 0x967C},
-	{0xFAC7, 0, 1 | DECOMP_INLINE, 0x96E3},
-	{0xFAC8, 0, 1 | DECOMP_INLINE, 0x9756},
-	{0xFAC9, 0, 1 | DECOMP_INLINE, 0x97DB},
-	{0xFACA, 0, 1 | DECOMP_INLINE, 0x97FF},
-	{0xFACB, 0, 1 | DECOMP_INLINE, 0x980B},
-	{0xFACC, 0, 1 | DECOMP_INLINE, 0x983B},
-	{0xFACD, 0, 1 | DECOMP_INLINE, 0x9B12},
-	{0xFACE, 0, 1 | DECOMP_INLINE, 0x9F9C},
-	{0xFACF, 0, 1, 3528},
-	{0xFAD0, 0, 1, 3529},
-	{0xFAD1, 0, 1, 3530},
-	{0xFAD2, 0, 1 | DECOMP_INLINE, 0x3B9D},
-	{0xFAD3, 0, 1 | DECOMP_INLINE, 0x4018},
-	{0xFAD4, 0, 1 | DECOMP_INLINE, 0x4039},
-	{0xFAD5, 0, 1, 3531},
-	{0xFAD6, 0, 1, 3532},
-	{0xFAD7, 0, 1, 3533},
-	{0xFAD8, 0, 1 | DECOMP_INLINE, 0x9F43},
-	{0xFAD9, 0, 1 | DECOMP_INLINE, 0x9F8E},
-	{0xFB00, 0, 2 | DECOMP_COMPAT, 3534},
-	{0xFB01, 0, 2 | DECOMP_COMPAT, 3536},
-	{0xFB02, 0, 2 | DECOMP_COMPAT, 3538},
-	{0xFB03, 0, 3 | DECOMP_COMPAT, 3540},
-	{0xFB04, 0, 3 | DECOMP_COMPAT, 3543},
-	{0xFB05, 0, 2 | DECOMP_COMPAT, 3546},
-	{0xFB06, 0, 2 | DECOMP_COMPAT, 3548},
-	{0xFB13, 0, 2 | DECOMP_COMPAT, 3550},
-	{0xFB14, 0, 2 | DECOMP_COMPAT, 3552},
-	{0xFB15, 0, 2 | DECOMP_COMPAT, 3554},
-	{0xFB16, 0, 2 | DECOMP_COMPAT, 3556},
-	{0xFB17, 0, 2 | DECOMP_COMPAT, 3558},
-	{0xFB1D, 0, 2 | DECOMP_NO_COMPOSE, 3560},	/* in exclusion list */
-	{0xFB1E, 26, 0, 0},
-	{0xFB1F, 0, 2 | DECOMP_NO_COMPOSE, 3562},	/* in exclusion list */
-	{0xFB20, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x05E2},
-	{0xFB21, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x05D0},
-	{0xFB22, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x05D3},
-	{0xFB23, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x05D4},
-	{0xFB24, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x05DB},
-	{0xFB25, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x05DC},
-	{0xFB26, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x05DD},
-	{0xFB27, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x05E8},
-	{0xFB28, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x05EA},
-	{0xFB29, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x002B},
-	{0xFB2A, 0, 2 | DECOMP_NO_COMPOSE, 3564},	/* in exclusion list */
-	{0xFB2B, 0, 2 | DECOMP_NO_COMPOSE, 3566},	/* in exclusion list */
-	{0xFB2C, 0, 2 | DECOMP_NO_COMPOSE, 3568},	/* in exclusion list */
-	{0xFB2D, 0, 2 | DECOMP_NO_COMPOSE, 3570},	/* in exclusion list */
-	{0xFB2E, 0, 2 | DECOMP_NO_COMPOSE, 3572},	/* in exclusion list */
-	{0xFB2F, 0, 2 | DECOMP_NO_COMPOSE, 3574},	/* in exclusion list */
-	{0xFB30, 0, 2 | DECOMP_NO_COMPOSE, 3576},	/* in exclusion list */
-	{0xFB31, 0, 2 | DECOMP_NO_COMPOSE, 3578},	/* in exclusion list */
-	{0xFB32, 0, 2 | DECOMP_NO_COMPOSE, 3580},	/* in exclusion list */
-	{0xFB33, 0, 2 | DECOMP_NO_COMPOSE, 3582},	/* in exclusion list */
-	{0xFB34, 0, 2 | DECOMP_NO_COMPOSE, 3584},	/* in exclusion list */
-	{0xFB35, 0, 2 | DECOMP_NO_COMPOSE, 3586},	/* in exclusion list */
-	{0xFB36, 0, 2 | DECOMP_NO_COMPOSE, 3588},	/* in exclusion list */
-	{0xFB38, 0, 2 | DECOMP_NO_COMPOSE, 3590},	/* in exclusion list */
-	{0xFB39, 0, 2 | DECOMP_NO_COMPOSE, 3592},	/* in exclusion list */
-	{0xFB3A, 0, 2 | DECOMP_NO_COMPOSE, 3594},	/* in exclusion list */
-	{0xFB3B, 0, 2 | DECOMP_NO_COMPOSE, 3596},	/* in exclusion list */
-	{0xFB3C, 0, 2 | DECOMP_NO_COMPOSE, 3598},	/* in exclusion list */
-	{0xFB3E, 0, 2 | DECOMP_NO_COMPOSE, 3600},	/* in exclusion list */
-	{0xFB40, 0, 2 | DECOMP_NO_COMPOSE, 3602},	/* in exclusion list */
-	{0xFB41, 0, 2 | DECOMP_NO_COMPOSE, 3604},	/* in exclusion list */
-	{0xFB43, 0, 2 | DECOMP_NO_COMPOSE, 3606},	/* in exclusion list */
-	{0xFB44, 0, 2 | DECOMP_NO_COMPOSE, 3608},	/* in exclusion list */
-	{0xFB46, 0, 2 | DECOMP_NO_COMPOSE, 3610},	/* in exclusion list */
-	{0xFB47, 0, 2 | DECOMP_NO_COMPOSE, 3612},	/* in exclusion list */
-	{0xFB48, 0, 2 | DECOMP_NO_COMPOSE, 3614},	/* in exclusion list */
-	{0xFB49, 0, 2 | DECOMP_NO_COMPOSE, 3616},	/* in exclusion list */
-	{0xFB4A, 0, 2 | DECOMP_NO_COMPOSE, 3618},	/* in exclusion list */
-	{0xFB4B, 0, 2 | DECOMP_NO_COMPOSE, 3620},	/* in exclusion list */
-	{0xFB4C, 0, 2 | DECOMP_NO_COMPOSE, 3622},	/* in exclusion list */
-	{0xFB4D, 0, 2 | DECOMP_NO_COMPOSE, 3624},	/* in exclusion list */
-	{0xFB4E, 0, 2 | DECOMP_NO_COMPOSE, 3626},	/* in exclusion list */
-	{0xFB4F, 0, 2 | DECOMP_COMPAT, 3628},
-	{0xFB50, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0671},
-	{0xFB51, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0671},
-	{0xFB52, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x067B},
-	{0xFB53, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x067B},
-	{0xFB54, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x067B},
-	{0xFB55, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x067B},
-	{0xFB56, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x067E},
-	{0xFB57, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x067E},
-	{0xFB58, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x067E},
-	{0xFB59, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x067E},
-	{0xFB5A, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0680},
-	{0xFB5B, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0680},
-	{0xFB5C, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0680},
-	{0xFB5D, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0680},
-	{0xFB5E, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x067A},
-	{0xFB5F, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x067A},
-	{0xFB60, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x067A},
-	{0xFB61, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x067A},
-	{0xFB62, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x067F},
-	{0xFB63, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x067F},
-	{0xFB64, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x067F},
-	{0xFB65, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x067F},
-	{0xFB66, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0679},
-	{0xFB67, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0679},
-	{0xFB68, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0679},
-	{0xFB69, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0679},
-	{0xFB6A, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x06A4},
-	{0xFB6B, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x06A4},
-	{0xFB6C, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x06A4},
-	{0xFB6D, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x06A4},
-	{0xFB6E, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x06A6},
-	{0xFB6F, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x06A6},
-	{0xFB70, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x06A6},
-	{0xFB71, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x06A6},
-	{0xFB72, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0684},
-	{0xFB73, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0684},
-	{0xFB74, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0684},
-	{0xFB75, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0684},
-	{0xFB76, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0683},
-	{0xFB77, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0683},
-	{0xFB78, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0683},
-	{0xFB79, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0683},
-	{0xFB7A, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0686},
-	{0xFB7B, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0686},
-	{0xFB7C, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0686},
-	{0xFB7D, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0686},
-	{0xFB7E, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0687},
-	{0xFB7F, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0687},
-	{0xFB80, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0687},
-	{0xFB81, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0687},
-	{0xFB82, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x068D},
-	{0xFB83, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x068D},
-	{0xFB84, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x068C},
-	{0xFB85, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x068C},
-	{0xFB86, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x068E},
-	{0xFB87, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x068E},
-	{0xFB88, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0688},
-	{0xFB89, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0688},
-	{0xFB8A, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0698},
-	{0xFB8B, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0698},
-	{0xFB8C, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0691},
-	{0xFB8D, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0691},
-	{0xFB8E, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x06A9},
-	{0xFB8F, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x06A9},
-	{0xFB90, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x06A9},
-	{0xFB91, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x06A9},
-	{0xFB92, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x06AF},
-	{0xFB93, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x06AF},
-	{0xFB94, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x06AF},
-	{0xFB95, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x06AF},
-	{0xFB96, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x06B3},
-	{0xFB97, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x06B3},
-	{0xFB98, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x06B3},
-	{0xFB99, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x06B3},
-	{0xFB9A, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x06B1},
-	{0xFB9B, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x06B1},
-	{0xFB9C, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x06B1},
-	{0xFB9D, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x06B1},
-	{0xFB9E, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x06BA},
-	{0xFB9F, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x06BA},
-	{0xFBA0, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x06BB},
-	{0xFBA1, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x06BB},
-	{0xFBA2, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x06BB},
-	{0xFBA3, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x06BB},
-	{0xFBA4, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x06C0},
-	{0xFBA5, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x06C0},
-	{0xFBA6, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x06C1},
-	{0xFBA7, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x06C1},
-	{0xFBA8, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x06C1},
-	{0xFBA9, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x06C1},
-	{0xFBAA, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x06BE},
-	{0xFBAB, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x06BE},
-	{0xFBAC, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x06BE},
-	{0xFBAD, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x06BE},
-	{0xFBAE, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x06D2},
-	{0xFBAF, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x06D2},
-	{0xFBB0, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x06D3},
-	{0xFBB1, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x06D3},
-	{0xFBD3, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x06AD},
-	{0xFBD4, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x06AD},
-	{0xFBD5, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x06AD},
-	{0xFBD6, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x06AD},
-	{0xFBD7, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x06C7},
-	{0xFBD8, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x06C7},
-	{0xFBD9, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x06C6},
-	{0xFBDA, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x06C6},
-	{0xFBDB, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x06C8},
-	{0xFBDC, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x06C8},
-	{0xFBDD, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0677},
-	{0xFBDE, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x06CB},
-	{0xFBDF, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x06CB},
-	{0xFBE0, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x06C5},
-	{0xFBE1, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x06C5},
-	{0xFBE2, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x06C9},
-	{0xFBE3, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x06C9},
-	{0xFBE4, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x06D0},
-	{0xFBE5, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x06D0},
-	{0xFBE6, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x06D0},
-	{0xFBE7, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x06D0},
-	{0xFBE8, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0649},
-	{0xFBE9, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0649},
-	{0xFBEA, 0, 2 | DECOMP_COMPAT, 3630},
-	{0xFBEB, 0, 2 | DECOMP_COMPAT, 3632},
-	{0xFBEC, 0, 2 | DECOMP_COMPAT, 3634},
-	{0xFBED, 0, 2 | DECOMP_COMPAT, 3636},
-	{0xFBEE, 0, 2 | DECOMP_COMPAT, 3638},
-	{0xFBEF, 0, 2 | DECOMP_COMPAT, 3640},
-	{0xFBF0, 0, 2 | DECOMP_COMPAT, 3642},
-	{0xFBF1, 0, 2 | DECOMP_COMPAT, 3644},
-	{0xFBF2, 0, 2 | DECOMP_COMPAT, 3646},
-	{0xFBF3, 0, 2 | DECOMP_COMPAT, 3648},
-	{0xFBF4, 0, 2 | DECOMP_COMPAT, 3650},
-	{0xFBF5, 0, 2 | DECOMP_COMPAT, 3652},
-	{0xFBF6, 0, 2 | DECOMP_COMPAT, 3654},
-	{0xFBF7, 0, 2 | DECOMP_COMPAT, 3656},
-	{0xFBF8, 0, 2 | DECOMP_COMPAT, 3658},
-	{0xFBF9, 0, 2 | DECOMP_COMPAT, 3660},
-	{0xFBFA, 0, 2 | DECOMP_COMPAT, 3662},
-	{0xFBFB, 0, 2 | DECOMP_COMPAT, 3664},
-	{0xFBFC, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x06CC},
-	{0xFBFD, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x06CC},
-	{0xFBFE, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x06CC},
-	{0xFBFF, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x06CC},
-	{0xFC00, 0, 2 | DECOMP_COMPAT, 3666},
-	{0xFC01, 0, 2 | DECOMP_COMPAT, 3668},
-	{0xFC02, 0, 2 | DECOMP_COMPAT, 3670},
-	{0xFC03, 0, 2 | DECOMP_COMPAT, 3672},
-	{0xFC04, 0, 2 | DECOMP_COMPAT, 3674},
-	{0xFC05, 0, 2 | DECOMP_COMPAT, 3676},
-	{0xFC06, 0, 2 | DECOMP_COMPAT, 3678},
-	{0xFC07, 0, 2 | DECOMP_COMPAT, 3680},
-	{0xFC08, 0, 2 | DECOMP_COMPAT, 3682},
-	{0xFC09, 0, 2 | DECOMP_COMPAT, 3684},
-	{0xFC0A, 0, 2 | DECOMP_COMPAT, 3686},
-	{0xFC0B, 0, 2 | DECOMP_COMPAT, 3688},
-	{0xFC0C, 0, 2 | DECOMP_COMPAT, 3690},
-	{0xFC0D, 0, 2 | DECOMP_COMPAT, 3692},
-	{0xFC0E, 0, 2 | DECOMP_COMPAT, 3694},
-	{0xFC0F, 0, 2 | DECOMP_COMPAT, 3696},
-	{0xFC10, 0, 2 | DECOMP_COMPAT, 3698},
-	{0xFC11, 0, 2 | DECOMP_COMPAT, 3700},
-	{0xFC12, 0, 2 | DECOMP_COMPAT, 3702},
-	{0xFC13, 0, 2 | DECOMP_COMPAT, 3704},
-	{0xFC14, 0, 2 | DECOMP_COMPAT, 3706},
-	{0xFC15, 0, 2 | DECOMP_COMPAT, 3708},
-	{0xFC16, 0, 2 | DECOMP_COMPAT, 3710},
-	{0xFC17, 0, 2 | DECOMP_COMPAT, 3712},
-	{0xFC18, 0, 2 | DECOMP_COMPAT, 3714},
-	{0xFC19, 0, 2 | DECOMP_COMPAT, 3716},
-	{0xFC1A, 0, 2 | DECOMP_COMPAT, 3718},
-	{0xFC1B, 0, 2 | DECOMP_COMPAT, 3720},
-	{0xFC1C, 0, 2 | DECOMP_COMPAT, 3722},
-	{0xFC1D, 0, 2 | DECOMP_COMPAT, 3724},
-	{0xFC1E, 0, 2 | DECOMP_COMPAT, 3726},
-	{0xFC1F, 0, 2 | DECOMP_COMPAT, 3728},
-	{0xFC20, 0, 2 | DECOMP_COMPAT, 3730},
-	{0xFC21, 0, 2 | DECOMP_COMPAT, 3732},
-	{0xFC22, 0, 2 | DECOMP_COMPAT, 3734},
-	{0xFC23, 0, 2 | DECOMP_COMPAT, 3736},
-	{0xFC24, 0, 2 | DECOMP_COMPAT, 3738},
-	{0xFC25, 0, 2 | DECOMP_COMPAT, 3740},
-	{0xFC26, 0, 2 | DECOMP_COMPAT, 3742},
-	{0xFC27, 0, 2 | DECOMP_COMPAT, 3744},
-	{0xFC28, 0, 2 | DECOMP_COMPAT, 3746},
-	{0xFC29, 0, 2 | DECOMP_COMPAT, 3748},
-	{0xFC2A, 0, 2 | DECOMP_COMPAT, 3750},
-	{0xFC2B, 0, 2 | DECOMP_COMPAT, 3752},
-	{0xFC2C, 0, 2 | DECOMP_COMPAT, 3754},
-	{0xFC2D, 0, 2 | DECOMP_COMPAT, 3756},
-	{0xFC2E, 0, 2 | DECOMP_COMPAT, 3758},
-	{0xFC2F, 0, 2 | DECOMP_COMPAT, 3760},
-	{0xFC30, 0, 2 | DECOMP_COMPAT, 3762},
-	{0xFC31, 0, 2 | DECOMP_COMPAT, 3764},
-	{0xFC32, 0, 2 | DECOMP_COMPAT, 3766},
-	{0xFC33, 0, 2 | DECOMP_COMPAT, 3768},
-	{0xFC34, 0, 2 | DECOMP_COMPAT, 3770},
-	{0xFC35, 0, 2 | DECOMP_COMPAT, 3772},
-	{0xFC36, 0, 2 | DECOMP_COMPAT, 3774},
-	{0xFC37, 0, 2 | DECOMP_COMPAT, 3776},
-	{0xFC38, 0, 2 | DECOMP_COMPAT, 3778},
-	{0xFC39, 0, 2 | DECOMP_COMPAT, 3780},
-	{0xFC3A, 0, 2 | DECOMP_COMPAT, 3782},
-	{0xFC3B, 0, 2 | DECOMP_COMPAT, 3784},
-	{0xFC3C, 0, 2 | DECOMP_COMPAT, 3786},
-	{0xFC3D, 0, 2 | DECOMP_COMPAT, 3788},
-	{0xFC3E, 0, 2 | DECOMP_COMPAT, 3790},
-	{0xFC3F, 0, 2 | DECOMP_COMPAT, 3792},
-	{0xFC40, 0, 2 | DECOMP_COMPAT, 3794},
-	{0xFC41, 0, 2 | DECOMP_COMPAT, 3796},
-	{0xFC42, 0, 2 | DECOMP_COMPAT, 3798},
-	{0xFC43, 0, 2 | DECOMP_COMPAT, 3800},
-	{0xFC44, 0, 2 | DECOMP_COMPAT, 3802},
-	{0xFC45, 0, 2 | DECOMP_COMPAT, 3804},
-	{0xFC46, 0, 2 | DECOMP_COMPAT, 3806},
-	{0xFC47, 0, 2 | DECOMP_COMPAT, 3808},
-	{0xFC48, 0, 2 | DECOMP_COMPAT, 3810},
-	{0xFC49, 0, 2 | DECOMP_COMPAT, 3812},
-	{0xFC4A, 0, 2 | DECOMP_COMPAT, 3814},
-	{0xFC4B, 0, 2 | DECOMP_COMPAT, 3816},
-	{0xFC4C, 0, 2 | DECOMP_COMPAT, 3818},
-	{0xFC4D, 0, 2 | DECOMP_COMPAT, 3820},
-	{0xFC4E, 0, 2 | DECOMP_COMPAT, 3822},
-	{0xFC4F, 0, 2 | DECOMP_COMPAT, 3824},
-	{0xFC50, 0, 2 | DECOMP_COMPAT, 3826},
-	{0xFC51, 0, 2 | DECOMP_COMPAT, 3828},
-	{0xFC52, 0, 2 | DECOMP_COMPAT, 3830},
-	{0xFC53, 0, 2 | DECOMP_COMPAT, 3832},
-	{0xFC54, 0, 2 | DECOMP_COMPAT, 3834},
-	{0xFC55, 0, 2 | DECOMP_COMPAT, 3836},
-	{0xFC56, 0, 2 | DECOMP_COMPAT, 3838},
-	{0xFC57, 0, 2 | DECOMP_COMPAT, 3840},
-	{0xFC58, 0, 2 | DECOMP_COMPAT, 3842},
-	{0xFC59, 0, 2 | DECOMP_COMPAT, 3844},
-	{0xFC5A, 0, 2 | DECOMP_COMPAT, 3846},
-	{0xFC5B, 0, 2 | DECOMP_COMPAT, 3848},
-	{0xFC5C, 0, 2 | DECOMP_COMPAT, 3850},
-	{0xFC5D, 0, 2 | DECOMP_COMPAT, 3852},
-	{0xFC5E, 0, 3 | DECOMP_COMPAT, 3854},
-	{0xFC5F, 0, 3 | DECOMP_COMPAT, 3857},
-	{0xFC60, 0, 3 | DECOMP_COMPAT, 3860},
-	{0xFC61, 0, 3 | DECOMP_COMPAT, 3863},
-	{0xFC62, 0, 3 | DECOMP_COMPAT, 3866},
-	{0xFC63, 0, 3 | DECOMP_COMPAT, 3869},
-	{0xFC64, 0, 2 | DECOMP_COMPAT, 3872},
-	{0xFC65, 0, 2 | DECOMP_COMPAT, 3874},
-	{0xFC66, 0, 2 | DECOMP_COMPAT, 3876},
-	{0xFC67, 0, 2 | DECOMP_COMPAT, 3878},
-	{0xFC68, 0, 2 | DECOMP_COMPAT, 3880},
-	{0xFC69, 0, 2 | DECOMP_COMPAT, 3882},
-	{0xFC6A, 0, 2 | DECOMP_COMPAT, 3884},
-	{0xFC6B, 0, 2 | DECOMP_COMPAT, 3886},
-	{0xFC6C, 0, 2 | DECOMP_COMPAT, 3888},
-	{0xFC6D, 0, 2 | DECOMP_COMPAT, 3890},
-	{0xFC6E, 0, 2 | DECOMP_COMPAT, 3892},
-	{0xFC6F, 0, 2 | DECOMP_COMPAT, 3894},
-	{0xFC70, 0, 2 | DECOMP_COMPAT, 3896},
-	{0xFC71, 0, 2 | DECOMP_COMPAT, 3898},
-	{0xFC72, 0, 2 | DECOMP_COMPAT, 3900},
-	{0xFC73, 0, 2 | DECOMP_COMPAT, 3902},
-	{0xFC74, 0, 2 | DECOMP_COMPAT, 3904},
-	{0xFC75, 0, 2 | DECOMP_COMPAT, 3906},
-	{0xFC76, 0, 2 | DECOMP_COMPAT, 3908},
-	{0xFC77, 0, 2 | DECOMP_COMPAT, 3910},
-	{0xFC78, 0, 2 | DECOMP_COMPAT, 3912},
-	{0xFC79, 0, 2 | DECOMP_COMPAT, 3914},
-	{0xFC7A, 0, 2 | DECOMP_COMPAT, 3916},
-	{0xFC7B, 0, 2 | DECOMP_COMPAT, 3918},
-	{0xFC7C, 0, 2 | DECOMP_COMPAT, 3920},
-	{0xFC7D, 0, 2 | DECOMP_COMPAT, 3922},
-	{0xFC7E, 0, 2 | DECOMP_COMPAT, 3924},
-	{0xFC7F, 0, 2 | DECOMP_COMPAT, 3926},
-	{0xFC80, 0, 2 | DECOMP_COMPAT, 3928},
-	{0xFC81, 0, 2 | DECOMP_COMPAT, 3930},
-	{0xFC82, 0, 2 | DECOMP_COMPAT, 3932},
-	{0xFC83, 0, 2 | DECOMP_COMPAT, 3934},
-	{0xFC84, 0, 2 | DECOMP_COMPAT, 3936},
-	{0xFC85, 0, 2 | DECOMP_COMPAT, 3938},
-	{0xFC86, 0, 2 | DECOMP_COMPAT, 3940},
-	{0xFC87, 0, 2 | DECOMP_COMPAT, 3942},
-	{0xFC88, 0, 2 | DECOMP_COMPAT, 3944},
-	{0xFC89, 0, 2 | DECOMP_COMPAT, 3946},
-	{0xFC8A, 0, 2 | DECOMP_COMPAT, 3948},
-	{0xFC8B, 0, 2 | DECOMP_COMPAT, 3950},
-	{0xFC8C, 0, 2 | DECOMP_COMPAT, 3952},
-	{0xFC8D, 0, 2 | DECOMP_COMPAT, 3954},
-	{0xFC8E, 0, 2 | DECOMP_COMPAT, 3956},
-	{0xFC8F, 0, 2 | DECOMP_COMPAT, 3958},
-	{0xFC90, 0, 2 | DECOMP_COMPAT, 3960},
-	{0xFC91, 0, 2 | DECOMP_COMPAT, 3962},
-	{0xFC92, 0, 2 | DECOMP_COMPAT, 3964},
-	{0xFC93, 0, 2 | DECOMP_COMPAT, 3966},
-	{0xFC94, 0, 2 | DECOMP_COMPAT, 3968},
-	{0xFC95, 0, 2 | DECOMP_COMPAT, 3970},
-	{0xFC96, 0, 2 | DECOMP_COMPAT, 3972},
-	{0xFC97, 0, 2 | DECOMP_COMPAT, 3974},
-	{0xFC98, 0, 2 | DECOMP_COMPAT, 3976},
-	{0xFC99, 0, 2 | DECOMP_COMPAT, 3978},
-	{0xFC9A, 0, 2 | DECOMP_COMPAT, 3980},
-	{0xFC9B, 0, 2 | DECOMP_COMPAT, 3982},
-	{0xFC9C, 0, 2 | DECOMP_COMPAT, 3984},
-	{0xFC9D, 0, 2 | DECOMP_COMPAT, 3986},
-	{0xFC9E, 0, 2 | DECOMP_COMPAT, 3988},
-	{0xFC9F, 0, 2 | DECOMP_COMPAT, 3990},
-	{0xFCA0, 0, 2 | DECOMP_COMPAT, 3992},
-	{0xFCA1, 0, 2 | DECOMP_COMPAT, 3994},
-	{0xFCA2, 0, 2 | DECOMP_COMPAT, 3996},
-	{0xFCA3, 0, 2 | DECOMP_COMPAT, 3998},
-	{0xFCA4, 0, 2 | DECOMP_COMPAT, 4000},
-	{0xFCA5, 0, 2 | DECOMP_COMPAT, 4002},
-	{0xFCA6, 0, 2 | DECOMP_COMPAT, 4004},
-	{0xFCA7, 0, 2 | DECOMP_COMPAT, 4006},
-	{0xFCA8, 0, 2 | DECOMP_COMPAT, 4008},
-	{0xFCA9, 0, 2 | DECOMP_COMPAT, 4010},
-	{0xFCAA, 0, 2 | DECOMP_COMPAT, 4012},
-	{0xFCAB, 0, 2 | DECOMP_COMPAT, 4014},
-	{0xFCAC, 0, 2 | DECOMP_COMPAT, 4016},
-	{0xFCAD, 0, 2 | DECOMP_COMPAT, 4018},
-	{0xFCAE, 0, 2 | DECOMP_COMPAT, 4020},
-	{0xFCAF, 0, 2 | DECOMP_COMPAT, 4022},
-	{0xFCB0, 0, 2 | DECOMP_COMPAT, 4024},
-	{0xFCB1, 0, 2 | DECOMP_COMPAT, 4026},
-	{0xFCB2, 0, 2 | DECOMP_COMPAT, 4028},
-	{0xFCB3, 0, 2 | DECOMP_COMPAT, 4030},
-	{0xFCB4, 0, 2 | DECOMP_COMPAT, 4032},
-	{0xFCB5, 0, 2 | DECOMP_COMPAT, 4034},
-	{0xFCB6, 0, 2 | DECOMP_COMPAT, 4036},
-	{0xFCB7, 0, 2 | DECOMP_COMPAT, 4038},
-	{0xFCB8, 0, 2 | DECOMP_COMPAT, 4040},
-	{0xFCB9, 0, 2 | DECOMP_COMPAT, 4042},
-	{0xFCBA, 0, 2 | DECOMP_COMPAT, 4044},
-	{0xFCBB, 0, 2 | DECOMP_COMPAT, 4046},
-	{0xFCBC, 0, 2 | DECOMP_COMPAT, 4048},
-	{0xFCBD, 0, 2 | DECOMP_COMPAT, 4050},
-	{0xFCBE, 0, 2 | DECOMP_COMPAT, 4052},
-	{0xFCBF, 0, 2 | DECOMP_COMPAT, 4054},
-	{0xFCC0, 0, 2 | DECOMP_COMPAT, 4056},
-	{0xFCC1, 0, 2 | DECOMP_COMPAT, 4058},
-	{0xFCC2, 0, 2 | DECOMP_COMPAT, 4060},
-	{0xFCC3, 0, 2 | DECOMP_COMPAT, 4062},
-	{0xFCC4, 0, 2 | DECOMP_COMPAT, 4064},
-	{0xFCC5, 0, 2 | DECOMP_COMPAT, 4066},
-	{0xFCC6, 0, 2 | DECOMP_COMPAT, 4068},
-	{0xFCC7, 0, 2 | DECOMP_COMPAT, 4070},
-	{0xFCC8, 0, 2 | DECOMP_COMPAT, 4072},
-	{0xFCC9, 0, 2 | DECOMP_COMPAT, 4074},
-	{0xFCCA, 0, 2 | DECOMP_COMPAT, 4076},
-	{0xFCCB, 0, 2 | DECOMP_COMPAT, 4078},
-	{0xFCCC, 0, 2 | DECOMP_COMPAT, 4080},
-	{0xFCCD, 0, 2 | DECOMP_COMPAT, 4082},
-	{0xFCCE, 0, 2 | DECOMP_COMPAT, 4084},
-	{0xFCCF, 0, 2 | DECOMP_COMPAT, 4086},
-	{0xFCD0, 0, 2 | DECOMP_COMPAT, 4088},
-	{0xFCD1, 0, 2 | DECOMP_COMPAT, 4090},
-	{0xFCD2, 0, 2 | DECOMP_COMPAT, 4092},
-	{0xFCD3, 0, 2 | DECOMP_COMPAT, 4094},
-	{0xFCD4, 0, 2 | DECOMP_COMPAT, 4096},
-	{0xFCD5, 0, 2 | DECOMP_COMPAT, 4098},
-	{0xFCD6, 0, 2 | DECOMP_COMPAT, 4100},
-	{0xFCD7, 0, 2 | DECOMP_COMPAT, 4102},
-	{0xFCD8, 0, 2 | DECOMP_COMPAT, 4104},
-	{0xFCD9, 0, 2 | DECOMP_COMPAT, 4106},
-	{0xFCDA, 0, 2 | DECOMP_COMPAT, 4108},
-	{0xFCDB, 0, 2 | DECOMP_COMPAT, 4110},
-	{0xFCDC, 0, 2 | DECOMP_COMPAT, 4112},
-	{0xFCDD, 0, 2 | DECOMP_COMPAT, 4114},
-	{0xFCDE, 0, 2 | DECOMP_COMPAT, 4116},
-	{0xFCDF, 0, 2 | DECOMP_COMPAT, 4118},
-	{0xFCE0, 0, 2 | DECOMP_COMPAT, 4120},
-	{0xFCE1, 0, 2 | DECOMP_COMPAT, 4122},
-	{0xFCE2, 0, 2 | DECOMP_COMPAT, 4124},
-	{0xFCE3, 0, 2 | DECOMP_COMPAT, 4126},
-	{0xFCE4, 0, 2 | DECOMP_COMPAT, 4128},
-	{0xFCE5, 0, 2 | DECOMP_COMPAT, 4130},
-	{0xFCE6, 0, 2 | DECOMP_COMPAT, 4132},
-	{0xFCE7, 0, 2 | DECOMP_COMPAT, 4134},
-	{0xFCE8, 0, 2 | DECOMP_COMPAT, 4136},
-	{0xFCE9, 0, 2 | DECOMP_COMPAT, 4138},
-	{0xFCEA, 0, 2 | DECOMP_COMPAT, 4140},
-	{0xFCEB, 0, 2 | DECOMP_COMPAT, 4142},
-	{0xFCEC, 0, 2 | DECOMP_COMPAT, 4144},
-	{0xFCED, 0, 2 | DECOMP_COMPAT, 4146},
-	{0xFCEE, 0, 2 | DECOMP_COMPAT, 4148},
-	{0xFCEF, 0, 2 | DECOMP_COMPAT, 4150},
-	{0xFCF0, 0, 2 | DECOMP_COMPAT, 4152},
-	{0xFCF1, 0, 2 | DECOMP_COMPAT, 4154},
-	{0xFCF2, 0, 3 | DECOMP_COMPAT, 4156},
-	{0xFCF3, 0, 3 | DECOMP_COMPAT, 4159},
-	{0xFCF4, 0, 3 | DECOMP_COMPAT, 4162},
-	{0xFCF5, 0, 2 | DECOMP_COMPAT, 4165},
-	{0xFCF6, 0, 2 | DECOMP_COMPAT, 4167},
-	{0xFCF7, 0, 2 | DECOMP_COMPAT, 4169},
-	{0xFCF8, 0, 2 | DECOMP_COMPAT, 4171},
-	{0xFCF9, 0, 2 | DECOMP_COMPAT, 4173},
-	{0xFCFA, 0, 2 | DECOMP_COMPAT, 4175},
-	{0xFCFB, 0, 2 | DECOMP_COMPAT, 4177},
-	{0xFCFC, 0, 2 | DECOMP_COMPAT, 4179},
-	{0xFCFD, 0, 2 | DECOMP_COMPAT, 4181},
-	{0xFCFE, 0, 2 | DECOMP_COMPAT, 4183},
-	{0xFCFF, 0, 2 | DECOMP_COMPAT, 4185},
-	{0xFD00, 0, 2 | DECOMP_COMPAT, 4187},
-	{0xFD01, 0, 2 | DECOMP_COMPAT, 4189},
-	{0xFD02, 0, 2 | DECOMP_COMPAT, 4191},
-	{0xFD03, 0, 2 | DECOMP_COMPAT, 4193},
-	{0xFD04, 0, 2 | DECOMP_COMPAT, 4195},
-	{0xFD05, 0, 2 | DECOMP_COMPAT, 4197},
-	{0xFD06, 0, 2 | DECOMP_COMPAT, 4199},
-	{0xFD07, 0, 2 | DECOMP_COMPAT, 4201},
-	{0xFD08, 0, 2 | DECOMP_COMPAT, 4203},
-	{0xFD09, 0, 2 | DECOMP_COMPAT, 4205},
-	{0xFD0A, 0, 2 | DECOMP_COMPAT, 4207},
-	{0xFD0B, 0, 2 | DECOMP_COMPAT, 4209},
-	{0xFD0C, 0, 2 | DECOMP_COMPAT, 4211},
-	{0xFD0D, 0, 2 | DECOMP_COMPAT, 4213},
-	{0xFD0E, 0, 2 | DECOMP_COMPAT, 4215},
-	{0xFD0F, 0, 2 | DECOMP_COMPAT, 4217},
-	{0xFD10, 0, 2 | DECOMP_COMPAT, 4219},
-	{0xFD11, 0, 2 | DECOMP_COMPAT, 4221},
-	{0xFD12, 0, 2 | DECOMP_COMPAT, 4223},
-	{0xFD13, 0, 2 | DECOMP_COMPAT, 4225},
-	{0xFD14, 0, 2 | DECOMP_COMPAT, 4227},
-	{0xFD15, 0, 2 | DECOMP_COMPAT, 4229},
-	{0xFD16, 0, 2 | DECOMP_COMPAT, 4231},
-	{0xFD17, 0, 2 | DECOMP_COMPAT, 4233},
-	{0xFD18, 0, 2 | DECOMP_COMPAT, 4235},
-	{0xFD19, 0, 2 | DECOMP_COMPAT, 4237},
-	{0xFD1A, 0, 2 | DECOMP_COMPAT, 4239},
-	{0xFD1B, 0, 2 | DECOMP_COMPAT, 4241},
-	{0xFD1C, 0, 2 | DECOMP_COMPAT, 4243},
-	{0xFD1D, 0, 2 | DECOMP_COMPAT, 4245},
-	{0xFD1E, 0, 2 | DECOMP_COMPAT, 4247},
-	{0xFD1F, 0, 2 | DECOMP_COMPAT, 4249},
-	{0xFD20, 0, 2 | DECOMP_COMPAT, 4251},
-	{0xFD21, 0, 2 | DECOMP_COMPAT, 4253},
-	{0xFD22, 0, 2 | DECOMP_COMPAT, 4255},
-	{0xFD23, 0, 2 | DECOMP_COMPAT, 4257},
-	{0xFD24, 0, 2 | DECOMP_COMPAT, 4259},
-	{0xFD25, 0, 2 | DECOMP_COMPAT, 4261},
-	{0xFD26, 0, 2 | DECOMP_COMPAT, 4263},
-	{0xFD27, 0, 2 | DECOMP_COMPAT, 4265},
-	{0xFD28, 0, 2 | DECOMP_COMPAT, 4267},
-	{0xFD29, 0, 2 | DECOMP_COMPAT, 4269},
-	{0xFD2A, 0, 2 | DECOMP_COMPAT, 4271},
-	{0xFD2B, 0, 2 | DECOMP_COMPAT, 4273},
-	{0xFD2C, 0, 2 | DECOMP_COMPAT, 4275},
-	{0xFD2D, 0, 2 | DECOMP_COMPAT, 4277},
-	{0xFD2E, 0, 2 | DECOMP_COMPAT, 4279},
-	{0xFD2F, 0, 2 | DECOMP_COMPAT, 4281},
-	{0xFD30, 0, 2 | DECOMP_COMPAT, 4283},
-	{0xFD31, 0, 2 | DECOMP_COMPAT, 4285},
-	{0xFD32, 0, 2 | DECOMP_COMPAT, 4287},
-	{0xFD33, 0, 2 | DECOMP_COMPAT, 4289},
-	{0xFD34, 0, 2 | DECOMP_COMPAT, 4291},
-	{0xFD35, 0, 2 | DECOMP_COMPAT, 4293},
-	{0xFD36, 0, 2 | DECOMP_COMPAT, 4295},
-	{0xFD37, 0, 2 | DECOMP_COMPAT, 4297},
-	{0xFD38, 0, 2 | DECOMP_COMPAT, 4299},
-	{0xFD39, 0, 2 | DECOMP_COMPAT, 4301},
-	{0xFD3A, 0, 2 | DECOMP_COMPAT, 4303},
-	{0xFD3B, 0, 2 | DECOMP_COMPAT, 4305},
-	{0xFD3C, 0, 2 | DECOMP_COMPAT, 4307},
-	{0xFD3D, 0, 2 | DECOMP_COMPAT, 4309},
-	{0xFD50, 0, 3 | DECOMP_COMPAT, 4311},
-	{0xFD51, 0, 3 | DECOMP_COMPAT, 4314},
-	{0xFD52, 0, 3 | DECOMP_COMPAT, 4317},
-	{0xFD53, 0, 3 | DECOMP_COMPAT, 4320},
-	{0xFD54, 0, 3 | DECOMP_COMPAT, 4323},
-	{0xFD55, 0, 3 | DECOMP_COMPAT, 4326},
-	{0xFD56, 0, 3 | DECOMP_COMPAT, 4329},
-	{0xFD57, 0, 3 | DECOMP_COMPAT, 4332},
-	{0xFD58, 0, 3 | DECOMP_COMPAT, 4335},
-	{0xFD59, 0, 3 | DECOMP_COMPAT, 4338},
-	{0xFD5A, 0, 3 | DECOMP_COMPAT, 4341},
-	{0xFD5B, 0, 3 | DECOMP_COMPAT, 4344},
-	{0xFD5C, 0, 3 | DECOMP_COMPAT, 4347},
-	{0xFD5D, 0, 3 | DECOMP_COMPAT, 4350},
-	{0xFD5E, 0, 3 | DECOMP_COMPAT, 4353},
-	{0xFD5F, 0, 3 | DECOMP_COMPAT, 4356},
-	{0xFD60, 0, 3 | DECOMP_COMPAT, 4359},
-	{0xFD61, 0, 3 | DECOMP_COMPAT, 4362},
-	{0xFD62, 0, 3 | DECOMP_COMPAT, 4365},
-	{0xFD63, 0, 3 | DECOMP_COMPAT, 4368},
-	{0xFD64, 0, 3 | DECOMP_COMPAT, 4371},
-	{0xFD65, 0, 3 | DECOMP_COMPAT, 4374},
-	{0xFD66, 0, 3 | DECOMP_COMPAT, 4377},
-	{0xFD67, 0, 3 | DECOMP_COMPAT, 4380},
-	{0xFD68, 0, 3 | DECOMP_COMPAT, 4383},
-	{0xFD69, 0, 3 | DECOMP_COMPAT, 4386},
-	{0xFD6A, 0, 3 | DECOMP_COMPAT, 4389},
-	{0xFD6B, 0, 3 | DECOMP_COMPAT, 4392},
-	{0xFD6C, 0, 3 | DECOMP_COMPAT, 4395},
-	{0xFD6D, 0, 3 | DECOMP_COMPAT, 4398},
-	{0xFD6E, 0, 3 | DECOMP_COMPAT, 4401},
-	{0xFD6F, 0, 3 | DECOMP_COMPAT, 4404},
-	{0xFD70, 0, 3 | DECOMP_COMPAT, 4407},
-	{0xFD71, 0, 3 | DECOMP_COMPAT, 4410},
-	{0xFD72, 0, 3 | DECOMP_COMPAT, 4413},
-	{0xFD73, 0, 3 | DECOMP_COMPAT, 4416},
-	{0xFD74, 0, 3 | DECOMP_COMPAT, 4419},
-	{0xFD75, 0, 3 | DECOMP_COMPAT, 4422},
-	{0xFD76, 0, 3 | DECOMP_COMPAT, 4425},
-	{0xFD77, 0, 3 | DECOMP_COMPAT, 4428},
-	{0xFD78, 0, 3 | DECOMP_COMPAT, 4431},
-	{0xFD79, 0, 3 | DECOMP_COMPAT, 4434},
-	{0xFD7A, 0, 3 | DECOMP_COMPAT, 4437},
-	{0xFD7B, 0, 3 | DECOMP_COMPAT, 4440},
-	{0xFD7C, 0, 3 | DECOMP_COMPAT, 4443},
-	{0xFD7D, 0, 3 | DECOMP_COMPAT, 4446},
-	{0xFD7E, 0, 3 | DECOMP_COMPAT, 4449},
-	{0xFD7F, 0, 3 | DECOMP_COMPAT, 4452},
-	{0xFD80, 0, 3 | DECOMP_COMPAT, 4455},
-	{0xFD81, 0, 3 | DECOMP_COMPAT, 4458},
-	{0xFD82, 0, 3 | DECOMP_COMPAT, 4461},
-	{0xFD83, 0, 3 | DECOMP_COMPAT, 4464},
-	{0xFD84, 0, 3 | DECOMP_COMPAT, 4467},
-	{0xFD85, 0, 3 | DECOMP_COMPAT, 4470},
-	{0xFD86, 0, 3 | DECOMP_COMPAT, 4473},
-	{0xFD87, 0, 3 | DECOMP_COMPAT, 4476},
-	{0xFD88, 0, 3 | DECOMP_COMPAT, 4479},
-	{0xFD89, 0, 3 | DECOMP_COMPAT, 4482},
-	{0xFD8A, 0, 3 | DECOMP_COMPAT, 4485},
-	{0xFD8B, 0, 3 | DECOMP_COMPAT, 4488},
-	{0xFD8C, 0, 3 | DECOMP_COMPAT, 4491},
-	{0xFD8D, 0, 3 | DECOMP_COMPAT, 4494},
-	{0xFD8E, 0, 3 | DECOMP_COMPAT, 4497},
-	{0xFD8F, 0, 3 | DECOMP_COMPAT, 4500},
-	{0xFD92, 0, 3 | DECOMP_COMPAT, 4503},
-	{0xFD93, 0, 3 | DECOMP_COMPAT, 4506},
-	{0xFD94, 0, 3 | DECOMP_COMPAT, 4509},
-	{0xFD95, 0, 3 | DECOMP_COMPAT, 4512},
-	{0xFD96, 0, 3 | DECOMP_COMPAT, 4515},
-	{0xFD97, 0, 3 | DECOMP_COMPAT, 4518},
-	{0xFD98, 0, 3 | DECOMP_COMPAT, 4521},
-	{0xFD99, 0, 3 | DECOMP_COMPAT, 4524},
-	{0xFD9A, 0, 3 | DECOMP_COMPAT, 4527},
-	{0xFD9B, 0, 3 | DECOMP_COMPAT, 4530},
-	{0xFD9C, 0, 3 | DECOMP_COMPAT, 4533},
-	{0xFD9D, 0, 3 | DECOMP_COMPAT, 4536},
-	{0xFD9E, 0, 3 | DECOMP_COMPAT, 4539},
-	{0xFD9F, 0, 3 | DECOMP_COMPAT, 4542},
-	{0xFDA0, 0, 3 | DECOMP_COMPAT, 4545},
-	{0xFDA1, 0, 3 | DECOMP_COMPAT, 4548},
-	{0xFDA2, 0, 3 | DECOMP_COMPAT, 4551},
-	{0xFDA3, 0, 3 | DECOMP_COMPAT, 4554},
-	{0xFDA4, 0, 3 | DECOMP_COMPAT, 4557},
-	{0xFDA5, 0, 3 | DECOMP_COMPAT, 4560},
-	{0xFDA6, 0, 3 | DECOMP_COMPAT, 4563},
-	{0xFDA7, 0, 3 | DECOMP_COMPAT, 4566},
-	{0xFDA8, 0, 3 | DECOMP_COMPAT, 4569},
-	{0xFDA9, 0, 3 | DECOMP_COMPAT, 4572},
-	{0xFDAA, 0, 3 | DECOMP_COMPAT, 4575},
-	{0xFDAB, 0, 3 | DECOMP_COMPAT, 4578},
-	{0xFDAC, 0, 3 | DECOMP_COMPAT, 4581},
-	{0xFDAD, 0, 3 | DECOMP_COMPAT, 4584},
-	{0xFDAE, 0, 3 | DECOMP_COMPAT, 4587},
-	{0xFDAF, 0, 3 | DECOMP_COMPAT, 4590},
-	{0xFDB0, 0, 3 | DECOMP_COMPAT, 4593},
-	{0xFDB1, 0, 3 | DECOMP_COMPAT, 4596},
-	{0xFDB2, 0, 3 | DECOMP_COMPAT, 4599},
-	{0xFDB3, 0, 3 | DECOMP_COMPAT, 4602},
-	{0xFDB4, 0, 3 | DECOMP_COMPAT, 4605},
-	{0xFDB5, 0, 3 | DECOMP_COMPAT, 4608},
-	{0xFDB6, 0, 3 | DECOMP_COMPAT, 4611},
-	{0xFDB7, 0, 3 | DECOMP_COMPAT, 4614},
-	{0xFDB8, 0, 3 | DECOMP_COMPAT, 4617},
-	{0xFDB9, 0, 3 | DECOMP_COMPAT, 4620},
-	{0xFDBA, 0, 3 | DECOMP_COMPAT, 4623},
-	{0xFDBB, 0, 3 | DECOMP_COMPAT, 4626},
-	{0xFDBC, 0, 3 | DECOMP_COMPAT, 4629},
-	{0xFDBD, 0, 3 | DECOMP_COMPAT, 4632},
-	{0xFDBE, 0, 3 | DECOMP_COMPAT, 4635},
-	{0xFDBF, 0, 3 | DECOMP_COMPAT, 4638},
-	{0xFDC0, 0, 3 | DECOMP_COMPAT, 4641},
-	{0xFDC1, 0, 3 | DECOMP_COMPAT, 4644},
-	{0xFDC2, 0, 3 | DECOMP_COMPAT, 4647},
-	{0xFDC3, 0, 3 | DECOMP_COMPAT, 4650},
-	{0xFDC4, 0, 3 | DECOMP_COMPAT, 4653},
-	{0xFDC5, 0, 3 | DECOMP_COMPAT, 4656},
-	{0xFDC6, 0, 3 | DECOMP_COMPAT, 4659},
-	{0xFDC7, 0, 3 | DECOMP_COMPAT, 4662},
-	{0xFDF0, 0, 3 | DECOMP_COMPAT, 4665},
-	{0xFDF1, 0, 3 | DECOMP_COMPAT, 4668},
-	{0xFDF2, 0, 4 | DECOMP_COMPAT, 4671},
-	{0xFDF3, 0, 4 | DECOMP_COMPAT, 4675},
-	{0xFDF4, 0, 4 | DECOMP_COMPAT, 4679},
-	{0xFDF5, 0, 4 | DECOMP_COMPAT, 4683},
-	{0xFDF6, 0, 4 | DECOMP_COMPAT, 4687},
-	{0xFDF7, 0, 4 | DECOMP_COMPAT, 4691},
-	{0xFDF8, 0, 4 | DECOMP_COMPAT, 4695},
-	{0xFDF9, 0, 3 | DECOMP_COMPAT, 4699},
-	{0xFDFA, 0, 18 | DECOMP_COMPAT, 4702},
-	{0xFDFB, 0, 8 | DECOMP_COMPAT, 4720},
-	{0xFDFC, 0, 4 | DECOMP_COMPAT, 4728},
-	{0xFE10, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x002C},
-	{0xFE11, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x3001},
-	{0xFE12, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x3002},
-	{0xFE13, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x003A},
-	{0xFE14, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x003B},
-	{0xFE15, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0021},
-	{0xFE16, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x003F},
-	{0xFE17, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x3016},
-	{0xFE18, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x3017},
-	{0xFE19, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x2026},
-	{0xFE20, 230, 0, 0},
-	{0xFE21, 230, 0, 0},
-	{0xFE22, 230, 0, 0},
-	{0xFE23, 230, 0, 0},
-	{0xFE24, 230, 0, 0},
-	{0xFE25, 230, 0, 0},
-	{0xFE26, 230, 0, 0},
-	{0xFE27, 220, 0, 0},
-	{0xFE28, 220, 0, 0},
-	{0xFE29, 220, 0, 0},
-	{0xFE2A, 220, 0, 0},
-	{0xFE2B, 220, 0, 0},
-	{0xFE2C, 220, 0, 0},
-	{0xFE2D, 220, 0, 0},
-	{0xFE2E, 230, 0, 0},
-	{0xFE2F, 230, 0, 0},
-	{0xFE30, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x2025},
-	{0xFE31, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x2014},
-	{0xFE32, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x2013},
-	{0xFE33, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x005F},
-	{0xFE34, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x005F},
-	{0xFE35, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0028},
-	{0xFE36, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0029},
-	{0xFE37, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x007B},
-	{0xFE38, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x007D},
-	{0xFE39, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x3014},
-	{0xFE3A, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x3015},
-	{0xFE3B, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x3010},
-	{0xFE3C, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x3011},
-	{0xFE3D, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x300A},
-	{0xFE3E, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x300B},
-	{0xFE3F, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x3008},
-	{0xFE40, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x3009},
-	{0xFE41, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x300C},
-	{0xFE42, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x300D},
-	{0xFE43, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x300E},
-	{0xFE44, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x300F},
-	{0xFE47, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x005B},
-	{0xFE48, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x005D},
-	{0xFE49, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x203E},
-	{0xFE4A, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x203E},
-	{0xFE4B, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x203E},
-	{0xFE4C, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x203E},
-	{0xFE4D, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x005F},
-	{0xFE4E, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x005F},
-	{0xFE4F, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x005F},
-	{0xFE50, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x002C},
-	{0xFE51, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x3001},
-	{0xFE52, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x002E},
-	{0xFE54, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x003B},
-	{0xFE55, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x003A},
-	{0xFE56, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x003F},
-	{0xFE57, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0021},
-	{0xFE58, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x2014},
-	{0xFE59, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0028},
-	{0xFE5A, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0029},
-	{0xFE5B, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x007B},
-	{0xFE5C, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x007D},
-	{0xFE5D, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x3014},
-	{0xFE5E, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x3015},
-	{0xFE5F, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0023},
-	{0xFE60, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0026},
-	{0xFE61, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x002A},
-	{0xFE62, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x002B},
-	{0xFE63, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x002D},
-	{0xFE64, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x003C},
-	{0xFE65, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x003E},
-	{0xFE66, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x003D},
-	{0xFE68, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x005C},
-	{0xFE69, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0024},
-	{0xFE6A, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0025},
-	{0xFE6B, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0040},
-	{0xFE70, 0, 2 | DECOMP_COMPAT, 4732},
-	{0xFE71, 0, 2 | DECOMP_COMPAT, 4734},
-	{0xFE72, 0, 2 | DECOMP_COMPAT, 4736},
-	{0xFE74, 0, 2 | DECOMP_COMPAT, 4738},
-	{0xFE76, 0, 2 | DECOMP_COMPAT, 4740},
-	{0xFE77, 0, 2 | DECOMP_COMPAT, 4742},
-	{0xFE78, 0, 2 | DECOMP_COMPAT, 4744},
-	{0xFE79, 0, 2 | DECOMP_COMPAT, 4746},
-	{0xFE7A, 0, 2 | DECOMP_COMPAT, 4748},
-	{0xFE7B, 0, 2 | DECOMP_COMPAT, 4750},
-	{0xFE7C, 0, 2 | DECOMP_COMPAT, 4752},
-	{0xFE7D, 0, 2 | DECOMP_COMPAT, 4754},
-	{0xFE7E, 0, 2 | DECOMP_COMPAT, 4756},
-	{0xFE7F, 0, 2 | DECOMP_COMPAT, 4758},
-	{0xFE80, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0621},
-	{0xFE81, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0622},
-	{0xFE82, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0622},
-	{0xFE83, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0623},
-	{0xFE84, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0623},
-	{0xFE85, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0624},
-	{0xFE86, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0624},
-	{0xFE87, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0625},
-	{0xFE88, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0625},
-	{0xFE89, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0626},
-	{0xFE8A, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0626},
-	{0xFE8B, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0626},
-	{0xFE8C, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0626},
-	{0xFE8D, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0627},
-	{0xFE8E, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0627},
-	{0xFE8F, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0628},
-	{0xFE90, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0628},
-	{0xFE91, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0628},
-	{0xFE92, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0628},
-	{0xFE93, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0629},
-	{0xFE94, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0629},
-	{0xFE95, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x062A},
-	{0xFE96, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x062A},
-	{0xFE97, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x062A},
-	{0xFE98, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x062A},
-	{0xFE99, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x062B},
-	{0xFE9A, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x062B},
-	{0xFE9B, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x062B},
-	{0xFE9C, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x062B},
-	{0xFE9D, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x062C},
-	{0xFE9E, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x062C},
-	{0xFE9F, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x062C},
-	{0xFEA0, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x062C},
-	{0xFEA1, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x062D},
-	{0xFEA2, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x062D},
-	{0xFEA3, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x062D},
-	{0xFEA4, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x062D},
-	{0xFEA5, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x062E},
-	{0xFEA6, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x062E},
-	{0xFEA7, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x062E},
-	{0xFEA8, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x062E},
-	{0xFEA9, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x062F},
-	{0xFEAA, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x062F},
-	{0xFEAB, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0630},
-	{0xFEAC, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0630},
-	{0xFEAD, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0631},
-	{0xFEAE, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0631},
-	{0xFEAF, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0632},
-	{0xFEB0, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0632},
-	{0xFEB1, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0633},
-	{0xFEB2, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0633},
-	{0xFEB3, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0633},
-	{0xFEB4, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0633},
-	{0xFEB5, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0634},
-	{0xFEB6, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0634},
-	{0xFEB7, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0634},
-	{0xFEB8, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0634},
-	{0xFEB9, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0635},
-	{0xFEBA, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0635},
-	{0xFEBB, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0635},
-	{0xFEBC, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0635},
-	{0xFEBD, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0636},
-	{0xFEBE, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0636},
-	{0xFEBF, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0636},
-	{0xFEC0, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0636},
-	{0xFEC1, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0637},
-	{0xFEC2, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0637},
-	{0xFEC3, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0637},
-	{0xFEC4, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0637},
-	{0xFEC5, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0638},
-	{0xFEC6, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0638},
-	{0xFEC7, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0638},
-	{0xFEC8, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0638},
-	{0xFEC9, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0639},
-	{0xFECA, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0639},
-	{0xFECB, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0639},
-	{0xFECC, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0639},
-	{0xFECD, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x063A},
-	{0xFECE, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x063A},
-	{0xFECF, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x063A},
-	{0xFED0, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x063A},
-	{0xFED1, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0641},
-	{0xFED2, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0641},
-	{0xFED3, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0641},
-	{0xFED4, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0641},
-	{0xFED5, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0642},
-	{0xFED6, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0642},
-	{0xFED7, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0642},
-	{0xFED8, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0642},
-	{0xFED9, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0643},
-	{0xFEDA, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0643},
-	{0xFEDB, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0643},
-	{0xFEDC, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0643},
-	{0xFEDD, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0644},
-	{0xFEDE, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0644},
-	{0xFEDF, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0644},
-	{0xFEE0, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0644},
-	{0xFEE1, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0645},
-	{0xFEE2, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0645},
-	{0xFEE3, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0645},
-	{0xFEE4, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0645},
-	{0xFEE5, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0646},
-	{0xFEE6, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0646},
-	{0xFEE7, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0646},
-	{0xFEE8, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0646},
-	{0xFEE9, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0647},
-	{0xFEEA, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0647},
-	{0xFEEB, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0647},
-	{0xFEEC, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0647},
-	{0xFEED, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0648},
-	{0xFEEE, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0648},
-	{0xFEEF, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0649},
-	{0xFEF0, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0649},
-	{0xFEF1, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x064A},
-	{0xFEF2, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x064A},
-	{0xFEF3, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x064A},
-	{0xFEF4, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x064A},
-	{0xFEF5, 0, 2 | DECOMP_COMPAT, 4760},
-	{0xFEF6, 0, 2 | DECOMP_COMPAT, 4762},
-	{0xFEF7, 0, 2 | DECOMP_COMPAT, 4764},
-	{0xFEF8, 0, 2 | DECOMP_COMPAT, 4766},
-	{0xFEF9, 0, 2 | DECOMP_COMPAT, 4768},
-	{0xFEFA, 0, 2 | DECOMP_COMPAT, 4770},
-	{0xFEFB, 0, 2 | DECOMP_COMPAT, 4772},
-	{0xFEFC, 0, 2 | DECOMP_COMPAT, 4774},
-	{0xFF01, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0021},
-	{0xFF02, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0022},
-	{0xFF03, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0023},
-	{0xFF04, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0024},
-	{0xFF05, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0025},
-	{0xFF06, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0026},
-	{0xFF07, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0027},
-	{0xFF08, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0028},
-	{0xFF09, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0029},
-	{0xFF0A, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x002A},
-	{0xFF0B, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x002B},
-	{0xFF0C, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x002C},
-	{0xFF0D, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x002D},
-	{0xFF0E, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x002E},
-	{0xFF0F, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x002F},
-	{0xFF10, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0030},
-	{0xFF11, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0031},
-	{0xFF12, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0032},
-	{0xFF13, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0033},
-	{0xFF14, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0034},
-	{0xFF15, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0035},
-	{0xFF16, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0036},
-	{0xFF17, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0037},
-	{0xFF18, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0038},
-	{0xFF19, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0039},
-	{0xFF1A, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x003A},
-	{0xFF1B, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x003B},
-	{0xFF1C, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x003C},
-	{0xFF1D, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x003D},
-	{0xFF1E, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x003E},
-	{0xFF1F, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x003F},
-	{0xFF20, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0040},
-	{0xFF21, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0041},
-	{0xFF22, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0042},
-	{0xFF23, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0043},
-	{0xFF24, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0044},
-	{0xFF25, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0045},
-	{0xFF26, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0046},
-	{0xFF27, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0047},
-	{0xFF28, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0048},
-	{0xFF29, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0049},
-	{0xFF2A, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x004A},
-	{0xFF2B, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x004B},
-	{0xFF2C, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x004C},
-	{0xFF2D, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x004D},
-	{0xFF2E, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x004E},
-	{0xFF2F, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x004F},
-	{0xFF30, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0050},
-	{0xFF31, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0051},
-	{0xFF32, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0052},
-	{0xFF33, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0053},
-	{0xFF34, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0054},
-	{0xFF35, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0055},
-	{0xFF36, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0056},
-	{0xFF37, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0057},
-	{0xFF38, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0058},
-	{0xFF39, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0059},
-	{0xFF3A, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x005A},
-	{0xFF3B, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x005B},
-	{0xFF3C, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x005C},
-	{0xFF3D, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x005D},
-	{0xFF3E, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x005E},
-	{0xFF3F, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x005F},
-	{0xFF40, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0060},
-	{0xFF41, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0061},
-	{0xFF42, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0062},
-	{0xFF43, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0063},
-	{0xFF44, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0064},
-	{0xFF45, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0065},
-	{0xFF46, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0066},
-	{0xFF47, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0067},
-	{0xFF48, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0068},
-	{0xFF49, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0069},
-	{0xFF4A, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x006A},
-	{0xFF4B, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x006B},
-	{0xFF4C, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x006C},
-	{0xFF4D, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x006D},
-	{0xFF4E, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x006E},
-	{0xFF4F, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x006F},
-	{0xFF50, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0070},
-	{0xFF51, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0071},
-	{0xFF52, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0072},
-	{0xFF53, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0073},
-	{0xFF54, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0074},
-	{0xFF55, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0075},
-	{0xFF56, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0076},
-	{0xFF57, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0077},
-	{0xFF58, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0078},
-	{0xFF59, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0079},
-	{0xFF5A, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x007A},
-	{0xFF5B, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x007B},
-	{0xFF5C, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x007C},
-	{0xFF5D, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x007D},
-	{0xFF5E, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x007E},
-	{0xFF5F, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x2985},
-	{0xFF60, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x2986},
-	{0xFF61, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x3002},
-	{0xFF62, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x300C},
-	{0xFF63, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x300D},
-	{0xFF64, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x3001},
-	{0xFF65, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x30FB},
-	{0xFF66, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x30F2},
-	{0xFF67, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x30A1},
-	{0xFF68, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x30A3},
-	{0xFF69, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x30A5},
-	{0xFF6A, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x30A7},
-	{0xFF6B, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x30A9},
-	{0xFF6C, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x30E3},
-	{0xFF6D, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x30E5},
-	{0xFF6E, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x30E7},
-	{0xFF6F, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x30C3},
-	{0xFF70, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x30FC},
-	{0xFF71, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x30A2},
-	{0xFF72, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x30A4},
-	{0xFF73, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x30A6},
-	{0xFF74, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x30A8},
-	{0xFF75, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x30AA},
-	{0xFF76, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x30AB},
-	{0xFF77, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x30AD},
-	{0xFF78, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x30AF},
-	{0xFF79, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x30B1},
-	{0xFF7A, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x30B3},
-	{0xFF7B, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x30B5},
-	{0xFF7C, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x30B7},
-	{0xFF7D, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x30B9},
-	{0xFF7E, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x30BB},
-	{0xFF7F, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x30BD},
-	{0xFF80, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x30BF},
-	{0xFF81, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x30C1},
-	{0xFF82, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x30C4},
-	{0xFF83, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x30C6},
-	{0xFF84, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x30C8},
-	{0xFF85, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x30CA},
-	{0xFF86, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x30CB},
-	{0xFF87, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x30CC},
-	{0xFF88, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x30CD},
-	{0xFF89, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x30CE},
-	{0xFF8A, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x30CF},
-	{0xFF8B, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x30D2},
-	{0xFF8C, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x30D5},
-	{0xFF8D, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x30D8},
-	{0xFF8E, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x30DB},
-	{0xFF8F, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x30DE},
-	{0xFF90, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x30DF},
-	{0xFF91, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x30E0},
-	{0xFF92, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x30E1},
-	{0xFF93, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x30E2},
-	{0xFF94, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x30E4},
-	{0xFF95, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x30E6},
-	{0xFF96, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x30E8},
-	{0xFF97, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x30E9},
-	{0xFF98, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x30EA},
-	{0xFF99, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x30EB},
-	{0xFF9A, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x30EC},
-	{0xFF9B, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x30ED},
-	{0xFF9C, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x30EF},
-	{0xFF9D, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x30F3},
-	{0xFF9E, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x3099},
-	{0xFF9F, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x309A},
-	{0xFFA0, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x3164},
-	{0xFFA1, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x3131},
-	{0xFFA2, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x3132},
-	{0xFFA3, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x3133},
-	{0xFFA4, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x3134},
-	{0xFFA5, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x3135},
-	{0xFFA6, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x3136},
-	{0xFFA7, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x3137},
-	{0xFFA8, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x3138},
-	{0xFFA9, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x3139},
-	{0xFFAA, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x313A},
-	{0xFFAB, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x313B},
-	{0xFFAC, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x313C},
-	{0xFFAD, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x313D},
-	{0xFFAE, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x313E},
-	{0xFFAF, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x313F},
-	{0xFFB0, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x3140},
-	{0xFFB1, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x3141},
-	{0xFFB2, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x3142},
-	{0xFFB3, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x3143},
-	{0xFFB4, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x3144},
-	{0xFFB5, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x3145},
-	{0xFFB6, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x3146},
-	{0xFFB7, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x3147},
-	{0xFFB8, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x3148},
-	{0xFFB9, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x3149},
-	{0xFFBA, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x314A},
-	{0xFFBB, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x314B},
-	{0xFFBC, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x314C},
-	{0xFFBD, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x314D},
-	{0xFFBE, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x314E},
-	{0xFFC2, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x314F},
-	{0xFFC3, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x3150},
-	{0xFFC4, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x3151},
-	{0xFFC5, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x3152},
-	{0xFFC6, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x3153},
-	{0xFFC7, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x3154},
-	{0xFFCA, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x3155},
-	{0xFFCB, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x3156},
-	{0xFFCC, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x3157},
-	{0xFFCD, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x3158},
-	{0xFFCE, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x3159},
-	{0xFFCF, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x315A},
-	{0xFFD2, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x315B},
-	{0xFFD3, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x315C},
-	{0xFFD4, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x315D},
-	{0xFFD5, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x315E},
-	{0xFFD6, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x315F},
-	{0xFFD7, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x3160},
-	{0xFFDA, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x3161},
-	{0xFFDB, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x3162},
-	{0xFFDC, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x3163},
-	{0xFFE0, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x00A2},
-	{0xFFE1, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x00A3},
-	{0xFFE2, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x00AC},
-	{0xFFE3, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x00AF},
-	{0xFFE4, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x00A6},
-	{0xFFE5, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x00A5},
-	{0xFFE6, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x20A9},
-	{0xFFE8, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x2502},
-	{0xFFE9, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x2190},
-	{0xFFEA, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x2191},
-	{0xFFEB, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x2192},
-	{0xFFEC, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x2193},
-	{0xFFED, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x25A0},
-	{0xFFEE, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x25CB},
-	{0x101FD, 220, 0, 0},
-	{0x102E0, 220, 0, 0},
-	{0x10376, 230, 0, 0},
-	{0x10377, 230, 0, 0},
-	{0x10378, 230, 0, 0},
-	{0x10379, 230, 0, 0},
-	{0x1037A, 230, 0, 0},
-	{0x10781, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x02D0},
-	{0x10782, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x02D1},
-	{0x10783, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x00E6},
-	{0x10784, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0299},
-	{0x10785, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0253},
-	{0x10787, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x02A3},
-	{0x10788, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0xAB66},
-	{0x10789, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x02A5},
-	{0x1078A, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x02A4},
-	{0x1078B, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0256},
-	{0x1078C, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0257},
-	{0x1078D, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x1D91},
-	{0x1078E, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0258},
-	{0x1078F, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x025E},
-	{0x10790, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x02A9},
-	{0x10791, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0264},
-	{0x10792, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0262},
-	{0x10793, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0260},
-	{0x10794, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x029B},
-	{0x10795, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0127},
-	{0x10796, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x029C},
-	{0x10797, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0267},
-	{0x10798, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0284},
-	{0x10799, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x02AA},
-	{0x1079A, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x02AB},
-	{0x1079B, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x026C},
-	{0x1079C, 0, 1 | DECOMP_COMPAT, 4776},
-	{0x1079D, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0xA78E},
-	{0x1079E, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x026E},
-	{0x1079F, 0, 1 | DECOMP_COMPAT, 4777},
-	{0x107A0, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x028E},
-	{0x107A1, 0, 1 | DECOMP_COMPAT, 4778},
-	{0x107A2, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x00F8},
-	{0x107A3, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0276},
-	{0x107A4, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0277},
-	{0x107A5, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0071},
-	{0x107A6, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x027A},
-	{0x107A7, 0, 1 | DECOMP_COMPAT, 4779},
-	{0x107A8, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x027D},
-	{0x107A9, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x027E},
-	{0x107AA, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0280},
-	{0x107AB, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x02A8},
-	{0x107AC, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x02A6},
-	{0x107AD, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0xAB67},
-	{0x107AE, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x02A7},
-	{0x107AF, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0288},
-	{0x107B0, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x2C71},
-	{0x107B2, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x028F},
-	{0x107B3, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x02A1},
-	{0x107B4, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x02A2},
-	{0x107B5, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0298},
-	{0x107B6, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x01C0},
-	{0x107B7, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x01C1},
-	{0x107B8, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x01C2},
-	{0x107B9, 0, 1 | DECOMP_COMPAT, 4780},
-	{0x107BA, 0, 1 | DECOMP_COMPAT, 4781},
-	{0x10A0D, 220, 0, 0},
-	{0x10A0F, 230, 0, 0},
-	{0x10A38, 230, 0, 0},
-	{0x10A39, 1, 0, 0},
-	{0x10A3A, 220, 0, 0},
-	{0x10A3F, 9, 0, 0},
-	{0x10AE5, 230, 0, 0},
-	{0x10AE6, 220, 0, 0},
-	{0x10D24, 230, 0, 0},
-	{0x10D25, 230, 0, 0},
-	{0x10D26, 230, 0, 0},
-	{0x10D27, 230, 0, 0},
-	{0x10EAB, 230, 0, 0},
-	{0x10EAC, 230, 0, 0},
-	{0x10EFD, 220, 0, 0},
-	{0x10EFE, 220, 0, 0},
-	{0x10EFF, 220, 0, 0},
-	{0x10F46, 220, 0, 0},
-	{0x10F47, 220, 0, 0},
-	{0x10F48, 230, 0, 0},
-	{0x10F49, 230, 0, 0},
-	{0x10F4A, 230, 0, 0},
-	{0x10F4B, 220, 0, 0},
-	{0x10F4C, 230, 0, 0},
-	{0x10F4D, 220, 0, 0},
-	{0x10F4E, 220, 0, 0},
-	{0x10F4F, 220, 0, 0},
-	{0x10F50, 220, 0, 0},
-	{0x10F82, 230, 0, 0},
-	{0x10F83, 220, 0, 0},
-	{0x10F84, 230, 0, 0},
-	{0x10F85, 220, 0, 0},
-	{0x11046, 9, 0, 0},
-	{0x11070, 9, 0, 0},
-	{0x1107F, 9, 0, 0},
-	{0x1109A, 0, 2, 4782},
-	{0x1109C, 0, 2, 4784},
-	{0x110AB, 0, 2, 4786},
-	{0x110B9, 9, 0, 0},
-	{0x110BA, 7, 0, 0},
-	{0x11100, 230, 0, 0},
-	{0x11101, 230, 0, 0},
-	{0x11102, 230, 0, 0},
-	{0x1112E, 0, 2, 4788},
-	{0x1112F, 0, 2, 4790},
-	{0x11133, 9, 0, 0},
-	{0x11134, 9, 0, 0},
-	{0x11173, 7, 0, 0},
-	{0x111C0, 9, 0, 0},
-	{0x111CA, 7, 0, 0},
-	{0x11235, 9, 0, 0},
-	{0x11236, 7, 0, 0},
-	{0x112E9, 7, 0, 0},
-	{0x112EA, 9, 0, 0},
-	{0x1133B, 7, 0, 0},
-	{0x1133C, 7, 0, 0},
-	{0x1134B, 0, 2, 4792},
-	{0x1134C, 0, 2, 4794},
-	{0x1134D, 9, 0, 0},
-	{0x11366, 230, 0, 0},
-	{0x11367, 230, 0, 0},
-	{0x11368, 230, 0, 0},
-	{0x11369, 230, 0, 0},
-	{0x1136A, 230, 0, 0},
-	{0x1136B, 230, 0, 0},
-	{0x1136C, 230, 0, 0},
-	{0x11370, 230, 0, 0},
-	{0x11371, 230, 0, 0},
-	{0x11372, 230, 0, 0},
-	{0x11373, 230, 0, 0},
-	{0x11374, 230, 0, 0},
-	{0x11442, 9, 0, 0},
-	{0x11446, 7, 0, 0},
-	{0x1145E, 230, 0, 0},
-	{0x114BB, 0, 2, 4796},
-	{0x114BC, 0, 2, 4798},
-	{0x114BE, 0, 2, 4800},
-	{0x114C2, 9, 0, 0},
-	{0x114C3, 7, 0, 0},
-	{0x115BA, 0, 2, 4802},
-	{0x115BB, 0, 2, 4804},
-	{0x115BF, 9, 0, 0},
-	{0x115C0, 7, 0, 0},
-	{0x1163F, 9, 0, 0},
-	{0x116B6, 9, 0, 0},
-	{0x116B7, 7, 0, 0},
-	{0x1172B, 9, 0, 0},
-	{0x11839, 9, 0, 0},
-	{0x1183A, 7, 0, 0},
-	{0x11938, 0, 2, 4806},
-	{0x1193D, 9, 0, 0},
-	{0x1193E, 9, 0, 0},
-	{0x11943, 7, 0, 0},
-	{0x119E0, 9, 0, 0},
-	{0x11A34, 9, 0, 0},
-	{0x11A47, 9, 0, 0},
-	{0x11A99, 9, 0, 0},
-	{0x11C3F, 9, 0, 0},
-	{0x11D42, 7, 0, 0},
-	{0x11D44, 9, 0, 0},
-	{0x11D45, 9, 0, 0},
-	{0x11D97, 9, 0, 0},
-	{0x11F41, 9, 0, 0},
-	{0x11F42, 9, 0, 0},
-	{0x16AF0, 1, 0, 0},
-	{0x16AF1, 1, 0, 0},
-	{0x16AF2, 1, 0, 0},
-	{0x16AF3, 1, 0, 0},
-	{0x16AF4, 1, 0, 0},
-	{0x16B30, 230, 0, 0},
-	{0x16B31, 230, 0, 0},
-	{0x16B32, 230, 0, 0},
-	{0x16B33, 230, 0, 0},
-	{0x16B34, 230, 0, 0},
-	{0x16B35, 230, 0, 0},
-	{0x16B36, 230, 0, 0},
-	{0x16FF0, 6, 0, 0},
-	{0x16FF1, 6, 0, 0},
-	{0x1BC9E, 1, 0, 0},
-	{0x1D15E, 0, 2 | DECOMP_NO_COMPOSE, 4808},	/* in exclusion list */
-	{0x1D15F, 0, 2 | DECOMP_NO_COMPOSE, 4810},	/* in exclusion list */
-	{0x1D160, 0, 2 | DECOMP_NO_COMPOSE, 4812},	/* in exclusion list */
-	{0x1D161, 0, 2 | DECOMP_NO_COMPOSE, 4814},	/* in exclusion list */
-	{0x1D162, 0, 2 | DECOMP_NO_COMPOSE, 4816},	/* in exclusion list */
-	{0x1D163, 0, 2 | DECOMP_NO_COMPOSE, 4818},	/* in exclusion list */
-	{0x1D164, 0, 2 | DECOMP_NO_COMPOSE, 4820},	/* in exclusion list */
-	{0x1D165, 216, 0, 0},
-	{0x1D166, 216, 0, 0},
-	{0x1D167, 1, 0, 0},
-	{0x1D168, 1, 0, 0},
-	{0x1D169, 1, 0, 0},
-	{0x1D16D, 226, 0, 0},
-	{0x1D16E, 216, 0, 0},
-	{0x1D16F, 216, 0, 0},
-	{0x1D170, 216, 0, 0},
-	{0x1D171, 216, 0, 0},
-	{0x1D172, 216, 0, 0},
-	{0x1D17B, 220, 0, 0},
-	{0x1D17C, 220, 0, 0},
-	{0x1D17D, 220, 0, 0},
-	{0x1D17E, 220, 0, 0},
-	{0x1D17F, 220, 0, 0},
-	{0x1D180, 220, 0, 0},
-	{0x1D181, 220, 0, 0},
-	{0x1D182, 220, 0, 0},
-	{0x1D185, 230, 0, 0},
-	{0x1D186, 230, 0, 0},
-	{0x1D187, 230, 0, 0},
-	{0x1D188, 230, 0, 0},
-	{0x1D189, 230, 0, 0},
-	{0x1D18A, 220, 0, 0},
-	{0x1D18B, 220, 0, 0},
-	{0x1D1AA, 230, 0, 0},
-	{0x1D1AB, 230, 0, 0},
-	{0x1D1AC, 230, 0, 0},
-	{0x1D1AD, 230, 0, 0},
-	{0x1D1BB, 0, 2 | DECOMP_NO_COMPOSE, 4822},	/* in exclusion list */
-	{0x1D1BC, 0, 2 | DECOMP_NO_COMPOSE, 4824},	/* in exclusion list */
-	{0x1D1BD, 0, 2 | DECOMP_NO_COMPOSE, 4826},	/* in exclusion list */
-	{0x1D1BE, 0, 2 | DECOMP_NO_COMPOSE, 4828},	/* in exclusion list */
-	{0x1D1BF, 0, 2 | DECOMP_NO_COMPOSE, 4830},	/* in exclusion list */
-	{0x1D1C0, 0, 2 | DECOMP_NO_COMPOSE, 4832},	/* in exclusion list */
-	{0x1D242, 230, 0, 0},
-	{0x1D243, 230, 0, 0},
-	{0x1D244, 230, 0, 0},
-	{0x1D400, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0041},
-	{0x1D401, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0042},
-	{0x1D402, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0043},
-	{0x1D403, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0044},
-	{0x1D404, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0045},
-	{0x1D405, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0046},
-	{0x1D406, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0047},
-	{0x1D407, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0048},
-	{0x1D408, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0049},
-	{0x1D409, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x004A},
-	{0x1D40A, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x004B},
-	{0x1D40B, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x004C},
-	{0x1D40C, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x004D},
-	{0x1D40D, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x004E},
-	{0x1D40E, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x004F},
-	{0x1D40F, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0050},
-	{0x1D410, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0051},
-	{0x1D411, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0052},
-	{0x1D412, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0053},
-	{0x1D413, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0054},
-	{0x1D414, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0055},
-	{0x1D415, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0056},
-	{0x1D416, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0057},
-	{0x1D417, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0058},
-	{0x1D418, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0059},
-	{0x1D419, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x005A},
-	{0x1D41A, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0061},
-	{0x1D41B, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0062},
-	{0x1D41C, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0063},
-	{0x1D41D, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0064},
-	{0x1D41E, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0065},
-	{0x1D41F, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0066},
-	{0x1D420, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0067},
-	{0x1D421, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0068},
-	{0x1D422, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0069},
-	{0x1D423, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x006A},
-	{0x1D424, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x006B},
-	{0x1D425, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x006C},
-	{0x1D426, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x006D},
-	{0x1D427, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x006E},
-	{0x1D428, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x006F},
-	{0x1D429, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0070},
-	{0x1D42A, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0071},
-	{0x1D42B, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0072},
-	{0x1D42C, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0073},
-	{0x1D42D, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0074},
-	{0x1D42E, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0075},
-	{0x1D42F, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0076},
-	{0x1D430, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0077},
-	{0x1D431, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0078},
-	{0x1D432, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0079},
-	{0x1D433, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x007A},
-	{0x1D434, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0041},
-	{0x1D435, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0042},
-	{0x1D436, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0043},
-	{0x1D437, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0044},
-	{0x1D438, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0045},
-	{0x1D439, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0046},
-	{0x1D43A, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0047},
-	{0x1D43B, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0048},
-	{0x1D43C, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0049},
-	{0x1D43D, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x004A},
-	{0x1D43E, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x004B},
-	{0x1D43F, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x004C},
-	{0x1D440, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x004D},
-	{0x1D441, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x004E},
-	{0x1D442, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x004F},
-	{0x1D443, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0050},
-	{0x1D444, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0051},
-	{0x1D445, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0052},
-	{0x1D446, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0053},
-	{0x1D447, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0054},
-	{0x1D448, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0055},
-	{0x1D449, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0056},
-	{0x1D44A, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0057},
-	{0x1D44B, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0058},
-	{0x1D44C, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0059},
-	{0x1D44D, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x005A},
-	{0x1D44E, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0061},
-	{0x1D44F, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0062},
-	{0x1D450, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0063},
-	{0x1D451, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0064},
-	{0x1D452, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0065},
-	{0x1D453, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0066},
-	{0x1D454, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0067},
-	{0x1D456, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0069},
-	{0x1D457, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x006A},
-	{0x1D458, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x006B},
-	{0x1D459, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x006C},
-	{0x1D45A, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x006D},
-	{0x1D45B, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x006E},
-	{0x1D45C, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x006F},
-	{0x1D45D, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0070},
-	{0x1D45E, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0071},
-	{0x1D45F, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0072},
-	{0x1D460, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0073},
-	{0x1D461, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0074},
-	{0x1D462, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0075},
-	{0x1D463, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0076},
-	{0x1D464, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0077},
-	{0x1D465, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0078},
-	{0x1D466, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0079},
-	{0x1D467, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x007A},
-	{0x1D468, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0041},
-	{0x1D469, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0042},
-	{0x1D46A, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0043},
-	{0x1D46B, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0044},
-	{0x1D46C, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0045},
-	{0x1D46D, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0046},
-	{0x1D46E, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0047},
-	{0x1D46F, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0048},
-	{0x1D470, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0049},
-	{0x1D471, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x004A},
-	{0x1D472, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x004B},
-	{0x1D473, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x004C},
-	{0x1D474, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x004D},
-	{0x1D475, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x004E},
-	{0x1D476, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x004F},
-	{0x1D477, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0050},
-	{0x1D478, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0051},
-	{0x1D479, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0052},
-	{0x1D47A, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0053},
-	{0x1D47B, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0054},
-	{0x1D47C, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0055},
-	{0x1D47D, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0056},
-	{0x1D47E, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0057},
-	{0x1D47F, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0058},
-	{0x1D480, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0059},
-	{0x1D481, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x005A},
-	{0x1D482, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0061},
-	{0x1D483, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0062},
-	{0x1D484, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0063},
-	{0x1D485, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0064},
-	{0x1D486, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0065},
-	{0x1D487, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0066},
-	{0x1D488, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0067},
-	{0x1D489, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0068},
-	{0x1D48A, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0069},
-	{0x1D48B, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x006A},
-	{0x1D48C, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x006B},
-	{0x1D48D, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x006C},
-	{0x1D48E, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x006D},
-	{0x1D48F, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x006E},
-	{0x1D490, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x006F},
-	{0x1D491, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0070},
-	{0x1D492, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0071},
-	{0x1D493, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0072},
-	{0x1D494, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0073},
-	{0x1D495, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0074},
-	{0x1D496, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0075},
-	{0x1D497, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0076},
-	{0x1D498, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0077},
-	{0x1D499, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0078},
-	{0x1D49A, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0079},
-	{0x1D49B, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x007A},
-	{0x1D49C, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0041},
-	{0x1D49E, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0043},
-	{0x1D49F, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0044},
-	{0x1D4A2, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0047},
-	{0x1D4A5, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x004A},
-	{0x1D4A6, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x004B},
-	{0x1D4A9, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x004E},
-	{0x1D4AA, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x004F},
-	{0x1D4AB, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0050},
-	{0x1D4AC, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0051},
-	{0x1D4AE, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0053},
-	{0x1D4AF, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0054},
-	{0x1D4B0, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0055},
-	{0x1D4B1, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0056},
-	{0x1D4B2, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0057},
-	{0x1D4B3, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0058},
-	{0x1D4B4, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0059},
-	{0x1D4B5, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x005A},
-	{0x1D4B6, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0061},
-	{0x1D4B7, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0062},
-	{0x1D4B8, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0063},
-	{0x1D4B9, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0064},
-	{0x1D4BB, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0066},
-	{0x1D4BD, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0068},
-	{0x1D4BE, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0069},
-	{0x1D4BF, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x006A},
-	{0x1D4C0, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x006B},
-	{0x1D4C1, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x006C},
-	{0x1D4C2, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x006D},
-	{0x1D4C3, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x006E},
-	{0x1D4C5, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0070},
-	{0x1D4C6, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0071},
-	{0x1D4C7, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0072},
-	{0x1D4C8, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0073},
-	{0x1D4C9, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0074},
-	{0x1D4CA, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0075},
-	{0x1D4CB, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0076},
-	{0x1D4CC, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0077},
-	{0x1D4CD, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0078},
-	{0x1D4CE, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0079},
-	{0x1D4CF, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x007A},
-	{0x1D4D0, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0041},
-	{0x1D4D1, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0042},
-	{0x1D4D2, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0043},
-	{0x1D4D3, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0044},
-	{0x1D4D4, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0045},
-	{0x1D4D5, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0046},
-	{0x1D4D6, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0047},
-	{0x1D4D7, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0048},
-	{0x1D4D8, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0049},
-	{0x1D4D9, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x004A},
-	{0x1D4DA, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x004B},
-	{0x1D4DB, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x004C},
-	{0x1D4DC, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x004D},
-	{0x1D4DD, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x004E},
-	{0x1D4DE, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x004F},
-	{0x1D4DF, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0050},
-	{0x1D4E0, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0051},
-	{0x1D4E1, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0052},
-	{0x1D4E2, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0053},
-	{0x1D4E3, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0054},
-	{0x1D4E4, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0055},
-	{0x1D4E5, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0056},
-	{0x1D4E6, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0057},
-	{0x1D4E7, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0058},
-	{0x1D4E8, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0059},
-	{0x1D4E9, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x005A},
-	{0x1D4EA, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0061},
-	{0x1D4EB, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0062},
-	{0x1D4EC, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0063},
-	{0x1D4ED, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0064},
-	{0x1D4EE, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0065},
-	{0x1D4EF, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0066},
-	{0x1D4F0, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0067},
-	{0x1D4F1, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0068},
-	{0x1D4F2, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0069},
-	{0x1D4F3, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x006A},
-	{0x1D4F4, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x006B},
-	{0x1D4F5, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x006C},
-	{0x1D4F6, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x006D},
-	{0x1D4F7, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x006E},
-	{0x1D4F8, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x006F},
-	{0x1D4F9, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0070},
-	{0x1D4FA, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0071},
-	{0x1D4FB, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0072},
-	{0x1D4FC, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0073},
-	{0x1D4FD, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0074},
-	{0x1D4FE, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0075},
-	{0x1D4FF, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0076},
-	{0x1D500, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0077},
-	{0x1D501, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0078},
-	{0x1D502, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0079},
-	{0x1D503, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x007A},
-	{0x1D504, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0041},
-	{0x1D505, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0042},
-	{0x1D507, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0044},
-	{0x1D508, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0045},
-	{0x1D509, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0046},
-	{0x1D50A, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0047},
-	{0x1D50D, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x004A},
-	{0x1D50E, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x004B},
-	{0x1D50F, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x004C},
-	{0x1D510, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x004D},
-	{0x1D511, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x004E},
-	{0x1D512, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x004F},
-	{0x1D513, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0050},
-	{0x1D514, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0051},
-	{0x1D516, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0053},
-	{0x1D517, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0054},
-	{0x1D518, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0055},
-	{0x1D519, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0056},
-	{0x1D51A, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0057},
-	{0x1D51B, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0058},
-	{0x1D51C, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0059},
-	{0x1D51E, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0061},
-	{0x1D51F, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0062},
-	{0x1D520, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0063},
-	{0x1D521, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0064},
-	{0x1D522, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0065},
-	{0x1D523, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0066},
-	{0x1D524, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0067},
-	{0x1D525, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0068},
-	{0x1D526, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0069},
-	{0x1D527, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x006A},
-	{0x1D528, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x006B},
-	{0x1D529, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x006C},
-	{0x1D52A, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x006D},
-	{0x1D52B, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x006E},
-	{0x1D52C, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x006F},
-	{0x1D52D, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0070},
-	{0x1D52E, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0071},
-	{0x1D52F, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0072},
-	{0x1D530, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0073},
-	{0x1D531, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0074},
-	{0x1D532, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0075},
-	{0x1D533, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0076},
-	{0x1D534, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0077},
-	{0x1D535, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0078},
-	{0x1D536, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0079},
-	{0x1D537, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x007A},
-	{0x1D538, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0041},
-	{0x1D539, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0042},
-	{0x1D53B, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0044},
-	{0x1D53C, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0045},
-	{0x1D53D, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0046},
-	{0x1D53E, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0047},
-	{0x1D540, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0049},
-	{0x1D541, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x004A},
-	{0x1D542, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x004B},
-	{0x1D543, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x004C},
-	{0x1D544, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x004D},
-	{0x1D546, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x004F},
-	{0x1D54A, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0053},
-	{0x1D54B, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0054},
-	{0x1D54C, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0055},
-	{0x1D54D, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0056},
-	{0x1D54E, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0057},
-	{0x1D54F, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0058},
-	{0x1D550, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0059},
-	{0x1D552, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0061},
-	{0x1D553, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0062},
-	{0x1D554, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0063},
-	{0x1D555, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0064},
-	{0x1D556, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0065},
-	{0x1D557, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0066},
-	{0x1D558, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0067},
-	{0x1D559, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0068},
-	{0x1D55A, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0069},
-	{0x1D55B, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x006A},
-	{0x1D55C, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x006B},
-	{0x1D55D, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x006C},
-	{0x1D55E, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x006D},
-	{0x1D55F, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x006E},
-	{0x1D560, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x006F},
-	{0x1D561, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0070},
-	{0x1D562, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0071},
-	{0x1D563, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0072},
-	{0x1D564, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0073},
-	{0x1D565, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0074},
-	{0x1D566, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0075},
-	{0x1D567, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0076},
-	{0x1D568, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0077},
-	{0x1D569, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0078},
-	{0x1D56A, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0079},
-	{0x1D56B, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x007A},
-	{0x1D56C, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0041},
-	{0x1D56D, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0042},
-	{0x1D56E, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0043},
-	{0x1D56F, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0044},
-	{0x1D570, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0045},
-	{0x1D571, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0046},
-	{0x1D572, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0047},
-	{0x1D573, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0048},
-	{0x1D574, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0049},
-	{0x1D575, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x004A},
-	{0x1D576, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x004B},
-	{0x1D577, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x004C},
-	{0x1D578, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x004D},
-	{0x1D579, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x004E},
-	{0x1D57A, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x004F},
-	{0x1D57B, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0050},
-	{0x1D57C, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0051},
-	{0x1D57D, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0052},
-	{0x1D57E, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0053},
-	{0x1D57F, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0054},
-	{0x1D580, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0055},
-	{0x1D581, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0056},
-	{0x1D582, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0057},
-	{0x1D583, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0058},
-	{0x1D584, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0059},
-	{0x1D585, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x005A},
-	{0x1D586, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0061},
-	{0x1D587, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0062},
-	{0x1D588, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0063},
-	{0x1D589, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0064},
-	{0x1D58A, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0065},
-	{0x1D58B, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0066},
-	{0x1D58C, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0067},
-	{0x1D58D, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0068},
-	{0x1D58E, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0069},
-	{0x1D58F, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x006A},
-	{0x1D590, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x006B},
-	{0x1D591, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x006C},
-	{0x1D592, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x006D},
-	{0x1D593, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x006E},
-	{0x1D594, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x006F},
-	{0x1D595, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0070},
-	{0x1D596, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0071},
-	{0x1D597, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0072},
-	{0x1D598, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0073},
-	{0x1D599, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0074},
-	{0x1D59A, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0075},
-	{0x1D59B, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0076},
-	{0x1D59C, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0077},
-	{0x1D59D, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0078},
-	{0x1D59E, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0079},
-	{0x1D59F, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x007A},
-	{0x1D5A0, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0041},
-	{0x1D5A1, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0042},
-	{0x1D5A2, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0043},
-	{0x1D5A3, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0044},
-	{0x1D5A4, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0045},
-	{0x1D5A5, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0046},
-	{0x1D5A6, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0047},
-	{0x1D5A7, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0048},
-	{0x1D5A8, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0049},
-	{0x1D5A9, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x004A},
-	{0x1D5AA, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x004B},
-	{0x1D5AB, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x004C},
-	{0x1D5AC, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x004D},
-	{0x1D5AD, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x004E},
-	{0x1D5AE, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x004F},
-	{0x1D5AF, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0050},
-	{0x1D5B0, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0051},
-	{0x1D5B1, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0052},
-	{0x1D5B2, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0053},
-	{0x1D5B3, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0054},
-	{0x1D5B4, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0055},
-	{0x1D5B5, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0056},
-	{0x1D5B6, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0057},
-	{0x1D5B7, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0058},
-	{0x1D5B8, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0059},
-	{0x1D5B9, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x005A},
-	{0x1D5BA, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0061},
-	{0x1D5BB, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0062},
-	{0x1D5BC, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0063},
-	{0x1D5BD, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0064},
-	{0x1D5BE, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0065},
-	{0x1D5BF, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0066},
-	{0x1D5C0, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0067},
-	{0x1D5C1, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0068},
-	{0x1D5C2, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0069},
-	{0x1D5C3, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x006A},
-	{0x1D5C4, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x006B},
-	{0x1D5C5, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x006C},
-	{0x1D5C6, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x006D},
-	{0x1D5C7, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x006E},
-	{0x1D5C8, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x006F},
-	{0x1D5C9, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0070},
-	{0x1D5CA, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0071},
-	{0x1D5CB, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0072},
-	{0x1D5CC, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0073},
-	{0x1D5CD, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0074},
-	{0x1D5CE, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0075},
-	{0x1D5CF, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0076},
-	{0x1D5D0, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0077},
-	{0x1D5D1, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0078},
-	{0x1D5D2, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0079},
-	{0x1D5D3, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x007A},
-	{0x1D5D4, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0041},
-	{0x1D5D5, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0042},
-	{0x1D5D6, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0043},
-	{0x1D5D7, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0044},
-	{0x1D5D8, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0045},
-	{0x1D5D9, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0046},
-	{0x1D5DA, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0047},
-	{0x1D5DB, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0048},
-	{0x1D5DC, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0049},
-	{0x1D5DD, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x004A},
-	{0x1D5DE, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x004B},
-	{0x1D5DF, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x004C},
-	{0x1D5E0, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x004D},
-	{0x1D5E1, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x004E},
-	{0x1D5E2, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x004F},
-	{0x1D5E3, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0050},
-	{0x1D5E4, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0051},
-	{0x1D5E5, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0052},
-	{0x1D5E6, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0053},
-	{0x1D5E7, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0054},
-	{0x1D5E8, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0055},
-	{0x1D5E9, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0056},
-	{0x1D5EA, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0057},
-	{0x1D5EB, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0058},
-	{0x1D5EC, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0059},
-	{0x1D5ED, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x005A},
-	{0x1D5EE, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0061},
-	{0x1D5EF, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0062},
-	{0x1D5F0, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0063},
-	{0x1D5F1, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0064},
-	{0x1D5F2, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0065},
-	{0x1D5F3, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0066},
-	{0x1D5F4, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0067},
-	{0x1D5F5, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0068},
-	{0x1D5F6, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0069},
-	{0x1D5F7, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x006A},
-	{0x1D5F8, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x006B},
-	{0x1D5F9, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x006C},
-	{0x1D5FA, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x006D},
-	{0x1D5FB, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x006E},
-	{0x1D5FC, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x006F},
-	{0x1D5FD, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0070},
-	{0x1D5FE, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0071},
-	{0x1D5FF, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0072},
-	{0x1D600, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0073},
-	{0x1D601, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0074},
-	{0x1D602, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0075},
-	{0x1D603, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0076},
-	{0x1D604, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0077},
-	{0x1D605, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0078},
-	{0x1D606, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0079},
-	{0x1D607, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x007A},
-	{0x1D608, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0041},
-	{0x1D609, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0042},
-	{0x1D60A, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0043},
-	{0x1D60B, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0044},
-	{0x1D60C, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0045},
-	{0x1D60D, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0046},
-	{0x1D60E, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0047},
-	{0x1D60F, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0048},
-	{0x1D610, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0049},
-	{0x1D611, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x004A},
-	{0x1D612, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x004B},
-	{0x1D613, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x004C},
-	{0x1D614, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x004D},
-	{0x1D615, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x004E},
-	{0x1D616, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x004F},
-	{0x1D617, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0050},
-	{0x1D618, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0051},
-	{0x1D619, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0052},
-	{0x1D61A, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0053},
-	{0x1D61B, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0054},
-	{0x1D61C, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0055},
-	{0x1D61D, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0056},
-	{0x1D61E, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0057},
-	{0x1D61F, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0058},
-	{0x1D620, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0059},
-	{0x1D621, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x005A},
-	{0x1D622, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0061},
-	{0x1D623, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0062},
-	{0x1D624, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0063},
-	{0x1D625, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0064},
-	{0x1D626, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0065},
-	{0x1D627, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0066},
-	{0x1D628, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0067},
-	{0x1D629, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0068},
-	{0x1D62A, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0069},
-	{0x1D62B, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x006A},
-	{0x1D62C, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x006B},
-	{0x1D62D, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x006C},
-	{0x1D62E, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x006D},
-	{0x1D62F, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x006E},
-	{0x1D630, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x006F},
-	{0x1D631, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0070},
-	{0x1D632, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0071},
-	{0x1D633, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0072},
-	{0x1D634, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0073},
-	{0x1D635, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0074},
-	{0x1D636, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0075},
-	{0x1D637, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0076},
-	{0x1D638, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0077},
-	{0x1D639, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0078},
-	{0x1D63A, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0079},
-	{0x1D63B, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x007A},
-	{0x1D63C, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0041},
-	{0x1D63D, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0042},
-	{0x1D63E, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0043},
-	{0x1D63F, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0044},
-	{0x1D640, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0045},
-	{0x1D641, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0046},
-	{0x1D642, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0047},
-	{0x1D643, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0048},
-	{0x1D644, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0049},
-	{0x1D645, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x004A},
-	{0x1D646, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x004B},
-	{0x1D647, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x004C},
-	{0x1D648, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x004D},
-	{0x1D649, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x004E},
-	{0x1D64A, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x004F},
-	{0x1D64B, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0050},
-	{0x1D64C, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0051},
-	{0x1D64D, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0052},
-	{0x1D64E, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0053},
-	{0x1D64F, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0054},
-	{0x1D650, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0055},
-	{0x1D651, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0056},
-	{0x1D652, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0057},
-	{0x1D653, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0058},
-	{0x1D654, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0059},
-	{0x1D655, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x005A},
-	{0x1D656, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0061},
-	{0x1D657, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0062},
-	{0x1D658, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0063},
-	{0x1D659, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0064},
-	{0x1D65A, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0065},
-	{0x1D65B, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0066},
-	{0x1D65C, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0067},
-	{0x1D65D, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0068},
-	{0x1D65E, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0069},
-	{0x1D65F, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x006A},
-	{0x1D660, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x006B},
-	{0x1D661, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x006C},
-	{0x1D662, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x006D},
-	{0x1D663, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x006E},
-	{0x1D664, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x006F},
-	{0x1D665, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0070},
-	{0x1D666, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0071},
-	{0x1D667, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0072},
-	{0x1D668, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0073},
-	{0x1D669, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0074},
-	{0x1D66A, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0075},
-	{0x1D66B, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0076},
-	{0x1D66C, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0077},
-	{0x1D66D, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0078},
-	{0x1D66E, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0079},
-	{0x1D66F, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x007A},
-	{0x1D670, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0041},
-	{0x1D671, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0042},
-	{0x1D672, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0043},
-	{0x1D673, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0044},
-	{0x1D674, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0045},
-	{0x1D675, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0046},
-	{0x1D676, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0047},
-	{0x1D677, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0048},
-	{0x1D678, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0049},
-	{0x1D679, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x004A},
-	{0x1D67A, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x004B},
-	{0x1D67B, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x004C},
-	{0x1D67C, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x004D},
-	{0x1D67D, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x004E},
-	{0x1D67E, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x004F},
-	{0x1D67F, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0050},
-	{0x1D680, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0051},
-	{0x1D681, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0052},
-	{0x1D682, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0053},
-	{0x1D683, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0054},
-	{0x1D684, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0055},
-	{0x1D685, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0056},
-	{0x1D686, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0057},
-	{0x1D687, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0058},
-	{0x1D688, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0059},
-	{0x1D689, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x005A},
-	{0x1D68A, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0061},
-	{0x1D68B, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0062},
-	{0x1D68C, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0063},
-	{0x1D68D, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0064},
-	{0x1D68E, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0065},
-	{0x1D68F, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0066},
-	{0x1D690, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0067},
-	{0x1D691, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0068},
-	{0x1D692, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0069},
-	{0x1D693, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x006A},
-	{0x1D694, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x006B},
-	{0x1D695, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x006C},
-	{0x1D696, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x006D},
-	{0x1D697, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x006E},
-	{0x1D698, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x006F},
-	{0x1D699, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0070},
-	{0x1D69A, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0071},
-	{0x1D69B, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0072},
-	{0x1D69C, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0073},
-	{0x1D69D, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0074},
-	{0x1D69E, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0075},
-	{0x1D69F, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0076},
-	{0x1D6A0, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0077},
-	{0x1D6A1, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0078},
-	{0x1D6A2, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0079},
-	{0x1D6A3, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x007A},
-	{0x1D6A4, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0131},
-	{0x1D6A5, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0237},
-	{0x1D6A8, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0391},
-	{0x1D6A9, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0392},
-	{0x1D6AA, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0393},
-	{0x1D6AB, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0394},
-	{0x1D6AC, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0395},
-	{0x1D6AD, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0396},
-	{0x1D6AE, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0397},
-	{0x1D6AF, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0398},
-	{0x1D6B0, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0399},
-	{0x1D6B1, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x039A},
-	{0x1D6B2, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x039B},
-	{0x1D6B3, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x039C},
-	{0x1D6B4, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x039D},
-	{0x1D6B5, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x039E},
-	{0x1D6B6, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x039F},
-	{0x1D6B7, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03A0},
-	{0x1D6B8, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03A1},
-	{0x1D6B9, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03F4},
-	{0x1D6BA, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03A3},
-	{0x1D6BB, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03A4},
-	{0x1D6BC, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03A5},
-	{0x1D6BD, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03A6},
-	{0x1D6BE, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03A7},
-	{0x1D6BF, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03A8},
-	{0x1D6C0, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03A9},
-	{0x1D6C1, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x2207},
-	{0x1D6C2, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03B1},
-	{0x1D6C3, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03B2},
-	{0x1D6C4, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03B3},
-	{0x1D6C5, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03B4},
-	{0x1D6C6, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03B5},
-	{0x1D6C7, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03B6},
-	{0x1D6C8, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03B7},
-	{0x1D6C9, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03B8},
-	{0x1D6CA, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03B9},
-	{0x1D6CB, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03BA},
-	{0x1D6CC, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03BB},
-	{0x1D6CD, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03BC},
-	{0x1D6CE, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03BD},
-	{0x1D6CF, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03BE},
-	{0x1D6D0, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03BF},
-	{0x1D6D1, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03C0},
-	{0x1D6D2, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03C1},
-	{0x1D6D3, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03C2},
-	{0x1D6D4, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03C3},
-	{0x1D6D5, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03C4},
-	{0x1D6D6, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03C5},
-	{0x1D6D7, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03C6},
-	{0x1D6D8, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03C7},
-	{0x1D6D9, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03C8},
-	{0x1D6DA, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03C9},
-	{0x1D6DB, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x2202},
-	{0x1D6DC, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03F5},
-	{0x1D6DD, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03D1},
-	{0x1D6DE, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03F0},
-	{0x1D6DF, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03D5},
-	{0x1D6E0, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03F1},
-	{0x1D6E1, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03D6},
-	{0x1D6E2, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0391},
-	{0x1D6E3, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0392},
-	{0x1D6E4, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0393},
-	{0x1D6E5, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0394},
-	{0x1D6E6, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0395},
-	{0x1D6E7, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0396},
-	{0x1D6E8, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0397},
-	{0x1D6E9, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0398},
-	{0x1D6EA, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0399},
-	{0x1D6EB, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x039A},
-	{0x1D6EC, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x039B},
-	{0x1D6ED, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x039C},
-	{0x1D6EE, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x039D},
-	{0x1D6EF, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x039E},
-	{0x1D6F0, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x039F},
-	{0x1D6F1, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03A0},
-	{0x1D6F2, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03A1},
-	{0x1D6F3, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03F4},
-	{0x1D6F4, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03A3},
-	{0x1D6F5, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03A4},
-	{0x1D6F6, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03A5},
-	{0x1D6F7, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03A6},
-	{0x1D6F8, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03A7},
-	{0x1D6F9, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03A8},
-	{0x1D6FA, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03A9},
-	{0x1D6FB, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x2207},
-	{0x1D6FC, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03B1},
-	{0x1D6FD, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03B2},
-	{0x1D6FE, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03B3},
-	{0x1D6FF, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03B4},
-	{0x1D700, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03B5},
-	{0x1D701, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03B6},
-	{0x1D702, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03B7},
-	{0x1D703, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03B8},
-	{0x1D704, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03B9},
-	{0x1D705, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03BA},
-	{0x1D706, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03BB},
-	{0x1D707, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03BC},
-	{0x1D708, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03BD},
-	{0x1D709, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03BE},
-	{0x1D70A, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03BF},
-	{0x1D70B, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03C0},
-	{0x1D70C, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03C1},
-	{0x1D70D, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03C2},
-	{0x1D70E, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03C3},
-	{0x1D70F, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03C4},
-	{0x1D710, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03C5},
-	{0x1D711, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03C6},
-	{0x1D712, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03C7},
-	{0x1D713, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03C8},
-	{0x1D714, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03C9},
-	{0x1D715, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x2202},
-	{0x1D716, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03F5},
-	{0x1D717, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03D1},
-	{0x1D718, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03F0},
-	{0x1D719, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03D5},
-	{0x1D71A, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03F1},
-	{0x1D71B, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03D6},
-	{0x1D71C, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0391},
-	{0x1D71D, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0392},
-	{0x1D71E, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0393},
-	{0x1D71F, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0394},
-	{0x1D720, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0395},
-	{0x1D721, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0396},
-	{0x1D722, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0397},
-	{0x1D723, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0398},
-	{0x1D724, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0399},
-	{0x1D725, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x039A},
-	{0x1D726, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x039B},
-	{0x1D727, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x039C},
-	{0x1D728, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x039D},
-	{0x1D729, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x039E},
-	{0x1D72A, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x039F},
-	{0x1D72B, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03A0},
-	{0x1D72C, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03A1},
-	{0x1D72D, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03F4},
-	{0x1D72E, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03A3},
-	{0x1D72F, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03A4},
-	{0x1D730, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03A5},
-	{0x1D731, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03A6},
-	{0x1D732, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03A7},
-	{0x1D733, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03A8},
-	{0x1D734, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03A9},
-	{0x1D735, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x2207},
-	{0x1D736, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03B1},
-	{0x1D737, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03B2},
-	{0x1D738, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03B3},
-	{0x1D739, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03B4},
-	{0x1D73A, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03B5},
-	{0x1D73B, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03B6},
-	{0x1D73C, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03B7},
-	{0x1D73D, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03B8},
-	{0x1D73E, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03B9},
-	{0x1D73F, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03BA},
-	{0x1D740, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03BB},
-	{0x1D741, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03BC},
-	{0x1D742, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03BD},
-	{0x1D743, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03BE},
-	{0x1D744, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03BF},
-	{0x1D745, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03C0},
-	{0x1D746, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03C1},
-	{0x1D747, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03C2},
-	{0x1D748, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03C3},
-	{0x1D749, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03C4},
-	{0x1D74A, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03C5},
-	{0x1D74B, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03C6},
-	{0x1D74C, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03C7},
-	{0x1D74D, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03C8},
-	{0x1D74E, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03C9},
-	{0x1D74F, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x2202},
-	{0x1D750, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03F5},
-	{0x1D751, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03D1},
-	{0x1D752, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03F0},
-	{0x1D753, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03D5},
-	{0x1D754, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03F1},
-	{0x1D755, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03D6},
-	{0x1D756, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0391},
-	{0x1D757, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0392},
-	{0x1D758, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0393},
-	{0x1D759, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0394},
-	{0x1D75A, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0395},
-	{0x1D75B, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0396},
-	{0x1D75C, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0397},
-	{0x1D75D, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0398},
-	{0x1D75E, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0399},
-	{0x1D75F, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x039A},
-	{0x1D760, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x039B},
-	{0x1D761, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x039C},
-	{0x1D762, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x039D},
-	{0x1D763, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x039E},
-	{0x1D764, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x039F},
-	{0x1D765, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03A0},
-	{0x1D766, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03A1},
-	{0x1D767, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03F4},
-	{0x1D768, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03A3},
-	{0x1D769, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03A4},
-	{0x1D76A, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03A5},
-	{0x1D76B, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03A6},
-	{0x1D76C, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03A7},
-	{0x1D76D, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03A8},
-	{0x1D76E, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03A9},
-	{0x1D76F, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x2207},
-	{0x1D770, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03B1},
-	{0x1D771, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03B2},
-	{0x1D772, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03B3},
-	{0x1D773, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03B4},
-	{0x1D774, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03B5},
-	{0x1D775, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03B6},
-	{0x1D776, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03B7},
-	{0x1D777, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03B8},
-	{0x1D778, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03B9},
-	{0x1D779, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03BA},
-	{0x1D77A, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03BB},
-	{0x1D77B, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03BC},
-	{0x1D77C, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03BD},
-	{0x1D77D, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03BE},
-	{0x1D77E, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03BF},
-	{0x1D77F, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03C0},
-	{0x1D780, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03C1},
-	{0x1D781, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03C2},
-	{0x1D782, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03C3},
-	{0x1D783, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03C4},
-	{0x1D784, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03C5},
-	{0x1D785, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03C6},
-	{0x1D786, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03C7},
-	{0x1D787, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03C8},
-	{0x1D788, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03C9},
-	{0x1D789, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x2202},
-	{0x1D78A, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03F5},
-	{0x1D78B, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03D1},
-	{0x1D78C, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03F0},
-	{0x1D78D, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03D5},
-	{0x1D78E, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03F1},
-	{0x1D78F, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03D6},
-	{0x1D790, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0391},
-	{0x1D791, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0392},
-	{0x1D792, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0393},
-	{0x1D793, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0394},
-	{0x1D794, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0395},
-	{0x1D795, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0396},
-	{0x1D796, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0397},
-	{0x1D797, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0398},
-	{0x1D798, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0399},
-	{0x1D799, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x039A},
-	{0x1D79A, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x039B},
-	{0x1D79B, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x039C},
-	{0x1D79C, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x039D},
-	{0x1D79D, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x039E},
-	{0x1D79E, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x039F},
-	{0x1D79F, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03A0},
-	{0x1D7A0, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03A1},
-	{0x1D7A1, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03F4},
-	{0x1D7A2, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03A3},
-	{0x1D7A3, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03A4},
-	{0x1D7A4, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03A5},
-	{0x1D7A5, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03A6},
-	{0x1D7A6, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03A7},
-	{0x1D7A7, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03A8},
-	{0x1D7A8, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03A9},
-	{0x1D7A9, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x2207},
-	{0x1D7AA, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03B1},
-	{0x1D7AB, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03B2},
-	{0x1D7AC, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03B3},
-	{0x1D7AD, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03B4},
-	{0x1D7AE, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03B5},
-	{0x1D7AF, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03B6},
-	{0x1D7B0, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03B7},
-	{0x1D7B1, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03B8},
-	{0x1D7B2, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03B9},
-	{0x1D7B3, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03BA},
-	{0x1D7B4, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03BB},
-	{0x1D7B5, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03BC},
-	{0x1D7B6, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03BD},
-	{0x1D7B7, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03BE},
-	{0x1D7B8, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03BF},
-	{0x1D7B9, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03C0},
-	{0x1D7BA, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03C1},
-	{0x1D7BB, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03C2},
-	{0x1D7BC, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03C3},
-	{0x1D7BD, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03C4},
-	{0x1D7BE, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03C5},
-	{0x1D7BF, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03C6},
-	{0x1D7C0, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03C7},
-	{0x1D7C1, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03C8},
-	{0x1D7C2, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03C9},
-	{0x1D7C3, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x2202},
-	{0x1D7C4, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03F5},
-	{0x1D7C5, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03D1},
-	{0x1D7C6, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03F0},
-	{0x1D7C7, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03D5},
-	{0x1D7C8, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03F1},
-	{0x1D7C9, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03D6},
-	{0x1D7CA, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03DC},
-	{0x1D7CB, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x03DD},
-	{0x1D7CE, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0030},
-	{0x1D7CF, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0031},
-	{0x1D7D0, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0032},
-	{0x1D7D1, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0033},
-	{0x1D7D2, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0034},
-	{0x1D7D3, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0035},
-	{0x1D7D4, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0036},
-	{0x1D7D5, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0037},
-	{0x1D7D6, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0038},
-	{0x1D7D7, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0039},
-	{0x1D7D8, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0030},
-	{0x1D7D9, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0031},
-	{0x1D7DA, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0032},
-	{0x1D7DB, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0033},
-	{0x1D7DC, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0034},
-	{0x1D7DD, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0035},
-	{0x1D7DE, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0036},
-	{0x1D7DF, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0037},
-	{0x1D7E0, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0038},
-	{0x1D7E1, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0039},
-	{0x1D7E2, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0030},
-	{0x1D7E3, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0031},
-	{0x1D7E4, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0032},
-	{0x1D7E5, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0033},
-	{0x1D7E6, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0034},
-	{0x1D7E7, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0035},
-	{0x1D7E8, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0036},
-	{0x1D7E9, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0037},
-	{0x1D7EA, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0038},
-	{0x1D7EB, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0039},
-	{0x1D7EC, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0030},
-	{0x1D7ED, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0031},
-	{0x1D7EE, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0032},
-	{0x1D7EF, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0033},
-	{0x1D7F0, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0034},
-	{0x1D7F1, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0035},
-	{0x1D7F2, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0036},
-	{0x1D7F3, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0037},
-	{0x1D7F4, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0038},
-	{0x1D7F5, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0039},
-	{0x1D7F6, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0030},
-	{0x1D7F7, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0031},
-	{0x1D7F8, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0032},
-	{0x1D7F9, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0033},
-	{0x1D7FA, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0034},
-	{0x1D7FB, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0035},
-	{0x1D7FC, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0036},
-	{0x1D7FD, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0037},
-	{0x1D7FE, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0038},
-	{0x1D7FF, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0039},
-	{0x1E000, 230, 0, 0},
-	{0x1E001, 230, 0, 0},
-	{0x1E002, 230, 0, 0},
-	{0x1E003, 230, 0, 0},
-	{0x1E004, 230, 0, 0},
-	{0x1E005, 230, 0, 0},
-	{0x1E006, 230, 0, 0},
-	{0x1E008, 230, 0, 0},
-	{0x1E009, 230, 0, 0},
-	{0x1E00A, 230, 0, 0},
-	{0x1E00B, 230, 0, 0},
-	{0x1E00C, 230, 0, 0},
-	{0x1E00D, 230, 0, 0},
-	{0x1E00E, 230, 0, 0},
-	{0x1E00F, 230, 0, 0},
-	{0x1E010, 230, 0, 0},
-	{0x1E011, 230, 0, 0},
-	{0x1E012, 230, 0, 0},
-	{0x1E013, 230, 0, 0},
-	{0x1E014, 230, 0, 0},
-	{0x1E015, 230, 0, 0},
-	{0x1E016, 230, 0, 0},
-	{0x1E017, 230, 0, 0},
-	{0x1E018, 230, 0, 0},
-	{0x1E01B, 230, 0, 0},
-	{0x1E01C, 230, 0, 0},
-	{0x1E01D, 230, 0, 0},
-	{0x1E01E, 230, 0, 0},
-	{0x1E01F, 230, 0, 0},
-	{0x1E020, 230, 0, 0},
-	{0x1E021, 230, 0, 0},
-	{0x1E023, 230, 0, 0},
-	{0x1E024, 230, 0, 0},
-	{0x1E026, 230, 0, 0},
-	{0x1E027, 230, 0, 0},
-	{0x1E028, 230, 0, 0},
-	{0x1E029, 230, 0, 0},
-	{0x1E02A, 230, 0, 0},
-	{0x1E030, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0430},
-	{0x1E031, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0431},
-	{0x1E032, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0432},
-	{0x1E033, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0433},
-	{0x1E034, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0434},
-	{0x1E035, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0435},
-	{0x1E036, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0436},
-	{0x1E037, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0437},
-	{0x1E038, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0438},
-	{0x1E039, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x043A},
-	{0x1E03A, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x043B},
-	{0x1E03B, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x043C},
-	{0x1E03C, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x043E},
-	{0x1E03D, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x043F},
-	{0x1E03E, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0440},
-	{0x1E03F, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0441},
-	{0x1E040, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0442},
-	{0x1E041, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0443},
-	{0x1E042, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0444},
-	{0x1E043, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0445},
-	{0x1E044, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0446},
-	{0x1E045, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0447},
-	{0x1E046, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0448},
-	{0x1E047, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x044B},
-	{0x1E048, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x044D},
-	{0x1E049, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x044E},
-	{0x1E04A, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0xA689},
-	{0x1E04B, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x04D9},
-	{0x1E04C, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0456},
-	{0x1E04D, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0458},
-	{0x1E04E, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x04E9},
-	{0x1E04F, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x04AF},
-	{0x1E050, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x04CF},
-	{0x1E051, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0430},
-	{0x1E052, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0431},
-	{0x1E053, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0432},
-	{0x1E054, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0433},
-	{0x1E055, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0434},
-	{0x1E056, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0435},
-	{0x1E057, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0436},
-	{0x1E058, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0437},
-	{0x1E059, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0438},
-	{0x1E05A, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x043A},
-	{0x1E05B, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x043B},
-	{0x1E05C, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x043E},
-	{0x1E05D, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x043F},
-	{0x1E05E, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0441},
-	{0x1E05F, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0443},
-	{0x1E060, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0444},
-	{0x1E061, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0445},
-	{0x1E062, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0446},
-	{0x1E063, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0447},
-	{0x1E064, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0448},
-	{0x1E065, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x044A},
-	{0x1E066, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x044B},
-	{0x1E067, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0491},
-	{0x1E068, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0456},
-	{0x1E069, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0455},
-	{0x1E06A, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x045F},
-	{0x1E06B, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x04AB},
-	{0x1E06C, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0xA651},
-	{0x1E06D, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x04B1},
-	{0x1E08F, 230, 0, 0},
-	{0x1E130, 230, 0, 0},
-	{0x1E131, 230, 0, 0},
-	{0x1E132, 230, 0, 0},
-	{0x1E133, 230, 0, 0},
-	{0x1E134, 230, 0, 0},
-	{0x1E135, 230, 0, 0},
-	{0x1E136, 230, 0, 0},
-	{0x1E2AE, 230, 0, 0},
-	{0x1E2EC, 230, 0, 0},
-	{0x1E2ED, 230, 0, 0},
-	{0x1E2EE, 230, 0, 0},
-	{0x1E2EF, 230, 0, 0},
-	{0x1E4EC, 232, 0, 0},
-	{0x1E4ED, 232, 0, 0},
-	{0x1E4EE, 220, 0, 0},
-	{0x1E4EF, 230, 0, 0},
-	{0x1E8D0, 220, 0, 0},
-	{0x1E8D1, 220, 0, 0},
-	{0x1E8D2, 220, 0, 0},
-	{0x1E8D3, 220, 0, 0},
-	{0x1E8D4, 220, 0, 0},
-	{0x1E8D5, 220, 0, 0},
-	{0x1E8D6, 220, 0, 0},
-	{0x1E944, 230, 0, 0},
-	{0x1E945, 230, 0, 0},
-	{0x1E946, 230, 0, 0},
-	{0x1E947, 230, 0, 0},
-	{0x1E948, 230, 0, 0},
-	{0x1E949, 230, 0, 0},
-	{0x1E94A, 7, 0, 0},
-	{0x1EE00, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0627},
-	{0x1EE01, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0628},
-	{0x1EE02, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x062C},
-	{0x1EE03, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x062F},
-	{0x1EE05, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0648},
-	{0x1EE06, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0632},
-	{0x1EE07, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x062D},
-	{0x1EE08, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0637},
-	{0x1EE09, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x064A},
-	{0x1EE0A, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0643},
-	{0x1EE0B, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0644},
-	{0x1EE0C, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0645},
-	{0x1EE0D, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0646},
-	{0x1EE0E, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0633},
-	{0x1EE0F, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0639},
-	{0x1EE10, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0641},
-	{0x1EE11, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0635},
-	{0x1EE12, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0642},
-	{0x1EE13, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0631},
-	{0x1EE14, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0634},
-	{0x1EE15, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x062A},
-	{0x1EE16, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x062B},
-	{0x1EE17, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x062E},
-	{0x1EE18, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0630},
-	{0x1EE19, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0636},
-	{0x1EE1A, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0638},
-	{0x1EE1B, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x063A},
-	{0x1EE1C, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x066E},
-	{0x1EE1D, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x06BA},
-	{0x1EE1E, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x06A1},
-	{0x1EE1F, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x066F},
-	{0x1EE21, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0628},
-	{0x1EE22, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x062C},
-	{0x1EE24, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0647},
-	{0x1EE27, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x062D},
-	{0x1EE29, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x064A},
-	{0x1EE2A, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0643},
-	{0x1EE2B, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0644},
-	{0x1EE2C, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0645},
-	{0x1EE2D, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0646},
-	{0x1EE2E, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0633},
-	{0x1EE2F, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0639},
-	{0x1EE30, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0641},
-	{0x1EE31, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0635},
-	{0x1EE32, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0642},
-	{0x1EE34, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0634},
-	{0x1EE35, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x062A},
-	{0x1EE36, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x062B},
-	{0x1EE37, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x062E},
-	{0x1EE39, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0636},
-	{0x1EE3B, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x063A},
-	{0x1EE42, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x062C},
-	{0x1EE47, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x062D},
-	{0x1EE49, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x064A},
-	{0x1EE4B, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0644},
-	{0x1EE4D, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0646},
-	{0x1EE4E, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0633},
-	{0x1EE4F, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0639},
-	{0x1EE51, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0635},
-	{0x1EE52, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0642},
-	{0x1EE54, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0634},
-	{0x1EE57, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x062E},
-	{0x1EE59, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0636},
-	{0x1EE5B, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x063A},
-	{0x1EE5D, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x06BA},
-	{0x1EE5F, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x066F},
-	{0x1EE61, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0628},
-	{0x1EE62, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x062C},
-	{0x1EE64, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0647},
-	{0x1EE67, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x062D},
-	{0x1EE68, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0637},
-	{0x1EE69, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x064A},
-	{0x1EE6A, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0643},
-	{0x1EE6C, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0645},
-	{0x1EE6D, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0646},
-	{0x1EE6E, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0633},
-	{0x1EE6F, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0639},
-	{0x1EE70, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0641},
-	{0x1EE71, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0635},
-	{0x1EE72, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0642},
-	{0x1EE74, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0634},
-	{0x1EE75, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x062A},
-	{0x1EE76, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x062B},
-	{0x1EE77, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x062E},
-	{0x1EE79, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0636},
-	{0x1EE7A, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0638},
-	{0x1EE7B, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x063A},
-	{0x1EE7C, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x066E},
-	{0x1EE7E, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x06A1},
-	{0x1EE80, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0627},
-	{0x1EE81, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0628},
-	{0x1EE82, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x062C},
-	{0x1EE83, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x062F},
-	{0x1EE84, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0647},
-	{0x1EE85, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0648},
-	{0x1EE86, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0632},
-	{0x1EE87, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x062D},
-	{0x1EE88, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0637},
-	{0x1EE89, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x064A},
-	{0x1EE8B, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0644},
-	{0x1EE8C, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0645},
-	{0x1EE8D, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0646},
-	{0x1EE8E, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0633},
-	{0x1EE8F, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0639},
-	{0x1EE90, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0641},
-	{0x1EE91, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0635},
-	{0x1EE92, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0642},
-	{0x1EE93, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0631},
-	{0x1EE94, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0634},
-	{0x1EE95, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x062A},
-	{0x1EE96, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x062B},
-	{0x1EE97, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x062E},
-	{0x1EE98, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0630},
-	{0x1EE99, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0636},
-	{0x1EE9A, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0638},
-	{0x1EE9B, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x063A},
-	{0x1EEA1, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0628},
-	{0x1EEA2, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x062C},
-	{0x1EEA3, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x062F},
-	{0x1EEA5, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0648},
-	{0x1EEA6, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0632},
-	{0x1EEA7, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x062D},
-	{0x1EEA8, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0637},
-	{0x1EEA9, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x064A},
-	{0x1EEAB, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0644},
-	{0x1EEAC, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0645},
-	{0x1EEAD, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0646},
-	{0x1EEAE, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0633},
-	{0x1EEAF, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0639},
-	{0x1EEB0, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0641},
-	{0x1EEB1, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0635},
-	{0x1EEB2, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0642},
-	{0x1EEB3, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0631},
-	{0x1EEB4, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0634},
-	{0x1EEB5, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x062A},
-	{0x1EEB6, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x062B},
-	{0x1EEB7, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x062E},
-	{0x1EEB8, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0630},
-	{0x1EEB9, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0636},
-	{0x1EEBA, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0638},
-	{0x1EEBB, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x063A},
-	{0x1F100, 0, 2 | DECOMP_COMPAT, 4834},
-	{0x1F101, 0, 2 | DECOMP_COMPAT, 4836},
-	{0x1F102, 0, 2 | DECOMP_COMPAT, 4838},
-	{0x1F103, 0, 2 | DECOMP_COMPAT, 4840},
-	{0x1F104, 0, 2 | DECOMP_COMPAT, 4842},
-	{0x1F105, 0, 2 | DECOMP_COMPAT, 4844},
-	{0x1F106, 0, 2 | DECOMP_COMPAT, 4846},
-	{0x1F107, 0, 2 | DECOMP_COMPAT, 4848},
-	{0x1F108, 0, 2 | DECOMP_COMPAT, 4850},
-	{0x1F109, 0, 2 | DECOMP_COMPAT, 4852},
-	{0x1F10A, 0, 2 | DECOMP_COMPAT, 4854},
-	{0x1F110, 0, 3 | DECOMP_COMPAT, 4856},
-	{0x1F111, 0, 3 | DECOMP_COMPAT, 4859},
-	{0x1F112, 0, 3 | DECOMP_COMPAT, 4862},
-	{0x1F113, 0, 3 | DECOMP_COMPAT, 4865},
-	{0x1F114, 0, 3 | DECOMP_COMPAT, 4868},
-	{0x1F115, 0, 3 | DECOMP_COMPAT, 4871},
-	{0x1F116, 0, 3 | DECOMP_COMPAT, 4874},
-	{0x1F117, 0, 3 | DECOMP_COMPAT, 4877},
-	{0x1F118, 0, 3 | DECOMP_COMPAT, 4880},
-	{0x1F119, 0, 3 | DECOMP_COMPAT, 4883},
-	{0x1F11A, 0, 3 | DECOMP_COMPAT, 4886},
-	{0x1F11B, 0, 3 | DECOMP_COMPAT, 4889},
-	{0x1F11C, 0, 3 | DECOMP_COMPAT, 4892},
-	{0x1F11D, 0, 3 | DECOMP_COMPAT, 4895},
-	{0x1F11E, 0, 3 | DECOMP_COMPAT, 4898},
-	{0x1F11F, 0, 3 | DECOMP_COMPAT, 4901},
-	{0x1F120, 0, 3 | DECOMP_COMPAT, 4904},
-	{0x1F121, 0, 3 | DECOMP_COMPAT, 4907},
-	{0x1F122, 0, 3 | DECOMP_COMPAT, 4910},
-	{0x1F123, 0, 3 | DECOMP_COMPAT, 4913},
-	{0x1F124, 0, 3 | DECOMP_COMPAT, 4916},
-	{0x1F125, 0, 3 | DECOMP_COMPAT, 4919},
-	{0x1F126, 0, 3 | DECOMP_COMPAT, 4922},
-	{0x1F127, 0, 3 | DECOMP_COMPAT, 4925},
-	{0x1F128, 0, 3 | DECOMP_COMPAT, 4928},
-	{0x1F129, 0, 3 | DECOMP_COMPAT, 4931},
-	{0x1F12A, 0, 3 | DECOMP_COMPAT, 4934},
-	{0x1F12B, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0043},
-	{0x1F12C, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0052},
-	{0x1F12D, 0, 2 | DECOMP_COMPAT, 4937},
-	{0x1F12E, 0, 2 | DECOMP_COMPAT, 4939},
-	{0x1F130, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0041},
-	{0x1F131, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0042},
-	{0x1F132, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0043},
-	{0x1F133, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0044},
-	{0x1F134, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0045},
-	{0x1F135, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0046},
-	{0x1F136, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0047},
-	{0x1F137, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0048},
-	{0x1F138, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0049},
-	{0x1F139, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x004A},
-	{0x1F13A, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x004B},
-	{0x1F13B, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x004C},
-	{0x1F13C, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x004D},
-	{0x1F13D, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x004E},
-	{0x1F13E, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x004F},
-	{0x1F13F, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0050},
-	{0x1F140, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0051},
-	{0x1F141, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0052},
-	{0x1F142, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0053},
-	{0x1F143, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0054},
-	{0x1F144, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0055},
-	{0x1F145, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0056},
-	{0x1F146, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0057},
-	{0x1F147, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0058},
-	{0x1F148, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0059},
-	{0x1F149, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x005A},
-	{0x1F14A, 0, 2 | DECOMP_COMPAT, 4941},
-	{0x1F14B, 0, 2 | DECOMP_COMPAT, 4943},
-	{0x1F14C, 0, 2 | DECOMP_COMPAT, 4945},
-	{0x1F14D, 0, 2 | DECOMP_COMPAT, 4947},
-	{0x1F14E, 0, 3 | DECOMP_COMPAT, 4949},
-	{0x1F14F, 0, 2 | DECOMP_COMPAT, 4952},
-	{0x1F16A, 0, 2 | DECOMP_COMPAT, 4954},
-	{0x1F16B, 0, 2 | DECOMP_COMPAT, 4956},
-	{0x1F16C, 0, 2 | DECOMP_COMPAT, 4958},
-	{0x1F190, 0, 2 | DECOMP_COMPAT, 4960},
-	{0x1F200, 0, 2 | DECOMP_COMPAT, 4962},
-	{0x1F201, 0, 2 | DECOMP_COMPAT, 4964},
-	{0x1F202, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x30B5},
-	{0x1F210, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x624B},
-	{0x1F211, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x5B57},
-	{0x1F212, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x53CC},
-	{0x1F213, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x30C7},
-	{0x1F214, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x4E8C},
-	{0x1F215, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x591A},
-	{0x1F216, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x89E3},
-	{0x1F217, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x5929},
-	{0x1F218, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x4EA4},
-	{0x1F219, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x6620},
-	{0x1F21A, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x7121},
-	{0x1F21B, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x6599},
-	{0x1F21C, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x524D},
-	{0x1F21D, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x5F8C},
-	{0x1F21E, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x518D},
-	{0x1F21F, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x65B0},
-	{0x1F220, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x521D},
-	{0x1F221, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x7D42},
-	{0x1F222, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x751F},
-	{0x1F223, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x8CA9},
-	{0x1F224, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x58F0},
-	{0x1F225, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x5439},
-	{0x1F226, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x6F14},
-	{0x1F227, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x6295},
-	{0x1F228, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x6355},
-	{0x1F229, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x4E00},
-	{0x1F22A, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x4E09},
-	{0x1F22B, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x904A},
-	{0x1F22C, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x5DE6},
-	{0x1F22D, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x4E2D},
-	{0x1F22E, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x53F3},
-	{0x1F22F, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x6307},
-	{0x1F230, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x8D70},
-	{0x1F231, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x6253},
-	{0x1F232, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x7981},
-	{0x1F233, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x7A7A},
-	{0x1F234, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x5408},
-	{0x1F235, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x6E80},
-	{0x1F236, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x6709},
-	{0x1F237, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x6708},
-	{0x1F238, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x7533},
-	{0x1F239, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x5272},
-	{0x1F23A, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x55B6},
-	{0x1F23B, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x914D},
-	{0x1F240, 0, 3 | DECOMP_COMPAT, 4966},
-	{0x1F241, 0, 3 | DECOMP_COMPAT, 4969},
-	{0x1F242, 0, 3 | DECOMP_COMPAT, 4972},
-	{0x1F243, 0, 3 | DECOMP_COMPAT, 4975},
-	{0x1F244, 0, 3 | DECOMP_COMPAT, 4978},
-	{0x1F245, 0, 3 | DECOMP_COMPAT, 4981},
-	{0x1F246, 0, 3 | DECOMP_COMPAT, 4984},
-	{0x1F247, 0, 3 | DECOMP_COMPAT, 4987},
-	{0x1F248, 0, 3 | DECOMP_COMPAT, 4990},
-	{0x1F250, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x5F97},
-	{0x1F251, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x53EF},
-	{0x1FBF0, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0030},
-	{0x1FBF1, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0031},
-	{0x1FBF2, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0032},
-	{0x1FBF3, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0033},
-	{0x1FBF4, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0034},
-	{0x1FBF5, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0035},
-	{0x1FBF6, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0036},
-	{0x1FBF7, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0037},
-	{0x1FBF8, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0038},
-	{0x1FBF9, 0, 1 | DECOMP_COMPAT | DECOMP_INLINE, 0x0039},
-	{0x2F800, 0, 1 | DECOMP_INLINE, 0x4E3D},
-	{0x2F801, 0, 1 | DECOMP_INLINE, 0x4E38},
-	{0x2F802, 0, 1 | DECOMP_INLINE, 0x4E41},
-	{0x2F803, 0, 1, 4993},
-	{0x2F804, 0, 1 | DECOMP_INLINE, 0x4F60},
-	{0x2F805, 0, 1 | DECOMP_INLINE, 0x4FAE},
-	{0x2F806, 0, 1 | DECOMP_INLINE, 0x4FBB},
-	{0x2F807, 0, 1 | DECOMP_INLINE, 0x5002},
-	{0x2F808, 0, 1 | DECOMP_INLINE, 0x507A},
-	{0x2F809, 0, 1 | DECOMP_INLINE, 0x5099},
-	{0x2F80A, 0, 1 | DECOMP_INLINE, 0x50E7},
-	{0x2F80B, 0, 1 | DECOMP_INLINE, 0x50CF},
-	{0x2F80C, 0, 1 | DECOMP_INLINE, 0x349E},
-	{0x2F80D, 0, 1, 4994},
-	{0x2F80E, 0, 1 | DECOMP_INLINE, 0x514D},
-	{0x2F80F, 0, 1 | DECOMP_INLINE, 0x5154},
-	{0x2F810, 0, 1 | DECOMP_INLINE, 0x5164},
-	{0x2F811, 0, 1 | DECOMP_INLINE, 0x5177},
-	{0x2F812, 0, 1, 4995},
-	{0x2F813, 0, 1 | DECOMP_INLINE, 0x34B9},
-	{0x2F814, 0, 1 | DECOMP_INLINE, 0x5167},
-	{0x2F815, 0, 1 | DECOMP_INLINE, 0x518D},
-	{0x2F816, 0, 1, 4996},
-	{0x2F817, 0, 1 | DECOMP_INLINE, 0x5197},
-	{0x2F818, 0, 1 | DECOMP_INLINE, 0x51A4},
-	{0x2F819, 0, 1 | DECOMP_INLINE, 0x4ECC},
-	{0x2F81A, 0, 1 | DECOMP_INLINE, 0x51AC},
-	{0x2F81B, 0, 1 | DECOMP_INLINE, 0x51B5},
-	{0x2F81C, 0, 1, 4997},
-	{0x2F81D, 0, 1 | DECOMP_INLINE, 0x51F5},
-	{0x2F81E, 0, 1 | DECOMP_INLINE, 0x5203},
-	{0x2F81F, 0, 1 | DECOMP_INLINE, 0x34DF},
-	{0x2F820, 0, 1 | DECOMP_INLINE, 0x523B},
-	{0x2F821, 0, 1 | DECOMP_INLINE, 0x5246},
-	{0x2F822, 0, 1 | DECOMP_INLINE, 0x5272},
-	{0x2F823, 0, 1 | DECOMP_INLINE, 0x5277},
-	{0x2F824, 0, 1 | DECOMP_INLINE, 0x3515},
-	{0x2F825, 0, 1 | DECOMP_INLINE, 0x52C7},
-	{0x2F826, 0, 1 | DECOMP_INLINE, 0x52C9},
-	{0x2F827, 0, 1 | DECOMP_INLINE, 0x52E4},
-	{0x2F828, 0, 1 | DECOMP_INLINE, 0x52FA},
-	{0x2F829, 0, 1 | DECOMP_INLINE, 0x5305},
-	{0x2F82A, 0, 1 | DECOMP_INLINE, 0x5306},
-	{0x2F82B, 0, 1 | DECOMP_INLINE, 0x5317},
-	{0x2F82C, 0, 1 | DECOMP_INLINE, 0x5349},
-	{0x2F82D, 0, 1 | DECOMP_INLINE, 0x5351},
-	{0x2F82E, 0, 1 | DECOMP_INLINE, 0x535A},
-	{0x2F82F, 0, 1 | DECOMP_INLINE, 0x5373},
-	{0x2F830, 0, 1 | DECOMP_INLINE, 0x537D},
-	{0x2F831, 0, 1 | DECOMP_INLINE, 0x537F},
-	{0x2F832, 0, 1 | DECOMP_INLINE, 0x537F},
-	{0x2F833, 0, 1 | DECOMP_INLINE, 0x537F},
-	{0x2F834, 0, 1, 4998},
-	{0x2F835, 0, 1 | DECOMP_INLINE, 0x7070},
-	{0x2F836, 0, 1 | DECOMP_INLINE, 0x53CA},
-	{0x2F837, 0, 1 | DECOMP_INLINE, 0x53DF},
-	{0x2F838, 0, 1, 4999},
-	{0x2F839, 0, 1 | DECOMP_INLINE, 0x53EB},
-	{0x2F83A, 0, 1 | DECOMP_INLINE, 0x53F1},
-	{0x2F83B, 0, 1 | DECOMP_INLINE, 0x5406},
-	{0x2F83C, 0, 1 | DECOMP_INLINE, 0x549E},
-	{0x2F83D, 0, 1 | DECOMP_INLINE, 0x5438},
-	{0x2F83E, 0, 1 | DECOMP_INLINE, 0x5448},
-	{0x2F83F, 0, 1 | DECOMP_INLINE, 0x5468},
-	{0x2F840, 0, 1 | DECOMP_INLINE, 0x54A2},
-	{0x2F841, 0, 1 | DECOMP_INLINE, 0x54F6},
-	{0x2F842, 0, 1 | DECOMP_INLINE, 0x5510},
-	{0x2F843, 0, 1 | DECOMP_INLINE, 0x5553},
-	{0x2F844, 0, 1 | DECOMP_INLINE, 0x5563},
-	{0x2F845, 0, 1 | DECOMP_INLINE, 0x5584},
-	{0x2F846, 0, 1 | DECOMP_INLINE, 0x5584},
-	{0x2F847, 0, 1 | DECOMP_INLINE, 0x5599},
-	{0x2F848, 0, 1 | DECOMP_INLINE, 0x55AB},
-	{0x2F849, 0, 1 | DECOMP_INLINE, 0x55B3},
-	{0x2F84A, 0, 1 | DECOMP_INLINE, 0x55C2},
-	{0x2F84B, 0, 1 | DECOMP_INLINE, 0x5716},
-	{0x2F84C, 0, 1 | DECOMP_INLINE, 0x5606},
-	{0x2F84D, 0, 1 | DECOMP_INLINE, 0x5717},
-	{0x2F84E, 0, 1 | DECOMP_INLINE, 0x5651},
-	{0x2F84F, 0, 1 | DECOMP_INLINE, 0x5674},
-	{0x2F850, 0, 1 | DECOMP_INLINE, 0x5207},
-	{0x2F851, 0, 1 | DECOMP_INLINE, 0x58EE},
-	{0x2F852, 0, 1 | DECOMP_INLINE, 0x57CE},
-	{0x2F853, 0, 1 | DECOMP_INLINE, 0x57F4},
-	{0x2F854, 0, 1 | DECOMP_INLINE, 0x580D},
-	{0x2F855, 0, 1 | DECOMP_INLINE, 0x578B},
-	{0x2F856, 0, 1 | DECOMP_INLINE, 0x5832},
-	{0x2F857, 0, 1 | DECOMP_INLINE, 0x5831},
-	{0x2F858, 0, 1 | DECOMP_INLINE, 0x58AC},
-	{0x2F859, 0, 1, 5000},
-	{0x2F85A, 0, 1 | DECOMP_INLINE, 0x58F2},
-	{0x2F85B, 0, 1 | DECOMP_INLINE, 0x58F7},
-	{0x2F85C, 0, 1 | DECOMP_INLINE, 0x5906},
-	{0x2F85D, 0, 1 | DECOMP_INLINE, 0x591A},
-	{0x2F85E, 0, 1 | DECOMP_INLINE, 0x5922},
-	{0x2F85F, 0, 1 | DECOMP_INLINE, 0x5962},
-	{0x2F860, 0, 1, 5001},
-	{0x2F861, 0, 1, 5002},
-	{0x2F862, 0, 1 | DECOMP_INLINE, 0x59EC},
-	{0x2F863, 0, 1 | DECOMP_INLINE, 0x5A1B},
-	{0x2F864, 0, 1 | DECOMP_INLINE, 0x5A27},
-	{0x2F865, 0, 1 | DECOMP_INLINE, 0x59D8},
-	{0x2F866, 0, 1 | DECOMP_INLINE, 0x5A66},
-	{0x2F867, 0, 1 | DECOMP_INLINE, 0x36EE},
-	{0x2F868, 0, 1 | DECOMP_INLINE, 0x36FC},
-	{0x2F869, 0, 1 | DECOMP_INLINE, 0x5B08},
-	{0x2F86A, 0, 1 | DECOMP_INLINE, 0x5B3E},
-	{0x2F86B, 0, 1 | DECOMP_INLINE, 0x5B3E},
-	{0x2F86C, 0, 1, 5003},
-	{0x2F86D, 0, 1 | DECOMP_INLINE, 0x5BC3},
-	{0x2F86E, 0, 1 | DECOMP_INLINE, 0x5BD8},
-	{0x2F86F, 0, 1 | DECOMP_INLINE, 0x5BE7},
-	{0x2F870, 0, 1 | DECOMP_INLINE, 0x5BF3},
-	{0x2F871, 0, 1, 5004},
-	{0x2F872, 0, 1 | DECOMP_INLINE, 0x5BFF},
-	{0x2F873, 0, 1 | DECOMP_INLINE, 0x5C06},
-	{0x2F874, 0, 1 | DECOMP_INLINE, 0x5F53},
-	{0x2F875, 0, 1 | DECOMP_INLINE, 0x5C22},
-	{0x2F876, 0, 1 | DECOMP_INLINE, 0x3781},
-	{0x2F877, 0, 1 | DECOMP_INLINE, 0x5C60},
-	{0x2F878, 0, 1 | DECOMP_INLINE, 0x5C6E},
-	{0x2F879, 0, 1 | DECOMP_INLINE, 0x5CC0},
-	{0x2F87A, 0, 1 | DECOMP_INLINE, 0x5C8D},
-	{0x2F87B, 0, 1, 5005},
-	{0x2F87C, 0, 1 | DECOMP_INLINE, 0x5D43},
-	{0x2F87D, 0, 1, 5006},
-	{0x2F87E, 0, 1 | DECOMP_INLINE, 0x5D6E},
-	{0x2F87F, 0, 1 | DECOMP_INLINE, 0x5D6B},
-	{0x2F880, 0, 1 | DECOMP_INLINE, 0x5D7C},
-	{0x2F881, 0, 1 | DECOMP_INLINE, 0x5DE1},
-	{0x2F882, 0, 1 | DECOMP_INLINE, 0x5DE2},
-	{0x2F883, 0, 1 | DECOMP_INLINE, 0x382F},
-	{0x2F884, 0, 1 | DECOMP_INLINE, 0x5DFD},
-	{0x2F885, 0, 1 | DECOMP_INLINE, 0x5E28},
-	{0x2F886, 0, 1 | DECOMP_INLINE, 0x5E3D},
-	{0x2F887, 0, 1 | DECOMP_INLINE, 0x5E69},
-	{0x2F888, 0, 1 | DECOMP_INLINE, 0x3862},
-	{0x2F889, 0, 1, 5007},
-	{0x2F88A, 0, 1 | DECOMP_INLINE, 0x387C},
-	{0x2F88B, 0, 1 | DECOMP_INLINE, 0x5EB0},
-	{0x2F88C, 0, 1 | DECOMP_INLINE, 0x5EB3},
-	{0x2F88D, 0, 1 | DECOMP_INLINE, 0x5EB6},
-	{0x2F88E, 0, 1 | DECOMP_INLINE, 0x5ECA},
-	{0x2F88F, 0, 1, 5008},
-	{0x2F890, 0, 1 | DECOMP_INLINE, 0x5EFE},
-	{0x2F891, 0, 1, 5009},
-	{0x2F892, 0, 1, 5010},
-	{0x2F893, 0, 1 | DECOMP_INLINE, 0x8201},
-	{0x2F894, 0, 1 | DECOMP_INLINE, 0x5F22},
-	{0x2F895, 0, 1 | DECOMP_INLINE, 0x5F22},
-	{0x2F896, 0, 1 | DECOMP_INLINE, 0x38C7},
-	{0x2F897, 0, 1, 5011},
-	{0x2F898, 0, 1, 5012},
-	{0x2F899, 0, 1 | DECOMP_INLINE, 0x5F62},
-	{0x2F89A, 0, 1 | DECOMP_INLINE, 0x5F6B},
-	{0x2F89B, 0, 1 | DECOMP_INLINE, 0x38E3},
-	{0x2F89C, 0, 1 | DECOMP_INLINE, 0x5F9A},
-	{0x2F89D, 0, 1 | DECOMP_INLINE, 0x5FCD},
-	{0x2F89E, 0, 1 | DECOMP_INLINE, 0x5FD7},
-	{0x2F89F, 0, 1 | DECOMP_INLINE, 0x5FF9},
-	{0x2F8A0, 0, 1 | DECOMP_INLINE, 0x6081},
-	{0x2F8A1, 0, 1 | DECOMP_INLINE, 0x393A},
-	{0x2F8A2, 0, 1 | DECOMP_INLINE, 0x391C},
-	{0x2F8A3, 0, 1 | DECOMP_INLINE, 0x6094},
-	{0x2F8A4, 0, 1, 5013},
-	{0x2F8A5, 0, 1 | DECOMP_INLINE, 0x60C7},
-	{0x2F8A6, 0, 1 | DECOMP_INLINE, 0x6148},
-	{0x2F8A7, 0, 1 | DECOMP_INLINE, 0x614C},
-	{0x2F8A8, 0, 1 | DECOMP_INLINE, 0x614E},
-	{0x2F8A9, 0, 1 | DECOMP_INLINE, 0x614C},
-	{0x2F8AA, 0, 1 | DECOMP_INLINE, 0x617A},
-	{0x2F8AB, 0, 1 | DECOMP_INLINE, 0x618E},
-	{0x2F8AC, 0, 1 | DECOMP_INLINE, 0x61B2},
-	{0x2F8AD, 0, 1 | DECOMP_INLINE, 0x61A4},
-	{0x2F8AE, 0, 1 | DECOMP_INLINE, 0x61AF},
-	{0x2F8AF, 0, 1 | DECOMP_INLINE, 0x61DE},
-	{0x2F8B0, 0, 1 | DECOMP_INLINE, 0x61F2},
-	{0x2F8B1, 0, 1 | DECOMP_INLINE, 0x61F6},
-	{0x2F8B2, 0, 1 | DECOMP_INLINE, 0x6210},
-	{0x2F8B3, 0, 1 | DECOMP_INLINE, 0x621B},
-	{0x2F8B4, 0, 1 | DECOMP_INLINE, 0x625D},
-	{0x2F8B5, 0, 1 | DECOMP_INLINE, 0x62B1},
-	{0x2F8B6, 0, 1 | DECOMP_INLINE, 0x62D4},
-	{0x2F8B7, 0, 1 | DECOMP_INLINE, 0x6350},
-	{0x2F8B8, 0, 1, 5014},
-	{0x2F8B9, 0, 1 | DECOMP_INLINE, 0x633D},
-	{0x2F8BA, 0, 1 | DECOMP_INLINE, 0x62FC},
-	{0x2F8BB, 0, 1 | DECOMP_INLINE, 0x6368},
-	{0x2F8BC, 0, 1 | DECOMP_INLINE, 0x6383},
-	{0x2F8BD, 0, 1 | DECOMP_INLINE, 0x63E4},
-	{0x2F8BE, 0, 1, 5015},
-	{0x2F8BF, 0, 1 | DECOMP_INLINE, 0x6422},
-	{0x2F8C0, 0, 1 | DECOMP_INLINE, 0x63C5},
-	{0x2F8C1, 0, 1 | DECOMP_INLINE, 0x63A9},
-	{0x2F8C2, 0, 1 | DECOMP_INLINE, 0x3A2E},
-	{0x2F8C3, 0, 1 | DECOMP_INLINE, 0x6469},
-	{0x2F8C4, 0, 1 | DECOMP_INLINE, 0x647E},
-	{0x2F8C5, 0, 1 | DECOMP_INLINE, 0x649D},
-	{0x2F8C6, 0, 1 | DECOMP_INLINE, 0x6477},
-	{0x2F8C7, 0, 1 | DECOMP_INLINE, 0x3A6C},
-	{0x2F8C8, 0, 1 | DECOMP_INLINE, 0x654F},
-	{0x2F8C9, 0, 1 | DECOMP_INLINE, 0x656C},
-	{0x2F8CA, 0, 1, 5016},
-	{0x2F8CB, 0, 1 | DECOMP_INLINE, 0x65E3},
-	{0x2F8CC, 0, 1 | DECOMP_INLINE, 0x66F8},
-	{0x2F8CD, 0, 1 | DECOMP_INLINE, 0x6649},
-	{0x2F8CE, 0, 1 | DECOMP_INLINE, 0x3B19},
-	{0x2F8CF, 0, 1 | DECOMP_INLINE, 0x6691},
-	{0x2F8D0, 0, 1 | DECOMP_INLINE, 0x3B08},
-	{0x2F8D1, 0, 1 | DECOMP_INLINE, 0x3AE4},
-	{0x2F8D2, 0, 1 | DECOMP_INLINE, 0x5192},
-	{0x2F8D3, 0, 1 | DECOMP_INLINE, 0x5195},
-	{0x2F8D4, 0, 1 | DECOMP_INLINE, 0x6700},
-	{0x2F8D5, 0, 1 | DECOMP_INLINE, 0x669C},
-	{0x2F8D6, 0, 1 | DECOMP_INLINE, 0x80AD},
-	{0x2F8D7, 0, 1 | DECOMP_INLINE, 0x43D9},
-	{0x2F8D8, 0, 1 | DECOMP_INLINE, 0x6717},
-	{0x2F8D9, 0, 1 | DECOMP_INLINE, 0x671B},
-	{0x2F8DA, 0, 1 | DECOMP_INLINE, 0x6721},
-	{0x2F8DB, 0, 1 | DECOMP_INLINE, 0x675E},
-	{0x2F8DC, 0, 1 | DECOMP_INLINE, 0x6753},
-	{0x2F8DD, 0, 1, 5017},
-	{0x2F8DE, 0, 1 | DECOMP_INLINE, 0x3B49},
-	{0x2F8DF, 0, 1 | DECOMP_INLINE, 0x67FA},
-	{0x2F8E0, 0, 1 | DECOMP_INLINE, 0x6785},
-	{0x2F8E1, 0, 1 | DECOMP_INLINE, 0x6852},
-	{0x2F8E2, 0, 1 | DECOMP_INLINE, 0x6885},
-	{0x2F8E3, 0, 1, 5018},
-	{0x2F8E4, 0, 1 | DECOMP_INLINE, 0x688E},
-	{0x2F8E5, 0, 1 | DECOMP_INLINE, 0x681F},
-	{0x2F8E6, 0, 1 | DECOMP_INLINE, 0x6914},
-	{0x2F8E7, 0, 1 | DECOMP_INLINE, 0x3B9D},
-	{0x2F8E8, 0, 1 | DECOMP_INLINE, 0x6942},
-	{0x2F8E9, 0, 1 | DECOMP_INLINE, 0x69A3},
-	{0x2F8EA, 0, 1 | DECOMP_INLINE, 0x69EA},
-	{0x2F8EB, 0, 1 | DECOMP_INLINE, 0x6AA8},
-	{0x2F8EC, 0, 1, 5019},
-	{0x2F8ED, 0, 1 | DECOMP_INLINE, 0x6ADB},
-	{0x2F8EE, 0, 1 | DECOMP_INLINE, 0x3C18},
-	{0x2F8EF, 0, 1 | DECOMP_INLINE, 0x6B21},
-	{0x2F8F0, 0, 1, 5020},
-	{0x2F8F1, 0, 1 | DECOMP_INLINE, 0x6B54},
-	{0x2F8F2, 0, 1 | DECOMP_INLINE, 0x3C4E},
-	{0x2F8F3, 0, 1 | DECOMP_INLINE, 0x6B72},
-	{0x2F8F4, 0, 1 | DECOMP_INLINE, 0x6B9F},
-	{0x2F8F5, 0, 1 | DECOMP_INLINE, 0x6BBA},
-	{0x2F8F6, 0, 1 | DECOMP_INLINE, 0x6BBB},
-	{0x2F8F7, 0, 1, 5021},
-	{0x2F8F8, 0, 1, 5022},
-	{0x2F8F9, 0, 1, 5023},
-	{0x2F8FA, 0, 1 | DECOMP_INLINE, 0x6C4E},
-	{0x2F8FB, 0, 1, 5024},
-	{0x2F8FC, 0, 1 | DECOMP_INLINE, 0x6CBF},
-	{0x2F8FD, 0, 1 | DECOMP_INLINE, 0x6CCD},
-	{0x2F8FE, 0, 1 | DECOMP_INLINE, 0x6C67},
-	{0x2F8FF, 0, 1 | DECOMP_INLINE, 0x6D16},
-	{0x2F900, 0, 1 | DECOMP_INLINE, 0x6D3E},
-	{0x2F901, 0, 1 | DECOMP_INLINE, 0x6D77},
-	{0x2F902, 0, 1 | DECOMP_INLINE, 0x6D41},
-	{0x2F903, 0, 1 | DECOMP_INLINE, 0x6D69},
-	{0x2F904, 0, 1 | DECOMP_INLINE, 0x6D78},
-	{0x2F905, 0, 1 | DECOMP_INLINE, 0x6D85},
-	{0x2F906, 0, 1, 5025},
-	{0x2F907, 0, 1 | DECOMP_INLINE, 0x6D34},
-	{0x2F908, 0, 1 | DECOMP_INLINE, 0x6E2F},
-	{0x2F909, 0, 1 | DECOMP_INLINE, 0x6E6E},
-	{0x2F90A, 0, 1 | DECOMP_INLINE, 0x3D33},
-	{0x2F90B, 0, 1 | DECOMP_INLINE, 0x6ECB},
-	{0x2F90C, 0, 1 | DECOMP_INLINE, 0x6EC7},
-	{0x2F90D, 0, 1, 5026},
-	{0x2F90E, 0, 1 | DECOMP_INLINE, 0x6DF9},
-	{0x2F90F, 0, 1 | DECOMP_INLINE, 0x6F6E},
-	{0x2F910, 0, 1, 5027},
-	{0x2F911, 0, 1, 5028},
-	{0x2F912, 0, 1 | DECOMP_INLINE, 0x6FC6},
-	{0x2F913, 0, 1 | DECOMP_INLINE, 0x7039},
-	{0x2F914, 0, 1 | DECOMP_INLINE, 0x701E},
-	{0x2F915, 0, 1 | DECOMP_INLINE, 0x701B},
-	{0x2F916, 0, 1 | DECOMP_INLINE, 0x3D96},
-	{0x2F917, 0, 1 | DECOMP_INLINE, 0x704A},
-	{0x2F918, 0, 1 | DECOMP_INLINE, 0x707D},
-	{0x2F919, 0, 1 | DECOMP_INLINE, 0x7077},
-	{0x2F91A, 0, 1 | DECOMP_INLINE, 0x70AD},
-	{0x2F91B, 0, 1, 5029},
-	{0x2F91C, 0, 1 | DECOMP_INLINE, 0x7145},
-	{0x2F91D, 0, 1, 5030},
-	{0x2F91E, 0, 1 | DECOMP_INLINE, 0x719C},
-	{0x2F91F, 0, 1, 5031},
-	{0x2F920, 0, 1 | DECOMP_INLINE, 0x7228},
-	{0x2F921, 0, 1 | DECOMP_INLINE, 0x7235},
-	{0x2F922, 0, 1 | DECOMP_INLINE, 0x7250},
-	{0x2F923, 0, 1, 5032},
-	{0x2F924, 0, 1 | DECOMP_INLINE, 0x7280},
-	{0x2F925, 0, 1 | DECOMP_INLINE, 0x7295},
-	{0x2F926, 0, 1, 5033},
-	{0x2F927, 0, 1, 5034},
-	{0x2F928, 0, 1 | DECOMP_INLINE, 0x737A},
-	{0x2F929, 0, 1 | DECOMP_INLINE, 0x738B},
-	{0x2F92A, 0, 1 | DECOMP_INLINE, 0x3EAC},
-	{0x2F92B, 0, 1 | DECOMP_INLINE, 0x73A5},
-	{0x2F92C, 0, 1 | DECOMP_INLINE, 0x3EB8},
-	{0x2F92D, 0, 1 | DECOMP_INLINE, 0x3EB8},
-	{0x2F92E, 0, 1 | DECOMP_INLINE, 0x7447},
-	{0x2F92F, 0, 1 | DECOMP_INLINE, 0x745C},
-	{0x2F930, 0, 1 | DECOMP_INLINE, 0x7471},
-	{0x2F931, 0, 1 | DECOMP_INLINE, 0x7485},
-	{0x2F932, 0, 1 | DECOMP_INLINE, 0x74CA},
-	{0x2F933, 0, 1 | DECOMP_INLINE, 0x3F1B},
-	{0x2F934, 0, 1 | DECOMP_INLINE, 0x7524},
-	{0x2F935, 0, 1, 5035},
-	{0x2F936, 0, 1 | DECOMP_INLINE, 0x753E},
-	{0x2F937, 0, 1, 5036},
-	{0x2F938, 0, 1 | DECOMP_INLINE, 0x7570},
-	{0x2F939, 0, 1, 5037},
-	{0x2F93A, 0, 1 | DECOMP_INLINE, 0x7610},
-	{0x2F93B, 0, 1, 5038},
-	{0x2F93C, 0, 1, 5039},
-	{0x2F93D, 0, 1, 5040},
-	{0x2F93E, 0, 1 | DECOMP_INLINE, 0x3FFC},
-	{0x2F93F, 0, 1 | DECOMP_INLINE, 0x4008},
-	{0x2F940, 0, 1 | DECOMP_INLINE, 0x76F4},
-	{0x2F941, 0, 1, 5041},
-	{0x2F942, 0, 1, 5042},
-	{0x2F943, 0, 1, 5043},
-	{0x2F944, 0, 1, 5044},
-	{0x2F945, 0, 1 | DECOMP_INLINE, 0x771E},
-	{0x2F946, 0, 1 | DECOMP_INLINE, 0x771F},
-	{0x2F947, 0, 1 | DECOMP_INLINE, 0x771F},
-	{0x2F948, 0, 1 | DECOMP_INLINE, 0x774A},
-	{0x2F949, 0, 1 | DECOMP_INLINE, 0x4039},
-	{0x2F94A, 0, 1 | DECOMP_INLINE, 0x778B},
-	{0x2F94B, 0, 1 | DECOMP_INLINE, 0x4046},
-	{0x2F94C, 0, 1 | DECOMP_INLINE, 0x4096},
-	{0x2F94D, 0, 1, 5045},
-	{0x2F94E, 0, 1 | DECOMP_INLINE, 0x784E},
-	{0x2F94F, 0, 1 | DECOMP_INLINE, 0x788C},
-	{0x2F950, 0, 1 | DECOMP_INLINE, 0x78CC},
-	{0x2F951, 0, 1 | DECOMP_INLINE, 0x40E3},
-	{0x2F952, 0, 1, 5046},
-	{0x2F953, 0, 1 | DECOMP_INLINE, 0x7956},
-	{0x2F954, 0, 1, 5047},
-	{0x2F955, 0, 1, 5048},
-	{0x2F956, 0, 1 | DECOMP_INLINE, 0x798F},
-	{0x2F957, 0, 1 | DECOMP_INLINE, 0x79EB},
-	{0x2F958, 0, 1 | DECOMP_INLINE, 0x412F},
-	{0x2F959, 0, 1 | DECOMP_INLINE, 0x7A40},
-	{0x2F95A, 0, 1 | DECOMP_INLINE, 0x7A4A},
-	{0x2F95B, 0, 1 | DECOMP_INLINE, 0x7A4F},
-	{0x2F95C, 0, 1, 5049},
-	{0x2F95D, 0, 1, 5050},
-	{0x2F95E, 0, 1, 5051},
-	{0x2F95F, 0, 1 | DECOMP_INLINE, 0x7AEE},
-	{0x2F960, 0, 1 | DECOMP_INLINE, 0x4202},
-	{0x2F961, 0, 1, 5052},
-	{0x2F962, 0, 1 | DECOMP_INLINE, 0x7BC6},
-	{0x2F963, 0, 1 | DECOMP_INLINE, 0x7BC9},
-	{0x2F964, 0, 1 | DECOMP_INLINE, 0x4227},
-	{0x2F965, 0, 1, 5053},
-	{0x2F966, 0, 1 | DECOMP_INLINE, 0x7CD2},
-	{0x2F967, 0, 1 | DECOMP_INLINE, 0x42A0},
-	{0x2F968, 0, 1 | DECOMP_INLINE, 0x7CE8},
-	{0x2F969, 0, 1 | DECOMP_INLINE, 0x7CE3},
-	{0x2F96A, 0, 1 | DECOMP_INLINE, 0x7D00},
-	{0x2F96B, 0, 1, 5054},
-	{0x2F96C, 0, 1 | DECOMP_INLINE, 0x7D63},
-	{0x2F96D, 0, 1 | DECOMP_INLINE, 0x4301},
-	{0x2F96E, 0, 1 | DECOMP_INLINE, 0x7DC7},
-	{0x2F96F, 0, 1 | DECOMP_INLINE, 0x7E02},
-	{0x2F970, 0, 1 | DECOMP_INLINE, 0x7E45},
-	{0x2F971, 0, 1 | DECOMP_INLINE, 0x4334},
-	{0x2F972, 0, 1, 5055},
-	{0x2F973, 0, 1, 5056},
-	{0x2F974, 0, 1 | DECOMP_INLINE, 0x4359},
-	{0x2F975, 0, 1, 5057},
-	{0x2F976, 0, 1 | DECOMP_INLINE, 0x7F7A},
-	{0x2F977, 0, 1, 5058},
-	{0x2F978, 0, 1 | DECOMP_INLINE, 0x7F95},
-	{0x2F979, 0, 1 | DECOMP_INLINE, 0x7FFA},
-	{0x2F97A, 0, 1 | DECOMP_INLINE, 0x8005},
-	{0x2F97B, 0, 1, 5059},
-	{0x2F97C, 0, 1, 5060},
-	{0x2F97D, 0, 1 | DECOMP_INLINE, 0x8060},
-	{0x2F97E, 0, 1, 5061},
-	{0x2F97F, 0, 1 | DECOMP_INLINE, 0x8070},
-	{0x2F980, 0, 1, 5062},
-	{0x2F981, 0, 1 | DECOMP_INLINE, 0x43D5},
-	{0x2F982, 0, 1 | DECOMP_INLINE, 0x80B2},
-	{0x2F983, 0, 1 | DECOMP_INLINE, 0x8103},
-	{0x2F984, 0, 1 | DECOMP_INLINE, 0x440B},
-	{0x2F985, 0, 1 | DECOMP_INLINE, 0x813E},
-	{0x2F986, 0, 1 | DECOMP_INLINE, 0x5AB5},
-	{0x2F987, 0, 1, 5063},
-	{0x2F988, 0, 1, 5064},
-	{0x2F989, 0, 1, 5065},
-	{0x2F98A, 0, 1, 5066},
-	{0x2F98B, 0, 1 | DECOMP_INLINE, 0x8201},
-	{0x2F98C, 0, 1 | DECOMP_INLINE, 0x8204},
-	{0x2F98D, 0, 1 | DECOMP_INLINE, 0x8F9E},
-	{0x2F98E, 0, 1 | DECOMP_INLINE, 0x446B},
-	{0x2F98F, 0, 1 | DECOMP_INLINE, 0x8291},
-	{0x2F990, 0, 1 | DECOMP_INLINE, 0x828B},
-	{0x2F991, 0, 1 | DECOMP_INLINE, 0x829D},
-	{0x2F992, 0, 1 | DECOMP_INLINE, 0x52B3},
-	{0x2F993, 0, 1 | DECOMP_INLINE, 0x82B1},
-	{0x2F994, 0, 1 | DECOMP_INLINE, 0x82B3},
-	{0x2F995, 0, 1 | DECOMP_INLINE, 0x82BD},
-	{0x2F996, 0, 1 | DECOMP_INLINE, 0x82E6},
-	{0x2F997, 0, 1, 5067},
-	{0x2F998, 0, 1 | DECOMP_INLINE, 0x82E5},
-	{0x2F999, 0, 1 | DECOMP_INLINE, 0x831D},
-	{0x2F99A, 0, 1 | DECOMP_INLINE, 0x8363},
-	{0x2F99B, 0, 1 | DECOMP_INLINE, 0x83AD},
-	{0x2F99C, 0, 1 | DECOMP_INLINE, 0x8323},
-	{0x2F99D, 0, 1 | DECOMP_INLINE, 0x83BD},
-	{0x2F99E, 0, 1 | DECOMP_INLINE, 0x83E7},
-	{0x2F99F, 0, 1 | DECOMP_INLINE, 0x8457},
-	{0x2F9A0, 0, 1 | DECOMP_INLINE, 0x8353},
-	{0x2F9A1, 0, 1 | DECOMP_INLINE, 0x83CA},
-	{0x2F9A2, 0, 1 | DECOMP_INLINE, 0x83CC},
-	{0x2F9A3, 0, 1 | DECOMP_INLINE, 0x83DC},
-	{0x2F9A4, 0, 1, 5068},
-	{0x2F9A5, 0, 1, 5069},
-	{0x2F9A6, 0, 1, 5070},
-	{0x2F9A7, 0, 1 | DECOMP_INLINE, 0x452B},
-	{0x2F9A8, 0, 1 | DECOMP_INLINE, 0x84F1},
-	{0x2F9A9, 0, 1 | DECOMP_INLINE, 0x84F3},
-	{0x2F9AA, 0, 1 | DECOMP_INLINE, 0x8516},
-	{0x2F9AB, 0, 1, 5071},
-	{0x2F9AC, 0, 1 | DECOMP_INLINE, 0x8564},
-	{0x2F9AD, 0, 1, 5072},
-	{0x2F9AE, 0, 1 | DECOMP_INLINE, 0x455D},
-	{0x2F9AF, 0, 1 | DECOMP_INLINE, 0x4561},
-	{0x2F9B0, 0, 1, 5073},
-	{0x2F9B1, 0, 1, 5074},
-	{0x2F9B2, 0, 1 | DECOMP_INLINE, 0x456B},
-	{0x2F9B3, 0, 1 | DECOMP_INLINE, 0x8650},
-	{0x2F9B4, 0, 1 | DECOMP_INLINE, 0x865C},
-	{0x2F9B5, 0, 1 | DECOMP_INLINE, 0x8667},
-	{0x2F9B6, 0, 1 | DECOMP_INLINE, 0x8669},
-	{0x2F9B7, 0, 1 | DECOMP_INLINE, 0x86A9},
-	{0x2F9B8, 0, 1 | DECOMP_INLINE, 0x8688},
-	{0x2F9B9, 0, 1 | DECOMP_INLINE, 0x870E},
-	{0x2F9BA, 0, 1 | DECOMP_INLINE, 0x86E2},
-	{0x2F9BB, 0, 1 | DECOMP_INLINE, 0x8779},
-	{0x2F9BC, 0, 1 | DECOMP_INLINE, 0x8728},
-	{0x2F9BD, 0, 1 | DECOMP_INLINE, 0x876B},
-	{0x2F9BE, 0, 1 | DECOMP_INLINE, 0x8786},
-	{0x2F9BF, 0, 1 | DECOMP_INLINE, 0x45D7},
-	{0x2F9C0, 0, 1 | DECOMP_INLINE, 0x87E1},
-	{0x2F9C1, 0, 1 | DECOMP_INLINE, 0x8801},
-	{0x2F9C2, 0, 1 | DECOMP_INLINE, 0x45F9},
-	{0x2F9C3, 0, 1 | DECOMP_INLINE, 0x8860},
-	{0x2F9C4, 0, 1 | DECOMP_INLINE, 0x8863},
-	{0x2F9C5, 0, 1, 5075},
-	{0x2F9C6, 0, 1 | DECOMP_INLINE, 0x88D7},
-	{0x2F9C7, 0, 1 | DECOMP_INLINE, 0x88DE},
-	{0x2F9C8, 0, 1 | DECOMP_INLINE, 0x4635},
-	{0x2F9C9, 0, 1 | DECOMP_INLINE, 0x88FA},
-	{0x2F9CA, 0, 1 | DECOMP_INLINE, 0x34BB},
-	{0x2F9CB, 0, 1, 5076},
-	{0x2F9CC, 0, 1, 5077},
-	{0x2F9CD, 0, 1 | DECOMP_INLINE, 0x46BE},
-	{0x2F9CE, 0, 1 | DECOMP_INLINE, 0x46C7},
-	{0x2F9CF, 0, 1 | DECOMP_INLINE, 0x8AA0},
-	{0x2F9D0, 0, 1 | DECOMP_INLINE, 0x8AED},
-	{0x2F9D1, 0, 1 | DECOMP_INLINE, 0x8B8A},
-	{0x2F9D2, 0, 1 | DECOMP_INLINE, 0x8C55},
-	{0x2F9D3, 0, 1, 5078},
-	{0x2F9D4, 0, 1 | DECOMP_INLINE, 0x8CAB},
-	{0x2F9D5, 0, 1 | DECOMP_INLINE, 0x8CC1},
-	{0x2F9D6, 0, 1 | DECOMP_INLINE, 0x8D1B},
-	{0x2F9D7, 0, 1 | DECOMP_INLINE, 0x8D77},
-	{0x2F9D8, 0, 1, 5079},
-	{0x2F9D9, 0, 1, 5080},
-	{0x2F9DA, 0, 1 | DECOMP_INLINE, 0x8DCB},
-	{0x2F9DB, 0, 1 | DECOMP_INLINE, 0x8DBC},
-	{0x2F9DC, 0, 1 | DECOMP_INLINE, 0x8DF0},
-	{0x2F9DD, 0, 1, 5081},
-	{0x2F9DE, 0, 1 | DECOMP_INLINE, 0x8ED4},
-	{0x2F9DF, 0, 1 | DECOMP_INLINE, 0x8F38},
-	{0x2F9E0, 0, 1, 5082},
-	{0x2F9E1, 0, 1, 5083},
-	{0x2F9E2, 0, 1 | DECOMP_INLINE, 0x9094},
-	{0x2F9E3, 0, 1 | DECOMP_INLINE, 0x90F1},
-	{0x2F9E4, 0, 1 | DECOMP_INLINE, 0x9111},
-	{0x2F9E5, 0, 1, 5084},
-	{0x2F9E6, 0, 1 | DECOMP_INLINE, 0x911B},
-	{0x2F9E7, 0, 1 | DECOMP_INLINE, 0x9238},
-	{0x2F9E8, 0, 1 | DECOMP_INLINE, 0x92D7},
-	{0x2F9E9, 0, 1 | DECOMP_INLINE, 0x92D8},
-	{0x2F9EA, 0, 1 | DECOMP_INLINE, 0x927C},
-	{0x2F9EB, 0, 1 | DECOMP_INLINE, 0x93F9},
-	{0x2F9EC, 0, 1 | DECOMP_INLINE, 0x9415},
-	{0x2F9ED, 0, 1, 5085},
-	{0x2F9EE, 0, 1 | DECOMP_INLINE, 0x958B},
-	{0x2F9EF, 0, 1 | DECOMP_INLINE, 0x4995},
-	{0x2F9F0, 0, 1 | DECOMP_INLINE, 0x95B7},
-	{0x2F9F1, 0, 1, 5086},
-	{0x2F9F2, 0, 1 | DECOMP_INLINE, 0x49E6},
-	{0x2F9F3, 0, 1 | DECOMP_INLINE, 0x96C3},
-	{0x2F9F4, 0, 1 | DECOMP_INLINE, 0x5DB2},
-	{0x2F9F5, 0, 1 | DECOMP_INLINE, 0x9723},
-	{0x2F9F6, 0, 1, 5087},
-	{0x2F9F7, 0, 1, 5088},
-	{0x2F9F8, 0, 1 | DECOMP_INLINE, 0x4A6E},
-	{0x2F9F9, 0, 1 | DECOMP_INLINE, 0x4A76},
-	{0x2F9FA, 0, 1 | DECOMP_INLINE, 0x97E0},
-	{0x2F9FB, 0, 1, 5089},
-	{0x2F9FC, 0, 1 | DECOMP_INLINE, 0x4AB2},
-	{0x2F9FD, 0, 1, 5090},
-	{0x2F9FE, 0, 1 | DECOMP_INLINE, 0x980B},
-	{0x2F9FF, 0, 1 | DECOMP_INLINE, 0x980B},
-	{0x2FA00, 0, 1 | DECOMP_INLINE, 0x9829},
-	{0x2FA01, 0, 1, 5091},
-	{0x2FA02, 0, 1 | DECOMP_INLINE, 0x98E2},
-	{0x2FA03, 0, 1 | DECOMP_INLINE, 0x4B33},
-	{0x2FA04, 0, 1 | DECOMP_INLINE, 0x9929},
-	{0x2FA05, 0, 1 | DECOMP_INLINE, 0x99A7},
-	{0x2FA06, 0, 1 | DECOMP_INLINE, 0x99C2},
-	{0x2FA07, 0, 1 | DECOMP_INLINE, 0x99FE},
-	{0x2FA08, 0, 1 | DECOMP_INLINE, 0x4BCE},
-	{0x2FA09, 0, 1, 5092},
-	{0x2FA0A, 0, 1 | DECOMP_INLINE, 0x9B12},
-	{0x2FA0B, 0, 1 | DECOMP_INLINE, 0x9C40},
-	{0x2FA0C, 0, 1 | DECOMP_INLINE, 0x9CFD},
-	{0x2FA0D, 0, 1 | DECOMP_INLINE, 0x4CCE},
-	{0x2FA0E, 0, 1 | DECOMP_INLINE, 0x4CED},
-	{0x2FA0F, 0, 1 | DECOMP_INLINE, 0x9D67},
-	{0x2FA10, 0, 1, 5093},
-	{0x2FA11, 0, 1 | DECOMP_INLINE, 0x4CF8},
-	{0x2FA12, 0, 1, 5094},
-	{0x2FA13, 0, 1, 5095},
-	{0x2FA14, 0, 1, 5096},
-	{0x2FA15, 0, 1 | DECOMP_INLINE, 0x9EBB},
-	{0x2FA16, 0, 1 | DECOMP_INLINE, 0x4D56},
-	{0x2FA17, 0, 1 | DECOMP_INLINE, 0x9EF9},
-	{0x2FA18, 0, 1 | DECOMP_INLINE, 0x9EFE},
-	{0x2FA19, 0, 1 | DECOMP_INLINE, 0x9F05},
-	{0x2FA1A, 0, 1 | DECOMP_INLINE, 0x9F0F},
-	{0x2FA1B, 0, 1 | DECOMP_INLINE, 0x9F16},
-	{0x2FA1C, 0, 1 | DECOMP_INLINE, 0x9F3B},
-	{0x2FA1D, 0, 1, 5097}
-
-};
-
-/* codepoints array  */
-static const uint32 UnicodeDecomp_codepoints[5098] =
-{
-	 /* 0 */ 0x0020, 0x0308,
-	 /* 2 */ 0x0020, 0x0304,
-	 /* 4 */ 0x0020, 0x0301,
-	 /* 6 */ 0x0020, 0x0327,
-	 /* 8 */ 0x0031, 0x2044, 0x0034,
-	 /* 11 */ 0x0031, 0x2044, 0x0032,
-	 /* 14 */ 0x0033, 0x2044, 0x0034,
-	 /* 17 */ 0x0041, 0x0300,
-	 /* 19 */ 0x0041, 0x0301,
-	 /* 21 */ 0x0041, 0x0302,
-	 /* 23 */ 0x0041, 0x0303,
-	 /* 25 */ 0x0041, 0x0308,
-	 /* 27 */ 0x0041, 0x030A,
-	 /* 29 */ 0x0043, 0x0327,
-	 /* 31 */ 0x0045, 0x0300,
-	 /* 33 */ 0x0045, 0x0301,
-	 /* 35 */ 0x0045, 0x0302,
-	 /* 37 */ 0x0045, 0x0308,
-	 /* 39 */ 0x0049, 0x0300,
-	 /* 41 */ 0x0049, 0x0301,
-	 /* 43 */ 0x0049, 0x0302,
-	 /* 45 */ 0x0049, 0x0308,
-	 /* 47 */ 0x004E, 0x0303,
-	 /* 49 */ 0x004F, 0x0300,
-	 /* 51 */ 0x004F, 0x0301,
-	 /* 53 */ 0x004F, 0x0302,
-	 /* 55 */ 0x004F, 0x0303,
-	 /* 57 */ 0x004F, 0x0308,
-	 /* 59 */ 0x0055, 0x0300,
-	 /* 61 */ 0x0055, 0x0301,
-	 /* 63 */ 0x0055, 0x0302,
-	 /* 65 */ 0x0055, 0x0308,
-	 /* 67 */ 0x0059, 0x0301,
-	 /* 69 */ 0x0061, 0x0300,
-	 /* 71 */ 0x0061, 0x0301,
-	 /* 73 */ 0x0061, 0x0302,
-	 /* 75 */ 0x0061, 0x0303,
-	 /* 77 */ 0x0061, 0x0308,
-	 /* 79 */ 0x0061, 0x030A,
-	 /* 81 */ 0x0063, 0x0327,
-	 /* 83 */ 0x0065, 0x0300,
-	 /* 85 */ 0x0065, 0x0301,
-	 /* 87 */ 0x0065, 0x0302,
-	 /* 89 */ 0x0065, 0x0308,
-	 /* 91 */ 0x0069, 0x0300,
-	 /* 93 */ 0x0069, 0x0301,
-	 /* 95 */ 0x0069, 0x0302,
-	 /* 97 */ 0x0069, 0x0308,
-	 /* 99 */ 0x006E, 0x0303,
-	 /* 101 */ 0x006F, 0x0300,
-	 /* 103 */ 0x006F, 0x0301,
-	 /* 105 */ 0x006F, 0x0302,
-	 /* 107 */ 0x006F, 0x0303,
-	 /* 109 */ 0x006F, 0x0308,
-	 /* 111 */ 0x0075, 0x0300,
-	 /* 113 */ 0x0075, 0x0301,
-	 /* 115 */ 0x0075, 0x0302,
-	 /* 117 */ 0x0075, 0x0308,
-	 /* 119 */ 0x0079, 0x0301,
-	 /* 121 */ 0x0079, 0x0308,
-	 /* 123 */ 0x0041, 0x0304,
-	 /* 125 */ 0x0061, 0x0304,
-	 /* 127 */ 0x0041, 0x0306,
-	 /* 129 */ 0x0061, 0x0306,
-	 /* 131 */ 0x0041, 0x0328,
-	 /* 133 */ 0x0061, 0x0328,
-	 /* 135 */ 0x0043, 0x0301,
-	 /* 137 */ 0x0063, 0x0301,
-	 /* 139 */ 0x0043, 0x0302,
-	 /* 141 */ 0x0063, 0x0302,
-	 /* 143 */ 0x0043, 0x0307,
-	 /* 145 */ 0x0063, 0x0307,
-	 /* 147 */ 0x0043, 0x030C,
-	 /* 149 */ 0x0063, 0x030C,
-	 /* 151 */ 0x0044, 0x030C,
-	 /* 153 */ 0x0064, 0x030C,
-	 /* 155 */ 0x0045, 0x0304,
-	 /* 157 */ 0x0065, 0x0304,
-	 /* 159 */ 0x0045, 0x0306,
-	 /* 161 */ 0x0065, 0x0306,
-	 /* 163 */ 0x0045, 0x0307,
-	 /* 165 */ 0x0065, 0x0307,
-	 /* 167 */ 0x0045, 0x0328,
-	 /* 169 */ 0x0065, 0x0328,
-	 /* 171 */ 0x0045, 0x030C,
-	 /* 173 */ 0x0065, 0x030C,
-	 /* 175 */ 0x0047, 0x0302,
-	 /* 177 */ 0x0067, 0x0302,
-	 /* 179 */ 0x0047, 0x0306,
-	 /* 181 */ 0x0067, 0x0306,
-	 /* 183 */ 0x0047, 0x0307,
-	 /* 185 */ 0x0067, 0x0307,
-	 /* 187 */ 0x0047, 0x0327,
-	 /* 189 */ 0x0067, 0x0327,
-	 /* 191 */ 0x0048, 0x0302,
-	 /* 193 */ 0x0068, 0x0302,
-	 /* 195 */ 0x0049, 0x0303,
-	 /* 197 */ 0x0069, 0x0303,
-	 /* 199 */ 0x0049, 0x0304,
-	 /* 201 */ 0x0069, 0x0304,
-	 /* 203 */ 0x0049, 0x0306,
-	 /* 205 */ 0x0069, 0x0306,
-	 /* 207 */ 0x0049, 0x0328,
-	 /* 209 */ 0x0069, 0x0328,
-	 /* 211 */ 0x0049, 0x0307,
-	 /* 213 */ 0x0049, 0x004A,
-	 /* 215 */ 0x0069, 0x006A,
-	 /* 217 */ 0x004A, 0x0302,
-	 /* 219 */ 0x006A, 0x0302,
-	 /* 221 */ 0x004B, 0x0327,
-	 /* 223 */ 0x006B, 0x0327,
-	 /* 225 */ 0x004C, 0x0301,
-	 /* 227 */ 0x006C, 0x0301,
-	 /* 229 */ 0x004C, 0x0327,
-	 /* 231 */ 0x006C, 0x0327,
-	 /* 233 */ 0x004C, 0x030C,
-	 /* 235 */ 0x006C, 0x030C,
-	 /* 237 */ 0x004C, 0x00B7,
-	 /* 239 */ 0x006C, 0x00B7,
-	 /* 241 */ 0x004E, 0x0301,
-	 /* 243 */ 0x006E, 0x0301,
-	 /* 245 */ 0x004E, 0x0327,
-	 /* 247 */ 0x006E, 0x0327,
-	 /* 249 */ 0x004E, 0x030C,
-	 /* 251 */ 0x006E, 0x030C,
-	 /* 253 */ 0x02BC, 0x006E,
-	 /* 255 */ 0x004F, 0x0304,
-	 /* 257 */ 0x006F, 0x0304,
-	 /* 259 */ 0x004F, 0x0306,
-	 /* 261 */ 0x006F, 0x0306,
-	 /* 263 */ 0x004F, 0x030B,
-	 /* 265 */ 0x006F, 0x030B,
-	 /* 267 */ 0x0052, 0x0301,
-	 /* 269 */ 0x0072, 0x0301,
-	 /* 271 */ 0x0052, 0x0327,
-	 /* 273 */ 0x0072, 0x0327,
-	 /* 275 */ 0x0052, 0x030C,
-	 /* 277 */ 0x0072, 0x030C,
-	 /* 279 */ 0x0053, 0x0301,
-	 /* 281 */ 0x0073, 0x0301,
-	 /* 283 */ 0x0053, 0x0302,
-	 /* 285 */ 0x0073, 0x0302,
-	 /* 287 */ 0x0053, 0x0327,
-	 /* 289 */ 0x0073, 0x0327,
-	 /* 291 */ 0x0053, 0x030C,
-	 /* 293 */ 0x0073, 0x030C,
-	 /* 295 */ 0x0054, 0x0327,
-	 /* 297 */ 0x0074, 0x0327,
-	 /* 299 */ 0x0054, 0x030C,
-	 /* 301 */ 0x0074, 0x030C,
-	 /* 303 */ 0x0055, 0x0303,
-	 /* 305 */ 0x0075, 0x0303,
-	 /* 307 */ 0x0055, 0x0304,
-	 /* 309 */ 0x0075, 0x0304,
-	 /* 311 */ 0x0055, 0x0306,
-	 /* 313 */ 0x0075, 0x0306,
-	 /* 315 */ 0x0055, 0x030A,
-	 /* 317 */ 0x0075, 0x030A,
-	 /* 319 */ 0x0055, 0x030B,
-	 /* 321 */ 0x0075, 0x030B,
-	 /* 323 */ 0x0055, 0x0328,
-	 /* 325 */ 0x0075, 0x0328,
-	 /* 327 */ 0x0057, 0x0302,
-	 /* 329 */ 0x0077, 0x0302,
-	 /* 331 */ 0x0059, 0x0302,
-	 /* 333 */ 0x0079, 0x0302,
-	 /* 335 */ 0x0059, 0x0308,
-	 /* 337 */ 0x005A, 0x0301,
-	 /* 339 */ 0x007A, 0x0301,
-	 /* 341 */ 0x005A, 0x0307,
-	 /* 343 */ 0x007A, 0x0307,
-	 /* 345 */ 0x005A, 0x030C,
-	 /* 347 */ 0x007A, 0x030C,
-	 /* 349 */ 0x004F, 0x031B,
-	 /* 351 */ 0x006F, 0x031B,
-	 /* 353 */ 0x0055, 0x031B,
-	 /* 355 */ 0x0075, 0x031B,
-	 /* 357 */ 0x0044, 0x017D,
-	 /* 359 */ 0x0044, 0x017E,
-	 /* 361 */ 0x0064, 0x017E,
-	 /* 363 */ 0x004C, 0x004A,
-	 /* 365 */ 0x004C, 0x006A,
-	 /* 367 */ 0x006C, 0x006A,
-	 /* 369 */ 0x004E, 0x004A,
-	 /* 371 */ 0x004E, 0x006A,
-	 /* 373 */ 0x006E, 0x006A,
-	 /* 375 */ 0x0041, 0x030C,
-	 /* 377 */ 0x0061, 0x030C,
-	 /* 379 */ 0x0049, 0x030C,
-	 /* 381 */ 0x0069, 0x030C,
-	 /* 383 */ 0x004F, 0x030C,
-	 /* 385 */ 0x006F, 0x030C,
-	 /* 387 */ 0x0055, 0x030C,
-	 /* 389 */ 0x0075, 0x030C,
-	 /* 391 */ 0x00DC, 0x0304,
-	 /* 393 */ 0x00FC, 0x0304,
-	 /* 395 */ 0x00DC, 0x0301,
-	 /* 397 */ 0x00FC, 0x0301,
-	 /* 399 */ 0x00DC, 0x030C,
-	 /* 401 */ 0x00FC, 0x030C,
-	 /* 403 */ 0x00DC, 0x0300,
-	 /* 405 */ 0x00FC, 0x0300,
-	 /* 407 */ 0x00C4, 0x0304,
-	 /* 409 */ 0x00E4, 0x0304,
-	 /* 411 */ 0x0226, 0x0304,
-	 /* 413 */ 0x0227, 0x0304,
-	 /* 415 */ 0x00C6, 0x0304,
-	 /* 417 */ 0x00E6, 0x0304,
-	 /* 419 */ 0x0047, 0x030C,
-	 /* 421 */ 0x0067, 0x030C,
-	 /* 423 */ 0x004B, 0x030C,
-	 /* 425 */ 0x006B, 0x030C,
-	 /* 427 */ 0x004F, 0x0328,
-	 /* 429 */ 0x006F, 0x0328,
-	 /* 431 */ 0x01EA, 0x0304,
-	 /* 433 */ 0x01EB, 0x0304,
-	 /* 435 */ 0x01B7, 0x030C,
-	 /* 437 */ 0x0292, 0x030C,
-	 /* 439 */ 0x006A, 0x030C,
-	 /* 441 */ 0x0044, 0x005A,
-	 /* 443 */ 0x0044, 0x007A,
-	 /* 445 */ 0x0064, 0x007A,
-	 /* 447 */ 0x0047, 0x0301,
-	 /* 449 */ 0x0067, 0x0301,
-	 /* 451 */ 0x004E, 0x0300,
-	 /* 453 */ 0x006E, 0x0300,
-	 /* 455 */ 0x00C5, 0x0301,
-	 /* 457 */ 0x00E5, 0x0301,
-	 /* 459 */ 0x00C6, 0x0301,
-	 /* 461 */ 0x00E6, 0x0301,
-	 /* 463 */ 0x00D8, 0x0301,
-	 /* 465 */ 0x00F8, 0x0301,
-	 /* 467 */ 0x0041, 0x030F,
-	 /* 469 */ 0x0061, 0x030F,
-	 /* 471 */ 0x0041, 0x0311,
-	 /* 473 */ 0x0061, 0x0311,
-	 /* 475 */ 0x0045, 0x030F,
-	 /* 477 */ 0x0065, 0x030F,
-	 /* 479 */ 0x0045, 0x0311,
-	 /* 481 */ 0x0065, 0x0311,
-	 /* 483 */ 0x0049, 0x030F,
-	 /* 485 */ 0x0069, 0x030F,
-	 /* 487 */ 0x0049, 0x0311,
-	 /* 489 */ 0x0069, 0x0311,
-	 /* 491 */ 0x004F, 0x030F,
-	 /* 493 */ 0x006F, 0x030F,
-	 /* 495 */ 0x004F, 0x0311,
-	 /* 497 */ 0x006F, 0x0311,
-	 /* 499 */ 0x0052, 0x030F,
-	 /* 501 */ 0x0072, 0x030F,
-	 /* 503 */ 0x0052, 0x0311,
-	 /* 505 */ 0x0072, 0x0311,
-	 /* 507 */ 0x0055, 0x030F,
-	 /* 509 */ 0x0075, 0x030F,
-	 /* 511 */ 0x0055, 0x0311,
-	 /* 513 */ 0x0075, 0x0311,
-	 /* 515 */ 0x0053, 0x0326,
-	 /* 517 */ 0x0073, 0x0326,
-	 /* 519 */ 0x0054, 0x0326,
-	 /* 521 */ 0x0074, 0x0326,
-	 /* 523 */ 0x0048, 0x030C,
-	 /* 525 */ 0x0068, 0x030C,
-	 /* 527 */ 0x0041, 0x0307,
-	 /* 529 */ 0x0061, 0x0307,
-	 /* 531 */ 0x0045, 0x0327,
-	 /* 533 */ 0x0065, 0x0327,
-	 /* 535 */ 0x00D6, 0x0304,
-	 /* 537 */ 0x00F6, 0x0304,
-	 /* 539 */ 0x00D5, 0x0304,
-	 /* 541 */ 0x00F5, 0x0304,
-	 /* 543 */ 0x004F, 0x0307,
-	 /* 545 */ 0x006F, 0x0307,
-	 /* 547 */ 0x022E, 0x0304,
-	 /* 549 */ 0x022F, 0x0304,
-	 /* 551 */ 0x0059, 0x0304,
-	 /* 553 */ 0x0079, 0x0304,
-	 /* 555 */ 0x0020, 0x0306,
-	 /* 557 */ 0x0020, 0x0307,
-	 /* 559 */ 0x0020, 0x030A,
-	 /* 561 */ 0x0020, 0x0328,
-	 /* 563 */ 0x0020, 0x0303,
-	 /* 565 */ 0x0020, 0x030B,
-	 /* 567 */ 0x0308, 0x0301,
-	 /* 569 */ 0x0020, 0x0345,
-	 /* 571 */ 0x0020, 0x0301,
-	 /* 573 */ 0x00A8, 0x0301,
-	 /* 575 */ 0x0391, 0x0301,
-	 /* 577 */ 0x0395, 0x0301,
-	 /* 579 */ 0x0397, 0x0301,
-	 /* 581 */ 0x0399, 0x0301,
-	 /* 583 */ 0x039F, 0x0301,
-	 /* 585 */ 0x03A5, 0x0301,
-	 /* 587 */ 0x03A9, 0x0301,
-	 /* 589 */ 0x03CA, 0x0301,
-	 /* 591 */ 0x0399, 0x0308,
-	 /* 593 */ 0x03A5, 0x0308,
-	 /* 595 */ 0x03B1, 0x0301,
-	 /* 597 */ 0x03B5, 0x0301,
-	 /* 599 */ 0x03B7, 0x0301,
-	 /* 601 */ 0x03B9, 0x0301,
-	 /* 603 */ 0x03CB, 0x0301,
-	 /* 605 */ 0x03B9, 0x0308,
-	 /* 607 */ 0x03C5, 0x0308,
-	 /* 609 */ 0x03BF, 0x0301,
-	 /* 611 */ 0x03C5, 0x0301,
-	 /* 613 */ 0x03C9, 0x0301,
-	 /* 615 */ 0x03D2, 0x0301,
-	 /* 617 */ 0x03D2, 0x0308,
-	 /* 619 */ 0x0415, 0x0300,
-	 /* 621 */ 0x0415, 0x0308,
-	 /* 623 */ 0x0413, 0x0301,
-	 /* 625 */ 0x0406, 0x0308,
-	 /* 627 */ 0x041A, 0x0301,
-	 /* 629 */ 0x0418, 0x0300,
-	 /* 631 */ 0x0423, 0x0306,
-	 /* 633 */ 0x0418, 0x0306,
-	 /* 635 */ 0x0438, 0x0306,
-	 /* 637 */ 0x0435, 0x0300,
-	 /* 639 */ 0x0435, 0x0308,
-	 /* 641 */ 0x0433, 0x0301,
-	 /* 643 */ 0x0456, 0x0308,
-	 /* 645 */ 0x043A, 0x0301,
-	 /* 647 */ 0x0438, 0x0300,
-	 /* 649 */ 0x0443, 0x0306,
-	 /* 651 */ 0x0474, 0x030F,
-	 /* 653 */ 0x0475, 0x030F,
-	 /* 655 */ 0x0416, 0x0306,
-	 /* 657 */ 0x0436, 0x0306,
-	 /* 659 */ 0x0410, 0x0306,
-	 /* 661 */ 0x0430, 0x0306,
-	 /* 663 */ 0x0410, 0x0308,
-	 /* 665 */ 0x0430, 0x0308,
-	 /* 667 */ 0x0415, 0x0306,
-	 /* 669 */ 0x0435, 0x0306,
-	 /* 671 */ 0x04D8, 0x0308,
-	 /* 673 */ 0x04D9, 0x0308,
-	 /* 675 */ 0x0416, 0x0308,
-	 /* 677 */ 0x0436, 0x0308,
-	 /* 679 */ 0x0417, 0x0308,
-	 /* 681 */ 0x0437, 0x0308,
-	 /* 683 */ 0x0418, 0x0304,
-	 /* 685 */ 0x0438, 0x0304,
-	 /* 687 */ 0x0418, 0x0308,
-	 /* 689 */ 0x0438, 0x0308,
-	 /* 691 */ 0x041E, 0x0308,
-	 /* 693 */ 0x043E, 0x0308,
-	 /* 695 */ 0x04E8, 0x0308,
-	 /* 697 */ 0x04E9, 0x0308,
-	 /* 699 */ 0x042D, 0x0308,
-	 /* 701 */ 0x044D, 0x0308,
-	 /* 703 */ 0x0423, 0x0304,
-	 /* 705 */ 0x0443, 0x0304,
-	 /* 707 */ 0x0423, 0x0308,
-	 /* 709 */ 0x0443, 0x0308,
-	 /* 711 */ 0x0423, 0x030B,
-	 /* 713 */ 0x0443, 0x030B,
-	 /* 715 */ 0x0427, 0x0308,
-	 /* 717 */ 0x0447, 0x0308,
-	 /* 719 */ 0x042B, 0x0308,
-	 /* 721 */ 0x044B, 0x0308,
-	 /* 723 */ 0x0565, 0x0582,
-	 /* 725 */ 0x0627, 0x0653,
-	 /* 727 */ 0x0627, 0x0654,
-	 /* 729 */ 0x0648, 0x0654,
-	 /* 731 */ 0x0627, 0x0655,
-	 /* 733 */ 0x064A, 0x0654,
-	 /* 735 */ 0x0627, 0x0674,
-	 /* 737 */ 0x0648, 0x0674,
-	 /* 739 */ 0x06C7, 0x0674,
-	 /* 741 */ 0x064A, 0x0674,
-	 /* 743 */ 0x06D5, 0x0654,
-	 /* 745 */ 0x06C1, 0x0654,
-	 /* 747 */ 0x06D2, 0x0654,
-	 /* 749 */ 0x0928, 0x093C,
-	 /* 751 */ 0x0930, 0x093C,
-	 /* 753 */ 0x0933, 0x093C,
-	 /* 755 */ 0x0915, 0x093C,
-	 /* 757 */ 0x0916, 0x093C,
-	 /* 759 */ 0x0917, 0x093C,
-	 /* 761 */ 0x091C, 0x093C,
-	 /* 763 */ 0x0921, 0x093C,
-	 /* 765 */ 0x0922, 0x093C,
-	 /* 767 */ 0x092B, 0x093C,
-	 /* 769 */ 0x092F, 0x093C,
-	 /* 771 */ 0x09C7, 0x09BE,
-	 /* 773 */ 0x09C7, 0x09D7,
-	 /* 775 */ 0x09A1, 0x09BC,
-	 /* 777 */ 0x09A2, 0x09BC,
-	 /* 779 */ 0x09AF, 0x09BC,
-	 /* 781 */ 0x0A32, 0x0A3C,
-	 /* 783 */ 0x0A38, 0x0A3C,
-	 /* 785 */ 0x0A16, 0x0A3C,
-	 /* 787 */ 0x0A17, 0x0A3C,
-	 /* 789 */ 0x0A1C, 0x0A3C,
-	 /* 791 */ 0x0A2B, 0x0A3C,
-	 /* 793 */ 0x0B47, 0x0B56,
-	 /* 795 */ 0x0B47, 0x0B3E,
-	 /* 797 */ 0x0B47, 0x0B57,
-	 /* 799 */ 0x0B21, 0x0B3C,
-	 /* 801 */ 0x0B22, 0x0B3C,
-	 /* 803 */ 0x0B92, 0x0BD7,
-	 /* 805 */ 0x0BC6, 0x0BBE,
-	 /* 807 */ 0x0BC7, 0x0BBE,
-	 /* 809 */ 0x0BC6, 0x0BD7,
-	 /* 811 */ 0x0C46, 0x0C56,
-	 /* 813 */ 0x0CBF, 0x0CD5,
-	 /* 815 */ 0x0CC6, 0x0CD5,
-	 /* 817 */ 0x0CC6, 0x0CD6,
-	 /* 819 */ 0x0CC6, 0x0CC2,
-	 /* 821 */ 0x0CCA, 0x0CD5,
-	 /* 823 */ 0x0D46, 0x0D3E,
-	 /* 825 */ 0x0D47, 0x0D3E,
-	 /* 827 */ 0x0D46, 0x0D57,
-	 /* 829 */ 0x0DD9, 0x0DCA,
-	 /* 831 */ 0x0DD9, 0x0DCF,
-	 /* 833 */ 0x0DDC, 0x0DCA,
-	 /* 835 */ 0x0DD9, 0x0DDF,
-	 /* 837 */ 0x0E4D, 0x0E32,
-	 /* 839 */ 0x0ECD, 0x0EB2,
-	 /* 841 */ 0x0EAB, 0x0E99,
-	 /* 843 */ 0x0EAB, 0x0EA1,
-	 /* 845 */ 0x0F42, 0x0FB7,
-	 /* 847 */ 0x0F4C, 0x0FB7,
-	 /* 849 */ 0x0F51, 0x0FB7,
-	 /* 851 */ 0x0F56, 0x0FB7,
-	 /* 853 */ 0x0F5B, 0x0FB7,
-	 /* 855 */ 0x0F40, 0x0FB5,
-	 /* 857 */ 0x0F71, 0x0F72,
-	 /* 859 */ 0x0F71, 0x0F74,
-	 /* 861 */ 0x0FB2, 0x0F80,
-	 /* 863 */ 0x0FB2, 0x0F81,
-	 /* 865 */ 0x0FB3, 0x0F80,
-	 /* 867 */ 0x0FB3, 0x0F81,
-	 /* 869 */ 0x0F71, 0x0F80,
-	 /* 871 */ 0x0F92, 0x0FB7,
-	 /* 873 */ 0x0F9C, 0x0FB7,
-	 /* 875 */ 0x0FA1, 0x0FB7,
-	 /* 877 */ 0x0FA6, 0x0FB7,
-	 /* 879 */ 0x0FAB, 0x0FB7,
-	 /* 881 */ 0x0F90, 0x0FB5,
-	 /* 883 */ 0x1025, 0x102E,
-	 /* 885 */ 0x1B05, 0x1B35,
-	 /* 887 */ 0x1B07, 0x1B35,
-	 /* 889 */ 0x1B09, 0x1B35,
-	 /* 891 */ 0x1B0B, 0x1B35,
-	 /* 893 */ 0x1B0D, 0x1B35,
-	 /* 895 */ 0x1B11, 0x1B35,
-	 /* 897 */ 0x1B3A, 0x1B35,
-	 /* 899 */ 0x1B3C, 0x1B35,
-	 /* 901 */ 0x1B3E, 0x1B35,
-	 /* 903 */ 0x1B3F, 0x1B35,
-	 /* 905 */ 0x1B42, 0x1B35,
-	 /* 907 */ 0x0041, 0x0325,
-	 /* 909 */ 0x0061, 0x0325,
-	 /* 911 */ 0x0042, 0x0307,
-	 /* 913 */ 0x0062, 0x0307,
-	 /* 915 */ 0x0042, 0x0323,
-	 /* 917 */ 0x0062, 0x0323,
-	 /* 919 */ 0x0042, 0x0331,
-	 /* 921 */ 0x0062, 0x0331,
-	 /* 923 */ 0x00C7, 0x0301,
-	 /* 925 */ 0x00E7, 0x0301,
-	 /* 927 */ 0x0044, 0x0307,
-	 /* 929 */ 0x0064, 0x0307,
-	 /* 931 */ 0x0044, 0x0323,
-	 /* 933 */ 0x0064, 0x0323,
-	 /* 935 */ 0x0044, 0x0331,
-	 /* 937 */ 0x0064, 0x0331,
-	 /* 939 */ 0x0044, 0x0327,
-	 /* 941 */ 0x0064, 0x0327,
-	 /* 943 */ 0x0044, 0x032D,
-	 /* 945 */ 0x0064, 0x032D,
-	 /* 947 */ 0x0112, 0x0300,
-	 /* 949 */ 0x0113, 0x0300,
-	 /* 951 */ 0x0112, 0x0301,
-	 /* 953 */ 0x0113, 0x0301,
-	 /* 955 */ 0x0045, 0x032D,
-	 /* 957 */ 0x0065, 0x032D,
-	 /* 959 */ 0x0045, 0x0330,
-	 /* 961 */ 0x0065, 0x0330,
-	 /* 963 */ 0x0228, 0x0306,
-	 /* 965 */ 0x0229, 0x0306,
-	 /* 967 */ 0x0046, 0x0307,
-	 /* 969 */ 0x0066, 0x0307,
-	 /* 971 */ 0x0047, 0x0304,
-	 /* 973 */ 0x0067, 0x0304,
-	 /* 975 */ 0x0048, 0x0307,
-	 /* 977 */ 0x0068, 0x0307,
-	 /* 979 */ 0x0048, 0x0323,
-	 /* 981 */ 0x0068, 0x0323,
-	 /* 983 */ 0x0048, 0x0308,
-	 /* 985 */ 0x0068, 0x0308,
-	 /* 987 */ 0x0048, 0x0327,
-	 /* 989 */ 0x0068, 0x0327,
-	 /* 991 */ 0x0048, 0x032E,
-	 /* 993 */ 0x0068, 0x032E,
-	 /* 995 */ 0x0049, 0x0330,
-	 /* 997 */ 0x0069, 0x0330,
-	 /* 999 */ 0x00CF, 0x0301,
-	 /* 1001 */ 0x00EF, 0x0301,
-	 /* 1003 */ 0x004B, 0x0301,
-	 /* 1005 */ 0x006B, 0x0301,
-	 /* 1007 */ 0x004B, 0x0323,
-	 /* 1009 */ 0x006B, 0x0323,
-	 /* 1011 */ 0x004B, 0x0331,
-	 /* 1013 */ 0x006B, 0x0331,
-	 /* 1015 */ 0x004C, 0x0323,
-	 /* 1017 */ 0x006C, 0x0323,
-	 /* 1019 */ 0x1E36, 0x0304,
-	 /* 1021 */ 0x1E37, 0x0304,
-	 /* 1023 */ 0x004C, 0x0331,
-	 /* 1025 */ 0x006C, 0x0331,
-	 /* 1027 */ 0x004C, 0x032D,
-	 /* 1029 */ 0x006C, 0x032D,
-	 /* 1031 */ 0x004D, 0x0301,
-	 /* 1033 */ 0x006D, 0x0301,
-	 /* 1035 */ 0x004D, 0x0307,
-	 /* 1037 */ 0x006D, 0x0307,
-	 /* 1039 */ 0x004D, 0x0323,
-	 /* 1041 */ 0x006D, 0x0323,
-	 /* 1043 */ 0x004E, 0x0307,
-	 /* 1045 */ 0x006E, 0x0307,
-	 /* 1047 */ 0x004E, 0x0323,
-	 /* 1049 */ 0x006E, 0x0323,
-	 /* 1051 */ 0x004E, 0x0331,
-	 /* 1053 */ 0x006E, 0x0331,
-	 /* 1055 */ 0x004E, 0x032D,
-	 /* 1057 */ 0x006E, 0x032D,
-	 /* 1059 */ 0x00D5, 0x0301,
-	 /* 1061 */ 0x00F5, 0x0301,
-	 /* 1063 */ 0x00D5, 0x0308,
-	 /* 1065 */ 0x00F5, 0x0308,
-	 /* 1067 */ 0x014C, 0x0300,
-	 /* 1069 */ 0x014D, 0x0300,
-	 /* 1071 */ 0x014C, 0x0301,
-	 /* 1073 */ 0x014D, 0x0301,
-	 /* 1075 */ 0x0050, 0x0301,
-	 /* 1077 */ 0x0070, 0x0301,
-	 /* 1079 */ 0x0050, 0x0307,
-	 /* 1081 */ 0x0070, 0x0307,
-	 /* 1083 */ 0x0052, 0x0307,
-	 /* 1085 */ 0x0072, 0x0307,
-	 /* 1087 */ 0x0052, 0x0323,
-	 /* 1089 */ 0x0072, 0x0323,
-	 /* 1091 */ 0x1E5A, 0x0304,
-	 /* 1093 */ 0x1E5B, 0x0304,
-	 /* 1095 */ 0x0052, 0x0331,
-	 /* 1097 */ 0x0072, 0x0331,
-	 /* 1099 */ 0x0053, 0x0307,
-	 /* 1101 */ 0x0073, 0x0307,
-	 /* 1103 */ 0x0053, 0x0323,
-	 /* 1105 */ 0x0073, 0x0323,
-	 /* 1107 */ 0x015A, 0x0307,
-	 /* 1109 */ 0x015B, 0x0307,
-	 /* 1111 */ 0x0160, 0x0307,
-	 /* 1113 */ 0x0161, 0x0307,
-	 /* 1115 */ 0x1E62, 0x0307,
-	 /* 1117 */ 0x1E63, 0x0307,
-	 /* 1119 */ 0x0054, 0x0307,
-	 /* 1121 */ 0x0074, 0x0307,
-	 /* 1123 */ 0x0054, 0x0323,
-	 /* 1125 */ 0x0074, 0x0323,
-	 /* 1127 */ 0x0054, 0x0331,
-	 /* 1129 */ 0x0074, 0x0331,
-	 /* 1131 */ 0x0054, 0x032D,
-	 /* 1133 */ 0x0074, 0x032D,
-	 /* 1135 */ 0x0055, 0x0324,
-	 /* 1137 */ 0x0075, 0x0324,
-	 /* 1139 */ 0x0055, 0x0330,
-	 /* 1141 */ 0x0075, 0x0330,
-	 /* 1143 */ 0x0055, 0x032D,
-	 /* 1145 */ 0x0075, 0x032D,
-	 /* 1147 */ 0x0168, 0x0301,
-	 /* 1149 */ 0x0169, 0x0301,
-	 /* 1151 */ 0x016A, 0x0308,
-	 /* 1153 */ 0x016B, 0x0308,
-	 /* 1155 */ 0x0056, 0x0303,
-	 /* 1157 */ 0x0076, 0x0303,
-	 /* 1159 */ 0x0056, 0x0323,
-	 /* 1161 */ 0x0076, 0x0323,
-	 /* 1163 */ 0x0057, 0x0300,
-	 /* 1165 */ 0x0077, 0x0300,
-	 /* 1167 */ 0x0057, 0x0301,
-	 /* 1169 */ 0x0077, 0x0301,
-	 /* 1171 */ 0x0057, 0x0308,
-	 /* 1173 */ 0x0077, 0x0308,
-	 /* 1175 */ 0x0057, 0x0307,
-	 /* 1177 */ 0x0077, 0x0307,
-	 /* 1179 */ 0x0057, 0x0323,
-	 /* 1181 */ 0x0077, 0x0323,
-	 /* 1183 */ 0x0058, 0x0307,
-	 /* 1185 */ 0x0078, 0x0307,
-	 /* 1187 */ 0x0058, 0x0308,
-	 /* 1189 */ 0x0078, 0x0308,
-	 /* 1191 */ 0x0059, 0x0307,
-	 /* 1193 */ 0x0079, 0x0307,
-	 /* 1195 */ 0x005A, 0x0302,
-	 /* 1197 */ 0x007A, 0x0302,
-	 /* 1199 */ 0x005A, 0x0323,
-	 /* 1201 */ 0x007A, 0x0323,
-	 /* 1203 */ 0x005A, 0x0331,
-	 /* 1205 */ 0x007A, 0x0331,
-	 /* 1207 */ 0x0068, 0x0331,
-	 /* 1209 */ 0x0074, 0x0308,
-	 /* 1211 */ 0x0077, 0x030A,
-	 /* 1213 */ 0x0079, 0x030A,
-	 /* 1215 */ 0x0061, 0x02BE,
-	 /* 1217 */ 0x017F, 0x0307,
-	 /* 1219 */ 0x0041, 0x0323,
-	 /* 1221 */ 0x0061, 0x0323,
-	 /* 1223 */ 0x0041, 0x0309,
-	 /* 1225 */ 0x0061, 0x0309,
-	 /* 1227 */ 0x00C2, 0x0301,
-	 /* 1229 */ 0x00E2, 0x0301,
-	 /* 1231 */ 0x00C2, 0x0300,
-	 /* 1233 */ 0x00E2, 0x0300,
-	 /* 1235 */ 0x00C2, 0x0309,
-	 /* 1237 */ 0x00E2, 0x0309,
-	 /* 1239 */ 0x00C2, 0x0303,
-	 /* 1241 */ 0x00E2, 0x0303,
-	 /* 1243 */ 0x1EA0, 0x0302,
-	 /* 1245 */ 0x1EA1, 0x0302,
-	 /* 1247 */ 0x0102, 0x0301,
-	 /* 1249 */ 0x0103, 0x0301,
-	 /* 1251 */ 0x0102, 0x0300,
-	 /* 1253 */ 0x0103, 0x0300,
-	 /* 1255 */ 0x0102, 0x0309,
-	 /* 1257 */ 0x0103, 0x0309,
-	 /* 1259 */ 0x0102, 0x0303,
-	 /* 1261 */ 0x0103, 0x0303,
-	 /* 1263 */ 0x1EA0, 0x0306,
-	 /* 1265 */ 0x1EA1, 0x0306,
-	 /* 1267 */ 0x0045, 0x0323,
-	 /* 1269 */ 0x0065, 0x0323,
-	 /* 1271 */ 0x0045, 0x0309,
-	 /* 1273 */ 0x0065, 0x0309,
-	 /* 1275 */ 0x0045, 0x0303,
-	 /* 1277 */ 0x0065, 0x0303,
-	 /* 1279 */ 0x00CA, 0x0301,
-	 /* 1281 */ 0x00EA, 0x0301,
-	 /* 1283 */ 0x00CA, 0x0300,
-	 /* 1285 */ 0x00EA, 0x0300,
-	 /* 1287 */ 0x00CA, 0x0309,
-	 /* 1289 */ 0x00EA, 0x0309,
-	 /* 1291 */ 0x00CA, 0x0303,
-	 /* 1293 */ 0x00EA, 0x0303,
-	 /* 1295 */ 0x1EB8, 0x0302,
-	 /* 1297 */ 0x1EB9, 0x0302,
-	 /* 1299 */ 0x0049, 0x0309,
-	 /* 1301 */ 0x0069, 0x0309,
-	 /* 1303 */ 0x0049, 0x0323,
-	 /* 1305 */ 0x0069, 0x0323,
-	 /* 1307 */ 0x004F, 0x0323,
-	 /* 1309 */ 0x006F, 0x0323,
-	 /* 1311 */ 0x004F, 0x0309,
-	 /* 1313 */ 0x006F, 0x0309,
-	 /* 1315 */ 0x00D4, 0x0301,
-	 /* 1317 */ 0x00F4, 0x0301,
-	 /* 1319 */ 0x00D4, 0x0300,
-	 /* 1321 */ 0x00F4, 0x0300,
-	 /* 1323 */ 0x00D4, 0x0309,
-	 /* 1325 */ 0x00F4, 0x0309,
-	 /* 1327 */ 0x00D4, 0x0303,
-	 /* 1329 */ 0x00F4, 0x0303,
-	 /* 1331 */ 0x1ECC, 0x0302,
-	 /* 1333 */ 0x1ECD, 0x0302,
-	 /* 1335 */ 0x01A0, 0x0301,
-	 /* 1337 */ 0x01A1, 0x0301,
-	 /* 1339 */ 0x01A0, 0x0300,
-	 /* 1341 */ 0x01A1, 0x0300,
-	 /* 1343 */ 0x01A0, 0x0309,
-	 /* 1345 */ 0x01A1, 0x0309,
-	 /* 1347 */ 0x01A0, 0x0303,
-	 /* 1349 */ 0x01A1, 0x0303,
-	 /* 1351 */ 0x01A0, 0x0323,
-	 /* 1353 */ 0x01A1, 0x0323,
-	 /* 1355 */ 0x0055, 0x0323,
-	 /* 1357 */ 0x0075, 0x0323,
-	 /* 1359 */ 0x0055, 0x0309,
-	 /* 1361 */ 0x0075, 0x0309,
-	 /* 1363 */ 0x01AF, 0x0301,
-	 /* 1365 */ 0x01B0, 0x0301,
-	 /* 1367 */ 0x01AF, 0x0300,
-	 /* 1369 */ 0x01B0, 0x0300,
-	 /* 1371 */ 0x01AF, 0x0309,
-	 /* 1373 */ 0x01B0, 0x0309,
-	 /* 1375 */ 0x01AF, 0x0303,
-	 /* 1377 */ 0x01B0, 0x0303,
-	 /* 1379 */ 0x01AF, 0x0323,
-	 /* 1381 */ 0x01B0, 0x0323,
-	 /* 1383 */ 0x0059, 0x0300,
-	 /* 1385 */ 0x0079, 0x0300,
-	 /* 1387 */ 0x0059, 0x0323,
-	 /* 1389 */ 0x0079, 0x0323,
-	 /* 1391 */ 0x0059, 0x0309,
-	 /* 1393 */ 0x0079, 0x0309,
-	 /* 1395 */ 0x0059, 0x0303,
-	 /* 1397 */ 0x0079, 0x0303,
-	 /* 1399 */ 0x03B1, 0x0313,
-	 /* 1401 */ 0x03B1, 0x0314,
-	 /* 1403 */ 0x1F00, 0x0300,
-	 /* 1405 */ 0x1F01, 0x0300,
-	 /* 1407 */ 0x1F00, 0x0301,
-	 /* 1409 */ 0x1F01, 0x0301,
-	 /* 1411 */ 0x1F00, 0x0342,
-	 /* 1413 */ 0x1F01, 0x0342,
-	 /* 1415 */ 0x0391, 0x0313,
-	 /* 1417 */ 0x0391, 0x0314,
-	 /* 1419 */ 0x1F08, 0x0300,
-	 /* 1421 */ 0x1F09, 0x0300,
-	 /* 1423 */ 0x1F08, 0x0301,
-	 /* 1425 */ 0x1F09, 0x0301,
-	 /* 1427 */ 0x1F08, 0x0342,
-	 /* 1429 */ 0x1F09, 0x0342,
-	 /* 1431 */ 0x03B5, 0x0313,
-	 /* 1433 */ 0x03B5, 0x0314,
-	 /* 1435 */ 0x1F10, 0x0300,
-	 /* 1437 */ 0x1F11, 0x0300,
-	 /* 1439 */ 0x1F10, 0x0301,
-	 /* 1441 */ 0x1F11, 0x0301,
-	 /* 1443 */ 0x0395, 0x0313,
-	 /* 1445 */ 0x0395, 0x0314,
-	 /* 1447 */ 0x1F18, 0x0300,
-	 /* 1449 */ 0x1F19, 0x0300,
-	 /* 1451 */ 0x1F18, 0x0301,
-	 /* 1453 */ 0x1F19, 0x0301,
-	 /* 1455 */ 0x03B7, 0x0313,
-	 /* 1457 */ 0x03B7, 0x0314,
-	 /* 1459 */ 0x1F20, 0x0300,
-	 /* 1461 */ 0x1F21, 0x0300,
-	 /* 1463 */ 0x1F20, 0x0301,
-	 /* 1465 */ 0x1F21, 0x0301,
-	 /* 1467 */ 0x1F20, 0x0342,
-	 /* 1469 */ 0x1F21, 0x0342,
-	 /* 1471 */ 0x0397, 0x0313,
-	 /* 1473 */ 0x0397, 0x0314,
-	 /* 1475 */ 0x1F28, 0x0300,
-	 /* 1477 */ 0x1F29, 0x0300,
-	 /* 1479 */ 0x1F28, 0x0301,
-	 /* 1481 */ 0x1F29, 0x0301,
-	 /* 1483 */ 0x1F28, 0x0342,
-	 /* 1485 */ 0x1F29, 0x0342,
-	 /* 1487 */ 0x03B9, 0x0313,
-	 /* 1489 */ 0x03B9, 0x0314,
-	 /* 1491 */ 0x1F30, 0x0300,
-	 /* 1493 */ 0x1F31, 0x0300,
-	 /* 1495 */ 0x1F30, 0x0301,
-	 /* 1497 */ 0x1F31, 0x0301,
-	 /* 1499 */ 0x1F30, 0x0342,
-	 /* 1501 */ 0x1F31, 0x0342,
-	 /* 1503 */ 0x0399, 0x0313,
-	 /* 1505 */ 0x0399, 0x0314,
-	 /* 1507 */ 0x1F38, 0x0300,
-	 /* 1509 */ 0x1F39, 0x0300,
-	 /* 1511 */ 0x1F38, 0x0301,
-	 /* 1513 */ 0x1F39, 0x0301,
-	 /* 1515 */ 0x1F38, 0x0342,
-	 /* 1517 */ 0x1F39, 0x0342,
-	 /* 1519 */ 0x03BF, 0x0313,
-	 /* 1521 */ 0x03BF, 0x0314,
-	 /* 1523 */ 0x1F40, 0x0300,
-	 /* 1525 */ 0x1F41, 0x0300,
-	 /* 1527 */ 0x1F40, 0x0301,
-	 /* 1529 */ 0x1F41, 0x0301,
-	 /* 1531 */ 0x039F, 0x0313,
-	 /* 1533 */ 0x039F, 0x0314,
-	 /* 1535 */ 0x1F48, 0x0300,
-	 /* 1537 */ 0x1F49, 0x0300,
-	 /* 1539 */ 0x1F48, 0x0301,
-	 /* 1541 */ 0x1F49, 0x0301,
-	 /* 1543 */ 0x03C5, 0x0313,
-	 /* 1545 */ 0x03C5, 0x0314,
-	 /* 1547 */ 0x1F50, 0x0300,
-	 /* 1549 */ 0x1F51, 0x0300,
-	 /* 1551 */ 0x1F50, 0x0301,
-	 /* 1553 */ 0x1F51, 0x0301,
-	 /* 1555 */ 0x1F50, 0x0342,
-	 /* 1557 */ 0x1F51, 0x0342,
-	 /* 1559 */ 0x03A5, 0x0314,
-	 /* 1561 */ 0x1F59, 0x0300,
-	 /* 1563 */ 0x1F59, 0x0301,
-	 /* 1565 */ 0x1F59, 0x0342,
-	 /* 1567 */ 0x03C9, 0x0313,
-	 /* 1569 */ 0x03C9, 0x0314,
-	 /* 1571 */ 0x1F60, 0x0300,
-	 /* 1573 */ 0x1F61, 0x0300,
-	 /* 1575 */ 0x1F60, 0x0301,
-	 /* 1577 */ 0x1F61, 0x0301,
-	 /* 1579 */ 0x1F60, 0x0342,
-	 /* 1581 */ 0x1F61, 0x0342,
-	 /* 1583 */ 0x03A9, 0x0313,
-	 /* 1585 */ 0x03A9, 0x0314,
-	 /* 1587 */ 0x1F68, 0x0300,
-	 /* 1589 */ 0x1F69, 0x0300,
-	 /* 1591 */ 0x1F68, 0x0301,
-	 /* 1593 */ 0x1F69, 0x0301,
-	 /* 1595 */ 0x1F68, 0x0342,
-	 /* 1597 */ 0x1F69, 0x0342,
-	 /* 1599 */ 0x03B1, 0x0300,
-	 /* 1601 */ 0x03B5, 0x0300,
-	 /* 1603 */ 0x03B7, 0x0300,
-	 /* 1605 */ 0x03B9, 0x0300,
-	 /* 1607 */ 0x03BF, 0x0300,
-	 /* 1609 */ 0x03C5, 0x0300,
-	 /* 1611 */ 0x03C9, 0x0300,
-	 /* 1613 */ 0x1F00, 0x0345,
-	 /* 1615 */ 0x1F01, 0x0345,
-	 /* 1617 */ 0x1F02, 0x0345,
-	 /* 1619 */ 0x1F03, 0x0345,
-	 /* 1621 */ 0x1F04, 0x0345,
-	 /* 1623 */ 0x1F05, 0x0345,
-	 /* 1625 */ 0x1F06, 0x0345,
-	 /* 1627 */ 0x1F07, 0x0345,
-	 /* 1629 */ 0x1F08, 0x0345,
-	 /* 1631 */ 0x1F09, 0x0345,
-	 /* 1633 */ 0x1F0A, 0x0345,
-	 /* 1635 */ 0x1F0B, 0x0345,
-	 /* 1637 */ 0x1F0C, 0x0345,
-	 /* 1639 */ 0x1F0D, 0x0345,
-	 /* 1641 */ 0x1F0E, 0x0345,
-	 /* 1643 */ 0x1F0F, 0x0345,
-	 /* 1645 */ 0x1F20, 0x0345,
-	 /* 1647 */ 0x1F21, 0x0345,
-	 /* 1649 */ 0x1F22, 0x0345,
-	 /* 1651 */ 0x1F23, 0x0345,
-	 /* 1653 */ 0x1F24, 0x0345,
-	 /* 1655 */ 0x1F25, 0x0345,
-	 /* 1657 */ 0x1F26, 0x0345,
-	 /* 1659 */ 0x1F27, 0x0345,
-	 /* 1661 */ 0x1F28, 0x0345,
-	 /* 1663 */ 0x1F29, 0x0345,
-	 /* 1665 */ 0x1F2A, 0x0345,
-	 /* 1667 */ 0x1F2B, 0x0345,
-	 /* 1669 */ 0x1F2C, 0x0345,
-	 /* 1671 */ 0x1F2D, 0x0345,
-	 /* 1673 */ 0x1F2E, 0x0345,
-	 /* 1675 */ 0x1F2F, 0x0345,
-	 /* 1677 */ 0x1F60, 0x0345,
-	 /* 1679 */ 0x1F61, 0x0345,
-	 /* 1681 */ 0x1F62, 0x0345,
-	 /* 1683 */ 0x1F63, 0x0345,
-	 /* 1685 */ 0x1F64, 0x0345,
-	 /* 1687 */ 0x1F65, 0x0345,
-	 /* 1689 */ 0x1F66, 0x0345,
-	 /* 1691 */ 0x1F67, 0x0345,
-	 /* 1693 */ 0x1F68, 0x0345,
-	 /* 1695 */ 0x1F69, 0x0345,
-	 /* 1697 */ 0x1F6A, 0x0345,
-	 /* 1699 */ 0x1F6B, 0x0345,
-	 /* 1701 */ 0x1F6C, 0x0345,
-	 /* 1703 */ 0x1F6D, 0x0345,
-	 /* 1705 */ 0x1F6E, 0x0345,
-	 /* 1707 */ 0x1F6F, 0x0345,
-	 /* 1709 */ 0x03B1, 0x0306,
-	 /* 1711 */ 0x03B1, 0x0304,
-	 /* 1713 */ 0x1F70, 0x0345,
-	 /* 1715 */ 0x03B1, 0x0345,
-	 /* 1717 */ 0x03AC, 0x0345,
-	 /* 1719 */ 0x03B1, 0x0342,
-	 /* 1721 */ 0x1FB6, 0x0345,
-	 /* 1723 */ 0x0391, 0x0306,
-	 /* 1725 */ 0x0391, 0x0304,
-	 /* 1727 */ 0x0391, 0x0300,
-	 /* 1729 */ 0x0391, 0x0345,
-	 /* 1731 */ 0x0020, 0x0313,
-	 /* 1733 */ 0x0020, 0x0313,
-	 /* 1735 */ 0x0020, 0x0342,
-	 /* 1737 */ 0x00A8, 0x0342,
-	 /* 1739 */ 0x1F74, 0x0345,
-	 /* 1741 */ 0x03B7, 0x0345,
-	 /* 1743 */ 0x03AE, 0x0345,
-	 /* 1745 */ 0x03B7, 0x0342,
-	 /* 1747 */ 0x1FC6, 0x0345,
-	 /* 1749 */ 0x0395, 0x0300,
-	 /* 1751 */ 0x0397, 0x0300,
-	 /* 1753 */ 0x0397, 0x0345,
-	 /* 1755 */ 0x1FBF, 0x0300,
-	 /* 1757 */ 0x1FBF, 0x0301,
-	 /* 1759 */ 0x1FBF, 0x0342,
-	 /* 1761 */ 0x03B9, 0x0306,
-	 /* 1763 */ 0x03B9, 0x0304,
-	 /* 1765 */ 0x03CA, 0x0300,
-	 /* 1767 */ 0x03B9, 0x0342,
-	 /* 1769 */ 0x03CA, 0x0342,
-	 /* 1771 */ 0x0399, 0x0306,
-	 /* 1773 */ 0x0399, 0x0304,
-	 /* 1775 */ 0x0399, 0x0300,
-	 /* 1777 */ 0x1FFE, 0x0300,
-	 /* 1779 */ 0x1FFE, 0x0301,
-	 /* 1781 */ 0x1FFE, 0x0342,
-	 /* 1783 */ 0x03C5, 0x0306,
-	 /* 1785 */ 0x03C5, 0x0304,
-	 /* 1787 */ 0x03CB, 0x0300,
-	 /* 1789 */ 0x03C1, 0x0313,
-	 /* 1791 */ 0x03C1, 0x0314,
-	 /* 1793 */ 0x03C5, 0x0342,
-	 /* 1795 */ 0x03CB, 0x0342,
-	 /* 1797 */ 0x03A5, 0x0306,
-	 /* 1799 */ 0x03A5, 0x0304,
-	 /* 1801 */ 0x03A5, 0x0300,
-	 /* 1803 */ 0x03A1, 0x0314,
-	 /* 1805 */ 0x00A8, 0x0300,
-	 /* 1807 */ 0x1F7C, 0x0345,
-	 /* 1809 */ 0x03C9, 0x0345,
-	 /* 1811 */ 0x03CE, 0x0345,
-	 /* 1813 */ 0x03C9, 0x0342,
-	 /* 1815 */ 0x1FF6, 0x0345,
-	 /* 1817 */ 0x039F, 0x0300,
-	 /* 1819 */ 0x03A9, 0x0300,
-	 /* 1821 */ 0x03A9, 0x0345,
-	 /* 1823 */ 0x0020, 0x0314,
-	 /* 1825 */ 0x0020, 0x0333,
-	 /* 1827 */ 0x002E, 0x002E,
-	 /* 1829 */ 0x002E, 0x002E, 0x002E,
-	 /* 1832 */ 0x2032, 0x2032,
-	 /* 1834 */ 0x2032, 0x2032, 0x2032,
-	 /* 1837 */ 0x2035, 0x2035,
-	 /* 1839 */ 0x2035, 0x2035, 0x2035,
-	 /* 1842 */ 0x0021, 0x0021,
-	 /* 1844 */ 0x0020, 0x0305,
-	 /* 1846 */ 0x003F, 0x003F,
-	 /* 1848 */ 0x003F, 0x0021,
-	 /* 1850 */ 0x0021, 0x003F,
-	 /* 1852 */ 0x2032, 0x2032, 0x2032, 0x2032,
-	 /* 1856 */ 0x0052, 0x0073,
-	 /* 1858 */ 0x0061, 0x002F, 0x0063,
-	 /* 1861 */ 0x0061, 0x002F, 0x0073,
-	 /* 1864 */ 0x00B0, 0x0043,
-	 /* 1866 */ 0x0063, 0x002F, 0x006F,
-	 /* 1869 */ 0x0063, 0x002F, 0x0075,
-	 /* 1872 */ 0x00B0, 0x0046,
-	 /* 1874 */ 0x004E, 0x006F,
-	 /* 1876 */ 0x0053, 0x004D,
-	 /* 1878 */ 0x0054, 0x0045, 0x004C,
-	 /* 1881 */ 0x0054, 0x004D,
-	 /* 1883 */ 0x0046, 0x0041, 0x0058,
-	 /* 1886 */ 0x0031, 0x2044, 0x0037,
-	 /* 1889 */ 0x0031, 0x2044, 0x0039,
-	 /* 1892 */ 0x0031, 0x2044, 0x0031, 0x0030,
-	 /* 1896 */ 0x0031, 0x2044, 0x0033,
-	 /* 1899 */ 0x0032, 0x2044, 0x0033,
-	 /* 1902 */ 0x0031, 0x2044, 0x0035,
-	 /* 1905 */ 0x0032, 0x2044, 0x0035,
-	 /* 1908 */ 0x0033, 0x2044, 0x0035,
-	 /* 1911 */ 0x0034, 0x2044, 0x0035,
-	 /* 1914 */ 0x0031, 0x2044, 0x0036,
-	 /* 1917 */ 0x0035, 0x2044, 0x0036,
-	 /* 1920 */ 0x0031, 0x2044, 0x0038,
-	 /* 1923 */ 0x0033, 0x2044, 0x0038,
-	 /* 1926 */ 0x0035, 0x2044, 0x0038,
-	 /* 1929 */ 0x0037, 0x2044, 0x0038,
-	 /* 1932 */ 0x0031, 0x2044,
-	 /* 1934 */ 0x0049, 0x0049,
-	 /* 1936 */ 0x0049, 0x0049, 0x0049,
-	 /* 1939 */ 0x0049, 0x0056,
-	 /* 1941 */ 0x0056, 0x0049,
-	 /* 1943 */ 0x0056, 0x0049, 0x0049,
-	 /* 1946 */ 0x0056, 0x0049, 0x0049, 0x0049,
-	 /* 1950 */ 0x0049, 0x0058,
-	 /* 1952 */ 0x0058, 0x0049,
-	 /* 1954 */ 0x0058, 0x0049, 0x0049,
-	 /* 1957 */ 0x0069, 0x0069,
-	 /* 1959 */ 0x0069, 0x0069, 0x0069,
-	 /* 1962 */ 0x0069, 0x0076,
-	 /* 1964 */ 0x0076, 0x0069,
-	 /* 1966 */ 0x0076, 0x0069, 0x0069,
-	 /* 1969 */ 0x0076, 0x0069, 0x0069, 0x0069,
-	 /* 1973 */ 0x0069, 0x0078,
-	 /* 1975 */ 0x0078, 0x0069,
-	 /* 1977 */ 0x0078, 0x0069, 0x0069,
-	 /* 1980 */ 0x0030, 0x2044, 0x0033,
-	 /* 1983 */ 0x2190, 0x0338,
-	 /* 1985 */ 0x2192, 0x0338,
-	 /* 1987 */ 0x2194, 0x0338,
-	 /* 1989 */ 0x21D0, 0x0338,
-	 /* 1991 */ 0x21D4, 0x0338,
-	 /* 1993 */ 0x21D2, 0x0338,
-	 /* 1995 */ 0x2203, 0x0338,
-	 /* 1997 */ 0x2208, 0x0338,
-	 /* 1999 */ 0x220B, 0x0338,
-	 /* 2001 */ 0x2223, 0x0338,
-	 /* 2003 */ 0x2225, 0x0338,
-	 /* 2005 */ 0x222B, 0x222B,
-	 /* 2007 */ 0x222B, 0x222B, 0x222B,
-	 /* 2010 */ 0x222E, 0x222E,
-	 /* 2012 */ 0x222E, 0x222E, 0x222E,
-	 /* 2015 */ 0x223C, 0x0338,
-	 /* 2017 */ 0x2243, 0x0338,
-	 /* 2019 */ 0x2245, 0x0338,
-	 /* 2021 */ 0x2248, 0x0338,
-	 /* 2023 */ 0x003D, 0x0338,
-	 /* 2025 */ 0x2261, 0x0338,
-	 /* 2027 */ 0x224D, 0x0338,
-	 /* 2029 */ 0x003C, 0x0338,
-	 /* 2031 */ 0x003E, 0x0338,
-	 /* 2033 */ 0x2264, 0x0338,
-	 /* 2035 */ 0x2265, 0x0338,
-	 /* 2037 */ 0x2272, 0x0338,
-	 /* 2039 */ 0x2273, 0x0338,
-	 /* 2041 */ 0x2276, 0x0338,
-	 /* 2043 */ 0x2277, 0x0338,
-	 /* 2045 */ 0x227A, 0x0338,
-	 /* 2047 */ 0x227B, 0x0338,
-	 /* 2049 */ 0x2282, 0x0338,
-	 /* 2051 */ 0x2283, 0x0338,
-	 /* 2053 */ 0x2286, 0x0338,
-	 /* 2055 */ 0x2287, 0x0338,
-	 /* 2057 */ 0x22A2, 0x0338,
-	 /* 2059 */ 0x22A8, 0x0338,
-	 /* 2061 */ 0x22A9, 0x0338,
-	 /* 2063 */ 0x22AB, 0x0338,
-	 /* 2065 */ 0x227C, 0x0338,
-	 /* 2067 */ 0x227D, 0x0338,
-	 /* 2069 */ 0x2291, 0x0338,
-	 /* 2071 */ 0x2292, 0x0338,
-	 /* 2073 */ 0x22B2, 0x0338,
-	 /* 2075 */ 0x22B3, 0x0338,
-	 /* 2077 */ 0x22B4, 0x0338,
-	 /* 2079 */ 0x22B5, 0x0338,
-	 /* 2081 */ 0x0031, 0x0030,
-	 /* 2083 */ 0x0031, 0x0031,
-	 /* 2085 */ 0x0031, 0x0032,
-	 /* 2087 */ 0x0031, 0x0033,
-	 /* 2089 */ 0x0031, 0x0034,
-	 /* 2091 */ 0x0031, 0x0035,
-	 /* 2093 */ 0x0031, 0x0036,
-	 /* 2095 */ 0x0031, 0x0037,
-	 /* 2097 */ 0x0031, 0x0038,
-	 /* 2099 */ 0x0031, 0x0039,
-	 /* 2101 */ 0x0032, 0x0030,
-	 /* 2103 */ 0x0028, 0x0031, 0x0029,
-	 /* 2106 */ 0x0028, 0x0032, 0x0029,
-	 /* 2109 */ 0x0028, 0x0033, 0x0029,
-	 /* 2112 */ 0x0028, 0x0034, 0x0029,
-	 /* 2115 */ 0x0028, 0x0035, 0x0029,
-	 /* 2118 */ 0x0028, 0x0036, 0x0029,
-	 /* 2121 */ 0x0028, 0x0037, 0x0029,
-	 /* 2124 */ 0x0028, 0x0038, 0x0029,
-	 /* 2127 */ 0x0028, 0x0039, 0x0029,
-	 /* 2130 */ 0x0028, 0x0031, 0x0030, 0x0029,
-	 /* 2134 */ 0x0028, 0x0031, 0x0031, 0x0029,
-	 /* 2138 */ 0x0028, 0x0031, 0x0032, 0x0029,
-	 /* 2142 */ 0x0028, 0x0031, 0x0033, 0x0029,
-	 /* 2146 */ 0x0028, 0x0031, 0x0034, 0x0029,
-	 /* 2150 */ 0x0028, 0x0031, 0x0035, 0x0029,
-	 /* 2154 */ 0x0028, 0x0031, 0x0036, 0x0029,
-	 /* 2158 */ 0x0028, 0x0031, 0x0037, 0x0029,
-	 /* 2162 */ 0x0028, 0x0031, 0x0038, 0x0029,
-	 /* 2166 */ 0x0028, 0x0031, 0x0039, 0x0029,
-	 /* 2170 */ 0x0028, 0x0032, 0x0030, 0x0029,
-	 /* 2174 */ 0x0031, 0x002E,
-	 /* 2176 */ 0x0032, 0x002E,
-	 /* 2178 */ 0x0033, 0x002E,
-	 /* 2180 */ 0x0034, 0x002E,
-	 /* 2182 */ 0x0035, 0x002E,
-	 /* 2184 */ 0x0036, 0x002E,
-	 /* 2186 */ 0x0037, 0x002E,
-	 /* 2188 */ 0x0038, 0x002E,
-	 /* 2190 */ 0x0039, 0x002E,
-	 /* 2192 */ 0x0031, 0x0030, 0x002E,
-	 /* 2195 */ 0x0031, 0x0031, 0x002E,
-	 /* 2198 */ 0x0031, 0x0032, 0x002E,
-	 /* 2201 */ 0x0031, 0x0033, 0x002E,
-	 /* 2204 */ 0x0031, 0x0034, 0x002E,
-	 /* 2207 */ 0x0031, 0x0035, 0x002E,
-	 /* 2210 */ 0x0031, 0x0036, 0x002E,
-	 /* 2213 */ 0x0031, 0x0037, 0x002E,
-	 /* 2216 */ 0x0031, 0x0038, 0x002E,
-	 /* 2219 */ 0x0031, 0x0039, 0x002E,
-	 /* 2222 */ 0x0032, 0x0030, 0x002E,
-	 /* 2225 */ 0x0028, 0x0061, 0x0029,
-	 /* 2228 */ 0x0028, 0x0062, 0x0029,
-	 /* 2231 */ 0x0028, 0x0063, 0x0029,
-	 /* 2234 */ 0x0028, 0x0064, 0x0029,
-	 /* 2237 */ 0x0028, 0x0065, 0x0029,
-	 /* 2240 */ 0x0028, 0x0066, 0x0029,
-	 /* 2243 */ 0x0028, 0x0067, 0x0029,
-	 /* 2246 */ 0x0028, 0x0068, 0x0029,
-	 /* 2249 */ 0x0028, 0x0069, 0x0029,
-	 /* 2252 */ 0x0028, 0x006A, 0x0029,
-	 /* 2255 */ 0x0028, 0x006B, 0x0029,
-	 /* 2258 */ 0x0028, 0x006C, 0x0029,
-	 /* 2261 */ 0x0028, 0x006D, 0x0029,
-	 /* 2264 */ 0x0028, 0x006E, 0x0029,
-	 /* 2267 */ 0x0028, 0x006F, 0x0029,
-	 /* 2270 */ 0x0028, 0x0070, 0x0029,
-	 /* 2273 */ 0x0028, 0x0071, 0x0029,
-	 /* 2276 */ 0x0028, 0x0072, 0x0029,
-	 /* 2279 */ 0x0028, 0x0073, 0x0029,
-	 /* 2282 */ 0x0028, 0x0074, 0x0029,
-	 /* 2285 */ 0x0028, 0x0075, 0x0029,
-	 /* 2288 */ 0x0028, 0x0076, 0x0029,
-	 /* 2291 */ 0x0028, 0x0077, 0x0029,
-	 /* 2294 */ 0x0028, 0x0078, 0x0029,
-	 /* 2297 */ 0x0028, 0x0079, 0x0029,
-	 /* 2300 */ 0x0028, 0x007A, 0x0029,
-	 /* 2303 */ 0x222B, 0x222B, 0x222B, 0x222B,
-	 /* 2307 */ 0x003A, 0x003A, 0x003D,
-	 /* 2310 */ 0x003D, 0x003D,
-	 /* 2312 */ 0x003D, 0x003D, 0x003D,
-	 /* 2315 */ 0x2ADD, 0x0338,
-	 /* 2317 */ 0x304B, 0x3099,
-	 /* 2319 */ 0x304D, 0x3099,
-	 /* 2321 */ 0x304F, 0x3099,
-	 /* 2323 */ 0x3051, 0x3099,
-	 /* 2325 */ 0x3053, 0x3099,
-	 /* 2327 */ 0x3055, 0x3099,
-	 /* 2329 */ 0x3057, 0x3099,
-	 /* 2331 */ 0x3059, 0x3099,
-	 /* 2333 */ 0x305B, 0x3099,
-	 /* 2335 */ 0x305D, 0x3099,
-	 /* 2337 */ 0x305F, 0x3099,
-	 /* 2339 */ 0x3061, 0x3099,
-	 /* 2341 */ 0x3064, 0x3099,
-	 /* 2343 */ 0x3066, 0x3099,
-	 /* 2345 */ 0x3068, 0x3099,
-	 /* 2347 */ 0x306F, 0x3099,
-	 /* 2349 */ 0x306F, 0x309A,
-	 /* 2351 */ 0x3072, 0x3099,
-	 /* 2353 */ 0x3072, 0x309A,
-	 /* 2355 */ 0x3075, 0x3099,
-	 /* 2357 */ 0x3075, 0x309A,
-	 /* 2359 */ 0x3078, 0x3099,
-	 /* 2361 */ 0x3078, 0x309A,
-	 /* 2363 */ 0x307B, 0x3099,
-	 /* 2365 */ 0x307B, 0x309A,
-	 /* 2367 */ 0x3046, 0x3099,
-	 /* 2369 */ 0x0020, 0x3099,
-	 /* 2371 */ 0x0020, 0x309A,
-	 /* 2373 */ 0x309D, 0x3099,
-	 /* 2375 */ 0x3088, 0x308A,
-	 /* 2377 */ 0x30AB, 0x3099,
-	 /* 2379 */ 0x30AD, 0x3099,
-	 /* 2381 */ 0x30AF, 0x3099,
-	 /* 2383 */ 0x30B1, 0x3099,
-	 /* 2385 */ 0x30B3, 0x3099,
-	 /* 2387 */ 0x30B5, 0x3099,
-	 /* 2389 */ 0x30B7, 0x3099,
-	 /* 2391 */ 0x30B9, 0x3099,
-	 /* 2393 */ 0x30BB, 0x3099,
-	 /* 2395 */ 0x30BD, 0x3099,
-	 /* 2397 */ 0x30BF, 0x3099,
-	 /* 2399 */ 0x30C1, 0x3099,
-	 /* 2401 */ 0x30C4, 0x3099,
-	 /* 2403 */ 0x30C6, 0x3099,
-	 /* 2405 */ 0x30C8, 0x3099,
-	 /* 2407 */ 0x30CF, 0x3099,
-	 /* 2409 */ 0x30CF, 0x309A,
-	 /* 2411 */ 0x30D2, 0x3099,
-	 /* 2413 */ 0x30D2, 0x309A,
-	 /* 2415 */ 0x30D5, 0x3099,
-	 /* 2417 */ 0x30D5, 0x309A,
-	 /* 2419 */ 0x30D8, 0x3099,
-	 /* 2421 */ 0x30D8, 0x309A,
-	 /* 2423 */ 0x30DB, 0x3099,
-	 /* 2425 */ 0x30DB, 0x309A,
-	 /* 2427 */ 0x30A6, 0x3099,
-	 /* 2429 */ 0x30EF, 0x3099,
-	 /* 2431 */ 0x30F0, 0x3099,
-	 /* 2433 */ 0x30F1, 0x3099,
-	 /* 2435 */ 0x30F2, 0x3099,
-	 /* 2437 */ 0x30FD, 0x3099,
-	 /* 2439 */ 0x30B3, 0x30C8,
-	 /* 2441 */ 0x0028, 0x1100, 0x0029,
-	 /* 2444 */ 0x0028, 0x1102, 0x0029,
-	 /* 2447 */ 0x0028, 0x1103, 0x0029,
-	 /* 2450 */ 0x0028, 0x1105, 0x0029,
-	 /* 2453 */ 0x0028, 0x1106, 0x0029,
-	 /* 2456 */ 0x0028, 0x1107, 0x0029,
-	 /* 2459 */ 0x0028, 0x1109, 0x0029,
-	 /* 2462 */ 0x0028, 0x110B, 0x0029,
-	 /* 2465 */ 0x0028, 0x110C, 0x0029,
-	 /* 2468 */ 0x0028, 0x110E, 0x0029,
-	 /* 2471 */ 0x0028, 0x110F, 0x0029,
-	 /* 2474 */ 0x0028, 0x1110, 0x0029,
-	 /* 2477 */ 0x0028, 0x1111, 0x0029,
-	 /* 2480 */ 0x0028, 0x1112, 0x0029,
-	 /* 2483 */ 0x0028, 0x1100, 0x1161, 0x0029,
-	 /* 2487 */ 0x0028, 0x1102, 0x1161, 0x0029,
-	 /* 2491 */ 0x0028, 0x1103, 0x1161, 0x0029,
-	 /* 2495 */ 0x0028, 0x1105, 0x1161, 0x0029,
-	 /* 2499 */ 0x0028, 0x1106, 0x1161, 0x0029,
-	 /* 2503 */ 0x0028, 0x1107, 0x1161, 0x0029,
-	 /* 2507 */ 0x0028, 0x1109, 0x1161, 0x0029,
-	 /* 2511 */ 0x0028, 0x110B, 0x1161, 0x0029,
-	 /* 2515 */ 0x0028, 0x110C, 0x1161, 0x0029,
-	 /* 2519 */ 0x0028, 0x110E, 0x1161, 0x0029,
-	 /* 2523 */ 0x0028, 0x110F, 0x1161, 0x0029,
-	 /* 2527 */ 0x0028, 0x1110, 0x1161, 0x0029,
-	 /* 2531 */ 0x0028, 0x1111, 0x1161, 0x0029,
-	 /* 2535 */ 0x0028, 0x1112, 0x1161, 0x0029,
-	 /* 2539 */ 0x0028, 0x110C, 0x116E, 0x0029,
-	 /* 2543 */ 0x0028, 0x110B, 0x1169, 0x110C, 0x1165, 0x11AB, 0x0029,
-	 /* 2550 */ 0x0028, 0x110B, 0x1169, 0x1112, 0x116E, 0x0029,
-	 /* 2556 */ 0x0028, 0x4E00, 0x0029,
-	 /* 2559 */ 0x0028, 0x4E8C, 0x0029,
-	 /* 2562 */ 0x0028, 0x4E09, 0x0029,
-	 /* 2565 */ 0x0028, 0x56DB, 0x0029,
-	 /* 2568 */ 0x0028, 0x4E94, 0x0029,
-	 /* 2571 */ 0x0028, 0x516D, 0x0029,
-	 /* 2574 */ 0x0028, 0x4E03, 0x0029,
-	 /* 2577 */ 0x0028, 0x516B, 0x0029,
-	 /* 2580 */ 0x0028, 0x4E5D, 0x0029,
-	 /* 2583 */ 0x0028, 0x5341, 0x0029,
-	 /* 2586 */ 0x0028, 0x6708, 0x0029,
-	 /* 2589 */ 0x0028, 0x706B, 0x0029,
-	 /* 2592 */ 0x0028, 0x6C34, 0x0029,
-	 /* 2595 */ 0x0028, 0x6728, 0x0029,
-	 /* 2598 */ 0x0028, 0x91D1, 0x0029,
-	 /* 2601 */ 0x0028, 0x571F, 0x0029,
-	 /* 2604 */ 0x0028, 0x65E5, 0x0029,
-	 /* 2607 */ 0x0028, 0x682A, 0x0029,
-	 /* 2610 */ 0x0028, 0x6709, 0x0029,
-	 /* 2613 */ 0x0028, 0x793E, 0x0029,
-	 /* 2616 */ 0x0028, 0x540D, 0x0029,
-	 /* 2619 */ 0x0028, 0x7279, 0x0029,
-	 /* 2622 */ 0x0028, 0x8CA1, 0x0029,
-	 /* 2625 */ 0x0028, 0x795D, 0x0029,
-	 /* 2628 */ 0x0028, 0x52B4, 0x0029,
-	 /* 2631 */ 0x0028, 0x4EE3, 0x0029,
-	 /* 2634 */ 0x0028, 0x547C, 0x0029,
-	 /* 2637 */ 0x0028, 0x5B66, 0x0029,
-	 /* 2640 */ 0x0028, 0x76E3, 0x0029,
-	 /* 2643 */ 0x0028, 0x4F01, 0x0029,
-	 /* 2646 */ 0x0028, 0x8CC7, 0x0029,
-	 /* 2649 */ 0x0028, 0x5354, 0x0029,
-	 /* 2652 */ 0x0028, 0x796D, 0x0029,
-	 /* 2655 */ 0x0028, 0x4F11, 0x0029,
-	 /* 2658 */ 0x0028, 0x81EA, 0x0029,
-	 /* 2661 */ 0x0028, 0x81F3, 0x0029,
-	 /* 2664 */ 0x0050, 0x0054, 0x0045,
-	 /* 2667 */ 0x0032, 0x0031,
-	 /* 2669 */ 0x0032, 0x0032,
-	 /* 2671 */ 0x0032, 0x0033,
-	 /* 2673 */ 0x0032, 0x0034,
-	 /* 2675 */ 0x0032, 0x0035,
-	 /* 2677 */ 0x0032, 0x0036,
-	 /* 2679 */ 0x0032, 0x0037,
-	 /* 2681 */ 0x0032, 0x0038,
-	 /* 2683 */ 0x0032, 0x0039,
-	 /* 2685 */ 0x0033, 0x0030,
-	 /* 2687 */ 0x0033, 0x0031,
-	 /* 2689 */ 0x0033, 0x0032,
-	 /* 2691 */ 0x0033, 0x0033,
-	 /* 2693 */ 0x0033, 0x0034,
-	 /* 2695 */ 0x0033, 0x0035,
-	 /* 2697 */ 0x1100, 0x1161,
-	 /* 2699 */ 0x1102, 0x1161,
-	 /* 2701 */ 0x1103, 0x1161,
-	 /* 2703 */ 0x1105, 0x1161,
-	 /* 2705 */ 0x1106, 0x1161,
-	 /* 2707 */ 0x1107, 0x1161,
-	 /* 2709 */ 0x1109, 0x1161,
-	 /* 2711 */ 0x110B, 0x1161,
-	 /* 2713 */ 0x110C, 0x1161,
-	 /* 2715 */ 0x110E, 0x1161,
-	 /* 2717 */ 0x110F, 0x1161,
-	 /* 2719 */ 0x1110, 0x1161,
-	 /* 2721 */ 0x1111, 0x1161,
-	 /* 2723 */ 0x1112, 0x1161,
-	 /* 2725 */ 0x110E, 0x1161, 0x11B7, 0x1100, 0x1169,
-	 /* 2730 */ 0x110C, 0x116E, 0x110B, 0x1174,
-	 /* 2734 */ 0x110B, 0x116E,
-	 /* 2736 */ 0x0033, 0x0036,
-	 /* 2738 */ 0x0033, 0x0037,
-	 /* 2740 */ 0x0033, 0x0038,
-	 /* 2742 */ 0x0033, 0x0039,
-	 /* 2744 */ 0x0034, 0x0030,
-	 /* 2746 */ 0x0034, 0x0031,
-	 /* 2748 */ 0x0034, 0x0032,
-	 /* 2750 */ 0x0034, 0x0033,
-	 /* 2752 */ 0x0034, 0x0034,
-	 /* 2754 */ 0x0034, 0x0035,
-	 /* 2756 */ 0x0034, 0x0036,
-	 /* 2758 */ 0x0034, 0x0037,
-	 /* 2760 */ 0x0034, 0x0038,
-	 /* 2762 */ 0x0034, 0x0039,
-	 /* 2764 */ 0x0035, 0x0030,
-	 /* 2766 */ 0x0031, 0x6708,
-	 /* 2768 */ 0x0032, 0x6708,
-	 /* 2770 */ 0x0033, 0x6708,
-	 /* 2772 */ 0x0034, 0x6708,
-	 /* 2774 */ 0x0035, 0x6708,
-	 /* 2776 */ 0x0036, 0x6708,
-	 /* 2778 */ 0x0037, 0x6708,
-	 /* 2780 */ 0x0038, 0x6708,
-	 /* 2782 */ 0x0039, 0x6708,
-	 /* 2784 */ 0x0031, 0x0030, 0x6708,
-	 /* 2787 */ 0x0031, 0x0031, 0x6708,
-	 /* 2790 */ 0x0031, 0x0032, 0x6708,
-	 /* 2793 */ 0x0048, 0x0067,
-	 /* 2795 */ 0x0065, 0x0072, 0x0067,
-	 /* 2798 */ 0x0065, 0x0056,
-	 /* 2800 */ 0x004C, 0x0054, 0x0044,
-	 /* 2803 */ 0x4EE4, 0x548C,
-	 /* 2805 */ 0x30A2, 0x30D1, 0x30FC, 0x30C8,
-	 /* 2809 */ 0x30A2, 0x30EB, 0x30D5, 0x30A1,
-	 /* 2813 */ 0x30A2, 0x30F3, 0x30DA, 0x30A2,
-	 /* 2817 */ 0x30A2, 0x30FC, 0x30EB,
-	 /* 2820 */ 0x30A4, 0x30CB, 0x30F3, 0x30B0,
-	 /* 2824 */ 0x30A4, 0x30F3, 0x30C1,
-	 /* 2827 */ 0x30A6, 0x30A9, 0x30F3,
-	 /* 2830 */ 0x30A8, 0x30B9, 0x30AF, 0x30FC, 0x30C9,
-	 /* 2835 */ 0x30A8, 0x30FC, 0x30AB, 0x30FC,
-	 /* 2839 */ 0x30AA, 0x30F3, 0x30B9,
-	 /* 2842 */ 0x30AA, 0x30FC, 0x30E0,
-	 /* 2845 */ 0x30AB, 0x30A4, 0x30EA,
-	 /* 2848 */ 0x30AB, 0x30E9, 0x30C3, 0x30C8,
-	 /* 2852 */ 0x30AB, 0x30ED, 0x30EA, 0x30FC,
-	 /* 2856 */ 0x30AC, 0x30ED, 0x30F3,
-	 /* 2859 */ 0x30AC, 0x30F3, 0x30DE,
-	 /* 2862 */ 0x30AE, 0x30AC,
-	 /* 2864 */ 0x30AE, 0x30CB, 0x30FC,
-	 /* 2867 */ 0x30AD, 0x30E5, 0x30EA, 0x30FC,
-	 /* 2871 */ 0x30AE, 0x30EB, 0x30C0, 0x30FC,
-	 /* 2875 */ 0x30AD, 0x30ED,
-	 /* 2877 */ 0x30AD, 0x30ED, 0x30B0, 0x30E9, 0x30E0,
-	 /* 2882 */ 0x30AD, 0x30ED, 0x30E1, 0x30FC, 0x30C8, 0x30EB,
-	 /* 2888 */ 0x30AD, 0x30ED, 0x30EF, 0x30C3, 0x30C8,
-	 /* 2893 */ 0x30B0, 0x30E9, 0x30E0,
-	 /* 2896 */ 0x30B0, 0x30E9, 0x30E0, 0x30C8, 0x30F3,
-	 /* 2901 */ 0x30AF, 0x30EB, 0x30BC, 0x30A4, 0x30ED,
-	 /* 2906 */ 0x30AF, 0x30ED, 0x30FC, 0x30CD,
-	 /* 2910 */ 0x30B1, 0x30FC, 0x30B9,
-	 /* 2913 */ 0x30B3, 0x30EB, 0x30CA,
-	 /* 2916 */ 0x30B3, 0x30FC, 0x30DD,
-	 /* 2919 */ 0x30B5, 0x30A4, 0x30AF, 0x30EB,
-	 /* 2923 */ 0x30B5, 0x30F3, 0x30C1, 0x30FC, 0x30E0,
-	 /* 2928 */ 0x30B7, 0x30EA, 0x30F3, 0x30B0,
-	 /* 2932 */ 0x30BB, 0x30F3, 0x30C1,
-	 /* 2935 */ 0x30BB, 0x30F3, 0x30C8,
-	 /* 2938 */ 0x30C0, 0x30FC, 0x30B9,
-	 /* 2941 */ 0x30C7, 0x30B7,
-	 /* 2943 */ 0x30C9, 0x30EB,
-	 /* 2945 */ 0x30C8, 0x30F3,
-	 /* 2947 */ 0x30CA, 0x30CE,
-	 /* 2949 */ 0x30CE, 0x30C3, 0x30C8,
-	 /* 2952 */ 0x30CF, 0x30A4, 0x30C4,
-	 /* 2955 */ 0x30D1, 0x30FC, 0x30BB, 0x30F3, 0x30C8,
-	 /* 2960 */ 0x30D1, 0x30FC, 0x30C4,
-	 /* 2963 */ 0x30D0, 0x30FC, 0x30EC, 0x30EB,
-	 /* 2967 */ 0x30D4, 0x30A2, 0x30B9, 0x30C8, 0x30EB,
-	 /* 2972 */ 0x30D4, 0x30AF, 0x30EB,
-	 /* 2975 */ 0x30D4, 0x30B3,
-	 /* 2977 */ 0x30D3, 0x30EB,
-	 /* 2979 */ 0x30D5, 0x30A1, 0x30E9, 0x30C3, 0x30C9,
-	 /* 2984 */ 0x30D5, 0x30A3, 0x30FC, 0x30C8,
-	 /* 2988 */ 0x30D6, 0x30C3, 0x30B7, 0x30A7, 0x30EB,
-	 /* 2993 */ 0x30D5, 0x30E9, 0x30F3,
-	 /* 2996 */ 0x30D8, 0x30AF, 0x30BF, 0x30FC, 0x30EB,
-	 /* 3001 */ 0x30DA, 0x30BD,
-	 /* 3003 */ 0x30DA, 0x30CB, 0x30D2,
-	 /* 3006 */ 0x30D8, 0x30EB, 0x30C4,
-	 /* 3009 */ 0x30DA, 0x30F3, 0x30B9,
-	 /* 3012 */ 0x30DA, 0x30FC, 0x30B8,
-	 /* 3015 */ 0x30D9, 0x30FC, 0x30BF,
-	 /* 3018 */ 0x30DD, 0x30A4, 0x30F3, 0x30C8,
-	 /* 3022 */ 0x30DC, 0x30EB, 0x30C8,
-	 /* 3025 */ 0x30DB, 0x30F3,
-	 /* 3027 */ 0x30DD, 0x30F3, 0x30C9,
-	 /* 3030 */ 0x30DB, 0x30FC, 0x30EB,
-	 /* 3033 */ 0x30DB, 0x30FC, 0x30F3,
-	 /* 3036 */ 0x30DE, 0x30A4, 0x30AF, 0x30ED,
-	 /* 3040 */ 0x30DE, 0x30A4, 0x30EB,
-	 /* 3043 */ 0x30DE, 0x30C3, 0x30CF,
-	 /* 3046 */ 0x30DE, 0x30EB, 0x30AF,
-	 /* 3049 */ 0x30DE, 0x30F3, 0x30B7, 0x30E7, 0x30F3,
-	 /* 3054 */ 0x30DF, 0x30AF, 0x30ED, 0x30F3,
-	 /* 3058 */ 0x30DF, 0x30EA,
-	 /* 3060 */ 0x30DF, 0x30EA, 0x30D0, 0x30FC, 0x30EB,
-	 /* 3065 */ 0x30E1, 0x30AC,
-	 /* 3067 */ 0x30E1, 0x30AC, 0x30C8, 0x30F3,
-	 /* 3071 */ 0x30E1, 0x30FC, 0x30C8, 0x30EB,
-	 /* 3075 */ 0x30E4, 0x30FC, 0x30C9,
-	 /* 3078 */ 0x30E4, 0x30FC, 0x30EB,
-	 /* 3081 */ 0x30E6, 0x30A2, 0x30F3,
-	 /* 3084 */ 0x30EA, 0x30C3, 0x30C8, 0x30EB,
-	 /* 3088 */ 0x30EA, 0x30E9,
-	 /* 3090 */ 0x30EB, 0x30D4, 0x30FC,
-	 /* 3093 */ 0x30EB, 0x30FC, 0x30D6, 0x30EB,
-	 /* 3097 */ 0x30EC, 0x30E0,
-	 /* 3099 */ 0x30EC, 0x30F3, 0x30C8, 0x30B2, 0x30F3,
-	 /* 3104 */ 0x30EF, 0x30C3, 0x30C8,
-	 /* 3107 */ 0x0030, 0x70B9,
-	 /* 3109 */ 0x0031, 0x70B9,
-	 /* 3111 */ 0x0032, 0x70B9,
-	 /* 3113 */ 0x0033, 0x70B9,
-	 /* 3115 */ 0x0034, 0x70B9,
-	 /* 3117 */ 0x0035, 0x70B9,
-	 /* 3119 */ 0x0036, 0x70B9,
-	 /* 3121 */ 0x0037, 0x70B9,
-	 /* 3123 */ 0x0038, 0x70B9,
-	 /* 3125 */ 0x0039, 0x70B9,
-	 /* 3127 */ 0x0031, 0x0030, 0x70B9,
-	 /* 3130 */ 0x0031, 0x0031, 0x70B9,
-	 /* 3133 */ 0x0031, 0x0032, 0x70B9,
-	 /* 3136 */ 0x0031, 0x0033, 0x70B9,
-	 /* 3139 */ 0x0031, 0x0034, 0x70B9,
-	 /* 3142 */ 0x0031, 0x0035, 0x70B9,
-	 /* 3145 */ 0x0031, 0x0036, 0x70B9,
-	 /* 3148 */ 0x0031, 0x0037, 0x70B9,
-	 /* 3151 */ 0x0031, 0x0038, 0x70B9,
-	 /* 3154 */ 0x0031, 0x0039, 0x70B9,
-	 /* 3157 */ 0x0032, 0x0030, 0x70B9,
-	 /* 3160 */ 0x0032, 0x0031, 0x70B9,
-	 /* 3163 */ 0x0032, 0x0032, 0x70B9,
-	 /* 3166 */ 0x0032, 0x0033, 0x70B9,
-	 /* 3169 */ 0x0032, 0x0034, 0x70B9,
-	 /* 3172 */ 0x0068, 0x0050, 0x0061,
-	 /* 3175 */ 0x0064, 0x0061,
-	 /* 3177 */ 0x0041, 0x0055,
-	 /* 3179 */ 0x0062, 0x0061, 0x0072,
-	 /* 3182 */ 0x006F, 0x0056,
-	 /* 3184 */ 0x0070, 0x0063,
-	 /* 3186 */ 0x0064, 0x006D,
-	 /* 3188 */ 0x0064, 0x006D, 0x00B2,
-	 /* 3191 */ 0x0064, 0x006D, 0x00B3,
-	 /* 3194 */ 0x0049, 0x0055,
-	 /* 3196 */ 0x5E73, 0x6210,
-	 /* 3198 */ 0x662D, 0x548C,
-	 /* 3200 */ 0x5927, 0x6B63,
-	 /* 3202 */ 0x660E, 0x6CBB,
-	 /* 3204 */ 0x682A, 0x5F0F, 0x4F1A, 0x793E,
-	 /* 3208 */ 0x0070, 0x0041,
-	 /* 3210 */ 0x006E, 0x0041,
-	 /* 3212 */ 0x03BC, 0x0041,
-	 /* 3214 */ 0x006D, 0x0041,
-	 /* 3216 */ 0x006B, 0x0041,
-	 /* 3218 */ 0x004B, 0x0042,
-	 /* 3220 */ 0x004D, 0x0042,
-	 /* 3222 */ 0x0047, 0x0042,
-	 /* 3224 */ 0x0063, 0x0061, 0x006C,
-	 /* 3227 */ 0x006B, 0x0063, 0x0061, 0x006C,
-	 /* 3231 */ 0x0070, 0x0046,
-	 /* 3233 */ 0x006E, 0x0046,
-	 /* 3235 */ 0x03BC, 0x0046,
-	 /* 3237 */ 0x03BC, 0x0067,
-	 /* 3239 */ 0x006D, 0x0067,
-	 /* 3241 */ 0x006B, 0x0067,
-	 /* 3243 */ 0x0048, 0x007A,
-	 /* 3245 */ 0x006B, 0x0048, 0x007A,
-	 /* 3248 */ 0x004D, 0x0048, 0x007A,
-	 /* 3251 */ 0x0047, 0x0048, 0x007A,
-	 /* 3254 */ 0x0054, 0x0048, 0x007A,
-	 /* 3257 */ 0x03BC, 0x2113,
-	 /* 3259 */ 0x006D, 0x2113,
-	 /* 3261 */ 0x0064, 0x2113,
-	 /* 3263 */ 0x006B, 0x2113,
-	 /* 3265 */ 0x0066, 0x006D,
-	 /* 3267 */ 0x006E, 0x006D,
-	 /* 3269 */ 0x03BC, 0x006D,
-	 /* 3271 */ 0x006D, 0x006D,
-	 /* 3273 */ 0x0063, 0x006D,
-	 /* 3275 */ 0x006B, 0x006D,
-	 /* 3277 */ 0x006D, 0x006D, 0x00B2,
-	 /* 3280 */ 0x0063, 0x006D, 0x00B2,
-	 /* 3283 */ 0x006D, 0x00B2,
-	 /* 3285 */ 0x006B, 0x006D, 0x00B2,
-	 /* 3288 */ 0x006D, 0x006D, 0x00B3,
-	 /* 3291 */ 0x0063, 0x006D, 0x00B3,
-	 /* 3294 */ 0x006D, 0x00B3,
-	 /* 3296 */ 0x006B, 0x006D, 0x00B3,
-	 /* 3299 */ 0x006D, 0x2215, 0x0073,
-	 /* 3302 */ 0x006D, 0x2215, 0x0073, 0x00B2,
-	 /* 3306 */ 0x0050, 0x0061,
-	 /* 3308 */ 0x006B, 0x0050, 0x0061,
-	 /* 3311 */ 0x004D, 0x0050, 0x0061,
-	 /* 3314 */ 0x0047, 0x0050, 0x0061,
-	 /* 3317 */ 0x0072, 0x0061, 0x0064,
-	 /* 3320 */ 0x0072, 0x0061, 0x0064, 0x2215, 0x0073,
-	 /* 3325 */ 0x0072, 0x0061, 0x0064, 0x2215, 0x0073, 0x00B2,
-	 /* 3331 */ 0x0070, 0x0073,
-	 /* 3333 */ 0x006E, 0x0073,
-	 /* 3335 */ 0x03BC, 0x0073,
-	 /* 3337 */ 0x006D, 0x0073,
-	 /* 3339 */ 0x0070, 0x0056,
-	 /* 3341 */ 0x006E, 0x0056,
-	 /* 3343 */ 0x03BC, 0x0056,
-	 /* 3345 */ 0x006D, 0x0056,
-	 /* 3347 */ 0x006B, 0x0056,
-	 /* 3349 */ 0x004D, 0x0056,
-	 /* 3351 */ 0x0070, 0x0057,
-	 /* 3353 */ 0x006E, 0x0057,
-	 /* 3355 */ 0x03BC, 0x0057,
-	 /* 3357 */ 0x006D, 0x0057,
-	 /* 3359 */ 0x006B, 0x0057,
-	 /* 3361 */ 0x004D, 0x0057,
-	 /* 3363 */ 0x006B, 0x03A9,
-	 /* 3365 */ 0x004D, 0x03A9,
-	 /* 3367 */ 0x0061, 0x002E, 0x006D, 0x002E,
-	 /* 3371 */ 0x0042, 0x0071,
-	 /* 3373 */ 0x0063, 0x0063,
-	 /* 3375 */ 0x0063, 0x0064,
-	 /* 3377 */ 0x0043, 0x2215, 0x006B, 0x0067,
-	 /* 3381 */ 0x0043, 0x006F, 0x002E,
-	 /* 3384 */ 0x0064, 0x0042,
-	 /* 3386 */ 0x0047, 0x0079,
-	 /* 3388 */ 0x0068, 0x0061,
-	 /* 3390 */ 0x0048, 0x0050,
-	 /* 3392 */ 0x0069, 0x006E,
-	 /* 3394 */ 0x004B, 0x004B,
-	 /* 3396 */ 0x004B, 0x004D,
-	 /* 3398 */ 0x006B, 0x0074,
-	 /* 3400 */ 0x006C, 0x006D,
-	 /* 3402 */ 0x006C, 0x006E,
-	 /* 3404 */ 0x006C, 0x006F, 0x0067,
-	 /* 3407 */ 0x006C, 0x0078,
-	 /* 3409 */ 0x006D, 0x0062,
-	 /* 3411 */ 0x006D, 0x0069, 0x006C,
-	 /* 3414 */ 0x006D, 0x006F, 0x006C,
-	 /* 3417 */ 0x0050, 0x0048,
-	 /* 3419 */ 0x0070, 0x002E, 0x006D, 0x002E,
-	 /* 3423 */ 0x0050, 0x0050, 0x004D,
-	 /* 3426 */ 0x0050, 0x0052,
-	 /* 3428 */ 0x0073, 0x0072,
-	 /* 3430 */ 0x0053, 0x0076,
-	 /* 3432 */ 0x0057, 0x0062,
-	 /* 3434 */ 0x0056, 0x2215, 0x006D,
-	 /* 3437 */ 0x0041, 0x2215, 0x006D,
-	 /* 3440 */ 0x0031, 0x65E5,
-	 /* 3442 */ 0x0032, 0x65E5,
-	 /* 3444 */ 0x0033, 0x65E5,
-	 /* 3446 */ 0x0034, 0x65E5,
-	 /* 3448 */ 0x0035, 0x65E5,
-	 /* 3450 */ 0x0036, 0x65E5,
-	 /* 3452 */ 0x0037, 0x65E5,
-	 /* 3454 */ 0x0038, 0x65E5,
-	 /* 3456 */ 0x0039, 0x65E5,
-	 /* 3458 */ 0x0031, 0x0030, 0x65E5,
-	 /* 3461 */ 0x0031, 0x0031, 0x65E5,
-	 /* 3464 */ 0x0031, 0x0032, 0x65E5,
-	 /* 3467 */ 0x0031, 0x0033, 0x65E5,
-	 /* 3470 */ 0x0031, 0x0034, 0x65E5,
-	 /* 3473 */ 0x0031, 0x0035, 0x65E5,
-	 /* 3476 */ 0x0031, 0x0036, 0x65E5,
-	 /* 3479 */ 0x0031, 0x0037, 0x65E5,
-	 /* 3482 */ 0x0031, 0x0038, 0x65E5,
-	 /* 3485 */ 0x0031, 0x0039, 0x65E5,
-	 /* 3488 */ 0x0032, 0x0030, 0x65E5,
-	 /* 3491 */ 0x0032, 0x0031, 0x65E5,
-	 /* 3494 */ 0x0032, 0x0032, 0x65E5,
-	 /* 3497 */ 0x0032, 0x0033, 0x65E5,
-	 /* 3500 */ 0x0032, 0x0034, 0x65E5,
-	 /* 3503 */ 0x0032, 0x0035, 0x65E5,
-	 /* 3506 */ 0x0032, 0x0036, 0x65E5,
-	 /* 3509 */ 0x0032, 0x0037, 0x65E5,
-	 /* 3512 */ 0x0032, 0x0038, 0x65E5,
-	 /* 3515 */ 0x0032, 0x0039, 0x65E5,
-	 /* 3518 */ 0x0033, 0x0030, 0x65E5,
-	 /* 3521 */ 0x0033, 0x0031, 0x65E5,
-	 /* 3524 */ 0x0067, 0x0061, 0x006C,
-	 /* 3527 */ 0x242EE,
-	 /* 3528 */ 0x2284A,
-	 /* 3529 */ 0x22844,
-	 /* 3530 */ 0x233D5,
-	 /* 3531 */ 0x25249,
-	 /* 3532 */ 0x25CD0,
-	 /* 3533 */ 0x27ED3,
-	 /* 3534 */ 0x0066, 0x0066,
-	 /* 3536 */ 0x0066, 0x0069,
-	 /* 3538 */ 0x0066, 0x006C,
-	 /* 3540 */ 0x0066, 0x0066, 0x0069,
-	 /* 3543 */ 0x0066, 0x0066, 0x006C,
-	 /* 3546 */ 0x017F, 0x0074,
-	 /* 3548 */ 0x0073, 0x0074,
-	 /* 3550 */ 0x0574, 0x0576,
-	 /* 3552 */ 0x0574, 0x0565,
-	 /* 3554 */ 0x0574, 0x056B,
-	 /* 3556 */ 0x057E, 0x0576,
-	 /* 3558 */ 0x0574, 0x056D,
-	 /* 3560 */ 0x05D9, 0x05B4,
-	 /* 3562 */ 0x05F2, 0x05B7,
-	 /* 3564 */ 0x05E9, 0x05C1,
-	 /* 3566 */ 0x05E9, 0x05C2,
-	 /* 3568 */ 0xFB49, 0x05C1,
-	 /* 3570 */ 0xFB49, 0x05C2,
-	 /* 3572 */ 0x05D0, 0x05B7,
-	 /* 3574 */ 0x05D0, 0x05B8,
-	 /* 3576 */ 0x05D0, 0x05BC,
-	 /* 3578 */ 0x05D1, 0x05BC,
-	 /* 3580 */ 0x05D2, 0x05BC,
-	 /* 3582 */ 0x05D3, 0x05BC,
-	 /* 3584 */ 0x05D4, 0x05BC,
-	 /* 3586 */ 0x05D5, 0x05BC,
-	 /* 3588 */ 0x05D6, 0x05BC,
-	 /* 3590 */ 0x05D8, 0x05BC,
-	 /* 3592 */ 0x05D9, 0x05BC,
-	 /* 3594 */ 0x05DA, 0x05BC,
-	 /* 3596 */ 0x05DB, 0x05BC,
-	 /* 3598 */ 0x05DC, 0x05BC,
-	 /* 3600 */ 0x05DE, 0x05BC,
-	 /* 3602 */ 0x05E0, 0x05BC,
-	 /* 3604 */ 0x05E1, 0x05BC,
-	 /* 3606 */ 0x05E3, 0x05BC,
-	 /* 3608 */ 0x05E4, 0x05BC,
-	 /* 3610 */ 0x05E6, 0x05BC,
-	 /* 3612 */ 0x05E7, 0x05BC,
-	 /* 3614 */ 0x05E8, 0x05BC,
-	 /* 3616 */ 0x05E9, 0x05BC,
-	 /* 3618 */ 0x05EA, 0x05BC,
-	 /* 3620 */ 0x05D5, 0x05B9,
-	 /* 3622 */ 0x05D1, 0x05BF,
-	 /* 3624 */ 0x05DB, 0x05BF,
-	 /* 3626 */ 0x05E4, 0x05BF,
-	 /* 3628 */ 0x05D0, 0x05DC,
-	 /* 3630 */ 0x0626, 0x0627,
-	 /* 3632 */ 0x0626, 0x0627,
-	 /* 3634 */ 0x0626, 0x06D5,
-	 /* 3636 */ 0x0626, 0x06D5,
-	 /* 3638 */ 0x0626, 0x0648,
-	 /* 3640 */ 0x0626, 0x0648,
-	 /* 3642 */ 0x0626, 0x06C7,
-	 /* 3644 */ 0x0626, 0x06C7,
-	 /* 3646 */ 0x0626, 0x06C6,
-	 /* 3648 */ 0x0626, 0x06C6,
-	 /* 3650 */ 0x0626, 0x06C8,
-	 /* 3652 */ 0x0626, 0x06C8,
-	 /* 3654 */ 0x0626, 0x06D0,
-	 /* 3656 */ 0x0626, 0x06D0,
-	 /* 3658 */ 0x0626, 0x06D0,
-	 /* 3660 */ 0x0626, 0x0649,
-	 /* 3662 */ 0x0626, 0x0649,
-	 /* 3664 */ 0x0626, 0x0649,
-	 /* 3666 */ 0x0626, 0x062C,
-	 /* 3668 */ 0x0626, 0x062D,
-	 /* 3670 */ 0x0626, 0x0645,
-	 /* 3672 */ 0x0626, 0x0649,
-	 /* 3674 */ 0x0626, 0x064A,
-	 /* 3676 */ 0x0628, 0x062C,
-	 /* 3678 */ 0x0628, 0x062D,
-	 /* 3680 */ 0x0628, 0x062E,
-	 /* 3682 */ 0x0628, 0x0645,
-	 /* 3684 */ 0x0628, 0x0649,
-	 /* 3686 */ 0x0628, 0x064A,
-	 /* 3688 */ 0x062A, 0x062C,
-	 /* 3690 */ 0x062A, 0x062D,
-	 /* 3692 */ 0x062A, 0x062E,
-	 /* 3694 */ 0x062A, 0x0645,
-	 /* 3696 */ 0x062A, 0x0649,
-	 /* 3698 */ 0x062A, 0x064A,
-	 /* 3700 */ 0x062B, 0x062C,
-	 /* 3702 */ 0x062B, 0x0645,
-	 /* 3704 */ 0x062B, 0x0649,
-	 /* 3706 */ 0x062B, 0x064A,
-	 /* 3708 */ 0x062C, 0x062D,
-	 /* 3710 */ 0x062C, 0x0645,
-	 /* 3712 */ 0x062D, 0x062C,
-	 /* 3714 */ 0x062D, 0x0645,
-	 /* 3716 */ 0x062E, 0x062C,
-	 /* 3718 */ 0x062E, 0x062D,
-	 /* 3720 */ 0x062E, 0x0645,
-	 /* 3722 */ 0x0633, 0x062C,
-	 /* 3724 */ 0x0633, 0x062D,
-	 /* 3726 */ 0x0633, 0x062E,
-	 /* 3728 */ 0x0633, 0x0645,
-	 /* 3730 */ 0x0635, 0x062D,
-	 /* 3732 */ 0x0635, 0x0645,
-	 /* 3734 */ 0x0636, 0x062C,
-	 /* 3736 */ 0x0636, 0x062D,
-	 /* 3738 */ 0x0636, 0x062E,
-	 /* 3740 */ 0x0636, 0x0645,
-	 /* 3742 */ 0x0637, 0x062D,
-	 /* 3744 */ 0x0637, 0x0645,
-	 /* 3746 */ 0x0638, 0x0645,
-	 /* 3748 */ 0x0639, 0x062C,
-	 /* 3750 */ 0x0639, 0x0645,
-	 /* 3752 */ 0x063A, 0x062C,
-	 /* 3754 */ 0x063A, 0x0645,
-	 /* 3756 */ 0x0641, 0x062C,
-	 /* 3758 */ 0x0641, 0x062D,
-	 /* 3760 */ 0x0641, 0x062E,
-	 /* 3762 */ 0x0641, 0x0645,
-	 /* 3764 */ 0x0641, 0x0649,
-	 /* 3766 */ 0x0641, 0x064A,
-	 /* 3768 */ 0x0642, 0x062D,
-	 /* 3770 */ 0x0642, 0x0645,
-	 /* 3772 */ 0x0642, 0x0649,
-	 /* 3774 */ 0x0642, 0x064A,
-	 /* 3776 */ 0x0643, 0x0627,
-	 /* 3778 */ 0x0643, 0x062C,
-	 /* 3780 */ 0x0643, 0x062D,
-	 /* 3782 */ 0x0643, 0x062E,
-	 /* 3784 */ 0x0643, 0x0644,
-	 /* 3786 */ 0x0643, 0x0645,
-	 /* 3788 */ 0x0643, 0x0649,
-	 /* 3790 */ 0x0643, 0x064A,
-	 /* 3792 */ 0x0644, 0x062C,
-	 /* 3794 */ 0x0644, 0x062D,
-	 /* 3796 */ 0x0644, 0x062E,
-	 /* 3798 */ 0x0644, 0x0645,
-	 /* 3800 */ 0x0644, 0x0649,
-	 /* 3802 */ 0x0644, 0x064A,
-	 /* 3804 */ 0x0645, 0x062C,
-	 /* 3806 */ 0x0645, 0x062D,
-	 /* 3808 */ 0x0645, 0x062E,
-	 /* 3810 */ 0x0645, 0x0645,
-	 /* 3812 */ 0x0645, 0x0649,
-	 /* 3814 */ 0x0645, 0x064A,
-	 /* 3816 */ 0x0646, 0x062C,
-	 /* 3818 */ 0x0646, 0x062D,
-	 /* 3820 */ 0x0646, 0x062E,
-	 /* 3822 */ 0x0646, 0x0645,
-	 /* 3824 */ 0x0646, 0x0649,
-	 /* 3826 */ 0x0646, 0x064A,
-	 /* 3828 */ 0x0647, 0x062C,
-	 /* 3830 */ 0x0647, 0x0645,
-	 /* 3832 */ 0x0647, 0x0649,
-	 /* 3834 */ 0x0647, 0x064A,
-	 /* 3836 */ 0x064A, 0x062C,
-	 /* 3838 */ 0x064A, 0x062D,
-	 /* 3840 */ 0x064A, 0x062E,
-	 /* 3842 */ 0x064A, 0x0645,
-	 /* 3844 */ 0x064A, 0x0649,
-	 /* 3846 */ 0x064A, 0x064A,
-	 /* 3848 */ 0x0630, 0x0670,
-	 /* 3850 */ 0x0631, 0x0670,
-	 /* 3852 */ 0x0649, 0x0670,
-	 /* 3854 */ 0x0020, 0x064C, 0x0651,
-	 /* 3857 */ 0x0020, 0x064D, 0x0651,
-	 /* 3860 */ 0x0020, 0x064E, 0x0651,
-	 /* 3863 */ 0x0020, 0x064F, 0x0651,
-	 /* 3866 */ 0x0020, 0x0650, 0x0651,
-	 /* 3869 */ 0x0020, 0x0651, 0x0670,
-	 /* 3872 */ 0x0626, 0x0631,
-	 /* 3874 */ 0x0626, 0x0632,
-	 /* 3876 */ 0x0626, 0x0645,
-	 /* 3878 */ 0x0626, 0x0646,
-	 /* 3880 */ 0x0626, 0x0649,
-	 /* 3882 */ 0x0626, 0x064A,
-	 /* 3884 */ 0x0628, 0x0631,
-	 /* 3886 */ 0x0628, 0x0632,
-	 /* 3888 */ 0x0628, 0x0645,
-	 /* 3890 */ 0x0628, 0x0646,
-	 /* 3892 */ 0x0628, 0x0649,
-	 /* 3894 */ 0x0628, 0x064A,
-	 /* 3896 */ 0x062A, 0x0631,
-	 /* 3898 */ 0x062A, 0x0632,
-	 /* 3900 */ 0x062A, 0x0645,
-	 /* 3902 */ 0x062A, 0x0646,
-	 /* 3904 */ 0x062A, 0x0649,
-	 /* 3906 */ 0x062A, 0x064A,
-	 /* 3908 */ 0x062B, 0x0631,
-	 /* 3910 */ 0x062B, 0x0632,
-	 /* 3912 */ 0x062B, 0x0645,
-	 /* 3914 */ 0x062B, 0x0646,
-	 /* 3916 */ 0x062B, 0x0649,
-	 /* 3918 */ 0x062B, 0x064A,
-	 /* 3920 */ 0x0641, 0x0649,
-	 /* 3922 */ 0x0641, 0x064A,
-	 /* 3924 */ 0x0642, 0x0649,
-	 /* 3926 */ 0x0642, 0x064A,
-	 /* 3928 */ 0x0643, 0x0627,
-	 /* 3930 */ 0x0643, 0x0644,
-	 /* 3932 */ 0x0643, 0x0645,
-	 /* 3934 */ 0x0643, 0x0649,
-	 /* 3936 */ 0x0643, 0x064A,
-	 /* 3938 */ 0x0644, 0x0645,
-	 /* 3940 */ 0x0644, 0x0649,
-	 /* 3942 */ 0x0644, 0x064A,
-	 /* 3944 */ 0x0645, 0x0627,
-	 /* 3946 */ 0x0645, 0x0645,
-	 /* 3948 */ 0x0646, 0x0631,
-	 /* 3950 */ 0x0646, 0x0632,
-	 /* 3952 */ 0x0646, 0x0645,
-	 /* 3954 */ 0x0646, 0x0646,
-	 /* 3956 */ 0x0646, 0x0649,
-	 /* 3958 */ 0x0646, 0x064A,
-	 /* 3960 */ 0x0649, 0x0670,
-	 /* 3962 */ 0x064A, 0x0631,
-	 /* 3964 */ 0x064A, 0x0632,
-	 /* 3966 */ 0x064A, 0x0645,
-	 /* 3968 */ 0x064A, 0x0646,
-	 /* 3970 */ 0x064A, 0x0649,
-	 /* 3972 */ 0x064A, 0x064A,
-	 /* 3974 */ 0x0626, 0x062C,
-	 /* 3976 */ 0x0626, 0x062D,
-	 /* 3978 */ 0x0626, 0x062E,
-	 /* 3980 */ 0x0626, 0x0645,
-	 /* 3982 */ 0x0626, 0x0647,
-	 /* 3984 */ 0x0628, 0x062C,
-	 /* 3986 */ 0x0628, 0x062D,
-	 /* 3988 */ 0x0628, 0x062E,
-	 /* 3990 */ 0x0628, 0x0645,
-	 /* 3992 */ 0x0628, 0x0647,
-	 /* 3994 */ 0x062A, 0x062C,
-	 /* 3996 */ 0x062A, 0x062D,
-	 /* 3998 */ 0x062A, 0x062E,
-	 /* 4000 */ 0x062A, 0x0645,
-	 /* 4002 */ 0x062A, 0x0647,
-	 /* 4004 */ 0x062B, 0x0645,
-	 /* 4006 */ 0x062C, 0x062D,
-	 /* 4008 */ 0x062C, 0x0645,
-	 /* 4010 */ 0x062D, 0x062C,
-	 /* 4012 */ 0x062D, 0x0645,
-	 /* 4014 */ 0x062E, 0x062C,
-	 /* 4016 */ 0x062E, 0x0645,
-	 /* 4018 */ 0x0633, 0x062C,
-	 /* 4020 */ 0x0633, 0x062D,
-	 /* 4022 */ 0x0633, 0x062E,
-	 /* 4024 */ 0x0633, 0x0645,
-	 /* 4026 */ 0x0635, 0x062D,
-	 /* 4028 */ 0x0635, 0x062E,
-	 /* 4030 */ 0x0635, 0x0645,
-	 /* 4032 */ 0x0636, 0x062C,
-	 /* 4034 */ 0x0636, 0x062D,
-	 /* 4036 */ 0x0636, 0x062E,
-	 /* 4038 */ 0x0636, 0x0645,
-	 /* 4040 */ 0x0637, 0x062D,
-	 /* 4042 */ 0x0638, 0x0645,
-	 /* 4044 */ 0x0639, 0x062C,
-	 /* 4046 */ 0x0639, 0x0645,
-	 /* 4048 */ 0x063A, 0x062C,
-	 /* 4050 */ 0x063A, 0x0645,
-	 /* 4052 */ 0x0641, 0x062C,
-	 /* 4054 */ 0x0641, 0x062D,
-	 /* 4056 */ 0x0641, 0x062E,
-	 /* 4058 */ 0x0641, 0x0645,
-	 /* 4060 */ 0x0642, 0x062D,
-	 /* 4062 */ 0x0642, 0x0645,
-	 /* 4064 */ 0x0643, 0x062C,
-	 /* 4066 */ 0x0643, 0x062D,
-	 /* 4068 */ 0x0643, 0x062E,
-	 /* 4070 */ 0x0643, 0x0644,
-	 /* 4072 */ 0x0643, 0x0645,
-	 /* 4074 */ 0x0644, 0x062C,
-	 /* 4076 */ 0x0644, 0x062D,
-	 /* 4078 */ 0x0644, 0x062E,
-	 /* 4080 */ 0x0644, 0x0645,
-	 /* 4082 */ 0x0644, 0x0647,
-	 /* 4084 */ 0x0645, 0x062C,
-	 /* 4086 */ 0x0645, 0x062D,
-	 /* 4088 */ 0x0645, 0x062E,
-	 /* 4090 */ 0x0645, 0x0645,
-	 /* 4092 */ 0x0646, 0x062C,
-	 /* 4094 */ 0x0646, 0x062D,
-	 /* 4096 */ 0x0646, 0x062E,
-	 /* 4098 */ 0x0646, 0x0645,
-	 /* 4100 */ 0x0646, 0x0647,
-	 /* 4102 */ 0x0647, 0x062C,
-	 /* 4104 */ 0x0647, 0x0645,
-	 /* 4106 */ 0x0647, 0x0670,
-	 /* 4108 */ 0x064A, 0x062C,
-	 /* 4110 */ 0x064A, 0x062D,
-	 /* 4112 */ 0x064A, 0x062E,
-	 /* 4114 */ 0x064A, 0x0645,
-	 /* 4116 */ 0x064A, 0x0647,
-	 /* 4118 */ 0x0626, 0x0645,
-	 /* 4120 */ 0x0626, 0x0647,
-	 /* 4122 */ 0x0628, 0x0645,
-	 /* 4124 */ 0x0628, 0x0647,
-	 /* 4126 */ 0x062A, 0x0645,
-	 /* 4128 */ 0x062A, 0x0647,
-	 /* 4130 */ 0x062B, 0x0645,
-	 /* 4132 */ 0x062B, 0x0647,
-	 /* 4134 */ 0x0633, 0x0645,
-	 /* 4136 */ 0x0633, 0x0647,
-	 /* 4138 */ 0x0634, 0x0645,
-	 /* 4140 */ 0x0634, 0x0647,
-	 /* 4142 */ 0x0643, 0x0644,
-	 /* 4144 */ 0x0643, 0x0645,
-	 /* 4146 */ 0x0644, 0x0645,
-	 /* 4148 */ 0x0646, 0x0645,
-	 /* 4150 */ 0x0646, 0x0647,
-	 /* 4152 */ 0x064A, 0x0645,
-	 /* 4154 */ 0x064A, 0x0647,
-	 /* 4156 */ 0x0640, 0x064E, 0x0651,
-	 /* 4159 */ 0x0640, 0x064F, 0x0651,
-	 /* 4162 */ 0x0640, 0x0650, 0x0651,
-	 /* 4165 */ 0x0637, 0x0649,
-	 /* 4167 */ 0x0637, 0x064A,
-	 /* 4169 */ 0x0639, 0x0649,
-	 /* 4171 */ 0x0639, 0x064A,
-	 /* 4173 */ 0x063A, 0x0649,
-	 /* 4175 */ 0x063A, 0x064A,
-	 /* 4177 */ 0x0633, 0x0649,
-	 /* 4179 */ 0x0633, 0x064A,
-	 /* 4181 */ 0x0634, 0x0649,
-	 /* 4183 */ 0x0634, 0x064A,
-	 /* 4185 */ 0x062D, 0x0649,
-	 /* 4187 */ 0x062D, 0x064A,
-	 /* 4189 */ 0x062C, 0x0649,
-	 /* 4191 */ 0x062C, 0x064A,
-	 /* 4193 */ 0x062E, 0x0649,
-	 /* 4195 */ 0x062E, 0x064A,
-	 /* 4197 */ 0x0635, 0x0649,
-	 /* 4199 */ 0x0635, 0x064A,
-	 /* 4201 */ 0x0636, 0x0649,
-	 /* 4203 */ 0x0636, 0x064A,
-	 /* 4205 */ 0x0634, 0x062C,
-	 /* 4207 */ 0x0634, 0x062D,
-	 /* 4209 */ 0x0634, 0x062E,
-	 /* 4211 */ 0x0634, 0x0645,
-	 /* 4213 */ 0x0634, 0x0631,
-	 /* 4215 */ 0x0633, 0x0631,
-	 /* 4217 */ 0x0635, 0x0631,
-	 /* 4219 */ 0x0636, 0x0631,
-	 /* 4221 */ 0x0637, 0x0649,
-	 /* 4223 */ 0x0637, 0x064A,
-	 /* 4225 */ 0x0639, 0x0649,
-	 /* 4227 */ 0x0639, 0x064A,
-	 /* 4229 */ 0x063A, 0x0649,
-	 /* 4231 */ 0x063A, 0x064A,
-	 /* 4233 */ 0x0633, 0x0649,
-	 /* 4235 */ 0x0633, 0x064A,
-	 /* 4237 */ 0x0634, 0x0649,
-	 /* 4239 */ 0x0634, 0x064A,
-	 /* 4241 */ 0x062D, 0x0649,
-	 /* 4243 */ 0x062D, 0x064A,
-	 /* 4245 */ 0x062C, 0x0649,
-	 /* 4247 */ 0x062C, 0x064A,
-	 /* 4249 */ 0x062E, 0x0649,
-	 /* 4251 */ 0x062E, 0x064A,
-	 /* 4253 */ 0x0635, 0x0649,
-	 /* 4255 */ 0x0635, 0x064A,
-	 /* 4257 */ 0x0636, 0x0649,
-	 /* 4259 */ 0x0636, 0x064A,
-	 /* 4261 */ 0x0634, 0x062C,
-	 /* 4263 */ 0x0634, 0x062D,
-	 /* 4265 */ 0x0634, 0x062E,
-	 /* 4267 */ 0x0634, 0x0645,
-	 /* 4269 */ 0x0634, 0x0631,
-	 /* 4271 */ 0x0633, 0x0631,
-	 /* 4273 */ 0x0635, 0x0631,
-	 /* 4275 */ 0x0636, 0x0631,
-	 /* 4277 */ 0x0634, 0x062C,
-	 /* 4279 */ 0x0634, 0x062D,
-	 /* 4281 */ 0x0634, 0x062E,
-	 /* 4283 */ 0x0634, 0x0645,
-	 /* 4285 */ 0x0633, 0x0647,
-	 /* 4287 */ 0x0634, 0x0647,
-	 /* 4289 */ 0x0637, 0x0645,
-	 /* 4291 */ 0x0633, 0x062C,
-	 /* 4293 */ 0x0633, 0x062D,
-	 /* 4295 */ 0x0633, 0x062E,
-	 /* 4297 */ 0x0634, 0x062C,
-	 /* 4299 */ 0x0634, 0x062D,
-	 /* 4301 */ 0x0634, 0x062E,
-	 /* 4303 */ 0x0637, 0x0645,
-	 /* 4305 */ 0x0638, 0x0645,
-	 /* 4307 */ 0x0627, 0x064B,
-	 /* 4309 */ 0x0627, 0x064B,
-	 /* 4311 */ 0x062A, 0x062C, 0x0645,
-	 /* 4314 */ 0x062A, 0x062D, 0x062C,
-	 /* 4317 */ 0x062A, 0x062D, 0x062C,
-	 /* 4320 */ 0x062A, 0x062D, 0x0645,
-	 /* 4323 */ 0x062A, 0x062E, 0x0645,
-	 /* 4326 */ 0x062A, 0x0645, 0x062C,
-	 /* 4329 */ 0x062A, 0x0645, 0x062D,
-	 /* 4332 */ 0x062A, 0x0645, 0x062E,
-	 /* 4335 */ 0x062C, 0x0645, 0x062D,
-	 /* 4338 */ 0x062C, 0x0645, 0x062D,
-	 /* 4341 */ 0x062D, 0x0645, 0x064A,
-	 /* 4344 */ 0x062D, 0x0645, 0x0649,
-	 /* 4347 */ 0x0633, 0x062D, 0x062C,
-	 /* 4350 */ 0x0633, 0x062C, 0x062D,
-	 /* 4353 */ 0x0633, 0x062C, 0x0649,
-	 /* 4356 */ 0x0633, 0x0645, 0x062D,
-	 /* 4359 */ 0x0633, 0x0645, 0x062D,
-	 /* 4362 */ 0x0633, 0x0645, 0x062C,
-	 /* 4365 */ 0x0633, 0x0645, 0x0645,
-	 /* 4368 */ 0x0633, 0x0645, 0x0645,
-	 /* 4371 */ 0x0635, 0x062D, 0x062D,
-	 /* 4374 */ 0x0635, 0x062D, 0x062D,
-	 /* 4377 */ 0x0635, 0x0645, 0x0645,
-	 /* 4380 */ 0x0634, 0x062D, 0x0645,
-	 /* 4383 */ 0x0634, 0x062D, 0x0645,
-	 /* 4386 */ 0x0634, 0x062C, 0x064A,
-	 /* 4389 */ 0x0634, 0x0645, 0x062E,
-	 /* 4392 */ 0x0634, 0x0645, 0x062E,
-	 /* 4395 */ 0x0634, 0x0645, 0x0645,
-	 /* 4398 */ 0x0634, 0x0645, 0x0645,
-	 /* 4401 */ 0x0636, 0x062D, 0x0649,
-	 /* 4404 */ 0x0636, 0x062E, 0x0645,
-	 /* 4407 */ 0x0636, 0x062E, 0x0645,
-	 /* 4410 */ 0x0637, 0x0645, 0x062D,
-	 /* 4413 */ 0x0637, 0x0645, 0x062D,
-	 /* 4416 */ 0x0637, 0x0645, 0x0645,
-	 /* 4419 */ 0x0637, 0x0645, 0x064A,
-	 /* 4422 */ 0x0639, 0x062C, 0x0645,
-	 /* 4425 */ 0x0639, 0x0645, 0x0645,
-	 /* 4428 */ 0x0639, 0x0645, 0x0645,
-	 /* 4431 */ 0x0639, 0x0645, 0x0649,
-	 /* 4434 */ 0x063A, 0x0645, 0x0645,
-	 /* 4437 */ 0x063A, 0x0645, 0x064A,
-	 /* 4440 */ 0x063A, 0x0645, 0x0649,
-	 /* 4443 */ 0x0641, 0x062E, 0x0645,
-	 /* 4446 */ 0x0641, 0x062E, 0x0645,
-	 /* 4449 */ 0x0642, 0x0645, 0x062D,
-	 /* 4452 */ 0x0642, 0x0645, 0x0645,
-	 /* 4455 */ 0x0644, 0x062D, 0x0645,
-	 /* 4458 */ 0x0644, 0x062D, 0x064A,
-	 /* 4461 */ 0x0644, 0x062D, 0x0649,
-	 /* 4464 */ 0x0644, 0x062C, 0x062C,
-	 /* 4467 */ 0x0644, 0x062C, 0x062C,
-	 /* 4470 */ 0x0644, 0x062E, 0x0645,
-	 /* 4473 */ 0x0644, 0x062E, 0x0645,
-	 /* 4476 */ 0x0644, 0x0645, 0x062D,
-	 /* 4479 */ 0x0644, 0x0645, 0x062D,
-	 /* 4482 */ 0x0645, 0x062D, 0x062C,
-	 /* 4485 */ 0x0645, 0x062D, 0x0645,
-	 /* 4488 */ 0x0645, 0x062D, 0x064A,
-	 /* 4491 */ 0x0645, 0x062C, 0x062D,
-	 /* 4494 */ 0x0645, 0x062C, 0x0645,
-	 /* 4497 */ 0x0645, 0x062E, 0x062C,
-	 /* 4500 */ 0x0645, 0x062E, 0x0645,
-	 /* 4503 */ 0x0645, 0x062C, 0x062E,
-	 /* 4506 */ 0x0647, 0x0645, 0x062C,
-	 /* 4509 */ 0x0647, 0x0645, 0x0645,
-	 /* 4512 */ 0x0646, 0x062D, 0x0645,
-	 /* 4515 */ 0x0646, 0x062D, 0x0649,
-	 /* 4518 */ 0x0646, 0x062C, 0x0645,
-	 /* 4521 */ 0x0646, 0x062C, 0x0645,
-	 /* 4524 */ 0x0646, 0x062C, 0x0649,
-	 /* 4527 */ 0x0646, 0x0645, 0x064A,
-	 /* 4530 */ 0x0646, 0x0645, 0x0649,
-	 /* 4533 */ 0x064A, 0x0645, 0x0645,
-	 /* 4536 */ 0x064A, 0x0645, 0x0645,
-	 /* 4539 */ 0x0628, 0x062E, 0x064A,
-	 /* 4542 */ 0x062A, 0x062C, 0x064A,
-	 /* 4545 */ 0x062A, 0x062C, 0x0649,
-	 /* 4548 */ 0x062A, 0x062E, 0x064A,
-	 /* 4551 */ 0x062A, 0x062E, 0x0649,
-	 /* 4554 */ 0x062A, 0x0645, 0x064A,
-	 /* 4557 */ 0x062A, 0x0645, 0x0649,
-	 /* 4560 */ 0x062C, 0x0645, 0x064A,
-	 /* 4563 */ 0x062C, 0x062D, 0x0649,
-	 /* 4566 */ 0x062C, 0x0645, 0x0649,
-	 /* 4569 */ 0x0633, 0x062E, 0x0649,
-	 /* 4572 */ 0x0635, 0x062D, 0x064A,
-	 /* 4575 */ 0x0634, 0x062D, 0x064A,
-	 /* 4578 */ 0x0636, 0x062D, 0x064A,
-	 /* 4581 */ 0x0644, 0x062C, 0x064A,
-	 /* 4584 */ 0x0644, 0x0645, 0x064A,
-	 /* 4587 */ 0x064A, 0x062D, 0x064A,
-	 /* 4590 */ 0x064A, 0x062C, 0x064A,
-	 /* 4593 */ 0x064A, 0x0645, 0x064A,
-	 /* 4596 */ 0x0645, 0x0645, 0x064A,
-	 /* 4599 */ 0x0642, 0x0645, 0x064A,
-	 /* 4602 */ 0x0646, 0x062D, 0x064A,
-	 /* 4605 */ 0x0642, 0x0645, 0x062D,
-	 /* 4608 */ 0x0644, 0x062D, 0x0645,
-	 /* 4611 */ 0x0639, 0x0645, 0x064A,
-	 /* 4614 */ 0x0643, 0x0645, 0x064A,
-	 /* 4617 */ 0x0646, 0x062C, 0x062D,
-	 /* 4620 */ 0x0645, 0x062E, 0x064A,
-	 /* 4623 */ 0x0644, 0x062C, 0x0645,
-	 /* 4626 */ 0x0643, 0x0645, 0x0645,
-	 /* 4629 */ 0x0644, 0x062C, 0x0645,
-	 /* 4632 */ 0x0646, 0x062C, 0x062D,
-	 /* 4635 */ 0x062C, 0x062D, 0x064A,
-	 /* 4638 */ 0x062D, 0x062C, 0x064A,
-	 /* 4641 */ 0x0645, 0x062C, 0x064A,
-	 /* 4644 */ 0x0641, 0x0645, 0x064A,
-	 /* 4647 */ 0x0628, 0x062D, 0x064A,
-	 /* 4650 */ 0x0643, 0x0645, 0x0645,
-	 /* 4653 */ 0x0639, 0x062C, 0x0645,
-	 /* 4656 */ 0x0635, 0x0645, 0x0645,
-	 /* 4659 */ 0x0633, 0x062E, 0x064A,
-	 /* 4662 */ 0x0646, 0x062C, 0x064A,
-	 /* 4665 */ 0x0635, 0x0644, 0x06D2,
-	 /* 4668 */ 0x0642, 0x0644, 0x06D2,
-	 /* 4671 */ 0x0627, 0x0644, 0x0644, 0x0647,
-	 /* 4675 */ 0x0627, 0x0643, 0x0628, 0x0631,
-	 /* 4679 */ 0x0645, 0x062D, 0x0645, 0x062F,
-	 /* 4683 */ 0x0635, 0x0644, 0x0639, 0x0645,
-	 /* 4687 */ 0x0631, 0x0633, 0x0648, 0x0644,
-	 /* 4691 */ 0x0639, 0x0644, 0x064A, 0x0647,
-	 /* 4695 */ 0x0648, 0x0633, 0x0644, 0x0645,
-	 /* 4699 */ 0x0635, 0x0644, 0x0649,
-	 /* 4702 */ 0x0635, 0x0644, 0x0649, 0x0020, 0x0627, 0x0644, 0x0644, 0x0647, 0x0020, 0x0639, 0x0644, 0x064A, 0x0647, 0x0020, 0x0648, 0x0633, 0x0644, 0x0645,
-	 /* 4720 */ 0x062C, 0x0644, 0x0020, 0x062C, 0x0644, 0x0627, 0x0644, 0x0647,
-	 /* 4728 */ 0x0631, 0x06CC, 0x0627, 0x0644,
-	 /* 4732 */ 0x0020, 0x064B,
-	 /* 4734 */ 0x0640, 0x064B,
-	 /* 4736 */ 0x0020, 0x064C,
-	 /* 4738 */ 0x0020, 0x064D,
-	 /* 4740 */ 0x0020, 0x064E,
-	 /* 4742 */ 0x0640, 0x064E,
-	 /* 4744 */ 0x0020, 0x064F,
-	 /* 4746 */ 0x0640, 0x064F,
-	 /* 4748 */ 0x0020, 0x0650,
-	 /* 4750 */ 0x0640, 0x0650,
-	 /* 4752 */ 0x0020, 0x0651,
-	 /* 4754 */ 0x0640, 0x0651,
-	 /* 4756 */ 0x0020, 0x0652,
-	 /* 4758 */ 0x0640, 0x0652,
-	 /* 4760 */ 0x0644, 0x0622,
-	 /* 4762 */ 0x0644, 0x0622,
-	 /* 4764 */ 0x0644, 0x0623,
-	 /* 4766 */ 0x0644, 0x0623,
-	 /* 4768 */ 0x0644, 0x0625,
-	 /* 4770 */ 0x0644, 0x0625,
-	 /* 4772 */ 0x0644, 0x0627,
-	 /* 4774 */ 0x0644, 0x0627,
-	 /* 4776 */ 0x1DF04,
-	 /* 4777 */ 0x1DF05,
-	 /* 4778 */ 0x1DF06,
-	 /* 4779 */ 0x1DF08,
-	 /* 4780 */ 0x1DF0A,
-	 /* 4781 */ 0x1DF1E,
-	 /* 4782 */ 0x11099, 0x110BA,
-	 /* 4784 */ 0x1109B, 0x110BA,
-	 /* 4786 */ 0x110A5, 0x110BA,
-	 /* 4788 */ 0x11131, 0x11127,
-	 /* 4790 */ 0x11132, 0x11127,
-	 /* 4792 */ 0x11347, 0x1133E,
-	 /* 4794 */ 0x11347, 0x11357,
-	 /* 4796 */ 0x114B9, 0x114BA,
-	 /* 4798 */ 0x114B9, 0x114B0,
-	 /* 4800 */ 0x114B9, 0x114BD,
-	 /* 4802 */ 0x115B8, 0x115AF,
-	 /* 4804 */ 0x115B9, 0x115AF,
-	 /* 4806 */ 0x11935, 0x11930,
-	 /* 4808 */ 0x1D157, 0x1D165,
-	 /* 4810 */ 0x1D158, 0x1D165,
-	 /* 4812 */ 0x1D15F, 0x1D16E,
-	 /* 4814 */ 0x1D15F, 0x1D16F,
-	 /* 4816 */ 0x1D15F, 0x1D170,
-	 /* 4818 */ 0x1D15F, 0x1D171,
-	 /* 4820 */ 0x1D15F, 0x1D172,
-	 /* 4822 */ 0x1D1B9, 0x1D165,
-	 /* 4824 */ 0x1D1BA, 0x1D165,
-	 /* 4826 */ 0x1D1BB, 0x1D16E,
-	 /* 4828 */ 0x1D1BC, 0x1D16E,
-	 /* 4830 */ 0x1D1BB, 0x1D16F,
-	 /* 4832 */ 0x1D1BC, 0x1D16F,
-	 /* 4834 */ 0x0030, 0x002E,
-	 /* 4836 */ 0x0030, 0x002C,
-	 /* 4838 */ 0x0031, 0x002C,
-	 /* 4840 */ 0x0032, 0x002C,
-	 /* 4842 */ 0x0033, 0x002C,
-	 /* 4844 */ 0x0034, 0x002C,
-	 /* 4846 */ 0x0035, 0x002C,
-	 /* 4848 */ 0x0036, 0x002C,
-	 /* 4850 */ 0x0037, 0x002C,
-	 /* 4852 */ 0x0038, 0x002C,
-	 /* 4854 */ 0x0039, 0x002C,
-	 /* 4856 */ 0x0028, 0x0041, 0x0029,
-	 /* 4859 */ 0x0028, 0x0042, 0x0029,
-	 /* 4862 */ 0x0028, 0x0043, 0x0029,
-	 /* 4865 */ 0x0028, 0x0044, 0x0029,
-	 /* 4868 */ 0x0028, 0x0045, 0x0029,
-	 /* 4871 */ 0x0028, 0x0046, 0x0029,
-	 /* 4874 */ 0x0028, 0x0047, 0x0029,
-	 /* 4877 */ 0x0028, 0x0048, 0x0029,
-	 /* 4880 */ 0x0028, 0x0049, 0x0029,
-	 /* 4883 */ 0x0028, 0x004A, 0x0029,
-	 /* 4886 */ 0x0028, 0x004B, 0x0029,
-	 /* 4889 */ 0x0028, 0x004C, 0x0029,
-	 /* 4892 */ 0x0028, 0x004D, 0x0029,
-	 /* 4895 */ 0x0028, 0x004E, 0x0029,
-	 /* 4898 */ 0x0028, 0x004F, 0x0029,
-	 /* 4901 */ 0x0028, 0x0050, 0x0029,
-	 /* 4904 */ 0x0028, 0x0051, 0x0029,
-	 /* 4907 */ 0x0028, 0x0052, 0x0029,
-	 /* 4910 */ 0x0028, 0x0053, 0x0029,
-	 /* 4913 */ 0x0028, 0x0054, 0x0029,
-	 /* 4916 */ 0x0028, 0x0055, 0x0029,
-	 /* 4919 */ 0x0028, 0x0056, 0x0029,
-	 /* 4922 */ 0x0028, 0x0057, 0x0029,
-	 /* 4925 */ 0x0028, 0x0058, 0x0029,
-	 /* 4928 */ 0x0028, 0x0059, 0x0029,
-	 /* 4931 */ 0x0028, 0x005A, 0x0029,
-	 /* 4934 */ 0x3014, 0x0053, 0x3015,
-	 /* 4937 */ 0x0043, 0x0044,
-	 /* 4939 */ 0x0057, 0x005A,
-	 /* 4941 */ 0x0048, 0x0056,
-	 /* 4943 */ 0x004D, 0x0056,
-	 /* 4945 */ 0x0053, 0x0044,
-	 /* 4947 */ 0x0053, 0x0053,
-	 /* 4949 */ 0x0050, 0x0050, 0x0056,
-	 /* 4952 */ 0x0057, 0x0043,
-	 /* 4954 */ 0x004D, 0x0043,
-	 /* 4956 */ 0x004D, 0x0044,
-	 /* 4958 */ 0x004D, 0x0052,
-	 /* 4960 */ 0x0044, 0x004A,
-	 /* 4962 */ 0x307B, 0x304B,
-	 /* 4964 */ 0x30B3, 0x30B3,
-	 /* 4966 */ 0x3014, 0x672C, 0x3015,
-	 /* 4969 */ 0x3014, 0x4E09, 0x3015,
-	 /* 4972 */ 0x3014, 0x4E8C, 0x3015,
-	 /* 4975 */ 0x3014, 0x5B89, 0x3015,
-	 /* 4978 */ 0x3014, 0x70B9, 0x3015,
-	 /* 4981 */ 0x3014, 0x6253, 0x3015,
-	 /* 4984 */ 0x3014, 0x76D7, 0x3015,
-	 /* 4987 */ 0x3014, 0x52DD, 0x3015,
-	 /* 4990 */ 0x3014, 0x6557, 0x3015,
-	 /* 4993 */ 0x20122,
-	 /* 4994 */ 0x2063A,
-	 /* 4995 */ 0x2051C,
-	 /* 4996 */ 0x2054B,
-	 /* 4997 */ 0x291DF,
-	 /* 4998 */ 0x20A2C,
-	 /* 4999 */ 0x20B63,
-	 /* 5000 */ 0x214E4,
-	 /* 5001 */ 0x216A8,
-	 /* 5002 */ 0x216EA,
-	 /* 5003 */ 0x219C8,
-	 /* 5004 */ 0x21B18,
-	 /* 5005 */ 0x21DE4,
-	 /* 5006 */ 0x21DE6,
-	 /* 5007 */ 0x22183,
-	 /* 5008 */ 0x2A392,
-	 /* 5009 */ 0x22331,
-	 /* 5010 */ 0x22331,
-	 /* 5011 */ 0x232B8,
-	 /* 5012 */ 0x261DA,
-	 /* 5013 */ 0x226D4,
-	 /* 5014 */ 0x22B0C,
-	 /* 5015 */ 0x22BF1,
-	 /* 5016 */ 0x2300A,
-	 /* 5017 */ 0x233C3,
-	 /* 5018 */ 0x2346D,
-	 /* 5019 */ 0x236A3,
-	 /* 5020 */ 0x238A7,
-	 /* 5021 */ 0x23A8D,
-	 /* 5022 */ 0x21D0B,
-	 /* 5023 */ 0x23AFA,
-	 /* 5024 */ 0x23CBC,
-	 /* 5025 */ 0x23D1E,
-	 /* 5026 */ 0x23ED1,
-	 /* 5027 */ 0x23F5E,
-	 /* 5028 */ 0x23F8E,
-	 /* 5029 */ 0x20525,
-	 /* 5030 */ 0x24263,
-	 /* 5031 */ 0x243AB,
-	 /* 5032 */ 0x24608,
-	 /* 5033 */ 0x24735,
-	 /* 5034 */ 0x24814,
-	 /* 5035 */ 0x24C36,
-	 /* 5036 */ 0x24C92,
-	 /* 5037 */ 0x2219F,
-	 /* 5038 */ 0x24FA1,
-	 /* 5039 */ 0x24FB8,
-	 /* 5040 */ 0x25044,
-	 /* 5041 */ 0x250F3,
-	 /* 5042 */ 0x250F2,
-	 /* 5043 */ 0x25119,
-	 /* 5044 */ 0x25133,
-	 /* 5045 */ 0x2541D,
-	 /* 5046 */ 0x25626,
-	 /* 5047 */ 0x2569A,
-	 /* 5048 */ 0x256C5,
-	 /* 5049 */ 0x2597C,
-	 /* 5050 */ 0x25AA7,
-	 /* 5051 */ 0x25AA7,
-	 /* 5052 */ 0x25BAB,
-	 /* 5053 */ 0x25C80,
-	 /* 5054 */ 0x25F86,
-	 /* 5055 */ 0x26228,
-	 /* 5056 */ 0x26247,
-	 /* 5057 */ 0x262D9,
-	 /* 5058 */ 0x2633E,
-	 /* 5059 */ 0x264DA,
-	 /* 5060 */ 0x26523,
-	 /* 5061 */ 0x265A8,
-	 /* 5062 */ 0x2335F,
-	 /* 5063 */ 0x267A7,
-	 /* 5064 */ 0x267B5,
-	 /* 5065 */ 0x23393,
-	 /* 5066 */ 0x2339C,
-	 /* 5067 */ 0x26B3C,
-	 /* 5068 */ 0x26C36,
-	 /* 5069 */ 0x26D6B,
-	 /* 5070 */ 0x26CD5,
-	 /* 5071 */ 0x273CA,
-	 /* 5072 */ 0x26F2C,
-	 /* 5073 */ 0x26FB1,
-	 /* 5074 */ 0x270D2,
-	 /* 5075 */ 0x27667,
-	 /* 5076 */ 0x278AE,
-	 /* 5077 */ 0x27966,
-	 /* 5078 */ 0x27CA8,
-	 /* 5079 */ 0x27F2F,
-	 /* 5080 */ 0x20804,
-	 /* 5081 */ 0x208DE,
-	 /* 5082 */ 0x285D2,
-	 /* 5083 */ 0x285ED,
-	 /* 5084 */ 0x2872E,
-	 /* 5085 */ 0x28BFA,
-	 /* 5086 */ 0x28D77,
-	 /* 5087 */ 0x29145,
-	 /* 5088 */ 0x2921A,
-	 /* 5089 */ 0x2940A,
-	 /* 5090 */ 0x29496,
-	 /* 5091 */ 0x295B6,
-	 /* 5092 */ 0x29B30,
-	 /* 5093 */ 0x2A0CE,
-	 /* 5094 */ 0x2A105,
-	 /* 5095 */ 0x2A20E,
-	 /* 5096 */ 0x2A291,
-	 /* 5097 */ 0x2A600
-};
diff --git a/contrib/libs/libpq/src/include/common/username.h b/contrib/libs/libpq/src/include/common/username.h
deleted file mode 100644
index fd07df64c1..0000000000
--- a/contrib/libs/libpq/src/include/common/username.h
+++ /dev/null
@@ -1,15 +0,0 @@
-/*
- *	username.h
- *		lookup effective username
- *
- *	Copyright (c) 2003-2023, PostgreSQL Global Development Group
- *
- *	src/include/common/username.h
- */
-#ifndef USERNAME_H
-#define USERNAME_H
-
-extern const char *get_user_name(char **errstr);
-extern const char *get_user_name_or_exit(const char *progname);
-
-#endif							/* USERNAME_H */
diff --git a/contrib/libs/libpq/src/include/datatype/timestamp.h b/contrib/libs/libpq/src/include/datatype/timestamp.h
deleted file mode 100644
index ab8ccf89ca..0000000000
--- a/contrib/libs/libpq/src/include/datatype/timestamp.h
+++ /dev/null
@@ -1,243 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * timestamp.h
- *	  Timestamp and Interval typedefs and related macros.
- *
- * Note: this file must be includable in both frontend and backend contexts.
- *
- * Portions Copyright (c) 1996-2023, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- * src/include/datatype/timestamp.h
- *
- *-------------------------------------------------------------------------
- */
-#ifndef DATATYPE_TIMESTAMP_H
-#define DATATYPE_TIMESTAMP_H
-
-/*
- * Timestamp represents absolute time.
- *
- * Interval represents delta time. Keep track of months (and years), days,
- * and hours/minutes/seconds separately since the elapsed time spanned is
- * unknown until instantiated relative to an absolute time.
- *
- * Note that Postgres uses "time interval" to mean a bounded interval,
- * consisting of a beginning and ending time, not a time span - thomas 97/03/20
- *
- * Timestamps, as well as the h/m/s fields of intervals, are stored as
- * int64 values with units of microseconds.  (Once upon a time they were
- * double values with units of seconds.)
- *
- * TimeOffset and fsec_t are convenience typedefs for temporary variables.
- * Do not use fsec_t in values stored on-disk.
- * Also, fsec_t is only meant for *fractional* seconds; beware of overflow
- * if the value you need to store could be many seconds.
- */
-
-typedef int64 Timestamp;
-typedef int64 TimestampTz;
-typedef int64 TimeOffset;
-typedef int32 fsec_t;			/* fractional seconds (in microseconds) */
-
-
-/*
- * Storage format for type interval.
- */
-typedef struct
-{
-	TimeOffset	time;			/* all time units other than days, months and
-								 * years */
-	int32		day;			/* days, after time for alignment */
-	int32		month;			/* months and years, after time for alignment */
-} Interval;
-
-/*
- * Data structure representing a broken-down interval.
- *
- * For historical reasons, this is modeled on struct pg_tm for timestamps.
- * Unlike the situation for timestamps, there's no magic interpretation
- * needed for months or years: they're just zero or not.  Note that fields
- * can be negative; however, because of the divisions done while converting
- * from struct Interval, only tm_mday could be INT_MIN.  This is important
- * because we may need to negate the values in some code paths.
- */
-struct pg_itm
-{
-	int			tm_usec;
-	int			tm_sec;
-	int			tm_min;
-	int64		tm_hour;		/* needs to be wide */
-	int			tm_mday;
-	int			tm_mon;
-	int			tm_year;
-};
-
-/*
- * Data structure for decoding intervals.  We could just use struct pg_itm,
- * but then the requirement for tm_usec to be 64 bits would propagate to
- * places where it's not really needed.  Also, omitting the fields that
- * aren't used during decoding seems like a good error-prevention measure.
- */
-struct pg_itm_in
-{
-	int64		tm_usec;		/* needs to be wide */
-	int			tm_mday;
-	int			tm_mon;
-	int			tm_year;
-};
-
-
-/* Limits on the "precision" option (typmod) for these data types */
-#define MAX_TIMESTAMP_PRECISION 6
-#define MAX_INTERVAL_PRECISION 6
-
-/*
- *	Round off to MAX_TIMESTAMP_PRECISION decimal places.
- *	Note: this is also used for rounding off intervals.
- */
-#define TS_PREC_INV 1000000.0
-#define TSROUND(j) (rint(((double) (j)) * TS_PREC_INV) / TS_PREC_INV)
-
-
-/*
- * Assorted constants for datetime-related calculations
- */
-
-#define DAYS_PER_YEAR	365.25	/* assumes leap year every four years */
-#define MONTHS_PER_YEAR 12
-/*
- *	DAYS_PER_MONTH is very imprecise.  The more accurate value is
- *	365.2425/12 = 30.436875, or '30 days 10:29:06'.  Right now we only
- *	return an integral number of days, but someday perhaps we should
- *	also return a 'time' value to be used as well.  ISO 8601 suggests
- *	30 days.
- */
-#define DAYS_PER_MONTH	30		/* assumes exactly 30 days per month */
-#define HOURS_PER_DAY	24		/* assume no daylight savings time changes */
-
-/*
- *	This doesn't adjust for uneven daylight savings time intervals or leap
- *	seconds, and it crudely estimates leap years.  A more accurate value
- *	for days per years is 365.2422.
- */
-#define SECS_PER_YEAR	(36525 * 864)	/* avoid floating-point computation */
-#define SECS_PER_DAY	86400
-#define SECS_PER_HOUR	3600
-#define SECS_PER_MINUTE 60
-#define MINS_PER_HOUR	60
-
-#define USECS_PER_DAY	INT64CONST(86400000000)
-#define USECS_PER_HOUR	INT64CONST(3600000000)
-#define USECS_PER_MINUTE INT64CONST(60000000)
-#define USECS_PER_SEC	INT64CONST(1000000)
-
-/*
- * We allow numeric timezone offsets up to 15:59:59 either way from Greenwich.
- * Currently, the record holders for wackiest offsets in actual use are zones
- * Asia/Manila, at -15:56:00 until 1844, and America/Metlakatla, at +15:13:42
- * until 1867.  If we were to reject such values we would fail to dump and
- * restore old timestamptz values with these zone settings.
- */
-#define MAX_TZDISP_HOUR		15	/* maximum allowed hour part */
-#define TZDISP_LIMIT		((MAX_TZDISP_HOUR + 1) * SECS_PER_HOUR)
-
-/*
- * We reserve the minimum and maximum integer values to represent
- * timestamp (or timestamptz) -infinity and +infinity.
- */
-#define TIMESTAMP_MINUS_INFINITY	PG_INT64_MIN
-#define TIMESTAMP_INFINITY	PG_INT64_MAX
-
-/*
- * Historically these alias for infinity have been used.
- */
-#define DT_NOBEGIN		TIMESTAMP_MINUS_INFINITY
-#define DT_NOEND		TIMESTAMP_INFINITY
-
-#define TIMESTAMP_NOBEGIN(j)	\
-	do {(j) = DT_NOBEGIN;} while (0)
-
-#define TIMESTAMP_IS_NOBEGIN(j) ((j) == DT_NOBEGIN)
-
-#define TIMESTAMP_NOEND(j)		\
-	do {(j) = DT_NOEND;} while (0)
-
-#define TIMESTAMP_IS_NOEND(j)	((j) == DT_NOEND)
-
-#define TIMESTAMP_NOT_FINITE(j) (TIMESTAMP_IS_NOBEGIN(j) || TIMESTAMP_IS_NOEND(j))
-
-
-/*
- * Julian date support.
- *
- * date2j() and j2date() nominally handle the Julian date range 0..INT_MAX,
- * or 4714-11-24 BC to 5874898-06-03 AD.  In practice, date2j() will work and
- * give correct negative Julian dates for dates before 4714-11-24 BC as well.
- * We rely on it to do so back to 4714-11-01 BC.  Allowing at least one day's
- * slop is necessary so that timestamp rotation doesn't produce dates that
- * would be rejected on input.  For example, '4714-11-24 00:00 GMT BC' is a
- * legal timestamptz value, but in zones east of Greenwich it would print as
- * sometime in the afternoon of 4714-11-23 BC; if we couldn't process such a
- * date we'd have a dump/reload failure.  So the idea is for IS_VALID_JULIAN
- * to accept a slightly wider range of dates than we really support, and
- * then we apply the exact checks in IS_VALID_DATE or IS_VALID_TIMESTAMP,
- * after timezone rotation if any.  To save a few cycles, we can make
- * IS_VALID_JULIAN check only to the month boundary, since its exact cutoffs
- * are not very critical in this scheme.
- *
- * It is correct that JULIAN_MINYEAR is -4713, not -4714; it is defined to
- * allow easy comparison to tm_year values, in which we follow the convention
- * that tm_year <= 0 represents abs(tm_year)+1 BC.
- */
-
-#define JULIAN_MINYEAR (-4713)
-#define JULIAN_MINMONTH (11)
-#define JULIAN_MINDAY (24)
-#define JULIAN_MAXYEAR (5874898)
-#define JULIAN_MAXMONTH (6)
-#define JULIAN_MAXDAY (3)
-
-#define IS_VALID_JULIAN(y,m,d) \
-	(((y) > JULIAN_MINYEAR || \
-	  ((y) == JULIAN_MINYEAR && ((m) >= JULIAN_MINMONTH))) && \
-	 ((y) < JULIAN_MAXYEAR || \
-	  ((y) == JULIAN_MAXYEAR && ((m) < JULIAN_MAXMONTH))))
-
-/* Julian-date equivalents of Day 0 in Unix and Postgres reckoning */
-#define UNIX_EPOCH_JDATE		2440588 /* == date2j(1970, 1, 1) */
-#define POSTGRES_EPOCH_JDATE	2451545 /* == date2j(2000, 1, 1) */
-
-/*
- * Range limits for dates and timestamps.
- *
- * We have traditionally allowed Julian day zero as a valid datetime value,
- * so that is the lower bound for both dates and timestamps.
- *
- * The upper limit for dates is 5874897-12-31, which is a bit less than what
- * the Julian-date code can allow.  For timestamps, the upper limit is
- * 294276-12-31.  The int64 overflow limit would be a few days later; again,
- * leaving some slop avoids worries about corner-case overflow, and provides
- * a simpler user-visible definition.
- */
-
-/* First allowed date, and first disallowed date, in Julian-date form */
-#define DATETIME_MIN_JULIAN (0)
-#define DATE_END_JULIAN (2147483494)	/* == date2j(JULIAN_MAXYEAR, 1, 1) */
-#define TIMESTAMP_END_JULIAN (109203528)	/* == date2j(294277, 1, 1) */
-
-/* Timestamp limits */
-#define MIN_TIMESTAMP	INT64CONST(-211813488000000000)
-/* == (DATETIME_MIN_JULIAN - POSTGRES_EPOCH_JDATE) * USECS_PER_DAY */
-#define END_TIMESTAMP	INT64CONST(9223371331200000000)
-/* == (TIMESTAMP_END_JULIAN - POSTGRES_EPOCH_JDATE) * USECS_PER_DAY */
-
-/* Range-check a date (given in Postgres, not Julian, numbering) */
-#define IS_VALID_DATE(d) \
-	((DATETIME_MIN_JULIAN - POSTGRES_EPOCH_JDATE) <= (d) && \
-	 (d) < (DATE_END_JULIAN - POSTGRES_EPOCH_JDATE))
-
-/* Range-check a timestamp */
-#define IS_VALID_TIMESTAMP(t)  (MIN_TIMESTAMP <= (t) && (t) < END_TIMESTAMP)
-
-#endif							/* DATATYPE_TIMESTAMP_H */
diff --git a/contrib/libs/libpq/src/include/lib/sort_template.h b/contrib/libs/libpq/src/include/lib/sort_template.h
deleted file mode 100644
index 1edd05c7d3..0000000000
--- a/contrib/libs/libpq/src/include/lib/sort_template.h
+++ /dev/null
@@ -1,432 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * sort_template.h
- *
- *	  A template for a sort algorithm that supports varying degrees of
- *	  specialization.
- *
- * Copyright (c) 2021-2023, PostgreSQL Global Development Group
- * Portions Copyright (c) 1992-1994, Regents of the University of California
- *
- * Usage notes:
- *
- *	  To generate functions specialized for a type, the following parameter
- *	  macros should be #define'd before this file is included.
- *
- *	  - ST_SORT - the name of a sort function to be generated
- *	  - ST_ELEMENT_TYPE - type of the referenced elements
- *	  - ST_DECLARE - if defined the functions and types are declared
- *	  - ST_DEFINE - if defined the functions and types are defined
- *	  - ST_SCOPE - scope (e.g. extern, static inline) for functions
- *	  - ST_CHECK_FOR_INTERRUPTS - if defined the sort is interruptible
- *
- *	  Instead of ST_ELEMENT_TYPE, ST_ELEMENT_TYPE_VOID can be defined.  Then
- *	  the generated functions will automatically gain an "element_size"
- *	  parameter.  This allows us to generate a traditional qsort function.
- *
- *	  One of the following macros must be defined, to show how to compare
- *	  elements.  The first two options are arbitrary expressions depending
- *	  on whether an extra pass-through argument is desired, and the third
- *	  option should be defined if the sort function should receive a
- *	  function pointer at runtime.
- *
- *	  - ST_COMPARE(a, b) - a simple comparison expression
- *	  - ST_COMPARE(a, b, arg) - variant that takes an extra argument
- *	  - ST_COMPARE_RUNTIME_POINTER - sort function takes a function pointer
- *
- *	  To say that the comparator and therefore also sort function should
- *	  receive an extra pass-through argument, specify the type of the
- *	  argument.
- *
- *	  - ST_COMPARE_ARG_TYPE - type of extra argument
- *
- *	  The prototype of the generated sort function is:
- *
- *	  void ST_SORT(ST_ELEMENT_TYPE *data, size_t n,
- *				   [size_t element_size,]
- *				   [ST_SORT_compare_function compare,]
- *				   [ST_COMPARE_ARG_TYPE *arg]);
- *
- *	  ST_SORT_compare_function is a function pointer of the following type:
- *
- *	  int (*)(const ST_ELEMENT_TYPE *a, const ST_ELEMENT_TYPE *b,
- *			  [ST_COMPARE_ARG_TYPE *arg])
- *
- * HISTORY
- *
- *	  Modifications from vanilla NetBSD source:
- *	  - Add do ... while() macro fix
- *	  - Remove __inline, _DIAGASSERTs, __P
- *	  - Remove ill-considered "swap_cnt" switch to insertion sort, in favor
- *		of a simple check for presorted input.
- *	  - Take care to recurse on the smaller partition, to bound stack usage
- *	  - Convert into a header that can generate specialized functions
- *
- * IDENTIFICATION
- *		src/include/lib/sort_template.h
- *
- *-------------------------------------------------------------------------
- */
-
-/*	  $NetBSD: qsort.c,v 1.13 2003/08/07 16:43:42 agc Exp $   */
-
-/*-
- * Copyright (c) 1992, 1993
- *	  The Regents of the University of California.  All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *	  notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *	  notice, this list of conditions and the following disclaimer in the
- *	  documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the University nor the names of its contributors
- *	  may be used to endorse or promote products derived from this software
- *	  without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-/*
- * Qsort routine based on J. L. Bentley and M. D. McIlroy,
- * "Engineering a sort function",
- * Software--Practice and Experience 23 (1993) 1249-1265.
- *
- * We have modified their original by adding a check for already-sorted
- * input, which seems to be a win per discussions on pgsql-hackers around
- * 2006-03-21.
- *
- * Also, we recurse on the smaller partition and iterate on the larger one,
- * which ensures we cannot recurse more than log(N) levels (since the
- * partition recursed to is surely no more than half of the input).  Bentley
- * and McIlroy explicitly rejected doing this on the grounds that it's "not
- * worth the effort", but we have seen crashes in the field due to stack
- * overrun, so that judgment seems wrong.
- */
-
-#define ST_MAKE_PREFIX(a) CppConcat(a,_)
-#define ST_MAKE_NAME(a,b) ST_MAKE_NAME_(ST_MAKE_PREFIX(a),b)
-#define ST_MAKE_NAME_(a,b) CppConcat(a,b)
-
-/*
- * If the element type is void, we'll also need an element_size argument
- * because we don't know the size.
- */
-#ifdef ST_ELEMENT_TYPE_VOID
-#define ST_ELEMENT_TYPE void
-#define ST_SORT_PROTO_ELEMENT_SIZE , size_t element_size
-#define ST_SORT_INVOKE_ELEMENT_SIZE , element_size
-#else
-#define ST_SORT_PROTO_ELEMENT_SIZE
-#define ST_SORT_INVOKE_ELEMENT_SIZE
-#endif
-
-/*
- * If the user wants to be able to pass in compare functions at runtime,
- * we'll need to make that an argument of the sort and med3 functions.
- */
-#ifdef ST_COMPARE_RUNTIME_POINTER
-/*
- * The type of the comparator function pointer that ST_SORT will take, unless
- * you've already declared a type name manually and want to use that instead of
- * having a new one defined.
- */
-#ifndef ST_COMPARATOR_TYPE_NAME
-#define ST_COMPARATOR_TYPE_NAME ST_MAKE_NAME(ST_SORT, compare_function)
-#endif
-#define ST_COMPARE compare
-#ifndef ST_COMPARE_ARG_TYPE
-#define ST_SORT_PROTO_COMPARE , ST_COMPARATOR_TYPE_NAME compare
-#define ST_SORT_INVOKE_COMPARE , compare
-#else
-#define ST_SORT_PROTO_COMPARE , ST_COMPARATOR_TYPE_NAME compare
-#define ST_SORT_INVOKE_COMPARE , compare
-#endif
-#else
-#define ST_SORT_PROTO_COMPARE
-#define ST_SORT_INVOKE_COMPARE
-#endif
-
-/*
- * If the user wants to use a compare function or expression that takes an
- * extra argument, we'll need to make that an argument of the sort, compare and
- * med3 functions.
- */
-#ifdef ST_COMPARE_ARG_TYPE
-#define ST_SORT_PROTO_ARG , ST_COMPARE_ARG_TYPE *arg
-#define ST_SORT_INVOKE_ARG , arg
-#else
-#define ST_SORT_PROTO_ARG
-#define ST_SORT_INVOKE_ARG
-#endif
-
-#ifdef ST_DECLARE
-
-#ifdef ST_COMPARE_RUNTIME_POINTER
-typedef int (*ST_COMPARATOR_TYPE_NAME) (const ST_ELEMENT_TYPE *,
-										const ST_ELEMENT_TYPE * ST_SORT_PROTO_ARG);
-#endif
-
-/* Declare the sort function.  Note optional arguments at end. */
-ST_SCOPE void ST_SORT(ST_ELEMENT_TYPE * first, size_t n
-					  ST_SORT_PROTO_ELEMENT_SIZE
-					  ST_SORT_PROTO_COMPARE
-					  ST_SORT_PROTO_ARG);
-
-#endif
-
-#ifdef ST_DEFINE
-
-/* sort private helper functions */
-#define ST_MED3 ST_MAKE_NAME(ST_SORT, med3)
-#define ST_SWAP ST_MAKE_NAME(ST_SORT, swap)
-#define ST_SWAPN ST_MAKE_NAME(ST_SORT, swapn)
-
-/* Users expecting to run very large sorts may need them to be interruptible. */
-#ifdef ST_CHECK_FOR_INTERRUPTS
-#define DO_CHECK_FOR_INTERRUPTS() CHECK_FOR_INTERRUPTS()
-#else
-#define DO_CHECK_FOR_INTERRUPTS()
-#endif
-
-/*
- * Create wrapper macros that know how to invoke compare, med3 and sort with
- * the right arguments.
- */
-#ifdef ST_COMPARE_RUNTIME_POINTER
-#define DO_COMPARE(a_, b_) ST_COMPARE((a_), (b_) ST_SORT_INVOKE_ARG)
-#elif defined(ST_COMPARE_ARG_TYPE)
-#define DO_COMPARE(a_, b_) ST_COMPARE((a_), (b_), arg)
-#else
-#define DO_COMPARE(a_, b_) ST_COMPARE((a_), (b_))
-#endif
-#define DO_MED3(a_, b_, c_)												\
-	ST_MED3((a_), (b_), (c_)											\
-			ST_SORT_INVOKE_COMPARE										\
-			ST_SORT_INVOKE_ARG)
-#define DO_SORT(a_, n_)													\
-	ST_SORT((a_), (n_)													\
-			ST_SORT_INVOKE_ELEMENT_SIZE									\
-			ST_SORT_INVOKE_COMPARE										\
-			ST_SORT_INVOKE_ARG)
-
-/*
- * If we're working with void pointers, we'll use pointer arithmetic based on
- * uint8, and use the runtime element_size to step through the array and swap
- * elements.  Otherwise we'll work with ST_ELEMENT_TYPE.
- */
-#ifndef ST_ELEMENT_TYPE_VOID
-#define ST_POINTER_TYPE ST_ELEMENT_TYPE
-#define ST_POINTER_STEP 1
-#define DO_SWAPN(a_, b_, n_) ST_SWAPN((a_), (b_), (n_))
-#define DO_SWAP(a_, b_) ST_SWAP((a_), (b_))
-#else
-#define ST_POINTER_TYPE uint8
-#define ST_POINTER_STEP element_size
-#define DO_SWAPN(a_, b_, n_) ST_SWAPN((a_), (b_), (n_))
-#define DO_SWAP(a_, b_) DO_SWAPN((a_), (b_), element_size)
-#endif
-
-/*
- * Find the median of three values.  Currently, performance seems to be best
- * if the comparator is inlined here, but the med3 function is not inlined
- * in the qsort function.
- */
-static pg_noinline ST_ELEMENT_TYPE *
-ST_MED3(ST_ELEMENT_TYPE * a,
-		ST_ELEMENT_TYPE * b,
-		ST_ELEMENT_TYPE * c
-		ST_SORT_PROTO_COMPARE
-		ST_SORT_PROTO_ARG)
-{
-	return DO_COMPARE(a, b) < 0 ?
-		(DO_COMPARE(b, c) < 0 ? b : (DO_COMPARE(a, c) < 0 ? c : a))
-		: (DO_COMPARE(b, c) > 0 ? b : (DO_COMPARE(a, c) < 0 ? a : c));
-}
-
-static inline void
-ST_SWAP(ST_POINTER_TYPE * a, ST_POINTER_TYPE * b)
-{
-	ST_POINTER_TYPE tmp = *a;
-
-	*a = *b;
-	*b = tmp;
-}
-
-static inline void
-ST_SWAPN(ST_POINTER_TYPE * a, ST_POINTER_TYPE * b, size_t n)
-{
-	for (size_t i = 0; i < n; ++i)
-		ST_SWAP(&a[i], &b[i]);
-}
-
-/*
- * Sort an array.
- */
-ST_SCOPE void
-ST_SORT(ST_ELEMENT_TYPE * data, size_t n
-		ST_SORT_PROTO_ELEMENT_SIZE
-		ST_SORT_PROTO_COMPARE
-		ST_SORT_PROTO_ARG)
-{
-	ST_POINTER_TYPE *a = (ST_POINTER_TYPE *) data,
-			   *pa,
-			   *pb,
-			   *pc,
-			   *pd,
-			   *pl,
-			   *pm,
-			   *pn;
-	size_t		d1,
-				d2;
-	int			r,
-				presorted;
-
-loop:
-	DO_CHECK_FOR_INTERRUPTS();
-	if (n < 7)
-	{
-		for (pm = a + ST_POINTER_STEP; pm < a + n * ST_POINTER_STEP;
-			 pm += ST_POINTER_STEP)
-			for (pl = pm; pl > a && DO_COMPARE(pl - ST_POINTER_STEP, pl) > 0;
-				 pl -= ST_POINTER_STEP)
-				DO_SWAP(pl, pl - ST_POINTER_STEP);
-		return;
-	}
-	presorted = 1;
-	for (pm = a + ST_POINTER_STEP; pm < a + n * ST_POINTER_STEP;
-		 pm += ST_POINTER_STEP)
-	{
-		DO_CHECK_FOR_INTERRUPTS();
-		if (DO_COMPARE(pm - ST_POINTER_STEP, pm) > 0)
-		{
-			presorted = 0;
-			break;
-		}
-	}
-	if (presorted)
-		return;
-	pm = a + (n / 2) * ST_POINTER_STEP;
-	if (n > 7)
-	{
-		pl = a;
-		pn = a + (n - 1) * ST_POINTER_STEP;
-		if (n > 40)
-		{
-			size_t		d = (n / 8) * ST_POINTER_STEP;
-
-			pl = DO_MED3(pl, pl + d, pl + 2 * d);
-			pm = DO_MED3(pm - d, pm, pm + d);
-			pn = DO_MED3(pn - 2 * d, pn - d, pn);
-		}
-		pm = DO_MED3(pl, pm, pn);
-	}
-	DO_SWAP(a, pm);
-	pa = pb = a + ST_POINTER_STEP;
-	pc = pd = a + (n - 1) * ST_POINTER_STEP;
-	for (;;)
-	{
-		while (pb <= pc && (r = DO_COMPARE(pb, a)) <= 0)
-		{
-			if (r == 0)
-			{
-				DO_SWAP(pa, pb);
-				pa += ST_POINTER_STEP;
-			}
-			pb += ST_POINTER_STEP;
-			DO_CHECK_FOR_INTERRUPTS();
-		}
-		while (pb <= pc && (r = DO_COMPARE(pc, a)) >= 0)
-		{
-			if (r == 0)
-			{
-				DO_SWAP(pc, pd);
-				pd -= ST_POINTER_STEP;
-			}
-			pc -= ST_POINTER_STEP;
-			DO_CHECK_FOR_INTERRUPTS();
-		}
-		if (pb > pc)
-			break;
-		DO_SWAP(pb, pc);
-		pb += ST_POINTER_STEP;
-		pc -= ST_POINTER_STEP;
-	}
-	pn = a + n * ST_POINTER_STEP;
-	d1 = Min(pa - a, pb - pa);
-	DO_SWAPN(a, pb - d1, d1);
-	d1 = Min(pd - pc, pn - pd - ST_POINTER_STEP);
-	DO_SWAPN(pb, pn - d1, d1);
-	d1 = pb - pa;
-	d2 = pd - pc;
-	if (d1 <= d2)
-	{
-		/* Recurse on left partition, then iterate on right partition */
-		if (d1 > ST_POINTER_STEP)
-			DO_SORT(a, d1 / ST_POINTER_STEP);
-		if (d2 > ST_POINTER_STEP)
-		{
-			/* Iterate rather than recurse to save stack space */
-			/* DO_SORT(pn - d2, d2 / ST_POINTER_STEP) */
-			a = pn - d2;
-			n = d2 / ST_POINTER_STEP;
-			goto loop;
-		}
-	}
-	else
-	{
-		/* Recurse on right partition, then iterate on left partition */
-		if (d2 > ST_POINTER_STEP)
-			DO_SORT(pn - d2, d2 / ST_POINTER_STEP);
-		if (d1 > ST_POINTER_STEP)
-		{
-			/* Iterate rather than recurse to save stack space */
-			/* DO_SORT(a, d1 / ST_POINTER_STEP) */
-			n = d1 / ST_POINTER_STEP;
-			goto loop;
-		}
-	}
-}
-#endif
-
-#undef DO_CHECK_FOR_INTERRUPTS
-#undef DO_COMPARE
-#undef DO_MED3
-#undef DO_SORT
-#undef DO_SWAP
-#undef DO_SWAPN
-#undef ST_CHECK_FOR_INTERRUPTS
-#undef ST_COMPARATOR_TYPE_NAME
-#undef ST_COMPARE
-#undef ST_COMPARE_ARG_TYPE
-#undef ST_COMPARE_RUNTIME_POINTER
-#undef ST_ELEMENT_TYPE
-#undef ST_ELEMENT_TYPE_VOID
-#undef ST_MAKE_NAME
-#undef ST_MAKE_NAME_
-#undef ST_MAKE_PREFIX
-#undef ST_MED3
-#undef ST_POINTER_STEP
-#undef ST_POINTER_TYPE
-#undef ST_SCOPE
-#undef ST_SORT
-#undef ST_SORT_INVOKE_ARG
-#undef ST_SORT_INVOKE_COMPARE
-#undef ST_SORT_INVOKE_ELEMENT_SIZE
-#undef ST_SORT_PROTO_ARG
-#undef ST_SORT_PROTO_COMPARE
-#undef ST_SORT_PROTO_ELEMENT_SIZE
-#undef ST_SWAP
-#undef ST_SWAPN
diff --git a/contrib/libs/libpq/src/include/lib/stringinfo.h b/contrib/libs/libpq/src/include/lib/stringinfo.h
deleted file mode 100644
index 36a416f8e0..0000000000
--- a/contrib/libs/libpq/src/include/lib/stringinfo.h
+++ /dev/null
@@ -1,161 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * stringinfo.h
- *	  Declarations/definitions for "StringInfo" functions.
- *
- * StringInfo provides an extensible string data type (currently limited to a
- * length of 1GB).  It can be used to buffer either ordinary C strings
- * (null-terminated text) or arbitrary binary data.  All storage is allocated
- * with palloc() (falling back to malloc in frontend code).
- *
- * Portions Copyright (c) 1996-2023, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- * src/include/lib/stringinfo.h
- *
- *-------------------------------------------------------------------------
- */
-#ifndef STRINGINFO_H
-#define STRINGINFO_H
-
-/*-------------------------
- * StringInfoData holds information about an extensible string.
- *		data	is the current buffer for the string (allocated with palloc).
- *		len		is the current string length.  There is guaranteed to be
- *				a terminating '\0' at data[len], although this is not very
- *				useful when the string holds binary data rather than text.
- *		maxlen	is the allocated size in bytes of 'data', i.e. the maximum
- *				string size (including the terminating '\0' char) that we can
- *				currently store in 'data' without having to reallocate
- *				more space.  We must always have maxlen > len.
- *		cursor	is initialized to zero by makeStringInfo or initStringInfo,
- *				but is not otherwise touched by the stringinfo.c routines.
- *				Some routines use it to scan through a StringInfo.
- *-------------------------
- */
-typedef struct StringInfoData
-{
-	char	   *data;
-	int			len;
-	int			maxlen;
-	int			cursor;
-} StringInfoData;
-
-typedef StringInfoData *StringInfo;
-
-
-/*------------------------
- * There are two ways to create a StringInfo object initially:
- *
- * StringInfo stringptr = makeStringInfo();
- *		Both the StringInfoData and the data buffer are palloc'd.
- *
- * StringInfoData string;
- * initStringInfo(&string);
- *		The data buffer is palloc'd but the StringInfoData is just local.
- *		This is the easiest approach for a StringInfo object that will
- *		only live as long as the current routine.
- *
- * To destroy a StringInfo, pfree() the data buffer, and then pfree() the
- * StringInfoData if it was palloc'd.  There's no special support for this.
- *
- * NOTE: some routines build up a string using StringInfo, and then
- * release the StringInfoData but return the data string itself to their
- * caller.  At that point the data string looks like a plain palloc'd
- * string.
- *-------------------------
- */
-
-/*------------------------
- * makeStringInfo
- * Create an empty 'StringInfoData' & return a pointer to it.
- */
-extern StringInfo makeStringInfo(void);
-
-/*------------------------
- * initStringInfo
- * Initialize a StringInfoData struct (with previously undefined contents)
- * to describe an empty string.
- */
-extern void initStringInfo(StringInfo str);
-
-/*------------------------
- * resetStringInfo
- * Clears the current content of the StringInfo, if any. The
- * StringInfo remains valid.
- */
-extern void resetStringInfo(StringInfo str);
-
-/*------------------------
- * appendStringInfo
- * Format text data under the control of fmt (an sprintf-style format string)
- * and append it to whatever is already in str.  More space is allocated
- * to str if necessary.  This is sort of like a combination of sprintf and
- * strcat.
- */
-extern void appendStringInfo(StringInfo str, const char *fmt,...) pg_attribute_printf(2, 3);
-
-/*------------------------
- * appendStringInfoVA
- * Attempt to format text data under the control of fmt (an sprintf-style
- * format string) and append it to whatever is already in str.  If successful
- * return zero; if not (because there's not enough space), return an estimate
- * of the space needed, without modifying str.  Typically the caller should
- * pass the return value to enlargeStringInfo() before trying again; see
- * appendStringInfo for standard usage pattern.
- */
-extern int	appendStringInfoVA(StringInfo str, const char *fmt, va_list args) pg_attribute_printf(2, 0);
-
-/*------------------------
- * appendStringInfoString
- * Append a null-terminated string to str.
- * Like appendStringInfo(str, "%s", s) but faster.
- */
-extern void appendStringInfoString(StringInfo str, const char *s);
-
-/*------------------------
- * appendStringInfoChar
- * Append a single byte to str.
- * Like appendStringInfo(str, "%c", ch) but much faster.
- */
-extern void appendStringInfoChar(StringInfo str, char ch);
-
-/*------------------------
- * appendStringInfoCharMacro
- * As above, but a macro for even more speed where it matters.
- * Caution: str argument will be evaluated multiple times.
- */
-#define appendStringInfoCharMacro(str,ch) \
-	(((str)->len + 1 >= (str)->maxlen) ? \
-	 appendStringInfoChar(str, ch) : \
-	 (void)((str)->data[(str)->len] = (ch), (str)->data[++(str)->len] = '\0'))
-
-/*------------------------
- * appendStringInfoSpaces
- * Append a given number of spaces to str.
- */
-extern void appendStringInfoSpaces(StringInfo str, int count);
-
-/*------------------------
- * appendBinaryStringInfo
- * Append arbitrary binary data to a StringInfo, allocating more space
- * if necessary.
- */
-extern void appendBinaryStringInfo(StringInfo str,
-								   const void *data, int datalen);
-
-/*------------------------
- * appendBinaryStringInfoNT
- * Append arbitrary binary data to a StringInfo, allocating more space
- * if necessary. Does not ensure a trailing null-byte exists.
- */
-extern void appendBinaryStringInfoNT(StringInfo str,
-									 const void *data, int datalen);
-
-/*------------------------
- * enlargeStringInfo
- * Make sure a StringInfo's buffer can hold at least 'needed' more bytes.
- */
-extern void enlargeStringInfo(StringInfo str, int needed);
-
-#endif							/* STRINGINFO_H */
diff --git a/contrib/libs/libpq/src/include/libpq/libpq-fs.h b/contrib/libs/libpq/src/include/libpq/libpq-fs.h
deleted file mode 100644
index f89e0f9e3f..0000000000
--- a/contrib/libs/libpq/src/include/libpq/libpq-fs.h
+++ /dev/null
@@ -1,24 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * libpq-fs.h
- *	  definitions for using Inversion file system routines (ie, large objects)
- *
- *
- * Portions Copyright (c) 1996-2023, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- * src/include/libpq/libpq-fs.h
- *
- *-------------------------------------------------------------------------
- */
-#ifndef LIBPQ_FS_H
-#define LIBPQ_FS_H
-
-/*
- *	Read/write mode flags for inversion (large object) calls
- */
-
-#define INV_WRITE		0x00020000
-#define INV_READ		0x00040000
-
-#endif							/* LIBPQ_FS_H */
diff --git a/contrib/libs/libpq/src/include/libpq/pqcomm.h b/contrib/libs/libpq/src/include/libpq/pqcomm.h
deleted file mode 100644
index c85090259d..0000000000
--- a/contrib/libs/libpq/src/include/libpq/pqcomm.h
+++ /dev/null
@@ -1,163 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * pqcomm.h
- *		Definitions common to frontends and backends.
- *
- * NOTE: for historical reasons, this does not correspond to pqcomm.c.
- * pqcomm.c's routines are declared in libpq.h.
- *
- * Portions Copyright (c) 1996-2023, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- * src/include/libpq/pqcomm.h
- *
- *-------------------------------------------------------------------------
- */
-#ifndef PQCOMM_H
-#define PQCOMM_H
-
-#include <sys/socket.h>
-#include <sys/un.h>
-#include <netdb.h>
-#include <netinet/in.h>
-
-typedef struct
-{
-	struct sockaddr_storage addr;
-	socklen_t	salen;
-} SockAddr;
-
-typedef struct
-{
-	int			family;
-	SockAddr	addr;
-} AddrInfo;
-
-/* Configure the UNIX socket location for the well known port. */
-
-#define UNIXSOCK_PATH(path, port, sockdir) \
-	   (AssertMacro(sockdir), \
-		AssertMacro(*(sockdir) != '\0'), \
-		snprintf(path, sizeof(path), "%s/.s.PGSQL.%d", \
-				 (sockdir), (port)))
-
-/*
- * The maximum workable length of a socket path is what will fit into
- * struct sockaddr_un.  This is usually only 100 or so bytes :-(.
- *
- * For consistency, always pass a MAXPGPATH-sized buffer to UNIXSOCK_PATH(),
- * then complain if the resulting string is >= UNIXSOCK_PATH_BUFLEN bytes.
- * (Because the standard API for getaddrinfo doesn't allow it to complain in
- * a useful way when the socket pathname is too long, we have to test for
- * this explicitly, instead of just letting the subroutine return an error.)
- */
-#define UNIXSOCK_PATH_BUFLEN sizeof(((struct sockaddr_un *) NULL)->sun_path)
-
-/*
- * A host that looks either like an absolute path or starts with @ is
- * interpreted as a Unix-domain socket address.
- */
-static inline bool
-is_unixsock_path(const char *path)
-{
-	return is_absolute_path(path) || path[0] == '@';
-}
-
-/*
- * These manipulate the frontend/backend protocol version number.
- *
- * The major number should be incremented for incompatible changes.  The minor
- * number should be incremented for compatible changes (eg. additional
- * functionality).
- *
- * If a backend supports version m.n of the protocol it must actually support
- * versions m.[0..n].  Backend support for version m-1 can be dropped after a
- * `reasonable' length of time.
- *
- * A frontend isn't required to support anything other than the current
- * version.
- */
-
-#define PG_PROTOCOL_MAJOR(v)	((v) >> 16)
-#define PG_PROTOCOL_MINOR(v)	((v) & 0x0000ffff)
-#define PG_PROTOCOL(m,n)	(((m) << 16) | (n))
-
-/*
- * The earliest and latest frontend/backend protocol version supported.
- * (Only protocol version 3 is currently supported)
- */
-
-#define PG_PROTOCOL_EARLIEST	PG_PROTOCOL(3,0)
-#define PG_PROTOCOL_LATEST		PG_PROTOCOL(3,0)
-
-typedef uint32 ProtocolVersion; /* FE/BE protocol version number */
-
-typedef ProtocolVersion MsgType;
-
-
-/*
- * Packet lengths are 4 bytes in network byte order.
- *
- * The initial length is omitted from the packet layouts appearing below.
- */
-
-typedef uint32 PacketLen;
-
-extern PGDLLIMPORT bool Db_user_namespace;
-
-/*
- * In protocol 3.0 and later, the startup packet length is not fixed, but
- * we set an arbitrary limit on it anyway.  This is just to prevent simple
- * denial-of-service attacks via sending enough data to run the server
- * out of memory.
- */
-#define MAX_STARTUP_PACKET_LENGTH 10000
-
-
-/* These are the authentication request codes sent by the backend. */
-
-#define AUTH_REQ_OK			0	/* User is authenticated  */
-#define AUTH_REQ_KRB4		1	/* Kerberos V4. Not supported any more. */
-#define AUTH_REQ_KRB5		2	/* Kerberos V5. Not supported any more. */
-#define AUTH_REQ_PASSWORD	3	/* Password */
-#define AUTH_REQ_CRYPT		4	/* crypt password. Not supported any more. */
-#define AUTH_REQ_MD5		5	/* md5 password */
-/* 6 is available.  It was used for SCM creds, not supported any more. */
-#define AUTH_REQ_GSS		7	/* GSSAPI without wrap() */
-#define AUTH_REQ_GSS_CONT	8	/* Continue GSS exchanges */
-#define AUTH_REQ_SSPI		9	/* SSPI negotiate without wrap() */
-#define AUTH_REQ_SASL	   10	/* Begin SASL authentication */
-#define AUTH_REQ_SASL_CONT 11	/* Continue SASL authentication */
-#define AUTH_REQ_SASL_FIN  12	/* Final SASL message */
-#define AUTH_REQ_MAX	   AUTH_REQ_SASL_FIN	/* maximum AUTH_REQ_* value */
-
-typedef uint32 AuthRequest;
-
-
-/*
- * A client can also send a cancel-current-operation request to the postmaster.
- * This is uglier than sending it directly to the client's backend, but it
- * avoids depending on out-of-band communication facilities.
- *
- * The cancel request code must not match any protocol version number
- * we're ever likely to use.  This random choice should do.
- */
-#define CANCEL_REQUEST_CODE PG_PROTOCOL(1234,5678)
-
-typedef struct CancelRequestPacket
-{
-	/* Note that each field is stored in network byte order! */
-	MsgType		cancelRequestCode;	/* code to identify a cancel request */
-	uint32		backendPID;		/* PID of client's backend */
-	uint32		cancelAuthCode; /* secret key to authorize cancel */
-} CancelRequestPacket;
-
-
-/*
- * A client can also start by sending a SSL or GSSAPI negotiation request to
- * get a secure channel.
- */
-#define NEGOTIATE_SSL_CODE PG_PROTOCOL(1234,5679)
-#define NEGOTIATE_GSS_CODE PG_PROTOCOL(1234,5680)
-
-#endif							/* PQCOMM_H */
diff --git a/contrib/libs/libpq/src/include/mb/pg_wchar.h b/contrib/libs/libpq/src/include/mb/pg_wchar.h
deleted file mode 100644
index 06a56a41bb..0000000000
--- a/contrib/libs/libpq/src/include/mb/pg_wchar.h
+++ /dev/null
@@ -1,703 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * pg_wchar.h
- *	  multibyte-character support
- *
- * Portions Copyright (c) 1996-2023, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- * src/include/mb/pg_wchar.h
- *
- *	NOTES
- *		This is used both by the backend and by frontends, but should not be
- *		included by libpq client programs.  In particular, a libpq client
- *		should not assume that the encoding IDs used by the version of libpq
- *		it's linked to match up with the IDs declared here.
- *
- *-------------------------------------------------------------------------
- */
-#ifndef PG_WCHAR_H
-#define PG_WCHAR_H
-
-/*
- * The pg_wchar type
- */
-typedef unsigned int pg_wchar;
-
-/*
- * Maximum byte length of multibyte characters in any backend encoding
- */
-#define MAX_MULTIBYTE_CHAR_LEN	4
-
-/*
- * various definitions for EUC
- */
-#define SS2 0x8e				/* single shift 2 (JIS0201) */
-#define SS3 0x8f				/* single shift 3 (JIS0212) */
-
-/*
- * SJIS validation macros
- */
-#define ISSJISHEAD(c) (((c) >= 0x81 && (c) <= 0x9f) || ((c) >= 0xe0 && (c) <= 0xfc))
-#define ISSJISTAIL(c) (((c) >= 0x40 && (c) <= 0x7e) || ((c) >= 0x80 && (c) <= 0xfc))
-
-/*----------------------------------------------------
- * MULE Internal Encoding (MIC)
- *
- * This encoding follows the design used within XEmacs; it is meant to
- * subsume many externally-defined character sets.  Each character includes
- * identification of the character set it belongs to, so the encoding is
- * general but somewhat bulky.
- *
- * Currently PostgreSQL supports 5 types of MULE character sets:
- *
- * 1) 1-byte ASCII characters.  Each byte is below 0x80.
- *
- * 2) "Official" single byte charsets such as ISO-8859-1 (Latin1).
- *	  Each MULE character consists of 2 bytes: LC1 + C1, where LC1 is
- *	  an identifier for the charset (in the range 0x81 to 0x8d) and C1
- *	  is the character code (in the range 0xa0 to 0xff).
- *
- * 3) "Private" single byte charsets such as SISHENG.  Each MULE
- *	  character consists of 3 bytes: LCPRV1 + LC12 + C1, where LCPRV1
- *	  is a private-charset flag, LC12 is an identifier for the charset,
- *	  and C1 is the character code (in the range 0xa0 to 0xff).
- *	  LCPRV1 is either 0x9a (if LC12 is in the range 0xa0 to 0xdf)
- *	  or 0x9b (if LC12 is in the range 0xe0 to 0xef).
- *
- * 4) "Official" multibyte charsets such as JIS X0208.  Each MULE
- *	  character consists of 3 bytes: LC2 + C1 + C2, where LC2 is
- *	  an identifier for the charset (in the range 0x90 to 0x99) and C1
- *	  and C2 form the character code (each in the range 0xa0 to 0xff).
- *
- * 5) "Private" multibyte charsets such as CNS 11643-1992 Plane 3.
- *	  Each MULE character consists of 4 bytes: LCPRV2 + LC22 + C1 + C2,
- *	  where LCPRV2 is a private-charset flag, LC22 is an identifier for
- *	  the charset, and C1 and C2 form the character code (each in the range
- *	  0xa0 to 0xff).  LCPRV2 is either 0x9c (if LC22 is in the range 0xf0
- *	  to 0xf4) or 0x9d (if LC22 is in the range 0xf5 to 0xfe).
- *
- * "Official" encodings are those that have been assigned code numbers by
- * the XEmacs project; "private" encodings have Postgres-specific charset
- * identifiers.
- *
- * See the "XEmacs Internals Manual", available at http://www.xemacs.org,
- * for more details.  Note that for historical reasons, Postgres'
- * private-charset flag values do not match what XEmacs says they should be,
- * so this isn't really exactly MULE (not that private charsets would be
- * interoperable anyway).
- *
- * Note that XEmacs's implementation is different from what emacs does.
- * We follow emacs's implementation, rather than XEmacs's.
- *----------------------------------------------------
- */
-
-/*
- * Charset identifiers (also called "leading bytes" in the MULE documentation)
- */
-
-/*
- * Charset IDs for official single byte encodings (0x81-0x8e)
- */
-#define LC_ISO8859_1		0x81	/* ISO8859 Latin 1 */
-#define LC_ISO8859_2		0x82	/* ISO8859 Latin 2 */
-#define LC_ISO8859_3		0x83	/* ISO8859 Latin 3 */
-#define LC_ISO8859_4		0x84	/* ISO8859 Latin 4 */
-#define LC_TIS620			0x85	/* Thai (not supported yet) */
-#define LC_ISO8859_7		0x86	/* Greek (not supported yet) */
-#define LC_ISO8859_6		0x87	/* Arabic (not supported yet) */
-#define LC_ISO8859_8		0x88	/* Hebrew (not supported yet) */
-#define LC_JISX0201K		0x89	/* Japanese 1 byte kana */
-#define LC_JISX0201R		0x8a	/* Japanese 1 byte Roman */
-/* Note that 0x8b seems to be unused as of Emacs 20.7.
- * However, there might be a chance that 0x8b could be used
- * in later versions of Emacs.
- */
-#define LC_KOI8_R			0x8b	/* Cyrillic KOI8-R */
-#define LC_ISO8859_5		0x8c	/* ISO8859 Cyrillic */
-#define LC_ISO8859_9		0x8d	/* ISO8859 Latin 5 (not supported yet) */
-#define LC_ISO8859_15		0x8e	/* ISO8859 Latin 15 (not supported yet) */
-/* #define CONTROL_1		0x8f	control characters (unused) */
-
-/* Is a leading byte for "official" single byte encodings? */
-#define IS_LC1(c)	((unsigned char)(c) >= 0x81 && (unsigned char)(c) <= 0x8d)
-
-/*
- * Charset IDs for official multibyte encodings (0x90-0x99)
- * 0x9a-0x9d are free. 0x9e and 0x9f are reserved.
- */
-#define LC_JISX0208_1978	0x90	/* Japanese Kanji, old JIS (not supported) */
-#define LC_GB2312_80		0x91	/* Chinese */
-#define LC_JISX0208			0x92	/* Japanese Kanji (JIS X 0208) */
-#define LC_KS5601			0x93	/* Korean */
-#define LC_JISX0212			0x94	/* Japanese Kanji (JIS X 0212) */
-#define LC_CNS11643_1		0x95	/* CNS 11643-1992 Plane 1 */
-#define LC_CNS11643_2		0x96	/* CNS 11643-1992 Plane 2 */
-#define LC_JISX0213_1		0x97	/* Japanese Kanji (JIS X 0213 Plane 1)
-									 * (not supported) */
-#define LC_BIG5_1			0x98	/* Plane 1 Chinese traditional (not
-									 * supported) */
-#define LC_BIG5_2			0x99	/* Plane 1 Chinese traditional (not
-									 * supported) */
-
-/* Is a leading byte for "official" multibyte encodings? */
-#define IS_LC2(c)	((unsigned char)(c) >= 0x90 && (unsigned char)(c) <= 0x99)
-
-/*
- * Postgres-specific prefix bytes for "private" single byte encodings
- * (According to the MULE docs, we should be using 0x9e for this)
- */
-#define LCPRV1_A		0x9a
-#define LCPRV1_B		0x9b
-#define IS_LCPRV1(c)	((unsigned char)(c) == LCPRV1_A || (unsigned char)(c) == LCPRV1_B)
-#define IS_LCPRV1_A_RANGE(c)	\
-	((unsigned char)(c) >= 0xa0 && (unsigned char)(c) <= 0xdf)
-#define IS_LCPRV1_B_RANGE(c)	\
-	((unsigned char)(c) >= 0xe0 && (unsigned char)(c) <= 0xef)
-
-/*
- * Postgres-specific prefix bytes for "private" multibyte encodings
- * (According to the MULE docs, we should be using 0x9f for this)
- */
-#define LCPRV2_A		0x9c
-#define LCPRV2_B		0x9d
-#define IS_LCPRV2(c)	((unsigned char)(c) == LCPRV2_A || (unsigned char)(c) == LCPRV2_B)
-#define IS_LCPRV2_A_RANGE(c)	\
-	((unsigned char)(c) >= 0xf0 && (unsigned char)(c) <= 0xf4)
-#define IS_LCPRV2_B_RANGE(c)	\
-	((unsigned char)(c) >= 0xf5 && (unsigned char)(c) <= 0xfe)
-
-/*
- * Charset IDs for private single byte encodings (0xa0-0xef)
- */
-#define LC_SISHENG			0xa0	/* Chinese SiSheng characters for
-									 * PinYin/ZhuYin (not supported) */
-#define LC_IPA				0xa1	/* IPA (International Phonetic
-									 * Association) (not supported) */
-#define LC_VISCII_LOWER		0xa2	/* Vietnamese VISCII1.1 lower-case (not
-									 * supported) */
-#define LC_VISCII_UPPER		0xa3	/* Vietnamese VISCII1.1 upper-case (not
-									 * supported) */
-#define LC_ARABIC_DIGIT		0xa4	/* Arabic digit (not supported) */
-#define LC_ARABIC_1_COLUMN	0xa5	/* Arabic 1-column (not supported) */
-#define LC_ASCII_RIGHT_TO_LEFT	0xa6	/* ASCII (left half of ISO8859-1) with
-										 * right-to-left direction (not
-										 * supported) */
-#define LC_LAO				0xa7	/* Lao characters (ISO10646 0E80..0EDF)
-									 * (not supported) */
-#define LC_ARABIC_2_COLUMN	0xa8	/* Arabic 1-column (not supported) */
-
-/*
- * Charset IDs for private multibyte encodings (0xf0-0xff)
- */
-#define LC_INDIAN_1_COLUMN	0xf0	/* Indian charset for 1-column width
-									 * glyphs (not supported) */
-#define LC_TIBETAN_1_COLUMN 0xf1	/* Tibetan 1-column width glyphs (not
-									 * supported) */
-#define LC_UNICODE_SUBSET_2 0xf2	/* Unicode characters of the range
-									 * U+2500..U+33FF. (not supported) */
-#define LC_UNICODE_SUBSET_3 0xf3	/* Unicode characters of the range
-									 * U+E000..U+FFFF. (not supported) */
-#define LC_UNICODE_SUBSET	0xf4	/* Unicode characters of the range
-									 * U+0100..U+24FF. (not supported) */
-#define LC_ETHIOPIC			0xf5	/* Ethiopic characters (not supported) */
-#define LC_CNS11643_3		0xf6	/* CNS 11643-1992 Plane 3 */
-#define LC_CNS11643_4		0xf7	/* CNS 11643-1992 Plane 4 */
-#define LC_CNS11643_5		0xf8	/* CNS 11643-1992 Plane 5 */
-#define LC_CNS11643_6		0xf9	/* CNS 11643-1992 Plane 6 */
-#define LC_CNS11643_7		0xfa	/* CNS 11643-1992 Plane 7 */
-#define LC_INDIAN_2_COLUMN	0xfb	/* Indian charset for 2-column width
-									 * glyphs (not supported) */
-#define LC_TIBETAN			0xfc	/* Tibetan (not supported) */
-/* #define FREE				0xfd	free (unused) */
-/* #define FREE				0xfe	free (unused) */
-/* #define FREE				0xff	free (unused) */
-
-/*----------------------------------------------------
- * end of MULE stuff
- *----------------------------------------------------
- */
-
-/*
- * PostgreSQL encoding identifiers
- *
- * WARNING: the order of this enum must be same as order of entries
- *			in the pg_enc2name_tbl[] array (in src/common/encnames.c), and
- *			in the pg_wchar_table[] array (in src/common/wchar.c)!
- *
- *			If you add some encoding don't forget to check
- *			PG_ENCODING_BE_LAST macro.
- *
- * PG_SQL_ASCII is default encoding and must be = 0.
- *
- * XXX	We must avoid renumbering any backend encoding until libpq's major
- * version number is increased beyond 5; it turns out that the backend
- * encoding IDs are effectively part of libpq's ABI as far as 8.2 initdb and
- * psql are concerned.
- */
-typedef enum pg_enc
-{
-	PG_SQL_ASCII = 0,			/* SQL/ASCII */
-	PG_EUC_JP,					/* EUC for Japanese */
-	PG_EUC_CN,					/* EUC for Chinese */
-	PG_EUC_KR,					/* EUC for Korean */
-	PG_EUC_TW,					/* EUC for Taiwan */
-	PG_EUC_JIS_2004,			/* EUC-JIS-2004 */
-	PG_UTF8,					/* Unicode UTF8 */
-	PG_MULE_INTERNAL,			/* Mule internal code */
-	PG_LATIN1,					/* ISO-8859-1 Latin 1 */
-	PG_LATIN2,					/* ISO-8859-2 Latin 2 */
-	PG_LATIN3,					/* ISO-8859-3 Latin 3 */
-	PG_LATIN4,					/* ISO-8859-4 Latin 4 */
-	PG_LATIN5,					/* ISO-8859-9 Latin 5 */
-	PG_LATIN6,					/* ISO-8859-10 Latin6 */
-	PG_LATIN7,					/* ISO-8859-13 Latin7 */
-	PG_LATIN8,					/* ISO-8859-14 Latin8 */
-	PG_LATIN9,					/* ISO-8859-15 Latin9 */
-	PG_LATIN10,					/* ISO-8859-16 Latin10 */
-	PG_WIN1256,					/* windows-1256 */
-	PG_WIN1258,					/* Windows-1258 */
-	PG_WIN866,					/* (MS-DOS CP866) */
-	PG_WIN874,					/* windows-874 */
-	PG_KOI8R,					/* KOI8-R */
-	PG_WIN1251,					/* windows-1251 */
-	PG_WIN1252,					/* windows-1252 */
-	PG_ISO_8859_5,				/* ISO-8859-5 */
-	PG_ISO_8859_6,				/* ISO-8859-6 */
-	PG_ISO_8859_7,				/* ISO-8859-7 */
-	PG_ISO_8859_8,				/* ISO-8859-8 */
-	PG_WIN1250,					/* windows-1250 */
-	PG_WIN1253,					/* windows-1253 */
-	PG_WIN1254,					/* windows-1254 */
-	PG_WIN1255,					/* windows-1255 */
-	PG_WIN1257,					/* windows-1257 */
-	PG_KOI8U,					/* KOI8-U */
-	/* PG_ENCODING_BE_LAST points to the above entry */
-
-	/* followings are for client encoding only */
-	PG_SJIS,					/* Shift JIS (Windows-932) */
-	PG_BIG5,					/* Big5 (Windows-950) */
-	PG_GBK,						/* GBK (Windows-936) */
-	PG_UHC,						/* UHC (Windows-949) */
-	PG_GB18030,					/* GB18030 */
-	PG_JOHAB,					/* EUC for Korean JOHAB */
-	PG_SHIFT_JIS_2004,			/* Shift-JIS-2004 */
-	_PG_LAST_ENCODING_			/* mark only */
-
-} pg_enc;
-
-#define PG_ENCODING_BE_LAST PG_KOI8U
-
-/*
- * Please use these tests before access to pg_enc2name_tbl[]
- * or to other places...
- */
-#define PG_VALID_BE_ENCODING(_enc) \
-		((_enc) >= 0 && (_enc) <= PG_ENCODING_BE_LAST)
-
-#define PG_ENCODING_IS_CLIENT_ONLY(_enc) \
-		((_enc) > PG_ENCODING_BE_LAST && (_enc) < _PG_LAST_ENCODING_)
-
-#define PG_VALID_ENCODING(_enc) \
-		((_enc) >= 0 && (_enc) < _PG_LAST_ENCODING_)
-
-/* On FE are possible all encodings */
-#define PG_VALID_FE_ENCODING(_enc)	PG_VALID_ENCODING(_enc)
-
-/*
- * When converting strings between different encodings, we assume that space
- * for converted result is 4-to-1 growth in the worst case.  The rate for
- * currently supported encoding pairs are within 3 (SJIS JIS X0201 half width
- * kana -> UTF8 is the worst case).  So "4" should be enough for the moment.
- *
- * Note that this is not the same as the maximum character width in any
- * particular encoding.
- */
-#define MAX_CONVERSION_GROWTH  4
-
-/*
- * Maximum byte length of a string that's required in any encoding to convert
- * at least one character to any other encoding.  In other words, if you feed
- * MAX_CONVERSION_INPUT_LENGTH bytes to any encoding conversion function, it
- * is guaranteed to be able to convert something without needing more input
- * (assuming the input is valid).
- *
- * Currently, the maximum case is the conversion UTF8 -> SJIS JIS X0201 half
- * width kana, where a pair of UTF-8 characters is converted into a single
- * SHIFT_JIS_2004 character (the reverse of the worst case for
- * MAX_CONVERSION_GROWTH).  It needs 6 bytes of input.  In theory, a
- * user-defined conversion function might have more complicated cases, although
- * for the reverse mapping you would probably also need to bump up
- * MAX_CONVERSION_GROWTH.  But there is no need to be stingy here, so make it
- * generous.
- */
-#define MAX_CONVERSION_INPUT_LENGTH	16
-
-/*
- * Maximum byte length of the string equivalent to any one Unicode code point,
- * in any backend encoding.  The current value assumes that a 4-byte UTF-8
- * character might expand by MAX_CONVERSION_GROWTH, which is a huge
- * overestimate.  But in current usage we don't allocate large multiples of
- * this, so there's little point in being stingy.
- */
-#define MAX_UNICODE_EQUIVALENT_STRING	16
-
-/*
- * Table for mapping an encoding number to official encoding name and
- * possibly other subsidiary data.  Be careful to check encoding number
- * before accessing a table entry!
- *
- * if (PG_VALID_ENCODING(encoding))
- *		pg_enc2name_tbl[ encoding ];
- */
-typedef struct pg_enc2name
-{
-	const char *name;
-	pg_enc		encoding;
-#ifdef WIN32
-	unsigned	codepage;		/* codepage for WIN32 */
-#endif
-} pg_enc2name;
-
-extern PGDLLIMPORT const pg_enc2name pg_enc2name_tbl[];
-
-/*
- * Encoding names for gettext
- */
-typedef struct pg_enc2gettext
-{
-	pg_enc		encoding;
-	const char *name;
-} pg_enc2gettext;
-
-extern PGDLLIMPORT const pg_enc2gettext pg_enc2gettext_tbl[];
-
-/*
- * pg_wchar stuff
- */
-typedef int (*mb2wchar_with_len_converter) (const unsigned char *from,
-											pg_wchar *to,
-											int len);
-
-typedef int (*wchar2mb_with_len_converter) (const pg_wchar *from,
-											unsigned char *to,
-											int len);
-
-typedef int (*mblen_converter) (const unsigned char *mbstr);
-
-typedef int (*mbdisplaylen_converter) (const unsigned char *mbstr);
-
-typedef bool (*mbcharacter_incrementer) (unsigned char *mbstr, int len);
-
-typedef int (*mbchar_verifier) (const unsigned char *mbstr, int len);
-
-typedef int (*mbstr_verifier) (const unsigned char *mbstr, int len);
-
-typedef struct
-{
-	mb2wchar_with_len_converter mb2wchar_with_len;	/* convert a multibyte
-													 * string to a wchar */
-	wchar2mb_with_len_converter wchar2mb_with_len;	/* convert a wchar string
-													 * to a multibyte */
-	mblen_converter mblen;		/* get byte length of a char */
-	mbdisplaylen_converter dsplen;	/* get display width of a char */
-	mbchar_verifier mbverifychar;	/* verify multibyte character */
-	mbstr_verifier mbverifystr; /* verify multibyte string */
-	int			maxmblen;		/* max bytes for a char in this encoding */
-} pg_wchar_tbl;
-
-extern PGDLLIMPORT const pg_wchar_tbl pg_wchar_table[];
-
-/*
- * Data structures for conversions between UTF-8 and other encodings
- * (UtfToLocal() and LocalToUtf()).  In these data structures, characters of
- * either encoding are represented by uint32 words; hence we can only support
- * characters up to 4 bytes long.  For example, the byte sequence 0xC2 0x89
- * would be represented by 0x0000C289, and 0xE8 0xA2 0xB4 by 0x00E8A2B4.
- *
- * There are three possible ways a character can be mapped:
- *
- * 1. Using a radix tree, from source to destination code.
- * 2. Using a sorted array of source -> destination code pairs. This
- *	  method is used for "combining" characters. There are so few of
- *	  them that building a radix tree would be wasteful.
- * 3. Using a conversion function.
- */
-
-/*
- * Radix tree for character conversion.
- *
- * Logically, this is actually four different radix trees, for 1-byte,
- * 2-byte, 3-byte and 4-byte inputs. The 1-byte tree is a simple lookup
- * table from source to target code. The 2-byte tree consists of two levels:
- * one lookup table for the first byte, where the value in the lookup table
- * points to a lookup table for the second byte. And so on.
- *
- * Physically, all the trees are stored in one big array, in 'chars16' or
- * 'chars32', depending on the maximum value that needs to be represented. For
- * each level in each tree, we also store lower and upper bound of allowed
- * values - values outside those bounds are considered invalid, and are left
- * out of the tables.
- *
- * In the intermediate levels of the trees, the values stored are offsets
- * into the chars[16|32] array.
- *
- * In the beginning of the chars[16|32] array, there is always a number of
- * zeros, so that you safely follow an index from an intermediate table
- * without explicitly checking for a zero. Following a zero any number of
- * times will always bring you to the dummy, all-zeros table in the
- * beginning. This helps to shave some cycles when looking up values.
- */
-typedef struct
-{
-	/*
-	 * Array containing all the values. Only one of chars16 or chars32 is
-	 * used, depending on how wide the values we need to represent are.
-	 */
-	const uint16 *chars16;
-	const uint32 *chars32;
-
-	/* Radix tree for 1-byte inputs */
-	uint32		b1root;			/* offset of table in the chars[16|32] array */
-	uint8		b1_lower;		/* min allowed value for a single byte input */
-	uint8		b1_upper;		/* max allowed value for a single byte input */
-
-	/* Radix tree for 2-byte inputs */
-	uint32		b2root;			/* offset of 1st byte's table */
-	uint8		b2_1_lower;		/* min/max allowed value for 1st input byte */
-	uint8		b2_1_upper;
-	uint8		b2_2_lower;		/* min/max allowed value for 2nd input byte */
-	uint8		b2_2_upper;
-
-	/* Radix tree for 3-byte inputs */
-	uint32		b3root;			/* offset of 1st byte's table */
-	uint8		b3_1_lower;		/* min/max allowed value for 1st input byte */
-	uint8		b3_1_upper;
-	uint8		b3_2_lower;		/* min/max allowed value for 2nd input byte */
-	uint8		b3_2_upper;
-	uint8		b3_3_lower;		/* min/max allowed value for 3rd input byte */
-	uint8		b3_3_upper;
-
-	/* Radix tree for 4-byte inputs */
-	uint32		b4root;			/* offset of 1st byte's table */
-	uint8		b4_1_lower;		/* min/max allowed value for 1st input byte */
-	uint8		b4_1_upper;
-	uint8		b4_2_lower;		/* min/max allowed value for 2nd input byte */
-	uint8		b4_2_upper;
-	uint8		b4_3_lower;		/* min/max allowed value for 3rd input byte */
-	uint8		b4_3_upper;
-	uint8		b4_4_lower;		/* min/max allowed value for 4th input byte */
-	uint8		b4_4_upper;
-
-} pg_mb_radix_tree;
-
-/*
- * UTF-8 to local code conversion map (for combined characters)
- */
-typedef struct
-{
-	uint32		utf1;			/* UTF-8 code 1 */
-	uint32		utf2;			/* UTF-8 code 2 */
-	uint32		code;			/* local code */
-} pg_utf_to_local_combined;
-
-/*
- * local code to UTF-8 conversion map (for combined characters)
- */
-typedef struct
-{
-	uint32		code;			/* local code */
-	uint32		utf1;			/* UTF-8 code 1 */
-	uint32		utf2;			/* UTF-8 code 2 */
-} pg_local_to_utf_combined;
-
-/*
- * callback function for algorithmic encoding conversions (in either direction)
- *
- * if function returns zero, it does not know how to convert the code
- */
-typedef uint32 (*utf_local_conversion_func) (uint32 code);
-
-/*
- * Support macro for encoding conversion functions to validate their
- * arguments.  (This could be made more compact if we included fmgr.h
- * here, but we don't want to do that because this header file is also
- * used by frontends.)
- */
-#define CHECK_ENCODING_CONVERSION_ARGS(srcencoding,destencoding) \
-	check_encoding_conversion_args(PG_GETARG_INT32(0), \
-								   PG_GETARG_INT32(1), \
-								   PG_GETARG_INT32(4), \
-								   (srcencoding), \
-								   (destencoding))
-
-
-/*
- * Some handy functions for Unicode-specific tests.
- */
-static inline bool
-is_valid_unicode_codepoint(pg_wchar c)
-{
-	return (c > 0 && c <= 0x10FFFF);
-}
-
-static inline bool
-is_utf16_surrogate_first(pg_wchar c)
-{
-	return (c >= 0xD800 && c <= 0xDBFF);
-}
-
-static inline bool
-is_utf16_surrogate_second(pg_wchar c)
-{
-	return (c >= 0xDC00 && c <= 0xDFFF);
-}
-
-static inline pg_wchar
-surrogate_pair_to_codepoint(pg_wchar first, pg_wchar second)
-{
-	return ((first & 0x3FF) << 10) + 0x10000 + (second & 0x3FF);
-}
-
-
-/*
- * These functions are considered part of libpq's exported API and
- * are also declared in libpq-fe.h.
- */
-extern int	pg_char_to_encoding(const char *name);
-extern const char *pg_encoding_to_char(int encoding);
-extern int	pg_valid_server_encoding_id(int encoding);
-
-/*
- * These functions are available to frontend code that links with libpgcommon
- * (in addition to the ones just above).  The constant tables declared
- * earlier in this file are also available from libpgcommon.
- */
-extern int	pg_encoding_mblen(int encoding, const char *mbstr);
-extern int	pg_encoding_mblen_bounded(int encoding, const char *mbstr);
-extern int	pg_encoding_dsplen(int encoding, const char *mbstr);
-extern int	pg_encoding_verifymbchar(int encoding, const char *mbstr, int len);
-extern int	pg_encoding_verifymbstr(int encoding, const char *mbstr, int len);
-extern int	pg_encoding_max_length(int encoding);
-extern int	pg_valid_client_encoding(const char *name);
-extern int	pg_valid_server_encoding(const char *name);
-extern bool is_encoding_supported_by_icu(int encoding);
-extern const char *get_encoding_name_for_icu(int encoding);
-
-extern unsigned char *unicode_to_utf8(pg_wchar c, unsigned char *utf8string);
-extern pg_wchar utf8_to_unicode(const unsigned char *c);
-extern bool pg_utf8_islegal(const unsigned char *source, int length);
-extern int	pg_utf_mblen(const unsigned char *s);
-extern int	pg_mule_mblen(const unsigned char *s);
-
-/*
- * The remaining functions are backend-only.
- */
-extern int	pg_mb2wchar(const char *from, pg_wchar *to);
-extern int	pg_mb2wchar_with_len(const char *from, pg_wchar *to, int len);
-extern int	pg_encoding_mb2wchar_with_len(int encoding,
-										  const char *from, pg_wchar *to, int len);
-extern int	pg_wchar2mb(const pg_wchar *from, char *to);
-extern int	pg_wchar2mb_with_len(const pg_wchar *from, char *to, int len);
-extern int	pg_encoding_wchar2mb_with_len(int encoding,
-										  const pg_wchar *from, char *to, int len);
-extern int	pg_char_and_wchar_strcmp(const char *s1, const pg_wchar *s2);
-extern int	pg_wchar_strncmp(const pg_wchar *s1, const pg_wchar *s2, size_t n);
-extern int	pg_char_and_wchar_strncmp(const char *s1, const pg_wchar *s2, size_t n);
-extern size_t pg_wchar_strlen(const pg_wchar *str);
-extern int	pg_mblen(const char *mbstr);
-extern int	pg_dsplen(const char *mbstr);
-extern int	pg_mbstrlen(const char *mbstr);
-extern int	pg_mbstrlen_with_len(const char *mbstr, int limit);
-extern int	pg_mbcliplen(const char *mbstr, int len, int limit);
-extern int	pg_encoding_mbcliplen(int encoding, const char *mbstr,
-								  int len, int limit);
-extern int	pg_mbcharcliplen(const char *mbstr, int len, int limit);
-extern int	pg_database_encoding_max_length(void);
-extern mbcharacter_incrementer pg_database_encoding_character_incrementer(void);
-
-extern int	PrepareClientEncoding(int encoding);
-extern int	SetClientEncoding(int encoding);
-extern void InitializeClientEncoding(void);
-extern int	pg_get_client_encoding(void);
-extern const char *pg_get_client_encoding_name(void);
-
-extern void SetDatabaseEncoding(int encoding);
-extern int	GetDatabaseEncoding(void);
-extern const char *GetDatabaseEncodingName(void);
-extern void SetMessageEncoding(int encoding);
-extern int	GetMessageEncoding(void);
-
-#ifdef ENABLE_NLS
-extern int	pg_bind_textdomain_codeset(const char *domainname);
-#endif
-
-extern unsigned char *pg_do_encoding_conversion(unsigned char *src, int len,
-												int src_encoding,
-												int dest_encoding);
-extern int	pg_do_encoding_conversion_buf(Oid proc,
-										  int src_encoding,
-										  int dest_encoding,
-										  unsigned char *src, int srclen,
-										  unsigned char *dest, int destlen,
-										  bool noError);
-
-extern char *pg_client_to_server(const char *s, int len);
-extern char *pg_server_to_client(const char *s, int len);
-extern char *pg_any_to_server(const char *s, int len, int encoding);
-extern char *pg_server_to_any(const char *s, int len, int encoding);
-
-extern void pg_unicode_to_server(pg_wchar c, unsigned char *s);
-extern bool pg_unicode_to_server_noerror(pg_wchar c, unsigned char *s);
-
-extern unsigned short BIG5toCNS(unsigned short big5, unsigned char *lc);
-extern unsigned short CNStoBIG5(unsigned short cns, unsigned char lc);
-
-extern int	UtfToLocal(const unsigned char *utf, int len,
-					   unsigned char *iso,
-					   const pg_mb_radix_tree *map,
-					   const pg_utf_to_local_combined *cmap, int cmapsize,
-					   utf_local_conversion_func conv_func,
-					   int encoding, bool noError);
-extern int	LocalToUtf(const unsigned char *iso, int len,
-					   unsigned char *utf,
-					   const pg_mb_radix_tree *map,
-					   const pg_local_to_utf_combined *cmap, int cmapsize,
-					   utf_local_conversion_func conv_func,
-					   int encoding, bool noError);
-
-extern bool pg_verifymbstr(const char *mbstr, int len, bool noError);
-extern bool pg_verify_mbstr(int encoding, const char *mbstr, int len,
-							bool noError);
-extern int	pg_verify_mbstr_len(int encoding, const char *mbstr, int len,
-								bool noError);
-
-extern void check_encoding_conversion_args(int src_encoding,
-										   int dest_encoding,
-										   int len,
-										   int expected_src_encoding,
-										   int expected_dest_encoding);
-
-extern void report_invalid_encoding(int encoding, const char *mbstr, int len) pg_attribute_noreturn();
-extern void report_untranslatable_char(int src_encoding, int dest_encoding,
-									   const char *mbstr, int len) pg_attribute_noreturn();
-
-extern int	local2local(const unsigned char *l, unsigned char *p, int len,
-						int src_encoding, int dest_encoding,
-						const unsigned char *tab, bool noError);
-extern int	latin2mic(const unsigned char *l, unsigned char *p, int len,
-					  int lc, int encoding, bool noError);
-extern int	mic2latin(const unsigned char *mic, unsigned char *p, int len,
-					  int lc, int encoding, bool noError);
-extern int	latin2mic_with_table(const unsigned char *l, unsigned char *p,
-								 int len, int lc, int encoding,
-								 const unsigned char *tab, bool noError);
-extern int	mic2latin_with_table(const unsigned char *mic, unsigned char *p,
-								 int len, int lc, int encoding,
-								 const unsigned char *tab, bool noError);
-
-#ifdef WIN32
-extern WCHAR *pgwin32_message_to_UTF16(const char *str, int len, int *utf16len);
-#endif
-
-#endif							/* PG_WCHAR_H */
diff --git a/contrib/libs/libpq/src/include/parser/kwlist.h b/contrib/libs/libpq/src/include/parser/kwlist.h
deleted file mode 100644
index f5b2e61ca5..0000000000
--- a/contrib/libs/libpq/src/include/parser/kwlist.h
+++ /dev/null
@@ -1,498 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * kwlist.h
- *
- * The keyword lists are kept in their own source files for use by
- * automatic tools.  The exact representation of a keyword is determined
- * by the PG_KEYWORD macro, which is not defined in this file; it can
- * be defined by the caller for special purposes.
- *
- * Portions Copyright (c) 1996-2023, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- * IDENTIFICATION
- *	  src/include/parser/kwlist.h
- *
- *-------------------------------------------------------------------------
- */
-
-/* there is deliberately not an #ifndef KWLIST_H here */
-
-/*
- * List of keyword (name, token-value, category, bare-label-status) entries.
- *
- * Note: gen_keywordlist.pl requires the entries to appear in ASCII order.
- */
-
-/* name, value, category, is-bare-label */
-PG_KEYWORD("abort", ABORT_P, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("absent", ABSENT, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("absolute", ABSOLUTE_P, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("access", ACCESS, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("action", ACTION, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("add", ADD_P, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("admin", ADMIN, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("after", AFTER, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("aggregate", AGGREGATE, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("all", ALL, RESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("also", ALSO, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("alter", ALTER, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("always", ALWAYS, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("analyse", ANALYSE, RESERVED_KEYWORD, BARE_LABEL)		/* British spelling */
-PG_KEYWORD("analyze", ANALYZE, RESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("and", AND, RESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("any", ANY, RESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("array", ARRAY, RESERVED_KEYWORD, AS_LABEL)
-PG_KEYWORD("as", AS, RESERVED_KEYWORD, AS_LABEL)
-PG_KEYWORD("asc", ASC, RESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("asensitive", ASENSITIVE, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("assertion", ASSERTION, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("assignment", ASSIGNMENT, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("asymmetric", ASYMMETRIC, RESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("at", AT, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("atomic", ATOMIC, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("attach", ATTACH, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("attribute", ATTRIBUTE, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("authorization", AUTHORIZATION, TYPE_FUNC_NAME_KEYWORD, BARE_LABEL)
-PG_KEYWORD("backward", BACKWARD, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("before", BEFORE, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("begin", BEGIN_P, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("between", BETWEEN, COL_NAME_KEYWORD, BARE_LABEL)
-PG_KEYWORD("bigint", BIGINT, COL_NAME_KEYWORD, BARE_LABEL)
-PG_KEYWORD("binary", BINARY, TYPE_FUNC_NAME_KEYWORD, BARE_LABEL)
-PG_KEYWORD("bit", BIT, COL_NAME_KEYWORD, BARE_LABEL)
-PG_KEYWORD("boolean", BOOLEAN_P, COL_NAME_KEYWORD, BARE_LABEL)
-PG_KEYWORD("both", BOTH, RESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("breadth", BREADTH, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("by", BY, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("cache", CACHE, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("call", CALL, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("called", CALLED, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("cascade", CASCADE, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("cascaded", CASCADED, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("case", CASE, RESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("cast", CAST, RESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("catalog", CATALOG_P, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("chain", CHAIN, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("char", CHAR_P, COL_NAME_KEYWORD, AS_LABEL)
-PG_KEYWORD("character", CHARACTER, COL_NAME_KEYWORD, AS_LABEL)
-PG_KEYWORD("characteristics", CHARACTERISTICS, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("check", CHECK, RESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("checkpoint", CHECKPOINT, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("class", CLASS, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("close", CLOSE, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("cluster", CLUSTER, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("coalesce", COALESCE, COL_NAME_KEYWORD, BARE_LABEL)
-PG_KEYWORD("collate", COLLATE, RESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("collation", COLLATION, TYPE_FUNC_NAME_KEYWORD, BARE_LABEL)
-PG_KEYWORD("column", COLUMN, RESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("columns", COLUMNS, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("comment", COMMENT, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("comments", COMMENTS, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("commit", COMMIT, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("committed", COMMITTED, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("compression", COMPRESSION, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("concurrently", CONCURRENTLY, TYPE_FUNC_NAME_KEYWORD, BARE_LABEL)
-PG_KEYWORD("configuration", CONFIGURATION, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("conflict", CONFLICT, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("connection", CONNECTION, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("constraint", CONSTRAINT, RESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("constraints", CONSTRAINTS, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("content", CONTENT_P, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("continue", CONTINUE_P, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("conversion", CONVERSION_P, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("copy", COPY, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("cost", COST, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("create", CREATE, RESERVED_KEYWORD, AS_LABEL)
-PG_KEYWORD("cross", CROSS, TYPE_FUNC_NAME_KEYWORD, BARE_LABEL)
-PG_KEYWORD("csv", CSV, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("cube", CUBE, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("current", CURRENT_P, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("current_catalog", CURRENT_CATALOG, RESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("current_date", CURRENT_DATE, RESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("current_role", CURRENT_ROLE, RESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("current_schema", CURRENT_SCHEMA, TYPE_FUNC_NAME_KEYWORD, BARE_LABEL)
-PG_KEYWORD("current_time", CURRENT_TIME, RESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("current_timestamp", CURRENT_TIMESTAMP, RESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("current_user", CURRENT_USER, RESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("cursor", CURSOR, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("cycle", CYCLE, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("data", DATA_P, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("database", DATABASE, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("day", DAY_P, UNRESERVED_KEYWORD, AS_LABEL)
-PG_KEYWORD("deallocate", DEALLOCATE, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("dec", DEC, COL_NAME_KEYWORD, BARE_LABEL)
-PG_KEYWORD("decimal", DECIMAL_P, COL_NAME_KEYWORD, BARE_LABEL)
-PG_KEYWORD("declare", DECLARE, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("default", DEFAULT, RESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("defaults", DEFAULTS, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("deferrable", DEFERRABLE, RESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("deferred", DEFERRED, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("definer", DEFINER, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("delete", DELETE_P, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("delimiter", DELIMITER, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("delimiters", DELIMITERS, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("depends", DEPENDS, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("depth", DEPTH, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("desc", DESC, RESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("detach", DETACH, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("dictionary", DICTIONARY, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("disable", DISABLE_P, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("discard", DISCARD, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("distinct", DISTINCT, RESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("do", DO, RESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("document", DOCUMENT_P, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("domain", DOMAIN_P, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("double", DOUBLE_P, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("drop", DROP, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("each", EACH, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("else", ELSE, RESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("enable", ENABLE_P, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("encoding", ENCODING, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("encrypted", ENCRYPTED, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("end", END_P, RESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("enum", ENUM_P, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("escape", ESCAPE, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("event", EVENT, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("except", EXCEPT, RESERVED_KEYWORD, AS_LABEL)
-PG_KEYWORD("exclude", EXCLUDE, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("excluding", EXCLUDING, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("exclusive", EXCLUSIVE, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("execute", EXECUTE, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("exists", EXISTS, COL_NAME_KEYWORD, BARE_LABEL)
-PG_KEYWORD("explain", EXPLAIN, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("expression", EXPRESSION, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("extension", EXTENSION, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("external", EXTERNAL, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("extract", EXTRACT, COL_NAME_KEYWORD, BARE_LABEL)
-PG_KEYWORD("false", FALSE_P, RESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("family", FAMILY, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("fetch", FETCH, RESERVED_KEYWORD, AS_LABEL)
-PG_KEYWORD("filter", FILTER, UNRESERVED_KEYWORD, AS_LABEL)
-PG_KEYWORD("finalize", FINALIZE, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("first", FIRST_P, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("float", FLOAT_P, COL_NAME_KEYWORD, BARE_LABEL)
-PG_KEYWORD("following", FOLLOWING, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("for", FOR, RESERVED_KEYWORD, AS_LABEL)
-PG_KEYWORD("force", FORCE, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("foreign", FOREIGN, RESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("format", FORMAT, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("forward", FORWARD, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("freeze", FREEZE, TYPE_FUNC_NAME_KEYWORD, BARE_LABEL)
-PG_KEYWORD("from", FROM, RESERVED_KEYWORD, AS_LABEL)
-PG_KEYWORD("full", FULL, TYPE_FUNC_NAME_KEYWORD, BARE_LABEL)
-PG_KEYWORD("function", FUNCTION, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("functions", FUNCTIONS, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("generated", GENERATED, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("global", GLOBAL, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("grant", GRANT, RESERVED_KEYWORD, AS_LABEL)
-PG_KEYWORD("granted", GRANTED, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("greatest", GREATEST, COL_NAME_KEYWORD, BARE_LABEL)
-PG_KEYWORD("group", GROUP_P, RESERVED_KEYWORD, AS_LABEL)
-PG_KEYWORD("grouping", GROUPING, COL_NAME_KEYWORD, BARE_LABEL)
-PG_KEYWORD("groups", GROUPS, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("handler", HANDLER, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("having", HAVING, RESERVED_KEYWORD, AS_LABEL)
-PG_KEYWORD("header", HEADER_P, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("hold", HOLD, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("hour", HOUR_P, UNRESERVED_KEYWORD, AS_LABEL)
-PG_KEYWORD("identity", IDENTITY_P, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("if", IF_P, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("ilike", ILIKE, TYPE_FUNC_NAME_KEYWORD, BARE_LABEL)
-PG_KEYWORD("immediate", IMMEDIATE, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("immutable", IMMUTABLE, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("implicit", IMPLICIT_P, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("import", IMPORT_P, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("in", IN_P, RESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("include", INCLUDE, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("including", INCLUDING, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("increment", INCREMENT, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("indent", INDENT, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("index", INDEX, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("indexes", INDEXES, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("inherit", INHERIT, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("inherits", INHERITS, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("initially", INITIALLY, RESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("inline", INLINE_P, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("inner", INNER_P, TYPE_FUNC_NAME_KEYWORD, BARE_LABEL)
-PG_KEYWORD("inout", INOUT, COL_NAME_KEYWORD, BARE_LABEL)
-PG_KEYWORD("input", INPUT_P, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("insensitive", INSENSITIVE, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("insert", INSERT, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("instead", INSTEAD, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("int", INT_P, COL_NAME_KEYWORD, BARE_LABEL)
-PG_KEYWORD("integer", INTEGER, COL_NAME_KEYWORD, BARE_LABEL)
-PG_KEYWORD("intersect", INTERSECT, RESERVED_KEYWORD, AS_LABEL)
-PG_KEYWORD("interval", INTERVAL, COL_NAME_KEYWORD, BARE_LABEL)
-PG_KEYWORD("into", INTO, RESERVED_KEYWORD, AS_LABEL)
-PG_KEYWORD("invoker", INVOKER, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("is", IS, TYPE_FUNC_NAME_KEYWORD, BARE_LABEL)
-PG_KEYWORD("isnull", ISNULL, TYPE_FUNC_NAME_KEYWORD, AS_LABEL)
-PG_KEYWORD("isolation", ISOLATION, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("join", JOIN, TYPE_FUNC_NAME_KEYWORD, BARE_LABEL)
-PG_KEYWORD("json", JSON, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("json_array", JSON_ARRAY, COL_NAME_KEYWORD, BARE_LABEL)
-PG_KEYWORD("json_arrayagg", JSON_ARRAYAGG, COL_NAME_KEYWORD, BARE_LABEL)
-PG_KEYWORD("json_object", JSON_OBJECT, COL_NAME_KEYWORD, BARE_LABEL)
-PG_KEYWORD("json_objectagg", JSON_OBJECTAGG, COL_NAME_KEYWORD, BARE_LABEL)
-PG_KEYWORD("key", KEY, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("keys", KEYS, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("label", LABEL, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("language", LANGUAGE, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("large", LARGE_P, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("last", LAST_P, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("lateral", LATERAL_P, RESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("leading", LEADING, RESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("leakproof", LEAKPROOF, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("least", LEAST, COL_NAME_KEYWORD, BARE_LABEL)
-PG_KEYWORD("left", LEFT, TYPE_FUNC_NAME_KEYWORD, BARE_LABEL)
-PG_KEYWORD("level", LEVEL, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("like", LIKE, TYPE_FUNC_NAME_KEYWORD, BARE_LABEL)
-PG_KEYWORD("limit", LIMIT, RESERVED_KEYWORD, AS_LABEL)
-PG_KEYWORD("listen", LISTEN, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("load", LOAD, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("local", LOCAL, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("localtime", LOCALTIME, RESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("localtimestamp", LOCALTIMESTAMP, RESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("location", LOCATION, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("lock", LOCK_P, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("locked", LOCKED, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("logged", LOGGED, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("mapping", MAPPING, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("match", MATCH, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("matched", MATCHED, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("materialized", MATERIALIZED, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("maxvalue", MAXVALUE, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("merge", MERGE, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("method", METHOD, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("minute", MINUTE_P, UNRESERVED_KEYWORD, AS_LABEL)
-PG_KEYWORD("minvalue", MINVALUE, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("mode", MODE, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("month", MONTH_P, UNRESERVED_KEYWORD, AS_LABEL)
-PG_KEYWORD("move", MOVE, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("name", NAME_P, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("names", NAMES, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("national", NATIONAL, COL_NAME_KEYWORD, BARE_LABEL)
-PG_KEYWORD("natural", NATURAL, TYPE_FUNC_NAME_KEYWORD, BARE_LABEL)
-PG_KEYWORD("nchar", NCHAR, COL_NAME_KEYWORD, BARE_LABEL)
-PG_KEYWORD("new", NEW, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("next", NEXT, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("nfc", NFC, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("nfd", NFD, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("nfkc", NFKC, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("nfkd", NFKD, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("no", NO, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("none", NONE, COL_NAME_KEYWORD, BARE_LABEL)
-PG_KEYWORD("normalize", NORMALIZE, COL_NAME_KEYWORD, BARE_LABEL)
-PG_KEYWORD("normalized", NORMALIZED, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("not", NOT, RESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("nothing", NOTHING, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("notify", NOTIFY, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("notnull", NOTNULL, TYPE_FUNC_NAME_KEYWORD, AS_LABEL)
-PG_KEYWORD("nowait", NOWAIT, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("null", NULL_P, RESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("nullif", NULLIF, COL_NAME_KEYWORD, BARE_LABEL)
-PG_KEYWORD("nulls", NULLS_P, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("numeric", NUMERIC, COL_NAME_KEYWORD, BARE_LABEL)
-PG_KEYWORD("object", OBJECT_P, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("of", OF, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("off", OFF, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("offset", OFFSET, RESERVED_KEYWORD, AS_LABEL)
-PG_KEYWORD("oids", OIDS, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("old", OLD, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("on", ON, RESERVED_KEYWORD, AS_LABEL)
-PG_KEYWORD("only", ONLY, RESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("operator", OPERATOR, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("option", OPTION, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("options", OPTIONS, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("or", OR, RESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("order", ORDER, RESERVED_KEYWORD, AS_LABEL)
-PG_KEYWORD("ordinality", ORDINALITY, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("others", OTHERS, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("out", OUT_P, COL_NAME_KEYWORD, BARE_LABEL)
-PG_KEYWORD("outer", OUTER_P, TYPE_FUNC_NAME_KEYWORD, BARE_LABEL)
-PG_KEYWORD("over", OVER, UNRESERVED_KEYWORD, AS_LABEL)
-PG_KEYWORD("overlaps", OVERLAPS, TYPE_FUNC_NAME_KEYWORD, AS_LABEL)
-PG_KEYWORD("overlay", OVERLAY, COL_NAME_KEYWORD, BARE_LABEL)
-PG_KEYWORD("overriding", OVERRIDING, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("owned", OWNED, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("owner", OWNER, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("parallel", PARALLEL, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("parameter", PARAMETER, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("parser", PARSER, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("partial", PARTIAL, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("partition", PARTITION, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("passing", PASSING, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("password", PASSWORD, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("placing", PLACING, RESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("plans", PLANS, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("policy", POLICY, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("position", POSITION, COL_NAME_KEYWORD, BARE_LABEL)
-PG_KEYWORD("preceding", PRECEDING, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("precision", PRECISION, COL_NAME_KEYWORD, AS_LABEL)
-PG_KEYWORD("prepare", PREPARE, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("prepared", PREPARED, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("preserve", PRESERVE, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("primary", PRIMARY, RESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("prior", PRIOR, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("privileges", PRIVILEGES, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("procedural", PROCEDURAL, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("procedure", PROCEDURE, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("procedures", PROCEDURES, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("program", PROGRAM, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("publication", PUBLICATION, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("quote", QUOTE, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("range", RANGE, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("read", READ, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("real", REAL, COL_NAME_KEYWORD, BARE_LABEL)
-PG_KEYWORD("reassign", REASSIGN, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("recheck", RECHECK, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("recursive", RECURSIVE, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("ref", REF_P, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("references", REFERENCES, RESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("referencing", REFERENCING, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("refresh", REFRESH, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("reindex", REINDEX, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("relative", RELATIVE_P, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("release", RELEASE, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("rename", RENAME, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("repeatable", REPEATABLE, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("replace", REPLACE, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("replica", REPLICA, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("reset", RESET, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("restart", RESTART, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("restrict", RESTRICT, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("return", RETURN, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("returning", RETURNING, RESERVED_KEYWORD, AS_LABEL)
-PG_KEYWORD("returns", RETURNS, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("revoke", REVOKE, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("right", RIGHT, TYPE_FUNC_NAME_KEYWORD, BARE_LABEL)
-PG_KEYWORD("role", ROLE, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("rollback", ROLLBACK, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("rollup", ROLLUP, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("routine", ROUTINE, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("routines", ROUTINES, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("row", ROW, COL_NAME_KEYWORD, BARE_LABEL)
-PG_KEYWORD("rows", ROWS, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("rule", RULE, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("savepoint", SAVEPOINT, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("scalar", SCALAR, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("schema", SCHEMA, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("schemas", SCHEMAS, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("scroll", SCROLL, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("search", SEARCH, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("second", SECOND_P, UNRESERVED_KEYWORD, AS_LABEL)
-PG_KEYWORD("security", SECURITY, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("select", SELECT, RESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("sequence", SEQUENCE, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("sequences", SEQUENCES, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("serializable", SERIALIZABLE, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("server", SERVER, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("session", SESSION, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("session_user", SESSION_USER, RESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("set", SET, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("setof", SETOF, COL_NAME_KEYWORD, BARE_LABEL)
-PG_KEYWORD("sets", SETS, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("share", SHARE, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("show", SHOW, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("similar", SIMILAR, TYPE_FUNC_NAME_KEYWORD, BARE_LABEL)
-PG_KEYWORD("simple", SIMPLE, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("skip", SKIP, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("smallint", SMALLINT, COL_NAME_KEYWORD, BARE_LABEL)
-PG_KEYWORD("snapshot", SNAPSHOT, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("some", SOME, RESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("sql", SQL_P, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("stable", STABLE, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("standalone", STANDALONE_P, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("start", START, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("statement", STATEMENT, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("statistics", STATISTICS, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("stdin", STDIN, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("stdout", STDOUT, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("storage", STORAGE, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("stored", STORED, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("strict", STRICT_P, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("strip", STRIP_P, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("subscription", SUBSCRIPTION, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("substring", SUBSTRING, COL_NAME_KEYWORD, BARE_LABEL)
-PG_KEYWORD("support", SUPPORT, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("symmetric", SYMMETRIC, RESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("sysid", SYSID, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("system", SYSTEM_P, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("system_user", SYSTEM_USER, RESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("table", TABLE, RESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("tables", TABLES, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("tablesample", TABLESAMPLE, TYPE_FUNC_NAME_KEYWORD, BARE_LABEL)
-PG_KEYWORD("tablespace", TABLESPACE, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("temp", TEMP, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("template", TEMPLATE, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("temporary", TEMPORARY, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("text", TEXT_P, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("then", THEN, RESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("ties", TIES, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("time", TIME, COL_NAME_KEYWORD, BARE_LABEL)
-PG_KEYWORD("timestamp", TIMESTAMP, COL_NAME_KEYWORD, BARE_LABEL)
-PG_KEYWORD("to", TO, RESERVED_KEYWORD, AS_LABEL)
-PG_KEYWORD("trailing", TRAILING, RESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("transaction", TRANSACTION, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("transform", TRANSFORM, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("treat", TREAT, COL_NAME_KEYWORD, BARE_LABEL)
-PG_KEYWORD("trigger", TRIGGER, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("trim", TRIM, COL_NAME_KEYWORD, BARE_LABEL)
-PG_KEYWORD("true", TRUE_P, RESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("truncate", TRUNCATE, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("trusted", TRUSTED, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("type", TYPE_P, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("types", TYPES_P, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("uescape", UESCAPE, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("unbounded", UNBOUNDED, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("uncommitted", UNCOMMITTED, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("unencrypted", UNENCRYPTED, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("union", UNION, RESERVED_KEYWORD, AS_LABEL)
-PG_KEYWORD("unique", UNIQUE, RESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("unknown", UNKNOWN, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("unlisten", UNLISTEN, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("unlogged", UNLOGGED, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("until", UNTIL, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("update", UPDATE, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("user", USER, RESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("using", USING, RESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("vacuum", VACUUM, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("valid", VALID, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("validate", VALIDATE, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("validator", VALIDATOR, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("value", VALUE_P, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("values", VALUES, COL_NAME_KEYWORD, BARE_LABEL)
-PG_KEYWORD("varchar", VARCHAR, COL_NAME_KEYWORD, BARE_LABEL)
-PG_KEYWORD("variadic", VARIADIC, RESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("varying", VARYING, UNRESERVED_KEYWORD, AS_LABEL)
-PG_KEYWORD("verbose", VERBOSE, TYPE_FUNC_NAME_KEYWORD, BARE_LABEL)
-PG_KEYWORD("version", VERSION_P, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("view", VIEW, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("views", VIEWS, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("volatile", VOLATILE, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("when", WHEN, RESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("where", WHERE, RESERVED_KEYWORD, AS_LABEL)
-PG_KEYWORD("whitespace", WHITESPACE_P, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("window", WINDOW, RESERVED_KEYWORD, AS_LABEL)
-PG_KEYWORD("with", WITH, RESERVED_KEYWORD, AS_LABEL)
-PG_KEYWORD("within", WITHIN, UNRESERVED_KEYWORD, AS_LABEL)
-PG_KEYWORD("without", WITHOUT, UNRESERVED_KEYWORD, AS_LABEL)
-PG_KEYWORD("work", WORK, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("wrapper", WRAPPER, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("write", WRITE, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("xml", XML_P, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("xmlattributes", XMLATTRIBUTES, COL_NAME_KEYWORD, BARE_LABEL)
-PG_KEYWORD("xmlconcat", XMLCONCAT, COL_NAME_KEYWORD, BARE_LABEL)
-PG_KEYWORD("xmlelement", XMLELEMENT, COL_NAME_KEYWORD, BARE_LABEL)
-PG_KEYWORD("xmlexists", XMLEXISTS, COL_NAME_KEYWORD, BARE_LABEL)
-PG_KEYWORD("xmlforest", XMLFOREST, COL_NAME_KEYWORD, BARE_LABEL)
-PG_KEYWORD("xmlnamespaces", XMLNAMESPACES, COL_NAME_KEYWORD, BARE_LABEL)
-PG_KEYWORD("xmlparse", XMLPARSE, COL_NAME_KEYWORD, BARE_LABEL)
-PG_KEYWORD("xmlpi", XMLPI, COL_NAME_KEYWORD, BARE_LABEL)
-PG_KEYWORD("xmlroot", XMLROOT, COL_NAME_KEYWORD, BARE_LABEL)
-PG_KEYWORD("xmlserialize", XMLSERIALIZE, COL_NAME_KEYWORD, BARE_LABEL)
-PG_KEYWORD("xmltable", XMLTABLE, COL_NAME_KEYWORD, BARE_LABEL)
-PG_KEYWORD("year", YEAR_P, UNRESERVED_KEYWORD, AS_LABEL)
-PG_KEYWORD("yes", YES_P, UNRESERVED_KEYWORD, BARE_LABEL)
-PG_KEYWORD("zone", ZONE, UNRESERVED_KEYWORD, BARE_LABEL)
diff --git a/contrib/libs/libpq/src/include/pg_config-linux-aarch64.h b/contrib/libs/libpq/src/include/pg_config-linux-aarch64.h
deleted file mode 100644
index f27c40f1d7..0000000000
--- a/contrib/libs/libpq/src/include/pg_config-linux-aarch64.h
+++ /dev/null
@@ -1,6 +0,0 @@
-#pragma once
-
-#include "pg_config-linux.h"
-
-/* Define to 1 if you have __get_cpuid. */
-#undef HAVE__GET_CPUID
diff --git a/contrib/libs/libpq/src/include/pg_config-linux.h b/contrib/libs/libpq/src/include/pg_config-linux.h
deleted file mode 100644
index b4592fa70a..0000000000
--- a/contrib/libs/libpq/src/include/pg_config-linux.h
+++ /dev/null
@@ -1,825 +0,0 @@
-/* src/include/pg_config.h.  Generated from pg_config.h.in by configure.  */
-/* src/include/pg_config.h.in.  Generated from configure.ac by autoheader.  */
-
-/* Define if building universal (internal helper macro) */
-/* #undef AC_APPLE_UNIVERSAL_BUILD */
-
-/* The normal alignment of `double', in bytes. */
-#define ALIGNOF_DOUBLE 8
-
-/* The normal alignment of `int', in bytes. */
-#define ALIGNOF_INT 4
-
-/* The normal alignment of `long', in bytes. */
-#define ALIGNOF_LONG 8
-
-/* The normal alignment of `long long int', in bytes. */
-/* #undef ALIGNOF_LONG_LONG_INT */
-
-/* The normal alignment of `PG_INT128_TYPE', in bytes. */
-#define ALIGNOF_PG_INT128_TYPE 16
-
-/* The normal alignment of `short', in bytes. */
-#define ALIGNOF_SHORT 2
-
-/* Size of a disk block --- this also limits the size of a tuple. You can set
-   it bigger if you need bigger tuples (although TOAST should reduce the need
-   to have large tuples, since fields can be spread across multiple tuples).
-   BLCKSZ must be a power of 2. The maximum possible value of BLCKSZ is
-   currently 2^15 (32768). This is determined by the 15-bit widths of the
-   lp_off and lp_len fields in ItemIdData (see include/storage/itemid.h).
-   Changing BLCKSZ requires an initdb. */
-#define BLCKSZ 8192
-
-/* Saved arguments from configure */
-#define CONFIGURE_ARGS " '--prefix=/var/empty/postgresql-16.2' '--with-openssl' '--with-libxml' '--with-icu' '--sysconfdir=/etc' '--libdir=$(lib)/lib' '--with-system-tzdata=/var/empty/tzdata-2022f/share/zoneinfo' '--enable-debug' '--with-systemd' '--with-ossp-uuid' '--with-lz4' '--with-gssapi' '--without-gssapi' 'CC=cc' 'CXX=g++' 'PKG_CONFIG=pkg-config' 'PKG_CONFIG_PATH=/var/empty/libxcrypt-4.4.30/lib/pkgconfig:/var/empty/zlib-1.2.13-dev/lib/pkgconfig:/var/empty/ncurses-6.3-p20220507-dev/lib/pkgconfig:/var/empty/openssl-3.0.7-dev/lib/pkgconfig:/var/empty/libxml2-2.10.3-dev/lib/pkgconfig:/var/empty/icu4c-72.1-dev/lib/pkgconfig:/var/empty/lz4-1.9.4-dev/lib/pkgconfig:/var/empty/systemd-251.7-dev/lib/pkgconfig:/var/empty/systemd-251.7-dev/share/pkgconfig:/var/empty/libkrb5-1.20-dev/lib/pkgconfig:/var/empty/libossp-uuid-1.6.2/lib/pkgconfig'"
-
-/* Define to the default TCP port number on which the server listens and to
-   which clients will try to connect. This can be overridden at run-time, but
-   it's convenient if your clients have the right default compiled in.
-   (--with-pgport=PORTNUM) */
-#define DEF_PGPORT 5432
-
-/* Define to the default TCP port number as a string constant. */
-#define DEF_PGPORT_STR "5432"
-
-/* Define to the file name extension of dynamically-loadable modules. */
-#define DLSUFFIX ".so"
-
-/* Define to build with GSSAPI support. (--with-gssapi) */
-/* #undef ENABLE_GSS */
-
-/* Define to 1 if you want National Language Support. (--enable-nls) */
-/* #undef ENABLE_NLS */
-
-/* Define to 1 to build client libraries as thread-safe code.
-   (--enable-thread-safety) */
-#define ENABLE_THREAD_SAFETY 1
-
-/* Define to 1 if you have the `append_history' function. */
-#define HAVE_APPEND_HISTORY 1
-
-/* Define to 1 if you have the `ASN1_STRING_get0_data' function. */
-#define HAVE_ASN1_STRING_GET0_DATA 1
-
-/* Define to 1 if you want to use atomics if available. */
-#define HAVE_ATOMICS 1
-
-/* Define to 1 if you have the <atomic.h> header file. */
-/* #undef HAVE_ATOMIC_H */
-
-/* Define to 1 if you have the `backtrace_symbols' function. */
-#define HAVE_BACKTRACE_SYMBOLS 1
-
-/* Define to 1 if you have the `BIO_meth_new' function. */
-#define HAVE_BIO_METH_NEW 1
-
-/* Define to 1 if your compiler handles computed gotos. */
-#define HAVE_COMPUTED_GOTO 1
-
-/* Define to 1 if you have the `copyfile' function. */
-/* #undef HAVE_COPYFILE */
-
-/* Define to 1 if you have the <copyfile.h> header file. */
-/* #undef HAVE_COPYFILE_H */
-
-/* Define to 1 if you have the <crtdefs.h> header file. */
-/* #undef HAVE_CRTDEFS_H */
-
-/* Define to 1 if you have the `CRYPTO_lock' function. */
-/* #undef HAVE_CRYPTO_LOCK */
-
-/* Define to 1 if you have the declaration of `fdatasync', and to 0 if you
-   don't. */
-#define HAVE_DECL_FDATASYNC 1
-
-/* Define to 1 if you have the declaration of `F_FULLFSYNC', and to 0 if you
-   don't. */
-#define HAVE_DECL_F_FULLFSYNC 0
-
-/* Define to 1 if you have the declaration of
-   `LLVMCreateGDBRegistrationListener', and to 0 if you don't. */
-/* #undef HAVE_DECL_LLVMCREATEGDBREGISTRATIONLISTENER */
-
-/* Define to 1 if you have the declaration of
-   `LLVMCreatePerfJITEventListener', and to 0 if you don't. */
-/* #undef HAVE_DECL_LLVMCREATEPERFJITEVENTLISTENER */
-
-/* Define to 1 if you have the declaration of `LLVMGetHostCPUFeatures', and to
-   0 if you don't. */
-/* #undef HAVE_DECL_LLVMGETHOSTCPUFEATURES */
-
-/* Define to 1 if you have the declaration of `LLVMGetHostCPUName', and to 0
-   if you don't. */
-/* #undef HAVE_DECL_LLVMGETHOSTCPUNAME */
-
-/* Define to 1 if you have the declaration of `LLVMOrcGetSymbolAddressIn', and
-   to 0 if you don't. */
-/* #undef HAVE_DECL_LLVMORCGETSYMBOLADDRESSIN */
-
-/* Define to 1 if you have the declaration of `posix_fadvise', and to 0 if you
-   don't. */
-#define HAVE_DECL_POSIX_FADVISE 1
-
-/* Define to 1 if you have the declaration of `preadv', and to 0 if you don't.
-   */
-#define HAVE_DECL_PREADV 1
-
-/* Define to 1 if you have the declaration of `pwritev', and to 0 if you
-   don't. */
-#define HAVE_DECL_PWRITEV 1
-
-/* Define to 1 if you have the declaration of `strlcat', and to 0 if you
-   don't. */
-#define HAVE_DECL_STRLCAT 0
-
-/* Define to 1 if you have the declaration of `strlcpy', and to 0 if you
-   don't. */
-#define HAVE_DECL_STRLCPY 0
-
-/* Define to 1 if you have the declaration of `strnlen', and to 0 if you
-   don't. */
-#define HAVE_DECL_STRNLEN 1
-
-/* Define to 1 if you have the <editline/history.h> header file. */
-/* #undef HAVE_EDITLINE_HISTORY_H */
-
-/* Define to 1 if you have the <editline/readline.h> header file. */
-/* #undef HAVE_EDITLINE_READLINE_H */
-
-/* Define to 1 if you have the <execinfo.h> header file. */
-#define HAVE_EXECINFO_H 1
-
-/* Define to 1 if you have the `explicit_bzero' function. */
-#define HAVE_EXPLICIT_BZERO 1
-
-/* Define to 1 if fseeko (and presumably ftello) exists and is declared. */
-#define HAVE_FSEEKO 1
-
-/* Define to 1 if you have __atomic_compare_exchange_n(int *, int *, int). */
-#define HAVE_GCC__ATOMIC_INT32_CAS 1
-
-/* Define to 1 if you have __atomic_compare_exchange_n(int64 *, int64 *,
-   int64). */
-#define HAVE_GCC__ATOMIC_INT64_CAS 1
-
-/* Define to 1 if you have __sync_lock_test_and_set(char *) and friends. */
-#define HAVE_GCC__SYNC_CHAR_TAS 1
-
-/* Define to 1 if you have __sync_val_compare_and_swap(int *, int, int). */
-#define HAVE_GCC__SYNC_INT32_CAS 1
-
-/* Define to 1 if you have __sync_lock_test_and_set(int *) and friends. */
-#define HAVE_GCC__SYNC_INT32_TAS 1
-
-/* Define to 1 if you have __sync_val_compare_and_swap(int64 *, int64, int64).
-   */
-#define HAVE_GCC__SYNC_INT64_CAS 1
-
-/* Define to 1 if you have the `getifaddrs' function. */
-#define HAVE_GETIFADDRS 1
-
-/* Define to 1 if you have the `getopt' function. */
-#define HAVE_GETOPT 1
-
-/* Define to 1 if you have the <getopt.h> header file. */
-#define HAVE_GETOPT_H 1
-
-/* Define to 1 if you have the `getopt_long' function. */
-#define HAVE_GETOPT_LONG 1
-
-/* Define to 1 if you have the `getpeereid' function. */
-/* #undef HAVE_GETPEEREID */
-
-/* Define to 1 if you have the `getpeerucred' function. */
-/* #undef HAVE_GETPEERUCRED */
-
-/* Define to 1 if you have the <gssapi_ext.h> header file. */
-/* #undef HAVE_GSSAPI_EXT_H */
-
-/* Define to 1 if you have the <gssapi/gssapi_ext.h> header file. */
-/* #undef HAVE_GSSAPI_GSSAPI_EXT_H */
-
-/* Define to 1 if you have the <gssapi/gssapi.h> header file. */
-/* #undef HAVE_GSSAPI_GSSAPI_H */
-
-/* Define to 1 if you have the <gssapi.h> header file. */
-/* #undef HAVE_GSSAPI_H */
-
-/* Define to 1 if you have the <history.h> header file. */
-/* #undef HAVE_HISTORY_H */
-
-/* Define to 1 if you have the `history_truncate_file' function. */
-#define HAVE_HISTORY_TRUNCATE_FILE 1
-
-/* Define to 1 if you have the `HMAC_CTX_free' function. */
-#define HAVE_HMAC_CTX_FREE 1
-
-/* Define to 1 if you have the `HMAC_CTX_new' function. */
-#define HAVE_HMAC_CTX_NEW 1
-
-/* Define to 1 if you have the <ifaddrs.h> header file. */
-#define HAVE_IFADDRS_H 1
-
-/* Define to 1 if you have the `inet_aton' function. */
-#define HAVE_INET_ATON 1
-
-/* Define to 1 if you have the `inet_pton' function. */
-#define HAVE_INET_PTON 1
-
-/* Define to 1 if the system has the type `int64'. */
-/* #undef HAVE_INT64 */
-
-/* Define to 1 if the system has the type `int8'. */
-/* #undef HAVE_INT8 */
-
-/* Define to 1 if you have the <inttypes.h> header file. */
-#define HAVE_INTTYPES_H 1
-
-/* Define to 1 if you have the global variable 'int opterr'. */
-#define HAVE_INT_OPTERR 1
-
-/* Define to 1 if you have the global variable 'int optreset'. */
-/* #undef HAVE_INT_OPTRESET */
-
-/* Define to 1 if you have the global variable 'int timezone'. */
-#define HAVE_INT_TIMEZONE 1
-
-/* Define to 1 if __builtin_constant_p(x) implies "i"(x) acceptance. */
-/* #undef HAVE_I_CONSTRAINT__BUILTIN_CONSTANT_P */
-
-/* Define to 1 if you have the `kqueue' function. */
-/* #undef HAVE_KQUEUE */
-
-/* Define to 1 if you have the <langinfo.h> header file. */
-#define HAVE_LANGINFO_H 1
-
-/* Define to 1 if you have the `ldap_initialize' function. */
-/* #undef HAVE_LDAP_INITIALIZE */
-
-/* Define to 1 if you have the `crypto' library (-lcrypto). */
-#define HAVE_LIBCRYPTO 1
-
-/* Define to 1 if you have the `ldap' library (-lldap). */
-/* #undef HAVE_LIBLDAP */
-
-/* Define to 1 if you have the `lz4' library (-llz4). */
-#define HAVE_LIBLZ4 1
-
-/* Define to 1 if you have the `m' library (-lm). */
-#define HAVE_LIBM 1
-
-/* Define to 1 if you have the `pam' library (-lpam). */
-/* #undef HAVE_LIBPAM */
-
-/* Define if you have a function readline library */
-#define HAVE_LIBREADLINE 1
-
-/* Define to 1 if you have the `selinux' library (-lselinux). */
-/* #undef HAVE_LIBSELINUX */
-
-/* Define to 1 if you have the `ssl' library (-lssl). */
-#define HAVE_LIBSSL 1
-
-/* Define to 1 if you have the `wldap32' library (-lwldap32). */
-/* #undef HAVE_LIBWLDAP32 */
-
-/* Define to 1 if you have the `xml2' library (-lxml2). */
-#define HAVE_LIBXML2 1
-
-/* Define to 1 if you have the `xslt' library (-lxslt). */
-/* #undef HAVE_LIBXSLT */
-
-/* Define to 1 if you have the `z' library (-lz). */
-#define HAVE_LIBZ 1
-
-/* Define to 1 if you have the `zstd' library (-lzstd). */
-/* #undef HAVE_LIBZSTD */
-
-/* Define to 1 if the system has the type `locale_t'. */
-#define HAVE_LOCALE_T 1
-
-/* Define to 1 if `long int' works and is 64 bits. */
-#define HAVE_LONG_INT_64 1
-
-/* Define to 1 if `long long int' works and is 64 bits. */
-/* #undef HAVE_LONG_LONG_INT_64 */
-
-/* Define to 1 if you have the <mbarrier.h> header file. */
-/* #undef HAVE_MBARRIER_H */
-
-/* Define to 1 if you have the `mbstowcs_l' function. */
-/* #undef HAVE_MBSTOWCS_L */
-
-/* Define to 1 if you have the <memory.h> header file. */
-#define HAVE_MEMORY_H 1
-
-/* Define to 1 if you have the `memset_s' function. */
-/* #undef HAVE_MEMSET_S */
-
-/* Define to 1 if you have the `mkdtemp' function. */
-#define HAVE_MKDTEMP 1
-
-/* Define to 1 if you have the `OPENSSL_init_ssl' function. */
-#define HAVE_OPENSSL_INIT_SSL 1
-
-/* Define to 1 if you have the <ossp/uuid.h> header file. */
-/* #undef HAVE_OSSP_UUID_H */
-
-/* Define to 1 if you have the <pam/pam_appl.h> header file. */
-/* #undef HAVE_PAM_PAM_APPL_H */
-
-/* Define to 1 if you have the `posix_fadvise' function. */
-#define HAVE_POSIX_FADVISE 1
-
-/* Define to 1 if you have the `posix_fallocate' function. */
-#define HAVE_POSIX_FALLOCATE 1
-
-/* Define to 1 if you have the `ppoll' function. */
-#define HAVE_PPOLL 1
-
-/* Define if you have POSIX threads libraries and header files. */
-#define HAVE_PTHREAD 1
-
-/* Define to 1 if you have the `pthread_barrier_wait' function. */
-#define HAVE_PTHREAD_BARRIER_WAIT 1
-
-/* Define to 1 if you have the `pthread_is_threaded_np' function. */
-/* #undef HAVE_PTHREAD_IS_THREADED_NP */
-
-/* Have PTHREAD_PRIO_INHERIT. */
-#define HAVE_PTHREAD_PRIO_INHERIT 1
-
-/* Define to 1 if you have the <readline.h> header file. */
-/* #undef HAVE_READLINE_H */
-
-/* Define to 1 if you have the <readline/history.h> header file. */
-#define HAVE_READLINE_HISTORY_H 1
-
-/* Define to 1 if you have the <readline/readline.h> header file. */
-#define HAVE_READLINE_READLINE_H 1
-
-/* Define to 1 if you have the `rl_completion_matches' function. */
-#define HAVE_RL_COMPLETION_MATCHES 1
-
-/* Define to 1 if you have the global variable 'rl_completion_suppress_quote'.
-   */
-#define HAVE_RL_COMPLETION_SUPPRESS_QUOTE 1
-
-/* Define to 1 if you have the `rl_filename_completion_function' function. */
-#define HAVE_RL_FILENAME_COMPLETION_FUNCTION 1
-
-/* Define to 1 if you have the global variable 'rl_filename_quote_characters'.
-   */
-#define HAVE_RL_FILENAME_QUOTE_CHARACTERS 1
-
-/* Define to 1 if you have the global variable 'rl_filename_quoting_function'.
-   */
-#define HAVE_RL_FILENAME_QUOTING_FUNCTION 1
-
-/* Define to 1 if you have the `rl_reset_screen_size' function. */
-#define HAVE_RL_RESET_SCREEN_SIZE 1
-
-/* Define to 1 if you have the `rl_variable_bind' function. */
-#define HAVE_RL_VARIABLE_BIND 1
-
-/* Define to 1 if you have the <security/pam_appl.h> header file. */
-/* #undef HAVE_SECURITY_PAM_APPL_H */
-
-/* Define to 1 if you have the `setproctitle' function. */
-/* #undef HAVE_SETPROCTITLE */
-
-/* Define to 1 if you have the `setproctitle_fast' function. */
-/* #undef HAVE_SETPROCTITLE_FAST */
-
-/* Define to 1 if the system has the type `socklen_t'. */
-#define HAVE_SOCKLEN_T 1
-
-/* Define to 1 if you have spinlocks. */
-#define HAVE_SPINLOCKS 1
-
-/* Define to 1 if you have the `SSL_CTX_set_cert_cb' function. */
-#define HAVE_SSL_CTX_SET_CERT_CB 1
-
-/* Define to 1 if stdbool.h conforms to C99. */
-#define HAVE_STDBOOL_H 1
-
-/* Define to 1 if you have the <stdint.h> header file. */
-#define HAVE_STDINT_H 1
-
-/* Define to 1 if you have the <stdlib.h> header file. */
-#define HAVE_STDLIB_H 1
-
-/* Define to 1 if you have the `strchrnul' function. */
-#define HAVE_STRCHRNUL 1
-
-/* Define to 1 if you have the `strerror_r' function. */
-#define HAVE_STRERROR_R 1
-
-/* Define to 1 if you have the <strings.h> header file. */
-#define HAVE_STRINGS_H 1
-
-/* Define to 1 if you have the <string.h> header file. */
-#define HAVE_STRING_H 1
-
-/* Define to 1 if you have the `strlcat' function. */
-/* #undef HAVE_STRLCAT */
-
-/* Define to 1 if you have the `strlcpy' function. */
-/* #undef HAVE_STRLCPY */
-
-/* Define to 1 if you have the `strnlen' function. */
-#define HAVE_STRNLEN 1
-
-/* Define to 1 if you have the `strsignal' function. */
-#define HAVE_STRSIGNAL 1
-
-/* Define to 1 if the system has the type `struct option'. */
-#define HAVE_STRUCT_OPTION 1
-
-/* Define to 1 if `sa_len' is a member of `struct sockaddr'. */
-/* #undef HAVE_STRUCT_SOCKADDR_SA_LEN */
-
-/* Define to 1 if `tm_zone' is a member of `struct tm'. */
-#define HAVE_STRUCT_TM_TM_ZONE 1
-
-/* Define to 1 if you have the `syncfs' function. */
-#define HAVE_SYNCFS 1
-
-/* Define to 1 if you have the `sync_file_range' function. */
-#define HAVE_SYNC_FILE_RANGE 1
-
-/* Define to 1 if you have the syslog interface. */
-#define HAVE_SYSLOG 1
-
-/* Define to 1 if you have the <sys/epoll.h> header file. */
-#define HAVE_SYS_EPOLL_H 1
-
-/* Define to 1 if you have the <sys/event.h> header file. */
-/* #undef HAVE_SYS_EVENT_H */
-
-/* Define to 1 if you have the <sys/personality.h> header file. */
-#define HAVE_SYS_PERSONALITY_H 1
-
-/* Define to 1 if you have the <sys/prctl.h> header file. */
-#define HAVE_SYS_PRCTL_H 1
-
-/* Define to 1 if you have the <sys/procctl.h> header file. */
-/* #undef HAVE_SYS_PROCCTL_H */
-
-/* Define to 1 if you have the <sys/signalfd.h> header file. */
-#define HAVE_SYS_SIGNALFD_H 1
-
-/* Define to 1 if you have the <sys/stat.h> header file. */
-#define HAVE_SYS_STAT_H 1
-
-/* Define to 1 if you have the <sys/types.h> header file. */
-#define HAVE_SYS_TYPES_H 1
-
-/* Define to 1 if you have the <sys/ucred.h> header file. */
-/* #undef HAVE_SYS_UCRED_H */
-
-/* Define to 1 if you have the <termios.h> header file. */
-#define HAVE_TERMIOS_H 1
-
-/* Define to 1 if your compiler understands `typeof' or something similar. */
-#define HAVE_TYPEOF 1
-
-/* Define to 1 if you have the <ucred.h> header file. */
-/* #undef HAVE_UCRED_H */
-
-/* Define to 1 if the system has the type `uint64'. */
-/* #undef HAVE_UINT64 */
-
-/* Define to 1 if the system has the type `uint8'. */
-/* #undef HAVE_UINT8 */
-
-/* Define to 1 if the system has the type `union semun'. */
-/* #undef HAVE_UNION_SEMUN */
-
-/* Define to 1 if you have the <unistd.h> header file. */
-#define HAVE_UNISTD_H 1
-
-/* Define to 1 if you have the `uselocale' function. */
-#define HAVE_USELOCALE 1
-
-/* Define to 1 if you have BSD UUID support. */
-/* #undef HAVE_UUID_BSD */
-
-/* Define to 1 if you have E2FS UUID support. */
-/* #undef HAVE_UUID_E2FS */
-
-/* Define to 1 if you have the <uuid.h> header file. */
-#define HAVE_UUID_H 1
-
-/* Define to 1 if you have OSSP UUID support. */
-#define HAVE_UUID_OSSP 1
-
-/* Define to 1 if you have the <uuid/uuid.h> header file. */
-/* #undef HAVE_UUID_UUID_H */
-
-/* Define to 1 if your compiler knows the visibility("hidden") attribute. */
-#define HAVE_VISIBILITY_ATTRIBUTE 1
-
-/* Define to 1 if you have the `wcstombs_l' function. */
-/* #undef HAVE_WCSTOMBS_L */
-
-/* Define to 1 if you have the `X509_get_signature_info' function. */
-#define HAVE_X509_GET_SIGNATURE_INFO 1
-
-/* Define to 1 if you have the `X509_get_signature_nid' function. */
-#define HAVE_X509_GET_SIGNATURE_NID 1
-
-/* Define to 1 if the assembler supports X86_64's POPCNTQ instruction. */
-#define HAVE_X86_64_POPCNTQ 1
-
-/* Define to 1 if the system has the type `_Bool'. */
-#define HAVE__BOOL 1
-
-/* Define to 1 if your compiler understands __builtin_bswap16. */
-#define HAVE__BUILTIN_BSWAP16 1
-
-/* Define to 1 if your compiler understands __builtin_bswap32. */
-#define HAVE__BUILTIN_BSWAP32 1
-
-/* Define to 1 if your compiler understands __builtin_bswap64. */
-#define HAVE__BUILTIN_BSWAP64 1
-
-/* Define to 1 if your compiler understands __builtin_clz. */
-#define HAVE__BUILTIN_CLZ 1
-
-/* Define to 1 if your compiler understands __builtin_constant_p. */
-#define HAVE__BUILTIN_CONSTANT_P 1
-
-/* Define to 1 if your compiler understands __builtin_ctz. */
-#define HAVE__BUILTIN_CTZ 1
-
-/* Define to 1 if your compiler understands __builtin_frame_address. */
-#define HAVE__BUILTIN_FRAME_ADDRESS 1
-
-/* Define to 1 if your compiler understands __builtin_$op_overflow. */
-#define HAVE__BUILTIN_OP_OVERFLOW 1
-
-/* Define to 1 if your compiler understands __builtin_popcount. */
-#define HAVE__BUILTIN_POPCOUNT 1
-
-/* Define to 1 if your compiler understands __builtin_types_compatible_p. */
-#define HAVE__BUILTIN_TYPES_COMPATIBLE_P 1
-
-/* Define to 1 if your compiler understands __builtin_unreachable. */
-#define HAVE__BUILTIN_UNREACHABLE 1
-
-/* Define to 1 if you have the `_configthreadlocale' function. */
-/* #undef HAVE__CONFIGTHREADLOCALE */
-
-/* Define to 1 if you have __cpuid. */
-/* #undef HAVE__CPUID */
-
-/* Define to 1 if you have __get_cpuid. */
-#define HAVE__GET_CPUID 1
-
-/* Define to 1 if your compiler understands _Static_assert. */
-#define HAVE__STATIC_ASSERT 1
-
-/* Define to the appropriate printf length modifier for 64-bit ints. */
-#define INT64_MODIFIER "l"
-
-/* Define to 1 if `locale_t' requires <xlocale.h>. */
-/* #undef LOCALE_T_IN_XLOCALE */
-
-/* Define as the maximum alignment requirement of any C data type. */
-#define MAXIMUM_ALIGNOF 8
-
-/* Define bytes to use libc memset(). */
-#define MEMSET_LOOP_LIMIT 1024
-
-/* Define to the OpenSSL API version in use. This avoids deprecation warnings
-   from newer OpenSSL versions. */
-/* #define OPENSSL_API_COMPAT 0x10001000L */
-
-/* Define to the address where bug reports for this package should be sent. */
-#define PACKAGE_BUGREPORT "pgsql-bugs@lists.postgresql.org"
-
-/* Define to the full name of this package. */
-#define PACKAGE_NAME "PostgreSQL"
-
-/* Define to the full name and version of this package. */
-#define PACKAGE_STRING "PostgreSQL 16.2"
-
-/* Define to the one symbol short name of this package. */
-#define PACKAGE_TARNAME "postgresql"
-
-/* Define to the home page for this package. */
-#define PACKAGE_URL "https://www.postgresql.org/"
-
-/* Define to the version of this package. */
-#define PACKAGE_VERSION "16.2"
-
-/* Define to the name of a signed 128-bit integer type. */
-#define PG_INT128_TYPE __int128
-
-/* Define to the name of a signed 64-bit integer type. */
-#define PG_INT64_TYPE long int
-
-/* Define to the name of the default PostgreSQL service principal in Kerberos
-   (GSSAPI). (--with-krb-srvnam=NAME) */
-#define PG_KRB_SRVNAM "postgres"
-
-/* PostgreSQL major version as a string */
-#define PG_MAJORVERSION "16"
-
-/* PostgreSQL major version number */
-#define PG_MAJORVERSION_NUM 16
-
-/* PostgreSQL minor version number */
-#define PG_MINORVERSION_NUM 2
-
-/* Define to best printf format archetype, usually gnu_printf if available. */
-#define PG_PRINTF_ATTRIBUTE gnu_printf
-
-/* Define to 1 to use <stdbool.h> to define type bool. */
-#define PG_USE_STDBOOL 1
-
-/* PostgreSQL version as a string */
-#define PG_VERSION "16.2"
-
-/* PostgreSQL version as a number */
-#define PG_VERSION_NUM 160002
-
-/* A string containing the version number, platform, and C compiler */
-#define PG_VERSION_STR "PostgreSQL 16.2 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 11.3.0, 64-bit"
-
-/* Define to 1 to allow profiling output to be saved separately for each
-   process. */
-/* #undef PROFILE_PID_DIR */
-
-/* Define to necessary symbol if this constant uses a non-standard name on
-   your system. */
-/* #undef PTHREAD_CREATE_JOINABLE */
-
-/* RELSEG_SIZE is the maximum number of blocks allowed in one disk file. Thus,
-   the maximum size of a single file is RELSEG_SIZE * BLCKSZ; relations bigger
-   than that are divided into multiple files. RELSEG_SIZE * BLCKSZ must be
-   less than your OS' limit on file size. This is often 2 GB or 4GB in a
-   32-bit operating system, unless you have large file support enabled. By
-   default, we make the limit 1 GB to avoid any possible integer-overflow
-   problems within the OS. A limit smaller than necessary only means we divide
-   a large relation into more chunks than necessary, so it seems best to err
-   in the direction of a small limit. A power-of-2 value is recommended to
-   save a few cycles in md.c, but is not absolutely required. Changing
-   RELSEG_SIZE requires an initdb. */
-#define RELSEG_SIZE 131072
-
-/* The size of `bool', as computed by sizeof. */
-#define SIZEOF_BOOL 1
-
-/* The size of `long', as computed by sizeof. */
-#define SIZEOF_LONG 8
-
-/* The size of `off_t', as computed by sizeof. */
-#define SIZEOF_OFF_T 8
-
-/* The size of `size_t', as computed by sizeof. */
-#define SIZEOF_SIZE_T 8
-
-/* The size of `void *', as computed by sizeof. */
-#define SIZEOF_VOID_P 8
-
-/* Define to 1 if you have the ANSI C header files. */
-#define STDC_HEADERS 1
-
-/* Define to 1 if strerror_r() returns int. */
-/* #undef STRERROR_R_INT */
-
-/* Define to 1 to use ARMv8 CRC Extension. */
-/* #undef USE_ARMV8_CRC32C */
-
-/* Define to 1 to use ARMv8 CRC Extension with a runtime check. */
-/* #undef USE_ARMV8_CRC32C_WITH_RUNTIME_CHECK */
-
-/* Define to 1 to build with assertion checks. (--enable-cassert) */
-/* #undef USE_ASSERT_CHECKING */
-
-/* Define to 1 to build with Bonjour support. (--with-bonjour) */
-/* #undef USE_BONJOUR */
-
-/* Define to 1 to build with BSD Authentication support. (--with-bsd-auth) */
-/* #undef USE_BSD_AUTH */
-
-/* Define to build with ICU support. (--with-icu) */
-#define USE_ICU 1
-
-/* Define to 1 to build with LDAP support. (--with-ldap) */
-/* #undef USE_LDAP */
-
-/* Define to 1 to build with XML support. (--with-libxml) */
-#define USE_LIBXML 1
-
-/* Define to 1 to use XSLT support when building contrib/xml2.
-   (--with-libxslt) */
-/* #undef USE_LIBXSLT */
-
-/* Define to 1 to build with LLVM based JIT support. (--with-llvm) */
-/* #undef USE_LLVM */
-
-/* Define to 1 to build with LZ4 support. (--with-lz4) */
-#define USE_LZ4 1
-
-/* Define to select named POSIX semaphores. */
-/* #undef USE_NAMED_POSIX_SEMAPHORES */
-
-/* Define to 1 to build with OpenSSL support. (--with-ssl=openssl) */
-#define USE_OPENSSL 1
-
-/* Define to 1 to build with PAM support. (--with-pam) */
-/* #undef USE_PAM */
-
-/* Define to 1 to use software CRC-32C implementation (slicing-by-8). */
-/* #undef USE_SLICING_BY_8_CRC32C */
-
-/* Define to 1 use Intel SSE 4.2 CRC instructions. */
-/* #undef USE_SSE42_CRC32C */
-
-/* Define to 1 to use Intel SSE 4.2 CRC instructions with a runtime check. */
-#define USE_SSE42_CRC32C_WITH_RUNTIME_CHECK 1
-
-/* Define to build with systemd support. (--with-systemd) */
-#define USE_SYSTEMD 1
-
-/* Define to select SysV-style semaphores. */
-/* #undef USE_SYSV_SEMAPHORES */
-
-/* Define to select SysV-style shared memory. */
-#define USE_SYSV_SHARED_MEMORY 1
-
-/* Define to select unnamed POSIX semaphores. */
-#define USE_UNNAMED_POSIX_SEMAPHORES 1
-
-/* Define to select Win32-style semaphores. */
-/* #undef USE_WIN32_SEMAPHORES */
-
-/* Define to select Win32-style shared memory. */
-/* #undef USE_WIN32_SHARED_MEMORY */
-
-/* Define to 1 to build with ZSTD support. (--with-zstd) */
-/* #undef USE_ZSTD */
-
-/* Define to 1 if `wcstombs_l' requires <xlocale.h>. */
-/* #undef WCSTOMBS_L_IN_XLOCALE */
-
-/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
-   significant byte first (like Motorola and SPARC, unlike Intel). */
-#if defined AC_APPLE_UNIVERSAL_BUILD
-# if defined __BIG_ENDIAN__
-#  define WORDS_BIGENDIAN 1
-# endif
-#else
-# ifndef WORDS_BIGENDIAN
-/* #  undef WORDS_BIGENDIAN */
-# endif
-#endif
-
-/* Size of a WAL file block. This need have no particular relation to BLCKSZ.
-   XLOG_BLCKSZ must be a power of 2, and if your system supports O_DIRECT I/O,
-   XLOG_BLCKSZ must be a multiple of the alignment requirement for direct-I/O
-   buffers, else direct I/O may fail. Changing XLOG_BLCKSZ requires an initdb.
-   */
-#define XLOG_BLCKSZ 8192
-
-
-
-/* Number of bits in a file offset, on hosts where this is settable. */
-/* #undef _FILE_OFFSET_BITS */
-
-/* Define to 1 to make fseeko visible on some hosts (e.g. glibc 2.2). */
-/* #undef _LARGEFILE_SOURCE */
-
-/* Define for large files, on AIX-style hosts. */
-/* #undef _LARGE_FILES */
-
-/* Define to `__inline__' or `__inline' if that's what the C compiler
-   calls it, or to nothing if 'inline' is not supported under any name.  */
-#ifndef __cplusplus
-/* #undef inline */
-#endif
-
-/* Define to keyword to use for C99 restrict support, or to nothing if not
-   supported */
-#define pg_restrict __restrict
-
-/* Define to the equivalent of the C99 'restrict' keyword, or to
-   nothing if this is not supported.  Do not define if restrict is
-   supported directly.  */
-#define restrict __restrict
-/* Work around a bug in Sun C++: it does not support _Restrict or
-   __restrict__, even though the corresponding Sun C compiler ends up with
-   "#define restrict _Restrict" or "#define restrict __restrict__" in the
-   previous line.  Perhaps some future version of Sun C++ will work with
-   restrict; if so, hopefully it defines __RESTRICT like Sun C does.  */
-#if defined __SUNPRO_CC && !defined __RESTRICT
-# define _Restrict
-# define __restrict__
-#endif
-
-/* Define to how the compiler spells `typeof'. */
-/* #undef typeof */
diff --git a/contrib/libs/libpq/src/include/pg_config-osx-arm64.h b/contrib/libs/libpq/src/include/pg_config-osx-arm64.h
deleted file mode 100644
index dde70a44c9..0000000000
--- a/contrib/libs/libpq/src/include/pg_config-osx-arm64.h
+++ /dev/null
@@ -1,159 +0,0 @@
-#pragma once
-
-#include "pg_config-linux.h"
-
-/* Define to 1 if you have __get_cpuid. */
-#undef HAVE__GET_CPUID
-
-/* Define to 1 if you have the `append_history' function. */
-#undef HAVE_APPEND_HISTORY
-
-/* Define to 1 if you have the `ASN1_STRING_get0_data' function. */
-#undef HAVE_ASN1_STRING_GET0_DATA 
-
-/* Define to 1 if you have the `copyfile' function. */
-#define HAVE_COPYFILE 1
-
-/* Define to 1 if you have the <copyfile.h> header file. */
-#define HAVE_COPYFILE_H 1
-
-/* Define to 1 if you have the <crypt.h> header file. */
-#undef HAVE_CRYPT_H 
-
-/* Define to 1 if you have the declaration of `fdatasync', and to 0 if you
-   don't. */
-#undef HAVE_DECL_FDATASYNC
-#define HAVE_DECL_FDATASYNC 0
-
-/* Define to 1 if you have the declaration of `F_FULLFSYNC', and to 0 if you
-   don't. */
-#undef HAVE_DECL_F_FULLFSYNC
-#define HAVE_DECL_F_FULLFSYNC 1
-
-/* Define to 1 if you have the declaration of `snprintf', and to 0 if you
-   don't. */
-#define HAVE_DECL_SNPRINTF 1
-
-/* Define to 1 if you have the declaration of `strlcat', and to 0 if you
-   don't. */
-#undef HAVE_DECL_STRLCAT
-#define HAVE_DECL_STRLCAT 1 
-
-/* Define to 1 if you have the declaration of `strlcpy', and to 0 if you
-   don't. */ 
-#undef HAVE_DECL_STRLCPY
-#define HAVE_DECL_STRLCPY 1
-
-/* Define to 1 if you have the declaration of `sys_siglist', and to 0 if you
-   don't. */
-#define HAVE_DECL_SYS_SIGLIST 1
-
-/* Define to 1 if you have the declaration of `vsnprintf', and to 0 if you
-   don't. */
-#define HAVE_DECL_VSNPRINTF 1
-
-/* Define to 1 if you have the <dld.h> header file. */
-#undef HAVE_DLD_H
-
-/* Define to 1 if you have the `fls' function. */
-#define HAVE_FLS 1
-
-/* Define to 1 if you have the `gethostbyname_r' function. */
-#undef HAVE_GETHOSTBYNAME_R 
-
-/* Define to 1 if you have the `getpeereid' function. */
-#define HAVE_GETPEEREID 1
-
-/* Define to 1 if you have the `mbstowcs_l' function. */
-#define HAVE_MBSTOWCS_L 1
-
-/* Define to 1 if you have the `posix_fadvise' function. */
-#undef HAVE_POSIX_FADVISE 
-
-/* Define to 1 if you have the `posix_fallocate' function. */
-#undef HAVE_POSIX_FALLOCATE 
-
-/* Define to 1 if you have the `ppoll' function. */
-#undef HAVE_PPOLL
-
-/* Define to 1 if you have the `pread' function. */
-#undef HAVE_PREAD
-
-/* Define to 1 if you have the `pthread_is_threaded_np' function. */
-#define HAVE_PTHREAD_IS_THREADED_NP 1
-
-/* Define to 1 if you have the `pwrite' function. */
-#undef HAVE_PWRITE
-
-/* Define to 1 if you have the `rl_reset_screen_size' function. */
-#undef HAVE_RL_RESET_SCREEN_SIZE 
-
-/* Define to 1 if you have the `snprintf' function. */
-#define HAVE_SNPRINTF 1
-
-/* Define to 1 if you have the `strchrnul' function. */                
-#undef HAVE_STRCHRNUL
-
-/* Define to 1 if you have the `strerror_r' function. */
-#define HAVE_STRERROR_R 1
-
-/* Define to 1 if you have the `strlcat' function. */
-#define HAVE_STRLCAT 1
-
-/* Define to 1 if you have the `strlcpy' function. */
-#define HAVE_STRLCPY 1
-
-/* Define to 1 if `sa_len' is a member of `struct sockaddr'. */
-#define HAVE_STRUCT_SOCKADDR_SA_LEN 1
-
-/* Define to 1 if `ss_len' is a member of `struct sockaddr_storage'. */
-#define HAVE_STRUCT_SOCKADDR_STORAGE_SS_LEN 1
-
-/* Define to 1 if you have the `sync_file_range' function. */
-#undef HAVE_SYNC_FILE_RANGE 
-
-/* Define to 1 if you have the <sys/epoll.h> header file. */
-#undef HAVE_SYS_EPOLL_H 
-
-/* Define to 1 if you have the <sys/sockio.h> header file. */
-#define HAVE_SYS_SOCKIO_H 1
-
-/* Define to 1 if you have the <sys/ucred.h> header file. */
-#define HAVE_SYS_UCRED_H 1
-
-/* Define to 1 if you have the `towlower' function. */
-#define HAVE_TOWLOWER 1
-
-/* Define to 1 if you have the <uuid.h> header file. */
-/* #undef HAVE_UUID_H */
-
-/* Define to 1 if you have OSSP UUID support. */
-/* #undef HAVE_UUID_OSSP */
-
-/* Define to 1 if you have the `vsnprintf' function. */
-#define HAVE_VSNPRINTF 1
-
-/* Define to 1 if you have the `wcstombs_l' function. */
-#define HAVE_WCSTOMBS_L 1
-
-/* Define to 1 if `locale_t' requires <xlocale.h>. */
-#define LOCALE_T_IN_XLOCALE 1
-
-/* Define to gnu_printf if compiler supports it, else printf. */
-#undef PG_PRINTF_ATTRIBUTE
-#define PG_PRINTF_ATTRIBUTE printf
-
-/* Define to 1 if strerror_r() returns int. */
-#define STRERROR_R_INT 1
-
-/* Define to build with systemd support. (--with-systemd) */
-/* #undef USE_SYSTEMD */
-
-/* Define to select SysV-style semaphores. */
-#define USE_SYSV_SEMAPHORES 1
-
-/* Define to select unnamed POSIX semaphores. */
-/* #undef USE_UNNAMED_POSIX_SEMAPHORES */
-
-/* Define to 1 if `wcstombs_l' requires <xlocale.h>. */
-#define WCSTOMBS_L_IN_XLOCALE 1
diff --git a/contrib/libs/libpq/src/include/pg_config-osx.h b/contrib/libs/libpq/src/include/pg_config-osx.h
deleted file mode 100644
index 4b1a8a294c..0000000000
--- a/contrib/libs/libpq/src/include/pg_config-osx.h
+++ /dev/null
@@ -1,156 +0,0 @@
-#pragma once
-
-#include "pg_config-linux.h"
-
-/* Define to 1 if you have the `append_history' function. */
-#undef HAVE_APPEND_HISTORY
-
-/* Define to 1 if you have the `ASN1_STRING_get0_data' function. */
-#undef HAVE_ASN1_STRING_GET0_DATA 
-
-/* Define to 1 if you have the `copyfile' function. */
-#define HAVE_COPYFILE 1
-
-/* Define to 1 if you have the <copyfile.h> header file. */
-#define HAVE_COPYFILE_H 1
-
-/* Define to 1 if you have the <crypt.h> header file. */
-#undef HAVE_CRYPT_H 
-
-/* Define to 1 if you have the declaration of `fdatasync', and to 0 if you
-   don't. */
-#undef HAVE_DECL_FDATASYNC
-#define HAVE_DECL_FDATASYNC 0
-
-/* Define to 1 if you have the declaration of `F_FULLFSYNC', and to 0 if you
-   don't. */
-#undef HAVE_DECL_F_FULLFSYNC
-#define HAVE_DECL_F_FULLFSYNC 1
-
-/* Define to 1 if you have the declaration of `snprintf', and to 0 if you
-   don't. */
-#define HAVE_DECL_SNPRINTF 1
-
-/* Define to 1 if you have the declaration of `strlcat', and to 0 if you
-   don't. */
-#undef HAVE_DECL_STRLCAT
-#define HAVE_DECL_STRLCAT 1 
-
-/* Define to 1 if you have the declaration of `strlcpy', and to 0 if you
-   don't. */ 
-#undef HAVE_DECL_STRLCPY
-#define HAVE_DECL_STRLCPY 1
-
-/* Define to 1 if you have the declaration of `sys_siglist', and to 0 if you
-   don't. */
-#define HAVE_DECL_SYS_SIGLIST 1
-
-/* Define to 1 if you have the declaration of `vsnprintf', and to 0 if you
-   don't. */
-#define HAVE_DECL_VSNPRINTF 1
-
-/* Define to 1 if you have the <dld.h> header file. */
-#undef HAVE_DLD_H
-
-/* Define to 1 if you have the `fls' function. */
-#define HAVE_FLS 1
-
-/* Define to 1 if you have the `gethostbyname_r' function. */
-#undef HAVE_GETHOSTBYNAME_R 
-
-/* Define to 1 if you have the `getpeereid' function. */
-#define HAVE_GETPEEREID 1
-
-/* Define to 1 if you have the `mbstowcs_l' function. */
-#define HAVE_MBSTOWCS_L 1
-
-/* Define to 1 if you have the `posix_fadvise' function. */
-#undef HAVE_POSIX_FADVISE 
-
-/* Define to 1 if you have the `posix_fallocate' function. */
-#undef HAVE_POSIX_FALLOCATE 
-
-/* Define to 1 if you have the `ppoll' function. */
-#undef HAVE_PPOLL
-
-/* Define to 1 if you have the `pread' function. */
-#undef HAVE_PREAD
-
-/* Define to 1 if you have the `pthread_is_threaded_np' function. */
-#define HAVE_PTHREAD_IS_THREADED_NP 1
-
-/* Define to 1 if you have the `pwrite' function. */
-#undef HAVE_PWRITE
-
-/* Define to 1 if you have the `rl_reset_screen_size' function. */
-#undef HAVE_RL_RESET_SCREEN_SIZE 
-
-/* Define to 1 if you have the `snprintf' function. */
-#define HAVE_SNPRINTF 1
-
-/* Define to 1 if you have the `strchrnul' function. */                
-#undef HAVE_STRCHRNUL
-
-/* Define to 1 if you have the `strerror_r' function. */
-#define HAVE_STRERROR_R 1
-
-/* Define to 1 if you have the `strlcat' function. */
-#define HAVE_STRLCAT 1
-
-/* Define to 1 if you have the `strlcpy' function. */
-#define HAVE_STRLCPY 1
-
-/* Define to 1 if `sa_len' is a member of `struct sockaddr'. */
-#define HAVE_STRUCT_SOCKADDR_SA_LEN 1
-
-/* Define to 1 if `ss_len' is a member of `struct sockaddr_storage'. */
-#define HAVE_STRUCT_SOCKADDR_STORAGE_SS_LEN 1
-
-/* Define to 1 if you have the `sync_file_range' function. */
-#undef HAVE_SYNC_FILE_RANGE 
-
-/* Define to 1 if you have the <sys/epoll.h> header file. */
-#undef HAVE_SYS_EPOLL_H 
-
-/* Define to 1 if you have the <sys/sockio.h> header file. */
-#define HAVE_SYS_SOCKIO_H 1
-
-/* Define to 1 if you have the <sys/ucred.h> header file. */
-#define HAVE_SYS_UCRED_H 1
-
-/* Define to 1 if you have the `towlower' function. */
-#define HAVE_TOWLOWER 1
-
-/* Define to 1 if you have the <uuid.h> header file. */
-/* #undef HAVE_UUID_H */
-
-/* Define to 1 if you have OSSP UUID support. */
-/* #undef HAVE_UUID_OSSP */
-
-/* Define to 1 if you have the `vsnprintf' function. */
-#define HAVE_VSNPRINTF 1
-
-/* Define to 1 if you have the `wcstombs_l' function. */
-#define HAVE_WCSTOMBS_L 1
-
-/* Define to 1 if `locale_t' requires <xlocale.h>. */
-#define LOCALE_T_IN_XLOCALE 1
-
-/* Define to gnu_printf if compiler supports it, else printf. */
-#undef PG_PRINTF_ATTRIBUTE
-#define PG_PRINTF_ATTRIBUTE printf
-
-/* Define to 1 if strerror_r() returns int. */
-#define STRERROR_R_INT 1
-
-/* Define to build with systemd support. (--with-systemd) */
-/* #undef USE_SYSTEMD */
-
-/* Define to select SysV-style semaphores. */
-#define USE_SYSV_SEMAPHORES 1
-
-/* Define to select unnamed POSIX semaphores. */
-/* #undef USE_UNNAMED_POSIX_SEMAPHORES */
-
-/* Define to 1 if `wcstombs_l' requires <xlocale.h>. */
-#define WCSTOMBS_L_IN_XLOCALE 1
diff --git a/contrib/libs/libpq/src/include/pg_config-win.h b/contrib/libs/libpq/src/include/pg_config-win.h
deleted file mode 100644
index 9574513dc0..0000000000
--- a/contrib/libs/libpq/src/include/pg_config-win.h
+++ /dev/null
@@ -1,318 +0,0 @@
-#pragma once
-
-#include "pg_config-linux.h"
-
-/* Define to the type of arg 1 of 'accept' */
-#define ACCEPT_TYPE_ARG1 unsigned int
-
-/* Define to the type of arg 3 of 'accept' */
-#define ACCEPT_TYPE_ARG3 int
-
-/* Define to the return type of 'accept' */
-#define ACCEPT_TYPE_RETURN unsigned int PASCAL
-
-/* Define to 1 if you have the `clock_gettime' function. */
-#undef HAVE_CLOCK_GETTIME 
-
-/* Define to 1 if your compiler handles computed gotos. */
-#undef HAVE_COMPUTED_GOTO 
-
-/* Define to 1 if you have the `crypt' function. */
-#undef HAVE_CRYPT 
-
-/* Define to 1 if you have the <crypt.h> header file. */
-#undef HAVE_CRYPT_H 
-
-/* Define to 1 if you have the declaration of `posix_fadvise', and to 0 if you
- *      don't. */ 
-#undef HAVE_DECL_POSIX_FADVISE
-
-/* Define to 1 if you have the declaration of `RTLD_GLOBAL', and to 0 if you
-   don't. */
-#undef HAVE_DECL_RTLD_GLOBAL
-
-/* Define to 1 if you have the declaration of `RTLD_NOW', and to 0 if you
-   don't. */
-#undef HAVE_DECL_RTLD_NOW
-
-/* Define to 1 if you have the declaration of `strlcat', and to 0 if you
-   don't. */
-#define HAVE_DECL_STRLCAT 0
-  
-/* Define to 1 if you have the declaration of `strlcpy', and to 0 if you
-   don't. */ 
-#define HAVE_DECL_STRLCPY 0  
-
-/* Define to 1 if you have the `dlopen' function. */
-#undef HAVE_DLOPEN 
-
-/* Define to 1 if you have the `fdatasync' function. */
-#undef HAVE_FDATASYNC
-
-/* Define to 1 if you have __atomic_compare_exchange_n(int *, int *, int). */
-#undef HAVE_GCC__ATOMIC_INT32_CAS
-
-/* Define to 1 if you have __atomic_compare_exchange_n(int64 *, int64 *,
-   int64). */
-#undef HAVE_GCC__ATOMIC_INT64_CAS
-
-/* Define to 1 if you have __sync_lock_test_and_set(char *) and friends. */
-#undef HAVE_GCC__SYNC_CHAR_TAS
-
-/* Define to 1 if you have the `getaddrinfo' function. */
-#undef HAVE_GETADDRINFO 
-
-/* Define to 1 if you have the `gethostbyname_r' function. */
-#undef HAVE_GETHOSTBYNAME_R 
-
-/* Define to 1 if you have the `getopt' function. */
-#undef HAVE_GETOPT
-
-/* Define to 1 if you have the <getopt.h> header file. */
-#undef HAVE_GETOPT_H
-
-/* Define to 1 if you have the `getopt_long' function. */
-#undef HAVE_GETOPT_LONG
-
-/* Define to 1 if you have the `getpwuid_r' function. */
-#undef HAVE_GETPWUID_R 
-
-/* Define to 1 if you have the `getrlimit' function. */
-#undef HAVE_RLIMIT
-
-/* Define to 1 if you have the `getrusage' function. */
-#undef HAVE_GETRUSAGE
-
-/* Define to 1 if you have the `inet_aton' function. */
-#undef HAVE_INET_ATON 
-
-/* Define to 1 if you have the <inttypes.h> header file. */
-#undef HAVE_INTTYPES_H
-
-/* Define to 1 if you have the <langinfo.h> header file. */
-#undef HAVE_LANGINFO_H
-
-/* Define to 1 if you have the `crypto' library (-lcrypto). */
-#undef HAVE_LIBCRYPTO 
-
-/* Define to 1 if `long int' works and is 64 bits. */
-#define HAVE_LONG_INT_64 1
-
-/* Define to 1 if the system has the type `long long int'. */
-#define HAVE_LONG_LONG_INT 1
-
-/* Define to 1 if you have the `mbstowcs_l' function. */
-#define HAVE_MBSTOWCS_L 1
-
-/* Define to 1 if the system has the type `MINIDUMP_TYPE'. */
-#define HAVE_MINIDUMP_TYPE 1
-
-/* Define to 1 if you have the `mkdtemp' function. */
-#undef HAVE_MKDTEMP
-
-/* Define to 1 if you have the <netinet/tcp.h> header file. */
-#undef HAVE_NETINET_TCP_H 
-
-/* Define to 1 if you have the `poll' function. */
-#undef HAVE_POLL 
-
-/* Define to 1 if you have the <poll.h> header file. */
-#undef HAVE_POLL_H 
-
-/* Define to 1 if you have the `posix_fadvise' function. */
-#undef HAVE_POSIX_FADVISE
-
-/* Define to 1 if you have the `posix_fallocate' function. */
-#undef HAVE_POSIX_FALLOCATE 
-
-/* Define to 1 if you have the `ppoll' function. */
-#undef HAVE_PPOLL
-
-/* Define to 1 if you have the `pread' function. */
-#undef HAVE_PREAD 
-
-/* Define if you have POSIX threads libraries and header files. */
-#undef HAVE_PTHREAD
-
-/* Have PTHREAD_PRIO_INHERIT. */
-#define HAVE_PTHREAD_PRIO_INHERIT 1
-
-/* Define to 1 if you have the `pwrite' function. */
-#undef HAVE_PWRITE 
-
-/* Define to 1 if you have the `readlink' function. */
-#undef HAVE_READLINK 
-
-/* Define to 1 if you have the global variable
-   'rl_completion_append_character'. */
-#undef HAVE_RL_COMPLETION_APPEND_CHARACTER 
-
-/* Define to 1 if you have the `rl_completion_matches' function. */
-#undef HAVE_RL_COMPLETION_MATCHES 
-
-/* Define to 1 if you have the `rl_filename_completion_function' function. */
-#undef HAVE_RL_FILENAME_COMPLETION_FUNCTION 
-
-/* Define to 1 if you have the `setsid' function. */
-#undef HAVE_SETSID 
-
-/* Define to 1 if you have the `strchrnul' function. */
-#undef HAVE_STRCHRNUL
-
-/* Define to 1 if you have the `strerror_r' function. */
-#undef HAVE_STRERROR_R 
-
-/* Define to 1 if you have the <strings.h> header file. */
-#undef HAVE_STRINGS_H
-
-/* Define to 1 if you have the `strsignal' function. */
-#undef HAVE_STRSIGNAL 
-
-/* Define to 1 if the system has the type `struct option'. */
-#undef HAVE_STRUCT_OPTION
-
-/* Define to 1 if `tm_zone' is member of `struct tm'. */
-#undef HAVE_STRUCT_TM_TM_ZONE 
-
-/* Define to 1 if you have the `sync_file_range' function. */
-#undef HAVE_SYNC_FILE_RANGE 
-
-/* Define to 1 if you have the syslog interface. */
-#undef HAVE_SYSLOG 
-
-/* Define to 1 if you have the <sys/ipc.h> header file. */
-#undef HAVE_SYS_IPC_H 
-
-/* Define to 1 if you have the <sys/personality.h> header file. */
-#undef HAVE_SYS_PERSONALITY_H
-
-/* Define to 1 if you have the <sys/prctl.h> header file. */
-#undef HAVE_SYS_PRCTL_H 
-
-/* Define to 1 if you have the <sys/select.h> header file. */
-#undef HAVE_SYS_SELECT_H 
-
-/* Define to 1 if you have the <sys/sem.h> header file. */
-#undef HAVE_SYS_SEM_H
-
-/* Define to 1 if you have the <sys/shm.h> header file. */
-#undef HAVE_SYS_SHM_H 
-
-/* Define to 1 if you have the <sys/un.h> header file. */
-#undef HAVE_SYS_UN_H 
-
-/* Define to 1 if you have the <termios.h> header file. */
-#undef HAVE_TERMIOS_H 
-
-/* Define to 1 if your `struct tm' has `tm_zone'. Deprecated, use
-   `HAVE_STRUCT_TM_TM_ZONE' instead. */
-#undef HAVE_TM_ZONE 
-
-/* Define to 1 if your compiler understands `typeof' or something similar. */
-#undef HAVE_TYPEOF
-
-/* Define to 1 if you have the external array `tzname'. */
-#undef HAVE_TZNAME 
-
-/* Define to 1 if you have unix sockets. */
-#undef HAVE_UNIX_SOCKETS 
-
-/* Define to 1 if you have the `unsetenv' function. */
-#undef HAVE_UNSETENV 
-
-/* Define to 1 if you have the `uselocale' function. */
-#undef HAVE_USELOCALE 
-
-/* Define to 1 if you have the `utimes' function. */
-#undef HAVE_UTIMES 
-
-/* Define to 1 if you have the `wcstombs_l' function. */
-#define HAVE_WCSTOMBS_L 1
-
-/* Define to 1 if the assembler supports X86_64's POPCNTQ instruction. */
-#undef HAVE_X86_64_POPCNTQ 
-
-/* Define to 1 if the system has the type `_Bool'. */
-#undef HAVE__BOOL
-
-/* Define to 1 if your compiler understands __builtin_bswap16. */
-#undef HAVE__BUILTIN_BSWAP16 
-
-/* Define to 1 if your compiler understands __builtin_bswap32. */
-#undef HAVE__BUILTIN_BSWAP32 
-
-/* Define to 1 if your compiler understands __builtin_bswap64. */
-#undef HAVE__BUILTIN_BSWAP64 
-
-/* Define to 1 if your compiler understands __builtin_clz. */
-#undef HAVE__BUILTIN_CLZ 
-
-/* Define to 1 if your compiler understands __builtin_constant_p. */
-#undef HAVE__BUILTIN_CONSTANT_P 
-
-/* Define to 1 if your compiler understands __builtin_ctz. */
-#undef HAVE__BUILTIN_CTZ
-
-/* Define to 1 if your compiler understands __builtin_$op_overflow. */
-#undef HAVE__BUILTIN_OP_OVERFLOW 
-
-/* Define to 1 if your compiler understands __builtin_popcount. */
-#undef HAVE__BUILTIN_POPCOUNT
-
-/* Define to 1 if your compiler understands __builtin_types_compatible_p. */
-#undef HAVE__BUILTIN_TYPES_COMPATIBLE_P 
-
-/* Define to 1 if your compiler understands __builtin_unreachable. */
-#undef HAVE__BUILTIN_UNREACHABLE
-
-/* Define to 1 if you have the `_configthreadlocale' function. */
-#define HAVE__CONFIGTHREADLOCALE 1
-
-/* Define to 1 if you have __cpuid. */
-#define HAVE__CPUID 1
-
-/* Define to 1 if you have __get_cpuid. */
-#undef HAVE__GET_CPUID
-
-/* Define to the appropriate printf length modifier for 64-bit ints. */
-#define INT64_MODIFIER "ll"
-
-/* Define to 1 if `locale_t' requires <xlocale.h>. */
-/* #undef LOCALE_T_IN_XLOCALE */
-
-/* Define to the name of a signed 128-bit integer type. */
-#undef PG_INT128_TYPE
-
-/* Define to the name of a signed 64-bit integer type. */
-#define PG_INT64_TYPE long long int
-
-/* The size of `size_t', as computed by sizeof. */
-#ifdef _WIN64
-#define SIZEOF_SIZE_T 8
-#else
-#define SIZEOF_SIZE_T 4
-#endif
-
-/* The size of `void *', as computed by sizeof. */
-#ifndef _WIN64
-#define SIZEOF_VOID_P 8
-#else
-#define SIZEOF_VOID_P 4
-#endif
-
-/* Define to select named POSIX semaphores. */
-#undef USE_NAMED_POSIX_SEMAPHORES 
-
-/* Define to build with systemd support. (--with-systemd) */
-#undef USE_SYSTEMD
-
-/* Define to select unnamed POSIX semaphores. */
-#undef USE_UNNAMED_POSIX_SEMAPHORES 
-
-/* Define to use native Windows API for random number generation */
-#define USE_WIN32_RANDOM 1
-
-/* Define to select Win32-style semaphores. */
-#define USE_WIN32_SEMAPHORES 1
-
-#define pg_restrict __restrict
diff --git a/contrib/libs/libpq/src/include/pg_config.h b/contrib/libs/libpq/src/include/pg_config.h
deleted file mode 100644
index b63bb45246..0000000000
--- a/contrib/libs/libpq/src/include/pg_config.h
+++ /dev/null
@@ -1,13 +0,0 @@
-#pragma once
-
-#if defined(__APPLE__) && (defined(__aarch64__) || defined(_M_ARM64))
-#   include "pg_config-osx-arm64.h"
-#elif defined(__APPLE__)
-#   include "pg_config-osx.h"
-#elif defined(_MSC_VER)
-#   include "pg_config-win.h"
-#elif defined(__linux__) && (defined(__aarch64__) || defined(_M_ARM64))
-#   include "pg_config-linux-aarch64.h"
-#else
-#   include "pg_config-linux.h"
-#endif
diff --git a/contrib/libs/libpq/src/include/pg_config_ext.h b/contrib/libs/libpq/src/include/pg_config_ext.h
deleted file mode 100644
index b4c07dd857..0000000000
--- a/contrib/libs/libpq/src/include/pg_config_ext.h
+++ /dev/null
@@ -1,8 +0,0 @@
-/* src/include/pg_config_ext.h.  Generated from pg_config_ext.h.in by configure.  */
-/*
- * src/include/pg_config_ext.h.in.  This is generated manually, not by
- * autoheader, since we want to limit which symbols get defined here.
- */
-
-/* Define to the name of a signed 64-bit integer type. */
-#define PG_INT64_TYPE long int
diff --git a/contrib/libs/libpq/src/include/pg_config_manual.h b/contrib/libs/libpq/src/include/pg_config_manual.h
deleted file mode 100644
index a1a93ad706..0000000000
--- a/contrib/libs/libpq/src/include/pg_config_manual.h
+++ /dev/null
@@ -1,372 +0,0 @@
-/*------------------------------------------------------------------------
- * PostgreSQL manual configuration settings
- *
- * This file contains various configuration symbols and limits.  In
- * all cases, changing them is only useful in very rare situations or
- * for developers.  If you edit any of these, be sure to do a *full*
- * rebuild (and an initdb if noted).
- *
- * Portions Copyright (c) 1996-2023, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- * src/include/pg_config_manual.h
- *------------------------------------------------------------------------
- */
-
-/*
- * This is the default value for wal_segment_size to be used when initdb is run
- * without the --wal-segsize option.  It must be a valid segment size.
- */
-#define DEFAULT_XLOG_SEG_SIZE	(16*1024*1024)
-
-/*
- * Maximum length for identifiers (e.g. table names, column names,
- * function names).  Names actually are limited to one fewer byte than this,
- * because the length must include a trailing zero byte.
- *
- * Changing this requires an initdb.
- */
-#define NAMEDATALEN 64
-
-/*
- * Maximum number of arguments to a function.
- *
- * The minimum value is 8 (GIN indexes use 8-argument support functions).
- * The maximum possible value is around 600 (limited by index tuple size in
- * pg_proc's index; BLCKSZ larger than 8K would allow more).  Values larger
- * than needed will waste memory and processing time, but do not directly
- * cost disk space.
- *
- * Changing this does not require an initdb, but it does require a full
- * backend recompile (including any user-defined C functions).
- */
-#define FUNC_MAX_ARGS		100
-
-/*
- * When creating a product derived from PostgreSQL with changes that cause
- * incompatibilities for loadable modules, it is recommended to change this
- * string so that dfmgr.c can refuse to load incompatible modules with a clean
- * error message.  Typical examples that cause incompatibilities are any
- * changes to node tags or node structures.  (Note that dfmgr.c already
- * detects common sources of incompatibilities due to major version
- * differences and due to some changed compile-time constants.  This setting
- * is for catching anything that cannot be detected in a straightforward way.)
- *
- * There is no prescribed format for the string.  The suggestion is to include
- * product or company name, and optionally any internally-relevant ABI
- * version.  Example: "ACME Postgres/1.2".  Note that the string will appear
- * in a user-facing error message if an ABI mismatch is detected.
- */
-#define FMGR_ABI_EXTRA		"PostgreSQL"
-
-/*
- * Maximum number of columns in an index.  There is little point in making
- * this anything but a multiple of 32, because the main cost is associated
- * with index tuple header size (see access/itup.h).
- *
- * Changing this requires an initdb.
- */
-#define INDEX_MAX_KEYS		32
-
-/*
- * Maximum number of columns in a partition key
- */
-#define PARTITION_MAX_KEYS	32
-
-/*
- * Decide whether built-in 8-byte types, including float8, int8, and
- * timestamp, are passed by value.  This is on by default if sizeof(Datum) >=
- * 8 (that is, on 64-bit platforms).  If sizeof(Datum) < 8 (32-bit platforms),
- * this must be off.  We keep this here as an option so that it is easy to
- * test the pass-by-reference code paths on 64-bit platforms.
- *
- * Changing this requires an initdb.
- */
-#if SIZEOF_VOID_P >= 8
-#define USE_FLOAT8_BYVAL 1
-#endif
-
-/*
- * When we don't have native spinlocks, we use semaphores to simulate them.
- * Decreasing this value reduces consumption of OS resources; increasing it
- * may improve performance, but supplying a real spinlock implementation is
- * probably far better.
- */
-#define NUM_SPINLOCK_SEMAPHORES		128
-
-/*
- * When we have neither spinlocks nor atomic operations support we're
- * implementing atomic operations on top of spinlock on top of semaphores. To
- * be safe against atomic operations while holding a spinlock separate
- * semaphores have to be used.
- */
-#define NUM_ATOMICS_SEMAPHORES		64
-
-/*
- * MAXPGPATH: standard size of a pathname buffer in PostgreSQL (hence,
- * maximum usable pathname length is one less).
- *
- * We'd use a standard system header symbol for this, if there weren't
- * so many to choose from: MAXPATHLEN, MAX_PATH, PATH_MAX are all
- * defined by different "standards", and often have different values
- * on the same platform!  So we just punt and use a reasonably
- * generous setting here.
- */
-#define MAXPGPATH		1024
-
-/*
- * You can try changing this if you have a machine with bytes of
- * another size, but no guarantee...
- */
-#define BITS_PER_BYTE		8
-
-/*
- * Preferred alignment for disk I/O buffers.  On some CPUs, copies between
- * user space and kernel space are significantly faster if the user buffer
- * is aligned on a larger-than-MAXALIGN boundary.  Ideally this should be
- * a platform-dependent value, but for now we just hard-wire it.
- */
-#define ALIGNOF_BUFFER	32
-
-/*
- * If EXEC_BACKEND is defined, the postmaster uses an alternative method for
- * starting subprocesses: Instead of simply using fork(), as is standard on
- * Unix platforms, it uses fork()+exec() or something equivalent on Windows,
- * as well as lots of extra code to bring the required global state to those
- * new processes.  This must be enabled on Windows (because there is no
- * fork()).  On other platforms, it's only useful for verifying those
- * otherwise Windows-specific code paths.
- */
-#if defined(WIN32) && !defined(__CYGWIN__)
-#define EXEC_BACKEND
-#endif
-
-/*
- * USE_POSIX_FADVISE controls whether Postgres will attempt to use the
- * posix_fadvise() kernel call.  Usually the automatic configure tests are
- * sufficient, but some older Linux distributions had broken versions of
- * posix_fadvise().  If necessary you can remove the #define here.
- */
-#if HAVE_DECL_POSIX_FADVISE && defined(HAVE_POSIX_FADVISE)
-#define USE_POSIX_FADVISE
-#endif
-
-/*
- * USE_PREFETCH code should be compiled only if we have a way to implement
- * prefetching.  (This is decoupled from USE_POSIX_FADVISE because there
- * might in future be support for alternative low-level prefetch APIs.
- * If you change this, you probably need to adjust the error message in
- * check_effective_io_concurrency.)
- */
-#ifdef USE_POSIX_FADVISE
-#define USE_PREFETCH
-#endif
-
-/*
- * Default and maximum values for backend_flush_after, bgwriter_flush_after
- * and checkpoint_flush_after; measured in blocks.  Currently, these are
- * enabled by default if sync_file_range() exists, ie, only on Linux.  Perhaps
- * we could also enable by default if we have mmap and msync(MS_ASYNC)?
- */
-#ifdef HAVE_SYNC_FILE_RANGE
-#define DEFAULT_BACKEND_FLUSH_AFTER 0	/* never enabled by default */
-#define DEFAULT_BGWRITER_FLUSH_AFTER 64
-#define DEFAULT_CHECKPOINT_FLUSH_AFTER 32
-#else
-#define DEFAULT_BACKEND_FLUSH_AFTER 0
-#define DEFAULT_BGWRITER_FLUSH_AFTER 0
-#define DEFAULT_CHECKPOINT_FLUSH_AFTER 0
-#endif
-/* upper limit for all three variables */
-#define WRITEBACK_MAX_PENDING_FLUSHES 256
-
-/*
- * USE_SSL code should be compiled only when compiling with an SSL
- * implementation.
- */
-#ifdef USE_OPENSSL
-#define USE_SSL
-#endif
-
-/*
- * This is the default directory in which AF_UNIX socket files are
- * placed.  Caution: changing this risks breaking your existing client
- * applications, which are likely to continue to look in the old
- * directory.  But if you just hate the idea of sockets in /tmp,
- * here's where to twiddle it.  You can also override this at runtime
- * with the postmaster's -k switch.
- *
- * If set to an empty string, then AF_UNIX sockets are not used by default: A
- * server will not create an AF_UNIX socket unless the run-time configuration
- * is changed, a client will connect via TCP/IP by default and will only use
- * an AF_UNIX socket if one is explicitly specified.
- *
- * This is done by default on Windows because there is no good standard
- * location for AF_UNIX sockets and many installations on Windows don't
- * support them yet.
- */
-#ifndef WIN32
-#define DEFAULT_PGSOCKET_DIR  "/tmp"
-#else
-#define DEFAULT_PGSOCKET_DIR ""
-#endif
-
-/*
- * This is the default event source for Windows event log.
- */
-#define DEFAULT_EVENT_SOURCE  "PostgreSQL"
-
-/*
- * Assumed cache line size. This doesn't affect correctness, but can be used
- * for low-level optimizations. Currently, this is used to pad some data
- * structures in xlog.c, to ensure that highly-contended fields are on
- * different cache lines. Too small a value can hurt performance due to false
- * sharing, while the only downside of too large a value is a few bytes of
- * wasted memory. The default is 128, which should be large enough for all
- * supported platforms.
- */
-#define PG_CACHE_LINE_SIZE		128
-
-/*
- * Assumed alignment requirement for direct I/O.  4K corresponds to common
- * sector and memory page size.
- */
-#define PG_IO_ALIGN_SIZE		4096
-
-/*
- *------------------------------------------------------------------------
- * The following symbols are for enabling debugging code, not for
- * controlling user-visible features or resource limits.
- *------------------------------------------------------------------------
- */
-
-/*
- * Include Valgrind "client requests", mostly in the memory allocator, so
- * Valgrind understands PostgreSQL memory contexts.  This permits detecting
- * memory errors that Valgrind would not detect on a vanilla build.  It also
- * enables detection of buffer accesses that take place without holding a
- * buffer pin (or without holding a buffer lock in the case of index access
- * methods that superimpose their own custom client requests on top of the
- * generic bufmgr.c requests).
- *
- * "make installcheck" is significantly slower under Valgrind.  The client
- * requests fall in hot code paths, so USE_VALGRIND slows execution by a few
- * percentage points even when not run under Valgrind.
- *
- * Do not try to test the server under Valgrind without having built the
- * server with USE_VALGRIND; else you will get false positives from sinval
- * messaging (see comments in AddCatcacheInvalidationMessage).  It's also
- * important to use the suppression file src/tools/valgrind.supp to
- * exclude other known false positives.
- *
- * You should normally use MEMORY_CONTEXT_CHECKING with USE_VALGRIND;
- * instrumentation of repalloc() is inferior without it.
- */
-/* #define USE_VALGRIND */
-
-/*
- * Define this to cause pfree()'d memory to be cleared immediately, to
- * facilitate catching bugs that refer to already-freed values.
- * Right now, this gets defined automatically if --enable-cassert.
- */
-#ifdef USE_ASSERT_CHECKING
-#define CLOBBER_FREED_MEMORY
-#endif
-
-/*
- * Define this to check memory allocation errors (scribbling on more
- * bytes than were allocated).  Right now, this gets defined
- * automatically if --enable-cassert or USE_VALGRIND.
- */
-#if defined(USE_ASSERT_CHECKING) || defined(USE_VALGRIND)
-#define MEMORY_CONTEXT_CHECKING
-#endif
-
-/*
- * Define this to cause palloc()'d memory to be filled with random data, to
- * facilitate catching code that depends on the contents of uninitialized
- * memory.  Caution: this is horrendously expensive.
- */
-/* #define RANDOMIZE_ALLOCATED_MEMORY */
-
-/*
- * For cache-invalidation debugging, define DISCARD_CACHES_ENABLED to enable
- * use of the debug_discard_caches GUC to aggressively flush syscache/relcache
- * entries whenever it's possible to deliver invalidations.  See
- * AcceptInvalidationMessages() in src/backend/utils/cache/inval.c for
- * details.
- *
- * USE_ASSERT_CHECKING builds default to enabling this.  It's possible to use
- * DISCARD_CACHES_ENABLED without a cassert build and the implied
- * CLOBBER_FREED_MEMORY and MEMORY_CONTEXT_CHECKING options, but it's unlikely
- * to be as effective at identifying problems.
- */
-/* #define DISCARD_CACHES_ENABLED */
-
-#if defined(USE_ASSERT_CHECKING) && !defined(DISCARD_CACHES_ENABLED)
-#define DISCARD_CACHES_ENABLED
-#endif
-
-/*
- * Backwards compatibility for the older compile-time-only clobber-cache
- * macros.
- */
-#if !defined(DISCARD_CACHES_ENABLED) && (defined(CLOBBER_CACHE_ALWAYS) || defined(CLOBBER_CACHE_RECURSIVELY))
-#define DISCARD_CACHES_ENABLED
-#endif
-
-/*
- * Recover memory used for relcache entries when invalidated.  See
- * RelationBuildDesc() in src/backend/utils/cache/relcache.c.
- *
- * This is active automatically for clobber-cache builds when clobbering is
- * active, but can be overridden here by explicitly defining
- * RECOVER_RELATION_BUILD_MEMORY.  Define to 1 to always free relation cache
- * memory even when clobber is off, or to 0 to never free relation cache
- * memory even when clobbering is on.
- */
- /* #define RECOVER_RELATION_BUILD_MEMORY 0 */	/* Force disable */
- /* #define RECOVER_RELATION_BUILD_MEMORY 1 */	/* Force enable */
-
-/*
- * Define this to force all parse and plan trees to be passed through
- * copyObject(), to facilitate catching errors and omissions in
- * copyObject().
- */
-/* #define COPY_PARSE_PLAN_TREES */
-
-/*
- * Define this to force all parse and plan trees to be passed through
- * outfuncs.c/readfuncs.c, to facilitate catching errors and omissions in
- * those modules.
- */
-/* #define WRITE_READ_PARSE_PLAN_TREES */
-
-/*
- * Define this to force all raw parse trees for DML statements to be scanned
- * by raw_expression_tree_walker(), to facilitate catching errors and
- * omissions in that function.
- */
-/* #define RAW_EXPRESSION_COVERAGE_TEST */
-
-/*
- * Enable debugging print statements for lock-related operations.
- */
-/* #define LOCK_DEBUG */
-
-/*
- * Enable debugging print statements for WAL-related operations; see
- * also the wal_debug GUC var.
- */
-/* #define WAL_DEBUG */
-
-/*
- * Enable tracing of resource consumption during sort operations;
- * see also the trace_sort GUC var.  For 8.1 this is enabled by default.
- */
-#define TRACE_SORT 1
-
-/*
- * Enable tracing of syncscan operations (see also the trace_syncscan GUC var).
- */
-/* #define TRACE_SYNCSCAN */
diff --git a/contrib/libs/libpq/src/include/pg_config_os-linux.h b/contrib/libs/libpq/src/include/pg_config_os-linux.h
deleted file mode 100644
index 331e1b2cf1..0000000000
--- a/contrib/libs/libpq/src/include/pg_config_os-linux.h
+++ /dev/null
@@ -1 +0,0 @@
-#include <contrib/libs/libpq/src/include/port/linux.h>
diff --git a/contrib/libs/libpq/src/include/pg_config_os-osx.h b/contrib/libs/libpq/src/include/pg_config_os-osx.h
deleted file mode 100644
index f77fb9d4da..0000000000
--- a/contrib/libs/libpq/src/include/pg_config_os-osx.h
+++ /dev/null
@@ -1 +0,0 @@
-#include <contrib/libs/libpq/src/include/port/darwin.h>
diff --git a/contrib/libs/libpq/src/include/pg_config_os-win.h b/contrib/libs/libpq/src/include/pg_config_os-win.h
deleted file mode 100644
index e26ba92209..0000000000
--- a/contrib/libs/libpq/src/include/pg_config_os-win.h
+++ /dev/null
@@ -1 +0,0 @@
-#include <contrib/libs/libpq/src/include/port/win32.h>
diff --git a/contrib/libs/libpq/src/include/pg_config_os.h b/contrib/libs/libpq/src/include/pg_config_os.h
deleted file mode 100644
index 86db251be2..0000000000
--- a/contrib/libs/libpq/src/include/pg_config_os.h
+++ /dev/null
@@ -1,9 +0,0 @@
-#pragma once
-
-#if defined(__APPLE__)
-#   include "pg_config_os-osx.h"
-#elif defined(_MSC_VER)
-#   include "pg_config_os-win.h"
-#else
-#   include "pg_config_os-linux.h"
-#endif
diff --git a/contrib/libs/libpq/src/include/pgtar.h b/contrib/libs/libpq/src/include/pgtar.h
deleted file mode 100644
index 661f9d7c59..0000000000
--- a/contrib/libs/libpq/src/include/pgtar.h
+++ /dev/null
@@ -1,45 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * pgtar.h
- *	  Functions for manipulating tarfile datastructures (src/port/tar.c)
- *
- *
- * Portions Copyright (c) 1996-2023, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- * src/include/pgtar.h
- *
- *-------------------------------------------------------------------------
- */
-#ifndef PG_TAR_H
-#define PG_TAR_H
-
-#define		TAR_BLOCK_SIZE	512
-
-enum tarError
-{
-	TAR_OK = 0,
-	TAR_NAME_TOO_LONG,
-	TAR_SYMLINK_TOO_LONG
-};
-
-extern enum tarError tarCreateHeader(char *h, const char *filename,
-									 const char *linktarget, pgoff_t size,
-									 mode_t mode, uid_t uid, gid_t gid,
-									 time_t mtime);
-extern uint64 read_tar_number(const char *s, int len);
-extern void print_tar_number(char *s, int len, uint64 val);
-extern int	tarChecksum(char *header);
-
-/*
- * Compute the number of padding bytes required for an entry in a tar
- * archive. We must pad out to a multiple of TAR_BLOCK_SIZE. Since that's
- * a power of 2, we can use TYPEALIGN().
- */
-static inline size_t
-tarPaddingBytesRequired(size_t len)
-{
-	return TYPEALIGN(TAR_BLOCK_SIZE, len) - len;
-}
-
-#endif
diff --git a/contrib/libs/libpq/src/include/pgtime.h b/contrib/libs/libpq/src/include/pgtime.h
deleted file mode 100644
index 9d4b2efe94..0000000000
--- a/contrib/libs/libpq/src/include/pgtime.h
+++ /dev/null
@@ -1,94 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * pgtime.h
- *	  PostgreSQL internal timezone library
- *
- * Portions Copyright (c) 1996-2023, PostgreSQL Global Development Group
- *
- * IDENTIFICATION
- *	  src/include/pgtime.h
- *
- *-------------------------------------------------------------------------
- */
-#ifndef _PGTIME_H
-#define _PGTIME_H
-
-
-/*
- * The API of this library is generally similar to the corresponding
- * C library functions, except that we use pg_time_t which (we hope) is
- * 64 bits wide, and which is most definitely signed not unsigned.
- */
-
-typedef int64 pg_time_t;
-
-/*
- * Data structure representing a broken-down timestamp.
- *
- * CAUTION: the IANA timezone library (src/timezone/) follows the POSIX
- * convention that tm_mon counts from 0 and tm_year is relative to 1900.
- * However, Postgres' datetime functions generally treat tm_mon as counting
- * from 1 and tm_year as relative to 1 BC.  Be sure to make the appropriate
- * adjustments when moving from one code domain to the other.
- */
-struct pg_tm
-{
-	int			tm_sec;
-	int			tm_min;
-	int			tm_hour;
-	int			tm_mday;
-	int			tm_mon;			/* see above */
-	int			tm_year;		/* see above */
-	int			tm_wday;
-	int			tm_yday;
-	int			tm_isdst;
-	long int	tm_gmtoff;
-	const char *tm_zone;
-};
-
-/* These structs are opaque outside the timezone library */
-typedef struct pg_tz pg_tz;
-typedef struct pg_tzenum pg_tzenum;
-
-/* Maximum length of a timezone name (not including trailing null) */
-#define TZ_STRLEN_MAX 255
-
-/* these functions are in localtime.c */
-
-extern struct pg_tm *pg_localtime(const pg_time_t *timep, const pg_tz *tz);
-extern struct pg_tm *pg_gmtime(const pg_time_t *timep);
-extern int	pg_next_dst_boundary(const pg_time_t *timep,
-								 long int *before_gmtoff,
-								 int *before_isdst,
-								 pg_time_t *boundary,
-								 long int *after_gmtoff,
-								 int *after_isdst,
-								 const pg_tz *tz);
-extern bool pg_interpret_timezone_abbrev(const char *abbrev,
-										 const pg_time_t *timep,
-										 long int *gmtoff,
-										 int *isdst,
-										 const pg_tz *tz);
-extern bool pg_get_timezone_offset(const pg_tz *tz, long int *gmtoff);
-extern const char *pg_get_timezone_name(pg_tz *tz);
-extern bool pg_tz_acceptable(pg_tz *tz);
-
-/* these functions are in strftime.c */
-
-extern size_t pg_strftime(char *s, size_t maxsize, const char *format,
-						  const struct pg_tm *t);
-
-/* these functions and variables are in pgtz.c */
-
-extern PGDLLIMPORT pg_tz *session_timezone;
-extern PGDLLIMPORT pg_tz *log_timezone;
-
-extern void pg_timezone_initialize(void);
-extern pg_tz *pg_tzset(const char *tzname);
-extern pg_tz *pg_tzset_offset(long gmtoffset);
-
-extern pg_tzenum *pg_tzenumerate_start(void);
-extern pg_tz *pg_tzenumerate_next(pg_tzenum *dir);
-extern void pg_tzenumerate_end(pg_tzenum *dir);
-
-#endif							/* _PGTIME_H */
diff --git a/contrib/libs/libpq/src/include/port.h b/contrib/libs/libpq/src/include/port.h
deleted file mode 100644
index a88d403483..0000000000
--- a/contrib/libs/libpq/src/include/port.h
+++ /dev/null
@@ -1,520 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * port.h
- *	  Header for src/port/ compatibility functions.
- *
- * Portions Copyright (c) 1996-2023, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- * src/include/port.h
- *
- *-------------------------------------------------------------------------
- */
-#ifndef PG_PORT_H
-#define PG_PORT_H
-
-#include <ctype.h>
-
-/*
- * Windows has enough specialized port stuff that we push most of it off
- * into another file.
- * Note: Some CYGWIN includes might #define WIN32.
- */
-#if defined(WIN32) && !defined(__CYGWIN__)
-#include "port/win32_port.h"
-#endif
-
-/* socket has a different definition on WIN32 */
-#ifndef WIN32
-typedef int pgsocket;
-
-#define PGINVALID_SOCKET (-1)
-#else
-typedef SOCKET pgsocket;
-
-#define PGINVALID_SOCKET INVALID_SOCKET
-#endif
-
-/* if platform lacks socklen_t, we assume this will work */
-#ifndef HAVE_SOCKLEN_T
-typedef unsigned int socklen_t;
-#endif
-
-/* non-blocking */
-extern bool pg_set_noblock(pgsocket sock);
-extern bool pg_set_block(pgsocket sock);
-
-/* Portable path handling for Unix/Win32 (in path.c) */
-
-extern bool has_drive_prefix(const char *path);
-extern char *first_dir_separator(const char *filename);
-extern char *last_dir_separator(const char *filename);
-extern char *first_path_var_separator(const char *pathlist);
-extern void join_path_components(char *ret_path,
-								 const char *head, const char *tail);
-extern void canonicalize_path(char *path);
-extern void make_native_path(char *filename);
-extern void cleanup_path(char *path);
-extern bool path_contains_parent_reference(const char *path);
-extern bool path_is_relative_and_below_cwd(const char *path);
-extern bool path_is_prefix_of_path(const char *path1, const char *path2);
-extern char *make_absolute_path(const char *path);
-extern const char *get_progname(const char *argv0);
-extern void get_share_path(const char *my_exec_path, char *ret_path);
-extern void get_etc_path(const char *my_exec_path, char *ret_path);
-extern void get_include_path(const char *my_exec_path, char *ret_path);
-extern void get_pkginclude_path(const char *my_exec_path, char *ret_path);
-extern void get_includeserver_path(const char *my_exec_path, char *ret_path);
-extern void get_lib_path(const char *my_exec_path, char *ret_path);
-extern void get_pkglib_path(const char *my_exec_path, char *ret_path);
-extern void get_locale_path(const char *my_exec_path, char *ret_path);
-extern void get_doc_path(const char *my_exec_path, char *ret_path);
-extern void get_html_path(const char *my_exec_path, char *ret_path);
-extern void get_man_path(const char *my_exec_path, char *ret_path);
-extern bool get_home_path(char *ret_path);
-extern void get_parent_directory(char *path);
-
-/* common/pgfnames.c */
-extern char **pgfnames(const char *path);
-extern void pgfnames_cleanup(char **filenames);
-
-#define IS_NONWINDOWS_DIR_SEP(ch)	((ch) == '/')
-#define is_nonwindows_absolute_path(filename) \
-( \
-	IS_NONWINDOWS_DIR_SEP((filename)[0]) \
-)
-
-#define IS_WINDOWS_DIR_SEP(ch)	((ch) == '/' || (ch) == '\\')
-/* See path_is_relative_and_below_cwd() for how we handle 'E:abc'. */
-#define is_windows_absolute_path(filename) \
-( \
-	IS_WINDOWS_DIR_SEP((filename)[0]) || \
-	(isalpha((unsigned char) ((filename)[0])) && (filename)[1] == ':' && \
-	 IS_WINDOWS_DIR_SEP((filename)[2])) \
-)
-
-/*
- *	is_absolute_path and IS_DIR_SEP
- *
- *	By using macros here we avoid needing to include path.c in libpq.
- */
-#ifndef WIN32
-#define IS_DIR_SEP(ch) IS_NONWINDOWS_DIR_SEP(ch)
-#define is_absolute_path(filename) is_nonwindows_absolute_path(filename)
-#else
-#define IS_DIR_SEP(ch) IS_WINDOWS_DIR_SEP(ch)
-#define is_absolute_path(filename) is_windows_absolute_path(filename)
-#endif
-
-/*
- * This macro provides a centralized list of all errnos that identify
- * hard failure of a previously-established network connection.
- * The macro is intended to be used in a switch statement, in the form
- * "case ALL_CONNECTION_FAILURE_ERRNOS:".
- *
- * Note: this groups EPIPE and ECONNRESET, which we take to indicate a
- * probable server crash, with other errors that indicate loss of network
- * connectivity without proving much about the server's state.  Places that
- * are actually reporting errors typically single out EPIPE and ECONNRESET,
- * while allowing the network failures to be reported generically.
- */
-#define ALL_CONNECTION_FAILURE_ERRNOS \
-	EPIPE: \
-	case ECONNRESET: \
-	case ECONNABORTED: \
-	case EHOSTDOWN: \
-	case EHOSTUNREACH: \
-	case ENETDOWN: \
-	case ENETRESET: \
-	case ENETUNREACH: \
-	case ETIMEDOUT
-
-/* Portable locale initialization (in exec.c) */
-extern void set_pglocale_pgservice(const char *argv0, const char *app);
-
-/* Portable way to find and execute binaries (in exec.c) */
-extern int	validate_exec(const char *path);
-extern int	find_my_exec(const char *argv0, char *retpath);
-extern int	find_other_exec(const char *argv0, const char *target,
-							const char *versionstr, char *retpath);
-extern char *pipe_read_line(char *cmd, char *line, int maxsize);
-
-/* Doesn't belong here, but this is used with find_other_exec(), so... */
-#define PG_BACKEND_VERSIONSTR "postgres (PostgreSQL) " PG_VERSION "\n"
-
-#ifdef EXEC_BACKEND
-/* Disable ASLR before exec, for developer builds only (in exec.c) */
-extern int	pg_disable_aslr(void);
-#endif
-
-
-#if defined(WIN32) || defined(__CYGWIN__)
-#define EXE ".exe"
-#else
-#define EXE ""
-#endif
-
-#if defined(WIN32) && !defined(__CYGWIN__)
-#define DEVNULL "nul"
-#else
-#define DEVNULL "/dev/null"
-#endif
-
-/* Portable delay handling */
-extern void pg_usleep(long microsec);
-
-/* Portable SQL-like case-independent comparisons and conversions */
-extern int	pg_strcasecmp(const char *s1, const char *s2);
-extern int	pg_strncasecmp(const char *s1, const char *s2, size_t n);
-extern unsigned char pg_toupper(unsigned char ch);
-extern unsigned char pg_tolower(unsigned char ch);
-extern unsigned char pg_ascii_toupper(unsigned char ch);
-extern unsigned char pg_ascii_tolower(unsigned char ch);
-
-/*
- * Beginning in v12, we always replace snprintf() and friends with our own
- * implementation.  This symbol is no longer consulted by the core code,
- * but keep it defined anyway in case any extensions are looking at it.
- */
-#define USE_REPL_SNPRINTF 1
-
-/*
- * Versions of libintl >= 0.13 try to replace printf() and friends with
- * macros to their own versions that understand the %$ format.  We do the
- * same, so disable their macros, if they exist.
- */
-#ifdef vsnprintf
-#undef vsnprintf
-#endif
-#ifdef snprintf
-#undef snprintf
-#endif
-#ifdef vsprintf
-#undef vsprintf
-#endif
-#ifdef sprintf
-#undef sprintf
-#endif
-#ifdef vfprintf
-#undef vfprintf
-#endif
-#ifdef fprintf
-#undef fprintf
-#endif
-#ifdef vprintf
-#undef vprintf
-#endif
-#ifdef printf
-#undef printf
-#endif
-
-extern int	pg_vsnprintf(char *str, size_t count, const char *fmt, va_list args) pg_attribute_printf(3, 0);
-extern int	pg_snprintf(char *str, size_t count, const char *fmt,...) pg_attribute_printf(3, 4);
-extern int	pg_vsprintf(char *str, const char *fmt, va_list args) pg_attribute_printf(2, 0);
-extern int	pg_sprintf(char *str, const char *fmt,...) pg_attribute_printf(2, 3);
-extern int	pg_vfprintf(FILE *stream, const char *fmt, va_list args) pg_attribute_printf(2, 0);
-extern int	pg_fprintf(FILE *stream, const char *fmt,...) pg_attribute_printf(2, 3);
-extern int	pg_vprintf(const char *fmt, va_list args) pg_attribute_printf(1, 0);
-extern int	pg_printf(const char *fmt,...) pg_attribute_printf(1, 2);
-
-#ifndef WIN32
-/*
- * We add a pg_ prefix as a warning that the Windows implementations have the
- * non-standard side-effect of changing the current file position.
- */
-#define pg_pread pread
-#define pg_pwrite pwrite
-#endif
-
-/*
- * We use __VA_ARGS__ for printf to prevent replacing references to
- * the "printf" format archetype in format() attribute declarations.
- * That unfortunately means that taking a function pointer to printf
- * will not do what we'd wish.  (If you need to do that, you must name
- * pg_printf explicitly.)  For printf's sibling functions, use
- * parameterless macros so that function pointers will work unsurprisingly.
- */
-#define vsnprintf		pg_vsnprintf
-#define snprintf		pg_snprintf
-#define vsprintf		pg_vsprintf
-#define sprintf			pg_sprintf
-#define vfprintf		pg_vfprintf
-#define fprintf			pg_fprintf
-#define vprintf			pg_vprintf
-#define printf(...)		pg_printf(__VA_ARGS__)
-
-/* This is also provided by snprintf.c */
-extern int	pg_strfromd(char *str, size_t count, int precision, double value);
-
-/* Replace strerror() with our own, somewhat more robust wrapper */
-extern char *pg_strerror(int errnum);
-#define strerror pg_strerror
-
-/* Likewise for strerror_r(); note we prefer the GNU API for that */
-extern char *pg_strerror_r(int errnum, char *buf, size_t buflen);
-#define strerror_r pg_strerror_r
-#define PG_STRERROR_R_BUFLEN 256	/* Recommended buffer size for strerror_r */
-
-/* Wrap strsignal(), or provide our own version if necessary */
-extern const char *pg_strsignal(int signum);
-
-extern int	pclose_check(FILE *stream);
-
-/* Global variable holding time zone information. */
-#if defined(WIN32) || defined(__CYGWIN__)
-#define TIMEZONE_GLOBAL _timezone
-#define TZNAME_GLOBAL _tzname
-#else
-#define TIMEZONE_GLOBAL timezone
-#define TZNAME_GLOBAL tzname
-#endif
-
-#if defined(WIN32) || defined(__CYGWIN__)
-/*
- *	Win32 doesn't have reliable rename/unlink during concurrent access.
- */
-extern int	pgrename(const char *from, const char *to);
-extern int	pgunlink(const char *path);
-
-/* Include this first so later includes don't see these defines */
-#ifdef _MSC_VER
-#include <io.h>
-#endif
-
-#define rename(from, to)		pgrename(from, to)
-#define unlink(path)			pgunlink(path)
-#endif							/* defined(WIN32) || defined(__CYGWIN__) */
-
-/*
- *	Win32 also doesn't have symlinks, but we can emulate them with
- *	junction points on newer Win32 versions.
- *
- *	Cygwin has its own symlinks which work on Win95/98/ME where
- *	junction points don't, so use those instead.  We have no way of
- *	knowing what type of system Cygwin binaries will be run on.
- *		Note: Some CYGWIN includes might #define WIN32.
- */
-#if defined(WIN32) && !defined(__CYGWIN__)
-extern int	pgsymlink(const char *oldpath, const char *newpath);
-extern int	pgreadlink(const char *path, char *buf, size_t size);
-
-#define symlink(oldpath, newpath)	pgsymlink(oldpath, newpath)
-#define readlink(path, buf, size)	pgreadlink(path, buf, size)
-#endif
-
-extern bool rmtree(const char *path, bool rmtopdir);
-
-#if defined(WIN32) && !defined(__CYGWIN__)
-
-/*
- * open() and fopen() replacements to allow deletion of open files and
- * passing of other special options.
- */
-#define		O_DIRECT	0x80000000
-extern HANDLE pgwin32_open_handle(const char *, int, bool);
-extern int	pgwin32_open(const char *, int,...);
-extern FILE *pgwin32_fopen(const char *, const char *);
-#define		open(a,b,c) pgwin32_open(a,b,c)
-#define		fopen(a,b) pgwin32_fopen(a,b)
-
-/*
- * Mingw-w64 headers #define popen and pclose to _popen and _pclose.  We want
- * to use our popen wrapper, rather than plain _popen, so override that.  For
- * consistency, use our version of pclose, too.
- */
-#ifdef popen
-#undef popen
-#endif
-#ifdef pclose
-#undef pclose
-#endif
-
-/*
- * system() and popen() replacements to enclose the command in an extra
- * pair of quotes.
- */
-extern int	pgwin32_system(const char *command);
-extern FILE *pgwin32_popen(const char *command, const char *type);
-
-#define system(a) pgwin32_system(a)
-#define popen(a,b) pgwin32_popen(a,b)
-#define pclose(a) _pclose(a)
-
-#else							/* !WIN32 */
-
-/*
- *	Win32 requires a special close for sockets and pipes, while on Unix
- *	close() does them all.
- */
-#define closesocket close
-#endif							/* WIN32 */
-
-/*
- * On Windows, setvbuf() does not support _IOLBF mode, and interprets that
- * as _IOFBF.  To add insult to injury, setvbuf(file, NULL, _IOFBF, 0)
- * crashes outright if "parameter validation" is enabled.  Therefore, in
- * places where we'd like to select line-buffered mode, we fall back to
- * unbuffered mode instead on Windows.  Always use PG_IOLBF not _IOLBF
- * directly in order to implement this behavior.
- */
-#ifndef WIN32
-#define PG_IOLBF	_IOLBF
-#else
-#define PG_IOLBF	_IONBF
-#endif
-
-/*
- * Default "extern" declarations or macro substitutes for library routines.
- * When necessary, these routines are provided by files in src/port/.
- */
-
-/* Type to use with fseeko/ftello */
-#ifndef WIN32					/* WIN32 is handled in port/win32_port.h */
-#define pgoff_t off_t
-#endif
-
-#ifndef HAVE_GETPEEREID
-/* On Windows, Perl might have incompatible definitions of uid_t and gid_t. */
-#ifndef PLPERL_HAVE_UID_GID
-extern int	getpeereid(int sock, uid_t *uid, gid_t *gid);
-#endif
-#endif
-
-/*
- * Glibc doesn't use the builtin for clang due to a *gcc* bug in a version
- * newer than the gcc compatibility clang claims to have. This would cause a
- * *lot* of superfluous function calls, therefore revert when using clang. In
- * C++ there's issues with libc++ (not libstdc++), so disable as well.
- */
-#if defined(__clang__) && !defined(__cplusplus)
-/* needs to be separate to not confuse other compilers */
-#if __has_builtin(__builtin_isinf)
-/* need to include before, to avoid getting overwritten */
-#include <math.h>
-#undef isinf
-#define isinf __builtin_isinf
-#endif							/* __has_builtin(isinf) */
-#endif							/* __clang__ && !__cplusplus */
-
-#ifndef HAVE_EXPLICIT_BZERO
-extern void explicit_bzero(void *buf, size_t len);
-#endif
-
-#ifdef HAVE_BUGGY_STRTOF
-extern float pg_strtof(const char *nptr, char **endptr);
-#define strtof(a,b) (pg_strtof((a),(b)))
-#endif
-
-#ifdef WIN32
-/* src/port/win32link.c */
-extern int	link(const char *src, const char *dst);
-#endif
-
-#ifndef HAVE_MKDTEMP
-extern char *mkdtemp(char *path);
-#endif
-
-#ifndef HAVE_INET_ATON
-#include <netinet/in.h>
-#include <arpa/inet.h>
-extern int	inet_aton(const char *cp, struct in_addr *addr);
-#endif
-
-#if !HAVE_DECL_STRLCAT
-extern size_t strlcat(char *dst, const char *src, size_t siz);
-#endif
-
-#if !HAVE_DECL_STRLCPY
-extern size_t strlcpy(char *dst, const char *src, size_t siz);
-#endif
-
-#if !HAVE_DECL_STRNLEN
-extern size_t strnlen(const char *str, size_t maxlen);
-#endif
-
-/* thread.c */
-#ifndef WIN32
-extern bool pg_get_user_name(uid_t user_id, char *buffer, size_t buflen);
-extern bool pg_get_user_home_dir(uid_t user_id, char *buffer, size_t buflen);
-#endif
-
-extern void pg_qsort(void *base, size_t nel, size_t elsize,
-					 int (*cmp) (const void *, const void *));
-extern int	pg_qsort_strcmp(const void *a, const void *b);
-
-#define qsort(a,b,c,d) pg_qsort(a,b,c,d)
-
-typedef int (*qsort_arg_comparator) (const void *a, const void *b, void *arg);
-
-extern void qsort_arg(void *base, size_t nel, size_t elsize,
-					  qsort_arg_comparator cmp, void *arg);
-
-extern void qsort_interruptible(void *base, size_t nel, size_t elsize,
-								qsort_arg_comparator cmp, void *arg);
-
-extern void *bsearch_arg(const void *key, const void *base0,
-						 size_t nmemb, size_t size,
-						 int (*compar) (const void *, const void *, void *),
-						 void *arg);
-
-/* port/chklocale.c */
-extern int	pg_get_encoding_from_locale(const char *ctype, bool write_message);
-
-#if defined(WIN32) && !defined(FRONTEND)
-extern int	pg_codepage_to_encoding(UINT cp);
-#endif
-
-/* port/inet_net_ntop.c */
-extern char *pg_inet_net_ntop(int af, const void *src, int bits,
-							  char *dst, size_t size);
-
-/* port/pg_strong_random.c */
-extern void pg_strong_random_init(void);
-extern bool pg_strong_random(void *buf, size_t len);
-
-/*
- * pg_backend_random used to be a wrapper for pg_strong_random before
- * Postgres 12 for the backend code.
- */
-#define pg_backend_random pg_strong_random
-
-/* port/pgcheckdir.c */
-extern int	pg_check_dir(const char *dir);
-
-/* port/pgmkdirp.c */
-extern int	pg_mkdir_p(char *path, int omode);
-
-/* port/pqsignal.c */
-typedef void (*pqsigfunc) (SIGNAL_ARGS);
-extern pqsigfunc pqsignal(int signo, pqsigfunc func);
-
-/* port/quotes.c */
-extern char *escape_single_quotes_ascii(const char *src);
-
-/* common/wait_error.c */
-extern char *wait_result_to_str(int exitstatus);
-extern bool wait_result_is_signal(int exit_status, int signum);
-extern bool wait_result_is_any_signal(int exit_status, bool include_command_not_found);
-extern int	wait_result_to_exit_code(int exit_status);
-
-/*
- * Interfaces that we assume all Unix system have.  We retain individual macros
- * for better documentation.
- *
- * For symlink-related functions, there is often no need to test these macros,
- * because we provided basic support on Windows that can work with absolute
- * paths to directories.  Code that wants to test for complete symlink support
- * (including relative paths and non-directories) should be conditional on
- * HAVE_READLINK or HAVE_SYMLINK.
- */
-#ifndef WIN32
-#define HAVE_GETRLIMIT 1
-#define HAVE_POLL 1
-#define HAVE_POLL_H 1
-#define HAVE_READLINK 1
-#define HAVE_SETSID 1
-#define HAVE_SHM_OPEN 1
-#define HAVE_SYMLINK 1
-#endif
-
-#endif							/* PG_PORT_H */
diff --git a/contrib/libs/libpq/src/include/port/darwin.h b/contrib/libs/libpq/src/include/port/darwin.h
deleted file mode 100644
index 15fb69d6db..0000000000
--- a/contrib/libs/libpq/src/include/port/darwin.h
+++ /dev/null
@@ -1,8 +0,0 @@
-/* src/include/port/darwin.h */
-
-#define __darwin__	1
-
-#if HAVE_DECL_F_FULLFSYNC		/* not present before macOS 10.3 */
-#define HAVE_FSYNC_WRITETHROUGH
-
-#endif
diff --git a/contrib/libs/libpq/src/include/port/linux.h b/contrib/libs/libpq/src/include/port/linux.h
deleted file mode 100644
index 7a6e46cdbb..0000000000
--- a/contrib/libs/libpq/src/include/port/linux.h
+++ /dev/null
@@ -1,22 +0,0 @@
-/* src/include/port/linux.h */
-
-/*
- * As of July 2007, all known versions of the Linux kernel will sometimes
- * return EIDRM for a shmctl() operation when EINVAL is correct (it happens
- * when the low-order 15 bits of the supplied shm ID match the slot number
- * assigned to a newer shmem segment).  We deal with this by assuming that
- * EIDRM means EINVAL in PGSharedMemoryIsInUse().  This is reasonably safe
- * since in fact Linux has no excuse for ever returning EIDRM; it doesn't
- * track removed segments in a way that would allow distinguishing them from
- * private ones.  But someday that code might get upgraded, and we'd have
- * to have a kernel version test here.
- */
-#define HAVE_LINUX_EIDRM_BUG
-
-/*
- * Set the default wal_sync_method to fdatasync.  With recent Linux versions,
- * xlogdefs.h's normal rules will prefer open_datasync, which (a) doesn't
- * perform better and (b) causes outright failures on ext4 data=journal
- * filesystems, because those don't support O_DIRECT.
- */
-#define PLATFORM_DEFAULT_SYNC_METHOD	SYNC_METHOD_FDATASYNC
diff --git a/contrib/libs/libpq/src/include/port/pg_bitutils.h b/contrib/libs/libpq/src/include/port/pg_bitutils.h
deleted file mode 100644
index 21a4fa0341..0000000000
--- a/contrib/libs/libpq/src/include/port/pg_bitutils.h
+++ /dev/null
@@ -1,339 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * pg_bitutils.h
- *	  Miscellaneous functions for bit-wise operations.
- *
- *
- * Copyright (c) 2019-2023, PostgreSQL Global Development Group
- *
- * src/include/port/pg_bitutils.h
- *
- *-------------------------------------------------------------------------
- */
-#ifndef PG_BITUTILS_H
-#define PG_BITUTILS_H
-
-#ifdef _MSC_VER
-#include <intrin.h>
-#define HAVE_BITSCAN_FORWARD
-#define HAVE_BITSCAN_REVERSE
-
-#else
-#if defined(HAVE__BUILTIN_CTZ)
-#define HAVE_BITSCAN_FORWARD
-#endif
-
-#if defined(HAVE__BUILTIN_CLZ)
-#define HAVE_BITSCAN_REVERSE
-#endif
-#endif							/* _MSC_VER */
-
-extern PGDLLIMPORT const uint8 pg_leftmost_one_pos[256];
-extern PGDLLIMPORT const uint8 pg_rightmost_one_pos[256];
-extern PGDLLIMPORT const uint8 pg_number_of_ones[256];
-
-/*
- * pg_leftmost_one_pos32
- *		Returns the position of the most significant set bit in "word",
- *		measured from the least significant bit.  word must not be 0.
- */
-static inline int
-pg_leftmost_one_pos32(uint32 word)
-{
-#ifdef HAVE__BUILTIN_CLZ
-	Assert(word != 0);
-
-	return 31 - __builtin_clz(word);
-#elif defined(_MSC_VER)
-	unsigned long result;
-	bool		non_zero;
-
-	non_zero = _BitScanReverse(&result, word);
-	Assert(non_zero);
-	return (int) result;
-#else
-	int			shift = 32 - 8;
-
-	Assert(word != 0);
-
-	while ((word >> shift) == 0)
-		shift -= 8;
-
-	return shift + pg_leftmost_one_pos[(word >> shift) & 255];
-#endif							/* HAVE__BUILTIN_CLZ */
-}
-
-/*
- * pg_leftmost_one_pos64
- *		As above, but for a 64-bit word.
- */
-static inline int
-pg_leftmost_one_pos64(uint64 word)
-{
-#ifdef HAVE__BUILTIN_CLZ
-	Assert(word != 0);
-
-#if defined(HAVE_LONG_INT_64)
-	return 63 - __builtin_clzl(word);
-#elif defined(HAVE_LONG_LONG_INT_64)
-	return 63 - __builtin_clzll(word);
-#else
-#error must have a working 64-bit integer datatype
-#endif							/* HAVE_LONG_INT_64 */
-
-#elif defined(_MSC_VER) && (defined(_M_AMD64) || defined(_M_ARM64))
-	unsigned long result;
-	bool		non_zero;
-
-	non_zero = _BitScanReverse64(&result, word);
-	Assert(non_zero);
-	return (int) result;
-#else
-	int			shift = 64 - 8;
-
-	Assert(word != 0);
-
-	while ((word >> shift) == 0)
-		shift -= 8;
-
-	return shift + pg_leftmost_one_pos[(word >> shift) & 255];
-#endif							/* HAVE__BUILTIN_CLZ */
-}
-
-/*
- * pg_rightmost_one_pos32
- *		Returns the position of the least significant set bit in "word",
- *		measured from the least significant bit.  word must not be 0.
- */
-static inline int
-pg_rightmost_one_pos32(uint32 word)
-{
-#ifdef HAVE__BUILTIN_CTZ
-	Assert(word != 0);
-
-	return __builtin_ctz(word);
-#elif defined(_MSC_VER)
-	unsigned long result;
-	bool		non_zero;
-
-	non_zero = _BitScanForward(&result, word);
-	Assert(non_zero);
-	return (int) result;
-#else
-	int			result = 0;
-
-	Assert(word != 0);
-
-	while ((word & 255) == 0)
-	{
-		word >>= 8;
-		result += 8;
-	}
-	result += pg_rightmost_one_pos[word & 255];
-	return result;
-#endif							/* HAVE__BUILTIN_CTZ */
-}
-
-/*
- * pg_rightmost_one_pos64
- *		As above, but for a 64-bit word.
- */
-static inline int
-pg_rightmost_one_pos64(uint64 word)
-{
-#ifdef HAVE__BUILTIN_CTZ
-	Assert(word != 0);
-
-#if defined(HAVE_LONG_INT_64)
-	return __builtin_ctzl(word);
-#elif defined(HAVE_LONG_LONG_INT_64)
-	return __builtin_ctzll(word);
-#else
-#error must have a working 64-bit integer datatype
-#endif							/* HAVE_LONG_INT_64 */
-
-#elif defined(_MSC_VER) && (defined(_M_AMD64) || defined(_M_ARM64))
-	unsigned long result;
-	bool		non_zero;
-
-	non_zero = _BitScanForward64(&result, word);
-	Assert(non_zero);
-	return (int) result;
-#else
-	int			result = 0;
-
-	Assert(word != 0);
-
-	while ((word & 255) == 0)
-	{
-		word >>= 8;
-		result += 8;
-	}
-	result += pg_rightmost_one_pos[word & 255];
-	return result;
-#endif							/* HAVE__BUILTIN_CTZ */
-}
-
-/*
- * pg_nextpower2_32
- *		Returns the next higher power of 2 above 'num', or 'num' if it's
- *		already a power of 2.
- *
- * 'num' mustn't be 0 or be above PG_UINT32_MAX / 2 + 1.
- */
-static inline uint32
-pg_nextpower2_32(uint32 num)
-{
-	Assert(num > 0 && num <= PG_UINT32_MAX / 2 + 1);
-
-	/*
-	 * A power 2 number has only 1 bit set.  Subtracting 1 from such a number
-	 * will turn on all previous bits resulting in no common bits being set
-	 * between num and num-1.
-	 */
-	if ((num & (num - 1)) == 0)
-		return num;				/* already power 2 */
-
-	return ((uint32) 1) << (pg_leftmost_one_pos32(num) + 1);
-}
-
-/*
- * pg_nextpower2_64
- *		Returns the next higher power of 2 above 'num', or 'num' if it's
- *		already a power of 2.
- *
- * 'num' mustn't be 0 or be above PG_UINT64_MAX / 2  + 1.
- */
-static inline uint64
-pg_nextpower2_64(uint64 num)
-{
-	Assert(num > 0 && num <= PG_UINT64_MAX / 2 + 1);
-
-	/*
-	 * A power 2 number has only 1 bit set.  Subtracting 1 from such a number
-	 * will turn on all previous bits resulting in no common bits being set
-	 * between num and num-1.
-	 */
-	if ((num & (num - 1)) == 0)
-		return num;				/* already power 2 */
-
-	return ((uint64) 1) << (pg_leftmost_one_pos64(num) + 1);
-}
-
-/*
- * pg_prevpower2_32
- *		Returns the next lower power of 2 below 'num', or 'num' if it's
- *		already a power of 2.
- *
- * 'num' mustn't be 0.
- */
-static inline uint32
-pg_prevpower2_32(uint32 num)
-{
-	return ((uint32) 1) << pg_leftmost_one_pos32(num);
-}
-
-/*
- * pg_prevpower2_64
- *		Returns the next lower power of 2 below 'num', or 'num' if it's
- *		already a power of 2.
- *
- * 'num' mustn't be 0.
- */
-static inline uint64
-pg_prevpower2_64(uint64 num)
-{
-	return ((uint64) 1) << pg_leftmost_one_pos64(num);
-}
-
-/*
- * pg_ceil_log2_32
- *		Returns equivalent of ceil(log2(num))
- */
-static inline uint32
-pg_ceil_log2_32(uint32 num)
-{
-	if (num < 2)
-		return 0;
-	else
-		return pg_leftmost_one_pos32(num - 1) + 1;
-}
-
-/*
- * pg_ceil_log2_64
- *		Returns equivalent of ceil(log2(num))
- */
-static inline uint64
-pg_ceil_log2_64(uint64 num)
-{
-	if (num < 2)
-		return 0;
-	else
-		return pg_leftmost_one_pos64(num - 1) + 1;
-}
-
-/*
- * With MSVC on x86_64 builds, try using native popcnt instructions via the
- * __popcnt and __popcnt64 intrinsics.  These don't work the same as GCC's
- * __builtin_popcount* intrinsic functions as they always emit popcnt
- * instructions.
- */
-#if defined(_MSC_VER) && defined(_M_AMD64)
-#define HAVE_X86_64_POPCNTQ
-#endif
-
-/*
- * On x86_64, we can use the hardware popcount instruction, but only if
- * we can verify that the CPU supports it via the cpuid instruction.
- *
- * Otherwise, we fall back to a hand-rolled implementation.
- */
-#ifdef HAVE_X86_64_POPCNTQ
-#if defined(HAVE__GET_CPUID) || defined(HAVE__CPUID)
-#define TRY_POPCNT_FAST 1
-#endif
-#endif
-
-#ifdef TRY_POPCNT_FAST
-/* Attempt to use the POPCNT instruction, but perform a runtime check first */
-extern int	(*pg_popcount32) (uint32 word);
-extern int	(*pg_popcount64) (uint64 word);
-
-#else
-/* Use a portable implementation -- no need for a function pointer. */
-extern int	pg_popcount32(uint32 word);
-extern int	pg_popcount64(uint64 word);
-
-#endif							/* TRY_POPCNT_FAST */
-
-/* Count the number of one-bits in a byte array */
-extern uint64 pg_popcount(const char *buf, int bytes);
-
-/*
- * Rotate the bits of "word" to the right/left by n bits.
- */
-static inline uint32
-pg_rotate_right32(uint32 word, int n)
-{
-	return (word >> n) | (word << (32 - n));
-}
-
-static inline uint32
-pg_rotate_left32(uint32 word, int n)
-{
-	return (word << n) | (word >> (32 - n));
-}
-
-/* size_t variants of the above, as required */
-
-#if SIZEOF_SIZE_T == 4
-#define pg_leftmost_one_pos_size_t pg_leftmost_one_pos32
-#define pg_nextpower2_size_t pg_nextpower2_32
-#define pg_prevpower2_size_t pg_prevpower2_32
-#else
-#define pg_leftmost_one_pos_size_t pg_leftmost_one_pos64
-#define pg_nextpower2_size_t pg_nextpower2_64
-#define pg_prevpower2_size_t pg_prevpower2_64
-#endif
-
-#endif							/* PG_BITUTILS_H */
diff --git a/contrib/libs/libpq/src/include/port/pg_bswap.h b/contrib/libs/libpq/src/include/port/pg_bswap.h
deleted file mode 100644
index 80abd750d4..0000000000
--- a/contrib/libs/libpq/src/include/port/pg_bswap.h
+++ /dev/null
@@ -1,161 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * pg_bswap.h
- *	  Byte swapping.
- *
- * Macros for reversing the byte order of 16, 32 and 64-bit unsigned integers.
- * For example, 0xAABBCCDD becomes 0xDDCCBBAA.  These are just wrappers for
- * built-in functions provided by the compiler where support exists.
- *
- * Note that all of these functions accept unsigned integers as arguments and
- * return the same.  Use caution when using these wrapper macros with signed
- * integers.
- *
- * Copyright (c) 2015-2023, PostgreSQL Global Development Group
- *
- * src/include/port/pg_bswap.h
- *
- *-------------------------------------------------------------------------
- */
-#ifndef PG_BSWAP_H
-#define PG_BSWAP_H
-
-
-/*
- * In all supported versions msvc provides _byteswap_* functions in stdlib.h,
- * already included by c.h.
- */
-
-
-/* implementation of uint16 pg_bswap16(uint16) */
-#if defined(HAVE__BUILTIN_BSWAP16)
-
-#define pg_bswap16(x) __builtin_bswap16(x)
-
-#elif defined(_MSC_VER)
-
-#define pg_bswap16(x) _byteswap_ushort(x)
-
-#else
-
-static inline uint16
-pg_bswap16(uint16 x)
-{
-	return
-		((x << 8) & 0xff00) |
-		((x >> 8) & 0x00ff);
-}
-
-#endif							/* HAVE__BUILTIN_BSWAP16 */
-
-
-/* implementation of uint32 pg_bswap32(uint32) */
-#if defined(HAVE__BUILTIN_BSWAP32)
-
-#define pg_bswap32(x) __builtin_bswap32(x)
-
-#elif defined(_MSC_VER)
-
-#define pg_bswap32(x) _byteswap_ulong(x)
-
-#else
-
-static inline uint32
-pg_bswap32(uint32 x)
-{
-	return
-		((x << 24) & 0xff000000) |
-		((x << 8) & 0x00ff0000) |
-		((x >> 8) & 0x0000ff00) |
-		((x >> 24) & 0x000000ff);
-}
-
-#endif							/* HAVE__BUILTIN_BSWAP32 */
-
-
-/* implementation of uint64 pg_bswap64(uint64) */
-#if defined(HAVE__BUILTIN_BSWAP64)
-
-#define pg_bswap64(x) __builtin_bswap64(x)
-
-
-#elif defined(_MSC_VER)
-
-#define pg_bswap64(x) _byteswap_uint64(x)
-
-#else
-
-static inline uint64
-pg_bswap64(uint64 x)
-{
-	return
-		((x << 56) & UINT64CONST(0xff00000000000000)) |
-		((x << 40) & UINT64CONST(0x00ff000000000000)) |
-		((x << 24) & UINT64CONST(0x0000ff0000000000)) |
-		((x << 8) & UINT64CONST(0x000000ff00000000)) |
-		((x >> 8) & UINT64CONST(0x00000000ff000000)) |
-		((x >> 24) & UINT64CONST(0x0000000000ff0000)) |
-		((x >> 40) & UINT64CONST(0x000000000000ff00)) |
-		((x >> 56) & UINT64CONST(0x00000000000000ff));
-}
-#endif							/* HAVE__BUILTIN_BSWAP64 */
-
-
-/*
- * Portable and fast equivalents for ntohs, ntohl, htons, htonl,
- * additionally extended to 64 bits.
- */
-#ifdef WORDS_BIGENDIAN
-
-#define pg_hton16(x)		(x)
-#define pg_hton32(x)		(x)
-#define pg_hton64(x)		(x)
-
-#define pg_ntoh16(x)		(x)
-#define pg_ntoh32(x)		(x)
-#define pg_ntoh64(x)		(x)
-
-#else
-
-#define pg_hton16(x)		pg_bswap16(x)
-#define pg_hton32(x)		pg_bswap32(x)
-#define pg_hton64(x)		pg_bswap64(x)
-
-#define pg_ntoh16(x)		pg_bswap16(x)
-#define pg_ntoh32(x)		pg_bswap32(x)
-#define pg_ntoh64(x)		pg_bswap64(x)
-
-#endif							/* WORDS_BIGENDIAN */
-
-
-/*
- * Rearrange the bytes of a Datum from big-endian order into the native byte
- * order.  On big-endian machines, this does nothing at all.  Note that the C
- * type Datum is an unsigned integer type on all platforms.
- *
- * One possible application of the DatumBigEndianToNative() macro is to make
- * bitwise comparisons cheaper.  A simple 3-way comparison of Datums
- * transformed by the macro (based on native, unsigned comparisons) will return
- * the same result as a memcmp() of the corresponding original Datums, but can
- * be much cheaper.  It's generally safe to do this on big-endian systems
- * without any special transformation occurring first.
- *
- * If SIZEOF_DATUM is not defined, then postgres.h wasn't included and these
- * macros probably shouldn't be used, so we define nothing.  Note that
- * SIZEOF_DATUM == 8 would evaluate as 0 == 8 in that case, potentially
- * leading to the wrong implementation being selected and confusing errors, so
- * defining nothing is safest.
- */
-#ifdef SIZEOF_DATUM
-#ifdef WORDS_BIGENDIAN
-#define		DatumBigEndianToNative(x)	(x)
-#else							/* !WORDS_BIGENDIAN */
-#if SIZEOF_DATUM == 8
-#define		DatumBigEndianToNative(x)	pg_bswap64(x)
-#else							/* SIZEOF_DATUM != 8 */
-#define		DatumBigEndianToNative(x)	pg_bswap32(x)
-#endif							/* SIZEOF_DATUM == 8 */
-#endif							/* WORDS_BIGENDIAN */
-#endif							/* SIZEOF_DATUM */
-
-#endif							/* PG_BSWAP_H */
diff --git a/contrib/libs/libpq/src/include/port/pg_crc32c.h b/contrib/libs/libpq/src/include/port/pg_crc32c.h
deleted file mode 100644
index 7f8779261c..0000000000
--- a/contrib/libs/libpq/src/include/port/pg_crc32c.h
+++ /dev/null
@@ -1,101 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * pg_crc32c.h
- *	  Routines for computing CRC-32C checksums.
- *
- * The speed of CRC-32C calculation has a big impact on performance, so we
- * jump through some hoops to get the best implementation for each
- * platform. Some CPU architectures have special instructions for speeding
- * up CRC calculations (e.g. Intel SSE 4.2), on other platforms we use the
- * Slicing-by-8 algorithm which uses lookup tables.
- *
- * The public interface consists of four macros:
- *
- * INIT_CRC32C(crc)
- *		Initialize a CRC accumulator
- *
- * COMP_CRC32C(crc, data, len)
- *		Accumulate some (more) bytes into a CRC
- *
- * FIN_CRC32C(crc)
- *		Finish a CRC calculation
- *
- * EQ_CRC32C(c1, c2)
- *		Check for equality of two CRCs.
- *
- * Portions Copyright (c) 1996-2023, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- * src/include/port/pg_crc32c.h
- *
- *-------------------------------------------------------------------------
- */
-#ifndef PG_CRC32C_H
-#define PG_CRC32C_H
-
-#include "port/pg_bswap.h"
-
-typedef uint32 pg_crc32c;
-
-/* The INIT and EQ macros are the same for all implementations. */
-#define INIT_CRC32C(crc) ((crc) = 0xFFFFFFFF)
-#define EQ_CRC32C(c1, c2) ((c1) == (c2))
-
-#if defined(USE_SSE42_CRC32C)
-/* Use Intel SSE4.2 instructions. */
-#define COMP_CRC32C(crc, data, len) \
-	((crc) = pg_comp_crc32c_sse42((crc), (data), (len)))
-#define FIN_CRC32C(crc) ((crc) ^= 0xFFFFFFFF)
-
-extern pg_crc32c pg_comp_crc32c_sse42(pg_crc32c crc, const void *data, size_t len);
-
-#elif defined(USE_ARMV8_CRC32C)
-/* Use ARMv8 CRC Extension instructions. */
-
-#define COMP_CRC32C(crc, data, len)							\
-	((crc) = pg_comp_crc32c_armv8((crc), (data), (len)))
-#define FIN_CRC32C(crc) ((crc) ^= 0xFFFFFFFF)
-
-extern pg_crc32c pg_comp_crc32c_armv8(pg_crc32c crc, const void *data, size_t len);
-
-#elif defined(USE_SSE42_CRC32C_WITH_RUNTIME_CHECK) || defined(USE_ARMV8_CRC32C_WITH_RUNTIME_CHECK)
-
-/*
- * Use Intel SSE 4.2 or ARMv8 instructions, but perform a runtime check first
- * to check that they are available.
- */
-#define COMP_CRC32C(crc, data, len) \
-	((crc) = pg_comp_crc32c((crc), (data), (len)))
-#define FIN_CRC32C(crc) ((crc) ^= 0xFFFFFFFF)
-
-extern pg_crc32c pg_comp_crc32c_sb8(pg_crc32c crc, const void *data, size_t len);
-extern pg_crc32c (*pg_comp_crc32c) (pg_crc32c crc, const void *data, size_t len);
-
-#ifdef USE_SSE42_CRC32C_WITH_RUNTIME_CHECK
-extern pg_crc32c pg_comp_crc32c_sse42(pg_crc32c crc, const void *data, size_t len);
-#endif
-#ifdef USE_ARMV8_CRC32C_WITH_RUNTIME_CHECK
-extern pg_crc32c pg_comp_crc32c_armv8(pg_crc32c crc, const void *data, size_t len);
-#endif
-
-#else
-/*
- * Use slicing-by-8 algorithm.
- *
- * On big-endian systems, the intermediate value is kept in reverse byte
- * order, to avoid byte-swapping during the calculation. FIN_CRC32C reverses
- * the bytes to the final order.
- */
-#define COMP_CRC32C(crc, data, len) \
-	((crc) = pg_comp_crc32c_sb8((crc), (data), (len)))
-#ifdef WORDS_BIGENDIAN
-#define FIN_CRC32C(crc) ((crc) = pg_bswap32(crc) ^ 0xFFFFFFFF)
-#else
-#define FIN_CRC32C(crc) ((crc) ^= 0xFFFFFFFF)
-#endif
-
-extern pg_crc32c pg_comp_crc32c_sb8(pg_crc32c crc, const void *data, size_t len);
-
-#endif
-
-#endif							/* PG_CRC32C_H */
diff --git a/contrib/libs/libpq/src/include/port/pg_iovec.h b/contrib/libs/libpq/src/include/port/pg_iovec.h
deleted file mode 100644
index 689799c425..0000000000
--- a/contrib/libs/libpq/src/include/port/pg_iovec.h
+++ /dev/null
@@ -1,55 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * pg_iovec.h
- *	  Header for vectored I/O functions, to use in place of <sys/uio.h>.
- *
- * Portions Copyright (c) 1996-2023, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- * src/include/port/pg_iovec.h
- *
- *-------------------------------------------------------------------------
- */
-#ifndef PG_IOVEC_H
-#define PG_IOVEC_H
-
-#ifndef WIN32
-
-#include <limits.h>
-#include <sys/uio.h>
-
-#else
-
-/* POSIX requires at least 16 as a maximum iovcnt. */
-#define IOV_MAX 16
-
-/* Define our own POSIX-compatible iovec struct. */
-struct iovec
-{
-	void	   *iov_base;
-	size_t		iov_len;
-};
-
-#endif
-
-/* Define a reasonable maximum that is safe to use on the stack. */
-#define PG_IOV_MAX Min(IOV_MAX, 32)
-
-/*
- * Note that pg_preadv and pg_pwritev have a pg_ prefix as a warning that the
- * Windows implementations have the side-effect of changing the file position.
- */
-
-#if HAVE_DECL_PREADV
-#define pg_preadv preadv
-#else
-extern ssize_t pg_preadv(int fd, const struct iovec *iov, int iovcnt, off_t offset);
-#endif
-
-#if HAVE_DECL_PWRITEV
-#define pg_pwritev pwritev
-#else
-extern ssize_t pg_pwritev(int fd, const struct iovec *iov, int iovcnt, off_t offset);
-#endif
-
-#endif							/* PG_IOVEC_H */
diff --git a/contrib/libs/libpq/src/include/port/pg_lfind.h b/contrib/libs/libpq/src/include/port/pg_lfind.h
deleted file mode 100644
index 59aa8245ed..0000000000
--- a/contrib/libs/libpq/src/include/port/pg_lfind.h
+++ /dev/null
@@ -1,180 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * pg_lfind.h
- *	  Optimized linear search routines using SIMD intrinsics where
- *	  available.
- *
- * Copyright (c) 2022-2023, PostgreSQL Global Development Group
- *
- * IDENTIFICATION
- *	  src/include/port/pg_lfind.h
- *
- *-------------------------------------------------------------------------
- */
-#ifndef PG_LFIND_H
-#define PG_LFIND_H
-
-#include "port/simd.h"
-
-/*
- * pg_lfind8
- *
- * Return true if there is an element in 'base' that equals 'key', otherwise
- * return false.
- */
-static inline bool
-pg_lfind8(uint8 key, uint8 *base, uint32 nelem)
-{
-	uint32		i;
-
-	/* round down to multiple of vector length */
-	uint32		tail_idx = nelem & ~(sizeof(Vector8) - 1);
-	Vector8		chunk;
-
-	for (i = 0; i < tail_idx; i += sizeof(Vector8))
-	{
-		vector8_load(&chunk, &base[i]);
-		if (vector8_has(chunk, key))
-			return true;
-	}
-
-	/* Process the remaining elements one at a time. */
-	for (; i < nelem; i++)
-	{
-		if (key == base[i])
-			return true;
-	}
-
-	return false;
-}
-
-/*
- * pg_lfind8_le
- *
- * Return true if there is an element in 'base' that is less than or equal to
- * 'key', otherwise return false.
- */
-static inline bool
-pg_lfind8_le(uint8 key, uint8 *base, uint32 nelem)
-{
-	uint32		i;
-
-	/* round down to multiple of vector length */
-	uint32		tail_idx = nelem & ~(sizeof(Vector8) - 1);
-	Vector8		chunk;
-
-	for (i = 0; i < tail_idx; i += sizeof(Vector8))
-	{
-		vector8_load(&chunk, &base[i]);
-		if (vector8_has_le(chunk, key))
-			return true;
-	}
-
-	/* Process the remaining elements one at a time. */
-	for (; i < nelem; i++)
-	{
-		if (base[i] <= key)
-			return true;
-	}
-
-	return false;
-}
-
-/*
- * pg_lfind32
- *
- * Return true if there is an element in 'base' that equals 'key', otherwise
- * return false.
- */
-static inline bool
-pg_lfind32(uint32 key, uint32 *base, uint32 nelem)
-{
-	uint32		i = 0;
-
-#ifndef USE_NO_SIMD
-
-	/*
-	 * For better instruction-level parallelism, each loop iteration operates
-	 * on a block of four registers.  Testing for SSE2 has showed this is ~40%
-	 * faster than using a block of two registers.
-	 */
-	const Vector32 keys = vector32_broadcast(key);	/* load copies of key */
-	const uint32 nelem_per_vector = sizeof(Vector32) / sizeof(uint32);
-	const uint32 nelem_per_iteration = 4 * nelem_per_vector;
-
-	/* round down to multiple of elements per iteration */
-	const uint32 tail_idx = nelem & ~(nelem_per_iteration - 1);
-
-#if defined(USE_ASSERT_CHECKING)
-	bool		assert_result = false;
-
-	/* pre-compute the result for assert checking */
-	for (i = 0; i < nelem; i++)
-	{
-		if (key == base[i])
-		{
-			assert_result = true;
-			break;
-		}
-	}
-#endif
-
-	for (i = 0; i < tail_idx; i += nelem_per_iteration)
-	{
-		Vector32	vals1,
-					vals2,
-					vals3,
-					vals4,
-					result1,
-					result2,
-					result3,
-					result4,
-					tmp1,
-					tmp2,
-					result;
-
-		/* load the next block into 4 registers */
-		vector32_load(&vals1, &base[i]);
-		vector32_load(&vals2, &base[i + nelem_per_vector]);
-		vector32_load(&vals3, &base[i + nelem_per_vector * 2]);
-		vector32_load(&vals4, &base[i + nelem_per_vector * 3]);
-
-		/* compare each value to the key */
-		result1 = vector32_eq(keys, vals1);
-		result2 = vector32_eq(keys, vals2);
-		result3 = vector32_eq(keys, vals3);
-		result4 = vector32_eq(keys, vals4);
-
-		/* combine the results into a single variable */
-		tmp1 = vector32_or(result1, result2);
-		tmp2 = vector32_or(result3, result4);
-		result = vector32_or(tmp1, tmp2);
-
-		/* see if there was a match */
-		if (vector32_is_highbit_set(result))
-		{
-			Assert(assert_result == true);
-			return true;
-		}
-	}
-#endif							/* ! USE_NO_SIMD */
-
-	/* Process the remaining elements one at a time. */
-	for (; i < nelem; i++)
-	{
-		if (key == base[i])
-		{
-#ifndef USE_NO_SIMD
-			Assert(assert_result == true);
-#endif
-			return true;
-		}
-	}
-
-#ifndef USE_NO_SIMD
-	Assert(assert_result == false);
-#endif
-	return false;
-}
-
-#endif							/* PG_LFIND_H */
diff --git a/contrib/libs/libpq/src/include/port/simd.h b/contrib/libs/libpq/src/include/port/simd.h
deleted file mode 100644
index 1fa6c3bc6c..0000000000
--- a/contrib/libs/libpq/src/include/port/simd.h
+++ /dev/null
@@ -1,375 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * simd.h
- *	  Support for platform-specific vector operations.
- *
- * Portions Copyright (c) 1996-2023, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- * src/include/port/simd.h
- *
- * NOTES
- * - VectorN in this file refers to a register where the element operands
- * are N bits wide. The vector width is platform-specific, so users that care
- * about that will need to inspect "sizeof(VectorN)".
- *
- *-------------------------------------------------------------------------
- */
-#ifndef SIMD_H
-#define SIMD_H
-
-#if (defined(__x86_64__) || defined(_M_AMD64))
-/*
- * SSE2 instructions are part of the spec for the 64-bit x86 ISA. We assume
- * that compilers targeting this architecture understand SSE2 intrinsics.
- *
- * We use emmintrin.h rather than the comprehensive header immintrin.h in
- * order to exclude extensions beyond SSE2. This is because MSVC, at least,
- * will allow the use of intrinsics that haven't been enabled at compile
- * time.
- */
-#include <emmintrin.h>
-#define USE_SSE2
-typedef __m128i Vector8;
-typedef __m128i Vector32;
-
-#elif defined(__aarch64__) && defined(__ARM_NEON)
-/*
- * We use the Neon instructions if the compiler provides access to them (as
- * indicated by __ARM_NEON) and we are on aarch64.  While Neon support is
- * technically optional for aarch64, it appears that all available 64-bit
- * hardware does have it.  Neon exists in some 32-bit hardware too, but we
- * could not realistically use it there without a run-time check, which seems
- * not worth the trouble for now.
- */
-#include <arm_neon.h>
-#define USE_NEON
-typedef uint8x16_t Vector8;
-typedef uint32x4_t Vector32;
-
-#else
-/*
- * If no SIMD instructions are available, we can in some cases emulate vector
- * operations using bitwise operations on unsigned integers.  Note that many
- * of the functions in this file presently do not have non-SIMD
- * implementations.  In particular, none of the functions involving Vector32
- * are implemented without SIMD since it's likely not worthwhile to represent
- * two 32-bit integers using a uint64.
- */
-#define USE_NO_SIMD
-typedef uint64 Vector8;
-#endif
-
-/* load/store operations */
-static inline void vector8_load(Vector8 *v, const uint8 *s);
-#ifndef USE_NO_SIMD
-static inline void vector32_load(Vector32 *v, const uint32 *s);
-#endif
-
-/* assignment operations */
-static inline Vector8 vector8_broadcast(const uint8 c);
-#ifndef USE_NO_SIMD
-static inline Vector32 vector32_broadcast(const uint32 c);
-#endif
-
-/* element-wise comparisons to a scalar */
-static inline bool vector8_has(const Vector8 v, const uint8 c);
-static inline bool vector8_has_zero(const Vector8 v);
-static inline bool vector8_has_le(const Vector8 v, const uint8 c);
-static inline bool vector8_is_highbit_set(const Vector8 v);
-#ifndef USE_NO_SIMD
-static inline bool vector32_is_highbit_set(const Vector32 v);
-#endif
-
-/* arithmetic operations */
-static inline Vector8 vector8_or(const Vector8 v1, const Vector8 v2);
-#ifndef USE_NO_SIMD
-static inline Vector32 vector32_or(const Vector32 v1, const Vector32 v2);
-static inline Vector8 vector8_ssub(const Vector8 v1, const Vector8 v2);
-#endif
-
-/*
- * comparisons between vectors
- *
- * Note: These return a vector rather than boolean, which is why we don't
- * have non-SIMD implementations.
- */
-#ifndef USE_NO_SIMD
-static inline Vector8 vector8_eq(const Vector8 v1, const Vector8 v2);
-static inline Vector32 vector32_eq(const Vector32 v1, const Vector32 v2);
-#endif
-
-/*
- * Load a chunk of memory into the given vector.
- */
-static inline void
-vector8_load(Vector8 *v, const uint8 *s)
-{
-#if defined(USE_SSE2)
-	*v = _mm_loadu_si128((const __m128i *) s);
-#elif defined(USE_NEON)
-	*v = vld1q_u8(s);
-#else
-	memcpy(v, s, sizeof(Vector8));
-#endif
-}
-
-#ifndef USE_NO_SIMD
-static inline void
-vector32_load(Vector32 *v, const uint32 *s)
-{
-#ifdef USE_SSE2
-	*v = _mm_loadu_si128((const __m128i *) s);
-#elif defined(USE_NEON)
-	*v = vld1q_u32(s);
-#endif
-}
-#endif							/* ! USE_NO_SIMD */
-
-/*
- * Create a vector with all elements set to the same value.
- */
-static inline Vector8
-vector8_broadcast(const uint8 c)
-{
-#if defined(USE_SSE2)
-	return _mm_set1_epi8(c);
-#elif defined(USE_NEON)
-	return vdupq_n_u8(c);
-#else
-	return ~UINT64CONST(0) / 0xFF * c;
-#endif
-}
-
-#ifndef USE_NO_SIMD
-static inline Vector32
-vector32_broadcast(const uint32 c)
-{
-#ifdef USE_SSE2
-	return _mm_set1_epi32(c);
-#elif defined(USE_NEON)
-	return vdupq_n_u32(c);
-#endif
-}
-#endif							/* ! USE_NO_SIMD */
-
-/*
- * Return true if any elements in the vector are equal to the given scalar.
- */
-static inline bool
-vector8_has(const Vector8 v, const uint8 c)
-{
-	bool		result;
-
-	/* pre-compute the result for assert checking */
-#ifdef USE_ASSERT_CHECKING
-	bool		assert_result = false;
-
-	for (Size i = 0; i < sizeof(Vector8); i++)
-	{
-		if (((const uint8 *) &v)[i] == c)
-		{
-			assert_result = true;
-			break;
-		}
-	}
-#endif							/* USE_ASSERT_CHECKING */
-
-#if defined(USE_NO_SIMD)
-	/* any bytes in v equal to c will evaluate to zero via XOR */
-	result = vector8_has_zero(v ^ vector8_broadcast(c));
-#else
-	result = vector8_is_highbit_set(vector8_eq(v, vector8_broadcast(c)));
-#endif
-
-	Assert(assert_result == result);
-	return result;
-}
-
-/*
- * Convenience function equivalent to vector8_has(v, 0)
- */
-static inline bool
-vector8_has_zero(const Vector8 v)
-{
-#if defined(USE_NO_SIMD)
-	/*
-	 * We cannot call vector8_has() here, because that would lead to a
-	 * circular definition.
-	 */
-	return vector8_has_le(v, 0);
-#else
-	return vector8_has(v, 0);
-#endif
-}
-
-/*
- * Return true if any elements in the vector are less than or equal to the
- * given scalar.
- */
-static inline bool
-vector8_has_le(const Vector8 v, const uint8 c)
-{
-	bool		result = false;
-
-	/* pre-compute the result for assert checking */
-#ifdef USE_ASSERT_CHECKING
-	bool		assert_result = false;
-
-	for (Size i = 0; i < sizeof(Vector8); i++)
-	{
-		if (((const uint8 *) &v)[i] <= c)
-		{
-			assert_result = true;
-			break;
-		}
-	}
-#endif							/* USE_ASSERT_CHECKING */
-
-#if defined(USE_NO_SIMD)
-
-	/*
-	 * To find bytes <= c, we can use bitwise operations to find bytes < c+1,
-	 * but it only works if c+1 <= 128 and if the highest bit in v is not set.
-	 * Adapted from
-	 * https://graphics.stanford.edu/~seander/bithacks.html#HasLessInWord
-	 */
-	if ((int64) v >= 0 && c < 0x80)
-		result = (v - vector8_broadcast(c + 1)) & ~v & vector8_broadcast(0x80);
-	else
-	{
-		/* one byte at a time */
-		for (Size i = 0; i < sizeof(Vector8); i++)
-		{
-			if (((const uint8 *) &v)[i] <= c)
-			{
-				result = true;
-				break;
-			}
-		}
-	}
-#else
-
-	/*
-	 * Use saturating subtraction to find bytes <= c, which will present as
-	 * NUL bytes.  This approach is a workaround for the lack of unsigned
-	 * comparison instructions on some architectures.
-	 */
-	result = vector8_has_zero(vector8_ssub(v, vector8_broadcast(c)));
-#endif
-
-	Assert(assert_result == result);
-	return result;
-}
-
-/*
- * Return true if the high bit of any element is set
- */
-static inline bool
-vector8_is_highbit_set(const Vector8 v)
-{
-#ifdef USE_SSE2
-	return _mm_movemask_epi8(v) != 0;
-#elif defined(USE_NEON)
-	return vmaxvq_u8(v) > 0x7F;
-#else
-	return v & vector8_broadcast(0x80);
-#endif
-}
-
-/*
- * Exactly like vector8_is_highbit_set except for the input type, so it
- * looks at each byte separately.
- *
- * XXX x86 uses the same underlying type for 8-bit, 16-bit, and 32-bit
- * integer elements, but Arm does not, hence the need for a separate
- * function. We could instead adopt the behavior of Arm's vmaxvq_u32(), i.e.
- * check each 32-bit element, but that would require an additional mask
- * operation on x86.
- */
-#ifndef USE_NO_SIMD
-static inline bool
-vector32_is_highbit_set(const Vector32 v)
-{
-#if defined(USE_NEON)
-	return vector8_is_highbit_set((Vector8) v);
-#else
-	return vector8_is_highbit_set(v);
-#endif
-}
-#endif							/* ! USE_NO_SIMD */
-
-/*
- * Return the bitwise OR of the inputs
- */
-static inline Vector8
-vector8_or(const Vector8 v1, const Vector8 v2)
-{
-#ifdef USE_SSE2
-	return _mm_or_si128(v1, v2);
-#elif defined(USE_NEON)
-	return vorrq_u8(v1, v2);
-#else
-	return v1 | v2;
-#endif
-}
-
-#ifndef USE_NO_SIMD
-static inline Vector32
-vector32_or(const Vector32 v1, const Vector32 v2)
-{
-#ifdef USE_SSE2
-	return _mm_or_si128(v1, v2);
-#elif defined(USE_NEON)
-	return vorrq_u32(v1, v2);
-#endif
-}
-#endif							/* ! USE_NO_SIMD */
-
-/*
- * Return the result of subtracting the respective elements of the input
- * vectors using saturation (i.e., if the operation would yield a value less
- * than zero, zero is returned instead).  For more information on saturation
- * arithmetic, see https://en.wikipedia.org/wiki/Saturation_arithmetic
- */
-#ifndef USE_NO_SIMD
-static inline Vector8
-vector8_ssub(const Vector8 v1, const Vector8 v2)
-{
-#ifdef USE_SSE2
-	return _mm_subs_epu8(v1, v2);
-#elif defined(USE_NEON)
-	return vqsubq_u8(v1, v2);
-#endif
-}
-#endif							/* ! USE_NO_SIMD */
-
-/*
- * Return a vector with all bits set in each lane where the corresponding
- * lanes in the inputs are equal.
- */
-#ifndef USE_NO_SIMD
-static inline Vector8
-vector8_eq(const Vector8 v1, const Vector8 v2)
-{
-#ifdef USE_SSE2
-	return _mm_cmpeq_epi8(v1, v2);
-#elif defined(USE_NEON)
-	return vceqq_u8(v1, v2);
-#endif
-}
-#endif							/* ! USE_NO_SIMD */
-
-#ifndef USE_NO_SIMD
-static inline Vector32
-vector32_eq(const Vector32 v1, const Vector32 v2)
-{
-#ifdef USE_SSE2
-	return _mm_cmpeq_epi32(v1, v2);
-#elif defined(USE_NEON)
-	return vceqq_u32(v1, v2);
-#endif
-}
-#endif							/* ! USE_NO_SIMD */
-
-#endif							/* SIMD_H */
diff --git a/contrib/libs/libpq/src/include/port/win32.h b/contrib/libs/libpq/src/include/port/win32.h
deleted file mode 100644
index 5867e5622f..0000000000
--- a/contrib/libs/libpq/src/include/port/win32.h
+++ /dev/null
@@ -1,60 +0,0 @@
-/* src/include/port/win32.h */
-#pragma once
-
-/*
- * We always rely on the WIN32 macro being set by our build system,
- * but _WIN32 is the compiler pre-defined macro. So make sure we define
- * WIN32 whenever _WIN32 is set, to facilitate standalone building.
- */
-#if defined(_WIN32) && !defined(WIN32)
-#define WIN32
-#endif
-
-/*
- * Make sure _WIN32_WINNT has the minimum required value.
- * Leave a higher value in place.  The minimum requirement is Windows 10.
- */
-#ifdef _WIN32_WINNT
-#undef _WIN32_WINNT
-#endif
-
-#define _WIN32_WINNT 0x0A00
-
-/*
- * We need to prevent <crtdefs.h> from defining a symbol conflicting with
- * our errcode() function.  Since it's likely to get included by standard
- * system headers, pre-emptively include it now.
- */
-#if defined(_MSC_VER) || defined(HAVE_CRTDEFS_H)
-#define errcode __msvc_errcode
-#include <crtdefs.h>
-#undef errcode
-#endif
-
-/*
- * defines for dynamic linking on Win32 platform
- */
-
-/*
- * Variables declared in the core backend and referenced by loadable
- * modules need to be marked "dllimport" in the core build, but
- * "dllexport" when the declaration is read in a loadable module.
- * No special markings should be used when compiling frontend code.
- */
-#ifndef FRONTEND
-#ifdef BUILDING_DLL
-#define PGDLLIMPORT __declspec (dllexport)
-#else
-#define PGDLLIMPORT __declspec (dllimport)
-#endif
-#endif
-
-/*
- * Functions exported by a loadable module must be marked "dllexport".
- *
- * While mingw would otherwise fall back to
- * __attribute__((visibility("default"))), that appears to only work as long
- * as no symbols are declared with __declspec(dllexport). But we can end up
- * with some, e.g. plpython's Py_Init.
- */
-#define PGDLLEXPORT __declspec (dllexport)
diff --git a/contrib/libs/libpq/src/include/port/win32/arpa/inet.h b/contrib/libs/libpq/src/include/port/win32/arpa/inet.h
deleted file mode 100644
index ad1803179c..0000000000
--- a/contrib/libs/libpq/src/include/port/win32/arpa/inet.h
+++ /dev/null
@@ -1,3 +0,0 @@
-/* src/include/port/win32/arpa/inet.h */
-
-#include <sys/socket.h>
diff --git a/contrib/libs/libpq/src/include/port/win32/netdb.h b/contrib/libs/libpq/src/include/port/win32/netdb.h
deleted file mode 100644
index 9ed13e457b..0000000000
--- a/contrib/libs/libpq/src/include/port/win32/netdb.h
+++ /dev/null
@@ -1,7 +0,0 @@
-/* src/include/port/win32/netdb.h */
-#ifndef WIN32_NETDB_H
-#define WIN32_NETDB_H
-
-#include <ws2tcpip.h>
-
-#endif
diff --git a/contrib/libs/libpq/src/include/port/win32/netinet/in.h b/contrib/libs/libpq/src/include/port/win32/netinet/in.h
deleted file mode 100644
index a4e22f89f4..0000000000
--- a/contrib/libs/libpq/src/include/port/win32/netinet/in.h
+++ /dev/null
@@ -1,3 +0,0 @@
-/* src/include/port/win32/netinet/in.h */
-
-#include <sys/socket.h>
diff --git a/contrib/libs/libpq/src/include/port/win32/netinet/tcp.h b/contrib/libs/libpq/src/include/port/win32/netinet/tcp.h
deleted file mode 100644
index 1d377b6adc..0000000000
--- a/contrib/libs/libpq/src/include/port/win32/netinet/tcp.h
+++ /dev/null
@@ -1,7 +0,0 @@
-/* src/include/port/win32/netinet/tcp.h */
-#ifndef WIN32_NETINET_TCP_H
-#define WIN32_NETINET_TCP_H
-
-#include <sys/socket.h>
-
-#endif
diff --git a/contrib/libs/libpq/src/include/port/win32/pwd.h b/contrib/libs/libpq/src/include/port/win32/pwd.h
deleted file mode 100644
index b8c7178fc0..0000000000
--- a/contrib/libs/libpq/src/include/port/win32/pwd.h
+++ /dev/null
@@ -1,3 +0,0 @@
-/*
- * src/include/port/win32/pwd.h
- */
diff --git a/contrib/libs/libpq/src/include/port/win32/sys/select.h b/contrib/libs/libpq/src/include/port/win32/sys/select.h
deleted file mode 100644
index f8a877accd..0000000000
--- a/contrib/libs/libpq/src/include/port/win32/sys/select.h
+++ /dev/null
@@ -1,3 +0,0 @@
-/*
- * src/include/port/win32/sys/select.h
- */
diff --git a/contrib/libs/libpq/src/include/port/win32/sys/socket.h b/contrib/libs/libpq/src/include/port/win32/sys/socket.h
deleted file mode 100644
index 0c32c0f7b2..0000000000
--- a/contrib/libs/libpq/src/include/port/win32/sys/socket.h
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- * src/include/port/win32/sys/socket.h
- */
-#ifndef WIN32_SYS_SOCKET_H
-#define WIN32_SYS_SOCKET_H
-
-/*
- * Unfortunately, <wingdi.h> of VC++ also defines ERROR.
- * To avoid the conflict, we include <windows.h> here and undefine ERROR
- * immediately.
- *
- * Note: Don't include <wingdi.h> directly.  It causes compile errors.
- */
-#include <winsock2.h>
-#include <ws2tcpip.h>
-#include <windows.h>
-
-#undef ERROR
-#undef small
-
-/* Restore old ERROR value */
-#ifdef PGERROR
-#define ERROR PGERROR
-#endif
-
-#endif							/* WIN32_SYS_SOCKET_H */
diff --git a/contrib/libs/libpq/src/include/port/win32/sys/un.h b/contrib/libs/libpq/src/include/port/win32/sys/un.h
deleted file mode 100644
index 4fc13a23fd..0000000000
--- a/contrib/libs/libpq/src/include/port/win32/sys/un.h
+++ /dev/null
@@ -1,17 +0,0 @@
-/*
- * src/include/port/win32/sys/un.h
- */
-#ifndef WIN32_SYS_UN_H
-#define WIN32_SYS_UN_H
-
-/*
- * Windows defines this structure in <afunix.h>, but not all tool chains have
- * the header yet, so we define it here for now.
- */
-struct sockaddr_un
-{
-	unsigned short sun_family;
-	char		sun_path[108];
-};
-
-#endif
diff --git a/contrib/libs/libpq/src/include/port/win32/sys/wait.h b/contrib/libs/libpq/src/include/port/win32/sys/wait.h
deleted file mode 100644
index eaeb5661c9..0000000000
--- a/contrib/libs/libpq/src/include/port/win32/sys/wait.h
+++ /dev/null
@@ -1,3 +0,0 @@
-/*
- * src/include/port/win32/sys/wait.h
- */
diff --git a/contrib/libs/libpq/src/include/port/win32_msvc/dirent.h b/contrib/libs/libpq/src/include/port/win32_msvc/dirent.h
deleted file mode 100644
index 62799db001..0000000000
--- a/contrib/libs/libpq/src/include/port/win32_msvc/dirent.h
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Headers for port/dirent.c, win32 native implementation of dirent functions
- *
- * src/include/port/win32_msvc/dirent.h
- */
-
-#ifndef _WIN32VC_DIRENT_H
-#define _WIN32VC_DIRENT_H
-struct dirent
-{
-	long		d_ino;
-	unsigned short d_reclen;
-	unsigned char d_type;
-	unsigned short d_namlen;
-	char		d_name[MAX_PATH];
-};
-
-typedef struct DIR DIR;
-
-DIR		   *opendir(const char *);
-struct dirent *readdir(DIR *);
-int			closedir(DIR *);
-
-/* File types for 'd_type'.  */
-#define DT_UNKNOWN		0
-#define DT_FIFO		1
-#define DT_CHR			2
-#define DT_DIR			4
-#define DT_BLK			6
-#define DT_REG			8
-#define DT_LNK			10
-#define DT_SOCK		12
-#define DT_WHT			14
-#endif
diff --git a/contrib/libs/libpq/src/include/port/win32_msvc/sys/file.h b/contrib/libs/libpq/src/include/port/win32_msvc/sys/file.h
deleted file mode 100644
index 76be3e7774..0000000000
--- a/contrib/libs/libpq/src/include/port/win32_msvc/sys/file.h
+++ /dev/null
@@ -1 +0,0 @@
-/* src/include/port/win32_msvc/sys/file.h */
diff --git a/contrib/libs/libpq/src/include/port/win32_msvc/sys/param.h b/contrib/libs/libpq/src/include/port/win32_msvc/sys/param.h
deleted file mode 100644
index 160df3b25e..0000000000
--- a/contrib/libs/libpq/src/include/port/win32_msvc/sys/param.h
+++ /dev/null
@@ -1 +0,0 @@
-/* src/include/port/win32_msvc/sys/param.h */
diff --git a/contrib/libs/libpq/src/include/port/win32_msvc/sys/time.h b/contrib/libs/libpq/src/include/port/win32_msvc/sys/time.h
deleted file mode 100644
index 9d943ecc6f..0000000000
--- a/contrib/libs/libpq/src/include/port/win32_msvc/sys/time.h
+++ /dev/null
@@ -1 +0,0 @@
-/* src/include/port/win32_msvc/sys/time.h */
diff --git a/contrib/libs/libpq/src/include/port/win32_msvc/unistd.h b/contrib/libs/libpq/src/include/port/win32_msvc/unistd.h
deleted file mode 100644
index b7795ba03c..0000000000
--- a/contrib/libs/libpq/src/include/port/win32_msvc/unistd.h
+++ /dev/null
@@ -1,9 +0,0 @@
-/* src/include/port/win32_msvc/unistd.h */
-
-/*
- * MSVC does not define these, nor does _fileno(stdin) etc reliably work
- * (returns -1 if stdin/out/err are closed).
- */
-#define STDIN_FILENO	0
-#define STDOUT_FILENO	1
-#define STDERR_FILENO	2
diff --git a/contrib/libs/libpq/src/include/port/win32_port.h b/contrib/libs/libpq/src/include/port/win32_port.h
deleted file mode 100644
index b957d5c598..0000000000
--- a/contrib/libs/libpq/src/include/port/win32_port.h
+++ /dev/null
@@ -1,594 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * win32_port.h
- *	  Windows-specific compatibility stuff.
- *
- * Note this is read in MinGW as well as native Windows builds,
- * but not in Cygwin builds.
- *
- * Portions Copyright (c) 1996-2023, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- * src/include/port/win32_port.h
- *
- *-------------------------------------------------------------------------
- */
-#ifndef PG_WIN32_PORT_H
-#define PG_WIN32_PORT_H
-
-/*
- * Always build with SSPI support. Keep it as a #define in case
- * we want a switch to disable it sometime in the future.
- */
-#define ENABLE_SSPI 1
-
-/* undefine and redefine after #include */
-#undef mkdir
-
-#undef ERROR
-
-/*
- * VS2013 and later issue warnings about using the old Winsock API,
- * which we don't really want to hear about.
- */
-#ifdef _MSC_VER
-#define _WINSOCK_DEPRECATED_NO_WARNINGS
-#endif
-
-/*
- * The MinGW64 headers choke if this is already defined - they
- * define it themselves.
- */
-#if !defined(__MINGW64_VERSION_MAJOR) || defined(_MSC_VER)
-#define _WINSOCKAPI_
-#endif
-
-/*
- * windows.h includes a lot of other headers, slowing down compilation
- * significantly.  WIN32_LEAN_AND_MEAN reduces that a bit. It'd be better to
- * remove the include of windows.h (as well as indirect inclusions of it) from
- * such a central place, but until then...
- *
- * To be able to include ntstatus.h tell windows.h to not declare NTSTATUS by
- * temporarily defining UMDF_USING_NTSTATUS, otherwise we'll get warning about
- * macro redefinitions, as windows.h also defines NTSTATUS (yuck). That in
- * turn requires including ntstatus.h, winternl.h to get common symbols.
- */
-#define WIN32_LEAN_AND_MEAN
-#define UMDF_USING_NTSTATUS
-
-#include <winsock2.h>
-#include <ws2tcpip.h>
-#include <windows.h>
-#include <ntstatus.h>
-#include <winternl.h>
-
-#undef small
-#include <process.h>
-#include <signal.h>
-#include <direct.h>
-#undef near
-
-/* needed before sys/stat hacking below: */
-#define fstat microsoft_native_fstat
-#define stat microsoft_native_stat
-#include <sys/stat.h>
-#undef fstat
-#undef stat
-
-/* Must be here to avoid conflicting with prototype in windows.h */
-#define mkdir(a,b)	mkdir(a)
-
-#define ftruncate(a,b)	chsize(a,b)
-
-/* Windows doesn't have fsync() as such, use _commit() */
-#define fsync(fd) _commit(fd)
-
-/*
- * For historical reasons, we allow setting wal_sync_method to
- * fsync_writethrough on Windows, even though it's really identical to fsync
- * (both code paths wind up at _commit()).
- */
-#define HAVE_FSYNC_WRITETHROUGH
-#define FSYNC_WRITETHROUGH_IS_FSYNC
-
-#define USES_WINSOCK
-
-/*
- *	IPC defines
- */
-#undef HAVE_UNION_SEMUN
-#define HAVE_UNION_SEMUN 1
-
-#define IPC_RMID 256
-#define IPC_CREAT 512
-#define IPC_EXCL 1024
-#define IPC_PRIVATE 234564
-#define IPC_NOWAIT	2048
-#define IPC_STAT 4096
-
-#define EACCESS 2048
-#ifndef EIDRM
-#define EIDRM 4096
-#endif
-
-#define SETALL 8192
-#define GETNCNT 16384
-#define GETVAL 65536
-#define SETVAL 131072
-#define GETPID 262144
-
-
-/*
- *	Signal stuff
- *
- *	For WIN32, there is no wait() call so there are no wait() macros
- *	to interpret the return value of system().  Instead, system()
- *	return values < 0x100 are used for exit() termination, and higher
- *	values are used to indicate non-exit() termination, which is
- *	similar to a unix-style signal exit (think SIGSEGV ==
- *	STATUS_ACCESS_VIOLATION).  Return values are broken up into groups:
- *
- *	https://docs.microsoft.com/en-us/windows-hardware/drivers/kernel/using-ntstatus-values
- *
- *		NT_SUCCESS			0 - 0x3FFFFFFF
- *		NT_INFORMATION		0x40000000 - 0x7FFFFFFF
- *		NT_WARNING			0x80000000 - 0xBFFFFFFF
- *		NT_ERROR			0xC0000000 - 0xFFFFFFFF
- *
- *	Effectively, we don't care on the severity of the return value from
- *	system(), we just need to know if it was because of exit() or generated
- *	by the system, and it seems values >= 0x100 are system-generated.
- *	See this URL for a list of WIN32 STATUS_* values:
- *
- *		Wine (URL used in our error messages) -
- *			http://source.winehq.org/source/include/ntstatus.h
- *		Descriptions -
- *			https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-erref/596a1078-e883-4972-9bbc-49e60bebca55
- *
- *	The comprehensive exception list is included in ntstatus.h from the
- *	Windows Driver Kit (WDK).  A subset of the list is also included in
- *	winnt.h from the Windows SDK.  Defining WIN32_NO_STATUS before including
- *	windows.h helps to avoid any conflicts.
- *
- *	Some day we might want to print descriptions for the most common
- *	exceptions, rather than printing an include file name.  We could use
- *	RtlNtStatusToDosError() and pass to FormatMessage(), which can print
- *	the text of error values, but MinGW does not support
- *	RtlNtStatusToDosError().
- */
-#define WIFEXITED(w)	(((w) & 0XFFFFFF00) == 0)
-#define WIFSIGNALED(w)	(!WIFEXITED(w))
-#define WEXITSTATUS(w)	(w)
-#define WTERMSIG(w)		(w)
-
-#define sigmask(sig) ( 1 << ((sig)-1) )
-
-/* Signal function return values */
-#undef SIG_DFL
-#undef SIG_ERR
-#undef SIG_IGN
-#define SIG_DFL ((pqsigfunc)0)
-#define SIG_ERR ((pqsigfunc)-1)
-#define SIG_IGN ((pqsigfunc)1)
-
-/* Some extra signals */
-#define SIGHUP				1
-#define SIGQUIT				3
-#define SIGTRAP				5
-#define SIGABRT				22	/* Set to match W32 value -- not UNIX value */
-#define SIGKILL				9
-#define SIGPIPE				13
-#define SIGALRM				14
-#define SIGSTOP				17
-#define SIGTSTP				18
-#define SIGCONT				19
-#define SIGCHLD				20
-#define SIGWINCH			28
-#define SIGUSR1				30
-#define SIGUSR2				31
-
-/* MinGW has gettimeofday(), but MSVC doesn't */
-#ifdef _MSC_VER
-/* Last parameter not used */
-extern int	gettimeofday(struct timeval *tp, void *tzp);
-#endif
-
-/* for setitimer in backend/port/win32/timer.c */
-#define ITIMER_REAL 0
-struct itimerval
-{
-	struct timeval it_interval;
-	struct timeval it_value;
-};
-
-int			setitimer(int which, const struct itimerval *value, struct itimerval *ovalue);
-
-/* Convenience wrapper for GetFileType() */
-extern DWORD pgwin32_get_file_type(HANDLE hFile);
-
-/*
- * WIN32 does not provide 64-bit off_t, but does provide the functions operating
- * with 64-bit offsets.  Also, fseek() might not give an error for unseekable
- * streams, so harden that function with our version.
- */
-#define pgoff_t __int64
-
-#ifdef _MSC_VER
-extern int	_pgfseeko64(FILE *stream, pgoff_t offset, int origin);
-extern pgoff_t _pgftello64(FILE *stream);
-#define fseeko(stream, offset, origin) _pgfseeko64(stream, offset, origin)
-#define ftello(stream) _pgftello64(stream)
-#else
-#ifndef fseeko
-#define fseeko(stream, offset, origin) fseeko64(stream, offset, origin)
-#endif
-#ifndef ftello
-#define ftello(stream) ftello64(stream)
-#endif
-#endif
-
-/*
- *	Win32 also doesn't have symlinks, but we can emulate them with
- *	junction points on newer Win32 versions.
- *
- *	Cygwin has its own symlinks which work on Win95/98/ME where
- *	junction points don't, so use those instead.  We have no way of
- *	knowing what type of system Cygwin binaries will be run on.
- *		Note: Some CYGWIN includes might #define WIN32.
- */
-extern int	pgsymlink(const char *oldpath, const char *newpath);
-extern int	pgreadlink(const char *path, char *buf, size_t size);
-
-#define symlink(oldpath, newpath)	pgsymlink(oldpath, newpath)
-#define readlink(path, buf, size)	pgreadlink(path, buf, size)
-
-/*
- * Supplement to <sys/types.h>.
- *
- * Perl already has typedefs for uid_t and gid_t.
- */
-#ifndef PLPERL_HAVE_UID_GID
-typedef int uid_t;
-typedef int gid_t;
-#endif
-typedef long key_t;
-
-#ifdef _MSC_VER
-typedef int pid_t;
-#endif
-
-/*
- * Supplement to <sys/stat.h>.
- *
- * We must pull in sys/stat.h before this part, else our overrides lose.
- *
- * stat() is not guaranteed to set the st_size field on win32, so we
- * redefine it to our own implementation.  See src/port/win32stat.c.
- *
- * The struct stat is 32 bit in MSVC, so we redefine it as a copy of
- * struct __stat64.  This also fixes the struct size for MINGW builds.
- */
-struct stat						/* This should match struct __stat64 */
-{
-	_dev_t		st_dev;
-	_ino_t		st_ino;
-	unsigned short st_mode;
-	short		st_nlink;
-	short		st_uid;
-	short		st_gid;
-	_dev_t		st_rdev;
-	__int64		st_size;
-	__time64_t	st_atime;
-	__time64_t	st_mtime;
-	__time64_t	st_ctime;
-};
-
-extern int	_pgfstat64(int fileno, struct stat *buf);
-extern int	_pgstat64(const char *name, struct stat *buf);
-extern int	_pglstat64(const char *name, struct stat *buf);
-
-#define fstat(fileno, sb)	_pgfstat64(fileno, sb)
-#define stat(path, sb)		_pgstat64(path, sb)
-#define lstat(path, sb)		_pglstat64(path, sb)
-
-/* These macros are not provided by older MinGW, nor by MSVC */
-#ifndef S_IRUSR
-#define S_IRUSR _S_IREAD
-#endif
-#ifndef S_IWUSR
-#define S_IWUSR _S_IWRITE
-#endif
-#ifndef S_IXUSR
-#define S_IXUSR _S_IEXEC
-#endif
-#ifndef S_IRWXU
-#define S_IRWXU (S_IRUSR | S_IWUSR | S_IXUSR)
-#endif
-#ifndef S_IRGRP
-#define S_IRGRP 0
-#endif
-#ifndef S_IWGRP
-#define S_IWGRP 0
-#endif
-#ifndef S_IXGRP
-#define S_IXGRP 0
-#endif
-#ifndef S_IRWXG
-#define S_IRWXG 0
-#endif
-#ifndef S_IROTH
-#define S_IROTH 0
-#endif
-#ifndef S_IWOTH
-#define S_IWOTH 0
-#endif
-#ifndef S_IXOTH
-#define S_IXOTH 0
-#endif
-#ifndef S_IRWXO
-#define S_IRWXO 0
-#endif
-#ifndef S_ISDIR
-#define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)
-#endif
-#ifndef S_ISREG
-#define S_ISREG(m) (((m) & S_IFMT) == S_IFREG)
-#endif
-
-/*
- * In order for lstat() to be able to report junction points as symlinks, we
- * need to hijack a bit in st_mode, since neither MSVC nor MinGW provides
- * S_ISLNK and there aren't any spare bits.  We'll steal the one for character
- * devices, because we don't otherwise make use of those.
- */
-#ifdef S_ISLNK
-#error "S_ISLNK is already defined"
-#endif
-#ifdef S_IFLNK
-#error "S_IFLNK is already defined"
-#endif
-#define S_IFLNK S_IFCHR
-#define S_ISLNK(m) (((m) & S_IFLNK) == S_IFLNK)
-
-/*
- * Supplement to <fcntl.h>.
- * This is the same value as _O_NOINHERIT in the MS header file. This is
- * to ensure that we don't collide with a future definition. It means
- * we cannot use _O_NOINHERIT ourselves.
- */
-#define O_DSYNC 0x0080
-
-/*
- * Our open() replacement does not create inheritable handles, so it is safe to
- * ignore O_CLOEXEC.  (If we were using Windows' own open(), it might be
- * necessary to convert this to _O_NOINHERIT.)
- */
-#define O_CLOEXEC 0
-
-/*
- * Supplement to <errno.h>.
- *
- * We redefine network-related Berkeley error symbols as the corresponding WSA
- * constants. This allows strerror.c to recognize them as being in the Winsock
- * error code range and pass them off to win32_socket_strerror(), since
- * Windows' version of plain strerror() won't cope.  Note that this will break
- * if these names are used for anything else besides Windows Sockets errors.
- * See TranslateSocketError() when changing this list.
- */
-#undef EAGAIN
-#define EAGAIN WSAEWOULDBLOCK
-#undef EINTR
-#define EINTR WSAEINTR
-#undef EMSGSIZE
-#define EMSGSIZE WSAEMSGSIZE
-#undef EAFNOSUPPORT
-#define EAFNOSUPPORT WSAEAFNOSUPPORT
-#undef EWOULDBLOCK
-#define EWOULDBLOCK WSAEWOULDBLOCK
-#undef ECONNABORTED
-#define ECONNABORTED WSAECONNABORTED
-#undef ECONNRESET
-#define ECONNRESET WSAECONNRESET
-#undef EINPROGRESS
-#define EINPROGRESS WSAEINPROGRESS
-#undef EISCONN
-#define EISCONN WSAEISCONN
-#undef ENOBUFS
-#define ENOBUFS WSAENOBUFS
-#undef EPROTONOSUPPORT
-#define EPROTONOSUPPORT WSAEPROTONOSUPPORT
-#undef ECONNREFUSED
-#define ECONNREFUSED WSAECONNREFUSED
-#undef ENOTSOCK
-#define ENOTSOCK WSAENOTSOCK
-#undef EOPNOTSUPP
-#define EOPNOTSUPP WSAEOPNOTSUPP
-#undef EADDRINUSE
-#define EADDRINUSE WSAEADDRINUSE
-#undef EADDRNOTAVAIL
-#define EADDRNOTAVAIL WSAEADDRNOTAVAIL
-#undef EHOSTDOWN
-#define EHOSTDOWN WSAEHOSTDOWN
-#undef EHOSTUNREACH
-#define EHOSTUNREACH WSAEHOSTUNREACH
-#undef ENETDOWN
-#define ENETDOWN WSAENETDOWN
-#undef ENETRESET
-#define ENETRESET WSAENETRESET
-#undef ENETUNREACH
-#define ENETUNREACH WSAENETUNREACH
-#undef ENOTCONN
-#define ENOTCONN WSAENOTCONN
-#undef ETIMEDOUT
-#define ETIMEDOUT WSAETIMEDOUT
-
-/*
- * Locale stuff.
- *
- * Extended locale functions with gratuitous underscore prefixes.
- * (These APIs are nevertheless fully documented by Microsoft.)
- */
-#define locale_t _locale_t
-#define tolower_l _tolower_l
-#define toupper_l _toupper_l
-#define towlower_l _towlower_l
-#define towupper_l _towupper_l
-#define isdigit_l _isdigit_l
-#define iswdigit_l _iswdigit_l
-#define isalpha_l _isalpha_l
-#define iswalpha_l _iswalpha_l
-#define isalnum_l _isalnum_l
-#define iswalnum_l _iswalnum_l
-#define isupper_l _isupper_l
-#define iswupper_l _iswupper_l
-#define islower_l _islower_l
-#define iswlower_l _iswlower_l
-#define isgraph_l _isgraph_l
-#define iswgraph_l _iswgraph_l
-#define isprint_l _isprint_l
-#define iswprint_l _iswprint_l
-#define ispunct_l _ispunct_l
-#define iswpunct_l _iswpunct_l
-#define isspace_l _isspace_l
-#define iswspace_l _iswspace_l
-#define strcoll_l _strcoll_l
-#define strxfrm_l _strxfrm_l
-#define wcscoll_l _wcscoll_l
-#define wcstombs_l _wcstombs_l
-#define mbstowcs_l _mbstowcs_l
-
-/*
- * Versions of libintl >= 0.18? try to replace setlocale() with a macro
- * to their own versions.  Remove the macro, if it exists, because it
- * ends up calling the wrong version when the backend and libintl use
- * different versions of msvcrt.
- */
-#if defined(setlocale)
-#undef setlocale
-#endif
-
-/*
- * Define our own wrapper macro around setlocale() to work around bugs in
- * Windows' native setlocale() function.
- */
-extern char *pgwin32_setlocale(int category, const char *locale);
-
-#define setlocale(a,b) pgwin32_setlocale(a,b)
-
-
-/* In backend/port/win32/signal.c */
-extern PGDLLIMPORT volatile int pg_signal_queue;
-extern PGDLLIMPORT int pg_signal_mask;
-extern PGDLLIMPORT HANDLE pgwin32_signal_event;
-extern PGDLLIMPORT HANDLE pgwin32_initial_signal_pipe;
-
-#define UNBLOCKED_SIGNAL_QUEUE()	(pg_signal_queue & ~pg_signal_mask)
-#define PG_SIGNAL_COUNT 32
-
-extern void pgwin32_signal_initialize(void);
-extern HANDLE pgwin32_create_signal_listener(pid_t pid);
-extern void pgwin32_dispatch_queued_signals(void);
-extern void pg_queue_signal(int signum);
-
-/* In src/port/kill.c */
-#define kill(pid,sig)	pgkill(pid,sig)
-extern int	pgkill(int pid, int sig);
-
-/* In backend/port/win32/socket.c */
-#ifndef FRONTEND
-#define socket(af, type, protocol) pgwin32_socket(af, type, protocol)
-#define bind(s, addr, addrlen) pgwin32_bind(s, addr, addrlen)
-#define listen(s, backlog) pgwin32_listen(s, backlog)
-#define accept(s, addr, addrlen) pgwin32_accept(s, addr, addrlen)
-#define connect(s, name, namelen) pgwin32_connect(s, name, namelen)
-#define select(n, r, w, e, timeout) pgwin32_select(n, r, w, e, timeout)
-#define recv(s, buf, len, flags) pgwin32_recv(s, buf, len, flags)
-#define send(s, buf, len, flags) pgwin32_send(s, buf, len, flags)
-
-extern SOCKET pgwin32_socket(int af, int type, int protocol);
-extern int	pgwin32_bind(SOCKET s, struct sockaddr *addr, int addrlen);
-extern int	pgwin32_listen(SOCKET s, int backlog);
-extern SOCKET pgwin32_accept(SOCKET s, struct sockaddr *addr, int *addrlen);
-extern int	pgwin32_connect(SOCKET s, const struct sockaddr *name, int namelen);
-extern int	pgwin32_select(int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, const struct timeval *timeout);
-extern int	pgwin32_recv(SOCKET s, char *buf, int len, int flags);
-extern int	pgwin32_send(SOCKET s, const void *buf, int len, int flags);
-extern int	pgwin32_waitforsinglesocket(SOCKET s, int what, int timeout);
-
-extern PGDLLIMPORT int pgwin32_noblock;
-
-#endif							/* FRONTEND */
-
-/* in backend/port/win32_shmem.c */
-extern int	pgwin32_ReserveSharedMemoryRegion(HANDLE);
-
-/* in backend/port/win32/crashdump.c */
-extern void pgwin32_install_crashdump_handler(void);
-
-/* in port/win32dlopen.c */
-extern void *dlopen(const char *file, int mode);
-extern void *dlsym(void *handle, const char *symbol);
-extern int	dlclose(void *handle);
-extern char *dlerror(void);
-
-#define RTLD_NOW 1
-#define RTLD_GLOBAL 0
-
-/* in port/win32error.c */
-extern void _dosmaperr(unsigned long);
-
-/* in port/win32env.c */
-extern int	pgwin32_putenv(const char *);
-extern int	pgwin32_setenv(const char *name, const char *value, int overwrite);
-extern int	pgwin32_unsetenv(const char *name);
-
-#define putenv(x) pgwin32_putenv(x)
-#define setenv(x,y,z) pgwin32_setenv(x,y,z)
-#define unsetenv(x) pgwin32_unsetenv(x)
-
-/* in port/win32security.c */
-extern int	pgwin32_is_service(void);
-extern int	pgwin32_is_admin(void);
-
-/* Windows security token manipulation (in src/common/exec.c) */
-extern BOOL AddUserToTokenDacl(HANDLE hToken);
-
-/* Things that exist in MinGW headers, but need to be added to MSVC */
-#ifdef _MSC_VER
-
-#ifndef _WIN64
-typedef long ssize_t;
-#else
-typedef __int64 ssize_t;
-#endif
-
-typedef unsigned short mode_t;
-
-#define F_OK 0
-#define W_OK 2
-#define R_OK 4
-
-#endif							/* _MSC_VER */
-
-#if defined(__MINGW32__) || defined(__MINGW64__)
-/*
- * Mingw claims to have a strtof, and my reading of its source code suggests
- * that it ought to work (and not need this hack), but the regression test
- * results disagree with me; whether this is a version issue or not is not
- * clear. However, using our wrapper (and the misrounded-input variant file,
- * already required for supporting ancient systems) can't make things any
- * worse, except for a tiny performance loss when reading zeros.
- *
- * See also cygwin.h for another instance of this.
- */
-#define HAVE_BUGGY_STRTOF 1
-#endif
-
-/* in port/win32pread.c */
-extern ssize_t pg_pread(int fd, void *buf, size_t nbyte, off_t offset);
-
-/* in port/win32pwrite.c */
-extern ssize_t pg_pwrite(int fd, const void *buf, size_t nbyte, off_t offset);
-
-#endif							/* PG_WIN32_PORT_H */
diff --git a/contrib/libs/libpq/src/include/port/win32ntdll.h b/contrib/libs/libpq/src/include/port/win32ntdll.h
deleted file mode 100644
index 1ce9360ec1..0000000000
--- a/contrib/libs/libpq/src/include/port/win32ntdll.h
+++ /dev/null
@@ -1,34 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * win32ntdll.h
- *	  Dynamically loaded Windows NT functions.
- *
- * Portions Copyright (c) 2021-2023, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- * src/include/port/win32ntdll.h
- *
- *-------------------------------------------------------------------------
- */
-
-#ifndef WIN32NTDLL_H
-#define WIN32NTDLL_H
-
-#include <ntstatus.h>
-#include <winternl.h>
-
-#ifndef FLUSH_FLAGS_FILE_DATA_SYNC_ONLY
-#define FLUSH_FLAGS_FILE_DATA_SYNC_ONLY 0x4
-#endif
-
-typedef NTSTATUS (__stdcall * RtlGetLastNtStatus_t) (void);
-typedef ULONG (__stdcall * RtlNtStatusToDosError_t) (NTSTATUS);
-typedef NTSTATUS (__stdcall * NtFlushBuffersFileEx_t) (HANDLE, ULONG, PVOID, ULONG, PIO_STATUS_BLOCK);
-
-extern PGDLLIMPORT RtlGetLastNtStatus_t pg_RtlGetLastNtStatus;
-extern PGDLLIMPORT RtlNtStatusToDosError_t pg_RtlNtStatusToDosError;
-extern PGDLLIMPORT NtFlushBuffersFileEx_t pg_NtFlushBuffersFileEx;
-
-extern int	initialize_ntdll(void);
-
-#endif							/* WIN32NTDLL_H */
diff --git a/contrib/libs/libpq/src/include/postgres.h b/contrib/libs/libpq/src/include/postgres.h
deleted file mode 100644
index 8a028ff789..0000000000
--- a/contrib/libs/libpq/src/include/postgres.h
+++ /dev/null
@@ -1,579 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * postgres.h
- *	  Primary include file for PostgreSQL server .c files
- *
- * This should be the first file included by PostgreSQL backend modules.
- * Client-side code should include postgres_fe.h instead.
- *
- *
- * Portions Copyright (c) 1996-2023, PostgreSQL Global Development Group
- * Portions Copyright (c) 1995, Regents of the University of California
- *
- * src/include/postgres.h
- *
- *-------------------------------------------------------------------------
- */
-/*
- *----------------------------------------------------------------
- *	 TABLE OF CONTENTS
- *
- *		When adding stuff to this file, please try to put stuff
- *		into the relevant section, or add new sections as appropriate.
- *
- *	  section	description
- *	  -------	------------------------------------------------
- *		1)		Datum type + support functions
- *		2)		miscellaneous
- *
- *	 NOTES
- *
- *	In general, this file should contain declarations that are widely needed
- *	in the backend environment, but are of no interest outside the backend.
- *
- *	Simple type definitions live in c.h, where they are shared with
- *	postgres_fe.h.  We do that since those type definitions are needed by
- *	frontend modules that want to deal with binary data transmission to or
- *	from the backend.  Type definitions in this file should be for
- *	representations that never escape the backend, such as Datum.
- *
- *----------------------------------------------------------------
- */
-#ifndef POSTGRES_H
-#define POSTGRES_H
-
-#include "c.h"
-#include "utils/elog.h"
-#include "utils/palloc.h"
-
-/* ----------------------------------------------------------------
- *				Section 1:	Datum type + support functions
- * ----------------------------------------------------------------
- */
-
-/*
- * A Datum contains either a value of a pass-by-value type or a pointer to a
- * value of a pass-by-reference type.  Therefore, we require:
- *
- * sizeof(Datum) == sizeof(void *) == 4 or 8
- *
- * The functions below and the analogous functions for other types should be used to
- * convert between a Datum and the appropriate C type.
- */
-
-typedef uintptr_t Datum;
-
-/*
- * A NullableDatum is used in places where both a Datum and its nullness needs
- * to be stored. This can be more efficient than storing datums and nullness
- * in separate arrays, due to better spatial locality, even if more space may
- * be wasted due to padding.
- */
-typedef struct NullableDatum
-{
-#define FIELDNO_NULLABLE_DATUM_DATUM 0
-	Datum		value;
-#define FIELDNO_NULLABLE_DATUM_ISNULL 1
-	bool		isnull;
-	/* due to alignment padding this could be used for flags for free */
-} NullableDatum;
-
-#define SIZEOF_DATUM SIZEOF_VOID_P
-
-/*
- * DatumGetBool
- *		Returns boolean value of a datum.
- *
- * Note: any nonzero value will be considered true.
- */
-static inline bool
-DatumGetBool(Datum X)
-{
-	return (X != 0);
-}
-
-/*
- * BoolGetDatum
- *		Returns datum representation for a boolean.
- *
- * Note: any nonzero value will be considered true.
- */
-static inline Datum
-BoolGetDatum(bool X)
-{
-	return (Datum) (X ? 1 : 0);
-}
-
-/*
- * DatumGetChar
- *		Returns character value of a datum.
- */
-static inline char
-DatumGetChar(Datum X)
-{
-	return (char) X;
-}
-
-/*
- * CharGetDatum
- *		Returns datum representation for a character.
- */
-static inline Datum
-CharGetDatum(char X)
-{
-	return (Datum) X;
-}
-
-/*
- * Int8GetDatum
- *		Returns datum representation for an 8-bit integer.
- */
-static inline Datum
-Int8GetDatum(int8 X)
-{
-	return (Datum) X;
-}
-
-/*
- * DatumGetUInt8
- *		Returns 8-bit unsigned integer value of a datum.
- */
-static inline uint8
-DatumGetUInt8(Datum X)
-{
-	return (uint8) X;
-}
-
-/*
- * UInt8GetDatum
- *		Returns datum representation for an 8-bit unsigned integer.
- */
-static inline Datum
-UInt8GetDatum(uint8 X)
-{
-	return (Datum) X;
-}
-
-/*
- * DatumGetInt16
- *		Returns 16-bit integer value of a datum.
- */
-static inline int16
-DatumGetInt16(Datum X)
-{
-	return (int16) X;
-}
-
-/*
- * Int16GetDatum
- *		Returns datum representation for a 16-bit integer.
- */
-static inline Datum
-Int16GetDatum(int16 X)
-{
-	return (Datum) X;
-}
-
-/*
- * DatumGetUInt16
- *		Returns 16-bit unsigned integer value of a datum.
- */
-static inline uint16
-DatumGetUInt16(Datum X)
-{
-	return (uint16) X;
-}
-
-/*
- * UInt16GetDatum
- *		Returns datum representation for a 16-bit unsigned integer.
- */
-static inline Datum
-UInt16GetDatum(uint16 X)
-{
-	return (Datum) X;
-}
-
-/*
- * DatumGetInt32
- *		Returns 32-bit integer value of a datum.
- */
-static inline int32
-DatumGetInt32(Datum X)
-{
-	return (int32) X;
-}
-
-/*
- * Int32GetDatum
- *		Returns datum representation for a 32-bit integer.
- */
-static inline Datum
-Int32GetDatum(int32 X)
-{
-	return (Datum) X;
-}
-
-/*
- * DatumGetUInt32
- *		Returns 32-bit unsigned integer value of a datum.
- */
-static inline uint32
-DatumGetUInt32(Datum X)
-{
-	return (uint32) X;
-}
-
-/*
- * UInt32GetDatum
- *		Returns datum representation for a 32-bit unsigned integer.
- */
-static inline Datum
-UInt32GetDatum(uint32 X)
-{
-	return (Datum) X;
-}
-
-/*
- * DatumGetObjectId
- *		Returns object identifier value of a datum.
- */
-static inline Oid
-DatumGetObjectId(Datum X)
-{
-	return (Oid) X;
-}
-
-/*
- * ObjectIdGetDatum
- *		Returns datum representation for an object identifier.
- */
-static inline Datum
-ObjectIdGetDatum(Oid X)
-{
-	return (Datum) X;
-}
-
-/*
- * DatumGetTransactionId
- *		Returns transaction identifier value of a datum.
- */
-static inline TransactionId
-DatumGetTransactionId(Datum X)
-{
-	return (TransactionId) X;
-}
-
-/*
- * TransactionIdGetDatum
- *		Returns datum representation for a transaction identifier.
- */
-static inline Datum
-TransactionIdGetDatum(TransactionId X)
-{
-	return (Datum) X;
-}
-
-/*
- * MultiXactIdGetDatum
- *		Returns datum representation for a multixact identifier.
- */
-static inline Datum
-MultiXactIdGetDatum(MultiXactId X)
-{
-	return (Datum) X;
-}
-
-/*
- * DatumGetCommandId
- *		Returns command identifier value of a datum.
- */
-static inline CommandId
-DatumGetCommandId(Datum X)
-{
-	return (CommandId) X;
-}
-
-/*
- * CommandIdGetDatum
- *		Returns datum representation for a command identifier.
- */
-static inline Datum
-CommandIdGetDatum(CommandId X)
-{
-	return (Datum) X;
-}
-
-/*
- * DatumGetPointer
- *		Returns pointer value of a datum.
- */
-static inline Pointer
-DatumGetPointer(Datum X)
-{
-	return (Pointer) X;
-}
-
-/*
- * PointerGetDatum
- *		Returns datum representation for a pointer.
- */
-static inline Datum
-PointerGetDatum(const void *X)
-{
-	return (Datum) X;
-}
-
-/*
- * DatumGetCString
- *		Returns C string (null-terminated string) value of a datum.
- *
- * Note: C string is not a full-fledged Postgres type at present,
- * but type input functions use this conversion for their inputs.
- */
-static inline char *
-DatumGetCString(Datum X)
-{
-	return (char *) DatumGetPointer(X);
-}
-
-/*
- * CStringGetDatum
- *		Returns datum representation for a C string (null-terminated string).
- *
- * Note: C string is not a full-fledged Postgres type at present,
- * but type output functions use this conversion for their outputs.
- * Note: CString is pass-by-reference; caller must ensure the pointed-to
- * value has adequate lifetime.
- */
-static inline Datum
-CStringGetDatum(const char *X)
-{
-	return PointerGetDatum(X);
-}
-
-/*
- * DatumGetName
- *		Returns name value of a datum.
- */
-static inline Name
-DatumGetName(Datum X)
-{
-	return (Name) DatumGetPointer(X);
-}
-
-/*
- * NameGetDatum
- *		Returns datum representation for a name.
- *
- * Note: Name is pass-by-reference; caller must ensure the pointed-to
- * value has adequate lifetime.
- */
-static inline Datum
-NameGetDatum(const NameData *X)
-{
-	return CStringGetDatum(NameStr(*X));
-}
-
-/*
- * DatumGetInt64
- *		Returns 64-bit integer value of a datum.
- *
- * Note: this function hides whether int64 is pass by value or by reference.
- */
-static inline int64
-DatumGetInt64(Datum X)
-{
-#ifdef USE_FLOAT8_BYVAL
-	return (int64) X;
-#else
-	return *((int64 *) DatumGetPointer(X));
-#endif
-}
-
-/*
- * Int64GetDatum
- *		Returns datum representation for a 64-bit integer.
- *
- * Note: if int64 is pass by reference, this function returns a reference
- * to palloc'd space.
- */
-#ifdef USE_FLOAT8_BYVAL
-static inline Datum
-Int64GetDatum(int64 X)
-{
-	return (Datum) X;
-}
-#else
-extern Datum Int64GetDatum(int64 X);
-#endif
-
-
-/*
- * DatumGetUInt64
- *		Returns 64-bit unsigned integer value of a datum.
- *
- * Note: this function hides whether int64 is pass by value or by reference.
- */
-static inline uint64
-DatumGetUInt64(Datum X)
-{
-#ifdef USE_FLOAT8_BYVAL
-	return (uint64) X;
-#else
-	return *((uint64 *) DatumGetPointer(X));
-#endif
-}
-
-/*
- * UInt64GetDatum
- *		Returns datum representation for a 64-bit unsigned integer.
- *
- * Note: if int64 is pass by reference, this function returns a reference
- * to palloc'd space.
- */
-static inline Datum
-UInt64GetDatum(uint64 X)
-{
-#ifdef USE_FLOAT8_BYVAL
-	return (Datum) X;
-#else
-	return Int64GetDatum((int64) X);
-#endif
-}
-
-/*
- * Float <-> Datum conversions
- *
- * These have to be implemented as inline functions rather than macros, when
- * passing by value, because many machines pass int and float function
- * parameters/results differently; so we need to play weird games with unions.
- */
-
-/*
- * DatumGetFloat4
- *		Returns 4-byte floating point value of a datum.
- */
-static inline float4
-DatumGetFloat4(Datum X)
-{
-	union
-	{
-		int32		value;
-		float4		retval;
-	}			myunion;
-
-	myunion.value = DatumGetInt32(X);
-	return myunion.retval;
-}
-
-/*
- * Float4GetDatum
- *		Returns datum representation for a 4-byte floating point number.
- */
-static inline Datum
-Float4GetDatum(float4 X)
-{
-	union
-	{
-		float4		value;
-		int32		retval;
-	}			myunion;
-
-	myunion.value = X;
-	return Int32GetDatum(myunion.retval);
-}
-
-/*
- * DatumGetFloat8
- *		Returns 8-byte floating point value of a datum.
- *
- * Note: this function hides whether float8 is pass by value or by reference.
- */
-static inline float8
-DatumGetFloat8(Datum X)
-{
-#ifdef USE_FLOAT8_BYVAL
-	union
-	{
-		int64		value;
-		float8		retval;
-	}			myunion;
-
-	myunion.value = DatumGetInt64(X);
-	return myunion.retval;
-#else
-	return *((float8 *) DatumGetPointer(X));
-#endif
-}
-
-/*
- * Float8GetDatum
- *		Returns datum representation for an 8-byte floating point number.
- *
- * Note: if float8 is pass by reference, this function returns a reference
- * to palloc'd space.
- */
-#ifdef USE_FLOAT8_BYVAL
-static inline Datum
-Float8GetDatum(float8 X)
-{
-	union
-	{
-		float8		value;
-		int64		retval;
-	}			myunion;
-
-	myunion.value = X;
-	return Int64GetDatum(myunion.retval);
-}
-#else
-extern Datum Float8GetDatum(float8 X);
-#endif
-
-
-/*
- * Int64GetDatumFast
- * Float8GetDatumFast
- *
- * These macros are intended to allow writing code that does not depend on
- * whether int64 and float8 are pass-by-reference types, while not
- * sacrificing performance when they are.  The argument must be a variable
- * that will exist and have the same value for as long as the Datum is needed.
- * In the pass-by-ref case, the address of the variable is taken to use as
- * the Datum.  In the pass-by-val case, these are the same as the non-Fast
- * functions, except for asserting that the variable is of the correct type.
- */
-
-#ifdef USE_FLOAT8_BYVAL
-#define Int64GetDatumFast(X) \
-	(AssertVariableIsOfTypeMacro(X, int64), Int64GetDatum(X))
-#define Float8GetDatumFast(X) \
-	(AssertVariableIsOfTypeMacro(X, double), Float8GetDatum(X))
-#else
-#define Int64GetDatumFast(X) \
-	(AssertVariableIsOfTypeMacro(X, int64), PointerGetDatum(&(X)))
-#define Float8GetDatumFast(X) \
-	(AssertVariableIsOfTypeMacro(X, double), PointerGetDatum(&(X)))
-#endif
-
-
-/* ----------------------------------------------------------------
- *				Section 2:	miscellaneous
- * ----------------------------------------------------------------
- */
-
-/*
- * NON_EXEC_STATIC: It's sometimes useful to define a variable or function
- * that is normally static but extern when using EXEC_BACKEND (see
- * pg_config_manual.h).  There would then typically be some code in
- * postmaster.c that uses those extern symbols to transfer state between
- * processes or do whatever other things it needs to do in EXEC_BACKEND mode.
- */
-#ifdef EXEC_BACKEND
-#define NON_EXEC_STATIC
-#else
-#define NON_EXEC_STATIC static
-#endif
-
-#endif							/* POSTGRES_H */
diff --git a/contrib/libs/libpq/src/include/postgres_ext.h b/contrib/libs/libpq/src/include/postgres_ext.h
deleted file mode 100644
index 240ad4e93b..0000000000
--- a/contrib/libs/libpq/src/include/postgres_ext.h
+++ /dev/null
@@ -1,73 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * postgres_ext.h
- *
- *	   This file contains declarations of things that are visible everywhere
- *	in PostgreSQL *and* are visible to clients of frontend interface libraries.
- *	For example, the Oid type is part of the API of libpq and other libraries.
- *
- *	   Declarations which are specific to a particular interface should
- *	go in the header file for that interface (such as libpq-fe.h).  This
- *	file is only for fundamental Postgres declarations.
- *
- *	   User-written C functions don't count as "external to Postgres."
- *	Those function much as local modifications to the backend itself, and
- *	use header files that are otherwise internal to Postgres to interface
- *	with the backend.
- *
- * src/include/postgres_ext.h
- *
- *-------------------------------------------------------------------------
- */
-
-#ifndef POSTGRES_EXT_H
-#define POSTGRES_EXT_H
-
-#include "pg_config_ext.h"
-
-/*
- * Object ID is a fundamental type in Postgres.
- */
-typedef unsigned int Oid;
-
-#ifdef __cplusplus
-#define InvalidOid		(Oid(0))
-#else
-#define InvalidOid		((Oid) 0)
-#endif
-
-#define OID_MAX  UINT_MAX
-/* you will need to include <limits.h> to use the above #define */
-
-#define atooid(x) ((Oid) strtoul((x), NULL, 10))
-/* the above needs <stdlib.h> */
-
-
-/* Define a signed 64-bit integer type for use in client API declarations. */
-typedef PG_INT64_TYPE pg_int64;
-
-/*
- * Identifiers of error message fields.  Kept here to keep common
- * between frontend and backend, and also to export them to libpq
- * applications.
- */
-#define PG_DIAG_SEVERITY		'S'
-#define PG_DIAG_SEVERITY_NONLOCALIZED 'V'
-#define PG_DIAG_SQLSTATE		'C'
-#define PG_DIAG_MESSAGE_PRIMARY 'M'
-#define PG_DIAG_MESSAGE_DETAIL	'D'
-#define PG_DIAG_MESSAGE_HINT	'H'
-#define PG_DIAG_STATEMENT_POSITION 'P'
-#define PG_DIAG_INTERNAL_POSITION 'p'
-#define PG_DIAG_INTERNAL_QUERY	'q'
-#define PG_DIAG_CONTEXT			'W'
-#define PG_DIAG_SCHEMA_NAME		's'
-#define PG_DIAG_TABLE_NAME		't'
-#define PG_DIAG_COLUMN_NAME		'c'
-#define PG_DIAG_DATATYPE_NAME	'd'
-#define PG_DIAG_CONSTRAINT_NAME 'n'
-#define PG_DIAG_SOURCE_FILE		'F'
-#define PG_DIAG_SOURCE_LINE		'L'
-#define PG_DIAG_SOURCE_FUNCTION 'R'
-
-#endif							/* POSTGRES_EXT_H */
diff --git a/contrib/libs/libpq/src/include/postgres_fe.h b/contrib/libs/libpq/src/include/postgres_fe.h
deleted file mode 100644
index 5bc71dd0b3..0000000000
--- a/contrib/libs/libpq/src/include/postgres_fe.h
+++ /dev/null
@@ -1,29 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * postgres_fe.h
- *	  Primary include file for PostgreSQL client-side .c files
- *
- * This should be the first file included by PostgreSQL client libraries and
- * application programs --- but not by backend modules, which should include
- * postgres.h.
- *
- *
- * Portions Copyright (c) 1996-2023, PostgreSQL Global Development Group
- * Portions Copyright (c) 1995, Regents of the University of California
- *
- * src/include/postgres_fe.h
- *
- *-------------------------------------------------------------------------
- */
-#ifndef POSTGRES_FE_H
-#define POSTGRES_FE_H
-
-#ifndef FRONTEND
-#define FRONTEND 1
-#endif
-
-#include "c.h"
-
-#include "common/fe_memutils.h"
-
-#endif							/* POSTGRES_FE_H */
diff --git a/contrib/libs/libpq/src/include/storage/backendid.h b/contrib/libs/libpq/src/include/storage/backendid.h
deleted file mode 100644
index 1e90b602f0..0000000000
--- a/contrib/libs/libpq/src/include/storage/backendid.h
+++ /dev/null
@@ -1,37 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * backendid.h
- *	  POSTGRES backend id communication definitions
- *
- *
- * Portions Copyright (c) 1996-2023, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- * src/include/storage/backendid.h
- *
- *-------------------------------------------------------------------------
- */
-#ifndef BACKENDID_H
-#define BACKENDID_H
-
-/* ----------------
- *		-cim 8/17/90
- * ----------------
- */
-typedef int BackendId;			/* unique currently active backend identifier */
-
-#define InvalidBackendId		(-1)
-
-extern PGDLLIMPORT BackendId MyBackendId;	/* backend id of this backend */
-
-/* backend id of our parallel session leader, or InvalidBackendId if none */
-extern PGDLLIMPORT BackendId ParallelLeaderBackendId;
-
-/*
- * The BackendId to use for our session's temp relations is normally our own,
- * but parallel workers should use their leader's ID.
- */
-#define BackendIdForTempRelations() \
-	(ParallelLeaderBackendId == InvalidBackendId ? MyBackendId : ParallelLeaderBackendId)
-
-#endif							/* BACKENDID_H */
diff --git a/contrib/libs/libpq/src/include/storage/block.h b/contrib/libs/libpq/src/include/storage/block.h
deleted file mode 100644
index 31a036df0d..0000000000
--- a/contrib/libs/libpq/src/include/storage/block.h
+++ /dev/null
@@ -1,108 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * block.h
- *	  POSTGRES disk block definitions.
- *
- *
- * Portions Copyright (c) 1996-2023, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- * src/include/storage/block.h
- *
- *-------------------------------------------------------------------------
- */
-#ifndef BLOCK_H
-#define BLOCK_H
-
-/*
- * BlockNumber:
- *
- * each data file (heap or index) is divided into postgres disk blocks
- * (which may be thought of as the unit of i/o -- a postgres buffer
- * contains exactly one disk block).  the blocks are numbered
- * sequentially, 0 to 0xFFFFFFFE.
- *
- * InvalidBlockNumber is the same thing as P_NEW in bufmgr.h.
- *
- * the access methods, the buffer manager and the storage manager are
- * more or less the only pieces of code that should be accessing disk
- * blocks directly.
- */
-typedef uint32 BlockNumber;
-
-#define InvalidBlockNumber		((BlockNumber) 0xFFFFFFFF)
-
-#define MaxBlockNumber			((BlockNumber) 0xFFFFFFFE)
-
-/*
- * BlockId:
- *
- * this is a storage type for BlockNumber.  in other words, this type
- * is used for on-disk structures (e.g., in HeapTupleData) whereas
- * BlockNumber is the type on which calculations are performed (e.g.,
- * in access method code).
- *
- * there doesn't appear to be any reason to have separate types except
- * for the fact that BlockIds can be SHORTALIGN'd (and therefore any
- * structures that contains them, such as ItemPointerData, can also be
- * SHORTALIGN'd).  this is an important consideration for reducing the
- * space requirements of the line pointer (ItemIdData) array on each
- * page and the header of each heap or index tuple, so it doesn't seem
- * wise to change this without good reason.
- */
-typedef struct BlockIdData
-{
-	uint16		bi_hi;
-	uint16		bi_lo;
-} BlockIdData;
-
-typedef BlockIdData *BlockId;	/* block identifier */
-
-/* ----------------
- *		support functions
- * ----------------
- */
-
-/*
- * BlockNumberIsValid
- *		True iff blockNumber is valid.
- */
-static inline bool
-BlockNumberIsValid(BlockNumber blockNumber)
-{
-	return blockNumber != InvalidBlockNumber;
-}
-
-/*
- * BlockIdSet
- *		Sets a block identifier to the specified value.
- */
-static inline void
-BlockIdSet(BlockIdData *blockId, BlockNumber blockNumber)
-{
-	blockId->bi_hi = blockNumber >> 16;
-	blockId->bi_lo = blockNumber & 0xffff;
-}
-
-/*
- * BlockIdEquals
- *		Check for block number equality.
- */
-static inline bool
-BlockIdEquals(const BlockIdData *blockId1, const BlockIdData *blockId2)
-{
-	return (blockId1->bi_hi == blockId2->bi_hi &&
-			blockId1->bi_lo == blockId2->bi_lo);
-}
-
-/*
- * BlockIdGetBlockNumber
- *		Retrieve the block number from a block identifier.
- */
-static inline BlockNumber
-BlockIdGetBlockNumber(const BlockIdData *blockId)
-{
-	return (((BlockNumber) blockId->bi_hi) << 16) | ((BlockNumber) blockId->bi_lo);
-}
-
-#endif							/* BLOCK_H */
diff --git a/contrib/libs/libpq/src/include/storage/buf.h b/contrib/libs/libpq/src/include/storage/buf.h
deleted file mode 100644
index 6520d9ae1e..0000000000
--- a/contrib/libs/libpq/src/include/storage/buf.h
+++ /dev/null
@@ -1,46 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * buf.h
- *	  Basic buffer manager data types.
- *
- *
- * Portions Copyright (c) 1996-2023, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- * src/include/storage/buf.h
- *
- *-------------------------------------------------------------------------
- */
-#ifndef BUF_H
-#define BUF_H
-
-/*
- * Buffer identifiers.
- *
- * Zero is invalid, positive is the index of a shared buffer (1..NBuffers),
- * negative is the index of a local buffer (-1 .. -NLocBuffer).
- */
-typedef int Buffer;
-
-#define InvalidBuffer	0
-
-/*
- * BufferIsInvalid
- *		True iff the buffer is invalid.
- */
-#define BufferIsInvalid(buffer) ((buffer) == InvalidBuffer)
-
-/*
- * BufferIsLocal
- *		True iff the buffer is local (not visible to other backends).
- */
-#define BufferIsLocal(buffer)	((buffer) < 0)
-
-/*
- * Buffer access strategy objects.
- *
- * BufferAccessStrategyData is private to freelist.c
- */
-typedef struct BufferAccessStrategyData *BufferAccessStrategy;
-
-#endif							/* BUF_H */
diff --git a/contrib/libs/libpq/src/include/storage/relfilelocator.h b/contrib/libs/libpq/src/include/storage/relfilelocator.h
deleted file mode 100644
index 61cf0169bd..0000000000
--- a/contrib/libs/libpq/src/include/storage/relfilelocator.h
+++ /dev/null
@@ -1,99 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * relfilelocator.h
- *	  Physical access information for relations.
- *
- *
- * Portions Copyright (c) 1996-2023, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- * src/include/storage/relfilelocator.h
- *
- *-------------------------------------------------------------------------
- */
-#ifndef RELFILELOCATOR_H
-#define RELFILELOCATOR_H
-
-#include "common/relpath.h"
-#include "storage/backendid.h"
-
-/*
- * RelFileLocator must provide all that we need to know to physically access
- * a relation, with the exception of the backend ID, which can be provided
- * separately. Note, however, that a "physical" relation is comprised of
- * multiple files on the filesystem, as each fork is stored as a separate
- * file, and each fork can be divided into multiple segments. See md.c.
- *
- * spcOid identifies the tablespace of the relation.  It corresponds to
- * pg_tablespace.oid.
- *
- * dbOid identifies the database of the relation.  It is zero for
- * "shared" relations (those common to all databases of a cluster).
- * Nonzero dbOid values correspond to pg_database.oid.
- *
- * relNumber identifies the specific relation.  relNumber corresponds to
- * pg_class.relfilenode (NOT pg_class.oid, because we need to be able
- * to assign new physical files to relations in some situations).
- * Notice that relNumber is only unique within a database in a particular
- * tablespace.
- *
- * Note: spcOid must be GLOBALTABLESPACE_OID if and only if dbOid is
- * zero.  We support shared relations only in the "global" tablespace.
- *
- * Note: in pg_class we allow reltablespace == 0 to denote that the
- * relation is stored in its database's "default" tablespace (as
- * identified by pg_database.dattablespace).  However this shorthand
- * is NOT allowed in RelFileLocator structs --- the real tablespace ID
- * must be supplied when setting spcOid.
- *
- * Note: in pg_class, relfilenode can be zero to denote that the relation
- * is a "mapped" relation, whose current true filenode number is available
- * from relmapper.c.  Again, this case is NOT allowed in RelFileLocators.
- *
- * Note: various places use RelFileLocator in hashtable keys.  Therefore,
- * there *must not* be any unused padding bytes in this struct.  That
- * should be safe as long as all the fields are of type Oid.
- */
-typedef struct RelFileLocator
-{
-	Oid			spcOid;			/* tablespace */
-	Oid			dbOid;			/* database */
-	RelFileNumber relNumber;	/* relation */
-} RelFileLocator;
-
-/*
- * Augmenting a relfilelocator with the backend ID provides all the information
- * we need to locate the physical storage.  The backend ID is InvalidBackendId
- * for regular relations (those accessible to more than one backend), or the
- * owning backend's ID for backend-local relations.  Backend-local relations
- * are always transient and removed in case of a database crash; they are
- * never WAL-logged or fsync'd.
- */
-typedef struct RelFileLocatorBackend
-{
-	RelFileLocator locator;
-	BackendId	backend;
-} RelFileLocatorBackend;
-
-#define RelFileLocatorBackendIsTemp(rlocator) \
-	((rlocator).backend != InvalidBackendId)
-
-/*
- * Note: RelFileLocatorEquals and RelFileLocatorBackendEquals compare relNumber
- * first since that is most likely to be different in two unequal
- * RelFileLocators.  It is probably redundant to compare spcOid if the other
- * fields are found equal, but do it anyway to be sure.  Likewise for checking
- * the backend ID in RelFileLocatorBackendEquals.
- */
-#define RelFileLocatorEquals(locator1, locator2) \
-	((locator1).relNumber == (locator2).relNumber && \
-	 (locator1).dbOid == (locator2).dbOid && \
-	 (locator1).spcOid == (locator2).spcOid)
-
-#define RelFileLocatorBackendEquals(locator1, locator2) \
-	((locator1).locator.relNumber == (locator2).locator.relNumber && \
-	 (locator1).locator.dbOid == (locator2).locator.dbOid && \
-	 (locator1).backend == (locator2).backend && \
-	 (locator1).locator.spcOid == (locator2).locator.spcOid)
-
-#endif							/* RELFILELOCATOR_H */
diff --git a/contrib/libs/libpq/src/include/utils/ascii.h b/contrib/libs/libpq/src/include/utils/ascii.h
deleted file mode 100644
index 7df024dad3..0000000000
--- a/contrib/libs/libpq/src/include/utils/ascii.h
+++ /dev/null
@@ -1,84 +0,0 @@
-/*-----------------------------------------------------------------------
- * ascii.h
- *
- *	 Portions Copyright (c) 1999-2023, PostgreSQL Global Development Group
- *
- * src/include/utils/ascii.h
- *
- *-----------------------------------------------------------------------
- */
-
-#ifndef _ASCII_H_
-#define _ASCII_H_
-
-#include "port/simd.h"
-
-extern void ascii_safe_strlcpy(char *dest, const char *src, size_t destsiz);
-
-/*
- * Verify a chunk of bytes for valid ASCII.
- *
- * Returns false if the input contains any zero bytes or bytes with the
- * high-bit set. Input len must be a multiple of the chunk size (8 or 16).
- */
-static inline bool
-is_valid_ascii(const unsigned char *s, int len)
-{
-	const unsigned char *const s_end = s + len;
-	Vector8		chunk;
-	Vector8		highbit_cum = vector8_broadcast(0);
-#ifdef USE_NO_SIMD
-	Vector8		zero_cum = vector8_broadcast(0x80);
-#endif
-
-	Assert(len % sizeof(chunk) == 0);
-
-	while (s < s_end)
-	{
-		vector8_load(&chunk, s);
-
-		/* Capture any zero bytes in this chunk. */
-#ifdef USE_NO_SIMD
-
-		/*
-		 * First, add 0x7f to each byte. This sets the high bit in each byte,
-		 * unless it was a zero. If any resulting high bits are zero, the
-		 * corresponding high bits in the zero accumulator will be cleared.
-		 *
-		 * If none of the bytes in the chunk had the high bit set, the max
-		 * value each byte can have after the addition is 0x7f + 0x7f = 0xfe,
-		 * and we don't need to worry about carrying over to the next byte. If
-		 * any input bytes did have the high bit set, it doesn't matter
-		 * because we check for those separately.
-		 */
-		zero_cum &= (chunk + vector8_broadcast(0x7F));
-#else
-
-		/*
-		 * Set all bits in each lane of the highbit accumulator where input
-		 * bytes are zero.
-		 */
-		highbit_cum = vector8_or(highbit_cum,
-								 vector8_eq(chunk, vector8_broadcast(0)));
-#endif
-
-		/* Capture all set bits in this chunk. */
-		highbit_cum = vector8_or(highbit_cum, chunk);
-
-		s += sizeof(chunk);
-	}
-
-	/* Check if any high bits in the high bit accumulator got set. */
-	if (vector8_is_highbit_set(highbit_cum))
-		return false;
-
-#ifdef USE_NO_SIMD
-	/* Check if any high bits in the zero accumulator got cleared. */
-	if (zero_cum != vector8_broadcast(0x80))
-		return false;
-#endif
-
-	return true;
-}
-
-#endif							/* _ASCII_H_ */
diff --git a/contrib/libs/libpq/src/include/utils/elog.h b/contrib/libs/libpq/src/include/utils/elog.h
deleted file mode 100644
index 0292e88b4f..0000000000
--- a/contrib/libs/libpq/src/include/utils/elog.h
+++ /dev/null
@@ -1,545 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * elog.h
- *	  POSTGRES error reporting/logging definitions.
- *
- *
- * Portions Copyright (c) 1996-2023, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- * src/include/utils/elog.h
- *
- *-------------------------------------------------------------------------
- */
-#ifndef ELOG_H
-#define ELOG_H
-
-#include <setjmp.h>
-
-#include "lib/stringinfo.h"
-
-/* We cannot include nodes.h yet, so forward-declare struct Node */
-struct Node;
-
-
-/* Error level codes */
-#define DEBUG5		10			/* Debugging messages, in categories of
-								 * decreasing detail. */
-#define DEBUG4		11
-#define DEBUG3		12
-#define DEBUG2		13
-#define DEBUG1		14			/* used by GUC debug_* variables */
-#define LOG			15			/* Server operational messages; sent only to
-								 * server log by default. */
-#define LOG_SERVER_ONLY 16		/* Same as LOG for server reporting, but never
-								 * sent to client. */
-#define COMMERROR	LOG_SERVER_ONLY /* Client communication problems; same as
-									 * LOG for server reporting, but never
-									 * sent to client. */
-#define INFO		17			/* Messages specifically requested by user (eg
-								 * VACUUM VERBOSE output); always sent to
-								 * client regardless of client_min_messages,
-								 * but by default not sent to server log. */
-#define NOTICE		18			/* Helpful messages to users about query
-								 * operation; sent to client and not to server
-								 * log by default. */
-#define WARNING		19			/* Warnings.  NOTICE is for expected messages
-								 * like implicit sequence creation by SERIAL.
-								 * WARNING is for unexpected messages. */
-#define PGWARNING	19			/* Must equal WARNING; see NOTE below. */
-#define WARNING_CLIENT_ONLY	20	/* Warnings to be sent to client as usual, but
-								 * never to the server log. */
-#define ERROR		21			/* user error - abort transaction; return to
-								 * known state */
-#define PGERROR		21			/* Must equal ERROR; see NOTE below. */
-#define FATAL		22			/* fatal error - abort process */
-#define PANIC		23			/* take down the other backends with me */
-
-/*
- * NOTE: the alternate names PGWARNING and PGERROR are useful for dealing
- * with third-party headers that make other definitions of WARNING and/or
- * ERROR.  One can, for example, re-define ERROR as PGERROR after including
- * such a header.
- */
-
-
-/* macros for representing SQLSTATE strings compactly */
-#define PGSIXBIT(ch)	(((ch) - '0') & 0x3F)
-#define PGUNSIXBIT(val) (((val) & 0x3F) + '0')
-
-#define MAKE_SQLSTATE(ch1,ch2,ch3,ch4,ch5)	\
-	(PGSIXBIT(ch1) + (PGSIXBIT(ch2) << 6) + (PGSIXBIT(ch3) << 12) + \
-	 (PGSIXBIT(ch4) << 18) + (PGSIXBIT(ch5) << 24))
-
-/* These macros depend on the fact that '0' becomes a zero in PGSIXBIT */
-#define ERRCODE_TO_CATEGORY(ec)  ((ec) & ((1 << 12) - 1))
-#define ERRCODE_IS_CATEGORY(ec)  (((ec) & ~((1 << 12) - 1)) == 0)
-
-/* SQLSTATE codes for errors are defined in a separate file */
-#include "utils/errcodes.h"
-
-/*
- * Provide a way to prevent "errno" from being accidentally used inside an
- * elog() or ereport() invocation.  Since we know that some operating systems
- * define errno as something involving a function call, we'll put a local
- * variable of the same name as that function in the local scope to force a
- * compile error.  On platforms that don't define errno in that way, nothing
- * happens, so we get no warning ... but we can live with that as long as it
- * happens on some popular platforms.
- */
-#if defined(errno) && defined(__linux__)
-#define pg_prevent_errno_in_scope() int __errno_location pg_attribute_unused()
-#elif defined(errno) && (defined(__darwin__) || defined(__FreeBSD__))
-#define pg_prevent_errno_in_scope() int __error pg_attribute_unused()
-#else
-#define pg_prevent_errno_in_scope()
-#endif
-
-
-/*----------
- * New-style error reporting API: to be used in this way:
- *		ereport(ERROR,
- *				errcode(ERRCODE_UNDEFINED_CURSOR),
- *				errmsg("portal \"%s\" not found", stmt->portalname),
- *				... other errxxx() fields as needed ...);
- *
- * The error level is required, and so is a primary error message (errmsg
- * or errmsg_internal).  All else is optional.  errcode() defaults to
- * ERRCODE_INTERNAL_ERROR if elevel is ERROR or more, ERRCODE_WARNING
- * if elevel is WARNING, or ERRCODE_SUCCESSFUL_COMPLETION if elevel is
- * NOTICE or below.
- *
- * Before Postgres v12, extra parentheses were required around the
- * list of auxiliary function calls; that's now optional.
- *
- * ereport_domain() allows a message domain to be specified, for modules that
- * wish to use a different message catalog from the backend's.  To avoid having
- * one copy of the default text domain per .o file, we define it as NULL here
- * and have errstart insert the default text domain.  Modules can either use
- * ereport_domain() directly, or preferably they can override the TEXTDOMAIN
- * macro.
- *
- * When __builtin_constant_p is available and elevel >= ERROR we make a call
- * to errstart_cold() instead of errstart().  This version of the function is
- * marked with pg_attribute_cold which will coax supporting compilers into
- * generating code which is more optimized towards non-ERROR cases.  Because
- * we use __builtin_constant_p() in the condition, when elevel is not a
- * compile-time constant, or if it is, but it's < ERROR, the compiler has no
- * need to generate any code for this branch.  It can simply call errstart()
- * unconditionally.
- *
- * If elevel >= ERROR, the call will not return; we try to inform the compiler
- * of that via pg_unreachable().  However, no useful optimization effect is
- * obtained unless the compiler sees elevel as a compile-time constant, else
- * we're just adding code bloat.  So, if __builtin_constant_p is available,
- * use that to cause the second if() to vanish completely for non-constant
- * cases.  We avoid using a local variable because it's not necessary and
- * prevents gcc from making the unreachability deduction at optlevel -O0.
- *----------
- */
-#ifdef HAVE__BUILTIN_CONSTANT_P
-#define ereport_domain(elevel, domain, ...)	\
-	do { \
-		pg_prevent_errno_in_scope(); \
-		if (__builtin_constant_p(elevel) && (elevel) >= ERROR ? \
-			errstart_cold(elevel, domain) : \
-			errstart(elevel, domain)) \
-			__VA_ARGS__, errfinish(__FILE__, __LINE__, __func__); \
-		if (__builtin_constant_p(elevel) && (elevel) >= ERROR) \
-			pg_unreachable(); \
-	} while(0)
-#else							/* !HAVE__BUILTIN_CONSTANT_P */
-#define ereport_domain(elevel, domain, ...)	\
-	do { \
-		const int elevel_ = (elevel); \
-		pg_prevent_errno_in_scope(); \
-		if (errstart(elevel_, domain)) \
-			__VA_ARGS__, errfinish(__FILE__, __LINE__, __func__); \
-		if (elevel_ >= ERROR) \
-			pg_unreachable(); \
-	} while(0)
-#endif							/* HAVE__BUILTIN_CONSTANT_P */
-
-#define ereport(elevel, ...)	\
-	ereport_domain(elevel, TEXTDOMAIN, __VA_ARGS__)
-
-#define TEXTDOMAIN NULL
-
-extern bool message_level_is_interesting(int elevel);
-
-extern bool errstart(int elevel, const char *domain);
-extern pg_attribute_cold bool errstart_cold(int elevel, const char *domain);
-extern void errfinish(const char *filename, int lineno, const char *funcname);
-
-extern int	errcode(int sqlerrcode);
-
-extern int	errcode_for_file_access(void);
-extern int	errcode_for_socket_access(void);
-
-extern int	errmsg(const char *fmt,...) pg_attribute_printf(1, 2);
-extern int	errmsg_internal(const char *fmt,...) pg_attribute_printf(1, 2);
-
-extern int	errmsg_plural(const char *fmt_singular, const char *fmt_plural,
-						  unsigned long n,...) pg_attribute_printf(1, 4) pg_attribute_printf(2, 4);
-
-extern int	errdetail(const char *fmt,...) pg_attribute_printf(1, 2);
-extern int	errdetail_internal(const char *fmt,...) pg_attribute_printf(1, 2);
-
-extern int	errdetail_log(const char *fmt,...) pg_attribute_printf(1, 2);
-
-extern int	errdetail_log_plural(const char *fmt_singular,
-								 const char *fmt_plural,
-								 unsigned long n,...) pg_attribute_printf(1, 4) pg_attribute_printf(2, 4);
-
-extern int	errdetail_plural(const char *fmt_singular, const char *fmt_plural,
-							 unsigned long n,...) pg_attribute_printf(1, 4) pg_attribute_printf(2, 4);
-
-extern int	errhint(const char *fmt,...) pg_attribute_printf(1, 2);
-
-extern int	errhint_plural(const char *fmt_singular, const char *fmt_plural,
-						   unsigned long n,...) pg_attribute_printf(1, 4) pg_attribute_printf(2, 4);
-
-/*
- * errcontext() is typically called in error context callback functions, not
- * within an ereport() invocation. The callback function can be in a different
- * module than the ereport() call, so the message domain passed in errstart()
- * is not usually the correct domain for translating the context message.
- * set_errcontext_domain() first sets the domain to be used, and
- * errcontext_msg() passes the actual message.
- */
-#define errcontext	set_errcontext_domain(TEXTDOMAIN),	errcontext_msg
-
-extern int	set_errcontext_domain(const char *domain);
-
-extern int	errcontext_msg(const char *fmt,...) pg_attribute_printf(1, 2);
-
-extern int	errhidestmt(bool hide_stmt);
-extern int	errhidecontext(bool hide_ctx);
-
-extern int	errbacktrace(void);
-
-extern int	errposition(int cursorpos);
-
-extern int	internalerrposition(int cursorpos);
-extern int	internalerrquery(const char *query);
-
-extern int	err_generic_string(int field, const char *str);
-
-extern int	geterrcode(void);
-extern int	geterrposition(void);
-extern int	getinternalerrposition(void);
-
-
-/*----------
- * Old-style error reporting API: to be used in this way:
- *		elog(ERROR, "portal \"%s\" not found", stmt->portalname);
- *----------
- */
-#define elog(elevel, ...)  \
-	ereport(elevel, errmsg_internal(__VA_ARGS__))
-
-
-/*----------
- * Support for reporting "soft" errors that don't require a full transaction
- * abort to clean up.  This is to be used in this way:
- *		errsave(context,
- *				errcode(ERRCODE_INVALID_TEXT_REPRESENTATION),
- *				errmsg("invalid input syntax for type %s: \"%s\"",
- *					   "boolean", in_str),
- *				... other errxxx() fields as needed ...);
- *
- * "context" is a node pointer or NULL, and the remaining auxiliary calls
- * provide the same error details as in ereport().  If context is not a
- * pointer to an ErrorSaveContext node, then errsave(context, ...)
- * behaves identically to ereport(ERROR, ...).  If context is a pointer
- * to an ErrorSaveContext node, then the information provided by the
- * auxiliary calls is stored in the context node and control returns
- * normally.  The caller of errsave() must then do any required cleanup
- * and return control back to its caller.  That caller must check the
- * ErrorSaveContext node to see whether an error occurred before
- * it can trust the function's result to be meaningful.
- *
- * errsave_domain() allows a message domain to be specified; it is
- * precisely analogous to ereport_domain().
- *----------
- */
-#define errsave_domain(context, domain, ...)	\
-	do { \
-		struct Node *context_ = (context); \
-		pg_prevent_errno_in_scope(); \
-		if (errsave_start(context_, domain)) \
-			__VA_ARGS__, errsave_finish(context_, __FILE__, __LINE__, __func__); \
-	} while(0)
-
-#define errsave(context, ...)	\
-	errsave_domain(context, TEXTDOMAIN, __VA_ARGS__)
-
-/*
- * "ereturn(context, dummy_value, ...);" is exactly the same as
- * "errsave(context, ...); return dummy_value;".  This saves a bit
- * of typing in the common case where a function has no cleanup
- * actions to take after reporting a soft error.  "dummy_value"
- * can be empty if the function returns void.
- */
-#define ereturn_domain(context, dummy_value, domain, ...)	\
-	do { \
-		errsave_domain(context, domain, __VA_ARGS__); \
-		return dummy_value; \
-	} while(0)
-
-#define ereturn(context, dummy_value, ...)	\
-	ereturn_domain(context, dummy_value, TEXTDOMAIN, __VA_ARGS__)
-
-extern bool errsave_start(struct Node *context, const char *domain);
-extern void errsave_finish(struct Node *context,
-						   const char *filename, int lineno,
-						   const char *funcname);
-
-
-/* Support for constructing error strings separately from ereport() calls */
-
-extern void pre_format_elog_string(int errnumber, const char *domain);
-extern char *format_elog_string(const char *fmt,...) pg_attribute_printf(1, 2);
-
-
-/* Support for attaching context information to error reports */
-
-typedef struct ErrorContextCallback
-{
-	struct ErrorContextCallback *previous;
-	void		(*callback) (void *arg);
-	void	   *arg;
-} ErrorContextCallback;
-
-extern PGDLLIMPORT ErrorContextCallback *error_context_stack;
-
-
-/*----------
- * API for catching ereport(ERROR) exits.  Use these macros like so:
- *
- *		PG_TRY();
- *		{
- *			... code that might throw ereport(ERROR) ...
- *		}
- *		PG_CATCH();
- *		{
- *			... error recovery code ...
- *		}
- *		PG_END_TRY();
- *
- * (The braces are not actually necessary, but are recommended so that
- * pgindent will indent the construct nicely.)  The error recovery code
- * can either do PG_RE_THROW to propagate the error outwards, or do a
- * (sub)transaction abort. Failure to do so may leave the system in an
- * inconsistent state for further processing.
- *
- * For the common case that the error recovery code and the cleanup in the
- * normal code path are identical, the following can be used instead:
- *
- *		PG_TRY();
- *		{
- *			... code that might throw ereport(ERROR) ...
- *		}
- *		PG_FINALLY();
- *		{
- *			... cleanup code ...
- *		}
- *      PG_END_TRY();
- *
- * The cleanup code will be run in either case, and any error will be rethrown
- * afterwards.
- *
- * You cannot use both PG_CATCH() and PG_FINALLY() in the same
- * PG_TRY()/PG_END_TRY() block.
- *
- * Note: while the system will correctly propagate any new ereport(ERROR)
- * occurring in the recovery section, there is a small limit on the number
- * of levels this will work for.  It's best to keep the error recovery
- * section simple enough that it can't generate any new errors, at least
- * not before popping the error stack.
- *
- * Note: an ereport(FATAL) will not be caught by this construct; control will
- * exit straight through proc_exit().  Therefore, do NOT put any cleanup
- * of non-process-local resources into the error recovery section, at least
- * not without taking thought for what will happen during ereport(FATAL).
- * The PG_ENSURE_ERROR_CLEANUP macros provided by storage/ipc.h may be
- * helpful in such cases.
- *
- * Note: if a local variable of the function containing PG_TRY is modified
- * in the PG_TRY section and used in the PG_CATCH section, that variable
- * must be declared "volatile" for POSIX compliance.  This is not mere
- * pedantry; we have seen bugs from compilers improperly optimizing code
- * away when such a variable was not marked.  Beware that gcc's -Wclobbered
- * warnings are just about entirely useless for catching such oversights.
- *
- * Each of these macros accepts an optional argument which can be specified
- * to apply a suffix to the variables declared within the macros.  This suffix
- * can be used to avoid the compiler emitting warnings about shadowed
- * variables when compiling with -Wshadow in situations where nested PG_TRY()
- * statements are required.  The optional suffix may contain any character
- * that's allowed in a variable name.  The suffix, if specified, must be the
- * same within each component macro of the given PG_TRY() statement.
- *----------
- */
-#define PG_TRY(...)  \
-	do { \
-		sigjmp_buf *_save_exception_stack##__VA_ARGS__ = PG_exception_stack; \
-		ErrorContextCallback *_save_context_stack##__VA_ARGS__ = error_context_stack; \
-		sigjmp_buf _local_sigjmp_buf##__VA_ARGS__; \
-		bool _do_rethrow##__VA_ARGS__ = false; \
-		if (sigsetjmp(_local_sigjmp_buf##__VA_ARGS__, 0) == 0) \
-		{ \
-			PG_exception_stack = &_local_sigjmp_buf##__VA_ARGS__
-
-#define PG_CATCH(...)	\
-		} \
-		else \
-		{ \
-			PG_exception_stack = _save_exception_stack##__VA_ARGS__; \
-			error_context_stack = _save_context_stack##__VA_ARGS__
-
-#define PG_FINALLY(...) \
-		} \
-		else \
-			_do_rethrow##__VA_ARGS__ = true; \
-		{ \
-			PG_exception_stack = _save_exception_stack##__VA_ARGS__; \
-			error_context_stack = _save_context_stack##__VA_ARGS__
-
-#define PG_END_TRY(...)  \
-		} \
-		if (_do_rethrow##__VA_ARGS__) \
-				PG_RE_THROW(); \
-		PG_exception_stack = _save_exception_stack##__VA_ARGS__; \
-		error_context_stack = _save_context_stack##__VA_ARGS__; \
-	} while (0)
-
-/*
- * Some compilers understand pg_attribute_noreturn(); for other compilers,
- * insert pg_unreachable() so that the compiler gets the point.
- */
-#ifdef HAVE_PG_ATTRIBUTE_NORETURN
-#define PG_RE_THROW()  \
-	pg_re_throw()
-#else
-#define PG_RE_THROW()  \
-	(pg_re_throw(), pg_unreachable())
-#endif
-
-extern PGDLLIMPORT sigjmp_buf *PG_exception_stack;
-
-
-/* Stuff that error handlers might want to use */
-
-/*
- * ErrorData holds the data accumulated during any one ereport() cycle.
- * Any non-NULL pointers must point to palloc'd data.
- * (The const pointers are an exception; we assume they point at non-freeable
- * constant strings.)
- */
-typedef struct ErrorData
-{
-	int			elevel;			/* error level */
-	bool		output_to_server;	/* will report to server log? */
-	bool		output_to_client;	/* will report to client? */
-	bool		hide_stmt;		/* true to prevent STATEMENT: inclusion */
-	bool		hide_ctx;		/* true to prevent CONTEXT: inclusion */
-	const char *filename;		/* __FILE__ of ereport() call */
-	int			lineno;			/* __LINE__ of ereport() call */
-	const char *funcname;		/* __func__ of ereport() call */
-	const char *domain;			/* message domain */
-	const char *context_domain; /* message domain for context message */
-	int			sqlerrcode;		/* encoded ERRSTATE */
-	char	   *message;		/* primary error message (translated) */
-	char	   *detail;			/* detail error message */
-	char	   *detail_log;		/* detail error message for server log only */
-	char	   *hint;			/* hint message */
-	char	   *context;		/* context message */
-	char	   *backtrace;		/* backtrace */
-	const char *message_id;		/* primary message's id (original string) */
-	char	   *schema_name;	/* name of schema */
-	char	   *table_name;		/* name of table */
-	char	   *column_name;	/* name of column */
-	char	   *datatype_name;	/* name of datatype */
-	char	   *constraint_name;	/* name of constraint */
-	int			cursorpos;		/* cursor index into query string */
-	int			internalpos;	/* cursor index into internalquery */
-	char	   *internalquery;	/* text of internally-generated query */
-	int			saved_errno;	/* errno at entry */
-
-	/* context containing associated non-constant strings */
-	struct MemoryContextData *assoc_context;
-} ErrorData;
-
-extern void EmitErrorReport(void);
-extern ErrorData *CopyErrorData(void);
-extern void FreeErrorData(ErrorData *edata);
-extern void FlushErrorState(void);
-extern void ReThrowError(ErrorData *edata) pg_attribute_noreturn();
-extern void ThrowErrorData(ErrorData *edata);
-extern void pg_re_throw(void) pg_attribute_noreturn();
-
-extern char *GetErrorContextStack(void);
-
-/* Hook for intercepting messages before they are sent to the server log */
-typedef void (*emit_log_hook_type) (ErrorData *edata);
-extern PGDLLIMPORT emit_log_hook_type emit_log_hook;
-
-
-/* GUC-configurable parameters */
-
-typedef enum
-{
-	PGERROR_TERSE,				/* single-line error messages */
-	PGERROR_DEFAULT,			/* recommended style */
-	PGERROR_VERBOSE				/* all the facts, ma'am */
-}			PGErrorVerbosity;
-
-extern PGDLLIMPORT int Log_error_verbosity;
-extern PGDLLIMPORT char *Log_line_prefix;
-extern PGDLLIMPORT int Log_destination;
-extern PGDLLIMPORT char *Log_destination_string;
-extern PGDLLIMPORT bool syslog_sequence_numbers;
-extern PGDLLIMPORT bool syslog_split_messages;
-
-/* Log destination bitmap */
-#define LOG_DESTINATION_STDERR	 1
-#define LOG_DESTINATION_SYSLOG	 2
-#define LOG_DESTINATION_EVENTLOG 4
-#define LOG_DESTINATION_CSVLOG	 8
-#define LOG_DESTINATION_JSONLOG	16
-
-/* Other exported functions */
-extern void log_status_format(StringInfo buf, const char *format,
-							  ErrorData *edata);
-extern void DebugFileOpen(void);
-extern char *unpack_sql_state(int sql_state);
-extern bool in_error_recursion_trouble(void);
-
-/* Common functions shared across destinations */
-extern void reset_formatted_start_time(void);
-extern char *get_formatted_start_time(void);
-extern char *get_formatted_log_time(void);
-extern const char *get_backend_type_for_log(void);
-extern bool check_log_of_query(ErrorData *edata);
-extern const char *error_severity(int elevel);
-extern void write_pipe_chunks(char *data, int len, int dest);
-
-/* Destination-specific functions */
-extern void write_csvlog(ErrorData *edata);
-extern void write_jsonlog(ErrorData *edata);
-
-/*
- * Write errors to stderr (or by equal means when stderr is
- * not available). Used before ereport/elog can be used
- * safely (memory context, GUC load etc)
- */
-extern void write_stderr(const char *fmt,...) pg_attribute_printf(1, 2);
-
-/*
- * Write a message to STDERR using only async-signal-safe functions.  This can
- * be used to safely emit a message from a signal handler.
- */
-extern void write_stderr_signal_safe(const char *fmt);
-
-#endif							/* ELOG_H */
diff --git a/contrib/libs/libpq/src/include/utils/palloc.h b/contrib/libs/libpq/src/include/utils/palloc.h
deleted file mode 100644
index d1146c1235..0000000000
--- a/contrib/libs/libpq/src/include/utils/palloc.h
+++ /dev/null
@@ -1,165 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * palloc.h
- *	  POSTGRES memory allocator definitions.
- *
- * This file contains the basic memory allocation interface that is
- * needed by almost every backend module.  It is included directly by
- * postgres.h, so the definitions here are automatically available
- * everywhere.  Keep it lean!
- *
- * Memory allocation occurs within "contexts".  Every chunk obtained from
- * palloc()/MemoryContextAlloc() is allocated within a specific context.
- * The entire contents of a context can be freed easily and quickly by
- * resetting or deleting the context --- this is both faster and less
- * prone to memory-leakage bugs than releasing chunks individually.
- * We organize contexts into context trees to allow fine-grain control
- * over chunk lifetime while preserving the certainty that we will free
- * everything that should be freed.  See utils/mmgr/README for more info.
- *
- *
- * Portions Copyright (c) 1996-2023, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- * src/include/utils/palloc.h
- *
- *-------------------------------------------------------------------------
- */
-#ifndef PALLOC_H
-#define PALLOC_H
-
-/*
- * Type MemoryContextData is declared in nodes/memnodes.h.  Most users
- * of memory allocation should just treat it as an abstract type, so we
- * do not provide the struct contents here.
- */
-typedef struct MemoryContextData *MemoryContext;
-
-/*
- * A memory context can have callback functions registered on it.  Any such
- * function will be called once just before the context is next reset or
- * deleted.  The MemoryContextCallback struct describing such a callback
- * typically would be allocated within the context itself, thereby avoiding
- * any need to manage it explicitly (the reset/delete action will free it).
- */
-typedef void (*MemoryContextCallbackFunction) (void *arg);
-
-typedef struct MemoryContextCallback
-{
-	MemoryContextCallbackFunction func; /* function to call */
-	void	   *arg;			/* argument to pass it */
-	struct MemoryContextCallback *next; /* next in list of callbacks */
-} MemoryContextCallback;
-
-/*
- * CurrentMemoryContext is the default allocation context for palloc().
- * Avoid accessing it directly!  Instead, use MemoryContextSwitchTo()
- * to change the setting.
- */
-extern PGDLLIMPORT MemoryContext CurrentMemoryContext;
-
-/*
- * Flags for MemoryContextAllocExtended.
- */
-#define MCXT_ALLOC_HUGE			0x01	/* allow huge allocation (> 1 GB) */
-#define MCXT_ALLOC_NO_OOM		0x02	/* no failure if out-of-memory */
-#define MCXT_ALLOC_ZERO			0x04	/* zero allocated memory */
-
-/*
- * Fundamental memory-allocation operations (more are in utils/memutils.h)
- */
-extern void *MemoryContextAlloc(MemoryContext context, Size size);
-extern void *MemoryContextAllocZero(MemoryContext context, Size size);
-extern void *MemoryContextAllocZeroAligned(MemoryContext context, Size size);
-extern void *MemoryContextAllocExtended(MemoryContext context,
-										Size size, int flags);
-extern void *MemoryContextAllocAligned(MemoryContext context,
-									   Size size, Size alignto, int flags);
-
-extern void *palloc(Size size);
-extern void *palloc0(Size size);
-extern void *palloc_extended(Size size, int flags);
-extern void *palloc_aligned(Size size, Size alignto, int flags);
-extern pg_nodiscard void *repalloc(void *pointer, Size size);
-extern pg_nodiscard void *repalloc_extended(void *pointer,
-											Size size, int flags);
-extern pg_nodiscard void *repalloc0(void *pointer, Size oldsize, Size size);
-extern void pfree(void *pointer);
-
-/*
- * Variants with easier notation and more type safety
- */
-
-/*
- * Allocate space for one object of type "type"
- */
-#define palloc_object(type) ((type *) palloc(sizeof(type)))
-#define palloc0_object(type) ((type *) palloc0(sizeof(type)))
-
-/*
- * Allocate space for "count" objects of type "type"
- */
-#define palloc_array(type, count) ((type *) palloc(sizeof(type) * (count)))
-#define palloc0_array(type, count) ((type *) palloc0(sizeof(type) * (count)))
-
-/*
- * Change size of allocation pointed to by "pointer" to have space for "count"
- * objects of type "type"
- */
-#define repalloc_array(pointer, type, count) ((type *) repalloc(pointer, sizeof(type) * (count)))
-#define repalloc0_array(pointer, type, oldcount, count) ((type *) repalloc0(pointer, sizeof(type) * (oldcount), sizeof(type) * (count)))
-
-/*
- * The result of palloc() is always word-aligned, so we can skip testing
- * alignment of the pointer when deciding which MemSet variant to use.
- * Note that this variant does not offer any advantage, and should not be
- * used, unless its "sz" argument is a compile-time constant; therefore, the
- * issue that it evaluates the argument multiple times isn't a problem in
- * practice.
- */
-#define palloc0fast(sz) \
-	( MemSetTest(0, sz) ? \
-		MemoryContextAllocZeroAligned(CurrentMemoryContext, sz) : \
-		MemoryContextAllocZero(CurrentMemoryContext, sz) )
-
-/* Higher-limit allocators. */
-extern void *MemoryContextAllocHuge(MemoryContext context, Size size);
-extern pg_nodiscard void *repalloc_huge(void *pointer, Size size);
-
-/*
- * Although this header file is nominally backend-only, certain frontend
- * programs like pg_controldata include it via postgres.h.  For some compilers
- * it's necessary to hide the inline definition of MemoryContextSwitchTo in
- * this scenario; hence the #ifndef FRONTEND.
- */
-
-#ifndef FRONTEND
-static inline MemoryContext
-MemoryContextSwitchTo(MemoryContext context)
-{
-	MemoryContext old = CurrentMemoryContext;
-
-	CurrentMemoryContext = context;
-	return old;
-}
-#endif							/* FRONTEND */
-
-/* Registration of memory context reset/delete callbacks */
-extern void MemoryContextRegisterResetCallback(MemoryContext context,
-											   MemoryContextCallback *cb);
-
-/*
- * These are like standard strdup() except the copied string is
- * allocated in a context, not with malloc().
- */
-extern char *MemoryContextStrdup(MemoryContext context, const char *string);
-extern char *pstrdup(const char *in);
-extern char *pnstrdup(const char *in, Size len);
-
-extern char *pchomp(const char *in);
-
-/* sprintf into a palloc'd buffer --- these are in psprintf.c */
-extern char *psprintf(const char *fmt,...) pg_attribute_printf(1, 2);
-extern size_t pvsnprintf(char *buf, size_t len, const char *fmt, va_list args) pg_attribute_printf(3, 0);
-
-#endif							/* PALLOC_H */
diff --git a/contrib/libs/libpq/src/interfaces/libpq/README b/contrib/libs/libpq/src/interfaces/libpq/README
deleted file mode 100644
index 0dcef75a83..0000000000
--- a/contrib/libs/libpq/src/interfaces/libpq/README
+++ /dev/null
@@ -1,3 +0,0 @@
-src/interfaces/libpq/README
-
-This directory contains the C version of Libpq, the POSTGRES frontend library.
diff --git a/contrib/libs/libpq/src/interfaces/libpq/exports.txt b/contrib/libs/libpq/src/interfaces/libpq/exports.txt
deleted file mode 100644
index 7ded77aff3..0000000000
--- a/contrib/libs/libpq/src/interfaces/libpq/exports.txt
+++ /dev/null
@@ -1,189 +0,0 @@
-# src/interfaces/libpq/exports.txt
-# Functions to be exported by libpq DLLs
-PQconnectdb               1
-PQsetdbLogin              2
-PQconndefaults            3
-PQfinish                  4
-PQreset                   5
-PQrequestCancel           6
-PQdb                      7
-PQuser                    8
-PQpass                    9
-PQhost                    10
-PQport                    11
-PQtty                     12
-PQoptions                 13
-PQstatus                  14
-PQerrorMessage            15
-PQsocket                  16
-PQbackendPID              17
-PQtrace                   18
-PQuntrace                 19
-PQsetNoticeProcessor      20
-PQexec                    21
-PQnotifies                22
-PQsendQuery               23
-PQgetResult               24
-PQisBusy                  25
-PQconsumeInput            26
-PQgetline                 27
-PQputline                 28
-PQgetlineAsync            29
-PQputnbytes               30
-PQendcopy                 31
-PQfn                      32
-PQresultStatus            33
-PQntuples                 34
-PQnfields                 35
-PQbinaryTuples            36
-PQfname                   37
-PQfnumber                 38
-PQftype                   39
-PQfsize                   40
-PQfmod                    41
-PQcmdStatus               42
-PQoidStatus               43
-PQcmdTuples               44
-PQgetvalue                45
-PQgetlength               46
-PQgetisnull               47
-PQclear                   48
-PQmakeEmptyPGresult       49
-PQprint                   50
-PQdisplayTuples           51
-PQprintTuples             52
-lo_open                   53
-lo_close                  54
-lo_read                   55
-lo_write                  56
-lo_lseek                  57
-lo_creat                  58
-lo_tell                   59
-lo_unlink                 60
-lo_import                 61
-lo_export                 62
-pgresStatus               63
-PQmblen                   64
-PQresultErrorMessage      65
-PQresStatus               66
-termPQExpBuffer           67
-appendPQExpBufferChar     68
-initPQExpBuffer           69
-resetPQExpBuffer          70
-PQoidValue                71
-PQclientEncoding          72
-PQenv2encoding            73
-appendBinaryPQExpBuffer   74
-appendPQExpBufferStr      75
-destroyPQExpBuffer        76
-createPQExpBuffer         77
-PQconninfoFree            78
-PQconnectPoll             79
-PQconnectStart            80
-PQflush                   81
-PQisnonblocking           82
-PQresetPoll               83
-PQresetStart              84
-PQsetClientEncoding       85
-PQsetnonblocking          86
-PQfreeNotify              87
-PQescapeString            88
-PQescapeBytea             89
-printfPQExpBuffer         90
-appendPQExpBuffer         91
-pg_encoding_to_char       92
-pg_utf_mblen              93
-PQunescapeBytea           94
-PQfreemem                 95
-PQtransactionStatus       96
-PQparameterStatus         97
-PQprotocolVersion         98
-PQsetErrorVerbosity       99
-PQsetNoticeReceiver       100
-PQexecParams              101
-PQsendQueryParams         102
-PQputCopyData             103
-PQputCopyEnd              104
-PQgetCopyData             105
-PQresultErrorField        106
-PQftable                  107
-PQftablecol               108
-PQfformat                 109
-PQexecPrepared            110
-PQsendQueryPrepared       111
-PQdsplen                  112
-PQserverVersion           113
-PQgetssl                  114
-pg_char_to_encoding       115
-pg_valid_server_encoding  116
-pqsignal                  117
-PQprepare                 118
-PQsendPrepare             119
-PQgetCancel               120
-PQfreeCancel              121
-PQcancel                  122
-lo_create                 123
-PQinitSSL                 124
-PQregisterThreadLock      125
-PQescapeStringConn        126
-PQescapeByteaConn         127
-PQencryptPassword         128
-PQisthreadsafe            129
-enlargePQExpBuffer        130
-PQnparams                 131
-PQparamtype               132
-PQdescribePrepared        133
-PQdescribePortal          134
-PQsendDescribePrepared    135
-PQsendDescribePortal      136
-lo_truncate               137
-PQconnectionUsedPassword  138
-pg_valid_server_encoding_id 139
-PQconnectionNeedsPassword 140
-lo_import_with_oid        141
-PQcopyResult              142
-PQsetResultAttrs          143
-PQsetvalue                144
-PQresultAlloc             145
-PQregisterEventProc       146
-PQinstanceData            147
-PQsetInstanceData         148
-PQresultInstanceData      149
-PQresultSetInstanceData   150
-PQfireResultCreateEvents  151
-PQconninfoParse           152
-PQinitOpenSSL             153
-PQescapeLiteral           154
-PQescapeIdentifier        155
-PQconnectdbParams         156
-PQconnectStartParams      157
-PQping                    158
-PQpingParams              159
-PQlibVersion              160
-PQsetSingleRowMode        161
-lo_lseek64                162
-lo_tell64                 163
-lo_truncate64             164
-PQconninfo                165
-PQsslInUse                166
-PQsslStruct               167
-PQsslAttributeNames       168
-PQsslAttribute            169
-PQsetErrorContextVisibility 170
-PQresultVerboseErrorMessage 171
-PQencryptPasswordConn     172
-PQresultMemorySize        173
-PQhostaddr                174
-PQgssEncInUse             175
-PQgetgssctx               176
-PQsetSSLKeyPassHook_OpenSSL         177
-PQgetSSLKeyPassHook_OpenSSL         178
-PQdefaultSSLKeyPassHook_OpenSSL     179
-PQenterPipelineMode       180
-PQexitPipelineMode        181
-PQpipelineSync            182
-PQpipelineStatus          183
-PQsetTraceFlags           184
-PQmblenBounded            185
-PQsendFlushRequest        186
-PQconnectionUsedGSSAPI    187
diff --git a/contrib/libs/libpq/src/interfaces/libpq/fe-auth-sasl.h b/contrib/libs/libpq/src/interfaces/libpq/fe-auth-sasl.h
deleted file mode 100644
index ddf6ea3f3f..0000000000
--- a/contrib/libs/libpq/src/interfaces/libpq/fe-auth-sasl.h
+++ /dev/null
@@ -1,131 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * fe-auth-sasl.h
- *	  Defines the SASL mechanism interface for libpq.
- *
- * Each SASL mechanism defines a frontend and a backend callback structure.
- * This is not part of the public API for applications.
- *
- * See src/include/libpq/sasl.h for the backend counterpart.
- *
- * Portions Copyright (c) 1996-2023, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- * src/interfaces/libpq/fe-auth-sasl.h
- *
- *-------------------------------------------------------------------------
- */
-
-#ifndef FE_AUTH_SASL_H
-#define FE_AUTH_SASL_H
-
-#include "libpq-fe.h"
-
-/*
- * Frontend SASL mechanism callbacks.
- *
- * To implement a frontend mechanism, declare a pg_be_sasl_mech struct with
- * appropriate callback implementations, then hook it into conn->sasl during
- * pg_SASL_init()'s mechanism negotiation.
- */
-typedef struct pg_fe_sasl_mech
-{
-	/*-------
-	 * init()
-	 *
-	 * Initializes mechanism-specific state for a connection.  This
-	 * callback must return a pointer to its allocated state, which will
-	 * be passed as-is as the first argument to the other callbacks.
-	 * the free() callback is called to release any state resources.
-	 *
-	 * If state allocation fails, the implementation should return NULL to
-	 * fail the authentication exchange.
-	 *
-	 * Input parameters:
-	 *
-	 *   conn:     The connection to the server
-	 *
-	 *   password: The user's supplied password for the current connection
-	 *
-	 *   mech:     The mechanism name in use, for implementations that may
-	 *			   advertise more than one name (such as *-PLUS variants).
-	 *-------
-	 */
-	void	   *(*init) (PGconn *conn, const char *password, const char *mech);
-
-	/*--------
-	 * exchange()
-	 *
-	 * Produces a client response to a server challenge.  As a special case
-	 * for client-first SASL mechanisms, exchange() is called with a NULL
-	 * server response once at the start of the authentication exchange to
-	 * generate an initial response.
-	 *
-	 * Input parameters:
-	 *
-	 *	state:	   The opaque mechanism state returned by init()
-	 *
-	 *	input:	   The challenge data sent by the server, or NULL when
-	 *			   generating a client-first initial response (that is, when
-	 *			   the server expects the client to send a message to start
-	 *			   the exchange).  This is guaranteed to be null-terminated
-	 *			   for safety, but SASL allows embedded nulls in challenges,
-	 *			   so mechanisms must be careful to check inputlen.
-	 *
-	 *	inputlen:  The length of the challenge data sent by the server, or -1
-	 *             during client-first initial response generation.
-	 *
-	 * Output parameters, to be set by the callback function:
-	 *
-	 *	output:	   A malloc'd buffer containing the client's response to
-	 *			   the server (can be empty), or NULL if the exchange should
-	 *			   be aborted.  (*success should be set to false in the
-	 *			   latter case.)
-	 *
-	 *	outputlen: The length (0 or higher) of the client response buffer,
-	 *			   ignored if output is NULL.
-	 *
-	 *	done:      Set to true if the SASL exchange should not continue,
-	 *			   because the exchange is either complete or failed
-	 *
-	 *	success:   Set to true if the SASL exchange completed successfully.
-	 *			   Ignored if *done is false.
-	 *--------
-	 */
-	void		(*exchange) (void *state, char *input, int inputlen,
-							 char **output, int *outputlen,
-							 bool *done, bool *success);
-
-	/*--------
-	 * channel_bound()
-	 *
-	 * Returns true if the connection has an established channel binding.  A
-	 * mechanism implementation must ensure that a SASL exchange has actually
-	 * been completed, in addition to checking that channel binding is in use.
-	 *
-	 * Mechanisms that do not implement channel binding may simply return
-	 * false.
-	 *
-	 * Input parameters:
-	 *
-	 *	state:    The opaque mechanism state returned by init()
-	 *--------
-	 */
-	bool		(*channel_bound) (void *state);
-
-	/*--------
-	 * free()
-	 *
-	 * Frees the state allocated by init(). This is called when the connection
-	 * is dropped, not when the exchange is completed.
-	 *
-	 * Input parameters:
-	 *
-	 *   state:    The opaque mechanism state returned by init()
-	 *--------
-	 */
-	void		(*free) (void *state);
-
-} pg_fe_sasl_mech;
-
-#endif							/* FE_AUTH_SASL_H */
diff --git a/contrib/libs/libpq/src/interfaces/libpq/fe-auth-scram.c b/contrib/libs/libpq/src/interfaces/libpq/fe-auth-scram.c
deleted file mode 100644
index 6b779ec7ff..0000000000
--- a/contrib/libs/libpq/src/interfaces/libpq/fe-auth-scram.c
+++ /dev/null
@@ -1,936 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * fe-auth-scram.c
- *	   The front-end (client) implementation of SCRAM authentication.
- *
- * Portions Copyright (c) 1996-2023, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- * IDENTIFICATION
- *	  src/interfaces/libpq/fe-auth-scram.c
- *
- *-------------------------------------------------------------------------
- */
-
-#include "postgres_fe.h"
-
-#include "common/base64.h"
-#include "common/hmac.h"
-#include "common/saslprep.h"
-#include "common/scram-common.h"
-#include "fe-auth.h"
-
-
-/* The exported SCRAM callback mechanism. */
-static void *scram_init(PGconn *conn, const char *password,
-						const char *sasl_mechanism);
-static void scram_exchange(void *opaq, char *input, int inputlen,
-						   char **output, int *outputlen,
-						   bool *done, bool *success);
-static bool scram_channel_bound(void *opaq);
-static void scram_free(void *opaq);
-
-const pg_fe_sasl_mech pg_scram_mech = {
-	scram_init,
-	scram_exchange,
-	scram_channel_bound,
-	scram_free
-};
-
-/*
- * Status of exchange messages used for SCRAM authentication via the
- * SASL protocol.
- */
-typedef enum
-{
-	FE_SCRAM_INIT,
-	FE_SCRAM_NONCE_SENT,
-	FE_SCRAM_PROOF_SENT,
-	FE_SCRAM_FINISHED
-} fe_scram_state_enum;
-
-typedef struct
-{
-	fe_scram_state_enum state;
-
-	/* These are supplied by the user */
-	PGconn	   *conn;
-	char	   *password;
-	char	   *sasl_mechanism;
-
-	/* State data depending on the hash type */
-	pg_cryptohash_type hash_type;
-	int			key_length;
-
-	/* We construct these */
-	uint8		SaltedPassword[SCRAM_MAX_KEY_LEN];
-	char	   *client_nonce;
-	char	   *client_first_message_bare;
-	char	   *client_final_message_without_proof;
-
-	/* These come from the server-first message */
-	char	   *server_first_message;
-	char	   *salt;
-	int			saltlen;
-	int			iterations;
-	char	   *nonce;
-
-	/* These come from the server-final message */
-	char	   *server_final_message;
-	char		ServerSignature[SCRAM_MAX_KEY_LEN];
-} fe_scram_state;
-
-static bool read_server_first_message(fe_scram_state *state, char *input);
-static bool read_server_final_message(fe_scram_state *state, char *input);
-static char *build_client_first_message(fe_scram_state *state);
-static char *build_client_final_message(fe_scram_state *state);
-static bool verify_server_signature(fe_scram_state *state, bool *match,
-									const char **errstr);
-static bool calculate_client_proof(fe_scram_state *state,
-								   const char *client_final_message_without_proof,
-								   uint8 *result, const char **errstr);
-
-/*
- * Initialize SCRAM exchange status.
- */
-static void *
-scram_init(PGconn *conn,
-		   const char *password,
-		   const char *sasl_mechanism)
-{
-	fe_scram_state *state;
-	char	   *prep_password;
-	pg_saslprep_rc rc;
-
-	Assert(sasl_mechanism != NULL);
-
-	state = (fe_scram_state *) malloc(sizeof(fe_scram_state));
-	if (!state)
-		return NULL;
-	memset(state, 0, sizeof(fe_scram_state));
-	state->conn = conn;
-	state->state = FE_SCRAM_INIT;
-	state->key_length = SCRAM_SHA_256_KEY_LEN;
-	state->hash_type = PG_SHA256;
-
-	state->sasl_mechanism = strdup(sasl_mechanism);
-	if (!state->sasl_mechanism)
-	{
-		free(state);
-		return NULL;
-	}
-
-	/* Normalize the password with SASLprep, if possible */
-	rc = pg_saslprep(password, &prep_password);
-	if (rc == SASLPREP_OOM)
-	{
-		free(state->sasl_mechanism);
-		free(state);
-		return NULL;
-	}
-	if (rc != SASLPREP_SUCCESS)
-	{
-		prep_password = strdup(password);
-		if (!prep_password)
-		{
-			free(state->sasl_mechanism);
-			free(state);
-			return NULL;
-		}
-	}
-	state->password = prep_password;
-
-	return state;
-}
-
-/*
- * Return true if channel binding was employed and the SCRAM exchange
- * completed. This should be used after a successful exchange to determine
- * whether the server authenticated itself to the client.
- *
- * Note that the caller must also ensure that the exchange was actually
- * successful.
- */
-static bool
-scram_channel_bound(void *opaq)
-{
-	fe_scram_state *state = (fe_scram_state *) opaq;
-
-	/* no SCRAM exchange done */
-	if (state == NULL)
-		return false;
-
-	/* SCRAM exchange not completed */
-	if (state->state != FE_SCRAM_FINISHED)
-		return false;
-
-	/* channel binding mechanism not used */
-	if (strcmp(state->sasl_mechanism, SCRAM_SHA_256_PLUS_NAME) != 0)
-		return false;
-
-	/* all clear! */
-	return true;
-}
-
-/*
- * Free SCRAM exchange status
- */
-static void
-scram_free(void *opaq)
-{
-	fe_scram_state *state = (fe_scram_state *) opaq;
-
-	free(state->password);
-	free(state->sasl_mechanism);
-
-	/* client messages */
-	free(state->client_nonce);
-	free(state->client_first_message_bare);
-	free(state->client_final_message_without_proof);
-
-	/* first message from server */
-	free(state->server_first_message);
-	free(state->salt);
-	free(state->nonce);
-
-	/* final message from server */
-	free(state->server_final_message);
-
-	free(state);
-}
-
-/*
- * Exchange a SCRAM message with backend.
- */
-static void
-scram_exchange(void *opaq, char *input, int inputlen,
-			   char **output, int *outputlen,
-			   bool *done, bool *success)
-{
-	fe_scram_state *state = (fe_scram_state *) opaq;
-	PGconn	   *conn = state->conn;
-	const char *errstr = NULL;
-
-	*done = false;
-	*success = false;
-	*output = NULL;
-	*outputlen = 0;
-
-	/*
-	 * Check that the input length agrees with the string length of the input.
-	 * We can ignore inputlen after this.
-	 */
-	if (state->state != FE_SCRAM_INIT)
-	{
-		if (inputlen == 0)
-		{
-			libpq_append_conn_error(conn, "malformed SCRAM message (empty message)");
-			goto error;
-		}
-		if (inputlen != strlen(input))
-		{
-			libpq_append_conn_error(conn, "malformed SCRAM message (length mismatch)");
-			goto error;
-		}
-	}
-
-	switch (state->state)
-	{
-		case FE_SCRAM_INIT:
-			/* Begin the SCRAM handshake, by sending client nonce */
-			*output = build_client_first_message(state);
-			if (*output == NULL)
-				goto error;
-
-			*outputlen = strlen(*output);
-			*done = false;
-			state->state = FE_SCRAM_NONCE_SENT;
-			break;
-
-		case FE_SCRAM_NONCE_SENT:
-			/* Receive salt and server nonce, send response. */
-			if (!read_server_first_message(state, input))
-				goto error;
-
-			*output = build_client_final_message(state);
-			if (*output == NULL)
-				goto error;
-
-			*outputlen = strlen(*output);
-			*done = false;
-			state->state = FE_SCRAM_PROOF_SENT;
-			break;
-
-		case FE_SCRAM_PROOF_SENT:
-			/* Receive server signature */
-			if (!read_server_final_message(state, input))
-				goto error;
-
-			/*
-			 * Verify server signature, to make sure we're talking to the
-			 * genuine server.
-			 */
-			if (!verify_server_signature(state, success, &errstr))
-			{
-				libpq_append_conn_error(conn, "could not verify server signature: %s", errstr);
-				goto error;
-			}
-
-			if (!*success)
-			{
-				libpq_append_conn_error(conn, "incorrect server signature");
-			}
-			*done = true;
-			state->state = FE_SCRAM_FINISHED;
-			state->conn->client_finished_auth = true;
-			break;
-
-		default:
-			/* shouldn't happen */
-			libpq_append_conn_error(conn, "invalid SCRAM exchange state");
-			goto error;
-	}
-	return;
-
-error:
-	*done = true;
-	*success = false;
-}
-
-/*
- * Read value for an attribute part of a SCRAM message.
- *
- * The buffer at **input is destructively modified, and *input is
- * advanced over the "attr=value" string and any following comma.
- *
- * On failure, append an error message to *errorMessage and return NULL.
- */
-static char *
-read_attr_value(char **input, char attr, PQExpBuffer errorMessage)
-{
-	char	   *begin = *input;
-	char	   *end;
-
-	if (*begin != attr)
-	{
-		libpq_append_error(errorMessage,
-						   "malformed SCRAM message (attribute \"%c\" expected)",
-						   attr);
-		return NULL;
-	}
-	begin++;
-
-	if (*begin != '=')
-	{
-		libpq_append_error(errorMessage,
-						   "malformed SCRAM message (expected character \"=\" for attribute \"%c\")",
-						   attr);
-		return NULL;
-	}
-	begin++;
-
-	end = begin;
-	while (*end && *end != ',')
-		end++;
-
-	if (*end)
-	{
-		*end = '\0';
-		*input = end + 1;
-	}
-	else
-		*input = end;
-
-	return begin;
-}
-
-/*
- * Build the first exchange message sent by the client.
- */
-static char *
-build_client_first_message(fe_scram_state *state)
-{
-	PGconn	   *conn = state->conn;
-	char		raw_nonce[SCRAM_RAW_NONCE_LEN + 1];
-	char	   *result;
-	int			channel_info_len;
-	int			encoded_len;
-	PQExpBufferData buf;
-
-	/*
-	 * Generate a "raw" nonce.  This is converted to ASCII-printable form by
-	 * base64-encoding it.
-	 */
-	if (!pg_strong_random(raw_nonce, SCRAM_RAW_NONCE_LEN))
-	{
-		libpq_append_conn_error(conn, "could not generate nonce");
-		return NULL;
-	}
-
-	encoded_len = pg_b64_enc_len(SCRAM_RAW_NONCE_LEN);
-	/* don't forget the zero-terminator */
-	state->client_nonce = malloc(encoded_len + 1);
-	if (state->client_nonce == NULL)
-	{
-		libpq_append_conn_error(conn, "out of memory");
-		return NULL;
-	}
-	encoded_len = pg_b64_encode(raw_nonce, SCRAM_RAW_NONCE_LEN,
-								state->client_nonce, encoded_len);
-	if (encoded_len < 0)
-	{
-		libpq_append_conn_error(conn, "could not encode nonce");
-		return NULL;
-	}
-	state->client_nonce[encoded_len] = '\0';
-
-	/*
-	 * Generate message.  The username is left empty as the backend uses the
-	 * value provided by the startup packet.  Also, as this username is not
-	 * prepared with SASLprep, the message parsing would fail if it includes
-	 * '=' or ',' characters.
-	 */
-
-	initPQExpBuffer(&buf);
-
-	/*
-	 * First build the gs2-header with channel binding information.
-	 */
-	if (strcmp(state->sasl_mechanism, SCRAM_SHA_256_PLUS_NAME) == 0)
-	{
-		Assert(conn->ssl_in_use);
-		appendPQExpBufferStr(&buf, "p=tls-server-end-point");
-	}
-#ifdef HAVE_PGTLS_GET_PEER_CERTIFICATE_HASH
-	else if (conn->channel_binding[0] != 'd' && /* disable */
-			 conn->ssl_in_use)
-	{
-		/*
-		 * Client supports channel binding, but thinks the server does not.
-		 */
-		appendPQExpBufferChar(&buf, 'y');
-	}
-#endif
-	else
-	{
-		/*
-		 * Client does not support channel binding, or has disabled it.
-		 */
-		appendPQExpBufferChar(&buf, 'n');
-	}
-
-	if (PQExpBufferDataBroken(buf))
-		goto oom_error;
-
-	channel_info_len = buf.len;
-
-	appendPQExpBuffer(&buf, ",,n=,r=%s", state->client_nonce);
-	if (PQExpBufferDataBroken(buf))
-		goto oom_error;
-
-	/*
-	 * The first message content needs to be saved without channel binding
-	 * information.
-	 */
-	state->client_first_message_bare = strdup(buf.data + channel_info_len + 2);
-	if (!state->client_first_message_bare)
-		goto oom_error;
-
-	result = strdup(buf.data);
-	if (result == NULL)
-		goto oom_error;
-
-	termPQExpBuffer(&buf);
-	return result;
-
-oom_error:
-	termPQExpBuffer(&buf);
-	libpq_append_conn_error(conn, "out of memory");
-	return NULL;
-}
-
-/*
- * Build the final exchange message sent from the client.
- */
-static char *
-build_client_final_message(fe_scram_state *state)
-{
-	PQExpBufferData buf;
-	PGconn	   *conn = state->conn;
-	uint8		client_proof[SCRAM_MAX_KEY_LEN];
-	char	   *result;
-	int			encoded_len;
-	const char *errstr = NULL;
-
-	initPQExpBuffer(&buf);
-
-	/*
-	 * Construct client-final-message-without-proof.  We need to remember it
-	 * for verifying the server proof in the final step of authentication.
-	 *
-	 * The channel binding flag handling (p/y/n) must be consistent with
-	 * build_client_first_message(), because the server will check that it's
-	 * the same flag both times.
-	 */
-	if (strcmp(state->sasl_mechanism, SCRAM_SHA_256_PLUS_NAME) == 0)
-	{
-#ifdef HAVE_PGTLS_GET_PEER_CERTIFICATE_HASH
-		char	   *cbind_data = NULL;
-		size_t		cbind_data_len = 0;
-		size_t		cbind_header_len;
-		char	   *cbind_input;
-		size_t		cbind_input_len;
-		int			encoded_cbind_len;
-
-		/* Fetch hash data of server's SSL certificate */
-		cbind_data =
-			pgtls_get_peer_certificate_hash(state->conn,
-											&cbind_data_len);
-		if (cbind_data == NULL)
-		{
-			/* error message is already set on error */
-			termPQExpBuffer(&buf);
-			return NULL;
-		}
-
-		appendPQExpBufferStr(&buf, "c=");
-
-		/* p=type,, */
-		cbind_header_len = strlen("p=tls-server-end-point,,");
-		cbind_input_len = cbind_header_len + cbind_data_len;
-		cbind_input = malloc(cbind_input_len);
-		if (!cbind_input)
-		{
-			free(cbind_data);
-			goto oom_error;
-		}
-		memcpy(cbind_input, "p=tls-server-end-point,,", cbind_header_len);
-		memcpy(cbind_input + cbind_header_len, cbind_data, cbind_data_len);
-
-		encoded_cbind_len = pg_b64_enc_len(cbind_input_len);
-		if (!enlargePQExpBuffer(&buf, encoded_cbind_len))
-		{
-			free(cbind_data);
-			free(cbind_input);
-			goto oom_error;
-		}
-		encoded_cbind_len = pg_b64_encode(cbind_input, cbind_input_len,
-										  buf.data + buf.len,
-										  encoded_cbind_len);
-		if (encoded_cbind_len < 0)
-		{
-			free(cbind_data);
-			free(cbind_input);
-			termPQExpBuffer(&buf);
-			appendPQExpBufferStr(&conn->errorMessage,
-								 "could not encode cbind data for channel binding\n");
-			return NULL;
-		}
-		buf.len += encoded_cbind_len;
-		buf.data[buf.len] = '\0';
-
-		free(cbind_data);
-		free(cbind_input);
-#else
-		/*
-		 * Chose channel binding, but the SSL library doesn't support it.
-		 * Shouldn't happen.
-		 */
-		termPQExpBuffer(&buf);
-		appendPQExpBufferStr(&conn->errorMessage,
-							 "channel binding not supported by this build\n");
-		return NULL;
-#endif							/* HAVE_PGTLS_GET_PEER_CERTIFICATE_HASH */
-	}
-#ifdef HAVE_PGTLS_GET_PEER_CERTIFICATE_HASH
-	else if (conn->channel_binding[0] != 'd' && /* disable */
-			 conn->ssl_in_use)
-		appendPQExpBufferStr(&buf, "c=eSws");	/* base64 of "y,," */
-#endif
-	else
-		appendPQExpBufferStr(&buf, "c=biws");	/* base64 of "n,," */
-
-	if (PQExpBufferDataBroken(buf))
-		goto oom_error;
-
-	appendPQExpBuffer(&buf, ",r=%s", state->nonce);
-	if (PQExpBufferDataBroken(buf))
-		goto oom_error;
-
-	state->client_final_message_without_proof = strdup(buf.data);
-	if (state->client_final_message_without_proof == NULL)
-		goto oom_error;
-
-	/* Append proof to it, to form client-final-message. */
-	if (!calculate_client_proof(state,
-								state->client_final_message_without_proof,
-								client_proof, &errstr))
-	{
-		termPQExpBuffer(&buf);
-		libpq_append_conn_error(conn, "could not calculate client proof: %s", errstr);
-		return NULL;
-	}
-
-	appendPQExpBufferStr(&buf, ",p=");
-	encoded_len = pg_b64_enc_len(state->key_length);
-	if (!enlargePQExpBuffer(&buf, encoded_len))
-		goto oom_error;
-	encoded_len = pg_b64_encode((char *) client_proof,
-								state->key_length,
-								buf.data + buf.len,
-								encoded_len);
-	if (encoded_len < 0)
-	{
-		termPQExpBuffer(&buf);
-		libpq_append_conn_error(conn, "could not encode client proof");
-		return NULL;
-	}
-	buf.len += encoded_len;
-	buf.data[buf.len] = '\0';
-
-	result = strdup(buf.data);
-	if (result == NULL)
-		goto oom_error;
-
-	termPQExpBuffer(&buf);
-	return result;
-
-oom_error:
-	termPQExpBuffer(&buf);
-	libpq_append_conn_error(conn, "out of memory");
-	return NULL;
-}
-
-/*
- * Read the first exchange message coming from the server.
- */
-static bool
-read_server_first_message(fe_scram_state *state, char *input)
-{
-	PGconn	   *conn = state->conn;
-	char	   *iterations_str;
-	char	   *endptr;
-	char	   *encoded_salt;
-	char	   *nonce;
-	int			decoded_salt_len;
-
-	state->server_first_message = strdup(input);
-	if (state->server_first_message == NULL)
-	{
-		libpq_append_conn_error(conn, "out of memory");
-		return false;
-	}
-
-	/* parse the message */
-	nonce = read_attr_value(&input, 'r',
-							&conn->errorMessage);
-	if (nonce == NULL)
-	{
-		/* read_attr_value() has appended an error string */
-		return false;
-	}
-
-	/* Verify immediately that the server used our part of the nonce */
-	if (strlen(nonce) < strlen(state->client_nonce) ||
-		memcmp(nonce, state->client_nonce, strlen(state->client_nonce)) != 0)
-	{
-		libpq_append_conn_error(conn, "invalid SCRAM response (nonce mismatch)");
-		return false;
-	}
-
-	state->nonce = strdup(nonce);
-	if (state->nonce == NULL)
-	{
-		libpq_append_conn_error(conn, "out of memory");
-		return false;
-	}
-
-	encoded_salt = read_attr_value(&input, 's', &conn->errorMessage);
-	if (encoded_salt == NULL)
-	{
-		/* read_attr_value() has appended an error string */
-		return false;
-	}
-	decoded_salt_len = pg_b64_dec_len(strlen(encoded_salt));
-	state->salt = malloc(decoded_salt_len);
-	if (state->salt == NULL)
-	{
-		libpq_append_conn_error(conn, "out of memory");
-		return false;
-	}
-	state->saltlen = pg_b64_decode(encoded_salt,
-								   strlen(encoded_salt),
-								   state->salt,
-								   decoded_salt_len);
-	if (state->saltlen < 0)
-	{
-		libpq_append_conn_error(conn, "malformed SCRAM message (invalid salt)");
-		return false;
-	}
-
-	iterations_str = read_attr_value(&input, 'i', &conn->errorMessage);
-	if (iterations_str == NULL)
-	{
-		/* read_attr_value() has appended an error string */
-		return false;
-	}
-	state->iterations = strtol(iterations_str, &endptr, 10);
-	if (*endptr != '\0' || state->iterations < 1)
-	{
-		libpq_append_conn_error(conn, "malformed SCRAM message (invalid iteration count)");
-		return false;
-	}
-
-	if (*input != '\0')
-		libpq_append_conn_error(conn, "malformed SCRAM message (garbage at end of server-first-message)");
-
-	return true;
-}
-
-/*
- * Read the final exchange message coming from the server.
- */
-static bool
-read_server_final_message(fe_scram_state *state, char *input)
-{
-	PGconn	   *conn = state->conn;
-	char	   *encoded_server_signature;
-	char	   *decoded_server_signature;
-	int			server_signature_len;
-
-	state->server_final_message = strdup(input);
-	if (!state->server_final_message)
-	{
-		libpq_append_conn_error(conn, "out of memory");
-		return false;
-	}
-
-	/* Check for error result. */
-	if (*input == 'e')
-	{
-		char	   *errmsg = read_attr_value(&input, 'e',
-											 &conn->errorMessage);
-
-		if (errmsg == NULL)
-		{
-			/* read_attr_value() has appended an error message */
-			return false;
-		}
-		libpq_append_conn_error(conn, "error received from server in SCRAM exchange: %s",
-								errmsg);
-		return false;
-	}
-
-	/* Parse the message. */
-	encoded_server_signature = read_attr_value(&input, 'v',
-											   &conn->errorMessage);
-	if (encoded_server_signature == NULL)
-	{
-		/* read_attr_value() has appended an error message */
-		return false;
-	}
-
-	if (*input != '\0')
-		libpq_append_conn_error(conn, "malformed SCRAM message (garbage at end of server-final-message)");
-
-	server_signature_len = pg_b64_dec_len(strlen(encoded_server_signature));
-	decoded_server_signature = malloc(server_signature_len);
-	if (!decoded_server_signature)
-	{
-		libpq_append_conn_error(conn, "out of memory");
-		return false;
-	}
-
-	server_signature_len = pg_b64_decode(encoded_server_signature,
-										 strlen(encoded_server_signature),
-										 decoded_server_signature,
-										 server_signature_len);
-	if (server_signature_len != state->key_length)
-	{
-		free(decoded_server_signature);
-		libpq_append_conn_error(conn, "malformed SCRAM message (invalid server signature)");
-		return false;
-	}
-	memcpy(state->ServerSignature, decoded_server_signature,
-		   state->key_length);
-	free(decoded_server_signature);
-
-	return true;
-}
-
-/*
- * Calculate the client proof, part of the final exchange message sent
- * by the client.  Returns true on success, false on failure with *errstr
- * pointing to a message about the error details.
- */
-static bool
-calculate_client_proof(fe_scram_state *state,
-					   const char *client_final_message_without_proof,
-					   uint8 *result, const char **errstr)
-{
-	uint8		StoredKey[SCRAM_MAX_KEY_LEN];
-	uint8		ClientKey[SCRAM_MAX_KEY_LEN];
-	uint8		ClientSignature[SCRAM_MAX_KEY_LEN];
-	int			i;
-	pg_hmac_ctx *ctx;
-
-	ctx = pg_hmac_create(state->hash_type);
-	if (ctx == NULL)
-	{
-		*errstr = pg_hmac_error(NULL);	/* returns OOM */
-		return false;
-	}
-
-	/*
-	 * Calculate SaltedPassword, and store it in 'state' so that we can reuse
-	 * it later in verify_server_signature.
-	 */
-	if (scram_SaltedPassword(state->password, state->hash_type,
-							 state->key_length, state->salt, state->saltlen,
-							 state->iterations, state->SaltedPassword,
-							 errstr) < 0 ||
-		scram_ClientKey(state->SaltedPassword, state->hash_type,
-						state->key_length, ClientKey, errstr) < 0 ||
-		scram_H(ClientKey, state->hash_type, state->key_length,
-				StoredKey, errstr) < 0)
-	{
-		/* errstr is already filled here */
-		pg_hmac_free(ctx);
-		return false;
-	}
-
-	if (pg_hmac_init(ctx, StoredKey, state->key_length) < 0 ||
-		pg_hmac_update(ctx,
-					   (uint8 *) state->client_first_message_bare,
-					   strlen(state->client_first_message_bare)) < 0 ||
-		pg_hmac_update(ctx, (uint8 *) ",", 1) < 0 ||
-		pg_hmac_update(ctx,
-					   (uint8 *) state->server_first_message,
-					   strlen(state->server_first_message)) < 0 ||
-		pg_hmac_update(ctx, (uint8 *) ",", 1) < 0 ||
-		pg_hmac_update(ctx,
-					   (uint8 *) client_final_message_without_proof,
-					   strlen(client_final_message_without_proof)) < 0 ||
-		pg_hmac_final(ctx, ClientSignature, state->key_length) < 0)
-	{
-		*errstr = pg_hmac_error(ctx);
-		pg_hmac_free(ctx);
-		return false;
-	}
-
-	for (i = 0; i < state->key_length; i++)
-		result[i] = ClientKey[i] ^ ClientSignature[i];
-
-	pg_hmac_free(ctx);
-	return true;
-}
-
-/*
- * Validate the server signature, received as part of the final exchange
- * message received from the server.  *match tracks if the server signature
- * matched or not. Returns true if the server signature got verified, and
- * false for a processing error with *errstr pointing to a message about the
- * error details.
- */
-static bool
-verify_server_signature(fe_scram_state *state, bool *match,
-						const char **errstr)
-{
-	uint8		expected_ServerSignature[SCRAM_MAX_KEY_LEN];
-	uint8		ServerKey[SCRAM_MAX_KEY_LEN];
-	pg_hmac_ctx *ctx;
-
-	ctx = pg_hmac_create(state->hash_type);
-	if (ctx == NULL)
-	{
-		*errstr = pg_hmac_error(NULL);	/* returns OOM */
-		return false;
-	}
-
-	if (scram_ServerKey(state->SaltedPassword, state->hash_type,
-						state->key_length, ServerKey, errstr) < 0)
-	{
-		/* errstr is filled already */
-		pg_hmac_free(ctx);
-		return false;
-	}
-
-	/* calculate ServerSignature */
-	if (pg_hmac_init(ctx, ServerKey, state->key_length) < 0 ||
-		pg_hmac_update(ctx,
-					   (uint8 *) state->client_first_message_bare,
-					   strlen(state->client_first_message_bare)) < 0 ||
-		pg_hmac_update(ctx, (uint8 *) ",", 1) < 0 ||
-		pg_hmac_update(ctx,
-					   (uint8 *) state->server_first_message,
-					   strlen(state->server_first_message)) < 0 ||
-		pg_hmac_update(ctx, (uint8 *) ",", 1) < 0 ||
-		pg_hmac_update(ctx,
-					   (uint8 *) state->client_final_message_without_proof,
-					   strlen(state->client_final_message_without_proof)) < 0 ||
-		pg_hmac_final(ctx, expected_ServerSignature,
-					  state->key_length) < 0)
-	{
-		*errstr = pg_hmac_error(ctx);
-		pg_hmac_free(ctx);
-		return false;
-	}
-
-	pg_hmac_free(ctx);
-
-	/* signature processed, so now check after it */
-	if (memcmp(expected_ServerSignature, state->ServerSignature,
-			   state->key_length) != 0)
-		*match = false;
-	else
-		*match = true;
-
-	return true;
-}
-
-/*
- * Build a new SCRAM secret.
- *
- * On error, returns NULL and sets *errstr to point to a message about the
- * error details.
- */
-char *
-pg_fe_scram_build_secret(const char *password, int iterations, const char **errstr)
-{
-	char	   *prep_password;
-	pg_saslprep_rc rc;
-	char		saltbuf[SCRAM_DEFAULT_SALT_LEN];
-	char	   *result;
-
-	/*
-	 * Normalize the password with SASLprep.  If that doesn't work, because
-	 * the password isn't valid UTF-8 or contains prohibited characters, just
-	 * proceed with the original password.  (See comments at the top of
-	 * auth-scram.c.)
-	 */
-	rc = pg_saslprep(password, &prep_password);
-	if (rc == SASLPREP_OOM)
-	{
-		*errstr = libpq_gettext("out of memory");
-		return NULL;
-	}
-	if (rc == SASLPREP_SUCCESS)
-		password = (const char *) prep_password;
-
-	/* Generate a random salt */
-	if (!pg_strong_random(saltbuf, SCRAM_DEFAULT_SALT_LEN))
-	{
-		*errstr = libpq_gettext("could not generate random salt");
-		free(prep_password);
-		return NULL;
-	}
-
-	result = scram_build_secret(PG_SHA256, SCRAM_SHA_256_KEY_LEN, saltbuf,
-								SCRAM_DEFAULT_SALT_LEN,
-								iterations, password,
-								errstr);
-
-	free(prep_password);
-
-	return result;
-}
diff --git a/contrib/libs/libpq/src/interfaces/libpq/fe-auth.c b/contrib/libs/libpq/src/interfaces/libpq/fe-auth.c
deleted file mode 100644
index fce7f3da38..0000000000
--- a/contrib/libs/libpq/src/interfaces/libpq/fe-auth.c
+++ /dev/null
@@ -1,1385 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * fe-auth.c
- *	   The front-end (client) authorization routines
- *
- * Portions Copyright (c) 1996-2023, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- * IDENTIFICATION
- *	  src/interfaces/libpq/fe-auth.c
- *
- *-------------------------------------------------------------------------
- */
-
-/*
- * INTERFACE ROUTINES
- *	   frontend (client) routines:
- *		pg_fe_sendauth			send authentication information
- *		pg_fe_getauthname		get user's name according to the client side
- *								of the authentication system
- */
-
-#include "postgres_fe.h"
-
-#ifdef WIN32
-#include "win32.h"
-#else
-#include <unistd.h>
-#include <fcntl.h>
-#include <limits.h>
-#include <sys/param.h>			/* for MAXHOSTNAMELEN on most */
-#include <sys/socket.h>
-#ifdef HAVE_SYS_UCRED_H
-#include <sys/ucred.h>
-#endif
-#ifndef  MAXHOSTNAMELEN
-#include <netdb.h>				/* for MAXHOSTNAMELEN on some */
-#endif
-#endif
-
-#include "common/md5.h"
-#include "common/scram-common.h"
-#include "fe-auth.h"
-#include "fe-auth-sasl.h"
-#include "libpq-fe.h"
-
-#ifdef ENABLE_GSS
-/*
- * GSSAPI authentication system.
- */
-
-#error #include "fe-gssapi-common.h"
-
-/*
- * Continue GSS authentication with next token as needed.
- */
-static int
-pg_GSS_continue(PGconn *conn, int payloadlen)
-{
-	OM_uint32	maj_stat,
-				min_stat,
-				lmin_s,
-				gss_flags = GSS_C_MUTUAL_FLAG;
-	gss_buffer_desc ginbuf;
-	gss_buffer_desc goutbuf;
-
-	/*
-	 * On first call, there's no input token. On subsequent calls, read the
-	 * input token into a GSS buffer.
-	 */
-	if (conn->gctx != GSS_C_NO_CONTEXT)
-	{
-		ginbuf.length = payloadlen;
-		ginbuf.value = malloc(payloadlen);
-		if (!ginbuf.value)
-		{
-			libpq_append_conn_error(conn, "out of memory allocating GSSAPI buffer (%d)",
-									payloadlen);
-			return STATUS_ERROR;
-		}
-		if (pqGetnchar(ginbuf.value, payloadlen, conn))
-		{
-			/*
-			 * Shouldn't happen, because the caller should've ensured that the
-			 * whole message is already in the input buffer.
-			 */
-			free(ginbuf.value);
-			return STATUS_ERROR;
-		}
-	}
-	else
-	{
-		ginbuf.length = 0;
-		ginbuf.value = NULL;
-	}
-
-	/* Only try to acquire credentials if GSS delegation isn't disabled. */
-	if (!pg_GSS_have_cred_cache(&conn->gcred))
-		conn->gcred = GSS_C_NO_CREDENTIAL;
-
-	if (conn->gssdelegation && conn->gssdelegation[0] == '1')
-		gss_flags |= GSS_C_DELEG_FLAG;
-
-	maj_stat = gss_init_sec_context(&min_stat,
-									conn->gcred,
-									&conn->gctx,
-									conn->gtarg_nam,
-									GSS_C_NO_OID,
-									gss_flags,
-									0,
-									GSS_C_NO_CHANNEL_BINDINGS,
-									(ginbuf.value == NULL) ? GSS_C_NO_BUFFER : &ginbuf,
-									NULL,
-									&goutbuf,
-									NULL,
-									NULL);
-
-	free(ginbuf.value);
-
-	if (goutbuf.length != 0)
-	{
-		/*
-		 * GSS generated data to send to the server. We don't care if it's the
-		 * first or subsequent packet, just send the same kind of password
-		 * packet.
-		 */
-		if (pqPacketSend(conn, 'p',
-						 goutbuf.value, goutbuf.length) != STATUS_OK)
-		{
-			gss_release_buffer(&lmin_s, &goutbuf);
-			return STATUS_ERROR;
-		}
-	}
-	gss_release_buffer(&lmin_s, &goutbuf);
-
-	if (maj_stat != GSS_S_COMPLETE && maj_stat != GSS_S_CONTINUE_NEEDED)
-	{
-		pg_GSS_error(libpq_gettext("GSSAPI continuation error"),
-					 conn,
-					 maj_stat, min_stat);
-		gss_release_name(&lmin_s, &conn->gtarg_nam);
-		if (conn->gctx)
-			gss_delete_sec_context(&lmin_s, &conn->gctx, GSS_C_NO_BUFFER);
-		return STATUS_ERROR;
-	}
-
-	if (maj_stat == GSS_S_COMPLETE)
-	{
-		conn->client_finished_auth = true;
-		gss_release_name(&lmin_s, &conn->gtarg_nam);
-		conn->gssapi_used = true;
-	}
-
-	return STATUS_OK;
-}
-
-/*
- * Send initial GSS authentication token
- */
-static int
-pg_GSS_startup(PGconn *conn, int payloadlen)
-{
-	int			ret;
-	char	   *host = conn->connhost[conn->whichhost].host;
-
-	if (!(host && host[0] != '\0'))
-	{
-		libpq_append_conn_error(conn, "host name must be specified");
-		return STATUS_ERROR;
-	}
-
-	if (conn->gctx)
-	{
-		libpq_append_conn_error(conn, "duplicate GSS authentication request");
-		return STATUS_ERROR;
-	}
-
-	ret = pg_GSS_load_servicename(conn);
-	if (ret != STATUS_OK)
-		return ret;
-
-	/*
-	 * Initial packet is the same as a continuation packet with no initial
-	 * context.
-	 */
-	conn->gctx = GSS_C_NO_CONTEXT;
-
-	return pg_GSS_continue(conn, payloadlen);
-}
-#endif							/* ENABLE_GSS */
-
-
-#ifdef ENABLE_SSPI
-/*
- * SSPI authentication system (Windows only)
- */
-
-static void
-pg_SSPI_error(PGconn *conn, const char *mprefix, SECURITY_STATUS r)
-{
-	char		sysmsg[256];
-
-	if (FormatMessage(FORMAT_MESSAGE_IGNORE_INSERTS |
-					  FORMAT_MESSAGE_FROM_SYSTEM,
-					  NULL, r, 0,
-					  sysmsg, sizeof(sysmsg), NULL) == 0)
-		appendPQExpBuffer(&conn->errorMessage, "%s: SSPI error %x\n",
-						  mprefix, (unsigned int) r);
-	else
-		appendPQExpBuffer(&conn->errorMessage, "%s: %s (%x)\n",
-						  mprefix, sysmsg, (unsigned int) r);
-}
-
-/*
- * Continue SSPI authentication with next token as needed.
- */
-static int
-pg_SSPI_continue(PGconn *conn, int payloadlen)
-{
-	SECURITY_STATUS r;
-	CtxtHandle	newContext;
-	ULONG		contextAttr;
-	SecBufferDesc inbuf;
-	SecBufferDesc outbuf;
-	SecBuffer	OutBuffers[1];
-	SecBuffer	InBuffers[1];
-	char	   *inputbuf = NULL;
-
-	if (conn->sspictx != NULL)
-	{
-		/*
-		 * On runs other than the first we have some data to send. Put this
-		 * data in a SecBuffer type structure.
-		 */
-		inputbuf = malloc(payloadlen);
-		if (!inputbuf)
-		{
-			libpq_append_conn_error(conn, "out of memory allocating SSPI buffer (%d)",
-									payloadlen);
-			return STATUS_ERROR;
-		}
-		if (pqGetnchar(inputbuf, payloadlen, conn))
-		{
-			/*
-			 * Shouldn't happen, because the caller should've ensured that the
-			 * whole message is already in the input buffer.
-			 */
-			free(inputbuf);
-			return STATUS_ERROR;
-		}
-
-		inbuf.ulVersion = SECBUFFER_VERSION;
-		inbuf.cBuffers = 1;
-		inbuf.pBuffers = InBuffers;
-		InBuffers[0].pvBuffer = inputbuf;
-		InBuffers[0].cbBuffer = payloadlen;
-		InBuffers[0].BufferType = SECBUFFER_TOKEN;
-	}
-
-	OutBuffers[0].pvBuffer = NULL;
-	OutBuffers[0].BufferType = SECBUFFER_TOKEN;
-	OutBuffers[0].cbBuffer = 0;
-	outbuf.cBuffers = 1;
-	outbuf.pBuffers = OutBuffers;
-	outbuf.ulVersion = SECBUFFER_VERSION;
-
-	r = InitializeSecurityContext(conn->sspicred,
-								  conn->sspictx,
-								  conn->sspitarget,
-								  ISC_REQ_ALLOCATE_MEMORY,
-								  0,
-								  SECURITY_NETWORK_DREP,
-								  (conn->sspictx == NULL) ? NULL : &inbuf,
-								  0,
-								  &newContext,
-								  &outbuf,
-								  &contextAttr,
-								  NULL);
-
-	/* we don't need the input anymore */
-	free(inputbuf);
-
-	if (r != SEC_E_OK && r != SEC_I_CONTINUE_NEEDED)
-	{
-		pg_SSPI_error(conn, libpq_gettext("SSPI continuation error"), r);
-
-		return STATUS_ERROR;
-	}
-
-	if (conn->sspictx == NULL)
-	{
-		/* On first run, transfer retrieved context handle */
-		conn->sspictx = malloc(sizeof(CtxtHandle));
-		if (conn->sspictx == NULL)
-		{
-			libpq_append_conn_error(conn, "out of memory");
-			return STATUS_ERROR;
-		}
-		memcpy(conn->sspictx, &newContext, sizeof(CtxtHandle));
-	}
-
-	/*
-	 * If SSPI returned any data to be sent to the server (as it normally
-	 * would), send this data as a password packet.
-	 */
-	if (outbuf.cBuffers > 0)
-	{
-		if (outbuf.cBuffers != 1)
-		{
-			/*
-			 * This should never happen, at least not for Kerberos
-			 * authentication. Keep check in case it shows up with other
-			 * authentication methods later.
-			 */
-			appendPQExpBufferStr(&conn->errorMessage,
-								 "SSPI returned invalid number of output buffers\n");
-			return STATUS_ERROR;
-		}
-
-		/*
-		 * If the negotiation is complete, there may be zero bytes to send.
-		 * The server is at this point not expecting any more data, so don't
-		 * send it.
-		 */
-		if (outbuf.pBuffers[0].cbBuffer > 0)
-		{
-			if (pqPacketSend(conn, 'p',
-							 outbuf.pBuffers[0].pvBuffer, outbuf.pBuffers[0].cbBuffer))
-			{
-				FreeContextBuffer(outbuf.pBuffers[0].pvBuffer);
-				return STATUS_ERROR;
-			}
-		}
-		FreeContextBuffer(outbuf.pBuffers[0].pvBuffer);
-	}
-
-	if (r == SEC_E_OK)
-		conn->client_finished_auth = true;
-
-	/* Cleanup is handled by the code in freePGconn() */
-	return STATUS_OK;
-}
-
-/*
- * Send initial SSPI authentication token.
- * If use_negotiate is 0, use kerberos authentication package which is
- * compatible with Unix. If use_negotiate is 1, use the negotiate package
- * which supports both kerberos and NTLM, but is not compatible with Unix.
- */
-static int
-pg_SSPI_startup(PGconn *conn, int use_negotiate, int payloadlen)
-{
-	SECURITY_STATUS r;
-	TimeStamp	expire;
-	char	   *host = conn->connhost[conn->whichhost].host;
-
-	if (conn->sspictx)
-	{
-		libpq_append_conn_error(conn, "duplicate SSPI authentication request");
-		return STATUS_ERROR;
-	}
-
-	/*
-	 * Retrieve credentials handle
-	 */
-	conn->sspicred = malloc(sizeof(CredHandle));
-	if (conn->sspicred == NULL)
-	{
-		libpq_append_conn_error(conn, "out of memory");
-		return STATUS_ERROR;
-	}
-
-	r = AcquireCredentialsHandle(NULL,
-								 use_negotiate ? "negotiate" : "kerberos",
-								 SECPKG_CRED_OUTBOUND,
-								 NULL,
-								 NULL,
-								 NULL,
-								 NULL,
-								 conn->sspicred,
-								 &expire);
-	if (r != SEC_E_OK)
-	{
-		pg_SSPI_error(conn, libpq_gettext("could not acquire SSPI credentials"), r);
-		free(conn->sspicred);
-		conn->sspicred = NULL;
-		return STATUS_ERROR;
-	}
-
-	/*
-	 * Compute target principal name. SSPI has a different format from GSSAPI,
-	 * but not more complex. We can skip the @REALM part, because Windows will
-	 * fill that in for us automatically.
-	 */
-	if (!(host && host[0] != '\0'))
-	{
-		libpq_append_conn_error(conn, "host name must be specified");
-		return STATUS_ERROR;
-	}
-	conn->sspitarget = malloc(strlen(conn->krbsrvname) + strlen(host) + 2);
-	if (!conn->sspitarget)
-	{
-		libpq_append_conn_error(conn, "out of memory");
-		return STATUS_ERROR;
-	}
-	sprintf(conn->sspitarget, "%s/%s", conn->krbsrvname, host);
-
-	/*
-	 * Indicate that we're in SSPI authentication mode to make sure that
-	 * pg_SSPI_continue is called next time in the negotiation.
-	 */
-	conn->usesspi = 1;
-
-	return pg_SSPI_continue(conn, payloadlen);
-}
-#endif							/* ENABLE_SSPI */
-
-/*
- * Initialize SASL authentication exchange.
- */
-static int
-pg_SASL_init(PGconn *conn, int payloadlen)
-{
-	char	   *initialresponse = NULL;
-	int			initialresponselen;
-	bool		done;
-	bool		success;
-	const char *selected_mechanism;
-	PQExpBufferData mechanism_buf;
-	char	   *password;
-
-	initPQExpBuffer(&mechanism_buf);
-
-	if (conn->channel_binding[0] == 'r' &&	/* require */
-		!conn->ssl_in_use)
-	{
-		libpq_append_conn_error(conn, "channel binding required, but SSL not in use");
-		goto error;
-	}
-
-	if (conn->sasl_state)
-	{
-		libpq_append_conn_error(conn, "duplicate SASL authentication request");
-		goto error;
-	}
-
-	/*
-	 * Parse the list of SASL authentication mechanisms in the
-	 * AuthenticationSASL message, and select the best mechanism that we
-	 * support.  SCRAM-SHA-256-PLUS and SCRAM-SHA-256 are the only ones
-	 * supported at the moment, listed by order of decreasing importance.
-	 */
-	selected_mechanism = NULL;
-	for (;;)
-	{
-		if (pqGets(&mechanism_buf, conn))
-		{
-			appendPQExpBufferStr(&conn->errorMessage,
-								 "fe_sendauth: invalid authentication request from server: invalid list of authentication mechanisms\n");
-			goto error;
-		}
-		if (PQExpBufferDataBroken(mechanism_buf))
-			goto oom_error;
-
-		/* An empty string indicates end of list */
-		if (mechanism_buf.data[0] == '\0')
-			break;
-
-		/*
-		 * Select the mechanism to use.  Pick SCRAM-SHA-256-PLUS over anything
-		 * else if a channel binding type is set and if the client supports it
-		 * (and did not set channel_binding=disable). Pick SCRAM-SHA-256 if
-		 * nothing else has already been picked.  If we add more mechanisms, a
-		 * more refined priority mechanism might become necessary.
-		 */
-		if (strcmp(mechanism_buf.data, SCRAM_SHA_256_PLUS_NAME) == 0)
-		{
-			if (conn->ssl_in_use)
-			{
-				/* The server has offered SCRAM-SHA-256-PLUS. */
-
-#ifdef HAVE_PGTLS_GET_PEER_CERTIFICATE_HASH
-				/*
-				 * The client supports channel binding, which is chosen if
-				 * channel_binding is not disabled.
-				 */
-				if (conn->channel_binding[0] != 'd')	/* disable */
-				{
-					selected_mechanism = SCRAM_SHA_256_PLUS_NAME;
-					conn->sasl = &pg_scram_mech;
-				}
-#else
-				/*
-				 * The client does not support channel binding.  If it is
-				 * required, complain immediately instead of the error below
-				 * which would be confusing as the server is publishing
-				 * SCRAM-SHA-256-PLUS.
-				 */
-				if (conn->channel_binding[0] == 'r')	/* require */
-				{
-					libpq_append_conn_error(conn, "channel binding is required, but client does not support it");
-					goto error;
-				}
-#endif
-			}
-			else
-			{
-				/*
-				 * The server offered SCRAM-SHA-256-PLUS, but the connection
-				 * is not SSL-encrypted. That's not sane. Perhaps SSL was
-				 * stripped by a proxy? There's no point in continuing,
-				 * because the server will reject the connection anyway if we
-				 * try authenticate without channel binding even though both
-				 * the client and server supported it. The SCRAM exchange
-				 * checks for that, to prevent downgrade attacks.
-				 */
-				libpq_append_conn_error(conn, "server offered SCRAM-SHA-256-PLUS authentication over a non-SSL connection");
-				goto error;
-			}
-		}
-		else if (strcmp(mechanism_buf.data, SCRAM_SHA_256_NAME) == 0 &&
-				 !selected_mechanism)
-		{
-			selected_mechanism = SCRAM_SHA_256_NAME;
-			conn->sasl = &pg_scram_mech;
-		}
-	}
-
-	if (!selected_mechanism)
-	{
-		libpq_append_conn_error(conn, "none of the server's SASL authentication mechanisms are supported");
-		goto error;
-	}
-
-	if (conn->channel_binding[0] == 'r' &&	/* require */
-		strcmp(selected_mechanism, SCRAM_SHA_256_PLUS_NAME) != 0)
-	{
-		libpq_append_conn_error(conn, "channel binding is required, but server did not offer an authentication method that supports channel binding");
-		goto error;
-	}
-
-	/*
-	 * Now that the SASL mechanism has been chosen for the exchange,
-	 * initialize its state information.
-	 */
-
-	/*
-	 * First, select the password to use for the exchange, complaining if
-	 * there isn't one.  Currently, all supported SASL mechanisms require a
-	 * password, so we can just go ahead here without further distinction.
-	 */
-	conn->password_needed = true;
-	password = conn->connhost[conn->whichhost].password;
-	if (password == NULL)
-		password = conn->pgpass;
-	if (password == NULL || password[0] == '\0')
-	{
-		appendPQExpBufferStr(&conn->errorMessage,
-							 PQnoPasswordSupplied);
-		goto error;
-	}
-
-	Assert(conn->sasl);
-
-	/*
-	 * Initialize the SASL state information with all the information gathered
-	 * during the initial exchange.
-	 *
-	 * Note: Only tls-unique is supported for the moment.
-	 */
-	conn->sasl_state = conn->sasl->init(conn,
-										password,
-										selected_mechanism);
-	if (!conn->sasl_state)
-		goto oom_error;
-
-	/* Get the mechanism-specific Initial Client Response, if any */
-	conn->sasl->exchange(conn->sasl_state,
-						 NULL, -1,
-						 &initialresponse, &initialresponselen,
-						 &done, &success);
-
-	if (done && !success)
-		goto error;
-
-	/*
-	 * Build a SASLInitialResponse message, and send it.
-	 */
-	if (pqPutMsgStart('p', conn))
-		goto error;
-	if (pqPuts(selected_mechanism, conn))
-		goto error;
-	if (initialresponse)
-	{
-		if (pqPutInt(initialresponselen, 4, conn))
-			goto error;
-		if (pqPutnchar(initialresponse, initialresponselen, conn))
-			goto error;
-	}
-	if (pqPutMsgEnd(conn))
-		goto error;
-	if (pqFlush(conn))
-		goto error;
-
-	termPQExpBuffer(&mechanism_buf);
-	free(initialresponse);
-
-	return STATUS_OK;
-
-error:
-	termPQExpBuffer(&mechanism_buf);
-	free(initialresponse);
-	return STATUS_ERROR;
-
-oom_error:
-	termPQExpBuffer(&mechanism_buf);
-	free(initialresponse);
-	libpq_append_conn_error(conn, "out of memory");
-	return STATUS_ERROR;
-}
-
-/*
- * Exchange a message for SASL communication protocol with the backend.
- * This should be used after calling pg_SASL_init to set up the status of
- * the protocol.
- */
-static int
-pg_SASL_continue(PGconn *conn, int payloadlen, bool final)
-{
-	char	   *output;
-	int			outputlen;
-	bool		done;
-	bool		success;
-	int			res;
-	char	   *challenge;
-
-	/* Read the SASL challenge from the AuthenticationSASLContinue message. */
-	challenge = malloc(payloadlen + 1);
-	if (!challenge)
-	{
-		libpq_append_conn_error(conn, "out of memory allocating SASL buffer (%d)",
-								payloadlen);
-		return STATUS_ERROR;
-	}
-
-	if (pqGetnchar(challenge, payloadlen, conn))
-	{
-		free(challenge);
-		return STATUS_ERROR;
-	}
-	/* For safety and convenience, ensure the buffer is NULL-terminated. */
-	challenge[payloadlen] = '\0';
-
-	conn->sasl->exchange(conn->sasl_state,
-						 challenge, payloadlen,
-						 &output, &outputlen,
-						 &done, &success);
-	free(challenge);			/* don't need the input anymore */
-
-	if (final && !done)
-	{
-		if (outputlen != 0)
-			free(output);
-
-		libpq_append_conn_error(conn, "AuthenticationSASLFinal received from server, but SASL authentication was not completed");
-		return STATUS_ERROR;
-	}
-
-	/*
-	 * If the exchange is not completed yet, we need to make sure that the
-	 * SASL mechanism has generated a message to send back.
-	 */
-	if (output == NULL && !done)
-	{
-		libpq_append_conn_error(conn, "no client response found after SASL exchange success");
-		return STATUS_ERROR;
-	}
-
-	/*
-	 * SASL allows zero-length responses, so this check uses "output" and not
-	 * "outputlen" to allow the case of an empty message.
-	 */
-	if (output)
-	{
-		/*
-		 * Send the SASL response to the server.
-		 */
-		res = pqPacketSend(conn, 'p', output, outputlen);
-		free(output);
-
-		if (res != STATUS_OK)
-			return STATUS_ERROR;
-	}
-
-	if (done && !success)
-		return STATUS_ERROR;
-
-	return STATUS_OK;
-}
-
-static int
-pg_password_sendauth(PGconn *conn, const char *password, AuthRequest areq)
-{
-	int			ret;
-	char	   *crypt_pwd = NULL;
-	const char *pwd_to_send;
-	char		md5Salt[4];
-
-	/* Read the salt from the AuthenticationMD5Password message. */
-	if (areq == AUTH_REQ_MD5)
-	{
-		if (pqGetnchar(md5Salt, 4, conn))
-			return STATUS_ERROR;	/* shouldn't happen */
-	}
-
-	/* Encrypt the password if needed. */
-
-	switch (areq)
-	{
-		case AUTH_REQ_MD5:
-			{
-				char	   *crypt_pwd2;
-				const char *errstr = NULL;
-
-				/* Allocate enough space for two MD5 hashes */
-				crypt_pwd = malloc(2 * (MD5_PASSWD_LEN + 1));
-				if (!crypt_pwd)
-				{
-					libpq_append_conn_error(conn, "out of memory");
-					return STATUS_ERROR;
-				}
-
-				crypt_pwd2 = crypt_pwd + MD5_PASSWD_LEN + 1;
-				if (!pg_md5_encrypt(password, conn->pguser,
-									strlen(conn->pguser), crypt_pwd2,
-									&errstr))
-				{
-					libpq_append_conn_error(conn, "could not encrypt password: %s", errstr);
-					free(crypt_pwd);
-					return STATUS_ERROR;
-				}
-				if (!pg_md5_encrypt(crypt_pwd2 + strlen("md5"), md5Salt,
-									4, crypt_pwd, &errstr))
-				{
-					libpq_append_conn_error(conn, "could not encrypt password: %s", errstr);
-					free(crypt_pwd);
-					return STATUS_ERROR;
-				}
-
-				pwd_to_send = crypt_pwd;
-				break;
-			}
-		case AUTH_REQ_PASSWORD:
-			pwd_to_send = password;
-			break;
-		default:
-			return STATUS_ERROR;
-	}
-	ret = pqPacketSend(conn, 'p', pwd_to_send, strlen(pwd_to_send) + 1);
-	free(crypt_pwd);
-	return ret;
-}
-
-/*
- * Translate a disallowed AuthRequest code into an error message.
- */
-static const char *
-auth_method_description(AuthRequest areq)
-{
-	switch (areq)
-	{
-		case AUTH_REQ_PASSWORD:
-			return libpq_gettext("server requested a cleartext password");
-		case AUTH_REQ_MD5:
-			return libpq_gettext("server requested a hashed password");
-		case AUTH_REQ_GSS:
-		case AUTH_REQ_GSS_CONT:
-			return libpq_gettext("server requested GSSAPI authentication");
-		case AUTH_REQ_SSPI:
-			return libpq_gettext("server requested SSPI authentication");
-		case AUTH_REQ_SASL:
-		case AUTH_REQ_SASL_CONT:
-		case AUTH_REQ_SASL_FIN:
-			return libpq_gettext("server requested SASL authentication");
-	}
-
-	return libpq_gettext("server requested an unknown authentication type");
-}
-
-/*
- * Convenience macro for checking the allowed_auth_methods bitmask.  Caller
- * must ensure that type is not greater than 31 (high bit of the bitmask).
- */
-#define auth_method_allowed(conn, type) \
-	(((conn)->allowed_auth_methods & (1 << (type))) != 0)
-
-/*
- * Verify that the authentication request is expected, given the connection
- * parameters. This is especially important when the client wishes to
- * authenticate the server before any sensitive information is exchanged.
- */
-static bool
-check_expected_areq(AuthRequest areq, PGconn *conn)
-{
-	bool		result = true;
-	const char *reason = NULL;
-
-	StaticAssertDecl((sizeof(conn->allowed_auth_methods) * CHAR_BIT) > AUTH_REQ_MAX,
-					 "AUTH_REQ_MAX overflows the allowed_auth_methods bitmask");
-
-	if (conn->sslcertmode[0] == 'r' /* require */
-		&& areq == AUTH_REQ_OK)
-	{
-		/*
-		 * Trade off a little bit of complexity to try to get these error
-		 * messages as precise as possible.
-		 */
-		if (!conn->ssl_cert_requested)
-		{
-			libpq_append_conn_error(conn, "server did not request an SSL certificate");
-			return false;
-		}
-		else if (!conn->ssl_cert_sent)
-		{
-			libpq_append_conn_error(conn, "server accepted connection without a valid SSL certificate");
-			return false;
-		}
-	}
-
-	/*
-	 * If the user required a specific auth method, or specified an allowed
-	 * set, then reject all others here, and make sure the server actually
-	 * completes an authentication exchange.
-	 */
-	if (conn->require_auth)
-	{
-		switch (areq)
-		{
-			case AUTH_REQ_OK:
-
-				/*
-				 * Check to make sure we've actually finished our exchange (or
-				 * else that the user has allowed an authentication-less
-				 * connection).
-				 *
-				 * If the user has allowed both SCRAM and unauthenticated
-				 * (trust) connections, then this check will silently accept
-				 * partial SCRAM exchanges, where a misbehaving server does
-				 * not provide its verifier before sending an OK.  This is
-				 * consistent with historical behavior, but it may be a point
-				 * to revisit in the future, since it could allow a server
-				 * that doesn't know the user's password to silently harvest
-				 * material for a brute force attack.
-				 */
-				if (!conn->auth_required || conn->client_finished_auth)
-					break;
-
-				/*
-				 * No explicit authentication request was made by the server
-				 * -- or perhaps it was made and not completed, in the case of
-				 * SCRAM -- but there is one special case to check.  If the
-				 * user allowed "gss", then a GSS-encrypted channel also
-				 * satisfies the check.
-				 */
-#ifdef ENABLE_GSS
-				if (auth_method_allowed(conn, AUTH_REQ_GSS) && conn->gssenc)
-				{
-					/*
-					 * If implicit GSS auth has already been performed via GSS
-					 * encryption, we don't need to have performed an
-					 * AUTH_REQ_GSS exchange.  This allows require_auth=gss to
-					 * be combined with gssencmode, since there won't be an
-					 * explicit authentication request in that case.
-					 */
-				}
-				else
-#endif
-				{
-					reason = libpq_gettext("server did not complete authentication");
-					result = false;
-				}
-
-				break;
-
-			case AUTH_REQ_PASSWORD:
-			case AUTH_REQ_MD5:
-			case AUTH_REQ_GSS:
-			case AUTH_REQ_GSS_CONT:
-			case AUTH_REQ_SSPI:
-			case AUTH_REQ_SASL:
-			case AUTH_REQ_SASL_CONT:
-			case AUTH_REQ_SASL_FIN:
-
-				/*
-				 * We don't handle these with the default case, to avoid
-				 * bit-shifting past the end of the allowed_auth_methods mask
-				 * if the server sends an unexpected AuthRequest.
-				 */
-				result = auth_method_allowed(conn, areq);
-				break;
-
-			default:
-				result = false;
-				break;
-		}
-	}
-
-	if (!result)
-	{
-		if (!reason)
-			reason = auth_method_description(areq);
-
-		libpq_append_conn_error(conn, "authentication method requirement \"%s\" failed: %s",
-								conn->require_auth, reason);
-		return result;
-	}
-
-	/*
-	 * When channel_binding=require, we must protect against two cases: (1) we
-	 * must not respond to non-SASL authentication requests, which might leak
-	 * information such as the client's password; and (2) even if we receive
-	 * AUTH_REQ_OK, we still must ensure that channel binding has happened in
-	 * order to authenticate the server.
-	 */
-	if (conn->channel_binding[0] == 'r' /* require */ )
-	{
-		switch (areq)
-		{
-			case AUTH_REQ_SASL:
-			case AUTH_REQ_SASL_CONT:
-			case AUTH_REQ_SASL_FIN:
-				break;
-			case AUTH_REQ_OK:
-				if (!conn->sasl || !conn->sasl->channel_bound(conn->sasl_state))
-				{
-					libpq_append_conn_error(conn, "channel binding required, but server authenticated client without channel binding");
-					result = false;
-				}
-				break;
-			default:
-				libpq_append_conn_error(conn, "channel binding required but not supported by server's authentication request");
-				result = false;
-				break;
-		}
-	}
-
-	return result;
-}
-
-/*
- * pg_fe_sendauth
- *		client demux routine for processing an authentication request
- *
- * The server has sent us an authentication challenge (or OK). Send an
- * appropriate response. The caller has ensured that the whole message is
- * now in the input buffer, and has already read the type and length of
- * it. We are responsible for reading any remaining extra data, specific
- * to the authentication method. 'payloadlen' is the remaining length in
- * the message.
- */
-int
-pg_fe_sendauth(AuthRequest areq, int payloadlen, PGconn *conn)
-{
-	int			oldmsglen;
-
-	if (!check_expected_areq(areq, conn))
-		return STATUS_ERROR;
-
-	switch (areq)
-	{
-		case AUTH_REQ_OK:
-			break;
-
-		case AUTH_REQ_KRB4:
-			libpq_append_conn_error(conn, "Kerberos 4 authentication not supported");
-			return STATUS_ERROR;
-
-		case AUTH_REQ_KRB5:
-			libpq_append_conn_error(conn, "Kerberos 5 authentication not supported");
-			return STATUS_ERROR;
-
-#if defined(ENABLE_GSS) || defined(ENABLE_SSPI)
-		case AUTH_REQ_GSS:
-#if !defined(ENABLE_SSPI)
-			/* no native SSPI, so use GSSAPI library for it */
-		case AUTH_REQ_SSPI:
-#endif
-			{
-				int			r;
-
-				pglock_thread();
-
-				/*
-				 * If we have both GSS and SSPI support compiled in, use SSPI
-				 * support by default. This is overridable by a connection
-				 * string parameter. Note that when using SSPI we still leave
-				 * the negotiate parameter off, since we want SSPI to use the
-				 * GSSAPI kerberos protocol. For actual SSPI negotiate
-				 * protocol, we use AUTH_REQ_SSPI.
-				 */
-#if defined(ENABLE_GSS) && defined(ENABLE_SSPI)
-				if (conn->gsslib && (pg_strcasecmp(conn->gsslib, "gssapi") == 0))
-					r = pg_GSS_startup(conn, payloadlen);
-				else
-					r = pg_SSPI_startup(conn, 0, payloadlen);
-#elif defined(ENABLE_GSS) && !defined(ENABLE_SSPI)
-				r = pg_GSS_startup(conn, payloadlen);
-#elif !defined(ENABLE_GSS) && defined(ENABLE_SSPI)
-				r = pg_SSPI_startup(conn, 0, payloadlen);
-#endif
-				if (r != STATUS_OK)
-				{
-					/* Error message already filled in. */
-					pgunlock_thread();
-					return STATUS_ERROR;
-				}
-				pgunlock_thread();
-			}
-			break;
-
-		case AUTH_REQ_GSS_CONT:
-			{
-				int			r;
-
-				pglock_thread();
-#if defined(ENABLE_GSS) && defined(ENABLE_SSPI)
-				if (conn->usesspi)
-					r = pg_SSPI_continue(conn, payloadlen);
-				else
-					r = pg_GSS_continue(conn, payloadlen);
-#elif defined(ENABLE_GSS) && !defined(ENABLE_SSPI)
-				r = pg_GSS_continue(conn, payloadlen);
-#elif !defined(ENABLE_GSS) && defined(ENABLE_SSPI)
-				r = pg_SSPI_continue(conn, payloadlen);
-#endif
-				if (r != STATUS_OK)
-				{
-					/* Error message already filled in. */
-					pgunlock_thread();
-					return STATUS_ERROR;
-				}
-				pgunlock_thread();
-			}
-			break;
-#else							/* defined(ENABLE_GSS) || defined(ENABLE_SSPI) */
-			/* No GSSAPI *or* SSPI support */
-		case AUTH_REQ_GSS:
-		case AUTH_REQ_GSS_CONT:
-			libpq_append_conn_error(conn, "GSSAPI authentication not supported");
-			return STATUS_ERROR;
-#endif							/* defined(ENABLE_GSS) || defined(ENABLE_SSPI) */
-
-#ifdef ENABLE_SSPI
-		case AUTH_REQ_SSPI:
-
-			/*
-			 * SSPI has its own startup message so libpq can decide which
-			 * method to use. Indicate to pg_SSPI_startup that we want SSPI
-			 * negotiation instead of Kerberos.
-			 */
-			pglock_thread();
-			if (pg_SSPI_startup(conn, 1, payloadlen) != STATUS_OK)
-			{
-				/* Error message already filled in. */
-				pgunlock_thread();
-				return STATUS_ERROR;
-			}
-			pgunlock_thread();
-			break;
-#else
-
-			/*
-			 * No SSPI support. However, if we have GSSAPI but not SSPI
-			 * support, AUTH_REQ_SSPI will have been handled in the codepath
-			 * for AUTH_REQ_GSS above, so don't duplicate the case label in
-			 * that case.
-			 */
-#if !defined(ENABLE_GSS)
-		case AUTH_REQ_SSPI:
-			libpq_append_conn_error(conn, "SSPI authentication not supported");
-			return STATUS_ERROR;
-#endif							/* !define(ENABLE_GSS) */
-#endif							/* ENABLE_SSPI */
-
-
-		case AUTH_REQ_CRYPT:
-			libpq_append_conn_error(conn, "Crypt authentication not supported");
-			return STATUS_ERROR;
-
-		case AUTH_REQ_MD5:
-		case AUTH_REQ_PASSWORD:
-			{
-				char	   *password;
-
-				conn->password_needed = true;
-				password = conn->connhost[conn->whichhost].password;
-				if (password == NULL)
-					password = conn->pgpass;
-				if (password == NULL || password[0] == '\0')
-				{
-					appendPQExpBufferStr(&conn->errorMessage,
-										 PQnoPasswordSupplied);
-					return STATUS_ERROR;
-				}
-				if (pg_password_sendauth(conn, password, areq) != STATUS_OK)
-				{
-					appendPQExpBufferStr(&conn->errorMessage,
-										 "fe_sendauth: error sending password authentication\n");
-					return STATUS_ERROR;
-				}
-
-				/* We expect no further authentication requests. */
-				conn->client_finished_auth = true;
-				break;
-			}
-
-		case AUTH_REQ_SASL:
-
-			/*
-			 * The request contains the name (as assigned by IANA) of the
-			 * authentication mechanism.
-			 */
-			if (pg_SASL_init(conn, payloadlen) != STATUS_OK)
-			{
-				/* pg_SASL_init already set the error message */
-				return STATUS_ERROR;
-			}
-			break;
-
-		case AUTH_REQ_SASL_CONT:
-		case AUTH_REQ_SASL_FIN:
-			if (conn->sasl_state == NULL)
-			{
-				appendPQExpBufferStr(&conn->errorMessage,
-									 "fe_sendauth: invalid authentication request from server: AUTH_REQ_SASL_CONT without AUTH_REQ_SASL\n");
-				return STATUS_ERROR;
-			}
-			oldmsglen = conn->errorMessage.len;
-			if (pg_SASL_continue(conn, payloadlen,
-								 (areq == AUTH_REQ_SASL_FIN)) != STATUS_OK)
-			{
-				/* Use this message if pg_SASL_continue didn't supply one */
-				if (conn->errorMessage.len == oldmsglen)
-					appendPQExpBufferStr(&conn->errorMessage,
-										 "fe_sendauth: error in SASL authentication\n");
-				return STATUS_ERROR;
-			}
-			break;
-
-		default:
-			libpq_append_conn_error(conn, "authentication method %u not supported", areq);
-			return STATUS_ERROR;
-	}
-
-	return STATUS_OK;
-}
-
-
-/*
- * pg_fe_getusername
- *
- * Returns a pointer to malloc'd space containing the name of the
- * specified user_id.  If there is an error, return NULL, and append
- * a suitable error message to *errorMessage if that's not NULL.
- *
- * Caution: on Windows, the user_id argument is ignored, and we always
- * fetch the current user's name.
- */
-char *
-pg_fe_getusername(uid_t user_id, PQExpBuffer errorMessage)
-{
-	char	   *result = NULL;
-	const char *name = NULL;
-
-#ifdef WIN32
-	/* Microsoft recommends buffer size of UNLEN+1, where UNLEN = 256 */
-	char		username[256 + 1];
-	DWORD		namesize = sizeof(username);
-#else
-	char		pwdbuf[BUFSIZ];
-#endif
-
-	/*
-	 * Some users are using configure --enable-thread-safety-force, so we
-	 * might as well do the locking within our library to protect getpwuid().
-	 * In fact, application developers can use getpwuid() in their application
-	 * if they use the locking call we provide, or install their own locking
-	 * function using PQregisterThreadLock().
-	 */
-	pglock_thread();
-
-#ifdef WIN32
-	if (GetUserName(username, &namesize))
-		name = username;
-	else if (errorMessage)
-		libpq_append_error(errorMessage,
-						   "user name lookup failure: error code %lu",
-						   GetLastError());
-#else
-	if (pg_get_user_name(user_id, pwdbuf, sizeof(pwdbuf)))
-		name = pwdbuf;
-	else if (errorMessage)
-		appendPQExpBuffer(errorMessage, "%s\n", pwdbuf);
-#endif
-
-	if (name)
-	{
-		result = strdup(name);
-		if (result == NULL && errorMessage)
-			libpq_append_error(errorMessage, "out of memory");
-	}
-
-	pgunlock_thread();
-
-	return result;
-}
-
-/*
- * pg_fe_getauthname
- *
- * Returns a pointer to malloc'd space containing whatever name the user
- * has authenticated to the system.  If there is an error, return NULL,
- * and append a suitable error message to *errorMessage if that's not NULL.
- */
-char *
-pg_fe_getauthname(PQExpBuffer errorMessage)
-{
-#ifdef WIN32
-	return pg_fe_getusername(0, errorMessage);
-#else
-	return pg_fe_getusername(geteuid(), errorMessage);
-#endif
-}
-
-
-/*
- * PQencryptPassword -- exported routine to encrypt a password with MD5
- *
- * This function is equivalent to calling PQencryptPasswordConn with
- * "md5" as the encryption method, except that this doesn't require
- * a connection object.  This function is deprecated, use
- * PQencryptPasswordConn instead.
- */
-char *
-PQencryptPassword(const char *passwd, const char *user)
-{
-	char	   *crypt_pwd;
-	const char *errstr = NULL;
-
-	crypt_pwd = malloc(MD5_PASSWD_LEN + 1);
-	if (!crypt_pwd)
-		return NULL;
-
-	if (!pg_md5_encrypt(passwd, user, strlen(user), crypt_pwd, &errstr))
-	{
-		free(crypt_pwd);
-		return NULL;
-	}
-
-	return crypt_pwd;
-}
-
-/*
- * PQencryptPasswordConn -- exported routine to encrypt a password
- *
- * This is intended to be used by client applications that wish to send
- * commands like ALTER USER joe PASSWORD 'pwd'.  The password need not
- * be sent in cleartext if it is encrypted on the client side.  This is
- * good because it ensures the cleartext password won't end up in logs,
- * pg_stat displays, etc.  We export the function so that clients won't
- * be dependent on low-level details like whether the encryption is MD5
- * or something else.
- *
- * Arguments are a connection object, the cleartext password, the SQL
- * name of the user it is for, and a string indicating the algorithm to
- * use for encrypting the password.  If algorithm is NULL, this queries
- * the server for the current 'password_encryption' value.  If you wish
- * to avoid that, e.g. to avoid blocking, you can execute
- * 'show password_encryption' yourself before calling this function, and
- * pass it as the algorithm.
- *
- * Return value is a malloc'd string.  The client may assume the string
- * doesn't contain any special characters that would require escaping.
- * On error, an error message is stored in the connection object, and
- * returns NULL.
- */
-char *
-PQencryptPasswordConn(PGconn *conn, const char *passwd, const char *user,
-					  const char *algorithm)
-{
-#define MAX_ALGORITHM_NAME_LEN 50
-	char		algobuf[MAX_ALGORITHM_NAME_LEN + 1];
-	char	   *crypt_pwd = NULL;
-
-	if (!conn)
-		return NULL;
-
-	pqClearConnErrorState(conn);
-
-	/* If no algorithm was given, ask the server. */
-	if (algorithm == NULL)
-	{
-		PGresult   *res;
-		char	   *val;
-
-		res = PQexec(conn, "show password_encryption");
-		if (res == NULL)
-		{
-			/* PQexec() should've set conn->errorMessage already */
-			return NULL;
-		}
-		if (PQresultStatus(res) != PGRES_TUPLES_OK)
-		{
-			/* PQexec() should've set conn->errorMessage already */
-			PQclear(res);
-			return NULL;
-		}
-		if (PQntuples(res) != 1 || PQnfields(res) != 1)
-		{
-			PQclear(res);
-			libpq_append_conn_error(conn, "unexpected shape of result set returned for SHOW");
-			return NULL;
-		}
-		val = PQgetvalue(res, 0, 0);
-
-		if (strlen(val) > MAX_ALGORITHM_NAME_LEN)
-		{
-			PQclear(res);
-			libpq_append_conn_error(conn, "password_encryption value too long");
-			return NULL;
-		}
-		strcpy(algobuf, val);
-		PQclear(res);
-
-		algorithm = algobuf;
-	}
-
-	/*
-	 * Also accept "on" and "off" as aliases for "md5", because
-	 * password_encryption was a boolean before PostgreSQL 10.  We refuse to
-	 * send the password in plaintext even if it was "off".
-	 */
-	if (strcmp(algorithm, "on") == 0 ||
-		strcmp(algorithm, "off") == 0)
-		algorithm = "md5";
-
-	/*
-	 * Ok, now we know what algorithm to use
-	 */
-	if (strcmp(algorithm, "scram-sha-256") == 0)
-	{
-		const char *errstr = NULL;
-
-		crypt_pwd = pg_fe_scram_build_secret(passwd,
-											 conn->scram_sha_256_iterations,
-											 &errstr);
-		if (!crypt_pwd)
-			libpq_append_conn_error(conn, "could not encrypt password: %s", errstr);
-	}
-	else if (strcmp(algorithm, "md5") == 0)
-	{
-		crypt_pwd = malloc(MD5_PASSWD_LEN + 1);
-		if (crypt_pwd)
-		{
-			const char *errstr = NULL;
-
-			if (!pg_md5_encrypt(passwd, user, strlen(user), crypt_pwd, &errstr))
-			{
-				libpq_append_conn_error(conn, "could not encrypt password: %s", errstr);
-				free(crypt_pwd);
-				crypt_pwd = NULL;
-			}
-		}
-		else
-			libpq_append_conn_error(conn, "out of memory");
-	}
-	else
-	{
-		libpq_append_conn_error(conn, "unrecognized password encryption algorithm \"%s\"",
-								algorithm);
-		return NULL;
-	}
-
-	return crypt_pwd;
-}
diff --git a/contrib/libs/libpq/src/interfaces/libpq/fe-auth.h b/contrib/libs/libpq/src/interfaces/libpq/fe-auth.h
deleted file mode 100644
index 124dd5d031..0000000000
--- a/contrib/libs/libpq/src/interfaces/libpq/fe-auth.h
+++ /dev/null
@@ -1,32 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * fe-auth.h
- *
- *	  Definitions for network authentication routines
- *
- * Portions Copyright (c) 1996-2023, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- * src/interfaces/libpq/fe-auth.h
- *
- *-------------------------------------------------------------------------
- */
-#ifndef FE_AUTH_H
-#define FE_AUTH_H
-
-#include "libpq-fe.h"
-#include "libpq-int.h"
-
-
-/* Prototypes for functions in fe-auth.c */
-extern int	pg_fe_sendauth(AuthRequest areq, int payloadlen, PGconn *conn);
-extern char *pg_fe_getusername(uid_t user_id, PQExpBuffer errorMessage);
-extern char *pg_fe_getauthname(PQExpBuffer errorMessage);
-
-/* Mechanisms in fe-auth-scram.c */
-extern const pg_fe_sasl_mech pg_scram_mech;
-extern char *pg_fe_scram_build_secret(const char *password,
-									  int iterations,
-									  const char **errstr);
-
-#endif							/* FE_AUTH_H */
diff --git a/contrib/libs/libpq/src/interfaces/libpq/fe-connect.c b/contrib/libs/libpq/src/interfaces/libpq/fe-connect.c
deleted file mode 100644
index a61eec7282..0000000000
--- a/contrib/libs/libpq/src/interfaces/libpq/fe-connect.c
+++ /dev/null
@@ -1,7831 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * fe-connect.c
- *	  functions related to setting up a connection to the backend
- *
- * Portions Copyright (c) 1996-2023, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- *
- * IDENTIFICATION
- *	  src/interfaces/libpq/fe-connect.c
- *
- *-------------------------------------------------------------------------
- */
-
-#include "postgres_fe.h"
-
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <ctype.h>
-#include <netdb.h>
-#include <time.h>
-#include <unistd.h>
-
-#include "common/ip.h"
-#include "common/link-canary.h"
-#include "common/scram-common.h"
-#include "common/string.h"
-#include "fe-auth.h"
-#include "libpq-fe.h"
-#include "libpq-int.h"
-#include "mb/pg_wchar.h"
-#include "pg_config_paths.h"
-#include "port/pg_bswap.h"
-
-#ifdef WIN32
-#include "win32.h"
-#ifdef _WIN32_IE
-#undef _WIN32_IE
-#endif
-#define _WIN32_IE 0x0500
-#ifdef near
-#undef near
-#endif
-#define near
-#include <shlobj.h>
-#include <mstcpip.h>
-#else
-#include <sys/socket.h>
-#include <netdb.h>
-#include <netinet/in.h>
-#include <netinet/tcp.h>
-#endif
-
-#ifdef ENABLE_THREAD_SAFETY
-#ifdef WIN32
-#include "pthread-win32.h"
-#else
-#include <pthread.h>
-#endif
-#endif
-
-#ifdef USE_LDAP
-#ifdef WIN32
-#include <winldap.h>
-#else
-/* OpenLDAP deprecates RFC 1823, but we want standard conformance */
-#define LDAP_DEPRECATED 1
-#error #include <ldap.h>
-typedef struct timeval LDAP_TIMEVAL;
-#endif
-static int	ldapServiceLookup(const char *purl, PQconninfoOption *options,
-							  PQExpBuffer errorMessage);
-#endif
-
-#ifndef WIN32
-#define PGPASSFILE ".pgpass"
-#else
-#define PGPASSFILE "pgpass.conf"
-#endif
-
-/*
- * Pre-9.0 servers will return this SQLSTATE if asked to set
- * application_name in a startup packet.  We hard-wire the value rather
- * than looking into errcodes.h since it reflects historical behavior
- * rather than that of the current code.
- */
-#define ERRCODE_APPNAME_UNKNOWN "42704"
-
-/* This is part of the protocol so just define it */
-#define ERRCODE_INVALID_PASSWORD "28P01"
-/* This too */
-#define ERRCODE_CANNOT_CONNECT_NOW "57P03"
-
-/*
- * Cope with the various platform-specific ways to spell TCP keepalive socket
- * options.  This doesn't cover Windows, which as usual does its own thing.
- */
-#if defined(TCP_KEEPIDLE)
-/* TCP_KEEPIDLE is the name of this option on Linux and *BSD */
-#define PG_TCP_KEEPALIVE_IDLE TCP_KEEPIDLE
-#define PG_TCP_KEEPALIVE_IDLE_STR "TCP_KEEPIDLE"
-#elif defined(TCP_KEEPALIVE_THRESHOLD)
-/* TCP_KEEPALIVE_THRESHOLD is the name of this option on Solaris >= 11 */
-#define PG_TCP_KEEPALIVE_IDLE TCP_KEEPALIVE_THRESHOLD
-#define PG_TCP_KEEPALIVE_IDLE_STR "TCP_KEEPALIVE_THRESHOLD"
-#elif defined(TCP_KEEPALIVE) && defined(__darwin__)
-/* TCP_KEEPALIVE is the name of this option on macOS */
-/* Caution: Solaris has this symbol but it means something different */
-#define PG_TCP_KEEPALIVE_IDLE TCP_KEEPALIVE
-#define PG_TCP_KEEPALIVE_IDLE_STR "TCP_KEEPALIVE"
-#endif
-
-/*
- * fall back options if they are not specified by arguments or defined
- * by environment variables
- */
-#define DefaultHost		"localhost"
-#define DefaultOption	""
-#ifdef USE_SSL
-#define DefaultChannelBinding	"prefer"
-#else
-#define DefaultChannelBinding	"disable"
-#endif
-#define DefaultTargetSessionAttrs	"any"
-#define DefaultLoadBalanceHosts	"disable"
-#ifdef USE_SSL
-#define DefaultSSLMode "prefer"
-#define DefaultSSLCertMode "allow"
-#else
-#define DefaultSSLMode	"disable"
-#define DefaultSSLCertMode "disable"
-#endif
-#ifdef ENABLE_GSS
-#error #include "fe-gssapi-common.h"
-#define DefaultGSSMode "prefer"
-#else
-#define DefaultGSSMode "disable"
-#endif
-
-/* ----------
- * Definition of the conninfo parameters and their fallback resources.
- *
- * If Environment-Var and Compiled-in are specified as NULL, no
- * fallback is available. If after all no value can be determined
- * for an option, an error is returned.
- *
- * The value for the username is treated specially in conninfo_add_defaults.
- * If the value is not obtained any other way, the username is determined
- * by pg_fe_getauthname().
- *
- * The Label and Disp-Char entries are provided for applications that
- * want to use PQconndefaults() to create a generic database connection
- * dialog. Disp-Char is defined as follows:
- *		""		Normal input field
- *		"*"		Password field - hide value
- *		"D"		Debug option - don't show by default
- *
- * PQconninfoOptions[] is a constant static array that we use to initialize
- * a dynamically allocated working copy.  All the "val" fields in
- * PQconninfoOptions[] *must* be NULL.  In a working copy, non-null "val"
- * fields point to malloc'd strings that should be freed when the working
- * array is freed (see PQconninfoFree).
- *
- * The first part of each struct is identical to the one in libpq-fe.h,
- * which is required since we memcpy() data between the two!
- * ----------
- */
-typedef struct _internalPQconninfoOption
-{
-	char	   *keyword;		/* The keyword of the option			*/
-	char	   *envvar;			/* Fallback environment variable name	*/
-	char	   *compiled;		/* Fallback compiled in default value	*/
-	char	   *val;			/* Option's current value, or NULL		*/
-	char	   *label;			/* Label for field in connect dialog	*/
-	char	   *dispchar;		/* Indicates how to display this field in a
-								 * connect dialog. Values are: "" Display
-								 * entered value as is "*" Password field -
-								 * hide value "D"  Debug option - don't show
-								 * by default */
-	int			dispsize;		/* Field size in characters for dialog	*/
-	/* ---
-	 * Anything above this comment must be synchronized with
-	 * PQconninfoOption in libpq-fe.h, since we memcpy() data
-	 * between them!
-	 * ---
-	 */
-	off_t		connofs;		/* Offset into PGconn struct, -1 if not there */
-} internalPQconninfoOption;
-
-static const internalPQconninfoOption PQconninfoOptions[] = {
-	{"service", "PGSERVICE", NULL, NULL,
-	"Database-Service", "", 20, -1},
-
-	{"user", "PGUSER", NULL, NULL,
-		"Database-User", "", 20,
-	offsetof(struct pg_conn, pguser)},
-
-	{"password", "PGPASSWORD", NULL, NULL,
-		"Database-Password", "*", 20,
-	offsetof(struct pg_conn, pgpass)},
-
-	{"passfile", "PGPASSFILE", NULL, NULL,
-		"Database-Password-File", "", 64,
-	offsetof(struct pg_conn, pgpassfile)},
-
-	{"channel_binding", "PGCHANNELBINDING", DefaultChannelBinding, NULL,
-		"Channel-Binding", "", 8,	/* sizeof("require") == 8 */
-	offsetof(struct pg_conn, channel_binding)},
-
-	{"connect_timeout", "PGCONNECT_TIMEOUT", NULL, NULL,
-		"Connect-timeout", "", 10,	/* strlen(INT32_MAX) == 10 */
-	offsetof(struct pg_conn, connect_timeout)},
-
-	{"dbname", "PGDATABASE", NULL, NULL,
-		"Database-Name", "", 20,
-	offsetof(struct pg_conn, dbName)},
-
-	{"host", "PGHOST", NULL, NULL,
-		"Database-Host", "", 40,
-	offsetof(struct pg_conn, pghost)},
-
-	{"hostaddr", "PGHOSTADDR", NULL, NULL,
-		"Database-Host-IP-Address", "", 45,
-	offsetof(struct pg_conn, pghostaddr)},
-
-	{"port", "PGPORT", DEF_PGPORT_STR, NULL,
-		"Database-Port", "", 6,
-	offsetof(struct pg_conn, pgport)},
-
-	{"client_encoding", "PGCLIENTENCODING", NULL, NULL,
-		"Client-Encoding", "", 10,
-	offsetof(struct pg_conn, client_encoding_initial)},
-
-	{"options", "PGOPTIONS", DefaultOption, NULL,
-		"Backend-Options", "", 40,
-	offsetof(struct pg_conn, pgoptions)},
-
-	{"application_name", "PGAPPNAME", NULL, NULL,
-		"Application-Name", "", 64,
-	offsetof(struct pg_conn, appname)},
-
-	{"fallback_application_name", NULL, NULL, NULL,
-		"Fallback-Application-Name", "", 64,
-	offsetof(struct pg_conn, fbappname)},
-
-	{"keepalives", NULL, NULL, NULL,
-		"TCP-Keepalives", "", 1,	/* should be just '0' or '1' */
-	offsetof(struct pg_conn, keepalives)},
-
-	{"keepalives_idle", NULL, NULL, NULL,
-		"TCP-Keepalives-Idle", "", 10,	/* strlen(INT32_MAX) == 10 */
-	offsetof(struct pg_conn, keepalives_idle)},
-
-	{"keepalives_interval", NULL, NULL, NULL,
-		"TCP-Keepalives-Interval", "", 10,	/* strlen(INT32_MAX) == 10 */
-	offsetof(struct pg_conn, keepalives_interval)},
-
-	{"keepalives_count", NULL, NULL, NULL,
-		"TCP-Keepalives-Count", "", 10, /* strlen(INT32_MAX) == 10 */
-	offsetof(struct pg_conn, keepalives_count)},
-
-	{"tcp_user_timeout", NULL, NULL, NULL,
-		"TCP-User-Timeout", "", 10, /* strlen(INT32_MAX) == 10 */
-	offsetof(struct pg_conn, pgtcp_user_timeout)},
-
-	/*
-	 * ssl options are allowed even without client SSL support because the
-	 * client can still handle SSL modes "disable" and "allow". Other
-	 * parameters have no effect on non-SSL connections, so there is no reason
-	 * to exclude them since none of them are mandatory.
-	 */
-	{"sslmode", "PGSSLMODE", DefaultSSLMode, NULL,
-		"SSL-Mode", "", 12,		/* sizeof("verify-full") == 12 */
-	offsetof(struct pg_conn, sslmode)},
-
-	{"sslcompression", "PGSSLCOMPRESSION", "0", NULL,
-		"SSL-Compression", "", 1,
-	offsetof(struct pg_conn, sslcompression)},
-
-	{"sslcert", "PGSSLCERT", NULL, NULL,
-		"SSL-Client-Cert", "", 64,
-	offsetof(struct pg_conn, sslcert)},
-
-	{"sslkey", "PGSSLKEY", NULL, NULL,
-		"SSL-Client-Key", "", 64,
-	offsetof(struct pg_conn, sslkey)},
-
-	{"sslcertmode", "PGSSLCERTMODE", NULL, NULL,
-		"SSL-Client-Cert-Mode", "", 8,	/* sizeof("disable") == 8 */
-	offsetof(struct pg_conn, sslcertmode)},
-
-	{"sslpassword", NULL, NULL, NULL,
-		"SSL-Client-Key-Password", "*", 20,
-	offsetof(struct pg_conn, sslpassword)},
-
-	{"sslrootcert", "PGSSLROOTCERT", NULL, NULL,
-		"SSL-Root-Certificate", "", 64,
-	offsetof(struct pg_conn, sslrootcert)},
-
-	{"sslcrl", "PGSSLCRL", NULL, NULL,
-		"SSL-Revocation-List", "", 64,
-	offsetof(struct pg_conn, sslcrl)},
-
-	{"sslcrldir", "PGSSLCRLDIR", NULL, NULL,
-		"SSL-Revocation-List-Dir", "", 64,
-	offsetof(struct pg_conn, sslcrldir)},
-
-	{"sslsni", "PGSSLSNI", "1", NULL,
-		"SSL-SNI", "", 1,
-	offsetof(struct pg_conn, sslsni)},
-
-	{"requirepeer", "PGREQUIREPEER", NULL, NULL,
-		"Require-Peer", "", 10,
-	offsetof(struct pg_conn, requirepeer)},
-
-	{"require_auth", "PGREQUIREAUTH", NULL, NULL,
-		"Require-Auth", "", 14, /* sizeof("scram-sha-256") == 14 */
-	offsetof(struct pg_conn, require_auth)},
-
-	{"ssl_min_protocol_version", "PGSSLMINPROTOCOLVERSION", "TLSv1.2", NULL,
-		"SSL-Minimum-Protocol-Version", "", 8,	/* sizeof("TLSv1.x") == 8 */
-	offsetof(struct pg_conn, ssl_min_protocol_version)},
-
-	{"ssl_max_protocol_version", "PGSSLMAXPROTOCOLVERSION", NULL, NULL,
-		"SSL-Maximum-Protocol-Version", "", 8,	/* sizeof("TLSv1.x") == 8 */
-	offsetof(struct pg_conn, ssl_max_protocol_version)},
-
-	/*
-	 * As with SSL, all GSS options are exposed even in builds that don't have
-	 * support.
-	 */
-	{"gssencmode", "PGGSSENCMODE", DefaultGSSMode, NULL,
-		"GSSENC-Mode", "", 8,	/* sizeof("disable") == 8 */
-	offsetof(struct pg_conn, gssencmode)},
-
-	/* Kerberos and GSSAPI authentication support specifying the service name */
-	{"krbsrvname", "PGKRBSRVNAME", PG_KRB_SRVNAM, NULL,
-		"Kerberos-service-name", "", 20,
-	offsetof(struct pg_conn, krbsrvname)},
-
-	{"gsslib", "PGGSSLIB", NULL, NULL,
-		"GSS-library", "", 7,	/* sizeof("gssapi") == 7 */
-	offsetof(struct pg_conn, gsslib)},
-
-	{"gssdelegation", "PGGSSDELEGATION", "0", NULL,
-		"GSS-delegation", "", 1,
-	offsetof(struct pg_conn, gssdelegation)},
-
-	{"replication", NULL, NULL, NULL,
-		"Replication", "D", 5,
-	offsetof(struct pg_conn, replication)},
-
-	{"target_session_attrs", "PGTARGETSESSIONATTRS",
-		DefaultTargetSessionAttrs, NULL,
-		"Target-Session-Attrs", "", 15, /* sizeof("prefer-standby") = 15 */
-	offsetof(struct pg_conn, target_session_attrs)},
-
-	{"load_balance_hosts", "PGLOADBALANCEHOSTS",
-		DefaultLoadBalanceHosts, NULL,
-		"Load-Balance-Hosts", "", 8,	/* sizeof("disable") = 8 */
-	offsetof(struct pg_conn, load_balance_hosts)},
-
-	/* Terminating entry --- MUST BE LAST */
-	{NULL, NULL, NULL, NULL,
-	NULL, NULL, 0}
-};
-
-static const PQEnvironmentOption EnvironmentOptions[] =
-{
-	/* common user-interface settings */
-	{
-		"PGDATESTYLE", "datestyle"
-	},
-	{
-		"PGTZ", "timezone"
-	},
-	/* internal performance-related settings */
-	{
-		"PGGEQO", "geqo"
-	},
-	{
-		NULL, NULL
-	}
-};
-
-/* The connection URI must start with either of the following designators: */
-static const char uri_designator[] = "postgresql://";
-static const char short_uri_designator[] = "postgres://";
-
-static bool connectOptions1(PGconn *conn, const char *conninfo);
-static bool connectOptions2(PGconn *conn);
-static int	connectDBStart(PGconn *conn);
-static int	connectDBComplete(PGconn *conn);
-static PGPing internal_ping(PGconn *conn);
-static PGconn *makeEmptyPGconn(void);
-static void pqFreeCommandQueue(PGcmdQueueEntry *queue);
-static bool fillPGconn(PGconn *conn, PQconninfoOption *connOptions);
-static void freePGconn(PGconn *conn);
-static void closePGconn(PGconn *conn);
-static void release_conn_addrinfo(PGconn *conn);
-static int	store_conn_addrinfo(PGconn *conn, struct addrinfo *addrlist);
-static void sendTerminateConn(PGconn *conn);
-static PQconninfoOption *conninfo_init(PQExpBuffer errorMessage);
-static PQconninfoOption *parse_connection_string(const char *connstr,
-												 PQExpBuffer errorMessage, bool use_defaults);
-static int	uri_prefix_length(const char *connstr);
-static bool recognized_connection_string(const char *connstr);
-static PQconninfoOption *conninfo_parse(const char *conninfo,
-										PQExpBuffer errorMessage, bool use_defaults);
-static PQconninfoOption *conninfo_array_parse(const char *const *keywords,
-											  const char *const *values, PQExpBuffer errorMessage,
-											  bool use_defaults, int expand_dbname);
-static bool conninfo_add_defaults(PQconninfoOption *options,
-								  PQExpBuffer errorMessage);
-static PQconninfoOption *conninfo_uri_parse(const char *uri,
-											PQExpBuffer errorMessage, bool use_defaults);
-static bool conninfo_uri_parse_options(PQconninfoOption *options,
-									   const char *uri, PQExpBuffer errorMessage);
-static bool conninfo_uri_parse_params(char *params,
-									  PQconninfoOption *connOptions,
-									  PQExpBuffer errorMessage);
-static char *conninfo_uri_decode(const char *str, PQExpBuffer errorMessage);
-static bool get_hexdigit(char digit, int *value);
-static const char *conninfo_getval(PQconninfoOption *connOptions,
-								   const char *keyword);
-static PQconninfoOption *conninfo_storeval(PQconninfoOption *connOptions,
-										   const char *keyword, const char *value,
-										   PQExpBuffer errorMessage, bool ignoreMissing, bool uri_decode);
-static PQconninfoOption *conninfo_find(PQconninfoOption *connOptions,
-									   const char *keyword);
-static void defaultNoticeReceiver(void *arg, const PGresult *res);
-static void defaultNoticeProcessor(void *arg, const char *message);
-static int	parseServiceInfo(PQconninfoOption *options,
-							 PQExpBuffer errorMessage);
-static int	parseServiceFile(const char *serviceFile,
-							 const char *service,
-							 PQconninfoOption *options,
-							 PQExpBuffer errorMessage,
-							 bool *group_found);
-static char *pwdfMatchesString(char *buf, const char *token);
-static char *passwordFromFile(const char *hostname, const char *port, const char *dbname,
-							  const char *username, const char *pgpassfile);
-static void pgpassfileWarning(PGconn *conn);
-static void default_threadlock(int acquire);
-static bool sslVerifyProtocolVersion(const char *version);
-static bool sslVerifyProtocolRange(const char *min, const char *max);
-static bool parse_int_param(const char *value, int *result, PGconn *conn,
-							const char *context);
-
-
-/* global variable because fe-auth.c needs to access it */
-pgthreadlock_t pg_g_threadlock = default_threadlock;
-
-
-/*
- *		pqDropConnection
- *
- * Close any physical connection to the server, and reset associated
- * state inside the connection object.  We don't release state that
- * would be needed to reconnect, though, nor local state that might still
- * be useful later.
- *
- * We can always flush the output buffer, since there's no longer any hope
- * of sending that data.  However, unprocessed input data might still be
- * valuable, so the caller must tell us whether to flush that or not.
- */
-void
-pqDropConnection(PGconn *conn, bool flushInput)
-{
-	/* Drop any SSL state */
-	pqsecure_close(conn);
-
-	/* Close the socket itself */
-	if (conn->sock != PGINVALID_SOCKET)
-		closesocket(conn->sock);
-	conn->sock = PGINVALID_SOCKET;
-
-	/* Optionally discard any unread data */
-	if (flushInput)
-		conn->inStart = conn->inCursor = conn->inEnd = 0;
-
-	/* Always discard any unsent data */
-	conn->outCount = 0;
-
-	/* Likewise, discard any pending pipelined commands */
-	pqFreeCommandQueue(conn->cmd_queue_head);
-	conn->cmd_queue_head = conn->cmd_queue_tail = NULL;
-	pqFreeCommandQueue(conn->cmd_queue_recycle);
-	conn->cmd_queue_recycle = NULL;
-
-	/* Free authentication/encryption state */
-#ifdef ENABLE_GSS
-	{
-		OM_uint32	min_s;
-
-		if (conn->gcred != GSS_C_NO_CREDENTIAL)
-		{
-			gss_release_cred(&min_s, &conn->gcred);
-			conn->gcred = GSS_C_NO_CREDENTIAL;
-		}
-		if (conn->gctx)
-			gss_delete_sec_context(&min_s, &conn->gctx, GSS_C_NO_BUFFER);
-		if (conn->gtarg_nam)
-			gss_release_name(&min_s, &conn->gtarg_nam);
-		if (conn->gss_SendBuffer)
-		{
-			free(conn->gss_SendBuffer);
-			conn->gss_SendBuffer = NULL;
-		}
-		if (conn->gss_RecvBuffer)
-		{
-			free(conn->gss_RecvBuffer);
-			conn->gss_RecvBuffer = NULL;
-		}
-		if (conn->gss_ResultBuffer)
-		{
-			free(conn->gss_ResultBuffer);
-			conn->gss_ResultBuffer = NULL;
-		}
-		conn->gssenc = false;
-	}
-#endif
-#ifdef ENABLE_SSPI
-	if (conn->sspitarget)
-	{
-		free(conn->sspitarget);
-		conn->sspitarget = NULL;
-	}
-	if (conn->sspicred)
-	{
-		FreeCredentialsHandle(conn->sspicred);
-		free(conn->sspicred);
-		conn->sspicred = NULL;
-	}
-	if (conn->sspictx)
-	{
-		DeleteSecurityContext(conn->sspictx);
-		free(conn->sspictx);
-		conn->sspictx = NULL;
-	}
-	conn->usesspi = 0;
-#endif
-	if (conn->sasl_state)
-	{
-		conn->sasl->free(conn->sasl_state);
-		conn->sasl_state = NULL;
-	}
-}
-
-/*
- * pqFreeCommandQueue
- * Free all the entries of PGcmdQueueEntry queue passed.
- */
-static void
-pqFreeCommandQueue(PGcmdQueueEntry *queue)
-{
-	while (queue != NULL)
-	{
-		PGcmdQueueEntry *cur = queue;
-
-		queue = cur->next;
-		free(cur->query);
-		free(cur);
-	}
-}
-
-/*
- *		pqDropServerData
- *
- * Clear all connection state data that was received from (or deduced about)
- * the server.  This is essential to do between connection attempts to
- * different servers, else we may incorrectly hold over some data from the
- * old server.
- *
- * It would be better to merge this into pqDropConnection, perhaps, but
- * right now we cannot because that function is called immediately on
- * detection of connection loss (cf. pqReadData, for instance).  This data
- * should be kept until we are actually starting a new connection.
- */
-static void
-pqDropServerData(PGconn *conn)
-{
-	PGnotify   *notify;
-	pgParameterStatus *pstatus;
-
-	/* Forget pending notifies */
-	notify = conn->notifyHead;
-	while (notify != NULL)
-	{
-		PGnotify   *prev = notify;
-
-		notify = notify->next;
-		free(prev);
-	}
-	conn->notifyHead = conn->notifyTail = NULL;
-
-	/* Reset ParameterStatus data, as well as variables deduced from it */
-	pstatus = conn->pstatus;
-	while (pstatus != NULL)
-	{
-		pgParameterStatus *prev = pstatus;
-
-		pstatus = pstatus->next;
-		free(prev);
-	}
-	conn->pstatus = NULL;
-	conn->client_encoding = PG_SQL_ASCII;
-	conn->std_strings = false;
-	conn->default_transaction_read_only = PG_BOOL_UNKNOWN;
-	conn->in_hot_standby = PG_BOOL_UNKNOWN;
-	conn->scram_sha_256_iterations = SCRAM_SHA_256_DEFAULT_ITERATIONS;
-	conn->sversion = 0;
-
-	/* Drop large-object lookup data */
-	free(conn->lobjfuncs);
-	conn->lobjfuncs = NULL;
-
-	/* Reset assorted other per-connection state */
-	conn->last_sqlstate[0] = '\0';
-	conn->auth_req_received = false;
-	conn->client_finished_auth = false;
-	conn->password_needed = false;
-	conn->gssapi_used = false;
-	conn->write_failed = false;
-	free(conn->write_err_msg);
-	conn->write_err_msg = NULL;
-	conn->be_pid = 0;
-	conn->be_key = 0;
-}
-
-
-/*
- *		Connecting to a Database
- *
- * There are now six different ways a user of this API can connect to the
- * database.  Two are not recommended for use in new code, because of their
- * lack of extensibility with respect to the passing of options to the
- * backend.  These are PQsetdb and PQsetdbLogin (the former now being a macro
- * to the latter).
- *
- * If it is desired to connect in a synchronous (blocking) manner, use the
- * function PQconnectdb or PQconnectdbParams. The former accepts a string of
- * option = value pairs (or a URI) which must be parsed; the latter takes two
- * NULL terminated arrays instead.
- *
- * To connect in an asynchronous (non-blocking) manner, use the functions
- * PQconnectStart or PQconnectStartParams (which differ in the same way as
- * PQconnectdb and PQconnectdbParams) and PQconnectPoll.
- *
- * Internally, the static functions connectDBStart, connectDBComplete
- * are part of the connection procedure.
- */
-
-/*
- *		PQconnectdbParams
- *
- * establishes a connection to a postgres backend through the postmaster
- * using connection information in two arrays.
- *
- * The keywords array is defined as
- *
- *	   const char *params[] = {"option1", "option2", NULL}
- *
- * The values array is defined as
- *
- *	   const char *values[] = {"value1", "value2", NULL}
- *
- * Returns a PGconn* which is needed for all subsequent libpq calls, or NULL
- * if a memory allocation failed.
- * If the status field of the connection returned is CONNECTION_BAD,
- * then some fields may be null'ed out instead of having valid values.
- *
- * You should call PQfinish (if conn is not NULL) regardless of whether this
- * call succeeded.
- */
-PGconn *
-PQconnectdbParams(const char *const *keywords,
-				  const char *const *values,
-				  int expand_dbname)
-{
-	PGconn	   *conn = PQconnectStartParams(keywords, values, expand_dbname);
-
-	if (conn && conn->status != CONNECTION_BAD)
-		(void) connectDBComplete(conn);
-
-	return conn;
-}
-
-/*
- *		PQpingParams
- *
- * check server status, accepting parameters identical to PQconnectdbParams
- */
-PGPing
-PQpingParams(const char *const *keywords,
-			 const char *const *values,
-			 int expand_dbname)
-{
-	PGconn	   *conn = PQconnectStartParams(keywords, values, expand_dbname);
-	PGPing		ret;
-
-	ret = internal_ping(conn);
-	PQfinish(conn);
-
-	return ret;
-}
-
-/*
- *		PQconnectdb
- *
- * establishes a connection to a postgres backend through the postmaster
- * using connection information in a string.
- *
- * The conninfo string is either a whitespace-separated list of
- *
- *	   option = value
- *
- * definitions or a URI (refer to the documentation for details.) Value
- * might be a single value containing no whitespaces or a single quoted
- * string. If a single quote should appear anywhere in the value, it must be
- * escaped with a backslash like \'
- *
- * Returns a PGconn* which is needed for all subsequent libpq calls, or NULL
- * if a memory allocation failed.
- * If the status field of the connection returned is CONNECTION_BAD,
- * then some fields may be null'ed out instead of having valid values.
- *
- * You should call PQfinish (if conn is not NULL) regardless of whether this
- * call succeeded.
- */
-PGconn *
-PQconnectdb(const char *conninfo)
-{
-	PGconn	   *conn = PQconnectStart(conninfo);
-
-	if (conn && conn->status != CONNECTION_BAD)
-		(void) connectDBComplete(conn);
-
-	return conn;
-}
-
-/*
- *		PQping
- *
- * check server status, accepting parameters identical to PQconnectdb
- */
-PGPing
-PQping(const char *conninfo)
-{
-	PGconn	   *conn = PQconnectStart(conninfo);
-	PGPing		ret;
-
-	ret = internal_ping(conn);
-	PQfinish(conn);
-
-	return ret;
-}
-
-/*
- *		PQconnectStartParams
- *
- * Begins the establishment of a connection to a postgres backend through the
- * postmaster using connection information in a struct.
- *
- * See comment for PQconnectdbParams for the definition of the string format.
- *
- * Returns a PGconn*.  If NULL is returned, a malloc error has occurred, and
- * you should not attempt to proceed with this connection.  If the status
- * field of the connection returned is CONNECTION_BAD, an error has
- * occurred. In this case you should call PQfinish on the result, (perhaps
- * inspecting the error message first).  Other fields of the structure may not
- * be valid if that occurs.  If the status field is not CONNECTION_BAD, then
- * this stage has succeeded - call PQconnectPoll, using select(2) to see when
- * this is necessary.
- *
- * See PQconnectPoll for more info.
- */
-PGconn *
-PQconnectStartParams(const char *const *keywords,
-					 const char *const *values,
-					 int expand_dbname)
-{
-	PGconn	   *conn;
-	PQconninfoOption *connOptions;
-
-	/*
-	 * Allocate memory for the conn structure.  Note that we also expect this
-	 * to initialize conn->errorMessage to empty.  All subsequent steps during
-	 * connection initialization will only append to that buffer.
-	 */
-	conn = makeEmptyPGconn();
-	if (conn == NULL)
-		return NULL;
-
-	/*
-	 * Parse the conninfo arrays
-	 */
-	connOptions = conninfo_array_parse(keywords, values,
-									   &conn->errorMessage,
-									   true, expand_dbname);
-	if (connOptions == NULL)
-	{
-		conn->status = CONNECTION_BAD;
-		/* errorMessage is already set */
-		return conn;
-	}
-
-	/*
-	 * Move option values into conn structure
-	 */
-	if (!fillPGconn(conn, connOptions))
-	{
-		PQconninfoFree(connOptions);
-		return conn;
-	}
-
-	/*
-	 * Free the option info - all is in conn now
-	 */
-	PQconninfoFree(connOptions);
-
-	/*
-	 * Compute derived options
-	 */
-	if (!connectOptions2(conn))
-		return conn;
-
-	/*
-	 * Connect to the database
-	 */
-	if (!connectDBStart(conn))
-	{
-		/* Just in case we failed to set it in connectDBStart */
-		conn->status = CONNECTION_BAD;
-	}
-
-	return conn;
-}
-
-/*
- *		PQconnectStart
- *
- * Begins the establishment of a connection to a postgres backend through the
- * postmaster using connection information in a string.
- *
- * See comment for PQconnectdb for the definition of the string format.
- *
- * Returns a PGconn*.  If NULL is returned, a malloc error has occurred, and
- * you should not attempt to proceed with this connection.  If the status
- * field of the connection returned is CONNECTION_BAD, an error has
- * occurred. In this case you should call PQfinish on the result, (perhaps
- * inspecting the error message first).  Other fields of the structure may not
- * be valid if that occurs.  If the status field is not CONNECTION_BAD, then
- * this stage has succeeded - call PQconnectPoll, using select(2) to see when
- * this is necessary.
- *
- * See PQconnectPoll for more info.
- */
-PGconn *
-PQconnectStart(const char *conninfo)
-{
-	PGconn	   *conn;
-
-	/*
-	 * Allocate memory for the conn structure.  Note that we also expect this
-	 * to initialize conn->errorMessage to empty.  All subsequent steps during
-	 * connection initialization will only append to that buffer.
-	 */
-	conn = makeEmptyPGconn();
-	if (conn == NULL)
-		return NULL;
-
-	/*
-	 * Parse the conninfo string
-	 */
-	if (!connectOptions1(conn, conninfo))
-		return conn;
-
-	/*
-	 * Compute derived options
-	 */
-	if (!connectOptions2(conn))
-		return conn;
-
-	/*
-	 * Connect to the database
-	 */
-	if (!connectDBStart(conn))
-	{
-		/* Just in case we failed to set it in connectDBStart */
-		conn->status = CONNECTION_BAD;
-	}
-
-	return conn;
-}
-
-/*
- * Move option values into conn structure
- *
- * Don't put anything cute here --- intelligence should be in
- * connectOptions2 ...
- *
- * Returns true on success. On failure, returns false and sets error message.
- */
-static bool
-fillPGconn(PGconn *conn, PQconninfoOption *connOptions)
-{
-	const internalPQconninfoOption *option;
-
-	for (option = PQconninfoOptions; option->keyword; option++)
-	{
-		if (option->connofs >= 0)
-		{
-			const char *tmp = conninfo_getval(connOptions, option->keyword);
-
-			if (tmp)
-			{
-				char	  **connmember = (char **) ((char *) conn + option->connofs);
-
-				free(*connmember);
-				*connmember = strdup(tmp);
-				if (*connmember == NULL)
-				{
-					libpq_append_conn_error(conn, "out of memory");
-					return false;
-				}
-			}
-		}
-	}
-
-	return true;
-}
-
-/*
- *		connectOptions1
- *
- * Internal subroutine to set up connection parameters given an already-
- * created PGconn and a conninfo string.  Derived settings should be
- * processed by calling connectOptions2 next.  (We split them because
- * PQsetdbLogin overrides defaults in between.)
- *
- * Returns true if OK, false if trouble (in which case errorMessage is set
- * and so is conn->status).
- */
-static bool
-connectOptions1(PGconn *conn, const char *conninfo)
-{
-	PQconninfoOption *connOptions;
-
-	/*
-	 * Parse the conninfo string
-	 */
-	connOptions = parse_connection_string(conninfo, &conn->errorMessage, true);
-	if (connOptions == NULL)
-	{
-		conn->status = CONNECTION_BAD;
-		/* errorMessage is already set */
-		return false;
-	}
-
-	/*
-	 * Move option values into conn structure
-	 */
-	if (!fillPGconn(conn, connOptions))
-	{
-		conn->status = CONNECTION_BAD;
-		PQconninfoFree(connOptions);
-		return false;
-	}
-
-	/*
-	 * Free the option info - all is in conn now
-	 */
-	PQconninfoFree(connOptions);
-
-	return true;
-}
-
-/*
- * Count the number of elements in a simple comma-separated list.
- */
-static int
-count_comma_separated_elems(const char *input)
-{
-	int			n;
-
-	n = 1;
-	for (; *input != '\0'; input++)
-	{
-		if (*input == ',')
-			n++;
-	}
-
-	return n;
-}
-
-/*
- * Parse a simple comma-separated list.
- *
- * On each call, returns a malloc'd copy of the next element, and sets *more
- * to indicate whether there are any more elements in the list after this,
- * and updates *startptr to point to the next element, if any.
- *
- * On out of memory, returns NULL.
- */
-static char *
-parse_comma_separated_list(char **startptr, bool *more)
-{
-	char	   *p;
-	char	   *s = *startptr;
-	char	   *e;
-	int			len;
-
-	/*
-	 * Search for the end of the current element; a comma or end-of-string
-	 * acts as a terminator.
-	 */
-	e = s;
-	while (*e != '\0' && *e != ',')
-		++e;
-	*more = (*e == ',');
-
-	len = e - s;
-	p = (char *) malloc(sizeof(char) * (len + 1));
-	if (p)
-	{
-		memcpy(p, s, len);
-		p[len] = '\0';
-	}
-	*startptr = e + 1;
-
-	return p;
-}
-
-/*
- * Initializes the prng_state field of the connection. We want something
- * unpredictable, so if possible, use high-quality random bits for the
- * seed. Otherwise, fall back to a seed based on the connection address,
- * timestamp and PID.
- */
-static void
-libpq_prng_init(PGconn *conn)
-{
-	uint64		rseed;
-	struct timeval tval = {0};
-
-	if (pg_prng_strong_seed(&conn->prng_state))
-		return;
-
-	gettimeofday(&tval, NULL);
-
-	rseed = ((uintptr_t) conn) ^
-		((uint64) getpid()) ^
-		((uint64) tval.tv_usec) ^
-		((uint64) tval.tv_sec);
-
-	pg_prng_seed(&conn->prng_state, rseed);
-}
-
-/*
- *		connectOptions2
- *
- * Compute derived connection options after absorbing all user-supplied info.
- *
- * Returns true if OK, false if trouble (in which case errorMessage is set
- * and so is conn->status).
- */
-static bool
-connectOptions2(PGconn *conn)
-{
-	int			i;
-
-	/*
-	 * Allocate memory for details about each host to which we might possibly
-	 * try to connect.  For that, count the number of elements in the hostaddr
-	 * or host options.  If neither is given, assume one host.
-	 */
-	conn->whichhost = 0;
-	if (conn->pghostaddr && conn->pghostaddr[0] != '\0')
-		conn->nconnhost = count_comma_separated_elems(conn->pghostaddr);
-	else if (conn->pghost && conn->pghost[0] != '\0')
-		conn->nconnhost = count_comma_separated_elems(conn->pghost);
-	else
-		conn->nconnhost = 1;
-	conn->connhost = (pg_conn_host *)
-		calloc(conn->nconnhost, sizeof(pg_conn_host));
-	if (conn->connhost == NULL)
-		goto oom_error;
-
-	/*
-	 * We now have one pg_conn_host structure per possible host.  Fill in the
-	 * host and hostaddr fields for each, by splitting the parameter strings.
-	 */
-	if (conn->pghostaddr != NULL && conn->pghostaddr[0] != '\0')
-	{
-		char	   *s = conn->pghostaddr;
-		bool		more = true;
-
-		for (i = 0; i < conn->nconnhost && more; i++)
-		{
-			conn->connhost[i].hostaddr = parse_comma_separated_list(&s, &more);
-			if (conn->connhost[i].hostaddr == NULL)
-				goto oom_error;
-		}
-
-		/*
-		 * If hostaddr was given, the array was allocated according to the
-		 * number of elements in the hostaddr list, so it really should be the
-		 * right size.
-		 */
-		Assert(!more);
-		Assert(i == conn->nconnhost);
-	}
-
-	if (conn->pghost != NULL && conn->pghost[0] != '\0')
-	{
-		char	   *s = conn->pghost;
-		bool		more = true;
-
-		for (i = 0; i < conn->nconnhost && more; i++)
-		{
-			conn->connhost[i].host = parse_comma_separated_list(&s, &more);
-			if (conn->connhost[i].host == NULL)
-				goto oom_error;
-		}
-
-		/* Check for wrong number of host items. */
-		if (more || i != conn->nconnhost)
-		{
-			conn->status = CONNECTION_BAD;
-			libpq_append_conn_error(conn, "could not match %d host names to %d hostaddr values",
-									count_comma_separated_elems(conn->pghost), conn->nconnhost);
-			return false;
-		}
-	}
-
-	/*
-	 * Now, for each host slot, identify the type of address spec, and fill in
-	 * the default address if nothing was given.
-	 */
-	for (i = 0; i < conn->nconnhost; i++)
-	{
-		pg_conn_host *ch = &conn->connhost[i];
-
-		if (ch->hostaddr != NULL && ch->hostaddr[0] != '\0')
-			ch->type = CHT_HOST_ADDRESS;
-		else if (ch->host != NULL && ch->host[0] != '\0')
-		{
-			ch->type = CHT_HOST_NAME;
-			if (is_unixsock_path(ch->host))
-				ch->type = CHT_UNIX_SOCKET;
-		}
-		else
-		{
-			free(ch->host);
-
-			/*
-			 * This bit selects the default host location.  If you change
-			 * this, see also pg_regress.
-			 */
-			if (DEFAULT_PGSOCKET_DIR[0])
-			{
-				ch->host = strdup(DEFAULT_PGSOCKET_DIR);
-				ch->type = CHT_UNIX_SOCKET;
-			}
-			else
-			{
-				ch->host = strdup(DefaultHost);
-				ch->type = CHT_HOST_NAME;
-			}
-			if (ch->host == NULL)
-				goto oom_error;
-		}
-	}
-
-	/*
-	 * Next, work out the port number corresponding to each host name.
-	 *
-	 * Note: unlike the above for host names, this could leave the port fields
-	 * as null or empty strings.  We will substitute DEF_PGPORT whenever we
-	 * read such a port field.
-	 */
-	if (conn->pgport != NULL && conn->pgport[0] != '\0')
-	{
-		char	   *s = conn->pgport;
-		bool		more = true;
-
-		for (i = 0; i < conn->nconnhost && more; i++)
-		{
-			conn->connhost[i].port = parse_comma_separated_list(&s, &more);
-			if (conn->connhost[i].port == NULL)
-				goto oom_error;
-		}
-
-		/*
-		 * If exactly one port was given, use it for every host.  Otherwise,
-		 * there must be exactly as many ports as there were hosts.
-		 */
-		if (i == 1 && !more)
-		{
-			for (i = 1; i < conn->nconnhost; i++)
-			{
-				conn->connhost[i].port = strdup(conn->connhost[0].port);
-				if (conn->connhost[i].port == NULL)
-					goto oom_error;
-			}
-		}
-		else if (more || i != conn->nconnhost)
-		{
-			conn->status = CONNECTION_BAD;
-			libpq_append_conn_error(conn, "could not match %d port numbers to %d hosts",
-									count_comma_separated_elems(conn->pgport), conn->nconnhost);
-			return false;
-		}
-	}
-
-	/*
-	 * If user name was not given, fetch it.  (Most likely, the fetch will
-	 * fail, since the only way we get here is if pg_fe_getauthname() failed
-	 * during conninfo_add_defaults().  But now we want an error message.)
-	 */
-	if (conn->pguser == NULL || conn->pguser[0] == '\0')
-	{
-		free(conn->pguser);
-		conn->pguser = pg_fe_getauthname(&conn->errorMessage);
-		if (!conn->pguser)
-		{
-			conn->status = CONNECTION_BAD;
-			return false;
-		}
-	}
-
-	/*
-	 * If database name was not given, default it to equal user name
-	 */
-	if (conn->dbName == NULL || conn->dbName[0] == '\0')
-	{
-		free(conn->dbName);
-		conn->dbName = strdup(conn->pguser);
-		if (!conn->dbName)
-			goto oom_error;
-	}
-
-	/*
-	 * If password was not given, try to look it up in password file.  Note
-	 * that the result might be different for each host/port pair.
-	 */
-	if (conn->pgpass == NULL || conn->pgpass[0] == '\0')
-	{
-		/* If password file wasn't specified, use ~/PGPASSFILE */
-		if (conn->pgpassfile == NULL || conn->pgpassfile[0] == '\0')
-		{
-			char		homedir[MAXPGPATH];
-
-			if (pqGetHomeDirectory(homedir, sizeof(homedir)))
-			{
-				free(conn->pgpassfile);
-				conn->pgpassfile = malloc(MAXPGPATH);
-				if (!conn->pgpassfile)
-					goto oom_error;
-				snprintf(conn->pgpassfile, MAXPGPATH, "%s/%s",
-						 homedir, PGPASSFILE);
-			}
-		}
-
-		if (conn->pgpassfile != NULL && conn->pgpassfile[0] != '\0')
-		{
-			for (i = 0; i < conn->nconnhost; i++)
-			{
-				/*
-				 * Try to get a password for this host from file.  We use host
-				 * for the hostname search key if given, else hostaddr (at
-				 * least one of them is guaranteed nonempty by now).
-				 */
-				const char *pwhost = conn->connhost[i].host;
-
-				if (pwhost == NULL || pwhost[0] == '\0')
-					pwhost = conn->connhost[i].hostaddr;
-
-				conn->connhost[i].password =
-					passwordFromFile(pwhost,
-									 conn->connhost[i].port,
-									 conn->dbName,
-									 conn->pguser,
-									 conn->pgpassfile);
-			}
-		}
-	}
-
-	/*
-	 * parse and validate require_auth option
-	 */
-	if (conn->require_auth && conn->require_auth[0])
-	{
-		char	   *s = conn->require_auth;
-		bool		first,
-					more;
-		bool		negated = false;
-
-		/*
-		 * By default, start from an empty set of allowed options and add to
-		 * it.
-		 */
-		conn->auth_required = true;
-		conn->allowed_auth_methods = 0;
-
-		for (first = true, more = true; more; first = false)
-		{
-			char	   *method,
-					   *part;
-			uint32		bits;
-
-			part = parse_comma_separated_list(&s, &more);
-			if (part == NULL)
-				goto oom_error;
-
-			/*
-			 * Check for negation, e.g. '!password'. If one element is
-			 * negated, they all have to be.
-			 */
-			method = part;
-			if (*method == '!')
-			{
-				if (first)
-				{
-					/*
-					 * Switch to a permissive set of allowed options, and
-					 * subtract from it.
-					 */
-					conn->auth_required = false;
-					conn->allowed_auth_methods = -1;
-				}
-				else if (!negated)
-				{
-					conn->status = CONNECTION_BAD;
-					libpq_append_conn_error(conn, "negative require_auth method \"%s\" cannot be mixed with non-negative methods",
-											method);
-
-					free(part);
-					return false;
-				}
-
-				negated = true;
-				method++;
-			}
-			else if (negated)
-			{
-				conn->status = CONNECTION_BAD;
-				libpq_append_conn_error(conn, "require_auth method \"%s\" cannot be mixed with negative methods",
-										method);
-
-				free(part);
-				return false;
-			}
-
-			if (strcmp(method, "password") == 0)
-			{
-				bits = (1 << AUTH_REQ_PASSWORD);
-			}
-			else if (strcmp(method, "md5") == 0)
-			{
-				bits = (1 << AUTH_REQ_MD5);
-			}
-			else if (strcmp(method, "gss") == 0)
-			{
-				bits = (1 << AUTH_REQ_GSS);
-				bits |= (1 << AUTH_REQ_GSS_CONT);
-			}
-			else if (strcmp(method, "sspi") == 0)
-			{
-				bits = (1 << AUTH_REQ_SSPI);
-				bits |= (1 << AUTH_REQ_GSS_CONT);
-			}
-			else if (strcmp(method, "scram-sha-256") == 0)
-			{
-				/* This currently assumes that SCRAM is the only SASL method. */
-				bits = (1 << AUTH_REQ_SASL);
-				bits |= (1 << AUTH_REQ_SASL_CONT);
-				bits |= (1 << AUTH_REQ_SASL_FIN);
-			}
-			else if (strcmp(method, "none") == 0)
-			{
-				/*
-				 * Special case: let the user explicitly allow (or disallow)
-				 * connections where the server does not send an explicit
-				 * authentication challenge, such as "trust" and "cert" auth.
-				 */
-				if (negated)	/* "!none" */
-				{
-					if (conn->auth_required)
-						goto duplicate;
-
-					conn->auth_required = true;
-				}
-				else			/* "none" */
-				{
-					if (!conn->auth_required)
-						goto duplicate;
-
-					conn->auth_required = false;
-				}
-
-				free(part);
-				continue;		/* avoid the bitmask manipulation below */
-			}
-			else
-			{
-				conn->status = CONNECTION_BAD;
-				libpq_append_conn_error(conn, "invalid %s value: \"%s\"",
-										"require_auth", method);
-
-				free(part);
-				return false;
-			}
-
-			/* Update the bitmask. */
-			if (negated)
-			{
-				if ((conn->allowed_auth_methods & bits) == 0)
-					goto duplicate;
-
-				conn->allowed_auth_methods &= ~bits;
-			}
-			else
-			{
-				if ((conn->allowed_auth_methods & bits) == bits)
-					goto duplicate;
-
-				conn->allowed_auth_methods |= bits;
-			}
-
-			free(part);
-			continue;
-
-	duplicate:
-
-			/*
-			 * A duplicated method probably indicates a typo in a setting
-			 * where typos are extremely risky.
-			 */
-			conn->status = CONNECTION_BAD;
-			libpq_append_conn_error(conn, "require_auth method \"%s\" is specified more than once",
-									part);
-
-			free(part);
-			return false;
-		}
-	}
-
-	/*
-	 * validate channel_binding option
-	 */
-	if (conn->channel_binding)
-	{
-		if (strcmp(conn->channel_binding, "disable") != 0
-			&& strcmp(conn->channel_binding, "prefer") != 0
-			&& strcmp(conn->channel_binding, "require") != 0)
-		{
-			conn->status = CONNECTION_BAD;
-			libpq_append_conn_error(conn, "invalid %s value: \"%s\"",
-									"channel_binding", conn->channel_binding);
-			return false;
-		}
-	}
-	else
-	{
-		conn->channel_binding = strdup(DefaultChannelBinding);
-		if (!conn->channel_binding)
-			goto oom_error;
-	}
-
-#ifndef USE_SSL
-
-	/*
-	 * sslrootcert=system is not supported. Since setting this changes the
-	 * default sslmode, check this _before_ we validate sslmode, to avoid
-	 * confusing the user with errors for an option they may not have set.
-	 */
-	if (conn->sslrootcert
-		&& strcmp(conn->sslrootcert, "system") == 0)
-	{
-		conn->status = CONNECTION_BAD;
-		libpq_append_conn_error(conn, "%s value \"%s\" invalid when SSL support is not compiled in",
-								"sslrootcert", conn->sslrootcert);
-		return false;
-	}
-#endif
-
-	/*
-	 * validate sslmode option
-	 */
-	if (conn->sslmode)
-	{
-		if (strcmp(conn->sslmode, "disable") != 0
-			&& strcmp(conn->sslmode, "allow") != 0
-			&& strcmp(conn->sslmode, "prefer") != 0
-			&& strcmp(conn->sslmode, "require") != 0
-			&& strcmp(conn->sslmode, "verify-ca") != 0
-			&& strcmp(conn->sslmode, "verify-full") != 0)
-		{
-			conn->status = CONNECTION_BAD;
-			libpq_append_conn_error(conn, "invalid %s value: \"%s\"",
-									"sslmode", conn->sslmode);
-			return false;
-		}
-
-#ifndef USE_SSL
-		switch (conn->sslmode[0])
-		{
-			case 'a':			/* "allow" */
-			case 'p':			/* "prefer" */
-
-				/*
-				 * warn user that an SSL connection will never be negotiated
-				 * since SSL was not compiled in?
-				 */
-				break;
-
-			case 'r':			/* "require" */
-			case 'v':			/* "verify-ca" or "verify-full" */
-				conn->status = CONNECTION_BAD;
-				libpq_append_conn_error(conn, "%s value \"%s\" invalid when SSL support is not compiled in",
-										"sslmode", conn->sslmode);
-				return false;
-		}
-#endif
-	}
-	else
-	{
-		conn->sslmode = strdup(DefaultSSLMode);
-		if (!conn->sslmode)
-			goto oom_error;
-	}
-
-#ifdef USE_SSL
-
-	/*
-	 * If sslrootcert=system, make sure our chosen sslmode is compatible.
-	 */
-	if (conn->sslrootcert
-		&& strcmp(conn->sslrootcert, "system") == 0
-		&& strcmp(conn->sslmode, "verify-full") != 0)
-	{
-		conn->status = CONNECTION_BAD;
-		libpq_append_conn_error(conn, "weak sslmode \"%s\" may not be used with sslrootcert=system (use \"verify-full\")",
-								conn->sslmode);
-		return false;
-	}
-#endif
-
-	/*
-	 * Validate TLS protocol versions for ssl_min_protocol_version and
-	 * ssl_max_protocol_version.
-	 */
-	if (!sslVerifyProtocolVersion(conn->ssl_min_protocol_version))
-	{
-		conn->status = CONNECTION_BAD;
-		libpq_append_conn_error(conn, "invalid %s value: \"%s\"",
-								"ssl_min_protocol_version",
-								conn->ssl_min_protocol_version);
-		return false;
-	}
-	if (!sslVerifyProtocolVersion(conn->ssl_max_protocol_version))
-	{
-		conn->status = CONNECTION_BAD;
-		libpq_append_conn_error(conn, "invalid %s value: \"%s\"",
-								"ssl_max_protocol_version",
-								conn->ssl_max_protocol_version);
-		return false;
-	}
-
-	/*
-	 * Check if the range of SSL protocols defined is correct.  This is done
-	 * at this early step because this is independent of the SSL
-	 * implementation used, and this avoids unnecessary cycles with an
-	 * already-built SSL context when the connection is being established, as
-	 * it would be doomed anyway.
-	 */
-	if (!sslVerifyProtocolRange(conn->ssl_min_protocol_version,
-								conn->ssl_max_protocol_version))
-	{
-		conn->status = CONNECTION_BAD;
-		libpq_append_conn_error(conn, "invalid SSL protocol version range");
-		return false;
-	}
-
-	/*
-	 * validate sslcertmode option
-	 */
-	if (conn->sslcertmode)
-	{
-		if (strcmp(conn->sslcertmode, "disable") != 0 &&
-			strcmp(conn->sslcertmode, "allow") != 0 &&
-			strcmp(conn->sslcertmode, "require") != 0)
-		{
-			conn->status = CONNECTION_BAD;
-			libpq_append_conn_error(conn, "invalid %s value: \"%s\"",
-									"sslcertmode", conn->sslcertmode);
-			return false;
-		}
-#ifndef USE_SSL
-		if (strcmp(conn->sslcertmode, "require") == 0)
-		{
-			conn->status = CONNECTION_BAD;
-			libpq_append_conn_error(conn, "%s value \"%s\" invalid when SSL support is not compiled in",
-									"sslcertmode", conn->sslcertmode);
-			return false;
-		}
-#endif
-#ifndef HAVE_SSL_CTX_SET_CERT_CB
-
-		/*
-		 * Without a certificate callback, the current implementation can't
-		 * figure out if a certificate was actually requested, so "require" is
-		 * useless.
-		 */
-		if (strcmp(conn->sslcertmode, "require") == 0)
-		{
-			conn->status = CONNECTION_BAD;
-			libpq_append_conn_error(conn, "%s value \"%s\" is not supported (check OpenSSL version)",
-									"sslcertmode", conn->sslcertmode);
-			return false;
-		}
-#endif
-	}
-	else
-	{
-		conn->sslcertmode = strdup(DefaultSSLCertMode);
-		if (!conn->sslcertmode)
-			goto oom_error;
-	}
-
-	/*
-	 * validate gssencmode option
-	 */
-	if (conn->gssencmode)
-	{
-		if (strcmp(conn->gssencmode, "disable") != 0 &&
-			strcmp(conn->gssencmode, "prefer") != 0 &&
-			strcmp(conn->gssencmode, "require") != 0)
-		{
-			conn->status = CONNECTION_BAD;
-			libpq_append_conn_error(conn, "invalid %s value: \"%s\"", "gssencmode", conn->gssencmode);
-			return false;
-		}
-#ifndef ENABLE_GSS
-		if (strcmp(conn->gssencmode, "require") == 0)
-		{
-			conn->status = CONNECTION_BAD;
-			libpq_append_conn_error(conn, "gssencmode value \"%s\" invalid when GSSAPI support is not compiled in",
-									conn->gssencmode);
-			return false;
-		}
-#endif
-	}
-	else
-	{
-		conn->gssencmode = strdup(DefaultGSSMode);
-		if (!conn->gssencmode)
-			goto oom_error;
-	}
-
-	/*
-	 * validate target_session_attrs option, and set target_server_type
-	 */
-	if (conn->target_session_attrs)
-	{
-		if (strcmp(conn->target_session_attrs, "any") == 0)
-			conn->target_server_type = SERVER_TYPE_ANY;
-		else if (strcmp(conn->target_session_attrs, "read-write") == 0)
-			conn->target_server_type = SERVER_TYPE_READ_WRITE;
-		else if (strcmp(conn->target_session_attrs, "read-only") == 0)
-			conn->target_server_type = SERVER_TYPE_READ_ONLY;
-		else if (strcmp(conn->target_session_attrs, "primary") == 0)
-			conn->target_server_type = SERVER_TYPE_PRIMARY;
-		else if (strcmp(conn->target_session_attrs, "standby") == 0)
-			conn->target_server_type = SERVER_TYPE_STANDBY;
-		else if (strcmp(conn->target_session_attrs, "prefer-standby") == 0)
-			conn->target_server_type = SERVER_TYPE_PREFER_STANDBY;
-		else
-		{
-			conn->status = CONNECTION_BAD;
-			libpq_append_conn_error(conn, "invalid %s value: \"%s\"",
-									"target_session_attrs",
-									conn->target_session_attrs);
-			return false;
-		}
-	}
-	else
-		conn->target_server_type = SERVER_TYPE_ANY;
-
-	/*
-	 * validate load_balance_hosts option, and set load_balance_type
-	 */
-	if (conn->load_balance_hosts)
-	{
-		if (strcmp(conn->load_balance_hosts, "disable") == 0)
-			conn->load_balance_type = LOAD_BALANCE_DISABLE;
-		else if (strcmp(conn->load_balance_hosts, "random") == 0)
-			conn->load_balance_type = LOAD_BALANCE_RANDOM;
-		else
-		{
-			conn->status = CONNECTION_BAD;
-			libpq_append_conn_error(conn, "invalid %s value: \"%s\"",
-									"load_balance_hosts",
-									conn->load_balance_hosts);
-			return false;
-		}
-	}
-	else
-		conn->load_balance_type = LOAD_BALANCE_DISABLE;
-
-	if (conn->load_balance_type == LOAD_BALANCE_RANDOM)
-	{
-		libpq_prng_init(conn);
-
-		/*
-		 * This is the "inside-out" variant of the Fisher-Yates shuffle
-		 * algorithm. Notionally, we append each new value to the array and
-		 * then swap it with a randomly-chosen array element (possibly
-		 * including itself, else we fail to generate permutations with the
-		 * last integer last).  The swap step can be optimized by combining it
-		 * with the insertion.
-		 */
-		for (i = 1; i < conn->nconnhost; i++)
-		{
-			int			j = pg_prng_uint64_range(&conn->prng_state, 0, i);
-			pg_conn_host temp = conn->connhost[j];
-
-			conn->connhost[j] = conn->connhost[i];
-			conn->connhost[i] = temp;
-		}
-	}
-
-	/*
-	 * Resolve special "auto" client_encoding from the locale
-	 */
-	if (conn->client_encoding_initial &&
-		strcmp(conn->client_encoding_initial, "auto") == 0)
-	{
-		free(conn->client_encoding_initial);
-		conn->client_encoding_initial = strdup(pg_encoding_to_char(pg_get_encoding_from_locale(NULL, true)));
-		if (!conn->client_encoding_initial)
-			goto oom_error;
-	}
-
-	/*
-	 * Only if we get this far is it appropriate to try to connect. (We need a
-	 * state flag, rather than just the boolean result of this function, in
-	 * case someone tries to PQreset() the PGconn.)
-	 */
-	conn->options_valid = true;
-
-	return true;
-
-oom_error:
-	conn->status = CONNECTION_BAD;
-	libpq_append_conn_error(conn, "out of memory");
-	return false;
-}
-
-/*
- *		PQconndefaults
- *
- * Construct a default connection options array, which identifies all the
- * available options and shows any default values that are available from the
- * environment etc.  On error (eg out of memory), NULL is returned.
- *
- * Using this function, an application may determine all possible options
- * and their current default values.
- *
- * NOTE: as of PostgreSQL 7.0, the returned array is dynamically allocated
- * and should be freed when no longer needed via PQconninfoFree().  (In prior
- * versions, the returned array was static, but that's not thread-safe.)
- * Pre-7.0 applications that use this function will see a small memory leak
- * until they are updated to call PQconninfoFree.
- */
-PQconninfoOption *
-PQconndefaults(void)
-{
-	PQExpBufferData errorBuf;
-	PQconninfoOption *connOptions;
-
-	/* We don't actually report any errors here, but callees want a buffer */
-	initPQExpBuffer(&errorBuf);
-	if (PQExpBufferDataBroken(errorBuf))
-		return NULL;			/* out of memory already :-( */
-
-	connOptions = conninfo_init(&errorBuf);
-	if (connOptions != NULL)
-	{
-		/* pass NULL errorBuf to ignore errors */
-		if (!conninfo_add_defaults(connOptions, NULL))
-		{
-			PQconninfoFree(connOptions);
-			connOptions = NULL;
-		}
-	}
-
-	termPQExpBuffer(&errorBuf);
-	return connOptions;
-}
-
-/* ----------------
- *		PQsetdbLogin
- *
- * establishes a connection to a postgres backend through the postmaster
- * at the specified host and port.
- *
- * returns a PGconn* which is needed for all subsequent libpq calls
- *
- * if the status field of the connection returned is CONNECTION_BAD,
- * then only the errorMessage is likely to be useful.
- * ----------------
- */
-PGconn *
-PQsetdbLogin(const char *pghost, const char *pgport, const char *pgoptions,
-			 const char *pgtty, const char *dbName, const char *login,
-			 const char *pwd)
-{
-	PGconn	   *conn;
-
-	/*
-	 * Allocate memory for the conn structure.  Note that we also expect this
-	 * to initialize conn->errorMessage to empty.  All subsequent steps during
-	 * connection initialization will only append to that buffer.
-	 */
-	conn = makeEmptyPGconn();
-	if (conn == NULL)
-		return NULL;
-
-	/*
-	 * If the dbName parameter contains what looks like a connection string,
-	 * parse it into conn struct using connectOptions1.
-	 */
-	if (dbName && recognized_connection_string(dbName))
-	{
-		if (!connectOptions1(conn, dbName))
-			return conn;
-	}
-	else
-	{
-		/*
-		 * Old-style path: first, parse an empty conninfo string in order to
-		 * set up the same defaults that PQconnectdb() would use.
-		 */
-		if (!connectOptions1(conn, ""))
-			return conn;
-
-		/* Insert dbName parameter value into struct */
-		if (dbName && dbName[0] != '\0')
-		{
-			free(conn->dbName);
-			conn->dbName = strdup(dbName);
-			if (!conn->dbName)
-				goto oom_error;
-		}
-	}
-
-	/*
-	 * Insert remaining parameters into struct, overriding defaults (as well
-	 * as any conflicting data from dbName taken as a conninfo).
-	 */
-	if (pghost && pghost[0] != '\0')
-	{
-		free(conn->pghost);
-		conn->pghost = strdup(pghost);
-		if (!conn->pghost)
-			goto oom_error;
-	}
-
-	if (pgport && pgport[0] != '\0')
-	{
-		free(conn->pgport);
-		conn->pgport = strdup(pgport);
-		if (!conn->pgport)
-			goto oom_error;
-	}
-
-	if (pgoptions && pgoptions[0] != '\0')
-	{
-		free(conn->pgoptions);
-		conn->pgoptions = strdup(pgoptions);
-		if (!conn->pgoptions)
-			goto oom_error;
-	}
-
-	if (login && login[0] != '\0')
-	{
-		free(conn->pguser);
-		conn->pguser = strdup(login);
-		if (!conn->pguser)
-			goto oom_error;
-	}
-
-	if (pwd && pwd[0] != '\0')
-	{
-		free(conn->pgpass);
-		conn->pgpass = strdup(pwd);
-		if (!conn->pgpass)
-			goto oom_error;
-	}
-
-	/*
-	 * Compute derived options
-	 */
-	if (!connectOptions2(conn))
-		return conn;
-
-	/*
-	 * Connect to the database
-	 */
-	if (connectDBStart(conn))
-		(void) connectDBComplete(conn);
-
-	return conn;
-
-oom_error:
-	conn->status = CONNECTION_BAD;
-	libpq_append_conn_error(conn, "out of memory");
-	return conn;
-}
-
-
-/* ----------
- * connectNoDelay -
- * Sets the TCP_NODELAY socket option.
- * Returns 1 if successful, 0 if not.
- * ----------
- */
-static int
-connectNoDelay(PGconn *conn)
-{
-#ifdef	TCP_NODELAY
-	int			on = 1;
-
-	if (setsockopt(conn->sock, IPPROTO_TCP, TCP_NODELAY,
-				   (char *) &on,
-				   sizeof(on)) < 0)
-	{
-		char		sebuf[PG_STRERROR_R_BUFLEN];
-
-		libpq_append_conn_error(conn, "could not set socket to TCP no delay mode: %s",
-								SOCK_STRERROR(SOCK_ERRNO, sebuf, sizeof(sebuf)));
-		return 0;
-	}
-#endif
-
-	return 1;
-}
-
-/* ----------
- * Write currently connected IP address into host_addr (of len host_addr_len).
- * If unable to, set it to the empty string.
- * ----------
- */
-static void
-getHostaddr(PGconn *conn, char *host_addr, int host_addr_len)
-{
-	struct sockaddr_storage *addr = &conn->raddr.addr;
-
-	if (addr->ss_family == AF_INET)
-	{
-		if (pg_inet_net_ntop(AF_INET,
-							 &((struct sockaddr_in *) addr)->sin_addr.s_addr,
-							 32,
-							 host_addr, host_addr_len) == NULL)
-			host_addr[0] = '\0';
-	}
-	else if (addr->ss_family == AF_INET6)
-	{
-		if (pg_inet_net_ntop(AF_INET6,
-							 &((struct sockaddr_in6 *) addr)->sin6_addr.s6_addr,
-							 128,
-							 host_addr, host_addr_len) == NULL)
-			host_addr[0] = '\0';
-	}
-	else
-		host_addr[0] = '\0';
-}
-
-/*
- * emitHostIdentityInfo -
- * Speculatively append "connection to server so-and-so failed: " to
- * conn->errorMessage once we've identified the current connection target
- * address.  This ensures that any subsequent error message will be properly
- * attributed to the server we couldn't connect to.  conn->raddr must be
- * valid, and the result of getHostaddr() must be supplied.
- */
-static void
-emitHostIdentityInfo(PGconn *conn, const char *host_addr)
-{
-	if (conn->raddr.addr.ss_family == AF_UNIX)
-	{
-		char		service[NI_MAXHOST];
-
-		pg_getnameinfo_all(&conn->raddr.addr, conn->raddr.salen,
-						   NULL, 0,
-						   service, sizeof(service),
-						   NI_NUMERICSERV);
-		appendPQExpBuffer(&conn->errorMessage,
-						  libpq_gettext("connection to server on socket \"%s\" failed: "),
-						  service);
-	}
-	else
-	{
-		const char *displayed_host;
-		const char *displayed_port;
-
-		/* To which host and port were we actually connecting? */
-		if (conn->connhost[conn->whichhost].type == CHT_HOST_ADDRESS)
-			displayed_host = conn->connhost[conn->whichhost].hostaddr;
-		else
-			displayed_host = conn->connhost[conn->whichhost].host;
-		displayed_port = conn->connhost[conn->whichhost].port;
-		if (displayed_port == NULL || displayed_port[0] == '\0')
-			displayed_port = DEF_PGPORT_STR;
-
-		/*
-		 * If the user did not supply an IP address using 'hostaddr', and
-		 * 'host' was missing or does not match our lookup, display the
-		 * looked-up IP address.
-		 */
-		if (conn->connhost[conn->whichhost].type != CHT_HOST_ADDRESS &&
-			host_addr[0] &&
-			strcmp(displayed_host, host_addr) != 0)
-			appendPQExpBuffer(&conn->errorMessage,
-							  libpq_gettext("connection to server at \"%s\" (%s), port %s failed: "),
-							  displayed_host, host_addr,
-							  displayed_port);
-		else
-			appendPQExpBuffer(&conn->errorMessage,
-							  libpq_gettext("connection to server at \"%s\", port %s failed: "),
-							  displayed_host,
-							  displayed_port);
-	}
-}
-
-/* ----------
- * connectFailureMessage -
- * create a friendly error message on connection failure,
- * using the given errno value.  Use this for error cases that
- * imply that there's no server there.
- * ----------
- */
-static void
-connectFailureMessage(PGconn *conn, int errorno)
-{
-	char		sebuf[PG_STRERROR_R_BUFLEN];
-
-	appendPQExpBuffer(&conn->errorMessage,
-					  "%s\n",
-					  SOCK_STRERROR(errorno, sebuf, sizeof(sebuf)));
-
-	if (conn->raddr.addr.ss_family == AF_UNIX)
-		libpq_append_conn_error(conn, "\tIs the server running locally and accepting connections on that socket?");
-	else
-		libpq_append_conn_error(conn, "\tIs the server running on that host and accepting TCP/IP connections?");
-}
-
-/*
- * Should we use keepalives?  Returns 1 if yes, 0 if no, and -1 if
- * conn->keepalives is set to a value which is not parseable as an
- * integer.
- */
-static int
-useKeepalives(PGconn *conn)
-{
-	char	   *ep;
-	int			val;
-
-	if (conn->keepalives == NULL)
-		return 1;
-	val = strtol(conn->keepalives, &ep, 10);
-	if (*ep)
-		return -1;
-	return val != 0 ? 1 : 0;
-}
-
-/*
- * Parse and try to interpret "value" as an integer value, and if successful,
- * store it in *result, complaining if there is any trailing garbage or an
- * overflow.  This allows any number of leading and trailing whitespaces.
- */
-static bool
-parse_int_param(const char *value, int *result, PGconn *conn,
-				const char *context)
-{
-	char	   *end;
-	long		numval;
-
-	Assert(value != NULL);
-
-	*result = 0;
-
-	/* strtol(3) skips leading whitespaces */
-	errno = 0;
-	numval = strtol(value, &end, 10);
-
-	/*
-	 * If no progress was done during the parsing or an error happened, fail.
-	 * This tests properly for overflows of the result.
-	 */
-	if (value == end || errno != 0 || numval != (int) numval)
-		goto error;
-
-	/*
-	 * Skip any trailing whitespace; if anything but whitespace remains before
-	 * the terminating character, fail
-	 */
-	while (*end != '\0' && isspace((unsigned char) *end))
-		end++;
-
-	if (*end != '\0')
-		goto error;
-
-	*result = numval;
-	return true;
-
-error:
-	libpq_append_conn_error(conn, "invalid integer value \"%s\" for connection option \"%s\"",
-							value, context);
-	return false;
-}
-
-#ifndef WIN32
-/*
- * Set the keepalive idle timer.
- */
-static int
-setKeepalivesIdle(PGconn *conn)
-{
-	int			idle;
-
-	if (conn->keepalives_idle == NULL)
-		return 1;
-
-	if (!parse_int_param(conn->keepalives_idle, &idle, conn,
-						 "keepalives_idle"))
-		return 0;
-	if (idle < 0)
-		idle = 0;
-
-#ifdef PG_TCP_KEEPALIVE_IDLE
-	if (setsockopt(conn->sock, IPPROTO_TCP, PG_TCP_KEEPALIVE_IDLE,
-				   (char *) &idle, sizeof(idle)) < 0)
-	{
-		char		sebuf[PG_STRERROR_R_BUFLEN];
-
-		libpq_append_conn_error(conn, "%s(%s) failed: %s",
-								"setsockopt",
-								PG_TCP_KEEPALIVE_IDLE_STR,
-								SOCK_STRERROR(SOCK_ERRNO, sebuf, sizeof(sebuf)));
-		return 0;
-	}
-#endif
-
-	return 1;
-}
-
-/*
- * Set the keepalive interval.
- */
-static int
-setKeepalivesInterval(PGconn *conn)
-{
-	int			interval;
-
-	if (conn->keepalives_interval == NULL)
-		return 1;
-
-	if (!parse_int_param(conn->keepalives_interval, &interval, conn,
-						 "keepalives_interval"))
-		return 0;
-	if (interval < 0)
-		interval = 0;
-
-#ifdef TCP_KEEPINTVL
-	if (setsockopt(conn->sock, IPPROTO_TCP, TCP_KEEPINTVL,
-				   (char *) &interval, sizeof(interval)) < 0)
-	{
-		char		sebuf[PG_STRERROR_R_BUFLEN];
-
-		libpq_append_conn_error(conn, "%s(%s) failed: %s",
-								"setsockopt",
-								"TCP_KEEPINTVL",
-								SOCK_STRERROR(SOCK_ERRNO, sebuf, sizeof(sebuf)));
-		return 0;
-	}
-#endif
-
-	return 1;
-}
-
-/*
- * Set the count of lost keepalive packets that will trigger a connection
- * break.
- */
-static int
-setKeepalivesCount(PGconn *conn)
-{
-	int			count;
-
-	if (conn->keepalives_count == NULL)
-		return 1;
-
-	if (!parse_int_param(conn->keepalives_count, &count, conn,
-						 "keepalives_count"))
-		return 0;
-	if (count < 0)
-		count = 0;
-
-#ifdef TCP_KEEPCNT
-	if (setsockopt(conn->sock, IPPROTO_TCP, TCP_KEEPCNT,
-				   (char *) &count, sizeof(count)) < 0)
-	{
-		char		sebuf[PG_STRERROR_R_BUFLEN];
-
-		libpq_append_conn_error(conn, "%s(%s) failed: %s",
-								"setsockopt",
-								"TCP_KEEPCNT",
-								SOCK_STRERROR(SOCK_ERRNO, sebuf, sizeof(sebuf)));
-		return 0;
-	}
-#endif
-
-	return 1;
-}
-#else							/* WIN32 */
-#ifdef SIO_KEEPALIVE_VALS
-/*
- * Enable keepalives and set the keepalive values on Win32,
- * where they are always set in one batch.
- *
- * CAUTION: This needs to be signal safe, since it's used by PQcancel.
- */
-static int
-setKeepalivesWin32(pgsocket sock, int idle, int interval)
-{
-	struct tcp_keepalive ka;
-	DWORD		retsize;
-
-	if (idle <= 0)
-		idle = 2 * 60 * 60;		/* 2 hours = default */
-	if (interval <= 0)
-		interval = 1;			/* 1 second = default */
-
-	ka.onoff = 1;
-	ka.keepalivetime = idle * 1000;
-	ka.keepaliveinterval = interval * 1000;
-
-	if (WSAIoctl(sock,
-				 SIO_KEEPALIVE_VALS,
-				 (LPVOID) &ka,
-				 sizeof(ka),
-				 NULL,
-				 0,
-				 &retsize,
-				 NULL,
-				 NULL)
-		!= 0)
-		return 0;
-	return 1;
-}
-
-static int
-prepKeepalivesWin32(PGconn *conn)
-{
-	int			idle = -1;
-	int			interval = -1;
-
-	if (conn->keepalives_idle &&
-		!parse_int_param(conn->keepalives_idle, &idle, conn,
-						 "keepalives_idle"))
-		return 0;
-	if (conn->keepalives_interval &&
-		!parse_int_param(conn->keepalives_interval, &interval, conn,
-						 "keepalives_interval"))
-		return 0;
-
-	if (!setKeepalivesWin32(conn->sock, idle, interval))
-	{
-		libpq_append_conn_error(conn, "%s(%s) failed: error code %d",
-								"WSAIoctl", "SIO_KEEPALIVE_VALS",
-								WSAGetLastError());
-		return 0;
-	}
-	return 1;
-}
-#endif							/* SIO_KEEPALIVE_VALS */
-#endif							/* WIN32 */
-
-/*
- * Set the TCP user timeout.
- */
-static int
-setTCPUserTimeout(PGconn *conn)
-{
-	int			timeout;
-
-	if (conn->pgtcp_user_timeout == NULL)
-		return 1;
-
-	if (!parse_int_param(conn->pgtcp_user_timeout, &timeout, conn,
-						 "tcp_user_timeout"))
-		return 0;
-
-	if (timeout < 0)
-		timeout = 0;
-
-// Compilation must fail on linux if TCP_USER_TIMEOUT is not defined
-#ifdef __linux__
-	if (setsockopt(conn->sock, IPPROTO_TCP, TCP_USER_TIMEOUT,
-				   (char *) &timeout, sizeof(timeout)) < 0)
-	{
-		char		sebuf[256];
-
-		libpq_append_conn_error(conn, "%s(%s) failed: %s",
-								"setsockopt",
-								"TCP_USER_TIMEOUT",
-								SOCK_STRERROR(SOCK_ERRNO, sebuf, sizeof(sebuf)));
-		return 0;
-	}
-#endif
-
-	return 1;
-}
-
-/* ----------
- * connectDBStart -
- *		Begin the process of making a connection to the backend.
- *
- * Returns 1 if successful, 0 if not.
- * ----------
- */
-static int
-connectDBStart(PGconn *conn)
-{
-	if (!conn)
-		return 0;
-
-	if (!conn->options_valid)
-		goto connect_errReturn;
-
-	/*
-	 * Check for bad linking to backend-internal versions of src/common
-	 * functions (see comments in link-canary.c for the reason we need this).
-	 * Nobody but developers should see this message, so we don't bother
-	 * translating it.
-	 */
-	if (!pg_link_canary_is_frontend())
-	{
-		appendPQExpBufferStr(&conn->errorMessage,
-							 "libpq is incorrectly linked to backend functions\n");
-		goto connect_errReturn;
-	}
-
-	/* Ensure our buffers are empty */
-	conn->inStart = conn->inCursor = conn->inEnd = 0;
-	conn->outCount = 0;
-
-	/*
-	 * Set up to try to connect to the first host.  (Setting whichhost = -1 is
-	 * a bit of a cheat, but PQconnectPoll will advance it to 0 before
-	 * anything else looks at it.)
-	 */
-	conn->whichhost = -1;
-	conn->try_next_addr = false;
-	conn->try_next_host = true;
-	conn->status = CONNECTION_NEEDED;
-
-	/* Also reset the target_server_type state if needed */
-	if (conn->target_server_type == SERVER_TYPE_PREFER_STANDBY_PASS2)
-		conn->target_server_type = SERVER_TYPE_PREFER_STANDBY;
-
-	/*
-	 * The code for processing CONNECTION_NEEDED state is in PQconnectPoll(),
-	 * so that it can easily be re-executed if needed again during the
-	 * asynchronous startup process.  However, we must run it once here,
-	 * because callers expect a success return from this routine to mean that
-	 * we are in PGRES_POLLING_WRITING connection state.
-	 */
-	if (PQconnectPoll(conn) == PGRES_POLLING_WRITING)
-		return 1;
-
-connect_errReturn:
-
-	/*
-	 * If we managed to open a socket, close it immediately rather than
-	 * waiting till PQfinish.  (The application cannot have gotten the socket
-	 * from PQsocket yet, so this doesn't risk breaking anything.)
-	 */
-	pqDropConnection(conn, true);
-	conn->status = CONNECTION_BAD;
-	return 0;
-}
-
-
-/*
- *		connectDBComplete
- *
- * Block and complete a connection.
- *
- * Returns 1 on success, 0 on failure.
- */
-static int
-connectDBComplete(PGconn *conn)
-{
-	PostgresPollingStatusType flag = PGRES_POLLING_WRITING;
-	time_t		finish_time = ((time_t) -1);
-	int			timeout = 0;
-	int			last_whichhost = -2;	/* certainly different from whichhost */
-	int			last_whichaddr = -2;	/* certainly different from whichaddr */
-
-	if (conn == NULL || conn->status == CONNECTION_BAD)
-		return 0;
-
-	/*
-	 * Set up a time limit, if connect_timeout isn't zero.
-	 */
-	if (conn->connect_timeout != NULL)
-	{
-		if (!parse_int_param(conn->connect_timeout, &timeout, conn,
-							 "connect_timeout"))
-		{
-			/* mark the connection as bad to report the parsing failure */
-			conn->status = CONNECTION_BAD;
-			return 0;
-		}
-
-		if (timeout > 0)
-		{
-			/*
-			 * Rounding could cause connection to fail unexpectedly quickly;
-			 * to prevent possibly waiting hardly-at-all, insist on at least
-			 * two seconds.
-			 */
-			if (timeout < 2)
-				timeout = 2;
-		}
-		else					/* negative means 0 */
-			timeout = 0;
-	}
-
-	for (;;)
-	{
-		int			ret = 0;
-
-		/*
-		 * (Re)start the connect_timeout timer if it's active and we are
-		 * considering a different host than we were last time through.  If
-		 * we've already succeeded, though, needn't recalculate.
-		 */
-		if (flag != PGRES_POLLING_OK &&
-			timeout > 0 &&
-			(conn->whichhost != last_whichhost ||
-			 conn->whichaddr != last_whichaddr))
-		{
-			finish_time = time(NULL) + timeout;
-			last_whichhost = conn->whichhost;
-			last_whichaddr = conn->whichaddr;
-		}
-
-		/*
-		 * Wait, if necessary.  Note that the initial state (just after
-		 * PQconnectStart) is to wait for the socket to select for writing.
-		 */
-		switch (flag)
-		{
-			case PGRES_POLLING_OK:
-				return 1;		/* success! */
-
-			case PGRES_POLLING_READING:
-				ret = pqWaitTimed(1, 0, conn, finish_time);
-				if (ret == -1)
-				{
-					/* hard failure, eg select() problem, aborts everything */
-					conn->status = CONNECTION_BAD;
-					return 0;
-				}
-				break;
-
-			case PGRES_POLLING_WRITING:
-				ret = pqWaitTimed(0, 1, conn, finish_time);
-				if (ret == -1)
-				{
-					/* hard failure, eg select() problem, aborts everything */
-					conn->status = CONNECTION_BAD;
-					return 0;
-				}
-				break;
-
-			default:
-				/* Just in case we failed to set it in PQconnectPoll */
-				conn->status = CONNECTION_BAD;
-				return 0;
-		}
-
-		if (ret == 1)			/* connect_timeout elapsed */
-		{
-			/*
-			 * Give up on current server/address, try the next one.
-			 */
-			conn->try_next_addr = true;
-			conn->status = CONNECTION_NEEDED;
-		}
-
-		/*
-		 * Now try to advance the state machine.
-		 */
-		flag = PQconnectPoll(conn);
-	}
-}
-
-/* ----------------
- *		PQconnectPoll
- *
- * Poll an asynchronous connection.
- *
- * Returns a PostgresPollingStatusType.
- * Before calling this function, use select(2) to determine when data
- * has arrived..
- *
- * You must call PQfinish whether or not this fails.
- *
- * This function and PQconnectStart are intended to allow connections to be
- * made without blocking the execution of your program on remote I/O. However,
- * there are a number of caveats:
- *
- *	 o	If you call PQtrace, ensure that the stream object into which you trace
- *		will not block.
- *	 o	If you do not supply an IP address for the remote host (i.e. you
- *		supply a host name instead) then PQconnectStart will block on
- *		getaddrinfo.  You will be fine if using Unix sockets (i.e. by
- *		supplying neither a host name nor a host address).
- *	 o	If your backend wants to use Kerberos authentication then you must
- *		supply both a host name and a host address, otherwise this function
- *		may block on gethostname.
- *
- * ----------------
- */
-PostgresPollingStatusType
-PQconnectPoll(PGconn *conn)
-{
-	bool		reset_connection_state_machine = false;
-	bool		need_new_connection = false;
-	PGresult   *res;
-	char		sebuf[PG_STRERROR_R_BUFLEN];
-	int			optval;
-
-	if (conn == NULL)
-		return PGRES_POLLING_FAILED;
-
-	/* Get the new data */
-	switch (conn->status)
-	{
-			/*
-			 * We really shouldn't have been polled in these two cases, but we
-			 * can handle it.
-			 */
-		case CONNECTION_BAD:
-			return PGRES_POLLING_FAILED;
-		case CONNECTION_OK:
-			return PGRES_POLLING_OK;
-
-			/* These are reading states */
-		case CONNECTION_AWAITING_RESPONSE:
-		case CONNECTION_AUTH_OK:
-		case CONNECTION_CHECK_WRITABLE:
-		case CONNECTION_CONSUME:
-		case CONNECTION_CHECK_STANDBY:
-			{
-				/* Load waiting data */
-				int			n = pqReadData(conn);
-
-				if (n < 0)
-					goto error_return;
-				if (n == 0)
-					return PGRES_POLLING_READING;
-
-				break;
-			}
-
-			/* These are writing states, so we just proceed. */
-		case CONNECTION_STARTED:
-		case CONNECTION_MADE:
-			break;
-
-			/* Special cases: proceed without waiting. */
-		case CONNECTION_SSL_STARTUP:
-		case CONNECTION_NEEDED:
-		case CONNECTION_GSS_STARTUP:
-		case CONNECTION_CHECK_TARGET:
-			break;
-
-		default:
-			libpq_append_conn_error(conn, "invalid connection state, probably indicative of memory corruption");
-			goto error_return;
-	}
-
-
-keep_going:						/* We will come back to here until there is
-								 * nothing left to do. */
-
-	/* Time to advance to next address, or next host if no more addresses? */
-	if (conn->try_next_addr)
-	{
-		if (conn->whichaddr < conn->naddr)
-		{
-			conn->whichaddr++;
-			reset_connection_state_machine = true;
-		}
-		else
-			conn->try_next_host = true;
-		conn->try_next_addr = false;
-	}
-
-	/* Time to advance to next connhost[] entry? */
-	if (conn->try_next_host)
-	{
-		pg_conn_host *ch;
-		struct addrinfo hint;
-		struct addrinfo *addrlist;
-		int			thisport;
-		int			ret;
-		char		portstr[MAXPGPATH];
-
-		if (conn->whichhost + 1 < conn->nconnhost)
-			conn->whichhost++;
-		else
-		{
-			/*
-			 * Oops, no more hosts.
-			 *
-			 * If we are trying to connect in "prefer-standby" mode, then drop
-			 * the standby requirement and start over.
-			 *
-			 * Otherwise, an appropriate error message is already set up, so
-			 * we just need to set the right status.
-			 */
-			if (conn->target_server_type == SERVER_TYPE_PREFER_STANDBY &&
-				conn->nconnhost > 0)
-			{
-				conn->target_server_type = SERVER_TYPE_PREFER_STANDBY_PASS2;
-				conn->whichhost = 0;
-			}
-			else
-				goto error_return;
-		}
-
-		/* Drop any address info for previous host */
-		release_conn_addrinfo(conn);
-
-		/*
-		 * Look up info for the new host.  On failure, log the problem in
-		 * conn->errorMessage, then loop around to try the next host.  (Note
-		 * we don't clear try_next_host until we've succeeded.)
-		 */
-		ch = &conn->connhost[conn->whichhost];
-
-		/* Initialize hint structure */
-		MemSet(&hint, 0, sizeof(hint));
-		hint.ai_socktype = SOCK_STREAM;
-		hint.ai_family = AF_UNSPEC;
-
-		/* Figure out the port number we're going to use. */
-		if (ch->port == NULL || ch->port[0] == '\0')
-			thisport = DEF_PGPORT;
-		else
-		{
-			if (!parse_int_param(ch->port, &thisport, conn, "port"))
-				goto error_return;
-
-			if (thisport < 1 || thisport > 65535)
-			{
-				libpq_append_conn_error(conn, "invalid port number: \"%s\"", ch->port);
-				goto keep_going;
-			}
-		}
-		snprintf(portstr, sizeof(portstr), "%d", thisport);
-
-		/* Use pg_getaddrinfo_all() to resolve the address */
-		switch (ch->type)
-		{
-			case CHT_HOST_NAME:
-				ret = pg_getaddrinfo_all(ch->host, portstr, &hint,
-										 &addrlist);
-				if (ret || !addrlist)
-				{
-					libpq_append_conn_error(conn, "could not translate host name \"%s\" to address: %s",
-											ch->host, gai_strerror(ret));
-					goto keep_going;
-				}
-				break;
-
-			case CHT_HOST_ADDRESS:
-				hint.ai_flags = AI_NUMERICHOST;
-				ret = pg_getaddrinfo_all(ch->hostaddr, portstr, &hint,
-										 &addrlist);
-				if (ret || !addrlist)
-				{
-					libpq_append_conn_error(conn, "could not parse network address \"%s\": %s",
-											ch->hostaddr, gai_strerror(ret));
-					goto keep_going;
-				}
-				break;
-
-			case CHT_UNIX_SOCKET:
-				hint.ai_family = AF_UNIX;
-				UNIXSOCK_PATH(portstr, thisport, ch->host);
-				if (strlen(portstr) >= UNIXSOCK_PATH_BUFLEN)
-				{
-					libpq_append_conn_error(conn, "Unix-domain socket path \"%s\" is too long (maximum %d bytes)",
-											portstr,
-											(int) (UNIXSOCK_PATH_BUFLEN - 1));
-					goto keep_going;
-				}
-
-				/*
-				 * NULL hostname tells pg_getaddrinfo_all to parse the service
-				 * name as a Unix-domain socket path.
-				 */
-				ret = pg_getaddrinfo_all(NULL, portstr, &hint,
-										 &addrlist);
-				if (ret || !addrlist)
-				{
-					libpq_append_conn_error(conn, "could not translate Unix-domain socket path \"%s\" to address: %s",
-											portstr, gai_strerror(ret));
-					goto keep_going;
-				}
-				break;
-		}
-
-		/*
-		 * Store a copy of the addrlist in private memory so we can perform
-		 * randomization for load balancing.
-		 */
-		ret = store_conn_addrinfo(conn, addrlist);
-		pg_freeaddrinfo_all(hint.ai_family, addrlist);
-		if (ret)
-			goto error_return;	/* message already logged */
-
-		/*
-		 * If random load balancing is enabled we shuffle the addresses.
-		 */
-		if (conn->load_balance_type == LOAD_BALANCE_RANDOM)
-		{
-			/*
-			 * This is the "inside-out" variant of the Fisher-Yates shuffle
-			 * algorithm. Notionally, we append each new value to the array
-			 * and then swap it with a randomly-chosen array element (possibly
-			 * including itself, else we fail to generate permutations with
-			 * the last integer last).  The swap step can be optimized by
-			 * combining it with the insertion.
-			 *
-			 * We don't need to initialize conn->prng_state here, because that
-			 * already happened in connectOptions2.
-			 */
-			for (int i = 1; i < conn->naddr; i++)
-			{
-				int			j = pg_prng_uint64_range(&conn->prng_state, 0, i);
-				AddrInfo	temp = conn->addr[j];
-
-				conn->addr[j] = conn->addr[i];
-				conn->addr[i] = temp;
-			}
-		}
-
-		reset_connection_state_machine = true;
-		conn->try_next_host = false;
-	}
-
-	/* Reset connection state machine? */
-	if (reset_connection_state_machine)
-	{
-		/*
-		 * (Re) initialize our connection control variables for a set of
-		 * connection attempts to a single server address.  These variables
-		 * must persist across individual connection attempts, but we must
-		 * reset them when we start to consider a new server.
-		 */
-		conn->pversion = PG_PROTOCOL(3, 0);
-		conn->send_appname = true;
-#ifdef USE_SSL
-		/* initialize these values based on SSL mode */
-		conn->allow_ssl_try = (conn->sslmode[0] != 'd');	/* "disable" */
-		conn->wait_ssl_try = (conn->sslmode[0] == 'a'); /* "allow" */
-#endif
-#ifdef ENABLE_GSS
-		conn->try_gss = (conn->gssencmode[0] != 'd');	/* "disable" */
-#endif
-
-		reset_connection_state_machine = false;
-		need_new_connection = true;
-	}
-
-	/* Force a new connection (perhaps to the same server as before)? */
-	if (need_new_connection)
-	{
-		/* Drop any existing connection */
-		pqDropConnection(conn, true);
-
-		/* Reset all state obtained from old server */
-		pqDropServerData(conn);
-
-		/* Drop any PGresult we might have, too */
-		conn->asyncStatus = PGASYNC_IDLE;
-		conn->xactStatus = PQTRANS_IDLE;
-		conn->pipelineStatus = PQ_PIPELINE_OFF;
-		pqClearAsyncResult(conn);
-
-		/* Reset conn->status to put the state machine in the right state */
-		conn->status = CONNECTION_NEEDED;
-
-		need_new_connection = false;
-	}
-
-	/* Now try to advance the state machine for this connection */
-	switch (conn->status)
-	{
-		case CONNECTION_NEEDED:
-			{
-				/*
-				 * Try to initiate a connection to one of the addresses
-				 * returned by pg_getaddrinfo_all().  conn->whichaddr is the
-				 * next one to try.
-				 *
-				 * The extra level of braces here is historical.  It's not
-				 * worth reindenting this whole switch case to remove 'em.
-				 */
-				{
-					char		host_addr[NI_MAXHOST];
-					int			sock_type;
-					AddrInfo   *addr_cur;
-
-					/*
-					 * Advance to next possible host, if we've tried all of
-					 * the addresses for the current host.
-					 */
-					if (conn->whichaddr == conn->naddr)
-					{
-						conn->try_next_host = true;
-						goto keep_going;
-					}
-					addr_cur = &conn->addr[conn->whichaddr];
-
-					/* Remember current address for possible use later */
-					memcpy(&conn->raddr, &addr_cur->addr, sizeof(SockAddr));
-
-					/*
-					 * Set connip, too.  Note we purposely ignore strdup
-					 * failure; not a big problem if it fails.
-					 */
-					if (conn->connip != NULL)
-					{
-						free(conn->connip);
-						conn->connip = NULL;
-					}
-					getHostaddr(conn, host_addr, NI_MAXHOST);
-					if (host_addr[0])
-						conn->connip = strdup(host_addr);
-
-					/* Try to create the socket */
-					sock_type = SOCK_STREAM;
-#ifdef SOCK_CLOEXEC
-
-					/*
-					 * Atomically mark close-on-exec, if possible on this
-					 * platform, so that there isn't a window where a
-					 * subprogram executed by another thread inherits the
-					 * socket.  See fallback code below.
-					 */
-					sock_type |= SOCK_CLOEXEC;
-#endif
-#ifdef SOCK_NONBLOCK
-
-					/*
-					 * We might as well skip a system call for nonblocking
-					 * mode too, if we can.
-					 */
-					sock_type |= SOCK_NONBLOCK;
-#endif
-					conn->sock = socket(addr_cur->family, sock_type, 0);
-					if (conn->sock == PGINVALID_SOCKET)
-					{
-						int			errorno = SOCK_ERRNO;
-
-						/*
-						 * Silently ignore socket() failure if we have more
-						 * addresses to try; this reduces useless chatter in
-						 * cases where the address list includes both IPv4 and
-						 * IPv6 but kernel only accepts one family.
-						 */
-						if (conn->whichaddr < conn->naddr ||
-							conn->whichhost + 1 < conn->nconnhost)
-						{
-							conn->try_next_addr = true;
-							goto keep_going;
-						}
-						emitHostIdentityInfo(conn, host_addr);
-						libpq_append_conn_error(conn, "could not create socket: %s",
-												SOCK_STRERROR(errorno, sebuf, sizeof(sebuf)));
-						goto error_return;
-					}
-
-					/*
-					 * Once we've identified a target address, all errors
-					 * except the preceding socket()-failure case should be
-					 * prefixed with host-identity information.  (If the
-					 * connection succeeds, the contents of conn->errorMessage
-					 * won't matter, so this is harmless.)
-					 */
-					emitHostIdentityInfo(conn, host_addr);
-
-					/*
-					 * Select socket options: no delay of outgoing data for
-					 * TCP sockets, nonblock mode, close-on-exec.  Try the
-					 * next address if any of this fails.
-					 */
-					if (addr_cur->family != AF_UNIX)
-					{
-						if (!connectNoDelay(conn))
-						{
-							/* error message already created */
-							conn->try_next_addr = true;
-							goto keep_going;
-						}
-					}
-#ifndef SOCK_NONBLOCK
-					if (!pg_set_noblock(conn->sock))
-					{
-						libpq_append_conn_error(conn, "could not set socket to nonblocking mode: %s",
-												SOCK_STRERROR(SOCK_ERRNO, sebuf, sizeof(sebuf)));
-						conn->try_next_addr = true;
-						goto keep_going;
-					}
-#endif
-
-#ifndef SOCK_CLOEXEC
-#ifdef F_SETFD
-					if (fcntl(conn->sock, F_SETFD, FD_CLOEXEC) == -1)
-					{
-						libpq_append_conn_error(conn, "could not set socket to close-on-exec mode: %s",
-												SOCK_STRERROR(SOCK_ERRNO, sebuf, sizeof(sebuf)));
-						conn->try_next_addr = true;
-						goto keep_going;
-					}
-#endif							/* F_SETFD */
-#endif
-
-					if (addr_cur->family != AF_UNIX)
-					{
-#ifndef WIN32
-						int			on = 1;
-#endif
-						int			usekeepalives = useKeepalives(conn);
-						int			err = 0;
-
-						if (usekeepalives < 0)
-						{
-							libpq_append_conn_error(conn, "keepalives parameter must be an integer");
-							err = 1;
-						}
-						else if (usekeepalives == 0)
-						{
-							/* Do nothing */
-						}
-#ifndef WIN32
-						else if (setsockopt(conn->sock,
-											SOL_SOCKET, SO_KEEPALIVE,
-											(char *) &on, sizeof(on)) < 0)
-						{
-							libpq_append_conn_error(conn, "%s(%s) failed: %s",
-													"setsockopt",
-													"SO_KEEPALIVE",
-													SOCK_STRERROR(SOCK_ERRNO, sebuf, sizeof(sebuf)));
-							err = 1;
-						}
-						else if (!setKeepalivesIdle(conn)
-								 || !setKeepalivesInterval(conn)
-								 || !setKeepalivesCount(conn))
-							err = 1;
-#else							/* WIN32 */
-#ifdef SIO_KEEPALIVE_VALS
-						else if (!prepKeepalivesWin32(conn))
-							err = 1;
-#endif							/* SIO_KEEPALIVE_VALS */
-#endif							/* WIN32 */
-						else if (!setTCPUserTimeout(conn))
-							err = 1;
-
-						if (err)
-						{
-							conn->try_next_addr = true;
-							goto keep_going;
-						}
-					}
-
-					/*----------
-					 * We have three methods of blocking SIGPIPE during
-					 * send() calls to this socket:
-					 *
-					 *	- setsockopt(sock, SO_NOSIGPIPE)
-					 *	- send(sock, ..., MSG_NOSIGNAL)
-					 *	- setting the signal mask to SIG_IGN during send()
-					 *
-					 * The third method requires three syscalls per send,
-					 * so we prefer either of the first two, but they are
-					 * less portable.  The state is tracked in the following
-					 * members of PGconn:
-					 *
-					 * conn->sigpipe_so		- we have set up SO_NOSIGPIPE
-					 * conn->sigpipe_flag	- we're specifying MSG_NOSIGNAL
-					 *
-					 * If we can use SO_NOSIGPIPE, then set sigpipe_so here
-					 * and we're done.  Otherwise, set sigpipe_flag so that
-					 * we will try MSG_NOSIGNAL on sends.  If we get an error
-					 * with MSG_NOSIGNAL, we'll clear that flag and revert to
-					 * signal masking.
-					 *----------
-					 */
-					conn->sigpipe_so = false;
-#ifdef MSG_NOSIGNAL
-					conn->sigpipe_flag = true;
-#else
-					conn->sigpipe_flag = false;
-#endif							/* MSG_NOSIGNAL */
-
-#ifdef SO_NOSIGPIPE
-					optval = 1;
-					if (setsockopt(conn->sock, SOL_SOCKET, SO_NOSIGPIPE,
-								   (char *) &optval, sizeof(optval)) == 0)
-					{
-						conn->sigpipe_so = true;
-						conn->sigpipe_flag = false;
-					}
-#endif							/* SO_NOSIGPIPE */
-
-					/*
-					 * Start/make connection.  This should not block, since we
-					 * are in nonblock mode.  If it does, well, too bad.
-					 */
-					if (connect(conn->sock, (struct sockaddr *) &addr_cur->addr.addr,
-								addr_cur->addr.salen) < 0)
-					{
-						if (SOCK_ERRNO == EINPROGRESS ||
-#ifdef WIN32
-							SOCK_ERRNO == EWOULDBLOCK ||
-#endif
-							SOCK_ERRNO == EINTR)
-						{
-							/*
-							 * This is fine - we're in non-blocking mode, and
-							 * the connection is in progress.  Tell caller to
-							 * wait for write-ready on socket.
-							 */
-							conn->status = CONNECTION_STARTED;
-							return PGRES_POLLING_WRITING;
-						}
-						/* otherwise, trouble */
-					}
-					else
-					{
-						/*
-						 * Hm, we're connected already --- seems the "nonblock
-						 * connection" wasn't.  Advance the state machine and
-						 * go do the next stuff.
-						 */
-						conn->status = CONNECTION_STARTED;
-						goto keep_going;
-					}
-
-					/*
-					 * This connection failed.  Add the error report to
-					 * conn->errorMessage, then try the next address if any.
-					 */
-					connectFailureMessage(conn, SOCK_ERRNO);
-					conn->try_next_addr = true;
-					goto keep_going;
-				}
-			}
-
-		case CONNECTION_STARTED:
-			{
-				socklen_t	optlen = sizeof(optval);
-
-				/*
-				 * Write ready, since we've made it here, so the connection
-				 * has been made ... or has failed.
-				 */
-
-				/*
-				 * Now check (using getsockopt) that there is not an error
-				 * state waiting for us on the socket.
-				 */
-
-				if (getsockopt(conn->sock, SOL_SOCKET, SO_ERROR,
-							   (char *) &optval, &optlen) == -1)
-				{
-					libpq_append_conn_error(conn, "could not get socket error status: %s",
-											SOCK_STRERROR(SOCK_ERRNO, sebuf, sizeof(sebuf)));
-					goto error_return;
-				}
-				else if (optval != 0)
-				{
-					/*
-					 * When using a nonblocking connect, we will typically see
-					 * connect failures at this point, so provide a friendly
-					 * error message.
-					 */
-					connectFailureMessage(conn, optval);
-
-					/*
-					 * Try the next address if any, just as in the case where
-					 * connect() returned failure immediately.
-					 */
-					conn->try_next_addr = true;
-					goto keep_going;
-				}
-
-				/* Fill in the client address */
-				conn->laddr.salen = sizeof(conn->laddr.addr);
-				if (getsockname(conn->sock,
-								(struct sockaddr *) &conn->laddr.addr,
-								&conn->laddr.salen) < 0)
-				{
-					libpq_append_conn_error(conn, "could not get client address from socket: %s",
-											SOCK_STRERROR(SOCK_ERRNO, sebuf, sizeof(sebuf)));
-					goto error_return;
-				}
-
-				/*
-				 * Make sure we can write before advancing to next step.
-				 */
-				conn->status = CONNECTION_MADE;
-				return PGRES_POLLING_WRITING;
-			}
-
-		case CONNECTION_MADE:
-			{
-				char	   *startpacket;
-				int			packetlen;
-
-				/*
-				 * Implement requirepeer check, if requested and it's a
-				 * Unix-domain socket.
-				 */
-				if (conn->requirepeer && conn->requirepeer[0] &&
-					conn->raddr.addr.ss_family == AF_UNIX)
-				{
-#ifndef WIN32
-					char	   *remote_username;
-#endif
-					uid_t		uid;
-					gid_t		gid;
-
-					errno = 0;
-					if (getpeereid(conn->sock, &uid, &gid) != 0)
-					{
-						/*
-						 * Provide special error message if getpeereid is a
-						 * stub
-						 */
-						if (errno == ENOSYS)
-							libpq_append_conn_error(conn, "requirepeer parameter is not supported on this platform");
-						else
-							libpq_append_conn_error(conn, "could not get peer credentials: %s",
-													strerror_r(errno, sebuf, sizeof(sebuf)));
-						goto error_return;
-					}
-
-#ifndef WIN32
-					remote_username = pg_fe_getusername(uid,
-														&conn->errorMessage);
-					if (remote_username == NULL)
-						goto error_return;	/* message already logged */
-
-					if (strcmp(remote_username, conn->requirepeer) != 0)
-					{
-						libpq_append_conn_error(conn, "requirepeer specifies \"%s\", but actual peer user name is \"%s\"",
-												conn->requirepeer, remote_username);
-						free(remote_username);
-						goto error_return;
-					}
-					free(remote_username);
-#else							/* WIN32 */
-					/* should have failed with ENOSYS above */
-					Assert(false);
-#endif							/* WIN32 */
-				}
-
-				if (conn->raddr.addr.ss_family == AF_UNIX)
-				{
-					/* Don't request SSL or GSSAPI over Unix sockets */
-#ifdef USE_SSL
-					conn->allow_ssl_try = false;
-#endif
-#ifdef ENABLE_GSS
-					conn->try_gss = false;
-#endif
-				}
-
-#ifdef ENABLE_GSS
-
-				/*
-				 * If GSSAPI encryption is enabled, then call
-				 * pg_GSS_have_cred_cache() which will return true if we can
-				 * acquire credentials (and give us a handle to use in
-				 * conn->gcred), and then send a packet to the server asking
-				 * for GSSAPI Encryption (and skip past SSL negotiation and
-				 * regular startup below).
-				 */
-				if (conn->try_gss && !conn->gctx)
-					conn->try_gss = pg_GSS_have_cred_cache(&conn->gcred);
-				if (conn->try_gss && !conn->gctx)
-				{
-					ProtocolVersion pv = pg_hton32(NEGOTIATE_GSS_CODE);
-
-					if (pqPacketSend(conn, 0, &pv, sizeof(pv)) != STATUS_OK)
-					{
-						libpq_append_conn_error(conn, "could not send GSSAPI negotiation packet: %s",
-												SOCK_STRERROR(SOCK_ERRNO, sebuf, sizeof(sebuf)));
-						goto error_return;
-					}
-
-					/* Ok, wait for response */
-					conn->status = CONNECTION_GSS_STARTUP;
-					return PGRES_POLLING_READING;
-				}
-				else if (!conn->gctx && conn->gssencmode[0] == 'r')
-				{
-					libpq_append_conn_error(conn,
-											"GSSAPI encryption required but was impossible (possibly no credential cache, no server support, or using a local socket)");
-					goto error_return;
-				}
-#endif
-
-#ifdef USE_SSL
-
-				/*
-				 * Enable the libcrypto callbacks before checking if SSL needs
-				 * to be done.  This is done before sending the startup packet
-				 * as depending on the type of authentication done, like MD5
-				 * or SCRAM that use cryptohashes, the callbacks would be
-				 * required even without a SSL connection
-				 */
-				if (pqsecure_initialize(conn, false, true) < 0)
-					goto error_return;
-
-				/*
-				 * If SSL is enabled and we haven't already got encryption of
-				 * some sort running, request SSL instead of sending the
-				 * startup message.
-				 */
-				if (conn->allow_ssl_try && !conn->wait_ssl_try &&
-					!conn->ssl_in_use
-#ifdef ENABLE_GSS
-					&& !conn->gssenc
-#endif
-					)
-				{
-					ProtocolVersion pv;
-
-					/*
-					 * Send the SSL request packet.
-					 *
-					 * Theoretically, this could block, but it really
-					 * shouldn't since we only got here if the socket is
-					 * write-ready.
-					 */
-					pv = pg_hton32(NEGOTIATE_SSL_CODE);
-					if (pqPacketSend(conn, 0, &pv, sizeof(pv)) != STATUS_OK)
-					{
-						libpq_append_conn_error(conn, "could not send SSL negotiation packet: %s",
-												SOCK_STRERROR(SOCK_ERRNO, sebuf, sizeof(sebuf)));
-						goto error_return;
-					}
-					/* Ok, wait for response */
-					conn->status = CONNECTION_SSL_STARTUP;
-					return PGRES_POLLING_READING;
-				}
-#endif							/* USE_SSL */
-
-				/*
-				 * Build the startup packet.
-				 */
-				startpacket = pqBuildStartupPacket3(conn, &packetlen,
-													EnvironmentOptions);
-				if (!startpacket)
-				{
-					libpq_append_conn_error(conn, "out of memory");
-					goto error_return;
-				}
-
-				/*
-				 * Send the startup packet.
-				 *
-				 * Theoretically, this could block, but it really shouldn't
-				 * since we only got here if the socket is write-ready.
-				 */
-				if (pqPacketSend(conn, 0, startpacket, packetlen) != STATUS_OK)
-				{
-					libpq_append_conn_error(conn, "could not send startup packet: %s",
-											SOCK_STRERROR(SOCK_ERRNO, sebuf, sizeof(sebuf)));
-					free(startpacket);
-					goto error_return;
-				}
-
-				free(startpacket);
-
-				conn->status = CONNECTION_AWAITING_RESPONSE;
-				return PGRES_POLLING_READING;
-			}
-
-			/*
-			 * Handle SSL negotiation: wait for postmaster messages and
-			 * respond as necessary.
-			 */
-		case CONNECTION_SSL_STARTUP:
-			{
-#ifdef USE_SSL
-				PostgresPollingStatusType pollres;
-
-				/*
-				 * On first time through, get the postmaster's response to our
-				 * SSL negotiation packet.
-				 */
-				if (!conn->ssl_in_use)
-				{
-					/*
-					 * We use pqReadData here since it has the logic to
-					 * distinguish no-data-yet from connection closure. Since
-					 * conn->ssl isn't set, a plain recv() will occur.
-					 */
-					char		SSLok;
-					int			rdresult;
-
-					rdresult = pqReadData(conn);
-					if (rdresult < 0)
-					{
-						/* errorMessage is already filled in */
-						goto error_return;
-					}
-					if (rdresult == 0)
-					{
-						/* caller failed to wait for data */
-						return PGRES_POLLING_READING;
-					}
-					if (pqGetc(&SSLok, conn) < 0)
-					{
-						/* should not happen really */
-						return PGRES_POLLING_READING;
-					}
-					if (SSLok == 'S')
-					{
-						/* mark byte consumed */
-						conn->inStart = conn->inCursor;
-
-						/*
-						 * Set up global SSL state if required.  The crypto
-						 * state has already been set if libpq took care of
-						 * doing that, so there is no need to make that happen
-						 * again.
-						 */
-						if (pqsecure_initialize(conn, true, false) != 0)
-							goto error_return;
-					}
-					else if (SSLok == 'N')
-					{
-						/* mark byte consumed */
-						conn->inStart = conn->inCursor;
-						/* OK to do without SSL? */
-						if (conn->sslmode[0] == 'r' ||	/* "require" */
-							conn->sslmode[0] == 'v')	/* "verify-ca" or
-														 * "verify-full" */
-						{
-							/* Require SSL, but server does not want it */
-							libpq_append_conn_error(conn, "server does not support SSL, but SSL was required");
-							goto error_return;
-						}
-						/* Otherwise, proceed with normal startup */
-						conn->allow_ssl_try = false;
-						/* We can proceed using this connection */
-						conn->status = CONNECTION_MADE;
-						return PGRES_POLLING_WRITING;
-					}
-					else if (SSLok == 'E')
-					{
-						/*
-						 * Server failure of some sort, such as failure to
-						 * fork a backend process.  We need to process and
-						 * report the error message, which might be formatted
-						 * according to either protocol 2 or protocol 3.
-						 * Rather than duplicate the code for that, we flip
-						 * into AWAITING_RESPONSE state and let the code there
-						 * deal with it.  Note we have *not* consumed the "E"
-						 * byte here.
-						 */
-						conn->status = CONNECTION_AWAITING_RESPONSE;
-						goto keep_going;
-					}
-					else
-					{
-						libpq_append_conn_error(conn, "received invalid response to SSL negotiation: %c",
-												SSLok);
-						goto error_return;
-					}
-				}
-
-				/*
-				 * Begin or continue the SSL negotiation process.
-				 */
-				pollres = pqsecure_open_client(conn);
-				if (pollres == PGRES_POLLING_OK)
-				{
-					/*
-					 * At this point we should have no data already buffered.
-					 * If we do, it was received before we performed the SSL
-					 * handshake, so it wasn't encrypted and indeed may have
-					 * been injected by a man-in-the-middle.
-					 */
-					if (conn->inCursor != conn->inEnd)
-					{
-						libpq_append_conn_error(conn, "received unencrypted data after SSL response");
-						goto error_return;
-					}
-
-					/* SSL handshake done, ready to send startup packet */
-					conn->status = CONNECTION_MADE;
-					return PGRES_POLLING_WRITING;
-				}
-				if (pollres == PGRES_POLLING_FAILED)
-				{
-					/*
-					 * Failed ... if sslmode is "prefer" then do a non-SSL
-					 * retry
-					 */
-					if (conn->sslmode[0] == 'p' /* "prefer" */
-						&& conn->allow_ssl_try	/* redundant? */
-						&& !conn->wait_ssl_try) /* redundant? */
-					{
-						/* only retry once */
-						conn->allow_ssl_try = false;
-						need_new_connection = true;
-						goto keep_going;
-					}
-					/* Else it's a hard failure */
-					goto error_return;
-				}
-				/* Else, return POLLING_READING or POLLING_WRITING status */
-				return pollres;
-#else							/* !USE_SSL */
-				/* can't get here */
-				goto error_return;
-#endif							/* USE_SSL */
-			}
-
-		case CONNECTION_GSS_STARTUP:
-			{
-#ifdef ENABLE_GSS
-				PostgresPollingStatusType pollres;
-
-				/*
-				 * If we haven't yet, get the postmaster's response to our
-				 * negotiation packet
-				 */
-				if (conn->try_gss && !conn->gctx)
-				{
-					char		gss_ok;
-					int			rdresult = pqReadData(conn);
-
-					if (rdresult < 0)
-						/* pqReadData fills in error message */
-						goto error_return;
-					else if (rdresult == 0)
-						/* caller failed to wait for data */
-						return PGRES_POLLING_READING;
-					if (pqGetc(&gss_ok, conn) < 0)
-						/* shouldn't happen... */
-						return PGRES_POLLING_READING;
-
-					if (gss_ok == 'E')
-					{
-						/*
-						 * Server failure of some sort.  Assume it's a
-						 * protocol version support failure, and let's see if
-						 * we can't recover (if it's not, we'll get a better
-						 * error message on retry).  Server gets fussy if we
-						 * don't hang up the socket, though.
-						 */
-						conn->try_gss = false;
-						need_new_connection = true;
-						goto keep_going;
-					}
-
-					/* mark byte consumed */
-					conn->inStart = conn->inCursor;
-
-					if (gss_ok == 'N')
-					{
-						/* Server doesn't want GSSAPI; fall back if we can */
-						if (conn->gssencmode[0] == 'r')
-						{
-							libpq_append_conn_error(conn, "server doesn't support GSSAPI encryption, but it was required");
-							goto error_return;
-						}
-
-						conn->try_gss = false;
-						/* We can proceed using this connection */
-						conn->status = CONNECTION_MADE;
-						return PGRES_POLLING_WRITING;
-					}
-					else if (gss_ok != 'G')
-					{
-						libpq_append_conn_error(conn, "received invalid response to GSSAPI negotiation: %c",
-												gss_ok);
-						goto error_return;
-					}
-				}
-
-				/* Begin or continue GSSAPI negotiation */
-				pollres = pqsecure_open_gss(conn);
-				if (pollres == PGRES_POLLING_OK)
-				{
-					/*
-					 * At this point we should have no data already buffered.
-					 * If we do, it was received before we performed the GSS
-					 * handshake, so it wasn't encrypted and indeed may have
-					 * been injected by a man-in-the-middle.
-					 */
-					if (conn->inCursor != conn->inEnd)
-					{
-						libpq_append_conn_error(conn, "received unencrypted data after GSSAPI encryption response");
-						goto error_return;
-					}
-
-					/* All set for startup packet */
-					conn->status = CONNECTION_MADE;
-					return PGRES_POLLING_WRITING;
-				}
-				else if (pollres == PGRES_POLLING_FAILED)
-				{
-					if (conn->gssencmode[0] == 'p')
-					{
-						/*
-						 * We failed, but we can retry on "prefer".  Have to
-						 * drop the current connection to do so, though.
-						 */
-						conn->try_gss = false;
-						need_new_connection = true;
-						goto keep_going;
-					}
-					/* Else it's a hard failure */
-					goto error_return;
-				}
-				/* Else, return POLLING_READING or POLLING_WRITING status */
-				return pollres;
-#else							/* !ENABLE_GSS */
-				/* unreachable */
-				goto error_return;
-#endif							/* ENABLE_GSS */
-			}
-
-			/*
-			 * Handle authentication exchange: wait for postmaster messages
-			 * and respond as necessary.
-			 */
-		case CONNECTION_AWAITING_RESPONSE:
-			{
-				char		beresp;
-				int			msgLength;
-				int			avail;
-				AuthRequest areq;
-				int			res;
-
-				/*
-				 * Scan the message from current point (note that if we find
-				 * the message is incomplete, we will return without advancing
-				 * inStart, and resume here next time).
-				 */
-				conn->inCursor = conn->inStart;
-
-				/* Read type byte */
-				if (pqGetc(&beresp, conn))
-				{
-					/* We'll come back when there is more data */
-					return PGRES_POLLING_READING;
-				}
-
-				/*
-				 * Validate message type: we expect only an authentication
-				 * request, NegotiateProtocolVersion, or an error here.
-				 * Anything else probably means it's not Postgres on the other
-				 * end at all.
-				 */
-				if (!(beresp == 'R' || beresp == 'v' || beresp == 'E'))
-				{
-					libpq_append_conn_error(conn, "expected authentication request from server, but received %c",
-											beresp);
-					goto error_return;
-				}
-
-				/* Read message length word */
-				if (pqGetInt(&msgLength, 4, conn))
-				{
-					/* We'll come back when there is more data */
-					return PGRES_POLLING_READING;
-				}
-
-				/*
-				 * Try to validate message length before using it.
-				 *
-				 * Authentication requests can't be very large, although GSS
-				 * auth requests may not be that small.  Same for
-				 * NegotiateProtocolVersion.
-				 *
-				 * Errors can be a little larger, but not huge.  If we see a
-				 * large apparent length in an error, it means we're really
-				 * talking to a pre-3.0-protocol server; cope.  (Before
-				 * version 14, the server also used the old protocol for
-				 * errors that happened before processing the startup packet.)
-				 */
-				if (beresp == 'R' && (msgLength < 8 || msgLength > 2000))
-				{
-					libpq_append_conn_error(conn, "received invalid authentication request");
-					goto error_return;
-				}
-				if (beresp == 'v' && (msgLength < 8 || msgLength > 2000))
-				{
-					libpq_append_conn_error(conn, "received invalid protocol negotiation message");
-					goto error_return;
-				}
-
-#define MAX_ERRLEN 30000
-				if (beresp == 'E' && (msgLength < 8 || msgLength > MAX_ERRLEN))
-				{
-					/* Handle error from a pre-3.0 server */
-					conn->inCursor = conn->inStart + 1; /* reread data */
-					if (pqGets_append(&conn->errorMessage, conn))
-					{
-						/*
-						 * We may not have authenticated the server yet, so
-						 * don't let the buffer grow forever.
-						 */
-						avail = conn->inEnd - conn->inCursor;
-						if (avail > MAX_ERRLEN)
-						{
-							libpq_append_conn_error(conn, "received invalid error message");
-							goto error_return;
-						}
-
-						/* We'll come back when there is more data */
-						return PGRES_POLLING_READING;
-					}
-					/* OK, we read the message; mark data consumed */
-					conn->inStart = conn->inCursor;
-
-					/*
-					 * Before 7.2, the postmaster didn't always end its
-					 * messages with a newline, so add one if needed to
-					 * conform to libpq conventions.
-					 */
-					if (conn->errorMessage.len == 0 ||
-						conn->errorMessage.data[conn->errorMessage.len - 1] != '\n')
-					{
-						appendPQExpBufferChar(&conn->errorMessage, '\n');
-					}
-
-					goto error_return;
-				}
-#undef MAX_ERRLEN
-
-				/*
-				 * Can't process if message body isn't all here yet.
-				 *
-				 * After this check passes, any further EOF during parsing
-				 * implies that the server sent a bad/truncated message.
-				 * Reading more bytes won't help in that case, so don't return
-				 * PGRES_POLLING_READING after this point.
-				 */
-				msgLength -= 4;
-				avail = conn->inEnd - conn->inCursor;
-				if (avail < msgLength)
-				{
-					/*
-					 * Before returning, try to enlarge the input buffer if
-					 * needed to hold the whole message; see notes in
-					 * pqParseInput3.
-					 */
-					if (pqCheckInBufferSpace(conn->inCursor + (size_t) msgLength,
-											 conn))
-						goto error_return;
-					/* We'll come back when there is more data */
-					return PGRES_POLLING_READING;
-				}
-
-				/* Handle errors. */
-				if (beresp == 'E')
-				{
-					if (pqGetErrorNotice3(conn, true))
-					{
-						libpq_append_conn_error(conn, "received invalid error message");
-						goto error_return;
-					}
-					/* OK, we read the message; mark data consumed */
-					conn->inStart = conn->inCursor;
-
-					/*
-					 * If error is "cannot connect now", try the next host if
-					 * any (but we don't want to consider additional addresses
-					 * for this host, nor is there much point in changing SSL
-					 * or GSS mode).  This is helpful when dealing with
-					 * standby servers that might not be in hot-standby state.
-					 */
-					if (strcmp(conn->last_sqlstate,
-							   ERRCODE_CANNOT_CONNECT_NOW) == 0)
-					{
-						conn->try_next_host = true;
-						goto keep_going;
-					}
-
-					/* Check to see if we should mention pgpassfile */
-					pgpassfileWarning(conn);
-
-#ifdef ENABLE_GSS
-
-					/*
-					 * If gssencmode is "prefer" and we're using GSSAPI, retry
-					 * without it.
-					 */
-					if (conn->gssenc && conn->gssencmode[0] == 'p')
-					{
-						/* only retry once */
-						conn->try_gss = false;
-						need_new_connection = true;
-						goto keep_going;
-					}
-#endif
-
-#ifdef USE_SSL
-
-					/*
-					 * if sslmode is "allow" and we haven't tried an SSL
-					 * connection already, then retry with an SSL connection
-					 */
-					if (conn->sslmode[0] == 'a' /* "allow" */
-						&& !conn->ssl_in_use
-						&& conn->allow_ssl_try
-						&& conn->wait_ssl_try)
-					{
-						/* only retry once */
-						conn->wait_ssl_try = false;
-						need_new_connection = true;
-						goto keep_going;
-					}
-
-					/*
-					 * if sslmode is "prefer" and we're in an SSL connection,
-					 * then do a non-SSL retry
-					 */
-					if (conn->sslmode[0] == 'p' /* "prefer" */
-						&& conn->ssl_in_use
-						&& conn->allow_ssl_try	/* redundant? */
-						&& !conn->wait_ssl_try) /* redundant? */
-					{
-						/* only retry once */
-						conn->allow_ssl_try = false;
-						need_new_connection = true;
-						goto keep_going;
-					}
-#endif
-
-					goto error_return;
-				}
-				else if (beresp == 'v')
-				{
-					if (pqGetNegotiateProtocolVersion3(conn))
-					{
-						libpq_append_conn_error(conn, "received invalid protocol negotiation message");
-						goto error_return;
-					}
-					/* OK, we read the message; mark data consumed */
-					conn->inStart = conn->inCursor;
-					goto error_return;
-				}
-
-				/* It is an authentication request. */
-				conn->auth_req_received = true;
-
-				/* Get the type of request. */
-				if (pqGetInt((int *) &areq, 4, conn))
-				{
-					/* can't happen because we checked the length already */
-					libpq_append_conn_error(conn, "received invalid authentication request");
-					goto error_return;
-				}
-				msgLength -= 4;
-
-				/*
-				 * Process the rest of the authentication request message, and
-				 * respond to it if necessary.
-				 *
-				 * Note that conn->pghost must be non-NULL if we are going to
-				 * avoid the Kerberos code doing a hostname look-up.
-				 */
-				res = pg_fe_sendauth(areq, msgLength, conn);
-
-				/* OK, we have processed the message; mark data consumed */
-				conn->inStart = conn->inCursor;
-
-				if (res != STATUS_OK)
-					goto error_return;
-
-				/*
-				 * Just make sure that any data sent by pg_fe_sendauth is
-				 * flushed out.  Although this theoretically could block, it
-				 * really shouldn't since we don't send large auth responses.
-				 */
-				if (pqFlush(conn))
-					goto error_return;
-
-				if (areq == AUTH_REQ_OK)
-				{
-					/* We are done with authentication exchange */
-					conn->status = CONNECTION_AUTH_OK;
-
-					/*
-					 * Set asyncStatus so that PQgetResult will think that
-					 * what comes back next is the result of a query.  See
-					 * below.
-					 */
-					conn->asyncStatus = PGASYNC_BUSY;
-				}
-
-				/* Look to see if we have more data yet. */
-				goto keep_going;
-			}
-
-		case CONNECTION_AUTH_OK:
-			{
-				/*
-				 * Now we expect to hear from the backend. A ReadyForQuery
-				 * message indicates that startup is successful, but we might
-				 * also get an Error message indicating failure. (Notice
-				 * messages indicating nonfatal warnings are also allowed by
-				 * the protocol, as are ParameterStatus and BackendKeyData
-				 * messages.) Easiest way to handle this is to let
-				 * PQgetResult() read the messages. We just have to fake it
-				 * out about the state of the connection, by setting
-				 * asyncStatus = PGASYNC_BUSY (done above).
-				 */
-
-				if (PQisBusy(conn))
-					return PGRES_POLLING_READING;
-
-				res = PQgetResult(conn);
-
-				/*
-				 * NULL return indicating we have gone to IDLE state is
-				 * expected
-				 */
-				if (res)
-				{
-					if (res->resultStatus != PGRES_FATAL_ERROR)
-						libpq_append_conn_error(conn, "unexpected message from server during startup");
-					else if (conn->send_appname &&
-							 (conn->appname || conn->fbappname))
-					{
-						/*
-						 * If we tried to send application_name, check to see
-						 * if the error is about that --- pre-9.0 servers will
-						 * reject it at this stage of the process.  If so,
-						 * close the connection and retry without sending
-						 * application_name.  We could possibly get a false
-						 * SQLSTATE match here and retry uselessly, but there
-						 * seems no great harm in that; we'll just get the
-						 * same error again if it's unrelated.
-						 */
-						const char *sqlstate;
-
-						sqlstate = PQresultErrorField(res, PG_DIAG_SQLSTATE);
-						if (sqlstate &&
-							strcmp(sqlstate, ERRCODE_APPNAME_UNKNOWN) == 0)
-						{
-							PQclear(res);
-							conn->send_appname = false;
-							need_new_connection = true;
-							goto keep_going;
-						}
-					}
-
-					/*
-					 * if the resultStatus is FATAL, then conn->errorMessage
-					 * already has a copy of the error; needn't copy it back.
-					 * But add a newline if it's not there already, since
-					 * postmaster error messages may not have one.
-					 */
-					if (conn->errorMessage.len <= 0 ||
-						conn->errorMessage.data[conn->errorMessage.len - 1] != '\n')
-						appendPQExpBufferChar(&conn->errorMessage, '\n');
-					PQclear(res);
-					goto error_return;
-				}
-
-				/* Almost there now ... */
-				conn->status = CONNECTION_CHECK_TARGET;
-				goto keep_going;
-			}
-
-		case CONNECTION_CHECK_TARGET:
-			{
-				/*
-				 * If a read-write, read-only, primary, or standby connection
-				 * is required, see if we have one.
-				 */
-				if (conn->target_server_type == SERVER_TYPE_READ_WRITE ||
-					conn->target_server_type == SERVER_TYPE_READ_ONLY)
-				{
-					bool		read_only_server;
-
-					/*
-					 * If the server didn't report
-					 * "default_transaction_read_only" or "in_hot_standby" at
-					 * startup, we must determine its state by sending the
-					 * query "SHOW transaction_read_only".  This GUC exists in
-					 * all server versions that support 3.0 protocol.
-					 */
-					if (conn->default_transaction_read_only == PG_BOOL_UNKNOWN ||
-						conn->in_hot_standby == PG_BOOL_UNKNOWN)
-					{
-						/*
-						 * We use PQsendQueryContinue so that
-						 * conn->errorMessage does not get cleared.  We need
-						 * to preserve any error messages related to previous
-						 * hosts we have tried and failed to connect to.
-						 */
-						conn->status = CONNECTION_OK;
-						if (!PQsendQueryContinue(conn,
-												 "SHOW transaction_read_only"))
-							goto error_return;
-						/* We'll return to this state when we have the answer */
-						conn->status = CONNECTION_CHECK_WRITABLE;
-						return PGRES_POLLING_READING;
-					}
-
-					/* OK, we can make the test */
-					read_only_server =
-						(conn->default_transaction_read_only == PG_BOOL_YES ||
-						 conn->in_hot_standby == PG_BOOL_YES);
-
-					if ((conn->target_server_type == SERVER_TYPE_READ_WRITE) ?
-						read_only_server : !read_only_server)
-					{
-						/* Wrong server state, reject and try the next host */
-						if (conn->target_server_type == SERVER_TYPE_READ_WRITE)
-							libpq_append_conn_error(conn, "session is read-only");
-						else
-							libpq_append_conn_error(conn, "session is not read-only");
-
-						/* Close connection politely. */
-						conn->status = CONNECTION_OK;
-						sendTerminateConn(conn);
-
-						/*
-						 * Try next host if any, but we don't want to consider
-						 * additional addresses for this host.
-						 */
-						conn->try_next_host = true;
-						goto keep_going;
-					}
-				}
-				else if (conn->target_server_type == SERVER_TYPE_PRIMARY ||
-						 conn->target_server_type == SERVER_TYPE_STANDBY ||
-						 conn->target_server_type == SERVER_TYPE_PREFER_STANDBY)
-				{
-					/*
-					 * If the server didn't report "in_hot_standby" at
-					 * startup, we must determine its state by sending the
-					 * query "SELECT pg_catalog.pg_is_in_recovery()".  Servers
-					 * before 9.0 don't have that function, but by the same
-					 * token they don't have any standby mode, so we may just
-					 * assume the result.
-					 */
-					if (conn->sversion < 90000)
-						conn->in_hot_standby = PG_BOOL_NO;
-
-					if (conn->in_hot_standby == PG_BOOL_UNKNOWN)
-					{
-						/*
-						 * We use PQsendQueryContinue so that
-						 * conn->errorMessage does not get cleared.  We need
-						 * to preserve any error messages related to previous
-						 * hosts we have tried and failed to connect to.
-						 */
-						conn->status = CONNECTION_OK;
-						if (!PQsendQueryContinue(conn,
-												 "SELECT pg_catalog.pg_is_in_recovery()"))
-							goto error_return;
-						/* We'll return to this state when we have the answer */
-						conn->status = CONNECTION_CHECK_STANDBY;
-						return PGRES_POLLING_READING;
-					}
-
-					/* OK, we can make the test */
-					if ((conn->target_server_type == SERVER_TYPE_PRIMARY) ?
-						(conn->in_hot_standby == PG_BOOL_YES) :
-						(conn->in_hot_standby == PG_BOOL_NO))
-					{
-						/* Wrong server state, reject and try the next host */
-						if (conn->target_server_type == SERVER_TYPE_PRIMARY)
-							libpq_append_conn_error(conn, "server is in hot standby mode");
-						else
-							libpq_append_conn_error(conn, "server is not in hot standby mode");
-
-						/* Close connection politely. */
-						conn->status = CONNECTION_OK;
-						sendTerminateConn(conn);
-
-						/*
-						 * Try next host if any, but we don't want to consider
-						 * additional addresses for this host.
-						 */
-						conn->try_next_host = true;
-						goto keep_going;
-					}
-				}
-
-				/* We can release the address list now. */
-				release_conn_addrinfo(conn);
-
-				/*
-				 * Contents of conn->errorMessage are no longer interesting
-				 * (and it seems some clients expect it to be empty after a
-				 * successful connection).
-				 */
-				pqClearConnErrorState(conn);
-
-				/* We are open for business! */
-				conn->status = CONNECTION_OK;
-				return PGRES_POLLING_OK;
-			}
-
-		case CONNECTION_CONSUME:
-			{
-				/*
-				 * This state just makes sure the connection is idle after
-				 * we've obtained the result of a SHOW or SELECT query.  Once
-				 * we're clear, return to CONNECTION_CHECK_TARGET state to
-				 * decide what to do next.  We must transiently set status =
-				 * CONNECTION_OK in order to use the result-consuming
-				 * subroutines.
-				 */
-				conn->status = CONNECTION_OK;
-				if (!PQconsumeInput(conn))
-					goto error_return;
-
-				if (PQisBusy(conn))
-				{
-					conn->status = CONNECTION_CONSUME;
-					return PGRES_POLLING_READING;
-				}
-
-				/* Call PQgetResult() again until we get a NULL result */
-				res = PQgetResult(conn);
-				if (res != NULL)
-				{
-					PQclear(res);
-					conn->status = CONNECTION_CONSUME;
-					return PGRES_POLLING_READING;
-				}
-
-				conn->status = CONNECTION_CHECK_TARGET;
-				goto keep_going;
-			}
-
-		case CONNECTION_CHECK_WRITABLE:
-			{
-				/*
-				 * Waiting for result of "SHOW transaction_read_only".  We
-				 * must transiently set status = CONNECTION_OK in order to use
-				 * the result-consuming subroutines.
-				 */
-				conn->status = CONNECTION_OK;
-				if (!PQconsumeInput(conn))
-					goto error_return;
-
-				if (PQisBusy(conn))
-				{
-					conn->status = CONNECTION_CHECK_WRITABLE;
-					return PGRES_POLLING_READING;
-				}
-
-				res = PQgetResult(conn);
-				if (res && PQresultStatus(res) == PGRES_TUPLES_OK &&
-					PQntuples(res) == 1)
-				{
-					char	   *val = PQgetvalue(res, 0, 0);
-
-					/*
-					 * "transaction_read_only = on" proves that at least one
-					 * of default_transaction_read_only and in_hot_standby is
-					 * on, but we don't actually know which.  We don't care
-					 * though for the purpose of identifying a read-only
-					 * session, so satisfy the CONNECTION_CHECK_TARGET code by
-					 * claiming they are both on.  On the other hand, if it's
-					 * a read-write session, they are certainly both off.
-					 */
-					if (strncmp(val, "on", 2) == 0)
-					{
-						conn->default_transaction_read_only = PG_BOOL_YES;
-						conn->in_hot_standby = PG_BOOL_YES;
-					}
-					else
-					{
-						conn->default_transaction_read_only = PG_BOOL_NO;
-						conn->in_hot_standby = PG_BOOL_NO;
-					}
-					PQclear(res);
-
-					/* Finish reading messages before continuing */
-					conn->status = CONNECTION_CONSUME;
-					goto keep_going;
-				}
-
-				/* Something went wrong with "SHOW transaction_read_only". */
-				PQclear(res);
-
-				/* Append error report to conn->errorMessage. */
-				libpq_append_conn_error(conn, "\"%s\" failed",
-										"SHOW transaction_read_only");
-
-				/* Close connection politely. */
-				conn->status = CONNECTION_OK;
-				sendTerminateConn(conn);
-
-				/* Try next host. */
-				conn->try_next_host = true;
-				goto keep_going;
-			}
-
-		case CONNECTION_CHECK_STANDBY:
-			{
-				/*
-				 * Waiting for result of "SELECT pg_is_in_recovery()".  We
-				 * must transiently set status = CONNECTION_OK in order to use
-				 * the result-consuming subroutines.
-				 */
-				conn->status = CONNECTION_OK;
-				if (!PQconsumeInput(conn))
-					goto error_return;
-
-				if (PQisBusy(conn))
-				{
-					conn->status = CONNECTION_CHECK_STANDBY;
-					return PGRES_POLLING_READING;
-				}
-
-				res = PQgetResult(conn);
-				if (res && PQresultStatus(res) == PGRES_TUPLES_OK &&
-					PQntuples(res) == 1)
-				{
-					char	   *val = PQgetvalue(res, 0, 0);
-
-					if (strncmp(val, "t", 1) == 0)
-						conn->in_hot_standby = PG_BOOL_YES;
-					else
-						conn->in_hot_standby = PG_BOOL_NO;
-					PQclear(res);
-
-					/* Finish reading messages before continuing */
-					conn->status = CONNECTION_CONSUME;
-					goto keep_going;
-				}
-
-				/* Something went wrong with "SELECT pg_is_in_recovery()". */
-				PQclear(res);
-
-				/* Append error report to conn->errorMessage. */
-				libpq_append_conn_error(conn, "\"%s\" failed",
-										"SELECT pg_is_in_recovery()");
-
-				/* Close connection politely. */
-				conn->status = CONNECTION_OK;
-				sendTerminateConn(conn);
-
-				/* Try next host. */
-				conn->try_next_host = true;
-				goto keep_going;
-			}
-
-		default:
-			libpq_append_conn_error(conn,
-									"invalid connection state %d, probably indicative of memory corruption",
-									conn->status);
-			goto error_return;
-	}
-
-	/* Unreachable */
-
-error_return:
-
-	/*
-	 * We used to close the socket at this point, but that makes it awkward
-	 * for those above us if they wish to remove this socket from their own
-	 * records (an fd_set for example).  We'll just have this socket closed
-	 * when PQfinish is called (which is compulsory even after an error, since
-	 * the connection structure must be freed).
-	 */
-	conn->status = CONNECTION_BAD;
-	return PGRES_POLLING_FAILED;
-}
-
-
-/*
- * internal_ping
- *		Determine if a server is running and if we can connect to it.
- *
- * The argument is a connection that's been started, but not completed.
- */
-static PGPing
-internal_ping(PGconn *conn)
-{
-	/* Say "no attempt" if we never got to PQconnectPoll */
-	if (!conn || !conn->options_valid)
-		return PQPING_NO_ATTEMPT;
-
-	/* Attempt to complete the connection */
-	if (conn->status != CONNECTION_BAD)
-		(void) connectDBComplete(conn);
-
-	/* Definitely OK if we succeeded */
-	if (conn->status != CONNECTION_BAD)
-		return PQPING_OK;
-
-	/*
-	 * Here begins the interesting part of "ping": determine the cause of the
-	 * failure in sufficient detail to decide what to return.  We do not want
-	 * to report that the server is not up just because we didn't have a valid
-	 * password, for example.  In fact, any sort of authentication request
-	 * implies the server is up.  (We need this check since the libpq side of
-	 * things might have pulled the plug on the connection before getting an
-	 * error as such from the postmaster.)
-	 */
-	if (conn->auth_req_received)
-		return PQPING_OK;
-
-	/*
-	 * If we failed to get any ERROR response from the postmaster, report
-	 * PQPING_NO_RESPONSE.  This result could be somewhat misleading for a
-	 * pre-7.4 server, since it won't send back a SQLSTATE, but those are long
-	 * out of support.  Another corner case where the server could return a
-	 * failure without a SQLSTATE is fork failure, but PQPING_NO_RESPONSE
-	 * isn't totally unreasonable for that anyway.  We expect that every other
-	 * failure case in a modern server will produce a report with a SQLSTATE.
-	 *
-	 * NOTE: whenever we get around to making libpq generate SQLSTATEs for
-	 * client-side errors, we should either not store those into
-	 * last_sqlstate, or add an extra flag so we can tell client-side errors
-	 * apart from server-side ones.
-	 */
-	if (strlen(conn->last_sqlstate) != 5)
-		return PQPING_NO_RESPONSE;
-
-	/*
-	 * Report PQPING_REJECT if server says it's not accepting connections.
-	 */
-	if (strcmp(conn->last_sqlstate, ERRCODE_CANNOT_CONNECT_NOW) == 0)
-		return PQPING_REJECT;
-
-	/*
-	 * Any other SQLSTATE can be taken to indicate that the server is up.
-	 * Presumably it didn't like our username, password, or database name; or
-	 * perhaps it had some transient failure, but that should not be taken as
-	 * meaning "it's down".
-	 */
-	return PQPING_OK;
-}
-
-
-/*
- * makeEmptyPGconn
- *	 - create a PGconn data structure with (as yet) no interesting data
- */
-static PGconn *
-makeEmptyPGconn(void)
-{
-	PGconn	   *conn;
-
-#ifdef WIN32
-
-	/*
-	 * Make sure socket support is up and running in this process.
-	 *
-	 * Note: the Windows documentation says that we should eventually do a
-	 * matching WSACleanup() call, but experience suggests that that is at
-	 * least as likely to cause problems as fix them.  So we don't.
-	 */
-	static bool wsastartup_done = false;
-
-	if (!wsastartup_done)
-	{
-		WSADATA		wsaData;
-
-		if (WSAStartup(MAKEWORD(2, 2), &wsaData) != 0)
-			return NULL;
-		wsastartup_done = true;
-	}
-
-	/* Forget any earlier error */
-	WSASetLastError(0);
-#endif							/* WIN32 */
-
-	conn = (PGconn *) malloc(sizeof(PGconn));
-	if (conn == NULL)
-		return conn;
-
-	/* Zero all pointers and booleans */
-	MemSet(conn, 0, sizeof(PGconn));
-
-	/* install default notice hooks */
-	conn->noticeHooks.noticeRec = defaultNoticeReceiver;
-	conn->noticeHooks.noticeProc = defaultNoticeProcessor;
-
-	conn->status = CONNECTION_BAD;
-	conn->asyncStatus = PGASYNC_IDLE;
-	conn->pipelineStatus = PQ_PIPELINE_OFF;
-	conn->xactStatus = PQTRANS_IDLE;
-	conn->options_valid = false;
-	conn->nonblocking = false;
-	conn->client_encoding = PG_SQL_ASCII;
-	conn->std_strings = false;	/* unless server says differently */
-	conn->default_transaction_read_only = PG_BOOL_UNKNOWN;
-	conn->in_hot_standby = PG_BOOL_UNKNOWN;
-	conn->scram_sha_256_iterations = SCRAM_SHA_256_DEFAULT_ITERATIONS;
-	conn->verbosity = PQERRORS_DEFAULT;
-	conn->show_context = PQSHOW_CONTEXT_ERRORS;
-	conn->sock = PGINVALID_SOCKET;
-	conn->Pfdebug = NULL;
-
-	/*
-	 * We try to send at least 8K at a time, which is the usual size of pipe
-	 * buffers on Unix systems.  That way, when we are sending a large amount
-	 * of data, we avoid incurring extra kernel context swaps for partial
-	 * bufferloads.  The output buffer is initially made 16K in size, and we
-	 * try to dump it after accumulating 8K.
-	 *
-	 * With the same goal of minimizing context swaps, the input buffer will
-	 * be enlarged anytime it has less than 8K free, so we initially allocate
-	 * twice that.
-	 */
-	conn->inBufSize = 16 * 1024;
-	conn->inBuffer = (char *) malloc(conn->inBufSize);
-	conn->outBufSize = 16 * 1024;
-	conn->outBuffer = (char *) malloc(conn->outBufSize);
-	conn->rowBufLen = 32;
-	conn->rowBuf = (PGdataValue *) malloc(conn->rowBufLen * sizeof(PGdataValue));
-	initPQExpBuffer(&conn->errorMessage);
-	initPQExpBuffer(&conn->workBuffer);
-
-	if (conn->inBuffer == NULL ||
-		conn->outBuffer == NULL ||
-		conn->rowBuf == NULL ||
-		PQExpBufferBroken(&conn->errorMessage) ||
-		PQExpBufferBroken(&conn->workBuffer))
-	{
-		/* out of memory already :-( */
-		freePGconn(conn);
-		conn = NULL;
-	}
-
-	return conn;
-}
-
-/*
- * freePGconn
- *	 - free an idle (closed) PGconn data structure
- *
- * NOTE: this should not overlap any functionality with closePGconn().
- * Clearing/resetting of transient state belongs there; what we do here is
- * release data that is to be held for the life of the PGconn structure.
- * If a value ought to be cleared/freed during PQreset(), do it there not here.
- */
-static void
-freePGconn(PGconn *conn)
-{
-	/* let any event procs clean up their state data */
-	for (int i = 0; i < conn->nEvents; i++)
-	{
-		PGEventConnDestroy evt;
-
-		evt.conn = conn;
-		(void) conn->events[i].proc(PGEVT_CONNDESTROY, &evt,
-									conn->events[i].passThrough);
-		free(conn->events[i].name);
-	}
-
-	/* clean up pg_conn_host structures */
-	for (int i = 0; i < conn->nconnhost; ++i)
-	{
-		free(conn->connhost[i].host);
-		free(conn->connhost[i].hostaddr);
-		free(conn->connhost[i].port);
-		if (conn->connhost[i].password != NULL)
-		{
-			explicit_bzero(conn->connhost[i].password, strlen(conn->connhost[i].password));
-			free(conn->connhost[i].password);
-		}
-	}
-	free(conn->connhost);
-
-	free(conn->client_encoding_initial);
-	free(conn->events);
-	free(conn->pghost);
-	free(conn->pghostaddr);
-	free(conn->pgport);
-	free(conn->connect_timeout);
-	free(conn->pgtcp_user_timeout);
-	free(conn->pgoptions);
-	free(conn->appname);
-	free(conn->fbappname);
-	free(conn->dbName);
-	free(conn->replication);
-	free(conn->pguser);
-	if (conn->pgpass)
-	{
-		explicit_bzero(conn->pgpass, strlen(conn->pgpass));
-		free(conn->pgpass);
-	}
-	free(conn->pgpassfile);
-	free(conn->channel_binding);
-	free(conn->keepalives);
-	free(conn->keepalives_idle);
-	free(conn->keepalives_interval);
-	free(conn->keepalives_count);
-	free(conn->sslmode);
-	free(conn->sslcert);
-	free(conn->sslkey);
-	if (conn->sslpassword)
-	{
-		explicit_bzero(conn->sslpassword, strlen(conn->sslpassword));
-		free(conn->sslpassword);
-	}
-	free(conn->sslcertmode);
-	free(conn->sslrootcert);
-	free(conn->sslcrl);
-	free(conn->sslcrldir);
-	free(conn->sslcompression);
-	free(conn->sslsni);
-	free(conn->requirepeer);
-	free(conn->require_auth);
-	free(conn->ssl_min_protocol_version);
-	free(conn->ssl_max_protocol_version);
-	free(conn->gssencmode);
-	free(conn->krbsrvname);
-	free(conn->gsslib);
-	free(conn->gssdelegation);
-	free(conn->connip);
-	/* Note that conn->Pfdebug is not ours to close or free */
-	free(conn->write_err_msg);
-	free(conn->inBuffer);
-	free(conn->outBuffer);
-	free(conn->rowBuf);
-	free(conn->target_session_attrs);
-	free(conn->load_balance_hosts);
-	termPQExpBuffer(&conn->errorMessage);
-	termPQExpBuffer(&conn->workBuffer);
-
-	free(conn);
-}
-
-/*
- * store_conn_addrinfo
- *	 - copy addrinfo to PGconn object
- *
- * Copies the addrinfos from addrlist to the PGconn object such that the
- * addrinfos can be manipulated by libpq. Returns a positive integer on
- * failure, otherwise zero.
- */
-static int
-store_conn_addrinfo(PGconn *conn, struct addrinfo *addrlist)
-{
-	struct addrinfo *ai = addrlist;
-
-	conn->whichaddr = 0;
-
-	conn->naddr = 0;
-	while (ai)
-	{
-		ai = ai->ai_next;
-		conn->naddr++;
-	}
-
-	conn->addr = calloc(conn->naddr, sizeof(AddrInfo));
-	if (conn->addr == NULL)
-	{
-		libpq_append_conn_error(conn, "out of memory");
-		return 1;
-	}
-
-	ai = addrlist;
-	for (int i = 0; i < conn->naddr; i++)
-	{
-		conn->addr[i].family = ai->ai_family;
-
-		memcpy(&conn->addr[i].addr.addr, ai->ai_addr,
-			   ai->ai_addrlen);
-		conn->addr[i].addr.salen = ai->ai_addrlen;
-		ai = ai->ai_next;
-	}
-
-	return 0;
-}
-
-/*
- * release_conn_addrinfo
- *	 - Free any addrinfo list in the PGconn.
- */
-static void
-release_conn_addrinfo(PGconn *conn)
-{
-	if (conn->addr)
-	{
-		free(conn->addr);
-		conn->addr = NULL;
-	}
-}
-
-/*
- * sendTerminateConn
- *	 - Send a terminate message to backend.
- */
-static void
-sendTerminateConn(PGconn *conn)
-{
-	/*
-	 * Note that the protocol doesn't allow us to send Terminate messages
-	 * during the startup phase.
-	 */
-	if (conn->sock != PGINVALID_SOCKET && conn->status == CONNECTION_OK)
-	{
-		/*
-		 * Try to send "close connection" message to backend. Ignore any
-		 * error.
-		 */
-		pqPutMsgStart('X', conn);
-		pqPutMsgEnd(conn);
-		(void) pqFlush(conn);
-	}
-}
-
-/*
- * closePGconn
- *	 - properly close a connection to the backend
- *
- * This should reset or release all transient state, but NOT the connection
- * parameters.  On exit, the PGconn should be in condition to start a fresh
- * connection with the same parameters (see PQreset()).
- */
-static void
-closePGconn(PGconn *conn)
-{
-	/*
-	 * If possible, send Terminate message to close the connection politely.
-	 */
-	sendTerminateConn(conn);
-
-	/*
-	 * Must reset the blocking status so a possible reconnect will work.
-	 *
-	 * Don't call PQsetnonblocking() because it will fail if it's unable to
-	 * flush the connection.
-	 */
-	conn->nonblocking = false;
-
-	/*
-	 * Close the connection, reset all transient state, flush I/O buffers.
-	 * Note that this includes clearing conn's error state; we're no longer
-	 * interested in any failures associated with the old connection, and we
-	 * want a clean slate for any new connection attempt.
-	 */
-	pqDropConnection(conn, true);
-	conn->status = CONNECTION_BAD;	/* Well, not really _bad_ - just absent */
-	conn->asyncStatus = PGASYNC_IDLE;
-	conn->xactStatus = PQTRANS_IDLE;
-	conn->pipelineStatus = PQ_PIPELINE_OFF;
-	pqClearAsyncResult(conn);	/* deallocate result */
-	pqClearConnErrorState(conn);
-	release_conn_addrinfo(conn);
-
-	/* Reset all state obtained from server, too */
-	pqDropServerData(conn);
-}
-
-/*
- * PQfinish: properly close a connection to the backend. Also frees
- * the PGconn data structure so it shouldn't be re-used after this.
- */
-void
-PQfinish(PGconn *conn)
-{
-	if (conn)
-	{
-		closePGconn(conn);
-		freePGconn(conn);
-	}
-}
-
-/*
- * PQreset: resets the connection to the backend by closing the
- * existing connection and creating a new one.
- */
-void
-PQreset(PGconn *conn)
-{
-	if (conn)
-	{
-		closePGconn(conn);
-
-		if (connectDBStart(conn) && connectDBComplete(conn))
-		{
-			/*
-			 * Notify event procs of successful reset.
-			 */
-			int			i;
-
-			for (i = 0; i < conn->nEvents; i++)
-			{
-				PGEventConnReset evt;
-
-				evt.conn = conn;
-				(void) conn->events[i].proc(PGEVT_CONNRESET, &evt,
-											conn->events[i].passThrough);
-			}
-		}
-	}
-}
-
-
-/*
- * PQresetStart:
- * resets the connection to the backend
- * closes the existing connection and makes a new one
- * Returns 1 on success, 0 on failure.
- */
-int
-PQresetStart(PGconn *conn)
-{
-	if (conn)
-	{
-		closePGconn(conn);
-
-		return connectDBStart(conn);
-	}
-
-	return 0;
-}
-
-
-/*
- * PQresetPoll:
- * resets the connection to the backend
- * closes the existing connection and makes a new one
- */
-PostgresPollingStatusType
-PQresetPoll(PGconn *conn)
-{
-	if (conn)
-	{
-		PostgresPollingStatusType status = PQconnectPoll(conn);
-
-		if (status == PGRES_POLLING_OK)
-		{
-			/*
-			 * Notify event procs of successful reset.
-			 */
-			int			i;
-
-			for (i = 0; i < conn->nEvents; i++)
-			{
-				PGEventConnReset evt;
-
-				evt.conn = conn;
-				(void) conn->events[i].proc(PGEVT_CONNRESET, &evt,
-											conn->events[i].passThrough);
-			}
-		}
-
-		return status;
-	}
-
-	return PGRES_POLLING_FAILED;
-}
-
-/*
- * PQgetCancel: get a PGcancel structure corresponding to a connection.
- *
- * A copy is needed to be able to cancel a running query from a different
- * thread. If the same structure is used all structure members would have
- * to be individually locked (if the entire structure was locked, it would
- * be impossible to cancel a synchronous query because the structure would
- * have to stay locked for the duration of the query).
- */
-PGcancel *
-PQgetCancel(PGconn *conn)
-{
-	PGcancel   *cancel;
-
-	if (!conn)
-		return NULL;
-
-	if (conn->sock == PGINVALID_SOCKET)
-		return NULL;
-
-	cancel = malloc(sizeof(PGcancel));
-	if (cancel == NULL)
-		return NULL;
-
-	memcpy(&cancel->raddr, &conn->raddr, sizeof(SockAddr));
-	cancel->be_pid = conn->be_pid;
-	cancel->be_key = conn->be_key;
-	/* We use -1 to indicate an unset connection option */
-	cancel->pgtcp_user_timeout = -1;
-	cancel->keepalives = -1;
-	cancel->keepalives_idle = -1;
-	cancel->keepalives_interval = -1;
-	cancel->keepalives_count = -1;
-	if (conn->pgtcp_user_timeout != NULL)
-	{
-		if (!parse_int_param(conn->pgtcp_user_timeout,
-							 &cancel->pgtcp_user_timeout,
-							 conn, "tcp_user_timeout"))
-			goto fail;
-	}
-	if (conn->keepalives != NULL)
-	{
-		if (!parse_int_param(conn->keepalives,
-							 &cancel->keepalives,
-							 conn, "keepalives"))
-			goto fail;
-	}
-	if (conn->keepalives_idle != NULL)
-	{
-		if (!parse_int_param(conn->keepalives_idle,
-							 &cancel->keepalives_idle,
-							 conn, "keepalives_idle"))
-			goto fail;
-	}
-	if (conn->keepalives_interval != NULL)
-	{
-		if (!parse_int_param(conn->keepalives_interval,
-							 &cancel->keepalives_interval,
-							 conn, "keepalives_interval"))
-			goto fail;
-	}
-	if (conn->keepalives_count != NULL)
-	{
-		if (!parse_int_param(conn->keepalives_count,
-							 &cancel->keepalives_count,
-							 conn, "keepalives_count"))
-			goto fail;
-	}
-
-	return cancel;
-
-fail:
-	free(cancel);
-	return NULL;
-}
-
-/* PQfreeCancel: free a cancel structure */
-void
-PQfreeCancel(PGcancel *cancel)
-{
-	free(cancel);
-}
-
-
-/*
- * Sets an integer socket option on a TCP socket, if the provided value is
- * not negative.  Returns false if setsockopt fails for some reason.
- *
- * CAUTION: This needs to be signal safe, since it's used by PQcancel.
- */
-#if defined(TCP_USER_TIMEOUT) || !defined(WIN32)
-static bool
-optional_setsockopt(int fd, int protoid, int optid, int value)
-{
-	if (value < 0)
-		return true;
-	if (setsockopt(fd, protoid, optid, (char *) &value, sizeof(value)) < 0)
-		return false;
-	return true;
-}
-#endif
-
-
-/*
- * PQcancel: request query cancel
- *
- * The return value is true if the cancel request was successfully
- * dispatched, false if not (in which case an error message is available).
- * Note: successful dispatch is no guarantee that there will be any effect at
- * the backend.  The application must read the operation result as usual.
- *
- * On failure, an error message is stored in *errbuf, which must be of size
- * errbufsize (recommended size is 256 bytes).  *errbuf is not changed on
- * success return.
- *
- * CAUTION: we want this routine to be safely callable from a signal handler
- * (for example, an application might want to call it in a SIGINT handler).
- * This means we cannot use any C library routine that might be non-reentrant.
- * malloc/free are often non-reentrant, and anything that might call them is
- * just as dangerous.  We avoid sprintf here for that reason.  Building up
- * error messages with strcpy/strcat is tedious but should be quite safe.
- * We also save/restore errno in case the signal handler support doesn't.
- */
-int
-PQcancel(PGcancel *cancel, char *errbuf, int errbufsize)
-{
-	int			save_errno = SOCK_ERRNO;
-	pgsocket	tmpsock = PGINVALID_SOCKET;
-	int			maxlen;
-	struct
-	{
-		uint32		packetlen;
-		CancelRequestPacket cp;
-	}			crp;
-
-	if (!cancel)
-	{
-		strlcpy(errbuf, "PQcancel() -- no cancel object supplied", errbufsize);
-		/* strlcpy probably doesn't change errno, but be paranoid */
-		SOCK_ERRNO_SET(save_errno);
-		return false;
-	}
-
-	/*
-	 * We need to open a temporary connection to the postmaster. Do this with
-	 * only kernel calls.
-	 */
-	if ((tmpsock = socket(cancel->raddr.addr.ss_family, SOCK_STREAM, 0)) == PGINVALID_SOCKET)
-	{
-		strlcpy(errbuf, "PQcancel() -- socket() failed: ", errbufsize);
-		goto cancel_errReturn;
-	}
-
-	/*
-	 * Since this connection will only be used to send a single packet of
-	 * data, we don't need NODELAY.  We also don't set the socket to
-	 * nonblocking mode, because the API definition of PQcancel requires the
-	 * cancel to be sent in a blocking way.
-	 *
-	 * We do set socket options related to keepalives and other TCP timeouts.
-	 * This ensures that this function does not block indefinitely when
-	 * reasonable keepalive and timeout settings have been provided.
-	 */
-	if (cancel->raddr.addr.ss_family != AF_UNIX &&
-		cancel->keepalives != 0)
-	{
-#ifndef WIN32
-		if (!optional_setsockopt(tmpsock, SOL_SOCKET, SO_KEEPALIVE, 1))
-		{
-			strlcpy(errbuf, "PQcancel() -- setsockopt(SO_KEEPALIVE) failed: ", errbufsize);
-			goto cancel_errReturn;
-		}
-
-#ifdef PG_TCP_KEEPALIVE_IDLE
-		if (!optional_setsockopt(tmpsock, IPPROTO_TCP, PG_TCP_KEEPALIVE_IDLE,
-								 cancel->keepalives_idle))
-		{
-			strlcpy(errbuf, "PQcancel() -- setsockopt(" PG_TCP_KEEPALIVE_IDLE_STR ") failed: ", errbufsize);
-			goto cancel_errReturn;
-		}
-#endif
-
-#ifdef TCP_KEEPINTVL
-		if (!optional_setsockopt(tmpsock, IPPROTO_TCP, TCP_KEEPINTVL,
-								 cancel->keepalives_interval))
-		{
-			strlcpy(errbuf, "PQcancel() -- setsockopt(TCP_KEEPINTVL) failed: ", errbufsize);
-			goto cancel_errReturn;
-		}
-#endif
-
-#ifdef TCP_KEEPCNT
-		if (!optional_setsockopt(tmpsock, IPPROTO_TCP, TCP_KEEPCNT,
-								 cancel->keepalives_count))
-		{
-			strlcpy(errbuf, "PQcancel() -- setsockopt(TCP_KEEPCNT) failed: ", errbufsize);
-			goto cancel_errReturn;
-		}
-#endif
-
-#else							/* WIN32 */
-
-#ifdef SIO_KEEPALIVE_VALS
-		if (!setKeepalivesWin32(tmpsock,
-								cancel->keepalives_idle,
-								cancel->keepalives_interval))
-		{
-			strlcpy(errbuf, "PQcancel() -- WSAIoctl(SIO_KEEPALIVE_VALS) failed: ", errbufsize);
-			goto cancel_errReturn;
-		}
-#endif							/* SIO_KEEPALIVE_VALS */
-#endif							/* WIN32 */
-
-		/* TCP_USER_TIMEOUT works the same way on Unix and Windows */
-#ifdef TCP_USER_TIMEOUT
-		if (!optional_setsockopt(tmpsock, IPPROTO_TCP, TCP_USER_TIMEOUT,
-								 cancel->pgtcp_user_timeout))
-		{
-			strlcpy(errbuf, "PQcancel() -- setsockopt(TCP_USER_TIMEOUT) failed: ", errbufsize);
-			goto cancel_errReturn;
-		}
-#endif
-	}
-
-retry3:
-	if (connect(tmpsock, (struct sockaddr *) &cancel->raddr.addr,
-				cancel->raddr.salen) < 0)
-	{
-		if (SOCK_ERRNO == EINTR)
-			/* Interrupted system call - we'll just try again */
-			goto retry3;
-		strlcpy(errbuf, "PQcancel() -- connect() failed: ", errbufsize);
-		goto cancel_errReturn;
-	}
-
-	/* Create and send the cancel request packet. */
-
-	crp.packetlen = pg_hton32((uint32) sizeof(crp));
-	crp.cp.cancelRequestCode = (MsgType) pg_hton32(CANCEL_REQUEST_CODE);
-	crp.cp.backendPID = pg_hton32(cancel->be_pid);
-	crp.cp.cancelAuthCode = pg_hton32(cancel->be_key);
-
-retry4:
-	if (send(tmpsock, (char *) &crp, sizeof(crp), 0) != (int) sizeof(crp))
-	{
-		if (SOCK_ERRNO == EINTR)
-			/* Interrupted system call - we'll just try again */
-			goto retry4;
-		strlcpy(errbuf, "PQcancel() -- send() failed: ", errbufsize);
-		goto cancel_errReturn;
-	}
-
-	/*
-	 * Wait for the postmaster to close the connection, which indicates that
-	 * it's processed the request.  Without this delay, we might issue another
-	 * command only to find that our cancel zaps that command instead of the
-	 * one we thought we were canceling.  Note we don't actually expect this
-	 * read to obtain any data, we are just waiting for EOF to be signaled.
-	 */
-retry5:
-	if (recv(tmpsock, (char *) &crp, 1, 0) < 0)
-	{
-		if (SOCK_ERRNO == EINTR)
-			/* Interrupted system call - we'll just try again */
-			goto retry5;
-		/* we ignore other error conditions */
-	}
-
-	/* All done */
-	closesocket(tmpsock);
-	SOCK_ERRNO_SET(save_errno);
-	return true;
-
-cancel_errReturn:
-
-	/*
-	 * Make sure we don't overflow the error buffer. Leave space for the \n at
-	 * the end, and for the terminating zero.
-	 */
-	maxlen = errbufsize - strlen(errbuf) - 2;
-	if (maxlen >= 0)
-	{
-		/*
-		 * We can't invoke strerror here, since it's not signal-safe.  Settle
-		 * for printing the decimal value of errno.  Even that has to be done
-		 * the hard way.
-		 */
-		int			val = SOCK_ERRNO;
-		char		buf[32];
-		char	   *bufp;
-
-		bufp = buf + sizeof(buf) - 1;
-		*bufp = '\0';
-		do
-		{
-			*(--bufp) = (val % 10) + '0';
-			val /= 10;
-		} while (val > 0);
-		bufp -= 6;
-		memcpy(bufp, "error ", 6);
-		strncat(errbuf, bufp, maxlen);
-		strcat(errbuf, "\n");
-	}
-	if (tmpsock != PGINVALID_SOCKET)
-		closesocket(tmpsock);
-	SOCK_ERRNO_SET(save_errno);
-	return false;
-}
-
-
-/*
- * PQrequestCancel: old, not thread-safe function for requesting query cancel
- *
- * Returns true if able to send the cancel request, false if not.
- *
- * On failure, the error message is saved in conn->errorMessage; this means
- * that this can't be used when there might be other active operations on
- * the connection object.
- *
- * NOTE: error messages will be cut off at the current size of the
- * error message buffer, since we dare not try to expand conn->errorMessage!
- */
-int
-PQrequestCancel(PGconn *conn)
-{
-	int			r;
-	PGcancel   *cancel;
-
-	/* Check we have an open connection */
-	if (!conn)
-		return false;
-
-	if (conn->sock == PGINVALID_SOCKET)
-	{
-		strlcpy(conn->errorMessage.data,
-				"PQrequestCancel() -- connection is not open\n",
-				conn->errorMessage.maxlen);
-		conn->errorMessage.len = strlen(conn->errorMessage.data);
-		conn->errorReported = 0;
-
-		return false;
-	}
-
-	cancel = PQgetCancel(conn);
-	if (cancel)
-	{
-		r = PQcancel(cancel, conn->errorMessage.data,
-					 conn->errorMessage.maxlen);
-		PQfreeCancel(cancel);
-	}
-	else
-	{
-		strlcpy(conn->errorMessage.data, "out of memory",
-				conn->errorMessage.maxlen);
-		r = false;
-	}
-
-	if (!r)
-	{
-		conn->errorMessage.len = strlen(conn->errorMessage.data);
-		conn->errorReported = 0;
-	}
-
-	return r;
-}
-
-
-/*
- * pqPacketSend() -- convenience routine to send a message to server.
- *
- * pack_type: the single-byte message type code.  (Pass zero for startup
- * packets, which have no message type code.)
- *
- * buf, buf_len: contents of message.  The given length includes only what
- * is in buf; the message type and message length fields are added here.
- *
- * RETURNS: STATUS_ERROR if the write fails, STATUS_OK otherwise.
- * SIDE_EFFECTS: may block.
- */
-int
-pqPacketSend(PGconn *conn, char pack_type,
-			 const void *buf, size_t buf_len)
-{
-	/* Start the message. */
-	if (pqPutMsgStart(pack_type, conn))
-		return STATUS_ERROR;
-
-	/* Send the message body. */
-	if (pqPutnchar(buf, buf_len, conn))
-		return STATUS_ERROR;
-
-	/* Finish the message. */
-	if (pqPutMsgEnd(conn))
-		return STATUS_ERROR;
-
-	/* Flush to ensure backend gets it. */
-	if (pqFlush(conn))
-		return STATUS_ERROR;
-
-	return STATUS_OK;
-}
-
-#ifdef USE_LDAP
-
-#define LDAP_URL	"ldap://"
-#define LDAP_DEF_PORT	389
-#define PGLDAP_TIMEOUT 2
-
-#define ld_is_sp_tab(x) ((x) == ' ' || (x) == '\t')
-#define ld_is_nl_cr(x) ((x) == '\r' || (x) == '\n')
-
-
-/*
- *		ldapServiceLookup
- *
- * Search the LDAP URL passed as first argument, treat the result as a
- * string of connection options that are parsed and added to the array of
- * options passed as second argument.
- *
- * LDAP URLs must conform to RFC 1959 without escape sequences.
- *	ldap://host:port/dn?attributes?scope?filter?extensions
- *
- * Returns
- *	0 if the lookup was successful,
- *	1 if the connection to the LDAP server could be established but
- *	  the search was unsuccessful,
- *	2 if a connection could not be established, and
- *	3 if a fatal error occurred.
- *
- * An error message is appended to *errorMessage for return codes 1 and 3.
- */
-static int
-ldapServiceLookup(const char *purl, PQconninfoOption *options,
-				  PQExpBuffer errorMessage)
-{
-	int			port = LDAP_DEF_PORT,
-				scope,
-				rc,
-				size,
-				state,
-				oldstate,
-				i;
-#ifndef WIN32
-	int			msgid;
-#endif
-	bool		found_keyword;
-	char	   *url,
-			   *hostname,
-			   *portstr,
-			   *endptr,
-			   *dn,
-			   *scopestr,
-			   *filter,
-			   *result,
-			   *p,
-			   *p1 = NULL,
-			   *optname = NULL,
-			   *optval = NULL;
-	char	   *attrs[2] = {NULL, NULL};
-	LDAP	   *ld = NULL;
-	LDAPMessage *res,
-			   *entry;
-	struct berval **values;
-	LDAP_TIMEVAL time = {PGLDAP_TIMEOUT, 0};
-
-	if ((url = strdup(purl)) == NULL)
-	{
-		libpq_append_error(errorMessage, "out of memory");
-		return 3;
-	}
-
-	/*
-	 * Parse URL components, check for correctness.  Basically, url has '\0'
-	 * placed at component boundaries and variables are pointed at each
-	 * component.
-	 */
-
-	if (pg_strncasecmp(url, LDAP_URL, strlen(LDAP_URL)) != 0)
-	{
-		libpq_append_error(errorMessage,
-						   "invalid LDAP URL \"%s\": scheme must be ldap://", purl);
-		free(url);
-		return 3;
-	}
-
-	/* hostname */
-	hostname = url + strlen(LDAP_URL);
-	if (*hostname == '/')		/* no hostname? */
-		hostname = DefaultHost; /* the default */
-
-	/* dn, "distinguished name" */
-	p = strchr(url + strlen(LDAP_URL), '/');
-	if (p == NULL || *(p + 1) == '\0' || *(p + 1) == '?')
-	{
-		libpq_append_error(errorMessage,
-						   "invalid LDAP URL \"%s\": missing distinguished name",
-						   purl);
-		free(url);
-		return 3;
-	}
-	*p = '\0';					/* terminate hostname */
-	dn = p + 1;
-
-	/* attribute */
-	if ((p = strchr(dn, '?')) == NULL || *(p + 1) == '\0' || *(p + 1) == '?')
-	{
-		libpq_append_error(errorMessage,
-						   "invalid LDAP URL \"%s\": must have exactly one attribute",
-						   purl);
-		free(url);
-		return 3;
-	}
-	*p = '\0';
-	attrs[0] = p + 1;
-
-	/* scope */
-	if ((p = strchr(attrs[0], '?')) == NULL || *(p + 1) == '\0' || *(p + 1) == '?')
-	{
-		libpq_append_error(errorMessage,
-						   "invalid LDAP URL \"%s\": must have search scope (base/one/sub)",
-						   purl);
-		free(url);
-		return 3;
-	}
-	*p = '\0';
-	scopestr = p + 1;
-
-	/* filter */
-	if ((p = strchr(scopestr, '?')) == NULL || *(p + 1) == '\0' || *(p + 1) == '?')
-	{
-		libpq_append_error(errorMessage,
-						   "invalid LDAP URL \"%s\": no filter",
-						   purl);
-		free(url);
-		return 3;
-	}
-	*p = '\0';
-	filter = p + 1;
-	if ((p = strchr(filter, '?')) != NULL)
-		*p = '\0';
-
-	/* port number? */
-	if ((p1 = strchr(hostname, ':')) != NULL)
-	{
-		long		lport;
-
-		*p1 = '\0';
-		portstr = p1 + 1;
-		errno = 0;
-		lport = strtol(portstr, &endptr, 10);
-		if (*portstr == '\0' || *endptr != '\0' || errno || lport < 0 || lport > 65535)
-		{
-			libpq_append_error(errorMessage,
-							   "invalid LDAP URL \"%s\": invalid port number",
-							   purl);
-			free(url);
-			return 3;
-		}
-		port = (int) lport;
-	}
-
-	/* Allow only one attribute */
-	if (strchr(attrs[0], ',') != NULL)
-	{
-		libpq_append_error(errorMessage,
-						   "invalid LDAP URL \"%s\": must have exactly one attribute",
-						   purl);
-		free(url);
-		return 3;
-	}
-
-	/* set scope */
-	if (pg_strcasecmp(scopestr, "base") == 0)
-		scope = LDAP_SCOPE_BASE;
-	else if (pg_strcasecmp(scopestr, "one") == 0)
-		scope = LDAP_SCOPE_ONELEVEL;
-	else if (pg_strcasecmp(scopestr, "sub") == 0)
-		scope = LDAP_SCOPE_SUBTREE;
-	else
-	{
-		libpq_append_error(errorMessage,
-						   "invalid LDAP URL \"%s\": must have search scope (base/one/sub)",
-						   purl);
-		free(url);
-		return 3;
-	}
-
-	/* initialize LDAP structure */
-	if ((ld = ldap_init(hostname, port)) == NULL)
-	{
-		libpq_append_error(errorMessage, "could not create LDAP structure");
-		free(url);
-		return 3;
-	}
-
-	/*
-	 * Perform an explicit anonymous bind.
-	 *
-	 * LDAP does not require that an anonymous bind is performed explicitly,
-	 * but we want to distinguish between the case where LDAP bind does not
-	 * succeed within PGLDAP_TIMEOUT seconds (return 2 to continue parsing the
-	 * service control file) and the case where querying the LDAP server fails
-	 * (return 1 to end parsing).
-	 *
-	 * Unfortunately there is no way of setting a timeout that works for both
-	 * Windows and OpenLDAP.
-	 */
-#ifdef WIN32
-	/* the nonstandard ldap_connect function performs an anonymous bind */
-	if (ldap_connect(ld, &time) != LDAP_SUCCESS)
-	{
-		/* error or timeout in ldap_connect */
-		free(url);
-		ldap_unbind(ld);
-		return 2;
-	}
-#else							/* !WIN32 */
-	/* in OpenLDAP, use the LDAP_OPT_NETWORK_TIMEOUT option */
-	if (ldap_set_option(ld, LDAP_OPT_NETWORK_TIMEOUT, &time) != LDAP_SUCCESS)
-	{
-		free(url);
-		ldap_unbind(ld);
-		return 3;
-	}
-
-	/* anonymous bind */
-	if ((msgid = ldap_simple_bind(ld, NULL, NULL)) == -1)
-	{
-		/* error or network timeout */
-		free(url);
-		ldap_unbind(ld);
-		return 2;
-	}
-
-	/* wait some time for the connection to succeed */
-	res = NULL;
-	if ((rc = ldap_result(ld, msgid, LDAP_MSG_ALL, &time, &res)) == -1 ||
-		res == NULL)
-	{
-		/* error or timeout */
-		if (res != NULL)
-			ldap_msgfree(res);
-		free(url);
-		ldap_unbind(ld);
-		return 2;
-	}
-	ldap_msgfree(res);
-
-	/* reset timeout */
-	time.tv_sec = -1;
-	if (ldap_set_option(ld, LDAP_OPT_NETWORK_TIMEOUT, &time) != LDAP_SUCCESS)
-	{
-		free(url);
-		ldap_unbind(ld);
-		return 3;
-	}
-#endif							/* WIN32 */
-
-	/* search */
-	res = NULL;
-	if ((rc = ldap_search_st(ld, dn, scope, filter, attrs, 0, &time, &res))
-		!= LDAP_SUCCESS)
-	{
-		if (res != NULL)
-			ldap_msgfree(res);
-		libpq_append_error(errorMessage, "lookup on LDAP server failed: %s", ldap_err2string(rc));
-		ldap_unbind(ld);
-		free(url);
-		return 1;
-	}
-
-	/* complain if there was not exactly one result */
-	if ((rc = ldap_count_entries(ld, res)) != 1)
-	{
-		if (rc > 1)
-			libpq_append_error(errorMessage, "more than one entry found on LDAP lookup");
-		else
-			libpq_append_error(errorMessage, "no entry found on LDAP lookup");
-		ldap_msgfree(res);
-		ldap_unbind(ld);
-		free(url);
-		return 1;
-	}
-
-	/* get entry */
-	if ((entry = ldap_first_entry(ld, res)) == NULL)
-	{
-		/* should never happen */
-		libpq_append_error(errorMessage, "no entry found on LDAP lookup");
-		ldap_msgfree(res);
-		ldap_unbind(ld);
-		free(url);
-		return 1;
-	}
-
-	/* get values */
-	if ((values = ldap_get_values_len(ld, entry, attrs[0])) == NULL)
-	{
-		libpq_append_error(errorMessage, "attribute has no values on LDAP lookup");
-		ldap_msgfree(res);
-		ldap_unbind(ld);
-		free(url);
-		return 1;
-	}
-
-	ldap_msgfree(res);
-	free(url);
-
-	if (values[0] == NULL)
-	{
-		libpq_append_error(errorMessage, "attribute has no values on LDAP lookup");
-		ldap_value_free_len(values);
-		ldap_unbind(ld);
-		return 1;
-	}
-
-	/* concatenate values into a single string with newline terminators */
-	size = 1;					/* for the trailing null */
-	for (i = 0; values[i] != NULL; i++)
-		size += values[i]->bv_len + 1;
-	if ((result = malloc(size)) == NULL)
-	{
-		libpq_append_error(errorMessage, "out of memory");
-		ldap_value_free_len(values);
-		ldap_unbind(ld);
-		return 3;
-	}
-	p = result;
-	for (i = 0; values[i] != NULL; i++)
-	{
-		memcpy(p, values[i]->bv_val, values[i]->bv_len);
-		p += values[i]->bv_len;
-		*(p++) = '\n';
-	}
-	*p = '\0';
-
-	ldap_value_free_len(values);
-	ldap_unbind(ld);
-
-	/* parse result string */
-	oldstate = state = 0;
-	for (p = result; *p != '\0'; ++p)
-	{
-		switch (state)
-		{
-			case 0:				/* between entries */
-				if (!ld_is_sp_tab(*p) && !ld_is_nl_cr(*p))
-				{
-					optname = p;
-					state = 1;
-				}
-				break;
-			case 1:				/* in option name */
-				if (ld_is_sp_tab(*p))
-				{
-					*p = '\0';
-					state = 2;
-				}
-				else if (ld_is_nl_cr(*p))
-				{
-					libpq_append_error(errorMessage,
-									   "missing \"=\" after \"%s\" in connection info string",
-									   optname);
-					free(result);
-					return 3;
-				}
-				else if (*p == '=')
-				{
-					*p = '\0';
-					state = 3;
-				}
-				break;
-			case 2:				/* after option name */
-				if (*p == '=')
-				{
-					state = 3;
-				}
-				else if (!ld_is_sp_tab(*p))
-				{
-					libpq_append_error(errorMessage,
-									   "missing \"=\" after \"%s\" in connection info string",
-									   optname);
-					free(result);
-					return 3;
-				}
-				break;
-			case 3:				/* before option value */
-				if (*p == '\'')
-				{
-					optval = p + 1;
-					p1 = p + 1;
-					state = 5;
-				}
-				else if (ld_is_nl_cr(*p))
-				{
-					optval = optname + strlen(optname); /* empty */
-					state = 0;
-				}
-				else if (!ld_is_sp_tab(*p))
-				{
-					optval = p;
-					state = 4;
-				}
-				break;
-			case 4:				/* in unquoted option value */
-				if (ld_is_sp_tab(*p) || ld_is_nl_cr(*p))
-				{
-					*p = '\0';
-					state = 0;
-				}
-				break;
-			case 5:				/* in quoted option value */
-				if (*p == '\'')
-				{
-					*p1 = '\0';
-					state = 0;
-				}
-				else if (*p == '\\')
-					state = 6;
-				else
-					*(p1++) = *p;
-				break;
-			case 6:				/* in quoted option value after escape */
-				*(p1++) = *p;
-				state = 5;
-				break;
-		}
-
-		if (state == 0 && oldstate != 0)
-		{
-			found_keyword = false;
-			for (i = 0; options[i].keyword; i++)
-			{
-				if (strcmp(options[i].keyword, optname) == 0)
-				{
-					if (options[i].val == NULL)
-					{
-						options[i].val = strdup(optval);
-						if (!options[i].val)
-						{
-							libpq_append_error(errorMessage, "out of memory");
-							free(result);
-							return 3;
-						}
-					}
-					found_keyword = true;
-					break;
-				}
-			}
-			if (!found_keyword)
-			{
-				libpq_append_error(errorMessage, "invalid connection option \"%s\"", optname);
-				free(result);
-				return 1;
-			}
-			optname = NULL;
-			optval = NULL;
-		}
-		oldstate = state;
-	}
-
-	free(result);
-
-	if (state == 5 || state == 6)
-	{
-		libpq_append_error(errorMessage,
-						   "unterminated quoted string in connection info string");
-		return 3;
-	}
-
-	return 0;
-}
-
-#endif							/* USE_LDAP */
-
-/*
- * parseServiceInfo: if a service name has been given, look it up and absorb
- * connection options from it into *options.
- *
- * Returns 0 on success, nonzero on failure.  On failure, if errorMessage
- * isn't null, also store an error message there.  (Note: the only reason
- * this function and related ones don't dump core on errorMessage == NULL
- * is the undocumented fact that appendPQExpBuffer does nothing when passed
- * a null PQExpBuffer pointer.)
- */
-static int
-parseServiceInfo(PQconninfoOption *options, PQExpBuffer errorMessage)
-{
-	const char *service = conninfo_getval(options, "service");
-	char		serviceFile[MAXPGPATH];
-	char	   *env;
-	bool		group_found = false;
-	int			status;
-	struct stat stat_buf;
-
-	/*
-	 * We have to special-case the environment variable PGSERVICE here, since
-	 * this is and should be called before inserting environment defaults for
-	 * other connection options.
-	 */
-	if (service == NULL)
-		service = getenv("PGSERVICE");
-
-	/* If no service name given, nothing to do */
-	if (service == NULL)
-		return 0;
-
-	/*
-	 * Try PGSERVICEFILE if specified, else try ~/.pg_service.conf (if that
-	 * exists).
-	 */
-	if ((env = getenv("PGSERVICEFILE")) != NULL)
-		strlcpy(serviceFile, env, sizeof(serviceFile));
-	else
-	{
-		char		homedir[MAXPGPATH];
-
-		if (!pqGetHomeDirectory(homedir, sizeof(homedir)))
-			goto next_file;
-		snprintf(serviceFile, MAXPGPATH, "%s/%s", homedir, ".pg_service.conf");
-		if (stat(serviceFile, &stat_buf) != 0)
-			goto next_file;
-	}
-
-	status = parseServiceFile(serviceFile, service, options, errorMessage, &group_found);
-	if (group_found || status != 0)
-		return status;
-
-next_file:
-
-	/*
-	 * This could be used by any application so we can't use the binary
-	 * location to find our config files.
-	 */
-	snprintf(serviceFile, MAXPGPATH, "%s/pg_service.conf",
-			 getenv("PGSYSCONFDIR") ? getenv("PGSYSCONFDIR") : SYSCONFDIR);
-	if (stat(serviceFile, &stat_buf) != 0)
-		goto last_file;
-
-	status = parseServiceFile(serviceFile, service, options, errorMessage, &group_found);
-	if (status != 0)
-		return status;
-
-last_file:
-	if (!group_found)
-	{
-		libpq_append_error(errorMessage, "definition of service \"%s\" not found", service);
-		return 3;
-	}
-
-	return 0;
-}
-
-static int
-parseServiceFile(const char *serviceFile,
-				 const char *service,
-				 PQconninfoOption *options,
-				 PQExpBuffer errorMessage,
-				 bool *group_found)
-{
-	int			result = 0,
-				linenr = 0,
-				i;
-	FILE	   *f;
-	char	   *line;
-	char		buf[1024];
-
-	*group_found = false;
-
-	f = fopen(serviceFile, "r");
-	if (f == NULL)
-	{
-		libpq_append_error(errorMessage, "service file \"%s\" not found", serviceFile);
-		return 1;
-	}
-
-	while ((line = fgets(buf, sizeof(buf), f)) != NULL)
-	{
-		int			len;
-
-		linenr++;
-
-		if (strlen(line) >= sizeof(buf) - 1)
-		{
-			libpq_append_error(errorMessage,
-							   "line %d too long in service file \"%s\"",
-							   linenr,
-							   serviceFile);
-			result = 2;
-			goto exit;
-		}
-
-		/* ignore whitespace at end of line, especially the newline */
-		len = strlen(line);
-		while (len > 0 && isspace((unsigned char) line[len - 1]))
-			line[--len] = '\0';
-
-		/* ignore leading whitespace too */
-		while (*line && isspace((unsigned char) line[0]))
-			line++;
-
-		/* ignore comments and empty lines */
-		if (line[0] == '\0' || line[0] == '#')
-			continue;
-
-		/* Check for right groupname */
-		if (line[0] == '[')
-		{
-			if (*group_found)
-			{
-				/* end of desired group reached; return success */
-				goto exit;
-			}
-
-			if (strncmp(line + 1, service, strlen(service)) == 0 &&
-				line[strlen(service) + 1] == ']')
-				*group_found = true;
-			else
-				*group_found = false;
-		}
-		else
-		{
-			if (*group_found)
-			{
-				/*
-				 * Finally, we are in the right group and can parse the line
-				 */
-				char	   *key,
-						   *val;
-				bool		found_keyword;
-
-#ifdef USE_LDAP
-				if (strncmp(line, "ldap", 4) == 0)
-				{
-					int			rc = ldapServiceLookup(line, options, errorMessage);
-
-					/* if rc = 2, go on reading for fallback */
-					switch (rc)
-					{
-						case 0:
-							goto exit;
-						case 1:
-						case 3:
-							result = 3;
-							goto exit;
-						case 2:
-							continue;
-					}
-				}
-#endif
-
-				key = line;
-				val = strchr(line, '=');
-				if (val == NULL)
-				{
-					libpq_append_error(errorMessage,
-									   "syntax error in service file \"%s\", line %d",
-									   serviceFile,
-									   linenr);
-					result = 3;
-					goto exit;
-				}
-				*val++ = '\0';
-
-				if (strcmp(key, "service") == 0)
-				{
-					libpq_append_error(errorMessage,
-									   "nested service specifications not supported in service file \"%s\", line %d",
-									   serviceFile,
-									   linenr);
-					result = 3;
-					goto exit;
-				}
-
-				/*
-				 * Set the parameter --- but don't override any previous
-				 * explicit setting.
-				 */
-				found_keyword = false;
-				for (i = 0; options[i].keyword; i++)
-				{
-					if (strcmp(options[i].keyword, key) == 0)
-					{
-						if (options[i].val == NULL)
-							options[i].val = strdup(val);
-						if (!options[i].val)
-						{
-							libpq_append_error(errorMessage, "out of memory");
-							result = 3;
-							goto exit;
-						}
-						found_keyword = true;
-						break;
-					}
-				}
-
-				if (!found_keyword)
-				{
-					libpq_append_error(errorMessage,
-									   "syntax error in service file \"%s\", line %d",
-									   serviceFile,
-									   linenr);
-					result = 3;
-					goto exit;
-				}
-			}
-		}
-	}
-
-exit:
-	fclose(f);
-
-	return result;
-}
-
-
-/*
- *		PQconninfoParse
- *
- * Parse a string like PQconnectdb() would do and return the
- * resulting connection options array.  NULL is returned on failure.
- * The result contains only options specified directly in the string,
- * not any possible default values.
- *
- * If errmsg isn't NULL, *errmsg is set to NULL on success, or a malloc'd
- * string on failure (use PQfreemem to free it).  In out-of-memory conditions
- * both *errmsg and the result could be NULL.
- *
- * NOTE: the returned array is dynamically allocated and should
- * be freed when no longer needed via PQconninfoFree().
- */
-PQconninfoOption *
-PQconninfoParse(const char *conninfo, char **errmsg)
-{
-	PQExpBufferData errorBuf;
-	PQconninfoOption *connOptions;
-
-	if (errmsg)
-		*errmsg = NULL;			/* default */
-	initPQExpBuffer(&errorBuf);
-	if (PQExpBufferDataBroken(errorBuf))
-		return NULL;			/* out of memory already :-( */
-	connOptions = parse_connection_string(conninfo, &errorBuf, false);
-	if (connOptions == NULL && errmsg)
-		*errmsg = errorBuf.data;
-	else
-		termPQExpBuffer(&errorBuf);
-	return connOptions;
-}
-
-/*
- * Build a working copy of the constant PQconninfoOptions array.
- */
-static PQconninfoOption *
-conninfo_init(PQExpBuffer errorMessage)
-{
-	PQconninfoOption *options;
-	PQconninfoOption *opt_dest;
-	const internalPQconninfoOption *cur_opt;
-
-	/*
-	 * Get enough memory for all options in PQconninfoOptions, even if some
-	 * end up being filtered out.
-	 */
-	options = (PQconninfoOption *) malloc(sizeof(PQconninfoOption) * sizeof(PQconninfoOptions) / sizeof(PQconninfoOptions[0]));
-	if (options == NULL)
-	{
-		libpq_append_error(errorMessage, "out of memory");
-		return NULL;
-	}
-	opt_dest = options;
-
-	for (cur_opt = PQconninfoOptions; cur_opt->keyword; cur_opt++)
-	{
-		/* Only copy the public part of the struct, not the full internal */
-		memcpy(opt_dest, cur_opt, sizeof(PQconninfoOption));
-		opt_dest++;
-	}
-	MemSet(opt_dest, 0, sizeof(PQconninfoOption));
-
-	return options;
-}
-
-/*
- * Connection string parser
- *
- * Returns a malloc'd PQconninfoOption array, if parsing is successful.
- * Otherwise, NULL is returned and an error message is added to errorMessage.
- *
- * If use_defaults is true, default values are filled in (from a service file,
- * environment variables, etc).
- */
-static PQconninfoOption *
-parse_connection_string(const char *connstr, PQExpBuffer errorMessage,
-						bool use_defaults)
-{
-	/* Parse as URI if connection string matches URI prefix */
-	if (uri_prefix_length(connstr) != 0)
-		return conninfo_uri_parse(connstr, errorMessage, use_defaults);
-
-	/* Parse as default otherwise */
-	return conninfo_parse(connstr, errorMessage, use_defaults);
-}
-
-/*
- * Checks if connection string starts with either of the valid URI prefix
- * designators.
- *
- * Returns the URI prefix length, 0 if the string doesn't contain a URI prefix.
- *
- * XXX this is duplicated in psql/common.c.
- */
-static int
-uri_prefix_length(const char *connstr)
-{
-	if (strncmp(connstr, uri_designator,
-				sizeof(uri_designator) - 1) == 0)
-		return sizeof(uri_designator) - 1;
-
-	if (strncmp(connstr, short_uri_designator,
-				sizeof(short_uri_designator) - 1) == 0)
-		return sizeof(short_uri_designator) - 1;
-
-	return 0;
-}
-
-/*
- * Recognized connection string either starts with a valid URI prefix or
- * contains a "=" in it.
- *
- * Must be consistent with parse_connection_string: anything for which this
- * returns true should at least look like it's parseable by that routine.
- *
- * XXX this is duplicated in psql/common.c
- */
-static bool
-recognized_connection_string(const char *connstr)
-{
-	return uri_prefix_length(connstr) != 0 || strchr(connstr, '=') != NULL;
-}
-
-/*
- * Subroutine for parse_connection_string
- *
- * Deal with a string containing key=value pairs.
- */
-static PQconninfoOption *
-conninfo_parse(const char *conninfo, PQExpBuffer errorMessage,
-			   bool use_defaults)
-{
-	char	   *pname;
-	char	   *pval;
-	char	   *buf;
-	char	   *cp;
-	char	   *cp2;
-	PQconninfoOption *options;
-
-	/* Make a working copy of PQconninfoOptions */
-	options = conninfo_init(errorMessage);
-	if (options == NULL)
-		return NULL;
-
-	/* Need a modifiable copy of the input string */
-	if ((buf = strdup(conninfo)) == NULL)
-	{
-		libpq_append_error(errorMessage, "out of memory");
-		PQconninfoFree(options);
-		return NULL;
-	}
-	cp = buf;
-
-	while (*cp)
-	{
-		/* Skip blanks before the parameter name */
-		if (isspace((unsigned char) *cp))
-		{
-			cp++;
-			continue;
-		}
-
-		/* Get the parameter name */
-		pname = cp;
-		while (*cp)
-		{
-			if (*cp == '=')
-				break;
-			if (isspace((unsigned char) *cp))
-			{
-				*cp++ = '\0';
-				while (*cp)
-				{
-					if (!isspace((unsigned char) *cp))
-						break;
-					cp++;
-				}
-				break;
-			}
-			cp++;
-		}
-
-		/* Check that there is a following '=' */
-		if (*cp != '=')
-		{
-			libpq_append_error(errorMessage,
-							   "missing \"=\" after \"%s\" in connection info string",
-							   pname);
-			PQconninfoFree(options);
-			free(buf);
-			return NULL;
-		}
-		*cp++ = '\0';
-
-		/* Skip blanks after the '=' */
-		while (*cp)
-		{
-			if (!isspace((unsigned char) *cp))
-				break;
-			cp++;
-		}
-
-		/* Get the parameter value */
-		pval = cp;
-
-		if (*cp != '\'')
-		{
-			cp2 = pval;
-			while (*cp)
-			{
-				if (isspace((unsigned char) *cp))
-				{
-					*cp++ = '\0';
-					break;
-				}
-				if (*cp == '\\')
-				{
-					cp++;
-					if (*cp != '\0')
-						*cp2++ = *cp++;
-				}
-				else
-					*cp2++ = *cp++;
-			}
-			*cp2 = '\0';
-		}
-		else
-		{
-			cp2 = pval;
-			cp++;
-			for (;;)
-			{
-				if (*cp == '\0')
-				{
-					libpq_append_error(errorMessage, "unterminated quoted string in connection info string");
-					PQconninfoFree(options);
-					free(buf);
-					return NULL;
-				}
-				if (*cp == '\\')
-				{
-					cp++;
-					if (*cp != '\0')
-						*cp2++ = *cp++;
-					continue;
-				}
-				if (*cp == '\'')
-				{
-					*cp2 = '\0';
-					cp++;
-					break;
-				}
-				*cp2++ = *cp++;
-			}
-		}
-
-		/*
-		 * Now that we have the name and the value, store the record.
-		 */
-		if (!conninfo_storeval(options, pname, pval, errorMessage, false, false))
-		{
-			PQconninfoFree(options);
-			free(buf);
-			return NULL;
-		}
-	}
-
-	/* Done with the modifiable input string */
-	free(buf);
-
-	/*
-	 * Add in defaults if the caller wants that.
-	 */
-	if (use_defaults)
-	{
-		if (!conninfo_add_defaults(options, errorMessage))
-		{
-			PQconninfoFree(options);
-			return NULL;
-		}
-	}
-
-	return options;
-}
-
-/*
- * Conninfo array parser routine
- *
- * If successful, a malloc'd PQconninfoOption array is returned.
- * If not successful, NULL is returned and an error message is
- * appended to errorMessage.
- * Defaults are supplied (from a service file, environment variables, etc)
- * for unspecified options, but only if use_defaults is true.
- *
- * If expand_dbname is non-zero, and the value passed for the first occurrence
- * of "dbname" keyword is a connection string (as indicated by
- * recognized_connection_string) then parse and process it, overriding any
- * previously processed conflicting keywords. Subsequent keywords will take
- * precedence, however. In-tree programs generally specify expand_dbname=true,
- * so command-line arguments naming a database can use a connection string.
- * Some code acquires arbitrary database names from known-literal sources like
- * PQdb(), PQconninfoParse() and pg_database.datname.  When connecting to such
- * a database, in-tree code first wraps the name in a connection string.
- */
-static PQconninfoOption *
-conninfo_array_parse(const char *const *keywords, const char *const *values,
-					 PQExpBuffer errorMessage, bool use_defaults,
-					 int expand_dbname)
-{
-	PQconninfoOption *options;
-	PQconninfoOption *dbname_options = NULL;
-	PQconninfoOption *option;
-	int			i = 0;
-
-	/*
-	 * If expand_dbname is non-zero, check keyword "dbname" to see if val is
-	 * actually a recognized connection string.
-	 */
-	while (expand_dbname && keywords[i])
-	{
-		const char *pname = keywords[i];
-		const char *pvalue = values[i];
-
-		/* first find "dbname" if any */
-		if (strcmp(pname, "dbname") == 0 && pvalue)
-		{
-			/*
-			 * If value is a connection string, parse it, but do not use
-			 * defaults here -- those get picked up later. We only want to
-			 * override for those parameters actually passed.
-			 */
-			if (recognized_connection_string(pvalue))
-			{
-				dbname_options = parse_connection_string(pvalue, errorMessage, false);
-				if (dbname_options == NULL)
-					return NULL;
-			}
-			break;
-		}
-		++i;
-	}
-
-	/* Make a working copy of PQconninfoOptions */
-	options = conninfo_init(errorMessage);
-	if (options == NULL)
-	{
-		PQconninfoFree(dbname_options);
-		return NULL;
-	}
-
-	/* Parse the keywords/values arrays */
-	i = 0;
-	while (keywords[i])
-	{
-		const char *pname = keywords[i];
-		const char *pvalue = values[i];
-
-		if (pvalue != NULL && pvalue[0] != '\0')
-		{
-			/* Search for the param record */
-			for (option = options; option->keyword != NULL; option++)
-			{
-				if (strcmp(option->keyword, pname) == 0)
-					break;
-			}
-
-			/* Check for invalid connection option */
-			if (option->keyword == NULL)
-			{
-				libpq_append_error(errorMessage, "invalid connection option \"%s\"", pname);
-				PQconninfoFree(options);
-				PQconninfoFree(dbname_options);
-				return NULL;
-			}
-
-			/*
-			 * If we are on the first dbname parameter, and we have a parsed
-			 * connection string, copy those parameters across, overriding any
-			 * existing previous settings.
-			 */
-			if (strcmp(pname, "dbname") == 0 && dbname_options)
-			{
-				PQconninfoOption *str_option;
-
-				for (str_option = dbname_options; str_option->keyword != NULL; str_option++)
-				{
-					if (str_option->val != NULL)
-					{
-						int			k;
-
-						for (k = 0; options[k].keyword; k++)
-						{
-							if (strcmp(options[k].keyword, str_option->keyword) == 0)
-							{
-								free(options[k].val);
-								options[k].val = strdup(str_option->val);
-								if (!options[k].val)
-								{
-									libpq_append_error(errorMessage, "out of memory");
-									PQconninfoFree(options);
-									PQconninfoFree(dbname_options);
-									return NULL;
-								}
-								break;
-							}
-						}
-					}
-				}
-
-				/*
-				 * Forget the parsed connection string, so that any subsequent
-				 * dbname parameters will not be expanded.
-				 */
-				PQconninfoFree(dbname_options);
-				dbname_options = NULL;
-			}
-			else
-			{
-				/*
-				 * Store the value, overriding previous settings
-				 */
-				free(option->val);
-				option->val = strdup(pvalue);
-				if (!option->val)
-				{
-					libpq_append_error(errorMessage, "out of memory");
-					PQconninfoFree(options);
-					PQconninfoFree(dbname_options);
-					return NULL;
-				}
-			}
-		}
-		++i;
-	}
-	PQconninfoFree(dbname_options);
-
-	/*
-	 * Add in defaults if the caller wants that.
-	 */
-	if (use_defaults)
-	{
-		if (!conninfo_add_defaults(options, errorMessage))
-		{
-			PQconninfoFree(options);
-			return NULL;
-		}
-	}
-
-	return options;
-}
-
-/*
- * Add the default values for any unspecified options to the connection
- * options array.
- *
- * Defaults are obtained from a service file, environment variables, etc.
- *
- * Returns true if successful, otherwise false; errorMessage, if supplied,
- * is filled in upon failure.  Note that failure to locate a default value
- * is not an error condition here --- we just leave the option's value as
- * NULL.
- */
-static bool
-conninfo_add_defaults(PQconninfoOption *options, PQExpBuffer errorMessage)
-{
-	PQconninfoOption *option;
-	PQconninfoOption *sslmode_default = NULL,
-			   *sslrootcert = NULL;
-	char	   *tmp;
-
-	/*
-	 * If there's a service spec, use it to obtain any not-explicitly-given
-	 * parameters.  Ignore error if no error message buffer is passed because
-	 * there is no way to pass back the failure message.
-	 */
-	if (parseServiceInfo(options, errorMessage) != 0 && errorMessage)
-		return false;
-
-	/*
-	 * Get the fallback resources for parameters not specified in the conninfo
-	 * string nor the service.
-	 */
-	for (option = options; option->keyword != NULL; option++)
-	{
-		if (strcmp(option->keyword, "sslrootcert") == 0)
-			sslrootcert = option;	/* save for later */
-
-		if (option->val != NULL)
-			continue;			/* Value was in conninfo or service */
-
-		/*
-		 * Try to get the environment variable fallback
-		 */
-		if (option->envvar != NULL)
-		{
-			if ((tmp = getenv(option->envvar)) != NULL)
-			{
-				option->val = strdup(tmp);
-				if (!option->val)
-				{
-					if (errorMessage)
-						libpq_append_error(errorMessage, "out of memory");
-					return false;
-				}
-				continue;
-			}
-		}
-
-		/*
-		 * Interpret the deprecated PGREQUIRESSL environment variable.  Per
-		 * tradition, translate values starting with "1" to sslmode=require,
-		 * and ignore other values.  Given both PGREQUIRESSL=1 and PGSSLMODE,
-		 * PGSSLMODE takes precedence; the opposite was true before v9.3.
-		 */
-		if (strcmp(option->keyword, "sslmode") == 0)
-		{
-			const char *requiresslenv = getenv("PGREQUIRESSL");
-
-			if (requiresslenv != NULL && requiresslenv[0] == '1')
-			{
-				option->val = strdup("require");
-				if (!option->val)
-				{
-					if (errorMessage)
-						libpq_append_error(errorMessage, "out of memory");
-					return false;
-				}
-				continue;
-			}
-
-			/*
-			 * sslmode is not specified. Let it be filled in with the compiled
-			 * default for now, but if sslrootcert=system, we'll override the
-			 * default later before returning.
-			 */
-			sslmode_default = option;
-		}
-
-		/*
-		 * No environment variable specified or the variable isn't set - try
-		 * compiled-in default
-		 */
-		if (option->compiled != NULL)
-		{
-			option->val = strdup(option->compiled);
-			if (!option->val)
-			{
-				if (errorMessage)
-					libpq_append_error(errorMessage, "out of memory");
-				return false;
-			}
-			continue;
-		}
-
-		/*
-		 * Special handling for "user" option.  Note that if pg_fe_getauthname
-		 * fails, we just leave the value as NULL; there's no need for this to
-		 * be an error condition if the caller provides a user name.  The only
-		 * reason we do this now at all is so that callers of PQconndefaults
-		 * will see a correct default (barring error, of course).
-		 */
-		if (strcmp(option->keyword, "user") == 0)
-		{
-			option->val = pg_fe_getauthname(NULL);
-			continue;
-		}
-	}
-
-	/*
-	 * Special handling for sslrootcert=system with no sslmode explicitly
-	 * defined. In this case we want to strengthen the default sslmode to
-	 * verify-full.
-	 */
-	if (sslmode_default && sslrootcert)
-	{
-		if (sslrootcert->val && strcmp(sslrootcert->val, "system") == 0)
-		{
-			free(sslmode_default->val);
-
-			sslmode_default->val = strdup("verify-full");
-			if (!sslmode_default->val)
-			{
-				if (errorMessage)
-					libpq_append_error(errorMessage, "out of memory");
-				return false;
-			}
-		}
-	}
-
-	return true;
-}
-
-/*
- * Subroutine for parse_connection_string
- *
- * Deal with a URI connection string.
- */
-static PQconninfoOption *
-conninfo_uri_parse(const char *uri, PQExpBuffer errorMessage,
-				   bool use_defaults)
-{
-	PQconninfoOption *options;
-
-	/* Make a working copy of PQconninfoOptions */
-	options = conninfo_init(errorMessage);
-	if (options == NULL)
-		return NULL;
-
-	if (!conninfo_uri_parse_options(options, uri, errorMessage))
-	{
-		PQconninfoFree(options);
-		return NULL;
-	}
-
-	/*
-	 * Add in defaults if the caller wants that.
-	 */
-	if (use_defaults)
-	{
-		if (!conninfo_add_defaults(options, errorMessage))
-		{
-			PQconninfoFree(options);
-			return NULL;
-		}
-	}
-
-	return options;
-}
-
-/*
- * conninfo_uri_parse_options
- *		Actual URI parser.
- *
- * If successful, returns true while the options array is filled with parsed
- * options from the URI.
- * If not successful, returns false and fills errorMessage accordingly.
- *
- * Parses the connection URI string in 'uri' according to the URI syntax (RFC
- * 3986):
- *
- * postgresql://[user[:password]@][netloc][:port][/dbname][?param1=value1&...]
- *
- * where "netloc" is a hostname, an IPv4 address, or an IPv6 address surrounded
- * by literal square brackets.  As an extension, we also allow multiple
- * netloc[:port] specifications, separated by commas:
- *
- * postgresql://[user[:password]@][netloc][:port][,...][/dbname][?param1=value1&...]
- *
- * Any of the URI parts might use percent-encoding (%xy).
- */
-static bool
-conninfo_uri_parse_options(PQconninfoOption *options, const char *uri,
-						   PQExpBuffer errorMessage)
-{
-	int			prefix_len;
-	char	   *p;
-	char	   *buf = NULL;
-	char	   *start;
-	char		prevchar = '\0';
-	char	   *user = NULL;
-	char	   *host = NULL;
-	bool		retval = false;
-	PQExpBufferData hostbuf;
-	PQExpBufferData portbuf;
-
-	initPQExpBuffer(&hostbuf);
-	initPQExpBuffer(&portbuf);
-	if (PQExpBufferDataBroken(hostbuf) || PQExpBufferDataBroken(portbuf))
-	{
-		libpq_append_error(errorMessage, "out of memory");
-		goto cleanup;
-	}
-
-	/* need a modifiable copy of the input URI */
-	buf = strdup(uri);
-	if (buf == NULL)
-	{
-		libpq_append_error(errorMessage, "out of memory");
-		goto cleanup;
-	}
-	start = buf;
-
-	/* Skip the URI prefix */
-	prefix_len = uri_prefix_length(uri);
-	if (prefix_len == 0)
-	{
-		/* Should never happen */
-		libpq_append_error(errorMessage,
-						   "invalid URI propagated to internal parser routine: \"%s\"",
-						   uri);
-		goto cleanup;
-	}
-	start += prefix_len;
-	p = start;
-
-	/* Look ahead for possible user credentials designator */
-	while (*p && *p != '@' && *p != '/')
-		++p;
-	if (*p == '@')
-	{
-		/*
-		 * Found username/password designator, so URI should be of the form
-		 * "scheme://user[:password]@[netloc]".
-		 */
-		user = start;
-
-		p = user;
-		while (*p != ':' && *p != '@')
-			++p;
-
-		/* Save last char and cut off at end of user name */
-		prevchar = *p;
-		*p = '\0';
-
-		if (*user &&
-			!conninfo_storeval(options, "user", user,
-							   errorMessage, false, true))
-			goto cleanup;
-
-		if (prevchar == ':')
-		{
-			const char *password = p + 1;
-
-			while (*p != '@')
-				++p;
-			*p = '\0';
-
-			if (*password &&
-				!conninfo_storeval(options, "password", password,
-								   errorMessage, false, true))
-				goto cleanup;
-		}
-
-		/* Advance past end of parsed user name or password token */
-		++p;
-	}
-	else
-	{
-		/*
-		 * No username/password designator found.  Reset to start of URI.
-		 */
-		p = start;
-	}
-
-	/*
-	 * There may be multiple netloc[:port] pairs, each separated from the next
-	 * by a comma.  When we initially enter this loop, "p" has been
-	 * incremented past optional URI credential information at this point and
-	 * now points at the "netloc" part of the URI.  On subsequent loop
-	 * iterations, "p" has been incremented past the comma separator and now
-	 * points at the start of the next "netloc".
-	 */
-	for (;;)
-	{
-		/*
-		 * Look for IPv6 address.
-		 */
-		if (*p == '[')
-		{
-			host = ++p;
-			while (*p && *p != ']')
-				++p;
-			if (!*p)
-			{
-				libpq_append_error(errorMessage,
-								   "end of string reached when looking for matching \"]\" in IPv6 host address in URI: \"%s\"",
-								   uri);
-				goto cleanup;
-			}
-			if (p == host)
-			{
-				libpq_append_error(errorMessage,
-								   "IPv6 host address may not be empty in URI: \"%s\"",
-								   uri);
-				goto cleanup;
-			}
-
-			/* Cut off the bracket and advance */
-			*(p++) = '\0';
-
-			/*
-			 * The address may be followed by a port specifier or a slash or a
-			 * query or a separator comma.
-			 */
-			if (*p && *p != ':' && *p != '/' && *p != '?' && *p != ',')
-			{
-				libpq_append_error(errorMessage,
-								   "unexpected character \"%c\" at position %d in URI (expected \":\" or \"/\"): \"%s\"",
-								   *p, (int) (p - buf + 1), uri);
-				goto cleanup;
-			}
-		}
-		else
-		{
-			/* not an IPv6 address: DNS-named or IPv4 netloc */
-			host = p;
-
-			/*
-			 * Look for port specifier (colon) or end of host specifier
-			 * (slash) or query (question mark) or host separator (comma).
-			 */
-			while (*p && *p != ':' && *p != '/' && *p != '?' && *p != ',')
-				++p;
-		}
-
-		/* Save the hostname terminator before we null it */
-		prevchar = *p;
-		*p = '\0';
-
-		appendPQExpBufferStr(&hostbuf, host);
-
-		if (prevchar == ':')
-		{
-			const char *port = ++p; /* advance past host terminator */
-
-			while (*p && *p != '/' && *p != '?' && *p != ',')
-				++p;
-
-			prevchar = *p;
-			*p = '\0';
-
-			appendPQExpBufferStr(&portbuf, port);
-		}
-
-		if (prevchar != ',')
-			break;
-		++p;					/* advance past comma separator */
-		appendPQExpBufferChar(&hostbuf, ',');
-		appendPQExpBufferChar(&portbuf, ',');
-	}
-
-	/* Save final values for host and port. */
-	if (PQExpBufferDataBroken(hostbuf) || PQExpBufferDataBroken(portbuf))
-		goto cleanup;
-	if (hostbuf.data[0] &&
-		!conninfo_storeval(options, "host", hostbuf.data,
-						   errorMessage, false, true))
-		goto cleanup;
-	if (portbuf.data[0] &&
-		!conninfo_storeval(options, "port", portbuf.data,
-						   errorMessage, false, true))
-		goto cleanup;
-
-	if (prevchar && prevchar != '?')
-	{
-		const char *dbname = ++p;	/* advance past host terminator */
-
-		/* Look for query parameters */
-		while (*p && *p != '?')
-			++p;
-
-		prevchar = *p;
-		*p = '\0';
-
-		/*
-		 * Avoid setting dbname to an empty string, as it forces the default
-		 * value (username) and ignores $PGDATABASE, as opposed to not setting
-		 * it at all.
-		 */
-		if (*dbname &&
-			!conninfo_storeval(options, "dbname", dbname,
-							   errorMessage, false, true))
-			goto cleanup;
-	}
-
-	if (prevchar)
-	{
-		++p;					/* advance past terminator */
-
-		if (!conninfo_uri_parse_params(p, options, errorMessage))
-			goto cleanup;
-	}
-
-	/* everything parsed okay */
-	retval = true;
-
-cleanup:
-	termPQExpBuffer(&hostbuf);
-	termPQExpBuffer(&portbuf);
-	free(buf);
-	return retval;
-}
-
-/*
- * Connection URI parameters parser routine
- *
- * If successful, returns true while connOptions is filled with parsed
- * parameters.  Otherwise, returns false and fills errorMessage appropriately.
- *
- * Destructively modifies 'params' buffer.
- */
-static bool
-conninfo_uri_parse_params(char *params,
-						  PQconninfoOption *connOptions,
-						  PQExpBuffer errorMessage)
-{
-	while (*params)
-	{
-		char	   *keyword = params;
-		char	   *value = NULL;
-		char	   *p = params;
-		bool		malloced = false;
-		int			oldmsglen;
-
-		/*
-		 * Scan the params string for '=' and '&', marking the end of keyword
-		 * and value respectively.
-		 */
-		for (;;)
-		{
-			if (*p == '=')
-			{
-				/* Was there '=' already? */
-				if (value != NULL)
-				{
-					libpq_append_error(errorMessage,
-									   "extra key/value separator \"=\" in URI query parameter: \"%s\"",
-									   keyword);
-					return false;
-				}
-				/* Cut off keyword, advance to value */
-				*p++ = '\0';
-				value = p;
-			}
-			else if (*p == '&' || *p == '\0')
-			{
-				/*
-				 * If not at the end, cut off value and advance; leave p
-				 * pointing to start of the next parameter, if any.
-				 */
-				if (*p != '\0')
-					*p++ = '\0';
-				/* Was there '=' at all? */
-				if (value == NULL)
-				{
-					libpq_append_error(errorMessage,
-									   "missing key/value separator \"=\" in URI query parameter: \"%s\"",
-									   keyword);
-					return false;
-				}
-				/* Got keyword and value, go process them. */
-				break;
-			}
-			else
-				++p;			/* Advance over all other bytes. */
-		}
-
-		keyword = conninfo_uri_decode(keyword, errorMessage);
-		if (keyword == NULL)
-		{
-			/* conninfo_uri_decode already set an error message */
-			return false;
-		}
-		value = conninfo_uri_decode(value, errorMessage);
-		if (value == NULL)
-		{
-			/* conninfo_uri_decode already set an error message */
-			free(keyword);
-			return false;
-		}
-		malloced = true;
-
-		/*
-		 * Special keyword handling for improved JDBC compatibility.
-		 */
-		if (strcmp(keyword, "ssl") == 0 &&
-			strcmp(value, "true") == 0)
-		{
-			free(keyword);
-			free(value);
-			malloced = false;
-
-			keyword = "sslmode";
-			value = "require";
-		}
-
-		/*
-		 * Store the value if the corresponding option exists; ignore
-		 * otherwise.  At this point both keyword and value are not
-		 * URI-encoded.
-		 */
-		oldmsglen = errorMessage->len;
-		if (!conninfo_storeval(connOptions, keyword, value,
-							   errorMessage, true, false))
-		{
-			/* Insert generic message if conninfo_storeval didn't give one. */
-			if (errorMessage->len == oldmsglen)
-				libpq_append_error(errorMessage,
-								   "invalid URI query parameter: \"%s\"",
-								   keyword);
-			/* And fail. */
-			if (malloced)
-			{
-				free(keyword);
-				free(value);
-			}
-			return false;
-		}
-
-		if (malloced)
-		{
-			free(keyword);
-			free(value);
-		}
-
-		/* Proceed to next key=value pair, if any */
-		params = p;
-	}
-
-	return true;
-}
-
-/*
- * Connection URI decoder routine
- *
- * If successful, returns the malloc'd decoded string.
- * If not successful, returns NULL and fills errorMessage accordingly.
- *
- * The string is decoded by replacing any percent-encoded tokens with
- * corresponding characters, while preserving any non-encoded characters.  A
- * percent-encoded token is a character triplet: a percent sign, followed by a
- * pair of hexadecimal digits (0-9A-F), where lower- and upper-case letters are
- * treated identically.
- */
-static char *
-conninfo_uri_decode(const char *str, PQExpBuffer errorMessage)
-{
-	char	   *buf;
-	char	   *p;
-	const char *q = str;
-
-	buf = malloc(strlen(str) + 1);
-	if (buf == NULL)
-	{
-		libpq_append_error(errorMessage, "out of memory");
-		return NULL;
-	}
-	p = buf;
-
-	for (;;)
-	{
-		if (*q != '%')
-		{
-			/* copy and check for NUL terminator */
-			if (!(*(p++) = *(q++)))
-				break;
-		}
-		else
-		{
-			int			hi;
-			int			lo;
-			int			c;
-
-			++q;				/* skip the percent sign itself */
-
-			/*
-			 * Possible EOL will be caught by the first call to
-			 * get_hexdigit(), so we never dereference an invalid q pointer.
-			 */
-			if (!(get_hexdigit(*q++, &hi) && get_hexdigit(*q++, &lo)))
-			{
-				libpq_append_error(errorMessage,
-								   "invalid percent-encoded token: \"%s\"",
-								   str);
-				free(buf);
-				return NULL;
-			}
-
-			c = (hi << 4) | lo;
-			if (c == 0)
-			{
-				libpq_append_error(errorMessage,
-								   "forbidden value %%00 in percent-encoded value: \"%s\"",
-								   str);
-				free(buf);
-				return NULL;
-			}
-			*(p++) = c;
-		}
-	}
-
-	return buf;
-}
-
-/*
- * Convert hexadecimal digit character to its integer value.
- *
- * If successful, returns true and value is filled with digit's base 16 value.
- * If not successful, returns false.
- *
- * Lower- and upper-case letters in the range A-F are treated identically.
- */
-static bool
-get_hexdigit(char digit, int *value)
-{
-	if ('0' <= digit && digit <= '9')
-		*value = digit - '0';
-	else if ('A' <= digit && digit <= 'F')
-		*value = digit - 'A' + 10;
-	else if ('a' <= digit && digit <= 'f')
-		*value = digit - 'a' + 10;
-	else
-		return false;
-
-	return true;
-}
-
-/*
- * Find an option value corresponding to the keyword in the connOptions array.
- *
- * If successful, returns a pointer to the corresponding option's value.
- * If not successful, returns NULL.
- */
-static const char *
-conninfo_getval(PQconninfoOption *connOptions,
-				const char *keyword)
-{
-	PQconninfoOption *option;
-
-	option = conninfo_find(connOptions, keyword);
-
-	return option ? option->val : NULL;
-}
-
-/*
- * Store a (new) value for an option corresponding to the keyword in
- * connOptions array.
- *
- * If uri_decode is true, the value is URI-decoded.  The keyword is always
- * assumed to be non URI-encoded.
- *
- * If successful, returns a pointer to the corresponding PQconninfoOption,
- * which value is replaced with a strdup'd copy of the passed value string.
- * The existing value for the option is free'd before replacing, if any.
- *
- * If not successful, returns NULL and fills errorMessage accordingly.
- * However, if the reason of failure is an invalid keyword being passed and
- * ignoreMissing is true, errorMessage will be left untouched.
- */
-static PQconninfoOption *
-conninfo_storeval(PQconninfoOption *connOptions,
-				  const char *keyword, const char *value,
-				  PQExpBuffer errorMessage, bool ignoreMissing,
-				  bool uri_decode)
-{
-	PQconninfoOption *option;
-	char	   *value_copy;
-
-	/*
-	 * For backwards compatibility, requiressl=1 gets translated to
-	 * sslmode=require, and requiressl=0 gets translated to sslmode=prefer
-	 * (which is the default for sslmode).
-	 */
-	if (strcmp(keyword, "requiressl") == 0)
-	{
-		keyword = "sslmode";
-		if (value[0] == '1')
-			value = "require";
-		else
-			value = "prefer";
-	}
-
-	option = conninfo_find(connOptions, keyword);
-	if (option == NULL)
-	{
-		if (!ignoreMissing)
-			libpq_append_error(errorMessage,
-							   "invalid connection option \"%s\"",
-							   keyword);
-		return NULL;
-	}
-
-	if (uri_decode)
-	{
-		value_copy = conninfo_uri_decode(value, errorMessage);
-		if (value_copy == NULL)
-			/* conninfo_uri_decode already set an error message */
-			return NULL;
-	}
-	else
-	{
-		value_copy = strdup(value);
-		if (value_copy == NULL)
-		{
-			libpq_append_error(errorMessage, "out of memory");
-			return NULL;
-		}
-	}
-
-	free(option->val);
-	option->val = value_copy;
-
-	return option;
-}
-
-/*
- * Find a PQconninfoOption option corresponding to the keyword in the
- * connOptions array.
- *
- * If successful, returns a pointer to the corresponding PQconninfoOption
- * structure.
- * If not successful, returns NULL.
- */
-static PQconninfoOption *
-conninfo_find(PQconninfoOption *connOptions, const char *keyword)
-{
-	PQconninfoOption *option;
-
-	for (option = connOptions; option->keyword != NULL; option++)
-	{
-		if (strcmp(option->keyword, keyword) == 0)
-			return option;
-	}
-
-	return NULL;
-}
-
-
-/*
- * Return the connection options used for the connection
- */
-PQconninfoOption *
-PQconninfo(PGconn *conn)
-{
-	PQExpBufferData errorBuf;
-	PQconninfoOption *connOptions;
-
-	if (conn == NULL)
-		return NULL;
-
-	/*
-	 * We don't actually report any errors here, but callees want a buffer,
-	 * and we prefer not to trash the conn's errorMessage.
-	 */
-	initPQExpBuffer(&errorBuf);
-	if (PQExpBufferDataBroken(errorBuf))
-		return NULL;			/* out of memory already :-( */
-
-	connOptions = conninfo_init(&errorBuf);
-
-	if (connOptions != NULL)
-	{
-		const internalPQconninfoOption *option;
-
-		for (option = PQconninfoOptions; option->keyword; option++)
-		{
-			char	  **connmember;
-
-			if (option->connofs < 0)
-				continue;
-
-			connmember = (char **) ((char *) conn + option->connofs);
-
-			if (*connmember)
-				conninfo_storeval(connOptions, option->keyword, *connmember,
-								  &errorBuf, true, false);
-		}
-	}
-
-	termPQExpBuffer(&errorBuf);
-
-	return connOptions;
-}
-
-
-void
-PQconninfoFree(PQconninfoOption *connOptions)
-{
-	if (connOptions == NULL)
-		return;
-
-	for (PQconninfoOption *option = connOptions; option->keyword != NULL; option++)
-		free(option->val);
-	free(connOptions);
-}
-
-
-/* =========== accessor functions for PGconn ========= */
-char *
-PQdb(const PGconn *conn)
-{
-	if (!conn)
-		return NULL;
-	return conn->dbName;
-}
-
-char *
-PQuser(const PGconn *conn)
-{
-	if (!conn)
-		return NULL;
-	return conn->pguser;
-}
-
-char *
-PQpass(const PGconn *conn)
-{
-	char	   *password = NULL;
-
-	if (!conn)
-		return NULL;
-	if (conn->connhost != NULL)
-		password = conn->connhost[conn->whichhost].password;
-	if (password == NULL)
-		password = conn->pgpass;
-	/* Historically we've returned "" not NULL for no password specified */
-	if (password == NULL)
-		password = "";
-	return password;
-}
-
-char *
-PQhost(const PGconn *conn)
-{
-	if (!conn)
-		return NULL;
-
-	if (conn->connhost != NULL)
-	{
-		/*
-		 * Return the verbatim host value provided by user, or hostaddr in its
-		 * lack.
-		 */
-		if (conn->connhost[conn->whichhost].host != NULL &&
-			conn->connhost[conn->whichhost].host[0] != '\0')
-			return conn->connhost[conn->whichhost].host;
-		else if (conn->connhost[conn->whichhost].hostaddr != NULL &&
-				 conn->connhost[conn->whichhost].hostaddr[0] != '\0')
-			return conn->connhost[conn->whichhost].hostaddr;
-	}
-
-	return "";
-}
-
-char *
-PQhostaddr(const PGconn *conn)
-{
-	if (!conn)
-		return NULL;
-
-	/* Return the parsed IP address */
-	if (conn->connhost != NULL && conn->connip != NULL)
-		return conn->connip;
-
-	return "";
-}
-
-char *
-PQport(const PGconn *conn)
-{
-	if (!conn)
-		return NULL;
-
-	if (conn->connhost != NULL)
-		return conn->connhost[conn->whichhost].port;
-
-	return "";
-}
-
-/*
- * No longer does anything, but the function remains for API backwards
- * compatibility.
- */
-char *
-PQtty(const PGconn *conn)
-{
-	if (!conn)
-		return NULL;
-	return "";
-}
-
-char *
-PQoptions(const PGconn *conn)
-{
-	if (!conn)
-		return NULL;
-	return conn->pgoptions;
-}
-
-ConnStatusType
-PQstatus(const PGconn *conn)
-{
-	if (!conn)
-		return CONNECTION_BAD;
-	return conn->status;
-}
-
-PGTransactionStatusType
-PQtransactionStatus(const PGconn *conn)
-{
-	if (!conn || conn->status != CONNECTION_OK)
-		return PQTRANS_UNKNOWN;
-	if (conn->asyncStatus != PGASYNC_IDLE)
-		return PQTRANS_ACTIVE;
-	return conn->xactStatus;
-}
-
-const char *
-PQparameterStatus(const PGconn *conn, const char *paramName)
-{
-	const pgParameterStatus *pstatus;
-
-	if (!conn || !paramName)
-		return NULL;
-	for (pstatus = conn->pstatus; pstatus != NULL; pstatus = pstatus->next)
-	{
-		if (strcmp(pstatus->name, paramName) == 0)
-			return pstatus->value;
-	}
-	return NULL;
-}
-
-int
-PQprotocolVersion(const PGconn *conn)
-{
-	if (!conn)
-		return 0;
-	if (conn->status == CONNECTION_BAD)
-		return 0;
-	return PG_PROTOCOL_MAJOR(conn->pversion);
-}
-
-int
-PQserverVersion(const PGconn *conn)
-{
-	if (!conn)
-		return 0;
-	if (conn->status == CONNECTION_BAD)
-		return 0;
-	return conn->sversion;
-}
-
-char *
-PQerrorMessage(const PGconn *conn)
-{
-	if (!conn)
-		return libpq_gettext("connection pointer is NULL\n");
-
-	/*
-	 * The errorMessage buffer might be marked "broken" due to having
-	 * previously failed to allocate enough memory for the message.  In that
-	 * case, tell the application we ran out of memory.
-	 */
-	if (PQExpBufferBroken(&conn->errorMessage))
-		return libpq_gettext("out of memory\n");
-
-	return conn->errorMessage.data;
-}
-
-/*
- * In Windows, socket values are unsigned, and an invalid socket value
- * (INVALID_SOCKET) is ~0, which equals -1 in comparisons (with no compiler
- * warning). Ideally we would return an unsigned value for PQsocket() on
- * Windows, but that would cause the function's return value to differ from
- * Unix, so we just return -1 for invalid sockets.
- * http://msdn.microsoft.com/en-us/library/windows/desktop/cc507522%28v=vs.85%29.aspx
- * http://stackoverflow.com/questions/10817252/why-is-invalid-socket-defined-as-0-in-winsock2-h-c
- */
-int
-PQsocket(const PGconn *conn)
-{
-	if (!conn)
-		return -1;
-	return (conn->sock != PGINVALID_SOCKET) ? conn->sock : -1;
-}
-
-int
-PQbackendPID(const PGconn *conn)
-{
-	if (!conn || conn->status != CONNECTION_OK)
-		return 0;
-	return conn->be_pid;
-}
-
-PGpipelineStatus
-PQpipelineStatus(const PGconn *conn)
-{
-	if (!conn)
-		return PQ_PIPELINE_OFF;
-
-	return conn->pipelineStatus;
-}
-
-int
-PQconnectionNeedsPassword(const PGconn *conn)
-{
-	char	   *password;
-
-	if (!conn)
-		return false;
-	password = PQpass(conn);
-	if (conn->password_needed &&
-		(password == NULL || password[0] == '\0'))
-		return true;
-	else
-		return false;
-}
-
-int
-PQconnectionUsedPassword(const PGconn *conn)
-{
-	if (!conn)
-		return false;
-	if (conn->password_needed)
-		return true;
-	else
-		return false;
-}
-
-int
-PQconnectionUsedGSSAPI(const PGconn *conn)
-{
-	if (!conn)
-		return false;
-	if (conn->gssapi_used)
-		return true;
-	else
-		return false;
-}
-
-int
-PQclientEncoding(const PGconn *conn)
-{
-	if (!conn || conn->status != CONNECTION_OK)
-		return -1;
-	return conn->client_encoding;
-}
-
-int
-PQsetClientEncoding(PGconn *conn, const char *encoding)
-{
-	char		qbuf[128];
-	static const char query[] = "set client_encoding to '%s'";
-	PGresult   *res;
-	int			status;
-
-	if (!conn || conn->status != CONNECTION_OK)
-		return -1;
-
-	if (!encoding)
-		return -1;
-
-	/* Resolve special "auto" value from the locale */
-	if (strcmp(encoding, "auto") == 0)
-		encoding = pg_encoding_to_char(pg_get_encoding_from_locale(NULL, true));
-
-	/* check query buffer overflow */
-	if (sizeof(qbuf) < (sizeof(query) + strlen(encoding)))
-		return -1;
-
-	/* ok, now send a query */
-	sprintf(qbuf, query, encoding);
-	res = PQexec(conn, qbuf);
-
-	if (res == NULL)
-		return -1;
-	if (res->resultStatus != PGRES_COMMAND_OK)
-		status = -1;
-	else
-	{
-		/*
-		 * We rely on the backend to report the parameter value, and we'll
-		 * change state at that time.
-		 */
-		status = 0;				/* everything is ok */
-	}
-	PQclear(res);
-	return status;
-}
-
-PGVerbosity
-PQsetErrorVerbosity(PGconn *conn, PGVerbosity verbosity)
-{
-	PGVerbosity old;
-
-	if (!conn)
-		return PQERRORS_DEFAULT;
-	old = conn->verbosity;
-	conn->verbosity = verbosity;
-	return old;
-}
-
-PGContextVisibility
-PQsetErrorContextVisibility(PGconn *conn, PGContextVisibility show_context)
-{
-	PGContextVisibility old;
-
-	if (!conn)
-		return PQSHOW_CONTEXT_ERRORS;
-	old = conn->show_context;
-	conn->show_context = show_context;
-	return old;
-}
-
-PQnoticeReceiver
-PQsetNoticeReceiver(PGconn *conn, PQnoticeReceiver proc, void *arg)
-{
-	PQnoticeReceiver old;
-
-	if (conn == NULL)
-		return NULL;
-
-	old = conn->noticeHooks.noticeRec;
-	if (proc)
-	{
-		conn->noticeHooks.noticeRec = proc;
-		conn->noticeHooks.noticeRecArg = arg;
-	}
-	return old;
-}
-
-PQnoticeProcessor
-PQsetNoticeProcessor(PGconn *conn, PQnoticeProcessor proc, void *arg)
-{
-	PQnoticeProcessor old;
-
-	if (conn == NULL)
-		return NULL;
-
-	old = conn->noticeHooks.noticeProc;
-	if (proc)
-	{
-		conn->noticeHooks.noticeProc = proc;
-		conn->noticeHooks.noticeProcArg = arg;
-	}
-	return old;
-}
-
-/*
- * The default notice message receiver just gets the standard notice text
- * and sends it to the notice processor.  This two-level setup exists
- * mostly for backwards compatibility; perhaps we should deprecate use of
- * PQsetNoticeProcessor?
- */
-static void
-defaultNoticeReceiver(void *arg, const PGresult *res)
-{
-	(void) arg;					/* not used */
-	if (res->noticeHooks.noticeProc != NULL)
-		res->noticeHooks.noticeProc(res->noticeHooks.noticeProcArg,
-									PQresultErrorMessage(res));
-}
-
-/*
- * The default notice message processor just prints the
- * message on stderr.  Applications can override this if they
- * want the messages to go elsewhere (a window, for example).
- * Note that simply discarding notices is probably a bad idea.
- */
-static void
-defaultNoticeProcessor(void *arg, const char *message)
-{
-	(void) arg;					/* not used */
-	/* Note: we expect the supplied string to end with a newline already. */
-	fprintf(stderr, "%s", message);
-}
-
-/*
- * returns a pointer to the next token or NULL if the current
- * token doesn't match
- */
-static char *
-pwdfMatchesString(char *buf, const char *token)
-{
-	char	   *tbuf;
-	const char *ttok;
-	bool		bslash = false;
-
-	if (buf == NULL || token == NULL)
-		return NULL;
-	tbuf = buf;
-	ttok = token;
-	if (tbuf[0] == '*' && tbuf[1] == ':')
-		return tbuf + 2;
-	while (*tbuf != 0)
-	{
-		if (*tbuf == '\\' && !bslash)
-		{
-			tbuf++;
-			bslash = true;
-		}
-		if (*tbuf == ':' && *ttok == 0 && !bslash)
-			return tbuf + 1;
-		bslash = false;
-		if (*ttok == 0)
-			return NULL;
-		if (*tbuf == *ttok)
-		{
-			tbuf++;
-			ttok++;
-		}
-		else
-			return NULL;
-	}
-	return NULL;
-}
-
-/* Get a password from the password file. Return value is malloc'd. */
-static char *
-passwordFromFile(const char *hostname, const char *port, const char *dbname,
-				 const char *username, const char *pgpassfile)
-{
-	FILE	   *fp;
-	struct stat stat_buf;
-	PQExpBufferData buf;
-
-	if (dbname == NULL || dbname[0] == '\0')
-		return NULL;
-
-	if (username == NULL || username[0] == '\0')
-		return NULL;
-
-	/* 'localhost' matches pghost of '' or the default socket directory */
-	if (hostname == NULL || hostname[0] == '\0')
-		hostname = DefaultHost;
-	else if (is_unixsock_path(hostname))
-
-		/*
-		 * We should probably use canonicalize_path(), but then we have to
-		 * bring path.c into libpq, and it doesn't seem worth it.
-		 */
-		if (strcmp(hostname, DEFAULT_PGSOCKET_DIR) == 0)
-			hostname = DefaultHost;
-
-	if (port == NULL || port[0] == '\0')
-		port = DEF_PGPORT_STR;
-
-	/* If password file cannot be opened, ignore it. */
-	if (stat(pgpassfile, &stat_buf) != 0)
-		return NULL;
-
-#ifndef WIN32
-	if (!S_ISREG(stat_buf.st_mode))
-	{
-		fprintf(stderr,
-				libpq_gettext("WARNING: password file \"%s\" is not a plain file\n"),
-				pgpassfile);
-		return NULL;
-	}
-
-	/* If password file is insecure, alert the user and ignore it. */
-	if (stat_buf.st_mode & (S_IRWXG | S_IRWXO))
-	{
-		fprintf(stderr,
-				libpq_gettext("WARNING: password file \"%s\" has group or world access; permissions should be u=rw (0600) or less\n"),
-				pgpassfile);
-		return NULL;
-	}
-#else
-
-	/*
-	 * On Win32, the directory is protected, so we don't have to check the
-	 * file.
-	 */
-#endif
-
-	fp = fopen(pgpassfile, "r");
-	if (fp == NULL)
-		return NULL;
-
-	/* Use an expansible buffer to accommodate any reasonable line length */
-	initPQExpBuffer(&buf);
-
-	while (!feof(fp) && !ferror(fp))
-	{
-		/* Make sure there's a reasonable amount of room in the buffer */
-		if (!enlargePQExpBuffer(&buf, 128))
-			break;
-
-		/* Read some data, appending it to what we already have */
-		if (fgets(buf.data + buf.len, buf.maxlen - buf.len, fp) == NULL)
-			break;
-		buf.len += strlen(buf.data + buf.len);
-
-		/* If we don't yet have a whole line, loop around to read more */
-		if (!(buf.len > 0 && buf.data[buf.len - 1] == '\n') && !feof(fp))
-			continue;
-
-		/* ignore comments */
-		if (buf.data[0] != '#')
-		{
-			char	   *t = buf.data;
-			int			len;
-
-			/* strip trailing newline and carriage return */
-			len = pg_strip_crlf(t);
-
-			if (len > 0 &&
-				(t = pwdfMatchesString(t, hostname)) != NULL &&
-				(t = pwdfMatchesString(t, port)) != NULL &&
-				(t = pwdfMatchesString(t, dbname)) != NULL &&
-				(t = pwdfMatchesString(t, username)) != NULL)
-			{
-				/* Found a match. */
-				char	   *ret,
-						   *p1,
-						   *p2;
-
-				ret = strdup(t);
-
-				fclose(fp);
-				explicit_bzero(buf.data, buf.maxlen);
-				termPQExpBuffer(&buf);
-
-				if (!ret)
-				{
-					/* Out of memory. XXX: an error message would be nice. */
-					return NULL;
-				}
-
-				/* De-escape password. */
-				for (p1 = p2 = ret; *p1 != ':' && *p1 != '\0'; ++p1, ++p2)
-				{
-					if (*p1 == '\\' && p1[1] != '\0')
-						++p1;
-					*p2 = *p1;
-				}
-				*p2 = '\0';
-
-				return ret;
-			}
-		}
-
-		/* No match, reset buffer to prepare for next line. */
-		buf.len = 0;
-	}
-
-	fclose(fp);
-	explicit_bzero(buf.data, buf.maxlen);
-	termPQExpBuffer(&buf);
-	return NULL;
-}
-
-
-/*
- *	If the connection failed due to bad password, we should mention
- *	if we got the password from the pgpassfile.
- */
-static void
-pgpassfileWarning(PGconn *conn)
-{
-	/* If it was 'invalid authorization', add pgpassfile mention */
-	/* only works with >= 9.0 servers */
-	if (conn->password_needed &&
-		conn->connhost[conn->whichhost].password != NULL &&
-		conn->result)
-	{
-		const char *sqlstate = PQresultErrorField(conn->result,
-												  PG_DIAG_SQLSTATE);
-
-		if (sqlstate && strcmp(sqlstate, ERRCODE_INVALID_PASSWORD) == 0)
-			libpq_append_conn_error(conn, "password retrieved from file \"%s\"",
-									conn->pgpassfile);
-	}
-}
-
-/*
- * Check if the SSL protocol value given in input is valid or not.
- * This is used as a sanity check routine for the connection parameters
- * ssl_min_protocol_version and ssl_max_protocol_version.
- */
-static bool
-sslVerifyProtocolVersion(const char *version)
-{
-	/*
-	 * An empty string and a NULL value are considered valid as it is
-	 * equivalent to ignoring the parameter.
-	 */
-	if (!version || strlen(version) == 0)
-		return true;
-
-	if (pg_strcasecmp(version, "TLSv1") == 0 ||
-		pg_strcasecmp(version, "TLSv1.1") == 0 ||
-		pg_strcasecmp(version, "TLSv1.2") == 0 ||
-		pg_strcasecmp(version, "TLSv1.3") == 0)
-		return true;
-
-	/* anything else is wrong */
-	return false;
-}
-
-
-/*
- * Ensure that the SSL protocol range given in input is correct.  The check
- * is performed on the input string to keep it TLS backend agnostic.  Input
- * to this function is expected verified with sslVerifyProtocolVersion().
- */
-static bool
-sslVerifyProtocolRange(const char *min, const char *max)
-{
-	Assert(sslVerifyProtocolVersion(min) &&
-		   sslVerifyProtocolVersion(max));
-
-	/* If at least one of the bounds is not set, the range is valid */
-	if (min == NULL || max == NULL || strlen(min) == 0 || strlen(max) == 0)
-		return true;
-
-	/*
-	 * If the minimum version is the lowest one we accept, then all options
-	 * for the maximum are valid.
-	 */
-	if (pg_strcasecmp(min, "TLSv1") == 0)
-		return true;
-
-	/*
-	 * The minimum bound is valid, and cannot be TLSv1, so using TLSv1 for the
-	 * maximum is incorrect.
-	 */
-	if (pg_strcasecmp(max, "TLSv1") == 0)
-		return false;
-
-	/*
-	 * At this point we know that we have a mix of TLSv1.1 through 1.3
-	 * versions.
-	 */
-	if (pg_strcasecmp(min, max) > 0)
-		return false;
-
-	return true;
-}
-
-
-/*
- * Obtain user's home directory, return in given buffer
- *
- * On Unix, this actually returns the user's home directory.  On Windows
- * it returns the PostgreSQL-specific application data folder.
- *
- * This is essentially the same as get_home_path(), but we don't use that
- * because we don't want to pull path.c into libpq (it pollutes application
- * namespace).
- *
- * Returns true on success, false on failure to obtain the directory name.
- *
- * CAUTION: although in most situations failure is unexpected, there are users
- * who like to run applications in a home-directory-less environment.  On
- * failure, you almost certainly DO NOT want to report an error.  Just act as
- * though whatever file you were hoping to find in the home directory isn't
- * there (which it isn't).
- */
-bool
-pqGetHomeDirectory(char *buf, int bufsize)
-{
-#ifndef WIN32
-	const char *home;
-
-	home = getenv("HOME");
-	if (home == NULL || home[0] == '\0')
-		return pg_get_user_home_dir(geteuid(), buf, bufsize);
-	strlcpy(buf, home, bufsize);
-	return true;
-#else
-	char		tmppath[MAX_PATH];
-
-	ZeroMemory(tmppath, sizeof(tmppath));
-	if (SHGetFolderPath(NULL, CSIDL_APPDATA, NULL, 0, tmppath) != S_OK)
-		return false;
-	snprintf(buf, bufsize, "%s/postgresql", tmppath);
-	return true;
-#endif
-}
-
-/*
- * To keep the API consistent, the locking stubs are always provided, even
- * if they are not required.
- *
- * Since we neglected to provide any error-return convention in the
- * pgthreadlock_t API, we can't do much except Assert upon failure of any
- * mutex primitive.  Fortunately, such failures appear to be nonexistent in
- * the field.
- */
-
-static void
-default_threadlock(int acquire)
-{
-#ifdef ENABLE_THREAD_SAFETY
-#ifndef WIN32
-	static pthread_mutex_t singlethread_lock = PTHREAD_MUTEX_INITIALIZER;
-#else
-	static pthread_mutex_t singlethread_lock = NULL;
-	static long mutex_initlock = 0;
-
-	if (singlethread_lock == NULL)
-	{
-		while (InterlockedExchange(&mutex_initlock, 1) == 1)
-			 /* loop, another thread own the lock */ ;
-		if (singlethread_lock == NULL)
-		{
-			if (pthread_mutex_init(&singlethread_lock, NULL))
-				Assert(false);
-		}
-		InterlockedExchange(&mutex_initlock, 0);
-	}
-#endif
-	if (acquire)
-	{
-		if (pthread_mutex_lock(&singlethread_lock))
-			Assert(false);
-	}
-	else
-	{
-		if (pthread_mutex_unlock(&singlethread_lock))
-			Assert(false);
-	}
-#endif
-}
-
-pgthreadlock_t
-PQregisterThreadLock(pgthreadlock_t newhandler)
-{
-	pgthreadlock_t prev = pg_g_threadlock;
-
-	if (newhandler)
-		pg_g_threadlock = newhandler;
-	else
-		pg_g_threadlock = default_threadlock;
-
-	return prev;
-}
diff --git a/contrib/libs/libpq/src/interfaces/libpq/fe-exec.c b/contrib/libs/libpq/src/interfaces/libpq/fe-exec.c
deleted file mode 100644
index fb11997eff..0000000000
--- a/contrib/libs/libpq/src/interfaces/libpq/fe-exec.c
+++ /dev/null
@@ -1,4474 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * fe-exec.c
- *	  functions related to sending a query down to the backend
- *
- * Portions Copyright (c) 1996-2023, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- *
- * IDENTIFICATION
- *	  src/interfaces/libpq/fe-exec.c
- *
- *-------------------------------------------------------------------------
- */
-#include "postgres_fe.h"
-
-#include <ctype.h>
-#include <fcntl.h>
-#include <limits.h>
-
-#ifdef WIN32
-#include "win32.h"
-#else
-#include <unistd.h>
-#endif
-
-#include "libpq-fe.h"
-#include "libpq-int.h"
-#include "mb/pg_wchar.h"
-
-/* keep this in same order as ExecStatusType in libpq-fe.h */
-char	   *const pgresStatus[] = {
-	"PGRES_EMPTY_QUERY",
-	"PGRES_COMMAND_OK",
-	"PGRES_TUPLES_OK",
-	"PGRES_COPY_OUT",
-	"PGRES_COPY_IN",
-	"PGRES_BAD_RESPONSE",
-	"PGRES_NONFATAL_ERROR",
-	"PGRES_FATAL_ERROR",
-	"PGRES_COPY_BOTH",
-	"PGRES_SINGLE_TUPLE",
-	"PGRES_PIPELINE_SYNC",
-	"PGRES_PIPELINE_ABORTED"
-};
-
-/* We return this if we're unable to make a PGresult at all */
-static const PGresult OOM_result = {
-	.resultStatus = PGRES_FATAL_ERROR,
-	.client_encoding = PG_SQL_ASCII,
-	.errMsg = "out of memory\n",
-};
-
-/*
- * static state needed by PQescapeString and PQescapeBytea; initialize to
- * values that result in backward-compatible behavior
- */
-static int	static_client_encoding = PG_SQL_ASCII;
-static bool static_std_strings = false;
-
-
-static PGEvent *dupEvents(PGEvent *events, int count, size_t *memSize);
-static bool pqAddTuple(PGresult *res, PGresAttValue *tup,
-					   const char **errmsgp);
-static int	PQsendQueryInternal(PGconn *conn, const char *query, bool newQuery);
-static bool PQsendQueryStart(PGconn *conn, bool newQuery);
-static int	PQsendQueryGuts(PGconn *conn,
-							const char *command,
-							const char *stmtName,
-							int nParams,
-							const Oid *paramTypes,
-							const char *const *paramValues,
-							const int *paramLengths,
-							const int *paramFormats,
-							int resultFormat);
-static void parseInput(PGconn *conn);
-static PGresult *getCopyResult(PGconn *conn, ExecStatusType copytype);
-static bool PQexecStart(PGconn *conn);
-static PGresult *PQexecFinish(PGconn *conn);
-static int	PQsendDescribe(PGconn *conn, char desc_type,
-						   const char *desc_target);
-static int	check_field_number(const PGresult *res, int field_num);
-static void pqPipelineProcessQueue(PGconn *conn);
-static int	pqPipelineFlush(PGconn *conn);
-
-
-/* ----------------
- * Space management for PGresult.
- *
- * Formerly, libpq did a separate malloc() for each field of each tuple
- * returned by a query.  This was remarkably expensive --- malloc/free
- * consumed a sizable part of the application's runtime.  And there is
- * no real need to keep track of the fields separately, since they will
- * all be freed together when the PGresult is released.  So now, we grab
- * large blocks of storage from malloc and allocate space for query data
- * within these blocks, using a trivially simple allocator.  This reduces
- * the number of malloc/free calls dramatically, and it also avoids
- * fragmentation of the malloc storage arena.
- * The PGresult structure itself is still malloc'd separately.  We could
- * combine it with the first allocation block, but that would waste space
- * for the common case that no extra storage is actually needed (that is,
- * the SQL command did not return tuples).
- *
- * We also malloc the top-level array of tuple pointers separately, because
- * we need to be able to enlarge it via realloc, and our trivial space
- * allocator doesn't handle that effectively.  (Too bad the FE/BE protocol
- * doesn't tell us up front how many tuples will be returned.)
- * All other subsidiary storage for a PGresult is kept in PGresult_data blocks
- * of size PGRESULT_DATA_BLOCKSIZE.  The overhead at the start of each block
- * is just a link to the next one, if any.  Free-space management info is
- * kept in the owning PGresult.
- * A query returning a small amount of data will thus require three malloc
- * calls: one for the PGresult, one for the tuples pointer array, and one
- * PGresult_data block.
- *
- * Only the most recently allocated PGresult_data block is a candidate to
- * have more stuff added to it --- any extra space left over in older blocks
- * is wasted.  We could be smarter and search the whole chain, but the point
- * here is to be simple and fast.  Typical applications do not keep a PGresult
- * around very long anyway, so some wasted space within one is not a problem.
- *
- * Tuning constants for the space allocator are:
- * PGRESULT_DATA_BLOCKSIZE: size of a standard allocation block, in bytes
- * PGRESULT_ALIGN_BOUNDARY: assumed alignment requirement for binary data
- * PGRESULT_SEP_ALLOC_THRESHOLD: objects bigger than this are given separate
- *	 blocks, instead of being crammed into a regular allocation block.
- * Requirements for correct function are:
- * PGRESULT_ALIGN_BOUNDARY must be a multiple of the alignment requirements
- *		of all machine data types.  (Currently this is set from configure
- *		tests, so it should be OK automatically.)
- * PGRESULT_SEP_ALLOC_THRESHOLD + PGRESULT_BLOCK_OVERHEAD <=
- *			PGRESULT_DATA_BLOCKSIZE
- *		pqResultAlloc assumes an object smaller than the threshold will fit
- *		in a new block.
- * The amount of space wasted at the end of a block could be as much as
- * PGRESULT_SEP_ALLOC_THRESHOLD, so it doesn't pay to make that too large.
- * ----------------
- */
-
-#define PGRESULT_DATA_BLOCKSIZE		2048
-#define PGRESULT_ALIGN_BOUNDARY		MAXIMUM_ALIGNOF /* from configure */
-#define PGRESULT_BLOCK_OVERHEAD		Max(sizeof(PGresult_data), PGRESULT_ALIGN_BOUNDARY)
-#define PGRESULT_SEP_ALLOC_THRESHOLD	(PGRESULT_DATA_BLOCKSIZE / 2)
-
-
-/*
- * PQmakeEmptyPGresult
- *	 returns a newly allocated, initialized PGresult with given status.
- *	 If conn is not NULL and status indicates an error, the conn's
- *	 errorMessage is copied.  Also, any PGEvents are copied from the conn.
- *
- * Note: the logic to copy the conn's errorMessage is now vestigial;
- * no internal caller uses it.  However, that behavior is documented for
- * outside callers, so we'd better keep it.
- */
-PGresult *
-PQmakeEmptyPGresult(PGconn *conn, ExecStatusType status)
-{
-	PGresult   *result;
-
-	result = (PGresult *) malloc(sizeof(PGresult));
-	if (!result)
-		return NULL;
-
-	result->ntups = 0;
-	result->numAttributes = 0;
-	result->attDescs = NULL;
-	result->tuples = NULL;
-	result->tupArrSize = 0;
-	result->numParameters = 0;
-	result->paramDescs = NULL;
-	result->resultStatus = status;
-	result->cmdStatus[0] = '\0';
-	result->binary = 0;
-	result->events = NULL;
-	result->nEvents = 0;
-	result->errMsg = NULL;
-	result->errFields = NULL;
-	result->errQuery = NULL;
-	result->null_field[0] = '\0';
-	result->curBlock = NULL;
-	result->curOffset = 0;
-	result->spaceLeft = 0;
-	result->memorySize = sizeof(PGresult);
-
-	if (conn)
-	{
-		/* copy connection data we might need for operations on PGresult */
-		result->noticeHooks = conn->noticeHooks;
-		result->client_encoding = conn->client_encoding;
-
-		/* consider copying conn's errorMessage */
-		switch (status)
-		{
-			case PGRES_EMPTY_QUERY:
-			case PGRES_COMMAND_OK:
-			case PGRES_TUPLES_OK:
-			case PGRES_COPY_OUT:
-			case PGRES_COPY_IN:
-			case PGRES_COPY_BOTH:
-			case PGRES_SINGLE_TUPLE:
-				/* non-error cases */
-				break;
-			default:
-				/* we intentionally do not use or modify errorReported here */
-				pqSetResultError(result, &conn->errorMessage, 0);
-				break;
-		}
-
-		/* copy events last; result must be valid if we need to PQclear */
-		if (conn->nEvents > 0)
-		{
-			result->events = dupEvents(conn->events, conn->nEvents,
-									   &result->memorySize);
-			if (!result->events)
-			{
-				PQclear(result);
-				return NULL;
-			}
-			result->nEvents = conn->nEvents;
-		}
-	}
-	else
-	{
-		/* defaults... */
-		result->noticeHooks.noticeRec = NULL;
-		result->noticeHooks.noticeRecArg = NULL;
-		result->noticeHooks.noticeProc = NULL;
-		result->noticeHooks.noticeProcArg = NULL;
-		result->client_encoding = PG_SQL_ASCII;
-	}
-
-	return result;
-}
-
-/*
- * PQsetResultAttrs
- *
- * Set the attributes for a given result.  This function fails if there are
- * already attributes contained in the provided result.  The call is
- * ignored if numAttributes is zero or attDescs is NULL.  If the
- * function fails, it returns zero.  If the function succeeds, it
- * returns a non-zero value.
- */
-int
-PQsetResultAttrs(PGresult *res, int numAttributes, PGresAttDesc *attDescs)
-{
-	int			i;
-
-	/* Fail if argument is NULL or OOM_result */
-	if (!res || (const PGresult *) res == &OOM_result)
-		return false;
-
-	/* If attrs already exist, they cannot be overwritten. */
-	if (res->numAttributes > 0)
-		return false;
-
-	/* ignore no-op request */
-	if (numAttributes <= 0 || !attDescs)
-		return true;
-
-	res->attDescs = (PGresAttDesc *)
-		PQresultAlloc(res, numAttributes * sizeof(PGresAttDesc));
-
-	if (!res->attDescs)
-		return false;
-
-	res->numAttributes = numAttributes;
-	memcpy(res->attDescs, attDescs, numAttributes * sizeof(PGresAttDesc));
-
-	/* deep-copy the attribute names, and determine format */
-	res->binary = 1;
-	for (i = 0; i < res->numAttributes; i++)
-	{
-		if (res->attDescs[i].name)
-			res->attDescs[i].name = pqResultStrdup(res, res->attDescs[i].name);
-		else
-			res->attDescs[i].name = res->null_field;
-
-		if (!res->attDescs[i].name)
-			return false;
-
-		if (res->attDescs[i].format == 0)
-			res->binary = 0;
-	}
-
-	return true;
-}
-
-/*
- * PQcopyResult
- *
- * Returns a deep copy of the provided 'src' PGresult, which cannot be NULL.
- * The 'flags' argument controls which portions of the result will or will
- * NOT be copied.  The created result is always put into the
- * PGRES_TUPLES_OK status.  The source result error message is not copied,
- * although cmdStatus is.
- *
- * To set custom attributes, use PQsetResultAttrs.  That function requires
- * that there are no attrs contained in the result, so to use that
- * function you cannot use the PG_COPYRES_ATTRS or PG_COPYRES_TUPLES
- * options with this function.
- *
- * Options:
- *	 PG_COPYRES_ATTRS - Copy the source result's attributes
- *
- *	 PG_COPYRES_TUPLES - Copy the source result's tuples.  This implies
- *	 copying the attrs, seeing how the attrs are needed by the tuples.
- *
- *	 PG_COPYRES_EVENTS - Copy the source result's events.
- *
- *	 PG_COPYRES_NOTICEHOOKS - Copy the source result's notice hooks.
- */
-PGresult *
-PQcopyResult(const PGresult *src, int flags)
-{
-	PGresult   *dest;
-	int			i;
-
-	if (!src)
-		return NULL;
-
-	dest = PQmakeEmptyPGresult(NULL, PGRES_TUPLES_OK);
-	if (!dest)
-		return NULL;
-
-	/* Always copy these over.  Is cmdStatus really useful here? */
-	dest->client_encoding = src->client_encoding;
-	strcpy(dest->cmdStatus, src->cmdStatus);
-
-	/* Wants attrs? */
-	if (flags & (PG_COPYRES_ATTRS | PG_COPYRES_TUPLES))
-	{
-		if (!PQsetResultAttrs(dest, src->numAttributes, src->attDescs))
-		{
-			PQclear(dest);
-			return NULL;
-		}
-	}
-
-	/* Wants to copy tuples? */
-	if (flags & PG_COPYRES_TUPLES)
-	{
-		int			tup,
-					field;
-
-		for (tup = 0; tup < src->ntups; tup++)
-		{
-			for (field = 0; field < src->numAttributes; field++)
-			{
-				if (!PQsetvalue(dest, tup, field,
-								src->tuples[tup][field].value,
-								src->tuples[tup][field].len))
-				{
-					PQclear(dest);
-					return NULL;
-				}
-			}
-		}
-	}
-
-	/* Wants to copy notice hooks? */
-	if (flags & PG_COPYRES_NOTICEHOOKS)
-		dest->noticeHooks = src->noticeHooks;
-
-	/* Wants to copy PGEvents? */
-	if ((flags & PG_COPYRES_EVENTS) && src->nEvents > 0)
-	{
-		dest->events = dupEvents(src->events, src->nEvents,
-								 &dest->memorySize);
-		if (!dest->events)
-		{
-			PQclear(dest);
-			return NULL;
-		}
-		dest->nEvents = src->nEvents;
-	}
-
-	/* Okay, trigger PGEVT_RESULTCOPY event */
-	for (i = 0; i < dest->nEvents; i++)
-	{
-		/* We don't fire events that had some previous failure */
-		if (src->events[i].resultInitialized)
-		{
-			PGEventResultCopy evt;
-
-			evt.src = src;
-			evt.dest = dest;
-			if (dest->events[i].proc(PGEVT_RESULTCOPY, &evt,
-									 dest->events[i].passThrough))
-				dest->events[i].resultInitialized = true;
-		}
-	}
-
-	return dest;
-}
-
-/*
- * Copy an array of PGEvents (with no extra space for more).
- * Does not duplicate the event instance data, sets this to NULL.
- * Also, the resultInitialized flags are all cleared.
- * The total space allocated is added to *memSize.
- */
-static PGEvent *
-dupEvents(PGEvent *events, int count, size_t *memSize)
-{
-	PGEvent    *newEvents;
-	size_t		msize;
-	int			i;
-
-	if (!events || count <= 0)
-		return NULL;
-
-	msize = count * sizeof(PGEvent);
-	newEvents = (PGEvent *) malloc(msize);
-	if (!newEvents)
-		return NULL;
-
-	for (i = 0; i < count; i++)
-	{
-		newEvents[i].proc = events[i].proc;
-		newEvents[i].passThrough = events[i].passThrough;
-		newEvents[i].data = NULL;
-		newEvents[i].resultInitialized = false;
-		newEvents[i].name = strdup(events[i].name);
-		if (!newEvents[i].name)
-		{
-			while (--i >= 0)
-				free(newEvents[i].name);
-			free(newEvents);
-			return NULL;
-		}
-		msize += strlen(events[i].name) + 1;
-	}
-
-	*memSize += msize;
-	return newEvents;
-}
-
-
-/*
- * Sets the value for a tuple field.  The tup_num must be less than or
- * equal to PQntuples(res).  If it is equal, a new tuple is created and
- * added to the result.
- * Returns a non-zero value for success and zero for failure.
- * (On failure, we report the specific problem via pqInternalNotice.)
- */
-int
-PQsetvalue(PGresult *res, int tup_num, int field_num, char *value, int len)
-{
-	PGresAttValue *attval;
-	const char *errmsg = NULL;
-
-	/* Fail if argument is NULL or OOM_result */
-	if (!res || (const PGresult *) res == &OOM_result)
-		return false;
-
-	/* Invalid field_num? */
-	if (!check_field_number(res, field_num))
-		return false;
-
-	/* Invalid tup_num, must be <= ntups */
-	if (tup_num < 0 || tup_num > res->ntups)
-	{
-		pqInternalNotice(&res->noticeHooks,
-						 "row number %d is out of range 0..%d",
-						 tup_num, res->ntups);
-		return false;
-	}
-
-	/* need to allocate a new tuple? */
-	if (tup_num == res->ntups)
-	{
-		PGresAttValue *tup;
-		int			i;
-
-		tup = (PGresAttValue *)
-			pqResultAlloc(res, res->numAttributes * sizeof(PGresAttValue),
-						  true);
-
-		if (!tup)
-			goto fail;
-
-		/* initialize each column to NULL */
-		for (i = 0; i < res->numAttributes; i++)
-		{
-			tup[i].len = NULL_LEN;
-			tup[i].value = res->null_field;
-		}
-
-		/* add it to the array */
-		if (!pqAddTuple(res, tup, &errmsg))
-			goto fail;
-	}
-
-	attval = &res->tuples[tup_num][field_num];
-
-	/* treat either NULL_LEN or NULL value pointer as a NULL field */
-	if (len == NULL_LEN || value == NULL)
-	{
-		attval->len = NULL_LEN;
-		attval->value = res->null_field;
-	}
-	else if (len <= 0)
-	{
-		attval->len = 0;
-		attval->value = res->null_field;
-	}
-	else
-	{
-		attval->value = (char *) pqResultAlloc(res, len + 1, true);
-		if (!attval->value)
-			goto fail;
-		attval->len = len;
-		memcpy(attval->value, value, len);
-		attval->value[len] = '\0';
-	}
-
-	return true;
-
-	/*
-	 * Report failure via pqInternalNotice.  If preceding code didn't provide
-	 * an error message, assume "out of memory" was meant.
-	 */
-fail:
-	if (!errmsg)
-		errmsg = libpq_gettext("out of memory");
-	pqInternalNotice(&res->noticeHooks, "%s", errmsg);
-
-	return false;
-}
-
-/*
- * pqResultAlloc - exported routine to allocate local storage in a PGresult.
- *
- * We force all such allocations to be maxaligned, since we don't know
- * whether the value might be binary.
- */
-void *
-PQresultAlloc(PGresult *res, size_t nBytes)
-{
-	/* Fail if argument is NULL or OOM_result */
-	if (!res || (const PGresult *) res == &OOM_result)
-		return NULL;
-
-	return pqResultAlloc(res, nBytes, true);
-}
-
-/*
- * pqResultAlloc -
- *		Allocate subsidiary storage for a PGresult.
- *
- * nBytes is the amount of space needed for the object.
- * If isBinary is true, we assume that we need to align the object on
- * a machine allocation boundary.
- * If isBinary is false, we assume the object is a char string and can
- * be allocated on any byte boundary.
- */
-void *
-pqResultAlloc(PGresult *res, size_t nBytes, bool isBinary)
-{
-	char	   *space;
-	PGresult_data *block;
-
-	if (!res)
-		return NULL;
-
-	if (nBytes <= 0)
-		return res->null_field;
-
-	/*
-	 * If alignment is needed, round up the current position to an alignment
-	 * boundary.
-	 */
-	if (isBinary)
-	{
-		int			offset = res->curOffset % PGRESULT_ALIGN_BOUNDARY;
-
-		if (offset)
-		{
-			res->curOffset += PGRESULT_ALIGN_BOUNDARY - offset;
-			res->spaceLeft -= PGRESULT_ALIGN_BOUNDARY - offset;
-		}
-	}
-
-	/* If there's enough space in the current block, no problem. */
-	if (nBytes <= (size_t) res->spaceLeft)
-	{
-		space = res->curBlock->space + res->curOffset;
-		res->curOffset += nBytes;
-		res->spaceLeft -= nBytes;
-		return space;
-	}
-
-	/*
-	 * If the requested object is very large, give it its own block; this
-	 * avoids wasting what might be most of the current block to start a new
-	 * block.  (We'd have to special-case requests bigger than the block size
-	 * anyway.)  The object is always given binary alignment in this case.
-	 */
-	if (nBytes >= PGRESULT_SEP_ALLOC_THRESHOLD)
-	{
-		size_t		alloc_size = nBytes + PGRESULT_BLOCK_OVERHEAD;
-
-		block = (PGresult_data *) malloc(alloc_size);
-		if (!block)
-			return NULL;
-		res->memorySize += alloc_size;
-		space = block->space + PGRESULT_BLOCK_OVERHEAD;
-		if (res->curBlock)
-		{
-			/*
-			 * Tuck special block below the active block, so that we don't
-			 * have to waste the free space in the active block.
-			 */
-			block->next = res->curBlock->next;
-			res->curBlock->next = block;
-		}
-		else
-		{
-			/* Must set up the new block as the first active block. */
-			block->next = NULL;
-			res->curBlock = block;
-			res->spaceLeft = 0; /* be sure it's marked full */
-		}
-		return space;
-	}
-
-	/* Otherwise, start a new block. */
-	block = (PGresult_data *) malloc(PGRESULT_DATA_BLOCKSIZE);
-	if (!block)
-		return NULL;
-	res->memorySize += PGRESULT_DATA_BLOCKSIZE;
-	block->next = res->curBlock;
-	res->curBlock = block;
-	if (isBinary)
-	{
-		/* object needs full alignment */
-		res->curOffset = PGRESULT_BLOCK_OVERHEAD;
-		res->spaceLeft = PGRESULT_DATA_BLOCKSIZE - PGRESULT_BLOCK_OVERHEAD;
-	}
-	else
-	{
-		/* we can cram it right after the overhead pointer */
-		res->curOffset = sizeof(PGresult_data);
-		res->spaceLeft = PGRESULT_DATA_BLOCKSIZE - sizeof(PGresult_data);
-	}
-
-	space = block->space + res->curOffset;
-	res->curOffset += nBytes;
-	res->spaceLeft -= nBytes;
-	return space;
-}
-
-/*
- * PQresultMemorySize -
- *		Returns total space allocated for the PGresult.
- */
-size_t
-PQresultMemorySize(const PGresult *res)
-{
-	if (!res)
-		return 0;
-	return res->memorySize;
-}
-
-/*
- * pqResultStrdup -
- *		Like strdup, but the space is subsidiary PGresult space.
- */
-char *
-pqResultStrdup(PGresult *res, const char *str)
-{
-	char	   *space = (char *) pqResultAlloc(res, strlen(str) + 1, false);
-
-	if (space)
-		strcpy(space, str);
-	return space;
-}
-
-/*
- * pqSetResultError -
- *		assign a new error message to a PGresult
- *
- * Copy text from errorMessage buffer beginning at given offset
- * (it's caller's responsibility that offset is valid)
- */
-void
-pqSetResultError(PGresult *res, PQExpBuffer errorMessage, int offset)
-{
-	char	   *msg;
-
-	if (!res)
-		return;
-
-	/*
-	 * We handle two OOM scenarios here.  The errorMessage buffer might be
-	 * marked "broken" due to having previously failed to allocate enough
-	 * memory for the message, or it might be fine but pqResultStrdup fails
-	 * and returns NULL.  In either case, just make res->errMsg point directly
-	 * at a constant "out of memory" string.
-	 */
-	if (!PQExpBufferBroken(errorMessage))
-		msg = pqResultStrdup(res, errorMessage->data + offset);
-	else
-		msg = NULL;
-	if (msg)
-		res->errMsg = msg;
-	else
-		res->errMsg = libpq_gettext("out of memory\n");
-}
-
-/*
- * PQclear -
- *	  free's the memory associated with a PGresult
- */
-void
-PQclear(PGresult *res)
-{
-	PGresult_data *block;
-	int			i;
-
-	/* As a convenience, do nothing for a NULL pointer */
-	if (!res)
-		return;
-	/* Also, do nothing if the argument is OOM_result */
-	if ((const PGresult *) res == &OOM_result)
-		return;
-
-	/* Close down any events we may have */
-	for (i = 0; i < res->nEvents; i++)
-	{
-		/* only send DESTROY to successfully-initialized event procs */
-		if (res->events[i].resultInitialized)
-		{
-			PGEventResultDestroy evt;
-
-			evt.result = res;
-			(void) res->events[i].proc(PGEVT_RESULTDESTROY, &evt,
-									   res->events[i].passThrough);
-		}
-		free(res->events[i].name);
-	}
-
-	free(res->events);
-
-	/* Free all the subsidiary blocks */
-	while ((block = res->curBlock) != NULL)
-	{
-		res->curBlock = block->next;
-		free(block);
-	}
-
-	/* Free the top-level tuple pointer array */
-	free(res->tuples);
-
-	/* zero out the pointer fields to catch programming errors */
-	res->attDescs = NULL;
-	res->tuples = NULL;
-	res->paramDescs = NULL;
-	res->errFields = NULL;
-	res->events = NULL;
-	res->nEvents = 0;
-	/* res->curBlock was zeroed out earlier */
-
-	/* Free the PGresult structure itself */
-	free(res);
-}
-
-/*
- * Handy subroutine to deallocate any partially constructed async result.
- *
- * Any "next" result gets cleared too.
- */
-void
-pqClearAsyncResult(PGconn *conn)
-{
-	PQclear(conn->result);
-	conn->result = NULL;
-	conn->error_result = false;
-	PQclear(conn->next_result);
-	conn->next_result = NULL;
-}
-
-/*
- * pqSaveErrorResult -
- *	  remember that we have an error condition
- *
- * In much of libpq, reporting an error just requires appending text to
- * conn->errorMessage and returning a failure code to one's caller.
- * Where returning a failure code is impractical, instead call this
- * function to remember that an error needs to be reported.
- *
- * (It might seem that appending text to conn->errorMessage should be
- * sufficient, but we can't rely on that working under out-of-memory
- * conditions.  The OOM hazard is also why we don't try to make a new
- * PGresult right here.)
- */
-void
-pqSaveErrorResult(PGconn *conn)
-{
-	/* Drop any pending result ... */
-	pqClearAsyncResult(conn);
-	/* ... and set flag to remember to make an error result later */
-	conn->error_result = true;
-}
-
-/*
- * pqSaveWriteError -
- *	  report a write failure
- *
- * As above, after appending conn->write_err_msg to whatever other error we
- * have.  This is used when we've detected a write failure and have exhausted
- * our chances of reporting something else instead.
- */
-static void
-pqSaveWriteError(PGconn *conn)
-{
-	/*
-	 * If write_err_msg is null because of previous strdup failure, do what we
-	 * can.  (It's likely our machinations here will get OOM failures as well,
-	 * but might as well try.)
-	 */
-	if (conn->write_err_msg)
-	{
-		appendPQExpBufferStr(&conn->errorMessage, conn->write_err_msg);
-		/* Avoid possibly appending the same message twice */
-		conn->write_err_msg[0] = '\0';
-	}
-	else
-		libpq_append_conn_error(conn, "write to server failed");
-
-	pqSaveErrorResult(conn);
-}
-
-/*
- * pqPrepareAsyncResult -
- *	  prepare the current async result object for return to the caller
- *
- * If there is not already an async result object, build an error object
- * using whatever is in conn->errorMessage.  In any case, clear the async
- * result storage, and update our notion of how much error text has been
- * returned to the application.
- *
- * Note that in no case (not even OOM) do we return NULL.
- */
-PGresult *
-pqPrepareAsyncResult(PGconn *conn)
-{
-	PGresult   *res;
-
-	res = conn->result;
-	if (res)
-	{
-		/*
-		 * If the pre-existing result is an ERROR (presumably something
-		 * received from the server), assume that it represents whatever is in
-		 * conn->errorMessage, and advance errorReported.
-		 */
-		if (res->resultStatus == PGRES_FATAL_ERROR)
-			conn->errorReported = conn->errorMessage.len;
-	}
-	else
-	{
-		/*
-		 * We get here after internal-to-libpq errors.  We should probably
-		 * always have error_result = true, but if we don't, gin up some error
-		 * text.
-		 */
-		if (!conn->error_result)
-			libpq_append_conn_error(conn, "no error text available");
-
-		/* Paranoia: be sure errorReported offset is sane */
-		if (conn->errorReported < 0 ||
-			conn->errorReported >= conn->errorMessage.len)
-			conn->errorReported = 0;
-
-		/*
-		 * Make a PGresult struct for the error.  We temporarily lie about the
-		 * result status, so that PQmakeEmptyPGresult doesn't uselessly copy
-		 * all of conn->errorMessage.
-		 */
-		res = PQmakeEmptyPGresult(conn, PGRES_EMPTY_QUERY);
-		if (res)
-		{
-			/*
-			 * Report whatever new error text we have, and advance
-			 * errorReported.
-			 */
-			res->resultStatus = PGRES_FATAL_ERROR;
-			pqSetResultError(res, &conn->errorMessage, conn->errorReported);
-			conn->errorReported = conn->errorMessage.len;
-		}
-		else
-		{
-			/*
-			 * Ouch, not enough memory for a PGresult.  Fortunately, we have a
-			 * card up our sleeve: we can use the static OOM_result.  Casting
-			 * away const here is a bit ugly, but it seems best to declare
-			 * OOM_result as const, in hopes it will be allocated in read-only
-			 * storage.
-			 */
-			res = unconstify(PGresult *, &OOM_result);
-
-			/*
-			 * Don't advance errorReported.  Perhaps we'll be able to report
-			 * the text later.
-			 */
-		}
-	}
-
-	/*
-	 * Replace conn->result with next_result, if any.  In the normal case
-	 * there isn't a next result and we're just dropping ownership of the
-	 * current result.  In single-row mode this restores the situation to what
-	 * it was before we created the current single-row result.
-	 */
-	conn->result = conn->next_result;
-	conn->error_result = false; /* next_result is never an error */
-	conn->next_result = NULL;
-
-	return res;
-}
-
-/*
- * pqInternalNotice - produce an internally-generated notice message
- *
- * A format string and optional arguments can be passed.  Note that we do
- * libpq_gettext() here, so callers need not.
- *
- * The supplied text is taken as primary message (ie., it should not include
- * a trailing newline, and should not be more than one line).
- */
-void
-pqInternalNotice(const PGNoticeHooks *hooks, const char *fmt,...)
-{
-	char		msgBuf[1024];
-	va_list		args;
-	PGresult   *res;
-
-	if (hooks->noticeRec == NULL)
-		return;					/* nobody home to receive notice? */
-
-	/* Format the message */
-	va_start(args, fmt);
-	vsnprintf(msgBuf, sizeof(msgBuf), libpq_gettext(fmt), args);
-	va_end(args);
-	msgBuf[sizeof(msgBuf) - 1] = '\0';	/* make real sure it's terminated */
-
-	/* Make a PGresult to pass to the notice receiver */
-	res = PQmakeEmptyPGresult(NULL, PGRES_NONFATAL_ERROR);
-	if (!res)
-		return;
-	res->noticeHooks = *hooks;
-
-	/*
-	 * Set up fields of notice.
-	 */
-	pqSaveMessageField(res, PG_DIAG_MESSAGE_PRIMARY, msgBuf);
-	pqSaveMessageField(res, PG_DIAG_SEVERITY, libpq_gettext("NOTICE"));
-	pqSaveMessageField(res, PG_DIAG_SEVERITY_NONLOCALIZED, "NOTICE");
-	/* XXX should provide a SQLSTATE too? */
-
-	/*
-	 * Result text is always just the primary message + newline.  If we can't
-	 * allocate it, substitute "out of memory", as in pqSetResultError.
-	 */
-	res->errMsg = (char *) pqResultAlloc(res, strlen(msgBuf) + 2, false);
-	if (res->errMsg)
-		sprintf(res->errMsg, "%s\n", msgBuf);
-	else
-		res->errMsg = libpq_gettext("out of memory\n");
-
-	/*
-	 * Pass to receiver, then free it.
-	 */
-	res->noticeHooks.noticeRec(res->noticeHooks.noticeRecArg, res);
-	PQclear(res);
-}
-
-/*
- * pqAddTuple
- *	  add a row pointer to the PGresult structure, growing it if necessary
- *	  Returns true if OK, false if an error prevented adding the row
- *
- * On error, *errmsgp can be set to an error string to be returned.
- * If it is left NULL, the error is presumed to be "out of memory".
- */
-static bool
-pqAddTuple(PGresult *res, PGresAttValue *tup, const char **errmsgp)
-{
-	if (res->ntups >= res->tupArrSize)
-	{
-		/*
-		 * Try to grow the array.
-		 *
-		 * We can use realloc because shallow copying of the structure is
-		 * okay. Note that the first time through, res->tuples is NULL. While
-		 * ANSI says that realloc() should act like malloc() in that case,
-		 * some old C libraries (like SunOS 4.1.x) coredump instead. On
-		 * failure realloc is supposed to return NULL without damaging the
-		 * existing allocation. Note that the positions beyond res->ntups are
-		 * garbage, not necessarily NULL.
-		 */
-		int			newSize;
-		PGresAttValue **newTuples;
-
-		/*
-		 * Since we use integers for row numbers, we can't support more than
-		 * INT_MAX rows.  Make sure we allow that many, though.
-		 */
-		if (res->tupArrSize <= INT_MAX / 2)
-			newSize = (res->tupArrSize > 0) ? res->tupArrSize * 2 : 128;
-		else if (res->tupArrSize < INT_MAX)
-			newSize = INT_MAX;
-		else
-		{
-			*errmsgp = libpq_gettext("PGresult cannot support more than INT_MAX tuples");
-			return false;
-		}
-
-		/*
-		 * Also, on 32-bit platforms we could, in theory, overflow size_t even
-		 * before newSize gets to INT_MAX.  (In practice we'd doubtless hit
-		 * OOM long before that, but let's check.)
-		 */
-#if INT_MAX >= (SIZE_MAX / 2)
-		if (newSize > SIZE_MAX / sizeof(PGresAttValue *))
-		{
-			*errmsgp = libpq_gettext("size_t overflow");
-			return false;
-		}
-#endif
-
-		if (res->tuples == NULL)
-			newTuples = (PGresAttValue **)
-				malloc(newSize * sizeof(PGresAttValue *));
-		else
-			newTuples = (PGresAttValue **)
-				realloc(res->tuples, newSize * sizeof(PGresAttValue *));
-		if (!newTuples)
-			return false;		/* malloc or realloc failed */
-		res->memorySize +=
-			(newSize - res->tupArrSize) * sizeof(PGresAttValue *);
-		res->tupArrSize = newSize;
-		res->tuples = newTuples;
-	}
-	res->tuples[res->ntups] = tup;
-	res->ntups++;
-	return true;
-}
-
-/*
- * pqSaveMessageField - save one field of an error or notice message
- */
-void
-pqSaveMessageField(PGresult *res, char code, const char *value)
-{
-	PGMessageField *pfield;
-
-	pfield = (PGMessageField *)
-		pqResultAlloc(res,
-					  offsetof(PGMessageField, contents) +
-					  strlen(value) + 1,
-					  true);
-	if (!pfield)
-		return;					/* out of memory? */
-	pfield->code = code;
-	strcpy(pfield->contents, value);
-	pfield->next = res->errFields;
-	res->errFields = pfield;
-}
-
-/*
- * pqSaveParameterStatus - remember parameter status sent by backend
- */
-void
-pqSaveParameterStatus(PGconn *conn, const char *name, const char *value)
-{
-	pgParameterStatus *pstatus;
-	pgParameterStatus *prev;
-
-	/*
-	 * Forget any old information about the parameter
-	 */
-	for (pstatus = conn->pstatus, prev = NULL;
-		 pstatus != NULL;
-		 prev = pstatus, pstatus = pstatus->next)
-	{
-		if (strcmp(pstatus->name, name) == 0)
-		{
-			if (prev)
-				prev->next = pstatus->next;
-			else
-				conn->pstatus = pstatus->next;
-			free(pstatus);		/* frees name and value strings too */
-			break;
-		}
-	}
-
-	/*
-	 * Store new info as a single malloc block
-	 */
-	pstatus = (pgParameterStatus *) malloc(sizeof(pgParameterStatus) +
-										   strlen(name) + strlen(value) + 2);
-	if (pstatus)
-	{
-		char	   *ptr;
-
-		ptr = ((char *) pstatus) + sizeof(pgParameterStatus);
-		pstatus->name = ptr;
-		strcpy(ptr, name);
-		ptr += strlen(name) + 1;
-		pstatus->value = ptr;
-		strcpy(ptr, value);
-		pstatus->next = conn->pstatus;
-		conn->pstatus = pstatus;
-	}
-
-	/*
-	 * Save values of settings that are of interest to libpq in fields of the
-	 * PGconn object.  We keep client_encoding and standard_conforming_strings
-	 * in static variables as well, so that PQescapeString and PQescapeBytea
-	 * can behave somewhat sanely (at least in single-connection-using
-	 * programs).
-	 */
-	if (strcmp(name, "client_encoding") == 0)
-	{
-		conn->client_encoding = pg_char_to_encoding(value);
-		/* if we don't recognize the encoding name, fall back to SQL_ASCII */
-		if (conn->client_encoding < 0)
-			conn->client_encoding = PG_SQL_ASCII;
-		static_client_encoding = conn->client_encoding;
-	}
-	else if (strcmp(name, "standard_conforming_strings") == 0)
-	{
-		conn->std_strings = (strcmp(value, "on") == 0);
-		static_std_strings = conn->std_strings;
-	}
-	else if (strcmp(name, "server_version") == 0)
-	{
-		/* We convert the server version to numeric form. */
-		int			cnt;
-		int			vmaj,
-					vmin,
-					vrev;
-
-		cnt = sscanf(value, "%d.%d.%d", &vmaj, &vmin, &vrev);
-
-		if (cnt == 3)
-		{
-			/* old style, e.g. 9.6.1 */
-			conn->sversion = (100 * vmaj + vmin) * 100 + vrev;
-		}
-		else if (cnt == 2)
-		{
-			if (vmaj >= 10)
-			{
-				/* new style, e.g. 10.1 */
-				conn->sversion = 100 * 100 * vmaj + vmin;
-			}
-			else
-			{
-				/* old style without minor version, e.g. 9.6devel */
-				conn->sversion = (100 * vmaj + vmin) * 100;
-			}
-		}
-		else if (cnt == 1)
-		{
-			/* new style without minor version, e.g. 10devel */
-			conn->sversion = 100 * 100 * vmaj;
-		}
-		else
-			conn->sversion = 0; /* unknown */
-	}
-	else if (strcmp(name, "default_transaction_read_only") == 0)
-	{
-		conn->default_transaction_read_only =
-			(strcmp(value, "on") == 0) ? PG_BOOL_YES : PG_BOOL_NO;
-	}
-	else if (strcmp(name, "in_hot_standby") == 0)
-	{
-		conn->in_hot_standby =
-			(strcmp(value, "on") == 0) ? PG_BOOL_YES : PG_BOOL_NO;
-	}
-	else if (strcmp(name, "scram_iterations") == 0)
-	{
-		conn->scram_sha_256_iterations = atoi(value);
-	}
-}
-
-
-/*
- * pqRowProcessor
- *	  Add the received row to the current async result (conn->result).
- *	  Returns 1 if OK, 0 if error occurred.
- *
- * On error, *errmsgp can be set to an error string to be returned.
- * (Such a string should already be translated via libpq_gettext().)
- * If it is left NULL, the error is presumed to be "out of memory".
- *
- * In single-row mode, we create a new result holding just the current row,
- * stashing the previous result in conn->next_result so that it becomes
- * active again after pqPrepareAsyncResult().  This allows the result metadata
- * (column descriptions) to be carried forward to each result row.
- */
-int
-pqRowProcessor(PGconn *conn, const char **errmsgp)
-{
-	PGresult   *res = conn->result;
-	int			nfields = res->numAttributes;
-	const PGdataValue *columns = conn->rowBuf;
-	PGresAttValue *tup;
-	int			i;
-
-	/*
-	 * In single-row mode, make a new PGresult that will hold just this one
-	 * row; the original conn->result is left unchanged so that it can be used
-	 * again as the template for future rows.
-	 */
-	if (conn->singleRowMode)
-	{
-		/* Copy everything that should be in the result at this point */
-		res = PQcopyResult(res,
-						   PG_COPYRES_ATTRS | PG_COPYRES_EVENTS |
-						   PG_COPYRES_NOTICEHOOKS);
-		if (!res)
-			return 0;
-	}
-
-	/*
-	 * Basically we just allocate space in the PGresult for each field and
-	 * copy the data over.
-	 *
-	 * Note: on malloc failure, we return 0 leaving *errmsgp still NULL, which
-	 * caller will take to mean "out of memory".  This is preferable to trying
-	 * to set up such a message here, because evidently there's not enough
-	 * memory for gettext() to do anything.
-	 */
-	tup = (PGresAttValue *)
-		pqResultAlloc(res, nfields * sizeof(PGresAttValue), true);
-	if (tup == NULL)
-		goto fail;
-
-	for (i = 0; i < nfields; i++)
-	{
-		int			clen = columns[i].len;
-
-		if (clen < 0)
-		{
-			/* null field */
-			tup[i].len = NULL_LEN;
-			tup[i].value = res->null_field;
-		}
-		else
-		{
-			bool		isbinary = (res->attDescs[i].format != 0);
-			char	   *val;
-
-			val = (char *) pqResultAlloc(res, clen + 1, isbinary);
-			if (val == NULL)
-				goto fail;
-
-			/* copy and zero-terminate the data (even if it's binary) */
-			memcpy(val, columns[i].value, clen);
-			val[clen] = '\0';
-
-			tup[i].len = clen;
-			tup[i].value = val;
-		}
-	}
-
-	/* And add the tuple to the PGresult's tuple array */
-	if (!pqAddTuple(res, tup, errmsgp))
-		goto fail;
-
-	/*
-	 * Success.  In single-row mode, make the result available to the client
-	 * immediately.
-	 */
-	if (conn->singleRowMode)
-	{
-		/* Change result status to special single-row value */
-		res->resultStatus = PGRES_SINGLE_TUPLE;
-		/* Stash old result for re-use later */
-		conn->next_result = conn->result;
-		conn->result = res;
-		/* And mark the result ready to return */
-		conn->asyncStatus = PGASYNC_READY_MORE;
-	}
-
-	return 1;
-
-fail:
-	/* release locally allocated PGresult, if we made one */
-	if (res != conn->result)
-		PQclear(res);
-	return 0;
-}
-
-
-/*
- * pqAllocCmdQueueEntry
- *		Get a command queue entry for caller to fill.
- *
- * If the recycle queue has a free element, that is returned; if not, a
- * fresh one is allocated.  Caller is responsible for adding it to the
- * command queue (pqAppendCmdQueueEntry) once the struct is filled in, or
- * releasing the memory (pqRecycleCmdQueueEntry) if an error occurs.
- *
- * If allocation fails, sets the error message and returns NULL.
- */
-static PGcmdQueueEntry *
-pqAllocCmdQueueEntry(PGconn *conn)
-{
-	PGcmdQueueEntry *entry;
-
-	if (conn->cmd_queue_recycle == NULL)
-	{
-		entry = (PGcmdQueueEntry *) malloc(sizeof(PGcmdQueueEntry));
-		if (entry == NULL)
-		{
-			libpq_append_conn_error(conn, "out of memory");
-			return NULL;
-		}
-	}
-	else
-	{
-		entry = conn->cmd_queue_recycle;
-		conn->cmd_queue_recycle = entry->next;
-	}
-	entry->next = NULL;
-	entry->query = NULL;
-
-	return entry;
-}
-
-/*
- * pqAppendCmdQueueEntry
- *		Append a caller-allocated entry to the command queue, and update
- *		conn->asyncStatus to account for it.
- *
- * The query itself must already have been put in the output buffer by the
- * caller.
- */
-static void
-pqAppendCmdQueueEntry(PGconn *conn, PGcmdQueueEntry *entry)
-{
-	Assert(entry->next == NULL);
-
-	if (conn->cmd_queue_head == NULL)
-		conn->cmd_queue_head = entry;
-	else
-		conn->cmd_queue_tail->next = entry;
-
-	conn->cmd_queue_tail = entry;
-
-	switch (conn->pipelineStatus)
-	{
-		case PQ_PIPELINE_OFF:
-		case PQ_PIPELINE_ON:
-
-			/*
-			 * When not in pipeline aborted state, if there's a result ready
-			 * to be consumed, let it be so (that is, don't change away from
-			 * READY or READY_MORE); otherwise set us busy to wait for
-			 * something to arrive from the server.
-			 */
-			if (conn->asyncStatus == PGASYNC_IDLE)
-				conn->asyncStatus = PGASYNC_BUSY;
-			break;
-
-		case PQ_PIPELINE_ABORTED:
-
-			/*
-			 * In aborted pipeline state, we don't expect anything from the
-			 * server (since we don't send any queries that are queued).
-			 * Therefore, if IDLE then do what PQgetResult would do to let
-			 * itself consume commands from the queue; if we're in any other
-			 * state, we don't have to do anything.
-			 */
-			if (conn->asyncStatus == PGASYNC_IDLE ||
-				conn->asyncStatus == PGASYNC_PIPELINE_IDLE)
-				pqPipelineProcessQueue(conn);
-			break;
-	}
-}
-
-/*
- * pqRecycleCmdQueueEntry
- *		Push a command queue entry onto the freelist.
- */
-static void
-pqRecycleCmdQueueEntry(PGconn *conn, PGcmdQueueEntry *entry)
-{
-	if (entry == NULL)
-		return;
-
-	/* recyclable entries should not have a follow-on command */
-	Assert(entry->next == NULL);
-
-	if (entry->query)
-	{
-		free(entry->query);
-		entry->query = NULL;
-	}
-
-	entry->next = conn->cmd_queue_recycle;
-	conn->cmd_queue_recycle = entry;
-}
-
-
-/*
- * PQsendQuery
- *	 Submit a query, but don't wait for it to finish
- *
- * Returns: 1 if successfully submitted
- *			0 if error (conn->errorMessage is set)
- *
- * PQsendQueryContinue is a non-exported version that behaves identically
- * except that it doesn't reset conn->errorMessage.
- */
-int
-PQsendQuery(PGconn *conn, const char *query)
-{
-	return PQsendQueryInternal(conn, query, true);
-}
-
-int
-PQsendQueryContinue(PGconn *conn, const char *query)
-{
-	return PQsendQueryInternal(conn, query, false);
-}
-
-static int
-PQsendQueryInternal(PGconn *conn, const char *query, bool newQuery)
-{
-	PGcmdQueueEntry *entry = NULL;
-
-	if (!PQsendQueryStart(conn, newQuery))
-		return 0;
-
-	/* check the argument */
-	if (!query)
-	{
-		libpq_append_conn_error(conn, "command string is a null pointer");
-		return 0;
-	}
-
-	if (conn->pipelineStatus != PQ_PIPELINE_OFF)
-	{
-		libpq_append_conn_error(conn, "%s not allowed in pipeline mode",
-								"PQsendQuery");
-		return 0;
-	}
-
-	entry = pqAllocCmdQueueEntry(conn);
-	if (entry == NULL)
-		return 0;				/* error msg already set */
-
-	/* Send the query message(s) */
-	/* construct the outgoing Query message */
-	if (pqPutMsgStart('Q', conn) < 0 ||
-		pqPuts(query, conn) < 0 ||
-		pqPutMsgEnd(conn) < 0)
-	{
-		/* error message should be set up already */
-		pqRecycleCmdQueueEntry(conn, entry);
-		return 0;
-	}
-
-	/* remember we are using simple query protocol */
-	entry->queryclass = PGQUERY_SIMPLE;
-	/* and remember the query text too, if possible */
-	entry->query = strdup(query);
-
-	/*
-	 * Give the data a push.  In nonblock mode, don't complain if we're unable
-	 * to send it all; PQgetResult() will do any additional flushing needed.
-	 */
-	if (pqFlush(conn) < 0)
-		goto sendFailed;
-
-	/* OK, it's launched! */
-	pqAppendCmdQueueEntry(conn, entry);
-
-	return 1;
-
-sendFailed:
-	pqRecycleCmdQueueEntry(conn, entry);
-	/* error message should be set up already */
-	return 0;
-}
-
-/*
- * PQsendQueryParams
- *		Like PQsendQuery, but use extended query protocol so we can pass parameters
- */
-int
-PQsendQueryParams(PGconn *conn,
-				  const char *command,
-				  int nParams,
-				  const Oid *paramTypes,
-				  const char *const *paramValues,
-				  const int *paramLengths,
-				  const int *paramFormats,
-				  int resultFormat)
-{
-	if (!PQsendQueryStart(conn, true))
-		return 0;
-
-	/* check the arguments */
-	if (!command)
-	{
-		libpq_append_conn_error(conn, "command string is a null pointer");
-		return 0;
-	}
-	if (nParams < 0 || nParams > PQ_QUERY_PARAM_MAX_LIMIT)
-	{
-		libpq_append_conn_error(conn, "number of parameters must be between 0 and %d",
-								PQ_QUERY_PARAM_MAX_LIMIT);
-		return 0;
-	}
-
-	return PQsendQueryGuts(conn,
-						   command,
-						   "",	/* use unnamed statement */
-						   nParams,
-						   paramTypes,
-						   paramValues,
-						   paramLengths,
-						   paramFormats,
-						   resultFormat);
-}
-
-/*
- * PQsendPrepare
- *	 Submit a Parse message, but don't wait for it to finish
- *
- * Returns: 1 if successfully submitted
- *			0 if error (conn->errorMessage is set)
- */
-int
-PQsendPrepare(PGconn *conn,
-			  const char *stmtName, const char *query,
-			  int nParams, const Oid *paramTypes)
-{
-	PGcmdQueueEntry *entry = NULL;
-
-	if (!PQsendQueryStart(conn, true))
-		return 0;
-
-	/* check the arguments */
-	if (!stmtName)
-	{
-		libpq_append_conn_error(conn, "statement name is a null pointer");
-		return 0;
-	}
-	if (!query)
-	{
-		libpq_append_conn_error(conn, "command string is a null pointer");
-		return 0;
-	}
-	if (nParams < 0 || nParams > PQ_QUERY_PARAM_MAX_LIMIT)
-	{
-		libpq_append_conn_error(conn, "number of parameters must be between 0 and %d",
-								PQ_QUERY_PARAM_MAX_LIMIT);
-		return 0;
-	}
-
-	entry = pqAllocCmdQueueEntry(conn);
-	if (entry == NULL)
-		return 0;				/* error msg already set */
-
-	/* construct the Parse message */
-	if (pqPutMsgStart('P', conn) < 0 ||
-		pqPuts(stmtName, conn) < 0 ||
-		pqPuts(query, conn) < 0)
-		goto sendFailed;
-
-	if (nParams > 0 && paramTypes)
-	{
-		int			i;
-
-		if (pqPutInt(nParams, 2, conn) < 0)
-			goto sendFailed;
-		for (i = 0; i < nParams; i++)
-		{
-			if (pqPutInt(paramTypes[i], 4, conn) < 0)
-				goto sendFailed;
-		}
-	}
-	else
-	{
-		if (pqPutInt(0, 2, conn) < 0)
-			goto sendFailed;
-	}
-	if (pqPutMsgEnd(conn) < 0)
-		goto sendFailed;
-
-	/* Add a Sync, unless in pipeline mode. */
-	if (conn->pipelineStatus == PQ_PIPELINE_OFF)
-	{
-		if (pqPutMsgStart('S', conn) < 0 ||
-			pqPutMsgEnd(conn) < 0)
-			goto sendFailed;
-	}
-
-	/* remember we are doing just a Parse */
-	entry->queryclass = PGQUERY_PREPARE;
-
-	/* and remember the query text too, if possible */
-	/* if insufficient memory, query just winds up NULL */
-	entry->query = strdup(query);
-
-	/*
-	 * Give the data a push (in pipeline mode, only if we're past the size
-	 * threshold).  In nonblock mode, don't complain if we're unable to send
-	 * it all; PQgetResult() will do any additional flushing needed.
-	 */
-	if (pqPipelineFlush(conn) < 0)
-		goto sendFailed;
-
-	/* OK, it's launched! */
-	pqAppendCmdQueueEntry(conn, entry);
-
-	return 1;
-
-sendFailed:
-	pqRecycleCmdQueueEntry(conn, entry);
-	/* error message should be set up already */
-	return 0;
-}
-
-/*
- * PQsendQueryPrepared
- *		Like PQsendQuery, but execute a previously prepared statement,
- *		using extended query protocol so we can pass parameters
- */
-int
-PQsendQueryPrepared(PGconn *conn,
-					const char *stmtName,
-					int nParams,
-					const char *const *paramValues,
-					const int *paramLengths,
-					const int *paramFormats,
-					int resultFormat)
-{
-	if (!PQsendQueryStart(conn, true))
-		return 0;
-
-	/* check the arguments */
-	if (!stmtName)
-	{
-		libpq_append_conn_error(conn, "statement name is a null pointer");
-		return 0;
-	}
-	if (nParams < 0 || nParams > PQ_QUERY_PARAM_MAX_LIMIT)
-	{
-		libpq_append_conn_error(conn, "number of parameters must be between 0 and %d",
-								PQ_QUERY_PARAM_MAX_LIMIT);
-		return 0;
-	}
-
-	return PQsendQueryGuts(conn,
-						   NULL,	/* no command to parse */
-						   stmtName,
-						   nParams,
-						   NULL,	/* no param types */
-						   paramValues,
-						   paramLengths,
-						   paramFormats,
-						   resultFormat);
-}
-
-/*
- * PQsendQueryStart
- *	Common startup code for PQsendQuery and sibling routines
- */
-static bool
-PQsendQueryStart(PGconn *conn, bool newQuery)
-{
-	if (!conn)
-		return false;
-
-	/*
-	 * If this is the beginning of a query cycle, reset the error state.
-	 * However, in pipeline mode with something already queued, the error
-	 * buffer belongs to that command and we shouldn't clear it.
-	 */
-	if (newQuery && conn->cmd_queue_head == NULL)
-		pqClearConnErrorState(conn);
-
-	/* Don't try to send if we know there's no live connection. */
-	if (conn->status != CONNECTION_OK)
-	{
-		libpq_append_conn_error(conn, "no connection to the server");
-		return false;
-	}
-
-	/* Can't send while already busy, either, unless enqueuing for later */
-	if (conn->asyncStatus != PGASYNC_IDLE &&
-		conn->pipelineStatus == PQ_PIPELINE_OFF)
-	{
-		libpq_append_conn_error(conn, "another command is already in progress");
-		return false;
-	}
-
-	if (conn->pipelineStatus != PQ_PIPELINE_OFF)
-	{
-		/*
-		 * When enqueuing commands we don't change much of the connection
-		 * state since it's already in use for the current command. The
-		 * connection state will get updated when pqPipelineProcessQueue()
-		 * advances to start processing the queued message.
-		 *
-		 * Just make sure we can safely enqueue given the current connection
-		 * state. We can enqueue behind another queue item, or behind a
-		 * non-queue command (one that sends its own sync), but we can't
-		 * enqueue if the connection is in a copy state.
-		 */
-		switch (conn->asyncStatus)
-		{
-			case PGASYNC_IDLE:
-			case PGASYNC_PIPELINE_IDLE:
-			case PGASYNC_READY:
-			case PGASYNC_READY_MORE:
-			case PGASYNC_BUSY:
-				/* ok to queue */
-				break;
-
-			case PGASYNC_COPY_IN:
-			case PGASYNC_COPY_OUT:
-			case PGASYNC_COPY_BOTH:
-				libpq_append_conn_error(conn, "cannot queue commands during COPY");
-				return false;
-		}
-	}
-	else
-	{
-		/*
-		 * This command's results will come in immediately. Initialize async
-		 * result-accumulation state
-		 */
-		pqClearAsyncResult(conn);
-
-		/* reset single-row processing mode */
-		conn->singleRowMode = false;
-	}
-
-	/* ready to send command message */
-	return true;
-}
-
-/*
- * PQsendQueryGuts
- *		Common code for sending a query with extended query protocol
- *		PQsendQueryStart should be done already
- *
- * command may be NULL to indicate we use an already-prepared statement
- */
-static int
-PQsendQueryGuts(PGconn *conn,
-				const char *command,
-				const char *stmtName,
-				int nParams,
-				const Oid *paramTypes,
-				const char *const *paramValues,
-				const int *paramLengths,
-				const int *paramFormats,
-				int resultFormat)
-{
-	int			i;
-	PGcmdQueueEntry *entry;
-
-	entry = pqAllocCmdQueueEntry(conn);
-	if (entry == NULL)
-		return 0;				/* error msg already set */
-
-	/*
-	 * We will send Parse (if needed), Bind, Describe Portal, Execute, Sync
-	 * (if not in pipeline mode), using specified statement name and the
-	 * unnamed portal.
-	 */
-
-	if (command)
-	{
-		/* construct the Parse message */
-		if (pqPutMsgStart('P', conn) < 0 ||
-			pqPuts(stmtName, conn) < 0 ||
-			pqPuts(command, conn) < 0)
-			goto sendFailed;
-		if (nParams > 0 && paramTypes)
-		{
-			if (pqPutInt(nParams, 2, conn) < 0)
-				goto sendFailed;
-			for (i = 0; i < nParams; i++)
-			{
-				if (pqPutInt(paramTypes[i], 4, conn) < 0)
-					goto sendFailed;
-			}
-		}
-		else
-		{
-			if (pqPutInt(0, 2, conn) < 0)
-				goto sendFailed;
-		}
-		if (pqPutMsgEnd(conn) < 0)
-			goto sendFailed;
-	}
-
-	/* Construct the Bind message */
-	if (pqPutMsgStart('B', conn) < 0 ||
-		pqPuts("", conn) < 0 ||
-		pqPuts(stmtName, conn) < 0)
-		goto sendFailed;
-
-	/* Send parameter formats */
-	if (nParams > 0 && paramFormats)
-	{
-		if (pqPutInt(nParams, 2, conn) < 0)
-			goto sendFailed;
-		for (i = 0; i < nParams; i++)
-		{
-			if (pqPutInt(paramFormats[i], 2, conn) < 0)
-				goto sendFailed;
-		}
-	}
-	else
-	{
-		if (pqPutInt(0, 2, conn) < 0)
-			goto sendFailed;
-	}
-
-	if (pqPutInt(nParams, 2, conn) < 0)
-		goto sendFailed;
-
-	/* Send parameters */
-	for (i = 0; i < nParams; i++)
-	{
-		if (paramValues && paramValues[i])
-		{
-			int			nbytes;
-
-			if (paramFormats && paramFormats[i] != 0)
-			{
-				/* binary parameter */
-				if (paramLengths)
-					nbytes = paramLengths[i];
-				else
-				{
-					libpq_append_conn_error(conn, "length must be given for binary parameter");
-					goto sendFailed;
-				}
-			}
-			else
-			{
-				/* text parameter, do not use paramLengths */
-				nbytes = strlen(paramValues[i]);
-			}
-			if (pqPutInt(nbytes, 4, conn) < 0 ||
-				pqPutnchar(paramValues[i], nbytes, conn) < 0)
-				goto sendFailed;
-		}
-		else
-		{
-			/* take the param as NULL */
-			if (pqPutInt(-1, 4, conn) < 0)
-				goto sendFailed;
-		}
-	}
-	if (pqPutInt(1, 2, conn) < 0 ||
-		pqPutInt(resultFormat, 2, conn))
-		goto sendFailed;
-	if (pqPutMsgEnd(conn) < 0)
-		goto sendFailed;
-
-	/* construct the Describe Portal message */
-	if (pqPutMsgStart('D', conn) < 0 ||
-		pqPutc('P', conn) < 0 ||
-		pqPuts("", conn) < 0 ||
-		pqPutMsgEnd(conn) < 0)
-		goto sendFailed;
-
-	/* construct the Execute message */
-	if (pqPutMsgStart('E', conn) < 0 ||
-		pqPuts("", conn) < 0 ||
-		pqPutInt(0, 4, conn) < 0 ||
-		pqPutMsgEnd(conn) < 0)
-		goto sendFailed;
-
-	/* construct the Sync message if not in pipeline mode */
-	if (conn->pipelineStatus == PQ_PIPELINE_OFF)
-	{
-		if (pqPutMsgStart('S', conn) < 0 ||
-			pqPutMsgEnd(conn) < 0)
-			goto sendFailed;
-	}
-
-	/* remember we are using extended query protocol */
-	entry->queryclass = PGQUERY_EXTENDED;
-
-	/* and remember the query text too, if possible */
-	/* if insufficient memory, query just winds up NULL */
-	if (command)
-		entry->query = strdup(command);
-
-	/*
-	 * Give the data a push (in pipeline mode, only if we're past the size
-	 * threshold).  In nonblock mode, don't complain if we're unable to send
-	 * it all; PQgetResult() will do any additional flushing needed.
-	 */
-	if (pqPipelineFlush(conn) < 0)
-		goto sendFailed;
-
-	/* OK, it's launched! */
-	pqAppendCmdQueueEntry(conn, entry);
-
-	return 1;
-
-sendFailed:
-	pqRecycleCmdQueueEntry(conn, entry);
-	/* error message should be set up already */
-	return 0;
-}
-
-/*
- * Select row-by-row processing mode
- */
-int
-PQsetSingleRowMode(PGconn *conn)
-{
-	/*
-	 * Only allow setting the flag when we have launched a query and not yet
-	 * received any results.
-	 */
-	if (!conn)
-		return 0;
-	if (conn->asyncStatus != PGASYNC_BUSY)
-		return 0;
-	if (!conn->cmd_queue_head ||
-		(conn->cmd_queue_head->queryclass != PGQUERY_SIMPLE &&
-		 conn->cmd_queue_head->queryclass != PGQUERY_EXTENDED))
-		return 0;
-	if (pgHavePendingResult(conn))
-		return 0;
-
-	/* OK, set flag */
-	conn->singleRowMode = true;
-	return 1;
-}
-
-/*
- * Consume any available input from the backend
- * 0 return: some kind of trouble
- * 1 return: no problem
- */
-int
-PQconsumeInput(PGconn *conn)
-{
-	if (!conn)
-		return 0;
-
-	/*
-	 * for non-blocking connections try to flush the send-queue, otherwise we
-	 * may never get a response for something that may not have already been
-	 * sent because it's in our write buffer!
-	 */
-	if (pqIsnonblocking(conn))
-	{
-		if (pqFlush(conn) < 0)
-			return 0;
-	}
-
-	/*
-	 * Load more data, if available. We do this no matter what state we are
-	 * in, since we are probably getting called because the application wants
-	 * to get rid of a read-select condition. Note that we will NOT block
-	 * waiting for more input.
-	 */
-	if (pqReadData(conn) < 0)
-		return 0;
-
-	/* Parsing of the data waits till later. */
-	return 1;
-}
-
-
-/*
- * parseInput: if appropriate, parse input data from backend
- * until input is exhausted or a stopping state is reached.
- * Note that this function will NOT attempt to read more data from the backend.
- */
-static void
-parseInput(PGconn *conn)
-{
-	pqParseInput3(conn);
-}
-
-/*
- * PQisBusy
- *	 Return true if PQgetResult would block waiting for input.
- */
-
-int
-PQisBusy(PGconn *conn)
-{
-	if (!conn)
-		return false;
-
-	/* Parse any available data, if our state permits. */
-	parseInput(conn);
-
-	/*
-	 * PQgetResult will return immediately in all states except BUSY.  Also,
-	 * if we've detected read EOF and dropped the connection, we can expect
-	 * that PQgetResult will fail immediately.  Note that we do *not* check
-	 * conn->write_failed here --- once that's become set, we know we have
-	 * trouble, but we need to keep trying to read until we have a complete
-	 * server message or detect read EOF.
-	 */
-	return conn->asyncStatus == PGASYNC_BUSY && conn->status != CONNECTION_BAD;
-}
-
-/*
- * PQgetResult
- *	  Get the next PGresult produced by a query.  Returns NULL if no
- *	  query work remains or an error has occurred (e.g. out of
- *	  memory).
- *
- *	  In pipeline mode, once all the result of a query have been returned,
- *	  PQgetResult returns NULL to let the user know that the next
- *	  query is being processed.  At the end of the pipeline, returns a
- *	  result with PQresultStatus(result) == PGRES_PIPELINE_SYNC.
- */
-PGresult *
-PQgetResult(PGconn *conn)
-{
-	PGresult   *res;
-
-	if (!conn)
-		return NULL;
-
-	/* Parse any available data, if our state permits. */
-	parseInput(conn);
-
-	/* If not ready to return something, block until we are. */
-	while (conn->asyncStatus == PGASYNC_BUSY)
-	{
-		int			flushResult;
-
-		/*
-		 * If data remains unsent, send it.  Else we might be waiting for the
-		 * result of a command the backend hasn't even got yet.
-		 */
-		while ((flushResult = pqFlush(conn)) > 0)
-		{
-			if (pqWait(false, true, conn))
-			{
-				flushResult = -1;
-				break;
-			}
-		}
-
-		/*
-		 * Wait for some more data, and load it.  (Note: if the connection has
-		 * been lost, pqWait should return immediately because the socket
-		 * should be read-ready, either with the last server data or with an
-		 * EOF indication.  We expect therefore that this won't result in any
-		 * undue delay in reporting a previous write failure.)
-		 */
-		if (flushResult ||
-			pqWait(true, false, conn) ||
-			pqReadData(conn) < 0)
-		{
-			/* Report the error saved by pqWait or pqReadData */
-			pqSaveErrorResult(conn);
-			conn->asyncStatus = PGASYNC_IDLE;
-			return pqPrepareAsyncResult(conn);
-		}
-
-		/* Parse it. */
-		parseInput(conn);
-
-		/*
-		 * If we had a write error, but nothing above obtained a query result
-		 * or detected a read error, report the write error.
-		 */
-		if (conn->write_failed && conn->asyncStatus == PGASYNC_BUSY)
-		{
-			pqSaveWriteError(conn);
-			conn->asyncStatus = PGASYNC_IDLE;
-			return pqPrepareAsyncResult(conn);
-		}
-	}
-
-	/* Return the appropriate thing. */
-	switch (conn->asyncStatus)
-	{
-		case PGASYNC_IDLE:
-			res = NULL;			/* query is complete */
-			break;
-		case PGASYNC_PIPELINE_IDLE:
-			Assert(conn->pipelineStatus != PQ_PIPELINE_OFF);
-
-			/*
-			 * We're about to return the NULL that terminates the round of
-			 * results from the current query; prepare to send the results of
-			 * the next query, if any, when we're called next.  If there's no
-			 * next element in the command queue, this gets us in IDLE state.
-			 */
-			pqPipelineProcessQueue(conn);
-			res = NULL;			/* query is complete */
-			break;
-
-		case PGASYNC_READY:
-			res = pqPrepareAsyncResult(conn);
-
-			/* Advance the queue as appropriate */
-			pqCommandQueueAdvance(conn, false,
-								  res->resultStatus == PGRES_PIPELINE_SYNC);
-
-			if (conn->pipelineStatus != PQ_PIPELINE_OFF)
-			{
-				/*
-				 * We're about to send the results of the current query.  Set
-				 * us idle now, and ...
-				 */
-				conn->asyncStatus = PGASYNC_PIPELINE_IDLE;
-
-				/*
-				 * ... in cases when we're sending a pipeline-sync result,
-				 * move queue processing forwards immediately, so that next
-				 * time we're called, we're prepared to return the next result
-				 * received from the server.  In all other cases, leave the
-				 * queue state change for next time, so that a terminating
-				 * NULL result is sent.
-				 *
-				 * (In other words: we don't return a NULL after a pipeline
-				 * sync.)
-				 */
-				if (res->resultStatus == PGRES_PIPELINE_SYNC)
-					pqPipelineProcessQueue(conn);
-			}
-			else
-			{
-				/* Set the state back to BUSY, allowing parsing to proceed. */
-				conn->asyncStatus = PGASYNC_BUSY;
-			}
-			break;
-		case PGASYNC_READY_MORE:
-			res = pqPrepareAsyncResult(conn);
-			/* Set the state back to BUSY, allowing parsing to proceed. */
-			conn->asyncStatus = PGASYNC_BUSY;
-			break;
-		case PGASYNC_COPY_IN:
-			res = getCopyResult(conn, PGRES_COPY_IN);
-			break;
-		case PGASYNC_COPY_OUT:
-			res = getCopyResult(conn, PGRES_COPY_OUT);
-			break;
-		case PGASYNC_COPY_BOTH:
-			res = getCopyResult(conn, PGRES_COPY_BOTH);
-			break;
-		default:
-			libpq_append_conn_error(conn, "unexpected asyncStatus: %d", (int) conn->asyncStatus);
-			pqSaveErrorResult(conn);
-			conn->asyncStatus = PGASYNC_IDLE;	/* try to restore valid state */
-			res = pqPrepareAsyncResult(conn);
-			break;
-	}
-
-	/* Time to fire PGEVT_RESULTCREATE events, if there are any */
-	if (res && res->nEvents > 0)
-		(void) PQfireResultCreateEvents(conn, res);
-
-	return res;
-}
-
-/*
- * getCopyResult
- *	  Helper for PQgetResult: generate result for COPY-in-progress cases
- */
-static PGresult *
-getCopyResult(PGconn *conn, ExecStatusType copytype)
-{
-	/*
-	 * If the server connection has been lost, don't pretend everything is
-	 * hunky-dory; instead return a PGRES_FATAL_ERROR result, and reset the
-	 * asyncStatus to idle (corresponding to what we'd do if we'd detected I/O
-	 * error in the earlier steps in PQgetResult).  The text returned in the
-	 * result is whatever is in conn->errorMessage; we hope that was filled
-	 * with something relevant when the lost connection was detected.
-	 */
-	if (conn->status != CONNECTION_OK)
-	{
-		pqSaveErrorResult(conn);
-		conn->asyncStatus = PGASYNC_IDLE;
-		return pqPrepareAsyncResult(conn);
-	}
-
-	/* If we have an async result for the COPY, return that */
-	if (conn->result && conn->result->resultStatus == copytype)
-		return pqPrepareAsyncResult(conn);
-
-	/* Otherwise, invent a suitable PGresult */
-	return PQmakeEmptyPGresult(conn, copytype);
-}
-
-
-/*
- * PQexec
- *	  send a query to the backend and package up the result in a PGresult
- *
- * If the query was not even sent, return NULL; conn->errorMessage is set to
- * a relevant message.
- * If the query was sent, a new PGresult is returned (which could indicate
- * either success or failure).
- * The user is responsible for freeing the PGresult via PQclear()
- * when done with it.
- */
-PGresult *
-PQexec(PGconn *conn, const char *query)
-{
-	if (!PQexecStart(conn))
-		return NULL;
-	if (!PQsendQuery(conn, query))
-		return NULL;
-	return PQexecFinish(conn);
-}
-
-/*
- * PQexecParams
- *		Like PQexec, but use extended query protocol so we can pass parameters
- */
-PGresult *
-PQexecParams(PGconn *conn,
-			 const char *command,
-			 int nParams,
-			 const Oid *paramTypes,
-			 const char *const *paramValues,
-			 const int *paramLengths,
-			 const int *paramFormats,
-			 int resultFormat)
-{
-	if (!PQexecStart(conn))
-		return NULL;
-	if (!PQsendQueryParams(conn, command,
-						   nParams, paramTypes, paramValues, paramLengths,
-						   paramFormats, resultFormat))
-		return NULL;
-	return PQexecFinish(conn);
-}
-
-/*
- * PQprepare
- *	  Creates a prepared statement by issuing a Parse message.
- *
- * If the query was not even sent, return NULL; conn->errorMessage is set to
- * a relevant message.
- * If the query was sent, a new PGresult is returned (which could indicate
- * either success or failure).
- * The user is responsible for freeing the PGresult via PQclear()
- * when done with it.
- */
-PGresult *
-PQprepare(PGconn *conn,
-		  const char *stmtName, const char *query,
-		  int nParams, const Oid *paramTypes)
-{
-	if (!PQexecStart(conn))
-		return NULL;
-	if (!PQsendPrepare(conn, stmtName, query, nParams, paramTypes))
-		return NULL;
-	return PQexecFinish(conn);
-}
-
-/*
- * PQexecPrepared
- *		Like PQexec, but execute a previously prepared statement,
- *		using extended query protocol so we can pass parameters
- */
-PGresult *
-PQexecPrepared(PGconn *conn,
-			   const char *stmtName,
-			   int nParams,
-			   const char *const *paramValues,
-			   const int *paramLengths,
-			   const int *paramFormats,
-			   int resultFormat)
-{
-	if (!PQexecStart(conn))
-		return NULL;
-	if (!PQsendQueryPrepared(conn, stmtName,
-							 nParams, paramValues, paramLengths,
-							 paramFormats, resultFormat))
-		return NULL;
-	return PQexecFinish(conn);
-}
-
-/*
- * Common code for PQexec and sibling routines: prepare to send command
- */
-static bool
-PQexecStart(PGconn *conn)
-{
-	PGresult   *result;
-
-	if (!conn)
-		return false;
-
-	/*
-	 * Since this is the beginning of a query cycle, reset the error state.
-	 * However, in pipeline mode with something already queued, the error
-	 * buffer belongs to that command and we shouldn't clear it.
-	 */
-	if (conn->cmd_queue_head == NULL)
-		pqClearConnErrorState(conn);
-
-	if (conn->pipelineStatus != PQ_PIPELINE_OFF)
-	{
-		libpq_append_conn_error(conn, "synchronous command execution functions are not allowed in pipeline mode");
-		return false;
-	}
-
-	/*
-	 * Silently discard any prior query result that application didn't eat.
-	 * This is probably poor design, but it's here for backward compatibility.
-	 */
-	while ((result = PQgetResult(conn)) != NULL)
-	{
-		ExecStatusType resultStatus = result->resultStatus;
-
-		PQclear(result);		/* only need its status */
-		if (resultStatus == PGRES_COPY_IN)
-		{
-			/* get out of a COPY IN state */
-			if (PQputCopyEnd(conn,
-							 libpq_gettext("COPY terminated by new PQexec")) < 0)
-				return false;
-			/* keep waiting to swallow the copy's failure message */
-		}
-		else if (resultStatus == PGRES_COPY_OUT)
-		{
-			/*
-			 * Get out of a COPY OUT state: we just switch back to BUSY and
-			 * allow the remaining COPY data to be dropped on the floor.
-			 */
-			conn->asyncStatus = PGASYNC_BUSY;
-			/* keep waiting to swallow the copy's completion message */
-		}
-		else if (resultStatus == PGRES_COPY_BOTH)
-		{
-			/* We don't allow PQexec during COPY BOTH */
-			libpq_append_conn_error(conn, "PQexec not allowed during COPY BOTH");
-			return false;
-		}
-		/* check for loss of connection, too */
-		if (conn->status == CONNECTION_BAD)
-			return false;
-	}
-
-	/* OK to send a command */
-	return true;
-}
-
-/*
- * Common code for PQexec and sibling routines: wait for command result
- */
-static PGresult *
-PQexecFinish(PGconn *conn)
-{
-	PGresult   *result;
-	PGresult   *lastResult;
-
-	/*
-	 * For backwards compatibility, return the last result if there are more
-	 * than one.  (We used to have logic here to concatenate successive error
-	 * messages, but now that happens automatically, since conn->errorMessage
-	 * will continue to accumulate errors throughout this loop.)
-	 *
-	 * We have to stop if we see copy in/out/both, however. We will resume
-	 * parsing after application performs the data transfer.
-	 *
-	 * Also stop if the connection is lost (else we'll loop infinitely).
-	 */
-	lastResult = NULL;
-	while ((result = PQgetResult(conn)) != NULL)
-	{
-		/* The CONNECTION_BAD status could have been triggered by a previous query error */
-		if (conn->status == CONNECTION_BAD && lastResult && lastResult->resultStatus == PGRES_FATAL_ERROR) {
-			PQclear(result);
-			break;
-		}
-		PQclear(lastResult);
-		lastResult = result;
-		if (result->resultStatus == PGRES_COPY_IN ||
-			result->resultStatus == PGRES_COPY_OUT ||
-			result->resultStatus == PGRES_COPY_BOTH ||
-			conn->status == CONNECTION_BAD)
-			break;
-	}
-
-	return lastResult;
-}
-
-/*
- * PQdescribePrepared
- *	  Obtain information about a previously prepared statement
- *
- * If the query was not even sent, return NULL; conn->errorMessage is set to
- * a relevant message.
- * If the query was sent, a new PGresult is returned (which could indicate
- * either success or failure).  On success, the PGresult contains status
- * PGRES_COMMAND_OK, and its parameter and column-heading fields describe
- * the statement's inputs and outputs respectively.
- * The user is responsible for freeing the PGresult via PQclear()
- * when done with it.
- */
-PGresult *
-PQdescribePrepared(PGconn *conn, const char *stmt)
-{
-	if (!PQexecStart(conn))
-		return NULL;
-	if (!PQsendDescribe(conn, 'S', stmt))
-		return NULL;
-	return PQexecFinish(conn);
-}
-
-/*
- * PQdescribePortal
- *	  Obtain information about a previously created portal
- *
- * This is much like PQdescribePrepared, except that no parameter info is
- * returned.  Note that at the moment, libpq doesn't really expose portals
- * to the client; but this can be used with a portal created by a SQL
- * DECLARE CURSOR command.
- */
-PGresult *
-PQdescribePortal(PGconn *conn, const char *portal)
-{
-	if (!PQexecStart(conn))
-		return NULL;
-	if (!PQsendDescribe(conn, 'P', portal))
-		return NULL;
-	return PQexecFinish(conn);
-}
-
-/*
- * PQsendDescribePrepared
- *	 Submit a Describe Statement command, but don't wait for it to finish
- *
- * Returns: 1 if successfully submitted
- *			0 if error (conn->errorMessage is set)
- */
-int
-PQsendDescribePrepared(PGconn *conn, const char *stmt)
-{
-	return PQsendDescribe(conn, 'S', stmt);
-}
-
-/*
- * PQsendDescribePortal
- *	 Submit a Describe Portal command, but don't wait for it to finish
- *
- * Returns: 1 if successfully submitted
- *			0 if error (conn->errorMessage is set)
- */
-int
-PQsendDescribePortal(PGconn *conn, const char *portal)
-{
-	return PQsendDescribe(conn, 'P', portal);
-}
-
-/*
- * PQsendDescribe
- *	 Common code to send a Describe command
- *
- * Available options for desc_type are
- *	 'S' to describe a prepared statement; or
- *	 'P' to describe a portal.
- * Returns 1 on success and 0 on failure.
- */
-static int
-PQsendDescribe(PGconn *conn, char desc_type, const char *desc_target)
-{
-	PGcmdQueueEntry *entry = NULL;
-
-	/* Treat null desc_target as empty string */
-	if (!desc_target)
-		desc_target = "";
-
-	if (!PQsendQueryStart(conn, true))
-		return 0;
-
-	entry = pqAllocCmdQueueEntry(conn);
-	if (entry == NULL)
-		return 0;				/* error msg already set */
-
-	/* construct the Describe message */
-	if (pqPutMsgStart('D', conn) < 0 ||
-		pqPutc(desc_type, conn) < 0 ||
-		pqPuts(desc_target, conn) < 0 ||
-		pqPutMsgEnd(conn) < 0)
-		goto sendFailed;
-
-	/* construct the Sync message */
-	if (conn->pipelineStatus == PQ_PIPELINE_OFF)
-	{
-		if (pqPutMsgStart('S', conn) < 0 ||
-			pqPutMsgEnd(conn) < 0)
-			goto sendFailed;
-	}
-
-	/* remember we are doing a Describe */
-	entry->queryclass = PGQUERY_DESCRIBE;
-
-	/*
-	 * Give the data a push (in pipeline mode, only if we're past the size
-	 * threshold).  In nonblock mode, don't complain if we're unable to send
-	 * it all; PQgetResult() will do any additional flushing needed.
-	 */
-	if (pqPipelineFlush(conn) < 0)
-		goto sendFailed;
-
-	/* OK, it's launched! */
-	pqAppendCmdQueueEntry(conn, entry);
-
-	return 1;
-
-sendFailed:
-	pqRecycleCmdQueueEntry(conn, entry);
-	/* error message should be set up already */
-	return 0;
-}
-
-/*
- * PQnotifies
- *	  returns a PGnotify* structure of the latest async notification
- * that has not yet been handled
- *
- * returns NULL, if there is currently
- * no unhandled async notification from the backend
- *
- * the CALLER is responsible for FREE'ing the structure returned
- *
- * Note that this function does not read any new data from the socket;
- * so usually, caller should call PQconsumeInput() first.
- */
-PGnotify *
-PQnotifies(PGconn *conn)
-{
-	PGnotify   *event;
-
-	if (!conn)
-		return NULL;
-
-	/* Parse any available data to see if we can extract NOTIFY messages. */
-	parseInput(conn);
-
-	event = conn->notifyHead;
-	if (event)
-	{
-		conn->notifyHead = event->next;
-		if (!conn->notifyHead)
-			conn->notifyTail = NULL;
-		event->next = NULL;		/* don't let app see the internal state */
-	}
-	return event;
-}
-
-/*
- * PQputCopyData - send some data to the backend during COPY IN or COPY BOTH
- *
- * Returns 1 if successful, 0 if data could not be sent (only possible
- * in nonblock mode), or -1 if an error occurs.
- */
-int
-PQputCopyData(PGconn *conn, const char *buffer, int nbytes)
-{
-	if (!conn)
-		return -1;
-	if (conn->asyncStatus != PGASYNC_COPY_IN &&
-		conn->asyncStatus != PGASYNC_COPY_BOTH)
-	{
-		libpq_append_conn_error(conn, "no COPY in progress");
-		return -1;
-	}
-
-	/*
-	 * Process any NOTICE or NOTIFY messages that might be pending in the
-	 * input buffer.  Since the server might generate many notices during the
-	 * COPY, we want to clean those out reasonably promptly to prevent
-	 * indefinite expansion of the input buffer.  (Note: the actual read of
-	 * input data into the input buffer happens down inside pqSendSome, but
-	 * it's not authorized to get rid of the data again.)
-	 */
-	parseInput(conn);
-
-	if (nbytes > 0)
-	{
-		/*
-		 * Try to flush any previously sent data in preference to growing the
-		 * output buffer.  If we can't enlarge the buffer enough to hold the
-		 * data, return 0 in the nonblock case, else hard error. (For
-		 * simplicity, always assume 5 bytes of overhead.)
-		 */
-		if ((conn->outBufSize - conn->outCount - 5) < nbytes)
-		{
-			if (pqFlush(conn) < 0)
-				return -1;
-			if (pqCheckOutBufferSpace(conn->outCount + 5 + (size_t) nbytes,
-									  conn))
-				return pqIsnonblocking(conn) ? 0 : -1;
-		}
-		/* Send the data (too simple to delegate to fe-protocol files) */
-		if (pqPutMsgStart('d', conn) < 0 ||
-			pqPutnchar(buffer, nbytes, conn) < 0 ||
-			pqPutMsgEnd(conn) < 0)
-			return -1;
-	}
-	return 1;
-}
-
-/*
- * PQputCopyEnd - send EOF indication to the backend during COPY IN
- *
- * After calling this, use PQgetResult() to check command completion status.
- *
- * Returns 1 if successful, 0 if data could not be sent (only possible
- * in nonblock mode), or -1 if an error occurs.
- */
-int
-PQputCopyEnd(PGconn *conn, const char *errormsg)
-{
-	if (!conn)
-		return -1;
-	if (conn->asyncStatus != PGASYNC_COPY_IN &&
-		conn->asyncStatus != PGASYNC_COPY_BOTH)
-	{
-		libpq_append_conn_error(conn, "no COPY in progress");
-		return -1;
-	}
-
-	/*
-	 * Send the COPY END indicator.  This is simple enough that we don't
-	 * bother delegating it to the fe-protocol files.
-	 */
-	if (errormsg)
-	{
-		/* Send COPY FAIL */
-		if (pqPutMsgStart('f', conn) < 0 ||
-			pqPuts(errormsg, conn) < 0 ||
-			pqPutMsgEnd(conn) < 0)
-			return -1;
-	}
-	else
-	{
-		/* Send COPY DONE */
-		if (pqPutMsgStart('c', conn) < 0 ||
-			pqPutMsgEnd(conn) < 0)
-			return -1;
-	}
-
-	/*
-	 * If we sent the COPY command in extended-query mode, we must issue a
-	 * Sync as well.
-	 */
-	if (conn->cmd_queue_head &&
-		conn->cmd_queue_head->queryclass != PGQUERY_SIMPLE)
-	{
-		if (pqPutMsgStart('S', conn) < 0 ||
-			pqPutMsgEnd(conn) < 0)
-			return -1;
-	}
-
-	/* Return to active duty */
-	if (conn->asyncStatus == PGASYNC_COPY_BOTH)
-		conn->asyncStatus = PGASYNC_COPY_OUT;
-	else
-		conn->asyncStatus = PGASYNC_BUSY;
-
-	/* Try to flush data */
-	if (pqFlush(conn) < 0)
-		return -1;
-
-	return 1;
-}
-
-/*
- * PQgetCopyData - read a row of data from the backend during COPY OUT
- * or COPY BOTH
- *
- * If successful, sets *buffer to point to a malloc'd row of data, and
- * returns row length (always > 0) as result.
- * Returns 0 if no row available yet (only possible if async is true),
- * -1 if end of copy (consult PQgetResult), or -2 if error (consult
- * PQerrorMessage).
- */
-int
-PQgetCopyData(PGconn *conn, char **buffer, int async)
-{
-	*buffer = NULL;				/* for all failure cases */
-	if (!conn)
-		return -2;
-	if (conn->asyncStatus != PGASYNC_COPY_OUT &&
-		conn->asyncStatus != PGASYNC_COPY_BOTH)
-	{
-		libpq_append_conn_error(conn, "no COPY in progress");
-		return -2;
-	}
-	return pqGetCopyData3(conn, buffer, async);
-}
-
-/*
- * PQgetline - gets a newline-terminated string from the backend.
- *
- * Chiefly here so that applications can use "COPY <rel> to stdout"
- * and read the output string.  Returns a null-terminated string in `buffer`.
- *
- * XXX this routine is now deprecated, because it can't handle binary data.
- * If called during a COPY BINARY we return EOF.
- *
- * PQgetline reads up to `length`-1 characters (like fgets(3)) but strips
- * the terminating \n (like gets(3)).
- *
- * CAUTION: the caller is responsible for detecting the end-of-copy signal
- * (a line containing just "\.") when using this routine.
- *
- * RETURNS:
- *		EOF if error (eg, invalid arguments are given)
- *		0 if EOL is reached (i.e., \n has been read)
- *				(this is required for backward-compatibility -- this
- *				 routine used to always return EOF or 0, assuming that
- *				 the line ended within `length` bytes.)
- *		1 in other cases (i.e., the buffer was filled before \n is reached)
- */
-int
-PQgetline(PGconn *conn, char *buffer, int length)
-{
-	if (!buffer || length <= 0)
-		return EOF;
-	*buffer = '\0';
-	/* length must be at least 3 to hold the \. terminator! */
-	if (length < 3)
-		return EOF;
-
-	if (!conn)
-		return EOF;
-
-	return pqGetline3(conn, buffer, length);
-}
-
-/*
- * PQgetlineAsync - gets a COPY data row without blocking.
- *
- * This routine is for applications that want to do "COPY <rel> to stdout"
- * asynchronously, that is without blocking.  Having issued the COPY command
- * and gotten a PGRES_COPY_OUT response, the app should call PQconsumeInput
- * and this routine until the end-of-data signal is detected.  Unlike
- * PQgetline, this routine takes responsibility for detecting end-of-data.
- *
- * On each call, PQgetlineAsync will return data if a complete data row
- * is available in libpq's input buffer.  Otherwise, no data is returned
- * until the rest of the row arrives.
- *
- * If -1 is returned, the end-of-data signal has been recognized (and removed
- * from libpq's input buffer).  The caller *must* next call PQendcopy and
- * then return to normal processing.
- *
- * RETURNS:
- *	 -1    if the end-of-copy-data marker has been recognized
- *	 0	   if no data is available
- *	 >0    the number of bytes returned.
- *
- * The data returned will not extend beyond a data-row boundary.  If possible
- * a whole row will be returned at one time.  But if the buffer offered by
- * the caller is too small to hold a row sent by the backend, then a partial
- * data row will be returned.  In text mode this can be detected by testing
- * whether the last returned byte is '\n' or not.
- *
- * The returned data is *not* null-terminated.
- */
-
-int
-PQgetlineAsync(PGconn *conn, char *buffer, int bufsize)
-{
-	if (!conn)
-		return -1;
-
-	return pqGetlineAsync3(conn, buffer, bufsize);
-}
-
-/*
- * PQputline -- sends a string to the backend during COPY IN.
- * Returns 0 if OK, EOF if not.
- *
- * This is deprecated primarily because the return convention doesn't allow
- * caller to tell the difference between a hard error and a nonblock-mode
- * send failure.
- */
-int
-PQputline(PGconn *conn, const char *string)
-{
-	return PQputnbytes(conn, string, strlen(string));
-}
-
-/*
- * PQputnbytes -- like PQputline, but buffer need not be null-terminated.
- * Returns 0 if OK, EOF if not.
- */
-int
-PQputnbytes(PGconn *conn, const char *buffer, int nbytes)
-{
-	if (PQputCopyData(conn, buffer, nbytes) > 0)
-		return 0;
-	else
-		return EOF;
-}
-
-/*
- * PQendcopy
- *		After completing the data transfer portion of a copy in/out,
- *		the application must call this routine to finish the command protocol.
- *
- * This is deprecated; it's cleaner to use PQgetResult to get the transfer
- * status.
- *
- * RETURNS:
- *		0 on success
- *		1 on failure
- */
-int
-PQendcopy(PGconn *conn)
-{
-	if (!conn)
-		return 0;
-
-	return pqEndcopy3(conn);
-}
-
-
-/* ----------------
- *		PQfn -	Send a function call to the POSTGRES backend.
- *
- *		conn			: backend connection
- *		fnid			: OID of function to be called
- *		result_buf		: pointer to result buffer
- *		result_len		: actual length of result is returned here
- *		result_is_int	: If the result is an integer, this must be 1,
- *						  otherwise this should be 0
- *		args			: pointer to an array of function arguments
- *						  (each has length, if integer, and value/pointer)
- *		nargs			: # of arguments in args array.
- *
- * RETURNS
- *		PGresult with status = PGRES_COMMAND_OK if successful.
- *			*result_len is > 0 if there is a return value, 0 if not.
- *		PGresult with status = PGRES_FATAL_ERROR if backend returns an error.
- *		NULL on communications failure.  conn->errorMessage will be set.
- * ----------------
- */
-
-PGresult *
-PQfn(PGconn *conn,
-	 int fnid,
-	 int *result_buf,
-	 int *result_len,
-	 int result_is_int,
-	 const PQArgBlock *args,
-	 int nargs)
-{
-	*result_len = 0;
-
-	if (!conn)
-		return NULL;
-
-	/*
-	 * Since this is the beginning of a query cycle, reset the error state.
-	 * However, in pipeline mode with something already queued, the error
-	 * buffer belongs to that command and we shouldn't clear it.
-	 */
-	if (conn->cmd_queue_head == NULL)
-		pqClearConnErrorState(conn);
-
-	if (conn->pipelineStatus != PQ_PIPELINE_OFF)
-	{
-		libpq_append_conn_error(conn, "%s not allowed in pipeline mode", "PQfn");
-		return NULL;
-	}
-
-	if (conn->sock == PGINVALID_SOCKET || conn->asyncStatus != PGASYNC_IDLE ||
-		pgHavePendingResult(conn))
-	{
-		libpq_append_conn_error(conn, "connection in wrong state");
-		return NULL;
-	}
-
-	return pqFunctionCall3(conn, fnid,
-						   result_buf, result_len,
-						   result_is_int,
-						   args, nargs);
-}
-
-/* ====== Pipeline mode support ======== */
-
-/*
- * PQenterPipelineMode
- *		Put an idle connection in pipeline mode.
- *
- * Returns 1 on success. On failure, errorMessage is set and 0 is returned.
- *
- * Commands submitted after this can be pipelined on the connection;
- * there's no requirement to wait for one to finish before the next is
- * dispatched.
- *
- * Queuing of a new query or syncing during COPY is not allowed.
- *
- * A set of commands is terminated by a PQpipelineSync.  Multiple sync
- * points can be established while in pipeline mode.  Pipeline mode can
- * be exited by calling PQexitPipelineMode() once all results are processed.
- *
- * This doesn't actually send anything on the wire, it just puts libpq
- * into a state where it can pipeline work.
- */
-int
-PQenterPipelineMode(PGconn *conn)
-{
-	if (!conn)
-		return 0;
-
-	/* succeed with no action if already in pipeline mode */
-	if (conn->pipelineStatus != PQ_PIPELINE_OFF)
-		return 1;
-
-	if (conn->asyncStatus != PGASYNC_IDLE)
-	{
-		libpq_append_conn_error(conn, "cannot enter pipeline mode, connection not idle");
-		return 0;
-	}
-
-	conn->pipelineStatus = PQ_PIPELINE_ON;
-
-	return 1;
-}
-
-/*
- * PQexitPipelineMode
- *		End pipeline mode and return to normal command mode.
- *
- * Returns 1 in success (pipeline mode successfully ended, or not in pipeline
- * mode).
- *
- * Returns 0 if in pipeline mode and cannot be ended yet.  Error message will
- * be set.
- */
-int
-PQexitPipelineMode(PGconn *conn)
-{
-	if (!conn)
-		return 0;
-
-	if (conn->pipelineStatus == PQ_PIPELINE_OFF &&
-		(conn->asyncStatus == PGASYNC_IDLE ||
-		 conn->asyncStatus == PGASYNC_PIPELINE_IDLE) &&
-		conn->cmd_queue_head == NULL)
-		return 1;
-
-	switch (conn->asyncStatus)
-	{
-		case PGASYNC_READY:
-		case PGASYNC_READY_MORE:
-			/* there are some uncollected results */
-			libpq_append_conn_error(conn, "cannot exit pipeline mode with uncollected results");
-			return 0;
-
-		case PGASYNC_BUSY:
-			libpq_append_conn_error(conn, "cannot exit pipeline mode while busy");
-			return 0;
-
-		case PGASYNC_IDLE:
-		case PGASYNC_PIPELINE_IDLE:
-			/* OK */
-			break;
-
-		case PGASYNC_COPY_IN:
-		case PGASYNC_COPY_OUT:
-		case PGASYNC_COPY_BOTH:
-			libpq_append_conn_error(conn, "cannot exit pipeline mode while in COPY");
-	}
-
-	/* still work to process */
-	if (conn->cmd_queue_head != NULL)
-	{
-		libpq_append_conn_error(conn, "cannot exit pipeline mode with uncollected results");
-		return 0;
-	}
-
-	conn->pipelineStatus = PQ_PIPELINE_OFF;
-	conn->asyncStatus = PGASYNC_IDLE;
-
-	/* Flush any pending data in out buffer */
-	if (pqFlush(conn) < 0)
-		return 0;				/* error message is setup already */
-	return 1;
-}
-
-/*
- * pqCommandQueueAdvance
- *		Remove one query from the command queue, if appropriate.
- *
- * If we have received all results corresponding to the head element
- * in the command queue, remove it.
- *
- * In simple query protocol we must not advance the command queue until the
- * ReadyForQuery message has been received.  This is because in simple mode a
- * command can have multiple queries, and we must process result for all of
- * them before moving on to the next command.
- *
- * Another consideration is synchronization during error processing in
- * extended query protocol: we refuse to advance the queue past a SYNC queue
- * element, unless the result we've received is also a SYNC.  In particular
- * this protects us from advancing when an error is received at an
- * inappropriate moment.
- */
-void
-pqCommandQueueAdvance(PGconn *conn, bool isReadyForQuery, bool gotSync)
-{
-	PGcmdQueueEntry *prevquery;
-
-	if (conn->cmd_queue_head == NULL)
-		return;
-
-	/*
-	 * If processing a query of simple query protocol, we only advance the
-	 * queue when we receive the ReadyForQuery message for it.
-	 */
-	if (conn->cmd_queue_head->queryclass == PGQUERY_SIMPLE && !isReadyForQuery)
-		return;
-
-	/*
-	 * If we're waiting for a SYNC, don't advance the queue until we get one.
-	 */
-	if (conn->cmd_queue_head->queryclass == PGQUERY_SYNC && !gotSync)
-		return;
-
-	/* delink element from queue */
-	prevquery = conn->cmd_queue_head;
-	conn->cmd_queue_head = conn->cmd_queue_head->next;
-
-	/* If the queue is now empty, reset the tail too */
-	if (conn->cmd_queue_head == NULL)
-		conn->cmd_queue_tail = NULL;
-
-	/* and make the queue element recyclable */
-	prevquery->next = NULL;
-	pqRecycleCmdQueueEntry(conn, prevquery);
-}
-
-/*
- * pqPipelineProcessQueue: subroutine for PQgetResult
- *		In pipeline mode, start processing the results of the next query in the queue.
- */
-static void
-pqPipelineProcessQueue(PGconn *conn)
-{
-	switch (conn->asyncStatus)
-	{
-		case PGASYNC_COPY_IN:
-		case PGASYNC_COPY_OUT:
-		case PGASYNC_COPY_BOTH:
-		case PGASYNC_READY:
-		case PGASYNC_READY_MORE:
-		case PGASYNC_BUSY:
-			/* client still has to process current query or results */
-			return;
-
-		case PGASYNC_IDLE:
-
-			/*
-			 * If we're in IDLE mode and there's some command in the queue,
-			 * get us into PIPELINE_IDLE mode and process normally.  Otherwise
-			 * there's nothing for us to do.
-			 */
-			if (conn->cmd_queue_head != NULL)
-			{
-				conn->asyncStatus = PGASYNC_PIPELINE_IDLE;
-				break;
-			}
-			return;
-
-		case PGASYNC_PIPELINE_IDLE:
-			Assert(conn->pipelineStatus != PQ_PIPELINE_OFF);
-			/* next query please */
-			break;
-	}
-
-	/*
-	 * Reset single-row processing mode.  (Client has to set it up for each
-	 * query, if desired.)
-	 */
-	conn->singleRowMode = false;
-
-	/*
-	 * If there are no further commands to process in the queue, get us in
-	 * "real idle" mode now.
-	 */
-	if (conn->cmd_queue_head == NULL)
-	{
-		conn->asyncStatus = PGASYNC_IDLE;
-		return;
-	}
-
-	/*
-	 * Reset the error state.  This and the next couple of steps correspond to
-	 * what PQsendQueryStart didn't do for this query.
-	 */
-	pqClearConnErrorState(conn);
-
-	/* Initialize async result-accumulation state */
-	pqClearAsyncResult(conn);
-
-	if (conn->pipelineStatus == PQ_PIPELINE_ABORTED &&
-		conn->cmd_queue_head->queryclass != PGQUERY_SYNC)
-	{
-		/*
-		 * In an aborted pipeline we don't get anything from the server for
-		 * each result; we're just discarding commands from the queue until we
-		 * get to the next sync from the server.
-		 *
-		 * The PGRES_PIPELINE_ABORTED results tell the client that its queries
-		 * got aborted.
-		 */
-		conn->result = PQmakeEmptyPGresult(conn, PGRES_PIPELINE_ABORTED);
-		if (!conn->result)
-		{
-			libpq_append_conn_error(conn, "out of memory");
-			pqSaveErrorResult(conn);
-			return;
-		}
-		conn->asyncStatus = PGASYNC_READY;
-	}
-	else
-	{
-		/* allow parsing to continue */
-		conn->asyncStatus = PGASYNC_BUSY;
-	}
-}
-
-/*
- * PQpipelineSync
- *		Send a Sync message as part of a pipeline, and flush to server
- *
- * It's legal to start submitting more commands in the pipeline immediately,
- * without waiting for the results of the current pipeline. There's no need to
- * end pipeline mode and start it again.
- *
- * If a command in a pipeline fails, every subsequent command up to and including
- * the result to the Sync message sent by PQpipelineSync gets set to
- * PGRES_PIPELINE_ABORTED state. If the whole pipeline is processed without
- * error, a PGresult with PGRES_PIPELINE_SYNC is produced.
- *
- * Queries can already have been sent before PQpipelineSync is called, but
- * PQpipelineSync need to be called before retrieving command results.
- *
- * The connection will remain in pipeline mode and unavailable for new
- * synchronous command execution functions until all results from the pipeline
- * are processed by the client.
- */
-int
-PQpipelineSync(PGconn *conn)
-{
-	PGcmdQueueEntry *entry;
-
-	if (!conn)
-		return 0;
-
-	if (conn->pipelineStatus == PQ_PIPELINE_OFF)
-	{
-		libpq_append_conn_error(conn, "cannot send pipeline when not in pipeline mode");
-		return 0;
-	}
-
-	switch (conn->asyncStatus)
-	{
-		case PGASYNC_COPY_IN:
-		case PGASYNC_COPY_OUT:
-		case PGASYNC_COPY_BOTH:
-			/* should be unreachable */
-			appendPQExpBufferStr(&conn->errorMessage,
-								 "internal error: cannot send pipeline while in COPY\n");
-			return 0;
-		case PGASYNC_READY:
-		case PGASYNC_READY_MORE:
-		case PGASYNC_BUSY:
-		case PGASYNC_IDLE:
-		case PGASYNC_PIPELINE_IDLE:
-			/* OK to send sync */
-			break;
-	}
-
-	entry = pqAllocCmdQueueEntry(conn);
-	if (entry == NULL)
-		return 0;				/* error msg already set */
-
-	entry->queryclass = PGQUERY_SYNC;
-	entry->query = NULL;
-
-	/* construct the Sync message */
-	if (pqPutMsgStart('S', conn) < 0 ||
-		pqPutMsgEnd(conn) < 0)
-		goto sendFailed;
-
-	/*
-	 * Give the data a push.  In nonblock mode, don't complain if we're unable
-	 * to send it all; PQgetResult() will do any additional flushing needed.
-	 */
-	if (PQflush(conn) < 0)
-		goto sendFailed;
-
-	/* OK, it's launched! */
-	pqAppendCmdQueueEntry(conn, entry);
-
-	return 1;
-
-sendFailed:
-	pqRecycleCmdQueueEntry(conn, entry);
-	/* error message should be set up already */
-	return 0;
-}
-
-/*
- * PQsendFlushRequest
- *		Send request for server to flush its buffer.  Useful in pipeline
- *		mode when a sync point is not desired.
- */
-int
-PQsendFlushRequest(PGconn *conn)
-{
-	if (!conn)
-		return 0;
-
-	/* Don't try to send if we know there's no live connection. */
-	if (conn->status != CONNECTION_OK)
-	{
-		libpq_append_conn_error(conn, "no connection to the server");
-		return 0;
-	}
-
-	/* Can't send while already busy, either, unless enqueuing for later */
-	if (conn->asyncStatus != PGASYNC_IDLE &&
-		conn->pipelineStatus == PQ_PIPELINE_OFF)
-	{
-		libpq_append_conn_error(conn, "another command is already in progress");
-		return 0;
-	}
-
-	if (pqPutMsgStart('H', conn) < 0 ||
-		pqPutMsgEnd(conn) < 0)
-	{
-		return 0;
-	}
-
-	/*
-	 * Give the data a push (in pipeline mode, only if we're past the size
-	 * threshold).  In nonblock mode, don't complain if we're unable to send
-	 * it all; PQgetResult() will do any additional flushing needed.
-	 */
-	if (pqPipelineFlush(conn) < 0)
-		return 0;
-
-	return 1;
-}
-
-/* ====== accessor funcs for PGresult ======== */
-
-ExecStatusType
-PQresultStatus(const PGresult *res)
-{
-	if (!res)
-		return PGRES_FATAL_ERROR;
-	return res->resultStatus;
-}
-
-char *
-PQresStatus(ExecStatusType status)
-{
-	if ((unsigned int) status >= lengthof(pgresStatus))
-		return libpq_gettext("invalid ExecStatusType code");
-	return pgresStatus[status];
-}
-
-char *
-PQresultErrorMessage(const PGresult *res)
-{
-	if (!res || !res->errMsg)
-		return "";
-	return res->errMsg;
-}
-
-char *
-PQresultVerboseErrorMessage(const PGresult *res,
-							PGVerbosity verbosity,
-							PGContextVisibility show_context)
-{
-	PQExpBufferData workBuf;
-
-	/*
-	 * Because the caller is expected to free the result string, we must
-	 * strdup any constant result.  We use plain strdup and document that
-	 * callers should expect NULL if out-of-memory.
-	 */
-	if (!res ||
-		(res->resultStatus != PGRES_FATAL_ERROR &&
-		 res->resultStatus != PGRES_NONFATAL_ERROR))
-		return strdup(libpq_gettext("PGresult is not an error result\n"));
-
-	initPQExpBuffer(&workBuf);
-
-	pqBuildErrorMessage3(&workBuf, res, verbosity, show_context);
-
-	/* If insufficient memory to format the message, fail cleanly */
-	if (PQExpBufferDataBroken(workBuf))
-	{
-		termPQExpBuffer(&workBuf);
-		return strdup(libpq_gettext("out of memory\n"));
-	}
-
-	return workBuf.data;
-}
-
-char *
-PQresultErrorField(const PGresult *res, int fieldcode)
-{
-	PGMessageField *pfield;
-
-	if (!res)
-		return NULL;
-	for (pfield = res->errFields; pfield != NULL; pfield = pfield->next)
-	{
-		if (pfield->code == fieldcode)
-			return pfield->contents;
-	}
-	return NULL;
-}
-
-int
-PQntuples(const PGresult *res)
-{
-	if (!res)
-		return 0;
-	return res->ntups;
-}
-
-int
-PQnfields(const PGresult *res)
-{
-	if (!res)
-		return 0;
-	return res->numAttributes;
-}
-
-int
-PQbinaryTuples(const PGresult *res)
-{
-	if (!res)
-		return 0;
-	return res->binary;
-}
-
-/*
- * Helper routines to range-check field numbers and tuple numbers.
- * Return true if OK, false if not
- */
-
-static int
-check_field_number(const PGresult *res, int field_num)
-{
-	if (!res)
-		return false;			/* no way to display error message... */
-	if (field_num < 0 || field_num >= res->numAttributes)
-	{
-		pqInternalNotice(&res->noticeHooks,
-						 "column number %d is out of range 0..%d",
-						 field_num, res->numAttributes - 1);
-		return false;
-	}
-	return true;
-}
-
-static int
-check_tuple_field_number(const PGresult *res,
-						 int tup_num, int field_num)
-{
-	if (!res)
-		return false;			/* no way to display error message... */
-	if (tup_num < 0 || tup_num >= res->ntups)
-	{
-		pqInternalNotice(&res->noticeHooks,
-						 "row number %d is out of range 0..%d",
-						 tup_num, res->ntups - 1);
-		return false;
-	}
-	if (field_num < 0 || field_num >= res->numAttributes)
-	{
-		pqInternalNotice(&res->noticeHooks,
-						 "column number %d is out of range 0..%d",
-						 field_num, res->numAttributes - 1);
-		return false;
-	}
-	return true;
-}
-
-static int
-check_param_number(const PGresult *res, int param_num)
-{
-	if (!res)
-		return false;			/* no way to display error message... */
-	if (param_num < 0 || param_num >= res->numParameters)
-	{
-		pqInternalNotice(&res->noticeHooks,
-						 "parameter number %d is out of range 0..%d",
-						 param_num, res->numParameters - 1);
-		return false;
-	}
-
-	return true;
-}
-
-/*
- * returns NULL if the field_num is invalid
- */
-char *
-PQfname(const PGresult *res, int field_num)
-{
-	if (!check_field_number(res, field_num))
-		return NULL;
-	if (res->attDescs)
-		return res->attDescs[field_num].name;
-	else
-		return NULL;
-}
-
-/*
- * PQfnumber: find column number given column name
- *
- * The column name is parsed as if it were in a SQL statement, including
- * case-folding and double-quote processing.  But note a possible gotcha:
- * downcasing in the frontend might follow different locale rules than
- * downcasing in the backend...
- *
- * Returns -1 if no match.  In the present backend it is also possible
- * to have multiple matches, in which case the first one is found.
- */
-int
-PQfnumber(const PGresult *res, const char *field_name)
-{
-	char	   *field_case;
-	bool		in_quotes;
-	bool		all_lower = true;
-	const char *iptr;
-	char	   *optr;
-	int			i;
-
-	if (!res)
-		return -1;
-
-	/*
-	 * Note: it is correct to reject a zero-length input string; the proper
-	 * input to match a zero-length field name would be "".
-	 */
-	if (field_name == NULL ||
-		field_name[0] == '\0' ||
-		res->attDescs == NULL)
-		return -1;
-
-	/*
-	 * Check if we can avoid the strdup() and related work because the
-	 * passed-in string wouldn't be changed before we do the check anyway.
-	 */
-	for (iptr = field_name; *iptr; iptr++)
-	{
-		char		c = *iptr;
-
-		if (c == '"' || c != pg_tolower((unsigned char) c))
-		{
-			all_lower = false;
-			break;
-		}
-	}
-
-	if (all_lower)
-		for (i = 0; i < res->numAttributes; i++)
-			if (strcmp(field_name, res->attDescs[i].name) == 0)
-				return i;
-
-	/* Fall through to the normal check if that didn't work out. */
-
-	/*
-	 * Note: this code will not reject partially quoted strings, eg
-	 * foo"BAR"foo will become fooBARfoo when it probably ought to be an error
-	 * condition.
-	 */
-	field_case = strdup(field_name);
-	if (field_case == NULL)
-		return -1;				/* grotty */
-
-	in_quotes = false;
-	optr = field_case;
-	for (iptr = field_case; *iptr; iptr++)
-	{
-		char		c = *iptr;
-
-		if (in_quotes)
-		{
-			if (c == '"')
-			{
-				if (iptr[1] == '"')
-				{
-					/* doubled quotes become a single quote */
-					*optr++ = '"';
-					iptr++;
-				}
-				else
-					in_quotes = false;
-			}
-			else
-				*optr++ = c;
-		}
-		else if (c == '"')
-			in_quotes = true;
-		else
-		{
-			c = pg_tolower((unsigned char) c);
-			*optr++ = c;
-		}
-	}
-	*optr = '\0';
-
-	for (i = 0; i < res->numAttributes; i++)
-	{
-		if (strcmp(field_case, res->attDescs[i].name) == 0)
-		{
-			free(field_case);
-			return i;
-		}
-	}
-	free(field_case);
-	return -1;
-}
-
-Oid
-PQftable(const PGresult *res, int field_num)
-{
-	if (!check_field_number(res, field_num))
-		return InvalidOid;
-	if (res->attDescs)
-		return res->attDescs[field_num].tableid;
-	else
-		return InvalidOid;
-}
-
-int
-PQftablecol(const PGresult *res, int field_num)
-{
-	if (!check_field_number(res, field_num))
-		return 0;
-	if (res->attDescs)
-		return res->attDescs[field_num].columnid;
-	else
-		return 0;
-}
-
-int
-PQfformat(const PGresult *res, int field_num)
-{
-	if (!check_field_number(res, field_num))
-		return 0;
-	if (res->attDescs)
-		return res->attDescs[field_num].format;
-	else
-		return 0;
-}
-
-Oid
-PQftype(const PGresult *res, int field_num)
-{
-	if (!check_field_number(res, field_num))
-		return InvalidOid;
-	if (res->attDescs)
-		return res->attDescs[field_num].typid;
-	else
-		return InvalidOid;
-}
-
-int
-PQfsize(const PGresult *res, int field_num)
-{
-	if (!check_field_number(res, field_num))
-		return 0;
-	if (res->attDescs)
-		return res->attDescs[field_num].typlen;
-	else
-		return 0;
-}
-
-int
-PQfmod(const PGresult *res, int field_num)
-{
-	if (!check_field_number(res, field_num))
-		return 0;
-	if (res->attDescs)
-		return res->attDescs[field_num].atttypmod;
-	else
-		return 0;
-}
-
-char *
-PQcmdStatus(PGresult *res)
-{
-	if (!res)
-		return NULL;
-	return res->cmdStatus;
-}
-
-/*
- * PQoidStatus -
- *	if the last command was an INSERT, return the oid string
- *	if not, return ""
- */
-char *
-PQoidStatus(const PGresult *res)
-{
-	/*
-	 * This must be enough to hold the result. Don't laugh, this is better
-	 * than what this function used to do.
-	 */
-	static char buf[24];
-
-	size_t		len;
-
-	if (!res || strncmp(res->cmdStatus, "INSERT ", 7) != 0)
-		return "";
-
-	len = strspn(res->cmdStatus + 7, "0123456789");
-	if (len > sizeof(buf) - 1)
-		len = sizeof(buf) - 1;
-	memcpy(buf, res->cmdStatus + 7, len);
-	buf[len] = '\0';
-
-	return buf;
-}
-
-/*
- * PQoidValue -
- *	a perhaps preferable form of the above which just returns
- *	an Oid type
- */
-Oid
-PQoidValue(const PGresult *res)
-{
-	char	   *endptr = NULL;
-	unsigned long result;
-
-	if (!res ||
-		strncmp(res->cmdStatus, "INSERT ", 7) != 0 ||
-		res->cmdStatus[7] < '0' ||
-		res->cmdStatus[7] > '9')
-		return InvalidOid;
-
-	result = strtoul(res->cmdStatus + 7, &endptr, 10);
-
-	if (!endptr || (*endptr != ' ' && *endptr != '\0'))
-		return InvalidOid;
-	else
-		return (Oid) result;
-}
-
-
-/*
- * PQcmdTuples -
- *	If the last command was INSERT/UPDATE/DELETE/MERGE/MOVE/FETCH/COPY,
- *	return a string containing the number of inserted/affected tuples.
- *	If not, return "".
- *
- *	XXX: this should probably return an int
- */
-char *
-PQcmdTuples(PGresult *res)
-{
-	char	   *p,
-			   *c;
-
-	if (!res)
-		return "";
-
-	if (strncmp(res->cmdStatus, "INSERT ", 7) == 0)
-	{
-		p = res->cmdStatus + 7;
-		/* INSERT: skip oid and space */
-		while (*p && *p != ' ')
-			p++;
-		if (*p == 0)
-			goto interpret_error;	/* no space? */
-		p++;
-	}
-	else if (strncmp(res->cmdStatus, "SELECT ", 7) == 0 ||
-			 strncmp(res->cmdStatus, "DELETE ", 7) == 0 ||
-			 strncmp(res->cmdStatus, "UPDATE ", 7) == 0)
-		p = res->cmdStatus + 7;
-	else if (strncmp(res->cmdStatus, "FETCH ", 6) == 0 ||
-			 strncmp(res->cmdStatus, "MERGE ", 6) == 0)
-		p = res->cmdStatus + 6;
-	else if (strncmp(res->cmdStatus, "MOVE ", 5) == 0 ||
-			 strncmp(res->cmdStatus, "COPY ", 5) == 0)
-		p = res->cmdStatus + 5;
-	else
-		return "";
-
-	/* check that we have an integer (at least one digit, nothing else) */
-	for (c = p; *c; c++)
-	{
-		if (!isdigit((unsigned char) *c))
-			goto interpret_error;
-	}
-	if (c == p)
-		goto interpret_error;
-
-	return p;
-
-interpret_error:
-	pqInternalNotice(&res->noticeHooks,
-					 "could not interpret result from server: %s",
-					 res->cmdStatus);
-	return "";
-}
-
-/*
- * PQgetvalue:
- *	return the value of field 'field_num' of row 'tup_num'
- */
-char *
-PQgetvalue(const PGresult *res, int tup_num, int field_num)
-{
-	if (!check_tuple_field_number(res, tup_num, field_num))
-		return NULL;
-	return res->tuples[tup_num][field_num].value;
-}
-
-/* PQgetlength:
- *	returns the actual length of a field value in bytes.
- */
-int
-PQgetlength(const PGresult *res, int tup_num, int field_num)
-{
-	if (!check_tuple_field_number(res, tup_num, field_num))
-		return 0;
-	if (res->tuples[tup_num][field_num].len != NULL_LEN)
-		return res->tuples[tup_num][field_num].len;
-	else
-		return 0;
-}
-
-/* PQgetisnull:
- *	returns the null status of a field value.
- */
-int
-PQgetisnull(const PGresult *res, int tup_num, int field_num)
-{
-	if (!check_tuple_field_number(res, tup_num, field_num))
-		return 1;				/* pretend it is null */
-	if (res->tuples[tup_num][field_num].len == NULL_LEN)
-		return 1;
-	else
-		return 0;
-}
-
-/* PQnparams:
- *	returns the number of input parameters of a prepared statement.
- */
-int
-PQnparams(const PGresult *res)
-{
-	if (!res)
-		return 0;
-	return res->numParameters;
-}
-
-/* PQparamtype:
- *	returns type Oid of the specified statement parameter.
- */
-Oid
-PQparamtype(const PGresult *res, int param_num)
-{
-	if (!check_param_number(res, param_num))
-		return InvalidOid;
-	if (res->paramDescs)
-		return res->paramDescs[param_num].typid;
-	else
-		return InvalidOid;
-}
-
-
-/* PQsetnonblocking:
- *	sets the PGconn's database connection non-blocking if the arg is true
- *	or makes it blocking if the arg is false, this will not protect
- *	you from PQexec(), you'll only be safe when using the non-blocking API.
- *	Needs to be called only on a connected database connection.
- */
-int
-PQsetnonblocking(PGconn *conn, int arg)
-{
-	bool		barg;
-
-	if (!conn || conn->status == CONNECTION_BAD)
-		return -1;
-
-	barg = (arg ? true : false);
-
-	/* early out if the socket is already in the state requested */
-	if (barg == conn->nonblocking)
-		return 0;
-
-	/*
-	 * to guarantee constancy for flushing/query/result-polling behavior we
-	 * need to flush the send queue at this point in order to guarantee proper
-	 * behavior. this is ok because either they are making a transition _from_
-	 * or _to_ blocking mode, either way we can block them.
-	 *
-	 * Clear error state in case pqFlush adds to it, unless we're actively
-	 * pipelining, in which case it seems best not to.
-	 */
-	if (conn->cmd_queue_head == NULL)
-		pqClearConnErrorState(conn);
-
-	/* if we are going from blocking to non-blocking flush here */
-	if (pqFlush(conn))
-		return -1;
-
-	conn->nonblocking = barg;
-
-	return 0;
-}
-
-/*
- * return the blocking status of the database connection
- *		true == nonblocking, false == blocking
- */
-int
-PQisnonblocking(const PGconn *conn)
-{
-	if (!conn || conn->status == CONNECTION_BAD)
-		return false;
-	return pqIsnonblocking(conn);
-}
-
-/* libpq is thread-safe? */
-int
-PQisthreadsafe(void)
-{
-#ifdef ENABLE_THREAD_SAFETY
-	return true;
-#else
-	return false;
-#endif
-}
-
-
-/* try to force data out, really only useful for non-blocking users */
-int
-PQflush(PGconn *conn)
-{
-	if (!conn || conn->status == CONNECTION_BAD)
-		return -1;
-	return pqFlush(conn);
-}
-
-/*
- * pqPipelineFlush
- *
- * In pipeline mode, data will be flushed only when the out buffer reaches the
- * threshold value.  In non-pipeline mode, it behaves as stock pqFlush.
- *
- * Returns 0 on success.
- */
-static int
-pqPipelineFlush(PGconn *conn)
-{
-	if ((conn->pipelineStatus != PQ_PIPELINE_ON) ||
-		(conn->outCount >= OUTBUFFER_THRESHOLD))
-		return pqFlush(conn);
-	return 0;
-}
-
-
-/*
- *		PQfreemem - safely frees memory allocated
- *
- * Needed mostly by Win32, unless multithreaded DLL (/MD in VC6)
- * Used for freeing memory from PQescapeBytea()/PQunescapeBytea()
- */
-void
-PQfreemem(void *ptr)
-{
-	free(ptr);
-}
-
-/*
- * PQfreeNotify - free's the memory associated with a PGnotify
- *
- * This function is here only for binary backward compatibility.
- * New code should use PQfreemem().  A macro will automatically map
- * calls to PQfreemem.  It should be removed in the future.  bjm 2003-03-24
- */
-
-#undef PQfreeNotify
-void		PQfreeNotify(PGnotify *notify);
-
-void
-PQfreeNotify(PGnotify *notify)
-{
-	PQfreemem(notify);
-}
-
-
-/*
- * Escaping arbitrary strings to get valid SQL literal strings.
- *
- * Replaces "'" with "''", and if not std_strings, replaces "\" with "\\".
- *
- * length is the length of the source string.  (Note: if a terminating NUL
- * is encountered sooner, PQescapeString stops short of "length"; the behavior
- * is thus rather like strncpy.)
- *
- * For safety the buffer at "to" must be at least 2*length + 1 bytes long.
- * A terminating NUL character is added to the output string, whether the
- * input is NUL-terminated or not.
- *
- * Returns the actual length of the output (not counting the terminating NUL).
- */
-static size_t
-PQescapeStringInternal(PGconn *conn,
-					   char *to, const char *from, size_t length,
-					   int *error,
-					   int encoding, bool std_strings)
-{
-	const char *source = from;
-	char	   *target = to;
-	size_t		remaining = length;
-
-	if (error)
-		*error = 0;
-
-	while (remaining > 0 && *source != '\0')
-	{
-		char		c = *source;
-		int			len;
-		int			i;
-
-		/* Fast path for plain ASCII */
-		if (!IS_HIGHBIT_SET(c))
-		{
-			/* Apply quoting if needed */
-			if (SQL_STR_DOUBLE(c, !std_strings))
-				*target++ = c;
-			/* Copy the character */
-			*target++ = c;
-			source++;
-			remaining--;
-			continue;
-		}
-
-		/* Slow path for possible multibyte characters */
-		len = pg_encoding_mblen(encoding, source);
-
-		/* Copy the character */
-		for (i = 0; i < len; i++)
-		{
-			if (remaining == 0 || *source == '\0')
-				break;
-			*target++ = *source++;
-			remaining--;
-		}
-
-		/*
-		 * If we hit premature end of string (ie, incomplete multibyte
-		 * character), try to pad out to the correct length with spaces. We
-		 * may not be able to pad completely, but we will always be able to
-		 * insert at least one pad space (since we'd not have quoted a
-		 * multibyte character).  This should be enough to make a string that
-		 * the server will error out on.
-		 */
-		if (i < len)
-		{
-			if (error)
-				*error = 1;
-			if (conn)
-				libpq_append_conn_error(conn, "incomplete multibyte character");
-			for (; i < len; i++)
-			{
-				if (((size_t) (target - to)) / 2 >= length)
-					break;
-				*target++ = ' ';
-			}
-			break;
-		}
-	}
-
-	/* Write the terminating NUL character. */
-	*target = '\0';
-
-	return target - to;
-}
-
-size_t
-PQescapeStringConn(PGconn *conn,
-				   char *to, const char *from, size_t length,
-				   int *error)
-{
-	if (!conn)
-	{
-		/* force empty-string result */
-		*to = '\0';
-		if (error)
-			*error = 1;
-		return 0;
-	}
-
-	if (conn->cmd_queue_head == NULL)
-		pqClearConnErrorState(conn);
-
-	return PQescapeStringInternal(conn, to, from, length, error,
-								  conn->client_encoding,
-								  conn->std_strings);
-}
-
-size_t
-PQescapeString(char *to, const char *from, size_t length)
-{
-	return PQescapeStringInternal(NULL, to, from, length, NULL,
-								  static_client_encoding,
-								  static_std_strings);
-}
-
-
-/*
- * Escape arbitrary strings.  If as_ident is true, we escape the result
- * as an identifier; if false, as a literal.  The result is returned in
- * a newly allocated buffer.  If we fail due to an encoding violation or out
- * of memory condition, we return NULL, storing an error message into conn.
- */
-static char *
-PQescapeInternal(PGconn *conn, const char *str, size_t len, bool as_ident)
-{
-	const char *s;
-	char	   *result;
-	char	   *rp;
-	int			num_quotes = 0; /* single or double, depending on as_ident */
-	int			num_backslashes = 0;
-	int			input_len;
-	int			result_size;
-	char		quote_char = as_ident ? '"' : '\'';
-
-	/* We must have a connection, else fail immediately. */
-	if (!conn)
-		return NULL;
-
-	if (conn->cmd_queue_head == NULL)
-		pqClearConnErrorState(conn);
-
-	/* Scan the string for characters that must be escaped. */
-	for (s = str; (s - str) < len && *s != '\0'; ++s)
-	{
-		if (*s == quote_char)
-			++num_quotes;
-		else if (*s == '\\')
-			++num_backslashes;
-		else if (IS_HIGHBIT_SET(*s))
-		{
-			int			charlen;
-
-			/* Slow path for possible multibyte characters */
-			charlen = pg_encoding_mblen(conn->client_encoding, s);
-
-			/* Multibyte character overruns allowable length. */
-			if ((s - str) + charlen > len || memchr(s, 0, charlen) != NULL)
-			{
-				libpq_append_conn_error(conn, "incomplete multibyte character");
-				return NULL;
-			}
-
-			/* Adjust s, bearing in mind that for loop will increment it. */
-			s += charlen - 1;
-		}
-	}
-
-	/* Allocate output buffer. */
-	input_len = s - str;
-	result_size = input_len + num_quotes + 3;	/* two quotes, plus a NUL */
-	if (!as_ident && num_backslashes > 0)
-		result_size += num_backslashes + 2;
-	result = rp = (char *) malloc(result_size);
-	if (rp == NULL)
-	{
-		libpq_append_conn_error(conn, "out of memory");
-		return NULL;
-	}
-
-	/*
-	 * If we are escaping a literal that contains backslashes, we use the
-	 * escape string syntax so that the result is correct under either value
-	 * of standard_conforming_strings.  We also emit a leading space in this
-	 * case, to guard against the possibility that the result might be
-	 * interpolated immediately following an identifier.
-	 */
-	if (!as_ident && num_backslashes > 0)
-	{
-		*rp++ = ' ';
-		*rp++ = 'E';
-	}
-
-	/* Opening quote. */
-	*rp++ = quote_char;
-
-	/*
-	 * Use fast path if possible.
-	 *
-	 * We've already verified that the input string is well-formed in the
-	 * current encoding.  If it contains no quotes and, in the case of
-	 * literal-escaping, no backslashes, then we can just copy it directly to
-	 * the output buffer, adding the necessary quotes.
-	 *
-	 * If not, we must rescan the input and process each character
-	 * individually.
-	 */
-	if (num_quotes == 0 && (num_backslashes == 0 || as_ident))
-	{
-		memcpy(rp, str, input_len);
-		rp += input_len;
-	}
-	else
-	{
-		for (s = str; s - str < input_len; ++s)
-		{
-			if (*s == quote_char || (!as_ident && *s == '\\'))
-			{
-				*rp++ = *s;
-				*rp++ = *s;
-			}
-			else if (!IS_HIGHBIT_SET(*s))
-				*rp++ = *s;
-			else
-			{
-				int			i = pg_encoding_mblen(conn->client_encoding, s);
-
-				while (1)
-				{
-					*rp++ = *s;
-					if (--i == 0)
-						break;
-					++s;		/* for loop will provide the final increment */
-				}
-			}
-		}
-	}
-
-	/* Closing quote and terminating NUL. */
-	*rp++ = quote_char;
-	*rp = '\0';
-
-	return result;
-}
-
-char *
-PQescapeLiteral(PGconn *conn, const char *str, size_t len)
-{
-	return PQescapeInternal(conn, str, len, false);
-}
-
-char *
-PQescapeIdentifier(PGconn *conn, const char *str, size_t len)
-{
-	return PQescapeInternal(conn, str, len, true);
-}
-
-/* HEX encoding support for bytea */
-static const char hextbl[] = "0123456789abcdef";
-
-static const int8 hexlookup[128] = {
-	-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-	-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-	-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-	0, 1, 2, 3, 4, 5, 6, 7, 8, 9, -1, -1, -1, -1, -1, -1,
-	-1, 10, 11, 12, 13, 14, 15, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-	-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-	-1, 10, 11, 12, 13, 14, 15, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-	-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-};
-
-static inline char
-get_hex(char c)
-{
-	int			res = -1;
-
-	if (c > 0 && c < 127)
-		res = hexlookup[(unsigned char) c];
-
-	return (char) res;
-}
-
-
-/*
- *		PQescapeBytea	- converts from binary string to the
- *		minimal encoding necessary to include the string in an SQL
- *		INSERT statement with a bytea type column as the target.
- *
- *		We can use either hex or escape (traditional) encoding.
- *		In escape mode, the following transformations are applied:
- *		'\0' == ASCII  0 == \000
- *		'\'' == ASCII 39 == ''
- *		'\\' == ASCII 92 == \\
- *		anything < 0x20, or > 0x7e ---> \ooo
- *										(where ooo is an octal expression)
- *
- *		If not std_strings, all backslashes sent to the output are doubled.
- */
-static unsigned char *
-PQescapeByteaInternal(PGconn *conn,
-					  const unsigned char *from, size_t from_length,
-					  size_t *to_length, bool std_strings, bool use_hex)
-{
-	const unsigned char *vp;
-	unsigned char *rp;
-	unsigned char *result;
-	size_t		i;
-	size_t		len;
-	size_t		bslash_len = (std_strings ? 1 : 2);
-
-	/*
-	 * empty string has 1 char ('\0')
-	 */
-	len = 1;
-
-	if (use_hex)
-	{
-		len += bslash_len + 1 + 2 * from_length;
-	}
-	else
-	{
-		vp = from;
-		for (i = from_length; i > 0; i--, vp++)
-		{
-			if (*vp < 0x20 || *vp > 0x7e)
-				len += bslash_len + 3;
-			else if (*vp == '\'')
-				len += 2;
-			else if (*vp == '\\')
-				len += bslash_len + bslash_len;
-			else
-				len++;
-		}
-	}
-
-	*to_length = len;
-	rp = result = (unsigned char *) malloc(len);
-	if (rp == NULL)
-	{
-		if (conn)
-			libpq_append_conn_error(conn, "out of memory");
-		return NULL;
-	}
-
-	if (use_hex)
-	{
-		if (!std_strings)
-			*rp++ = '\\';
-		*rp++ = '\\';
-		*rp++ = 'x';
-	}
-
-	vp = from;
-	for (i = from_length; i > 0; i--, vp++)
-	{
-		unsigned char c = *vp;
-
-		if (use_hex)
-		{
-			*rp++ = hextbl[(c >> 4) & 0xF];
-			*rp++ = hextbl[c & 0xF];
-		}
-		else if (c < 0x20 || c > 0x7e)
-		{
-			if (!std_strings)
-				*rp++ = '\\';
-			*rp++ = '\\';
-			*rp++ = (c >> 6) + '0';
-			*rp++ = ((c >> 3) & 07) + '0';
-			*rp++ = (c & 07) + '0';
-		}
-		else if (c == '\'')
-		{
-			*rp++ = '\'';
-			*rp++ = '\'';
-		}
-		else if (c == '\\')
-		{
-			if (!std_strings)
-			{
-				*rp++ = '\\';
-				*rp++ = '\\';
-			}
-			*rp++ = '\\';
-			*rp++ = '\\';
-		}
-		else
-			*rp++ = c;
-	}
-	*rp = '\0';
-
-	return result;
-}
-
-unsigned char *
-PQescapeByteaConn(PGconn *conn,
-				  const unsigned char *from, size_t from_length,
-				  size_t *to_length)
-{
-	if (!conn)
-		return NULL;
-
-	if (conn->cmd_queue_head == NULL)
-		pqClearConnErrorState(conn);
-
-	return PQescapeByteaInternal(conn, from, from_length, to_length,
-								 conn->std_strings,
-								 (conn->sversion >= 90000));
-}
-
-unsigned char *
-PQescapeBytea(const unsigned char *from, size_t from_length, size_t *to_length)
-{
-	return PQescapeByteaInternal(NULL, from, from_length, to_length,
-								 static_std_strings,
-								 false /* can't use hex */ );
-}
-
-
-#define ISFIRSTOCTDIGIT(CH) ((CH) >= '0' && (CH) <= '3')
-#define ISOCTDIGIT(CH) ((CH) >= '0' && (CH) <= '7')
-#define OCTVAL(CH) ((CH) - '0')
-
-/*
- *		PQunescapeBytea - converts the null terminated string representation
- *		of a bytea, strtext, into binary, filling a buffer. It returns a
- *		pointer to the buffer (or NULL on error), and the size of the
- *		buffer in retbuflen. The pointer may subsequently be used as an
- *		argument to the function PQfreemem.
- *
- *		The following transformations are made:
- *		\\	 == ASCII 92 == \
- *		\ooo == a byte whose value = ooo (ooo is an octal number)
- *		\x	 == x (x is any character not matched by the above transformations)
- */
-unsigned char *
-PQunescapeBytea(const unsigned char *strtext, size_t *retbuflen)
-{
-	size_t		strtextlen,
-				buflen;
-	unsigned char *buffer,
-			   *tmpbuf;
-	size_t		i,
-				j;
-
-	if (strtext == NULL)
-		return NULL;
-
-	strtextlen = strlen((const char *) strtext);
-
-	if (strtext[0] == '\\' && strtext[1] == 'x')
-	{
-		const unsigned char *s;
-		unsigned char *p;
-
-		buflen = (strtextlen - 2) / 2;
-		/* Avoid unportable malloc(0) */
-		buffer = (unsigned char *) malloc(buflen > 0 ? buflen : 1);
-		if (buffer == NULL)
-			return NULL;
-
-		s = strtext + 2;
-		p = buffer;
-		while (*s)
-		{
-			char		v1,
-						v2;
-
-			/*
-			 * Bad input is silently ignored.  Note that this includes
-			 * whitespace between hex pairs, which is allowed by byteain.
-			 */
-			v1 = get_hex(*s++);
-			if (!*s || v1 == (char) -1)
-				continue;
-			v2 = get_hex(*s++);
-			if (v2 != (char) -1)
-				*p++ = (v1 << 4) | v2;
-		}
-
-		buflen = p - buffer;
-	}
-	else
-	{
-		/*
-		 * Length of input is max length of output, but add one to avoid
-		 * unportable malloc(0) if input is zero-length.
-		 */
-		buffer = (unsigned char *) malloc(strtextlen + 1);
-		if (buffer == NULL)
-			return NULL;
-
-		for (i = j = 0; i < strtextlen;)
-		{
-			switch (strtext[i])
-			{
-				case '\\':
-					i++;
-					if (strtext[i] == '\\')
-						buffer[j++] = strtext[i++];
-					else
-					{
-						if ((ISFIRSTOCTDIGIT(strtext[i])) &&
-							(ISOCTDIGIT(strtext[i + 1])) &&
-							(ISOCTDIGIT(strtext[i + 2])))
-						{
-							int			byte;
-
-							byte = OCTVAL(strtext[i++]);
-							byte = (byte << 3) + OCTVAL(strtext[i++]);
-							byte = (byte << 3) + OCTVAL(strtext[i++]);
-							buffer[j++] = byte;
-						}
-					}
-
-					/*
-					 * Note: if we see '\' followed by something that isn't a
-					 * recognized escape sequence, we loop around having done
-					 * nothing except advance i.  Therefore the something will
-					 * be emitted as ordinary data on the next cycle. Corner
-					 * case: '\' at end of string will just be discarded.
-					 */
-					break;
-
-				default:
-					buffer[j++] = strtext[i++];
-					break;
-			}
-		}
-		buflen = j;				/* buflen is the length of the dequoted data */
-	}
-
-	/* Shrink the buffer to be no larger than necessary */
-	/* +1 avoids unportable behavior when buflen==0 */
-	tmpbuf = realloc(buffer, buflen + 1);
-
-	/* It would only be a very brain-dead realloc that could fail, but... */
-	if (!tmpbuf)
-	{
-		free(buffer);
-		return NULL;
-	}
-
-	*retbuflen = buflen;
-	return tmpbuf;
-}
diff --git a/contrib/libs/libpq/src/interfaces/libpq/fe-lobj.c b/contrib/libs/libpq/src/interfaces/libpq/fe-lobj.c
deleted file mode 100644
index 206266fd04..0000000000
--- a/contrib/libs/libpq/src/interfaces/libpq/fe-lobj.c
+++ /dev/null
@@ -1,1064 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * fe-lobj.c
- *	  Front-end large object interface
- *
- * Portions Copyright (c) 1996-2023, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- *
- * IDENTIFICATION
- *	  src/interfaces/libpq/fe-lobj.c
- *
- *-------------------------------------------------------------------------
- */
-
-#ifdef WIN32
-/*
- *	As unlink/rename are #define'd in port.h (via postgres_fe.h), io.h
- *	must be included first on MS C.  Might as well do it for all WIN32's
- *	here.
- */
-#include <io.h>
-#endif
-
-#include "postgres_fe.h"
-
-#ifdef WIN32
-#include "win32.h"
-#else
-#include <unistd.h>
-#endif
-
-#include <fcntl.h>
-#include <limits.h>
-#include <sys/stat.h>
-
-#include "libpq-fe.h"
-#include "libpq-int.h"
-#include "libpq/libpq-fs.h"		/* must come after sys/stat.h */
-#include "port/pg_bswap.h"
-
-#define LO_BUFSIZE		  8192
-
-static int	lo_initialize(PGconn *conn);
-static Oid	lo_import_internal(PGconn *conn, const char *filename, Oid oid);
-static pg_int64 lo_hton64(pg_int64 host64);
-static pg_int64 lo_ntoh64(pg_int64 net64);
-
-/*
- * lo_open
- *	  opens an existing large object
- *
- * returns the file descriptor for use in later lo_* calls
- * return -1 upon failure.
- */
-int
-lo_open(PGconn *conn, Oid lobjId, int mode)
-{
-	int			fd;
-	int			result_len;
-	PQArgBlock	argv[2];
-	PGresult   *res;
-
-	if (lo_initialize(conn) < 0)
-		return -1;
-
-	argv[0].isint = 1;
-	argv[0].len = 4;
-	argv[0].u.integer = lobjId;
-
-	argv[1].isint = 1;
-	argv[1].len = 4;
-	argv[1].u.integer = mode;
-
-	res = PQfn(conn, conn->lobjfuncs->fn_lo_open, &fd, &result_len, 1, argv, 2);
-	if (PQresultStatus(res) == PGRES_COMMAND_OK)
-	{
-		PQclear(res);
-		return fd;
-	}
-	else
-	{
-		PQclear(res);
-		return -1;
-	}
-}
-
-/*
- * lo_close
- *	  closes an existing large object
- *
- * returns 0 upon success
- * returns -1 upon failure.
- */
-int
-lo_close(PGconn *conn, int fd)
-{
-	PQArgBlock	argv[1];
-	PGresult   *res;
-	int			retval;
-	int			result_len;
-
-	if (lo_initialize(conn) < 0)
-		return -1;
-
-	argv[0].isint = 1;
-	argv[0].len = 4;
-	argv[0].u.integer = fd;
-	res = PQfn(conn, conn->lobjfuncs->fn_lo_close,
-			   &retval, &result_len, 1, argv, 1);
-	if (PQresultStatus(res) == PGRES_COMMAND_OK)
-	{
-		PQclear(res);
-		return retval;
-	}
-	else
-	{
-		PQclear(res);
-		return -1;
-	}
-}
-
-/*
- * lo_truncate
- *	  truncates an existing large object to the given size
- *
- * returns 0 upon success
- * returns -1 upon failure
- */
-int
-lo_truncate(PGconn *conn, int fd, size_t len)
-{
-	PQArgBlock	argv[2];
-	PGresult   *res;
-	int			retval;
-	int			result_len;
-
-	if (lo_initialize(conn) < 0)
-		return -1;
-
-	/* Must check this on-the-fly because it's not there pre-8.3 */
-	if (conn->lobjfuncs->fn_lo_truncate == 0)
-	{
-		libpq_append_conn_error(conn, "cannot determine OID of function %s",
-								"lo_truncate");
-		return -1;
-	}
-
-	/*
-	 * Long ago, somebody thought it'd be a good idea to declare this function
-	 * as taking size_t ... but the underlying backend function only accepts a
-	 * signed int32 length.  So throw error if the given value overflows
-	 * int32.  (A possible alternative is to automatically redirect the call
-	 * to lo_truncate64; but if the caller wanted to rely on that backend
-	 * function being available, he could have called lo_truncate64 for
-	 * himself.)
-	 */
-	if (len > (size_t) INT_MAX)
-	{
-		libpq_append_conn_error(conn, "argument of lo_truncate exceeds integer range");
-		return -1;
-	}
-
-	argv[0].isint = 1;
-	argv[0].len = 4;
-	argv[0].u.integer = fd;
-
-	argv[1].isint = 1;
-	argv[1].len = 4;
-	argv[1].u.integer = (int) len;
-
-	res = PQfn(conn, conn->lobjfuncs->fn_lo_truncate,
-			   &retval, &result_len, 1, argv, 2);
-
-	if (PQresultStatus(res) == PGRES_COMMAND_OK)
-	{
-		PQclear(res);
-		return retval;
-	}
-	else
-	{
-		PQclear(res);
-		return -1;
-	}
-}
-
-/*
- * lo_truncate64
- *	  truncates an existing large object to the given size
- *
- * returns 0 upon success
- * returns -1 upon failure
- */
-int
-lo_truncate64(PGconn *conn, int fd, pg_int64 len)
-{
-	PQArgBlock	argv[2];
-	PGresult   *res;
-	int			retval;
-	int			result_len;
-
-	if (lo_initialize(conn) < 0)
-		return -1;
-
-	if (conn->lobjfuncs->fn_lo_truncate64 == 0)
-	{
-		libpq_append_conn_error(conn, "cannot determine OID of function %s",
-								"lo_truncate64");
-		return -1;
-	}
-
-	argv[0].isint = 1;
-	argv[0].len = 4;
-	argv[0].u.integer = fd;
-
-	len = lo_hton64(len);
-	argv[1].isint = 0;
-	argv[1].len = 8;
-	argv[1].u.ptr = (int *) &len;
-
-	res = PQfn(conn, conn->lobjfuncs->fn_lo_truncate64,
-			   &retval, &result_len, 1, argv, 2);
-
-	if (PQresultStatus(res) == PGRES_COMMAND_OK)
-	{
-		PQclear(res);
-		return retval;
-	}
-	else
-	{
-		PQclear(res);
-		return -1;
-	}
-}
-
-/*
- * lo_read
- *	  read len bytes of the large object into buf
- *
- * returns the number of bytes read, or -1 on failure.
- * the CALLER must have allocated enough space to hold the result returned
- */
-
-int
-lo_read(PGconn *conn, int fd, char *buf, size_t len)
-{
-	PQArgBlock	argv[2];
-	PGresult   *res;
-	int			result_len;
-
-	if (lo_initialize(conn) < 0)
-		return -1;
-
-	/*
-	 * Long ago, somebody thought it'd be a good idea to declare this function
-	 * as taking size_t ... but the underlying backend function only accepts a
-	 * signed int32 length.  So throw error if the given value overflows
-	 * int32.
-	 */
-	if (len > (size_t) INT_MAX)
-	{
-		libpq_append_conn_error(conn, "argument of lo_read exceeds integer range");
-		return -1;
-	}
-
-	argv[0].isint = 1;
-	argv[0].len = 4;
-	argv[0].u.integer = fd;
-
-	argv[1].isint = 1;
-	argv[1].len = 4;
-	argv[1].u.integer = (int) len;
-
-	res = PQfn(conn, conn->lobjfuncs->fn_lo_read,
-			   (void *) buf, &result_len, 0, argv, 2);
-	if (PQresultStatus(res) == PGRES_COMMAND_OK)
-	{
-		PQclear(res);
-		return result_len;
-	}
-	else
-	{
-		PQclear(res);
-		return -1;
-	}
-}
-
-/*
- * lo_write
- *	  write len bytes of buf into the large object fd
- *
- * returns the number of bytes written, or -1 on failure.
- */
-int
-lo_write(PGconn *conn, int fd, const char *buf, size_t len)
-{
-	PQArgBlock	argv[2];
-	PGresult   *res;
-	int			result_len;
-	int			retval;
-
-	if (lo_initialize(conn) < 0)
-		return -1;
-
-	/*
-	 * Long ago, somebody thought it'd be a good idea to declare this function
-	 * as taking size_t ... but the underlying backend function only accepts a
-	 * signed int32 length.  So throw error if the given value overflows
-	 * int32.
-	 */
-	if (len > (size_t) INT_MAX)
-	{
-		libpq_append_conn_error(conn, "argument of lo_write exceeds integer range");
-		return -1;
-	}
-
-	argv[0].isint = 1;
-	argv[0].len = 4;
-	argv[0].u.integer = fd;
-
-	argv[1].isint = 0;
-	argv[1].len = (int) len;
-	argv[1].u.ptr = (int *) unconstify(char *, buf);
-
-	res = PQfn(conn, conn->lobjfuncs->fn_lo_write,
-			   &retval, &result_len, 1, argv, 2);
-	if (PQresultStatus(res) == PGRES_COMMAND_OK)
-	{
-		PQclear(res);
-		return retval;
-	}
-	else
-	{
-		PQclear(res);
-		return -1;
-	}
-}
-
-/*
- * lo_lseek
- *	  change the current read or write location on a large object
- */
-int
-lo_lseek(PGconn *conn, int fd, int offset, int whence)
-{
-	PQArgBlock	argv[3];
-	PGresult   *res;
-	int			retval;
-	int			result_len;
-
-	if (lo_initialize(conn) < 0)
-		return -1;
-
-	argv[0].isint = 1;
-	argv[0].len = 4;
-	argv[0].u.integer = fd;
-
-	argv[1].isint = 1;
-	argv[1].len = 4;
-	argv[1].u.integer = offset;
-
-	argv[2].isint = 1;
-	argv[2].len = 4;
-	argv[2].u.integer = whence;
-
-	res = PQfn(conn, conn->lobjfuncs->fn_lo_lseek,
-			   &retval, &result_len, 1, argv, 3);
-	if (PQresultStatus(res) == PGRES_COMMAND_OK)
-	{
-		PQclear(res);
-		return retval;
-	}
-	else
-	{
-		PQclear(res);
-		return -1;
-	}
-}
-
-/*
- * lo_lseek64
- *	  change the current read or write location on a large object
- */
-pg_int64
-lo_lseek64(PGconn *conn, int fd, pg_int64 offset, int whence)
-{
-	PQArgBlock	argv[3];
-	PGresult   *res;
-	pg_int64	retval;
-	int			result_len;
-
-	if (lo_initialize(conn) < 0)
-		return -1;
-
-	if (conn->lobjfuncs->fn_lo_lseek64 == 0)
-	{
-		libpq_append_conn_error(conn, "cannot determine OID of function %s",
-								"lo_lseek64");
-		return -1;
-	}
-
-	argv[0].isint = 1;
-	argv[0].len = 4;
-	argv[0].u.integer = fd;
-
-	offset = lo_hton64(offset);
-	argv[1].isint = 0;
-	argv[1].len = 8;
-	argv[1].u.ptr = (int *) &offset;
-
-	argv[2].isint = 1;
-	argv[2].len = 4;
-	argv[2].u.integer = whence;
-
-	res = PQfn(conn, conn->lobjfuncs->fn_lo_lseek64,
-			   (void *) &retval, &result_len, 0, argv, 3);
-	if (PQresultStatus(res) == PGRES_COMMAND_OK && result_len == 8)
-	{
-		PQclear(res);
-		return lo_ntoh64(retval);
-	}
-	else
-	{
-		PQclear(res);
-		return -1;
-	}
-}
-
-/*
- * lo_creat
- *	  create a new large object
- * the mode is ignored (once upon a time it had a use)
- *
- * returns the oid of the large object created or
- * InvalidOid upon failure
- */
-Oid
-lo_creat(PGconn *conn, int mode)
-{
-	PQArgBlock	argv[1];
-	PGresult   *res;
-	int			retval;
-	int			result_len;
-
-	if (lo_initialize(conn) < 0)
-		return InvalidOid;
-
-	argv[0].isint = 1;
-	argv[0].len = 4;
-	argv[0].u.integer = mode;
-	res = PQfn(conn, conn->lobjfuncs->fn_lo_creat,
-			   &retval, &result_len, 1, argv, 1);
-	if (PQresultStatus(res) == PGRES_COMMAND_OK)
-	{
-		PQclear(res);
-		return (Oid) retval;
-	}
-	else
-	{
-		PQclear(res);
-		return InvalidOid;
-	}
-}
-
-/*
- * lo_create
- *	  create a new large object
- * if lobjId isn't InvalidOid, it specifies the OID to (attempt to) create
- *
- * returns the oid of the large object created or
- * InvalidOid upon failure
- */
-Oid
-lo_create(PGconn *conn, Oid lobjId)
-{
-	PQArgBlock	argv[1];
-	PGresult   *res;
-	int			retval;
-	int			result_len;
-
-	if (lo_initialize(conn) < 0)
-		return InvalidOid;
-
-	/* Must check this on-the-fly because it's not there pre-8.1 */
-	if (conn->lobjfuncs->fn_lo_create == 0)
-	{
-		libpq_append_conn_error(conn, "cannot determine OID of function %s",
-								"lo_create");
-		return InvalidOid;
-	}
-
-	argv[0].isint = 1;
-	argv[0].len = 4;
-	argv[0].u.integer = lobjId;
-	res = PQfn(conn, conn->lobjfuncs->fn_lo_create,
-			   &retval, &result_len, 1, argv, 1);
-	if (PQresultStatus(res) == PGRES_COMMAND_OK)
-	{
-		PQclear(res);
-		return (Oid) retval;
-	}
-	else
-	{
-		PQclear(res);
-		return InvalidOid;
-	}
-}
-
-
-/*
- * lo_tell
- *	  returns the current seek location of the large object
- */
-int
-lo_tell(PGconn *conn, int fd)
-{
-	int			retval;
-	PQArgBlock	argv[1];
-	PGresult   *res;
-	int			result_len;
-
-	if (lo_initialize(conn) < 0)
-		return -1;
-
-	argv[0].isint = 1;
-	argv[0].len = 4;
-	argv[0].u.integer = fd;
-
-	res = PQfn(conn, conn->lobjfuncs->fn_lo_tell,
-			   &retval, &result_len, 1, argv, 1);
-	if (PQresultStatus(res) == PGRES_COMMAND_OK)
-	{
-		PQclear(res);
-		return retval;
-	}
-	else
-	{
-		PQclear(res);
-		return -1;
-	}
-}
-
-/*
- * lo_tell64
- *	  returns the current seek location of the large object
- */
-pg_int64
-lo_tell64(PGconn *conn, int fd)
-{
-	pg_int64	retval;
-	PQArgBlock	argv[1];
-	PGresult   *res;
-	int			result_len;
-
-	if (lo_initialize(conn) < 0)
-		return -1;
-
-	if (conn->lobjfuncs->fn_lo_tell64 == 0)
-	{
-		libpq_append_conn_error(conn, "cannot determine OID of function %s",
-								"lo_tell64");
-		return -1;
-	}
-
-	argv[0].isint = 1;
-	argv[0].len = 4;
-	argv[0].u.integer = fd;
-
-	res = PQfn(conn, conn->lobjfuncs->fn_lo_tell64,
-			   (void *) &retval, &result_len, 0, argv, 1);
-	if (PQresultStatus(res) == PGRES_COMMAND_OK && result_len == 8)
-	{
-		PQclear(res);
-		return lo_ntoh64(retval);
-	}
-	else
-	{
-		PQclear(res);
-		return -1;
-	}
-}
-
-/*
- * lo_unlink
- *	  delete a file
- */
-
-int
-lo_unlink(PGconn *conn, Oid lobjId)
-{
-	PQArgBlock	argv[1];
-	PGresult   *res;
-	int			result_len;
-	int			retval;
-
-	if (lo_initialize(conn) < 0)
-		return -1;
-
-	argv[0].isint = 1;
-	argv[0].len = 4;
-	argv[0].u.integer = lobjId;
-
-	res = PQfn(conn, conn->lobjfuncs->fn_lo_unlink,
-			   &retval, &result_len, 1, argv, 1);
-	if (PQresultStatus(res) == PGRES_COMMAND_OK)
-	{
-		PQclear(res);
-		return retval;
-	}
-	else
-	{
-		PQclear(res);
-		return -1;
-	}
-}
-
-/*
- * lo_import -
- *	  imports a file as an (inversion) large object.
- *
- * returns the oid of that object upon success,
- * returns InvalidOid upon failure
- */
-
-Oid
-lo_import(PGconn *conn, const char *filename)
-{
-	return lo_import_internal(conn, filename, InvalidOid);
-}
-
-/*
- * lo_import_with_oid -
- *	  imports a file as an (inversion) large object.
- *	  large object id can be specified.
- *
- * returns the oid of that object upon success,
- * returns InvalidOid upon failure
- */
-
-Oid
-lo_import_with_oid(PGconn *conn, const char *filename, Oid lobjId)
-{
-	return lo_import_internal(conn, filename, lobjId);
-}
-
-static Oid
-lo_import_internal(PGconn *conn, const char *filename, Oid oid)
-{
-	int			fd;
-	int			nbytes,
-				tmp;
-	char		buf[LO_BUFSIZE];
-	Oid			lobjOid;
-	int			lobj;
-	char		sebuf[PG_STRERROR_R_BUFLEN];
-
-	if (conn == NULL)
-		return InvalidOid;
-
-	/* Since this is the beginning of a query cycle, reset the error state */
-	pqClearConnErrorState(conn);
-
-	/*
-	 * open the file to be read in
-	 */
-	fd = open(filename, O_RDONLY | PG_BINARY, 0666);
-	if (fd < 0)
-	{							/* error */
-		libpq_append_conn_error(conn, "could not open file \"%s\": %s",
-								filename, strerror_r(errno, sebuf, sizeof(sebuf)));
-		return InvalidOid;
-	}
-
-	/*
-	 * create an inversion object
-	 */
-	if (oid == InvalidOid)
-		lobjOid = lo_creat(conn, INV_READ | INV_WRITE);
-	else
-		lobjOid = lo_create(conn, oid);
-
-	if (lobjOid == InvalidOid)
-	{
-		/* we assume lo_create() already set a suitable error message */
-		(void) close(fd);
-		return InvalidOid;
-	}
-
-	lobj = lo_open(conn, lobjOid, INV_WRITE);
-	if (lobj == -1)
-	{
-		/* we assume lo_open() already set a suitable error message */
-		(void) close(fd);
-		return InvalidOid;
-	}
-
-	/*
-	 * read in from the file and write to the large object
-	 */
-	while ((nbytes = read(fd, buf, LO_BUFSIZE)) > 0)
-	{
-		tmp = lo_write(conn, lobj, buf, nbytes);
-		if (tmp != nbytes)
-		{
-			/*
-			 * If lo_write() failed, we are now in an aborted transaction so
-			 * there's no need for lo_close(); furthermore, if we tried it
-			 * we'd overwrite the useful error result with a useless one. So
-			 * just nail the doors shut and get out of town.
-			 */
-			(void) close(fd);
-			return InvalidOid;
-		}
-	}
-
-	if (nbytes < 0)
-	{
-		/* We must do lo_close before setting the errorMessage */
-		int			save_errno = errno;
-
-		(void) lo_close(conn, lobj);
-		(void) close(fd);
-		/* deliberately overwrite any error from lo_close */
-		pqClearConnErrorState(conn);
-		libpq_append_conn_error(conn, "could not read from file \"%s\": %s",
-								filename,
-								strerror_r(save_errno, sebuf, sizeof(sebuf)));
-		return InvalidOid;
-	}
-
-	(void) close(fd);
-
-	if (lo_close(conn, lobj) != 0)
-	{
-		/* we assume lo_close() already set a suitable error message */
-		return InvalidOid;
-	}
-
-	return lobjOid;
-}
-
-/*
- * lo_export -
- *	  exports an (inversion) large object.
- * returns -1 upon failure, 1 if OK
- */
-int
-lo_export(PGconn *conn, Oid lobjId, const char *filename)
-{
-	int			result = 1;
-	int			fd;
-	int			nbytes,
-				tmp;
-	char		buf[LO_BUFSIZE];
-	int			lobj;
-	char		sebuf[PG_STRERROR_R_BUFLEN];
-
-	/*
-	 * open the large object.
-	 */
-	lobj = lo_open(conn, lobjId, INV_READ);
-	if (lobj == -1)
-	{
-		/* we assume lo_open() already set a suitable error message */
-		return -1;
-	}
-
-	/*
-	 * create the file to be written to
-	 */
-	fd = open(filename, O_CREAT | O_WRONLY | O_TRUNC | PG_BINARY, 0666);
-	if (fd < 0)
-	{
-		/* We must do lo_close before setting the errorMessage */
-		int			save_errno = errno;
-
-		(void) lo_close(conn, lobj);
-		/* deliberately overwrite any error from lo_close */
-		pqClearConnErrorState(conn);
-		libpq_append_conn_error(conn, "could not open file \"%s\": %s",
-								filename,
-								strerror_r(save_errno, sebuf, sizeof(sebuf)));
-		return -1;
-	}
-
-	/*
-	 * read in from the large object and write to the file
-	 */
-	while ((nbytes = lo_read(conn, lobj, buf, LO_BUFSIZE)) > 0)
-	{
-		tmp = write(fd, buf, nbytes);
-		if (tmp != nbytes)
-		{
-			/* We must do lo_close before setting the errorMessage */
-			int			save_errno = errno;
-
-			(void) lo_close(conn, lobj);
-			(void) close(fd);
-			/* deliberately overwrite any error from lo_close */
-			pqClearConnErrorState(conn);
-			libpq_append_conn_error(conn, "could not write to file \"%s\": %s",
-									filename,
-									strerror_r(save_errno, sebuf, sizeof(sebuf)));
-			return -1;
-		}
-	}
-
-	/*
-	 * If lo_read() failed, we are now in an aborted transaction so there's no
-	 * need for lo_close(); furthermore, if we tried it we'd overwrite the
-	 * useful error result with a useless one. So skip lo_close() if we got a
-	 * failure result.
-	 */
-	if (nbytes < 0 ||
-		lo_close(conn, lobj) != 0)
-	{
-		/* assume lo_read() or lo_close() left a suitable error message */
-		result = -1;
-	}
-
-	/* if we already failed, don't overwrite that msg with a close error */
-	if (close(fd) != 0 && result >= 0)
-	{
-		libpq_append_conn_error(conn, "could not write to file \"%s\": %s",
-								filename, strerror_r(errno, sebuf, sizeof(sebuf)));
-		result = -1;
-	}
-
-	return result;
-}
-
-
-/*
- * lo_initialize
- *
- * Initialize for a new large-object operation on an existing connection.
- * Return 0 if OK, -1 on failure.
- *
- * If we haven't previously done so, we collect the function OIDs from
- * pg_proc for all functions that are required for large object operations.
- */
-static int
-lo_initialize(PGconn *conn)
-{
-	PGresult   *res;
-	PGlobjfuncs *lobjfuncs;
-	int			n;
-	const char *query;
-	const char *fname;
-	Oid			foid;
-
-	/* Nothing we can do with no connection */
-	if (conn == NULL)
-		return -1;
-
-	/* Since this is the beginning of a query cycle, reset the error state */
-	pqClearConnErrorState(conn);
-
-	/* Nothing else to do if we already collected info */
-	if (conn->lobjfuncs != NULL)
-		return 0;
-
-	/*
-	 * Allocate the structure to hold the function OIDs.  We don't store it
-	 * into the PGconn until it's successfully filled.
-	 */
-	lobjfuncs = (PGlobjfuncs *) malloc(sizeof(PGlobjfuncs));
-	if (lobjfuncs == NULL)
-	{
-		libpq_append_conn_error(conn, "out of memory");
-		return -1;
-	}
-	MemSet((char *) lobjfuncs, 0, sizeof(PGlobjfuncs));
-
-	/*
-	 * Execute the query to get all the functions at once.  (Not all of them
-	 * may exist in older server versions.)
-	 */
-	query = "select proname, oid from pg_catalog.pg_proc "
-		"where proname in ("
-		"'lo_open', "
-		"'lo_close', "
-		"'lo_creat', "
-		"'lo_create', "
-		"'lo_unlink', "
-		"'lo_lseek', "
-		"'lo_lseek64', "
-		"'lo_tell', "
-		"'lo_tell64', "
-		"'lo_truncate', "
-		"'lo_truncate64', "
-		"'loread', "
-		"'lowrite') "
-		"and pronamespace = (select oid from pg_catalog.pg_namespace "
-		"where nspname = 'pg_catalog')";
-
-	res = PQexec(conn, query);
-	if (res == NULL)
-	{
-		free(lobjfuncs);
-		return -1;
-	}
-
-	if (res->resultStatus != PGRES_TUPLES_OK)
-	{
-		free(lobjfuncs);
-		PQclear(res);
-		libpq_append_conn_error(conn, "query to initialize large object functions did not return data");
-		return -1;
-	}
-
-	/*
-	 * Examine the result and put the OID's into the struct
-	 */
-	for (n = 0; n < PQntuples(res); n++)
-	{
-		fname = PQgetvalue(res, n, 0);
-		foid = (Oid) atoi(PQgetvalue(res, n, 1));
-		if (strcmp(fname, "lo_open") == 0)
-			lobjfuncs->fn_lo_open = foid;
-		else if (strcmp(fname, "lo_close") == 0)
-			lobjfuncs->fn_lo_close = foid;
-		else if (strcmp(fname, "lo_creat") == 0)
-			lobjfuncs->fn_lo_creat = foid;
-		else if (strcmp(fname, "lo_create") == 0)
-			lobjfuncs->fn_lo_create = foid;
-		else if (strcmp(fname, "lo_unlink") == 0)
-			lobjfuncs->fn_lo_unlink = foid;
-		else if (strcmp(fname, "lo_lseek") == 0)
-			lobjfuncs->fn_lo_lseek = foid;
-		else if (strcmp(fname, "lo_lseek64") == 0)
-			lobjfuncs->fn_lo_lseek64 = foid;
-		else if (strcmp(fname, "lo_tell") == 0)
-			lobjfuncs->fn_lo_tell = foid;
-		else if (strcmp(fname, "lo_tell64") == 0)
-			lobjfuncs->fn_lo_tell64 = foid;
-		else if (strcmp(fname, "lo_truncate") == 0)
-			lobjfuncs->fn_lo_truncate = foid;
-		else if (strcmp(fname, "lo_truncate64") == 0)
-			lobjfuncs->fn_lo_truncate64 = foid;
-		else if (strcmp(fname, "loread") == 0)
-			lobjfuncs->fn_lo_read = foid;
-		else if (strcmp(fname, "lowrite") == 0)
-			lobjfuncs->fn_lo_write = foid;
-	}
-
-	PQclear(res);
-
-	/*
-	 * Finally check that we got all required large object interface functions
-	 * (ones that have been added later than the stone age are instead checked
-	 * only if used)
-	 */
-	if (lobjfuncs->fn_lo_open == 0)
-	{
-		libpq_append_conn_error(conn, "cannot determine OID of function %s",
-								"lo_open");
-		free(lobjfuncs);
-		return -1;
-	}
-	if (lobjfuncs->fn_lo_close == 0)
-	{
-		libpq_append_conn_error(conn, "cannot determine OID of function %s",
-								"lo_close");
-		free(lobjfuncs);
-		return -1;
-	}
-	if (lobjfuncs->fn_lo_creat == 0)
-	{
-		libpq_append_conn_error(conn, "cannot determine OID of function %s",
-								"lo_creat");
-		free(lobjfuncs);
-		return -1;
-	}
-	if (lobjfuncs->fn_lo_unlink == 0)
-	{
-		libpq_append_conn_error(conn, "cannot determine OID of function %s",
-								"lo_unlink");
-		free(lobjfuncs);
-		return -1;
-	}
-	if (lobjfuncs->fn_lo_lseek == 0)
-	{
-		libpq_append_conn_error(conn, "cannot determine OID of function %s",
-								"lo_lseek");
-		free(lobjfuncs);
-		return -1;
-	}
-	if (lobjfuncs->fn_lo_tell == 0)
-	{
-		libpq_append_conn_error(conn, "cannot determine OID of function %s",
-								"lo_tell");
-		free(lobjfuncs);
-		return -1;
-	}
-	if (lobjfuncs->fn_lo_read == 0)
-	{
-		libpq_append_conn_error(conn, "cannot determine OID of function %s",
-								"loread");
-		free(lobjfuncs);
-		return -1;
-	}
-	if (lobjfuncs->fn_lo_write == 0)
-	{
-		libpq_append_conn_error(conn, "cannot determine OID of function %s",
-								"lowrite");
-		free(lobjfuncs);
-		return -1;
-	}
-
-	/*
-	 * Put the structure into the connection control
-	 */
-	conn->lobjfuncs = lobjfuncs;
-	return 0;
-}
-
-/*
- * lo_hton64
- *	  converts a 64-bit integer from host byte order to network byte order
- */
-static pg_int64
-lo_hton64(pg_int64 host64)
-{
-	union
-	{
-		pg_int64	i64;
-		uint32		i32[2];
-	}			swap;
-	uint32		t;
-
-	/* High order half first, since we're doing MSB-first */
-	t = (uint32) (host64 >> 32);
-	swap.i32[0] = pg_hton32(t);
-
-	/* Now the low order half */
-	t = (uint32) host64;
-	swap.i32[1] = pg_hton32(t);
-
-	return swap.i64;
-}
-
-/*
- * lo_ntoh64
- *	  converts a 64-bit integer from network byte order to host byte order
- */
-static pg_int64
-lo_ntoh64(pg_int64 net64)
-{
-	union
-	{
-		pg_int64	i64;
-		uint32		i32[2];
-	}			swap;
-	pg_int64	result;
-
-	swap.i64 = net64;
-
-	result = (uint32) pg_ntoh32(swap.i32[0]);
-	result <<= 32;
-	result |= (uint32) pg_ntoh32(swap.i32[1]);
-
-	return result;
-}
diff --git a/contrib/libs/libpq/src/interfaces/libpq/fe-misc.c b/contrib/libs/libpq/src/interfaces/libpq/fe-misc.c
deleted file mode 100644
index 660cdec93c..0000000000
--- a/contrib/libs/libpq/src/interfaces/libpq/fe-misc.c
+++ /dev/null
@@ -1,1333 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- *	 FILE
- *		fe-misc.c
- *
- *	 DESCRIPTION
- *		 miscellaneous useful functions
- *
- * The communication routines here are analogous to the ones in
- * backend/libpq/pqcomm.c and backend/libpq/pqformat.c, but operate
- * in the considerably different environment of the frontend libpq.
- * In particular, we work with a bare nonblock-mode socket, rather than
- * a stdio stream, so that we can avoid unwanted blocking of the application.
- *
- * XXX: MOVE DEBUG PRINTOUT TO HIGHER LEVEL.  As is, block and restart
- * will cause repeat printouts.
- *
- * We must speak the same transmitted data representations as the backend
- * routines.
- *
- *
- * Portions Copyright (c) 1996-2023, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- * IDENTIFICATION
- *	  src/interfaces/libpq/fe-misc.c
- *
- *-------------------------------------------------------------------------
- */
-
-#include "postgres_fe.h"
-
-#include <signal.h>
-#include <time.h>
-
-#ifdef WIN32
-#include "win32.h"
-#else
-#include <unistd.h>
-#include <sys/select.h>
-#include <sys/time.h>
-#endif
-
-#ifdef HAVE_POLL_H
-#include <poll.h>
-#endif
-
-#include "libpq-fe.h"
-#include "libpq-int.h"
-#include "mb/pg_wchar.h"
-#include "pg_config_paths.h"
-#include "port/pg_bswap.h"
-
-static int	pqPutMsgBytes(const void *buf, size_t len, PGconn *conn);
-static int	pqSendSome(PGconn *conn, int len);
-static int	pqSocketCheck(PGconn *conn, int forRead, int forWrite,
-						  time_t end_time);
-static int	pqSocketPoll(int sock, int forRead, int forWrite, time_t end_time);
-
-/*
- * PQlibVersion: return the libpq version number
- */
-int
-PQlibVersion(void)
-{
-	return PG_VERSION_NUM;
-}
-
-
-/*
- * pqGetc: get 1 character from the connection
- *
- *	All these routines return 0 on success, EOF on error.
- *	Note that for the Get routines, EOF only means there is not enough
- *	data in the buffer, not that there is necessarily a hard error.
- */
-int
-pqGetc(char *result, PGconn *conn)
-{
-	if (conn->inCursor >= conn->inEnd)
-		return EOF;
-
-	*result = conn->inBuffer[conn->inCursor++];
-
-	return 0;
-}
-
-
-/*
- * pqPutc: write 1 char to the current message
- */
-int
-pqPutc(char c, PGconn *conn)
-{
-	if (pqPutMsgBytes(&c, 1, conn))
-		return EOF;
-
-	return 0;
-}
-
-
-/*
- * pqGets[_append]:
- * get a null-terminated string from the connection,
- * and store it in an expansible PQExpBuffer.
- * If we run out of memory, all of the string is still read,
- * but the excess characters are silently discarded.
- */
-static int
-pqGets_internal(PQExpBuffer buf, PGconn *conn, bool resetbuffer)
-{
-	/* Copy conn data to locals for faster search loop */
-	char	   *inBuffer = conn->inBuffer;
-	int			inCursor = conn->inCursor;
-	int			inEnd = conn->inEnd;
-	int			slen;
-
-	while (inCursor < inEnd && inBuffer[inCursor])
-		inCursor++;
-
-	if (inCursor >= inEnd)
-		return EOF;
-
-	slen = inCursor - conn->inCursor;
-
-	if (resetbuffer)
-		resetPQExpBuffer(buf);
-
-	appendBinaryPQExpBuffer(buf, inBuffer + conn->inCursor, slen);
-
-	conn->inCursor = ++inCursor;
-
-	return 0;
-}
-
-int
-pqGets(PQExpBuffer buf, PGconn *conn)
-{
-	return pqGets_internal(buf, conn, true);
-}
-
-int
-pqGets_append(PQExpBuffer buf, PGconn *conn)
-{
-	return pqGets_internal(buf, conn, false);
-}
-
-
-/*
- * pqPuts: write a null-terminated string to the current message
- */
-int
-pqPuts(const char *s, PGconn *conn)
-{
-	if (pqPutMsgBytes(s, strlen(s) + 1, conn))
-		return EOF;
-
-	return 0;
-}
-
-/*
- * pqGetnchar:
- *	get a string of exactly len bytes in buffer s, no null termination
- */
-int
-pqGetnchar(char *s, size_t len, PGconn *conn)
-{
-	if (len > (size_t) (conn->inEnd - conn->inCursor))
-		return EOF;
-
-	memcpy(s, conn->inBuffer + conn->inCursor, len);
-	/* no terminating null */
-
-	conn->inCursor += len;
-
-	return 0;
-}
-
-/*
- * pqSkipnchar:
- *	skip over len bytes in input buffer.
- *
- * Note: this is primarily useful for its debug output, which should
- * be exactly the same as for pqGetnchar.  We assume the data in question
- * will actually be used, but just isn't getting copied anywhere as yet.
- */
-int
-pqSkipnchar(size_t len, PGconn *conn)
-{
-	if (len > (size_t) (conn->inEnd - conn->inCursor))
-		return EOF;
-
-	conn->inCursor += len;
-
-	return 0;
-}
-
-/*
- * pqPutnchar:
- *	write exactly len bytes to the current message
- */
-int
-pqPutnchar(const char *s, size_t len, PGconn *conn)
-{
-	if (pqPutMsgBytes(s, len, conn))
-		return EOF;
-
-	return 0;
-}
-
-/*
- * pqGetInt
- *	read a 2 or 4 byte integer and convert from network byte order
- *	to local byte order
- */
-int
-pqGetInt(int *result, size_t bytes, PGconn *conn)
-{
-	uint16		tmp2;
-	uint32		tmp4;
-
-	switch (bytes)
-	{
-		case 2:
-			if (conn->inCursor + 2 > conn->inEnd)
-				return EOF;
-			memcpy(&tmp2, conn->inBuffer + conn->inCursor, 2);
-			conn->inCursor += 2;
-			*result = (int) pg_ntoh16(tmp2);
-			break;
-		case 4:
-			if (conn->inCursor + 4 > conn->inEnd)
-				return EOF;
-			memcpy(&tmp4, conn->inBuffer + conn->inCursor, 4);
-			conn->inCursor += 4;
-			*result = (int) pg_ntoh32(tmp4);
-			break;
-		default:
-			pqInternalNotice(&conn->noticeHooks,
-							 "integer of size %lu not supported by pqGetInt",
-							 (unsigned long) bytes);
-			return EOF;
-	}
-
-	return 0;
-}
-
-/*
- * pqPutInt
- * write an integer of 2 or 4 bytes, converting from host byte order
- * to network byte order.
- */
-int
-pqPutInt(int value, size_t bytes, PGconn *conn)
-{
-	uint16		tmp2;
-	uint32		tmp4;
-
-	switch (bytes)
-	{
-		case 2:
-			tmp2 = pg_hton16((uint16) value);
-			if (pqPutMsgBytes((const char *) &tmp2, 2, conn))
-				return EOF;
-			break;
-		case 4:
-			tmp4 = pg_hton32((uint32) value);
-			if (pqPutMsgBytes((const char *) &tmp4, 4, conn))
-				return EOF;
-			break;
-		default:
-			pqInternalNotice(&conn->noticeHooks,
-							 "integer of size %lu not supported by pqPutInt",
-							 (unsigned long) bytes);
-			return EOF;
-	}
-
-	return 0;
-}
-
-/*
- * Make sure conn's output buffer can hold bytes_needed bytes (caller must
- * include already-stored data into the value!)
- *
- * Returns 0 on success, EOF if failed to enlarge buffer
- */
-int
-pqCheckOutBufferSpace(size_t bytes_needed, PGconn *conn)
-{
-	int			newsize = conn->outBufSize;
-	char	   *newbuf;
-
-	/* Quick exit if we have enough space */
-	if (bytes_needed <= (size_t) newsize)
-		return 0;
-
-	/*
-	 * If we need to enlarge the buffer, we first try to double it in size; if
-	 * that doesn't work, enlarge in multiples of 8K.  This avoids thrashing
-	 * the malloc pool by repeated small enlargements.
-	 *
-	 * Note: tests for newsize > 0 are to catch integer overflow.
-	 */
-	do
-	{
-		newsize *= 2;
-	} while (newsize > 0 && bytes_needed > (size_t) newsize);
-
-	if (newsize > 0 && bytes_needed <= (size_t) newsize)
-	{
-		newbuf = realloc(conn->outBuffer, newsize);
-		if (newbuf)
-		{
-			/* realloc succeeded */
-			conn->outBuffer = newbuf;
-			conn->outBufSize = newsize;
-			return 0;
-		}
-	}
-
-	newsize = conn->outBufSize;
-	do
-	{
-		newsize += 8192;
-	} while (newsize > 0 && bytes_needed > (size_t) newsize);
-
-	if (newsize > 0 && bytes_needed <= (size_t) newsize)
-	{
-		newbuf = realloc(conn->outBuffer, newsize);
-		if (newbuf)
-		{
-			/* realloc succeeded */
-			conn->outBuffer = newbuf;
-			conn->outBufSize = newsize;
-			return 0;
-		}
-	}
-
-	/* realloc failed. Probably out of memory */
-	appendPQExpBufferStr(&conn->errorMessage,
-						 "cannot allocate memory for output buffer\n");
-	return EOF;
-}
-
-/*
- * Make sure conn's input buffer can hold bytes_needed bytes (caller must
- * include already-stored data into the value!)
- *
- * Returns 0 on success, EOF if failed to enlarge buffer
- */
-int
-pqCheckInBufferSpace(size_t bytes_needed, PGconn *conn)
-{
-	int			newsize = conn->inBufSize;
-	char	   *newbuf;
-
-	/* Quick exit if we have enough space */
-	if (bytes_needed <= (size_t) newsize)
-		return 0;
-
-	/*
-	 * Before concluding that we need to enlarge the buffer, left-justify
-	 * whatever is in it and recheck.  The caller's value of bytes_needed
-	 * includes any data to the left of inStart, but we can delete that in
-	 * preference to enlarging the buffer.  It's slightly ugly to have this
-	 * function do this, but it's better than making callers worry about it.
-	 */
-	bytes_needed -= conn->inStart;
-
-	if (conn->inStart < conn->inEnd)
-	{
-		if (conn->inStart > 0)
-		{
-			memmove(conn->inBuffer, conn->inBuffer + conn->inStart,
-					conn->inEnd - conn->inStart);
-			conn->inEnd -= conn->inStart;
-			conn->inCursor -= conn->inStart;
-			conn->inStart = 0;
-		}
-	}
-	else
-	{
-		/* buffer is logically empty, reset it */
-		conn->inStart = conn->inCursor = conn->inEnd = 0;
-	}
-
-	/* Recheck whether we have enough space */
-	if (bytes_needed <= (size_t) newsize)
-		return 0;
-
-	/*
-	 * If we need to enlarge the buffer, we first try to double it in size; if
-	 * that doesn't work, enlarge in multiples of 8K.  This avoids thrashing
-	 * the malloc pool by repeated small enlargements.
-	 *
-	 * Note: tests for newsize > 0 are to catch integer overflow.
-	 */
-	do
-	{
-		newsize *= 2;
-	} while (newsize > 0 && bytes_needed > (size_t) newsize);
-
-	if (newsize > 0 && bytes_needed <= (size_t) newsize)
-	{
-		newbuf = realloc(conn->inBuffer, newsize);
-		if (newbuf)
-		{
-			/* realloc succeeded */
-			conn->inBuffer = newbuf;
-			conn->inBufSize = newsize;
-			return 0;
-		}
-	}
-
-	newsize = conn->inBufSize;
-	do
-	{
-		newsize += 8192;
-	} while (newsize > 0 && bytes_needed > (size_t) newsize);
-
-	if (newsize > 0 && bytes_needed <= (size_t) newsize)
-	{
-		newbuf = realloc(conn->inBuffer, newsize);
-		if (newbuf)
-		{
-			/* realloc succeeded */
-			conn->inBuffer = newbuf;
-			conn->inBufSize = newsize;
-			return 0;
-		}
-	}
-
-	/* realloc failed. Probably out of memory */
-	appendPQExpBufferStr(&conn->errorMessage,
-						 "cannot allocate memory for input buffer\n");
-	return EOF;
-}
-
-/*
- * pqPutMsgStart: begin construction of a message to the server
- *
- * msg_type is the message type byte, or 0 for a message without type byte
- * (only startup messages have no type byte)
- *
- * Returns 0 on success, EOF on error
- *
- * The idea here is that we construct the message in conn->outBuffer,
- * beginning just past any data already in outBuffer (ie, at
- * outBuffer+outCount).  We enlarge the buffer as needed to hold the message.
- * When the message is complete, we fill in the length word (if needed) and
- * then advance outCount past the message, making it eligible to send.
- *
- * The state variable conn->outMsgStart points to the incomplete message's
- * length word: it is either outCount or outCount+1 depending on whether
- * there is a type byte.  The state variable conn->outMsgEnd is the end of
- * the data collected so far.
- */
-int
-pqPutMsgStart(char msg_type, PGconn *conn)
-{
-	int			lenPos;
-	int			endPos;
-
-	/* allow room for message type byte */
-	if (msg_type)
-		endPos = conn->outCount + 1;
-	else
-		endPos = conn->outCount;
-
-	/* do we want a length word? */
-	lenPos = endPos;
-	/* allow room for message length */
-	endPos += 4;
-
-	/* make sure there is room for message header */
-	if (pqCheckOutBufferSpace(endPos, conn))
-		return EOF;
-	/* okay, save the message type byte if any */
-	if (msg_type)
-		conn->outBuffer[conn->outCount] = msg_type;
-	/* set up the message pointers */
-	conn->outMsgStart = lenPos;
-	conn->outMsgEnd = endPos;
-	/* length word, if needed, will be filled in by pqPutMsgEnd */
-
-	return 0;
-}
-
-/*
- * pqPutMsgBytes: add bytes to a partially-constructed message
- *
- * Returns 0 on success, EOF on error
- */
-static int
-pqPutMsgBytes(const void *buf, size_t len, PGconn *conn)
-{
-	/* make sure there is room for it */
-	if (pqCheckOutBufferSpace(conn->outMsgEnd + len, conn))
-		return EOF;
-	/* okay, save the data */
-	memcpy(conn->outBuffer + conn->outMsgEnd, buf, len);
-	conn->outMsgEnd += len;
-	/* no Pfdebug call here, caller should do it */
-	return 0;
-}
-
-/*
- * pqPutMsgEnd: finish constructing a message and possibly send it
- *
- * Returns 0 on success, EOF on error
- *
- * We don't actually send anything here unless we've accumulated at least
- * 8K worth of data (the typical size of a pipe buffer on Unix systems).
- * This avoids sending small partial packets.  The caller must use pqFlush
- * when it's important to flush all the data out to the server.
- */
-int
-pqPutMsgEnd(PGconn *conn)
-{
-	/* Fill in length word if needed */
-	if (conn->outMsgStart >= 0)
-	{
-		uint32		msgLen = conn->outMsgEnd - conn->outMsgStart;
-
-		msgLen = pg_hton32(msgLen);
-		memcpy(conn->outBuffer + conn->outMsgStart, &msgLen, 4);
-	}
-
-	/* trace client-to-server message */
-	if (conn->Pfdebug)
-	{
-		if (conn->outCount < conn->outMsgStart)
-			pqTraceOutputMessage(conn, conn->outBuffer + conn->outCount, true);
-		else
-			pqTraceOutputNoTypeByteMessage(conn,
-										   conn->outBuffer + conn->outMsgStart);
-	}
-
-	/* Make message eligible to send */
-	conn->outCount = conn->outMsgEnd;
-
-	if (conn->outCount >= 8192)
-	{
-		int			toSend = conn->outCount - (conn->outCount % 8192);
-
-		if (pqSendSome(conn, toSend) < 0)
-			return EOF;
-		/* in nonblock mode, don't complain if unable to send it all */
-	}
-
-	return 0;
-}
-
-/* ----------
- * pqReadData: read more data, if any is available
- * Possible return values:
- *	 1: successfully loaded at least one more byte
- *	 0: no data is presently available, but no error detected
- *	-1: error detected (including EOF = connection closure);
- *		conn->errorMessage set
- * NOTE: callers must not assume that pointers or indexes into conn->inBuffer
- * remain valid across this call!
- * ----------
- */
-int
-pqReadData(PGconn *conn)
-{
-	int			someread = 0;
-	int			nread;
-
-	if (conn->sock == PGINVALID_SOCKET)
-	{
-		libpq_append_conn_error(conn, "connection not open");
-		return -1;
-	}
-
-	/* Left-justify any data in the buffer to make room */
-	if (conn->inStart < conn->inEnd)
-	{
-		if (conn->inStart > 0)
-		{
-			memmove(conn->inBuffer, conn->inBuffer + conn->inStart,
-					conn->inEnd - conn->inStart);
-			conn->inEnd -= conn->inStart;
-			conn->inCursor -= conn->inStart;
-			conn->inStart = 0;
-		}
-	}
-	else
-	{
-		/* buffer is logically empty, reset it */
-		conn->inStart = conn->inCursor = conn->inEnd = 0;
-	}
-
-	/*
-	 * If the buffer is fairly full, enlarge it. We need to be able to enlarge
-	 * the buffer in case a single message exceeds the initial buffer size. We
-	 * enlarge before filling the buffer entirely so as to avoid asking the
-	 * kernel for a partial packet. The magic constant here should be large
-	 * enough for a TCP packet or Unix pipe bufferload.  8K is the usual pipe
-	 * buffer size, so...
-	 */
-	if (conn->inBufSize - conn->inEnd < 8192)
-	{
-		if (pqCheckInBufferSpace(conn->inEnd + (size_t) 8192, conn))
-		{
-			/*
-			 * We don't insist that the enlarge worked, but we need some room
-			 */
-			if (conn->inBufSize - conn->inEnd < 100)
-				return -1;		/* errorMessage already set */
-		}
-	}
-
-	/* OK, try to read some data */
-retry3:
-	nread = pqsecure_read(conn, conn->inBuffer + conn->inEnd,
-						  conn->inBufSize - conn->inEnd);
-	if (nread < 0)
-	{
-		switch (SOCK_ERRNO)
-		{
-			case EINTR:
-				goto retry3;
-
-				/* Some systems return EAGAIN/EWOULDBLOCK for no data */
-#ifdef EAGAIN
-			case EAGAIN:
-				return someread;
-#endif
-#if defined(EWOULDBLOCK) && (!defined(EAGAIN) || (EWOULDBLOCK != EAGAIN))
-			case EWOULDBLOCK:
-				return someread;
-#endif
-
-				/* We might get ECONNRESET etc here if connection failed */
-			case ALL_CONNECTION_FAILURE_ERRNOS:
-				goto definitelyFailed;
-
-			default:
-				/* pqsecure_read set the error message for us */
-				return -1;
-		}
-	}
-	if (nread > 0)
-	{
-		conn->inEnd += nread;
-
-		/*
-		 * Hack to deal with the fact that some kernels will only give us back
-		 * 1 packet per recv() call, even if we asked for more and there is
-		 * more available.  If it looks like we are reading a long message,
-		 * loop back to recv() again immediately, until we run out of data or
-		 * buffer space.  Without this, the block-and-restart behavior of
-		 * libpq's higher levels leads to O(N^2) performance on long messages.
-		 *
-		 * Since we left-justified the data above, conn->inEnd gives the
-		 * amount of data already read in the current message.  We consider
-		 * the message "long" once we have acquired 32k ...
-		 */
-		if (conn->inEnd > 32768 &&
-			(conn->inBufSize - conn->inEnd) >= 8192)
-		{
-			someread = 1;
-			goto retry3;
-		}
-		return 1;
-	}
-
-	if (someread)
-		return 1;				/* got a zero read after successful tries */
-
-	/*
-	 * A return value of 0 could mean just that no data is now available, or
-	 * it could mean EOF --- that is, the server has closed the connection.
-	 * Since we have the socket in nonblock mode, the only way to tell the
-	 * difference is to see if select() is saying that the file is ready.
-	 * Grumble.  Fortunately, we don't expect this path to be taken much,
-	 * since in normal practice we should not be trying to read data unless
-	 * the file selected for reading already.
-	 *
-	 * In SSL mode it's even worse: SSL_read() could say WANT_READ and then
-	 * data could arrive before we make the pqReadReady() test, but the second
-	 * SSL_read() could still say WANT_READ because the data received was not
-	 * a complete SSL record.  So we must play dumb and assume there is more
-	 * data, relying on the SSL layer to detect true EOF.
-	 */
-
-#ifdef USE_SSL
-	if (conn->ssl_in_use)
-		return 0;
-#endif
-
-	switch (pqReadReady(conn))
-	{
-		case 0:
-			/* definitely no data available */
-			return 0;
-		case 1:
-			/* ready for read */
-			break;
-		default:
-			/* we override pqReadReady's message with something more useful */
-			goto definitelyEOF;
-	}
-
-	/*
-	 * Still not sure that it's EOF, because some data could have just
-	 * arrived.
-	 */
-retry4:
-	nread = pqsecure_read(conn, conn->inBuffer + conn->inEnd,
-						  conn->inBufSize - conn->inEnd);
-	if (nread < 0)
-	{
-		switch (SOCK_ERRNO)
-		{
-			case EINTR:
-				goto retry4;
-
-				/* Some systems return EAGAIN/EWOULDBLOCK for no data */
-#ifdef EAGAIN
-			case EAGAIN:
-				return 0;
-#endif
-#if defined(EWOULDBLOCK) && (!defined(EAGAIN) || (EWOULDBLOCK != EAGAIN))
-			case EWOULDBLOCK:
-				return 0;
-#endif
-
-				/* We might get ECONNRESET etc here if connection failed */
-			case ALL_CONNECTION_FAILURE_ERRNOS:
-				goto definitelyFailed;
-
-			default:
-				/* pqsecure_read set the error message for us */
-				return -1;
-		}
-	}
-	if (nread > 0)
-	{
-		conn->inEnd += nread;
-		return 1;
-	}
-
-	/*
-	 * OK, we are getting a zero read even though select() says ready. This
-	 * means the connection has been closed.  Cope.
-	 */
-definitelyEOF:
-	libpq_append_conn_error(conn, "server closed the connection unexpectedly\n"
-							"\tThis probably means the server terminated abnormally\n"
-							"\tbefore or while processing the request.");
-
-	/* Come here if lower-level code already set a suitable errorMessage */
-definitelyFailed:
-	/* Do *not* drop any already-read data; caller still wants it */
-	pqDropConnection(conn, false);
-	conn->status = CONNECTION_BAD;	/* No more connection to backend */
-	return -1;
-}
-
-/*
- * pqSendSome: send data waiting in the output buffer.
- *
- * len is how much to try to send (typically equal to outCount, but may
- * be less).
- *
- * Return 0 on success, -1 on failure and 1 when not all data could be sent
- * because the socket would block and the connection is non-blocking.
- *
- * Note that this is also responsible for consuming data from the socket
- * (putting it in conn->inBuffer) in any situation where we can't send
- * all the specified data immediately.
- *
- * If a socket-level write failure occurs, conn->write_failed is set and the
- * error message is saved in conn->write_err_msg, but we clear the output
- * buffer and return zero anyway; this is because callers should soldier on
- * until we have read what we can from the server and checked for an error
- * message.  write_err_msg should be reported only when we are unable to
- * obtain a server error first.  Much of that behavior is implemented at
- * lower levels, but this function deals with some edge cases.
- */
-static int
-pqSendSome(PGconn *conn, int len)
-{
-	char	   *ptr = conn->outBuffer;
-	int			remaining = conn->outCount;
-	int			result = 0;
-
-	/*
-	 * If we already had a write failure, we will never again try to send data
-	 * on that connection.  Even if the kernel would let us, we've probably
-	 * lost message boundary sync with the server.  conn->write_failed
-	 * therefore persists until the connection is reset, and we just discard
-	 * all data presented to be written.  However, as long as we still have a
-	 * valid socket, we should continue to absorb data from the backend, so
-	 * that we can collect any final error messages.
-	 */
-	if (conn->write_failed)
-	{
-		/* conn->write_err_msg should be set up already */
-		conn->outCount = 0;
-		/* Absorb input data if any, and detect socket closure */
-		if (conn->sock != PGINVALID_SOCKET)
-		{
-			if (pqReadData(conn) < 0)
-				return -1;
-		}
-		return 0;
-	}
-
-	if (conn->sock == PGINVALID_SOCKET)
-	{
-		conn->write_failed = true;
-		/* Store error message in conn->write_err_msg, if possible */
-		/* (strdup failure is OK, we'll cope later) */
-		conn->write_err_msg = strdup(libpq_gettext("connection not open\n"));
-		/* Discard queued data; no chance it'll ever be sent */
-		conn->outCount = 0;
-		return 0;
-	}
-
-	/* while there's still data to send */
-	while (len > 0)
-	{
-		int			sent;
-
-#ifndef WIN32
-		sent = pqsecure_write(conn, ptr, len);
-#else
-
-		/*
-		 * Windows can fail on large sends, per KB article Q201213. The
-		 * failure-point appears to be different in different versions of
-		 * Windows, but 64k should always be safe.
-		 */
-		sent = pqsecure_write(conn, ptr, Min(len, 65536));
-#endif
-
-		if (sent < 0)
-		{
-			/* Anything except EAGAIN/EWOULDBLOCK/EINTR is trouble */
-			switch (SOCK_ERRNO)
-			{
-#ifdef EAGAIN
-				case EAGAIN:
-					break;
-#endif
-#if defined(EWOULDBLOCK) && (!defined(EAGAIN) || (EWOULDBLOCK != EAGAIN))
-				case EWOULDBLOCK:
-					break;
-#endif
-				case EINTR:
-					continue;
-
-				default:
-					/* Discard queued data; no chance it'll ever be sent */
-					conn->outCount = 0;
-
-					/* Absorb input data if any, and detect socket closure */
-					if (conn->sock != PGINVALID_SOCKET)
-					{
-						if (pqReadData(conn) < 0)
-							return -1;
-					}
-
-					/*
-					 * Lower-level code should already have filled
-					 * conn->write_err_msg (and set conn->write_failed) or
-					 * conn->errorMessage.  In the former case, we pretend
-					 * there's no problem; the write_failed condition will be
-					 * dealt with later.  Otherwise, report the error now.
-					 */
-					if (conn->write_failed)
-						return 0;
-					else
-						return -1;
-			}
-		}
-		else
-		{
-			ptr += sent;
-			len -= sent;
-			remaining -= sent;
-		}
-
-		if (len > 0)
-		{
-			/*
-			 * We didn't send it all, wait till we can send more.
-			 *
-			 * There are scenarios in which we can't send data because the
-			 * communications channel is full, but we cannot expect the server
-			 * to clear the channel eventually because it's blocked trying to
-			 * send data to us.  (This can happen when we are sending a large
-			 * amount of COPY data, and the server has generated lots of
-			 * NOTICE responses.)  To avoid a deadlock situation, we must be
-			 * prepared to accept and buffer incoming data before we try
-			 * again.  Furthermore, it is possible that such incoming data
-			 * might not arrive until after we've gone to sleep.  Therefore,
-			 * we wait for either read ready or write ready.
-			 *
-			 * In non-blocking mode, we don't wait here directly, but return 1
-			 * to indicate that data is still pending.  The caller should wait
-			 * for both read and write ready conditions, and call
-			 * PQconsumeInput() on read ready, but just in case it doesn't, we
-			 * call pqReadData() ourselves before returning.  That's not
-			 * enough if the data has not arrived yet, but it's the best we
-			 * can do, and works pretty well in practice.  (The documentation
-			 * used to say that you only need to wait for write-ready, so
-			 * there are still plenty of applications like that out there.)
-			 *
-			 * Note that errors here don't result in write_failed becoming
-			 * set.
-			 */
-			if (pqReadData(conn) < 0)
-			{
-				result = -1;	/* error message already set up */
-				break;
-			}
-
-			if (pqIsnonblocking(conn))
-			{
-				result = 1;
-				break;
-			}
-
-			if (pqWait(true, true, conn))
-			{
-				result = -1;
-				break;
-			}
-		}
-	}
-
-	/* shift the remaining contents of the buffer */
-	if (remaining > 0)
-		memmove(conn->outBuffer, ptr, remaining);
-	conn->outCount = remaining;
-
-	return result;
-}
-
-
-/*
- * pqFlush: send any data waiting in the output buffer
- *
- * Return 0 on success, -1 on failure and 1 when not all data could be sent
- * because the socket would block and the connection is non-blocking.
- * (See pqSendSome comments about how failure should be handled.)
- */
-int
-pqFlush(PGconn *conn)
-{
-	if (conn->outCount > 0)
-	{
-		if (conn->Pfdebug)
-			fflush(conn->Pfdebug);
-
-		return pqSendSome(conn, conn->outCount);
-	}
-
-	return 0;
-}
-
-
-/*
- * pqWait: wait until we can read or write the connection socket
- *
- * JAB: If SSL enabled and used and forRead, buffered bytes short-circuit the
- * call to select().
- *
- * We also stop waiting and return if the kernel flags an exception condition
- * on the socket.  The actual error condition will be detected and reported
- * when the caller tries to read or write the socket.
- */
-int
-pqWait(int forRead, int forWrite, PGconn *conn)
-{
-	return pqWaitTimed(forRead, forWrite, conn, (time_t) -1);
-}
-
-/*
- * pqWaitTimed: wait, but not past finish_time.
- *
- * finish_time = ((time_t) -1) disables the wait limit.
- *
- * Returns -1 on failure, 0 if the socket is readable/writable, 1 if it timed out.
- */
-int
-pqWaitTimed(int forRead, int forWrite, PGconn *conn, time_t finish_time)
-{
-	int			result;
-
-	result = pqSocketCheck(conn, forRead, forWrite, finish_time);
-
-	if (result < 0)
-		return -1;				/* errorMessage is already set */
-
-	if (result == 0)
-	{
-		libpq_append_conn_error(conn, "timeout expired");
-		return 1;
-	}
-
-	return 0;
-}
-
-/*
- * pqReadReady: is select() saying the file is ready to read?
- * Returns -1 on failure, 0 if not ready, 1 if ready.
- */
-int
-pqReadReady(PGconn *conn)
-{
-	return pqSocketCheck(conn, 1, 0, (time_t) 0);
-}
-
-/*
- * pqWriteReady: is select() saying the file is ready to write?
- * Returns -1 on failure, 0 if not ready, 1 if ready.
- */
-int
-pqWriteReady(PGconn *conn)
-{
-	return pqSocketCheck(conn, 0, 1, (time_t) 0);
-}
-
-/*
- * Checks a socket, using poll or select, for data to be read, written,
- * or both.  Returns >0 if one or more conditions are met, 0 if it timed
- * out, -1 if an error occurred.
- *
- * If SSL is in use, the SSL buffer is checked prior to checking the socket
- * for read data directly.
- */
-static int
-pqSocketCheck(PGconn *conn, int forRead, int forWrite, time_t end_time)
-{
-	int			result;
-
-	if (!conn)
-		return -1;
-	if (conn->sock == PGINVALID_SOCKET)
-	{
-		libpq_append_conn_error(conn, "invalid socket");
-		return -1;
-	}
-
-#ifdef USE_SSL
-	/* Check for SSL library buffering read bytes */
-	if (forRead && conn->ssl_in_use && pgtls_read_pending(conn))
-	{
-		/* short-circuit the select */
-		return 1;
-	}
-#endif
-
-	/* We will retry as long as we get EINTR */
-	do
-		result = pqSocketPoll(conn->sock, forRead, forWrite, end_time);
-	while (result < 0 && SOCK_ERRNO == EINTR);
-
-	if (result < 0)
-	{
-		char		sebuf[PG_STRERROR_R_BUFLEN];
-
-		libpq_append_conn_error(conn, "%s() failed: %s", "select",
-								SOCK_STRERROR(SOCK_ERRNO, sebuf, sizeof(sebuf)));
-	}
-
-	return result;
-}
-
-
-/*
- * Check a file descriptor for read and/or write data, possibly waiting.
- * If neither forRead nor forWrite are set, immediately return a timeout
- * condition (without waiting).  Return >0 if condition is met, 0
- * if a timeout occurred, -1 if an error or interrupt occurred.
- *
- * Timeout is infinite if end_time is -1.  Timeout is immediate (no blocking)
- * if end_time is 0 (or indeed, any time before now).
- */
-static int
-pqSocketPoll(int sock, int forRead, int forWrite, time_t end_time)
-{
-	/* We use poll(2) if available, otherwise select(2) */
-#ifdef HAVE_POLL
-	struct pollfd input_fd;
-	int			timeout_ms;
-
-	if (!forRead && !forWrite)
-		return 0;
-
-	input_fd.fd = sock;
-	input_fd.events = POLLERR;
-	input_fd.revents = 0;
-
-	if (forRead)
-		input_fd.events |= POLLIN;
-	if (forWrite)
-		input_fd.events |= POLLOUT;
-
-	/* Compute appropriate timeout interval */
-	if (end_time == ((time_t) -1))
-		timeout_ms = -1;
-	else
-	{
-		time_t		now = time(NULL);
-
-		if (end_time > now)
-			timeout_ms = (end_time - now) * 1000;
-		else
-			timeout_ms = 0;
-	}
-
-	return poll(&input_fd, 1, timeout_ms);
-#else							/* !HAVE_POLL */
-
-	fd_set		input_mask;
-	fd_set		output_mask;
-	fd_set		except_mask;
-	struct timeval timeout;
-	struct timeval *ptr_timeout;
-
-	if (!forRead && !forWrite)
-		return 0;
-
-	FD_ZERO(&input_mask);
-	FD_ZERO(&output_mask);
-	FD_ZERO(&except_mask);
-	if (forRead)
-		FD_SET(sock, &input_mask);
-
-	if (forWrite)
-		FD_SET(sock, &output_mask);
-	FD_SET(sock, &except_mask);
-
-	/* Compute appropriate timeout interval */
-	if (end_time == ((time_t) -1))
-		ptr_timeout = NULL;
-	else
-	{
-		time_t		now = time(NULL);
-
-		if (end_time > now)
-			timeout.tv_sec = end_time - now;
-		else
-			timeout.tv_sec = 0;
-		timeout.tv_usec = 0;
-		ptr_timeout = &timeout;
-	}
-
-	return select(sock + 1, &input_mask, &output_mask,
-				  &except_mask, ptr_timeout);
-#endif							/* HAVE_POLL */
-}
-
-
-/*
- * A couple of "miscellaneous" multibyte related functions. They used
- * to be in fe-print.c but that file is doomed.
- */
-
-/*
- * Returns the byte length of the character beginning at s, using the
- * specified encoding.
- *
- * Caution: when dealing with text that is not certainly valid in the
- * specified encoding, the result may exceed the actual remaining
- * string length.  Callers that are not prepared to deal with that
- * should use PQmblenBounded() instead.
- */
-int
-PQmblen(const char *s, int encoding)
-{
-	return pg_encoding_mblen(encoding, s);
-}
-
-/*
- * Returns the byte length of the character beginning at s, using the
- * specified encoding; but not more than the distance to end of string.
- */
-int
-PQmblenBounded(const char *s, int encoding)
-{
-	return strnlen(s, pg_encoding_mblen(encoding, s));
-}
-
-/*
- * Returns the display length of the character beginning at s, using the
- * specified encoding.
- */
-int
-PQdsplen(const char *s, int encoding)
-{
-	return pg_encoding_dsplen(encoding, s);
-}
-
-/*
- * Get encoding id from environment variable PGCLIENTENCODING.
- */
-int
-PQenv2encoding(void)
-{
-	char	   *str;
-	int			encoding = PG_SQL_ASCII;
-
-	str = getenv("PGCLIENTENCODING");
-	if (str && *str != '\0')
-	{
-		encoding = pg_char_to_encoding(str);
-		if (encoding < 0)
-			encoding = PG_SQL_ASCII;
-	}
-	return encoding;
-}
-
-
-#ifdef ENABLE_NLS
-
-static void
-libpq_binddomain(void)
-{
-	/*
-	 * If multiple threads come through here at about the same time, it's okay
-	 * for more than one of them to call bindtextdomain().  But it's not okay
-	 * for any of them to return to caller before bindtextdomain() is
-	 * complete, so don't set the flag till that's done.  Use "volatile" just
-	 * to be sure the compiler doesn't try to get cute.
-	 */
-	static volatile bool already_bound = false;
-
-	if (!already_bound)
-	{
-		/* bindtextdomain() does not preserve errno */
-#ifdef WIN32
-		int			save_errno = GetLastError();
-#else
-		int			save_errno = errno;
-#endif
-		const char *ldir;
-
-		/* No relocatable lookup here because the binary could be anywhere */
-		ldir = getenv("PGLOCALEDIR");
-		if (!ldir)
-			ldir = LOCALEDIR;
-		bindtextdomain(PG_TEXTDOMAIN("libpq"), ldir);
-		already_bound = true;
-#ifdef WIN32
-		SetLastError(save_errno);
-#else
-		errno = save_errno;
-#endif
-	}
-}
-
-char *
-libpq_gettext(const char *msgid)
-{
-	libpq_binddomain();
-	return dgettext(PG_TEXTDOMAIN("libpq"), msgid);
-}
-
-char *
-libpq_ngettext(const char *msgid, const char *msgid_plural, unsigned long n)
-{
-	libpq_binddomain();
-	return dngettext(PG_TEXTDOMAIN("libpq"), msgid, msgid_plural, n);
-}
-
-#endif							/* ENABLE_NLS */
-
-
-/*
- * Append a formatted string to the given buffer, after translating it.  A
- * newline is automatically appended; the format should not end with a
- * newline.
- */
-void
-libpq_append_error(PQExpBuffer errorMessage, const char *fmt,...)
-{
-	int			save_errno = errno;
-	bool		done;
-	va_list		args;
-
-	Assert(fmt[strlen(fmt) - 1] != '\n');
-
-	if (PQExpBufferBroken(errorMessage))
-		return;					/* already failed */
-
-	/* Loop in case we have to retry after enlarging the buffer. */
-	do
-	{
-		errno = save_errno;
-		va_start(args, fmt);
-		done = appendPQExpBufferVA(errorMessage, libpq_gettext(fmt), args);
-		va_end(args);
-	} while (!done);
-
-	appendPQExpBufferChar(errorMessage, '\n');
-}
-
-/*
- * Append a formatted string to the error message buffer of the given
- * connection, after translating it.  A newline is automatically appended; the
- * format should not end with a newline.
- */
-void
-libpq_append_conn_error(PGconn *conn, const char *fmt,...)
-{
-	int			save_errno = errno;
-	bool		done;
-	va_list		args;
-
-	Assert(fmt[strlen(fmt) - 1] != '\n');
-
-	if (PQExpBufferBroken(&conn->errorMessage))
-		return;					/* already failed */
-
-	/* Loop in case we have to retry after enlarging the buffer. */
-	do
-	{
-		errno = save_errno;
-		va_start(args, fmt);
-		done = appendPQExpBufferVA(&conn->errorMessage, libpq_gettext(fmt), args);
-		va_end(args);
-	} while (!done);
-
-	appendPQExpBufferChar(&conn->errorMessage, '\n');
-}
diff --git a/contrib/libs/libpq/src/interfaces/libpq/fe-print.c b/contrib/libs/libpq/src/interfaces/libpq/fe-print.c
deleted file mode 100644
index 40620b47e9..0000000000
--- a/contrib/libs/libpq/src/interfaces/libpq/fe-print.c
+++ /dev/null
@@ -1,773 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * fe-print.c
- *	  functions for pretty-printing query results
- *
- * Portions Copyright (c) 1996-2023, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- * These functions were formerly part of fe-exec.c, but they
- * didn't really belong there.
- *
- * IDENTIFICATION
- *	  src/interfaces/libpq/fe-print.c
- *
- *-------------------------------------------------------------------------
- */
-#include "postgres_fe.h"
-
-#include <signal.h>
-
-#ifdef WIN32
-#include "win32.h"
-#else
-#include <unistd.h>
-#include <sys/ioctl.h>
-#endif
-
-#ifdef HAVE_TERMIOS_H
-#include <termios.h>
-#else
-#ifndef WIN32
-#include <sys/termios.h>
-#endif
-#endif
-
-#include "libpq-fe.h"
-#include "libpq-int.h"
-
-
-static bool do_field(const PQprintOpt *po, const PGresult *res,
-					 const int i, const int j, const int fs_len,
-					 char **fields,
-					 const int nFields, const char **fieldNames,
-					 unsigned char *fieldNotNum, int *fieldMax,
-					 const int fieldMaxLen, FILE *fout);
-static char *do_header(FILE *fout, const PQprintOpt *po, const int nFields,
-					   int *fieldMax, const char **fieldNames, unsigned char *fieldNotNum,
-					   const int fs_len, const PGresult *res);
-static void output_row(FILE *fout, const PQprintOpt *po, const int nFields, char **fields,
-					   unsigned char *fieldNotNum, int *fieldMax, char *border,
-					   const int row_index);
-static void fill(int length, int max, char filler, FILE *fp);
-
-/*
- * PQprint()
- *
- * Format results of a query for printing.
- *
- * PQprintOpt is a typedef (structure) that contains
- * various flags and options. consult libpq-fe.h for
- * details
- *
- * This function should probably be removed sometime since psql
- * doesn't use it anymore. It is unclear to what extent this is used
- * by external clients, however.
- */
-void
-PQprint(FILE *fout, const PGresult *res, const PQprintOpt *po)
-{
-	int			nFields;
-
-	nFields = PQnfields(res);
-
-	if (nFields > 0)
-	{							/* only print rows with at least 1 field.  */
-		int			i,
-					j;
-		int			nTups;
-		int		   *fieldMax = NULL;	/* in case we don't use them */
-		unsigned char *fieldNotNum = NULL;
-		char	   *border = NULL;
-		char	  **fields = NULL;
-		const char **fieldNames = NULL;
-		int			fieldMaxLen = 0;
-		int			numFieldName;
-		int			fs_len = strlen(po->fieldSep);
-		int			total_line_length = 0;
-		bool		usePipe = false;
-		char	   *pagerenv;
-
-#if defined(ENABLE_THREAD_SAFETY) && !defined(WIN32)
-		sigset_t	osigset;
-		bool		sigpipe_masked = false;
-		bool		sigpipe_pending;
-#endif
-#if !defined(ENABLE_THREAD_SAFETY) && !defined(WIN32)
-		pqsigfunc	oldsigpipehandler = NULL;
-#endif
-
-#ifdef TIOCGWINSZ
-		struct winsize screen_size;
-#else
-		struct winsize
-		{
-			int			ws_row;
-			int			ws_col;
-		}			screen_size;
-#endif
-
-		nTups = PQntuples(res);
-		fieldNames = (const char **) calloc(nFields, sizeof(char *));
-		fieldNotNum = (unsigned char *) calloc(nFields, 1);
-		fieldMax = (int *) calloc(nFields, sizeof(int));
-		if (!fieldNames || !fieldNotNum || !fieldMax)
-		{
-			fprintf(stderr, libpq_gettext("out of memory\n"));
-			goto exit;
-		}
-		for (numFieldName = 0;
-			 po->fieldName && po->fieldName[numFieldName];
-			 numFieldName++)
-			;
-		for (j = 0; j < nFields; j++)
-		{
-			int			len;
-			const char *s = (j < numFieldName && po->fieldName[j][0]) ?
-				po->fieldName[j] : PQfname(res, j);
-
-			fieldNames[j] = s;
-			len = s ? strlen(s) : 0;
-			fieldMax[j] = len;
-			len += fs_len;
-			if (len > fieldMaxLen)
-				fieldMaxLen = len;
-			total_line_length += len;
-		}
-
-		total_line_length += nFields * strlen(po->fieldSep) + 1;
-
-		if (fout == NULL)
-			fout = stdout;
-		if (po->pager && fout == stdout && isatty(fileno(stdin)) &&
-			isatty(fileno(stdout)))
-		{
-			/*
-			 * If we think there'll be more than one screen of output, try to
-			 * pipe to the pager program.
-			 */
-#ifdef TIOCGWINSZ
-			if (ioctl(fileno(stdout), TIOCGWINSZ, &screen_size) == -1 ||
-				screen_size.ws_col == 0 ||
-				screen_size.ws_row == 0)
-			{
-				screen_size.ws_row = 24;
-				screen_size.ws_col = 80;
-			}
-#else
-			screen_size.ws_row = 24;
-			screen_size.ws_col = 80;
-#endif
-
-			/*
-			 * Since this function is no longer used by psql, we don't examine
-			 * PSQL_PAGER.  It's possible that the hypothetical external users
-			 * of the function would like that to happen, but in the name of
-			 * backwards compatibility, we'll stick to just examining PAGER.
-			 */
-			pagerenv = getenv("PAGER");
-			/* if PAGER is unset, empty or all-white-space, don't use pager */
-			if (pagerenv != NULL &&
-				strspn(pagerenv, " \t\r\n") != strlen(pagerenv) &&
-				!po->html3 &&
-				((po->expanded &&
-				  nTups * (nFields + 1) >= screen_size.ws_row) ||
-				 (!po->expanded &&
-				  nTups * (total_line_length / screen_size.ws_col + 1) *
-				  (1 + (po->standard != 0)) >= screen_size.ws_row -
-				  (po->header != 0) *
-				  (total_line_length / screen_size.ws_col + 1) * 2
-				  - (po->header != 0) * 2	/* row count and newline */
-				  )))
-			{
-				fflush(NULL);
-				fout = popen(pagerenv, "w");
-				if (fout)
-				{
-					usePipe = true;
-#ifndef WIN32
-#ifdef ENABLE_THREAD_SAFETY
-					if (pq_block_sigpipe(&osigset, &sigpipe_pending) == 0)
-						sigpipe_masked = true;
-#else
-					oldsigpipehandler = pqsignal(SIGPIPE, SIG_IGN);
-#endif							/* ENABLE_THREAD_SAFETY */
-#endif							/* WIN32 */
-				}
-				else
-					fout = stdout;
-			}
-		}
-
-		if (!po->expanded && (po->align || po->html3))
-		{
-			fields = (char **) calloc((size_t) nTups + 1,
-									  nFields * sizeof(char *));
-			if (!fields)
-			{
-				fprintf(stderr, libpq_gettext("out of memory\n"));
-				goto exit;
-			}
-		}
-		else if (po->header && !po->html3)
-		{
-			if (po->expanded)
-			{
-				if (po->align)
-					fprintf(fout, libpq_gettext("%-*s%s Value\n"),
-							fieldMaxLen - fs_len, libpq_gettext("Field"), po->fieldSep);
-				else
-					fprintf(fout, libpq_gettext("%s%sValue\n"), libpq_gettext("Field"), po->fieldSep);
-			}
-			else
-			{
-				int			len = 0;
-
-				for (j = 0; j < nFields; j++)
-				{
-					const char *s = fieldNames[j];
-
-					fputs(s, fout);
-					len += strlen(s) + fs_len;
-					if ((j + 1) < nFields)
-						fputs(po->fieldSep, fout);
-				}
-				fputc('\n', fout);
-				for (len -= fs_len; len--; fputc('-', fout));
-				fputc('\n', fout);
-			}
-		}
-		if (po->expanded && po->html3)
-		{
-			if (po->caption)
-				fprintf(fout, "<center><h2>%s</h2></center>\n", po->caption);
-			else
-				fprintf(fout,
-						"<center><h2>"
-						"Query retrieved %d rows * %d fields"
-						"</h2></center>\n",
-						nTups, nFields);
-		}
-		for (i = 0; i < nTups; i++)
-		{
-			if (po->expanded)
-			{
-				if (po->html3)
-					fprintf(fout,
-							"<table %s><caption align=\"top\">%d</caption>\n",
-							po->tableOpt ? po->tableOpt : "", i);
-				else
-					fprintf(fout, libpq_gettext("-- RECORD %d --\n"), i);
-			}
-			for (j = 0; j < nFields; j++)
-			{
-				if (!do_field(po, res, i, j, fs_len, fields, nFields,
-							  fieldNames, fieldNotNum,
-							  fieldMax, fieldMaxLen, fout))
-					goto exit;
-			}
-			if (po->html3 && po->expanded)
-				fputs("</table>\n", fout);
-		}
-		if (!po->expanded && (po->align || po->html3))
-		{
-			if (po->html3)
-			{
-				if (po->header)
-				{
-					if (po->caption)
-						fprintf(fout,
-								"<table %s><caption align=\"top\">%s</caption>\n",
-								po->tableOpt ? po->tableOpt : "",
-								po->caption);
-					else
-						fprintf(fout,
-								"<table %s><caption align=\"top\">"
-								"Retrieved %d rows * %d fields"
-								"</caption>\n",
-								po->tableOpt ? po->tableOpt : "", nTups, nFields);
-				}
-				else
-					fprintf(fout, "<table %s>", po->tableOpt ? po->tableOpt : "");
-			}
-			if (po->header)
-				border = do_header(fout, po, nFields, fieldMax, fieldNames,
-								   fieldNotNum, fs_len, res);
-			for (i = 0; i < nTups; i++)
-				output_row(fout, po, nFields, fields,
-						   fieldNotNum, fieldMax, border, i);
-		}
-		if (po->header && !po->html3)
-			fprintf(fout, "(%d row%s)\n\n", PQntuples(res),
-					(PQntuples(res) == 1) ? "" : "s");
-		if (po->html3 && !po->expanded)
-			fputs("</table>\n", fout);
-
-exit:
-		free(fieldMax);
-		free(fieldNotNum);
-		free(border);
-		if (fields)
-		{
-			/* if calloc succeeded, this shouldn't overflow size_t */
-			size_t		numfields = ((size_t) nTups + 1) * (size_t) nFields;
-
-			while (numfields-- > 0)
-				free(fields[numfields]);
-			free(fields);
-		}
-		free(fieldNames);
-		if (usePipe)
-		{
-#ifdef WIN32
-			_pclose(fout);
-#else
-			pclose(fout);
-
-#ifdef ENABLE_THREAD_SAFETY
-			/* we can't easily verify if EPIPE occurred, so say it did */
-			if (sigpipe_masked)
-				pq_reset_sigpipe(&osigset, sigpipe_pending, true);
-#else
-			pqsignal(SIGPIPE, oldsigpipehandler);
-#endif							/* ENABLE_THREAD_SAFETY */
-#endif							/* WIN32 */
-		}
-	}
-}
-
-
-static bool
-do_field(const PQprintOpt *po, const PGresult *res,
-		 const int i, const int j, const int fs_len,
-		 char **fields,
-		 const int nFields, char const **fieldNames,
-		 unsigned char *fieldNotNum, int *fieldMax,
-		 const int fieldMaxLen, FILE *fout)
-{
-	const char *pval,
-			   *p;
-	int			plen;
-	bool		skipit;
-
-	plen = PQgetlength(res, i, j);
-	pval = PQgetvalue(res, i, j);
-
-	if (plen < 1 || !pval || !*pval)
-	{
-		if (po->align || po->expanded)
-			skipit = true;
-		else
-		{
-			skipit = false;
-			goto efield;
-		}
-	}
-	else
-		skipit = false;
-
-	if (!skipit)
-	{
-		if (po->align && !fieldNotNum[j])
-		{
-			/* Detect whether field contains non-numeric data */
-			char		ch = '0';
-
-			for (p = pval; *p; p += PQmblenBounded(p, res->client_encoding))
-			{
-				ch = *p;
-				if (!((ch >= '0' && ch <= '9') ||
-					  ch == '.' ||
-					  ch == 'E' ||
-					  ch == 'e' ||
-					  ch == ' ' ||
-					  ch == '-'))
-				{
-					fieldNotNum[j] = 1;
-					break;
-				}
-			}
-
-			/*
-			 * Above loop will believe E in first column is numeric; also, we
-			 * insist on a digit in the last column for a numeric. This test
-			 * is still not bulletproof but it handles most cases.
-			 */
-			if (*pval == 'E' || *pval == 'e' ||
-				!(ch >= '0' && ch <= '9'))
-				fieldNotNum[j] = 1;
-		}
-
-		if (!po->expanded && (po->align || po->html3))
-		{
-			if (plen > fieldMax[j])
-				fieldMax[j] = plen;
-			if (!(fields[i * nFields + j] = (char *) malloc(plen + 1)))
-			{
-				fprintf(stderr, libpq_gettext("out of memory\n"));
-				return false;
-			}
-			strcpy(fields[i * nFields + j], pval);
-		}
-		else
-		{
-			if (po->expanded)
-			{
-				if (po->html3)
-					fprintf(fout,
-							"<tr><td align=\"left\"><b>%s</b></td>"
-							"<td align=\"%s\">%s</td></tr>\n",
-							fieldNames[j],
-							fieldNotNum[j] ? "left" : "right",
-							pval);
-				else
-				{
-					if (po->align)
-						fprintf(fout,
-								"%-*s%s %s\n",
-								fieldMaxLen - fs_len, fieldNames[j],
-								po->fieldSep,
-								pval);
-					else
-						fprintf(fout,
-								"%s%s%s\n",
-								fieldNames[j], po->fieldSep, pval);
-				}
-			}
-			else
-			{
-				if (!po->html3)
-				{
-					fputs(pval, fout);
-			efield:
-					if ((j + 1) < nFields)
-						fputs(po->fieldSep, fout);
-					else
-						fputc('\n', fout);
-				}
-			}
-		}
-	}
-	return true;
-}
-
-
-static char *
-do_header(FILE *fout, const PQprintOpt *po, const int nFields, int *fieldMax,
-		  const char **fieldNames, unsigned char *fieldNotNum,
-		  const int fs_len, const PGresult *res)
-{
-	int			j;				/* for loop index */
-	char	   *border = NULL;
-
-	if (po->html3)
-		fputs("<tr>", fout);
-	else
-	{
-		int			tot = 0;
-		int			n = 0;
-		char	   *p = NULL;
-
-		for (; n < nFields; n++)
-			tot += fieldMax[n] + fs_len + (po->standard ? 2 : 0);
-		if (po->standard)
-			tot += fs_len * 2 + 2;
-		border = malloc(tot + 1);
-		if (!border)
-		{
-			fprintf(stderr, libpq_gettext("out of memory\n"));
-			return NULL;
-		}
-		p = border;
-		if (po->standard)
-		{
-			char	   *fs = po->fieldSep;
-
-			while (*fs++)
-				*p++ = '+';
-		}
-		for (j = 0; j < nFields; j++)
-		{
-			int			len;
-
-			for (len = fieldMax[j] + (po->standard ? 2 : 0); len--; *p++ = '-');
-			if (po->standard || (j + 1) < nFields)
-			{
-				char	   *fs = po->fieldSep;
-
-				while (*fs++)
-					*p++ = '+';
-			}
-		}
-		*p = '\0';
-		if (po->standard)
-			fprintf(fout, "%s\n", border);
-	}
-	if (po->standard)
-		fputs(po->fieldSep, fout);
-	for (j = 0; j < nFields; j++)
-	{
-		const char *s = PQfname(res, j);
-
-		if (po->html3)
-		{
-			fprintf(fout, "<th align=\"%s\">%s</th>",
-					fieldNotNum[j] ? "left" : "right", fieldNames[j]);
-		}
-		else
-		{
-			int			n = strlen(s);
-
-			if (n > fieldMax[j])
-				fieldMax[j] = n;
-			if (po->standard)
-				fprintf(fout,
-						fieldNotNum[j] ? " %-*s " : " %*s ",
-						fieldMax[j], s);
-			else
-				fprintf(fout, fieldNotNum[j] ? "%-*s" : "%*s", fieldMax[j], s);
-			if (po->standard || (j + 1) < nFields)
-				fputs(po->fieldSep, fout);
-		}
-	}
-	if (po->html3)
-		fputs("</tr>\n", fout);
-	else
-		fprintf(fout, "\n%s\n", border);
-	return border;
-}
-
-
-static void
-output_row(FILE *fout, const PQprintOpt *po, const int nFields, char **fields,
-		   unsigned char *fieldNotNum, int *fieldMax, char *border,
-		   const int row_index)
-{
-	int			field_index;	/* for loop index */
-
-	if (po->html3)
-		fputs("<tr>", fout);
-	else if (po->standard)
-		fputs(po->fieldSep, fout);
-	for (field_index = 0; field_index < nFields; field_index++)
-	{
-		char	   *p = fields[row_index * nFields + field_index];
-
-		if (po->html3)
-			fprintf(fout, "<td align=\"%s\">%s</td>",
-					fieldNotNum[field_index] ? "left" : "right", p ? p : "");
-		else
-		{
-			fprintf(fout,
-					fieldNotNum[field_index] ?
-					(po->standard ? " %-*s " : "%-*s") :
-					(po->standard ? " %*s " : "%*s"),
-					fieldMax[field_index],
-					p ? p : "");
-			if (po->standard || field_index + 1 < nFields)
-				fputs(po->fieldSep, fout);
-		}
-	}
-	if (po->html3)
-		fputs("</tr>", fout);
-	else if (po->standard)
-		fprintf(fout, "\n%s", border);
-	fputc('\n', fout);
-}
-
-
-
-/*
- * really old printing routines
- */
-
-void
-PQdisplayTuples(const PGresult *res,
-				FILE *fp,		/* where to send the output */
-				int fillAlign,	/* pad the fields with spaces */
-				const char *fieldSep,	/* field separator */
-				int printHeader,	/* display headers? */
-				int quiet
-)
-{
-#define DEFAULT_FIELD_SEP " "
-
-	int			i,
-				j;
-	int			nFields;
-	int			nTuples;
-	int		   *fLength = NULL;
-
-	if (fieldSep == NULL)
-		fieldSep = DEFAULT_FIELD_SEP;
-
-	/* Get some useful info about the results */
-	nFields = PQnfields(res);
-	nTuples = PQntuples(res);
-
-	if (fp == NULL)
-		fp = stdout;
-
-	/* Figure the field lengths to align to */
-	/* will be somewhat time consuming for very large results */
-	if (fillAlign)
-	{
-		fLength = (int *) malloc(nFields * sizeof(int));
-		if (!fLength)
-		{
-			fprintf(stderr, libpq_gettext("out of memory\n"));
-			return;
-		}
-
-		for (j = 0; j < nFields; j++)
-		{
-			fLength[j] = strlen(PQfname(res, j));
-			for (i = 0; i < nTuples; i++)
-			{
-				int			flen = PQgetlength(res, i, j);
-
-				if (flen > fLength[j])
-					fLength[j] = flen;
-			}
-		}
-	}
-
-	if (printHeader)
-	{
-		/* first, print out the attribute names */
-		for (i = 0; i < nFields; i++)
-		{
-			fputs(PQfname(res, i), fp);
-			if (fillAlign)
-				fill(strlen(PQfname(res, i)), fLength[i], ' ', fp);
-			fputs(fieldSep, fp);
-		}
-		fprintf(fp, "\n");
-
-		/* Underline the attribute names */
-		for (i = 0; i < nFields; i++)
-		{
-			if (fillAlign)
-				fill(0, fLength[i], '-', fp);
-			fputs(fieldSep, fp);
-		}
-		fprintf(fp, "\n");
-	}
-
-	/* next, print out the instances */
-	for (i = 0; i < nTuples; i++)
-	{
-		for (j = 0; j < nFields; j++)
-		{
-			fprintf(fp, "%s", PQgetvalue(res, i, j));
-			if (fillAlign)
-				fill(strlen(PQgetvalue(res, i, j)), fLength[j], ' ', fp);
-			fputs(fieldSep, fp);
-		}
-		fprintf(fp, "\n");
-	}
-
-	if (!quiet)
-		fprintf(fp, "\nQuery returned %d row%s.\n", PQntuples(res),
-				(PQntuples(res) == 1) ? "" : "s");
-
-	fflush(fp);
-
-	free(fLength);
-}
-
-
-
-void
-PQprintTuples(const PGresult *res,
-			  FILE *fout,		/* output stream */
-			  int PrintAttNames,	/* print attribute names or not */
-			  int TerseOutput,	/* delimiter bars or not? */
-			  int colWidth		/* width of column, if 0, use variable width */
-)
-{
-	int			nFields;
-	int			nTups;
-	int			i,
-				j;
-	char		formatString[80];
-	char	   *tborder = NULL;
-
-	nFields = PQnfields(res);
-	nTups = PQntuples(res);
-
-	if (colWidth > 0)
-		sprintf(formatString, "%%s %%-%ds", colWidth);
-	else
-		sprintf(formatString, "%%s %%s");
-
-	if (nFields > 0)
-	{							/* only print rows with at least 1 field.  */
-
-		if (!TerseOutput)
-		{
-			int			width;
-
-			width = nFields * 14;
-			tborder = (char *) malloc(width + 1);
-			if (!tborder)
-			{
-				fprintf(stderr, libpq_gettext("out of memory\n"));
-				return;
-			}
-			for (i = 0; i < width; i++)
-				tborder[i] = '-';
-			tborder[width] = '\0';
-			fprintf(fout, "%s\n", tborder);
-		}
-
-		for (i = 0; i < nFields; i++)
-		{
-			if (PrintAttNames)
-			{
-				fprintf(fout, formatString,
-						TerseOutput ? "" : "|",
-						PQfname(res, i));
-			}
-		}
-
-		if (PrintAttNames)
-		{
-			if (TerseOutput)
-				fprintf(fout, "\n");
-			else
-				fprintf(fout, "|\n%s\n", tborder);
-		}
-
-		for (i = 0; i < nTups; i++)
-		{
-			for (j = 0; j < nFields; j++)
-			{
-				const char *pval = PQgetvalue(res, i, j);
-
-				fprintf(fout, formatString,
-						TerseOutput ? "" : "|",
-						pval ? pval : "");
-			}
-			if (TerseOutput)
-				fprintf(fout, "\n");
-			else
-				fprintf(fout, "|\n%s\n", tborder);
-		}
-	}
-
-	free(tborder);
-}
-
-
-/* simply send out max-length number of filler characters to fp */
-
-static void
-fill(int length, int max, char filler, FILE *fp)
-{
-	int			count;
-
-	count = max - length;
-	while (count-- >= 0)
-		putc(filler, fp);
-}
diff --git a/contrib/libs/libpq/src/interfaces/libpq/fe-protocol3.c b/contrib/libs/libpq/src/interfaces/libpq/fe-protocol3.c
deleted file mode 100644
index 9c4aa7e2c7..0000000000
--- a/contrib/libs/libpq/src/interfaces/libpq/fe-protocol3.c
+++ /dev/null
@@ -1,2301 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * fe-protocol3.c
- *	  functions that are specific to frontend/backend protocol version 3
- *
- * Portions Copyright (c) 1996-2023, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- *
- * IDENTIFICATION
- *	  src/interfaces/libpq/fe-protocol3.c
- *
- *-------------------------------------------------------------------------
- */
-#include "postgres_fe.h"
-
-#include <ctype.h>
-#include <fcntl.h>
-
-#ifdef WIN32
-#include "win32.h"
-#else
-#include <unistd.h>
-#include <netinet/tcp.h>
-#endif
-
-#include "libpq-fe.h"
-#include "libpq-int.h"
-#include "mb/pg_wchar.h"
-#include "port/pg_bswap.h"
-
-/*
- * This macro lists the backend message types that could be "long" (more
- * than a couple of kilobytes).
- */
-#define VALID_LONG_MESSAGE_TYPE(id) \
-	((id) == 'T' || (id) == 'D' || (id) == 'd' || (id) == 'V' || \
-	 (id) == 'E' || (id) == 'N' || (id) == 'A')
-
-
-static void handleSyncLoss(PGconn *conn, char id, int msgLength);
-static int	getRowDescriptions(PGconn *conn, int msgLength);
-static int	getParamDescriptions(PGconn *conn, int msgLength);
-static int	getAnotherTuple(PGconn *conn, int msgLength);
-static int	getParameterStatus(PGconn *conn);
-static int	getNotify(PGconn *conn);
-static int	getCopyStart(PGconn *conn, ExecStatusType copytype);
-static int	getReadyForQuery(PGconn *conn);
-static void reportErrorPosition(PQExpBuffer msg, const char *query,
-								int loc, int encoding);
-static int	build_startup_packet(const PGconn *conn, char *packet,
-								 const PQEnvironmentOption *options);
-
-
-/*
- * parseInput: if appropriate, parse input data from backend
- * until input is exhausted or a stopping state is reached.
- * Note that this function will NOT attempt to read more data from the backend.
- */
-void
-pqParseInput3(PGconn *conn)
-{
-	char		id;
-	int			msgLength;
-	int			avail;
-
-	/*
-	 * Loop to parse successive complete messages available in the buffer.
-	 */
-	for (;;)
-	{
-		/*
-		 * Try to read a message.  First get the type code and length. Return
-		 * if not enough data.
-		 */
-		conn->inCursor = conn->inStart;
-		if (pqGetc(&id, conn))
-			return;
-		if (pqGetInt(&msgLength, 4, conn))
-			return;
-
-		/*
-		 * Try to validate message type/length here.  A length less than 4 is
-		 * definitely broken.  Large lengths should only be believed for a few
-		 * message types.
-		 */
-		if (msgLength < 4)
-		{
-			handleSyncLoss(conn, id, msgLength);
-			return;
-		}
-		if (msgLength > 30000 && !VALID_LONG_MESSAGE_TYPE(id))
-		{
-			handleSyncLoss(conn, id, msgLength);
-			return;
-		}
-
-		/*
-		 * Can't process if message body isn't all here yet.
-		 */
-		msgLength -= 4;
-		avail = conn->inEnd - conn->inCursor;
-		if (avail < msgLength)
-		{
-			/*
-			 * Before returning, enlarge the input buffer if needed to hold
-			 * the whole message.  This is better than leaving it to
-			 * pqReadData because we can avoid multiple cycles of realloc()
-			 * when the message is large; also, we can implement a reasonable
-			 * recovery strategy if we are unable to make the buffer big
-			 * enough.
-			 */
-			if (pqCheckInBufferSpace(conn->inCursor + (size_t) msgLength,
-									 conn))
-			{
-				/*
-				 * XXX add some better recovery code... plan is to skip over
-				 * the message using its length, then report an error. For the
-				 * moment, just treat this like loss of sync (which indeed it
-				 * might be!)
-				 */
-				handleSyncLoss(conn, id, msgLength);
-			}
-			return;
-		}
-
-		/*
-		 * NOTIFY and NOTICE messages can happen in any state; always process
-		 * them right away.
-		 *
-		 * Most other messages should only be processed while in BUSY state.
-		 * (In particular, in READY state we hold off further parsing until
-		 * the application collects the current PGresult.)
-		 *
-		 * However, if the state is IDLE then we got trouble; we need to deal
-		 * with the unexpected message somehow.
-		 *
-		 * ParameterStatus ('S') messages are a special case: in IDLE state we
-		 * must process 'em (this case could happen if a new value was adopted
-		 * from config file due to SIGHUP), but otherwise we hold off until
-		 * BUSY state.
-		 */
-		if (id == 'A')
-		{
-			if (getNotify(conn))
-				return;
-		}
-		else if (id == 'N')
-		{
-			if (pqGetErrorNotice3(conn, false))
-				return;
-		}
-		else if (conn->asyncStatus != PGASYNC_BUSY)
-		{
-			/* If not IDLE state, just wait ... */
-			if (conn->asyncStatus != PGASYNC_IDLE)
-				return;
-
-			/*
-			 * Unexpected message in IDLE state; need to recover somehow.
-			 * ERROR messages are handled using the notice processor;
-			 * ParameterStatus is handled normally; anything else is just
-			 * dropped on the floor after displaying a suitable warning
-			 * notice.  (An ERROR is very possibly the backend telling us why
-			 * it is about to close the connection, so we don't want to just
-			 * discard it...)
-			 */
-			if (id == 'E')
-			{
-				if (pqGetErrorNotice3(conn, false /* treat as notice */ ))
-					return;
-			}
-			else if (id == 'S')
-			{
-				if (getParameterStatus(conn))
-					return;
-			}
-			else
-			{
-				/* Any other case is unexpected and we summarily skip it */
-				pqInternalNotice(&conn->noticeHooks,
-								 "message type 0x%02x arrived from server while idle",
-								 id);
-				/* Discard the unexpected message */
-				conn->inCursor += msgLength;
-			}
-		}
-		else
-		{
-			/*
-			 * In BUSY state, we can process everything.
-			 */
-			switch (id)
-			{
-				case 'C':		/* command complete */
-					if (pqGets(&conn->workBuffer, conn))
-						return;
-					if (!pgHavePendingResult(conn))
-					{
-						conn->result = PQmakeEmptyPGresult(conn,
-														   PGRES_COMMAND_OK);
-						if (!conn->result)
-						{
-							libpq_append_conn_error(conn, "out of memory");
-							pqSaveErrorResult(conn);
-						}
-					}
-					if (conn->result)
-						strlcpy(conn->result->cmdStatus, conn->workBuffer.data,
-								CMDSTATUS_LEN);
-					conn->asyncStatus = PGASYNC_READY;
-					break;
-				case 'E':		/* error return */
-					if (pqGetErrorNotice3(conn, true))
-						return;
-					conn->asyncStatus = PGASYNC_READY;
-					break;
-				case 'Z':		/* sync response, backend is ready for new
-								 * query */
-					if (getReadyForQuery(conn))
-						return;
-					if (conn->pipelineStatus != PQ_PIPELINE_OFF)
-					{
-						conn->result = PQmakeEmptyPGresult(conn,
-														   PGRES_PIPELINE_SYNC);
-						if (!conn->result)
-						{
-							libpq_append_conn_error(conn, "out of memory");
-							pqSaveErrorResult(conn);
-						}
-						else
-						{
-							conn->pipelineStatus = PQ_PIPELINE_ON;
-							conn->asyncStatus = PGASYNC_READY;
-						}
-					}
-					else
-					{
-						/* Advance the command queue and set us idle */
-						pqCommandQueueAdvance(conn, true, false);
-						conn->asyncStatus = PGASYNC_IDLE;
-					}
-					break;
-				case 'I':		/* empty query */
-					if (!pgHavePendingResult(conn))
-					{
-						conn->result = PQmakeEmptyPGresult(conn,
-														   PGRES_EMPTY_QUERY);
-						if (!conn->result)
-						{
-							libpq_append_conn_error(conn, "out of memory");
-							pqSaveErrorResult(conn);
-						}
-					}
-					conn->asyncStatus = PGASYNC_READY;
-					break;
-				case '1':		/* Parse Complete */
-					/* If we're doing PQprepare, we're done; else ignore */
-					if (conn->cmd_queue_head &&
-						conn->cmd_queue_head->queryclass == PGQUERY_PREPARE)
-					{
-						if (!pgHavePendingResult(conn))
-						{
-							conn->result = PQmakeEmptyPGresult(conn,
-															   PGRES_COMMAND_OK);
-							if (!conn->result)
-							{
-								libpq_append_conn_error(conn, "out of memory");
-								pqSaveErrorResult(conn);
-							}
-						}
-						conn->asyncStatus = PGASYNC_READY;
-					}
-					break;
-				case '2':		/* Bind Complete */
-				case '3':		/* Close Complete */
-					/* Nothing to do for these message types */
-					break;
-				case 'S':		/* parameter status */
-					if (getParameterStatus(conn))
-						return;
-					break;
-				case 'K':		/* secret key data from the backend */
-
-					/*
-					 * This is expected only during backend startup, but it's
-					 * just as easy to handle it as part of the main loop.
-					 * Save the data and continue processing.
-					 */
-					if (pqGetInt(&(conn->be_pid), 4, conn))
-						return;
-					if (pqGetInt(&(conn->be_key), 4, conn))
-						return;
-					break;
-				case 'T':		/* Row Description */
-					if (conn->error_result ||
-						(conn->result != NULL &&
-						 conn->result->resultStatus == PGRES_FATAL_ERROR))
-					{
-						/*
-						 * We've already choked for some reason.  Just discard
-						 * the data till we get to the end of the query.
-						 */
-						conn->inCursor += msgLength;
-					}
-					else if (conn->result == NULL ||
-							 (conn->cmd_queue_head &&
-							  conn->cmd_queue_head->queryclass == PGQUERY_DESCRIBE))
-					{
-						/* First 'T' in a query sequence */
-						if (getRowDescriptions(conn, msgLength))
-							return;
-					}
-					else
-					{
-						/*
-						 * A new 'T' message is treated as the start of
-						 * another PGresult.  (It is not clear that this is
-						 * really possible with the current backend.) We stop
-						 * parsing until the application accepts the current
-						 * result.
-						 */
-						conn->asyncStatus = PGASYNC_READY;
-						return;
-					}
-					break;
-				case 'n':		/* No Data */
-
-					/*
-					 * NoData indicates that we will not be seeing a
-					 * RowDescription message because the statement or portal
-					 * inquired about doesn't return rows.
-					 *
-					 * If we're doing a Describe, we have to pass something
-					 * back to the client, so set up a COMMAND_OK result,
-					 * instead of PGRES_TUPLES_OK.  Otherwise we can just
-					 * ignore this message.
-					 */
-					if (conn->cmd_queue_head &&
-						conn->cmd_queue_head->queryclass == PGQUERY_DESCRIBE)
-					{
-						if (!pgHavePendingResult(conn))
-						{
-							conn->result = PQmakeEmptyPGresult(conn,
-															   PGRES_COMMAND_OK);
-							if (!conn->result)
-							{
-								libpq_append_conn_error(conn, "out of memory");
-								pqSaveErrorResult(conn);
-							}
-						}
-						conn->asyncStatus = PGASYNC_READY;
-					}
-					break;
-				case 't':		/* Parameter Description */
-					if (getParamDescriptions(conn, msgLength))
-						return;
-					break;
-				case 'D':		/* Data Row */
-					if (conn->result != NULL &&
-						conn->result->resultStatus == PGRES_TUPLES_OK)
-					{
-						/* Read another tuple of a normal query response */
-						if (getAnotherTuple(conn, msgLength))
-							return;
-					}
-					else if (conn->error_result ||
-							 (conn->result != NULL &&
-							  conn->result->resultStatus == PGRES_FATAL_ERROR))
-					{
-						/*
-						 * We've already choked for some reason.  Just discard
-						 * tuples till we get to the end of the query.
-						 */
-						conn->inCursor += msgLength;
-					}
-					else
-					{
-						/* Set up to report error at end of query */
-						libpq_append_conn_error(conn, "server sent data (\"D\" message) without prior row description (\"T\" message)");
-						pqSaveErrorResult(conn);
-						/* Discard the unexpected message */
-						conn->inCursor += msgLength;
-					}
-					break;
-				case 'G':		/* Start Copy In */
-					if (getCopyStart(conn, PGRES_COPY_IN))
-						return;
-					conn->asyncStatus = PGASYNC_COPY_IN;
-					break;
-				case 'H':		/* Start Copy Out */
-					if (getCopyStart(conn, PGRES_COPY_OUT))
-						return;
-					conn->asyncStatus = PGASYNC_COPY_OUT;
-					conn->copy_already_done = 0;
-					break;
-				case 'W':		/* Start Copy Both */
-					if (getCopyStart(conn, PGRES_COPY_BOTH))
-						return;
-					conn->asyncStatus = PGASYNC_COPY_BOTH;
-					conn->copy_already_done = 0;
-					break;
-				case 'd':		/* Copy Data */
-
-					/*
-					 * If we see Copy Data, just silently drop it.  This would
-					 * only occur if application exits COPY OUT mode too
-					 * early.
-					 */
-					conn->inCursor += msgLength;
-					break;
-				case 'c':		/* Copy Done */
-
-					/*
-					 * If we see Copy Done, just silently drop it.  This is
-					 * the normal case during PQendcopy.  We will keep
-					 * swallowing data, expecting to see command-complete for
-					 * the COPY command.
-					 */
-					break;
-				default:
-					libpq_append_conn_error(conn, "unexpected response from server; first received character was \"%c\"", id);
-					/* build an error result holding the error message */
-					pqSaveErrorResult(conn);
-					/* not sure if we will see more, so go to ready state */
-					conn->asyncStatus = PGASYNC_READY;
-					/* Discard the unexpected message */
-					conn->inCursor += msgLength;
-					break;
-			}					/* switch on protocol character */
-		}
-		/* Successfully consumed this message */
-		if (conn->inCursor == conn->inStart + 5 + msgLength)
-		{
-			/* trace server-to-client message */
-			if (conn->Pfdebug)
-				pqTraceOutputMessage(conn, conn->inBuffer + conn->inStart, false);
-
-			/* Normal case: parsing agrees with specified length */
-			conn->inStart = conn->inCursor;
-		}
-		else
-		{
-			/* Trouble --- report it */
-			libpq_append_conn_error(conn, "message contents do not agree with length in message type \"%c\"", id);
-			/* build an error result holding the error message */
-			pqSaveErrorResult(conn);
-			conn->asyncStatus = PGASYNC_READY;
-			/* trust the specified message length as what to skip */
-			conn->inStart += 5 + msgLength;
-		}
-	}
-}
-
-/*
- * handleSyncLoss: clean up after loss of message-boundary sync
- *
- * There isn't really a lot we can do here except abandon the connection.
- */
-static void
-handleSyncLoss(PGconn *conn, char id, int msgLength)
-{
-	libpq_append_conn_error(conn, "lost synchronization with server: got message type \"%c\", length %d",
-							id, msgLength);
-	/* build an error result holding the error message */
-	pqSaveErrorResult(conn);
-	conn->asyncStatus = PGASYNC_READY;	/* drop out of PQgetResult wait loop */
-	/* flush input data since we're giving up on processing it */
-	pqDropConnection(conn, true);
-	conn->status = CONNECTION_BAD;	/* No more connection to backend */
-}
-
-/*
- * parseInput subroutine to read a 'T' (row descriptions) message.
- * We'll build a new PGresult structure (unless called for a Describe
- * command for a prepared statement) containing the attribute data.
- * Returns: 0 if processed message successfully, EOF to suspend parsing
- * (the latter case is not actually used currently).
- */
-static int
-getRowDescriptions(PGconn *conn, int msgLength)
-{
-	PGresult   *result;
-	int			nfields;
-	const char *errmsg;
-	int			i;
-
-	/*
-	 * When doing Describe for a prepared statement, there'll already be a
-	 * PGresult created by getParamDescriptions, and we should fill data into
-	 * that.  Otherwise, create a new, empty PGresult.
-	 */
-	if (!conn->cmd_queue_head ||
-		(conn->cmd_queue_head &&
-		 conn->cmd_queue_head->queryclass == PGQUERY_DESCRIBE))
-	{
-		if (conn->result)
-			result = conn->result;
-		else
-			result = PQmakeEmptyPGresult(conn, PGRES_COMMAND_OK);
-	}
-	else
-		result = PQmakeEmptyPGresult(conn, PGRES_TUPLES_OK);
-	if (!result)
-	{
-		errmsg = NULL;			/* means "out of memory", see below */
-		goto advance_and_error;
-	}
-
-	/* parseInput already read the 'T' label and message length. */
-	/* the next two bytes are the number of fields */
-	if (pqGetInt(&(result->numAttributes), 2, conn))
-	{
-		/* We should not run out of data here, so complain */
-		errmsg = libpq_gettext("insufficient data in \"T\" message");
-		goto advance_and_error;
-	}
-	nfields = result->numAttributes;
-
-	/* allocate space for the attribute descriptors */
-	if (nfields > 0)
-	{
-		result->attDescs = (PGresAttDesc *)
-			pqResultAlloc(result, nfields * sizeof(PGresAttDesc), true);
-		if (!result->attDescs)
-		{
-			errmsg = NULL;		/* means "out of memory", see below */
-			goto advance_and_error;
-		}
-		MemSet(result->attDescs, 0, nfields * sizeof(PGresAttDesc));
-	}
-
-	/* result->binary is true only if ALL columns are binary */
-	result->binary = (nfields > 0) ? 1 : 0;
-
-	/* get type info */
-	for (i = 0; i < nfields; i++)
-	{
-		int			tableid;
-		int			columnid;
-		int			typid;
-		int			typlen;
-		int			atttypmod;
-		int			format;
-
-		if (pqGets(&conn->workBuffer, conn) ||
-			pqGetInt(&tableid, 4, conn) ||
-			pqGetInt(&columnid, 2, conn) ||
-			pqGetInt(&typid, 4, conn) ||
-			pqGetInt(&typlen, 2, conn) ||
-			pqGetInt(&atttypmod, 4, conn) ||
-			pqGetInt(&format, 2, conn))
-		{
-			/* We should not run out of data here, so complain */
-			errmsg = libpq_gettext("insufficient data in \"T\" message");
-			goto advance_and_error;
-		}
-
-		/*
-		 * Since pqGetInt treats 2-byte integers as unsigned, we need to
-		 * coerce these results to signed form.
-		 */
-		columnid = (int) ((int16) columnid);
-		typlen = (int) ((int16) typlen);
-		format = (int) ((int16) format);
-
-		result->attDescs[i].name = pqResultStrdup(result,
-												  conn->workBuffer.data);
-		if (!result->attDescs[i].name)
-		{
-			errmsg = NULL;		/* means "out of memory", see below */
-			goto advance_and_error;
-		}
-		result->attDescs[i].tableid = tableid;
-		result->attDescs[i].columnid = columnid;
-		result->attDescs[i].format = format;
-		result->attDescs[i].typid = typid;
-		result->attDescs[i].typlen = typlen;
-		result->attDescs[i].atttypmod = atttypmod;
-
-		if (format != 1)
-			result->binary = 0;
-	}
-
-	/* Success! */
-	conn->result = result;
-
-	/*
-	 * If we're doing a Describe, we're done, and ready to pass the result
-	 * back to the client.
-	 */
-	if ((!conn->cmd_queue_head) ||
-		(conn->cmd_queue_head &&
-		 conn->cmd_queue_head->queryclass == PGQUERY_DESCRIBE))
-	{
-		conn->asyncStatus = PGASYNC_READY;
-		return 0;
-	}
-
-	/*
-	 * We could perform additional setup for the new result set here, but for
-	 * now there's nothing else to do.
-	 */
-
-	/* And we're done. */
-	return 0;
-
-advance_and_error:
-	/* Discard unsaved result, if any */
-	if (result && result != conn->result)
-		PQclear(result);
-
-	/*
-	 * Replace partially constructed result with an error result. First
-	 * discard the old result to try to win back some memory.
-	 */
-	pqClearAsyncResult(conn);
-
-	/*
-	 * If preceding code didn't provide an error message, assume "out of
-	 * memory" was meant.  The advantage of having this special case is that
-	 * freeing the old result first greatly improves the odds that gettext()
-	 * will succeed in providing a translation.
-	 */
-	if (!errmsg)
-		errmsg = libpq_gettext("out of memory for query result");
-
-	appendPQExpBuffer(&conn->errorMessage, "%s\n", errmsg);
-	pqSaveErrorResult(conn);
-
-	/*
-	 * Show the message as fully consumed, else pqParseInput3 will overwrite
-	 * our error with a complaint about that.
-	 */
-	conn->inCursor = conn->inStart + 5 + msgLength;
-
-	/*
-	 * Return zero to allow input parsing to continue.  Subsequent "D"
-	 * messages will be ignored until we get to end of data, since an error
-	 * result is already set up.
-	 */
-	return 0;
-}
-
-/*
- * parseInput subroutine to read a 't' (ParameterDescription) message.
- * We'll build a new PGresult structure containing the parameter data.
- * Returns: 0 if processed message successfully, EOF to suspend parsing
- * (the latter case is not actually used currently).
- */
-static int
-getParamDescriptions(PGconn *conn, int msgLength)
-{
-	PGresult   *result;
-	const char *errmsg = NULL;	/* means "out of memory", see below */
-	int			nparams;
-	int			i;
-
-	result = PQmakeEmptyPGresult(conn, PGRES_COMMAND_OK);
-	if (!result)
-		goto advance_and_error;
-
-	/* parseInput already read the 't' label and message length. */
-	/* the next two bytes are the number of parameters */
-	if (pqGetInt(&(result->numParameters), 2, conn))
-		goto not_enough_data;
-	nparams = result->numParameters;
-
-	/* allocate space for the parameter descriptors */
-	if (nparams > 0)
-	{
-		result->paramDescs = (PGresParamDesc *)
-			pqResultAlloc(result, nparams * sizeof(PGresParamDesc), true);
-		if (!result->paramDescs)
-			goto advance_and_error;
-		MemSet(result->paramDescs, 0, nparams * sizeof(PGresParamDesc));
-	}
-
-	/* get parameter info */
-	for (i = 0; i < nparams; i++)
-	{
-		int			typid;
-
-		if (pqGetInt(&typid, 4, conn))
-			goto not_enough_data;
-		result->paramDescs[i].typid = typid;
-	}
-
-	/* Success! */
-	conn->result = result;
-
-	return 0;
-
-not_enough_data:
-	errmsg = libpq_gettext("insufficient data in \"t\" message");
-
-advance_and_error:
-	/* Discard unsaved result, if any */
-	if (result && result != conn->result)
-		PQclear(result);
-
-	/*
-	 * Replace partially constructed result with an error result. First
-	 * discard the old result to try to win back some memory.
-	 */
-	pqClearAsyncResult(conn);
-
-	/*
-	 * If preceding code didn't provide an error message, assume "out of
-	 * memory" was meant.  The advantage of having this special case is that
-	 * freeing the old result first greatly improves the odds that gettext()
-	 * will succeed in providing a translation.
-	 */
-	if (!errmsg)
-		errmsg = libpq_gettext("out of memory");
-	appendPQExpBuffer(&conn->errorMessage, "%s\n", errmsg);
-	pqSaveErrorResult(conn);
-
-	/*
-	 * Show the message as fully consumed, else pqParseInput3 will overwrite
-	 * our error with a complaint about that.
-	 */
-	conn->inCursor = conn->inStart + 5 + msgLength;
-
-	/*
-	 * Return zero to allow input parsing to continue.  Essentially, we've
-	 * replaced the COMMAND_OK result with an error result, but since this
-	 * doesn't affect the protocol state, it's fine.
-	 */
-	return 0;
-}
-
-/*
- * parseInput subroutine to read a 'D' (row data) message.
- * We fill rowbuf with column pointers and then call the row processor.
- * Returns: 0 if processed message successfully, EOF to suspend parsing
- * (the latter case is not actually used currently).
- */
-static int
-getAnotherTuple(PGconn *conn, int msgLength)
-{
-	PGresult   *result = conn->result;
-	int			nfields = result->numAttributes;
-	const char *errmsg;
-	PGdataValue *rowbuf;
-	int			tupnfields;		/* # fields from tuple */
-	int			vlen;			/* length of the current field value */
-	int			i;
-
-	/* Get the field count and make sure it's what we expect */
-	if (pqGetInt(&tupnfields, 2, conn))
-	{
-		/* We should not run out of data here, so complain */
-		errmsg = libpq_gettext("insufficient data in \"D\" message");
-		goto advance_and_error;
-	}
-
-	if (tupnfields != nfields)
-	{
-		errmsg = libpq_gettext("unexpected field count in \"D\" message");
-		goto advance_and_error;
-	}
-
-	/* Resize row buffer if needed */
-	rowbuf = conn->rowBuf;
-	if (nfields > conn->rowBufLen)
-	{
-		rowbuf = (PGdataValue *) realloc(rowbuf,
-										 nfields * sizeof(PGdataValue));
-		if (!rowbuf)
-		{
-			errmsg = NULL;		/* means "out of memory", see below */
-			goto advance_and_error;
-		}
-		conn->rowBuf = rowbuf;
-		conn->rowBufLen = nfields;
-	}
-
-	/* Scan the fields */
-	for (i = 0; i < nfields; i++)
-	{
-		/* get the value length */
-		if (pqGetInt(&vlen, 4, conn))
-		{
-			/* We should not run out of data here, so complain */
-			errmsg = libpq_gettext("insufficient data in \"D\" message");
-			goto advance_and_error;
-		}
-		rowbuf[i].len = vlen;
-
-		/*
-		 * rowbuf[i].value always points to the next address in the data
-		 * buffer even if the value is NULL.  This allows row processors to
-		 * estimate data sizes more easily.
-		 */
-		rowbuf[i].value = conn->inBuffer + conn->inCursor;
-
-		/* Skip over the data value */
-		if (vlen > 0)
-		{
-			if (pqSkipnchar(vlen, conn))
-			{
-				/* We should not run out of data here, so complain */
-				errmsg = libpq_gettext("insufficient data in \"D\" message");
-				goto advance_and_error;
-			}
-		}
-	}
-
-	/* Process the collected row */
-	errmsg = NULL;
-	if (pqRowProcessor(conn, &errmsg))
-		return 0;				/* normal, successful exit */
-
-	/* pqRowProcessor failed, fall through to report it */
-
-advance_and_error:
-
-	/*
-	 * Replace partially constructed result with an error result. First
-	 * discard the old result to try to win back some memory.
-	 */
-	pqClearAsyncResult(conn);
-
-	/*
-	 * If preceding code didn't provide an error message, assume "out of
-	 * memory" was meant.  The advantage of having this special case is that
-	 * freeing the old result first greatly improves the odds that gettext()
-	 * will succeed in providing a translation.
-	 */
-	if (!errmsg)
-		errmsg = libpq_gettext("out of memory for query result");
-
-	appendPQExpBuffer(&conn->errorMessage, "%s\n", errmsg);
-	pqSaveErrorResult(conn);
-
-	/*
-	 * Show the message as fully consumed, else pqParseInput3 will overwrite
-	 * our error with a complaint about that.
-	 */
-	conn->inCursor = conn->inStart + 5 + msgLength;
-
-	/*
-	 * Return zero to allow input parsing to continue.  Subsequent "D"
-	 * messages will be ignored until we get to end of data, since an error
-	 * result is already set up.
-	 */
-	return 0;
-}
-
-
-/*
- * Attempt to read an Error or Notice response message.
- * This is possible in several places, so we break it out as a subroutine.
- * Entry: 'E' or 'N' message type and length have already been consumed.
- * Exit: returns 0 if successfully consumed message.
- *		 returns EOF if not enough data.
- */
-int
-pqGetErrorNotice3(PGconn *conn, bool isError)
-{
-	PGresult   *res = NULL;
-	bool		have_position = false;
-	PQExpBufferData workBuf;
-	char		id;
-
-	/* If in pipeline mode, set error indicator for it */
-	if (isError && conn->pipelineStatus != PQ_PIPELINE_OFF)
-		conn->pipelineStatus = PQ_PIPELINE_ABORTED;
-
-	/*
-	 * If this is an error message, pre-emptively clear any incomplete query
-	 * result we may have.  We'd just throw it away below anyway, and
-	 * releasing it before collecting the error might avoid out-of-memory.
-	 */
-	if (isError)
-		pqClearAsyncResult(conn);
-
-	/*
-	 * Since the fields might be pretty long, we create a temporary
-	 * PQExpBuffer rather than using conn->workBuffer.  workBuffer is intended
-	 * for stuff that is expected to be short.  We shouldn't use
-	 * conn->errorMessage either, since this might be only a notice.
-	 */
-	initPQExpBuffer(&workBuf);
-
-	/*
-	 * Make a PGresult to hold the accumulated fields.  We temporarily lie
-	 * about the result status, so that PQmakeEmptyPGresult doesn't uselessly
-	 * copy conn->errorMessage.
-	 *
-	 * NB: This allocation can fail, if you run out of memory. The rest of the
-	 * function handles that gracefully, and we still try to set the error
-	 * message as the connection's error message.
-	 */
-	res = PQmakeEmptyPGresult(conn, PGRES_EMPTY_QUERY);
-	if (res)
-		res->resultStatus = isError ? PGRES_FATAL_ERROR : PGRES_NONFATAL_ERROR;
-
-	/*
-	 * Read the fields and save into res.
-	 *
-	 * While at it, save the SQLSTATE in conn->last_sqlstate, and note whether
-	 * we saw a PG_DIAG_STATEMENT_POSITION field.
-	 */
-	for (;;)
-	{
-		if (pqGetc(&id, conn))
-			goto fail;
-		if (id == '\0')
-			break;				/* terminator found */
-		if (pqGets(&workBuf, conn))
-			goto fail;
-		pqSaveMessageField(res, id, workBuf.data);
-		if (id == PG_DIAG_SQLSTATE)
-			strlcpy(conn->last_sqlstate, workBuf.data,
-					sizeof(conn->last_sqlstate));
-		else if (id == PG_DIAG_STATEMENT_POSITION)
-			have_position = true;
-	}
-
-	/*
-	 * Save the active query text, if any, into res as well; but only if we
-	 * might need it for an error cursor display, which is only true if there
-	 * is a PG_DIAG_STATEMENT_POSITION field.
-	 */
-	if (have_position && res && conn->cmd_queue_head && conn->cmd_queue_head->query)
-		res->errQuery = pqResultStrdup(res, conn->cmd_queue_head->query);
-
-	/*
-	 * Now build the "overall" error message for PQresultErrorMessage.
-	 */
-	resetPQExpBuffer(&workBuf);
-	pqBuildErrorMessage3(&workBuf, res, conn->verbosity, conn->show_context);
-
-	/*
-	 * Either save error as current async result, or just emit the notice.
-	 */
-	if (isError)
-	{
-		pqClearAsyncResult(conn);	/* redundant, but be safe */
-		if (res)
-		{
-			pqSetResultError(res, &workBuf, 0);
-			conn->result = res;
-		}
-		else
-		{
-			/* Fall back to using the internal-error processing paths */
-			conn->error_result = true;
-		}
-
-		if (PQExpBufferDataBroken(workBuf))
-			libpq_append_conn_error(conn, "out of memory");
-		else
-			appendPQExpBufferStr(&conn->errorMessage, workBuf.data);
-	}
-	else
-	{
-		/* if we couldn't allocate the result set, just discard the NOTICE */
-		if (res)
-		{
-			/*
-			 * We can cheat a little here and not copy the message.  But if we
-			 * were unlucky enough to run out of memory while filling workBuf,
-			 * insert "out of memory", as in pqSetResultError.
-			 */
-			if (PQExpBufferDataBroken(workBuf))
-				res->errMsg = libpq_gettext("out of memory\n");
-			else
-				res->errMsg = workBuf.data;
-			if (res->noticeHooks.noticeRec != NULL)
-				res->noticeHooks.noticeRec(res->noticeHooks.noticeRecArg, res);
-			PQclear(res);
-		}
-	}
-
-	termPQExpBuffer(&workBuf);
-	return 0;
-
-fail:
-	PQclear(res);
-	termPQExpBuffer(&workBuf);
-	return EOF;
-}
-
-/*
- * Construct an error message from the fields in the given PGresult,
- * appending it to the contents of "msg".
- */
-void
-pqBuildErrorMessage3(PQExpBuffer msg, const PGresult *res,
-					 PGVerbosity verbosity, PGContextVisibility show_context)
-{
-	const char *val;
-	const char *querytext = NULL;
-	int			querypos = 0;
-
-	/* If we couldn't allocate a PGresult, just say "out of memory" */
-	if (res == NULL)
-	{
-		appendPQExpBufferStr(msg, libpq_gettext("out of memory\n"));
-		return;
-	}
-
-	/*
-	 * If we don't have any broken-down fields, just return the base message.
-	 * This mainly applies if we're given a libpq-generated error result.
-	 */
-	if (res->errFields == NULL)
-	{
-		if (res->errMsg && res->errMsg[0])
-			appendPQExpBufferStr(msg, res->errMsg);
-		else
-			appendPQExpBufferStr(msg, libpq_gettext("no error message available\n"));
-		return;
-	}
-
-	/* Else build error message from relevant fields */
-	val = PQresultErrorField(res, PG_DIAG_SEVERITY);
-	if (val)
-		appendPQExpBuffer(msg, "%s:  ", val);
-
-	if (verbosity == PQERRORS_SQLSTATE)
-	{
-		/*
-		 * If we have a SQLSTATE, print that and nothing else.  If not (which
-		 * shouldn't happen for server-generated errors, but might possibly
-		 * happen for libpq-generated ones), fall back to TERSE format, as
-		 * that seems better than printing nothing at all.
-		 */
-		val = PQresultErrorField(res, PG_DIAG_SQLSTATE);
-		if (val)
-		{
-			appendPQExpBuffer(msg, "%s\n", val);
-			return;
-		}
-		verbosity = PQERRORS_TERSE;
-	}
-
-	if (verbosity == PQERRORS_VERBOSE)
-	{
-		val = PQresultErrorField(res, PG_DIAG_SQLSTATE);
-		if (val)
-			appendPQExpBuffer(msg, "%s: ", val);
-	}
-	val = PQresultErrorField(res, PG_DIAG_MESSAGE_PRIMARY);
-	if (val)
-		appendPQExpBufferStr(msg, val);
-	val = PQresultErrorField(res, PG_DIAG_STATEMENT_POSITION);
-	if (val)
-	{
-		if (verbosity != PQERRORS_TERSE && res->errQuery != NULL)
-		{
-			/* emit position as a syntax cursor display */
-			querytext = res->errQuery;
-			querypos = atoi(val);
-		}
-		else
-		{
-			/* emit position as text addition to primary message */
-			/* translator: %s represents a digit string */
-			appendPQExpBuffer(msg, libpq_gettext(" at character %s"),
-							  val);
-		}
-	}
-	else
-	{
-		val = PQresultErrorField(res, PG_DIAG_INTERNAL_POSITION);
-		if (val)
-		{
-			querytext = PQresultErrorField(res, PG_DIAG_INTERNAL_QUERY);
-			if (verbosity != PQERRORS_TERSE && querytext != NULL)
-			{
-				/* emit position as a syntax cursor display */
-				querypos = atoi(val);
-			}
-			else
-			{
-				/* emit position as text addition to primary message */
-				/* translator: %s represents a digit string */
-				appendPQExpBuffer(msg, libpq_gettext(" at character %s"),
-								  val);
-			}
-		}
-	}
-	appendPQExpBufferChar(msg, '\n');
-	if (verbosity != PQERRORS_TERSE)
-	{
-		if (querytext && querypos > 0)
-			reportErrorPosition(msg, querytext, querypos,
-								res->client_encoding);
-		val = PQresultErrorField(res, PG_DIAG_MESSAGE_DETAIL);
-		if (val)
-			appendPQExpBuffer(msg, libpq_gettext("DETAIL:  %s\n"), val);
-		val = PQresultErrorField(res, PG_DIAG_MESSAGE_HINT);
-		if (val)
-			appendPQExpBuffer(msg, libpq_gettext("HINT:  %s\n"), val);
-		val = PQresultErrorField(res, PG_DIAG_INTERNAL_QUERY);
-		if (val)
-			appendPQExpBuffer(msg, libpq_gettext("QUERY:  %s\n"), val);
-		if (show_context == PQSHOW_CONTEXT_ALWAYS ||
-			(show_context == PQSHOW_CONTEXT_ERRORS &&
-			 res->resultStatus == PGRES_FATAL_ERROR))
-		{
-			val = PQresultErrorField(res, PG_DIAG_CONTEXT);
-			if (val)
-				appendPQExpBuffer(msg, libpq_gettext("CONTEXT:  %s\n"),
-								  val);
-		}
-	}
-	if (verbosity == PQERRORS_VERBOSE)
-	{
-		val = PQresultErrorField(res, PG_DIAG_SCHEMA_NAME);
-		if (val)
-			appendPQExpBuffer(msg,
-							  libpq_gettext("SCHEMA NAME:  %s\n"), val);
-		val = PQresultErrorField(res, PG_DIAG_TABLE_NAME);
-		if (val)
-			appendPQExpBuffer(msg,
-							  libpq_gettext("TABLE NAME:  %s\n"), val);
-		val = PQresultErrorField(res, PG_DIAG_COLUMN_NAME);
-		if (val)
-			appendPQExpBuffer(msg,
-							  libpq_gettext("COLUMN NAME:  %s\n"), val);
-		val = PQresultErrorField(res, PG_DIAG_DATATYPE_NAME);
-		if (val)
-			appendPQExpBuffer(msg,
-							  libpq_gettext("DATATYPE NAME:  %s\n"), val);
-		val = PQresultErrorField(res, PG_DIAG_CONSTRAINT_NAME);
-		if (val)
-			appendPQExpBuffer(msg,
-							  libpq_gettext("CONSTRAINT NAME:  %s\n"), val);
-	}
-	if (verbosity == PQERRORS_VERBOSE)
-	{
-		const char *valf;
-		const char *vall;
-
-		valf = PQresultErrorField(res, PG_DIAG_SOURCE_FILE);
-		vall = PQresultErrorField(res, PG_DIAG_SOURCE_LINE);
-		val = PQresultErrorField(res, PG_DIAG_SOURCE_FUNCTION);
-		if (val || valf || vall)
-		{
-			appendPQExpBufferStr(msg, libpq_gettext("LOCATION:  "));
-			if (val)
-				appendPQExpBuffer(msg, libpq_gettext("%s, "), val);
-			if (valf && vall)	/* unlikely we'd have just one */
-				appendPQExpBuffer(msg, libpq_gettext("%s:%s"),
-								  valf, vall);
-			appendPQExpBufferChar(msg, '\n');
-		}
-	}
-}
-
-/*
- * Add an error-location display to the error message under construction.
- *
- * The cursor location is measured in logical characters; the query string
- * is presumed to be in the specified encoding.
- */
-static void
-reportErrorPosition(PQExpBuffer msg, const char *query, int loc, int encoding)
-{
-#define DISPLAY_SIZE	60		/* screen width limit, in screen cols */
-#define MIN_RIGHT_CUT	10		/* try to keep this far away from EOL */
-
-	char	   *wquery;
-	int			slen,
-				cno,
-				i,
-			   *qidx,
-			   *scridx,
-				qoffset,
-				scroffset,
-				ibeg,
-				iend,
-				loc_line;
-	bool		mb_encoding,
-				beg_trunc,
-				end_trunc;
-
-	/* Convert loc from 1-based to 0-based; no-op if out of range */
-	loc--;
-	if (loc < 0)
-		return;
-
-	/* Need a writable copy of the query */
-	wquery = strdup(query);
-	if (wquery == NULL)
-		return;					/* fail silently if out of memory */
-
-	/*
-	 * Each character might occupy multiple physical bytes in the string, and
-	 * in some Far Eastern character sets it might take more than one screen
-	 * column as well.  We compute the starting byte offset and starting
-	 * screen column of each logical character, and store these in qidx[] and
-	 * scridx[] respectively.
-	 */
-
-	/* we need a safe allocation size... */
-	slen = strlen(wquery) + 1;
-
-	qidx = (int *) malloc(slen * sizeof(int));
-	if (qidx == NULL)
-	{
-		free(wquery);
-		return;
-	}
-	scridx = (int *) malloc(slen * sizeof(int));
-	if (scridx == NULL)
-	{
-		free(qidx);
-		free(wquery);
-		return;
-	}
-
-	/* We can optimize a bit if it's a single-byte encoding */
-	mb_encoding = (pg_encoding_max_length(encoding) != 1);
-
-	/*
-	 * Within the scanning loop, cno is the current character's logical
-	 * number, qoffset is its offset in wquery, and scroffset is its starting
-	 * logical screen column (all indexed from 0).  "loc" is the logical
-	 * character number of the error location.  We scan to determine loc_line
-	 * (the 1-based line number containing loc) and ibeg/iend (first character
-	 * number and last+1 character number of the line containing loc). Note
-	 * that qidx[] and scridx[] are filled only as far as iend.
-	 */
-	qoffset = 0;
-	scroffset = 0;
-	loc_line = 1;
-	ibeg = 0;
-	iend = -1;					/* -1 means not set yet */
-
-	for (cno = 0; wquery[qoffset] != '\0'; cno++)
-	{
-		char		ch = wquery[qoffset];
-
-		qidx[cno] = qoffset;
-		scridx[cno] = scroffset;
-
-		/*
-		 * Replace tabs with spaces in the writable copy.  (Later we might
-		 * want to think about coping with their variable screen width, but
-		 * not today.)
-		 */
-		if (ch == '\t')
-			wquery[qoffset] = ' ';
-
-		/*
-		 * If end-of-line, count lines and mark positions. Each \r or \n
-		 * counts as a line except when \r \n appear together.
-		 */
-		else if (ch == '\r' || ch == '\n')
-		{
-			if (cno < loc)
-			{
-				if (ch == '\r' ||
-					cno == 0 ||
-					wquery[qidx[cno - 1]] != '\r')
-					loc_line++;
-				/* extract beginning = last line start before loc. */
-				ibeg = cno + 1;
-			}
-			else
-			{
-				/* set extract end. */
-				iend = cno;
-				/* done scanning. */
-				break;
-			}
-		}
-
-		/* Advance */
-		if (mb_encoding)
-		{
-			int			w;
-
-			w = pg_encoding_dsplen(encoding, &wquery[qoffset]);
-			/* treat any non-tab control chars as width 1 */
-			if (w <= 0)
-				w = 1;
-			scroffset += w;
-			qoffset += PQmblenBounded(&wquery[qoffset], encoding);
-		}
-		else
-		{
-			/* We assume wide chars only exist in multibyte encodings */
-			scroffset++;
-			qoffset++;
-		}
-	}
-	/* Fix up if we didn't find an end-of-line after loc */
-	if (iend < 0)
-	{
-		iend = cno;				/* query length in chars, +1 */
-		qidx[iend] = qoffset;
-		scridx[iend] = scroffset;
-	}
-
-	/* Print only if loc is within computed query length */
-	if (loc <= cno)
-	{
-		/* If the line extracted is too long, we truncate it. */
-		beg_trunc = false;
-		end_trunc = false;
-		if (scridx[iend] - scridx[ibeg] > DISPLAY_SIZE)
-		{
-			/*
-			 * We first truncate right if it is enough.  This code might be
-			 * off a space or so on enforcing MIN_RIGHT_CUT if there's a wide
-			 * character right there, but that should be okay.
-			 */
-			if (scridx[ibeg] + DISPLAY_SIZE >= scridx[loc] + MIN_RIGHT_CUT)
-			{
-				while (scridx[iend] - scridx[ibeg] > DISPLAY_SIZE)
-					iend--;
-				end_trunc = true;
-			}
-			else
-			{
-				/* Truncate right if not too close to loc. */
-				while (scridx[loc] + MIN_RIGHT_CUT < scridx[iend])
-				{
-					iend--;
-					end_trunc = true;
-				}
-
-				/* Truncate left if still too long. */
-				while (scridx[iend] - scridx[ibeg] > DISPLAY_SIZE)
-				{
-					ibeg++;
-					beg_trunc = true;
-				}
-			}
-		}
-
-		/* truncate working copy at desired endpoint */
-		wquery[qidx[iend]] = '\0';
-
-		/* Begin building the finished message. */
-		i = msg->len;
-		appendPQExpBuffer(msg, libpq_gettext("LINE %d: "), loc_line);
-		if (beg_trunc)
-			appendPQExpBufferStr(msg, "...");
-
-		/*
-		 * While we have the prefix in the msg buffer, compute its screen
-		 * width.
-		 */
-		scroffset = 0;
-		for (; i < msg->len; i += PQmblenBounded(&msg->data[i], encoding))
-		{
-			int			w = pg_encoding_dsplen(encoding, &msg->data[i]);
-
-			if (w <= 0)
-				w = 1;
-			scroffset += w;
-		}
-
-		/* Finish up the LINE message line. */
-		appendPQExpBufferStr(msg, &wquery[qidx[ibeg]]);
-		if (end_trunc)
-			appendPQExpBufferStr(msg, "...");
-		appendPQExpBufferChar(msg, '\n');
-
-		/* Now emit the cursor marker line. */
-		scroffset += scridx[loc] - scridx[ibeg];
-		for (i = 0; i < scroffset; i++)
-			appendPQExpBufferChar(msg, ' ');
-		appendPQExpBufferChar(msg, '^');
-		appendPQExpBufferChar(msg, '\n');
-	}
-
-	/* Clean up. */
-	free(scridx);
-	free(qidx);
-	free(wquery);
-}
-
-
-/*
- * Attempt to read a NegotiateProtocolVersion message.
- * Entry: 'v' message type and length have already been consumed.
- * Exit: returns 0 if successfully consumed message.
- *		 returns EOF if not enough data.
- */
-int
-pqGetNegotiateProtocolVersion3(PGconn *conn)
-{
-	int			tmp;
-	ProtocolVersion their_version;
-	int			num;
-	PQExpBufferData buf;
-
-	if (pqGetInt(&tmp, 4, conn) != 0)
-		return EOF;
-	their_version = tmp;
-
-	if (pqGetInt(&num, 4, conn) != 0)
-		return EOF;
-
-	initPQExpBuffer(&buf);
-	for (int i = 0; i < num; i++)
-	{
-		if (pqGets(&conn->workBuffer, conn))
-		{
-			termPQExpBuffer(&buf);
-			return EOF;
-		}
-		if (buf.len > 0)
-			appendPQExpBufferChar(&buf, ' ');
-		appendPQExpBufferStr(&buf, conn->workBuffer.data);
-	}
-
-	if (their_version < conn->pversion)
-		libpq_append_conn_error(conn, "protocol version not supported by server: client uses %u.%u, server supports up to %u.%u",
-								PG_PROTOCOL_MAJOR(conn->pversion), PG_PROTOCOL_MINOR(conn->pversion),
-								PG_PROTOCOL_MAJOR(their_version), PG_PROTOCOL_MINOR(their_version));
-	if (num > 0)
-	{
-		appendPQExpBuffer(&conn->errorMessage,
-						  libpq_ngettext("protocol extension not supported by server: %s",
-										 "protocol extensions not supported by server: %s", num),
-						  buf.data);
-		appendPQExpBufferChar(&conn->errorMessage, '\n');
-	}
-
-	/* neither -- server shouldn't have sent it */
-	if (!(their_version < conn->pversion) && !(num > 0))
-		libpq_append_conn_error(conn, "invalid %s message", "NegotiateProtocolVersion");
-
-	termPQExpBuffer(&buf);
-	return 0;
-}
-
-
-/*
- * Attempt to read a ParameterStatus message.
- * This is possible in several places, so we break it out as a subroutine.
- * Entry: 'S' message type and length have already been consumed.
- * Exit: returns 0 if successfully consumed message.
- *		 returns EOF if not enough data.
- */
-static int
-getParameterStatus(PGconn *conn)
-{
-	PQExpBufferData valueBuf;
-
-	/* Get the parameter name */
-	if (pqGets(&conn->workBuffer, conn))
-		return EOF;
-	/* Get the parameter value (could be large) */
-	initPQExpBuffer(&valueBuf);
-	if (pqGets(&valueBuf, conn))
-	{
-		termPQExpBuffer(&valueBuf);
-		return EOF;
-	}
-	/* And save it */
-	pqSaveParameterStatus(conn, conn->workBuffer.data, valueBuf.data);
-	termPQExpBuffer(&valueBuf);
-	return 0;
-}
-
-
-/*
- * Attempt to read a Notify response message.
- * This is possible in several places, so we break it out as a subroutine.
- * Entry: 'A' message type and length have already been consumed.
- * Exit: returns 0 if successfully consumed Notify message.
- *		 returns EOF if not enough data.
- */
-static int
-getNotify(PGconn *conn)
-{
-	int			be_pid;
-	char	   *svname;
-	int			nmlen;
-	int			extralen;
-	PGnotify   *newNotify;
-
-	if (pqGetInt(&be_pid, 4, conn))
-		return EOF;
-	if (pqGets(&conn->workBuffer, conn))
-		return EOF;
-	/* must save name while getting extra string */
-	svname = strdup(conn->workBuffer.data);
-	if (!svname)
-		return EOF;
-	if (pqGets(&conn->workBuffer, conn))
-	{
-		free(svname);
-		return EOF;
-	}
-
-	/*
-	 * Store the strings right after the PGnotify structure so it can all be
-	 * freed at once.  We don't use NAMEDATALEN because we don't want to tie
-	 * this interface to a specific server name length.
-	 */
-	nmlen = strlen(svname);
-	extralen = strlen(conn->workBuffer.data);
-	newNotify = (PGnotify *) malloc(sizeof(PGnotify) + nmlen + extralen + 2);
-	if (newNotify)
-	{
-		newNotify->relname = (char *) newNotify + sizeof(PGnotify);
-		strcpy(newNotify->relname, svname);
-		newNotify->extra = newNotify->relname + nmlen + 1;
-		strcpy(newNotify->extra, conn->workBuffer.data);
-		newNotify->be_pid = be_pid;
-		newNotify->next = NULL;
-		if (conn->notifyTail)
-			conn->notifyTail->next = newNotify;
-		else
-			conn->notifyHead = newNotify;
-		conn->notifyTail = newNotify;
-	}
-
-	free(svname);
-	return 0;
-}
-
-/*
- * getCopyStart - process CopyInResponse, CopyOutResponse or
- * CopyBothResponse message
- *
- * parseInput already read the message type and length.
- */
-static int
-getCopyStart(PGconn *conn, ExecStatusType copytype)
-{
-	PGresult   *result;
-	int			nfields;
-	int			i;
-
-	result = PQmakeEmptyPGresult(conn, copytype);
-	if (!result)
-		goto failure;
-
-	if (pqGetc(&conn->copy_is_binary, conn))
-		goto failure;
-	result->binary = conn->copy_is_binary;
-	/* the next two bytes are the number of fields	*/
-	if (pqGetInt(&(result->numAttributes), 2, conn))
-		goto failure;
-	nfields = result->numAttributes;
-
-	/* allocate space for the attribute descriptors */
-	if (nfields > 0)
-	{
-		result->attDescs = (PGresAttDesc *)
-			pqResultAlloc(result, nfields * sizeof(PGresAttDesc), true);
-		if (!result->attDescs)
-			goto failure;
-		MemSet(result->attDescs, 0, nfields * sizeof(PGresAttDesc));
-	}
-
-	for (i = 0; i < nfields; i++)
-	{
-		int			format;
-
-		if (pqGetInt(&format, 2, conn))
-			goto failure;
-
-		/*
-		 * Since pqGetInt treats 2-byte integers as unsigned, we need to
-		 * coerce these results to signed form.
-		 */
-		format = (int) ((int16) format);
-		result->attDescs[i].format = format;
-	}
-
-	/* Success! */
-	conn->result = result;
-	return 0;
-
-failure:
-	PQclear(result);
-	return EOF;
-}
-
-/*
- * getReadyForQuery - process ReadyForQuery message
- */
-static int
-getReadyForQuery(PGconn *conn)
-{
-	char		xact_status;
-
-	if (pqGetc(&xact_status, conn))
-		return EOF;
-	switch (xact_status)
-	{
-		case 'I':
-			conn->xactStatus = PQTRANS_IDLE;
-			break;
-		case 'T':
-			conn->xactStatus = PQTRANS_INTRANS;
-			break;
-		case 'E':
-			conn->xactStatus = PQTRANS_INERROR;
-			break;
-		default:
-			conn->xactStatus = PQTRANS_UNKNOWN;
-			break;
-	}
-
-	return 0;
-}
-
-/*
- * getCopyDataMessage - fetch next CopyData message, process async messages
- *
- * Returns length word of CopyData message (> 0), or 0 if no complete
- * message available, -1 if end of copy, -2 if error.
- */
-static int
-getCopyDataMessage(PGconn *conn)
-{
-	char		id;
-	int			msgLength;
-	int			avail;
-
-	for (;;)
-	{
-		/*
-		 * Do we have the next input message?  To make life simpler for async
-		 * callers, we keep returning 0 until the next message is fully
-		 * available, even if it is not Copy Data.
-		 */
-		conn->inCursor = conn->inStart;
-		if (pqGetc(&id, conn))
-			return 0;
-		if (pqGetInt(&msgLength, 4, conn))
-			return 0;
-		if (msgLength < 4)
-		{
-			handleSyncLoss(conn, id, msgLength);
-			return -2;
-		}
-		avail = conn->inEnd - conn->inCursor;
-		if (avail < msgLength - 4)
-		{
-			/*
-			 * Before returning, enlarge the input buffer if needed to hold
-			 * the whole message.  See notes in parseInput.
-			 */
-			if (pqCheckInBufferSpace(conn->inCursor + (size_t) msgLength - 4,
-									 conn))
-			{
-				/*
-				 * XXX add some better recovery code... plan is to skip over
-				 * the message using its length, then report an error. For the
-				 * moment, just treat this like loss of sync (which indeed it
-				 * might be!)
-				 */
-				handleSyncLoss(conn, id, msgLength);
-				return -2;
-			}
-			return 0;
-		}
-
-		/*
-		 * If it's a legitimate async message type, process it.  (NOTIFY
-		 * messages are not currently possible here, but we handle them for
-		 * completeness.)  Otherwise, if it's anything except Copy Data,
-		 * report end-of-copy.
-		 */
-		switch (id)
-		{
-			case 'A':			/* NOTIFY */
-				if (getNotify(conn))
-					return 0;
-				break;
-			case 'N':			/* NOTICE */
-				if (pqGetErrorNotice3(conn, false))
-					return 0;
-				break;
-			case 'S':			/* ParameterStatus */
-				if (getParameterStatus(conn))
-					return 0;
-				break;
-			case 'd':			/* Copy Data, pass it back to caller */
-				return msgLength;
-			case 'c':
-
-				/*
-				 * If this is a CopyDone message, exit COPY_OUT mode and let
-				 * caller read status with PQgetResult().  If we're in
-				 * COPY_BOTH mode, return to COPY_IN mode.
-				 */
-				if (conn->asyncStatus == PGASYNC_COPY_BOTH)
-					conn->asyncStatus = PGASYNC_COPY_IN;
-				else
-					conn->asyncStatus = PGASYNC_BUSY;
-				return -1;
-			default:			/* treat as end of copy */
-
-				/*
-				 * Any other message terminates either COPY_IN or COPY_BOTH
-				 * mode.
-				 */
-				conn->asyncStatus = PGASYNC_BUSY;
-				return -1;
-		}
-
-		/* trace server-to-client message */
-		if (conn->Pfdebug)
-			pqTraceOutputMessage(conn, conn->inBuffer + conn->inStart, false);
-
-		/* Drop the processed message and loop around for another */
-		conn->inStart = conn->inCursor;
-	}
-}
-
-/*
- * PQgetCopyData - read a row of data from the backend during COPY OUT
- * or COPY BOTH
- *
- * If successful, sets *buffer to point to a malloc'd row of data, and
- * returns row length (always > 0) as result.
- * Returns 0 if no row available yet (only possible if async is true),
- * -1 if end of copy (consult PQgetResult), or -2 if error (consult
- * PQerrorMessage).
- */
-int
-pqGetCopyData3(PGconn *conn, char **buffer, int async)
-{
-	int			msgLength;
-
-	for (;;)
-	{
-		/*
-		 * Collect the next input message.  To make life simpler for async
-		 * callers, we keep returning 0 until the next message is fully
-		 * available, even if it is not Copy Data.
-		 */
-		msgLength = getCopyDataMessage(conn);
-		if (msgLength < 0)
-			return msgLength;	/* end-of-copy or error */
-		if (msgLength == 0)
-		{
-			/* Don't block if async read requested */
-			if (async)
-				return 0;
-			/* Need to load more data */
-			if (pqWait(true, false, conn) ||
-				pqReadData(conn) < 0)
-				return -2;
-			continue;
-		}
-
-		/*
-		 * Drop zero-length messages (shouldn't happen anyway).  Otherwise
-		 * pass the data back to the caller.
-		 */
-		msgLength -= 4;
-		if (msgLength > 0)
-		{
-			*buffer = (char *) malloc(msgLength + 1);
-			if (*buffer == NULL)
-			{
-				libpq_append_conn_error(conn, "out of memory");
-				return -2;
-			}
-			memcpy(*buffer, &conn->inBuffer[conn->inCursor], msgLength);
-			(*buffer)[msgLength] = '\0';	/* Add terminating null */
-
-			/* Mark message consumed */
-			conn->inStart = conn->inCursor + msgLength;
-
-			return msgLength;
-		}
-
-		/* Empty, so drop it and loop around for another */
-		conn->inStart = conn->inCursor;
-	}
-}
-
-/*
- * PQgetline - gets a newline-terminated string from the backend.
- *
- * See fe-exec.c for documentation.
- */
-int
-pqGetline3(PGconn *conn, char *s, int maxlen)
-{
-	int			status;
-
-	if (conn->sock == PGINVALID_SOCKET ||
-		(conn->asyncStatus != PGASYNC_COPY_OUT &&
-		 conn->asyncStatus != PGASYNC_COPY_BOTH) ||
-		conn->copy_is_binary)
-	{
-		libpq_append_conn_error(conn, "PQgetline: not doing text COPY OUT");
-		*s = '\0';
-		return EOF;
-	}
-
-	while ((status = PQgetlineAsync(conn, s, maxlen - 1)) == 0)
-	{
-		/* need to load more data */
-		if (pqWait(true, false, conn) ||
-			pqReadData(conn) < 0)
-		{
-			*s = '\0';
-			return EOF;
-		}
-	}
-
-	if (status < 0)
-	{
-		/* End of copy detected; gin up old-style terminator */
-		strcpy(s, "\\.");
-		return 0;
-	}
-
-	/* Add null terminator, and strip trailing \n if present */
-	if (s[status - 1] == '\n')
-	{
-		s[status - 1] = '\0';
-		return 0;
-	}
-	else
-	{
-		s[status] = '\0';
-		return 1;
-	}
-}
-
-/*
- * PQgetlineAsync - gets a COPY data row without blocking.
- *
- * See fe-exec.c for documentation.
- */
-int
-pqGetlineAsync3(PGconn *conn, char *buffer, int bufsize)
-{
-	int			msgLength;
-	int			avail;
-
-	if (conn->asyncStatus != PGASYNC_COPY_OUT
-		&& conn->asyncStatus != PGASYNC_COPY_BOTH)
-		return -1;				/* we are not doing a copy... */
-
-	/*
-	 * Recognize the next input message.  To make life simpler for async
-	 * callers, we keep returning 0 until the next message is fully available
-	 * even if it is not Copy Data.  This should keep PQendcopy from blocking.
-	 * (Note: unlike pqGetCopyData3, we do not change asyncStatus here.)
-	 */
-	msgLength = getCopyDataMessage(conn);
-	if (msgLength < 0)
-		return -1;				/* end-of-copy or error */
-	if (msgLength == 0)
-		return 0;				/* no data yet */
-
-	/*
-	 * Move data from libpq's buffer to the caller's.  In the case where a
-	 * prior call found the caller's buffer too small, we use
-	 * conn->copy_already_done to remember how much of the row was already
-	 * returned to the caller.
-	 */
-	conn->inCursor += conn->copy_already_done;
-	avail = msgLength - 4 - conn->copy_already_done;
-	if (avail <= bufsize)
-	{
-		/* Able to consume the whole message */
-		memcpy(buffer, &conn->inBuffer[conn->inCursor], avail);
-		/* Mark message consumed */
-		conn->inStart = conn->inCursor + avail;
-		/* Reset state for next time */
-		conn->copy_already_done = 0;
-		return avail;
-	}
-	else
-	{
-		/* We must return a partial message */
-		memcpy(buffer, &conn->inBuffer[conn->inCursor], bufsize);
-		/* The message is NOT consumed from libpq's buffer */
-		conn->copy_already_done += bufsize;
-		return bufsize;
-	}
-}
-
-/*
- * PQendcopy
- *
- * See fe-exec.c for documentation.
- */
-int
-pqEndcopy3(PGconn *conn)
-{
-	PGresult   *result;
-
-	if (conn->asyncStatus != PGASYNC_COPY_IN &&
-		conn->asyncStatus != PGASYNC_COPY_OUT &&
-		conn->asyncStatus != PGASYNC_COPY_BOTH)
-	{
-		libpq_append_conn_error(conn, "no COPY in progress");
-		return 1;
-	}
-
-	/* Send the CopyDone message if needed */
-	if (conn->asyncStatus == PGASYNC_COPY_IN ||
-		conn->asyncStatus == PGASYNC_COPY_BOTH)
-	{
-		if (pqPutMsgStart('c', conn) < 0 ||
-			pqPutMsgEnd(conn) < 0)
-			return 1;
-
-		/*
-		 * If we sent the COPY command in extended-query mode, we must issue a
-		 * Sync as well.
-		 */
-		if (conn->cmd_queue_head &&
-			conn->cmd_queue_head->queryclass != PGQUERY_SIMPLE)
-		{
-			if (pqPutMsgStart('S', conn) < 0 ||
-				pqPutMsgEnd(conn) < 0)
-				return 1;
-		}
-	}
-
-	/*
-	 * make sure no data is waiting to be sent, abort if we are non-blocking
-	 * and the flush fails
-	 */
-	if (pqFlush(conn) && pqIsnonblocking(conn))
-		return 1;
-
-	/* Return to active duty */
-	conn->asyncStatus = PGASYNC_BUSY;
-
-	/*
-	 * Non blocking connections may have to abort at this point.  If everyone
-	 * played the game there should be no problem, but in error scenarios the
-	 * expected messages may not have arrived yet.  (We are assuming that the
-	 * backend's packetizing will ensure that CommandComplete arrives along
-	 * with the CopyDone; are there corner cases where that doesn't happen?)
-	 */
-	if (pqIsnonblocking(conn) && PQisBusy(conn))
-		return 1;
-
-	/* Wait for the completion response */
-	result = PQgetResult(conn);
-
-	/* Expecting a successful result */
-	if (result && result->resultStatus == PGRES_COMMAND_OK)
-	{
-		PQclear(result);
-		return 0;
-	}
-
-	/*
-	 * Trouble. For backwards-compatibility reasons, we issue the error
-	 * message as if it were a notice (would be nice to get rid of this
-	 * silliness, but too many apps probably don't handle errors from
-	 * PQendcopy reasonably).  Note that the app can still obtain the error
-	 * status from the PGconn object.
-	 */
-	if (conn->errorMessage.len > 0)
-	{
-		/* We have to strip the trailing newline ... pain in neck... */
-		char		svLast = conn->errorMessage.data[conn->errorMessage.len - 1];
-
-		if (svLast == '\n')
-			conn->errorMessage.data[conn->errorMessage.len - 1] = '\0';
-		pqInternalNotice(&conn->noticeHooks, "%s", conn->errorMessage.data);
-		conn->errorMessage.data[conn->errorMessage.len - 1] = svLast;
-	}
-
-	PQclear(result);
-
-	return 1;
-}
-
-
-/*
- * PQfn - Send a function call to the POSTGRES backend.
- *
- * See fe-exec.c for documentation.
- */
-PGresult *
-pqFunctionCall3(PGconn *conn, Oid fnid,
-				int *result_buf, int *actual_result_len,
-				int result_is_int,
-				const PQArgBlock *args, int nargs)
-{
-	bool		needInput = false;
-	ExecStatusType status = PGRES_FATAL_ERROR;
-	char		id;
-	int			msgLength;
-	int			avail;
-	int			i;
-
-	/* already validated by PQfn */
-	Assert(conn->pipelineStatus == PQ_PIPELINE_OFF);
-
-	/* PQfn already validated connection state */
-
-	if (pqPutMsgStart('F', conn) < 0 || /* function call msg */
-		pqPutInt(fnid, 4, conn) < 0 ||	/* function id */
-		pqPutInt(1, 2, conn) < 0 || /* # of format codes */
-		pqPutInt(1, 2, conn) < 0 || /* format code: BINARY */
-		pqPutInt(nargs, 2, conn) < 0)	/* # of args */
-	{
-		/* error message should be set up already */
-		return NULL;
-	}
-
-	for (i = 0; i < nargs; ++i)
-	{							/* len.int4 + contents	   */
-		if (pqPutInt(args[i].len, 4, conn))
-			return NULL;
-		if (args[i].len == -1)
-			continue;			/* it's NULL */
-
-		if (args[i].isint)
-		{
-			if (pqPutInt(args[i].u.integer, args[i].len, conn))
-				return NULL;
-		}
-		else
-		{
-			if (pqPutnchar((char *) args[i].u.ptr, args[i].len, conn))
-				return NULL;
-		}
-	}
-
-	if (pqPutInt(1, 2, conn) < 0)	/* result format code: BINARY */
-		return NULL;
-
-	if (pqPutMsgEnd(conn) < 0 ||
-		pqFlush(conn))
-		return NULL;
-
-	for (;;)
-	{
-		if (needInput)
-		{
-			/* Wait for some data to arrive (or for the channel to close) */
-			if (pqWait(true, false, conn) ||
-				pqReadData(conn) < 0)
-				break;
-		}
-
-		/*
-		 * Scan the message. If we run out of data, loop around to try again.
-		 */
-		needInput = true;
-
-		conn->inCursor = conn->inStart;
-		if (pqGetc(&id, conn))
-			continue;
-		if (pqGetInt(&msgLength, 4, conn))
-			continue;
-
-		/*
-		 * Try to validate message type/length here.  A length less than 4 is
-		 * definitely broken.  Large lengths should only be believed for a few
-		 * message types.
-		 */
-		if (msgLength < 4)
-		{
-			handleSyncLoss(conn, id, msgLength);
-			break;
-		}
-		if (msgLength > 30000 && !VALID_LONG_MESSAGE_TYPE(id))
-		{
-			handleSyncLoss(conn, id, msgLength);
-			break;
-		}
-
-		/*
-		 * Can't process if message body isn't all here yet.
-		 */
-		msgLength -= 4;
-		avail = conn->inEnd - conn->inCursor;
-		if (avail < msgLength)
-		{
-			/*
-			 * Before looping, enlarge the input buffer if needed to hold the
-			 * whole message.  See notes in parseInput.
-			 */
-			if (pqCheckInBufferSpace(conn->inCursor + (size_t) msgLength,
-									 conn))
-			{
-				/*
-				 * XXX add some better recovery code... plan is to skip over
-				 * the message using its length, then report an error. For the
-				 * moment, just treat this like loss of sync (which indeed it
-				 * might be!)
-				 */
-				handleSyncLoss(conn, id, msgLength);
-				break;
-			}
-			continue;
-		}
-
-		/*
-		 * We should see V or E response to the command, but might get N
-		 * and/or A notices first. We also need to swallow the final Z before
-		 * returning.
-		 */
-		switch (id)
-		{
-			case 'V':			/* function result */
-				if (pqGetInt(actual_result_len, 4, conn))
-					continue;
-				if (*actual_result_len != -1)
-				{
-					if (result_is_int)
-					{
-						if (pqGetInt(result_buf, *actual_result_len, conn))
-							continue;
-					}
-					else
-					{
-						if (pqGetnchar((char *) result_buf,
-									   *actual_result_len,
-									   conn))
-							continue;
-					}
-				}
-				/* correctly finished function result message */
-				status = PGRES_COMMAND_OK;
-				break;
-			case 'E':			/* error return */
-				if (pqGetErrorNotice3(conn, true))
-					continue;
-				status = PGRES_FATAL_ERROR;
-				break;
-			case 'A':			/* notify message */
-				/* handle notify and go back to processing return values */
-				if (getNotify(conn))
-					continue;
-				break;
-			case 'N':			/* notice */
-				/* handle notice and go back to processing return values */
-				if (pqGetErrorNotice3(conn, false))
-					continue;
-				break;
-			case 'Z':			/* backend is ready for new query */
-				if (getReadyForQuery(conn))
-					continue;
-				/* consume the message and exit */
-				conn->inStart += 5 + msgLength;
-
-				/*
-				 * If we already have a result object (probably an error), use
-				 * that.  Otherwise, if we saw a function result message,
-				 * report COMMAND_OK.  Otherwise, the backend violated the
-				 * protocol, so complain.
-				 */
-				if (!pgHavePendingResult(conn))
-				{
-					if (status == PGRES_COMMAND_OK)
-					{
-						conn->result = PQmakeEmptyPGresult(conn, status);
-						if (!conn->result)
-						{
-							libpq_append_conn_error(conn, "out of memory");
-							pqSaveErrorResult(conn);
-						}
-					}
-					else
-					{
-						libpq_append_conn_error(conn, "protocol error: no function result");
-						pqSaveErrorResult(conn);
-					}
-				}
-				return pqPrepareAsyncResult(conn);
-			case 'S':			/* parameter status */
-				if (getParameterStatus(conn))
-					continue;
-				break;
-			default:
-				/* The backend violates the protocol. */
-				libpq_append_conn_error(conn, "protocol error: id=0x%x", id);
-				pqSaveErrorResult(conn);
-				/* trust the specified message length as what to skip */
-				conn->inStart += 5 + msgLength;
-				return pqPrepareAsyncResult(conn);
-		}
-
-		/* trace server-to-client message */
-		if (conn->Pfdebug)
-			pqTraceOutputMessage(conn, conn->inBuffer + conn->inStart, false);
-
-		/* Completed this message, keep going */
-		/* trust the specified message length as what to skip */
-		conn->inStart += 5 + msgLength;
-		needInput = false;
-	}
-
-	/*
-	 * We fall out of the loop only upon failing to read data.
-	 * conn->errorMessage has been set by pqWait or pqReadData. We want to
-	 * append it to any already-received error message.
-	 */
-	pqSaveErrorResult(conn);
-	return pqPrepareAsyncResult(conn);
-}
-
-
-/*
- * Construct startup packet
- *
- * Returns a malloc'd packet buffer, or NULL if out of memory
- */
-char *
-pqBuildStartupPacket3(PGconn *conn, int *packetlen,
-					  const PQEnvironmentOption *options)
-{
-	char	   *startpacket;
-
-	*packetlen = build_startup_packet(conn, NULL, options);
-	startpacket = (char *) malloc(*packetlen);
-	if (!startpacket)
-		return NULL;
-	*packetlen = build_startup_packet(conn, startpacket, options);
-	return startpacket;
-}
-
-/*
- * Build a startup packet given a filled-in PGconn structure.
- *
- * We need to figure out how much space is needed, then fill it in.
- * To avoid duplicate logic, this routine is called twice: the first time
- * (with packet == NULL) just counts the space needed, the second time
- * (with packet == allocated space) fills it in.  Return value is the number
- * of bytes used.
- */
-static int
-build_startup_packet(const PGconn *conn, char *packet,
-					 const PQEnvironmentOption *options)
-{
-	int			packet_len = 0;
-	const PQEnvironmentOption *next_eo;
-	const char *val;
-
-	/* Protocol version comes first. */
-	if (packet)
-	{
-		ProtocolVersion pv = pg_hton32(conn->pversion);
-
-		memcpy(packet + packet_len, &pv, sizeof(ProtocolVersion));
-	}
-	packet_len += sizeof(ProtocolVersion);
-
-	/* Add user name, database name, options */
-
-#define ADD_STARTUP_OPTION(optname, optval) \
-	do { \
-		if (packet) \
-			strcpy(packet + packet_len, optname); \
-		packet_len += strlen(optname) + 1; \
-		if (packet) \
-			strcpy(packet + packet_len, optval); \
-		packet_len += strlen(optval) + 1; \
-	} while(0)
-
-	if (conn->pguser && conn->pguser[0])
-		ADD_STARTUP_OPTION("user", conn->pguser);
-	if (conn->dbName && conn->dbName[0])
-		ADD_STARTUP_OPTION("database", conn->dbName);
-	if (conn->replication && conn->replication[0])
-		ADD_STARTUP_OPTION("replication", conn->replication);
-	if (conn->pgoptions && conn->pgoptions[0])
-		ADD_STARTUP_OPTION("options", conn->pgoptions);
-	if (conn->send_appname)
-	{
-		/* Use appname if present, otherwise use fallback */
-		val = conn->appname ? conn->appname : conn->fbappname;
-		if (val && val[0])
-			ADD_STARTUP_OPTION("application_name", val);
-	}
-
-	if (conn->client_encoding_initial && conn->client_encoding_initial[0])
-		ADD_STARTUP_OPTION("client_encoding", conn->client_encoding_initial);
-
-	/* Add any environment-driven GUC settings needed */
-	for (next_eo = options; next_eo->envName; next_eo++)
-	{
-		if ((val = getenv(next_eo->envName)) != NULL)
-		{
-			if (pg_strcasecmp(val, "default") != 0)
-				ADD_STARTUP_OPTION(next_eo->pgName, val);
-		}
-	}
-
-	/* Add trailing terminator */
-	if (packet)
-		packet[packet_len] = '\0';
-	packet_len++;
-
-	return packet_len;
-}
diff --git a/contrib/libs/libpq/src/interfaces/libpq/fe-secure-common.c b/contrib/libs/libpq/src/interfaces/libpq/fe-secure-common.c
deleted file mode 100644
index 3ecc7bf615..0000000000
--- a/contrib/libs/libpq/src/interfaces/libpq/fe-secure-common.c
+++ /dev/null
@@ -1,307 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * fe-secure-common.c
- *
- * common implementation-independent SSL support code
- *
- * While fe-secure.c contains the interfaces that the rest of libpq call, this
- * file contains support routines that are used by the library-specific
- * implementations such as fe-secure-openssl.c.
- *
- * Portions Copyright (c) 1996-2023, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- * IDENTIFICATION
- *	  src/interfaces/libpq/fe-secure-common.c
- *
- *-------------------------------------------------------------------------
- */
-
-#include "postgres_fe.h"
-
-#include <arpa/inet.h>
-
-#include "fe-secure-common.h"
-
-#include "libpq-int.h"
-#include "pqexpbuffer.h"
-
-/*
- * Check if a wildcard certificate matches the server hostname.
- *
- * The rule for this is:
- *	1. We only match the '*' character as wildcard
- *	2. We match only wildcards at the start of the string
- *	3. The '*' character does *not* match '.', meaning that we match only
- *	   a single pathname component.
- *	4. We don't support more than one '*' in a single pattern.
- *
- * This is roughly in line with RFC2818, but contrary to what most browsers
- * appear to be implementing (point 3 being the difference)
- *
- * Matching is always case-insensitive, since DNS is case insensitive.
- */
-static bool
-wildcard_certificate_match(const char *pattern, const char *string)
-{
-	int			lenpat = strlen(pattern);
-	int			lenstr = strlen(string);
-
-	/* If we don't start with a wildcard, it's not a match (rule 1 & 2) */
-	if (lenpat < 3 ||
-		pattern[0] != '*' ||
-		pattern[1] != '.')
-		return false;
-
-	/* If pattern is longer than the string, we can never match */
-	if (lenpat > lenstr)
-		return false;
-
-	/*
-	 * If string does not end in pattern (minus the wildcard), we don't match
-	 */
-	if (pg_strcasecmp(pattern + 1, string + lenstr - lenpat + 1) != 0)
-		return false;
-
-	/*
-	 * If there is a dot left of where the pattern started to match, we don't
-	 * match (rule 3)
-	 */
-	if (strchr(string, '.') < string + lenstr - lenpat)
-		return false;
-
-	/* String ended with pattern, and didn't have a dot before, so we match */
-	return true;
-}
-
-/*
- * Check if a name from a server's certificate matches the peer's hostname.
- *
- * Returns 1 if the name matches, and 0 if it does not. On error, returns
- * -1, and sets the libpq error message.
- *
- * The name extracted from the certificate is returned in *store_name. The
- * caller is responsible for freeing it.
- */
-int
-pq_verify_peer_name_matches_certificate_name(PGconn *conn,
-											 const char *namedata, size_t namelen,
-											 char **store_name)
-{
-	char	   *name;
-	int			result;
-	char	   *host = conn->connhost[conn->whichhost].host;
-
-	*store_name = NULL;
-
-	if (!(host && host[0] != '\0'))
-	{
-		libpq_append_conn_error(conn, "host name must be specified");
-		return -1;
-	}
-
-	/*
-	 * There is no guarantee the string returned from the certificate is
-	 * NULL-terminated, so make a copy that is.
-	 */
-	name = malloc(namelen + 1);
-	if (name == NULL)
-	{
-		libpq_append_conn_error(conn, "out of memory");
-		return -1;
-	}
-	memcpy(name, namedata, namelen);
-	name[namelen] = '\0';
-
-	/*
-	 * Reject embedded NULLs in certificate common or alternative name to
-	 * prevent attacks like CVE-2009-4034.
-	 */
-	if (namelen != strlen(name))
-	{
-		free(name);
-		libpq_append_conn_error(conn, "SSL certificate's name contains embedded null");
-		return -1;
-	}
-
-	if (pg_strcasecmp(name, host) == 0)
-	{
-		/* Exact name match */
-		result = 1;
-	}
-	else if (wildcard_certificate_match(name, host))
-	{
-		/* Matched wildcard name */
-		result = 1;
-	}
-	else
-	{
-		result = 0;
-	}
-
-	*store_name = name;
-	return result;
-}
-
-/*
- * Check if an IP address from a server's certificate matches the peer's
- * hostname (which must itself be an IPv4/6 address).
- *
- * Returns 1 if the address matches, and 0 if it does not. On error, returns
- * -1, and sets the libpq error message.
- *
- * A string representation of the certificate's IP address is returned in
- * *store_name. The caller is responsible for freeing it.
- */
-int
-pq_verify_peer_name_matches_certificate_ip(PGconn *conn,
-										   const unsigned char *ipdata,
-										   size_t iplen,
-										   char **store_name)
-{
-	char	   *addrstr;
-	int			match = 0;
-	char	   *host = conn->connhost[conn->whichhost].host;
-	int			family;
-	char		tmp[sizeof "ffff:ffff:ffff:ffff:ffff:ffff:255.255.255.255"];
-	char		sebuf[PG_STRERROR_R_BUFLEN];
-
-	*store_name = NULL;
-
-	if (!(host && host[0] != '\0'))
-	{
-		libpq_append_conn_error(conn, "host name must be specified");
-		return -1;
-	}
-
-	/*
-	 * The data from the certificate is in network byte order. Convert our
-	 * host string to network-ordered bytes as well, for comparison. (The host
-	 * string isn't guaranteed to actually be an IP address, so if this
-	 * conversion fails we need to consider it a mismatch rather than an
-	 * error.)
-	 */
-	if (iplen == 4)
-	{
-		/* IPv4 */
-		struct in_addr addr;
-
-		family = AF_INET;
-
-		/*
-		 * The use of inet_aton() is deliberate; we accept alternative IPv4
-		 * address notations that are accepted by inet_aton() but not
-		 * inet_pton() as server addresses.
-		 */
-		if (inet_aton(host, &addr))
-		{
-			if (memcmp(ipdata, &addr.s_addr, iplen) == 0)
-				match = 1;
-		}
-	}
-
-	/*
-	 * If they don't have inet_pton(), skip this.  Then, an IPv6 address in a
-	 * certificate will cause an error.
-	 */
-#ifdef HAVE_INET_PTON
-	else if (iplen == 16)
-	{
-		/* IPv6 */
-		struct in6_addr addr;
-
-		family = AF_INET6;
-
-		if (inet_pton(AF_INET6, host, &addr) == 1)
-		{
-			if (memcmp(ipdata, &addr.s6_addr, iplen) == 0)
-				match = 1;
-		}
-	}
-#endif
-	else
-	{
-		/*
-		 * Not IPv4 or IPv6. We could ignore the field, but leniency seems
-		 * wrong given the subject matter.
-		 */
-		libpq_append_conn_error(conn, "certificate contains IP address with invalid length %zu",
-								iplen);
-		return -1;
-	}
-
-	/* Generate a human-readable representation of the certificate's IP. */
-	addrstr = pg_inet_net_ntop(family, ipdata, 8 * iplen, tmp, sizeof(tmp));
-	if (!addrstr)
-	{
-		libpq_append_conn_error(conn, "could not convert certificate's IP address to string: %s",
-								strerror_r(errno, sebuf, sizeof(sebuf)));
-		return -1;
-	}
-
-	*store_name = strdup(addrstr);
-	return match;
-}
-
-/*
- * Verify that the server certificate matches the hostname we connected to.
- *
- * The certificate's Common Name and Subject Alternative Names are considered.
- */
-bool
-pq_verify_peer_name_matches_certificate(PGconn *conn)
-{
-	char	   *host = conn->connhost[conn->whichhost].host;
-	int			rc;
-	int			names_examined = 0;
-	char	   *first_name = NULL;
-
-	/*
-	 * If told not to verify the peer name, don't do it. Return true
-	 * indicating that the verification was successful.
-	 */
-	if (strcmp(conn->sslmode, "verify-full") != 0)
-		return true;
-
-	/* Check that we have a hostname to compare with. */
-	if (!(host && host[0] != '\0'))
-	{
-		libpq_append_conn_error(conn, "host name must be specified for a verified SSL connection");
-		return false;
-	}
-
-	rc = pgtls_verify_peer_name_matches_certificate_guts(conn, &names_examined, &first_name);
-
-	if (rc == 0)
-	{
-		/*
-		 * No match. Include the name from the server certificate in the error
-		 * message, to aid debugging broken configurations. If there are
-		 * multiple names, only print the first one to avoid an overly long
-		 * error message.
-		 */
-		if (names_examined > 1)
-		{
-			appendPQExpBuffer(&conn->errorMessage,
-							  libpq_ngettext("server certificate for \"%s\" (and %d other name) does not match host name \"%s\"",
-											 "server certificate for \"%s\" (and %d other names) does not match host name \"%s\"",
-											 names_examined - 1),
-							  first_name, names_examined - 1, host);
-			appendPQExpBufferChar(&conn->errorMessage, '\n');
-		}
-		else if (names_examined == 1)
-		{
-			libpq_append_conn_error(conn, "server certificate for \"%s\" does not match host name \"%s\"",
-									first_name, host);
-		}
-		else
-		{
-			libpq_append_conn_error(conn, "could not get server's host name from server certificate");
-		}
-	}
-
-	/* clean up */
-	free(first_name);
-
-	return (rc == 1);
-}
diff --git a/contrib/libs/libpq/src/interfaces/libpq/fe-secure-common.h b/contrib/libs/libpq/src/interfaces/libpq/fe-secure-common.h
deleted file mode 100644
index e048f97b01..0000000000
--- a/contrib/libs/libpq/src/interfaces/libpq/fe-secure-common.h
+++ /dev/null
@@ -1,30 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * fe-secure-common.h
- *
- * common implementation-independent SSL support code
- *
- * Portions Copyright (c) 1996-2023, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- * IDENTIFICATION
- *	  src/interfaces/libpq/fe-secure-common.h
- *
- *-------------------------------------------------------------------------
- */
-
-#ifndef FE_SECURE_COMMON_H
-#define FE_SECURE_COMMON_H
-
-#include "libpq-fe.h"
-
-extern int	pq_verify_peer_name_matches_certificate_name(PGconn *conn,
-														 const char *namedata, size_t namelen,
-														 char **store_name);
-extern int	pq_verify_peer_name_matches_certificate_ip(PGconn *conn,
-													   const unsigned char *ipdata,
-													   size_t iplen,
-													   char **store_name);
-extern bool pq_verify_peer_name_matches_certificate(PGconn *conn);
-
-#endif							/* FE_SECURE_COMMON_H */
diff --git a/contrib/libs/libpq/src/interfaces/libpq/fe-secure-openssl.c b/contrib/libs/libpq/src/interfaces/libpq/fe-secure-openssl.c
deleted file mode 100644
index 8b845994a1..0000000000
--- a/contrib/libs/libpq/src/interfaces/libpq/fe-secure-openssl.c
+++ /dev/null
@@ -1,2093 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * fe-secure-openssl.c
- *	  OpenSSL support
- *
- *
- * Portions Copyright (c) 1996-2023, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- *
- * IDENTIFICATION
- *	  src/interfaces/libpq/fe-secure-openssl.c
- *
- * NOTES
- *
- *	  We don't provide informational callbacks here (like
- *	  info_cb() in be-secure-openssl.c), since there's no good mechanism to
- *	  display such information to the user.
- *
- *-------------------------------------------------------------------------
- */
-
-#include "postgres_fe.h"
-
-#include <signal.h>
-#include <fcntl.h>
-#include <ctype.h>
-
-#include "libpq-fe.h"
-#include "fe-auth.h"
-#include "fe-secure-common.h"
-#include "libpq-int.h"
-
-#ifdef WIN32
-#include "win32.h"
-#else
-#include <sys/socket.h>
-#include <unistd.h>
-#include <netdb.h>
-#include <netinet/in.h>
-#include <netinet/tcp.h>
-#include <arpa/inet.h>
-#endif
-
-#include <sys/stat.h>
-
-#ifdef ENABLE_THREAD_SAFETY
-#ifdef WIN32
-#include "pthread-win32.h"
-#else
-#include <pthread.h>
-#endif
-#endif
-
-/*
- * These SSL-related #includes must come after all system-provided headers.
- * This ensures that OpenSSL can take care of conflicts with Windows'
- * <wincrypt.h> by #undef'ing the conflicting macros.  (We don't directly
- * include <wincrypt.h>, but some other Windows headers do.)
- */
-#include "common/openssl.h"
-#include <openssl/conf.h>
-#ifdef USE_SSL_ENGINE
-#include <openssl/engine.h>
-#endif
-#include <openssl/x509v3.h>
-
-
-static int	verify_cb(int ok, X509_STORE_CTX *ctx);
-static int	openssl_verify_peer_name_matches_certificate_name(PGconn *conn,
-															  ASN1_STRING *name_entry,
-															  char **store_name);
-static int	openssl_verify_peer_name_matches_certificate_ip(PGconn *conn,
-															ASN1_OCTET_STRING *addr_entry,
-															char **store_name);
-static void destroy_ssl_system(void);
-static int	initialize_SSL(PGconn *conn);
-static PostgresPollingStatusType open_client_SSL(PGconn *conn);
-static char *SSLerrmessage(unsigned long ecode);
-static void SSLerrfree(char *buf);
-static int	PQssl_passwd_cb(char *buf, int size, int rwflag, void *userdata);
-
-static int	my_sock_read(BIO *h, char *buf, int size);
-static int	my_sock_write(BIO *h, const char *buf, int size);
-static BIO_METHOD *my_BIO_s_socket(void);
-static int	my_SSL_set_fd(PGconn *conn, int fd);
-
-
-static bool pq_init_ssl_lib = true;
-static bool pq_init_crypto_lib = true;
-
-static bool ssl_lib_initialized = false;
-
-#ifdef ENABLE_THREAD_SAFETY
-static long crypto_open_connections = 0;
-
-#ifndef WIN32
-static pthread_mutex_t ssl_config_mutex = PTHREAD_MUTEX_INITIALIZER;
-#else
-static pthread_mutex_t ssl_config_mutex = NULL;
-static long win32_ssl_create_mutex = 0;
-#endif
-#endif							/* ENABLE_THREAD_SAFETY */
-
-static PQsslKeyPassHook_OpenSSL_type PQsslKeyPassHook = NULL;
-static int	ssl_protocol_version_to_openssl(const char *protocol);
-
-/* ------------------------------------------------------------ */
-/*			 Procedures common to all secure sessions			*/
-/* ------------------------------------------------------------ */
-
-void
-pgtls_init_library(bool do_ssl, int do_crypto)
-{
-#ifdef ENABLE_THREAD_SAFETY
-
-	/*
-	 * Disallow changing the flags while we have open connections, else we'd
-	 * get completely confused.
-	 */
-	if (crypto_open_connections != 0)
-		return;
-#endif
-
-	pq_init_ssl_lib = do_ssl;
-	pq_init_crypto_lib = do_crypto;
-}
-
-PostgresPollingStatusType
-pgtls_open_client(PGconn *conn)
-{
-	/* First time through? */
-	if (conn->ssl == NULL)
-	{
-		/*
-		 * Create a connection-specific SSL object, and load client
-		 * certificate, private key, and trusted CA certs.
-		 */
-		if (initialize_SSL(conn) != 0)
-		{
-			/* initialize_SSL already put a message in conn->errorMessage */
-			pgtls_close(conn);
-			return PGRES_POLLING_FAILED;
-		}
-	}
-
-	/* Begin or continue the actual handshake */
-	return open_client_SSL(conn);
-}
-
-ssize_t
-pgtls_read(PGconn *conn, void *ptr, size_t len)
-{
-	ssize_t		n;
-	int			result_errno = 0;
-	char		sebuf[PG_STRERROR_R_BUFLEN];
-	int			err;
-	unsigned long ecode;
-
-rloop:
-
-	/*
-	 * Prepare to call SSL_get_error() by clearing thread's OpenSSL error
-	 * queue.  In general, the current thread's error queue must be empty
-	 * before the TLS/SSL I/O operation is attempted, or SSL_get_error() will
-	 * not work reliably.  Since the possibility exists that other OpenSSL
-	 * clients running in the same thread but not under our control will fail
-	 * to call ERR_get_error() themselves (after their own I/O operations),
-	 * pro-actively clear the per-thread error queue now.
-	 */
-	SOCK_ERRNO_SET(0);
-	ERR_clear_error();
-	n = SSL_read(conn->ssl, ptr, len);
-	err = SSL_get_error(conn->ssl, n);
-
-	/*
-	 * Other clients of OpenSSL may fail to call ERR_get_error(), but we
-	 * always do, so as to not cause problems for OpenSSL clients that don't
-	 * call ERR_clear_error() defensively.  Be sure that this happens by
-	 * calling now.  SSL_get_error() relies on the OpenSSL per-thread error
-	 * queue being intact, so this is the earliest possible point
-	 * ERR_get_error() may be called.
-	 */
-	ecode = (err != SSL_ERROR_NONE || n < 0) ? ERR_get_error() : 0;
-	switch (err)
-	{
-		case SSL_ERROR_NONE:
-			if (n < 0)
-			{
-				/* Not supposed to happen, so we don't translate the msg */
-				appendPQExpBufferStr(&conn->errorMessage,
-									 "SSL_read failed but did not provide error information\n");
-				/* assume the connection is broken */
-				result_errno = ECONNRESET;
-			}
-			break;
-		case SSL_ERROR_WANT_READ:
-			n = 0;
-			break;
-		case SSL_ERROR_WANT_WRITE:
-
-			/*
-			 * Returning 0 here would cause caller to wait for read-ready,
-			 * which is not correct since what SSL wants is wait for
-			 * write-ready.  The former could get us stuck in an infinite
-			 * wait, so don't risk it; busy-loop instead.
-			 */
-			goto rloop;
-		case SSL_ERROR_SYSCALL:
-			if (n < 0 && SOCK_ERRNO != 0)
-			{
-				result_errno = SOCK_ERRNO;
-				if (result_errno == EPIPE ||
-					result_errno == ECONNRESET)
-					libpq_append_conn_error(conn, "server closed the connection unexpectedly\n"
-											"\tThis probably means the server terminated abnormally\n"
-											"\tbefore or while processing the request.");
-				else
-					libpq_append_conn_error(conn, "SSL SYSCALL error: %s",
-											SOCK_STRERROR(result_errno,
-														  sebuf, sizeof(sebuf)));
-			}
-			else
-			{
-				libpq_append_conn_error(conn, "SSL SYSCALL error: EOF detected");
-				/* assume the connection is broken */
-				result_errno = ECONNRESET;
-				n = -1;
-			}
-			break;
-		case SSL_ERROR_SSL:
-			{
-				char	   *errm = SSLerrmessage(ecode);
-
-				libpq_append_conn_error(conn, "SSL error: %s", errm);
-				SSLerrfree(errm);
-				/* assume the connection is broken */
-				result_errno = ECONNRESET;
-				n = -1;
-				break;
-			}
-		case SSL_ERROR_ZERO_RETURN:
-
-			/*
-			 * Per OpenSSL documentation, this error code is only returned for
-			 * a clean connection closure, so we should not report it as a
-			 * server crash.
-			 */
-			libpq_append_conn_error(conn, "SSL connection has been closed unexpectedly");
-			result_errno = ECONNRESET;
-			n = -1;
-			break;
-		default:
-			libpq_append_conn_error(conn, "unrecognized SSL error code: %d", err);
-			/* assume the connection is broken */
-			result_errno = ECONNRESET;
-			n = -1;
-			break;
-	}
-
-	/* ensure we return the intended errno to caller */
-	SOCK_ERRNO_SET(result_errno);
-
-	return n;
-}
-
-bool
-pgtls_read_pending(PGconn *conn)
-{
-	return SSL_pending(conn->ssl) > 0;
-}
-
-ssize_t
-pgtls_write(PGconn *conn, const void *ptr, size_t len)
-{
-	ssize_t		n;
-	int			result_errno = 0;
-	char		sebuf[PG_STRERROR_R_BUFLEN];
-	int			err;
-	unsigned long ecode;
-
-	SOCK_ERRNO_SET(0);
-	ERR_clear_error();
-	n = SSL_write(conn->ssl, ptr, len);
-	err = SSL_get_error(conn->ssl, n);
-	ecode = (err != SSL_ERROR_NONE || n < 0) ? ERR_get_error() : 0;
-	switch (err)
-	{
-		case SSL_ERROR_NONE:
-			if (n < 0)
-			{
-				/* Not supposed to happen, so we don't translate the msg */
-				appendPQExpBufferStr(&conn->errorMessage,
-									 "SSL_write failed but did not provide error information\n");
-				/* assume the connection is broken */
-				result_errno = ECONNRESET;
-			}
-			break;
-		case SSL_ERROR_WANT_READ:
-
-			/*
-			 * Returning 0 here causes caller to wait for write-ready, which
-			 * is not really the right thing, but it's the best we can do.
-			 */
-			n = 0;
-			break;
-		case SSL_ERROR_WANT_WRITE:
-			n = 0;
-			break;
-		case SSL_ERROR_SYSCALL:
-
-			/*
-			 * If errno is still zero then assume it's a read EOF situation,
-			 * and report EOF.  (This seems possible because SSL_write can
-			 * also do reads.)
-			 */
-			if (n < 0 && SOCK_ERRNO != 0)
-			{
-				result_errno = SOCK_ERRNO;
-				if (result_errno == EPIPE || result_errno == ECONNRESET)
-					libpq_append_conn_error(conn, "server closed the connection unexpectedly\n"
-											"\tThis probably means the server terminated abnormally\n"
-											"\tbefore or while processing the request.");
-				else
-					libpq_append_conn_error(conn, "SSL SYSCALL error: %s",
-											SOCK_STRERROR(result_errno,
-														  sebuf, sizeof(sebuf)));
-			}
-			else
-			{
-				libpq_append_conn_error(conn, "SSL SYSCALL error: EOF detected");
-				/* assume the connection is broken */
-				result_errno = ECONNRESET;
-				n = -1;
-			}
-			break;
-		case SSL_ERROR_SSL:
-			{
-				char	   *errm = SSLerrmessage(ecode);
-
-				libpq_append_conn_error(conn, "SSL error: %s", errm);
-				SSLerrfree(errm);
-				/* assume the connection is broken */
-				result_errno = ECONNRESET;
-				n = -1;
-				break;
-			}
-		case SSL_ERROR_ZERO_RETURN:
-
-			/*
-			 * Per OpenSSL documentation, this error code is only returned for
-			 * a clean connection closure, so we should not report it as a
-			 * server crash.
-			 */
-			libpq_append_conn_error(conn, "SSL connection has been closed unexpectedly");
-			result_errno = ECONNRESET;
-			n = -1;
-			break;
-		default:
-			libpq_append_conn_error(conn, "unrecognized SSL error code: %d", err);
-			/* assume the connection is broken */
-			result_errno = ECONNRESET;
-			n = -1;
-			break;
-	}
-
-	/* ensure we return the intended errno to caller */
-	SOCK_ERRNO_SET(result_errno);
-
-	return n;
-}
-
-#if defined(HAVE_X509_GET_SIGNATURE_NID) || defined(HAVE_X509_GET_SIGNATURE_INFO)
-char *
-pgtls_get_peer_certificate_hash(PGconn *conn, size_t *len)
-{
-	X509	   *peer_cert;
-	const EVP_MD *algo_type;
-	unsigned char hash[EVP_MAX_MD_SIZE];	/* size for SHA-512 */
-	unsigned int hash_size;
-	int			algo_nid;
-	char	   *cert_hash;
-
-	*len = 0;
-
-	if (!conn->peer)
-		return NULL;
-
-	peer_cert = conn->peer;
-
-	/*
-	 * Get the signature algorithm of the certificate to determine the hash
-	 * algorithm to use for the result.  Prefer X509_get_signature_info(),
-	 * introduced in OpenSSL 1.1.1, which can handle RSA-PSS signatures.
-	 */
-#if HAVE_X509_GET_SIGNATURE_INFO
-	if (!X509_get_signature_info(peer_cert, &algo_nid, NULL, NULL, NULL))
-#else
-	if (!OBJ_find_sigid_algs(X509_get_signature_nid(peer_cert),
-							 &algo_nid, NULL))
-#endif
-	{
-		libpq_append_conn_error(conn, "could not determine server certificate signature algorithm");
-		return NULL;
-	}
-
-	/*
-	 * The TLS server's certificate bytes need to be hashed with SHA-256 if
-	 * its signature algorithm is MD5 or SHA-1 as per RFC 5929
-	 * (https://tools.ietf.org/html/rfc5929#section-4.1).  If something else
-	 * is used, the same hash as the signature algorithm is used.
-	 */
-	switch (algo_nid)
-	{
-		case NID_md5:
-		case NID_sha1:
-			algo_type = EVP_sha256();
-			break;
-		default:
-			algo_type = EVP_get_digestbynid(algo_nid);
-			if (algo_type == NULL)
-			{
-				libpq_append_conn_error(conn, "could not find digest for NID %s",
-										OBJ_nid2sn(algo_nid));
-				return NULL;
-			}
-			break;
-	}
-
-	if (!X509_digest(peer_cert, algo_type, hash, &hash_size))
-	{
-		libpq_append_conn_error(conn, "could not generate peer certificate hash");
-		return NULL;
-	}
-
-	/* save result */
-	cert_hash = malloc(hash_size);
-	if (cert_hash == NULL)
-	{
-		libpq_append_conn_error(conn, "out of memory");
-		return NULL;
-	}
-	memcpy(cert_hash, hash, hash_size);
-	*len = hash_size;
-
-	return cert_hash;
-}
-#endif							/* HAVE_X509_GET_SIGNATURE_NID */
-
-/* ------------------------------------------------------------ */
-/*						OpenSSL specific code					*/
-/* ------------------------------------------------------------ */
-
-/*
- *	Certificate verification callback
- *
- *	This callback allows us to log intermediate problems during
- *	verification, but there doesn't seem to be a clean way to get
- *	our PGconn * structure.  So we can't log anything!
- *
- *	This callback also allows us to override the default acceptance
- *	criteria (e.g., accepting self-signed or expired certs), but
- *	for now we accept the default checks.
- */
-static int
-verify_cb(int ok, X509_STORE_CTX *ctx)
-{
-	return ok;
-}
-
-#ifdef HAVE_SSL_CTX_SET_CERT_CB
-/*
- * Certificate selection callback
- *
- * This callback lets us choose the client certificate we send to the server
- * after seeing its CertificateRequest.  We only support sending a single
- * hard-coded certificate via sslcert, so we don't actually set any certificates
- * here; we just use it to record whether or not the server has actually asked
- * for one and whether we have one to send.
- */
-static int
-cert_cb(SSL *ssl, void *arg)
-{
-	PGconn	   *conn = arg;
-
-	conn->ssl_cert_requested = true;
-
-	/* Do we have a certificate loaded to send back? */
-	if (SSL_get_certificate(ssl))
-		conn->ssl_cert_sent = true;
-
-	/*
-	 * Tell OpenSSL that the callback succeeded; we're not required to
-	 * actually make any changes to the SSL handle.
-	 */
-	return 1;
-}
-#endif
-
-/*
- * OpenSSL-specific wrapper around
- * pq_verify_peer_name_matches_certificate_name(), converting the ASN1_STRING
- * into a plain C string.
- */
-static int
-openssl_verify_peer_name_matches_certificate_name(PGconn *conn, ASN1_STRING *name_entry,
-												  char **store_name)
-{
-	int			len;
-	const unsigned char *namedata;
-
-	/* Should not happen... */
-	if (name_entry == NULL)
-	{
-		libpq_append_conn_error(conn, "SSL certificate's name entry is missing");
-		return -1;
-	}
-
-	/*
-	 * GEN_DNS can be only IA5String, equivalent to US ASCII.
-	 */
-#ifdef HAVE_ASN1_STRING_GET0_DATA
-	namedata = ASN1_STRING_get0_data(name_entry);
-#else
-	namedata = ASN1_STRING_data(name_entry);
-#endif
-	len = ASN1_STRING_length(name_entry);
-
-	/* OK to cast from unsigned to plain char, since it's all ASCII. */
-	return pq_verify_peer_name_matches_certificate_name(conn, (const char *) namedata, len, store_name);
-}
-
-/*
- * OpenSSL-specific wrapper around
- * pq_verify_peer_name_matches_certificate_ip(), converting the
- * ASN1_OCTET_STRING into a plain C string.
- */
-static int
-openssl_verify_peer_name_matches_certificate_ip(PGconn *conn,
-												ASN1_OCTET_STRING *addr_entry,
-												char **store_name)
-{
-	int			len;
-	const unsigned char *addrdata;
-
-	/* Should not happen... */
-	if (addr_entry == NULL)
-	{
-		libpq_append_conn_error(conn, "SSL certificate's address entry is missing");
-		return -1;
-	}
-
-	/*
-	 * GEN_IPADD is an OCTET STRING containing an IP address in network byte
-	 * order.
-	 */
-#ifdef HAVE_ASN1_STRING_GET0_DATA
-	addrdata = ASN1_STRING_get0_data(addr_entry);
-#else
-	addrdata = ASN1_STRING_data(addr_entry);
-#endif
-	len = ASN1_STRING_length(addr_entry);
-
-	return pq_verify_peer_name_matches_certificate_ip(conn, addrdata, len, store_name);
-}
-
-static bool
-is_ip_address(const char *host)
-{
-	struct in_addr dummy4;
-#ifdef HAVE_INET_PTON
-	struct in6_addr dummy6;
-#endif
-
-	return inet_aton(host, &dummy4)
-#ifdef HAVE_INET_PTON
-		|| (inet_pton(AF_INET6, host, &dummy6) == 1)
-#endif
-		;
-}
-
-/*
- *	Verify that the server certificate matches the hostname we connected to.
- *
- * The certificate's Common Name and Subject Alternative Names are considered.
- */
-int
-pgtls_verify_peer_name_matches_certificate_guts(PGconn *conn,
-												int *names_examined,
-												char **first_name)
-{
-	STACK_OF(GENERAL_NAME) * peer_san;
-	int			i;
-	int			rc = 0;
-	char	   *host = conn->connhost[conn->whichhost].host;
-	int			host_type;
-	bool		check_cn = true;
-
-	Assert(host && host[0]);	/* should be guaranteed by caller */
-
-	/*
-	 * We try to match the NSS behavior here, which is a slight departure from
-	 * the spec but seems to make more intuitive sense:
-	 *
-	 * If connhost contains a DNS name, and the certificate's SANs contain any
-	 * dNSName entries, then we'll ignore the Subject Common Name entirely;
-	 * otherwise, we fall back to checking the CN. (This behavior matches the
-	 * RFC.)
-	 *
-	 * If connhost contains an IP address, and the SANs contain iPAddress
-	 * entries, we again ignore the CN. Otherwise, we allow the CN to match,
-	 * EVEN IF there is a dNSName in the SANs. (RFC 6125 prohibits this: "A
-	 * client MUST NOT seek a match for a reference identifier of CN-ID if the
-	 * presented identifiers include a DNS-ID, SRV-ID, URI-ID, or any
-	 * application-specific identifier types supported by the client.")
-	 *
-	 * NOTE: Prior versions of libpq did not consider iPAddress entries at
-	 * all, so this new behavior might break a certificate that has different
-	 * IP addresses in the Subject CN and the SANs.
-	 */
-	if (is_ip_address(host))
-		host_type = GEN_IPADD;
-	else
-		host_type = GEN_DNS;
-
-	/*
-	 * First, get the Subject Alternative Names (SANs) from the certificate,
-	 * and compare them against the originally given hostname.
-	 */
-	peer_san = (STACK_OF(GENERAL_NAME) *)
-		X509_get_ext_d2i(conn->peer, NID_subject_alt_name, NULL, NULL);
-
-	if (peer_san)
-	{
-		int			san_len = sk_GENERAL_NAME_num(peer_san);
-
-		for (i = 0; i < san_len; i++)
-		{
-			const GENERAL_NAME *name = sk_GENERAL_NAME_value(peer_san, i);
-			char	   *alt_name = NULL;
-
-			if (name->type == host_type)
-			{
-				/*
-				 * This SAN is of the same type (IP or DNS) as our host name,
-				 * so don't allow a fallback check of the CN.
-				 */
-				check_cn = false;
-			}
-
-			if (name->type == GEN_DNS)
-			{
-				(*names_examined)++;
-				rc = openssl_verify_peer_name_matches_certificate_name(conn,
-																	   name->d.dNSName,
-																	   &alt_name);
-			}
-			else if (name->type == GEN_IPADD)
-			{
-				(*names_examined)++;
-				rc = openssl_verify_peer_name_matches_certificate_ip(conn,
-																	 name->d.iPAddress,
-																	 &alt_name);
-			}
-
-			if (alt_name)
-			{
-				if (!*first_name)
-					*first_name = alt_name;
-				else
-					free(alt_name);
-			}
-
-			if (rc != 0)
-			{
-				/*
-				 * Either we hit an error or a match, and either way we should
-				 * not fall back to the CN.
-				 */
-				check_cn = false;
-				break;
-			}
-		}
-		sk_GENERAL_NAME_pop_free(peer_san, GENERAL_NAME_free);
-	}
-
-	/*
-	 * If there is no subjectAltName extension of the matching type, check the
-	 * Common Name.
-	 *
-	 * (Per RFC 2818 and RFC 6125, if the subjectAltName extension of type
-	 * dNSName is present, the CN must be ignored. We break this rule if host
-	 * is an IP address; see the comment above.)
-	 */
-	if (check_cn)
-	{
-		X509_NAME  *subject_name;
-
-		subject_name = X509_get_subject_name(conn->peer);
-		if (subject_name != NULL)
-		{
-			int			cn_index;
-
-			cn_index = X509_NAME_get_index_by_NID(subject_name,
-												  NID_commonName, -1);
-			if (cn_index >= 0)
-			{
-				char	   *common_name = NULL;
-
-				(*names_examined)++;
-				rc = openssl_verify_peer_name_matches_certificate_name(conn,
-																	   X509_NAME_ENTRY_get_data(X509_NAME_get_entry(subject_name, cn_index)),
-																	   &common_name);
-
-				if (common_name)
-				{
-					if (!*first_name)
-						*first_name = common_name;
-					else
-						free(common_name);
-				}
-			}
-		}
-	}
-
-	return rc;
-}
-
-#if defined(ENABLE_THREAD_SAFETY) && defined(HAVE_CRYPTO_LOCK)
-/*
- *	Callback functions for OpenSSL internal locking.  (OpenSSL 1.1.0
- *	does its own locking, and doesn't need these anymore.  The
- *	CRYPTO_lock() function was removed in 1.1.0, when the callbacks
- *	were made obsolete, so we assume that if CRYPTO_lock() exists,
- *	the callbacks are still required.)
- */
-
-static unsigned long
-pq_threadidcallback(void)
-{
-	/*
-	 * This is not standards-compliant.  pthread_self() returns pthread_t, and
-	 * shouldn't be cast to unsigned long, but CRYPTO_set_id_callback requires
-	 * it, so we have to do it.
-	 */
-	return (unsigned long) pthread_self();
-}
-
-static pthread_mutex_t *pq_lockarray;
-
-static void
-pq_lockingcallback(int mode, int n, const char *file, int line)
-{
-	/*
-	 * There's no way to report a mutex-primitive failure, so we just Assert
-	 * in development builds, and ignore any errors otherwise.  Fortunately
-	 * this is all obsolete in modern OpenSSL.
-	 */
-	if (mode & CRYPTO_LOCK)
-	{
-		if (pthread_mutex_lock(&pq_lockarray[n]))
-			Assert(false);
-	}
-	else
-	{
-		if (pthread_mutex_unlock(&pq_lockarray[n]))
-			Assert(false);
-	}
-}
-#endif							/* ENABLE_THREAD_SAFETY && HAVE_CRYPTO_LOCK */
-
-/*
- * Initialize SSL library.
- *
- * In threadsafe mode, this includes setting up libcrypto callback functions
- * to do thread locking.
- *
- * If the caller has told us (through PQinitOpenSSL) that he's taking care
- * of libcrypto, we expect that callbacks are already set, and won't try to
- * override it.
- */
-int
-pgtls_init(PGconn *conn, bool do_ssl, bool do_crypto)
-{
-#ifdef ENABLE_THREAD_SAFETY
-#ifdef WIN32
-	/* Also see similar code in fe-connect.c, default_threadlock() */
-	if (ssl_config_mutex == NULL)
-	{
-		while (InterlockedExchange(&win32_ssl_create_mutex, 1) == 1)
-			 /* loop, another thread own the lock */ ;
-		if (ssl_config_mutex == NULL)
-		{
-			if (pthread_mutex_init(&ssl_config_mutex, NULL))
-				return -1;
-		}
-		InterlockedExchange(&win32_ssl_create_mutex, 0);
-	}
-#endif
-	if (pthread_mutex_lock(&ssl_config_mutex))
-		return -1;
-
-#ifdef HAVE_CRYPTO_LOCK
-	if (pq_init_crypto_lib)
-	{
-		/*
-		 * If necessary, set up an array to hold locks for libcrypto.
-		 * libcrypto will tell us how big to make this array.
-		 */
-		if (pq_lockarray == NULL)
-		{
-			int			i;
-
-			pq_lockarray = malloc(sizeof(pthread_mutex_t) * CRYPTO_num_locks());
-			if (!pq_lockarray)
-			{
-				pthread_mutex_unlock(&ssl_config_mutex);
-				return -1;
-			}
-			for (i = 0; i < CRYPTO_num_locks(); i++)
-			{
-				if (pthread_mutex_init(&pq_lockarray[i], NULL))
-				{
-					free(pq_lockarray);
-					pq_lockarray = NULL;
-					pthread_mutex_unlock(&ssl_config_mutex);
-					return -1;
-				}
-			}
-		}
-
-		if (do_crypto && !conn->crypto_loaded)
-		{
-			if (crypto_open_connections++ == 0)
-			{
-				/*
-				 * These are only required for threaded libcrypto
-				 * applications, but make sure we don't stomp on them if
-				 * they're already set.
-				 */
-				if (CRYPTO_get_id_callback() == NULL)
-					CRYPTO_set_id_callback(pq_threadidcallback);
-				if (CRYPTO_get_locking_callback() == NULL)
-					CRYPTO_set_locking_callback(pq_lockingcallback);
-			}
-
-			conn->crypto_loaded = true;
-		}
-	}
-#endif							/* HAVE_CRYPTO_LOCK */
-#endif							/* ENABLE_THREAD_SAFETY */
-
-	if (!ssl_lib_initialized && do_ssl)
-	{
-		if (pq_init_ssl_lib)
-		{
-#ifdef HAVE_OPENSSL_INIT_SSL
-			OPENSSL_init_ssl(OPENSSL_INIT_LOAD_CONFIG, NULL);
-#else
-			OPENSSL_config(NULL);
-			SSL_library_init();
-			SSL_load_error_strings();
-#endif
-		}
-		ssl_lib_initialized = true;
-	}
-
-#ifdef ENABLE_THREAD_SAFETY
-	pthread_mutex_unlock(&ssl_config_mutex);
-#endif
-	return 0;
-}
-
-/*
- *	This function is needed because if the libpq library is unloaded
- *	from the application, the callback functions will no longer exist when
- *	libcrypto is used by other parts of the system.  For this reason,
- *	we unregister the callback functions when the last libpq
- *	connection is closed.  (The same would apply for OpenSSL callbacks
- *	if we had any.)
- *
- *	Callbacks are only set when we're compiled in threadsafe mode, so
- *	we only need to remove them in this case. They are also not needed
- *	with OpenSSL 1.1.0 anymore.
- */
-static void
-destroy_ssl_system(void)
-{
-#if defined(ENABLE_THREAD_SAFETY) && defined(HAVE_CRYPTO_LOCK)
-	/* Mutex is created in pgtls_init() */
-	if (pthread_mutex_lock(&ssl_config_mutex))
-		return;
-
-	if (pq_init_crypto_lib && crypto_open_connections > 0)
-		--crypto_open_connections;
-
-	if (pq_init_crypto_lib && crypto_open_connections == 0)
-	{
-		/*
-		 * No connections left, unregister libcrypto callbacks, if no one
-		 * registered different ones in the meantime.
-		 */
-		if (CRYPTO_get_locking_callback() == pq_lockingcallback)
-			CRYPTO_set_locking_callback(NULL);
-		if (CRYPTO_get_id_callback() == pq_threadidcallback)
-			CRYPTO_set_id_callback(NULL);
-
-		/*
-		 * We don't free the lock array. If we get another connection in this
-		 * process, we will just re-use them with the existing mutexes.
-		 *
-		 * This means we leak a little memory on repeated load/unload of the
-		 * library.
-		 */
-	}
-
-	pthread_mutex_unlock(&ssl_config_mutex);
-#endif
-}
-
-/*
- *	Create per-connection SSL object, and load the client certificate,
- *	private key, and trusted CA certs.
- *
- *	Returns 0 if OK, -1 on failure (with a message in conn->errorMessage).
- */
-static int
-initialize_SSL(PGconn *conn)
-{
-	SSL_CTX    *SSL_context;
-	struct stat buf;
-	char		homedir[MAXPGPATH];
-	char		fnbuf[MAXPGPATH];
-	char		sebuf[PG_STRERROR_R_BUFLEN];
-	bool		have_homedir;
-	bool		have_cert;
-	bool		have_rootcert;
-	EVP_PKEY   *pkey = NULL;
-
-	/*
-	 * We'll need the home directory if any of the relevant parameters are
-	 * defaulted.  If pqGetHomeDirectory fails, act as though none of the
-	 * files could be found.
-	 */
-	if (!(conn->sslcert && strlen(conn->sslcert) > 0) ||
-		!(conn->sslkey && strlen(conn->sslkey) > 0) ||
-		!(conn->sslrootcert && strlen(conn->sslrootcert) > 0) ||
-		!((conn->sslcrl && strlen(conn->sslcrl) > 0) ||
-		  (conn->sslcrldir && strlen(conn->sslcrldir) > 0)))
-		have_homedir = pqGetHomeDirectory(homedir, sizeof(homedir));
-	else						/* won't need it */
-		have_homedir = false;
-
-	/*
-	 * Create a new SSL_CTX object.
-	 *
-	 * We used to share a single SSL_CTX between all connections, but it was
-	 * complicated if connections used different certificates. So now we
-	 * create a separate context for each connection, and accept the overhead.
-	 */
-	SSL_context = SSL_CTX_new(SSLv23_method());
-	if (!SSL_context)
-	{
-		char	   *err = SSLerrmessage(ERR_get_error());
-
-		libpq_append_conn_error(conn, "could not create SSL context: %s", err);
-		SSLerrfree(err);
-		return -1;
-	}
-
-	/*
-	 * Delegate the client cert password prompt to the libpq wrapper callback
-	 * if any is defined.
-	 *
-	 * If the application hasn't installed its own and the sslpassword
-	 * parameter is non-null, we install ours now to make sure we supply
-	 * PGconn->sslpassword to OpenSSL instead of letting it prompt on stdin.
-	 *
-	 * This will replace OpenSSL's default PEM_def_callback (which prompts on
-	 * stdin), but we're only setting it for this SSL context so it's
-	 * harmless.
-	 */
-	if (PQsslKeyPassHook
-		|| (conn->sslpassword && strlen(conn->sslpassword) > 0))
-	{
-		SSL_CTX_set_default_passwd_cb(SSL_context, PQssl_passwd_cb);
-		SSL_CTX_set_default_passwd_cb_userdata(SSL_context, conn);
-	}
-
-#ifdef HAVE_SSL_CTX_SET_CERT_CB
-	/* Set up a certificate selection callback. */
-	SSL_CTX_set_cert_cb(SSL_context, cert_cb, conn);
-#endif
-
-	/* Disable old protocol versions */
-	SSL_CTX_set_options(SSL_context, SSL_OP_NO_SSLv2 | SSL_OP_NO_SSLv3);
-
-	/* Set the minimum and maximum protocol versions if necessary */
-	if (conn->ssl_min_protocol_version &&
-		strlen(conn->ssl_min_protocol_version) != 0)
-	{
-		int			ssl_min_ver;
-
-		ssl_min_ver = ssl_protocol_version_to_openssl(conn->ssl_min_protocol_version);
-
-		if (ssl_min_ver == -1)
-		{
-			libpq_append_conn_error(conn, "invalid value \"%s\" for minimum SSL protocol version",
-									conn->ssl_min_protocol_version);
-			SSL_CTX_free(SSL_context);
-			return -1;
-		}
-
-		if (!SSL_CTX_set_min_proto_version(SSL_context, ssl_min_ver))
-		{
-			char	   *err = SSLerrmessage(ERR_get_error());
-
-			libpq_append_conn_error(conn, "could not set minimum SSL protocol version: %s", err);
-			SSLerrfree(err);
-			SSL_CTX_free(SSL_context);
-			return -1;
-		}
-	}
-
-	if (conn->ssl_max_protocol_version &&
-		strlen(conn->ssl_max_protocol_version) != 0)
-	{
-		int			ssl_max_ver;
-
-		ssl_max_ver = ssl_protocol_version_to_openssl(conn->ssl_max_protocol_version);
-
-		if (ssl_max_ver == -1)
-		{
-			libpq_append_conn_error(conn, "invalid value \"%s\" for maximum SSL protocol version",
-									conn->ssl_max_protocol_version);
-			SSL_CTX_free(SSL_context);
-			return -1;
-		}
-
-		if (!SSL_CTX_set_max_proto_version(SSL_context, ssl_max_ver))
-		{
-			char	   *err = SSLerrmessage(ERR_get_error());
-
-			libpq_append_conn_error(conn, "could not set maximum SSL protocol version: %s", err);
-			SSLerrfree(err);
-			SSL_CTX_free(SSL_context);
-			return -1;
-		}
-	}
-
-	/*
-	 * Disable OpenSSL's moving-write-buffer sanity check, because it causes
-	 * unnecessary failures in nonblocking send cases.
-	 */
-	SSL_CTX_set_mode(SSL_context, SSL_MODE_ACCEPT_MOVING_WRITE_BUFFER);
-
-	/*
-	 * If the root cert file exists, load it so we can perform certificate
-	 * verification. If sslmode is "verify-full" we will also do further
-	 * verification after the connection has been completed.
-	 */
-	if (conn->sslrootcert && strlen(conn->sslrootcert) > 0)
-		strlcpy(fnbuf, conn->sslrootcert, sizeof(fnbuf));
-	else if (have_homedir)
-		snprintf(fnbuf, sizeof(fnbuf), "%s/%s", homedir, ROOT_CERT_FILE);
-	else
-		fnbuf[0] = '\0';
-
-	if (strcmp(fnbuf, "system") == 0)
-	{
-		/*
-		 * The "system" sentinel value indicates that we should load whatever
-		 * root certificates are installed for use by OpenSSL; these locations
-		 * differ by platform. Note that the default system locations may be
-		 * further overridden by the SSL_CERT_DIR and SSL_CERT_FILE
-		 * environment variables.
-		 */
-		if (SSL_CTX_set_default_verify_paths(SSL_context) != 1)
-		{
-			char	   *err = SSLerrmessage(ERR_get_error());
-
-			libpq_append_conn_error(conn, "could not load system root certificate paths: %s",
-									err);
-			SSLerrfree(err);
-			SSL_CTX_free(SSL_context);
-			return -1;
-		}
-		have_rootcert = true;
-	}
-	else if (fnbuf[0] != '\0' &&
-			 stat(fnbuf, &buf) == 0)
-	{
-		X509_STORE *cvstore;
-
-		if (SSL_CTX_load_verify_locations(SSL_context, fnbuf, NULL) != 1)
-		{
-			char	   *err = SSLerrmessage(ERR_get_error());
-
-			libpq_append_conn_error(conn, "could not read root certificate file \"%s\": %s",
-									fnbuf, err);
-			SSLerrfree(err);
-			SSL_CTX_free(SSL_context);
-			return -1;
-		}
-
-		if ((cvstore = SSL_CTX_get_cert_store(SSL_context)) != NULL)
-		{
-			char	   *fname = NULL;
-			char	   *dname = NULL;
-
-			if (conn->sslcrl && strlen(conn->sslcrl) > 0)
-				fname = conn->sslcrl;
-			if (conn->sslcrldir && strlen(conn->sslcrldir) > 0)
-				dname = conn->sslcrldir;
-
-			/* defaults to use the default CRL file */
-			if (!fname && !dname && have_homedir)
-			{
-				snprintf(fnbuf, sizeof(fnbuf), "%s/%s", homedir, ROOT_CRL_FILE);
-				fname = fnbuf;
-			}
-
-			/* Set the flags to check against the complete CRL chain */
-			if ((fname || dname) &&
-				X509_STORE_load_locations(cvstore, fname, dname) == 1)
-			{
-				X509_STORE_set_flags(cvstore,
-									 X509_V_FLAG_CRL_CHECK | X509_V_FLAG_CRL_CHECK_ALL);
-			}
-
-			/* if not found, silently ignore;  we do not require CRL */
-			ERR_clear_error();
-		}
-		have_rootcert = true;
-	}
-	else
-	{
-		/*
-		 * stat() failed; assume root file doesn't exist.  If sslmode is
-		 * verify-ca or verify-full, this is an error.  Otherwise, continue
-		 * without performing any server cert verification.
-		 */
-		if (conn->sslmode[0] == 'v')	/* "verify-ca" or "verify-full" */
-		{
-			/*
-			 * The only way to reach here with an empty filename is if
-			 * pqGetHomeDirectory failed.  That's a sufficiently unusual case
-			 * that it seems worth having a specialized error message for it.
-			 */
-			if (fnbuf[0] == '\0')
-				libpq_append_conn_error(conn, "could not get home directory to locate root certificate file\n"
-										"Either provide the file, use the system's trusted roots with sslrootcert=system, or change sslmode to disable server certificate verification.");
-			else
-				libpq_append_conn_error(conn, "root certificate file \"%s\" does not exist\n"
-										"Either provide the file, use the system's trusted roots with sslrootcert=system, or change sslmode to disable server certificate verification.", fnbuf);
-			SSL_CTX_free(SSL_context);
-			return -1;
-		}
-		have_rootcert = false;
-	}
-
-	/* Read the client certificate file */
-	if (conn->sslcert && strlen(conn->sslcert) > 0)
-		strlcpy(fnbuf, conn->sslcert, sizeof(fnbuf));
-	else if (have_homedir)
-		snprintf(fnbuf, sizeof(fnbuf), "%s/%s", homedir, USER_CERT_FILE);
-	else
-		fnbuf[0] = '\0';
-
-	if (conn->sslcertmode[0] == 'd')	/* disable */
-	{
-		/* don't send a client cert even if we have one */
-		have_cert = false;
-	}
-	else if (fnbuf[0] == '\0')
-	{
-		/* no home directory, proceed without a client cert */
-		have_cert = false;
-	}
-	else if (stat(fnbuf, &buf) != 0)
-	{
-		/*
-		 * If file is not present, just go on without a client cert; server
-		 * might or might not accept the connection.  Any other error,
-		 * however, is grounds for complaint.
-		 */
-		if (errno != ENOENT && errno != ENOTDIR)
-		{
-			libpq_append_conn_error(conn, "could not open certificate file \"%s\": %s",
-									fnbuf, strerror_r(errno, sebuf, sizeof(sebuf)));
-			SSL_CTX_free(SSL_context);
-			return -1;
-		}
-		have_cert = false;
-	}
-	else
-	{
-		/*
-		 * Cert file exists, so load it. Since OpenSSL doesn't provide the
-		 * equivalent of "SSL_use_certificate_chain_file", we have to load it
-		 * into the SSL context, rather than the SSL object.
-		 */
-		if (SSL_CTX_use_certificate_chain_file(SSL_context, fnbuf) != 1)
-		{
-			char	   *err = SSLerrmessage(ERR_get_error());
-
-			libpq_append_conn_error(conn, "could not read certificate file \"%s\": %s",
-									fnbuf, err);
-			SSLerrfree(err);
-			SSL_CTX_free(SSL_context);
-			return -1;
-		}
-
-		/* need to load the associated private key, too */
-		have_cert = true;
-	}
-
-	/*
-	 * The SSL context is now loaded with the correct root and client
-	 * certificates. Create a connection-specific SSL object. The private key
-	 * is loaded directly into the SSL object. (We could load the private key
-	 * into the context, too, but we have done it this way historically, and
-	 * it doesn't really matter.)
-	 */
-	if (!(conn->ssl = SSL_new(SSL_context)) ||
-		!SSL_set_app_data(conn->ssl, conn) ||
-		!my_SSL_set_fd(conn, conn->sock))
-	{
-		char	   *err = SSLerrmessage(ERR_get_error());
-
-		libpq_append_conn_error(conn, "could not establish SSL connection: %s", err);
-		SSLerrfree(err);
-		SSL_CTX_free(SSL_context);
-		return -1;
-	}
-	conn->ssl_in_use = true;
-
-	/*
-	 * SSL contexts are reference counted by OpenSSL. We can free it as soon
-	 * as we have created the SSL object, and it will stick around for as long
-	 * as it's actually needed.
-	 */
-	SSL_CTX_free(SSL_context);
-	SSL_context = NULL;
-
-	/*
-	 * Set Server Name Indication (SNI), if enabled by connection parameters.
-	 * Per RFC 6066, do not set it if the host is a literal IP address (IPv4
-	 * or IPv6).
-	 */
-	if (conn->sslsni && conn->sslsni[0] == '1')
-	{
-		const char *host = conn->connhost[conn->whichhost].host;
-
-		if (host && host[0] &&
-			!(strspn(host, "0123456789.") == strlen(host) ||
-			  strchr(host, ':')))
-		{
-			if (SSL_set_tlsext_host_name(conn->ssl, host) != 1)
-			{
-				char	   *err = SSLerrmessage(ERR_get_error());
-
-				libpq_append_conn_error(conn, "could not set SSL Server Name Indication (SNI): %s", err);
-				SSLerrfree(err);
-				return -1;
-			}
-		}
-	}
-
-	/*
-	 * Read the SSL key. If a key is specified, treat it as an engine:key
-	 * combination if there is colon present - we don't support files with
-	 * colon in the name. The exception is if the second character is a colon,
-	 * in which case it can be a Windows filename with drive specification.
-	 */
-	if (have_cert && conn->sslkey && strlen(conn->sslkey) > 0)
-	{
-#ifdef USE_SSL_ENGINE
-		if (strchr(conn->sslkey, ':')
-#ifdef WIN32
-			&& conn->sslkey[1] != ':'
-#endif
-			)
-		{
-			/* Colon, but not in second character, treat as engine:key */
-			char	   *engine_str = strdup(conn->sslkey);
-			char	   *engine_colon;
-
-			if (engine_str == NULL)
-			{
-				libpq_append_conn_error(conn, "out of memory");
-				return -1;
-			}
-
-			/* cannot return NULL because we already checked before strdup */
-			engine_colon = strchr(engine_str, ':');
-
-			*engine_colon = '\0';	/* engine_str now has engine name */
-			engine_colon++;		/* engine_colon now has key name */
-
-			conn->engine = ENGINE_by_id(engine_str);
-			if (conn->engine == NULL)
-			{
-				char	   *err = SSLerrmessage(ERR_get_error());
-
-				libpq_append_conn_error(conn, "could not load SSL engine \"%s\": %s",
-										engine_str, err);
-				SSLerrfree(err);
-				free(engine_str);
-				return -1;
-			}
-
-			if (ENGINE_init(conn->engine) == 0)
-			{
-				char	   *err = SSLerrmessage(ERR_get_error());
-
-				libpq_append_conn_error(conn, "could not initialize SSL engine \"%s\": %s",
-										engine_str, err);
-				SSLerrfree(err);
-				ENGINE_free(conn->engine);
-				conn->engine = NULL;
-				free(engine_str);
-				return -1;
-			}
-
-			pkey = ENGINE_load_private_key(conn->engine, engine_colon,
-										   NULL, NULL);
-			if (pkey == NULL)
-			{
-				char	   *err = SSLerrmessage(ERR_get_error());
-
-				libpq_append_conn_error(conn, "could not read private SSL key \"%s\" from engine \"%s\": %s",
-										engine_colon, engine_str, err);
-				SSLerrfree(err);
-				ENGINE_finish(conn->engine);
-				ENGINE_free(conn->engine);
-				conn->engine = NULL;
-				free(engine_str);
-				return -1;
-			}
-			if (SSL_use_PrivateKey(conn->ssl, pkey) != 1)
-			{
-				char	   *err = SSLerrmessage(ERR_get_error());
-
-				libpq_append_conn_error(conn, "could not load private SSL key \"%s\" from engine \"%s\": %s",
-										engine_colon, engine_str, err);
-				SSLerrfree(err);
-				ENGINE_finish(conn->engine);
-				ENGINE_free(conn->engine);
-				conn->engine = NULL;
-				free(engine_str);
-				return -1;
-			}
-
-			free(engine_str);
-
-			fnbuf[0] = '\0';	/* indicate we're not going to load from a
-								 * file */
-		}
-		else
-#endif							/* USE_SSL_ENGINE */
-		{
-			/* PGSSLKEY is not an engine, treat it as a filename */
-			strlcpy(fnbuf, conn->sslkey, sizeof(fnbuf));
-		}
-	}
-	else if (have_homedir)
-	{
-		/* No PGSSLKEY specified, load default file */
-		snprintf(fnbuf, sizeof(fnbuf), "%s/%s", homedir, USER_KEY_FILE);
-	}
-	else
-		fnbuf[0] = '\0';
-
-	if (have_cert && fnbuf[0] != '\0')
-	{
-		/* read the client key from file */
-
-		if (stat(fnbuf, &buf) != 0)
-		{
-			if (errno == ENOENT)
-				libpq_append_conn_error(conn, "certificate present, but not private key file \"%s\"",
-										fnbuf);
-			else
-				libpq_append_conn_error(conn, "could not stat private key file \"%s\": %m",
-										fnbuf);
-			return -1;
-		}
-
-		/* Key file must be a regular file */
-		if (!S_ISREG(buf.st_mode))
-		{
-			libpq_append_conn_error(conn, "private key file \"%s\" is not a regular file",
-									fnbuf);
-			return -1;
-		}
-
-		/*
-		 * Refuse to load world-readable key files.  We accept root-owned
-		 * files with mode 0640 or less, so that we can access system-wide
-		 * certificates if we have a supplementary group membership that
-		 * allows us to read 'em.  For files with non-root ownership, require
-		 * mode 0600 or less.  We need not check the file's ownership exactly;
-		 * if we're able to read it despite it having such restrictive
-		 * permissions, it must have the right ownership.
-		 *
-		 * Note: be very careful about tightening these rules.  Some people
-		 * expect, for example, that a client process running as root should
-		 * be able to use a non-root-owned key file.
-		 *
-		 * Note that roughly similar checks are performed in
-		 * src/backend/libpq/be-secure-common.c so any changes here may need
-		 * to be made there as well.  However, this code caters for the case
-		 * of current user == root, while that code does not.
-		 *
-		 * Ideally we would do similar permissions checks on Windows, but it
-		 * is not clear how that would work since Unix-style permissions may
-		 * not be available.
-		 */
-#if !defined(WIN32) && !defined(__CYGWIN__)
-		if (buf.st_uid == 0 ?
-			buf.st_mode & (S_IWGRP | S_IXGRP | S_IRWXO) :
-			buf.st_mode & (S_IRWXG | S_IRWXO))
-		{
-			libpq_append_conn_error(conn,
-									"private key file \"%s\" has group or world access; file must have permissions u=rw (0600) or less if owned by the current user, or permissions u=rw,g=r (0640) or less if owned by root",
-									fnbuf);
-			return -1;
-		}
-#endif
-
-		if (SSL_use_PrivateKey_file(conn->ssl, fnbuf, SSL_FILETYPE_PEM) != 1)
-		{
-			char	   *err = SSLerrmessage(ERR_get_error());
-
-			/*
-			 * We'll try to load the file in DER (binary ASN.1) format, and if
-			 * that fails too, report the original error. This could mask
-			 * issues where there's something wrong with a DER-format cert,
-			 * but we'd have to duplicate openssl's format detection to be
-			 * smarter than this. We can't just probe for a leading -----BEGIN
-			 * because PEM can have leading non-matching lines and blanks.
-			 * OpenSSL doesn't expose its get_name(...) and its PEM routines
-			 * don't differentiate between failure modes in enough detail to
-			 * let us tell the difference between "not PEM, try DER" and
-			 * "wrong password".
-			 */
-			if (SSL_use_PrivateKey_file(conn->ssl, fnbuf, SSL_FILETYPE_ASN1) != 1)
-			{
-				libpq_append_conn_error(conn, "could not load private key file \"%s\": %s",
-										fnbuf, err);
-				SSLerrfree(err);
-				return -1;
-			}
-
-			SSLerrfree(err);
-		}
-	}
-
-	/* verify that the cert and key go together */
-	if (have_cert &&
-		SSL_check_private_key(conn->ssl) != 1)
-	{
-		char	   *err = SSLerrmessage(ERR_get_error());
-
-		libpq_append_conn_error(conn, "certificate does not match private key file \"%s\": %s",
-								fnbuf, err);
-		SSLerrfree(err);
-		return -1;
-	}
-
-	/*
-	 * If a root cert was loaded, also set our certificate verification
-	 * callback.
-	 */
-	if (have_rootcert)
-		SSL_set_verify(conn->ssl, SSL_VERIFY_PEER, verify_cb);
-
-	/*
-	 * Set compression option if necessary.
-	 */
-	if (conn->sslcompression && conn->sslcompression[0] == '0')
-		SSL_set_options(conn->ssl, SSL_OP_NO_COMPRESSION);
-	else
-		SSL_clear_options(conn->ssl, SSL_OP_NO_COMPRESSION);
-
-	return 0;
-}
-
-/*
- *	Attempt to negotiate SSL connection.
- */
-static PostgresPollingStatusType
-open_client_SSL(PGconn *conn)
-{
-	int			r;
-
-	SOCK_ERRNO_SET(0);
-	ERR_clear_error();
-	r = SSL_connect(conn->ssl);
-	if (r <= 0)
-	{
-		int			save_errno = SOCK_ERRNO;
-		int			err = SSL_get_error(conn->ssl, r);
-		unsigned long ecode;
-
-		ecode = ERR_get_error();
-		switch (err)
-		{
-			case SSL_ERROR_WANT_READ:
-				return PGRES_POLLING_READING;
-
-			case SSL_ERROR_WANT_WRITE:
-				return PGRES_POLLING_WRITING;
-
-			case SSL_ERROR_SYSCALL:
-				{
-					char		sebuf[PG_STRERROR_R_BUFLEN];
-					unsigned long vcode;
-
-					vcode = SSL_get_verify_result(conn->ssl);
-
-					/*
-					 * If we get an X509 error here for failing to load the
-					 * local issuer cert, without an error in the socket layer
-					 * it means that verification failed due to a missing
-					 * system CA pool without it being a protocol error. We
-					 * inspect the sslrootcert setting to ensure that the user
-					 * was using the system CA pool. For other errors, log
-					 * them using the normal SYSCALL logging.
-					 */
-					if (save_errno == 0 &&
-						vcode == X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT_LOCALLY &&
-						strcmp(conn->sslrootcert, "system") == 0)
-						libpq_append_conn_error(conn, "SSL error: certificate verify failed: %s",
-												X509_verify_cert_error_string(vcode));
-					else if (r == -1 && save_errno != 0)
-						libpq_append_conn_error(conn, "SSL SYSCALL error: %s",
-												SOCK_STRERROR(save_errno, sebuf, sizeof(sebuf)));
-					else
-						libpq_append_conn_error(conn, "SSL SYSCALL error: EOF detected");
-					pgtls_close(conn);
-					return PGRES_POLLING_FAILED;
-				}
-			case SSL_ERROR_SSL:
-				{
-					char	   *err = SSLerrmessage(ecode);
-
-					libpq_append_conn_error(conn, "SSL error: %s", err);
-					SSLerrfree(err);
-					switch (ERR_GET_REASON(ecode))
-					{
-							/*
-							 * UNSUPPORTED_PROTOCOL, WRONG_VERSION_NUMBER, and
-							 * TLSV1_ALERT_PROTOCOL_VERSION have been observed
-							 * when trying to communicate with an old OpenSSL
-							 * library, or when the client and server specify
-							 * disjoint protocol ranges.
-							 * NO_PROTOCOLS_AVAILABLE occurs if there's a
-							 * local misconfiguration (which can happen
-							 * despite our checks, if openssl.cnf injects a
-							 * limit we didn't account for).  It's not very
-							 * clear what would make OpenSSL return the other
-							 * codes listed here, but a hint about protocol
-							 * versions seems like it's appropriate for all.
-							 */
-						case SSL_R_NO_PROTOCOLS_AVAILABLE:
-						case SSL_R_UNSUPPORTED_PROTOCOL:
-						case SSL_R_BAD_PROTOCOL_VERSION_NUMBER:
-						case SSL_R_UNKNOWN_PROTOCOL:
-						case SSL_R_UNKNOWN_SSL_VERSION:
-						case SSL_R_UNSUPPORTED_SSL_VERSION:
-						case SSL_R_WRONG_SSL_VERSION:
-						case SSL_R_WRONG_VERSION_NUMBER:
-						case SSL_R_TLSV1_ALERT_PROTOCOL_VERSION:
-#ifdef SSL_R_VERSION_TOO_HIGH
-						case SSL_R_VERSION_TOO_HIGH:
-						case SSL_R_VERSION_TOO_LOW:
-#endif
-							libpq_append_conn_error(conn, "This may indicate that the server does not support any SSL protocol version between %s and %s.",
-													conn->ssl_min_protocol_version ?
-													conn->ssl_min_protocol_version :
-													MIN_OPENSSL_TLS_VERSION,
-													conn->ssl_max_protocol_version ?
-													conn->ssl_max_protocol_version :
-													MAX_OPENSSL_TLS_VERSION);
-							break;
-						default:
-							break;
-					}
-					pgtls_close(conn);
-					return PGRES_POLLING_FAILED;
-				}
-
-			default:
-				libpq_append_conn_error(conn, "unrecognized SSL error code: %d", err);
-				pgtls_close(conn);
-				return PGRES_POLLING_FAILED;
-		}
-	}
-
-	/*
-	 * We already checked the server certificate in initialize_SSL() using
-	 * SSL_CTX_set_verify(), if root.crt exists.
-	 */
-
-	/* get server certificate */
-	conn->peer = SSL_get_peer_certificate(conn->ssl);
-	if (conn->peer == NULL)
-	{
-		char	   *err = SSLerrmessage(ERR_get_error());
-
-		libpq_append_conn_error(conn, "certificate could not be obtained: %s", err);
-		SSLerrfree(err);
-		pgtls_close(conn);
-		return PGRES_POLLING_FAILED;
-	}
-
-	if (!pq_verify_peer_name_matches_certificate(conn))
-	{
-		pgtls_close(conn);
-		return PGRES_POLLING_FAILED;
-	}
-
-	/* SSL handshake is complete */
-	return PGRES_POLLING_OK;
-}
-
-void
-pgtls_close(PGconn *conn)
-{
-	bool		destroy_needed = false;
-
-	if (conn->ssl_in_use)
-	{
-		if (conn->ssl)
-		{
-			/*
-			 * We can't destroy everything SSL-related here due to the
-			 * possible later calls to OpenSSL routines which may need our
-			 * thread callbacks, so set a flag here and check at the end.
-			 */
-
-			if (SSL_shutdown(conn->ssl) < 0) {
-				// Pop an error and ignore it. We might have already printed one
-				// and SSL_shutdown just yields logic warnings as errors.
-				ERR_get_error();
-			}
-			SSL_free(conn->ssl);
-			conn->ssl = NULL;
-			conn->ssl_in_use = false;
-
-			destroy_needed = true;
-		}
-
-		if (conn->peer)
-		{
-			X509_free(conn->peer);
-			conn->peer = NULL;
-		}
-
-#ifdef USE_SSL_ENGINE
-		if (conn->engine)
-		{
-			ENGINE_finish(conn->engine);
-			ENGINE_free(conn->engine);
-			conn->engine = NULL;
-		}
-#endif
-	}
-	else
-	{
-		/*
-		 * In the non-SSL case, just remove the crypto callbacks if the
-		 * connection has then loaded.  This code path has no dependency on
-		 * any pending SSL calls.
-		 */
-		if (conn->crypto_loaded)
-			destroy_needed = true;
-	}
-
-	/*
-	 * This will remove our crypto locking hooks if this is the last
-	 * connection using libcrypto which means we must wait to call it until
-	 * after all the potential SSL calls have been made, otherwise we can end
-	 * up with a race condition and possible deadlocks.
-	 *
-	 * See comments above destroy_ssl_system().
-	 */
-	if (destroy_needed)
-	{
-		destroy_ssl_system();
-		conn->crypto_loaded = false;
-	}
-}
-
-
-/*
- * Obtain reason string for passed SSL errcode
- *
- * ERR_get_error() is used by caller to get errcode to pass here.
- *
- * Some caution is needed here since ERR_reason_error_string will
- * return NULL if it doesn't recognize the error code.  We don't
- * want to return NULL ever.
- */
-static char ssl_nomem[] = "out of memory allocating error description";
-
-#define SSL_ERR_LEN 128
-
-static char *
-SSLerrmessage(unsigned long ecode)
-{
-	const char *errreason;
-	char	   *errbuf;
-
-	errbuf = malloc(SSL_ERR_LEN);
-	if (!errbuf)
-		return ssl_nomem;
-	if (ecode == 0)
-	{
-		snprintf(errbuf, SSL_ERR_LEN, libpq_gettext("no SSL error reported"));
-		return errbuf;
-	}
-	errreason = ERR_reason_error_string(ecode);
-	if (errreason != NULL)
-	{
-		strlcpy(errbuf, errreason, SSL_ERR_LEN);
-		return errbuf;
-	}
-	snprintf(errbuf, SSL_ERR_LEN, libpq_gettext("SSL error code %lu"), ecode);
-	return errbuf;
-}
-
-static void
-SSLerrfree(char *buf)
-{
-	if (buf != ssl_nomem)
-		free(buf);
-}
-
-/* ------------------------------------------------------------ */
-/*					SSL information functions					*/
-/* ------------------------------------------------------------ */
-
-/*
- *	Return pointer to OpenSSL object.
- */
-void *
-PQgetssl(PGconn *conn)
-{
-	if (!conn)
-		return NULL;
-	return conn->ssl;
-}
-
-void *
-PQsslStruct(PGconn *conn, const char *struct_name)
-{
-	if (!conn)
-		return NULL;
-	if (strcmp(struct_name, "OpenSSL") == 0)
-		return conn->ssl;
-	return NULL;
-}
-
-const char *const *
-PQsslAttributeNames(PGconn *conn)
-{
-	static const char *const openssl_attrs[] = {
-		"library",
-		"key_bits",
-		"cipher",
-		"compression",
-		"protocol",
-		NULL
-	};
-	static const char *const empty_attrs[] = {NULL};
-
-	if (!conn)
-	{
-		/* Return attributes of default SSL library */
-		return openssl_attrs;
-	}
-
-	/* No attrs for unencrypted connection */
-	if (conn->ssl == NULL)
-		return empty_attrs;
-
-	return openssl_attrs;
-}
-
-const char *
-PQsslAttribute(PGconn *conn, const char *attribute_name)
-{
-	if (!conn)
-	{
-		/* PQsslAttribute(NULL, "library") reports the default SSL library */
-		if (strcmp(attribute_name, "library") == 0)
-			return "OpenSSL";
-		return NULL;
-	}
-
-	/* All attributes read as NULL for a non-encrypted connection */
-	if (conn->ssl == NULL)
-		return NULL;
-
-	if (strcmp(attribute_name, "library") == 0)
-		return "OpenSSL";
-
-	if (strcmp(attribute_name, "key_bits") == 0)
-	{
-		static char sslbits_str[12];
-		int			sslbits;
-
-		SSL_get_cipher_bits(conn->ssl, &sslbits);
-		snprintf(sslbits_str, sizeof(sslbits_str), "%d", sslbits);
-		return sslbits_str;
-	}
-
-	if (strcmp(attribute_name, "cipher") == 0)
-		return SSL_get_cipher(conn->ssl);
-
-	if (strcmp(attribute_name, "compression") == 0)
-		return SSL_get_current_compression(conn->ssl) ? "on" : "off";
-
-	if (strcmp(attribute_name, "protocol") == 0)
-		return SSL_get_version(conn->ssl);
-
-	return NULL;				/* unknown attribute */
-}
-
-/*
- * Private substitute BIO: this does the sending and receiving using
- * pqsecure_raw_write() and pqsecure_raw_read() instead, to allow those
- * functions to disable SIGPIPE and give better error messages on I/O errors.
- *
- * These functions are closely modelled on the standard socket BIO in OpenSSL;
- * see sock_read() and sock_write() in OpenSSL's crypto/bio/bss_sock.c.
- * XXX OpenSSL 1.0.1e considers many more errcodes than just EINTR as reasons
- * to retry; do we need to adopt their logic for that?
- */
-
-/* protected by ssl_config_mutex */
-static BIO_METHOD *my_bio_methods;
-
-static int
-my_sock_read(BIO *h, char *buf, int size)
-{
-	int			res;
-
-	res = pqsecure_raw_read((PGconn *) BIO_get_app_data(h), buf, size);
-	BIO_clear_retry_flags(h);
-	if (res < 0)
-	{
-		/* If we were interrupted, tell caller to retry */
-		switch (SOCK_ERRNO)
-		{
-#ifdef EAGAIN
-			case EAGAIN:
-#endif
-#if defined(EWOULDBLOCK) && (!defined(EAGAIN) || (EWOULDBLOCK != EAGAIN))
-			case EWOULDBLOCK:
-#endif
-			case EINTR:
-				BIO_set_retry_read(h);
-				break;
-
-			default:
-				break;
-		}
-	}
-
-	return res;
-}
-
-static int
-my_sock_write(BIO *h, const char *buf, int size)
-{
-	int			res;
-
-	res = pqsecure_raw_write((PGconn *) BIO_get_app_data(h), buf, size);
-	BIO_clear_retry_flags(h);
-	if (res < 0)
-	{
-		/* If we were interrupted, tell caller to retry */
-		switch (SOCK_ERRNO)
-		{
-#ifdef EAGAIN
-			case EAGAIN:
-#endif
-#if defined(EWOULDBLOCK) && (!defined(EAGAIN) || (EWOULDBLOCK != EAGAIN))
-			case EWOULDBLOCK:
-#endif
-			case EINTR:
-				BIO_set_retry_write(h);
-				break;
-
-			default:
-				break;
-		}
-	}
-
-	return res;
-}
-
-static BIO_METHOD *
-my_BIO_s_socket(void)
-{
-	BIO_METHOD *res;
-
-#ifdef ENABLE_THREAD_SAFETY
-	if (pthread_mutex_lock(&ssl_config_mutex))
-		return NULL;
-#endif
-
-	res = my_bio_methods;
-
-	if (!my_bio_methods)
-	{
-		BIO_METHOD *biom = (BIO_METHOD *) BIO_s_socket();
-#ifdef HAVE_BIO_METH_NEW
-		int			my_bio_index;
-
-		my_bio_index = BIO_get_new_index();
-		if (my_bio_index == -1)
-			goto err;
-		my_bio_index |= (BIO_TYPE_DESCRIPTOR | BIO_TYPE_SOURCE_SINK);
-		res = BIO_meth_new(my_bio_index, "libpq socket");
-		if (!res)
-			goto err;
-
-		/*
-		 * As of this writing, these functions never fail. But check anyway,
-		 * like OpenSSL's own examples do.
-		 */
-		if (!BIO_meth_set_write(res, my_sock_write) ||
-			!BIO_meth_set_read(res, my_sock_read) ||
-			!BIO_meth_set_gets(res, BIO_meth_get_gets(biom)) ||
-			!BIO_meth_set_puts(res, BIO_meth_get_puts(biom)) ||
-			!BIO_meth_set_ctrl(res, BIO_meth_get_ctrl(biom)) ||
-			!BIO_meth_set_create(res, BIO_meth_get_create(biom)) ||
-			!BIO_meth_set_destroy(res, BIO_meth_get_destroy(biom)) ||
-			!BIO_meth_set_callback_ctrl(res, BIO_meth_get_callback_ctrl(biom)))
-		{
-			goto err;
-		}
-#else
-		res = malloc(sizeof(BIO_METHOD));
-		if (!res)
-			goto err;
-		memcpy(res, biom, sizeof(BIO_METHOD));
-		res->bread = my_sock_read;
-		res->bwrite = my_sock_write;
-#endif
-	}
-
-	my_bio_methods = res;
-
-#ifdef ENABLE_THREAD_SAFETY
-	pthread_mutex_unlock(&ssl_config_mutex);
-#endif
-
-	return res;
-
-err:
-#ifdef HAVE_BIO_METH_NEW
-	if (res)
-		BIO_meth_free(res);
-#else
-	if (res)
-		free(res);
-#endif
-
-#ifdef ENABLE_THREAD_SAFETY
-	pthread_mutex_unlock(&ssl_config_mutex);
-#endif
-	return NULL;
-}
-
-/* This should exactly match OpenSSL's SSL_set_fd except for using my BIO */
-static int
-my_SSL_set_fd(PGconn *conn, int fd)
-{
-	int			ret = 0;
-	BIO		   *bio;
-	BIO_METHOD *bio_method;
-
-	bio_method = my_BIO_s_socket();
-	if (bio_method == NULL)
-	{
-		SSLerr(SSL_F_SSL_SET_FD, ERR_R_BUF_LIB);
-		goto err;
-	}
-	bio = BIO_new(bio_method);
-	if (bio == NULL)
-	{
-		SSLerr(SSL_F_SSL_SET_FD, ERR_R_BUF_LIB);
-		goto err;
-	}
-	BIO_set_app_data(bio, conn);
-
-	SSL_set_bio(conn->ssl, bio, bio);
-	BIO_set_fd(bio, fd, BIO_NOCLOSE);
-	ret = 1;
-err:
-	return ret;
-}
-
-/*
- * This is the default handler to return a client cert password from
- * conn->sslpassword. Apps may install it explicitly if they want to
- * prevent openssl from ever prompting on stdin.
- */
-int
-PQdefaultSSLKeyPassHook_OpenSSL(char *buf, int size, PGconn *conn)
-{
-	if (conn && conn->sslpassword)
-	{
-		if (strlen(conn->sslpassword) + 1 > size)
-			fprintf(stderr, libpq_gettext("WARNING: sslpassword truncated\n"));
-		strncpy(buf, conn->sslpassword, size);
-		buf[size - 1] = '\0';
-		return strlen(buf);
-	}
-	else
-	{
-		buf[0] = '\0';
-		return 0;
-	}
-}
-
-PQsslKeyPassHook_OpenSSL_type
-PQgetSSLKeyPassHook_OpenSSL(void)
-{
-	return PQsslKeyPassHook;
-}
-
-void
-PQsetSSLKeyPassHook_OpenSSL(PQsslKeyPassHook_OpenSSL_type hook)
-{
-	PQsslKeyPassHook = hook;
-}
-
-/*
- * Supply a password to decrypt a client certificate.
- *
- * This must match OpenSSL type pem_password_cb.
- */
-static int
-PQssl_passwd_cb(char *buf, int size, int rwflag, void *userdata)
-{
-	PGconn	   *conn = userdata;
-
-	if (PQsslKeyPassHook)
-		return PQsslKeyPassHook(buf, size, conn);
-	else
-		return PQdefaultSSLKeyPassHook_OpenSSL(buf, size, conn);
-}
-
-/*
- * Convert TLS protocol version string to OpenSSL values
- *
- * If a version is passed that is not supported by the current OpenSSL version,
- * then we return -1. If a non-negative value is returned, subsequent code can
- * assume it is working with a supported version.
- *
- * Note: this is rather similar to the backend routine in be-secure-openssl.c,
- * so make sure to update both routines if changing this one.
- */
-static int
-ssl_protocol_version_to_openssl(const char *protocol)
-{
-	if (pg_strcasecmp("TLSv1", protocol) == 0)
-		return TLS1_VERSION;
-
-#ifdef TLS1_1_VERSION
-	if (pg_strcasecmp("TLSv1.1", protocol) == 0)
-		return TLS1_1_VERSION;
-#endif
-
-#ifdef TLS1_2_VERSION
-	if (pg_strcasecmp("TLSv1.2", protocol) == 0)
-		return TLS1_2_VERSION;
-#endif
-
-#ifdef TLS1_3_VERSION
-	if (pg_strcasecmp("TLSv1.3", protocol) == 0)
-		return TLS1_3_VERSION;
-#endif
-
-	return -1;
-}
diff --git a/contrib/libs/libpq/src/interfaces/libpq/fe-secure.c b/contrib/libs/libpq/src/interfaces/libpq/fe-secure.c
deleted file mode 100644
index 8444f19f08..0000000000
--- a/contrib/libs/libpq/src/interfaces/libpq/fe-secure.c
+++ /dev/null
@@ -1,618 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * fe-secure.c
- *	  functions related to setting up a secure connection to the backend.
- *	  Secure connections are expected to provide confidentiality,
- *	  message integrity and endpoint authentication.
- *
- *
- * Portions Copyright (c) 1996-2023, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- *
- * IDENTIFICATION
- *	  src/interfaces/libpq/fe-secure.c
- *
- *-------------------------------------------------------------------------
- */
-
-#include "postgres_fe.h"
-
-#include <signal.h>
-#include <fcntl.h>
-#include <ctype.h>
-
-#ifdef WIN32
-#include "win32.h"
-#else
-#include <sys/socket.h>
-#include <unistd.h>
-#include <netdb.h>
-#include <netinet/in.h>
-#include <netinet/tcp.h>
-#include <arpa/inet.h>
-#endif
-
-#include <sys/stat.h>
-
-#ifdef ENABLE_THREAD_SAFETY
-#ifdef WIN32
-#include "pthread-win32.h"
-#else
-#include <pthread.h>
-#endif
-#endif
-
-#include "fe-auth.h"
-#include "libpq-fe.h"
-#include "libpq-int.h"
-
-/*
- * Macros to handle disabling and then restoring the state of SIGPIPE handling.
- * On Windows, these are all no-ops since there's no SIGPIPEs.
- */
-
-#ifndef WIN32
-
-#define SIGPIPE_MASKED(conn)	((conn)->sigpipe_so || (conn)->sigpipe_flag)
-
-#ifdef ENABLE_THREAD_SAFETY
-
-struct sigpipe_info
-{
-	sigset_t	oldsigmask;
-	bool		sigpipe_pending;
-	bool		got_epipe;
-};
-
-#define DECLARE_SIGPIPE_INFO(spinfo) struct sigpipe_info spinfo
-
-#define DISABLE_SIGPIPE(conn, spinfo, failaction) \
-	do { \
-		(spinfo).got_epipe = false; \
-		if (!SIGPIPE_MASKED(conn)) \
-		{ \
-			if (pq_block_sigpipe(&(spinfo).oldsigmask, \
-								 &(spinfo).sigpipe_pending) < 0) \
-				failaction; \
-		} \
-	} while (0)
-
-#define REMEMBER_EPIPE(spinfo, cond) \
-	do { \
-		if (cond) \
-			(spinfo).got_epipe = true; \
-	} while (0)
-
-#define RESTORE_SIGPIPE(conn, spinfo) \
-	do { \
-		if (!SIGPIPE_MASKED(conn)) \
-			pq_reset_sigpipe(&(spinfo).oldsigmask, (spinfo).sigpipe_pending, \
-							 (spinfo).got_epipe); \
-	} while (0)
-#else							/* !ENABLE_THREAD_SAFETY */
-
-#define DECLARE_SIGPIPE_INFO(spinfo) pqsigfunc spinfo = NULL
-
-#define DISABLE_SIGPIPE(conn, spinfo, failaction) \
-	do { \
-		if (!SIGPIPE_MASKED(conn)) \
-			spinfo = pqsignal(SIGPIPE, SIG_IGN); \
-	} while (0)
-
-#define REMEMBER_EPIPE(spinfo, cond)
-
-#define RESTORE_SIGPIPE(conn, spinfo) \
-	do { \
-		if (!SIGPIPE_MASKED(conn)) \
-			pqsignal(SIGPIPE, spinfo); \
-	} while (0)
-#endif							/* ENABLE_THREAD_SAFETY */
-#else							/* WIN32 */
-
-#define DECLARE_SIGPIPE_INFO(spinfo)
-#define DISABLE_SIGPIPE(conn, spinfo, failaction)
-#define REMEMBER_EPIPE(spinfo, cond)
-#define RESTORE_SIGPIPE(conn, spinfo)
-#endif							/* WIN32 */
-
-/* ------------------------------------------------------------ */
-/*			 Procedures common to all secure sessions			*/
-/* ------------------------------------------------------------ */
-
-
-int
-PQsslInUse(PGconn *conn)
-{
-	if (!conn)
-		return 0;
-	return conn->ssl_in_use;
-}
-
-/*
- *	Exported function to allow application to tell us it's already
- *	initialized OpenSSL.
- */
-void
-PQinitSSL(int do_init)
-{
-#ifdef USE_SSL
-	pgtls_init_library(do_init, do_init);
-#endif
-}
-
-/*
- *	Exported function to allow application to tell us it's already
- *	initialized OpenSSL and/or libcrypto.
- */
-void
-PQinitOpenSSL(int do_ssl, int do_crypto)
-{
-#ifdef USE_SSL
-	pgtls_init_library(do_ssl, do_crypto);
-#endif
-}
-
-/*
- *	Initialize global SSL context
- */
-int
-pqsecure_initialize(PGconn *conn, bool do_ssl, bool do_crypto)
-{
-	int			r = 0;
-
-#ifdef USE_SSL
-	r = pgtls_init(conn, do_ssl, do_crypto);
-#endif
-
-	return r;
-}
-
-/*
- *	Begin or continue negotiating a secure session.
- */
-PostgresPollingStatusType
-pqsecure_open_client(PGconn *conn)
-{
-#ifdef USE_SSL
-	return pgtls_open_client(conn);
-#else
-	/* shouldn't get here */
-	return PGRES_POLLING_FAILED;
-#endif
-}
-
-/*
- *	Close secure session.
- */
-void
-pqsecure_close(PGconn *conn)
-{
-#ifdef USE_SSL
-	pgtls_close(conn);
-#endif
-}
-
-/*
- *	Read data from a secure connection.
- *
- * On failure, this function is responsible for appending a suitable message
- * to conn->errorMessage.  The caller must still inspect errno, but only
- * to determine whether to continue/retry after error.
- */
-ssize_t
-pqsecure_read(PGconn *conn, void *ptr, size_t len)
-{
-	ssize_t		n;
-
-#ifdef USE_SSL
-	if (conn->ssl_in_use)
-	{
-		n = pgtls_read(conn, ptr, len);
-	}
-	else
-#endif
-#ifdef ENABLE_GSS
-	if (conn->gssenc)
-	{
-		n = pg_GSS_read(conn, ptr, len);
-	}
-	else
-#endif
-	{
-		n = pqsecure_raw_read(conn, ptr, len);
-	}
-
-	return n;
-}
-
-ssize_t
-pqsecure_raw_read(PGconn *conn, void *ptr, size_t len)
-{
-	ssize_t		n;
-	int			result_errno = 0;
-	char		sebuf[PG_STRERROR_R_BUFLEN];
-
-	SOCK_ERRNO_SET(0);
-
-	n = recv(conn->sock, ptr, len, 0);
-
-	if (n < 0)
-	{
-		result_errno = SOCK_ERRNO;
-
-		/* Set error message if appropriate */
-		switch (result_errno)
-		{
-#ifdef EAGAIN
-			case EAGAIN:
-#endif
-#if defined(EWOULDBLOCK) && (!defined(EAGAIN) || (EWOULDBLOCK != EAGAIN))
-			case EWOULDBLOCK:
-#endif
-			case EINTR:
-				/* no error message, caller is expected to retry */
-				break;
-
-			case EPIPE:
-			case ECONNRESET:
-				libpq_append_conn_error(conn, "server closed the connection unexpectedly\n"
-										"\tThis probably means the server terminated abnormally\n"
-										"\tbefore or while processing the request.");
-				break;
-
-			case 0:
-				/* If errno didn't get set, treat it as regular EOF */
-				n = 0;
-				break;
-
-			default:
-				libpq_append_conn_error(conn, "could not receive data from server: %s",
-										SOCK_STRERROR(result_errno,
-													  sebuf, sizeof(sebuf)));
-				break;
-		}
-	}
-
-	/* ensure we return the intended errno to caller */
-	SOCK_ERRNO_SET(result_errno);
-
-	return n;
-}
-
-/*
- *	Write data to a secure connection.
- *
- * Returns the number of bytes written, or a negative value (with errno
- * set) upon failure.  The write count could be less than requested.
- *
- * Note that socket-level hard failures are masked from the caller,
- * instead setting conn->write_failed and storing an error message
- * in conn->write_err_msg; see pqsecure_raw_write.  This allows us to
- * postpone reporting of write failures until we're sure no error
- * message is available from the server.
- *
- * However, errors detected in the SSL or GSS management level are reported
- * via a negative result, with message appended to conn->errorMessage.
- * It's frequently unclear whether such errors should be considered read or
- * write errors, so we don't attempt to postpone reporting them.
- *
- * The caller must still inspect errno upon failure, but only to determine
- * whether to continue/retry; a message has been saved someplace in any case.
- */
-ssize_t
-pqsecure_write(PGconn *conn, const void *ptr, size_t len)
-{
-	ssize_t		n;
-
-#ifdef USE_SSL
-	if (conn->ssl_in_use)
-	{
-		n = pgtls_write(conn, ptr, len);
-	}
-	else
-#endif
-#ifdef ENABLE_GSS
-	if (conn->gssenc)
-	{
-		n = pg_GSS_write(conn, ptr, len);
-	}
-	else
-#endif
-	{
-		n = pqsecure_raw_write(conn, ptr, len);
-	}
-
-	return n;
-}
-
-/*
- * Low-level implementation of pqsecure_write.
- *
- * This is used directly for an unencrypted connection.  For encrypted
- * connections, this does the physical I/O on behalf of pgtls_write or
- * pg_GSS_write.
- *
- * This function reports failure (i.e., returns a negative result) only
- * for retryable errors such as EINTR.  Looping for such cases is to be
- * handled at some outer level, maybe all the way up to the application.
- * For hard failures, we set conn->write_failed and store an error message
- * in conn->write_err_msg, but then claim to have written the data anyway.
- * This is because we don't want to report write failures so long as there
- * is a possibility of reading from the server and getting an error message
- * that could explain why the connection dropped.  Many TCP stacks have
- * race conditions such that a write failure may or may not be reported
- * before all incoming data has been read.
- *
- * Note that this error behavior happens below the SSL management level when
- * we are using SSL.  That's because at least some versions of OpenSSL are
- * too quick to report a write failure when there's still a possibility to
- * get a more useful error from the server.
- */
-ssize_t
-pqsecure_raw_write(PGconn *conn, const void *ptr, size_t len)
-{
-	ssize_t		n;
-	int			flags = 0;
-	int			result_errno = 0;
-	char		msgbuf[1024];
-	char		sebuf[PG_STRERROR_R_BUFLEN];
-
-	DECLARE_SIGPIPE_INFO(spinfo);
-
-	/*
-	 * If we already had a write failure, we will never again try to send data
-	 * on that connection.  Even if the kernel would let us, we've probably
-	 * lost message boundary sync with the server.  conn->write_failed
-	 * therefore persists until the connection is reset, and we just discard
-	 * all data presented to be written.
-	 */
-	if (conn->write_failed)
-		return len;
-
-#ifdef MSG_NOSIGNAL
-	if (conn->sigpipe_flag)
-		flags |= MSG_NOSIGNAL;
-
-retry_masked:
-#endif							/* MSG_NOSIGNAL */
-
-	DISABLE_SIGPIPE(conn, spinfo, return -1);
-
-	n = send(conn->sock, ptr, len, flags);
-
-	if (n < 0)
-	{
-		result_errno = SOCK_ERRNO;
-
-		/*
-		 * If we see an EINVAL, it may be because MSG_NOSIGNAL isn't available
-		 * on this machine.  So, clear sigpipe_flag so we don't try the flag
-		 * again, and retry the send().
-		 */
-#ifdef MSG_NOSIGNAL
-		if (flags != 0 && result_errno == EINVAL)
-		{
-			conn->sigpipe_flag = false;
-			flags = 0;
-			goto retry_masked;
-		}
-#endif							/* MSG_NOSIGNAL */
-
-		/* Set error message if appropriate */
-		switch (result_errno)
-		{
-#ifdef EAGAIN
-			case EAGAIN:
-#endif
-#if defined(EWOULDBLOCK) && (!defined(EAGAIN) || (EWOULDBLOCK != EAGAIN))
-			case EWOULDBLOCK:
-#endif
-			case EINTR:
-				/* no error message, caller is expected to retry */
-				break;
-
-			case EPIPE:
-				/* Set flag for EPIPE */
-				REMEMBER_EPIPE(spinfo, true);
-
-				/* FALL THRU */
-
-			case ECONNRESET:
-				conn->write_failed = true;
-				/* Store error message in conn->write_err_msg, if possible */
-				/* (strdup failure is OK, we'll cope later) */
-				snprintf(msgbuf, sizeof(msgbuf),
-						 libpq_gettext("server closed the connection unexpectedly\n"
-									   "\tThis probably means the server terminated abnormally\n"
-									   "\tbefore or while processing the request."));
-				/* keep newline out of translated string */
-				strlcat(msgbuf, "\n", sizeof(msgbuf));
-				conn->write_err_msg = strdup(msgbuf);
-				/* Now claim the write succeeded */
-				n = len;
-				break;
-
-			default:
-				conn->write_failed = true;
-				/* Store error message in conn->write_err_msg, if possible */
-				/* (strdup failure is OK, we'll cope later) */
-				snprintf(msgbuf, sizeof(msgbuf),
-						 libpq_gettext("could not send data to server: %s"),
-						 SOCK_STRERROR(result_errno,
-									   sebuf, sizeof(sebuf)));
-				/* keep newline out of translated string */
-				strlcat(msgbuf, "\n", sizeof(msgbuf));
-				conn->write_err_msg = strdup(msgbuf);
-				/* Now claim the write succeeded */
-				n = len;
-				break;
-		}
-	}
-
-	RESTORE_SIGPIPE(conn, spinfo);
-
-	/* ensure we return the intended errno to caller */
-	SOCK_ERRNO_SET(result_errno);
-
-	return n;
-}
-
-/* Dummy versions of SSL info functions, when built without SSL support */
-#ifndef USE_SSL
-
-void *
-PQgetssl(PGconn *conn)
-{
-	return NULL;
-}
-
-void *
-PQsslStruct(PGconn *conn, const char *struct_name)
-{
-	return NULL;
-}
-
-const char *
-PQsslAttribute(PGconn *conn, const char *attribute_name)
-{
-	return NULL;
-}
-
-const char *const *
-PQsslAttributeNames(PGconn *conn)
-{
-	static const char *const result[] = {NULL};
-
-	return result;
-}
-#endif							/* USE_SSL */
-
-/*
- * Dummy versions of OpenSSL key password hook functions, when built without
- * OpenSSL.
- */
-#ifndef USE_OPENSSL
-
-PQsslKeyPassHook_OpenSSL_type
-PQgetSSLKeyPassHook_OpenSSL(void)
-{
-	return NULL;
-}
-
-void
-PQsetSSLKeyPassHook_OpenSSL(PQsslKeyPassHook_OpenSSL_type hook)
-{
-	return;
-}
-
-int
-PQdefaultSSLKeyPassHook_OpenSSL(char *buf, int size, PGconn *conn)
-{
-	return 0;
-}
-#endif							/* USE_OPENSSL */
-
-/* Dummy version of GSSAPI information functions, when built without GSS support */
-#ifndef ENABLE_GSS
-
-void *
-PQgetgssctx(PGconn *conn)
-{
-	return NULL;
-}
-
-int
-PQgssEncInUse(PGconn *conn)
-{
-	return 0;
-}
-
-#endif							/* ENABLE_GSS */
-
-
-#if defined(ENABLE_THREAD_SAFETY) && !defined(WIN32)
-
-/*
- *	Block SIGPIPE for this thread.  This prevents send()/write() from exiting
- *	the application.
- */
-int
-pq_block_sigpipe(sigset_t *osigset, bool *sigpipe_pending)
-{
-	sigset_t	sigpipe_sigset;
-	sigset_t	sigset;
-
-	sigemptyset(&sigpipe_sigset);
-	sigaddset(&sigpipe_sigset, SIGPIPE);
-
-	/* Block SIGPIPE and save previous mask for later reset */
-	SOCK_ERRNO_SET(pthread_sigmask(SIG_BLOCK, &sigpipe_sigset, osigset));
-	if (SOCK_ERRNO)
-		return -1;
-
-	/* We can have a pending SIGPIPE only if it was blocked before */
-	if (sigismember(osigset, SIGPIPE))
-	{
-		/* Is there a pending SIGPIPE? */
-		if (sigpending(&sigset) != 0)
-			return -1;
-
-		if (sigismember(&sigset, SIGPIPE))
-			*sigpipe_pending = true;
-		else
-			*sigpipe_pending = false;
-	}
-	else
-		*sigpipe_pending = false;
-
-	return 0;
-}
-
-/*
- *	Discard any pending SIGPIPE and reset the signal mask.
- *
- * Note: we are effectively assuming here that the C library doesn't queue
- * up multiple SIGPIPE events.  If it did, then we'd accidentally leave
- * ours in the queue when an event was already pending and we got another.
- * As long as it doesn't queue multiple events, we're OK because the caller
- * can't tell the difference.
- *
- * The caller should say got_epipe = false if it is certain that it
- * didn't get an EPIPE error; in that case we'll skip the clear operation
- * and things are definitely OK, queuing or no.  If it got one or might have
- * gotten one, pass got_epipe = true.
- *
- * We do not want this to change errno, since if it did that could lose
- * the error code from a preceding send().  We essentially assume that if
- * we were able to do pq_block_sigpipe(), this can't fail.
- */
-void
-pq_reset_sigpipe(sigset_t *osigset, bool sigpipe_pending, bool got_epipe)
-{
-	int			save_errno = SOCK_ERRNO;
-	int			signo;
-	sigset_t	sigset;
-
-	/* Clear SIGPIPE only if none was pending */
-	if (got_epipe && !sigpipe_pending)
-	{
-		if (sigpending(&sigset) == 0 &&
-			sigismember(&sigset, SIGPIPE))
-		{
-			sigset_t	sigpipe_sigset;
-
-			sigemptyset(&sigpipe_sigset);
-			sigaddset(&sigpipe_sigset, SIGPIPE);
-
-			sigwait(&sigpipe_sigset, &signo);
-		}
-	}
-
-	/* Restore saved block mask */
-	pthread_sigmask(SIG_SETMASK, osigset, NULL);
-
-	SOCK_ERRNO_SET(save_errno);
-}
-
-#endif							/* ENABLE_THREAD_SAFETY && !WIN32 */
diff --git a/contrib/libs/libpq/src/interfaces/libpq/fe-trace.c b/contrib/libs/libpq/src/interfaces/libpq/fe-trace.c
deleted file mode 100644
index 402784f40e..0000000000
--- a/contrib/libs/libpq/src/interfaces/libpq/fe-trace.c
+++ /dev/null
@@ -1,729 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- *	fe-trace.c
- *	  functions for libpq protocol tracing
- *
- * Portions Copyright (c) 1996-2023, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- * IDENTIFICATION
- *	  src/interfaces/libpq/fe-trace.c
- *
- *-------------------------------------------------------------------------
- */
-
-#include "postgres_fe.h"
-
-#include <ctype.h>
-#include <limits.h>
-#include <sys/time.h>
-#include <time.h>
-
-#ifdef WIN32
-#include "win32.h"
-#else
-#include <unistd.h>
-#endif
-
-#include "libpq-fe.h"
-#include "libpq-int.h"
-#include "port/pg_bswap.h"
-
-
-/* Enable tracing */
-void
-PQtrace(PGconn *conn, FILE *debug_port)
-{
-	if (conn == NULL)
-		return;
-	PQuntrace(conn);
-	if (debug_port == NULL)
-		return;
-
-	conn->Pfdebug = debug_port;
-	conn->traceFlags = 0;
-}
-
-/* Disable tracing */
-void
-PQuntrace(PGconn *conn)
-{
-	if (conn == NULL)
-		return;
-	if (conn->Pfdebug)
-	{
-		fflush(conn->Pfdebug);
-		conn->Pfdebug = NULL;
-	}
-
-	conn->traceFlags = 0;
-}
-
-/* Set flags for current tracing session */
-void
-PQsetTraceFlags(PGconn *conn, int flags)
-{
-	if (conn == NULL)
-		return;
-	/* If PQtrace() failed, do nothing. */
-	if (conn->Pfdebug == NULL)
-		return;
-	conn->traceFlags = flags;
-}
-
-/*
- * Print the current time, with microseconds, into a caller-supplied
- * buffer.
- * Cribbed from get_formatted_log_time, but much simpler.
- */
-static void
-pqTraceFormatTimestamp(char *timestr, size_t ts_len)
-{
-	struct timeval tval;
-	time_t		now;
-
-	gettimeofday(&tval, NULL);
-
-	/*
-	 * MSVC's implementation of timeval uses a long for tv_sec, however,
-	 * localtime() expects a time_t pointer.  Here we'll assign tv_sec to a
-	 * local time_t variable so that we pass localtime() the correct pointer
-	 * type.
-	 */
-	now = tval.tv_sec;
-	strftime(timestr, ts_len,
-			 "%Y-%m-%d %H:%M:%S",
-			 localtime(&now));
-	/* append microseconds */
-	snprintf(timestr + strlen(timestr), ts_len - strlen(timestr),
-			 ".%06u", (unsigned int) (tval.tv_usec));
-}
-
-/*
- *   pqTraceOutputByte1: output a 1-char message to the log
- */
-static void
-pqTraceOutputByte1(FILE *pfdebug, const char *data, int *cursor)
-{
-	const char *v = data + *cursor;
-
-	/*
-	 * Show non-printable data in hex format, including the terminating \0
-	 * that completes ErrorResponse and NoticeResponse messages.
-	 */
-	if (!isprint((unsigned char) *v))
-		fprintf(pfdebug, " \\x%02x", *v);
-	else
-		fprintf(pfdebug, " %c", *v);
-	*cursor += 1;
-}
-
-/*
- *   pqTraceOutputInt16: output a 2-byte integer message to the log
- */
-static int
-pqTraceOutputInt16(FILE *pfdebug, const char *data, int *cursor)
-{
-	uint16		tmp;
-	int			result;
-
-	memcpy(&tmp, data + *cursor, 2);
-	*cursor += 2;
-	result = (int) pg_ntoh16(tmp);
-	fprintf(pfdebug, " %d", result);
-
-	return result;
-}
-
-/*
- *   pqTraceOutputInt32: output a 4-byte integer message to the log
- *
- * If 'suppress' is true, print a literal NNNN instead of the actual number.
- */
-static int
-pqTraceOutputInt32(FILE *pfdebug, const char *data, int *cursor, bool suppress)
-{
-	int			result;
-
-	memcpy(&result, data + *cursor, 4);
-	*cursor += 4;
-	result = (int) pg_ntoh32(result);
-	if (suppress)
-		fprintf(pfdebug, " NNNN");
-	else
-		fprintf(pfdebug, " %d", result);
-
-	return result;
-}
-
-/*
- *   pqTraceOutputString: output a string message to the log
- */
-static void
-pqTraceOutputString(FILE *pfdebug, const char *data, int *cursor, bool suppress)
-{
-	int			len;
-
-	if (suppress)
-	{
-		fprintf(pfdebug, " \"SSSS\"");
-		*cursor += strlen(data + *cursor) + 1;
-	}
-	else
-	{
-		len = fprintf(pfdebug, " \"%s\"", data + *cursor);
-
-		/*
-		 * This is a null-terminated string. So add 1 after subtracting 3
-		 * which is the double quotes and space length from len.
-		 */
-		*cursor += (len - 3 + 1);
-	}
-}
-
-/*
- * pqTraceOutputNchar: output a string of exactly len bytes message to the log
- */
-static void
-pqTraceOutputNchar(FILE *pfdebug, int len, const char *data, int *cursor)
-{
-	int			i,
-				next;			/* first char not yet printed */
-	const char *v = data + *cursor;
-
-	fprintf(pfdebug, " \'");
-
-	for (next = i = 0; i < len; ++i)
-	{
-		if (isprint((unsigned char) v[i]))
-			continue;
-		else
-		{
-			fwrite(v + next, 1, i - next, pfdebug);
-			fprintf(pfdebug, "\\x%02x", v[i]);
-			next = i + 1;
-		}
-	}
-	if (next < len)
-		fwrite(v + next, 1, len - next, pfdebug);
-
-	fprintf(pfdebug, "\'");
-	*cursor += len;
-}
-
-/*
- * Output functions by protocol message type
- */
-
-/* NotificationResponse */
-static void
-pqTraceOutputA(FILE *f, const char *message, int *cursor, bool regress)
-{
-	fprintf(f, "NotificationResponse\t");
-	pqTraceOutputInt32(f, message, cursor, regress);
-	pqTraceOutputString(f, message, cursor, false);
-	pqTraceOutputString(f, message, cursor, false);
-}
-
-/* Bind */
-static void
-pqTraceOutputB(FILE *f, const char *message, int *cursor)
-{
-	int			nparams;
-
-	fprintf(f, "Bind\t");
-	pqTraceOutputString(f, message, cursor, false);
-	pqTraceOutputString(f, message, cursor, false);
-	nparams = pqTraceOutputInt16(f, message, cursor);
-
-	for (int i = 0; i < nparams; i++)
-		pqTraceOutputInt16(f, message, cursor);
-
-	nparams = pqTraceOutputInt16(f, message, cursor);
-
-	for (int i = 0; i < nparams; i++)
-	{
-		int			nbytes;
-
-		nbytes = pqTraceOutputInt32(f, message, cursor, false);
-		if (nbytes == -1)
-			continue;
-		pqTraceOutputNchar(f, nbytes, message, cursor);
-	}
-
-	nparams = pqTraceOutputInt16(f, message, cursor);
-	for (int i = 0; i < nparams; i++)
-		pqTraceOutputInt16(f, message, cursor);
-}
-
-/* Close(F) or CommandComplete(B) */
-static void
-pqTraceOutputC(FILE *f, bool toServer, const char *message, int *cursor)
-{
-	if (toServer)
-	{
-		fprintf(f, "Close\t");
-		pqTraceOutputByte1(f, message, cursor);
-		pqTraceOutputString(f, message, cursor, false);
-	}
-	else
-	{
-		fprintf(f, "CommandComplete\t");
-		pqTraceOutputString(f, message, cursor, false);
-	}
-}
-
-/* Describe(F) or DataRow(B) */
-static void
-pqTraceOutputD(FILE *f, bool toServer, const char *message, int *cursor)
-{
-	if (toServer)
-	{
-		fprintf(f, "Describe\t");
-		pqTraceOutputByte1(f, message, cursor);
-		pqTraceOutputString(f, message, cursor, false);
-	}
-	else
-	{
-		int			nfields;
-		int			len;
-		int			i;
-
-		fprintf(f, "DataRow\t");
-		nfields = pqTraceOutputInt16(f, message, cursor);
-		for (i = 0; i < nfields; i++)
-		{
-			len = pqTraceOutputInt32(f, message, cursor, false);
-			if (len == -1)
-				continue;
-			pqTraceOutputNchar(f, len, message, cursor);
-		}
-	}
-}
-
-/* NoticeResponse / ErrorResponse */
-static void
-pqTraceOutputNR(FILE *f, const char *type, const char *message, int *cursor,
-				bool regress)
-{
-	fprintf(f, "%s\t", type);
-	for (;;)
-	{
-		char		field;
-		bool		suppress;
-
-		pqTraceOutputByte1(f, message, cursor);
-		field = message[*cursor - 1];
-		if (field == '\0')
-			break;
-
-		suppress = regress && (field == 'L' || field == 'F' || field == 'R');
-		pqTraceOutputString(f, message, cursor, suppress);
-	}
-}
-
-/* Execute(F) or ErrorResponse(B) */
-static void
-pqTraceOutputE(FILE *f, bool toServer, const char *message, int *cursor, bool regress)
-{
-	if (toServer)
-	{
-		fprintf(f, "Execute\t");
-		pqTraceOutputString(f, message, cursor, false);
-		pqTraceOutputInt32(f, message, cursor, false);
-	}
-	else
-		pqTraceOutputNR(f, "ErrorResponse", message, cursor, regress);
-}
-
-/* CopyFail */
-static void
-pqTraceOutputf(FILE *f, const char *message, int *cursor)
-{
-	fprintf(f, "CopyFail\t");
-	pqTraceOutputString(f, message, cursor, false);
-}
-
-/* FunctionCall */
-static void
-pqTraceOutputF(FILE *f, const char *message, int *cursor, bool regress)
-{
-	int			nfields;
-	int			nbytes;
-
-	fprintf(f, "FunctionCall\t");
-	pqTraceOutputInt32(f, message, cursor, regress);
-	nfields = pqTraceOutputInt16(f, message, cursor);
-
-	for (int i = 0; i < nfields; i++)
-		pqTraceOutputInt16(f, message, cursor);
-
-	nfields = pqTraceOutputInt16(f, message, cursor);
-
-	for (int i = 0; i < nfields; i++)
-	{
-		nbytes = pqTraceOutputInt32(f, message, cursor, false);
-		if (nbytes == -1)
-			continue;
-		pqTraceOutputNchar(f, nbytes, message, cursor);
-	}
-
-	pqTraceOutputInt16(f, message, cursor);
-}
-
-/* CopyInResponse */
-static void
-pqTraceOutputG(FILE *f, const char *message, int *cursor)
-{
-	int			nfields;
-
-	fprintf(f, "CopyInResponse\t");
-	pqTraceOutputByte1(f, message, cursor);
-	nfields = pqTraceOutputInt16(f, message, cursor);
-
-	for (int i = 0; i < nfields; i++)
-		pqTraceOutputInt16(f, message, cursor);
-}
-
-/* CopyOutResponse */
-static void
-pqTraceOutputH(FILE *f, const char *message, int *cursor)
-{
-	int			nfields;
-
-	fprintf(f, "CopyOutResponse\t");
-	pqTraceOutputByte1(f, message, cursor);
-	nfields = pqTraceOutputInt16(f, message, cursor);
-
-	for (int i = 0; i < nfields; i++)
-		pqTraceOutputInt16(f, message, cursor);
-}
-
-/* BackendKeyData */
-static void
-pqTraceOutputK(FILE *f, const char *message, int *cursor, bool regress)
-{
-	fprintf(f, "BackendKeyData\t");
-	pqTraceOutputInt32(f, message, cursor, regress);
-	pqTraceOutputInt32(f, message, cursor, regress);
-}
-
-/* Parse */
-static void
-pqTraceOutputP(FILE *f, const char *message, int *cursor, bool regress)
-{
-	int			nparams;
-
-	fprintf(f, "Parse\t");
-	pqTraceOutputString(f, message, cursor, false);
-	pqTraceOutputString(f, message, cursor, false);
-	nparams = pqTraceOutputInt16(f, message, cursor);
-
-	for (int i = 0; i < nparams; i++)
-		pqTraceOutputInt32(f, message, cursor, regress);
-}
-
-/* Query */
-static void
-pqTraceOutputQ(FILE *f, const char *message, int *cursor)
-{
-	fprintf(f, "Query\t");
-	pqTraceOutputString(f, message, cursor, false);
-}
-
-/* Authentication */
-static void
-pqTraceOutputR(FILE *f, const char *message, int *cursor)
-{
-	fprintf(f, "Authentication\t");
-	pqTraceOutputInt32(f, message, cursor, false);
-}
-
-/* ParameterStatus */
-static void
-pqTraceOutputS(FILE *f, const char *message, int *cursor)
-{
-	fprintf(f, "ParameterStatus\t");
-	pqTraceOutputString(f, message, cursor, false);
-	pqTraceOutputString(f, message, cursor, false);
-}
-
-/* ParameterDescription */
-static void
-pqTraceOutputt(FILE *f, const char *message, int *cursor, bool regress)
-{
-	int			nfields;
-
-	fprintf(f, "ParameterDescription\t");
-	nfields = pqTraceOutputInt16(f, message, cursor);
-
-	for (int i = 0; i < nfields; i++)
-		pqTraceOutputInt32(f, message, cursor, regress);
-}
-
-/* RowDescription */
-static void
-pqTraceOutputT(FILE *f, const char *message, int *cursor, bool regress)
-{
-	int			nfields;
-
-	fprintf(f, "RowDescription\t");
-	nfields = pqTraceOutputInt16(f, message, cursor);
-
-	for (int i = 0; i < nfields; i++)
-	{
-		pqTraceOutputString(f, message, cursor, false);
-		pqTraceOutputInt32(f, message, cursor, regress);
-		pqTraceOutputInt16(f, message, cursor);
-		pqTraceOutputInt32(f, message, cursor, regress);
-		pqTraceOutputInt16(f, message, cursor);
-		pqTraceOutputInt32(f, message, cursor, false);
-		pqTraceOutputInt16(f, message, cursor);
-	}
-}
-
-/* NegotiateProtocolVersion */
-static void
-pqTraceOutputv(FILE *f, const char *message, int *cursor)
-{
-	fprintf(f, "NegotiateProtocolVersion\t");
-	pqTraceOutputInt32(f, message, cursor, false);
-	pqTraceOutputInt32(f, message, cursor, false);
-}
-
-/* FunctionCallResponse */
-static void
-pqTraceOutputV(FILE *f, const char *message, int *cursor)
-{
-	int			len;
-
-	fprintf(f, "FunctionCallResponse\t");
-	len = pqTraceOutputInt32(f, message, cursor, false);
-	if (len != -1)
-		pqTraceOutputNchar(f, len, message, cursor);
-}
-
-/* CopyBothResponse */
-static void
-pqTraceOutputW(FILE *f, const char *message, int *cursor, int length)
-{
-	fprintf(f, "CopyBothResponse\t");
-	pqTraceOutputByte1(f, message, cursor);
-
-	while (length > *cursor)
-		pqTraceOutputInt16(f, message, cursor);
-}
-
-/* ReadyForQuery */
-static void
-pqTraceOutputZ(FILE *f, const char *message, int *cursor)
-{
-	fprintf(f, "ReadyForQuery\t");
-	pqTraceOutputByte1(f, message, cursor);
-}
-
-/*
- * Print the given message to the trace output stream.
- */
-void
-pqTraceOutputMessage(PGconn *conn, const char *message, bool toServer)
-{
-	char		id;
-	int			length;
-	char	   *prefix = toServer ? "F" : "B";
-	int			logCursor = 0;
-	bool		regress;
-
-	if ((conn->traceFlags & PQTRACE_SUPPRESS_TIMESTAMPS) == 0)
-	{
-		char		timestr[128];
-
-		pqTraceFormatTimestamp(timestr, sizeof(timestr));
-		fprintf(conn->Pfdebug, "%s\t", timestr);
-	}
-	regress = (conn->traceFlags & PQTRACE_REGRESS_MODE) != 0;
-
-	id = message[logCursor++];
-
-	memcpy(&length, message + logCursor, 4);
-	length = (int) pg_ntoh32(length);
-	logCursor += 4;
-
-	/*
-	 * In regress mode, suppress the length of ErrorResponse and
-	 * NoticeResponse.  The F (file name), L (line number) and R (routine
-	 * name) fields can change as server code is modified, and if their
-	 * lengths differ from the originals, that would break tests.
-	 */
-	if (regress && !toServer && (id == 'E' || id == 'N'))
-		fprintf(conn->Pfdebug, "%s\tNN\t", prefix);
-	else
-		fprintf(conn->Pfdebug, "%s\t%d\t", prefix, length);
-
-	switch (id)
-	{
-		case '1':
-			fprintf(conn->Pfdebug, "ParseComplete");
-			/* No message content */
-			break;
-		case '2':
-			fprintf(conn->Pfdebug, "BindComplete");
-			/* No message content */
-			break;
-		case '3':
-			fprintf(conn->Pfdebug, "CloseComplete");
-			/* No message content */
-			break;
-		case 'A':				/* Notification Response */
-			pqTraceOutputA(conn->Pfdebug, message, &logCursor, regress);
-			break;
-		case 'B':				/* Bind */
-			pqTraceOutputB(conn->Pfdebug, message, &logCursor);
-			break;
-		case 'c':
-			fprintf(conn->Pfdebug, "CopyDone");
-			/* No message content */
-			break;
-		case 'C':				/* Close(F) or Command Complete(B) */
-			pqTraceOutputC(conn->Pfdebug, toServer, message, &logCursor);
-			break;
-		case 'd':				/* Copy Data */
-			/* Drop COPY data to reduce the overhead of logging. */
-			break;
-		case 'D':				/* Describe(F) or Data Row(B) */
-			pqTraceOutputD(conn->Pfdebug, toServer, message, &logCursor);
-			break;
-		case 'E':				/* Execute(F) or Error Response(B) */
-			pqTraceOutputE(conn->Pfdebug, toServer, message, &logCursor,
-						   regress);
-			break;
-		case 'f':				/* Copy Fail */
-			pqTraceOutputf(conn->Pfdebug, message, &logCursor);
-			break;
-		case 'F':				/* Function Call */
-			pqTraceOutputF(conn->Pfdebug, message, &logCursor, regress);
-			break;
-		case 'G':				/* Start Copy In */
-			pqTraceOutputG(conn->Pfdebug, message, &logCursor);
-			break;
-		case 'H':				/* Flush(F) or Start Copy Out(B) */
-			if (!toServer)
-				pqTraceOutputH(conn->Pfdebug, message, &logCursor);
-			else
-				fprintf(conn->Pfdebug, "Flush");	/* no message content */
-			break;
-		case 'I':
-			fprintf(conn->Pfdebug, "EmptyQueryResponse");
-			/* No message content */
-			break;
-		case 'K':				/* secret key data from the backend */
-			pqTraceOutputK(conn->Pfdebug, message, &logCursor, regress);
-			break;
-		case 'n':
-			fprintf(conn->Pfdebug, "NoData");
-			/* No message content */
-			break;
-		case 'N':
-			pqTraceOutputNR(conn->Pfdebug, "NoticeResponse", message,
-							&logCursor, regress);
-			break;
-		case 'P':				/* Parse */
-			pqTraceOutputP(conn->Pfdebug, message, &logCursor, regress);
-			break;
-		case 'Q':				/* Query */
-			pqTraceOutputQ(conn->Pfdebug, message, &logCursor);
-			break;
-		case 'R':				/* Authentication */
-			pqTraceOutputR(conn->Pfdebug, message, &logCursor);
-			break;
-		case 's':
-			fprintf(conn->Pfdebug, "PortalSuspended");
-			/* No message content */
-			break;
-		case 'S':				/* Parameter Status(B) or Sync(F) */
-			if (!toServer)
-				pqTraceOutputS(conn->Pfdebug, message, &logCursor);
-			else
-				fprintf(conn->Pfdebug, "Sync"); /* no message content */
-			break;
-		case 't':				/* Parameter Description */
-			pqTraceOutputt(conn->Pfdebug, message, &logCursor, regress);
-			break;
-		case 'T':				/* Row Description */
-			pqTraceOutputT(conn->Pfdebug, message, &logCursor, regress);
-			break;
-		case 'v':				/* Negotiate Protocol Version */
-			pqTraceOutputv(conn->Pfdebug, message, &logCursor);
-			break;
-		case 'V':				/* Function Call response */
-			pqTraceOutputV(conn->Pfdebug, message, &logCursor);
-			break;
-		case 'W':				/* Start Copy Both */
-			pqTraceOutputW(conn->Pfdebug, message, &logCursor, length);
-			break;
-		case 'X':
-			fprintf(conn->Pfdebug, "Terminate");
-			/* No message content */
-			break;
-		case 'Z':				/* Ready For Query */
-			pqTraceOutputZ(conn->Pfdebug, message, &logCursor);
-			break;
-		default:
-			fprintf(conn->Pfdebug, "Unknown message: %02x", id);
-			break;
-	}
-
-	fputc('\n', conn->Pfdebug);
-
-	/*
-	 * Verify the printing routine did it right.  Note that the one-byte
-	 * message identifier is not included in the length, but our cursor does
-	 * include it.
-	 */
-	if (logCursor - 1 != length)
-		fprintf(conn->Pfdebug,
-				"mismatched message length: consumed %d, expected %d\n",
-				logCursor - 1, length);
-}
-
-/*
- * Print special messages (those containing no type byte) to the trace output
- * stream.
- */
-void
-pqTraceOutputNoTypeByteMessage(PGconn *conn, const char *message)
-{
-	int			length;
-	int			logCursor = 0;
-
-	if ((conn->traceFlags & PQTRACE_SUPPRESS_TIMESTAMPS) == 0)
-	{
-		char		timestr[128];
-
-		pqTraceFormatTimestamp(timestr, sizeof(timestr));
-		fprintf(conn->Pfdebug, "%s\t", timestr);
-	}
-
-	memcpy(&length, message + logCursor, 4);
-	length = (int) pg_ntoh32(length);
-	logCursor += 4;
-
-	fprintf(conn->Pfdebug, "F\t%d\t", length);
-
-	switch (length)
-	{
-		case 16:				/* CancelRequest */
-			fprintf(conn->Pfdebug, "CancelRequest\t");
-			pqTraceOutputInt32(conn->Pfdebug, message, &logCursor, false);
-			pqTraceOutputInt32(conn->Pfdebug, message, &logCursor, false);
-			pqTraceOutputInt32(conn->Pfdebug, message, &logCursor, false);
-			break;
-		case 8:					/* GSSENCRequest or SSLRequest */
-			/* These messages do not reach here. */
-		default:
-			fprintf(conn->Pfdebug, "Unknown message: length is %d", length);
-			break;
-	}
-
-	fputc('\n', conn->Pfdebug);
-}
diff --git a/contrib/libs/libpq/src/interfaces/libpq/libpq-events.c b/contrib/libs/libpq/src/interfaces/libpq/libpq-events.c
deleted file mode 100644
index 229bed910f..0000000000
--- a/contrib/libs/libpq/src/interfaces/libpq/libpq-events.c
+++ /dev/null
@@ -1,211 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * libpq-events.c
- *	  functions for supporting the libpq "events" API
- *
- * Portions Copyright (c) 1996-2023, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- *
- * IDENTIFICATION
- *	  src/interfaces/libpq/libpq-events.c
- *
- *-------------------------------------------------------------------------
- */
-#include "postgres_fe.h"
-
-#include "libpq-fe.h"
-#include "libpq-int.h"
-
-
-/*
- * Registers an event proc with the given PGconn.
- *
- * The same proc can't be registered more than once in a PGconn.  This
- * restriction is required because we use the proc address to identify
- * the event for purposes such as PQinstanceData().
- *
- * The name argument is used within error messages to aid in debugging.
- * A name must be supplied, but it needn't be unique.  The string is
- * copied, so the passed value needn't be long-lived.
- *
- * The passThrough argument is an application specific pointer and can be set
- * to NULL if not required.  It is passed through to the event proc whenever
- * the event proc is called, and is not otherwise touched by libpq.
- *
- * The function returns a non-zero if successful.  If the function fails,
- * zero is returned.
- */
-int
-PQregisterEventProc(PGconn *conn, PGEventProc proc,
-					const char *name, void *passThrough)
-{
-	int			i;
-	PGEventRegister regevt;
-
-	if (!proc || !conn || !name || !*name)
-		return false;			/* bad arguments */
-
-	for (i = 0; i < conn->nEvents; i++)
-	{
-		if (conn->events[i].proc == proc)
-			return false;		/* already registered */
-	}
-
-	if (conn->nEvents >= conn->eventArraySize)
-	{
-		PGEvent    *e;
-		int			newSize;
-
-		newSize = conn->eventArraySize ? conn->eventArraySize * 2 : 8;
-		if (conn->events)
-			e = (PGEvent *) realloc(conn->events, newSize * sizeof(PGEvent));
-		else
-			e = (PGEvent *) malloc(newSize * sizeof(PGEvent));
-
-		if (!e)
-			return false;
-
-		conn->eventArraySize = newSize;
-		conn->events = e;
-	}
-
-	conn->events[conn->nEvents].proc = proc;
-	conn->events[conn->nEvents].name = strdup(name);
-	if (!conn->events[conn->nEvents].name)
-		return false;
-	conn->events[conn->nEvents].passThrough = passThrough;
-	conn->events[conn->nEvents].data = NULL;
-	conn->events[conn->nEvents].resultInitialized = false;
-	conn->nEvents++;
-
-	regevt.conn = conn;
-	if (!proc(PGEVT_REGISTER, &regevt, passThrough))
-	{
-		conn->nEvents--;
-		free(conn->events[conn->nEvents].name);
-		return false;
-	}
-
-	return true;
-}
-
-/*
- * Set some "instance data" for an event within a PGconn.
- * Returns nonzero on success, zero on failure.
- */
-int
-PQsetInstanceData(PGconn *conn, PGEventProc proc, void *data)
-{
-	int			i;
-
-	if (!conn || !proc)
-		return false;
-
-	for (i = 0; i < conn->nEvents; i++)
-	{
-		if (conn->events[i].proc == proc)
-		{
-			conn->events[i].data = data;
-			return true;
-		}
-	}
-
-	return false;
-}
-
-/*
- * Obtain the "instance data", if any, for the event.
- */
-void *
-PQinstanceData(const PGconn *conn, PGEventProc proc)
-{
-	int			i;
-
-	if (!conn || !proc)
-		return NULL;
-
-	for (i = 0; i < conn->nEvents; i++)
-	{
-		if (conn->events[i].proc == proc)
-			return conn->events[i].data;
-	}
-
-	return NULL;
-}
-
-/*
- * Set some "instance data" for an event within a PGresult.
- * Returns nonzero on success, zero on failure.
- */
-int
-PQresultSetInstanceData(PGresult *result, PGEventProc proc, void *data)
-{
-	int			i;
-
-	if (!result || !proc)
-		return false;
-
-	for (i = 0; i < result->nEvents; i++)
-	{
-		if (result->events[i].proc == proc)
-		{
-			result->events[i].data = data;
-			return true;
-		}
-	}
-
-	return false;
-}
-
-/*
- * Obtain the "instance data", if any, for the event.
- */
-void *
-PQresultInstanceData(const PGresult *result, PGEventProc proc)
-{
-	int			i;
-
-	if (!result || !proc)
-		return NULL;
-
-	for (i = 0; i < result->nEvents; i++)
-		if (result->events[i].proc == proc)
-			return result->events[i].data;
-
-	return NULL;
-}
-
-/*
- * Fire RESULTCREATE events for an application-created PGresult.
- *
- * The conn argument can be NULL if event procedures won't use it.
- */
-int
-PQfireResultCreateEvents(PGconn *conn, PGresult *res)
-{
-	int			result = true;
-	int			i;
-
-	if (!res)
-		return false;
-
-	for (i = 0; i < res->nEvents; i++)
-	{
-		/* It's possible event was already fired, if so don't repeat it */
-		if (!res->events[i].resultInitialized)
-		{
-			PGEventResultCreate evt;
-
-			evt.conn = conn;
-			evt.result = res;
-			if (res->events[i].proc(PGEVT_RESULTCREATE, &evt,
-									res->events[i].passThrough))
-				res->events[i].resultInitialized = true;
-			else
-				result = false;
-		}
-	}
-
-	return result;
-}
diff --git a/contrib/libs/libpq/src/interfaces/libpq/libpq-events.h b/contrib/libs/libpq/src/interfaces/libpq/libpq-events.h
deleted file mode 100644
index b9d5137634..0000000000
--- a/contrib/libs/libpq/src/interfaces/libpq/libpq-events.h
+++ /dev/null
@@ -1,94 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * libpq-events.h
- *	  This file contains definitions that are useful to applications
- *	  that invoke the libpq "events" API, but are not interesting to
- *	  ordinary users of libpq.
- *
- * Portions Copyright (c) 1996-2023, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- * src/interfaces/libpq/libpq-events.h
- *
- *-------------------------------------------------------------------------
- */
-
-#ifndef LIBPQ_EVENTS_H
-#define LIBPQ_EVENTS_H
-
-#include "libpq-fe.h"
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-
-/* Callback Event Ids */
-typedef enum
-{
-	PGEVT_REGISTER,
-	PGEVT_CONNRESET,
-	PGEVT_CONNDESTROY,
-	PGEVT_RESULTCREATE,
-	PGEVT_RESULTCOPY,
-	PGEVT_RESULTDESTROY
-} PGEventId;
-
-typedef struct
-{
-	PGconn	   *conn;
-} PGEventRegister;
-
-typedef struct
-{
-	PGconn	   *conn;
-} PGEventConnReset;
-
-typedef struct
-{
-	PGconn	   *conn;
-} PGEventConnDestroy;
-
-typedef struct
-{
-	PGconn	   *conn;
-	PGresult   *result;
-} PGEventResultCreate;
-
-typedef struct
-{
-	const PGresult *src;
-	PGresult   *dest;
-} PGEventResultCopy;
-
-typedef struct
-{
-	PGresult   *result;
-} PGEventResultDestroy;
-
-typedef int (*PGEventProc) (PGEventId evtId, void *evtInfo, void *passThrough);
-
-/* Registers an event proc with the given PGconn. */
-extern int	PQregisterEventProc(PGconn *conn, PGEventProc proc,
-								const char *name, void *passThrough);
-
-/* Sets the PGconn instance data for the provided proc to data. */
-extern int	PQsetInstanceData(PGconn *conn, PGEventProc proc, void *data);
-
-/* Gets the PGconn instance data for the provided proc. */
-extern void *PQinstanceData(const PGconn *conn, PGEventProc proc);
-
-/* Sets the PGresult instance data for the provided proc to data. */
-extern int	PQresultSetInstanceData(PGresult *result, PGEventProc proc, void *data);
-
-/* Gets the PGresult instance data for the provided proc. */
-extern void *PQresultInstanceData(const PGresult *result, PGEventProc proc);
-
-/* Fires RESULTCREATE events for an application-created PGresult. */
-extern int	PQfireResultCreateEvents(PGconn *conn, PGresult *res);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif							/* LIBPQ_EVENTS_H */
diff --git a/contrib/libs/libpq/src/interfaces/libpq/libpq-fe.h b/contrib/libs/libpq/src/interfaces/libpq/libpq-fe.h
deleted file mode 100644
index 7476dbe0e9..0000000000
--- a/contrib/libs/libpq/src/interfaces/libpq/libpq-fe.h
+++ /dev/null
@@ -1,675 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * libpq-fe.h
- *	  This file contains definitions for structures and
- *	  externs for functions used by frontend postgres applications.
- *
- * Portions Copyright (c) 1996-2023, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- * src/interfaces/libpq/libpq-fe.h
- *
- *-------------------------------------------------------------------------
- */
-
-#ifndef LIBPQ_FE_H
-#define LIBPQ_FE_H
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-
-#include <stdio.h>
-
-/*
- * postgres_ext.h defines the backend's externally visible types,
- * such as Oid.
- */
-#include "postgres_ext.h"
-
-/*
- * These symbols may be used in compile-time #ifdef tests for the availability
- * of newer libpq features.
- */
-/* Indicates presence of PQenterPipelineMode and friends */
-#define LIBPQ_HAS_PIPELINING 1
-/* Indicates presence of PQsetTraceFlags; also new PQtrace output format */
-#define LIBPQ_HAS_TRACE_FLAGS 1
-/* Indicates that PQsslAttribute(NULL, "library") is useful */
-#define LIBPQ_HAS_SSL_LIBRARY_DETECTION 1
-
-/*
- * Option flags for PQcopyResult
- */
-#define PG_COPYRES_ATTRS		  0x01
-#define PG_COPYRES_TUPLES		  0x02	/* Implies PG_COPYRES_ATTRS */
-#define PG_COPYRES_EVENTS		  0x04
-#define PG_COPYRES_NOTICEHOOKS	  0x08
-
-/* Application-visible enum types */
-
-/*
- * Although it is okay to add to these lists, values which become unused
- * should never be removed, nor should constants be redefined - that would
- * break compatibility with existing code.
- */
-
-typedef enum
-{
-	CONNECTION_OK,
-	CONNECTION_BAD,
-	/* Non-blocking mode only below here */
-
-	/*
-	 * The existence of these should never be relied upon - they should only
-	 * be used for user feedback or similar purposes.
-	 */
-	CONNECTION_STARTED,			/* Waiting for connection to be made.  */
-	CONNECTION_MADE,			/* Connection OK; waiting to send.     */
-	CONNECTION_AWAITING_RESPONSE,	/* Waiting for a response from the
-									 * postmaster.        */
-	CONNECTION_AUTH_OK,			/* Received authentication; waiting for
-								 * backend startup. */
-	CONNECTION_SETENV,			/* This state is no longer used. */
-	CONNECTION_SSL_STARTUP,		/* Negotiating SSL. */
-	CONNECTION_NEEDED,			/* Internal state: connect() needed */
-	CONNECTION_CHECK_WRITABLE,	/* Checking if session is read-write. */
-	CONNECTION_CONSUME,			/* Consuming any extra messages. */
-	CONNECTION_GSS_STARTUP,		/* Negotiating GSSAPI. */
-	CONNECTION_CHECK_TARGET,	/* Checking target server properties. */
-	CONNECTION_CHECK_STANDBY	/* Checking if server is in standby mode. */
-} ConnStatusType;
-
-typedef enum
-{
-	PGRES_POLLING_FAILED = 0,
-	PGRES_POLLING_READING,		/* These two indicate that one may	  */
-	PGRES_POLLING_WRITING,		/* use select before polling again.   */
-	PGRES_POLLING_OK,
-	PGRES_POLLING_ACTIVE		/* unused; keep for awhile for backwards
-								 * compatibility */
-} PostgresPollingStatusType;
-
-typedef enum
-{
-	PGRES_EMPTY_QUERY = 0,		/* empty query string was executed */
-	PGRES_COMMAND_OK,			/* a query command that doesn't return
-								 * anything was executed properly by the
-								 * backend */
-	PGRES_TUPLES_OK,			/* a query command that returns tuples was
-								 * executed properly by the backend, PGresult
-								 * contains the result tuples */
-	PGRES_COPY_OUT,				/* Copy Out data transfer in progress */
-	PGRES_COPY_IN,				/* Copy In data transfer in progress */
-	PGRES_BAD_RESPONSE,			/* an unexpected response was recv'd from the
-								 * backend */
-	PGRES_NONFATAL_ERROR,		/* notice or warning message */
-	PGRES_FATAL_ERROR,			/* query failed */
-	PGRES_COPY_BOTH,			/* Copy In/Out data transfer in progress */
-	PGRES_SINGLE_TUPLE,			/* single tuple from larger resultset */
-	PGRES_PIPELINE_SYNC,		/* pipeline synchronization point */
-	PGRES_PIPELINE_ABORTED		/* Command didn't run because of an abort
-								 * earlier in a pipeline */
-} ExecStatusType;
-
-typedef enum
-{
-	PQTRANS_IDLE,				/* connection idle */
-	PQTRANS_ACTIVE,				/* command in progress */
-	PQTRANS_INTRANS,			/* idle, within transaction block */
-	PQTRANS_INERROR,			/* idle, within failed transaction */
-	PQTRANS_UNKNOWN				/* cannot determine status */
-} PGTransactionStatusType;
-
-typedef enum
-{
-	PQERRORS_TERSE,				/* single-line error messages */
-	PQERRORS_DEFAULT,			/* recommended style */
-	PQERRORS_VERBOSE,			/* all the facts, ma'am */
-	PQERRORS_SQLSTATE			/* only error severity and SQLSTATE code */
-} PGVerbosity;
-
-typedef enum
-{
-	PQSHOW_CONTEXT_NEVER,		/* never show CONTEXT field */
-	PQSHOW_CONTEXT_ERRORS,		/* show CONTEXT for errors only (default) */
-	PQSHOW_CONTEXT_ALWAYS		/* always show CONTEXT field */
-} PGContextVisibility;
-
-/*
- * PGPing - The ordering of this enum should not be altered because the
- * values are exposed externally via pg_isready.
- */
-
-typedef enum
-{
-	PQPING_OK,					/* server is accepting connections */
-	PQPING_REJECT,				/* server is alive but rejecting connections */
-	PQPING_NO_RESPONSE,			/* could not establish connection */
-	PQPING_NO_ATTEMPT			/* connection not attempted (bad params) */
-} PGPing;
-
-/*
- * PGpipelineStatus - Current status of pipeline mode
- */
-typedef enum
-{
-	PQ_PIPELINE_OFF,
-	PQ_PIPELINE_ON,
-	PQ_PIPELINE_ABORTED
-} PGpipelineStatus;
-
-/* PGconn encapsulates a connection to the backend.
- * The contents of this struct are not supposed to be known to applications.
- */
-typedef struct pg_conn PGconn;
-
-/* PGresult encapsulates the result of a query (or more precisely, of a single
- * SQL command --- a query string given to PQsendQuery can contain multiple
- * commands and thus return multiple PGresult objects).
- * The contents of this struct are not supposed to be known to applications.
- */
-typedef struct pg_result PGresult;
-
-/* PGcancel encapsulates the information needed to cancel a running
- * query on an existing connection.
- * The contents of this struct are not supposed to be known to applications.
- */
-typedef struct pg_cancel PGcancel;
-
-/* PGnotify represents the occurrence of a NOTIFY message.
- * Ideally this would be an opaque typedef, but it's so simple that it's
- * unlikely to change.
- * NOTE: in Postgres 6.4 and later, the be_pid is the notifying backend's,
- * whereas in earlier versions it was always your own backend's PID.
- */
-typedef struct pgNotify
-{
-	char	   *relname;		/* notification condition name */
-	int			be_pid;			/* process ID of notifying server process */
-	char	   *extra;			/* notification parameter */
-	/* Fields below here are private to libpq; apps should not use 'em */
-	struct pgNotify *next;		/* list link */
-} PGnotify;
-
-/* Function types for notice-handling callbacks */
-typedef void (*PQnoticeReceiver) (void *arg, const PGresult *res);
-typedef void (*PQnoticeProcessor) (void *arg, const char *message);
-
-/* Print options for PQprint() */
-typedef char pqbool;
-
-typedef struct _PQprintOpt
-{
-	pqbool		header;			/* print output field headings and row count */
-	pqbool		align;			/* fill align the fields */
-	pqbool		standard;		/* old brain dead format */
-	pqbool		html3;			/* output html tables */
-	pqbool		expanded;		/* expand tables */
-	pqbool		pager;			/* use pager for output if needed */
-	char	   *fieldSep;		/* field separator */
-	char	   *tableOpt;		/* insert to HTML <table ...> */
-	char	   *caption;		/* HTML <caption> */
-	char	  **fieldName;		/* null terminated array of replacement field
-								 * names */
-} PQprintOpt;
-
-/* ----------------
- * Structure for the conninfo parameter definitions returned by PQconndefaults
- * or PQconninfoParse.
- *
- * All fields except "val" point at static strings which must not be altered.
- * "val" is either NULL or a malloc'd current-value string.  PQconninfoFree()
- * will release both the val strings and the PQconninfoOption array itself.
- * ----------------
- */
-typedef struct _PQconninfoOption
-{
-	char	   *keyword;		/* The keyword of the option			*/
-	char	   *envvar;			/* Fallback environment variable name	*/
-	char	   *compiled;		/* Fallback compiled in default value	*/
-	char	   *val;			/* Option's current value, or NULL		 */
-	char	   *label;			/* Label for field in connect dialog	*/
-	char	   *dispchar;		/* Indicates how to display this field in a
-								 * connect dialog. Values are: "" Display
-								 * entered value as is "*" Password field -
-								 * hide value "D"  Debug option - don't show
-								 * by default */
-	int			dispsize;		/* Field size in characters for dialog	*/
-} PQconninfoOption;
-
-/* ----------------
- * PQArgBlock -- structure for PQfn() arguments
- * ----------------
- */
-typedef struct
-{
-	int			len;
-	int			isint;
-	union
-	{
-		int		   *ptr;		/* can't use void (dec compiler barfs)	 */
-		int			integer;
-	}			u;
-} PQArgBlock;
-
-/* ----------------
- * PGresAttDesc -- Data about a single attribute (column) of a query result
- * ----------------
- */
-typedef struct pgresAttDesc
-{
-	char	   *name;			/* column name */
-	Oid			tableid;		/* source table, if known */
-	int			columnid;		/* source column, if known */
-	int			format;			/* format code for value (text/binary) */
-	Oid			typid;			/* type id */
-	int			typlen;			/* type size */
-	int			atttypmod;		/* type-specific modifier info */
-} PGresAttDesc;
-
-/* ----------------
- * Exported functions of libpq
- * ----------------
- */
-
-/* === in fe-connect.c === */
-
-/* make a new client connection to the backend */
-/* Asynchronous (non-blocking) */
-extern PGconn *PQconnectStart(const char *conninfo);
-extern PGconn *PQconnectStartParams(const char *const *keywords,
-									const char *const *values, int expand_dbname);
-extern PostgresPollingStatusType PQconnectPoll(PGconn *conn);
-
-/* Synchronous (blocking) */
-extern PGconn *PQconnectdb(const char *conninfo);
-extern PGconn *PQconnectdbParams(const char *const *keywords,
-								 const char *const *values, int expand_dbname);
-extern PGconn *PQsetdbLogin(const char *pghost, const char *pgport,
-							const char *pgoptions, const char *pgtty,
-							const char *dbName,
-							const char *login, const char *pwd);
-
-#define PQsetdb(M_PGHOST,M_PGPORT,M_PGOPT,M_PGTTY,M_DBNAME)  \
-	PQsetdbLogin(M_PGHOST, M_PGPORT, M_PGOPT, M_PGTTY, M_DBNAME, NULL, NULL)
-
-/* close the current connection and free the PGconn data structure */
-extern void PQfinish(PGconn *conn);
-
-/* get info about connection options known to PQconnectdb */
-extern PQconninfoOption *PQconndefaults(void);
-
-/* parse connection options in same way as PQconnectdb */
-extern PQconninfoOption *PQconninfoParse(const char *conninfo, char **errmsg);
-
-/* return the connection options used by a live connection */
-extern PQconninfoOption *PQconninfo(PGconn *conn);
-
-/* free the data structure returned by PQconndefaults() or PQconninfoParse() */
-extern void PQconninfoFree(PQconninfoOption *connOptions);
-
-/*
- * close the current connection and reestablish a new one with the same
- * parameters
- */
-/* Asynchronous (non-blocking) */
-extern int	PQresetStart(PGconn *conn);
-extern PostgresPollingStatusType PQresetPoll(PGconn *conn);
-
-/* Synchronous (blocking) */
-extern void PQreset(PGconn *conn);
-
-/* request a cancel structure */
-extern PGcancel *PQgetCancel(PGconn *conn);
-
-/* free a cancel structure */
-extern void PQfreeCancel(PGcancel *cancel);
-
-/* issue a cancel request */
-extern int	PQcancel(PGcancel *cancel, char *errbuf, int errbufsize);
-
-/* backwards compatible version of PQcancel; not thread-safe */
-extern int	PQrequestCancel(PGconn *conn);
-
-/* Accessor functions for PGconn objects */
-extern char *PQdb(const PGconn *conn);
-extern char *PQuser(const PGconn *conn);
-extern char *PQpass(const PGconn *conn);
-extern char *PQhost(const PGconn *conn);
-extern char *PQhostaddr(const PGconn *conn);
-extern char *PQport(const PGconn *conn);
-extern char *PQtty(const PGconn *conn);
-extern char *PQoptions(const PGconn *conn);
-extern ConnStatusType PQstatus(const PGconn *conn);
-extern PGTransactionStatusType PQtransactionStatus(const PGconn *conn);
-extern const char *PQparameterStatus(const PGconn *conn,
-									 const char *paramName);
-extern int	PQprotocolVersion(const PGconn *conn);
-extern int	PQserverVersion(const PGconn *conn);
-extern char *PQerrorMessage(const PGconn *conn);
-extern int	PQsocket(const PGconn *conn);
-extern int	PQbackendPID(const PGconn *conn);
-extern PGpipelineStatus PQpipelineStatus(const PGconn *conn);
-extern int	PQconnectionNeedsPassword(const PGconn *conn);
-extern int	PQconnectionUsedPassword(const PGconn *conn);
-extern int	PQconnectionUsedGSSAPI(const PGconn *conn);
-extern int	PQclientEncoding(const PGconn *conn);
-extern int	PQsetClientEncoding(PGconn *conn, const char *encoding);
-
-/* SSL information functions */
-extern int	PQsslInUse(PGconn *conn);
-extern void *PQsslStruct(PGconn *conn, const char *struct_name);
-extern const char *PQsslAttribute(PGconn *conn, const char *attribute_name);
-extern const char *const *PQsslAttributeNames(PGconn *conn);
-
-/* Get the OpenSSL structure associated with a connection. Returns NULL for
- * unencrypted connections or if any other TLS library is in use. */
-extern void *PQgetssl(PGconn *conn);
-
-/* Tell libpq whether it needs to initialize OpenSSL */
-extern void PQinitSSL(int do_init);
-
-/* More detailed way to tell libpq whether it needs to initialize OpenSSL */
-extern void PQinitOpenSSL(int do_ssl, int do_crypto);
-
-/* Return true if GSSAPI encryption is in use */
-extern int	PQgssEncInUse(PGconn *conn);
-
-/* Returns GSSAPI context if GSSAPI is in use */
-extern void *PQgetgssctx(PGconn *conn);
-
-/* Set verbosity for PQerrorMessage and PQresultErrorMessage */
-extern PGVerbosity PQsetErrorVerbosity(PGconn *conn, PGVerbosity verbosity);
-
-/* Set CONTEXT visibility for PQerrorMessage and PQresultErrorMessage */
-extern PGContextVisibility PQsetErrorContextVisibility(PGconn *conn,
-													   PGContextVisibility show_context);
-
-/* Override default notice handling routines */
-extern PQnoticeReceiver PQsetNoticeReceiver(PGconn *conn,
-											PQnoticeReceiver proc,
-											void *arg);
-extern PQnoticeProcessor PQsetNoticeProcessor(PGconn *conn,
-											  PQnoticeProcessor proc,
-											  void *arg);
-
-/*
- *	   Used to set callback that prevents concurrent access to
- *	   non-thread safe functions that libpq needs.
- *	   The default implementation uses a libpq internal mutex.
- *	   Only required for multithreaded apps that use kerberos
- *	   both within their app and for postgresql connections.
- */
-typedef void (*pgthreadlock_t) (int acquire);
-
-extern pgthreadlock_t PQregisterThreadLock(pgthreadlock_t newhandler);
-
-/* === in fe-trace.c === */
-extern void PQtrace(PGconn *conn, FILE *debug_port);
-extern void PQuntrace(PGconn *conn);
-
-/* flags controlling trace output: */
-/* omit timestamps from each line */
-#define PQTRACE_SUPPRESS_TIMESTAMPS		(1<<0)
-/* redact portions of some messages, for testing frameworks */
-#define PQTRACE_REGRESS_MODE			(1<<1)
-extern void PQsetTraceFlags(PGconn *conn, int flags);
-
-/* === in fe-exec.c === */
-
-/* Simple synchronous query */
-extern PGresult *PQexec(PGconn *conn, const char *query);
-extern PGresult *PQexecParams(PGconn *conn,
-							  const char *command,
-							  int nParams,
-							  const Oid *paramTypes,
-							  const char *const *paramValues,
-							  const int *paramLengths,
-							  const int *paramFormats,
-							  int resultFormat);
-extern PGresult *PQprepare(PGconn *conn, const char *stmtName,
-						   const char *query, int nParams,
-						   const Oid *paramTypes);
-extern PGresult *PQexecPrepared(PGconn *conn,
-								const char *stmtName,
-								int nParams,
-								const char *const *paramValues,
-								const int *paramLengths,
-								const int *paramFormats,
-								int resultFormat);
-
-/* Interface for multiple-result or asynchronous queries */
-#define PQ_QUERY_PARAM_MAX_LIMIT 65535
-
-extern int	PQsendQuery(PGconn *conn, const char *query);
-extern int	PQsendQueryParams(PGconn *conn,
-							  const char *command,
-							  int nParams,
-							  const Oid *paramTypes,
-							  const char *const *paramValues,
-							  const int *paramLengths,
-							  const int *paramFormats,
-							  int resultFormat);
-extern int	PQsendPrepare(PGconn *conn, const char *stmtName,
-						  const char *query, int nParams,
-						  const Oid *paramTypes);
-extern int	PQsendQueryPrepared(PGconn *conn,
-								const char *stmtName,
-								int nParams,
-								const char *const *paramValues,
-								const int *paramLengths,
-								const int *paramFormats,
-								int resultFormat);
-extern int	PQsetSingleRowMode(PGconn *conn);
-extern PGresult *PQgetResult(PGconn *conn);
-
-/* Routines for managing an asynchronous query */
-extern int	PQisBusy(PGconn *conn);
-extern int	PQconsumeInput(PGconn *conn);
-
-/* Routines for pipeline mode management */
-extern int	PQenterPipelineMode(PGconn *conn);
-extern int	PQexitPipelineMode(PGconn *conn);
-extern int	PQpipelineSync(PGconn *conn);
-extern int	PQsendFlushRequest(PGconn *conn);
-
-/* LISTEN/NOTIFY support */
-extern PGnotify *PQnotifies(PGconn *conn);
-
-/* Routines for copy in/out */
-extern int	PQputCopyData(PGconn *conn, const char *buffer, int nbytes);
-extern int	PQputCopyEnd(PGconn *conn, const char *errormsg);
-extern int	PQgetCopyData(PGconn *conn, char **buffer, int async);
-
-/* Deprecated routines for copy in/out */
-extern int	PQgetline(PGconn *conn, char *buffer, int length);
-extern int	PQputline(PGconn *conn, const char *string);
-extern int	PQgetlineAsync(PGconn *conn, char *buffer, int bufsize);
-extern int	PQputnbytes(PGconn *conn, const char *buffer, int nbytes);
-extern int	PQendcopy(PGconn *conn);
-
-/* Set blocking/nonblocking connection to the backend */
-extern int	PQsetnonblocking(PGconn *conn, int arg);
-extern int	PQisnonblocking(const PGconn *conn);
-extern int	PQisthreadsafe(void);
-extern PGPing PQping(const char *conninfo);
-extern PGPing PQpingParams(const char *const *keywords,
-						   const char *const *values, int expand_dbname);
-
-/* Force the write buffer to be written (or at least try) */
-extern int	PQflush(PGconn *conn);
-
-/*
- * "Fast path" interface --- not really recommended for application
- * use
- */
-extern PGresult *PQfn(PGconn *conn,
-					  int fnid,
-					  int *result_buf,
-					  int *result_len,
-					  int result_is_int,
-					  const PQArgBlock *args,
-					  int nargs);
-
-/* Accessor functions for PGresult objects */
-extern ExecStatusType PQresultStatus(const PGresult *res);
-extern char *PQresStatus(ExecStatusType status);
-extern char *PQresultErrorMessage(const PGresult *res);
-extern char *PQresultVerboseErrorMessage(const PGresult *res,
-										 PGVerbosity verbosity,
-										 PGContextVisibility show_context);
-extern char *PQresultErrorField(const PGresult *res, int fieldcode);
-extern int	PQntuples(const PGresult *res);
-extern int	PQnfields(const PGresult *res);
-extern int	PQbinaryTuples(const PGresult *res);
-extern char *PQfname(const PGresult *res, int field_num);
-extern int	PQfnumber(const PGresult *res, const char *field_name);
-extern Oid	PQftable(const PGresult *res, int field_num);
-extern int	PQftablecol(const PGresult *res, int field_num);
-extern int	PQfformat(const PGresult *res, int field_num);
-extern Oid	PQftype(const PGresult *res, int field_num);
-extern int	PQfsize(const PGresult *res, int field_num);
-extern int	PQfmod(const PGresult *res, int field_num);
-extern char *PQcmdStatus(PGresult *res);
-extern char *PQoidStatus(const PGresult *res);	/* old and ugly */
-extern Oid	PQoidValue(const PGresult *res);	/* new and improved */
-extern char *PQcmdTuples(PGresult *res);
-extern char *PQgetvalue(const PGresult *res, int tup_num, int field_num);
-extern int	PQgetlength(const PGresult *res, int tup_num, int field_num);
-extern int	PQgetisnull(const PGresult *res, int tup_num, int field_num);
-extern int	PQnparams(const PGresult *res);
-extern Oid	PQparamtype(const PGresult *res, int param_num);
-
-/* Describe prepared statements and portals */
-extern PGresult *PQdescribePrepared(PGconn *conn, const char *stmt);
-extern PGresult *PQdescribePortal(PGconn *conn, const char *portal);
-extern int	PQsendDescribePrepared(PGconn *conn, const char *stmt);
-extern int	PQsendDescribePortal(PGconn *conn, const char *portal);
-
-/* Delete a PGresult */
-extern void PQclear(PGresult *res);
-
-/* For freeing other alloc'd results, such as PGnotify structs */
-extern void PQfreemem(void *ptr);
-
-/* Exists for backward compatibility.  bjm 2003-03-24 */
-#define PQfreeNotify(ptr) PQfreemem(ptr)
-
-/* Error when no password was given. */
-/* Note: depending on this is deprecated; use PQconnectionNeedsPassword(). */
-#define PQnoPasswordSupplied	"fe_sendauth: no password supplied\n"
-
-/* Create and manipulate PGresults */
-extern PGresult *PQmakeEmptyPGresult(PGconn *conn, ExecStatusType status);
-extern PGresult *PQcopyResult(const PGresult *src, int flags);
-extern int	PQsetResultAttrs(PGresult *res, int numAttributes, PGresAttDesc *attDescs);
-extern void *PQresultAlloc(PGresult *res, size_t nBytes);
-extern size_t PQresultMemorySize(const PGresult *res);
-extern int	PQsetvalue(PGresult *res, int tup_num, int field_num, char *value, int len);
-
-/* Quoting strings before inclusion in queries. */
-extern size_t PQescapeStringConn(PGconn *conn,
-								 char *to, const char *from, size_t length,
-								 int *error);
-extern char *PQescapeLiteral(PGconn *conn, const char *str, size_t len);
-extern char *PQescapeIdentifier(PGconn *conn, const char *str, size_t len);
-extern unsigned char *PQescapeByteaConn(PGconn *conn,
-										const unsigned char *from, size_t from_length,
-										size_t *to_length);
-extern unsigned char *PQunescapeBytea(const unsigned char *strtext,
-									  size_t *retbuflen);
-
-/* These forms are deprecated! */
-extern size_t PQescapeString(char *to, const char *from, size_t length);
-extern unsigned char *PQescapeBytea(const unsigned char *from, size_t from_length,
-									size_t *to_length);
-
-
-
-/* === in fe-print.c === */
-
-extern void PQprint(FILE *fout, /* output stream */
-					const PGresult *res,
-					const PQprintOpt *po);	/* option structure */
-
-/*
- * really old printing routines
- */
-extern void PQdisplayTuples(const PGresult *res,
-							FILE *fp,	/* where to send the output */
-							int fillAlign,	/* pad the fields with spaces */
-							const char *fieldSep,	/* field separator */
-							int printHeader,	/* display headers? */
-							int quiet);
-
-extern void PQprintTuples(const PGresult *res,
-						  FILE *fout,	/* output stream */
-						  int PrintAttNames,	/* print attribute names */
-						  int TerseOutput,	/* delimiter bars */
-						  int colWidth);	/* width of column, if 0, use
-											 * variable width */
-
-
-/* === in fe-lobj.c === */
-
-/* Large-object access routines */
-extern int	lo_open(PGconn *conn, Oid lobjId, int mode);
-extern int	lo_close(PGconn *conn, int fd);
-extern int	lo_read(PGconn *conn, int fd, char *buf, size_t len);
-extern int	lo_write(PGconn *conn, int fd, const char *buf, size_t len);
-extern int	lo_lseek(PGconn *conn, int fd, int offset, int whence);
-extern pg_int64 lo_lseek64(PGconn *conn, int fd, pg_int64 offset, int whence);
-extern Oid	lo_creat(PGconn *conn, int mode);
-extern Oid	lo_create(PGconn *conn, Oid lobjId);
-extern int	lo_tell(PGconn *conn, int fd);
-extern pg_int64 lo_tell64(PGconn *conn, int fd);
-extern int	lo_truncate(PGconn *conn, int fd, size_t len);
-extern int	lo_truncate64(PGconn *conn, int fd, pg_int64 len);
-extern int	lo_unlink(PGconn *conn, Oid lobjId);
-extern Oid	lo_import(PGconn *conn, const char *filename);
-extern Oid	lo_import_with_oid(PGconn *conn, const char *filename, Oid lobjId);
-extern int	lo_export(PGconn *conn, Oid lobjId, const char *filename);
-
-/* === in fe-misc.c === */
-
-/* Get the version of the libpq library in use */
-extern int	PQlibVersion(void);
-
-/* Determine length of multibyte encoded char at *s */
-extern int	PQmblen(const char *s, int encoding);
-
-/* Same, but not more than the distance to the end of string s */
-extern int	PQmblenBounded(const char *s, int encoding);
-
-/* Determine display length of multibyte encoded char at *s */
-extern int	PQdsplen(const char *s, int encoding);
-
-/* Get encoding id from environment variable PGCLIENTENCODING */
-extern int	PQenv2encoding(void);
-
-/* === in fe-auth.c === */
-
-extern char *PQencryptPassword(const char *passwd, const char *user);
-extern char *PQencryptPasswordConn(PGconn *conn, const char *passwd, const char *user, const char *algorithm);
-
-/* === in encnames.c === */
-
-extern int	pg_char_to_encoding(const char *name);
-extern const char *pg_encoding_to_char(int encoding);
-extern int	pg_valid_server_encoding_id(int encoding);
-
-/* === in fe-secure-openssl.c === */
-
-/* Support for overriding sslpassword handling with a callback */
-typedef int (*PQsslKeyPassHook_OpenSSL_type) (char *buf, int size, PGconn *conn);
-extern PQsslKeyPassHook_OpenSSL_type PQgetSSLKeyPassHook_OpenSSL(void);
-extern void PQsetSSLKeyPassHook_OpenSSL(PQsslKeyPassHook_OpenSSL_type hook);
-extern int	PQdefaultSSLKeyPassHook_OpenSSL(char *buf, int size, PGconn *conn);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif							/* LIBPQ_FE_H */
diff --git a/contrib/libs/libpq/src/interfaces/libpq/libpq-int.h b/contrib/libs/libpq/src/interfaces/libpq/libpq-int.h
deleted file mode 100644
index a951f4992b..0000000000
--- a/contrib/libs/libpq/src/interfaces/libpq/libpq-int.h
+++ /dev/null
@@ -1,940 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * libpq-int.h
- *	  This file contains internal definitions meant to be used only by
- *	  the frontend libpq library, not by applications that call it.
- *
- *	  An application can include this file if it wants to bypass the
- *	  official API defined by libpq-fe.h, but code that does so is much
- *	  more likely to break across PostgreSQL releases than code that uses
- *	  only the official API.
- *
- * Portions Copyright (c) 1996-2023, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- * src/interfaces/libpq/libpq-int.h
- *
- *-------------------------------------------------------------------------
- */
-
-#ifndef LIBPQ_INT_H
-#define LIBPQ_INT_H
-
-/* We assume libpq-fe.h has already been included. */
-#include "libpq-events.h"
-
-#include <netdb.h>
-#include <sys/socket.h>
-#include <time.h>
-/* MinGW has sys/time.h, but MSVC doesn't */
-#ifndef _MSC_VER
-#include <sys/time.h>
-#endif
-
-#ifdef ENABLE_THREAD_SAFETY
-#ifdef WIN32
-#include "pthread-win32.h"
-#else
-#include <pthread.h>
-#endif
-#include <signal.h>
-#endif
-
-/* include stuff common to fe and be */
-#include "libpq/pqcomm.h"
-/* include stuff found in fe only */
-#include "fe-auth-sasl.h"
-#include "pqexpbuffer.h"
-
-#ifdef ENABLE_GSS
-#if defined(HAVE_GSSAPI_H)
-#include <gssapi.h>
-#else
-#include <gssapi/gssapi.h>
-#endif
-#endif
-
-#ifdef ENABLE_SSPI
-#define SECURITY_WIN32
-#if defined(WIN32) && !defined(_MSC_VER)
-#include <ntsecapi.h>
-#endif
-#include <security.h>
-#undef SECURITY_WIN32
-
-#ifndef ENABLE_GSS
-/*
- * Define a fake structure compatible with GSSAPI on Unix.
- */
-typedef struct
-{
-	void	   *value;
-	int			length;
-} gss_buffer_desc;
-#endif
-#endif							/* ENABLE_SSPI */
-
-#ifdef USE_OPENSSL
-#include <openssl/ssl.h>
-#include <openssl/err.h>
-
-#ifndef OPENSSL_NO_ENGINE
-#define USE_SSL_ENGINE
-#endif
-#endif							/* USE_OPENSSL */
-
-#include "common/pg_prng.h"
-
-/*
- * POSTGRES backend dependent Constants.
- */
-#define CMDSTATUS_LEN 64		/* should match COMPLETION_TAG_BUFSIZE */
-
-/*
- * PGresult and the subsidiary types PGresAttDesc, PGresAttValue
- * represent the result of a query (or more precisely, of a single SQL
- * command --- a query string given to PQexec can contain multiple commands).
- * Note we assume that a single command can return at most one tuple group,
- * hence there is no need for multiple descriptor sets.
- */
-
-/* Subsidiary-storage management structure for PGresult.
- * See space management routines in fe-exec.c for details.
- * Note that space[k] refers to the k'th byte starting from the physical
- * head of the block --- it's a union, not a struct!
- */
-typedef union pgresult_data PGresult_data;
-
-union pgresult_data
-{
-	PGresult_data *next;		/* link to next block, or NULL */
-	char		space[1];		/* dummy for accessing block as bytes */
-};
-
-/* Data about a single parameter of a prepared statement */
-typedef struct pgresParamDesc
-{
-	Oid			typid;			/* type id */
-} PGresParamDesc;
-
-/*
- * Data for a single attribute of a single tuple
- *
- * We use char* for Attribute values.
- *
- * The value pointer always points to a null-terminated area; we add a
- * null (zero) byte after whatever the backend sends us.  This is only
- * particularly useful for text values ... with a binary value, the
- * value might have embedded nulls, so the application can't use C string
- * operators on it.  But we add a null anyway for consistency.
- * Note that the value itself does not contain a length word.
- *
- * A NULL attribute is a special case in two ways: its len field is NULL_LEN
- * and its value field points to null_field in the owning PGresult.  All the
- * NULL attributes in a query result point to the same place (there's no need
- * to store a null string separately for each one).
- */
-
-#define NULL_LEN		(-1)	/* pg_result len for NULL value */
-
-typedef struct pgresAttValue
-{
-	int			len;			/* length in bytes of the value */
-	char	   *value;			/* actual value, plus terminating zero byte */
-} PGresAttValue;
-
-/* Typedef for message-field list entries */
-typedef struct pgMessageField
-{
-	struct pgMessageField *next;	/* list link */
-	char		code;			/* field code */
-	char		contents[FLEXIBLE_ARRAY_MEMBER];	/* value, nul-terminated */
-} PGMessageField;
-
-/* Fields needed for notice handling */
-typedef struct
-{
-	PQnoticeReceiver noticeRec; /* notice message receiver */
-	void	   *noticeRecArg;
-	PQnoticeProcessor noticeProc;	/* notice message processor */
-	void	   *noticeProcArg;
-} PGNoticeHooks;
-
-typedef struct PGEvent
-{
-	PGEventProc proc;			/* the function to call on events */
-	char	   *name;			/* used only for error messages */
-	void	   *passThrough;	/* pointer supplied at registration time */
-	void	   *data;			/* optional state (instance) data */
-	bool		resultInitialized;	/* T if RESULTCREATE/COPY succeeded */
-} PGEvent;
-
-struct pg_result
-{
-	int			ntups;
-	int			numAttributes;
-	PGresAttDesc *attDescs;
-	PGresAttValue **tuples;		/* each PGresult tuple is an array of
-								 * PGresAttValue's */
-	int			tupArrSize;		/* allocated size of tuples array */
-	int			numParameters;
-	PGresParamDesc *paramDescs;
-	ExecStatusType resultStatus;
-	char		cmdStatus[CMDSTATUS_LEN];	/* cmd status from the query */
-	int			binary;			/* binary tuple values if binary == 1,
-								 * otherwise text */
-
-	/*
-	 * These fields are copied from the originating PGconn, so that operations
-	 * on the PGresult don't have to reference the PGconn.
-	 */
-	PGNoticeHooks noticeHooks;
-	PGEvent    *events;
-	int			nEvents;
-	int			client_encoding;	/* encoding id */
-
-	/*
-	 * Error information (all NULL if not an error result).  errMsg is the
-	 * "overall" error message returned by PQresultErrorMessage.  If we have
-	 * per-field info then it is stored in a linked list.
-	 */
-	char	   *errMsg;			/* error message, or NULL if no error */
-	PGMessageField *errFields;	/* message broken into fields */
-	char	   *errQuery;		/* text of triggering query, if available */
-
-	/* All NULL attributes in the query result point to this null string */
-	char		null_field[1];
-
-	/*
-	 * Space management information.  Note that attDescs and error stuff, if
-	 * not null, point into allocated blocks.  But tuples points to a
-	 * separately malloc'd block, so that we can realloc it.
-	 */
-	PGresult_data *curBlock;	/* most recently allocated block */
-	int			curOffset;		/* start offset of free space in block */
-	int			spaceLeft;		/* number of free bytes remaining in block */
-
-	size_t		memorySize;		/* total space allocated for this PGresult */
-};
-
-/* PGAsyncStatusType defines the state of the query-execution state machine */
-typedef enum
-{
-	PGASYNC_IDLE,				/* nothing's happening, dude */
-	PGASYNC_BUSY,				/* query in progress */
-	PGASYNC_READY,				/* query done, waiting for client to fetch
-								 * result */
-	PGASYNC_READY_MORE,			/* query done, waiting for client to fetch
-								 * result, more results expected from this
-								 * query */
-	PGASYNC_COPY_IN,			/* Copy In data transfer in progress */
-	PGASYNC_COPY_OUT,			/* Copy Out data transfer in progress */
-	PGASYNC_COPY_BOTH,			/* Copy In/Out data transfer in progress */
-	PGASYNC_PIPELINE_IDLE,		/* "Idle" between commands in pipeline mode */
-} PGAsyncStatusType;
-
-/* Target server type (decoded value of target_session_attrs) */
-typedef enum
-{
-	SERVER_TYPE_ANY = 0,		/* Any server (default) */
-	SERVER_TYPE_READ_WRITE,		/* Read-write server */
-	SERVER_TYPE_READ_ONLY,		/* Read-only server */
-	SERVER_TYPE_PRIMARY,		/* Primary server */
-	SERVER_TYPE_STANDBY,		/* Standby server */
-	SERVER_TYPE_PREFER_STANDBY, /* Prefer standby server */
-	SERVER_TYPE_PREFER_STANDBY_PASS2	/* second pass - behaves same as ANY */
-} PGTargetServerType;
-
-/* Target server type (decoded value of load_balance_hosts) */
-typedef enum
-{
-	LOAD_BALANCE_DISABLE = 0,	/* Use the existing host order (default) */
-	LOAD_BALANCE_RANDOM,		/* Randomly shuffle the hosts */
-} PGLoadBalanceType;
-
-/* Boolean value plus a not-known state, for GUCs we might have to fetch */
-typedef enum
-{
-	PG_BOOL_UNKNOWN = 0,		/* Currently unknown */
-	PG_BOOL_YES,				/* Yes (true) */
-	PG_BOOL_NO					/* No (false) */
-} PGTernaryBool;
-
-/* Typedef for the EnvironmentOptions[] array */
-typedef struct PQEnvironmentOption
-{
-	const char *envName,		/* name of an environment variable */
-			   *pgName;			/* name of corresponding SET variable */
-} PQEnvironmentOption;
-
-/* Typedef for parameter-status list entries */
-typedef struct pgParameterStatus
-{
-	struct pgParameterStatus *next; /* list link */
-	char	   *name;			/* parameter name */
-	char	   *value;			/* parameter value */
-	/* Note: name and value are stored in same malloc block as struct is */
-} pgParameterStatus;
-
-/* large-object-access data ... allocated only if large-object code is used. */
-typedef struct pgLobjfuncs
-{
-	Oid			fn_lo_open;		/* OID of backend function lo_open		*/
-	Oid			fn_lo_close;	/* OID of backend function lo_close		*/
-	Oid			fn_lo_creat;	/* OID of backend function lo_creat		*/
-	Oid			fn_lo_create;	/* OID of backend function lo_create	*/
-	Oid			fn_lo_unlink;	/* OID of backend function lo_unlink	*/
-	Oid			fn_lo_lseek;	/* OID of backend function lo_lseek		*/
-	Oid			fn_lo_lseek64;	/* OID of backend function lo_lseek64	*/
-	Oid			fn_lo_tell;		/* OID of backend function lo_tell		*/
-	Oid			fn_lo_tell64;	/* OID of backend function lo_tell64	*/
-	Oid			fn_lo_truncate; /* OID of backend function lo_truncate	*/
-	Oid			fn_lo_truncate64;	/* OID of function lo_truncate64 */
-	Oid			fn_lo_read;		/* OID of backend function LOread		*/
-	Oid			fn_lo_write;	/* OID of backend function LOwrite		*/
-} PGlobjfuncs;
-
-/* PGdataValue represents a data field value being passed to a row processor.
- * It could be either text or binary data; text data is not zero-terminated.
- * A SQL NULL is represented by len < 0; then value is still valid but there
- * are no data bytes there.
- */
-typedef struct pgDataValue
-{
-	int			len;			/* data length in bytes, or <0 if NULL */
-	const char *value;			/* data value, without zero-termination */
-} PGdataValue;
-
-/* Host address type enum for struct pg_conn_host */
-typedef enum pg_conn_host_type
-{
-	CHT_HOST_NAME,
-	CHT_HOST_ADDRESS,
-	CHT_UNIX_SOCKET
-} pg_conn_host_type;
-
-/*
- * PGQueryClass tracks which query protocol is in use for each command queue
- * entry, or special operation in execution
- */
-typedef enum
-{
-	PGQUERY_SIMPLE,				/* simple Query protocol (PQexec) */
-	PGQUERY_EXTENDED,			/* full Extended protocol (PQexecParams) */
-	PGQUERY_PREPARE,			/* Parse only (PQprepare) */
-	PGQUERY_DESCRIBE,			/* Describe Statement or Portal */
-	PGQUERY_SYNC,				/* Sync (at end of a pipeline) */
-	PGQUERY_CLOSE
-} PGQueryClass;
-
-/*
- * An entry in the pending command queue.
- */
-typedef struct PGcmdQueueEntry
-{
-	PGQueryClass queryclass;	/* Query type */
-	char	   *query;			/* SQL command, or NULL if none/unknown/OOM */
-	struct PGcmdQueueEntry *next;	/* list link */
-} PGcmdQueueEntry;
-
-/*
- * pg_conn_host stores all information about each of possibly several hosts
- * mentioned in the connection string.  Most fields are derived by splitting
- * the relevant connection parameter (e.g., pghost) at commas.
- */
-typedef struct pg_conn_host
-{
-	pg_conn_host_type type;		/* type of host address */
-	char	   *host;			/* host name or socket path */
-	char	   *hostaddr;		/* host numeric IP address */
-	char	   *port;			/* port number (always provided) */
-	char	   *password;		/* password for this host, read from the
-								 * password file; NULL if not sought or not
-								 * found in password file. */
-} pg_conn_host;
-
-/*
- * PGconn stores all the state data associated with a single connection
- * to a backend.
- */
-struct pg_conn
-{
-	/* Saved values of connection options */
-	char	   *pghost;			/* the machine on which the server is running,
-								 * or a path to a UNIX-domain socket, or a
-								 * comma-separated list of machines and/or
-								 * paths; if NULL, use DEFAULT_PGSOCKET_DIR */
-	char	   *pghostaddr;		/* the numeric IP address of the machine on
-								 * which the server is running, or a
-								 * comma-separated list of same.  Takes
-								 * precedence over pghost. */
-	char	   *pgport;			/* the server's communication port number, or
-								 * a comma-separated list of ports */
-	char	   *connect_timeout;	/* connection timeout (numeric string) */
-	char	   *pgtcp_user_timeout; /* tcp user timeout (numeric string) */
-	char	   *client_encoding_initial;	/* encoding to use */
-	char	   *pgoptions;		/* options to start the backend with */
-	char	   *appname;		/* application name */
-	char	   *fbappname;		/* fallback application name */
-	char	   *dbName;			/* database name */
-	char	   *replication;	/* connect as the replication standby? */
-	char	   *pguser;			/* Postgres username and password, if any */
-	char	   *pgpass;
-	char	   *pgpassfile;		/* path to a file containing password(s) */
-	char	   *channel_binding;	/* channel binding mode
-									 * (require,prefer,disable) */
-	char	   *keepalives;		/* use TCP keepalives? */
-	char	   *keepalives_idle;	/* time between TCP keepalives */
-	char	   *keepalives_interval;	/* time between TCP keepalive
-										 * retransmits */
-	char	   *keepalives_count;	/* maximum number of TCP keepalive
-									 * retransmits */
-	char	   *sslmode;		/* SSL mode (require,prefer,allow,disable) */
-	char	   *sslcompression; /* SSL compression (0 or 1) */
-	char	   *sslkey;			/* client key filename */
-	char	   *sslcert;		/* client certificate filename */
-	char	   *sslpassword;	/* client key file password */
-	char	   *sslcertmode;	/* client cert mode (require,allow,disable) */
-	char	   *sslrootcert;	/* root certificate filename */
-	char	   *sslcrl;			/* certificate revocation list filename */
-	char	   *sslcrldir;		/* certificate revocation list directory name */
-	char	   *sslsni;			/* use SSL SNI extension (0 or 1) */
-	char	   *requirepeer;	/* required peer credentials for local sockets */
-	char	   *gssencmode;		/* GSS mode (require,prefer,disable) */
-	char	   *krbsrvname;		/* Kerberos service name */
-	char	   *gsslib;			/* What GSS library to use ("gssapi" or
-								 * "sspi") */
-	char	   *gssdelegation;	/* Try to delegate GSS credentials? (0 or 1) */
-	char	   *ssl_min_protocol_version;	/* minimum TLS protocol version */
-	char	   *ssl_max_protocol_version;	/* maximum TLS protocol version */
-	char	   *target_session_attrs;	/* desired session properties */
-	char	   *require_auth;	/* name of the expected auth method */
-	char	   *load_balance_hosts; /* load balance over hosts */
-
-	/* Optional file to write trace info to */
-	FILE	   *Pfdebug;
-	int			traceFlags;
-
-	/* Callback procedures for notice message processing */
-	PGNoticeHooks noticeHooks;
-
-	/* Event procs registered via PQregisterEventProc */
-	PGEvent    *events;			/* expandable array of event data */
-	int			nEvents;		/* number of active events */
-	int			eventArraySize; /* allocated array size */
-
-	/* Status indicators */
-	ConnStatusType status;
-	PGAsyncStatusType asyncStatus;
-	PGTransactionStatusType xactStatus; /* never changes to ACTIVE */
-	char		last_sqlstate[6];	/* last reported SQLSTATE */
-	bool		options_valid;	/* true if OK to attempt connection */
-	bool		nonblocking;	/* whether this connection is using nonblock
-								 * sending semantics */
-	PGpipelineStatus pipelineStatus;	/* status of pipeline mode */
-	bool		singleRowMode;	/* return current query result row-by-row? */
-	char		copy_is_binary; /* 1 = copy binary, 0 = copy text */
-	int			copy_already_done;	/* # bytes already returned in COPY OUT */
-	PGnotify   *notifyHead;		/* oldest unreported Notify msg */
-	PGnotify   *notifyTail;		/* newest unreported Notify msg */
-
-	/* Support for multiple hosts in connection string */
-	int			nconnhost;		/* # of hosts named in conn string */
-	int			whichhost;		/* host we're currently trying/connected to */
-	pg_conn_host *connhost;		/* details about each named host */
-	char	   *connip;			/* IP address for current network connection */
-
-	/*
-	 * The pending command queue as a singly-linked list.  Head is the command
-	 * currently in execution, tail is where new commands are added.
-	 */
-	PGcmdQueueEntry *cmd_queue_head;
-	PGcmdQueueEntry *cmd_queue_tail;
-
-	/*
-	 * To save malloc traffic, we don't free entries right away; instead we
-	 * save them in this list for possible reuse.
-	 */
-	PGcmdQueueEntry *cmd_queue_recycle;
-
-	/* Connection data */
-	pgsocket	sock;			/* FD for socket, PGINVALID_SOCKET if
-								 * unconnected */
-	SockAddr	laddr;			/* Local address */
-	SockAddr	raddr;			/* Remote address */
-	ProtocolVersion pversion;	/* FE/BE protocol version in use */
-	int			sversion;		/* server version, e.g. 70401 for 7.4.1 */
-	bool		auth_req_received;	/* true if any type of auth req received */
-	bool		password_needed;	/* true if server demanded a password */
-	bool		gssapi_used;	/* true if authenticated via gssapi */
-	bool		sigpipe_so;		/* have we masked SIGPIPE via SO_NOSIGPIPE? */
-	bool		sigpipe_flag;	/* can we mask SIGPIPE via MSG_NOSIGNAL? */
-	bool		write_failed;	/* have we had a write failure on sock? */
-	char	   *write_err_msg;	/* write error message, or NULL if OOM */
-
-	bool		auth_required;	/* require an authentication challenge from
-								 * the server? */
-	uint32		allowed_auth_methods;	/* bitmask of acceptable AuthRequest
-										 * codes */
-	bool		client_finished_auth;	/* have we finished our half of the
-										 * authentication exchange? */
-
-
-	/* Transient state needed while establishing connection */
-	PGTargetServerType target_server_type;	/* desired session properties */
-	PGLoadBalanceType load_balance_type;	/* desired load balancing
-											 * algorithm */
-	bool		try_next_addr;	/* time to advance to next address/host? */
-	bool		try_next_host;	/* time to advance to next connhost[]? */
-	int			naddr;			/* number of addresses returned by getaddrinfo */
-	int			whichaddr;		/* the address currently being tried */
-	AddrInfo   *addr;			/* the array of addresses for the currently
-								 * tried host */
-	bool		send_appname;	/* okay to send application_name? */
-
-	/* Miscellaneous stuff */
-	int			be_pid;			/* PID of backend --- needed for cancels */
-	int			be_key;			/* key of backend --- needed for cancels */
-	pgParameterStatus *pstatus; /* ParameterStatus data */
-	int			client_encoding;	/* encoding id */
-	bool		std_strings;	/* standard_conforming_strings */
-	PGTernaryBool default_transaction_read_only;	/* default_transaction_read_only */
-	PGTernaryBool in_hot_standby;	/* in_hot_standby */
-	PGVerbosity verbosity;		/* error/notice message verbosity */
-	PGContextVisibility show_context;	/* whether to show CONTEXT field */
-	PGlobjfuncs *lobjfuncs;		/* private state for large-object access fns */
-	pg_prng_state prng_state;	/* prng state for load balancing connections */
-
-
-	/* Buffer for data received from backend and not yet processed */
-	char	   *inBuffer;		/* currently allocated buffer */
-	int			inBufSize;		/* allocated size of buffer */
-	int			inStart;		/* offset to first unconsumed data in buffer */
-	int			inCursor;		/* next byte to tentatively consume */
-	int			inEnd;			/* offset to first position after avail data */
-
-	/* Buffer for data not yet sent to backend */
-	char	   *outBuffer;		/* currently allocated buffer */
-	int			outBufSize;		/* allocated size of buffer */
-	int			outCount;		/* number of chars waiting in buffer */
-
-	/* State for constructing messages in outBuffer */
-	int			outMsgStart;	/* offset to msg start (length word); if -1,
-								 * msg has no length word */
-	int			outMsgEnd;		/* offset to msg end (so far) */
-
-	/* Row processor interface workspace */
-	PGdataValue *rowBuf;		/* array for passing values to rowProcessor */
-	int			rowBufLen;		/* number of entries allocated in rowBuf */
-
-	/*
-	 * Status for asynchronous result construction.  If result isn't NULL, it
-	 * is a result being constructed or ready to return.  If result is NULL
-	 * and error_result is true, then we need to return a PGRES_FATAL_ERROR
-	 * result, but haven't yet constructed it; text for the error has been
-	 * appended to conn->errorMessage.  (Delaying construction simplifies
-	 * dealing with out-of-memory cases.)  If next_result isn't NULL, it is a
-	 * PGresult that will replace "result" after we return that one.
-	 */
-	PGresult   *result;			/* result being constructed */
-	bool		error_result;	/* do we need to make an ERROR result? */
-	PGresult   *next_result;	/* next result (used in single-row mode) */
-
-	/* Assorted state for SASL, SSL, GSS, etc */
-	const pg_fe_sasl_mech *sasl;
-	void	   *sasl_state;
-	int			scram_sha_256_iterations;
-
-	/* SSL structures */
-	bool		ssl_in_use;
-	bool		ssl_cert_requested; /* Did the server ask us for a cert? */
-	bool		ssl_cert_sent;	/* Did we send one in reply? */
-
-#ifdef USE_SSL
-	bool		allow_ssl_try;	/* Allowed to try SSL negotiation */
-	bool		wait_ssl_try;	/* Delay SSL negotiation until after
-								 * attempting normal connection */
-#ifdef USE_OPENSSL
-	SSL		   *ssl;			/* SSL status, if have SSL connection */
-	X509	   *peer;			/* X509 cert of server */
-#ifdef USE_SSL_ENGINE
-	ENGINE	   *engine;			/* SSL engine, if any */
-#else
-	void	   *engine;			/* dummy field to keep struct the same if
-								 * OpenSSL version changes */
-#endif
-	bool		crypto_loaded;	/* Track if libcrypto locking callbacks have
-								 * been done for this connection. This can be
-								 * removed once support for OpenSSL 1.0.2 is
-								 * removed as this locking is handled
-								 * internally in OpenSSL >= 1.1.0. */
-#endif							/* USE_OPENSSL */
-#endif							/* USE_SSL */
-
-#ifdef ENABLE_GSS
-	gss_ctx_id_t gctx;			/* GSS context */
-	gss_name_t	gtarg_nam;		/* GSS target name */
-
-	/* The following are encryption-only */
-	bool		try_gss;		/* GSS attempting permitted */
-	bool		gssenc;			/* GSS encryption is usable */
-	gss_cred_id_t gcred;		/* GSS credential temp storage. */
-
-	/* GSS encryption I/O state --- see fe-secure-gssapi.c */
-	char	   *gss_SendBuffer; /* Encrypted data waiting to be sent */
-	int			gss_SendLength; /* End of data available in gss_SendBuffer */
-	int			gss_SendNext;	/* Next index to send a byte from
-								 * gss_SendBuffer */
-	int			gss_SendConsumed;	/* Number of source bytes encrypted but
-									 * not yet reported as sent */
-	char	   *gss_RecvBuffer; /* Received, encrypted data */
-	int			gss_RecvLength; /* End of data available in gss_RecvBuffer */
-	char	   *gss_ResultBuffer;	/* Decryption of data in gss_RecvBuffer */
-	int			gss_ResultLength;	/* End of data available in
-									 * gss_ResultBuffer */
-	int			gss_ResultNext; /* Next index to read a byte from
-								 * gss_ResultBuffer */
-	uint32		gss_MaxPktSize; /* Maximum size we can encrypt and fit the
-								 * results into our output buffer */
-#endif
-
-#ifdef ENABLE_SSPI
-	CredHandle *sspicred;		/* SSPI credentials handle */
-	CtxtHandle *sspictx;		/* SSPI context */
-	char	   *sspitarget;		/* SSPI target name */
-	int			usesspi;		/* Indicate if SSPI is in use on the
-								 * connection */
-#endif
-
-	/*
-	 * Buffer for current error message.  This is cleared at the start of any
-	 * connection attempt or query cycle; after that, all code should append
-	 * messages to it, never overwrite.
-	 *
-	 * In some situations we might report an error more than once in a query
-	 * cycle.  If so, errorMessage accumulates text from all the errors, and
-	 * errorReported tracks how much we've already reported, so that the
-	 * individual error PGresult objects don't contain duplicative text.
-	 */
-	PQExpBufferData errorMessage;	/* expansible string */
-	int			errorReported;	/* # bytes of string already reported */
-
-	/* Buffer for receiving various parts of messages */
-	PQExpBufferData workBuffer; /* expansible string */
-};
-
-/* PGcancel stores all data necessary to cancel a connection. A copy of this
- * data is required to safely cancel a connection running on a different
- * thread.
- */
-struct pg_cancel
-{
-	SockAddr	raddr;			/* Remote address */
-	int			be_pid;			/* PID of backend --- needed for cancels */
-	int			be_key;			/* key of backend --- needed for cancels */
-	int			pgtcp_user_timeout; /* tcp user timeout */
-	int			keepalives;		/* use TCP keepalives? */
-	int			keepalives_idle;	/* time between TCP keepalives */
-	int			keepalives_interval;	/* time between TCP keepalive
-										 * retransmits */
-	int			keepalives_count;	/* maximum number of TCP keepalive
-									 * retransmits */
-};
-
-
-/* String descriptions of the ExecStatusTypes.
- * direct use of this array is deprecated; call PQresStatus() instead.
- */
-extern char *const pgresStatus[];
-
-
-#ifdef USE_SSL
-
-#ifndef WIN32
-#define USER_CERT_FILE		".postgresql/postgresql.crt"
-#define USER_KEY_FILE		".postgresql/postgresql.key"
-#define ROOT_CERT_FILE		".postgresql/root.crt"
-#define ROOT_CRL_FILE		".postgresql/root.crl"
-#else
-/* On Windows, the "home" directory is already PostgreSQL-specific */
-#define USER_CERT_FILE		"postgresql.crt"
-#define USER_KEY_FILE		"postgresql.key"
-#define ROOT_CERT_FILE		"root.crt"
-#define ROOT_CRL_FILE		"root.crl"
-#endif
-
-#endif							/* USE_SSL */
-
-/* ----------------
- * Internal functions of libpq
- * Functions declared here need to be visible across files of libpq,
- * but are not intended to be called by applications.  We use the
- * convention "pqXXX" for internal functions, vs. the "PQxxx" names
- * used for application-visible routines.
- * ----------------
- */
-
-/* === in fe-connect.c === */
-
-extern void pqDropConnection(PGconn *conn, bool flushInput);
-extern int	pqPacketSend(PGconn *conn, char pack_type,
-						 const void *buf, size_t buf_len);
-extern bool pqGetHomeDirectory(char *buf, int bufsize);
-
-#ifdef ENABLE_THREAD_SAFETY
-extern pgthreadlock_t pg_g_threadlock;
-
-#define pglock_thread()		pg_g_threadlock(true)
-#define pgunlock_thread()	pg_g_threadlock(false)
-#else
-#define pglock_thread()		((void) 0)
-#define pgunlock_thread()	((void) 0)
-#endif
-
-/* === in fe-exec.c === */
-
-extern void pqSetResultError(PGresult *res, PQExpBuffer errorMessage, int offset);
-extern void *pqResultAlloc(PGresult *res, size_t nBytes, bool isBinary);
-extern char *pqResultStrdup(PGresult *res, const char *str);
-extern void pqClearAsyncResult(PGconn *conn);
-extern void pqSaveErrorResult(PGconn *conn);
-extern PGresult *pqPrepareAsyncResult(PGconn *conn);
-extern void pqInternalNotice(const PGNoticeHooks *hooks, const char *fmt,...) pg_attribute_printf(2, 3);
-extern void pqSaveMessageField(PGresult *res, char code,
-							   const char *value);
-extern void pqSaveParameterStatus(PGconn *conn, const char *name,
-								  const char *value);
-extern int	pqRowProcessor(PGconn *conn, const char **errmsgp);
-extern void pqCommandQueueAdvance(PGconn *conn, bool isReadyForQuery,
-								  bool gotSync);
-extern int	PQsendQueryContinue(PGconn *conn, const char *query);
-
-/* === in fe-protocol3.c === */
-
-extern char *pqBuildStartupPacket3(PGconn *conn, int *packetlen,
-								   const PQEnvironmentOption *options);
-extern void pqParseInput3(PGconn *conn);
-extern int	pqGetErrorNotice3(PGconn *conn, bool isError);
-extern void pqBuildErrorMessage3(PQExpBuffer msg, const PGresult *res,
-								 PGVerbosity verbosity, PGContextVisibility show_context);
-extern int	pqGetNegotiateProtocolVersion3(PGconn *conn);
-extern int	pqGetCopyData3(PGconn *conn, char **buffer, int async);
-extern int	pqGetline3(PGconn *conn, char *s, int maxlen);
-extern int	pqGetlineAsync3(PGconn *conn, char *buffer, int bufsize);
-extern int	pqEndcopy3(PGconn *conn);
-extern PGresult *pqFunctionCall3(PGconn *conn, Oid fnid,
-								 int *result_buf, int *actual_result_len,
-								 int result_is_int,
-								 const PQArgBlock *args, int nargs);
-
-/* === in fe-misc.c === */
-
- /*
-  * "Get" and "Put" routines return 0 if successful, EOF if not. Note that for
-  * Get, EOF merely means the buffer is exhausted, not that there is
-  * necessarily any error.
-  */
-extern int	pqCheckOutBufferSpace(size_t bytes_needed, PGconn *conn);
-extern int	pqCheckInBufferSpace(size_t bytes_needed, PGconn *conn);
-extern int	pqGetc(char *result, PGconn *conn);
-extern int	pqPutc(char c, PGconn *conn);
-extern int	pqGets(PQExpBuffer buf, PGconn *conn);
-extern int	pqGets_append(PQExpBuffer buf, PGconn *conn);
-extern int	pqPuts(const char *s, PGconn *conn);
-extern int	pqGetnchar(char *s, size_t len, PGconn *conn);
-extern int	pqSkipnchar(size_t len, PGconn *conn);
-extern int	pqPutnchar(const char *s, size_t len, PGconn *conn);
-extern int	pqGetInt(int *result, size_t bytes, PGconn *conn);
-extern int	pqPutInt(int value, size_t bytes, PGconn *conn);
-extern int	pqPutMsgStart(char msg_type, PGconn *conn);
-extern int	pqPutMsgEnd(PGconn *conn);
-extern int	pqReadData(PGconn *conn);
-extern int	pqFlush(PGconn *conn);
-extern int	pqWait(int forRead, int forWrite, PGconn *conn);
-extern int	pqWaitTimed(int forRead, int forWrite, PGconn *conn,
-						time_t finish_time);
-extern int	pqReadReady(PGconn *conn);
-extern int	pqWriteReady(PGconn *conn);
-
-/* === in fe-secure.c === */
-
-extern int	pqsecure_initialize(PGconn *, bool, bool);
-extern PostgresPollingStatusType pqsecure_open_client(PGconn *);
-extern void pqsecure_close(PGconn *);
-extern ssize_t pqsecure_read(PGconn *, void *ptr, size_t len);
-extern ssize_t pqsecure_write(PGconn *, const void *ptr, size_t len);
-extern ssize_t pqsecure_raw_read(PGconn *, void *ptr, size_t len);
-extern ssize_t pqsecure_raw_write(PGconn *, const void *ptr, size_t len);
-
-#if defined(ENABLE_THREAD_SAFETY) && !defined(WIN32)
-extern int	pq_block_sigpipe(sigset_t *osigset, bool *sigpipe_pending);
-extern void pq_reset_sigpipe(sigset_t *osigset, bool sigpipe_pending,
-							 bool got_epipe);
-#endif
-
-/* === SSL === */
-
-/*
- * The SSL implementation provides these functions.
- */
-
-/*
- *	Implementation of PQinitSSL().
- */
-extern void pgtls_init_library(bool do_ssl, int do_crypto);
-
-/*
- * Initialize SSL library.
- *
- * The conn parameter is only used to be able to pass back an error
- * message - no connection-local setup is made here.  do_ssl controls
- * if SSL is initialized, and do_crypto does the same for the crypto
- * part.
- *
- * Returns 0 if OK, -1 on failure (adding a message to conn->errorMessage).
- */
-extern int	pgtls_init(PGconn *conn, bool do_ssl, bool do_crypto);
-
-/*
- *	Begin or continue negotiating a secure session.
- */
-extern PostgresPollingStatusType pgtls_open_client(PGconn *conn);
-
-/*
- *	Close SSL connection.
- */
-extern void pgtls_close(PGconn *conn);
-
-/*
- *	Read data from a secure connection.
- *
- * On failure, this function is responsible for appending a suitable message
- * to conn->errorMessage.  The caller must still inspect errno, but only
- * to determine whether to continue/retry after error.
- */
-extern ssize_t pgtls_read(PGconn *conn, void *ptr, size_t len);
-
-/*
- *	Is there unread data waiting in the SSL read buffer?
- */
-extern bool pgtls_read_pending(PGconn *conn);
-
-/*
- *	Write data to a secure connection.
- *
- * On failure, this function is responsible for appending a suitable message
- * to conn->errorMessage.  The caller must still inspect errno, but only
- * to determine whether to continue/retry after error.
- */
-extern ssize_t pgtls_write(PGconn *conn, const void *ptr, size_t len);
-
-/*
- * Get the hash of the server certificate, for SCRAM channel binding type
- * tls-server-end-point.
- *
- * NULL is sent back to the caller in the event of an error, with an
- * error message for the caller to consume.
- *
- * This is not supported with old versions of OpenSSL that don't have
- * the X509_get_signature_nid() function.
- */
-#if defined(USE_OPENSSL) && (defined(HAVE_X509_GET_SIGNATURE_NID) || defined(HAVE_X509_GET_SIGNATURE_INFO))
-#define HAVE_PGTLS_GET_PEER_CERTIFICATE_HASH
-extern char *pgtls_get_peer_certificate_hash(PGconn *conn, size_t *len);
-#endif
-
-/*
- * Verify that the server certificate matches the host name we connected to.
- *
- * The certificate's Common Name and Subject Alternative Names are considered.
- *
- * Returns 1 if the name matches, and 0 if it does not. On error, returns
- * -1, and sets the libpq error message.
- *
- */
-extern int	pgtls_verify_peer_name_matches_certificate_guts(PGconn *conn,
-															int *names_examined,
-															char **first_name);
-
-/* === GSSAPI === */
-
-#ifdef ENABLE_GSS
-
-/*
- * Establish a GSSAPI-encrypted connection.
- */
-extern PostgresPollingStatusType pqsecure_open_gss(PGconn *conn);
-
-/*
- * Read and write functions for GSSAPI-encrypted connections, with internal
- * buffering to handle nonblocking sockets.
- */
-extern ssize_t pg_GSS_write(PGconn *conn, const void *ptr, size_t len);
-extern ssize_t pg_GSS_read(PGconn *conn, void *ptr, size_t len);
-#endif
-
-/* === in fe-trace.c === */
-
-extern void pqTraceOutputMessage(PGconn *conn, const char *message,
-								 bool toServer);
-extern void pqTraceOutputNoTypeByteMessage(PGconn *conn, const char *message);
-
-/* === miscellaneous macros === */
-
-/*
- * Reset the conn's error-reporting state.
- */
-#define pqClearConnErrorState(conn) \
-	(resetPQExpBuffer(&(conn)->errorMessage), \
-	 (conn)->errorReported = 0)
-
-/*
- * Check whether we have a PGresult pending to be returned --- either a
- * constructed one in conn->result, or a "virtual" error result that we
- * don't intend to materialize until the end of the query cycle.
- */
-#define pgHavePendingResult(conn) \
-	((conn)->result != NULL || (conn)->error_result)
-
-/*
- * this is so that we can check if a connection is non-blocking internally
- * without the overhead of a function call
- */
-#define pqIsnonblocking(conn)	((conn)->nonblocking)
-
-/*
- * Connection's outbuffer threshold, for pipeline mode.
- */
-#define OUTBUFFER_THRESHOLD	65536
-
-#ifdef ENABLE_NLS
-extern char *libpq_gettext(const char *msgid) pg_attribute_format_arg(1);
-extern char *libpq_ngettext(const char *msgid, const char *msgid_plural, unsigned long n) pg_attribute_format_arg(1) pg_attribute_format_arg(2);
-#else
-#define libpq_gettext(x) (x)
-#define libpq_ngettext(s, p, n) ((n) == 1 ? (s) : (p))
-#endif
-/*
- * libpq code should use the above, not _(), since that would use the
- * surrounding programs's message catalog.
- */
-#undef _
-
-extern void libpq_append_error(PQExpBuffer errorMessage, const char *fmt,...) pg_attribute_printf(2, 3);
-extern void libpq_append_conn_error(PGconn *conn, const char *fmt,...) pg_attribute_printf(2, 3);
-
-/*
- * These macros are needed to let error-handling code be portable between
- * Unix and Windows.  (ugh)
- */
-#ifdef WIN32
-#define SOCK_ERRNO (WSAGetLastError())
-#define SOCK_STRERROR winsock_strerror
-#define SOCK_ERRNO_SET(e) WSASetLastError(e)
-#else
-#define SOCK_ERRNO errno
-#define SOCK_STRERROR strerror_r
-#define SOCK_ERRNO_SET(e) (errno = (e))
-#endif
-
-#endif							/* LIBPQ_INT_H */
diff --git a/contrib/libs/libpq/src/interfaces/libpq/pqexpbuffer.c b/contrib/libs/libpq/src/interfaces/libpq/pqexpbuffer.c
deleted file mode 100644
index de7e0328db..0000000000
--- a/contrib/libs/libpq/src/interfaces/libpq/pqexpbuffer.c
+++ /dev/null
@@ -1,412 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * pqexpbuffer.c
- *
- * PQExpBuffer provides an indefinitely-extensible string data type.
- * It can be used to buffer either ordinary C strings (null-terminated text)
- * or arbitrary binary data.  All storage is allocated with malloc().
- *
- * This module is essentially the same as the backend's StringInfo data type,
- * but it is intended for use in frontend libpq and client applications.
- * Thus, it does not rely on palloc() nor elog(), nor psprintf.c which
- * will exit() on error.
- *
- * It does rely on vsnprintf(); if configure finds that libc doesn't provide
- * a usable vsnprintf(), then a copy of our own implementation of it will
- * be linked into libpq.
- *
- * Portions Copyright (c) 1996-2023, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- * src/interfaces/libpq/pqexpbuffer.c
- *
- *-------------------------------------------------------------------------
- */
-
-#include "postgres_fe.h"
-
-#include <limits.h>
-
-#include "pqexpbuffer.h"
-
-#ifdef WIN32
-#include "win32.h"
-#endif
-
-
-/* All "broken" PQExpBuffers point to this string. */
-static const char oom_buffer[1] = "";
-
-/* Need a char * for unconstify() compatibility */
-static const char *oom_buffer_ptr = oom_buffer;
-
-
-/*
- * markPQExpBufferBroken
- *
- * Put a PQExpBuffer in "broken" state if it isn't already.
- */
-static void
-markPQExpBufferBroken(PQExpBuffer str)
-{
-	if (str->data != oom_buffer)
-		free(str->data);
-
-	/*
-	 * Casting away const here is a bit ugly, but it seems preferable to not
-	 * marking oom_buffer const.  We want to do that to encourage the compiler
-	 * to put oom_buffer in read-only storage, so that anyone who tries to
-	 * scribble on a broken PQExpBuffer will get a failure.
-	 */
-	str->data = unconstify(char *, oom_buffer_ptr);
-	str->len = 0;
-	str->maxlen = 0;
-}
-
-/*
- * createPQExpBuffer
- *
- * Create an empty 'PQExpBufferData' & return a pointer to it.
- */
-PQExpBuffer
-createPQExpBuffer(void)
-{
-	PQExpBuffer res;
-
-	res = (PQExpBuffer) malloc(sizeof(PQExpBufferData));
-	if (res != NULL)
-		initPQExpBuffer(res);
-
-	return res;
-}
-
-/*
- * initPQExpBuffer
- *
- * Initialize a PQExpBufferData struct (with previously undefined contents)
- * to describe an empty string.
- */
-void
-initPQExpBuffer(PQExpBuffer str)
-{
-	str->data = (char *) malloc(INITIAL_EXPBUFFER_SIZE);
-	if (str->data == NULL)
-	{
-		str->data = unconstify(char *, oom_buffer_ptr); /* see comment above */
-		str->maxlen = 0;
-		str->len = 0;
-	}
-	else
-	{
-		str->maxlen = INITIAL_EXPBUFFER_SIZE;
-		str->len = 0;
-		str->data[0] = '\0';
-	}
-}
-
-/*
- * destroyPQExpBuffer(str);
- *
- *		free()s both the data buffer and the PQExpBufferData.
- *		This is the inverse of createPQExpBuffer().
- */
-void
-destroyPQExpBuffer(PQExpBuffer str)
-{
-	if (str)
-	{
-		termPQExpBuffer(str);
-		free(str);
-	}
-}
-
-/*
- * termPQExpBuffer(str)
- *		free()s the data buffer but not the PQExpBufferData itself.
- *		This is the inverse of initPQExpBuffer().
- */
-void
-termPQExpBuffer(PQExpBuffer str)
-{
-	if (str->data != oom_buffer)
-		free(str->data);
-	/* just for luck, make the buffer validly empty. */
-	str->data = unconstify(char *, oom_buffer_ptr); /* see comment above */
-	str->maxlen = 0;
-	str->len = 0;
-}
-
-/*
- * resetPQExpBuffer
- *		Reset a PQExpBuffer to empty
- *
- * Note: if possible, a "broken" PQExpBuffer is returned to normal.
- */
-void
-resetPQExpBuffer(PQExpBuffer str)
-{
-	if (str)
-	{
-		if (str->data != oom_buffer)
-		{
-			str->len = 0;
-			str->data[0] = '\0';
-		}
-		else
-		{
-			/* try to reinitialize to valid state */
-			initPQExpBuffer(str);
-		}
-	}
-}
-
-/*
- * enlargePQExpBuffer
- * Make sure there is enough space for 'needed' more bytes in the buffer
- * ('needed' does not include the terminating null).
- *
- * Returns 1 if OK, 0 if failed to enlarge buffer.  (In the latter case
- * the buffer is left in "broken" state.)
- */
-int
-enlargePQExpBuffer(PQExpBuffer str, size_t needed)
-{
-	size_t		newlen;
-	char	   *newdata;
-
-	if (PQExpBufferBroken(str))
-		return 0;				/* already failed */
-
-	/*
-	 * Guard against ridiculous "needed" values, which can occur if we're fed
-	 * bogus data.  Without this, we can get an overflow or infinite loop in
-	 * the following.
-	 */
-	if (needed >= ((size_t) INT_MAX - str->len))
-	{
-		markPQExpBufferBroken(str);
-		return 0;
-	}
-
-	needed += str->len + 1;		/* total space required now */
-
-	/* Because of the above test, we now have needed <= INT_MAX */
-
-	if (needed <= str->maxlen)
-		return 1;				/* got enough space already */
-
-	/*
-	 * We don't want to allocate just a little more space with each append;
-	 * for efficiency, double the buffer size each time it overflows.
-	 * Actually, we might need to more than double it if 'needed' is big...
-	 */
-	newlen = (str->maxlen > 0) ? (2 * str->maxlen) : 64;
-	while (needed > newlen)
-		newlen = 2 * newlen;
-
-	/*
-	 * Clamp to INT_MAX in case we went past it.  Note we are assuming here
-	 * that INT_MAX <= UINT_MAX/2, else the above loop could overflow.  We
-	 * will still have newlen >= needed.
-	 */
-	if (newlen > (size_t) INT_MAX)
-		newlen = (size_t) INT_MAX;
-
-	newdata = (char *) realloc(str->data, newlen);
-	if (newdata != NULL)
-	{
-		str->data = newdata;
-		str->maxlen = newlen;
-		return 1;
-	}
-
-	markPQExpBufferBroken(str);
-	return 0;
-}
-
-/*
- * printfPQExpBuffer
- * Format text data under the control of fmt (an sprintf-like format string)
- * and insert it into str.  More space is allocated to str if necessary.
- * This is a convenience routine that does the same thing as
- * resetPQExpBuffer() followed by appendPQExpBuffer().
- */
-void
-printfPQExpBuffer(PQExpBuffer str, const char *fmt,...)
-{
-	int			save_errno = errno;
-	va_list		args;
-	bool		done;
-
-	resetPQExpBuffer(str);
-
-	if (PQExpBufferBroken(str))
-		return;					/* already failed */
-
-	/* Loop in case we have to retry after enlarging the buffer. */
-	do
-	{
-		errno = save_errno;
-		va_start(args, fmt);
-		done = appendPQExpBufferVA(str, fmt, args);
-		va_end(args);
-	} while (!done);
-}
-
-/*
- * appendPQExpBuffer
- *
- * Format text data under the control of fmt (an sprintf-like format string)
- * and append it to whatever is already in str.  More space is allocated
- * to str if necessary.  This is sort of like a combination of sprintf and
- * strcat.
- */
-void
-appendPQExpBuffer(PQExpBuffer str, const char *fmt,...)
-{
-	int			save_errno = errno;
-	va_list		args;
-	bool		done;
-
-	if (PQExpBufferBroken(str))
-		return;					/* already failed */
-
-	/* Loop in case we have to retry after enlarging the buffer. */
-	do
-	{
-		errno = save_errno;
-		va_start(args, fmt);
-		done = appendPQExpBufferVA(str, fmt, args);
-		va_end(args);
-	} while (!done);
-}
-
-/*
- * appendPQExpBufferVA
- * Shared guts of printfPQExpBuffer/appendPQExpBuffer.
- * Attempt to format data and append it to str.  Returns true if done
- * (either successful or hard failure), false if need to retry.
- *
- * Caution: callers must be sure to preserve their entry-time errno
- * when looping, in case the fmt contains "%m".
- */
-bool
-appendPQExpBufferVA(PQExpBuffer str, const char *fmt, va_list args)
-{
-	size_t		avail;
-	size_t		needed;
-	int			nprinted;
-
-	/*
-	 * Try to format the given string into the available space; but if there's
-	 * hardly any space, don't bother trying, just enlarge the buffer first.
-	 */
-	if (str->maxlen > str->len + 16)
-	{
-		avail = str->maxlen - str->len;
-
-		nprinted = vsnprintf(str->data + str->len, avail, fmt, args);
-
-		/*
-		 * If vsnprintf reports an error, fail (we assume this means there's
-		 * something wrong with the format string).
-		 */
-		if (unlikely(nprinted < 0))
-		{
-			markPQExpBufferBroken(str);
-			return true;
-		}
-
-		if ((size_t) nprinted < avail)
-		{
-			/* Success.  Note nprinted does not include trailing null. */
-			str->len += nprinted;
-			return true;
-		}
-
-		/*
-		 * We assume a C99-compliant vsnprintf, so believe its estimate of the
-		 * required space, and add one for the trailing null.  (If it's wrong,
-		 * the logic will still work, but we may loop multiple times.)
-		 *
-		 * Choke if the required space would exceed INT_MAX, since str->maxlen
-		 * can't represent more than that.
-		 */
-		if (unlikely(nprinted > INT_MAX - 1))
-		{
-			markPQExpBufferBroken(str);
-			return true;
-		}
-		needed = nprinted + 1;
-	}
-	else
-	{
-		/*
-		 * We have to guess at how much to enlarge, since we're skipping the
-		 * formatting work.  Fortunately, because of enlargePQExpBuffer's
-		 * preference for power-of-2 sizes, this number isn't very sensitive;
-		 * the net effect is that we'll double the buffer size before trying
-		 * to run vsnprintf, which seems sensible.
-		 */
-		needed = 32;
-	}
-
-	/* Increase the buffer size and try again. */
-	if (!enlargePQExpBuffer(str, needed))
-		return true;			/* oops, out of memory */
-
-	return false;
-}
-
-/*
- * appendPQExpBufferStr
- * Append the given string to a PQExpBuffer, allocating more space
- * if necessary.
- */
-void
-appendPQExpBufferStr(PQExpBuffer str, const char *data)
-{
-	appendBinaryPQExpBuffer(str, data, strlen(data));
-}
-
-/*
- * appendPQExpBufferChar
- * Append a single byte to str.
- * Like appendPQExpBuffer(str, "%c", ch) but much faster.
- */
-void
-appendPQExpBufferChar(PQExpBuffer str, char ch)
-{
-	/* Make more room if needed */
-	if (!enlargePQExpBuffer(str, 1))
-		return;
-
-	/* OK, append the character */
-	str->data[str->len] = ch;
-	str->len++;
-	str->data[str->len] = '\0';
-}
-
-/*
- * appendBinaryPQExpBuffer
- *
- * Append arbitrary binary data to a PQExpBuffer, allocating more space
- * if necessary.
- */
-void
-appendBinaryPQExpBuffer(PQExpBuffer str, const char *data, size_t datalen)
-{
-	/* Make more room if needed */
-	if (!enlargePQExpBuffer(str, datalen))
-		return;
-
-	/* OK, append the data */
-	memcpy(str->data + str->len, data, datalen);
-	str->len += datalen;
-
-	/*
-	 * Keep a trailing null in place, even though it's probably useless for
-	 * binary data...
-	 */
-	str->data[str->len] = '\0';
-}
diff --git a/contrib/libs/libpq/src/interfaces/libpq/pqexpbuffer.h b/contrib/libs/libpq/src/interfaces/libpq/pqexpbuffer.h
deleted file mode 100644
index 020e94e357..0000000000
--- a/contrib/libs/libpq/src/interfaces/libpq/pqexpbuffer.h
+++ /dev/null
@@ -1,192 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * pqexpbuffer.h
- *	  Declarations/definitions for "PQExpBuffer" functions.
- *
- * PQExpBuffer provides an indefinitely-extensible string data type.
- * It can be used to buffer either ordinary C strings (null-terminated text)
- * or arbitrary binary data.  All storage is allocated with malloc().
- *
- * This module is essentially the same as the backend's StringInfo data type,
- * but it is intended for use in frontend libpq and client applications.
- * Thus, it does not rely on palloc() nor elog().
- *
- * It does rely on vsnprintf(); if configure finds that libc doesn't provide
- * a usable vsnprintf(), then a copy of our own implementation of it will
- * be linked into libpq.
- *
- * Portions Copyright (c) 1996-2023, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- * src/interfaces/libpq/pqexpbuffer.h
- *
- *-------------------------------------------------------------------------
- */
-#ifndef PQEXPBUFFER_H
-#define PQEXPBUFFER_H
-
-/*-------------------------
- * PQExpBufferData holds information about an extensible string.
- *		data	is the current buffer for the string (allocated with malloc).
- *		len		is the current string length.  There is guaranteed to be
- *				a terminating '\0' at data[len], although this is not very
- *				useful when the string holds binary data rather than text.
- *		maxlen	is the allocated size in bytes of 'data', i.e. the maximum
- *				string size (including the terminating '\0' char) that we can
- *				currently store in 'data' without having to reallocate
- *				more space.  We must always have maxlen > len.
- *
- * An exception occurs if we failed to allocate enough memory for the string
- * buffer.  In that case data points to a statically allocated empty string,
- * and len = maxlen = 0.
- *-------------------------
- */
-typedef struct PQExpBufferData
-{
-	char	   *data;
-	size_t		len;
-	size_t		maxlen;
-} PQExpBufferData;
-
-typedef PQExpBufferData *PQExpBuffer;
-
-/*------------------------
- * Test for a broken (out of memory) PQExpBuffer.
- * When a buffer is "broken", all operations except resetting or deleting it
- * are no-ops.
- *------------------------
- */
-#define PQExpBufferBroken(str)	\
-	((str) == NULL || (str)->maxlen == 0)
-
-/*------------------------
- * Same, but for use when using a static or local PQExpBufferData struct.
- * For that, a null-pointer test is useless and may draw compiler warnings.
- *------------------------
- */
-#define PQExpBufferDataBroken(buf)	\
-	((buf).maxlen == 0)
-
-/*------------------------
- * Initial size of the data buffer in a PQExpBuffer.
- * NB: this must be large enough to hold error messages that might
- * be returned by PQrequestCancel().
- *------------------------
- */
-#define INITIAL_EXPBUFFER_SIZE	256
-
-/*------------------------
- * There are two ways to create a PQExpBuffer object initially:
- *
- * PQExpBuffer stringptr = createPQExpBuffer();
- *		Both the PQExpBufferData and the data buffer are malloc'd.
- *
- * PQExpBufferData string;
- * initPQExpBuffer(&string);
- *		The data buffer is malloc'd but the PQExpBufferData is presupplied.
- *		This is appropriate if the PQExpBufferData is a field of another
- *		struct.
- *-------------------------
- */
-
-/*------------------------
- * createPQExpBuffer
- * Create an empty 'PQExpBufferData' & return a pointer to it.
- */
-extern PQExpBuffer createPQExpBuffer(void);
-
-/*------------------------
- * initPQExpBuffer
- * Initialize a PQExpBufferData struct (with previously undefined contents)
- * to describe an empty string.
- */
-extern void initPQExpBuffer(PQExpBuffer str);
-
-/*------------------------
- * To destroy a PQExpBuffer, use either:
- *
- * destroyPQExpBuffer(str);
- *		free()s both the data buffer and the PQExpBufferData.
- *		This is the inverse of createPQExpBuffer().
- *
- * termPQExpBuffer(str)
- *		free()s the data buffer but not the PQExpBufferData itself.
- *		This is the inverse of initPQExpBuffer().
- *
- * NOTE: some routines build up a string using PQExpBuffer, and then
- * release the PQExpBufferData but return the data string itself to their
- * caller.  At that point the data string looks like a plain malloc'd
- * string.
- */
-extern void destroyPQExpBuffer(PQExpBuffer str);
-extern void termPQExpBuffer(PQExpBuffer str);
-
-/*------------------------
- * resetPQExpBuffer
- *		Reset a PQExpBuffer to empty
- *
- * Note: if possible, a "broken" PQExpBuffer is returned to normal.
- */
-extern void resetPQExpBuffer(PQExpBuffer str);
-
-/*------------------------
- * enlargePQExpBuffer
- * Make sure there is enough space for 'needed' more bytes in the buffer
- * ('needed' does not include the terminating null).
- *
- * Returns 1 if OK, 0 if failed to enlarge buffer.  (In the latter case
- * the buffer is left in "broken" state.)
- */
-extern int	enlargePQExpBuffer(PQExpBuffer str, size_t needed);
-
-/*------------------------
- * printfPQExpBuffer
- * Format text data under the control of fmt (an sprintf-like format string)
- * and insert it into str.  More space is allocated to str if necessary.
- * This is a convenience routine that does the same thing as
- * resetPQExpBuffer() followed by appendPQExpBuffer().
- */
-extern void printfPQExpBuffer(PQExpBuffer str, const char *fmt,...) pg_attribute_printf(2, 3);
-
-/*------------------------
- * appendPQExpBuffer
- * Format text data under the control of fmt (an sprintf-like format string)
- * and append it to whatever is already in str.  More space is allocated
- * to str if necessary.  This is sort of like a combination of sprintf and
- * strcat.
- */
-extern void appendPQExpBuffer(PQExpBuffer str, const char *fmt,...) pg_attribute_printf(2, 3);
-
-/*------------------------
- * appendPQExpBufferVA
- * Attempt to format data and append it to str.  Returns true if done
- * (either successful or hard failure), false if need to retry.
- *
- * Caution: callers must be sure to preserve their entry-time errno
- * when looping, in case the fmt contains "%m".
- */
-extern bool appendPQExpBufferVA(PQExpBuffer str, const char *fmt, va_list args) pg_attribute_printf(2, 0);
-
-/*------------------------
- * appendPQExpBufferStr
- * Append the given string to a PQExpBuffer, allocating more space
- * if necessary.
- */
-extern void appendPQExpBufferStr(PQExpBuffer str, const char *data);
-
-/*------------------------
- * appendPQExpBufferChar
- * Append a single byte to str.
- * Like appendPQExpBuffer(str, "%c", ch) but much faster.
- */
-extern void appendPQExpBufferChar(PQExpBuffer str, char ch);
-
-/*------------------------
- * appendBinaryPQExpBuffer
- * Append arbitrary binary data to a PQExpBuffer, allocating more space
- * if necessary.
- */
-extern void appendBinaryPQExpBuffer(PQExpBuffer str,
-									const char *data, size_t datalen);
-
-#endif							/* PQEXPBUFFER_H */
diff --git a/contrib/libs/libpq/src/interfaces/libpq/pthread-win32.c b/contrib/libs/libpq/src/interfaces/libpq/pthread-win32.c
deleted file mode 100644
index 8e65637387..0000000000
--- a/contrib/libs/libpq/src/interfaces/libpq/pthread-win32.c
+++ /dev/null
@@ -1,60 +0,0 @@
-/*-------------------------------------------------------------------------
-*
-* pthread-win32.c
-*	 partial pthread implementation for win32
-*
-* Copyright (c) 2004-2023, PostgreSQL Global Development Group
-* IDENTIFICATION
-*	src/interfaces/libpq/pthread-win32.c
-*
-*-------------------------------------------------------------------------
-*/
-
-#include "postgres_fe.h"
-
-#include "pthread-win32.h"
-
-DWORD
-pthread_self(void)
-{
-	return GetCurrentThreadId();
-}
-
-void
-pthread_setspecific(pthread_key_t key, void *val)
-{
-}
-
-void *
-pthread_getspecific(pthread_key_t key)
-{
-	return NULL;
-}
-
-int
-pthread_mutex_init(pthread_mutex_t *mp, void *attr)
-{
-	*mp = (CRITICAL_SECTION *) malloc(sizeof(CRITICAL_SECTION));
-	if (!*mp)
-		return 1;
-	InitializeCriticalSection(*mp);
-	return 0;
-}
-
-int
-pthread_mutex_lock(pthread_mutex_t *mp)
-{
-	if (!*mp)
-		return 1;
-	EnterCriticalSection(*mp);
-	return 0;
-}
-
-int
-pthread_mutex_unlock(pthread_mutex_t *mp)
-{
-	if (!*mp)
-		return 1;
-	LeaveCriticalSection(*mp);
-	return 0;
-}
diff --git a/contrib/libs/libpq/src/interfaces/libpq/win32.c b/contrib/libs/libpq/src/interfaces/libpq/win32.c
deleted file mode 100644
index e4d29eefa6..0000000000
--- a/contrib/libs/libpq/src/interfaces/libpq/win32.c
+++ /dev/null
@@ -1,320 +0,0 @@
-/*
- * src/interfaces/libpq/win32.c
- *
- *
- *	FILE
- *		win32.c
- *
- *	DESCRIPTION
- *		Win32 support functions.
- *
- * Contains table and functions for looking up win32 socket error
- * descriptions. But will/may contain other win32 helper functions
- * for libpq.
- *
- * The error constants are taken from the Frambak Bakfram LGSOCKET
- * library guys who in turn took them from the Winsock FAQ.
- *
- * Portions Copyright (c) 1996-2023, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- */
-
-/* Make stuff compile faster by excluding not used stuff */
-
-#define VC_EXTRALEAN
-#ifndef __MINGW32__
-#define NOGDI
-#endif
-#define NOCRYPT
-
-#include "postgres_fe.h"
-
-#include "win32.h"
-
-/* Declared here to avoid pulling in all includes, which causes name collisions */
-#ifdef ENABLE_NLS
-extern char *libpq_gettext(const char *msgid) pg_attribute_format_arg(1);
-#else
-#define libpq_gettext(x) (x)
-#endif
-
-
-static struct WSErrorEntry
-{
-	DWORD		error;
-	const char *description;
-}			WSErrors[] =
-
-{
-	{
-		0, "No error"
-	},
-	{
-		WSAEINTR, "Interrupted system call"
-	},
-	{
-		WSAEBADF, "Bad file number"
-	},
-	{
-		WSAEACCES, "Permission denied"
-	},
-	{
-		WSAEFAULT, "Bad address"
-	},
-	{
-		WSAEINVAL, "Invalid argument"
-	},
-	{
-		WSAEMFILE, "Too many open sockets"
-	},
-	{
-		WSAEWOULDBLOCK, "Operation would block"
-	},
-	{
-		WSAEINPROGRESS, "Operation now in progress"
-	},
-	{
-		WSAEALREADY, "Operation already in progress"
-	},
-	{
-		WSAENOTSOCK, "Socket operation on non-socket"
-	},
-	{
-		WSAEDESTADDRREQ, "Destination address required"
-	},
-	{
-		WSAEMSGSIZE, "Message too long"
-	},
-	{
-		WSAEPROTOTYPE, "Protocol wrong type for socket"
-	},
-	{
-		WSAENOPROTOOPT, "Bad protocol option"
-	},
-	{
-		WSAEPROTONOSUPPORT, "Protocol not supported"
-	},
-	{
-		WSAESOCKTNOSUPPORT, "Socket type not supported"
-	},
-	{
-		WSAEOPNOTSUPP, "Operation not supported on socket"
-	},
-	{
-		WSAEPFNOSUPPORT, "Protocol family not supported"
-	},
-	{
-		WSAEAFNOSUPPORT, "Address family not supported"
-	},
-	{
-		WSAEADDRINUSE, "Address already in use"
-	},
-	{
-		WSAEADDRNOTAVAIL, "Cannot assign requested address"
-	},
-	{
-		WSAENETDOWN, "Network is down"
-	},
-	{
-		WSAENETUNREACH, "Network is unreachable"
-	},
-	{
-		WSAENETRESET, "Net connection reset"
-	},
-	{
-		WSAECONNABORTED, "Software caused connection abort"
-	},
-	{
-		WSAECONNRESET, "Connection reset by peer"
-	},
-	{
-		WSAENOBUFS, "No buffer space available"
-	},
-	{
-		WSAEISCONN, "Socket is already connected"
-	},
-	{
-		WSAENOTCONN, "Socket is not connected"
-	},
-	{
-		WSAESHUTDOWN, "Cannot send after socket shutdown"
-	},
-	{
-		WSAETOOMANYREFS, "Too many references, cannot splice"
-	},
-	{
-		WSAETIMEDOUT, "Connection timed out"
-	},
-	{
-		WSAECONNREFUSED, "Connection refused"
-	},
-	{
-		WSAELOOP, "Too many levels of symbolic links"
-	},
-	{
-		WSAENAMETOOLONG, "File name too long"
-	},
-	{
-		WSAEHOSTDOWN, "Host is down"
-	},
-	{
-		WSAEHOSTUNREACH, "No route to host"
-	},
-	{
-		WSAENOTEMPTY, "Directory not empty"
-	},
-	{
-		WSAEPROCLIM, "Too many processes"
-	},
-	{
-		WSAEUSERS, "Too many users"
-	},
-	{
-		WSAEDQUOT, "Disc quota exceeded"
-	},
-	{
-		WSAESTALE, "Stale NFS file handle"
-	},
-	{
-		WSAEREMOTE, "Too many levels of remote in path"
-	},
-	{
-		WSASYSNOTREADY, "Network system is unavailable"
-	},
-	{
-		WSAVERNOTSUPPORTED, "Winsock version out of range"
-	},
-	{
-		WSANOTINITIALISED, "WSAStartup not yet called"
-	},
-	{
-		WSAEDISCON, "Graceful shutdown in progress"
-	},
-	{
-		WSAHOST_NOT_FOUND, "Host not found"
-	},
-	{
-		WSATRY_AGAIN, "NA Host not found / SERVFAIL"
-	},
-	{
-		WSANO_RECOVERY, "Non recoverable FORMERR||REFUSED||NOTIMP"
-	},
-	{
-		WSANO_DATA, "No host data of that type was found"
-	},
-	{
-		0, 0
-	}							/* End of table */
-};
-
-
-/*
- * Returns 0 if not found, linear but who cares, at this moment
- * we're already in pain :)
- */
-
-static int
-LookupWSErrorMessage(DWORD err, char *dest)
-{
-	struct WSErrorEntry *e;
-
-	for (e = WSErrors; e->description; e++)
-	{
-		if (e->error == err)
-		{
-			strcpy(dest, e->description);
-			return 1;
-		}
-	}
-	return 0;
-}
-
-
-struct MessageDLL
-{
-	const char *dll_name;
-	void	   *handle;
-	int			loaded;			/* BOOL */
-}			dlls[] =
-
-{
-	{
-		"netmsg.dll", 0, 0
-	},
-	{
-		"winsock.dll", 0, 0
-	},
-	{
-		"ws2_32.dll", 0, 0
-	},
-	{
-		"wsock32n.dll", 0, 0
-	},
-	{
-		"mswsock.dll", 0, 0
-	},
-	{
-		"ws2help.dll", 0, 0
-	},
-	{
-		"ws2thk.dll", 0, 0
-	},
-	{
-		0, 0, 1
-	}							/* Last one, no dll, always loaded */
-};
-
-#define DLLS_SIZE (sizeof(dlls)/sizeof(struct MessageDLL))
-
-/*
- * Returns a description of the socket error by first trying
- * to find it in the lookup table, and if that fails, tries
- * to load any of the winsock dlls to find that message.
- */
-
-const char *
-winsock_strerror(int err, char *strerrbuf, size_t buflen)
-{
-	unsigned long flags;
-	int			offs,
-				i;
-	int			success = LookupWSErrorMessage(err, strerrbuf);
-
-	for (i = 0; !success && i < DLLS_SIZE; i++)
-	{
-
-		if (!dlls[i].loaded)
-		{
-			dlls[i].loaded = 1; /* Only load once */
-			dlls[i].handle = (void *) LoadLibraryEx(dlls[i].dll_name,
-													0,
-													LOAD_LIBRARY_AS_DATAFILE);
-		}
-
-		if (dlls[i].dll_name && !dlls[i].handle)
-			continue;			/* Didn't load */
-
-		flags = FORMAT_MESSAGE_FROM_SYSTEM
-			| FORMAT_MESSAGE_IGNORE_INSERTS
-			| (dlls[i].handle ? FORMAT_MESSAGE_FROM_HMODULE : 0);
-
-		success = 0 != FormatMessage(flags,
-									 dlls[i].handle, err,
-									 MAKELANGID(LANG_ENGLISH, SUBLANG_DEFAULT),
-									 strerrbuf, buflen - 64,
-									 0);
-	}
-
-	if (!success)
-		sprintf(strerrbuf, libpq_gettext("unrecognized socket error: 0x%08X/%d"), err, err);
-	else
-	{
-		strerrbuf[buflen - 1] = '\0';
-		offs = strlen(strerrbuf);
-		if (offs > (int) buflen - 64)
-			offs = buflen - 64;
-		sprintf(strerrbuf + offs, " (0x%08X/%d)", err, err);
-	}
-	return strerrbuf;
-}
diff --git a/contrib/libs/libpq/src/port/README b/contrib/libs/libpq/src/port/README
deleted file mode 100644
index 97f18a6233..0000000000
--- a/contrib/libs/libpq/src/port/README
+++ /dev/null
@@ -1,32 +0,0 @@
-src/port/README
-
-libpgport
-=========
-
-libpgport must have special behavior.  It supplies functions to both
-libraries and applications.  However, there are two complexities:
-
-1)  Libraries need to use object files that are compiled with exactly
-the same flags as the library.  libpgport might not use the same flags,
-so it is necessary to recompile the object files for individual
-libraries.  This is done by removing -lpgport from the link line:
-
-        # Need to recompile any libpgport object files
-        LIBS := $(filter-out -lpgport, $(LIBS))
-
-and adding infrastructure to recompile the object files:
-
-        OBJS= execute.o typename.o descriptor.o data.o error.o prepare.o memory.o \
-                connect.o misc.o path.o exec.o \
-                $(filter strlcat.o, $(LIBOBJS))
-
-The problem is that there is no testing of which object files need to be
-added, but missing functions usually show up when linking user
-applications.
-
-2) For applications, we use -lpgport before -lpq, so the static files
-from libpgport are linked first.  This avoids having applications
-dependent on symbols that are _used_ by libpq, but not intended to be
-exported by libpq.  libpq's libpgport usage changes over time, so such a
-dependency is a problem.  Windows, Linux, AIX, and macOS use an export
-list to control the symbols exported by libpq.
diff --git a/contrib/libs/libpq/src/port/bsearch_arg.c b/contrib/libs/libpq/src/port/bsearch_arg.c
deleted file mode 100644
index 641b40c353..0000000000
--- a/contrib/libs/libpq/src/port/bsearch_arg.c
+++ /dev/null
@@ -1,78 +0,0 @@
-/*
- * bsearch_arg.c: bsearch variant with a user-supplied pointer
- *
- * Copyright (c) 2021-2023, PostgreSQL Global Development Group
- * Copyright (c) 1990 Regents of the University of California.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- * 3. [rescinded 22 July 1999]
- * 4. Neither the name of the University nor the names of its contributors
- *    may be used to endorse or promote products derived from this software
- *    without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * src/port/bsearch_arg.c
- */
-
-#include "c.h"
-
-/*
- * Perform a binary search.
- *
- * The code below is a bit sneaky.  After a comparison fails, we
- * divide the work in half by moving either left or right. If lim
- * is odd, moving left simply involves halving lim: e.g., when lim
- * is 5 we look at item 2, so we change lim to 2 so that we will
- * look at items 0 & 1.  If lim is even, the same applies.  If lim
- * is odd, moving right again involves halving lim, this time moving
- * the base up one item past p: e.g., when lim is 5 we change base
- * to item 3 and make lim 2 so that we will look at items 3 and 4.
- * If lim is even, however, we have to shrink it by one before
- * halving: e.g., when lim is 4, we still looked at item 2, so we
- * have to make lim 3, then halve, obtaining 1, so that we will only
- * look at item 3.
- */
-void *
-bsearch_arg(const void *key, const void *base0,
-			size_t nmemb, size_t size,
-			int (*compar) (const void *, const void *, void *),
-			void *arg)
-{
-	const char *base = (const char *) base0;
-	int			lim,
-				cmp;
-	const void *p;
-
-	for (lim = nmemb; lim != 0; lim >>= 1)
-	{
-		p = base + (lim >> 1) * size;
-		cmp = (*compar) (key, p, arg);
-		if (cmp == 0)
-			return (void *) p;
-		if (cmp > 0)
-		{						/* key > p: move right */
-			base = (const char *) p + size;
-			lim--;
-		}						/* else move left */
-	}
-	return (NULL);
-}
diff --git a/contrib/libs/libpq/src/port/chklocale.c b/contrib/libs/libpq/src/port/chklocale.c
deleted file mode 100644
index 6fa6810a46..0000000000
--- a/contrib/libs/libpq/src/port/chklocale.c
+++ /dev/null
@@ -1,433 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * chklocale.c
- *		Functions for handling locale-related info
- *
- *
- * Copyright (c) 1996-2023, PostgreSQL Global Development Group
- *
- *
- * IDENTIFICATION
- *	  src/port/chklocale.c
- *
- *-------------------------------------------------------------------------
- */
-
-#ifndef FRONTEND
-#include "postgres.h"
-#else
-#include "postgres_fe.h"
-#endif
-
-#ifdef HAVE_LANGINFO_H
-#include <langinfo.h>
-#endif
-
-#include "mb/pg_wchar.h"
-
-
-/*
- * This table needs to recognize all the CODESET spellings for supported
- * backend encodings, as well as frontend-only encodings where possible
- * (the latter case is currently only needed for initdb to recognize
- * error situations).  On Windows, we rely on entries for codepage
- * numbers (CPnnn).
- *
- * Note that we search the table with pg_strcasecmp(), so variant
- * capitalizations don't need their own entries.
- */
-struct encoding_match
-{
-	enum pg_enc pg_enc_code;
-	const char *system_enc_name;
-};
-
-static const struct encoding_match encoding_match_list[] = {
-	{PG_EUC_JP, "EUC-JP"},
-	{PG_EUC_JP, "eucJP"},
-	{PG_EUC_JP, "IBM-eucJP"},
-	{PG_EUC_JP, "sdeckanji"},
-	{PG_EUC_JP, "CP20932"},
-
-	{PG_EUC_CN, "EUC-CN"},
-	{PG_EUC_CN, "eucCN"},
-	{PG_EUC_CN, "IBM-eucCN"},
-	{PG_EUC_CN, "GB2312"},
-	{PG_EUC_CN, "dechanzi"},
-	{PG_EUC_CN, "CP20936"},
-
-	{PG_EUC_KR, "EUC-KR"},
-	{PG_EUC_KR, "eucKR"},
-	{PG_EUC_KR, "IBM-eucKR"},
-	{PG_EUC_KR, "deckorean"},
-	{PG_EUC_KR, "5601"},
-	{PG_EUC_KR, "CP51949"},
-
-	{PG_EUC_TW, "EUC-TW"},
-	{PG_EUC_TW, "eucTW"},
-	{PG_EUC_TW, "IBM-eucTW"},
-	{PG_EUC_TW, "cns11643"},
-	/* No codepage for EUC-TW ? */
-
-	{PG_UTF8, "UTF-8"},
-	{PG_UTF8, "utf8"},
-	{PG_UTF8, "CP65001"},
-
-	{PG_LATIN1, "ISO-8859-1"},
-	{PG_LATIN1, "ISO8859-1"},
-	{PG_LATIN1, "iso88591"},
-	{PG_LATIN1, "CP28591"},
-
-	{PG_LATIN2, "ISO-8859-2"},
-	{PG_LATIN2, "ISO8859-2"},
-	{PG_LATIN2, "iso88592"},
-	{PG_LATIN2, "CP28592"},
-
-	{PG_LATIN3, "ISO-8859-3"},
-	{PG_LATIN3, "ISO8859-3"},
-	{PG_LATIN3, "iso88593"},
-	{PG_LATIN3, "CP28593"},
-
-	{PG_LATIN4, "ISO-8859-4"},
-	{PG_LATIN4, "ISO8859-4"},
-	{PG_LATIN4, "iso88594"},
-	{PG_LATIN4, "CP28594"},
-
-	{PG_LATIN5, "ISO-8859-9"},
-	{PG_LATIN5, "ISO8859-9"},
-	{PG_LATIN5, "iso88599"},
-	{PG_LATIN5, "CP28599"},
-
-	{PG_LATIN6, "ISO-8859-10"},
-	{PG_LATIN6, "ISO8859-10"},
-	{PG_LATIN6, "iso885910"},
-
-	{PG_LATIN7, "ISO-8859-13"},
-	{PG_LATIN7, "ISO8859-13"},
-	{PG_LATIN7, "iso885913"},
-
-	{PG_LATIN8, "ISO-8859-14"},
-	{PG_LATIN8, "ISO8859-14"},
-	{PG_LATIN8, "iso885914"},
-
-	{PG_LATIN9, "ISO-8859-15"},
-	{PG_LATIN9, "ISO8859-15"},
-	{PG_LATIN9, "iso885915"},
-	{PG_LATIN9, "CP28605"},
-
-	{PG_LATIN10, "ISO-8859-16"},
-	{PG_LATIN10, "ISO8859-16"},
-	{PG_LATIN10, "iso885916"},
-
-	{PG_KOI8R, "KOI8-R"},
-	{PG_KOI8R, "CP20866"},
-
-	{PG_KOI8U, "KOI8-U"},
-	{PG_KOI8U, "CP21866"},
-
-	{PG_WIN866, "CP866"},
-	{PG_WIN874, "CP874"},
-	{PG_WIN1250, "CP1250"},
-	{PG_WIN1251, "CP1251"},
-	{PG_WIN1251, "ansi-1251"},
-	{PG_WIN1252, "CP1252"},
-	{PG_WIN1253, "CP1253"},
-	{PG_WIN1254, "CP1254"},
-	{PG_WIN1255, "CP1255"},
-	{PG_WIN1256, "CP1256"},
-	{PG_WIN1257, "CP1257"},
-	{PG_WIN1258, "CP1258"},
-
-	{PG_ISO_8859_5, "ISO-8859-5"},
-	{PG_ISO_8859_5, "ISO8859-5"},
-	{PG_ISO_8859_5, "iso88595"},
-	{PG_ISO_8859_5, "CP28595"},
-
-	{PG_ISO_8859_6, "ISO-8859-6"},
-	{PG_ISO_8859_6, "ISO8859-6"},
-	{PG_ISO_8859_6, "iso88596"},
-	{PG_ISO_8859_6, "CP28596"},
-
-	{PG_ISO_8859_7, "ISO-8859-7"},
-	{PG_ISO_8859_7, "ISO8859-7"},
-	{PG_ISO_8859_7, "iso88597"},
-	{PG_ISO_8859_7, "CP28597"},
-
-	{PG_ISO_8859_8, "ISO-8859-8"},
-	{PG_ISO_8859_8, "ISO8859-8"},
-	{PG_ISO_8859_8, "iso88598"},
-	{PG_ISO_8859_8, "CP28598"},
-
-	{PG_SJIS, "SJIS"},
-	{PG_SJIS, "PCK"},
-	{PG_SJIS, "CP932"},
-	{PG_SJIS, "SHIFT_JIS"},
-
-	{PG_BIG5, "BIG5"},
-	{PG_BIG5, "BIG5HKSCS"},
-	{PG_BIG5, "Big5-HKSCS"},
-	{PG_BIG5, "CP950"},
-
-	{PG_GBK, "GBK"},
-	{PG_GBK, "CP936"},
-
-	{PG_UHC, "UHC"},
-	{PG_UHC, "CP949"},
-
-	{PG_JOHAB, "JOHAB"},
-	{PG_JOHAB, "CP1361"},
-
-	{PG_GB18030, "GB18030"},
-	{PG_GB18030, "CP54936"},
-
-	{PG_SHIFT_JIS_2004, "SJIS_2004"},
-
-	{PG_SQL_ASCII, "US-ASCII"},
-
-	{PG_SQL_ASCII, NULL}		/* end marker */
-};
-
-#ifdef WIN32
-/*
- * On Windows, use CP<code page number> instead of the nl_langinfo() result
- *
- * This routine uses GetLocaleInfoEx() to parse short locale names like
- * "de-DE", "fr-FR", etc.  If those cannot be parsed correctly process falls
- * back to the pre-VS-2010 manual parsing done with using
- * <Language>_<Country>.<CodePage> as a base.
- *
- * Returns a malloc()'d string for the caller to free.
- */
-static char *
-win32_langinfo(const char *ctype)
-{
-	char	   *r = NULL;
-	char	   *codepage;
-
-#if defined(_MSC_VER)
-	uint32		cp;
-	WCHAR		wctype[LOCALE_NAME_MAX_LENGTH];
-
-	memset(wctype, 0, sizeof(wctype));
-	MultiByteToWideChar(CP_ACP, 0, ctype, -1, wctype, LOCALE_NAME_MAX_LENGTH);
-
-	if (GetLocaleInfoEx(wctype,
-						LOCALE_IDEFAULTANSICODEPAGE | LOCALE_RETURN_NUMBER,
-						(LPWSTR) &cp, sizeof(cp) / sizeof(WCHAR)) > 0)
-	{
-		r = malloc(16);			/* excess */
-		if (r != NULL)
-		{
-			/*
-			 * If the return value is CP_ACP that means no ANSI code page is
-			 * available, so only Unicode can be used for the locale.
-			 */
-			if (cp == CP_ACP)
-				strcpy(r, "utf8");
-			else
-				sprintf(r, "CP%u", cp);
-		}
-	}
-	else
-#endif
-	{
-		/*
-		 * Locale format on Win32 is <Language>_<Country>.<CodePage>.  For
-		 * example, English_United States.1252.  If we see digits after the
-		 * last dot, assume it's a codepage number.  Otherwise, we might be
-		 * dealing with a Unix-style locale string; Windows' setlocale() will
-		 * take those even though GetLocaleInfoEx() won't, so we end up here.
-		 * In that case, just return what's after the last dot and hope we can
-		 * find it in our table.
-		 */
-		codepage = strrchr(ctype, '.');
-		if (codepage != NULL)
-		{
-			size_t		ln;
-
-			codepage++;
-			ln = strlen(codepage);
-			r = malloc(ln + 3);
-			if (r != NULL)
-			{
-				if (strspn(codepage, "0123456789") == ln)
-					sprintf(r, "CP%s", codepage);
-				else
-					strcpy(r, codepage);
-			}
-		}
-	}
-
-	return r;
-}
-
-#ifndef FRONTEND
-/*
- * Given a Windows code page identifier, find the corresponding PostgreSQL
- * encoding.  Issue a warning and return -1 if none found.
- */
-int
-pg_codepage_to_encoding(UINT cp)
-{
-	char		sys[16];
-	int			i;
-
-	sprintf(sys, "CP%u", cp);
-
-	/* Check the table */
-	for (i = 0; encoding_match_list[i].system_enc_name; i++)
-		if (pg_strcasecmp(sys, encoding_match_list[i].system_enc_name) == 0)
-			return encoding_match_list[i].pg_enc_code;
-
-	ereport(WARNING,
-			(errmsg("could not determine encoding for codeset \"%s\"", sys)));
-
-	return -1;
-}
-#endif
-#endif							/* WIN32 */
-
-#if (defined(HAVE_LANGINFO_H) && defined(CODESET)) || defined(WIN32)
-
-/*
- * Given a setting for LC_CTYPE, return the Postgres ID of the associated
- * encoding, if we can determine it.  Return -1 if we can't determine it.
- *
- * Pass in NULL to get the encoding for the current locale setting.
- * Pass "" to get the encoding selected by the server's environment.
- *
- * If the result is PG_SQL_ASCII, callers should treat it as being compatible
- * with any desired encoding.
- *
- * If running in the backend and write_message is false, this function must
- * cope with the possibility that elog() and palloc() are not yet usable.
- */
-int
-pg_get_encoding_from_locale(const char *ctype, bool write_message)
-{
-	char	   *sys;
-	int			i;
-
-	/* Get the CODESET property, and also LC_CTYPE if not passed in */
-	if (ctype)
-	{
-		char	   *save;
-		char	   *name;
-
-		/* If locale is C or POSIX, we can allow all encodings */
-		if (pg_strcasecmp(ctype, "C") == 0 ||
-			pg_strcasecmp(ctype, "POSIX") == 0)
-			return PG_SQL_ASCII;
-
-		save = setlocale(LC_CTYPE, NULL);
-		if (!save)
-			return -1;			/* setlocale() broken? */
-		/* must copy result, or it might change after setlocale */
-		save = strdup(save);
-		if (!save)
-			return -1;			/* out of memory; unlikely */
-
-		name = setlocale(LC_CTYPE, ctype);
-		if (!name)
-		{
-			free(save);
-			return -1;			/* bogus ctype passed in? */
-		}
-
-#ifndef WIN32
-		sys = nl_langinfo(CODESET);
-		if (sys)
-			sys = strdup(sys);
-#else
-		sys = win32_langinfo(name);
-#endif
-
-		setlocale(LC_CTYPE, save);
-		free(save);
-	}
-	else
-	{
-		/* much easier... */
-		ctype = setlocale(LC_CTYPE, NULL);
-		if (!ctype)
-			return -1;			/* setlocale() broken? */
-
-		/* If locale is C or POSIX, we can allow all encodings */
-		if (pg_strcasecmp(ctype, "C") == 0 ||
-			pg_strcasecmp(ctype, "POSIX") == 0)
-			return PG_SQL_ASCII;
-
-#ifndef WIN32
-		sys = nl_langinfo(CODESET);
-		if (sys)
-			sys = strdup(sys);
-#else
-		sys = win32_langinfo(ctype);
-#endif
-	}
-
-	if (!sys)
-		return -1;				/* out of memory; unlikely */
-
-	/* Check the table */
-	for (i = 0; encoding_match_list[i].system_enc_name; i++)
-	{
-		if (pg_strcasecmp(sys, encoding_match_list[i].system_enc_name) == 0)
-		{
-			free(sys);
-			return encoding_match_list[i].pg_enc_code;
-		}
-	}
-
-	/* Special-case kluges for particular platforms go here */
-
-#ifdef __darwin__
-
-	/*
-	 * Current macOS has many locales that report an empty string for CODESET,
-	 * but they all seem to actually use UTF-8.
-	 */
-	if (strlen(sys) == 0)
-	{
-		free(sys);
-		return PG_UTF8;
-	}
-#endif
-
-	/*
-	 * We print a warning if we got a CODESET string but couldn't recognize
-	 * it.  This means we need another entry in the table.
-	 */
-	if (write_message)
-	{
-#ifdef FRONTEND
-		fprintf(stderr, _("could not determine encoding for locale \"%s\": codeset is \"%s\""),
-				ctype, sys);
-		/* keep newline separate so there's only one translatable string */
-		fputc('\n', stderr);
-#else
-		ereport(WARNING,
-				(errmsg("could not determine encoding for locale \"%s\": codeset is \"%s\"",
-						ctype, sys)));
-#endif
-	}
-
-	free(sys);
-	return -1;
-}
-#else							/* (HAVE_LANGINFO_H && CODESET) || WIN32 */
-
-/*
- * stub if no multi-language platform support
- *
- * Note: we could return -1 here, but that would have the effect of
- * forcing users to specify an encoding to initdb on such platforms.
- * It seems better to silently default to SQL_ASCII.
- */
-int
-pg_get_encoding_from_locale(const char *ctype, bool write_message)
-{
-	return PG_SQL_ASCII;
-}
-
-#endif							/* (HAVE_LANGINFO_H && CODESET) || WIN32 */
diff --git a/contrib/libs/libpq/src/port/dirmod.c b/contrib/libs/libpq/src/port/dirmod.c
deleted file mode 100644
index 07dd190cbc..0000000000
--- a/contrib/libs/libpq/src/port/dirmod.c
+++ /dev/null
@@ -1,422 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * dirmod.c
- *	  directory handling functions
- *
- * Portions Copyright (c) 1996-2023, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- *	This includes replacement versions of functions that work on
- *	Windows.
- *
- * IDENTIFICATION
- *	  src/port/dirmod.c
- *
- *-------------------------------------------------------------------------
- */
-
-#ifndef FRONTEND
-#include "postgres.h"
-#else
-#include "postgres_fe.h"
-#endif
-
-/* Don't modify declarations in system headers */
-#if defined(WIN32) || defined(__CYGWIN__)
-#undef rename
-#undef unlink
-#endif
-
-#include <unistd.h>
-#include <sys/stat.h>
-
-#if defined(WIN32) || defined(__CYGWIN__)
-#ifndef __CYGWIN__
-#include <winioctl.h>
-#else
-#include <windows.h>
-#include <w32api/winioctl.h>
-#endif
-#endif
-
-#if defined(WIN32) && !defined(__CYGWIN__)
-#include "port/win32ntdll.h"
-#endif
-
-#if defined(WIN32) || defined(__CYGWIN__)
-
-/*
- *	pgrename
- */
-int
-pgrename(const char *from, const char *to)
-{
-	int			loops = 0;
-
-	/*
-	 * We need to loop because even though PostgreSQL uses flags that allow
-	 * rename while the file is open, other applications might have the file
-	 * open without those flags.  However, we won't wait indefinitely for
-	 * someone else to close the file, as the caller might be holding locks
-	 * and blocking other backends.
-	 */
-#if defined(WIN32) && !defined(__CYGWIN__)
-	while (!MoveFileEx(from, to, MOVEFILE_REPLACE_EXISTING))
-#else
-	while (rename(from, to) < 0)
-#endif
-	{
-#if defined(WIN32) && !defined(__CYGWIN__)
-		DWORD		err = GetLastError();
-
-		_dosmaperr(err);
-
-		/*
-		 * Modern NT-based Windows versions return ERROR_SHARING_VIOLATION if
-		 * another process has the file open without FILE_SHARE_DELETE.
-		 * ERROR_LOCK_VIOLATION has also been seen with some anti-virus
-		 * software. This used to check for just ERROR_ACCESS_DENIED, so
-		 * presumably you can get that too with some OS versions. We don't
-		 * expect real permission errors where we currently use rename().
-		 */
-		if (err != ERROR_ACCESS_DENIED &&
-			err != ERROR_SHARING_VIOLATION &&
-			err != ERROR_LOCK_VIOLATION)
-			return -1;
-#else
-		if (errno != EACCES)
-			return -1;
-#endif
-
-		if (++loops > 100)		/* time out after 10 sec */
-			return -1;
-		pg_usleep(100000);		/* us */
-	}
-	return 0;
-}
-
-/*
- * Check if _pglstat64()'s reason for failure was STATUS_DELETE_PENDING.
- * This doesn't apply to Cygwin, which has its own lstat() that would report
- * the case as EACCES.
-*/
-static bool
-lstat_error_was_status_delete_pending(void)
-{
-	if (errno != ENOENT)
-		return false;
-#if defined(WIN32) && !defined(__CYGWIN__)
-	if (pg_RtlGetLastNtStatus() == STATUS_DELETE_PENDING)
-		return true;
-#endif
-	return false;
-}
-
-/*
- *	pgunlink
- */
-int
-pgunlink(const char *path)
-{
-	bool		is_lnk;
-	int			loops = 0;
-	struct stat st;
-
-	/*
-	 * This function might be called for a regular file or for a junction
-	 * point (which we use to emulate symlinks).  The latter must be unlinked
-	 * with rmdir() on Windows.  Before we worry about any of that, let's see
-	 * if we can unlink directly, since that's expected to be the most common
-	 * case.
-	 */
-	if (unlink(path) == 0)
-		return 0;
-	if (errno != EACCES)
-		return -1;
-
-	/*
-	 * EACCES is reported for many reasons including unlink() of a junction
-	 * point.  Check if that's the case so we can redirect to rmdir().
-	 *
-	 * Note that by checking only once, we can't cope with a path that changes
-	 * from regular file to junction point underneath us while we're retrying
-	 * due to sharing violations, but that seems unlikely.  We could perhaps
-	 * prevent that by holding a file handle ourselves across the lstat() and
-	 * the retry loop, but that seems like over-engineering for now.
-	 *
-	 * In the special case of a STATUS_DELETE_PENDING error (file already
-	 * unlinked, but someone still has it open), we don't want to report
-	 * ENOENT to the caller immediately, because rmdir(parent) would probably
-	 * fail. We want to wait until the file truly goes away so that simple
-	 * recursive directory unlink algorithms work.
-	 */
-	if (lstat(path, &st) < 0)
-	{
-		if (lstat_error_was_status_delete_pending())
-			is_lnk = false;
-		else
-			return -1;
-	}
-	else
-		is_lnk = S_ISLNK(st.st_mode);
-
-	/*
-	 * We need to loop because even though PostgreSQL uses flags that allow
-	 * unlink while the file is open, other applications might have the file
-	 * open without those flags.  However, we won't wait indefinitely for
-	 * someone else to close the file, as the caller might be holding locks
-	 * and blocking other backends.
-	 */
-	while ((is_lnk ? rmdir(path) : unlink(path)) < 0)
-	{
-		if (errno != EACCES)
-			return -1;
-		if (++loops > 100)		/* time out after 10 sec */
-			return -1;
-		pg_usleep(100000);		/* us */
-	}
-	return 0;
-}
-
-/* We undefined these above; now redefine for possible use below */
-#define rename(from, to)		pgrename(from, to)
-#define unlink(path)			pgunlink(path)
-#endif							/* defined(WIN32) || defined(__CYGWIN__) */
-
-
-#if defined(WIN32) && !defined(__CYGWIN__)	/* Cygwin has its own symlinks */
-
-/*
- *	pgsymlink support:
- *
- *	This struct is a replacement for REPARSE_DATA_BUFFER which is defined in VC6 winnt.h
- *	but omitted in later SDK functions.
- *	We only need the SymbolicLinkReparseBuffer part of the original struct's union.
- */
-typedef struct
-{
-	DWORD		ReparseTag;
-	WORD		ReparseDataLength;
-	WORD		Reserved;
-	/* SymbolicLinkReparseBuffer */
-	WORD		SubstituteNameOffset;
-	WORD		SubstituteNameLength;
-	WORD		PrintNameOffset;
-	WORD		PrintNameLength;
-	WCHAR		PathBuffer[FLEXIBLE_ARRAY_MEMBER];
-} REPARSE_JUNCTION_DATA_BUFFER;
-
-#define REPARSE_JUNCTION_DATA_BUFFER_HEADER_SIZE   \
-		FIELD_OFFSET(REPARSE_JUNCTION_DATA_BUFFER, SubstituteNameOffset)
-
-
-/*
- *	pgsymlink - uses Win32 junction points
- *
- *	For reference:	http://www.codeproject.com/KB/winsdk/junctionpoints.aspx
- */
-int
-pgsymlink(const char *oldpath, const char *newpath)
-{
-	HANDLE		dirhandle;
-	DWORD		len;
-	char		buffer[MAX_PATH * sizeof(WCHAR) + offsetof(REPARSE_JUNCTION_DATA_BUFFER, PathBuffer)];
-	char		nativeTarget[MAX_PATH];
-	char	   *p = nativeTarget;
-	REPARSE_JUNCTION_DATA_BUFFER *reparseBuf = (REPARSE_JUNCTION_DATA_BUFFER *) buffer;
-
-	CreateDirectory(newpath, 0);
-	dirhandle = CreateFile(newpath, GENERIC_READ | GENERIC_WRITE,
-						   0, 0, OPEN_EXISTING,
-						   FILE_FLAG_OPEN_REPARSE_POINT | FILE_FLAG_BACKUP_SEMANTICS, 0);
-
-	if (dirhandle == INVALID_HANDLE_VALUE)
-	{
-		_dosmaperr(GetLastError());
-		return -1;
-	}
-
-	/* make sure we have an unparsed native win32 path */
-	if (memcmp("\\??\\", oldpath, 4) != 0)
-		snprintf(nativeTarget, sizeof(nativeTarget), "\\??\\%s", oldpath);
-	else
-		strlcpy(nativeTarget, oldpath, sizeof(nativeTarget));
-
-	while ((p = strchr(p, '/')) != NULL)
-		*p++ = '\\';
-
-	len = strlen(nativeTarget) * sizeof(WCHAR);
-	reparseBuf->ReparseTag = IO_REPARSE_TAG_MOUNT_POINT;
-	reparseBuf->ReparseDataLength = len + 12;
-	reparseBuf->Reserved = 0;
-	reparseBuf->SubstituteNameOffset = 0;
-	reparseBuf->SubstituteNameLength = len;
-	reparseBuf->PrintNameOffset = len + sizeof(WCHAR);
-	reparseBuf->PrintNameLength = 0;
-	MultiByteToWideChar(CP_ACP, 0, nativeTarget, -1,
-						reparseBuf->PathBuffer, MAX_PATH);
-
-	/*
-	 * FSCTL_SET_REPARSE_POINT is coded differently depending on SDK version;
-	 * we use our own definition
-	 */
-	if (!DeviceIoControl(dirhandle,
-						 CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 41, METHOD_BUFFERED, FILE_ANY_ACCESS),
-						 reparseBuf,
-						 reparseBuf->ReparseDataLength + REPARSE_JUNCTION_DATA_BUFFER_HEADER_SIZE,
-						 0, 0, &len, 0))
-	{
-		LPSTR		msg;
-		int			save_errno;
-
-		_dosmaperr(GetLastError());
-		save_errno = errno;
-
-		FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER |
-					  FORMAT_MESSAGE_IGNORE_INSERTS |
-					  FORMAT_MESSAGE_FROM_SYSTEM,
-					  NULL, GetLastError(),
-					  MAKELANGID(LANG_ENGLISH, SUBLANG_DEFAULT),
-					  (LPSTR) &msg, 0, NULL);
-#ifndef FRONTEND
-		ereport(ERROR,
-				(errcode_for_file_access(),
-				 errmsg("could not set junction for \"%s\": %s",
-						nativeTarget, msg)));
-#else
-		fprintf(stderr, _("could not set junction for \"%s\": %s\n"),
-				nativeTarget, msg);
-#endif
-		LocalFree(msg);
-
-		CloseHandle(dirhandle);
-		RemoveDirectory(newpath);
-
-		errno = save_errno;
-
-		return -1;
-	}
-
-	CloseHandle(dirhandle);
-
-	return 0;
-}
-
-/*
- *	pgreadlink - uses Win32 junction points
- */
-int
-pgreadlink(const char *path, char *buf, size_t size)
-{
-	DWORD		attr;
-	HANDLE		h;
-	char		buffer[MAX_PATH * sizeof(WCHAR) + offsetof(REPARSE_JUNCTION_DATA_BUFFER, PathBuffer)];
-	REPARSE_JUNCTION_DATA_BUFFER *reparseBuf = (REPARSE_JUNCTION_DATA_BUFFER *) buffer;
-	DWORD		len;
-	int			r;
-
-	attr = GetFileAttributes(path);
-	if (attr == INVALID_FILE_ATTRIBUTES)
-	{
-		_dosmaperr(GetLastError());
-		return -1;
-	}
-	if ((attr & FILE_ATTRIBUTE_REPARSE_POINT) == 0)
-	{
-		errno = EINVAL;
-		return -1;
-	}
-
-	h = CreateFile(path,
-				   GENERIC_READ,
-				   FILE_SHARE_READ | FILE_SHARE_WRITE,
-				   NULL,
-				   OPEN_EXISTING,
-				   FILE_FLAG_OPEN_REPARSE_POINT | FILE_FLAG_BACKUP_SEMANTICS,
-				   0);
-	if (h == INVALID_HANDLE_VALUE)
-	{
-		_dosmaperr(GetLastError());
-		return -1;
-	}
-
-	if (!DeviceIoControl(h,
-						 FSCTL_GET_REPARSE_POINT,
-						 NULL,
-						 0,
-						 (LPVOID) reparseBuf,
-						 sizeof(buffer),
-						 &len,
-						 NULL))
-	{
-		LPSTR		msg;
-
-		errno = 0;
-		FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER |
-					  FORMAT_MESSAGE_IGNORE_INSERTS |
-					  FORMAT_MESSAGE_FROM_SYSTEM,
-					  NULL, GetLastError(),
-					  MAKELANGID(LANG_ENGLISH, SUBLANG_DEFAULT),
-					  (LPSTR) &msg, 0, NULL);
-#ifndef FRONTEND
-		ereport(ERROR,
-				(errcode_for_file_access(),
-				 errmsg("could not get junction for \"%s\": %s",
-						path, msg)));
-#else
-		fprintf(stderr, _("could not get junction for \"%s\": %s\n"),
-				path, msg);
-#endif
-		LocalFree(msg);
-		CloseHandle(h);
-		errno = EINVAL;
-		return -1;
-	}
-	CloseHandle(h);
-
-	/* Got it, let's get some results from this */
-	if (reparseBuf->ReparseTag != IO_REPARSE_TAG_MOUNT_POINT)
-	{
-		errno = EINVAL;
-		return -1;
-	}
-
-	r = WideCharToMultiByte(CP_ACP, 0,
-							reparseBuf->PathBuffer, -1,
-							buf,
-							size,
-							NULL, NULL);
-
-	if (r <= 0)
-	{
-		errno = EINVAL;
-		return -1;
-	}
-
-	/* r includes the null terminator */
-	r -= 1;
-
-	/*
-	 * If the path starts with "\??\" followed by a "drive absolute" path
-	 * (known to Windows APIs as RtlPathTypeDriveAbsolute), then strip that
-	 * prefix.  This undoes some of the transformation performed by
-	 * pgsymlink(), to get back to a format that users are used to seeing.  We
-	 * don't know how to transform other path types that might be encountered
-	 * outside PGDATA, so we just return them directly.
-	 */
-	if (r >= 7 &&
-		buf[0] == '\\' &&
-		buf[1] == '?' &&
-		buf[2] == '?' &&
-		buf[3] == '\\' &&
-		isalpha(buf[4]) &&
-		buf[5] == ':' &&
-		buf[6] == '\\')
-	{
-		memmove(buf, buf + 4, strlen(buf + 4) + 1);
-		r -= 4;
-	}
-	return r;
-}
-
-#endif							/* defined(WIN32) && !defined(__CYGWIN__) */
diff --git a/contrib/libs/libpq/src/port/getpeereid.c b/contrib/libs/libpq/src/port/getpeereid.c
deleted file mode 100644
index 3b040e076b..0000000000
--- a/contrib/libs/libpq/src/port/getpeereid.c
+++ /dev/null
@@ -1,78 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * getpeereid.c
- *		get peer userid for UNIX-domain socket connection
- *
- * Portions Copyright (c) 1996-2023, PostgreSQL Global Development Group
- *
- *
- * IDENTIFICATION
- *	  src/port/getpeereid.c
- *
- *-------------------------------------------------------------------------
- */
-
-#include "c.h"
-
-#include <sys/param.h>
-#include <sys/socket.h>
-#include <sys/un.h>
-#include <unistd.h>
-#ifdef HAVE_UCRED_H
-#include <ucred.h>
-#endif
-#ifdef HAVE_SYS_UCRED_H
-#include <sys/ucred.h>
-#endif
-
-
-/*
- * BSD-style getpeereid() for platforms that lack it.
- */
-int
-getpeereid(int sock, uid_t *uid, gid_t *gid)
-{
-#if defined(SO_PEERCRED)
-	/* Linux: use getsockopt(SO_PEERCRED) */
-	struct ucred peercred;
-	socklen_t	so_len = sizeof(peercred);
-
-	if (getsockopt(sock, SOL_SOCKET, SO_PEERCRED, &peercred, &so_len) != 0 ||
-		so_len != sizeof(peercred))
-		return -1;
-	*uid = peercred.uid;
-	*gid = peercred.gid;
-	return 0;
-#elif defined(LOCAL_PEERCRED)
-	/* Debian with FreeBSD kernel: use getsockopt(LOCAL_PEERCRED) */
-	struct xucred peercred;
-	socklen_t	so_len = sizeof(peercred);
-
-	if (getsockopt(sock, 0, LOCAL_PEERCRED, &peercred, &so_len) != 0 ||
-		so_len != sizeof(peercred) ||
-		peercred.cr_version != XUCRED_VERSION)
-		return -1;
-	*uid = peercred.cr_uid;
-	*gid = peercred.cr_gid;
-	return 0;
-#elif defined(HAVE_GETPEERUCRED)
-	/* Solaris: use getpeerucred() */
-	ucred_t    *ucred;
-
-	ucred = NULL;				/* must be initialized to NULL */
-	if (getpeerucred(sock, &ucred) == -1)
-		return -1;
-
-	*uid = ucred_geteuid(ucred);
-	*gid = ucred_getegid(ucred);
-	ucred_free(ucred);
-
-	if (*uid == (uid_t) (-1) || *gid == (gid_t) (-1))
-		return -1;
-	return 0;
-#else
-	/* No implementation available on this platform */
-	errno = ENOSYS;
-	return -1;
-#endif
-}
diff --git a/contrib/libs/libpq/src/port/inet_aton.c b/contrib/libs/libpq/src/port/inet_aton.c
deleted file mode 100644
index adaf18adb3..0000000000
--- a/contrib/libs/libpq/src/port/inet_aton.c
+++ /dev/null
@@ -1,149 +0,0 @@
-/* src/port/inet_aton.c
- *
- *	This inet_aton() function was taken from the GNU C library and
- *	incorporated into Postgres for those systems which do not have this
- *	routine in their standard C libraries.
- *
- *	The function was been extracted whole from the file inet_aton.c in
- *	Release 5.3.12 of the Linux C library, which is derived from the
- *	GNU C library, by Bryan Henderson in October 1996.  The copyright
- *	notice from that file is below.
- */
-
-/*
- * Copyright (c) 1983, 1990, 1993
- *		The Regents of the University of California.  All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *	  notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *	  notice, this list of conditions and the following disclaimer in the
- *	  documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the University nor the names of its contributors
- *	  may be used to endorse or promote products derived from this software
- *	  without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.  */
-
-#include "c.h"
-
-#include <netinet/in.h>
-#include <ctype.h>
-
-#include "port/pg_bswap.h"
-
-/*
- * Check whether "cp" is a valid ascii representation
- * of an Internet address and convert to a binary address.
- * Returns 1 if the address is valid, 0 if not.
- * This replaces inet_addr, the return value from which
- * cannot distinguish between failure and a local broadcast address.
- */
-int
-inet_aton(const char *cp, struct in_addr *addr)
-{
-	unsigned int val;
-	int			base,
-				n;
-	char		c;
-	u_int		parts[4];
-	u_int	   *pp = parts;
-
-	for (;;)
-	{
-		/*
-		 * Collect number up to ``.''. Values are specified as for C: 0x=hex,
-		 * 0=octal, other=decimal.
-		 */
-		val = 0;
-		base = 10;
-		if (*cp == '0')
-		{
-			if (*++cp == 'x' || *cp == 'X')
-				base = 16, cp++;
-			else
-				base = 8;
-		}
-		while ((c = *cp) != '\0')
-		{
-			if (isdigit((unsigned char) c))
-			{
-				val = (val * base) + (c - '0');
-				cp++;
-				continue;
-			}
-			if (base == 16 && isxdigit((unsigned char) c))
-			{
-				val = (val << 4) +
-					(c + 10 - (islower((unsigned char) c) ? 'a' : 'A'));
-				cp++;
-				continue;
-			}
-			break;
-		}
-		if (*cp == '.')
-		{
-			/*
-			 * Internet format: a.b.c.d a.b.c	(with c treated as 16-bits)
-			 * a.b	   (with b treated as 24 bits)
-			 */
-			if (pp >= parts + 3 || val > 0xff)
-				return 0;
-			*pp++ = val, cp++;
-		}
-		else
-			break;
-	}
-
-	/*
-	 * Check for trailing junk.
-	 */
-	while (*cp)
-		if (!isspace((unsigned char) *cp++))
-			return 0;
-
-	/*
-	 * Concoct the address according to the number of parts specified.
-	 */
-	n = pp - parts + 1;
-	switch (n)
-	{
-
-		case 1:					/* a -- 32 bits */
-			break;
-
-		case 2:					/* a.b -- 8.24 bits */
-			if (val > 0xffffff)
-				return 0;
-			val |= parts[0] << 24;
-			break;
-
-		case 3:					/* a.b.c -- 8.8.16 bits */
-			if (val > 0xffff)
-				return 0;
-			val |= (parts[0] << 24) | (parts[1] << 16);
-			break;
-
-		case 4:					/* a.b.c.d -- 8.8.8.8 bits */
-			if (val > 0xff)
-				return 0;
-			val |= (parts[0] << 24) | (parts[1] << 16) | (parts[2] << 8);
-			break;
-	}
-	if (addr)
-		addr->s_addr = pg_hton32(val);
-	return 1;
-}
diff --git a/contrib/libs/libpq/src/port/inet_net_ntop.c b/contrib/libs/libpq/src/port/inet_net_ntop.c
deleted file mode 100644
index 4044f22450..0000000000
--- a/contrib/libs/libpq/src/port/inet_net_ntop.c
+++ /dev/null
@@ -1,296 +0,0 @@
-/*
- * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
- * Copyright (c) 1996,1999 by Internet Software Consortium.
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
- * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- *
- *	  src/port/inet_net_ntop.c
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static const char rcsid[] = "Id: inet_net_ntop.c,v 1.1.2.2 2004/03/09 09:17:27 marka Exp $";
-#endif
-
-#ifndef FRONTEND
-#include "postgres.h"
-#else
-#include "postgres_fe.h"
-#endif
-
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-
-#ifndef FRONTEND
-#error #include "utils/inet.h"
-#else
-/*
- * In a frontend build, we can't include inet.h, but we still need to have
- * sensible definitions of these two constants.  Note that pg_inet_net_ntop()
- * assumes that PGSQL_AF_INET is equal to AF_INET.
- */
-#define PGSQL_AF_INET	(AF_INET + 0)
-#define PGSQL_AF_INET6	(AF_INET + 1)
-#endif
-
-
-#define NS_IN6ADDRSZ 16
-#define NS_INT16SZ 2
-
-#ifdef SPRINTF_CHAR
-#define SPRINTF(x) strlen(sprintf/**/x)
-#else
-#define SPRINTF(x) ((size_t)sprintf x)
-#endif
-
-static char *inet_net_ntop_ipv4(const u_char *src, int bits,
-								char *dst, size_t size);
-static char *inet_net_ntop_ipv6(const u_char *src, int bits,
-								char *dst, size_t size);
-
-
-/*
- * char *
- * pg_inet_net_ntop(af, src, bits, dst, size)
- *	convert host/network address from network to presentation format.
- *	"src"'s size is determined from its "af".
- * return:
- *	pointer to dst, or NULL if an error occurred (check errno).
- * note:
- *	192.5.5.1/28 has a nonzero host part, which means it isn't a network
- *	as called for by pg_inet_net_pton() but it can be a host address with
- *	an included netmask.
- * author:
- *	Paul Vixie (ISC), October 1998
- */
-char *
-pg_inet_net_ntop(int af, const void *src, int bits, char *dst, size_t size)
-{
-	/*
-	 * We need to cover both the address family constants used by the PG inet
-	 * type (PGSQL_AF_INET and PGSQL_AF_INET6) and those used by the system
-	 * libraries (AF_INET and AF_INET6).  We can safely assume PGSQL_AF_INET
-	 * == AF_INET, but the INET6 constants are very likely to be different.
-	 */
-	switch (af)
-	{
-		case PGSQL_AF_INET:
-			return (inet_net_ntop_ipv4(src, bits, dst, size));
-		case PGSQL_AF_INET6:
-#if AF_INET6 != PGSQL_AF_INET6
-		case AF_INET6:
-#endif
-			return (inet_net_ntop_ipv6(src, bits, dst, size));
-		default:
-			errno = EAFNOSUPPORT;
-			return (NULL);
-	}
-}
-
-/*
- * static char *
- * inet_net_ntop_ipv4(src, bits, dst, size)
- *	convert IPv4 network address from network to presentation format.
- *	"src"'s size is determined from its "af".
- * return:
- *	pointer to dst, or NULL if an error occurred (check errno).
- * note:
- *	network byte order assumed.  this means 192.5.5.240/28 has
- *	0b11110000 in its fourth octet.
- * author:
- *	Paul Vixie (ISC), October 1998
- */
-static char *
-inet_net_ntop_ipv4(const u_char *src, int bits, char *dst, size_t size)
-{
-	char	   *odst = dst;
-	char	   *t;
-	int			len = 4;
-	int			b;
-
-	if (bits < 0 || bits > 32)
-	{
-		errno = EINVAL;
-		return (NULL);
-	}
-
-	/* Always format all four octets, regardless of mask length. */
-	for (b = len; b > 0; b--)
-	{
-		if (size <= sizeof ".255")
-			goto emsgsize;
-		t = dst;
-		if (dst != odst)
-			*dst++ = '.';
-		dst += SPRINTF((dst, "%u", *src++));
-		size -= (size_t) (dst - t);
-	}
-
-	/* don't print masklen if 32 bits */
-	if (bits != 32)
-	{
-		if (size <= sizeof "/32")
-			goto emsgsize;
-		dst += SPRINTF((dst, "/%u", bits));
-	}
-
-	return (odst);
-
-emsgsize:
-	errno = EMSGSIZE;
-	return (NULL);
-}
-
-static int
-decoct(const u_char *src, int bytes, char *dst, size_t size)
-{
-	char	   *odst = dst;
-	char	   *t;
-	int			b;
-
-	for (b = 1; b <= bytes; b++)
-	{
-		if (size <= sizeof "255.")
-			return (0);
-		t = dst;
-		dst += SPRINTF((dst, "%u", *src++));
-		if (b != bytes)
-		{
-			*dst++ = '.';
-			*dst = '\0';
-		}
-		size -= (size_t) (dst - t);
-	}
-	return (dst - odst);
-}
-
-static char *
-inet_net_ntop_ipv6(const u_char *src, int bits, char *dst, size_t size)
-{
-	/*
-	 * Note that int32_t and int16_t need only be "at least" large enough to
-	 * contain a value of the specified size.  On some systems, like Crays,
-	 * there is no such thing as an integer variable with 16 bits. Keep this
-	 * in mind if you think this function should have been coded to use
-	 * pointer overlays.  All the world's not a VAX.
-	 */
-	char		tmp[sizeof "ffff:ffff:ffff:ffff:ffff:ffff:255.255.255.255/128"];
-	char	   *tp;
-	struct
-	{
-		int			base,
-					len;
-	}			best, cur;
-	u_int		words[NS_IN6ADDRSZ / NS_INT16SZ];
-	int			i;
-
-	if ((bits < -1) || (bits > 128))
-	{
-		errno = EINVAL;
-		return (NULL);
-	}
-
-	/*
-	 * Preprocess: Copy the input (bytewise) array into a wordwise array. Find
-	 * the longest run of 0x00's in src[] for :: shorthanding.
-	 */
-	memset(words, '\0', sizeof words);
-	for (i = 0; i < NS_IN6ADDRSZ; i++)
-		words[i / 2] |= (src[i] << ((1 - (i % 2)) << 3));
-	best.base = -1;
-	cur.base = -1;
-	best.len = 0;
-	cur.len = 0;
-	for (i = 0; i < (NS_IN6ADDRSZ / NS_INT16SZ); i++)
-	{
-		if (words[i] == 0)
-		{
-			if (cur.base == -1)
-				cur.base = i, cur.len = 1;
-			else
-				cur.len++;
-		}
-		else
-		{
-			if (cur.base != -1)
-			{
-				if (best.base == -1 || cur.len > best.len)
-					best = cur;
-				cur.base = -1;
-			}
-		}
-	}
-	if (cur.base != -1)
-	{
-		if (best.base == -1 || cur.len > best.len)
-			best = cur;
-	}
-	if (best.base != -1 && best.len < 2)
-		best.base = -1;
-
-	/*
-	 * Format the result.
-	 */
-	tp = tmp;
-	for (i = 0; i < (NS_IN6ADDRSZ / NS_INT16SZ); i++)
-	{
-		/* Are we inside the best run of 0x00's? */
-		if (best.base != -1 && i >= best.base &&
-			i < (best.base + best.len))
-		{
-			if (i == best.base)
-				*tp++ = ':';
-			continue;
-		}
-		/* Are we following an initial run of 0x00s or any real hex? */
-		if (i != 0)
-			*tp++ = ':';
-		/* Is this address an encapsulated IPv4? */
-		if (i == 6 && best.base == 0 && (best.len == 6 ||
-										 (best.len == 7 && words[7] != 0x0001) ||
-										 (best.len == 5 && words[5] == 0xffff)))
-		{
-			int			n;
-
-			n = decoct(src + 12, 4, tp, sizeof tmp - (tp - tmp));
-			if (n == 0)
-			{
-				errno = EMSGSIZE;
-				return (NULL);
-			}
-			tp += strlen(tp);
-			break;
-		}
-		tp += SPRINTF((tp, "%x", words[i]));
-	}
-
-	/* Was it a trailing run of 0x00's? */
-	if (best.base != -1 && (best.base + best.len) ==
-		(NS_IN6ADDRSZ / NS_INT16SZ))
-		*tp++ = ':';
-	*tp = '\0';
-
-	if (bits != -1 && bits != 128)
-		tp += SPRINTF((tp, "/%u", bits));
-
-	/*
-	 * Check for overflow, copy, and we're done.
-	 */
-	if ((size_t) (tp - tmp) > size)
-	{
-		errno = EMSGSIZE;
-		return (NULL);
-	}
-	strcpy(dst, tmp);
-	return (dst);
-}
diff --git a/contrib/libs/libpq/src/port/noblock.c b/contrib/libs/libpq/src/port/noblock.c
deleted file mode 100644
index d050a03085..0000000000
--- a/contrib/libs/libpq/src/port/noblock.c
+++ /dev/null
@@ -1,66 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * noblock.c
- *	  set a file descriptor as blocking or non-blocking
- *
- * Portions Copyright (c) 1996-2023, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- * IDENTIFICATION
- *	  src/port/noblock.c
- *
- *-------------------------------------------------------------------------
- */
-
-#include "c.h"
-
-#include <fcntl.h>
-
-
-/*
- * Put socket into nonblock mode.
- * Returns true on success, false on failure.
- */
-bool
-pg_set_noblock(pgsocket sock)
-{
-#if !defined(WIN32)
-	int			flags;
-
-	flags = fcntl(sock, F_GETFL);
-	if (flags < 0)
-		return false;
-	if (fcntl(sock, F_SETFL, (flags | O_NONBLOCK)) == -1)
-		return false;
-	return true;
-#else
-	unsigned long ioctlsocket_ret = 1;
-
-	/* Returns non-0 on failure, while fcntl() returns -1 on failure */
-	return (ioctlsocket(sock, FIONBIO, &ioctlsocket_ret) == 0);
-#endif
-}
-
-/*
- * Put socket into blocking mode.
- * Returns true on success, false on failure.
- */
-bool
-pg_set_block(pgsocket sock)
-{
-#if !defined(WIN32)
-	int			flags;
-
-	flags = fcntl(sock, F_GETFL);
-	if (flags < 0)
-		return false;
-	if (fcntl(sock, F_SETFL, (flags & ~O_NONBLOCK)) == -1)
-		return false;
-	return true;
-#else
-	unsigned long ioctlsocket_ret = 0;
-
-	/* Returns non-0 on failure, while fcntl() returns -1 on failure */
-	return (ioctlsocket(sock, FIONBIO, &ioctlsocket_ret) == 0);
-#endif
-}
diff --git a/contrib/libs/libpq/src/port/open.c b/contrib/libs/libpq/src/port/open.c
deleted file mode 100644
index 0bd9755006..0000000000
--- a/contrib/libs/libpq/src/port/open.c
+++ /dev/null
@@ -1,222 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * open.c
- *	   Win32 open() replacement
- *
- *
- * Portions Copyright (c) 1996-2023, PostgreSQL Global Development Group
- *
- * src/port/open.c
- *
- *-------------------------------------------------------------------------
- */
-
-#ifdef WIN32
-
-#ifndef FRONTEND
-#include "postgres.h"
-#else
-#include "postgres_fe.h"
-#endif
-
-#include "port/win32ntdll.h"
-
-#include <fcntl.h>
-#include <assert.h>
-#include <sys/stat.h>
-
-static int
-openFlagsToCreateFileFlags(int openFlags)
-{
-	switch (openFlags & (O_CREAT | O_TRUNC | O_EXCL))
-	{
-			/* O_EXCL is meaningless without O_CREAT */
-		case 0:
-		case O_EXCL:
-			return OPEN_EXISTING;
-
-		case O_CREAT:
-			return OPEN_ALWAYS;
-
-			/* O_EXCL is meaningless without O_CREAT */
-		case O_TRUNC:
-		case O_TRUNC | O_EXCL:
-			return TRUNCATE_EXISTING;
-
-		case O_CREAT | O_TRUNC:
-			return CREATE_ALWAYS;
-
-			/* O_TRUNC is meaningless with O_CREAT */
-		case O_CREAT | O_EXCL:
-		case O_CREAT | O_TRUNC | O_EXCL:
-			return CREATE_NEW;
-	}
-
-	/* will never get here */
-	return 0;
-}
-
-/*
- * Internal function used by pgwin32_open() and _pgstat64().  When
- * backup_semantics is true, directories may be opened (for limited uses).  On
- * failure, INVALID_HANDLE_VALUE is returned and errno is set.
- */
-HANDLE
-pgwin32_open_handle(const char *fileName, int fileFlags, bool backup_semantics)
-{
-	HANDLE		h;
-	SECURITY_ATTRIBUTES sa;
-	int			loops = 0;
-
-	if (initialize_ntdll() < 0)
-		return INVALID_HANDLE_VALUE;
-
-	/* Check that we can handle the request */
-	assert((fileFlags & ((O_RDONLY | O_WRONLY | O_RDWR) | O_APPEND |
-						 (O_RANDOM | O_SEQUENTIAL | O_TEMPORARY) |
-						 _O_SHORT_LIVED | O_DSYNC | O_DIRECT |
-						 (O_CREAT | O_TRUNC | O_EXCL) | (O_TEXT | O_BINARY))) == fileFlags);
-
-	sa.nLength = sizeof(sa);
-	sa.bInheritHandle = TRUE;
-	sa.lpSecurityDescriptor = NULL;
-
-	while ((h = CreateFile(fileName,
-	/* cannot use O_RDONLY, as it == 0 */
-						   (fileFlags & O_RDWR) ? (GENERIC_WRITE | GENERIC_READ) :
-						   ((fileFlags & O_WRONLY) ? GENERIC_WRITE : GENERIC_READ),
-	/* These flags allow concurrent rename/unlink */
-						   (FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE),
-						   &sa,
-						   openFlagsToCreateFileFlags(fileFlags),
-						   FILE_ATTRIBUTE_NORMAL |
-						   (backup_semantics ? FILE_FLAG_BACKUP_SEMANTICS : 0) |
-						   ((fileFlags & O_RANDOM) ? FILE_FLAG_RANDOM_ACCESS : 0) |
-						   ((fileFlags & O_SEQUENTIAL) ? FILE_FLAG_SEQUENTIAL_SCAN : 0) |
-						   ((fileFlags & _O_SHORT_LIVED) ? FILE_ATTRIBUTE_TEMPORARY : 0) |
-						   ((fileFlags & O_TEMPORARY) ? FILE_FLAG_DELETE_ON_CLOSE : 0) |
-						   ((fileFlags & O_DIRECT) ? FILE_FLAG_NO_BUFFERING : 0) |
-						   ((fileFlags & O_DSYNC) ? FILE_FLAG_WRITE_THROUGH : 0),
-						   NULL)) == INVALID_HANDLE_VALUE)
-	{
-		/*
-		 * Sharing violation or locking error can indicate antivirus, backup
-		 * or similar software that's locking the file.  Wait a bit and try
-		 * again, giving up after 30 seconds.
-		 */
-		DWORD		err = GetLastError();
-
-		if (err == ERROR_SHARING_VIOLATION ||
-			err == ERROR_LOCK_VIOLATION)
-		{
-#ifndef FRONTEND
-			if (loops == 50)
-				ereport(LOG,
-						(errmsg("could not open file \"%s\": %s", fileName,
-								(err == ERROR_SHARING_VIOLATION) ? _("sharing violation") : _("lock violation")),
-						 errdetail("Continuing to retry for 30 seconds."),
-						 errhint("You might have antivirus, backup, or similar software interfering with the database system.")));
-#endif
-
-			if (loops < 300)
-			{
-				pg_usleep(100000);
-				loops++;
-				continue;
-			}
-		}
-
-		/*
-		 * ERROR_ACCESS_DENIED is returned if the file is deleted but not yet
-		 * gone (Windows NT status code is STATUS_DELETE_PENDING).  In that
-		 * case, we'd better ask for the NT status too so we can translate it
-		 * to a more Unix-like error.  We hope that nothing clobbers the NT
-		 * status in between the internal NtCreateFile() call and CreateFile()
-		 * returning.
-		 *
-		 * If there's no O_CREAT flag, then we'll pretend the file is
-		 * invisible.  With O_CREAT, we have no choice but to report that
-		 * there's a file in the way (which wouldn't happen on Unix).
-		 */
-		if (err == ERROR_ACCESS_DENIED &&
-			pg_RtlGetLastNtStatus() == STATUS_DELETE_PENDING)
-		{
-			if (fileFlags & O_CREAT)
-				err = ERROR_FILE_EXISTS;
-			else
-				err = ERROR_FILE_NOT_FOUND;
-		}
-
-		_dosmaperr(err);
-		return INVALID_HANDLE_VALUE;
-	}
-
-	return h;
-}
-
-int
-pgwin32_open(const char *fileName, int fileFlags,...)
-{
-	HANDLE		h;
-	int			fd;
-
-	h = pgwin32_open_handle(fileName, fileFlags, false);
-	if (h == INVALID_HANDLE_VALUE)
-		return -1;
-
-#ifdef FRONTEND
-
-	/*
-	 * Since PostgreSQL 12, those concurrent-safe versions of open() and
-	 * fopen() can be used by frontends, having as side-effect to switch the
-	 * file-translation mode from O_TEXT to O_BINARY if none is specified.
-	 * Caller may want to enforce the binary or text mode, but if nothing is
-	 * defined make sure that the default mode maps with what versions older
-	 * than 12 have been doing.
-	 */
-	if ((fileFlags & O_BINARY) == 0)
-		fileFlags |= O_TEXT;
-#endif
-
-	/* _open_osfhandle will, on error, set errno accordingly */
-	if ((fd = _open_osfhandle((intptr_t) h, fileFlags & O_APPEND)) < 0)
-		CloseHandle(h);			/* will not affect errno */
-	else if (fileFlags & (O_TEXT | O_BINARY) &&
-			 _setmode(fd, fileFlags & (O_TEXT | O_BINARY)) < 0)
-	{
-		_close(fd);
-		return -1;
-	}
-
-	return fd;
-}
-
-FILE *
-pgwin32_fopen(const char *fileName, const char *mode)
-{
-	int			openmode = 0;
-	int			fd;
-
-	if (strstr(mode, "r+"))
-		openmode |= O_RDWR;
-	else if (strchr(mode, 'r'))
-		openmode |= O_RDONLY;
-	if (strstr(mode, "w+"))
-		openmode |= O_RDWR | O_CREAT | O_TRUNC;
-	else if (strchr(mode, 'w'))
-		openmode |= O_WRONLY | O_CREAT | O_TRUNC;
-	if (strchr(mode, 'a'))
-		openmode |= O_WRONLY | O_CREAT | O_APPEND;
-
-	if (strchr(mode, 'b'))
-		openmode |= O_BINARY;
-	if (strchr(mode, 't'))
-		openmode |= O_TEXT;
-
-	fd = pgwin32_open(fileName, openmode);
-	if (fd == -1)
-		return NULL;
-	return _fdopen(fd, mode);
-}
-
-#endif
diff --git a/contrib/libs/libpq/src/port/path.c b/contrib/libs/libpq/src/port/path.c
deleted file mode 100644
index 65c7943fee..0000000000
--- a/contrib/libs/libpq/src/port/path.c
+++ /dev/null
@@ -1,1057 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * path.c
- *	  portable path handling routines
- *
- * Portions Copyright (c) 1996-2023, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- *
- * IDENTIFICATION
- *	  src/port/path.c
- *
- *-------------------------------------------------------------------------
- */
-
-#ifndef FRONTEND
-#include "postgres.h"
-#else
-#include "postgres_fe.h"
-#endif
-
-#include <ctype.h>
-#include <sys/stat.h>
-#ifdef WIN32
-#ifdef _WIN32_IE
-#undef _WIN32_IE
-#endif
-#define _WIN32_IE 0x0500
-#ifdef near
-#undef near
-#endif
-#define near
-#include <shlobj.h>
-#else
-#include <unistd.h>
-#endif
-
-#include "pg_config_paths.h"
-
-
-#ifndef WIN32
-#define IS_PATH_VAR_SEP(ch) ((ch) == ':')
-#else
-#define IS_PATH_VAR_SEP(ch) ((ch) == ';')
-#endif
-
-static void make_relative_path(char *ret_path, const char *target_path,
-							   const char *bin_path, const char *my_exec_path);
-static char *trim_directory(char *path);
-static void trim_trailing_separator(char *path);
-static char *append_subdir_to_path(char *path, char *subdir);
-
-
-/*
- * skip_drive
- *
- * On Windows, a path may begin with "C:" or "//network/".  Advance over
- * this and point to the effective start of the path.
- */
-#ifdef WIN32
-
-static char *
-skip_drive(const char *path)
-{
-	if (IS_DIR_SEP(path[0]) && IS_DIR_SEP(path[1]))
-	{
-		path += 2;
-		while (*path && !IS_DIR_SEP(*path))
-			path++;
-	}
-	else if (isalpha((unsigned char) path[0]) && path[1] == ':')
-	{
-		path += 2;
-	}
-	return (char *) path;
-}
-#else
-
-#define skip_drive(path)	(path)
-#endif
-
-/*
- *	has_drive_prefix
- *
- * Return true if the given pathname has a drive prefix.
- */
-bool
-has_drive_prefix(const char *path)
-{
-#ifdef WIN32
-	return skip_drive(path) != path;
-#else
-	return false;
-#endif
-}
-
-/*
- *	first_dir_separator
- *
- * Find the location of the first directory separator, return
- * NULL if not found.
- */
-char *
-first_dir_separator(const char *filename)
-{
-	const char *p;
-
-	for (p = skip_drive(filename); *p; p++)
-		if (IS_DIR_SEP(*p))
-			return unconstify(char *, p);
-	return NULL;
-}
-
-/*
- *	first_path_var_separator
- *
- * Find the location of the first path separator (i.e. ':' on
- * Unix, ';' on Windows), return NULL if not found.
- */
-char *
-first_path_var_separator(const char *pathlist)
-{
-	const char *p;
-
-	/* skip_drive is not needed */
-	for (p = pathlist; *p; p++)
-		if (IS_PATH_VAR_SEP(*p))
-			return unconstify(char *, p);
-	return NULL;
-}
-
-/*
- *	last_dir_separator
- *
- * Find the location of the last directory separator, return
- * NULL if not found.
- */
-char *
-last_dir_separator(const char *filename)
-{
-	const char *p,
-			   *ret = NULL;
-
-	for (p = skip_drive(filename); *p; p++)
-		if (IS_DIR_SEP(*p))
-			ret = p;
-	return unconstify(char *, ret);
-}
-
-
-/*
- *	make_native_path - on WIN32, change / to \ in the path
- *
- *	This effectively undoes canonicalize_path.
- *
- *	This is required because WIN32 COPY is an internal CMD.EXE
- *	command and doesn't process forward slashes in the same way
- *	as external commands.  Quoting the first argument to COPY
- *	does not convert forward to backward slashes, but COPY does
- *	properly process quoted forward slashes in the second argument.
- *
- *	COPY works with quoted forward slashes in the first argument
- *	only if the current directory is the same as the directory
- *	of the first argument.
- */
-void
-make_native_path(char *filename)
-{
-#ifdef WIN32
-	char	   *p;
-
-	for (p = filename; *p; p++)
-		if (*p == '/')
-			*p = '\\';
-#endif
-}
-
-
-/*
- * This function cleans up the paths for use with either cmd.exe or Msys
- * on Windows. We need them to use filenames without spaces, for which a
- * short filename is the safest equivalent, eg:
- *		C:/Progra~1/
- */
-void
-cleanup_path(char *path)
-{
-#ifdef WIN32
-	char	   *ptr;
-
-	/*
-	 * GetShortPathName() will fail if the path does not exist, or short names
-	 * are disabled on this file system.  In both cases, we just return the
-	 * original path.  This is particularly useful for --sysconfdir, which
-	 * might not exist.
-	 */
-	GetShortPathName(path, path, MAXPGPATH - 1);
-
-	/* Replace '\' with '/' */
-	for (ptr = path; *ptr; ptr++)
-	{
-		if (*ptr == '\\')
-			*ptr = '/';
-	}
-#endif
-}
-
-
-/*
- * join_path_components - join two path components, inserting a slash
- *
- * We omit the slash if either given component is empty.
- *
- * ret_path is the output area (must be of size MAXPGPATH)
- *
- * ret_path can be the same as head, but not the same as tail.
- */
-void
-join_path_components(char *ret_path,
-					 const char *head, const char *tail)
-{
-	if (ret_path != head)
-		strlcpy(ret_path, head, MAXPGPATH);
-
-	/*
-	 * We used to try to simplify some cases involving "." and "..", but now
-	 * we just leave that to be done by canonicalize_path() later.
-	 */
-
-	if (*tail)
-	{
-		/* only separate with slash if head wasn't empty */
-		snprintf(ret_path + strlen(ret_path), MAXPGPATH - strlen(ret_path),
-				 "%s%s",
-				 (*(skip_drive(head)) != '\0') ? "/" : "",
-				 tail);
-	}
-}
-
-
-/* State-machine states for canonicalize_path */
-typedef enum
-{
-	ABSOLUTE_PATH_INIT,			/* Just past the leading '/' (and Windows
-								 * drive name if any) of an absolute path */
-	ABSOLUTE_WITH_N_DEPTH,		/* We collected 'pathdepth' directories in an
-								 * absolute path */
-	RELATIVE_PATH_INIT,			/* At start of a relative path */
-	RELATIVE_WITH_N_DEPTH,		/* We collected 'pathdepth' directories in a
-								 * relative path */
-	RELATIVE_WITH_PARENT_REF	/* Relative path containing only double-dots */
-} canonicalize_state;
-
-/*
- *	Clean up path by:
- *		o  make Win32 path use Unix slashes
- *		o  remove trailing quote on Win32
- *		o  remove trailing slash
- *		o  remove duplicate (adjacent) separators
- *		o  remove '.' (unless path reduces to only '.')
- *		o  process '..' ourselves, removing it if possible
- */
-void
-canonicalize_path(char *path)
-{
-	char	   *p,
-			   *to_p;
-	char	   *spath;
-	char	   *parsed;
-	char	   *unparse;
-	bool		was_sep = false;
-	canonicalize_state state;
-	int			pathdepth = 0;	/* counts collected regular directory names */
-
-#ifdef WIN32
-
-	/*
-	 * The Windows command processor will accept suitably quoted paths with
-	 * forward slashes, but barfs badly with mixed forward and back slashes.
-	 */
-	for (p = path; *p; p++)
-	{
-		if (*p == '\\')
-			*p = '/';
-	}
-
-	/*
-	 * In Win32, if you do: prog.exe "a b" "\c\d\" the system will pass \c\d"
-	 * as argv[2], so trim off trailing quote.
-	 */
-	if (p > path && *(p - 1) == '"')
-		*(p - 1) = '/';
-#endif
-
-	/*
-	 * Removing the trailing slash on a path means we never get ugly double
-	 * trailing slashes. Also, Win32 can't stat() a directory with a trailing
-	 * slash. Don't remove a leading slash, though.
-	 */
-	trim_trailing_separator(path);
-
-	/*
-	 * Remove duplicate adjacent separators
-	 */
-	p = path;
-#ifdef WIN32
-	/* Don't remove leading double-slash on Win32 */
-	if (*p)
-		p++;
-#endif
-	to_p = p;
-	for (; *p; p++, to_p++)
-	{
-		/* Handle many adjacent slashes, like "/a///b" */
-		while (*p == '/' && was_sep)
-			p++;
-		if (to_p != p)
-			*to_p = *p;
-		was_sep = (*p == '/');
-	}
-	*to_p = '\0';
-
-	/*
-	 * Remove any uses of "." and process ".." ourselves
-	 *
-	 * Note that "/../.." should reduce to just "/", while "../.." has to be
-	 * kept as-is.  Also note that we want a Windows drive spec to be visible
-	 * to trim_directory(), but it's not part of the logic that's looking at
-	 * the name components; hence distinction between path and spath.
-	 *
-	 * This loop overwrites the path in-place.  This is safe since we'll never
-	 * make the path longer.  "unparse" points to where we are reading the
-	 * path, "parse" to where we are writing.
-	 */
-	spath = skip_drive(path);
-	if (*spath == '\0')
-		return;					/* empty path is returned as-is */
-
-	if (*spath == '/')
-	{
-		state = ABSOLUTE_PATH_INIT;
-		/* Skip the leading slash for absolute path */
-		parsed = unparse = (spath + 1);
-	}
-	else
-	{
-		state = RELATIVE_PATH_INIT;
-		parsed = unparse = spath;
-	}
-
-	while (*unparse != '\0')
-	{
-		char	   *unparse_next;
-		bool		is_double_dot;
-
-		/* Split off this dir name, and set unparse_next to the next one */
-		unparse_next = unparse;
-		while (*unparse_next && *unparse_next != '/')
-			unparse_next++;
-		if (*unparse_next != '\0')
-			*unparse_next++ = '\0';
-
-		/* Identify type of this dir name */
-		if (strcmp(unparse, ".") == 0)
-		{
-			/* We can ignore "." components in all cases */
-			unparse = unparse_next;
-			continue;
-		}
-
-		if (strcmp(unparse, "..") == 0)
-			is_double_dot = true;
-		else
-		{
-			/* adjacent separators were eliminated above */
-			Assert(*unparse != '\0');
-			is_double_dot = false;
-		}
-
-		switch (state)
-		{
-			case ABSOLUTE_PATH_INIT:
-				/* We can ignore ".." immediately after / */
-				if (!is_double_dot)
-				{
-					/* Append first dir name (we already have leading slash) */
-					parsed = append_subdir_to_path(parsed, unparse);
-					state = ABSOLUTE_WITH_N_DEPTH;
-					pathdepth++;
-				}
-				break;
-			case ABSOLUTE_WITH_N_DEPTH:
-				if (is_double_dot)
-				{
-					/* Remove last parsed dir */
-					/* (trim_directory won't remove the leading slash) */
-					*parsed = '\0';
-					parsed = trim_directory(path);
-					if (--pathdepth == 0)
-						state = ABSOLUTE_PATH_INIT;
-				}
-				else
-				{
-					/* Append normal dir */
-					*parsed++ = '/';
-					parsed = append_subdir_to_path(parsed, unparse);
-					pathdepth++;
-				}
-				break;
-			case RELATIVE_PATH_INIT:
-				if (is_double_dot)
-				{
-					/* Append irreducible double-dot (..) */
-					parsed = append_subdir_to_path(parsed, unparse);
-					state = RELATIVE_WITH_PARENT_REF;
-				}
-				else
-				{
-					/* Append normal dir */
-					parsed = append_subdir_to_path(parsed, unparse);
-					state = RELATIVE_WITH_N_DEPTH;
-					pathdepth++;
-				}
-				break;
-			case RELATIVE_WITH_N_DEPTH:
-				if (is_double_dot)
-				{
-					/* Remove last parsed dir */
-					*parsed = '\0';
-					parsed = trim_directory(path);
-					if (--pathdepth == 0)
-					{
-						/*
-						 * If the output path is now empty, we're back to the
-						 * INIT state.  However, we could have processed a
-						 * path like "../dir/.." and now be down to "..", in
-						 * which case enter the correct state for that.
-						 */
-						if (parsed == spath)
-							state = RELATIVE_PATH_INIT;
-						else
-							state = RELATIVE_WITH_PARENT_REF;
-					}
-				}
-				else
-				{
-					/* Append normal dir */
-					*parsed++ = '/';
-					parsed = append_subdir_to_path(parsed, unparse);
-					pathdepth++;
-				}
-				break;
-			case RELATIVE_WITH_PARENT_REF:
-				if (is_double_dot)
-				{
-					/* Append next irreducible double-dot (..) */
-					*parsed++ = '/';
-					parsed = append_subdir_to_path(parsed, unparse);
-				}
-				else
-				{
-					/* Append normal dir */
-					*parsed++ = '/';
-					parsed = append_subdir_to_path(parsed, unparse);
-
-					/*
-					 * We can now start counting normal dirs.  But if later
-					 * double-dots make us remove this dir again, we'd better
-					 * revert to RELATIVE_WITH_PARENT_REF not INIT state.
-					 */
-					state = RELATIVE_WITH_N_DEPTH;
-					pathdepth = 1;
-				}
-				break;
-		}
-
-		unparse = unparse_next;
-	}
-
-	/*
-	 * If our output path is empty at this point, insert ".".  We don't want
-	 * to do this any earlier because it'd result in an extra dot in corner
-	 * cases such as "../dir/..".  Since we rejected the wholly-empty-path
-	 * case above, there is certainly room.
-	 */
-	if (parsed == spath)
-		*parsed++ = '.';
-
-	/* And finally, ensure the output path is nul-terminated. */
-	*parsed = '\0';
-}
-
-/*
- * Detect whether a path contains any parent-directory references ("..")
- *
- * The input *must* have been put through canonicalize_path previously.
- */
-bool
-path_contains_parent_reference(const char *path)
-{
-	/*
-	 * Once canonicalized, an absolute path cannot contain any ".." at all,
-	 * while a relative path could contain ".."(s) only at the start.  So it
-	 * is sufficient to check the start of the path, after skipping any
-	 * Windows drive/network specifier.
-	 */
-	path = skip_drive(path);	/* C: shouldn't affect our conclusion */
-
-	if (path[0] == '.' &&
-		path[1] == '.' &&
-		(path[2] == '\0' || path[2] == '/'))
-		return true;
-
-	return false;
-}
-
-/*
- * Detect whether a path is only in or below the current working directory.
- *
- * The input *must* have been put through canonicalize_path previously.
- *
- * An absolute path that matches the current working directory should
- * return false (we only want relative to the cwd).
- */
-bool
-path_is_relative_and_below_cwd(const char *path)
-{
-	if (is_absolute_path(path))
-		return false;
-	/* don't allow anything above the cwd */
-	else if (path_contains_parent_reference(path))
-		return false;
-#ifdef WIN32
-
-	/*
-	 * On Win32, a drive letter _not_ followed by a slash, e.g. 'E:abc', is
-	 * relative to the cwd on that drive, or the drive's root directory if
-	 * that drive has no cwd.  Because the path itself cannot tell us which is
-	 * the case, we have to assume the worst, i.e. that it is not below the
-	 * cwd.  We could use GetFullPathName() to find the full path but that
-	 * could change if the current directory for the drive changes underneath
-	 * us, so we just disallow it.
-	 */
-	else if (isalpha((unsigned char) path[0]) && path[1] == ':' &&
-			 !IS_DIR_SEP(path[2]))
-		return false;
-#endif
-	else
-		return true;
-}
-
-/*
- * Detect whether path1 is a prefix of path2 (including equality).
- *
- * This is pretty trivial, but it seems better to export a function than
- * to export IS_DIR_SEP.
- */
-bool
-path_is_prefix_of_path(const char *path1, const char *path2)
-{
-	int			path1_len = strlen(path1);
-
-	if (strncmp(path1, path2, path1_len) == 0 &&
-		(IS_DIR_SEP(path2[path1_len]) || path2[path1_len] == '\0'))
-		return true;
-	return false;
-}
-
-/*
- * Extracts the actual name of the program as called -
- * stripped of .exe suffix if any
- */
-const char *
-get_progname(const char *argv0)
-{
-	const char *nodir_name;
-	char	   *progname;
-
-	nodir_name = last_dir_separator(argv0);
-	if (nodir_name)
-		nodir_name++;
-	else
-		nodir_name = skip_drive(argv0);
-
-	/*
-	 * Make a copy in case argv[0] is modified by ps_status. Leaks memory, but
-	 * called only once.
-	 */
-	progname = strdup(nodir_name);
-	if (progname == NULL)
-	{
-		fprintf(stderr, "%s: out of memory\n", nodir_name);
-		abort();				/* This could exit the postmaster */
-	}
-
-#if defined(__CYGWIN__) || defined(WIN32)
-	/* strip ".exe" suffix, regardless of case */
-	if (strlen(progname) > sizeof(EXE) - 1 &&
-		pg_strcasecmp(progname + strlen(progname) - (sizeof(EXE) - 1), EXE) == 0)
-		progname[strlen(progname) - (sizeof(EXE) - 1)] = '\0';
-#endif
-
-	return progname;
-}
-
-
-/*
- * dir_strcmp: strcmp except any two DIR_SEP characters are considered equal,
- * and we honor filesystem case insensitivity if known
- */
-static int
-dir_strcmp(const char *s1, const char *s2)
-{
-	while (*s1 && *s2)
-	{
-		if (
-#ifndef WIN32
-			*s1 != *s2
-#else
-		/* On windows, paths are case-insensitive */
-			pg_tolower((unsigned char) *s1) != pg_tolower((unsigned char) *s2)
-#endif
-			&& !(IS_DIR_SEP(*s1) && IS_DIR_SEP(*s2)))
-			return (int) *s1 - (int) *s2;
-		s1++, s2++;
-	}
-	if (*s1)
-		return 1;				/* s1 longer */
-	if (*s2)
-		return -1;				/* s2 longer */
-	return 0;
-}
-
-
-/*
- * make_relative_path - make a path relative to the actual binary location
- *
- * This function exists to support relocation of installation trees.
- *
- *	ret_path is the output area (must be of size MAXPGPATH)
- *	target_path is the compiled-in path to the directory we want to find
- *	bin_path is the compiled-in path to the directory of executables
- *	my_exec_path is the actual location of my executable
- *
- * We determine the common prefix of target_path and bin_path, then compare
- * the remainder of bin_path to the last directory component(s) of
- * my_exec_path.  If they match, build the result as the part of my_exec_path
- * preceding the match, joined to the remainder of target_path.  If no match,
- * return target_path as-is.
- *
- * For example:
- *		target_path  = '/usr/local/share/postgresql'
- *		bin_path	 = '/usr/local/bin'
- *		my_exec_path = '/opt/pgsql/bin/postgres'
- * Given these inputs, the common prefix is '/usr/local/', the tail of
- * bin_path is 'bin' which does match the last directory component of
- * my_exec_path, so we would return '/opt/pgsql/share/postgresql'
- */
-static void
-make_relative_path(char *ret_path, const char *target_path,
-				   const char *bin_path, const char *my_exec_path)
-{
-	int			prefix_len;
-	int			tail_start;
-	int			tail_len;
-	int			i;
-
-	/*
-	 * Determine the common prefix --- note we require it to end on a
-	 * directory separator, consider eg '/usr/lib' and '/usr/libexec'.
-	 */
-	prefix_len = 0;
-	for (i = 0; target_path[i] && bin_path[i]; i++)
-	{
-		if (IS_DIR_SEP(target_path[i]) && IS_DIR_SEP(bin_path[i]))
-			prefix_len = i + 1;
-		else if (target_path[i] != bin_path[i])
-			break;
-	}
-	if (prefix_len == 0)
-		goto no_match;			/* no common prefix? */
-	tail_len = strlen(bin_path) - prefix_len;
-
-	/*
-	 * Set up my_exec_path without the actual executable name, and
-	 * canonicalize to simplify comparison to bin_path.
-	 */
-	strlcpy(ret_path, my_exec_path, MAXPGPATH);
-	trim_directory(ret_path);	/* remove my executable name */
-	canonicalize_path(ret_path);
-
-	/*
-	 * Tail match?
-	 */
-	tail_start = (int) strlen(ret_path) - tail_len;
-	if (tail_start > 0 &&
-		IS_DIR_SEP(ret_path[tail_start - 1]) &&
-		dir_strcmp(ret_path + tail_start, bin_path + prefix_len) == 0)
-	{
-		ret_path[tail_start] = '\0';
-		trim_trailing_separator(ret_path);
-		join_path_components(ret_path, ret_path, target_path + prefix_len);
-		canonicalize_path(ret_path);
-		return;
-	}
-
-no_match:
-	strlcpy(ret_path, target_path, MAXPGPATH);
-	canonicalize_path(ret_path);
-}
-
-
-/*
- * make_absolute_path
- *
- * If the given pathname isn't already absolute, make it so, interpreting
- * it relative to the current working directory.
- *
- * Also canonicalizes the path.  The result is always a malloc'd copy.
- *
- * In backend, failure cases result in ereport(ERROR); in frontend,
- * we write a complaint on stderr and return NULL.
- *
- * Note: interpretation of relative-path arguments during postmaster startup
- * should happen before doing ChangeToDataDir(), else the user will probably
- * not like the results.
- */
-char *
-make_absolute_path(const char *path)
-{
-	char	   *new;
-
-	/* Returning null for null input is convenient for some callers */
-	if (path == NULL)
-		return NULL;
-
-	if (!is_absolute_path(path))
-	{
-		char	   *buf;
-		size_t		buflen;
-
-		buflen = MAXPGPATH;
-		for (;;)
-		{
-			buf = malloc(buflen);
-			if (!buf)
-			{
-#ifndef FRONTEND
-				ereport(ERROR,
-						(errcode(ERRCODE_OUT_OF_MEMORY),
-						 errmsg("out of memory")));
-#else
-				fprintf(stderr, _("out of memory\n"));
-				return NULL;
-#endif
-			}
-
-			if (getcwd(buf, buflen))
-				break;
-			else if (errno == ERANGE)
-			{
-				free(buf);
-				buflen *= 2;
-				continue;
-			}
-			else
-			{
-				int			save_errno = errno;
-
-				free(buf);
-				errno = save_errno;
-#ifndef FRONTEND
-				elog(ERROR, "could not get current working directory: %m");
-#else
-				fprintf(stderr, _("could not get current working directory: %s\n"),
-						strerror(errno));
-				return NULL;
-#endif
-			}
-		}
-
-		new = malloc(strlen(buf) + strlen(path) + 2);
-		if (!new)
-		{
-			free(buf);
-#ifndef FRONTEND
-			ereport(ERROR,
-					(errcode(ERRCODE_OUT_OF_MEMORY),
-					 errmsg("out of memory")));
-#else
-			fprintf(stderr, _("out of memory\n"));
-			return NULL;
-#endif
-		}
-		sprintf(new, "%s/%s", buf, path);
-		free(buf);
-	}
-	else
-	{
-		new = strdup(path);
-		if (!new)
-		{
-#ifndef FRONTEND
-			ereport(ERROR,
-					(errcode(ERRCODE_OUT_OF_MEMORY),
-					 errmsg("out of memory")));
-#else
-			fprintf(stderr, _("out of memory\n"));
-			return NULL;
-#endif
-		}
-	}
-
-	/* Make sure punctuation is canonical, too */
-	canonicalize_path(new);
-
-	return new;
-}
-
-
-/*
- *	get_share_path
- */
-void
-get_share_path(const char *my_exec_path, char *ret_path)
-{
-	make_relative_path(ret_path, PGSHAREDIR, PGBINDIR, my_exec_path);
-}
-
-/*
- *	get_etc_path
- */
-void
-get_etc_path(const char *my_exec_path, char *ret_path)
-{
-	make_relative_path(ret_path, SYSCONFDIR, PGBINDIR, my_exec_path);
-}
-
-/*
- *	get_include_path
- */
-void
-get_include_path(const char *my_exec_path, char *ret_path)
-{
-	make_relative_path(ret_path, INCLUDEDIR, PGBINDIR, my_exec_path);
-}
-
-/*
- *	get_pkginclude_path
- */
-void
-get_pkginclude_path(const char *my_exec_path, char *ret_path)
-{
-	make_relative_path(ret_path, PKGINCLUDEDIR, PGBINDIR, my_exec_path);
-}
-
-/*
- *	get_includeserver_path
- */
-void
-get_includeserver_path(const char *my_exec_path, char *ret_path)
-{
-	make_relative_path(ret_path, INCLUDEDIRSERVER, PGBINDIR, my_exec_path);
-}
-
-/*
- *	get_lib_path
- */
-void
-get_lib_path(const char *my_exec_path, char *ret_path)
-{
-	make_relative_path(ret_path, LIBDIR, PGBINDIR, my_exec_path);
-}
-
-/*
- *	get_pkglib_path
- */
-void
-get_pkglib_path(const char *my_exec_path, char *ret_path)
-{
-	make_relative_path(ret_path, PKGLIBDIR, PGBINDIR, my_exec_path);
-}
-
-/*
- *	get_locale_path
- */
-void
-get_locale_path(const char *my_exec_path, char *ret_path)
-{
-	make_relative_path(ret_path, LOCALEDIR, PGBINDIR, my_exec_path);
-}
-
-/*
- *	get_doc_path
- */
-void
-get_doc_path(const char *my_exec_path, char *ret_path)
-{
-	make_relative_path(ret_path, DOCDIR, PGBINDIR, my_exec_path);
-}
-
-/*
- *	get_html_path
- */
-void
-get_html_path(const char *my_exec_path, char *ret_path)
-{
-	make_relative_path(ret_path, HTMLDIR, PGBINDIR, my_exec_path);
-}
-
-/*
- *	get_man_path
- */
-void
-get_man_path(const char *my_exec_path, char *ret_path)
-{
-	make_relative_path(ret_path, MANDIR, PGBINDIR, my_exec_path);
-}
-
-
-/*
- *	get_home_path
- *
- * On Unix, this actually returns the user's home directory.  On Windows
- * it returns the PostgreSQL-specific application data folder.
- */
-bool
-get_home_path(char *ret_path)
-{
-#ifndef WIN32
-	/*
-	 * We first consult $HOME.  If that's unset, try to get the info from
-	 * <pwd.h>.
-	 */
-	const char *home;
-
-	home = getenv("HOME");
-	if (home == NULL || home[0] == '\0')
-		return pg_get_user_home_dir(geteuid(), ret_path, MAXPGPATH);
-	strlcpy(ret_path, home, MAXPGPATH);
-	return true;
-#else
-	char	   *tmppath;
-
-	/*
-	 * Note: We use getenv() here because the more modern SHGetFolderPath()
-	 * would force the backend to link with shell32.lib, which eats valuable
-	 * desktop heap.  XXX This function is used only in psql, which already
-	 * brings in shell32 via libpq.  Moving this function to its own file
-	 * would keep it out of the backend, freeing it from this concern.
-	 */
-	tmppath = getenv("APPDATA");
-	if (!tmppath)
-		return false;
-	snprintf(ret_path, MAXPGPATH, "%s/postgresql", tmppath);
-	return true;
-#endif
-}
-
-
-/*
- * get_parent_directory
- *
- * Modify the given string in-place to name the parent directory of the
- * named file.
- *
- * If the input is just a file name with no directory part, the result is
- * an empty string, not ".".  This is appropriate when the next step is
- * join_path_components(), but might need special handling otherwise.
- *
- * Caution: this will not produce desirable results if the string ends
- * with "..".  For most callers this is not a problem since the string
- * is already known to name a regular file.  If in doubt, apply
- * canonicalize_path() first.
- */
-void
-get_parent_directory(char *path)
-{
-	trim_directory(path);
-}
-
-
-/*
- *	trim_directory
- *
- *	Trim trailing directory from path, that is, remove any trailing slashes,
- *	the last pathname component, and the slash just ahead of it --- but never
- *	remove a leading slash.
- *
- * For the convenience of canonicalize_path, the path's new end location
- * is returned.
- */
-static char *
-trim_directory(char *path)
-{
-	char	   *p;
-
-	path = skip_drive(path);
-
-	if (path[0] == '\0')
-		return path;
-
-	/* back up over trailing slash(es) */
-	for (p = path + strlen(path) - 1; IS_DIR_SEP(*p) && p > path; p--)
-		;
-	/* back up over directory name */
-	for (; !IS_DIR_SEP(*p) && p > path; p--)
-		;
-	/* if multiple slashes before directory name, remove 'em all */
-	for (; p > path && IS_DIR_SEP(*(p - 1)); p--)
-		;
-	/* don't erase a leading slash */
-	if (p == path && IS_DIR_SEP(*p))
-		p++;
-	*p = '\0';
-	return p;
-}
-
-
-/*
- *	trim_trailing_separator
- *
- * trim off trailing slashes, but not a leading slash
- */
-static void
-trim_trailing_separator(char *path)
-{
-	char	   *p;
-
-	path = skip_drive(path);
-	p = path + strlen(path);
-	if (p > path)
-		for (p--; p > path && IS_DIR_SEP(*p); p--)
-			*p = '\0';
-}
-
-/*
- *	append_subdir_to_path
- *
- * Append the currently-considered subdirectory name to the output
- * path in canonicalize_path.  Return the new end location of the
- * output path.
- *
- * Since canonicalize_path updates the path in-place, we must use
- * memmove not memcpy, and we don't yet terminate the path with '\0'.
- */
-static char *
-append_subdir_to_path(char *path, char *subdir)
-{
-	size_t		len = strlen(subdir);
-
-	/* No need to copy data if path and subdir are the same. */
-	if (path != subdir)
-		memmove(path, subdir, len);
-
-	return path + len;
-}
diff --git a/contrib/libs/libpq/src/port/pg_bitutils.c b/contrib/libs/libpq/src/port/pg_bitutils.c
deleted file mode 100644
index 1f3dea2d4b..0000000000
--- a/contrib/libs/libpq/src/port/pg_bitutils.c
+++ /dev/null
@@ -1,335 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * pg_bitutils.c
- *	  Miscellaneous functions for bit-wise operations.
- *
- * Copyright (c) 2019-2023, PostgreSQL Global Development Group
- *
- * IDENTIFICATION
- *	  src/port/pg_bitutils.c
- *
- *-------------------------------------------------------------------------
- */
-#include "c.h"
-
-#ifdef HAVE__GET_CPUID
-#include <cpuid.h>
-#endif
-#ifdef HAVE__CPUID
-#include <intrin.h>
-#endif
-
-#include "port/pg_bitutils.h"
-
-
-/*
- * Array giving the position of the left-most set bit for each possible
- * byte value.  We count the right-most position as the 0th bit, and the
- * left-most the 7th bit.  The 0th entry of the array should not be used.
- *
- * Note: this is not used by the functions in pg_bitutils.h when
- * HAVE__BUILTIN_CLZ is defined, but we provide it anyway, so that
- * extensions possibly compiled with a different compiler can use it.
- */
-const uint8 pg_leftmost_one_pos[256] = {
-	0, 0, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3,
-	4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
-	5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
-	5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
-	6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
-	6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
-	6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
-	6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
-	7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
-	7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
-	7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
-	7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
-	7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
-	7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
-	7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
-	7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7
-};
-
-/*
- * Array giving the position of the right-most set bit for each possible
- * byte value.  We count the right-most position as the 0th bit, and the
- * left-most the 7th bit.  The 0th entry of the array should not be used.
- *
- * Note: this is not used by the functions in pg_bitutils.h when
- * HAVE__BUILTIN_CTZ is defined, but we provide it anyway, so that
- * extensions possibly compiled with a different compiler can use it.
- */
-const uint8 pg_rightmost_one_pos[256] = {
-	0, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0,
-	4, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0,
-	5, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0,
-	4, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0,
-	6, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0,
-	4, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0,
-	5, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0,
-	4, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0,
-	7, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0,
-	4, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0,
-	5, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0,
-	4, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0,
-	6, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0,
-	4, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0,
-	5, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0,
-	4, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0
-};
-
-/*
- * Array giving the number of 1-bits in each possible byte value.
- *
- * Note: we export this for use by functions in which explicit use
- * of the popcount functions seems unlikely to be a win.
- */
-const uint8 pg_number_of_ones[256] = {
-	0, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 3, 4,
-	1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5,
-	1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5,
-	2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6,
-	1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5,
-	2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6,
-	2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6,
-	3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7,
-	1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5,
-	2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6,
-	2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6,
-	3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7,
-	2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6,
-	3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7,
-	3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7,
-	4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8
-};
-
-static int	pg_popcount32_slow(uint32 word);
-static int	pg_popcount64_slow(uint64 word);
-
-#ifdef TRY_POPCNT_FAST
-static bool pg_popcount_available(void);
-static int	pg_popcount32_choose(uint32 word);
-static int	pg_popcount64_choose(uint64 word);
-static int	pg_popcount32_fast(uint32 word);
-static int	pg_popcount64_fast(uint64 word);
-
-int			(*pg_popcount32) (uint32 word) = pg_popcount32_choose;
-int			(*pg_popcount64) (uint64 word) = pg_popcount64_choose;
-#endif							/* TRY_POPCNT_FAST */
-
-#ifdef TRY_POPCNT_FAST
-
-/*
- * Return true if CPUID indicates that the POPCNT instruction is available.
- */
-static bool
-pg_popcount_available(void)
-{
-	unsigned int exx[4] = {0, 0, 0, 0};
-
-#if defined(HAVE__GET_CPUID)
-	__get_cpuid(1, &exx[0], &exx[1], &exx[2], &exx[3]);
-#elif defined(HAVE__CPUID)
-	__cpuid(exx, 1);
-#else
-#error cpuid instruction not available
-#endif
-
-	return (exx[2] & (1 << 23)) != 0;	/* POPCNT */
-}
-
-/*
- * These functions get called on the first call to pg_popcount32 etc.
- * They detect whether we can use the asm implementations, and replace
- * the function pointers so that subsequent calls are routed directly to
- * the chosen implementation.
- */
-static int
-pg_popcount32_choose(uint32 word)
-{
-	if (pg_popcount_available())
-	{
-		pg_popcount32 = pg_popcount32_fast;
-		pg_popcount64 = pg_popcount64_fast;
-	}
-	else
-	{
-		pg_popcount32 = pg_popcount32_slow;
-		pg_popcount64 = pg_popcount64_slow;
-	}
-
-	return pg_popcount32(word);
-}
-
-static int
-pg_popcount64_choose(uint64 word)
-{
-	if (pg_popcount_available())
-	{
-		pg_popcount32 = pg_popcount32_fast;
-		pg_popcount64 = pg_popcount64_fast;
-	}
-	else
-	{
-		pg_popcount32 = pg_popcount32_slow;
-		pg_popcount64 = pg_popcount64_slow;
-	}
-
-	return pg_popcount64(word);
-}
-
-/*
- * pg_popcount32_fast
- *		Return the number of 1 bits set in word
- */
-static int
-pg_popcount32_fast(uint32 word)
-{
-#ifdef _MSC_VER
-	return __popcnt(word);
-#else
-	uint32		res;
-
-__asm__ __volatile__(" popcntl %1,%0\n":"=q"(res):"rm"(word):"cc");
-	return (int) res;
-#endif
-}
-
-/*
- * pg_popcount64_fast
- *		Return the number of 1 bits set in word
- */
-static int
-pg_popcount64_fast(uint64 word)
-{
-#ifdef _MSC_VER
-	return __popcnt64(word);
-#else
-	uint64		res;
-
-__asm__ __volatile__(" popcntq %1,%0\n":"=q"(res):"rm"(word):"cc");
-	return (int) res;
-#endif
-}
-
-#endif							/* TRY_POPCNT_FAST */
-
-
-/*
- * pg_popcount32_slow
- *		Return the number of 1 bits set in word
- */
-static int
-pg_popcount32_slow(uint32 word)
-{
-#ifdef HAVE__BUILTIN_POPCOUNT
-	return __builtin_popcount(word);
-#else							/* !HAVE__BUILTIN_POPCOUNT */
-	int			result = 0;
-
-	while (word != 0)
-	{
-		result += pg_number_of_ones[word & 255];
-		word >>= 8;
-	}
-
-	return result;
-#endif							/* HAVE__BUILTIN_POPCOUNT */
-}
-
-/*
- * pg_popcount64_slow
- *		Return the number of 1 bits set in word
- */
-static int
-pg_popcount64_slow(uint64 word)
-{
-#ifdef HAVE__BUILTIN_POPCOUNT
-#if defined(HAVE_LONG_INT_64)
-	return __builtin_popcountl(word);
-#elif defined(HAVE_LONG_LONG_INT_64)
-	return __builtin_popcountll(word);
-#else
-#error must have a working 64-bit integer datatype
-#endif
-#else							/* !HAVE__BUILTIN_POPCOUNT */
-	int			result = 0;
-
-	while (word != 0)
-	{
-		result += pg_number_of_ones[word & 255];
-		word >>= 8;
-	}
-
-	return result;
-#endif							/* HAVE__BUILTIN_POPCOUNT */
-}
-
-#ifndef TRY_POPCNT_FAST
-
-/*
- * When the POPCNT instruction is not available, there's no point in using
- * function pointers to vary the implementation between the fast and slow
- * method.  We instead just make these actual external functions when
- * TRY_POPCNT_FAST is not defined.  The compiler should be able to inline
- * the slow versions here.
- */
-int
-pg_popcount32(uint32 word)
-{
-	return pg_popcount32_slow(word);
-}
-
-int
-pg_popcount64(uint64 word)
-{
-	return pg_popcount64_slow(word);
-}
-
-#endif							/* !TRY_POPCNT_FAST */
-
-/*
- * pg_popcount
- *		Returns the number of 1-bits in buf
- */
-uint64
-pg_popcount(const char *buf, int bytes)
-{
-	uint64		popcnt = 0;
-
-#if SIZEOF_VOID_P >= 8
-	/* Process in 64-bit chunks if the buffer is aligned. */
-	if (buf == (const char *) TYPEALIGN(8, buf))
-	{
-		const uint64 *words = (const uint64 *) buf;
-
-		while (bytes >= 8)
-		{
-			popcnt += pg_popcount64(*words++);
-			bytes -= 8;
-		}
-
-		buf = (const char *) words;
-	}
-#else
-	/* Process in 32-bit chunks if the buffer is aligned. */
-	if (buf == (const char *) TYPEALIGN(4, buf))
-	{
-		const uint32 *words = (const uint32 *) buf;
-
-		while (bytes >= 4)
-		{
-			popcnt += pg_popcount32(*words++);
-			bytes -= 4;
-		}
-
-		buf = (const char *) words;
-	}
-#endif
-
-	/* Process any remaining bytes */
-	while (bytes--)
-		popcnt += pg_number_of_ones[(unsigned char) *buf++];
-
-	return popcnt;
-}
diff --git a/contrib/libs/libpq/src/port/pg_config_paths.h b/contrib/libs/libpq/src/port/pg_config_paths.h
deleted file mode 100644
index ba4db149b6..0000000000
--- a/contrib/libs/libpq/src/port/pg_config_paths.h
+++ /dev/null
@@ -1,12 +0,0 @@
-#define PGBINDIR "/var/empty/postgresql-16.2/bin"
-#define PGSHAREDIR "/var/empty/postgresql-16.2/share"
-#define SYSCONFDIR "/etc/postgresql"
-#define INCLUDEDIR "/var/empty/postgresql-16.2/include"
-#define PKGINCLUDEDIR "/var/empty/postgresql-16.2/include"
-#define INCLUDEDIRSERVER "/var/empty/postgresql-16.2/include/server"
-#define LIBDIR "/var/empty/tmp/out/lib"
-#define PKGLIBDIR "/var/empty/tmp/out/lib/postgresql"
-#define LOCALEDIR "/var/empty/postgresql-16.2/share/locale"
-#define DOCDIR "/var/empty/postgresql-16.2/share/doc/"
-#define HTMLDIR "/var/empty/postgresql-16.2/share/doc/"
-#define MANDIR "/var/empty/postgresql-16.2/share/man"
diff --git a/contrib/libs/libpq/src/port/pg_crc32c_sb8.c b/contrib/libs/libpq/src/port/pg_crc32c_sb8.c
deleted file mode 100644
index cdd3e05123..0000000000
--- a/contrib/libs/libpq/src/port/pg_crc32c_sb8.c
+++ /dev/null
@@ -1,1169 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * pg_crc32c_sb8.c
- *	  Compute CRC-32C checksum using slicing-by-8 algorithm.
- *
- * Michael E. Kounavis, Frank L. Berry,
- * "Novel Table Lookup-Based Algorithms for High-Performance CRC
- * Generation", IEEE Transactions on Computers, vol.57, no. 11,
- * pp. 1550-1560, November 2008, doi:10.1109/TC.2008.85
- *
- * Portions Copyright (c) 1996-2023, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- *
- * IDENTIFICATION
- *	  src/port/pg_crc32c_sb8.c
- *
- *-------------------------------------------------------------------------
- */
-
-#include "c.h"
-
-#include "port/pg_crc32c.h"
-
-static const uint32 pg_crc32c_table[8][256];
-
-/* Accumulate one input byte */
-#ifdef WORDS_BIGENDIAN
-#define CRC8(x) pg_crc32c_table[0][((crc >> 24) ^ (x)) & 0xFF] ^ (crc << 8)
-#else
-#define CRC8(x) pg_crc32c_table[0][(crc ^ (x)) & 0xFF] ^ (crc >> 8)
-#endif
-
-pg_crc32c
-pg_comp_crc32c_sb8(pg_crc32c crc, const void *data, size_t len)
-{
-	const unsigned char *p = data;
-	const uint32 *p4;
-
-	/*
-	 * Handle 0-3 initial bytes one at a time, so that the loop below starts
-	 * with a pointer aligned to four bytes.
-	 */
-	while (len > 0 && ((uintptr_t) p & 3))
-	{
-		crc = CRC8(*p++);
-		len--;
-	}
-
-	/*
-	 * Process eight bytes of data at a time.
-	 */
-	p4 = (const uint32 *) p;
-	while (len >= 8)
-	{
-		uint32		a = *p4++ ^ crc;
-		uint32		b = *p4++;
-
-#ifdef WORDS_BIGENDIAN
-		const uint8 c0 = b;
-		const uint8 c1 = b >> 8;
-		const uint8 c2 = b >> 16;
-		const uint8 c3 = b >> 24;
-		const uint8 c4 = a;
-		const uint8 c5 = a >> 8;
-		const uint8 c6 = a >> 16;
-		const uint8 c7 = a >> 24;
-#else
-		const uint8 c0 = b >> 24;
-		const uint8 c1 = b >> 16;
-		const uint8 c2 = b >> 8;
-		const uint8 c3 = b;
-		const uint8 c4 = a >> 24;
-		const uint8 c5 = a >> 16;
-		const uint8 c6 = a >> 8;
-		const uint8 c7 = a;
-#endif
-
-		crc =
-			pg_crc32c_table[0][c0] ^ pg_crc32c_table[1][c1] ^
-			pg_crc32c_table[2][c2] ^ pg_crc32c_table[3][c3] ^
-			pg_crc32c_table[4][c4] ^ pg_crc32c_table[5][c5] ^
-			pg_crc32c_table[6][c6] ^ pg_crc32c_table[7][c7];
-
-		len -= 8;
-	}
-
-	/*
-	 * Handle any remaining bytes one at a time.
-	 */
-	p = (const unsigned char *) p4;
-	while (len > 0)
-	{
-		crc = CRC8(*p++);
-		len--;
-	}
-
-	return crc;
-}
-
-/*
- * Lookup tables for the slicing-by-8 algorithm, for the so-called Castagnoli
- * polynomial (the same that is used e.g. in iSCSI), 0x1EDC6F41. Using
- * Williams' terms, this is the "normal", not "reflected" version. However, on
- * big-endian systems the values in the tables are stored in byte-reversed
- * order (IOW, the tables are stored in little-endian order even on big-endian
- * systems).
- */
-static const uint32 pg_crc32c_table[8][256] = {
-#ifndef WORDS_BIGENDIAN
-	{
-		0x00000000, 0xF26B8303, 0xE13B70F7, 0x1350F3F4,
-		0xC79A971F, 0x35F1141C, 0x26A1E7E8, 0xD4CA64EB,
-		0x8AD958CF, 0x78B2DBCC, 0x6BE22838, 0x9989AB3B,
-		0x4D43CFD0, 0xBF284CD3, 0xAC78BF27, 0x5E133C24,
-		0x105EC76F, 0xE235446C, 0xF165B798, 0x030E349B,
-		0xD7C45070, 0x25AFD373, 0x36FF2087, 0xC494A384,
-		0x9A879FA0, 0x68EC1CA3, 0x7BBCEF57, 0x89D76C54,
-		0x5D1D08BF, 0xAF768BBC, 0xBC267848, 0x4E4DFB4B,
-		0x20BD8EDE, 0xD2D60DDD, 0xC186FE29, 0x33ED7D2A,
-		0xE72719C1, 0x154C9AC2, 0x061C6936, 0xF477EA35,
-		0xAA64D611, 0x580F5512, 0x4B5FA6E6, 0xB93425E5,
-		0x6DFE410E, 0x9F95C20D, 0x8CC531F9, 0x7EAEB2FA,
-		0x30E349B1, 0xC288CAB2, 0xD1D83946, 0x23B3BA45,
-		0xF779DEAE, 0x05125DAD, 0x1642AE59, 0xE4292D5A,
-		0xBA3A117E, 0x4851927D, 0x5B016189, 0xA96AE28A,
-		0x7DA08661, 0x8FCB0562, 0x9C9BF696, 0x6EF07595,
-		0x417B1DBC, 0xB3109EBF, 0xA0406D4B, 0x522BEE48,
-		0x86E18AA3, 0x748A09A0, 0x67DAFA54, 0x95B17957,
-		0xCBA24573, 0x39C9C670, 0x2A993584, 0xD8F2B687,
-		0x0C38D26C, 0xFE53516F, 0xED03A29B, 0x1F682198,
-		0x5125DAD3, 0xA34E59D0, 0xB01EAA24, 0x42752927,
-		0x96BF4DCC, 0x64D4CECF, 0x77843D3B, 0x85EFBE38,
-		0xDBFC821C, 0x2997011F, 0x3AC7F2EB, 0xC8AC71E8,
-		0x1C661503, 0xEE0D9600, 0xFD5D65F4, 0x0F36E6F7,
-		0x61C69362, 0x93AD1061, 0x80FDE395, 0x72966096,
-		0xA65C047D, 0x5437877E, 0x4767748A, 0xB50CF789,
-		0xEB1FCBAD, 0x197448AE, 0x0A24BB5A, 0xF84F3859,
-		0x2C855CB2, 0xDEEEDFB1, 0xCDBE2C45, 0x3FD5AF46,
-		0x7198540D, 0x83F3D70E, 0x90A324FA, 0x62C8A7F9,
-		0xB602C312, 0x44694011, 0x5739B3E5, 0xA55230E6,
-		0xFB410CC2, 0x092A8FC1, 0x1A7A7C35, 0xE811FF36,
-		0x3CDB9BDD, 0xCEB018DE, 0xDDE0EB2A, 0x2F8B6829,
-		0x82F63B78, 0x709DB87B, 0x63CD4B8F, 0x91A6C88C,
-		0x456CAC67, 0xB7072F64, 0xA457DC90, 0x563C5F93,
-		0x082F63B7, 0xFA44E0B4, 0xE9141340, 0x1B7F9043,
-		0xCFB5F4A8, 0x3DDE77AB, 0x2E8E845F, 0xDCE5075C,
-		0x92A8FC17, 0x60C37F14, 0x73938CE0, 0x81F80FE3,
-		0x55326B08, 0xA759E80B, 0xB4091BFF, 0x466298FC,
-		0x1871A4D8, 0xEA1A27DB, 0xF94AD42F, 0x0B21572C,
-		0xDFEB33C7, 0x2D80B0C4, 0x3ED04330, 0xCCBBC033,
-		0xA24BB5A6, 0x502036A5, 0x4370C551, 0xB11B4652,
-		0x65D122B9, 0x97BAA1BA, 0x84EA524E, 0x7681D14D,
-		0x2892ED69, 0xDAF96E6A, 0xC9A99D9E, 0x3BC21E9D,
-		0xEF087A76, 0x1D63F975, 0x0E330A81, 0xFC588982,
-		0xB21572C9, 0x407EF1CA, 0x532E023E, 0xA145813D,
-		0x758FE5D6, 0x87E466D5, 0x94B49521, 0x66DF1622,
-		0x38CC2A06, 0xCAA7A905, 0xD9F75AF1, 0x2B9CD9F2,
-		0xFF56BD19, 0x0D3D3E1A, 0x1E6DCDEE, 0xEC064EED,
-		0xC38D26C4, 0x31E6A5C7, 0x22B65633, 0xD0DDD530,
-		0x0417B1DB, 0xF67C32D8, 0xE52CC12C, 0x1747422F,
-		0x49547E0B, 0xBB3FFD08, 0xA86F0EFC, 0x5A048DFF,
-		0x8ECEE914, 0x7CA56A17, 0x6FF599E3, 0x9D9E1AE0,
-		0xD3D3E1AB, 0x21B862A8, 0x32E8915C, 0xC083125F,
-		0x144976B4, 0xE622F5B7, 0xF5720643, 0x07198540,
-		0x590AB964, 0xAB613A67, 0xB831C993, 0x4A5A4A90,
-		0x9E902E7B, 0x6CFBAD78, 0x7FAB5E8C, 0x8DC0DD8F,
-		0xE330A81A, 0x115B2B19, 0x020BD8ED, 0xF0605BEE,
-		0x24AA3F05, 0xD6C1BC06, 0xC5914FF2, 0x37FACCF1,
-		0x69E9F0D5, 0x9B8273D6, 0x88D28022, 0x7AB90321,
-		0xAE7367CA, 0x5C18E4C9, 0x4F48173D, 0xBD23943E,
-		0xF36E6F75, 0x0105EC76, 0x12551F82, 0xE03E9C81,
-		0x34F4F86A, 0xC69F7B69, 0xD5CF889D, 0x27A40B9E,
-		0x79B737BA, 0x8BDCB4B9, 0x988C474D, 0x6AE7C44E,
-		0xBE2DA0A5, 0x4C4623A6, 0x5F16D052, 0xAD7D5351
-	},
-	{
-		0x00000000, 0x13A29877, 0x274530EE, 0x34E7A899,
-		0x4E8A61DC, 0x5D28F9AB, 0x69CF5132, 0x7A6DC945,
-		0x9D14C3B8, 0x8EB65BCF, 0xBA51F356, 0xA9F36B21,
-		0xD39EA264, 0xC03C3A13, 0xF4DB928A, 0xE7790AFD,
-		0x3FC5F181, 0x2C6769F6, 0x1880C16F, 0x0B225918,
-		0x714F905D, 0x62ED082A, 0x560AA0B3, 0x45A838C4,
-		0xA2D13239, 0xB173AA4E, 0x859402D7, 0x96369AA0,
-		0xEC5B53E5, 0xFFF9CB92, 0xCB1E630B, 0xD8BCFB7C,
-		0x7F8BE302, 0x6C297B75, 0x58CED3EC, 0x4B6C4B9B,
-		0x310182DE, 0x22A31AA9, 0x1644B230, 0x05E62A47,
-		0xE29F20BA, 0xF13DB8CD, 0xC5DA1054, 0xD6788823,
-		0xAC154166, 0xBFB7D911, 0x8B507188, 0x98F2E9FF,
-		0x404E1283, 0x53EC8AF4, 0x670B226D, 0x74A9BA1A,
-		0x0EC4735F, 0x1D66EB28, 0x298143B1, 0x3A23DBC6,
-		0xDD5AD13B, 0xCEF8494C, 0xFA1FE1D5, 0xE9BD79A2,
-		0x93D0B0E7, 0x80722890, 0xB4958009, 0xA737187E,
-		0xFF17C604, 0xECB55E73, 0xD852F6EA, 0xCBF06E9D,
-		0xB19DA7D8, 0xA23F3FAF, 0x96D89736, 0x857A0F41,
-		0x620305BC, 0x71A19DCB, 0x45463552, 0x56E4AD25,
-		0x2C896460, 0x3F2BFC17, 0x0BCC548E, 0x186ECCF9,
-		0xC0D23785, 0xD370AFF2, 0xE797076B, 0xF4359F1C,
-		0x8E585659, 0x9DFACE2E, 0xA91D66B7, 0xBABFFEC0,
-		0x5DC6F43D, 0x4E646C4A, 0x7A83C4D3, 0x69215CA4,
-		0x134C95E1, 0x00EE0D96, 0x3409A50F, 0x27AB3D78,
-		0x809C2506, 0x933EBD71, 0xA7D915E8, 0xB47B8D9F,
-		0xCE1644DA, 0xDDB4DCAD, 0xE9537434, 0xFAF1EC43,
-		0x1D88E6BE, 0x0E2A7EC9, 0x3ACDD650, 0x296F4E27,
-		0x53028762, 0x40A01F15, 0x7447B78C, 0x67E52FFB,
-		0xBF59D487, 0xACFB4CF0, 0x981CE469, 0x8BBE7C1E,
-		0xF1D3B55B, 0xE2712D2C, 0xD69685B5, 0xC5341DC2,
-		0x224D173F, 0x31EF8F48, 0x050827D1, 0x16AABFA6,
-		0x6CC776E3, 0x7F65EE94, 0x4B82460D, 0x5820DE7A,
-		0xFBC3FAF9, 0xE861628E, 0xDC86CA17, 0xCF245260,
-		0xB5499B25, 0xA6EB0352, 0x920CABCB, 0x81AE33BC,
-		0x66D73941, 0x7575A136, 0x419209AF, 0x523091D8,
-		0x285D589D, 0x3BFFC0EA, 0x0F186873, 0x1CBAF004,
-		0xC4060B78, 0xD7A4930F, 0xE3433B96, 0xF0E1A3E1,
-		0x8A8C6AA4, 0x992EF2D3, 0xADC95A4A, 0xBE6BC23D,
-		0x5912C8C0, 0x4AB050B7, 0x7E57F82E, 0x6DF56059,
-		0x1798A91C, 0x043A316B, 0x30DD99F2, 0x237F0185,
-		0x844819FB, 0x97EA818C, 0xA30D2915, 0xB0AFB162,
-		0xCAC27827, 0xD960E050, 0xED8748C9, 0xFE25D0BE,
-		0x195CDA43, 0x0AFE4234, 0x3E19EAAD, 0x2DBB72DA,
-		0x57D6BB9F, 0x447423E8, 0x70938B71, 0x63311306,
-		0xBB8DE87A, 0xA82F700D, 0x9CC8D894, 0x8F6A40E3,
-		0xF50789A6, 0xE6A511D1, 0xD242B948, 0xC1E0213F,
-		0x26992BC2, 0x353BB3B5, 0x01DC1B2C, 0x127E835B,
-		0x68134A1E, 0x7BB1D269, 0x4F567AF0, 0x5CF4E287,
-		0x04D43CFD, 0x1776A48A, 0x23910C13, 0x30339464,
-		0x4A5E5D21, 0x59FCC556, 0x6D1B6DCF, 0x7EB9F5B8,
-		0x99C0FF45, 0x8A626732, 0xBE85CFAB, 0xAD2757DC,
-		0xD74A9E99, 0xC4E806EE, 0xF00FAE77, 0xE3AD3600,
-		0x3B11CD7C, 0x28B3550B, 0x1C54FD92, 0x0FF665E5,
-		0x759BACA0, 0x663934D7, 0x52DE9C4E, 0x417C0439,
-		0xA6050EC4, 0xB5A796B3, 0x81403E2A, 0x92E2A65D,
-		0xE88F6F18, 0xFB2DF76F, 0xCFCA5FF6, 0xDC68C781,
-		0x7B5FDFFF, 0x68FD4788, 0x5C1AEF11, 0x4FB87766,
-		0x35D5BE23, 0x26772654, 0x12908ECD, 0x013216BA,
-		0xE64B1C47, 0xF5E98430, 0xC10E2CA9, 0xD2ACB4DE,
-		0xA8C17D9B, 0xBB63E5EC, 0x8F844D75, 0x9C26D502,
-		0x449A2E7E, 0x5738B609, 0x63DF1E90, 0x707D86E7,
-		0x0A104FA2, 0x19B2D7D5, 0x2D557F4C, 0x3EF7E73B,
-		0xD98EEDC6, 0xCA2C75B1, 0xFECBDD28, 0xED69455F,
-		0x97048C1A, 0x84A6146D, 0xB041BCF4, 0xA3E32483
-	},
-	{
-		0x00000000, 0xA541927E, 0x4F6F520D, 0xEA2EC073,
-		0x9EDEA41A, 0x3B9F3664, 0xD1B1F617, 0x74F06469,
-		0x38513EC5, 0x9D10ACBB, 0x773E6CC8, 0xD27FFEB6,
-		0xA68F9ADF, 0x03CE08A1, 0xE9E0C8D2, 0x4CA15AAC,
-		0x70A27D8A, 0xD5E3EFF4, 0x3FCD2F87, 0x9A8CBDF9,
-		0xEE7CD990, 0x4B3D4BEE, 0xA1138B9D, 0x045219E3,
-		0x48F3434F, 0xEDB2D131, 0x079C1142, 0xA2DD833C,
-		0xD62DE755, 0x736C752B, 0x9942B558, 0x3C032726,
-		0xE144FB14, 0x4405696A, 0xAE2BA919, 0x0B6A3B67,
-		0x7F9A5F0E, 0xDADBCD70, 0x30F50D03, 0x95B49F7D,
-		0xD915C5D1, 0x7C5457AF, 0x967A97DC, 0x333B05A2,
-		0x47CB61CB, 0xE28AF3B5, 0x08A433C6, 0xADE5A1B8,
-		0x91E6869E, 0x34A714E0, 0xDE89D493, 0x7BC846ED,
-		0x0F382284, 0xAA79B0FA, 0x40577089, 0xE516E2F7,
-		0xA9B7B85B, 0x0CF62A25, 0xE6D8EA56, 0x43997828,
-		0x37691C41, 0x92288E3F, 0x78064E4C, 0xDD47DC32,
-		0xC76580D9, 0x622412A7, 0x880AD2D4, 0x2D4B40AA,
-		0x59BB24C3, 0xFCFAB6BD, 0x16D476CE, 0xB395E4B0,
-		0xFF34BE1C, 0x5A752C62, 0xB05BEC11, 0x151A7E6F,
-		0x61EA1A06, 0xC4AB8878, 0x2E85480B, 0x8BC4DA75,
-		0xB7C7FD53, 0x12866F2D, 0xF8A8AF5E, 0x5DE93D20,
-		0x29195949, 0x8C58CB37, 0x66760B44, 0xC337993A,
-		0x8F96C396, 0x2AD751E8, 0xC0F9919B, 0x65B803E5,
-		0x1148678C, 0xB409F5F2, 0x5E273581, 0xFB66A7FF,
-		0x26217BCD, 0x8360E9B3, 0x694E29C0, 0xCC0FBBBE,
-		0xB8FFDFD7, 0x1DBE4DA9, 0xF7908DDA, 0x52D11FA4,
-		0x1E704508, 0xBB31D776, 0x511F1705, 0xF45E857B,
-		0x80AEE112, 0x25EF736C, 0xCFC1B31F, 0x6A802161,
-		0x56830647, 0xF3C29439, 0x19EC544A, 0xBCADC634,
-		0xC85DA25D, 0x6D1C3023, 0x8732F050, 0x2273622E,
-		0x6ED23882, 0xCB93AAFC, 0x21BD6A8F, 0x84FCF8F1,
-		0xF00C9C98, 0x554D0EE6, 0xBF63CE95, 0x1A225CEB,
-		0x8B277743, 0x2E66E53D, 0xC448254E, 0x6109B730,
-		0x15F9D359, 0xB0B84127, 0x5A968154, 0xFFD7132A,
-		0xB3764986, 0x1637DBF8, 0xFC191B8B, 0x595889F5,
-		0x2DA8ED9C, 0x88E97FE2, 0x62C7BF91, 0xC7862DEF,
-		0xFB850AC9, 0x5EC498B7, 0xB4EA58C4, 0x11ABCABA,
-		0x655BAED3, 0xC01A3CAD, 0x2A34FCDE, 0x8F756EA0,
-		0xC3D4340C, 0x6695A672, 0x8CBB6601, 0x29FAF47F,
-		0x5D0A9016, 0xF84B0268, 0x1265C21B, 0xB7245065,
-		0x6A638C57, 0xCF221E29, 0x250CDE5A, 0x804D4C24,
-		0xF4BD284D, 0x51FCBA33, 0xBBD27A40, 0x1E93E83E,
-		0x5232B292, 0xF77320EC, 0x1D5DE09F, 0xB81C72E1,
-		0xCCEC1688, 0x69AD84F6, 0x83834485, 0x26C2D6FB,
-		0x1AC1F1DD, 0xBF8063A3, 0x55AEA3D0, 0xF0EF31AE,
-		0x841F55C7, 0x215EC7B9, 0xCB7007CA, 0x6E3195B4,
-		0x2290CF18, 0x87D15D66, 0x6DFF9D15, 0xC8BE0F6B,
-		0xBC4E6B02, 0x190FF97C, 0xF321390F, 0x5660AB71,
-		0x4C42F79A, 0xE90365E4, 0x032DA597, 0xA66C37E9,
-		0xD29C5380, 0x77DDC1FE, 0x9DF3018D, 0x38B293F3,
-		0x7413C95F, 0xD1525B21, 0x3B7C9B52, 0x9E3D092C,
-		0xEACD6D45, 0x4F8CFF3B, 0xA5A23F48, 0x00E3AD36,
-		0x3CE08A10, 0x99A1186E, 0x738FD81D, 0xD6CE4A63,
-		0xA23E2E0A, 0x077FBC74, 0xED517C07, 0x4810EE79,
-		0x04B1B4D5, 0xA1F026AB, 0x4BDEE6D8, 0xEE9F74A6,
-		0x9A6F10CF, 0x3F2E82B1, 0xD50042C2, 0x7041D0BC,
-		0xAD060C8E, 0x08479EF0, 0xE2695E83, 0x4728CCFD,
-		0x33D8A894, 0x96993AEA, 0x7CB7FA99, 0xD9F668E7,
-		0x9557324B, 0x3016A035, 0xDA386046, 0x7F79F238,
-		0x0B899651, 0xAEC8042F, 0x44E6C45C, 0xE1A75622,
-		0xDDA47104, 0x78E5E37A, 0x92CB2309, 0x378AB177,
-		0x437AD51E, 0xE63B4760, 0x0C158713, 0xA954156D,
-		0xE5F54FC1, 0x40B4DDBF, 0xAA9A1DCC, 0x0FDB8FB2,
-		0x7B2BEBDB, 0xDE6A79A5, 0x3444B9D6, 0x91052BA8
-	},
-	{
-		0x00000000, 0xDD45AAB8, 0xBF672381, 0x62228939,
-		0x7B2231F3, 0xA6679B4B, 0xC4451272, 0x1900B8CA,
-		0xF64463E6, 0x2B01C95E, 0x49234067, 0x9466EADF,
-		0x8D665215, 0x5023F8AD, 0x32017194, 0xEF44DB2C,
-		0xE964B13D, 0x34211B85, 0x560392BC, 0x8B463804,
-		0x924680CE, 0x4F032A76, 0x2D21A34F, 0xF06409F7,
-		0x1F20D2DB, 0xC2657863, 0xA047F15A, 0x7D025BE2,
-		0x6402E328, 0xB9474990, 0xDB65C0A9, 0x06206A11,
-		0xD725148B, 0x0A60BE33, 0x6842370A, 0xB5079DB2,
-		0xAC072578, 0x71428FC0, 0x136006F9, 0xCE25AC41,
-		0x2161776D, 0xFC24DDD5, 0x9E0654EC, 0x4343FE54,
-		0x5A43469E, 0x8706EC26, 0xE524651F, 0x3861CFA7,
-		0x3E41A5B6, 0xE3040F0E, 0x81268637, 0x5C632C8F,
-		0x45639445, 0x98263EFD, 0xFA04B7C4, 0x27411D7C,
-		0xC805C650, 0x15406CE8, 0x7762E5D1, 0xAA274F69,
-		0xB327F7A3, 0x6E625D1B, 0x0C40D422, 0xD1057E9A,
-		0xABA65FE7, 0x76E3F55F, 0x14C17C66, 0xC984D6DE,
-		0xD0846E14, 0x0DC1C4AC, 0x6FE34D95, 0xB2A6E72D,
-		0x5DE23C01, 0x80A796B9, 0xE2851F80, 0x3FC0B538,
-		0x26C00DF2, 0xFB85A74A, 0x99A72E73, 0x44E284CB,
-		0x42C2EEDA, 0x9F874462, 0xFDA5CD5B, 0x20E067E3,
-		0x39E0DF29, 0xE4A57591, 0x8687FCA8, 0x5BC25610,
-		0xB4868D3C, 0x69C32784, 0x0BE1AEBD, 0xD6A40405,
-		0xCFA4BCCF, 0x12E11677, 0x70C39F4E, 0xAD8635F6,
-		0x7C834B6C, 0xA1C6E1D4, 0xC3E468ED, 0x1EA1C255,
-		0x07A17A9F, 0xDAE4D027, 0xB8C6591E, 0x6583F3A6,
-		0x8AC7288A, 0x57828232, 0x35A00B0B, 0xE8E5A1B3,
-		0xF1E51979, 0x2CA0B3C1, 0x4E823AF8, 0x93C79040,
-		0x95E7FA51, 0x48A250E9, 0x2A80D9D0, 0xF7C57368,
-		0xEEC5CBA2, 0x3380611A, 0x51A2E823, 0x8CE7429B,
-		0x63A399B7, 0xBEE6330F, 0xDCC4BA36, 0x0181108E,
-		0x1881A844, 0xC5C402FC, 0xA7E68BC5, 0x7AA3217D,
-		0x52A0C93F, 0x8FE56387, 0xEDC7EABE, 0x30824006,
-		0x2982F8CC, 0xF4C75274, 0x96E5DB4D, 0x4BA071F5,
-		0xA4E4AAD9, 0x79A10061, 0x1B838958, 0xC6C623E0,
-		0xDFC69B2A, 0x02833192, 0x60A1B8AB, 0xBDE41213,
-		0xBBC47802, 0x6681D2BA, 0x04A35B83, 0xD9E6F13B,
-		0xC0E649F1, 0x1DA3E349, 0x7F816A70, 0xA2C4C0C8,
-		0x4D801BE4, 0x90C5B15C, 0xF2E73865, 0x2FA292DD,
-		0x36A22A17, 0xEBE780AF, 0x89C50996, 0x5480A32E,
-		0x8585DDB4, 0x58C0770C, 0x3AE2FE35, 0xE7A7548D,
-		0xFEA7EC47, 0x23E246FF, 0x41C0CFC6, 0x9C85657E,
-		0x73C1BE52, 0xAE8414EA, 0xCCA69DD3, 0x11E3376B,
-		0x08E38FA1, 0xD5A62519, 0xB784AC20, 0x6AC10698,
-		0x6CE16C89, 0xB1A4C631, 0xD3864F08, 0x0EC3E5B0,
-		0x17C35D7A, 0xCA86F7C2, 0xA8A47EFB, 0x75E1D443,
-		0x9AA50F6F, 0x47E0A5D7, 0x25C22CEE, 0xF8878656,
-		0xE1873E9C, 0x3CC29424, 0x5EE01D1D, 0x83A5B7A5,
-		0xF90696D8, 0x24433C60, 0x4661B559, 0x9B241FE1,
-		0x8224A72B, 0x5F610D93, 0x3D4384AA, 0xE0062E12,
-		0x0F42F53E, 0xD2075F86, 0xB025D6BF, 0x6D607C07,
-		0x7460C4CD, 0xA9256E75, 0xCB07E74C, 0x16424DF4,
-		0x106227E5, 0xCD278D5D, 0xAF050464, 0x7240AEDC,
-		0x6B401616, 0xB605BCAE, 0xD4273597, 0x09629F2F,
-		0xE6264403, 0x3B63EEBB, 0x59416782, 0x8404CD3A,
-		0x9D0475F0, 0x4041DF48, 0x22635671, 0xFF26FCC9,
-		0x2E238253, 0xF36628EB, 0x9144A1D2, 0x4C010B6A,
-		0x5501B3A0, 0x88441918, 0xEA669021, 0x37233A99,
-		0xD867E1B5, 0x05224B0D, 0x6700C234, 0xBA45688C,
-		0xA345D046, 0x7E007AFE, 0x1C22F3C7, 0xC167597F,
-		0xC747336E, 0x1A0299D6, 0x782010EF, 0xA565BA57,
-		0xBC65029D, 0x6120A825, 0x0302211C, 0xDE478BA4,
-		0x31035088, 0xEC46FA30, 0x8E647309, 0x5321D9B1,
-		0x4A21617B, 0x9764CBC3, 0xF54642FA, 0x2803E842
-	},
-	{
-		0x00000000, 0x38116FAC, 0x7022DF58, 0x4833B0F4,
-		0xE045BEB0, 0xD854D11C, 0x906761E8, 0xA8760E44,
-		0xC5670B91, 0xFD76643D, 0xB545D4C9, 0x8D54BB65,
-		0x2522B521, 0x1D33DA8D, 0x55006A79, 0x6D1105D5,
-		0x8F2261D3, 0xB7330E7F, 0xFF00BE8B, 0xC711D127,
-		0x6F67DF63, 0x5776B0CF, 0x1F45003B, 0x27546F97,
-		0x4A456A42, 0x725405EE, 0x3A67B51A, 0x0276DAB6,
-		0xAA00D4F2, 0x9211BB5E, 0xDA220BAA, 0xE2336406,
-		0x1BA8B557, 0x23B9DAFB, 0x6B8A6A0F, 0x539B05A3,
-		0xFBED0BE7, 0xC3FC644B, 0x8BCFD4BF, 0xB3DEBB13,
-		0xDECFBEC6, 0xE6DED16A, 0xAEED619E, 0x96FC0E32,
-		0x3E8A0076, 0x069B6FDA, 0x4EA8DF2E, 0x76B9B082,
-		0x948AD484, 0xAC9BBB28, 0xE4A80BDC, 0xDCB96470,
-		0x74CF6A34, 0x4CDE0598, 0x04EDB56C, 0x3CFCDAC0,
-		0x51EDDF15, 0x69FCB0B9, 0x21CF004D, 0x19DE6FE1,
-		0xB1A861A5, 0x89B90E09, 0xC18ABEFD, 0xF99BD151,
-		0x37516AAE, 0x0F400502, 0x4773B5F6, 0x7F62DA5A,
-		0xD714D41E, 0xEF05BBB2, 0xA7360B46, 0x9F2764EA,
-		0xF236613F, 0xCA270E93, 0x8214BE67, 0xBA05D1CB,
-		0x1273DF8F, 0x2A62B023, 0x625100D7, 0x5A406F7B,
-		0xB8730B7D, 0x806264D1, 0xC851D425, 0xF040BB89,
-		0x5836B5CD, 0x6027DA61, 0x28146A95, 0x10050539,
-		0x7D1400EC, 0x45056F40, 0x0D36DFB4, 0x3527B018,
-		0x9D51BE5C, 0xA540D1F0, 0xED736104, 0xD5620EA8,
-		0x2CF9DFF9, 0x14E8B055, 0x5CDB00A1, 0x64CA6F0D,
-		0xCCBC6149, 0xF4AD0EE5, 0xBC9EBE11, 0x848FD1BD,
-		0xE99ED468, 0xD18FBBC4, 0x99BC0B30, 0xA1AD649C,
-		0x09DB6AD8, 0x31CA0574, 0x79F9B580, 0x41E8DA2C,
-		0xA3DBBE2A, 0x9BCAD186, 0xD3F96172, 0xEBE80EDE,
-		0x439E009A, 0x7B8F6F36, 0x33BCDFC2, 0x0BADB06E,
-		0x66BCB5BB, 0x5EADDA17, 0x169E6AE3, 0x2E8F054F,
-		0x86F90B0B, 0xBEE864A7, 0xF6DBD453, 0xCECABBFF,
-		0x6EA2D55C, 0x56B3BAF0, 0x1E800A04, 0x269165A8,
-		0x8EE76BEC, 0xB6F60440, 0xFEC5B4B4, 0xC6D4DB18,
-		0xABC5DECD, 0x93D4B161, 0xDBE70195, 0xE3F66E39,
-		0x4B80607D, 0x73910FD1, 0x3BA2BF25, 0x03B3D089,
-		0xE180B48F, 0xD991DB23, 0x91A26BD7, 0xA9B3047B,
-		0x01C50A3F, 0x39D46593, 0x71E7D567, 0x49F6BACB,
-		0x24E7BF1E, 0x1CF6D0B2, 0x54C56046, 0x6CD40FEA,
-		0xC4A201AE, 0xFCB36E02, 0xB480DEF6, 0x8C91B15A,
-		0x750A600B, 0x4D1B0FA7, 0x0528BF53, 0x3D39D0FF,
-		0x954FDEBB, 0xAD5EB117, 0xE56D01E3, 0xDD7C6E4F,
-		0xB06D6B9A, 0x887C0436, 0xC04FB4C2, 0xF85EDB6E,
-		0x5028D52A, 0x6839BA86, 0x200A0A72, 0x181B65DE,
-		0xFA2801D8, 0xC2396E74, 0x8A0ADE80, 0xB21BB12C,
-		0x1A6DBF68, 0x227CD0C4, 0x6A4F6030, 0x525E0F9C,
-		0x3F4F0A49, 0x075E65E5, 0x4F6DD511, 0x777CBABD,
-		0xDF0AB4F9, 0xE71BDB55, 0xAF286BA1, 0x9739040D,
-		0x59F3BFF2, 0x61E2D05E, 0x29D160AA, 0x11C00F06,
-		0xB9B60142, 0x81A76EEE, 0xC994DE1A, 0xF185B1B6,
-		0x9C94B463, 0xA485DBCF, 0xECB66B3B, 0xD4A70497,
-		0x7CD10AD3, 0x44C0657F, 0x0CF3D58B, 0x34E2BA27,
-		0xD6D1DE21, 0xEEC0B18D, 0xA6F30179, 0x9EE26ED5,
-		0x36946091, 0x0E850F3D, 0x46B6BFC9, 0x7EA7D065,
-		0x13B6D5B0, 0x2BA7BA1C, 0x63940AE8, 0x5B856544,
-		0xF3F36B00, 0xCBE204AC, 0x83D1B458, 0xBBC0DBF4,
-		0x425B0AA5, 0x7A4A6509, 0x3279D5FD, 0x0A68BA51,
-		0xA21EB415, 0x9A0FDBB9, 0xD23C6B4D, 0xEA2D04E1,
-		0x873C0134, 0xBF2D6E98, 0xF71EDE6C, 0xCF0FB1C0,
-		0x6779BF84, 0x5F68D028, 0x175B60DC, 0x2F4A0F70,
-		0xCD796B76, 0xF56804DA, 0xBD5BB42E, 0x854ADB82,
-		0x2D3CD5C6, 0x152DBA6A, 0x5D1E0A9E, 0x650F6532,
-		0x081E60E7, 0x300F0F4B, 0x783CBFBF, 0x402DD013,
-		0xE85BDE57, 0xD04AB1FB, 0x9879010F, 0xA0686EA3
-	},
-	{
-		0x00000000, 0xEF306B19, 0xDB8CA0C3, 0x34BCCBDA,
-		0xB2F53777, 0x5DC55C6E, 0x697997B4, 0x8649FCAD,
-		0x6006181F, 0x8F367306, 0xBB8AB8DC, 0x54BAD3C5,
-		0xD2F32F68, 0x3DC34471, 0x097F8FAB, 0xE64FE4B2,
-		0xC00C303E, 0x2F3C5B27, 0x1B8090FD, 0xF4B0FBE4,
-		0x72F90749, 0x9DC96C50, 0xA975A78A, 0x4645CC93,
-		0xA00A2821, 0x4F3A4338, 0x7B8688E2, 0x94B6E3FB,
-		0x12FF1F56, 0xFDCF744F, 0xC973BF95, 0x2643D48C,
-		0x85F4168D, 0x6AC47D94, 0x5E78B64E, 0xB148DD57,
-		0x370121FA, 0xD8314AE3, 0xEC8D8139, 0x03BDEA20,
-		0xE5F20E92, 0x0AC2658B, 0x3E7EAE51, 0xD14EC548,
-		0x570739E5, 0xB83752FC, 0x8C8B9926, 0x63BBF23F,
-		0x45F826B3, 0xAAC84DAA, 0x9E748670, 0x7144ED69,
-		0xF70D11C4, 0x183D7ADD, 0x2C81B107, 0xC3B1DA1E,
-		0x25FE3EAC, 0xCACE55B5, 0xFE729E6F, 0x1142F576,
-		0x970B09DB, 0x783B62C2, 0x4C87A918, 0xA3B7C201,
-		0x0E045BEB, 0xE13430F2, 0xD588FB28, 0x3AB89031,
-		0xBCF16C9C, 0x53C10785, 0x677DCC5F, 0x884DA746,
-		0x6E0243F4, 0x813228ED, 0xB58EE337, 0x5ABE882E,
-		0xDCF77483, 0x33C71F9A, 0x077BD440, 0xE84BBF59,
-		0xCE086BD5, 0x213800CC, 0x1584CB16, 0xFAB4A00F,
-		0x7CFD5CA2, 0x93CD37BB, 0xA771FC61, 0x48419778,
-		0xAE0E73CA, 0x413E18D3, 0x7582D309, 0x9AB2B810,
-		0x1CFB44BD, 0xF3CB2FA4, 0xC777E47E, 0x28478F67,
-		0x8BF04D66, 0x64C0267F, 0x507CEDA5, 0xBF4C86BC,
-		0x39057A11, 0xD6351108, 0xE289DAD2, 0x0DB9B1CB,
-		0xEBF65579, 0x04C63E60, 0x307AF5BA, 0xDF4A9EA3,
-		0x5903620E, 0xB6330917, 0x828FC2CD, 0x6DBFA9D4,
-		0x4BFC7D58, 0xA4CC1641, 0x9070DD9B, 0x7F40B682,
-		0xF9094A2F, 0x16392136, 0x2285EAEC, 0xCDB581F5,
-		0x2BFA6547, 0xC4CA0E5E, 0xF076C584, 0x1F46AE9D,
-		0x990F5230, 0x763F3929, 0x4283F2F3, 0xADB399EA,
-		0x1C08B7D6, 0xF338DCCF, 0xC7841715, 0x28B47C0C,
-		0xAEFD80A1, 0x41CDEBB8, 0x75712062, 0x9A414B7B,
-		0x7C0EAFC9, 0x933EC4D0, 0xA7820F0A, 0x48B26413,
-		0xCEFB98BE, 0x21CBF3A7, 0x1577387D, 0xFA475364,
-		0xDC0487E8, 0x3334ECF1, 0x0788272B, 0xE8B84C32,
-		0x6EF1B09F, 0x81C1DB86, 0xB57D105C, 0x5A4D7B45,
-		0xBC029FF7, 0x5332F4EE, 0x678E3F34, 0x88BE542D,
-		0x0EF7A880, 0xE1C7C399, 0xD57B0843, 0x3A4B635A,
-		0x99FCA15B, 0x76CCCA42, 0x42700198, 0xAD406A81,
-		0x2B09962C, 0xC439FD35, 0xF08536EF, 0x1FB55DF6,
-		0xF9FAB944, 0x16CAD25D, 0x22761987, 0xCD46729E,
-		0x4B0F8E33, 0xA43FE52A, 0x90832EF0, 0x7FB345E9,
-		0x59F09165, 0xB6C0FA7C, 0x827C31A6, 0x6D4C5ABF,
-		0xEB05A612, 0x0435CD0B, 0x308906D1, 0xDFB96DC8,
-		0x39F6897A, 0xD6C6E263, 0xE27A29B9, 0x0D4A42A0,
-		0x8B03BE0D, 0x6433D514, 0x508F1ECE, 0xBFBF75D7,
-		0x120CEC3D, 0xFD3C8724, 0xC9804CFE, 0x26B027E7,
-		0xA0F9DB4A, 0x4FC9B053, 0x7B757B89, 0x94451090,
-		0x720AF422, 0x9D3A9F3B, 0xA98654E1, 0x46B63FF8,
-		0xC0FFC355, 0x2FCFA84C, 0x1B736396, 0xF443088F,
-		0xD200DC03, 0x3D30B71A, 0x098C7CC0, 0xE6BC17D9,
-		0x60F5EB74, 0x8FC5806D, 0xBB794BB7, 0x544920AE,
-		0xB206C41C, 0x5D36AF05, 0x698A64DF, 0x86BA0FC6,
-		0x00F3F36B, 0xEFC39872, 0xDB7F53A8, 0x344F38B1,
-		0x97F8FAB0, 0x78C891A9, 0x4C745A73, 0xA344316A,
-		0x250DCDC7, 0xCA3DA6DE, 0xFE816D04, 0x11B1061D,
-		0xF7FEE2AF, 0x18CE89B6, 0x2C72426C, 0xC3422975,
-		0x450BD5D8, 0xAA3BBEC1, 0x9E87751B, 0x71B71E02,
-		0x57F4CA8E, 0xB8C4A197, 0x8C786A4D, 0x63480154,
-		0xE501FDF9, 0x0A3196E0, 0x3E8D5D3A, 0xD1BD3623,
-		0x37F2D291, 0xD8C2B988, 0xEC7E7252, 0x034E194B,
-		0x8507E5E6, 0x6A378EFF, 0x5E8B4525, 0xB1BB2E3C
-	},
-	{
-		0x00000000, 0x68032CC8, 0xD0065990, 0xB8057558,
-		0xA5E0C5D1, 0xCDE3E919, 0x75E69C41, 0x1DE5B089,
-		0x4E2DFD53, 0x262ED19B, 0x9E2BA4C3, 0xF628880B,
-		0xEBCD3882, 0x83CE144A, 0x3BCB6112, 0x53C84DDA,
-		0x9C5BFAA6, 0xF458D66E, 0x4C5DA336, 0x245E8FFE,
-		0x39BB3F77, 0x51B813BF, 0xE9BD66E7, 0x81BE4A2F,
-		0xD27607F5, 0xBA752B3D, 0x02705E65, 0x6A7372AD,
-		0x7796C224, 0x1F95EEEC, 0xA7909BB4, 0xCF93B77C,
-		0x3D5B83BD, 0x5558AF75, 0xED5DDA2D, 0x855EF6E5,
-		0x98BB466C, 0xF0B86AA4, 0x48BD1FFC, 0x20BE3334,
-		0x73767EEE, 0x1B755226, 0xA370277E, 0xCB730BB6,
-		0xD696BB3F, 0xBE9597F7, 0x0690E2AF, 0x6E93CE67,
-		0xA100791B, 0xC90355D3, 0x7106208B, 0x19050C43,
-		0x04E0BCCA, 0x6CE39002, 0xD4E6E55A, 0xBCE5C992,
-		0xEF2D8448, 0x872EA880, 0x3F2BDDD8, 0x5728F110,
-		0x4ACD4199, 0x22CE6D51, 0x9ACB1809, 0xF2C834C1,
-		0x7AB7077A, 0x12B42BB2, 0xAAB15EEA, 0xC2B27222,
-		0xDF57C2AB, 0xB754EE63, 0x0F519B3B, 0x6752B7F3,
-		0x349AFA29, 0x5C99D6E1, 0xE49CA3B9, 0x8C9F8F71,
-		0x917A3FF8, 0xF9791330, 0x417C6668, 0x297F4AA0,
-		0xE6ECFDDC, 0x8EEFD114, 0x36EAA44C, 0x5EE98884,
-		0x430C380D, 0x2B0F14C5, 0x930A619D, 0xFB094D55,
-		0xA8C1008F, 0xC0C22C47, 0x78C7591F, 0x10C475D7,
-		0x0D21C55E, 0x6522E996, 0xDD279CCE, 0xB524B006,
-		0x47EC84C7, 0x2FEFA80F, 0x97EADD57, 0xFFE9F19F,
-		0xE20C4116, 0x8A0F6DDE, 0x320A1886, 0x5A09344E,
-		0x09C17994, 0x61C2555C, 0xD9C72004, 0xB1C40CCC,
-		0xAC21BC45, 0xC422908D, 0x7C27E5D5, 0x1424C91D,
-		0xDBB77E61, 0xB3B452A9, 0x0BB127F1, 0x63B20B39,
-		0x7E57BBB0, 0x16549778, 0xAE51E220, 0xC652CEE8,
-		0x959A8332, 0xFD99AFFA, 0x459CDAA2, 0x2D9FF66A,
-		0x307A46E3, 0x58796A2B, 0xE07C1F73, 0x887F33BB,
-		0xF56E0EF4, 0x9D6D223C, 0x25685764, 0x4D6B7BAC,
-		0x508ECB25, 0x388DE7ED, 0x808892B5, 0xE88BBE7D,
-		0xBB43F3A7, 0xD340DF6F, 0x6B45AA37, 0x034686FF,
-		0x1EA33676, 0x76A01ABE, 0xCEA56FE6, 0xA6A6432E,
-		0x6935F452, 0x0136D89A, 0xB933ADC2, 0xD130810A,
-		0xCCD53183, 0xA4D61D4B, 0x1CD36813, 0x74D044DB,
-		0x27180901, 0x4F1B25C9, 0xF71E5091, 0x9F1D7C59,
-		0x82F8CCD0, 0xEAFBE018, 0x52FE9540, 0x3AFDB988,
-		0xC8358D49, 0xA036A181, 0x1833D4D9, 0x7030F811,
-		0x6DD54898, 0x05D66450, 0xBDD31108, 0xD5D03DC0,
-		0x8618701A, 0xEE1B5CD2, 0x561E298A, 0x3E1D0542,
-		0x23F8B5CB, 0x4BFB9903, 0xF3FEEC5B, 0x9BFDC093,
-		0x546E77EF, 0x3C6D5B27, 0x84682E7F, 0xEC6B02B7,
-		0xF18EB23E, 0x998D9EF6, 0x2188EBAE, 0x498BC766,
-		0x1A438ABC, 0x7240A674, 0xCA45D32C, 0xA246FFE4,
-		0xBFA34F6D, 0xD7A063A5, 0x6FA516FD, 0x07A63A35,
-		0x8FD9098E, 0xE7DA2546, 0x5FDF501E, 0x37DC7CD6,
-		0x2A39CC5F, 0x423AE097, 0xFA3F95CF, 0x923CB907,
-		0xC1F4F4DD, 0xA9F7D815, 0x11F2AD4D, 0x79F18185,
-		0x6414310C, 0x0C171DC4, 0xB412689C, 0xDC114454,
-		0x1382F328, 0x7B81DFE0, 0xC384AAB8, 0xAB878670,
-		0xB66236F9, 0xDE611A31, 0x66646F69, 0x0E6743A1,
-		0x5DAF0E7B, 0x35AC22B3, 0x8DA957EB, 0xE5AA7B23,
-		0xF84FCBAA, 0x904CE762, 0x2849923A, 0x404ABEF2,
-		0xB2828A33, 0xDA81A6FB, 0x6284D3A3, 0x0A87FF6B,
-		0x17624FE2, 0x7F61632A, 0xC7641672, 0xAF673ABA,
-		0xFCAF7760, 0x94AC5BA8, 0x2CA92EF0, 0x44AA0238,
-		0x594FB2B1, 0x314C9E79, 0x8949EB21, 0xE14AC7E9,
-		0x2ED97095, 0x46DA5C5D, 0xFEDF2905, 0x96DC05CD,
-		0x8B39B544, 0xE33A998C, 0x5B3FECD4, 0x333CC01C,
-		0x60F48DC6, 0x08F7A10E, 0xB0F2D456, 0xD8F1F89E,
-		0xC5144817, 0xAD1764DF, 0x15121187, 0x7D113D4F
-	},
-	{
-		0x00000000, 0x493C7D27, 0x9278FA4E, 0xDB448769,
-		0x211D826D, 0x6821FF4A, 0xB3657823, 0xFA590504,
-		0x423B04DA, 0x0B0779FD, 0xD043FE94, 0x997F83B3,
-		0x632686B7, 0x2A1AFB90, 0xF15E7CF9, 0xB86201DE,
-		0x847609B4, 0xCD4A7493, 0x160EF3FA, 0x5F328EDD,
-		0xA56B8BD9, 0xEC57F6FE, 0x37137197, 0x7E2F0CB0,
-		0xC64D0D6E, 0x8F717049, 0x5435F720, 0x1D098A07,
-		0xE7508F03, 0xAE6CF224, 0x7528754D, 0x3C14086A,
-		0x0D006599, 0x443C18BE, 0x9F789FD7, 0xD644E2F0,
-		0x2C1DE7F4, 0x65219AD3, 0xBE651DBA, 0xF759609D,
-		0x4F3B6143, 0x06071C64, 0xDD439B0D, 0x947FE62A,
-		0x6E26E32E, 0x271A9E09, 0xFC5E1960, 0xB5626447,
-		0x89766C2D, 0xC04A110A, 0x1B0E9663, 0x5232EB44,
-		0xA86BEE40, 0xE1579367, 0x3A13140E, 0x732F6929,
-		0xCB4D68F7, 0x827115D0, 0x593592B9, 0x1009EF9E,
-		0xEA50EA9A, 0xA36C97BD, 0x782810D4, 0x31146DF3,
-		0x1A00CB32, 0x533CB615, 0x8878317C, 0xC1444C5B,
-		0x3B1D495F, 0x72213478, 0xA965B311, 0xE059CE36,
-		0x583BCFE8, 0x1107B2CF, 0xCA4335A6, 0x837F4881,
-		0x79264D85, 0x301A30A2, 0xEB5EB7CB, 0xA262CAEC,
-		0x9E76C286, 0xD74ABFA1, 0x0C0E38C8, 0x453245EF,
-		0xBF6B40EB, 0xF6573DCC, 0x2D13BAA5, 0x642FC782,
-		0xDC4DC65C, 0x9571BB7B, 0x4E353C12, 0x07094135,
-		0xFD504431, 0xB46C3916, 0x6F28BE7F, 0x2614C358,
-		0x1700AEAB, 0x5E3CD38C, 0x857854E5, 0xCC4429C2,
-		0x361D2CC6, 0x7F2151E1, 0xA465D688, 0xED59ABAF,
-		0x553BAA71, 0x1C07D756, 0xC743503F, 0x8E7F2D18,
-		0x7426281C, 0x3D1A553B, 0xE65ED252, 0xAF62AF75,
-		0x9376A71F, 0xDA4ADA38, 0x010E5D51, 0x48322076,
-		0xB26B2572, 0xFB575855, 0x2013DF3C, 0x692FA21B,
-		0xD14DA3C5, 0x9871DEE2, 0x4335598B, 0x0A0924AC,
-		0xF05021A8, 0xB96C5C8F, 0x6228DBE6, 0x2B14A6C1,
-		0x34019664, 0x7D3DEB43, 0xA6796C2A, 0xEF45110D,
-		0x151C1409, 0x5C20692E, 0x8764EE47, 0xCE589360,
-		0x763A92BE, 0x3F06EF99, 0xE44268F0, 0xAD7E15D7,
-		0x572710D3, 0x1E1B6DF4, 0xC55FEA9D, 0x8C6397BA,
-		0xB0779FD0, 0xF94BE2F7, 0x220F659E, 0x6B3318B9,
-		0x916A1DBD, 0xD856609A, 0x0312E7F3, 0x4A2E9AD4,
-		0xF24C9B0A, 0xBB70E62D, 0x60346144, 0x29081C63,
-		0xD3511967, 0x9A6D6440, 0x4129E329, 0x08159E0E,
-		0x3901F3FD, 0x703D8EDA, 0xAB7909B3, 0xE2457494,
-		0x181C7190, 0x51200CB7, 0x8A648BDE, 0xC358F6F9,
-		0x7B3AF727, 0x32068A00, 0xE9420D69, 0xA07E704E,
-		0x5A27754A, 0x131B086D, 0xC85F8F04, 0x8163F223,
-		0xBD77FA49, 0xF44B876E, 0x2F0F0007, 0x66337D20,
-		0x9C6A7824, 0xD5560503, 0x0E12826A, 0x472EFF4D,
-		0xFF4CFE93, 0xB67083B4, 0x6D3404DD, 0x240879FA,
-		0xDE517CFE, 0x976D01D9, 0x4C2986B0, 0x0515FB97,
-		0x2E015D56, 0x673D2071, 0xBC79A718, 0xF545DA3F,
-		0x0F1CDF3B, 0x4620A21C, 0x9D642575, 0xD4585852,
-		0x6C3A598C, 0x250624AB, 0xFE42A3C2, 0xB77EDEE5,
-		0x4D27DBE1, 0x041BA6C6, 0xDF5F21AF, 0x96635C88,
-		0xAA7754E2, 0xE34B29C5, 0x380FAEAC, 0x7133D38B,
-		0x8B6AD68F, 0xC256ABA8, 0x19122CC1, 0x502E51E6,
-		0xE84C5038, 0xA1702D1F, 0x7A34AA76, 0x3308D751,
-		0xC951D255, 0x806DAF72, 0x5B29281B, 0x1215553C,
-		0x230138CF, 0x6A3D45E8, 0xB179C281, 0xF845BFA6,
-		0x021CBAA2, 0x4B20C785, 0x906440EC, 0xD9583DCB,
-		0x613A3C15, 0x28064132, 0xF342C65B, 0xBA7EBB7C,
-		0x4027BE78, 0x091BC35F, 0xD25F4436, 0x9B633911,
-		0xA777317B, 0xEE4B4C5C, 0x350FCB35, 0x7C33B612,
-		0x866AB316, 0xCF56CE31, 0x14124958, 0x5D2E347F,
-		0xE54C35A1, 0xAC704886, 0x7734CFEF, 0x3E08B2C8,
-		0xC451B7CC, 0x8D6DCAEB, 0x56294D82, 0x1F1530A5
-	}
-#else							/* !WORDS_BIGENDIAN */
-	{
-		0x00000000, 0x03836BF2, 0xF7703BE1, 0xF4F35013,
-		0x1F979AC7, 0x1C14F135, 0xE8E7A126, 0xEB64CAD4,
-		0xCF58D98A, 0xCCDBB278, 0x3828E26B, 0x3BAB8999,
-		0xD0CF434D, 0xD34C28BF, 0x27BF78AC, 0x243C135E,
-		0x6FC75E10, 0x6C4435E2, 0x98B765F1, 0x9B340E03,
-		0x7050C4D7, 0x73D3AF25, 0x8720FF36, 0x84A394C4,
-		0xA09F879A, 0xA31CEC68, 0x57EFBC7B, 0x546CD789,
-		0xBF081D5D, 0xBC8B76AF, 0x487826BC, 0x4BFB4D4E,
-		0xDE8EBD20, 0xDD0DD6D2, 0x29FE86C1, 0x2A7DED33,
-		0xC11927E7, 0xC29A4C15, 0x36691C06, 0x35EA77F4,
-		0x11D664AA, 0x12550F58, 0xE6A65F4B, 0xE52534B9,
-		0x0E41FE6D, 0x0DC2959F, 0xF931C58C, 0xFAB2AE7E,
-		0xB149E330, 0xB2CA88C2, 0x4639D8D1, 0x45BAB323,
-		0xAEDE79F7, 0xAD5D1205, 0x59AE4216, 0x5A2D29E4,
-		0x7E113ABA, 0x7D925148, 0x8961015B, 0x8AE26AA9,
-		0x6186A07D, 0x6205CB8F, 0x96F69B9C, 0x9575F06E,
-		0xBC1D7B41, 0xBF9E10B3, 0x4B6D40A0, 0x48EE2B52,
-		0xA38AE186, 0xA0098A74, 0x54FADA67, 0x5779B195,
-		0x7345A2CB, 0x70C6C939, 0x8435992A, 0x87B6F2D8,
-		0x6CD2380C, 0x6F5153FE, 0x9BA203ED, 0x9821681F,
-		0xD3DA2551, 0xD0594EA3, 0x24AA1EB0, 0x27297542,
-		0xCC4DBF96, 0xCFCED464, 0x3B3D8477, 0x38BEEF85,
-		0x1C82FCDB, 0x1F019729, 0xEBF2C73A, 0xE871ACC8,
-		0x0315661C, 0x00960DEE, 0xF4655DFD, 0xF7E6360F,
-		0x6293C661, 0x6110AD93, 0x95E3FD80, 0x96609672,
-		0x7D045CA6, 0x7E873754, 0x8A746747, 0x89F70CB5,
-		0xADCB1FEB, 0xAE487419, 0x5ABB240A, 0x59384FF8,
-		0xB25C852C, 0xB1DFEEDE, 0x452CBECD, 0x46AFD53F,
-		0x0D549871, 0x0ED7F383, 0xFA24A390, 0xF9A7C862,
-		0x12C302B6, 0x11406944, 0xE5B33957, 0xE63052A5,
-		0xC20C41FB, 0xC18F2A09, 0x357C7A1A, 0x36FF11E8,
-		0xDD9BDB3C, 0xDE18B0CE, 0x2AEBE0DD, 0x29688B2F,
-		0x783BF682, 0x7BB89D70, 0x8F4BCD63, 0x8CC8A691,
-		0x67AC6C45, 0x642F07B7, 0x90DC57A4, 0x935F3C56,
-		0xB7632F08, 0xB4E044FA, 0x401314E9, 0x43907F1B,
-		0xA8F4B5CF, 0xAB77DE3D, 0x5F848E2E, 0x5C07E5DC,
-		0x17FCA892, 0x147FC360, 0xE08C9373, 0xE30FF881,
-		0x086B3255, 0x0BE859A7, 0xFF1B09B4, 0xFC986246,
-		0xD8A47118, 0xDB271AEA, 0x2FD44AF9, 0x2C57210B,
-		0xC733EBDF, 0xC4B0802D, 0x3043D03E, 0x33C0BBCC,
-		0xA6B54BA2, 0xA5362050, 0x51C57043, 0x52461BB1,
-		0xB922D165, 0xBAA1BA97, 0x4E52EA84, 0x4DD18176,
-		0x69ED9228, 0x6A6EF9DA, 0x9E9DA9C9, 0x9D1EC23B,
-		0x767A08EF, 0x75F9631D, 0x810A330E, 0x828958FC,
-		0xC97215B2, 0xCAF17E40, 0x3E022E53, 0x3D8145A1,
-		0xD6E58F75, 0xD566E487, 0x2195B494, 0x2216DF66,
-		0x062ACC38, 0x05A9A7CA, 0xF15AF7D9, 0xF2D99C2B,
-		0x19BD56FF, 0x1A3E3D0D, 0xEECD6D1E, 0xED4E06EC,
-		0xC4268DC3, 0xC7A5E631, 0x3356B622, 0x30D5DDD0,
-		0xDBB11704, 0xD8327CF6, 0x2CC12CE5, 0x2F424717,
-		0x0B7E5449, 0x08FD3FBB, 0xFC0E6FA8, 0xFF8D045A,
-		0x14E9CE8E, 0x176AA57C, 0xE399F56F, 0xE01A9E9D,
-		0xABE1D3D3, 0xA862B821, 0x5C91E832, 0x5F1283C0,
-		0xB4764914, 0xB7F522E6, 0x430672F5, 0x40851907,
-		0x64B90A59, 0x673A61AB, 0x93C931B8, 0x904A5A4A,
-		0x7B2E909E, 0x78ADFB6C, 0x8C5EAB7F, 0x8FDDC08D,
-		0x1AA830E3, 0x192B5B11, 0xEDD80B02, 0xEE5B60F0,
-		0x053FAA24, 0x06BCC1D6, 0xF24F91C5, 0xF1CCFA37,
-		0xD5F0E969, 0xD673829B, 0x2280D288, 0x2103B97A,
-		0xCA6773AE, 0xC9E4185C, 0x3D17484F, 0x3E9423BD,
-		0x756F6EF3, 0x76EC0501, 0x821F5512, 0x819C3EE0,
-		0x6AF8F434, 0x697B9FC6, 0x9D88CFD5, 0x9E0BA427,
-		0xBA37B779, 0xB9B4DC8B, 0x4D478C98, 0x4EC4E76A,
-		0xA5A02DBE, 0xA623464C, 0x52D0165F, 0x51537DAD,
-	},
-	{
-		0x00000000, 0x7798A213, 0xEE304527, 0x99A8E734,
-		0xDC618A4E, 0xABF9285D, 0x3251CF69, 0x45C96D7A,
-		0xB8C3149D, 0xCF5BB68E, 0x56F351BA, 0x216BF3A9,
-		0x64A29ED3, 0x133A3CC0, 0x8A92DBF4, 0xFD0A79E7,
-		0x81F1C53F, 0xF669672C, 0x6FC18018, 0x1859220B,
-		0x5D904F71, 0x2A08ED62, 0xB3A00A56, 0xC438A845,
-		0x3932D1A2, 0x4EAA73B1, 0xD7029485, 0xA09A3696,
-		0xE5535BEC, 0x92CBF9FF, 0x0B631ECB, 0x7CFBBCD8,
-		0x02E38B7F, 0x757B296C, 0xECD3CE58, 0x9B4B6C4B,
-		0xDE820131, 0xA91AA322, 0x30B24416, 0x472AE605,
-		0xBA209FE2, 0xCDB83DF1, 0x5410DAC5, 0x238878D6,
-		0x664115AC, 0x11D9B7BF, 0x8871508B, 0xFFE9F298,
-		0x83124E40, 0xF48AEC53, 0x6D220B67, 0x1ABAA974,
-		0x5F73C40E, 0x28EB661D, 0xB1438129, 0xC6DB233A,
-		0x3BD15ADD, 0x4C49F8CE, 0xD5E11FFA, 0xA279BDE9,
-		0xE7B0D093, 0x90287280, 0x098095B4, 0x7E1837A7,
-		0x04C617FF, 0x735EB5EC, 0xEAF652D8, 0x9D6EF0CB,
-		0xD8A79DB1, 0xAF3F3FA2, 0x3697D896, 0x410F7A85,
-		0xBC050362, 0xCB9DA171, 0x52354645, 0x25ADE456,
-		0x6064892C, 0x17FC2B3F, 0x8E54CC0B, 0xF9CC6E18,
-		0x8537D2C0, 0xF2AF70D3, 0x6B0797E7, 0x1C9F35F4,
-		0x5956588E, 0x2ECEFA9D, 0xB7661DA9, 0xC0FEBFBA,
-		0x3DF4C65D, 0x4A6C644E, 0xD3C4837A, 0xA45C2169,
-		0xE1954C13, 0x960DEE00, 0x0FA50934, 0x783DAB27,
-		0x06259C80, 0x71BD3E93, 0xE815D9A7, 0x9F8D7BB4,
-		0xDA4416CE, 0xADDCB4DD, 0x347453E9, 0x43ECF1FA,
-		0xBEE6881D, 0xC97E2A0E, 0x50D6CD3A, 0x274E6F29,
-		0x62870253, 0x151FA040, 0x8CB74774, 0xFB2FE567,
-		0x87D459BF, 0xF04CFBAC, 0x69E41C98, 0x1E7CBE8B,
-		0x5BB5D3F1, 0x2C2D71E2, 0xB58596D6, 0xC21D34C5,
-		0x3F174D22, 0x488FEF31, 0xD1270805, 0xA6BFAA16,
-		0xE376C76C, 0x94EE657F, 0x0D46824B, 0x7ADE2058,
-		0xF9FAC3FB, 0x8E6261E8, 0x17CA86DC, 0x605224CF,
-		0x259B49B5, 0x5203EBA6, 0xCBAB0C92, 0xBC33AE81,
-		0x4139D766, 0x36A17575, 0xAF099241, 0xD8913052,
-		0x9D585D28, 0xEAC0FF3B, 0x7368180F, 0x04F0BA1C,
-		0x780B06C4, 0x0F93A4D7, 0x963B43E3, 0xE1A3E1F0,
-		0xA46A8C8A, 0xD3F22E99, 0x4A5AC9AD, 0x3DC26BBE,
-		0xC0C81259, 0xB750B04A, 0x2EF8577E, 0x5960F56D,
-		0x1CA99817, 0x6B313A04, 0xF299DD30, 0x85017F23,
-		0xFB194884, 0x8C81EA97, 0x15290DA3, 0x62B1AFB0,
-		0x2778C2CA, 0x50E060D9, 0xC94887ED, 0xBED025FE,
-		0x43DA5C19, 0x3442FE0A, 0xADEA193E, 0xDA72BB2D,
-		0x9FBBD657, 0xE8237444, 0x718B9370, 0x06133163,
-		0x7AE88DBB, 0x0D702FA8, 0x94D8C89C, 0xE3406A8F,
-		0xA68907F5, 0xD111A5E6, 0x48B942D2, 0x3F21E0C1,
-		0xC22B9926, 0xB5B33B35, 0x2C1BDC01, 0x5B837E12,
-		0x1E4A1368, 0x69D2B17B, 0xF07A564F, 0x87E2F45C,
-		0xFD3CD404, 0x8AA47617, 0x130C9123, 0x64943330,
-		0x215D5E4A, 0x56C5FC59, 0xCF6D1B6D, 0xB8F5B97E,
-		0x45FFC099, 0x3267628A, 0xABCF85BE, 0xDC5727AD,
-		0x999E4AD7, 0xEE06E8C4, 0x77AE0FF0, 0x0036ADE3,
-		0x7CCD113B, 0x0B55B328, 0x92FD541C, 0xE565F60F,
-		0xA0AC9B75, 0xD7343966, 0x4E9CDE52, 0x39047C41,
-		0xC40E05A6, 0xB396A7B5, 0x2A3E4081, 0x5DA6E292,
-		0x186F8FE8, 0x6FF72DFB, 0xF65FCACF, 0x81C768DC,
-		0xFFDF5F7B, 0x8847FD68, 0x11EF1A5C, 0x6677B84F,
-		0x23BED535, 0x54267726, 0xCD8E9012, 0xBA163201,
-		0x471C4BE6, 0x3084E9F5, 0xA92C0EC1, 0xDEB4ACD2,
-		0x9B7DC1A8, 0xECE563BB, 0x754D848F, 0x02D5269C,
-		0x7E2E9A44, 0x09B63857, 0x901EDF63, 0xE7867D70,
-		0xA24F100A, 0xD5D7B219, 0x4C7F552D, 0x3BE7F73E,
-		0xC6ED8ED9, 0xB1752CCA, 0x28DDCBFE, 0x5F4569ED,
-		0x1A8C0497, 0x6D14A684, 0xF4BC41B0, 0x8324E3A3,
-	},
-	{
-		0x00000000, 0x7E9241A5, 0x0D526F4F, 0x73C02EEA,
-		0x1AA4DE9E, 0x64369F3B, 0x17F6B1D1, 0x6964F074,
-		0xC53E5138, 0xBBAC109D, 0xC86C3E77, 0xB6FE7FD2,
-		0xDF9A8FA6, 0xA108CE03, 0xD2C8E0E9, 0xAC5AA14C,
-		0x8A7DA270, 0xF4EFE3D5, 0x872FCD3F, 0xF9BD8C9A,
-		0x90D97CEE, 0xEE4B3D4B, 0x9D8B13A1, 0xE3195204,
-		0x4F43F348, 0x31D1B2ED, 0x42119C07, 0x3C83DDA2,
-		0x55E72DD6, 0x2B756C73, 0x58B54299, 0x2627033C,
-		0x14FB44E1, 0x6A690544, 0x19A92BAE, 0x673B6A0B,
-		0x0E5F9A7F, 0x70CDDBDA, 0x030DF530, 0x7D9FB495,
-		0xD1C515D9, 0xAF57547C, 0xDC977A96, 0xA2053B33,
-		0xCB61CB47, 0xB5F38AE2, 0xC633A408, 0xB8A1E5AD,
-		0x9E86E691, 0xE014A734, 0x93D489DE, 0xED46C87B,
-		0x8422380F, 0xFAB079AA, 0x89705740, 0xF7E216E5,
-		0x5BB8B7A9, 0x252AF60C, 0x56EAD8E6, 0x28789943,
-		0x411C6937, 0x3F8E2892, 0x4C4E0678, 0x32DC47DD,
-		0xD98065C7, 0xA7122462, 0xD4D20A88, 0xAA404B2D,
-		0xC324BB59, 0xBDB6FAFC, 0xCE76D416, 0xB0E495B3,
-		0x1CBE34FF, 0x622C755A, 0x11EC5BB0, 0x6F7E1A15,
-		0x061AEA61, 0x7888ABC4, 0x0B48852E, 0x75DAC48B,
-		0x53FDC7B7, 0x2D6F8612, 0x5EAFA8F8, 0x203DE95D,
-		0x49591929, 0x37CB588C, 0x440B7666, 0x3A9937C3,
-		0x96C3968F, 0xE851D72A, 0x9B91F9C0, 0xE503B865,
-		0x8C674811, 0xF2F509B4, 0x8135275E, 0xFFA766FB,
-		0xCD7B2126, 0xB3E96083, 0xC0294E69, 0xBEBB0FCC,
-		0xD7DFFFB8, 0xA94DBE1D, 0xDA8D90F7, 0xA41FD152,
-		0x0845701E, 0x76D731BB, 0x05171F51, 0x7B855EF4,
-		0x12E1AE80, 0x6C73EF25, 0x1FB3C1CF, 0x6121806A,
-		0x47068356, 0x3994C2F3, 0x4A54EC19, 0x34C6ADBC,
-		0x5DA25DC8, 0x23301C6D, 0x50F03287, 0x2E627322,
-		0x8238D26E, 0xFCAA93CB, 0x8F6ABD21, 0xF1F8FC84,
-		0x989C0CF0, 0xE60E4D55, 0x95CE63BF, 0xEB5C221A,
-		0x4377278B, 0x3DE5662E, 0x4E2548C4, 0x30B70961,
-		0x59D3F915, 0x2741B8B0, 0x5481965A, 0x2A13D7FF,
-		0x864976B3, 0xF8DB3716, 0x8B1B19FC, 0xF5895859,
-		0x9CEDA82D, 0xE27FE988, 0x91BFC762, 0xEF2D86C7,
-		0xC90A85FB, 0xB798C45E, 0xC458EAB4, 0xBACAAB11,
-		0xD3AE5B65, 0xAD3C1AC0, 0xDEFC342A, 0xA06E758F,
-		0x0C34D4C3, 0x72A69566, 0x0166BB8C, 0x7FF4FA29,
-		0x16900A5D, 0x68024BF8, 0x1BC26512, 0x655024B7,
-		0x578C636A, 0x291E22CF, 0x5ADE0C25, 0x244C4D80,
-		0x4D28BDF4, 0x33BAFC51, 0x407AD2BB, 0x3EE8931E,
-		0x92B23252, 0xEC2073F7, 0x9FE05D1D, 0xE1721CB8,
-		0x8816ECCC, 0xF684AD69, 0x85448383, 0xFBD6C226,
-		0xDDF1C11A, 0xA36380BF, 0xD0A3AE55, 0xAE31EFF0,
-		0xC7551F84, 0xB9C75E21, 0xCA0770CB, 0xB495316E,
-		0x18CF9022, 0x665DD187, 0x159DFF6D, 0x6B0FBEC8,
-		0x026B4EBC, 0x7CF90F19, 0x0F3921F3, 0x71AB6056,
-		0x9AF7424C, 0xE46503E9, 0x97A52D03, 0xE9376CA6,
-		0x80539CD2, 0xFEC1DD77, 0x8D01F39D, 0xF393B238,
-		0x5FC91374, 0x215B52D1, 0x529B7C3B, 0x2C093D9E,
-		0x456DCDEA, 0x3BFF8C4F, 0x483FA2A5, 0x36ADE300,
-		0x108AE03C, 0x6E18A199, 0x1DD88F73, 0x634ACED6,
-		0x0A2E3EA2, 0x74BC7F07, 0x077C51ED, 0x79EE1048,
-		0xD5B4B104, 0xAB26F0A1, 0xD8E6DE4B, 0xA6749FEE,
-		0xCF106F9A, 0xB1822E3F, 0xC24200D5, 0xBCD04170,
-		0x8E0C06AD, 0xF09E4708, 0x835E69E2, 0xFDCC2847,
-		0x94A8D833, 0xEA3A9996, 0x99FAB77C, 0xE768F6D9,
-		0x4B325795, 0x35A01630, 0x466038DA, 0x38F2797F,
-		0x5196890B, 0x2F04C8AE, 0x5CC4E644, 0x2256A7E1,
-		0x0471A4DD, 0x7AE3E578, 0x0923CB92, 0x77B18A37,
-		0x1ED57A43, 0x60473BE6, 0x1387150C, 0x6D1554A9,
-		0xC14FF5E5, 0xBFDDB440, 0xCC1D9AAA, 0xB28FDB0F,
-		0xDBEB2B7B, 0xA5796ADE, 0xD6B94434, 0xA82B0591,
-	},
-	{
-		0x00000000, 0xB8AA45DD, 0x812367BF, 0x39892262,
-		0xF331227B, 0x4B9B67A6, 0x721245C4, 0xCAB80019,
-		0xE66344F6, 0x5EC9012B, 0x67402349, 0xDFEA6694,
-		0x1552668D, 0xADF82350, 0x94710132, 0x2CDB44EF,
-		0x3DB164E9, 0x851B2134, 0xBC920356, 0x0438468B,
-		0xCE804692, 0x762A034F, 0x4FA3212D, 0xF70964F0,
-		0xDBD2201F, 0x637865C2, 0x5AF147A0, 0xE25B027D,
-		0x28E30264, 0x904947B9, 0xA9C065DB, 0x116A2006,
-		0x8B1425D7, 0x33BE600A, 0x0A374268, 0xB29D07B5,
-		0x782507AC, 0xC08F4271, 0xF9066013, 0x41AC25CE,
-		0x6D776121, 0xD5DD24FC, 0xEC54069E, 0x54FE4343,
-		0x9E46435A, 0x26EC0687, 0x1F6524E5, 0xA7CF6138,
-		0xB6A5413E, 0x0E0F04E3, 0x37862681, 0x8F2C635C,
-		0x45946345, 0xFD3E2698, 0xC4B704FA, 0x7C1D4127,
-		0x50C605C8, 0xE86C4015, 0xD1E56277, 0x694F27AA,
-		0xA3F727B3, 0x1B5D626E, 0x22D4400C, 0x9A7E05D1,
-		0xE75FA6AB, 0x5FF5E376, 0x667CC114, 0xDED684C9,
-		0x146E84D0, 0xACC4C10D, 0x954DE36F, 0x2DE7A6B2,
-		0x013CE25D, 0xB996A780, 0x801F85E2, 0x38B5C03F,
-		0xF20DC026, 0x4AA785FB, 0x732EA799, 0xCB84E244,
-		0xDAEEC242, 0x6244879F, 0x5BCDA5FD, 0xE367E020,
-		0x29DFE039, 0x9175A5E4, 0xA8FC8786, 0x1056C25B,
-		0x3C8D86B4, 0x8427C369, 0xBDAEE10B, 0x0504A4D6,
-		0xCFBCA4CF, 0x7716E112, 0x4E9FC370, 0xF63586AD,
-		0x6C4B837C, 0xD4E1C6A1, 0xED68E4C3, 0x55C2A11E,
-		0x9F7AA107, 0x27D0E4DA, 0x1E59C6B8, 0xA6F38365,
-		0x8A28C78A, 0x32828257, 0x0B0BA035, 0xB3A1E5E8,
-		0x7919E5F1, 0xC1B3A02C, 0xF83A824E, 0x4090C793,
-		0x51FAE795, 0xE950A248, 0xD0D9802A, 0x6873C5F7,
-		0xA2CBC5EE, 0x1A618033, 0x23E8A251, 0x9B42E78C,
-		0xB799A363, 0x0F33E6BE, 0x36BAC4DC, 0x8E108101,
-		0x44A88118, 0xFC02C4C5, 0xC58BE6A7, 0x7D21A37A,
-		0x3FC9A052, 0x8763E58F, 0xBEEAC7ED, 0x06408230,
-		0xCCF88229, 0x7452C7F4, 0x4DDBE596, 0xF571A04B,
-		0xD9AAE4A4, 0x6100A179, 0x5889831B, 0xE023C6C6,
-		0x2A9BC6DF, 0x92318302, 0xABB8A160, 0x1312E4BD,
-		0x0278C4BB, 0xBAD28166, 0x835BA304, 0x3BF1E6D9,
-		0xF149E6C0, 0x49E3A31D, 0x706A817F, 0xC8C0C4A2,
-		0xE41B804D, 0x5CB1C590, 0x6538E7F2, 0xDD92A22F,
-		0x172AA236, 0xAF80E7EB, 0x9609C589, 0x2EA38054,
-		0xB4DD8585, 0x0C77C058, 0x35FEE23A, 0x8D54A7E7,
-		0x47ECA7FE, 0xFF46E223, 0xC6CFC041, 0x7E65859C,
-		0x52BEC173, 0xEA1484AE, 0xD39DA6CC, 0x6B37E311,
-		0xA18FE308, 0x1925A6D5, 0x20AC84B7, 0x9806C16A,
-		0x896CE16C, 0x31C6A4B1, 0x084F86D3, 0xB0E5C30E,
-		0x7A5DC317, 0xC2F786CA, 0xFB7EA4A8, 0x43D4E175,
-		0x6F0FA59A, 0xD7A5E047, 0xEE2CC225, 0x568687F8,
-		0x9C3E87E1, 0x2494C23C, 0x1D1DE05E, 0xA5B7A583,
-		0xD89606F9, 0x603C4324, 0x59B56146, 0xE11F249B,
-		0x2BA72482, 0x930D615F, 0xAA84433D, 0x122E06E0,
-		0x3EF5420F, 0x865F07D2, 0xBFD625B0, 0x077C606D,
-		0xCDC46074, 0x756E25A9, 0x4CE707CB, 0xF44D4216,
-		0xE5276210, 0x5D8D27CD, 0x640405AF, 0xDCAE4072,
-		0x1616406B, 0xAEBC05B6, 0x973527D4, 0x2F9F6209,
-		0x034426E6, 0xBBEE633B, 0x82674159, 0x3ACD0484,
-		0xF075049D, 0x48DF4140, 0x71566322, 0xC9FC26FF,
-		0x5382232E, 0xEB2866F3, 0xD2A14491, 0x6A0B014C,
-		0xA0B30155, 0x18194488, 0x219066EA, 0x993A2337,
-		0xB5E167D8, 0x0D4B2205, 0x34C20067, 0x8C6845BA,
-		0x46D045A3, 0xFE7A007E, 0xC7F3221C, 0x7F5967C1,
-		0x6E3347C7, 0xD699021A, 0xEF102078, 0x57BA65A5,
-		0x9D0265BC, 0x25A82061, 0x1C210203, 0xA48B47DE,
-		0x88500331, 0x30FA46EC, 0x0973648E, 0xB1D92153,
-		0x7B61214A, 0xC3CB6497, 0xFA4246F5, 0x42E80328,
-	},
-	{
-		0x00000000, 0xAC6F1138, 0x58DF2270, 0xF4B03348,
-		0xB0BE45E0, 0x1CD154D8, 0xE8616790, 0x440E76A8,
-		0x910B67C5, 0x3D6476FD, 0xC9D445B5, 0x65BB548D,
-		0x21B52225, 0x8DDA331D, 0x796A0055, 0xD505116D,
-		0xD361228F, 0x7F0E33B7, 0x8BBE00FF, 0x27D111C7,
-		0x63DF676F, 0xCFB07657, 0x3B00451F, 0x976F5427,
-		0x426A454A, 0xEE055472, 0x1AB5673A, 0xB6DA7602,
-		0xF2D400AA, 0x5EBB1192, 0xAA0B22DA, 0x066433E2,
-		0x57B5A81B, 0xFBDAB923, 0x0F6A8A6B, 0xA3059B53,
-		0xE70BEDFB, 0x4B64FCC3, 0xBFD4CF8B, 0x13BBDEB3,
-		0xC6BECFDE, 0x6AD1DEE6, 0x9E61EDAE, 0x320EFC96,
-		0x76008A3E, 0xDA6F9B06, 0x2EDFA84E, 0x82B0B976,
-		0x84D48A94, 0x28BB9BAC, 0xDC0BA8E4, 0x7064B9DC,
-		0x346ACF74, 0x9805DE4C, 0x6CB5ED04, 0xC0DAFC3C,
-		0x15DFED51, 0xB9B0FC69, 0x4D00CF21, 0xE16FDE19,
-		0xA561A8B1, 0x090EB989, 0xFDBE8AC1, 0x51D19BF9,
-		0xAE6A5137, 0x0205400F, 0xF6B57347, 0x5ADA627F,
-		0x1ED414D7, 0xB2BB05EF, 0x460B36A7, 0xEA64279F,
-		0x3F6136F2, 0x930E27CA, 0x67BE1482, 0xCBD105BA,
-		0x8FDF7312, 0x23B0622A, 0xD7005162, 0x7B6F405A,
-		0x7D0B73B8, 0xD1646280, 0x25D451C8, 0x89BB40F0,
-		0xCDB53658, 0x61DA2760, 0x956A1428, 0x39050510,
-		0xEC00147D, 0x406F0545, 0xB4DF360D, 0x18B02735,
-		0x5CBE519D, 0xF0D140A5, 0x046173ED, 0xA80E62D5,
-		0xF9DFF92C, 0x55B0E814, 0xA100DB5C, 0x0D6FCA64,
-		0x4961BCCC, 0xE50EADF4, 0x11BE9EBC, 0xBDD18F84,
-		0x68D49EE9, 0xC4BB8FD1, 0x300BBC99, 0x9C64ADA1,
-		0xD86ADB09, 0x7405CA31, 0x80B5F979, 0x2CDAE841,
-		0x2ABEDBA3, 0x86D1CA9B, 0x7261F9D3, 0xDE0EE8EB,
-		0x9A009E43, 0x366F8F7B, 0xC2DFBC33, 0x6EB0AD0B,
-		0xBBB5BC66, 0x17DAAD5E, 0xE36A9E16, 0x4F058F2E,
-		0x0B0BF986, 0xA764E8BE, 0x53D4DBF6, 0xFFBBCACE,
-		0x5CD5A26E, 0xF0BAB356, 0x040A801E, 0xA8659126,
-		0xEC6BE78E, 0x4004F6B6, 0xB4B4C5FE, 0x18DBD4C6,
-		0xCDDEC5AB, 0x61B1D493, 0x9501E7DB, 0x396EF6E3,
-		0x7D60804B, 0xD10F9173, 0x25BFA23B, 0x89D0B303,
-		0x8FB480E1, 0x23DB91D9, 0xD76BA291, 0x7B04B3A9,
-		0x3F0AC501, 0x9365D439, 0x67D5E771, 0xCBBAF649,
-		0x1EBFE724, 0xB2D0F61C, 0x4660C554, 0xEA0FD46C,
-		0xAE01A2C4, 0x026EB3FC, 0xF6DE80B4, 0x5AB1918C,
-		0x0B600A75, 0xA70F1B4D, 0x53BF2805, 0xFFD0393D,
-		0xBBDE4F95, 0x17B15EAD, 0xE3016DE5, 0x4F6E7CDD,
-		0x9A6B6DB0, 0x36047C88, 0xC2B44FC0, 0x6EDB5EF8,
-		0x2AD52850, 0x86BA3968, 0x720A0A20, 0xDE651B18,
-		0xD80128FA, 0x746E39C2, 0x80DE0A8A, 0x2CB11BB2,
-		0x68BF6D1A, 0xC4D07C22, 0x30604F6A, 0x9C0F5E52,
-		0x490A4F3F, 0xE5655E07, 0x11D56D4F, 0xBDBA7C77,
-		0xF9B40ADF, 0x55DB1BE7, 0xA16B28AF, 0x0D043997,
-		0xF2BFF359, 0x5ED0E261, 0xAA60D129, 0x060FC011,
-		0x4201B6B9, 0xEE6EA781, 0x1ADE94C9, 0xB6B185F1,
-		0x63B4949C, 0xCFDB85A4, 0x3B6BB6EC, 0x9704A7D4,
-		0xD30AD17C, 0x7F65C044, 0x8BD5F30C, 0x27BAE234,
-		0x21DED1D6, 0x8DB1C0EE, 0x7901F3A6, 0xD56EE29E,
-		0x91609436, 0x3D0F850E, 0xC9BFB646, 0x65D0A77E,
-		0xB0D5B613, 0x1CBAA72B, 0xE80A9463, 0x4465855B,
-		0x006BF3F3, 0xAC04E2CB, 0x58B4D183, 0xF4DBC0BB,
-		0xA50A5B42, 0x09654A7A, 0xFDD57932, 0x51BA680A,
-		0x15B41EA2, 0xB9DB0F9A, 0x4D6B3CD2, 0xE1042DEA,
-		0x34013C87, 0x986E2DBF, 0x6CDE1EF7, 0xC0B10FCF,
-		0x84BF7967, 0x28D0685F, 0xDC605B17, 0x700F4A2F,
-		0x766B79CD, 0xDA0468F5, 0x2EB45BBD, 0x82DB4A85,
-		0xC6D53C2D, 0x6ABA2D15, 0x9E0A1E5D, 0x32650F65,
-		0xE7601E08, 0x4B0F0F30, 0xBFBF3C78, 0x13D02D40,
-		0x57DE5BE8, 0xFBB14AD0, 0x0F017998, 0xA36E68A0,
-	},
-	{
-		0x00000000, 0x196B30EF, 0xC3A08CDB, 0xDACBBC34,
-		0x7737F5B2, 0x6E5CC55D, 0xB4977969, 0xADFC4986,
-		0x1F180660, 0x0673368F, 0xDCB88ABB, 0xC5D3BA54,
-		0x682FF3D2, 0x7144C33D, 0xAB8F7F09, 0xB2E44FE6,
-		0x3E300CC0, 0x275B3C2F, 0xFD90801B, 0xE4FBB0F4,
-		0x4907F972, 0x506CC99D, 0x8AA775A9, 0x93CC4546,
-		0x21280AA0, 0x38433A4F, 0xE288867B, 0xFBE3B694,
-		0x561FFF12, 0x4F74CFFD, 0x95BF73C9, 0x8CD44326,
-		0x8D16F485, 0x947DC46A, 0x4EB6785E, 0x57DD48B1,
-		0xFA210137, 0xE34A31D8, 0x39818DEC, 0x20EABD03,
-		0x920EF2E5, 0x8B65C20A, 0x51AE7E3E, 0x48C54ED1,
-		0xE5390757, 0xFC5237B8, 0x26998B8C, 0x3FF2BB63,
-		0xB326F845, 0xAA4DC8AA, 0x7086749E, 0x69ED4471,
-		0xC4110DF7, 0xDD7A3D18, 0x07B1812C, 0x1EDAB1C3,
-		0xAC3EFE25, 0xB555CECA, 0x6F9E72FE, 0x76F54211,
-		0xDB090B97, 0xC2623B78, 0x18A9874C, 0x01C2B7A3,
-		0xEB5B040E, 0xF23034E1, 0x28FB88D5, 0x3190B83A,
-		0x9C6CF1BC, 0x8507C153, 0x5FCC7D67, 0x46A74D88,
-		0xF443026E, 0xED283281, 0x37E38EB5, 0x2E88BE5A,
-		0x8374F7DC, 0x9A1FC733, 0x40D47B07, 0x59BF4BE8,
-		0xD56B08CE, 0xCC003821, 0x16CB8415, 0x0FA0B4FA,
-		0xA25CFD7C, 0xBB37CD93, 0x61FC71A7, 0x78974148,
-		0xCA730EAE, 0xD3183E41, 0x09D38275, 0x10B8B29A,
-		0xBD44FB1C, 0xA42FCBF3, 0x7EE477C7, 0x678F4728,
-		0x664DF08B, 0x7F26C064, 0xA5ED7C50, 0xBC864CBF,
-		0x117A0539, 0x081135D6, 0xD2DA89E2, 0xCBB1B90D,
-		0x7955F6EB, 0x603EC604, 0xBAF57A30, 0xA39E4ADF,
-		0x0E620359, 0x170933B6, 0xCDC28F82, 0xD4A9BF6D,
-		0x587DFC4B, 0x4116CCA4, 0x9BDD7090, 0x82B6407F,
-		0x2F4A09F9, 0x36213916, 0xECEA8522, 0xF581B5CD,
-		0x4765FA2B, 0x5E0ECAC4, 0x84C576F0, 0x9DAE461F,
-		0x30520F99, 0x29393F76, 0xF3F28342, 0xEA99B3AD,
-		0xD6B7081C, 0xCFDC38F3, 0x151784C7, 0x0C7CB428,
-		0xA180FDAE, 0xB8EBCD41, 0x62207175, 0x7B4B419A,
-		0xC9AF0E7C, 0xD0C43E93, 0x0A0F82A7, 0x1364B248,
-		0xBE98FBCE, 0xA7F3CB21, 0x7D387715, 0x645347FA,
-		0xE88704DC, 0xF1EC3433, 0x2B278807, 0x324CB8E8,
-		0x9FB0F16E, 0x86DBC181, 0x5C107DB5, 0x457B4D5A,
-		0xF79F02BC, 0xEEF43253, 0x343F8E67, 0x2D54BE88,
-		0x80A8F70E, 0x99C3C7E1, 0x43087BD5, 0x5A634B3A,
-		0x5BA1FC99, 0x42CACC76, 0x98017042, 0x816A40AD,
-		0x2C96092B, 0x35FD39C4, 0xEF3685F0, 0xF65DB51F,
-		0x44B9FAF9, 0x5DD2CA16, 0x87197622, 0x9E7246CD,
-		0x338E0F4B, 0x2AE53FA4, 0xF02E8390, 0xE945B37F,
-		0x6591F059, 0x7CFAC0B6, 0xA6317C82, 0xBF5A4C6D,
-		0x12A605EB, 0x0BCD3504, 0xD1068930, 0xC86DB9DF,
-		0x7A89F639, 0x63E2C6D6, 0xB9297AE2, 0xA0424A0D,
-		0x0DBE038B, 0x14D53364, 0xCE1E8F50, 0xD775BFBF,
-		0x3DEC0C12, 0x24873CFD, 0xFE4C80C9, 0xE727B026,
-		0x4ADBF9A0, 0x53B0C94F, 0x897B757B, 0x90104594,
-		0x22F40A72, 0x3B9F3A9D, 0xE15486A9, 0xF83FB646,
-		0x55C3FFC0, 0x4CA8CF2F, 0x9663731B, 0x8F0843F4,
-		0x03DC00D2, 0x1AB7303D, 0xC07C8C09, 0xD917BCE6,
-		0x74EBF560, 0x6D80C58F, 0xB74B79BB, 0xAE204954,
-		0x1CC406B2, 0x05AF365D, 0xDF648A69, 0xC60FBA86,
-		0x6BF3F300, 0x7298C3EF, 0xA8537FDB, 0xB1384F34,
-		0xB0FAF897, 0xA991C878, 0x735A744C, 0x6A3144A3,
-		0xC7CD0D25, 0xDEA63DCA, 0x046D81FE, 0x1D06B111,
-		0xAFE2FEF7, 0xB689CE18, 0x6C42722C, 0x752942C3,
-		0xD8D50B45, 0xC1BE3BAA, 0x1B75879E, 0x021EB771,
-		0x8ECAF457, 0x97A1C4B8, 0x4D6A788C, 0x54014863,
-		0xF9FD01E5, 0xE096310A, 0x3A5D8D3E, 0x2336BDD1,
-		0x91D2F237, 0x88B9C2D8, 0x52727EEC, 0x4B194E03,
-		0xE6E50785, 0xFF8E376A, 0x25458B5E, 0x3C2EBBB1,
-	},
-	{
-		0x00000000, 0xC82C0368, 0x905906D0, 0x587505B8,
-		0xD1C5E0A5, 0x19E9E3CD, 0x419CE675, 0x89B0E51D,
-		0x53FD2D4E, 0x9BD12E26, 0xC3A42B9E, 0x0B8828F6,
-		0x8238CDEB, 0x4A14CE83, 0x1261CB3B, 0xDA4DC853,
-		0xA6FA5B9C, 0x6ED658F4, 0x36A35D4C, 0xFE8F5E24,
-		0x773FBB39, 0xBF13B851, 0xE766BDE9, 0x2F4ABE81,
-		0xF50776D2, 0x3D2B75BA, 0x655E7002, 0xAD72736A,
-		0x24C29677, 0xECEE951F, 0xB49B90A7, 0x7CB793CF,
-		0xBD835B3D, 0x75AF5855, 0x2DDA5DED, 0xE5F65E85,
-		0x6C46BB98, 0xA46AB8F0, 0xFC1FBD48, 0x3433BE20,
-		0xEE7E7673, 0x2652751B, 0x7E2770A3, 0xB60B73CB,
-		0x3FBB96D6, 0xF79795BE, 0xAFE29006, 0x67CE936E,
-		0x1B7900A1, 0xD35503C9, 0x8B200671, 0x430C0519,
-		0xCABCE004, 0x0290E36C, 0x5AE5E6D4, 0x92C9E5BC,
-		0x48842DEF, 0x80A82E87, 0xD8DD2B3F, 0x10F12857,
-		0x9941CD4A, 0x516DCE22, 0x0918CB9A, 0xC134C8F2,
-		0x7A07B77A, 0xB22BB412, 0xEA5EB1AA, 0x2272B2C2,
-		0xABC257DF, 0x63EE54B7, 0x3B9B510F, 0xF3B75267,
-		0x29FA9A34, 0xE1D6995C, 0xB9A39CE4, 0x718F9F8C,
-		0xF83F7A91, 0x301379F9, 0x68667C41, 0xA04A7F29,
-		0xDCFDECE6, 0x14D1EF8E, 0x4CA4EA36, 0x8488E95E,
-		0x0D380C43, 0xC5140F2B, 0x9D610A93, 0x554D09FB,
-		0x8F00C1A8, 0x472CC2C0, 0x1F59C778, 0xD775C410,
-		0x5EC5210D, 0x96E92265, 0xCE9C27DD, 0x06B024B5,
-		0xC784EC47, 0x0FA8EF2F, 0x57DDEA97, 0x9FF1E9FF,
-		0x16410CE2, 0xDE6D0F8A, 0x86180A32, 0x4E34095A,
-		0x9479C109, 0x5C55C261, 0x0420C7D9, 0xCC0CC4B1,
-		0x45BC21AC, 0x8D9022C4, 0xD5E5277C, 0x1DC92414,
-		0x617EB7DB, 0xA952B4B3, 0xF127B10B, 0x390BB263,
-		0xB0BB577E, 0x78975416, 0x20E251AE, 0xE8CE52C6,
-		0x32839A95, 0xFAAF99FD, 0xA2DA9C45, 0x6AF69F2D,
-		0xE3467A30, 0x2B6A7958, 0x731F7CE0, 0xBB337F88,
-		0xF40E6EF5, 0x3C226D9D, 0x64576825, 0xAC7B6B4D,
-		0x25CB8E50, 0xEDE78D38, 0xB5928880, 0x7DBE8BE8,
-		0xA7F343BB, 0x6FDF40D3, 0x37AA456B, 0xFF864603,
-		0x7636A31E, 0xBE1AA076, 0xE66FA5CE, 0x2E43A6A6,
-		0x52F43569, 0x9AD83601, 0xC2AD33B9, 0x0A8130D1,
-		0x8331D5CC, 0x4B1DD6A4, 0x1368D31C, 0xDB44D074,
-		0x01091827, 0xC9251B4F, 0x91501EF7, 0x597C1D9F,
-		0xD0CCF882, 0x18E0FBEA, 0x4095FE52, 0x88B9FD3A,
-		0x498D35C8, 0x81A136A0, 0xD9D43318, 0x11F83070,
-		0x9848D56D, 0x5064D605, 0x0811D3BD, 0xC03DD0D5,
-		0x1A701886, 0xD25C1BEE, 0x8A291E56, 0x42051D3E,
-		0xCBB5F823, 0x0399FB4B, 0x5BECFEF3, 0x93C0FD9B,
-		0xEF776E54, 0x275B6D3C, 0x7F2E6884, 0xB7026BEC,
-		0x3EB28EF1, 0xF69E8D99, 0xAEEB8821, 0x66C78B49,
-		0xBC8A431A, 0x74A64072, 0x2CD345CA, 0xE4FF46A2,
-		0x6D4FA3BF, 0xA563A0D7, 0xFD16A56F, 0x353AA607,
-		0x8E09D98F, 0x4625DAE7, 0x1E50DF5F, 0xD67CDC37,
-		0x5FCC392A, 0x97E03A42, 0xCF953FFA, 0x07B93C92,
-		0xDDF4F4C1, 0x15D8F7A9, 0x4DADF211, 0x8581F179,
-		0x0C311464, 0xC41D170C, 0x9C6812B4, 0x544411DC,
-		0x28F38213, 0xE0DF817B, 0xB8AA84C3, 0x708687AB,
-		0xF93662B6, 0x311A61DE, 0x696F6466, 0xA143670E,
-		0x7B0EAF5D, 0xB322AC35, 0xEB57A98D, 0x237BAAE5,
-		0xAACB4FF8, 0x62E74C90, 0x3A924928, 0xF2BE4A40,
-		0x338A82B2, 0xFBA681DA, 0xA3D38462, 0x6BFF870A,
-		0xE24F6217, 0x2A63617F, 0x721664C7, 0xBA3A67AF,
-		0x6077AFFC, 0xA85BAC94, 0xF02EA92C, 0x3802AA44,
-		0xB1B24F59, 0x799E4C31, 0x21EB4989, 0xE9C74AE1,
-		0x9570D92E, 0x5D5CDA46, 0x0529DFFE, 0xCD05DC96,
-		0x44B5398B, 0x8C993AE3, 0xD4EC3F5B, 0x1CC03C33,
-		0xC68DF460, 0x0EA1F708, 0x56D4F2B0, 0x9EF8F1D8,
-		0x174814C5, 0xDF6417AD, 0x87111215, 0x4F3D117D,
-	},
-	{
-		0x00000000, 0x277D3C49, 0x4EFA7892, 0x698744DB,
-		0x6D821D21, 0x4AFF2168, 0x237865B3, 0x040559FA,
-		0xDA043B42, 0xFD79070B, 0x94FE43D0, 0xB3837F99,
-		0xB7862663, 0x90FB1A2A, 0xF97C5EF1, 0xDE0162B8,
-		0xB4097684, 0x93744ACD, 0xFAF30E16, 0xDD8E325F,
-		0xD98B6BA5, 0xFEF657EC, 0x97711337, 0xB00C2F7E,
-		0x6E0D4DC6, 0x4970718F, 0x20F73554, 0x078A091D,
-		0x038F50E7, 0x24F26CAE, 0x4D752875, 0x6A08143C,
-		0x9965000D, 0xBE183C44, 0xD79F789F, 0xF0E244D6,
-		0xF4E71D2C, 0xD39A2165, 0xBA1D65BE, 0x9D6059F7,
-		0x43613B4F, 0x641C0706, 0x0D9B43DD, 0x2AE67F94,
-		0x2EE3266E, 0x099E1A27, 0x60195EFC, 0x476462B5,
-		0x2D6C7689, 0x0A114AC0, 0x63960E1B, 0x44EB3252,
-		0x40EE6BA8, 0x679357E1, 0x0E14133A, 0x29692F73,
-		0xF7684DCB, 0xD0157182, 0xB9923559, 0x9EEF0910,
-		0x9AEA50EA, 0xBD976CA3, 0xD4102878, 0xF36D1431,
-		0x32CB001A, 0x15B63C53, 0x7C317888, 0x5B4C44C1,
-		0x5F491D3B, 0x78342172, 0x11B365A9, 0x36CE59E0,
-		0xE8CF3B58, 0xCFB20711, 0xA63543CA, 0x81487F83,
-		0x854D2679, 0xA2301A30, 0xCBB75EEB, 0xECCA62A2,
-		0x86C2769E, 0xA1BF4AD7, 0xC8380E0C, 0xEF453245,
-		0xEB406BBF, 0xCC3D57F6, 0xA5BA132D, 0x82C72F64,
-		0x5CC64DDC, 0x7BBB7195, 0x123C354E, 0x35410907,
-		0x314450FD, 0x16396CB4, 0x7FBE286F, 0x58C31426,
-		0xABAE0017, 0x8CD33C5E, 0xE5547885, 0xC22944CC,
-		0xC62C1D36, 0xE151217F, 0x88D665A4, 0xAFAB59ED,
-		0x71AA3B55, 0x56D7071C, 0x3F5043C7, 0x182D7F8E,
-		0x1C282674, 0x3B551A3D, 0x52D25EE6, 0x75AF62AF,
-		0x1FA77693, 0x38DA4ADA, 0x515D0E01, 0x76203248,
-		0x72256BB2, 0x555857FB, 0x3CDF1320, 0x1BA22F69,
-		0xC5A34DD1, 0xE2DE7198, 0x8B593543, 0xAC24090A,
-		0xA82150F0, 0x8F5C6CB9, 0xE6DB2862, 0xC1A6142B,
-		0x64960134, 0x43EB3D7D, 0x2A6C79A6, 0x0D1145EF,
-		0x09141C15, 0x2E69205C, 0x47EE6487, 0x609358CE,
-		0xBE923A76, 0x99EF063F, 0xF06842E4, 0xD7157EAD,
-		0xD3102757, 0xF46D1B1E, 0x9DEA5FC5, 0xBA97638C,
-		0xD09F77B0, 0xF7E24BF9, 0x9E650F22, 0xB918336B,
-		0xBD1D6A91, 0x9A6056D8, 0xF3E71203, 0xD49A2E4A,
-		0x0A9B4CF2, 0x2DE670BB, 0x44613460, 0x631C0829,
-		0x671951D3, 0x40646D9A, 0x29E32941, 0x0E9E1508,
-		0xFDF30139, 0xDA8E3D70, 0xB30979AB, 0x947445E2,
-		0x90711C18, 0xB70C2051, 0xDE8B648A, 0xF9F658C3,
-		0x27F73A7B, 0x008A0632, 0x690D42E9, 0x4E707EA0,
-		0x4A75275A, 0x6D081B13, 0x048F5FC8, 0x23F26381,
-		0x49FA77BD, 0x6E874BF4, 0x07000F2F, 0x207D3366,
-		0x24786A9C, 0x030556D5, 0x6A82120E, 0x4DFF2E47,
-		0x93FE4CFF, 0xB48370B6, 0xDD04346D, 0xFA790824,
-		0xFE7C51DE, 0xD9016D97, 0xB086294C, 0x97FB1505,
-		0x565D012E, 0x71203D67, 0x18A779BC, 0x3FDA45F5,
-		0x3BDF1C0F, 0x1CA22046, 0x7525649D, 0x525858D4,
-		0x8C593A6C, 0xAB240625, 0xC2A342FE, 0xE5DE7EB7,
-		0xE1DB274D, 0xC6A61B04, 0xAF215FDF, 0x885C6396,
-		0xE25477AA, 0xC5294BE3, 0xACAE0F38, 0x8BD33371,
-		0x8FD66A8B, 0xA8AB56C2, 0xC12C1219, 0xE6512E50,
-		0x38504CE8, 0x1F2D70A1, 0x76AA347A, 0x51D70833,
-		0x55D251C9, 0x72AF6D80, 0x1B28295B, 0x3C551512,
-		0xCF380123, 0xE8453D6A, 0x81C279B1, 0xA6BF45F8,
-		0xA2BA1C02, 0x85C7204B, 0xEC406490, 0xCB3D58D9,
-		0x153C3A61, 0x32410628, 0x5BC642F3, 0x7CBB7EBA,
-		0x78BE2740, 0x5FC31B09, 0x36445FD2, 0x1139639B,
-		0x7B3177A7, 0x5C4C4BEE, 0x35CB0F35, 0x12B6337C,
-		0x16B36A86, 0x31CE56CF, 0x58491214, 0x7F342E5D,
-		0xA1354CE5, 0x864870AC, 0xEFCF3477, 0xC8B2083E,
-		0xCCB751C4, 0xEBCA6D8D, 0x824D2956, 0xA530151F
-	}
-#endif							/* WORDS_BIGENDIAN */
-};
diff --git a/contrib/libs/libpq/src/port/pg_crc32c_sse42.c b/contrib/libs/libpq/src/port/pg_crc32c_sse42.c
deleted file mode 100644
index 0bac452717..0000000000
--- a/contrib/libs/libpq/src/port/pg_crc32c_sse42.c
+++ /dev/null
@@ -1,69 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * pg_crc32c_sse42.c
- *	  Compute CRC-32C checksum using Intel SSE 4.2 instructions.
- *
- * Portions Copyright (c) 1996-2023, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- *
- * IDENTIFICATION
- *	  src/port/pg_crc32c_sse42.c
- *
- *-------------------------------------------------------------------------
- */
-#include "c.h"
-
-#include <nmmintrin.h>
-
-#include "port/pg_crc32c.h"
-
-pg_attribute_no_sanitize_alignment()
-pg_crc32c
-pg_comp_crc32c_sse42(pg_crc32c crc, const void *data, size_t len)
-{
-	const unsigned char *p = data;
-	const unsigned char *pend = p + len;
-
-	/*
-	 * Process eight bytes of data at a time.
-	 *
-	 * NB: We do unaligned accesses here. The Intel architecture allows that,
-	 * and performance testing didn't show any performance gain from aligning
-	 * the begin address.
-	 */
-#ifdef __x86_64__
-	while (p + 8 <= pend)
-	{
-		crc = (uint32) _mm_crc32_u64(crc, *((const uint64 *) p));
-		p += 8;
-	}
-
-	/* Process remaining full four bytes if any */
-	if (p + 4 <= pend)
-	{
-		crc = _mm_crc32_u32(crc, *((const unsigned int *) p));
-		p += 4;
-	}
-#else
-
-	/*
-	 * Process four bytes at a time. (The eight byte instruction is not
-	 * available on the 32-bit x86 architecture).
-	 */
-	while (p + 4 <= pend)
-	{
-		crc = _mm_crc32_u32(crc, *((const unsigned int *) p));
-		p += 4;
-	}
-#endif							/* __x86_64__ */
-
-	/* Process any remaining bytes one at a time. */
-	while (p < pend)
-	{
-		crc = _mm_crc32_u8(crc, *p);
-		p++;
-	}
-
-	return crc;
-}
diff --git a/contrib/libs/libpq/src/port/pg_crc32c_sse42_choose.c b/contrib/libs/libpq/src/port/pg_crc32c_sse42_choose.c
deleted file mode 100644
index 41ff4a35ad..0000000000
--- a/contrib/libs/libpq/src/port/pg_crc32c_sse42_choose.c
+++ /dev/null
@@ -1,64 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * pg_crc32c_sse42_choose.c
- *	  Choose between Intel SSE 4.2 and software CRC-32C implementation.
- *
- * On first call, checks if the CPU we're running on supports Intel SSE
- * 4.2. If it does, use the special SSE instructions for CRC-32C
- * computation. Otherwise, fall back to the pure software implementation
- * (slicing-by-8).
- *
- * Portions Copyright (c) 1996-2023, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- *
- * IDENTIFICATION
- *	  src/port/pg_crc32c_sse42_choose.c
- *
- *-------------------------------------------------------------------------
- */
-
-#include "c.h"
-
-#ifdef HAVE__GET_CPUID
-#include <cpuid.h>
-#endif
-
-#ifdef HAVE__CPUID
-#include <intrin.h>
-#endif
-
-#include "port/pg_crc32c.h"
-
-static bool
-pg_crc32c_sse42_available(void)
-{
-	unsigned int exx[4] = {0, 0, 0, 0};
-
-#if defined(HAVE__GET_CPUID)
-	__get_cpuid(1, &exx[0], &exx[1], &exx[2], &exx[3]);
-#elif defined(HAVE__CPUID)
-	__cpuid(exx, 1);
-#else
-#error cpuid instruction not available
-#endif
-
-	return (exx[2] & (1 << 20)) != 0;	/* SSE 4.2 */
-}
-
-/*
- * This gets called on the first call. It replaces the function pointer
- * so that subsequent calls are routed directly to the chosen implementation.
- */
-static pg_crc32c
-pg_comp_crc32c_choose(pg_crc32c crc, const void *data, size_t len)
-{
-	if (pg_crc32c_sse42_available())
-		pg_comp_crc32c = pg_comp_crc32c_sse42;
-	else
-		pg_comp_crc32c = pg_comp_crc32c_sb8;
-
-	return pg_comp_crc32c(crc, data, len);
-}
-
-pg_crc32c	(*pg_comp_crc32c) (pg_crc32c crc, const void *data, size_t len) = pg_comp_crc32c_choose;
diff --git a/contrib/libs/libpq/src/port/pg_strong_random.c b/contrib/libs/libpq/src/port/pg_strong_random.c
deleted file mode 100644
index 862c84aa6f..0000000000
--- a/contrib/libs/libpq/src/port/pg_strong_random.c
+++ /dev/null
@@ -1,182 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * pg_strong_random.c
- *	  generate a cryptographically secure random number
- *
- * Our definition of "strong" is that it's suitable for generating random
- * salts and query cancellation keys, during authentication.
- *
- * Note: this code is run quite early in postmaster and backend startup;
- * therefore, even when built for backend, it cannot rely on backend
- * infrastructure such as elog() or palloc().
- *
- * Copyright (c) 1996-2023, PostgreSQL Global Development Group
- *
- * IDENTIFICATION
- *	  src/port/pg_strong_random.c
- *
- *-------------------------------------------------------------------------
- */
-
-#include "c.h"
-
-#include <fcntl.h>
-#include <unistd.h>
-#include <sys/time.h>
-
-/*
- * pg_strong_random & pg_strong_random_init
- *
- * Generate requested number of random bytes. The returned bytes are
- * cryptographically secure, suitable for use e.g. in authentication.
- *
- * Before pg_strong_random is called in any process, the generator must first
- * be initialized by calling pg_strong_random_init().
- *
- * We rely on system facilities for actually generating the numbers.
- * We support a number of sources:
- *
- * 1. OpenSSL's RAND_bytes()
- * 2. Windows' CryptGenRandom() function
- * 3. /dev/urandom
- *
- * Returns true on success, and false if none of the sources
- * were available. NB: It is important to check the return value!
- * Proceeding with key generation when no random data was available
- * would lead to predictable keys and security issues.
- */
-
-
-
-#ifdef USE_OPENSSL
-
-#include <openssl/rand.h>
-
-void
-pg_strong_random_init(void)
-{
-	/*
-	 * Make sure processes do not share OpenSSL randomness state.  This is no
-	 * longer required in OpenSSL 1.1.1 and later versions, but until we drop
-	 * support for version < 1.1.1 we need to do this.
-	 */
-	RAND_poll();
-}
-
-bool
-pg_strong_random(void *buf, size_t len)
-{
-	int			i;
-
-	/*
-	 * Check that OpenSSL's CSPRNG has been sufficiently seeded, and if not
-	 * add more seed data using RAND_poll().  With some older versions of
-	 * OpenSSL, it may be necessary to call RAND_poll() a number of times.  If
-	 * RAND_poll() fails to generate seed data within the given amount of
-	 * retries, subsequent RAND_bytes() calls will fail, but we allow that to
-	 * happen to let pg_strong_random() callers handle that with appropriate
-	 * error handling.
-	 */
-#define NUM_RAND_POLL_RETRIES 8
-
-	for (i = 0; i < NUM_RAND_POLL_RETRIES; i++)
-	{
-		if (RAND_status() == 1)
-		{
-			/* The CSPRNG is sufficiently seeded */
-			break;
-		}
-
-		RAND_poll();
-	}
-
-	if (RAND_bytes(buf, len) == 1)
-		return true;
-	return false;
-}
-
-#elif WIN32
-
-#include <wincrypt.h>
-/*
- * Cache a global crypto provider that only gets freed when the process
- * exits, in case we need random numbers more than once.
- */
-static HCRYPTPROV hProvider = 0;
-
-void
-pg_strong_random_init(void)
-{
-	/* No initialization needed on WIN32 */
-}
-
-bool
-pg_strong_random(void *buf, size_t len)
-{
-	if (hProvider == 0)
-	{
-		if (!CryptAcquireContext(&hProvider,
-								 NULL,
-								 MS_DEF_PROV,
-								 PROV_RSA_FULL,
-								 CRYPT_VERIFYCONTEXT | CRYPT_SILENT))
-		{
-			/*
-			 * On failure, set back to 0 in case the value was for some reason
-			 * modified.
-			 */
-			hProvider = 0;
-		}
-	}
-	/* Re-check in case we just retrieved the provider */
-	if (hProvider != 0)
-	{
-		if (CryptGenRandom(hProvider, len, buf))
-			return true;
-	}
-	return false;
-}
-
-#else							/* not USE_OPENSSL or WIN32 */
-
-/*
- * Without OpenSSL or Win32 support, just read /dev/urandom ourselves.
- */
-
-void
-pg_strong_random_init(void)
-{
-	/* No initialization needed */
-}
-
-bool
-pg_strong_random(void *buf, size_t len)
-{
-	int			f;
-	char	   *p = buf;
-	ssize_t		res;
-
-	f = open("/dev/urandom", O_RDONLY, 0);
-	if (f == -1)
-		return false;
-
-	while (len)
-	{
-		res = read(f, p, len);
-		if (res <= 0)
-		{
-			if (errno == EINTR)
-				continue;		/* interrupted by signal, just retry */
-
-			close(f);
-			return false;
-		}
-
-		p += res;
-		len -= res;
-	}
-
-	close(f);
-	return true;
-}
-#endif
diff --git a/contrib/libs/libpq/src/port/pgcheckdir.c b/contrib/libs/libpq/src/port/pgcheckdir.c
deleted file mode 100644
index 94aa40ca8f..0000000000
--- a/contrib/libs/libpq/src/port/pgcheckdir.c
+++ /dev/null
@@ -1,92 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * pgcheckdir.c
- *
- * A simple subroutine to check whether a directory exists and is empty or not.
- * Useful in both initdb and the backend.
- *
- * Portions Copyright (c) 1996-2023, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- * IDENTIFICATION
- *		src/port/pgcheckdir.c
- *-------------------------------------------------------------------------
- */
-
-#include "c.h"
-
-#include <dirent.h>
-
-
-/*
- * Test to see if a directory exists and is empty or not.
- *
- * Returns:
- *		0 if nonexistent
- *		1 if exists and empty
- *		2 if exists and contains _only_ dot files
- *		3 if exists and contains a mount point
- *		4 if exists and not empty
- *		-1 if trouble accessing directory (errno reflects the error)
- */
-int
-pg_check_dir(const char *dir)
-{
-	int			result = 1;
-	DIR		   *chkdir;
-	struct dirent *file;
-	bool		dot_found = false;
-	bool		mount_found = false;
-	int			readdir_errno;
-
-	chkdir = opendir(dir);
-	if (chkdir == NULL)
-		return (errno == ENOENT) ? 0 : -1;
-
-	while (errno = 0, (file = readdir(chkdir)) != NULL)
-	{
-		if (strcmp(".", file->d_name) == 0 ||
-			strcmp("..", file->d_name) == 0)
-		{
-			/* skip this and parent directory */
-			continue;
-		}
-#ifndef WIN32
-		/* file starts with "." */
-		else if (file->d_name[0] == '.')
-		{
-			dot_found = true;
-		}
-		/* lost+found directory */
-		else if (strcmp("lost+found", file->d_name) == 0)
-		{
-			mount_found = true;
-		}
-#endif
-		else
-		{
-			result = 4;			/* not empty */
-			break;
-		}
-	}
-
-	if (errno)
-		result = -1;			/* some kind of I/O error? */
-
-	/* Close chkdir and avoid overwriting the readdir errno on success */
-	readdir_errno = errno;
-	if (closedir(chkdir))
-		result = -1;			/* error executing closedir */
-	else
-		errno = readdir_errno;
-
-	/* We report on mount point if we find a lost+found directory */
-	if (result == 1 && mount_found)
-		result = 3;
-
-	/* We report on dot-files if we _only_ find dot files */
-	if (result == 1 && dot_found)
-		result = 2;
-
-	return result;
-}
diff --git a/contrib/libs/libpq/src/port/pgmkdirp.c b/contrib/libs/libpq/src/port/pgmkdirp.c
deleted file mode 100644
index d943559760..0000000000
--- a/contrib/libs/libpq/src/port/pgmkdirp.c
+++ /dev/null
@@ -1,148 +0,0 @@
-/*
- * This is adapted from FreeBSD's src/bin/mkdir/mkdir.c, which bears
- * the following copyright notice:
- *
- * Copyright (c) 1983, 1992, 1993
- *	The Regents of the University of California.  All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *	  notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *	  notice, this list of conditions and the following disclaimer in the
- *	  documentation and/or other materials provided with the distribution.
- * 4. Neither the name of the University nor the names of its contributors
- *	  may be used to endorse or promote products derived from this software
- *	  without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#include "c.h"
-
-#include <sys/stat.h>
-
-
-/*
- * pg_mkdir_p --- create a directory and, if necessary, parent directories
- *
- * This is equivalent to "mkdir -p" except we don't complain if the target
- * directory already exists.
- *
- * We assume the path is in canonical form, i.e., uses / as the separator.
- *
- * omode is the file permissions bits for the target directory.  Note that any
- * parent directories that have to be created get permissions according to the
- * prevailing umask, but with u+wx forced on to ensure we can create there.
- * (We declare omode as int, not mode_t, to minimize dependencies for port.h.)
- *
- * Returns 0 on success, -1 (with errno set) on failure.
- *
- * Note that on failure, the path arg has been modified to show the particular
- * directory level we had problems with.
- */
-int
-pg_mkdir_p(char *path, int omode)
-{
-	struct stat sb;
-	mode_t		numask,
-				oumask;
-	int			last,
-				retval;
-	char	   *p;
-
-	retval = 0;
-	p = path;
-
-#ifdef WIN32
-	/* skip network and drive specifiers for win32 */
-	if (strlen(p) >= 2)
-	{
-		if (p[0] == '/' && p[1] == '/')
-		{
-			/* network drive */
-			p = strstr(p + 2, "/");
-			if (p == NULL)
-			{
-				errno = EINVAL;
-				return -1;
-			}
-		}
-		else if (p[1] == ':' &&
-				 ((p[0] >= 'a' && p[0] <= 'z') ||
-				  (p[0] >= 'A' && p[0] <= 'Z')))
-		{
-			/* local drive */
-			p += 2;
-		}
-	}
-#endif
-
-	/*
-	 * POSIX 1003.2: For each dir operand that does not name an existing
-	 * directory, effects equivalent to those caused by the following command
-	 * shall occur:
-	 *
-	 * mkdir -p -m $(umask -S),u+wx $(dirname dir) && mkdir [-m mode] dir
-	 *
-	 * We change the user's umask and then restore it, instead of doing
-	 * chmod's.  Note we assume umask() can't change errno.
-	 */
-	oumask = umask(0);
-	numask = oumask & ~(S_IWUSR | S_IXUSR);
-	(void) umask(numask);
-
-	if (p[0] == '/')			/* Skip leading '/'. */
-		++p;
-	for (last = 0; !last; ++p)
-	{
-		if (p[0] == '\0')
-			last = 1;
-		else if (p[0] != '/')
-			continue;
-		*p = '\0';
-		if (!last && p[1] == '\0')
-			last = 1;
-
-		if (last)
-			(void) umask(oumask);
-
-		/* check for pre-existing directory */
-		if (stat(path, &sb) == 0)
-		{
-			if (!S_ISDIR(sb.st_mode))
-			{
-				if (last)
-					errno = EEXIST;
-				else
-					errno = ENOTDIR;
-				retval = -1;
-				break;
-			}
-		}
-		else if (mkdir(path, last ? omode : S_IRWXU | S_IRWXG | S_IRWXO) < 0)
-		{
-			retval = -1;
-			break;
-		}
-		if (!last)
-			*p = '/';
-	}
-
-	/* ensure we restored umask */
-	(void) umask(oumask);
-
-	return retval;
-}
diff --git a/contrib/libs/libpq/src/port/pgsleep.c b/contrib/libs/libpq/src/port/pgsleep.c
deleted file mode 100644
index a1bcd78e4b..0000000000
--- a/contrib/libs/libpq/src/port/pgsleep.c
+++ /dev/null
@@ -1,57 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * pgsleep.c
- *	   Portable delay handling.
- *
- *
- * Portions Copyright (c) 1996-2023, PostgreSQL Global Development Group
- *
- * src/port/pgsleep.c
- *
- *-------------------------------------------------------------------------
- */
-#include "c.h"
-
-#include <time.h>
-
-/*
- * In a Windows backend, we don't use this implementation, but rather
- * the signal-aware version in src/backend/port/win32/signal.c.
- */
-#if defined(FRONTEND) || !defined(WIN32)
-
-/*
- * pg_usleep --- delay the specified number of microseconds.
- *
- * NOTE: Although the delay is specified in microseconds, older Unixen and
- * Windows use periodic kernel ticks to wake up, which might increase the delay
- * time significantly.  We've observed delay increases as large as 20
- * milliseconds on supported platforms.
- *
- * On machines where "long" is 32 bits, the maximum delay is ~2000 seconds.
- *
- * CAUTION: It's not a good idea to use long sleeps in the backend.  They will
- * silently return early if a signal is caught, but that doesn't include
- * latches being set on most OSes, and even signal handlers that set MyLatch
- * might happen to run before the sleep begins, allowing the full delay.
- * Better practice is to use WaitLatch() with a timeout, so that backends
- * respond to latches and signals promptly.
- */
-void
-pg_usleep(long microsec)
-{
-	if (microsec > 0)
-	{
-#ifndef WIN32
-		struct timespec delay;
-
-		delay.tv_sec = microsec / 1000000L;
-		delay.tv_nsec = (microsec % 1000000L) * 1000;
-		(void) nanosleep(&delay, NULL);
-#else
-		SleepEx((microsec < 500 ? 1 : (microsec + 500) / 1000), FALSE);
-#endif
-	}
-}
-
-#endif							/* defined(FRONTEND) || !defined(WIN32) */
diff --git a/contrib/libs/libpq/src/port/pgstrcasecmp.c b/contrib/libs/libpq/src/port/pgstrcasecmp.c
deleted file mode 100644
index 27c1546f6f..0000000000
--- a/contrib/libs/libpq/src/port/pgstrcasecmp.c
+++ /dev/null
@@ -1,151 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * pgstrcasecmp.c
- *	   Portable SQL-like case-independent comparisons and conversions.
- *
- * SQL99 specifies Unicode-aware case normalization, which we don't yet
- * have the infrastructure for.  Instead we use tolower() to provide a
- * locale-aware translation.  However, there are some locales where this
- * is not right either (eg, Turkish may do strange things with 'i' and
- * 'I').  Our current compromise is to use tolower() for characters with
- * the high bit set, and use an ASCII-only downcasing for 7-bit
- * characters.
- *
- * NB: this code should match downcase_truncate_identifier() in scansup.c.
- *
- * We also provide strict ASCII-only case conversion functions, which can
- * be used to implement C/POSIX case folding semantics no matter what the
- * C library thinks the locale is.
- *
- *
- * Portions Copyright (c) 1996-2023, PostgreSQL Global Development Group
- *
- * src/port/pgstrcasecmp.c
- *
- *-------------------------------------------------------------------------
- */
-#include "c.h"
-
-#include <ctype.h>
-
-
-/*
- * Case-independent comparison of two null-terminated strings.
- */
-int
-pg_strcasecmp(const char *s1, const char *s2)
-{
-	for (;;)
-	{
-		unsigned char ch1 = (unsigned char) *s1++;
-		unsigned char ch2 = (unsigned char) *s2++;
-
-		if (ch1 != ch2)
-		{
-			if (ch1 >= 'A' && ch1 <= 'Z')
-				ch1 += 'a' - 'A';
-			else if (IS_HIGHBIT_SET(ch1) && isupper(ch1))
-				ch1 = tolower(ch1);
-
-			if (ch2 >= 'A' && ch2 <= 'Z')
-				ch2 += 'a' - 'A';
-			else if (IS_HIGHBIT_SET(ch2) && isupper(ch2))
-				ch2 = tolower(ch2);
-
-			if (ch1 != ch2)
-				return (int) ch1 - (int) ch2;
-		}
-		if (ch1 == 0)
-			break;
-	}
-	return 0;
-}
-
-/*
- * Case-independent comparison of two not-necessarily-null-terminated strings.
- * At most n bytes will be examined from each string.
- */
-int
-pg_strncasecmp(const char *s1, const char *s2, size_t n)
-{
-	while (n-- > 0)
-	{
-		unsigned char ch1 = (unsigned char) *s1++;
-		unsigned char ch2 = (unsigned char) *s2++;
-
-		if (ch1 != ch2)
-		{
-			if (ch1 >= 'A' && ch1 <= 'Z')
-				ch1 += 'a' - 'A';
-			else if (IS_HIGHBIT_SET(ch1) && isupper(ch1))
-				ch1 = tolower(ch1);
-
-			if (ch2 >= 'A' && ch2 <= 'Z')
-				ch2 += 'a' - 'A';
-			else if (IS_HIGHBIT_SET(ch2) && isupper(ch2))
-				ch2 = tolower(ch2);
-
-			if (ch1 != ch2)
-				return (int) ch1 - (int) ch2;
-		}
-		if (ch1 == 0)
-			break;
-	}
-	return 0;
-}
-
-/*
- * Fold a character to upper case.
- *
- * Unlike some versions of toupper(), this is safe to apply to characters
- * that aren't lower case letters.  Note however that the whole thing is
- * a bit bogus for multibyte character sets.
- */
-unsigned char
-pg_toupper(unsigned char ch)
-{
-	if (ch >= 'a' && ch <= 'z')
-		ch += 'A' - 'a';
-	else if (IS_HIGHBIT_SET(ch) && islower(ch))
-		ch = toupper(ch);
-	return ch;
-}
-
-/*
- * Fold a character to lower case.
- *
- * Unlike some versions of tolower(), this is safe to apply to characters
- * that aren't upper case letters.  Note however that the whole thing is
- * a bit bogus for multibyte character sets.
- */
-unsigned char
-pg_tolower(unsigned char ch)
-{
-	if (ch >= 'A' && ch <= 'Z')
-		ch += 'a' - 'A';
-	else if (IS_HIGHBIT_SET(ch) && isupper(ch))
-		ch = tolower(ch);
-	return ch;
-}
-
-/*
- * Fold a character to upper case, following C/POSIX locale rules.
- */
-unsigned char
-pg_ascii_toupper(unsigned char ch)
-{
-	if (ch >= 'a' && ch <= 'z')
-		ch += 'A' - 'a';
-	return ch;
-}
-
-/*
- * Fold a character to lower case, following C/POSIX locale rules.
- */
-unsigned char
-pg_ascii_tolower(unsigned char ch)
-{
-	if (ch >= 'A' && ch <= 'Z')
-		ch += 'a' - 'A';
-	return ch;
-}
diff --git a/contrib/libs/libpq/src/port/pgstrsignal.c b/contrib/libs/libpq/src/port/pgstrsignal.c
deleted file mode 100644
index 7d76d1cca9..0000000000
--- a/contrib/libs/libpq/src/port/pgstrsignal.c
+++ /dev/null
@@ -1,64 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * pgstrsignal.c
- *	  Identify a Unix signal number
- *
- * On platforms compliant with modern POSIX, this just wraps strsignal(3).
- * Elsewhere, we do the best we can.
- *
- * This file is not currently built in MSVC builds, since it's useless
- * on non-Unix platforms.
- *
- * Portions Copyright (c) 1996-2023, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- * IDENTIFICATION
- *	  src/port/pgstrsignal.c
- *
- *-------------------------------------------------------------------------
- */
-
-#include "c.h"
-
-
-/*
- * pg_strsignal
- *
- * Return a string identifying the given Unix signal number.
- *
- * The result is declared "const char *" because callers should not
- * modify the string.  Note, however, that POSIX does not promise that
- * the string will remain valid across later calls to strsignal().
- *
- * This version guarantees to return a non-NULL pointer, although
- * some platforms' versions of strsignal() reputedly do not.
- *
- * Note that the fallback cases just return constant strings such as
- * "unrecognized signal".  Project style is for callers to print the
- * numeric signal value along with the result of this function, so
- * there's no need to work harder than that.
- */
-const char *
-pg_strsignal(int signum)
-{
-	const char *result;
-
-	/*
-	 * If we have strsignal(3), use that --- but check its result for NULL.
-	 */
-#ifdef HAVE_STRSIGNAL
-	result = strsignal(signum);
-	if (result == NULL)
-		result = "unrecognized signal";
-#else
-
-	/*
-	 * We used to have code here to try to use sys_siglist[] if available.
-	 * However, it seems that all platforms with sys_siglist[] have also had
-	 * strsignal() for many years now, so that was just a waste of code.
-	 */
-	result = "(signal names not available on this platform)";
-#endif
-
-	return result;
-}
diff --git a/contrib/libs/libpq/src/port/pqsignal.c b/contrib/libs/libpq/src/port/pqsignal.c
deleted file mode 100644
index de9ed2c566..0000000000
--- a/contrib/libs/libpq/src/port/pqsignal.c
+++ /dev/null
@@ -1,62 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * pqsignal.c
- *	  reliable BSD-style signal(2) routine stolen from RWW who stole it
- *	  from Stevens...
- *
- * Portions Copyright (c) 1996-2023, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- *
- * IDENTIFICATION
- *	  src/port/pqsignal.c
- *
- *	We now assume that all Unix-oid systems have POSIX sigaction(2)
- *	with support for restartable signals (SA_RESTART).  We used to also
- *	support BSD-style signal(2), but there really shouldn't be anything
- *	out there anymore that doesn't have the POSIX API.
- *
- *	Windows, of course, is resolutely in a class by itself.  In the backend,
- *	we don't use this file at all; src/backend/port/win32/signal.c provides
- *	pqsignal() for the backend environment.  Frontend programs can use
- *	this version of pqsignal() if they wish, but beware that this does
- *	not provide restartable signals on Windows.
- *
- * ------------------------------------------------------------------------
- */
-
-#include "c.h"
-
-#include <signal.h>
-
-#ifndef FRONTEND
-#error #include "libpq/pqsignal.h"
-#endif
-
-/*
- * Set up a signal handler, with SA_RESTART, for signal "signo"
- *
- * Returns the previous handler.
- */
-pqsigfunc
-pqsignal(int signo, pqsigfunc func)
-{
-#if !(defined(WIN32) && defined(FRONTEND))
-	struct sigaction act,
-				oact;
-
-	act.sa_handler = func;
-	sigemptyset(&act.sa_mask);
-	act.sa_flags = SA_RESTART;
-#ifdef SA_NOCLDSTOP
-	if (signo == SIGCHLD)
-		act.sa_flags |= SA_NOCLDSTOP;
-#endif
-	if (sigaction(signo, &act, &oact) < 0)
-		return SIG_ERR;
-	return oact.sa_handler;
-#else
-	/* Forward to Windows native signal system. */
-	return signal(signo, func);
-#endif
-}
diff --git a/contrib/libs/libpq/src/port/pthread-win32.h b/contrib/libs/libpq/src/port/pthread-win32.h
deleted file mode 100644
index 97ccc17a12..0000000000
--- a/contrib/libs/libpq/src/port/pthread-win32.h
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
- * src/port/pthread-win32.h
- */
-#ifndef __PTHREAD_H
-#define __PTHREAD_H
-
-typedef ULONG pthread_key_t;
-typedef CRITICAL_SECTION *pthread_mutex_t;
-typedef int pthread_once_t;
-
-DWORD		pthread_self(void);
-
-void		pthread_setspecific(pthread_key_t, void *);
-void	   *pthread_getspecific(pthread_key_t);
-
-int			pthread_mutex_init(pthread_mutex_t *, void *attr);
-int			pthread_mutex_lock(pthread_mutex_t *);
-
-/* blocking */
-int			pthread_mutex_unlock(pthread_mutex_t *);
-
-#endif
diff --git a/contrib/libs/libpq/src/port/qsort.c b/contrib/libs/libpq/src/port/qsort.c
deleted file mode 100644
index 7879e6cd56..0000000000
--- a/contrib/libs/libpq/src/port/qsort.c
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
- *	qsort.c: standard quicksort algorithm
- */
-
-#include "c.h"
-
-#define ST_SORT pg_qsort
-#define ST_ELEMENT_TYPE_VOID
-#define ST_COMPARE_RUNTIME_POINTER
-#define ST_SCOPE
-#define ST_DECLARE
-#define ST_DEFINE
-#include "lib/sort_template.h"
-
-/*
- * qsort comparator wrapper for strcmp.
- */
-int
-pg_qsort_strcmp(const void *a, const void *b)
-{
-	return strcmp(*(const char *const *) a, *(const char *const *) b);
-}
diff --git a/contrib/libs/libpq/src/port/qsort_arg.c b/contrib/libs/libpq/src/port/qsort_arg.c
deleted file mode 100644
index fa7e11a3b8..0000000000
--- a/contrib/libs/libpq/src/port/qsort_arg.c
+++ /dev/null
@@ -1,14 +0,0 @@
-/*
- *	qsort_arg.c: qsort with a passthrough "void *" argument
- */
-
-#include "c.h"
-
-#define ST_SORT qsort_arg
-#define ST_ELEMENT_TYPE_VOID
-#define ST_COMPARATOR_TYPE_NAME qsort_arg_comparator
-#define ST_COMPARE_RUNTIME_POINTER
-#define ST_COMPARE_ARG_TYPE void
-#define ST_SCOPE
-#define ST_DEFINE
-#include "lib/sort_template.h"
diff --git a/contrib/libs/libpq/src/port/quotes.c b/contrib/libs/libpq/src/port/quotes.c
deleted file mode 100644
index a80e88d69b..0000000000
--- a/contrib/libs/libpq/src/port/quotes.c
+++ /dev/null
@@ -1,51 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * quotes.c
- *	  string quoting and escaping functions
- *
- * Portions Copyright (c) 1996-2023, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- *
- * IDENTIFICATION
- *	  src/port/quotes.c
- *
- *-------------------------------------------------------------------------
- */
-
-#include "c.h"
-
-/*
- * Escape (by doubling) any single quotes or backslashes in given string
- *
- * Note: this is used to process postgresql.conf entries and to quote
- * string literals in pg_basebackup for writing the recovery configuration.
- * Since postgresql.conf strings are defined to treat backslashes as escapes,
- * we have to double backslashes here.
- *
- * Since this function is only used for parsing or creating configuration
- * files, we do not care about encoding considerations.
- *
- * Returns a malloced() string that it's the responsibility of the caller
- * to free.
- */
-char *
-escape_single_quotes_ascii(const char *src)
-{
-	int			len = strlen(src),
-				i,
-				j;
-	char	   *result = malloc(len * 2 + 1);
-
-	if (!result)
-		return NULL;
-
-	for (i = 0, j = 0; i < len; i++)
-	{
-		if (SQL_STR_DOUBLE(src[i], true))
-			result[j++] = src[i];
-		result[j++] = src[i];
-	}
-	result[j] = '\0';
-	return result;
-}
diff --git a/contrib/libs/libpq/src/port/snprintf.c b/contrib/libs/libpq/src/port/snprintf.c
deleted file mode 100644
index e3e316e049..0000000000
--- a/contrib/libs/libpq/src/port/snprintf.c
+++ /dev/null
@@ -1,1535 +0,0 @@
-/*
- * Copyright (c) 1983, 1995, 1996 Eric P. Allman
- * Copyright (c) 1988, 1993
- *	The Regents of the University of California.  All rights reserved.
- * Portions Copyright (c) 1996-2023, PostgreSQL Global Development Group
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *	  notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *	  notice, this list of conditions and the following disclaimer in the
- *	  documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the University nor the names of its contributors
- *	  may be used to endorse or promote products derived from this software
- *	  without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * src/port/snprintf.c
- */
-
-#include "c.h"
-
-#include <math.h>
-
-/*
- * We used to use the platform's NL_ARGMAX here, but that's a bad idea,
- * first because the point of this module is to remove platform dependencies
- * not perpetuate them, and second because some platforms use ridiculously
- * large values, leading to excessive stack consumption in dopr().
- */
-#define PG_NL_ARGMAX 31
-
-
-/*
- *	SNPRINTF, VSNPRINTF and friends
- *
- * These versions have been grabbed off the net.  They have been
- * cleaned up to compile properly and support for most of the C99
- * specification has been added.  Remaining unimplemented features are:
- *
- * 1. No locale support: the radix character is always '.' and the '
- * (single quote) format flag is ignored.
- *
- * 2. No support for the "%n" format specification.
- *
- * 3. No support for wide characters ("lc" and "ls" formats).
- *
- * 4. No support for "long double" ("Lf" and related formats).
- *
- * 5. Space and '#' flags are not implemented.
- *
- * In addition, we support some extensions over C99:
- *
- * 1. Argument order control through "%n$" and "*n$", as required by POSIX.
- *
- * 2. "%m" expands to the value of strerror(errno), where errno is the
- * value that variable had at the start of the call.  This is a glibc
- * extension, but a very useful one.
- *
- *
- * Historically the result values of sprintf/snprintf varied across platforms.
- * This implementation now follows the C99 standard:
- *
- * 1. -1 is returned if an error is detected in the format string, or if
- * a write to the target stream fails (as reported by fwrite).  Note that
- * overrunning snprintf's target buffer is *not* an error.
- *
- * 2. For successful writes to streams, the actual number of bytes written
- * to the stream is returned.
- *
- * 3. For successful sprintf/snprintf, the number of bytes that would have
- * been written to an infinite-size buffer (excluding the trailing '\0')
- * is returned.  snprintf will truncate its output to fit in the buffer
- * (ensuring a trailing '\0' unless count == 0), but this is not reflected
- * in the function result.
- *
- * snprintf buffer overrun can be detected by checking for function result
- * greater than or equal to the supplied count.
- */
-
-/**************************************************************
- * Original:
- * Patrick Powell Tue Apr 11 09:48:21 PDT 1995
- * A bombproof version of doprnt (dopr) included.
- * Sigh.  This sort of thing is always nasty do deal with.  Note that
- * the version here does not include floating point. (now it does ... tgl)
- **************************************************************/
-
-/* Prevent recursion */
-#undef	vsnprintf
-#undef	snprintf
-#undef	vsprintf
-#undef	sprintf
-#undef	vfprintf
-#undef	fprintf
-#undef	vprintf
-#undef	printf
-
-/*
- * Info about where the formatted output is going.
- *
- * dopr and subroutines will not write at/past bufend, but snprintf
- * reserves one byte, ensuring it may place the trailing '\0' there.
- *
- * In snprintf, we use nchars to count the number of bytes dropped on the
- * floor due to buffer overrun.  The correct result of snprintf is thus
- * (bufptr - bufstart) + nchars.  (This isn't as inconsistent as it might
- * seem: nchars is the number of emitted bytes that are not in the buffer now,
- * either because we sent them to the stream or because we couldn't fit them
- * into the buffer to begin with.)
- */
-typedef struct
-{
-	char	   *bufptr;			/* next buffer output position */
-	char	   *bufstart;		/* first buffer element */
-	char	   *bufend;			/* last+1 buffer element, or NULL */
-	/* bufend == NULL is for sprintf, where we assume buf is big enough */
-	FILE	   *stream;			/* eventual output destination, or NULL */
-	int			nchars;			/* # chars sent to stream, or dropped */
-	bool		failed;			/* call is a failure; errno is set */
-} PrintfTarget;
-
-/*
- * Info about the type and value of a formatting parameter.  Note that we
- * don't currently support "long double", "wint_t", or "wchar_t *" data,
- * nor the '%n' formatting code; else we'd need more types.  Also, at this
- * level we need not worry about signed vs unsigned values.
- */
-typedef enum
-{
-	ATYPE_NONE = 0,
-	ATYPE_INT,
-	ATYPE_LONG,
-	ATYPE_LONGLONG,
-	ATYPE_DOUBLE,
-	ATYPE_CHARPTR
-} PrintfArgType;
-
-typedef union
-{
-	int			i;
-	long		l;
-	long long	ll;
-	double		d;
-	char	   *cptr;
-} PrintfArgValue;
-
-
-static void flushbuffer(PrintfTarget *target);
-static void dopr(PrintfTarget *target, const char *format, va_list args);
-
-
-/*
- * Externally visible entry points.
- *
- * All of these are just wrappers around dopr().  Note it's essential that
- * they not change the value of "errno" before reaching dopr().
- */
-
-int
-pg_vsnprintf(char *str, size_t count, const char *fmt, va_list args)
-{
-	PrintfTarget target;
-	char		onebyte[1];
-
-	/*
-	 * C99 allows the case str == NULL when count == 0.  Rather than
-	 * special-casing this situation further down, we substitute a one-byte
-	 * local buffer.  Callers cannot tell, since the function result doesn't
-	 * depend on count.
-	 */
-	if (count == 0)
-	{
-		str = onebyte;
-		count = 1;
-	}
-	target.bufstart = target.bufptr = str;
-	target.bufend = str + count - 1;
-	target.stream = NULL;
-	target.nchars = 0;
-	target.failed = false;
-	dopr(&target, fmt, args);
-	*(target.bufptr) = '\0';
-	return target.failed ? -1 : (target.bufptr - target.bufstart
-								 + target.nchars);
-}
-
-int
-pg_snprintf(char *str, size_t count, const char *fmt,...)
-{
-	int			len;
-	va_list		args;
-
-	va_start(args, fmt);
-	len = pg_vsnprintf(str, count, fmt, args);
-	va_end(args);
-	return len;
-}
-
-int
-pg_vsprintf(char *str, const char *fmt, va_list args)
-{
-	PrintfTarget target;
-
-	target.bufstart = target.bufptr = str;
-	target.bufend = NULL;
-	target.stream = NULL;
-	target.nchars = 0;			/* not really used in this case */
-	target.failed = false;
-	dopr(&target, fmt, args);
-	*(target.bufptr) = '\0';
-	return target.failed ? -1 : (target.bufptr - target.bufstart
-								 + target.nchars);
-}
-
-int
-pg_sprintf(char *str, const char *fmt,...)
-{
-	int			len;
-	va_list		args;
-
-	va_start(args, fmt);
-	len = pg_vsprintf(str, fmt, args);
-	va_end(args);
-	return len;
-}
-
-int
-pg_vfprintf(FILE *stream, const char *fmt, va_list args)
-{
-	PrintfTarget target;
-	char		buffer[1024];	/* size is arbitrary */
-
-	if (stream == NULL)
-	{
-		errno = EINVAL;
-		return -1;
-	}
-	target.bufstart = target.bufptr = buffer;
-	target.bufend = buffer + sizeof(buffer);	/* use the whole buffer */
-	target.stream = stream;
-	target.nchars = 0;
-	target.failed = false;
-	dopr(&target, fmt, args);
-	/* dump any remaining buffer contents */
-	flushbuffer(&target);
-	return target.failed ? -1 : target.nchars;
-}
-
-int
-pg_fprintf(FILE *stream, const char *fmt,...)
-{
-	int			len;
-	va_list		args;
-
-	va_start(args, fmt);
-	len = pg_vfprintf(stream, fmt, args);
-	va_end(args);
-	return len;
-}
-
-int
-pg_vprintf(const char *fmt, va_list args)
-{
-	return pg_vfprintf(stdout, fmt, args);
-}
-
-int
-pg_printf(const char *fmt,...)
-{
-	int			len;
-	va_list		args;
-
-	va_start(args, fmt);
-	len = pg_vfprintf(stdout, fmt, args);
-	va_end(args);
-	return len;
-}
-
-/*
- * Attempt to write the entire buffer to target->stream; discard the entire
- * buffer in any case.  Call this only when target->stream is defined.
- */
-static void
-flushbuffer(PrintfTarget *target)
-{
-	size_t		nc = target->bufptr - target->bufstart;
-
-	/*
-	 * Don't write anything if we already failed; this is to ensure we
-	 * preserve the original failure's errno.
-	 */
-	if (!target->failed && nc > 0)
-	{
-		size_t		written;
-
-		written = fwrite(target->bufstart, 1, nc, target->stream);
-		target->nchars += written;
-		if (written != nc)
-			target->failed = true;
-	}
-	target->bufptr = target->bufstart;
-}
-
-
-static bool find_arguments(const char *format, va_list args,
-						   PrintfArgValue *argvalues);
-static void fmtstr(const char *value, int leftjust, int minlen, int maxwidth,
-				   int pointflag, PrintfTarget *target);
-static void fmtptr(const void *value, PrintfTarget *target);
-static void fmtint(long long value, char type, int forcesign,
-				   int leftjust, int minlen, int zpad, int precision, int pointflag,
-				   PrintfTarget *target);
-static void fmtchar(int value, int leftjust, int minlen, PrintfTarget *target);
-static void fmtfloat(double value, char type, int forcesign,
-					 int leftjust, int minlen, int zpad, int precision, int pointflag,
-					 PrintfTarget *target);
-static void dostr(const char *str, int slen, PrintfTarget *target);
-static void dopr_outch(int c, PrintfTarget *target);
-static void dopr_outchmulti(int c, int slen, PrintfTarget *target);
-static int	adjust_sign(int is_negative, int forcesign, int *signvalue);
-static int	compute_padlen(int minlen, int vallen, int leftjust);
-static void leading_pad(int zpad, int signvalue, int *padlen,
-						PrintfTarget *target);
-static void trailing_pad(int padlen, PrintfTarget *target);
-
-/*
- * If strchrnul exists (it's a glibc-ism), it's a good bit faster than the
- * equivalent manual loop.  If it doesn't exist, provide a replacement.
- *
- * Note: glibc declares this as returning "char *", but that would require
- * casting away const internally, so we don't follow that detail.
- */
-#ifndef HAVE_STRCHRNUL
-
-static inline const char *
-strchrnul(const char *s, int c)
-{
-	while (*s != '\0' && *s != c)
-		s++;
-	return s;
-}
-
-#else
-
-/*
- * glibc's <string.h> declares strchrnul only if _GNU_SOURCE is defined.
- * While we typically use that on glibc platforms, configure will set
- * HAVE_STRCHRNUL whether it's used or not.  Fill in the missing declaration
- * so that this file will compile cleanly with or without _GNU_SOURCE.
- */
-#ifndef _GNU_SOURCE
-extern char *strchrnul(const char *s, int c);
-#endif
-
-#endif							/* HAVE_STRCHRNUL */
-
-
-/*
- * dopr(): the guts of *printf for all cases.
- */
-static void
-dopr(PrintfTarget *target, const char *format, va_list args)
-{
-	int			save_errno = errno;
-	const char *first_pct = NULL;
-	int			ch;
-	bool		have_dollar;
-	bool		have_star;
-	bool		afterstar;
-	int			accum;
-	int			longlongflag;
-	int			longflag;
-	int			pointflag;
-	int			leftjust;
-	int			fieldwidth;
-	int			precision;
-	int			zpad;
-	int			forcesign;
-	int			fmtpos;
-	int			cvalue;
-	long long	numvalue;
-	double		fvalue;
-	const char *strvalue;
-	PrintfArgValue argvalues[PG_NL_ARGMAX + 1];
-
-	/*
-	 * Initially, we suppose the format string does not use %n$.  The first
-	 * time we come to a conversion spec that has that, we'll call
-	 * find_arguments() to check for consistent use of %n$ and fill the
-	 * argvalues array with the argument values in the correct order.
-	 */
-	have_dollar = false;
-
-	while (*format != '\0')
-	{
-		/* Locate next conversion specifier */
-		if (*format != '%')
-		{
-			/* Scan to next '%' or end of string */
-			const char *next_pct = strchrnul(format + 1, '%');
-
-			/* Dump literal data we just scanned over */
-			dostr(format, next_pct - format, target);
-			if (target->failed)
-				break;
-
-			if (*next_pct == '\0')
-				break;
-			format = next_pct;
-		}
-
-		/*
-		 * Remember start of first conversion spec; if we find %n$, then it's
-		 * sufficient for find_arguments() to start here, without rescanning
-		 * earlier literal text.
-		 */
-		if (first_pct == NULL)
-			first_pct = format;
-
-		/* Process conversion spec starting at *format */
-		format++;
-
-		/* Fast path for conversion spec that is exactly %s */
-		if (*format == 's')
-		{
-			format++;
-			strvalue = va_arg(args, char *);
-			if (strvalue == NULL)
-				strvalue = "(null)";
-			dostr(strvalue, strlen(strvalue), target);
-			if (target->failed)
-				break;
-			continue;
-		}
-
-		fieldwidth = precision = zpad = leftjust = forcesign = 0;
-		longflag = longlongflag = pointflag = 0;
-		fmtpos = accum = 0;
-		have_star = afterstar = false;
-nextch2:
-		ch = *format++;
-		switch (ch)
-		{
-			case '-':
-				leftjust = 1;
-				goto nextch2;
-			case '+':
-				forcesign = 1;
-				goto nextch2;
-			case '0':
-				/* set zero padding if no nonzero digits yet */
-				if (accum == 0 && !pointflag)
-					zpad = '0';
-				/* FALL THRU */
-			case '1':
-			case '2':
-			case '3':
-			case '4':
-			case '5':
-			case '6':
-			case '7':
-			case '8':
-			case '9':
-				accum = accum * 10 + (ch - '0');
-				goto nextch2;
-			case '.':
-				if (have_star)
-					have_star = false;
-				else
-					fieldwidth = accum;
-				pointflag = 1;
-				accum = 0;
-				goto nextch2;
-			case '*':
-				if (have_dollar)
-				{
-					/*
-					 * We'll process value after reading n$.  Note it's OK to
-					 * assume have_dollar is set correctly, because in a valid
-					 * format string the initial % must have had n$ if * does.
-					 */
-					afterstar = true;
-				}
-				else
-				{
-					/* fetch and process value now */
-					int			starval = va_arg(args, int);
-
-					if (pointflag)
-					{
-						precision = starval;
-						if (precision < 0)
-						{
-							precision = 0;
-							pointflag = 0;
-						}
-					}
-					else
-					{
-						fieldwidth = starval;
-						if (fieldwidth < 0)
-						{
-							leftjust = 1;
-							fieldwidth = -fieldwidth;
-						}
-					}
-				}
-				have_star = true;
-				accum = 0;
-				goto nextch2;
-			case '$':
-				/* First dollar sign? */
-				if (!have_dollar)
-				{
-					/* Yup, so examine all conversion specs in format */
-					if (!find_arguments(first_pct, args, argvalues))
-						goto bad_format;
-					have_dollar = true;
-				}
-				if (afterstar)
-				{
-					/* fetch and process star value */
-					int			starval = argvalues[accum].i;
-
-					if (pointflag)
-					{
-						precision = starval;
-						if (precision < 0)
-						{
-							precision = 0;
-							pointflag = 0;
-						}
-					}
-					else
-					{
-						fieldwidth = starval;
-						if (fieldwidth < 0)
-						{
-							leftjust = 1;
-							fieldwidth = -fieldwidth;
-						}
-					}
-					afterstar = false;
-				}
-				else
-					fmtpos = accum;
-				accum = 0;
-				goto nextch2;
-			case 'l':
-				if (longflag)
-					longlongflag = 1;
-				else
-					longflag = 1;
-				goto nextch2;
-			case 'z':
-#if SIZEOF_SIZE_T == 8
-#ifdef HAVE_LONG_INT_64
-				longflag = 1;
-#elif defined(HAVE_LONG_LONG_INT_64)
-				longlongflag = 1;
-#else
-#error "Don't know how to print 64bit integers"
-#endif
-#else
-				/* assume size_t is same size as int */
-#endif
-				goto nextch2;
-			case 'h':
-			case '\'':
-				/* ignore these */
-				goto nextch2;
-			case 'd':
-			case 'i':
-				if (!have_star)
-				{
-					if (pointflag)
-						precision = accum;
-					else
-						fieldwidth = accum;
-				}
-				if (have_dollar)
-				{
-					if (longlongflag)
-						numvalue = argvalues[fmtpos].ll;
-					else if (longflag)
-						numvalue = argvalues[fmtpos].l;
-					else
-						numvalue = argvalues[fmtpos].i;
-				}
-				else
-				{
-					if (longlongflag)
-						numvalue = va_arg(args, long long);
-					else if (longflag)
-						numvalue = va_arg(args, long);
-					else
-						numvalue = va_arg(args, int);
-				}
-				fmtint(numvalue, ch, forcesign, leftjust, fieldwidth, zpad,
-					   precision, pointflag, target);
-				break;
-			case 'o':
-			case 'u':
-			case 'x':
-			case 'X':
-				if (!have_star)
-				{
-					if (pointflag)
-						precision = accum;
-					else
-						fieldwidth = accum;
-				}
-				if (have_dollar)
-				{
-					if (longlongflag)
-						numvalue = (unsigned long long) argvalues[fmtpos].ll;
-					else if (longflag)
-						numvalue = (unsigned long) argvalues[fmtpos].l;
-					else
-						numvalue = (unsigned int) argvalues[fmtpos].i;
-				}
-				else
-				{
-					if (longlongflag)
-						numvalue = (unsigned long long) va_arg(args, long long);
-					else if (longflag)
-						numvalue = (unsigned long) va_arg(args, long);
-					else
-						numvalue = (unsigned int) va_arg(args, int);
-				}
-				fmtint(numvalue, ch, forcesign, leftjust, fieldwidth, zpad,
-					   precision, pointflag, target);
-				break;
-			case 'c':
-				if (!have_star)
-				{
-					if (pointflag)
-						precision = accum;
-					else
-						fieldwidth = accum;
-				}
-				if (have_dollar)
-					cvalue = (unsigned char) argvalues[fmtpos].i;
-				else
-					cvalue = (unsigned char) va_arg(args, int);
-				fmtchar(cvalue, leftjust, fieldwidth, target);
-				break;
-			case 's':
-				if (!have_star)
-				{
-					if (pointflag)
-						precision = accum;
-					else
-						fieldwidth = accum;
-				}
-				if (have_dollar)
-					strvalue = argvalues[fmtpos].cptr;
-				else
-					strvalue = va_arg(args, char *);
-				/* If string is NULL, silently substitute "(null)" */
-				if (strvalue == NULL)
-					strvalue = "(null)";
-				fmtstr(strvalue, leftjust, fieldwidth, precision, pointflag,
-					   target);
-				break;
-			case 'p':
-				/* fieldwidth/leftjust are ignored ... */
-				if (have_dollar)
-					strvalue = argvalues[fmtpos].cptr;
-				else
-					strvalue = va_arg(args, char *);
-				fmtptr((const void *) strvalue, target);
-				break;
-			case 'e':
-			case 'E':
-			case 'f':
-			case 'g':
-			case 'G':
-				if (!have_star)
-				{
-					if (pointflag)
-						precision = accum;
-					else
-						fieldwidth = accum;
-				}
-				if (have_dollar)
-					fvalue = argvalues[fmtpos].d;
-				else
-					fvalue = va_arg(args, double);
-				fmtfloat(fvalue, ch, forcesign, leftjust,
-						 fieldwidth, zpad,
-						 precision, pointflag,
-						 target);
-				break;
-			case 'm':
-				{
-					char		errbuf[PG_STRERROR_R_BUFLEN];
-					const char *errm = strerror_r(save_errno,
-												  errbuf, sizeof(errbuf));
-
-					dostr(errm, strlen(errm), target);
-				}
-				break;
-			case '%':
-				dopr_outch('%', target);
-				break;
-			default:
-
-				/*
-				 * Anything else --- in particular, '\0' indicating end of
-				 * format string --- is bogus.
-				 */
-				goto bad_format;
-		}
-
-		/* Check for failure after each conversion spec */
-		if (target->failed)
-			break;
-	}
-
-	return;
-
-bad_format:
-	errno = EINVAL;
-	target->failed = true;
-}
-
-/*
- * find_arguments(): sort out the arguments for a format spec with %n$
- *
- * If format is valid, return true and fill argvalues[i] with the value
- * for the conversion spec that has %i$ or *i$.  Else return false.
- */
-static bool
-find_arguments(const char *format, va_list args,
-			   PrintfArgValue *argvalues)
-{
-	int			ch;
-	bool		afterstar;
-	int			accum;
-	int			longlongflag;
-	int			longflag;
-	int			fmtpos;
-	int			i;
-	int			last_dollar = 0;	/* Init to "no dollar arguments known" */
-	PrintfArgType argtypes[PG_NL_ARGMAX + 1] = {0};
-
-	/*
-	 * This loop must accept the same format strings as the one in dopr().
-	 * However, we don't need to analyze them to the same level of detail.
-	 *
-	 * Since we're only called if there's a dollar-type spec somewhere, we can
-	 * fail immediately if we find a non-dollar spec.  Per the C99 standard,
-	 * all argument references in the format string must be one or the other.
-	 */
-	while (*format != '\0')
-	{
-		/* Locate next conversion specifier */
-		if (*format != '%')
-		{
-			/* Unlike dopr, we can just quit if there's no more specifiers */
-			format = strchr(format + 1, '%');
-			if (format == NULL)
-				break;
-		}
-
-		/* Process conversion spec starting at *format */
-		format++;
-		longflag = longlongflag = 0;
-		fmtpos = accum = 0;
-		afterstar = false;
-nextch1:
-		ch = *format++;
-		switch (ch)
-		{
-			case '-':
-			case '+':
-				goto nextch1;
-			case '0':
-			case '1':
-			case '2':
-			case '3':
-			case '4':
-			case '5':
-			case '6':
-			case '7':
-			case '8':
-			case '9':
-				accum = accum * 10 + (ch - '0');
-				goto nextch1;
-			case '.':
-				accum = 0;
-				goto nextch1;
-			case '*':
-				if (afterstar)
-					return false;	/* previous star missing dollar */
-				afterstar = true;
-				accum = 0;
-				goto nextch1;
-			case '$':
-				if (accum <= 0 || accum > PG_NL_ARGMAX)
-					return false;
-				if (afterstar)
-				{
-					if (argtypes[accum] &&
-						argtypes[accum] != ATYPE_INT)
-						return false;
-					argtypes[accum] = ATYPE_INT;
-					last_dollar = Max(last_dollar, accum);
-					afterstar = false;
-				}
-				else
-					fmtpos = accum;
-				accum = 0;
-				goto nextch1;
-			case 'l':
-				if (longflag)
-					longlongflag = 1;
-				else
-					longflag = 1;
-				goto nextch1;
-			case 'z':
-#if SIZEOF_SIZE_T == 8
-#ifdef HAVE_LONG_INT_64
-				longflag = 1;
-#elif defined(HAVE_LONG_LONG_INT_64)
-				longlongflag = 1;
-#else
-#error "Don't know how to print 64bit integers"
-#endif
-#else
-				/* assume size_t is same size as int */
-#endif
-				goto nextch1;
-			case 'h':
-			case '\'':
-				/* ignore these */
-				goto nextch1;
-			case 'd':
-			case 'i':
-			case 'o':
-			case 'u':
-			case 'x':
-			case 'X':
-				if (fmtpos)
-				{
-					PrintfArgType atype;
-
-					if (longlongflag)
-						atype = ATYPE_LONGLONG;
-					else if (longflag)
-						atype = ATYPE_LONG;
-					else
-						atype = ATYPE_INT;
-					if (argtypes[fmtpos] &&
-						argtypes[fmtpos] != atype)
-						return false;
-					argtypes[fmtpos] = atype;
-					last_dollar = Max(last_dollar, fmtpos);
-				}
-				else
-					return false;	/* non-dollar conversion spec */
-				break;
-			case 'c':
-				if (fmtpos)
-				{
-					if (argtypes[fmtpos] &&
-						argtypes[fmtpos] != ATYPE_INT)
-						return false;
-					argtypes[fmtpos] = ATYPE_INT;
-					last_dollar = Max(last_dollar, fmtpos);
-				}
-				else
-					return false;	/* non-dollar conversion spec */
-				break;
-			case 's':
-			case 'p':
-				if (fmtpos)
-				{
-					if (argtypes[fmtpos] &&
-						argtypes[fmtpos] != ATYPE_CHARPTR)
-						return false;
-					argtypes[fmtpos] = ATYPE_CHARPTR;
-					last_dollar = Max(last_dollar, fmtpos);
-				}
-				else
-					return false;	/* non-dollar conversion spec */
-				break;
-			case 'e':
-			case 'E':
-			case 'f':
-			case 'g':
-			case 'G':
-				if (fmtpos)
-				{
-					if (argtypes[fmtpos] &&
-						argtypes[fmtpos] != ATYPE_DOUBLE)
-						return false;
-					argtypes[fmtpos] = ATYPE_DOUBLE;
-					last_dollar = Max(last_dollar, fmtpos);
-				}
-				else
-					return false;	/* non-dollar conversion spec */
-				break;
-			case 'm':
-			case '%':
-				break;
-			default:
-				return false;	/* bogus format string */
-		}
-
-		/*
-		 * If we finish the spec with afterstar still set, there's a
-		 * non-dollar star in there.
-		 */
-		if (afterstar)
-			return false;		/* non-dollar conversion spec */
-	}
-
-	/*
-	 * Format appears valid so far, so collect the arguments in physical
-	 * order.  (Since we rejected any non-dollar specs that would have
-	 * collected arguments, we know that dopr() hasn't collected any yet.)
-	 */
-	for (i = 1; i <= last_dollar; i++)
-	{
-		switch (argtypes[i])
-		{
-			case ATYPE_NONE:
-				return false;
-			case ATYPE_INT:
-				argvalues[i].i = va_arg(args, int);
-				break;
-			case ATYPE_LONG:
-				argvalues[i].l = va_arg(args, long);
-				break;
-			case ATYPE_LONGLONG:
-				argvalues[i].ll = va_arg(args, long long);
-				break;
-			case ATYPE_DOUBLE:
-				argvalues[i].d = va_arg(args, double);
-				break;
-			case ATYPE_CHARPTR:
-				argvalues[i].cptr = va_arg(args, char *);
-				break;
-		}
-	}
-
-	return true;
-}
-
-static void
-fmtstr(const char *value, int leftjust, int minlen, int maxwidth,
-	   int pointflag, PrintfTarget *target)
-{
-	int			padlen,
-				vallen;			/* amount to pad */
-
-	/*
-	 * If a maxwidth (precision) is specified, we must not fetch more bytes
-	 * than that.
-	 */
-	if (pointflag)
-		vallen = strnlen(value, maxwidth);
-	else
-		vallen = strlen(value);
-
-	padlen = compute_padlen(minlen, vallen, leftjust);
-
-	if (padlen > 0)
-	{
-		dopr_outchmulti(' ', padlen, target);
-		padlen = 0;
-	}
-
-	dostr(value, vallen, target);
-
-	trailing_pad(padlen, target);
-}
-
-static void
-fmtptr(const void *value, PrintfTarget *target)
-{
-	int			vallen;
-	char		convert[64];
-
-	/* we rely on regular C library's snprintf to do the basic conversion */
-	vallen = snprintf(convert, sizeof(convert), "%p", value);
-	if (vallen < 0)
-		target->failed = true;
-	else
-		dostr(convert, vallen, target);
-}
-
-static void
-fmtint(long long value, char type, int forcesign, int leftjust,
-	   int minlen, int zpad, int precision, int pointflag,
-	   PrintfTarget *target)
-{
-	unsigned long long uvalue;
-	int			base;
-	int			dosign;
-	const char *cvt = "0123456789abcdef";
-	int			signvalue = 0;
-	char		convert[64];
-	int			vallen = 0;
-	int			padlen;			/* amount to pad */
-	int			zeropad;		/* extra leading zeroes */
-
-	switch (type)
-	{
-		case 'd':
-		case 'i':
-			base = 10;
-			dosign = 1;
-			break;
-		case 'o':
-			base = 8;
-			dosign = 0;
-			break;
-		case 'u':
-			base = 10;
-			dosign = 0;
-			break;
-		case 'x':
-			base = 16;
-			dosign = 0;
-			break;
-		case 'X':
-			cvt = "0123456789ABCDEF";
-			base = 16;
-			dosign = 0;
-			break;
-		default:
-			return;				/* keep compiler quiet */
-	}
-
-	/* disable MSVC warning about applying unary minus to an unsigned value */
-#ifdef _MSC_VER
-#pragma warning(push)
-#pragma warning(disable: 4146)
-#endif
-	/* Handle +/- */
-	if (dosign && adjust_sign((value < 0), forcesign, &signvalue))
-		uvalue = -(unsigned long long) value;
-	else
-		uvalue = (unsigned long long) value;
-#ifdef _MSC_VER
-#pragma warning(pop)
-#endif
-
-	/*
-	 * SUS: the result of converting 0 with an explicit precision of 0 is no
-	 * characters
-	 */
-	if (value == 0 && pointflag && precision == 0)
-		vallen = 0;
-	else
-	{
-		/*
-		 * Convert integer to string.  We special-case each of the possible
-		 * base values so as to avoid general-purpose divisions.  On most
-		 * machines, division by a fixed constant can be done much more
-		 * cheaply than a general divide.
-		 */
-		if (base == 10)
-		{
-			do
-			{
-				convert[sizeof(convert) - (++vallen)] = cvt[uvalue % 10];
-				uvalue = uvalue / 10;
-			} while (uvalue);
-		}
-		else if (base == 16)
-		{
-			do
-			{
-				convert[sizeof(convert) - (++vallen)] = cvt[uvalue % 16];
-				uvalue = uvalue / 16;
-			} while (uvalue);
-		}
-		else					/* base == 8 */
-		{
-			do
-			{
-				convert[sizeof(convert) - (++vallen)] = cvt[uvalue % 8];
-				uvalue = uvalue / 8;
-			} while (uvalue);
-		}
-	}
-
-	zeropad = Max(0, precision - vallen);
-
-	padlen = compute_padlen(minlen, vallen + zeropad, leftjust);
-
-	leading_pad(zpad, signvalue, &padlen, target);
-
-	if (zeropad > 0)
-		dopr_outchmulti('0', zeropad, target);
-
-	dostr(convert + sizeof(convert) - vallen, vallen, target);
-
-	trailing_pad(padlen, target);
-}
-
-static void
-fmtchar(int value, int leftjust, int minlen, PrintfTarget *target)
-{
-	int			padlen;			/* amount to pad */
-
-	padlen = compute_padlen(minlen, 1, leftjust);
-
-	if (padlen > 0)
-	{
-		dopr_outchmulti(' ', padlen, target);
-		padlen = 0;
-	}
-
-	dopr_outch(value, target);
-
-	trailing_pad(padlen, target);
-}
-
-static void
-fmtfloat(double value, char type, int forcesign, int leftjust,
-		 int minlen, int zpad, int precision, int pointflag,
-		 PrintfTarget *target)
-{
-	int			signvalue = 0;
-	int			prec;
-	int			vallen;
-	char		fmt[8];
-	char		convert[1024];
-	int			zeropadlen = 0; /* amount to pad with zeroes */
-	int			padlen;			/* amount to pad with spaces */
-
-	/*
-	 * We rely on the regular C library's snprintf to do the basic conversion,
-	 * then handle padding considerations here.
-	 *
-	 * The dynamic range of "double" is about 1E+-308 for IEEE math, and not
-	 * too wildly more than that with other hardware.  In "f" format, snprintf
-	 * could therefore generate at most 308 characters to the left of the
-	 * decimal point; while we need to allow the precision to get as high as
-	 * 308+17 to ensure that we don't truncate significant digits from very
-	 * small values.  To handle both these extremes, we use a buffer of 1024
-	 * bytes and limit requested precision to 350 digits; this should prevent
-	 * buffer overrun even with non-IEEE math.  If the original precision
-	 * request was more than 350, separately pad with zeroes.
-	 *
-	 * We handle infinities and NaNs specially to ensure platform-independent
-	 * output.
-	 */
-	if (precision < 0)			/* cover possible overflow of "accum" */
-		precision = 0;
-	prec = Min(precision, 350);
-
-	if (isnan(value))
-	{
-		strcpy(convert, "NaN");
-		vallen = 3;
-		/* no zero padding, regardless of precision spec */
-	}
-	else
-	{
-		/*
-		 * Handle sign (NaNs have no sign, so we don't do this in the case
-		 * above).  "value < 0.0" will not be true for IEEE minus zero, so we
-		 * detect that by looking for the case where value equals 0.0
-		 * according to == but not according to memcmp.
-		 */
-		static const double dzero = 0.0;
-
-		if (adjust_sign((value < 0.0 ||
-						 (value == 0.0 &&
-						  memcmp(&value, &dzero, sizeof(double)) != 0)),
-						forcesign, &signvalue))
-			value = -value;
-
-		if (isinf(value))
-		{
-			strcpy(convert, "Infinity");
-			vallen = 8;
-			/* no zero padding, regardless of precision spec */
-		}
-		else if (pointflag)
-		{
-			zeropadlen = precision - prec;
-			fmt[0] = '%';
-			fmt[1] = '.';
-			fmt[2] = '*';
-			fmt[3] = type;
-			fmt[4] = '\0';
-			vallen = snprintf(convert, sizeof(convert), fmt, prec, value);
-		}
-		else
-		{
-			fmt[0] = '%';
-			fmt[1] = type;
-			fmt[2] = '\0';
-			vallen = snprintf(convert, sizeof(convert), fmt, value);
-		}
-		if (vallen < 0)
-			goto fail;
-
-		/*
-		 * Windows, alone among our supported platforms, likes to emit
-		 * three-digit exponent fields even when two digits would do.  Hack
-		 * such results to look like the way everyone else does it.
-		 */
-#ifdef WIN32
-		if (vallen >= 6 &&
-			convert[vallen - 5] == 'e' &&
-			convert[vallen - 3] == '0')
-		{
-			convert[vallen - 3] = convert[vallen - 2];
-			convert[vallen - 2] = convert[vallen - 1];
-			vallen--;
-		}
-#endif
-	}
-
-	padlen = compute_padlen(minlen, vallen + zeropadlen, leftjust);
-
-	leading_pad(zpad, signvalue, &padlen, target);
-
-	if (zeropadlen > 0)
-	{
-		/* If 'e' or 'E' format, inject zeroes before the exponent */
-		char	   *epos = strrchr(convert, 'e');
-
-		if (!epos)
-			epos = strrchr(convert, 'E');
-		if (epos)
-		{
-			/* pad before exponent */
-			dostr(convert, epos - convert, target);
-			dopr_outchmulti('0', zeropadlen, target);
-			dostr(epos, vallen - (epos - convert), target);
-		}
-		else
-		{
-			/* no exponent, pad after the digits */
-			dostr(convert, vallen, target);
-			dopr_outchmulti('0', zeropadlen, target);
-		}
-	}
-	else
-	{
-		/* no zero padding, just emit the number as-is */
-		dostr(convert, vallen, target);
-	}
-
-	trailing_pad(padlen, target);
-	return;
-
-fail:
-	target->failed = true;
-}
-
-/*
- * Nonstandard entry point to print a double value efficiently.
- *
- * This is approximately equivalent to strfromd(), but has an API more
- * adapted to what float8out() wants.  The behavior is like snprintf()
- * with a format of "%.ng", where n is the specified precision.
- * However, the target buffer must be nonempty (i.e. count > 0), and
- * the precision is silently bounded to a sane range.
- */
-int
-pg_strfromd(char *str, size_t count, int precision, double value)
-{
-	PrintfTarget target;
-	int			signvalue = 0;
-	int			vallen;
-	char		fmt[8];
-	char		convert[64];
-
-	/* Set up the target like pg_snprintf, but require nonempty buffer */
-	Assert(count > 0);
-	target.bufstart = target.bufptr = str;
-	target.bufend = str + count - 1;
-	target.stream = NULL;
-	target.nchars = 0;
-	target.failed = false;
-
-	/*
-	 * We bound precision to a reasonable range; the combination of this and
-	 * the knowledge that we're using "g" format without padding allows the
-	 * convert[] buffer to be reasonably small.
-	 */
-	if (precision < 1)
-		precision = 1;
-	else if (precision > 32)
-		precision = 32;
-
-	/*
-	 * The rest is just an inlined version of the fmtfloat() logic above,
-	 * simplified using the knowledge that no padding is wanted.
-	 */
-	if (isnan(value))
-	{
-		strcpy(convert, "NaN");
-		vallen = 3;
-	}
-	else
-	{
-		static const double dzero = 0.0;
-
-		if (value < 0.0 ||
-			(value == 0.0 &&
-			 memcmp(&value, &dzero, sizeof(double)) != 0))
-		{
-			signvalue = '-';
-			value = -value;
-		}
-
-		if (isinf(value))
-		{
-			strcpy(convert, "Infinity");
-			vallen = 8;
-		}
-		else
-		{
-			fmt[0] = '%';
-			fmt[1] = '.';
-			fmt[2] = '*';
-			fmt[3] = 'g';
-			fmt[4] = '\0';
-			vallen = snprintf(convert, sizeof(convert), fmt, precision, value);
-			if (vallen < 0)
-			{
-				target.failed = true;
-				goto fail;
-			}
-
-#ifdef WIN32
-			if (vallen >= 6 &&
-				convert[vallen - 5] == 'e' &&
-				convert[vallen - 3] == '0')
-			{
-				convert[vallen - 3] = convert[vallen - 2];
-				convert[vallen - 2] = convert[vallen - 1];
-				vallen--;
-			}
-#endif
-		}
-	}
-
-	if (signvalue)
-		dopr_outch(signvalue, &target);
-
-	dostr(convert, vallen, &target);
-
-fail:
-	*(target.bufptr) = '\0';
-	return target.failed ? -1 : (target.bufptr - target.bufstart
-								 + target.nchars);
-}
-
-
-static void
-dostr(const char *str, int slen, PrintfTarget *target)
-{
-	/* fast path for common case of slen == 1 */
-	if (slen == 1)
-	{
-		dopr_outch(*str, target);
-		return;
-	}
-
-	while (slen > 0)
-	{
-		int			avail;
-
-		if (target->bufend != NULL)
-			avail = target->bufend - target->bufptr;
-		else
-			avail = slen;
-		if (avail <= 0)
-		{
-			/* buffer full, can we dump to stream? */
-			if (target->stream == NULL)
-			{
-				target->nchars += slen; /* no, lose the data */
-				return;
-			}
-			flushbuffer(target);
-			continue;
-		}
-		avail = Min(avail, slen);
-		memmove(target->bufptr, str, avail);
-		target->bufptr += avail;
-		str += avail;
-		slen -= avail;
-	}
-}
-
-static void
-dopr_outch(int c, PrintfTarget *target)
-{
-	if (target->bufend != NULL && target->bufptr >= target->bufend)
-	{
-		/* buffer full, can we dump to stream? */
-		if (target->stream == NULL)
-		{
-			target->nchars++;	/* no, lose the data */
-			return;
-		}
-		flushbuffer(target);
-	}
-	*(target->bufptr++) = c;
-}
-
-static void
-dopr_outchmulti(int c, int slen, PrintfTarget *target)
-{
-	/* fast path for common case of slen == 1 */
-	if (slen == 1)
-	{
-		dopr_outch(c, target);
-		return;
-	}
-
-	while (slen > 0)
-	{
-		int			avail;
-
-		if (target->bufend != NULL)
-			avail = target->bufend - target->bufptr;
-		else
-			avail = slen;
-		if (avail <= 0)
-		{
-			/* buffer full, can we dump to stream? */
-			if (target->stream == NULL)
-			{
-				target->nchars += slen; /* no, lose the data */
-				return;
-			}
-			flushbuffer(target);
-			continue;
-		}
-		avail = Min(avail, slen);
-		memset(target->bufptr, c, avail);
-		target->bufptr += avail;
-		slen -= avail;
-	}
-}
-
-
-static int
-adjust_sign(int is_negative, int forcesign, int *signvalue)
-{
-	if (is_negative)
-	{
-		*signvalue = '-';
-		return true;
-	}
-	else if (forcesign)
-		*signvalue = '+';
-	return false;
-}
-
-
-static int
-compute_padlen(int minlen, int vallen, int leftjust)
-{
-	int			padlen;
-
-	padlen = minlen - vallen;
-	if (padlen < 0)
-		padlen = 0;
-	if (leftjust)
-		padlen = -padlen;
-	return padlen;
-}
-
-
-static void
-leading_pad(int zpad, int signvalue, int *padlen, PrintfTarget *target)
-{
-	int			maxpad;
-
-	if (*padlen > 0 && zpad)
-	{
-		if (signvalue)
-		{
-			dopr_outch(signvalue, target);
-			--(*padlen);
-			signvalue = 0;
-		}
-		if (*padlen > 0)
-		{
-			dopr_outchmulti(zpad, *padlen, target);
-			*padlen = 0;
-		}
-	}
-	maxpad = (signvalue != 0);
-	if (*padlen > maxpad)
-	{
-		dopr_outchmulti(' ', *padlen - maxpad, target);
-		*padlen = maxpad;
-	}
-	if (signvalue)
-	{
-		dopr_outch(signvalue, target);
-		if (*padlen > 0)
-			--(*padlen);
-		else if (*padlen < 0)
-			++(*padlen);
-	}
-}
-
-
-static void
-trailing_pad(int padlen, PrintfTarget *target)
-{
-	if (padlen < 0)
-		dopr_outchmulti(' ', -padlen, target);
-}
diff --git a/contrib/libs/libpq/src/port/strerror.c b/contrib/libs/libpq/src/port/strerror.c
deleted file mode 100644
index 26827d6db4..0000000000
--- a/contrib/libs/libpq/src/port/strerror.c
+++ /dev/null
@@ -1,312 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * strerror.c
- *	  Replacements for standard strerror() and strerror_r() functions
- *
- * Portions Copyright (c) 1996-2023, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- *
- * IDENTIFICATION
- *	  src/port/strerror.c
- *
- *-------------------------------------------------------------------------
- */
-#include "c.h"
-
-/*
- * Within this file, "strerror" means the platform's function not pg_strerror,
- * and likewise for "strerror_r"
- */
-#undef strerror
-#undef strerror_r
-
-static char *gnuish_strerror_r(int errnum, char *buf, size_t buflen);
-static char *get_errno_symbol(int errnum);
-#ifdef WIN32
-static char *win32_socket_strerror(int errnum, char *buf, size_t buflen);
-#endif
-
-
-/*
- * A slightly cleaned-up version of strerror()
- */
-char *
-pg_strerror(int errnum)
-{
-	static char errorstr_buf[PG_STRERROR_R_BUFLEN];
-
-	return pg_strerror_r(errnum, errorstr_buf, sizeof(errorstr_buf));
-}
-
-/*
- * A slightly cleaned-up version of strerror_r()
- */
-char *
-pg_strerror_r(int errnum, char *buf, size_t buflen)
-{
-	char	   *str;
-
-	/* If it's a Windows Winsock error, that needs special handling */
-#ifdef WIN32
-	/* Winsock error code range, per WinError.h */
-	if (errnum >= 10000 && errnum <= 11999)
-		return win32_socket_strerror(errnum, buf, buflen);
-#endif
-
-	/* Try the platform's strerror_r(), or maybe just strerror() */
-	str = gnuish_strerror_r(errnum, buf, buflen);
-
-	/*
-	 * Some strerror()s return an empty string for out-of-range errno.  This
-	 * is ANSI C spec compliant, but not exactly useful.  Also, we may get
-	 * back strings of question marks if libc cannot transcode the message to
-	 * the codeset specified by LC_CTYPE.  If we get nothing useful, first try
-	 * get_errno_symbol(), and if that fails, print the numeric errno.
-	 */
-	if (str == NULL || *str == '\0' || *str == '?')
-		str = get_errno_symbol(errnum);
-
-	if (str == NULL)
-	{
-		snprintf(buf, buflen, _("operating system error %d"), errnum);
-		str = buf;
-	}
-
-	return str;
-}
-
-/*
- * Simple wrapper to emulate GNU strerror_r if what the platform provides is
- * POSIX.  Also, if platform lacks strerror_r altogether, fall back to plain
- * strerror; it might not be very thread-safe, but tough luck.
- */
-static char *
-gnuish_strerror_r(int errnum, char *buf, size_t buflen)
-{
-#ifdef HAVE_STRERROR_R
-#ifdef STRERROR_R_INT
-	/* POSIX API */
-	if (strerror_r(errnum, buf, buflen) == 0)
-		return buf;
-	return NULL;				/* let caller deal with failure */
-#else
-	/* GNU API */
-	return strerror_r(errnum, buf, buflen);
-#endif
-#else							/* !HAVE_STRERROR_R */
-	char	   *sbuf = strerror(errnum);
-
-	if (sbuf == NULL)			/* can this still happen anywhere? */
-		return NULL;
-	/* To minimize thread-unsafety hazard, copy into caller's buffer */
-	strlcpy(buf, sbuf, buflen);
-	return buf;
-#endif
-}
-
-/*
- * Returns a symbol (e.g. "ENOENT") for an errno code.
- * Returns NULL if the code is unrecognized.
- */
-static char *
-get_errno_symbol(int errnum)
-{
-	switch (errnum)
-	{
-		case E2BIG:
-			return "E2BIG";
-		case EACCES:
-			return "EACCES";
-		case EADDRINUSE:
-			return "EADDRINUSE";
-		case EADDRNOTAVAIL:
-			return "EADDRNOTAVAIL";
-		case EAFNOSUPPORT:
-			return "EAFNOSUPPORT";
-#ifdef EAGAIN
-		case EAGAIN:
-			return "EAGAIN";
-#endif
-#ifdef EALREADY
-		case EALREADY:
-			return "EALREADY";
-#endif
-		case EBADF:
-			return "EBADF";
-#ifdef EBADMSG
-		case EBADMSG:
-			return "EBADMSG";
-#endif
-		case EBUSY:
-			return "EBUSY";
-		case ECHILD:
-			return "ECHILD";
-		case ECONNABORTED:
-			return "ECONNABORTED";
-		case ECONNREFUSED:
-			return "ECONNREFUSED";
-		case ECONNRESET:
-			return "ECONNRESET";
-		case EDEADLK:
-			return "EDEADLK";
-		case EDOM:
-			return "EDOM";
-		case EEXIST:
-			return "EEXIST";
-		case EFAULT:
-			return "EFAULT";
-		case EFBIG:
-			return "EFBIG";
-		case EHOSTDOWN:
-			return "EHOSTDOWN";
-		case EHOSTUNREACH:
-			return "EHOSTUNREACH";
-		case EIDRM:
-			return "EIDRM";
-		case EINPROGRESS:
-			return "EINPROGRESS";
-		case EINTR:
-			return "EINTR";
-		case EINVAL:
-			return "EINVAL";
-		case EIO:
-			return "EIO";
-		case EISCONN:
-			return "EISCONN";
-		case EISDIR:
-			return "EISDIR";
-#ifdef ELOOP
-		case ELOOP:
-			return "ELOOP";
-#endif
-		case EMFILE:
-			return "EMFILE";
-		case EMLINK:
-			return "EMLINK";
-		case EMSGSIZE:
-			return "EMSGSIZE";
-		case ENAMETOOLONG:
-			return "ENAMETOOLONG";
-		case ENETDOWN:
-			return "ENETDOWN";
-		case ENETRESET:
-			return "ENETRESET";
-		case ENETUNREACH:
-			return "ENETUNREACH";
-		case ENFILE:
-			return "ENFILE";
-		case ENOBUFS:
-			return "ENOBUFS";
-		case ENODEV:
-			return "ENODEV";
-		case ENOENT:
-			return "ENOENT";
-		case ENOEXEC:
-			return "ENOEXEC";
-		case ENOMEM:
-			return "ENOMEM";
-		case ENOSPC:
-			return "ENOSPC";
-		case ENOSYS:
-			return "ENOSYS";
-		case ENOTCONN:
-			return "ENOTCONN";
-		case ENOTDIR:
-			return "ENOTDIR";
-#if defined(ENOTEMPTY) && (ENOTEMPTY != EEXIST) /* same code on AIX */
-		case ENOTEMPTY:
-			return "ENOTEMPTY";
-#endif
-		case ENOTSOCK:
-			return "ENOTSOCK";
-#ifdef ENOTSUP
-		case ENOTSUP:
-			return "ENOTSUP";
-#endif
-		case ENOTTY:
-			return "ENOTTY";
-		case ENXIO:
-			return "ENXIO";
-#if defined(EOPNOTSUPP) && (!defined(ENOTSUP) || (EOPNOTSUPP != ENOTSUP))
-		case EOPNOTSUPP:
-			return "EOPNOTSUPP";
-#endif
-#ifdef EOVERFLOW
-		case EOVERFLOW:
-			return "EOVERFLOW";
-#endif
-		case EPERM:
-			return "EPERM";
-		case EPIPE:
-			return "EPIPE";
-		case EPROTONOSUPPORT:
-			return "EPROTONOSUPPORT";
-		case ERANGE:
-			return "ERANGE";
-#ifdef EROFS
-		case EROFS:
-			return "EROFS";
-#endif
-		case ESRCH:
-			return "ESRCH";
-		case ETIMEDOUT:
-			return "ETIMEDOUT";
-#ifdef ETXTBSY
-		case ETXTBSY:
-			return "ETXTBSY";
-#endif
-#if defined(EWOULDBLOCK) && (!defined(EAGAIN) || (EWOULDBLOCK != EAGAIN))
-		case EWOULDBLOCK:
-			return "EWOULDBLOCK";
-#endif
-		case EXDEV:
-			return "EXDEV";
-	}
-
-	return NULL;
-}
-
-
-#ifdef WIN32
-
-/*
- * Windows' strerror() doesn't know the Winsock codes, so handle them this way
- */
-static char *
-win32_socket_strerror(int errnum, char *buf, size_t buflen)
-{
-	static HANDLE handleDLL = INVALID_HANDLE_VALUE;
-
-	if (handleDLL == INVALID_HANDLE_VALUE)
-	{
-		handleDLL = LoadLibraryEx("netmsg.dll", NULL,
-								  DONT_RESOLVE_DLL_REFERENCES | LOAD_LIBRARY_AS_DATAFILE);
-		if (handleDLL == NULL)
-		{
-			snprintf(buf, buflen,
-					 "winsock error %d (could not load netmsg.dll to translate: error code %lu)",
-					 errnum, GetLastError());
-			return buf;
-		}
-	}
-
-	ZeroMemory(buf, buflen);
-	if (FormatMessage(FORMAT_MESSAGE_IGNORE_INSERTS |
-					  FORMAT_MESSAGE_FROM_SYSTEM |
-					  FORMAT_MESSAGE_FROM_HMODULE,
-					  handleDLL,
-					  errnum,
-					  MAKELANGID(LANG_ENGLISH, SUBLANG_DEFAULT),
-					  buf,
-					  buflen - 1,
-					  NULL) == 0)
-	{
-		/* Failed to get id */
-		snprintf(buf, buflen, "unrecognized winsock error %d", errnum);
-	}
-
-	return buf;
-}
-
-#endif							/* WIN32 */
diff --git a/contrib/libs/libpq/src/port/tar.c b/contrib/libs/libpq/src/port/tar.c
deleted file mode 100644
index 4afe9f2533..0000000000
--- a/contrib/libs/libpq/src/port/tar.c
+++ /dev/null
@@ -1,206 +0,0 @@
-#include "c.h"
-
-#include <sys/stat.h>
-
-#include "pgtar.h"
-
-/*
- * Print a numeric field in a tar header.  The field starts at *s and is of
- * length len; val is the value to be written.
- *
- * Per POSIX, the way to write a number is in octal with leading zeroes and
- * one trailing space (or NUL, but we use space) at the end of the specified
- * field width.
- *
- * However, the given value may not fit in the available space in octal form.
- * If that's true, we use the GNU extension of writing \200 followed by the
- * number in base-256 form (ie, stored in binary MSB-first).  (Note: here we
- * support only non-negative numbers, so we don't worry about the GNU rules
- * for handling negative numbers.)
- */
-void
-print_tar_number(char *s, int len, uint64 val)
-{
-	if (val < (((uint64) 1) << ((len - 1) * 3)))
-	{
-		/* Use octal with trailing space */
-		s[--len] = ' ';
-		while (len)
-		{
-			s[--len] = (val & 7) + '0';
-			val >>= 3;
-		}
-	}
-	else
-	{
-		/* Use base-256 with leading \200 */
-		s[0] = '\200';
-		while (len > 1)
-		{
-			s[--len] = (val & 255);
-			val >>= 8;
-		}
-	}
-}
-
-
-/*
- * Read a numeric field in a tar header.  The field starts at *s and is of
- * length len.
- *
- * The POSIX-approved format for a number is octal, ending with a space or
- * NUL.  However, for values that don't fit, we recognize the GNU extension
- * of \200 followed by the number in base-256 form (ie, stored in binary
- * MSB-first).  (Note: here we support only non-negative numbers, so we don't
- * worry about the GNU rules for handling negative numbers.)
- */
-uint64
-read_tar_number(const char *s, int len)
-{
-	uint64		result = 0;
-
-	if (*s == '\200')
-	{
-		/* base-256 */
-		while (--len)
-		{
-			result <<= 8;
-			result |= (unsigned char) (*++s);
-		}
-	}
-	else
-	{
-		/* octal */
-		while (len-- && *s >= '0' && *s <= '7')
-		{
-			result <<= 3;
-			result |= (*s - '0');
-			s++;
-		}
-	}
-	return result;
-}
-
-
-/*
- * Calculate the tar checksum for a header. The header is assumed to always
- * be 512 bytes, per the tar standard.
- */
-int
-tarChecksum(char *header)
-{
-	int			i,
-				sum;
-
-	/*
-	 * Per POSIX, the checksum is the simple sum of all bytes in the header,
-	 * treating the bytes as unsigned, and treating the checksum field (at
-	 * offset 148) as though it contained 8 spaces.
-	 */
-	sum = 8 * ' ';				/* presumed value for checksum field */
-	for (i = 0; i < 512; i++)
-		if (i < 148 || i >= 156)
-			sum += 0xFF & header[i];
-	return sum;
-}
-
-
-/*
- * Fill in the buffer pointed to by h with a tar format header. This buffer
- * must always have space for 512 characters, which is a requirement of
- * the tar format.
- */
-enum tarError
-tarCreateHeader(char *h, const char *filename, const char *linktarget,
-				pgoff_t size, mode_t mode, uid_t uid, gid_t gid, time_t mtime)
-{
-	if (strlen(filename) > 99)
-		return TAR_NAME_TOO_LONG;
-
-	if (linktarget && strlen(linktarget) > 99)
-		return TAR_SYMLINK_TOO_LONG;
-
-	memset(h, 0, 512);			/* assume tar header size */
-
-	/* Name 100 */
-	strlcpy(&h[0], filename, 100);
-	if (linktarget != NULL || S_ISDIR(mode))
-	{
-		/*
-		 * We only support symbolic links to directories, and this is
-		 * indicated in the tar format by adding a slash at the end of the
-		 * name, the same as for regular directories.
-		 */
-		int			flen = strlen(filename);
-
-		flen = Min(flen, 99);
-		h[flen] = '/';
-		h[flen + 1] = '\0';
-	}
-
-	/* Mode 8 - this doesn't include the file type bits (S_IFMT)  */
-	print_tar_number(&h[100], 8, (mode & 07777));
-
-	/* User ID 8 */
-	print_tar_number(&h[108], 8, uid);
-
-	/* Group 8 */
-	print_tar_number(&h[116], 8, gid);
-
-	/* File size 12 */
-	if (linktarget != NULL || S_ISDIR(mode))
-		/* Symbolic link or directory has size zero */
-		print_tar_number(&h[124], 12, 0);
-	else
-		print_tar_number(&h[124], 12, size);
-
-	/* Mod Time 12 */
-	print_tar_number(&h[136], 12, mtime);
-
-	/* Checksum 8 cannot be calculated until we've filled all other fields */
-
-	if (linktarget != NULL)
-	{
-		/* Type - Symbolic link */
-		h[156] = '2';
-		/* Link Name 100 */
-		strlcpy(&h[157], linktarget, 100);
-	}
-	else if (S_ISDIR(mode))
-	{
-		/* Type - directory */
-		h[156] = '5';
-	}
-	else
-	{
-		/* Type - regular file */
-		h[156] = '0';
-	}
-
-	/* Magic 6 */
-	strcpy(&h[257], "ustar");
-
-	/* Version 2 */
-	memcpy(&h[263], "00", 2);
-
-	/* User 32 */
-	/* XXX: Do we need to care about setting correct username? */
-	strlcpy(&h[265], "postgres", 32);
-
-	/* Group 32 */
-	/* XXX: Do we need to care about setting correct group name? */
-	strlcpy(&h[297], "postgres", 32);
-
-	/* Major Dev 8 */
-	print_tar_number(&h[329], 8, 0);
-
-	/* Minor Dev 8 */
-	print_tar_number(&h[337], 8, 0);
-
-	/* Prefix 155 - not used, leave as nulls */
-
-	/* Finally, compute and insert the checksum */
-	print_tar_number(&h[148], 8, tarChecksum(h));
-
-	return TAR_OK;
-}
diff --git a/contrib/libs/libpq/src/port/thread.c b/contrib/libs/libpq/src/port/thread.c
deleted file mode 100644
index 375c89b297..0000000000
--- a/contrib/libs/libpq/src/port/thread.c
+++ /dev/null
@@ -1,96 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * thread.c
- *
- *		  Prototypes and macros around system calls, used to help make
- *		  threaded libraries reentrant and safe to use from threaded applications.
- *
- * Portions Copyright (c) 1996-2023, PostgreSQL Global Development Group
- *
- * src/port/thread.c
- *
- *-------------------------------------------------------------------------
- */
-
-#include "c.h"
-
-#include <pwd.h>
-
-
-/*
- *  Historically, the code in this module had to deal with operating systems
- *  that lacked getpwuid_r().
- */
-
-#ifndef WIN32
-
-/*
- * pg_get_user_name - get the name of the user with the given ID
- *
- * On success, the user name is returned into the buffer (of size buflen),
- * and "true" is returned.  On failure, a localized error message is
- * returned into the buffer, and "false" is returned.
- */
-bool
-pg_get_user_name(uid_t user_id, char *buffer, size_t buflen)
-{
-	char		pwdbuf[BUFSIZ];
-	struct passwd pwdstr;
-	struct passwd *pw = NULL;
-	int			pwerr;
-
-	pwerr = getpwuid_r(user_id, &pwdstr, pwdbuf, sizeof(pwdbuf), &pw);
-	if (pw != NULL)
-	{
-		strlcpy(buffer, pw->pw_name, buflen);
-		return true;
-	}
-	if (pwerr != 0)
-		snprintf(buffer, buflen,
-				 _("could not look up local user ID %d: %s"),
-				 (int) user_id,
-				 strerror_r(pwerr, pwdbuf, sizeof(pwdbuf)));
-	else
-		snprintf(buffer, buflen,
-				 _("local user with ID %d does not exist"),
-				 (int) user_id);
-	return false;
-}
-
-/*
- * pg_get_user_home_dir - get the home directory of the user with the given ID
- *
- * On success, the directory path is returned into the buffer (of size buflen),
- * and "true" is returned.  On failure, a localized error message is
- * returned into the buffer, and "false" is returned.
- *
- * Note that this does not incorporate the common behavior of checking
- * $HOME first, since it's independent of which user_id is queried.
- */
-bool
-pg_get_user_home_dir(uid_t user_id, char *buffer, size_t buflen)
-{
-	char		pwdbuf[BUFSIZ];
-	struct passwd pwdstr;
-	struct passwd *pw = NULL;
-	int			pwerr;
-
-	pwerr = getpwuid_r(user_id, &pwdstr, pwdbuf, sizeof(pwdbuf), &pw);
-	if (pw != NULL)
-	{
-		strlcpy(buffer, pw->pw_dir, buflen);
-		return true;
-	}
-	if (pwerr != 0)
-		snprintf(buffer, buflen,
-				 _("could not look up local user ID %d: %s"),
-				 (int) user_id,
-				 strerror_r(pwerr, pwdbuf, sizeof(pwdbuf)));
-	else
-		snprintf(buffer, buflen,
-				 _("local user with ID %d does not exist"),
-				 (int) user_id);
-	return false;
-}
-
-#endif							/* !WIN32 */
diff --git a/contrib/libs/libpq/src/port/win32common.c b/contrib/libs/libpq/src/port/win32common.c
deleted file mode 100644
index 2fd78f7f93..0000000000
--- a/contrib/libs/libpq/src/port/win32common.c
+++ /dev/null
@@ -1,68 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * win32common.c
- *	  Common routines shared among the win32*.c ports.
- *
- * Portions Copyright (c) 1996-2023, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- *
- * IDENTIFICATION
- *	  src/port/win32common.c
- *
- *-------------------------------------------------------------------------
- */
-
-#ifdef FRONTEND
-#include "postgres_fe.h"
-#else
-#include "postgres.h"
-#endif
-
-#ifdef WIN32
-
-/*
- * pgwin32_get_file_type
- *
- * Convenience wrapper for GetFileType() with specific error handling for all the
- * port implementations.  Returns the file type associated with a HANDLE.
- *
- * On error, sets errno with FILE_TYPE_UNKNOWN as file type.
- */
-DWORD
-pgwin32_get_file_type(HANDLE hFile)
-{
-	DWORD		fileType = FILE_TYPE_UNKNOWN;
-	DWORD		lastError;
-
-	errno = 0;
-
-	/*
-	 * When stdin, stdout, and stderr aren't associated with a stream the
-	 * special value -2 is returned:
-	 * https://learn.microsoft.com/en-us/cpp/c-runtime-library/reference/get-osfhandle
-	 */
-	if (hFile == INVALID_HANDLE_VALUE || hFile == (HANDLE) -2)
-	{
-		errno = EINVAL;
-		return FILE_TYPE_UNKNOWN;
-	}
-
-	fileType = GetFileType(hFile);
-	lastError = GetLastError();
-
-	/*
-	 * Invoke GetLastError in order to distinguish between a "valid" return of
-	 * FILE_TYPE_UNKNOWN and its return due to a calling error.  In case of
-	 * success, GetLastError() returns NO_ERROR.
-	 */
-	if (fileType == FILE_TYPE_UNKNOWN && lastError != NO_ERROR)
-	{
-		_dosmaperr(lastError);
-		return FILE_TYPE_UNKNOWN;
-	}
-
-	return fileType;
-}
-
-#endif							/* WIN32 */
diff --git a/contrib/libs/libpq/src/port/win32error.c b/contrib/libs/libpq/src/port/win32error.c
deleted file mode 100644
index d7c3048eba..0000000000
--- a/contrib/libs/libpq/src/port/win32error.c
+++ /dev/null
@@ -1,214 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * win32error.c
- *	  Map win32 error codes to errno values
- *
- * Portions Copyright (c) 1996-2023, PostgreSQL Global Development Group
- *
- * IDENTIFICATION
- *	  src/port/win32error.c
- *
- *-------------------------------------------------------------------------
- */
-
-#ifndef FRONTEND
-#include "postgres.h"
-#else
-#include "postgres_fe.h"
-#endif
-
-static const struct
-{
-	DWORD		winerr;
-	int			doserr;
-}			doserrors[] =
-
-{
-	{
-		ERROR_INVALID_FUNCTION, EINVAL
-	},
-	{
-		ERROR_FILE_NOT_FOUND, ENOENT
-	},
-	{
-		ERROR_PATH_NOT_FOUND, ENOENT
-	},
-	{
-		ERROR_TOO_MANY_OPEN_FILES, EMFILE
-	},
-	{
-		ERROR_ACCESS_DENIED, EACCES
-	},
-	{
-		ERROR_INVALID_HANDLE, EBADF
-	},
-	{
-		ERROR_ARENA_TRASHED, ENOMEM
-	},
-	{
-		ERROR_NOT_ENOUGH_MEMORY, ENOMEM
-	},
-	{
-		ERROR_INVALID_BLOCK, ENOMEM
-	},
-	{
-		ERROR_BAD_ENVIRONMENT, E2BIG
-	},
-	{
-		ERROR_BAD_FORMAT, ENOEXEC
-	},
-	{
-		ERROR_INVALID_ACCESS, EINVAL
-	},
-	{
-		ERROR_INVALID_DATA, EINVAL
-	},
-	{
-		ERROR_INVALID_DRIVE, ENOENT
-	},
-	{
-		ERROR_CURRENT_DIRECTORY, EACCES
-	},
-	{
-		ERROR_NOT_SAME_DEVICE, EXDEV
-	},
-	{
-		ERROR_NO_MORE_FILES, ENOENT
-	},
-	{
-		ERROR_LOCK_VIOLATION, EACCES
-	},
-	{
-		ERROR_SHARING_VIOLATION, EACCES
-	},
-	{
-		ERROR_BAD_NETPATH, ENOENT
-	},
-	{
-		ERROR_NETWORK_ACCESS_DENIED, EACCES
-	},
-	{
-		ERROR_BAD_NET_NAME, ENOENT
-	},
-	{
-		ERROR_FILE_EXISTS, EEXIST
-	},
-	{
-		ERROR_CANNOT_MAKE, EACCES
-	},
-	{
-		ERROR_FAIL_I24, EACCES
-	},
-	{
-		ERROR_INVALID_PARAMETER, EINVAL
-	},
-	{
-		ERROR_NO_PROC_SLOTS, EAGAIN
-	},
-	{
-		ERROR_DRIVE_LOCKED, EACCES
-	},
-	{
-		ERROR_BROKEN_PIPE, EPIPE
-	},
-	{
-		ERROR_DISK_FULL, ENOSPC
-	},
-	{
-		ERROR_INVALID_TARGET_HANDLE, EBADF
-	},
-	{
-		ERROR_INVALID_HANDLE, EINVAL
-	},
-	{
-		ERROR_WAIT_NO_CHILDREN, ECHILD
-	},
-	{
-		ERROR_CHILD_NOT_COMPLETE, ECHILD
-	},
-	{
-		ERROR_DIRECT_ACCESS_HANDLE, EBADF
-	},
-	{
-		ERROR_NEGATIVE_SEEK, EINVAL
-	},
-	{
-		ERROR_SEEK_ON_DEVICE, EACCES
-	},
-	{
-		ERROR_DIR_NOT_EMPTY, ENOTEMPTY
-	},
-	{
-		ERROR_NOT_LOCKED, EACCES
-	},
-	{
-		ERROR_BAD_PATHNAME, ENOENT
-	},
-	{
-		ERROR_MAX_THRDS_REACHED, EAGAIN
-	},
-	{
-		ERROR_LOCK_FAILED, EACCES
-	},
-	{
-		ERROR_ALREADY_EXISTS, EEXIST
-	},
-	{
-		ERROR_FILENAME_EXCED_RANGE, ENOENT
-	},
-	{
-		ERROR_NESTING_NOT_ALLOWED, EAGAIN
-	},
-	{
-		ERROR_NOT_ENOUGH_QUOTA, ENOMEM
-	},
-	{
-		ERROR_DELETE_PENDING, ENOENT
-	},
-	{
-		ERROR_INVALID_NAME, ENOENT
-	},
-	{
-		ERROR_CANT_RESOLVE_FILENAME, ENOENT
-	}
-};
-
-void
-_dosmaperr(unsigned long e)
-{
-	int			i;
-
-	if (e == 0)
-	{
-		errno = 0;
-		return;
-	}
-
-	for (i = 0; i < lengthof(doserrors); i++)
-	{
-		if (doserrors[i].winerr == e)
-		{
-			int			doserr = doserrors[i].doserr;
-
-#ifndef FRONTEND
-			ereport(DEBUG5,
-					(errmsg_internal("mapped win32 error code %lu to %d",
-									 e, doserr)));
-#elif defined(FRONTEND_DEBUG)
-			fprintf(stderr, "mapped win32 error code %lu to %d", e, doserr);
-#endif
-			errno = doserr;
-			return;
-		}
-	}
-
-#ifndef FRONTEND
-	ereport(LOG,
-			(errmsg_internal("unrecognized win32 error code: %lu",
-							 e)));
-#else
-	fprintf(stderr, "unrecognized win32 error code: %lu", e);
-#endif
-
-	errno = EINVAL;
-}
diff --git a/contrib/libs/libpq/src/port/win32gettimeofday.c b/contrib/libs/libpq/src/port/win32gettimeofday.c
deleted file mode 100644
index 1e00f7ee14..0000000000
--- a/contrib/libs/libpq/src/port/win32gettimeofday.c
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- * win32gettimeofday.c
- *	  Win32 gettimeofday() replacement
- *
- * src/port/win32gettimeofday.c
- *
- * Copyright (c) 2003 SRA, Inc.
- * Copyright (c) 2003 SKC, Inc.
- *
- * Permission to use, copy, modify, and distribute this software and
- * its documentation for any purpose, without fee, and without a
- * written agreement is hereby granted, provided that the above
- * copyright notice and this paragraph and the following two
- * paragraphs appear in all copies.
- *
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE TO ANY PARTY FOR DIRECT,
- * INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING
- * LOST PROFITS, ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS
- * DOCUMENTATION, EVEN IF THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED
- * OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * THE AUTHOR SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS ON AN "AS
- * IS" BASIS, AND THE AUTHOR HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE,
- * SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
- */
-
-#include "c.h"
-
-#include <sysinfoapi.h>
-
-#include <sys/time.h>
-
-/* FILETIME of Jan 1 1970 00:00:00, the PostgreSQL epoch */
-static const unsigned __int64 epoch = UINT64CONST(116444736000000000);
-
-/*
- * FILETIME represents the number of 100-nanosecond intervals since
- * January 1, 1601 (UTC).
- */
-#define FILETIME_UNITS_PER_SEC	10000000L
-#define FILETIME_UNITS_PER_USEC 10
-
-
-/*
- * timezone information is stored outside the kernel so tzp isn't used anymore.
- *
- * Note: this function is not for Win32 high precision timing purposes. See
- * elapsed_time().
- */
-int
-gettimeofday(struct timeval *tp, void *tzp)
-{
-	FILETIME	file_time;
-	ULARGE_INTEGER ularge;
-
-	/*
-	 * POSIX declines to define what tzp points to, saying "If tzp is not a
-	 * null pointer, the behavior is unspecified".  Let's take this
-	 * opportunity to verify that noplace in Postgres tries to use any
-	 * unportable behavior.
-	 */
-	Assert(tzp == NULL);
-
-	GetSystemTimePreciseAsFileTime(&file_time);
-	ularge.LowPart = file_time.dwLowDateTime;
-	ularge.HighPart = file_time.dwHighDateTime;
-
-	tp->tv_sec = (long) ((ularge.QuadPart - epoch) / FILETIME_UNITS_PER_SEC);
-	tp->tv_usec = (long) (((ularge.QuadPart - epoch) % FILETIME_UNITS_PER_SEC)
-						  / FILETIME_UNITS_PER_USEC);
-
-	return 0;
-}
diff --git a/contrib/libs/libpq/src/port/win32ntdll.c b/contrib/libs/libpq/src/port/win32ntdll.c
deleted file mode 100644
index 3b38cdb34c..0000000000
--- a/contrib/libs/libpq/src/port/win32ntdll.c
+++ /dev/null
@@ -1,71 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * win32ntdll.c
- *	  Dynamically loaded Windows NT functions.
- *
- * Portions Copyright (c) 2021-2023, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- *
- * IDENTIFICATION
- *	  src/port/win32ntdll.c
- *
- *-------------------------------------------------------------------------
- */
-
-#include "c.h"
-
-#include "port/win32ntdll.h"
-
-RtlGetLastNtStatus_t pg_RtlGetLastNtStatus;
-RtlNtStatusToDosError_t pg_RtlNtStatusToDosError;
-NtFlushBuffersFileEx_t pg_NtFlushBuffersFileEx;
-
-typedef struct NtDllRoutine
-{
-	const char *name;
-	pg_funcptr_t *address;
-} NtDllRoutine;
-
-static const NtDllRoutine routines[] = {
-	{"RtlGetLastNtStatus", (pg_funcptr_t *) &pg_RtlGetLastNtStatus},
-	{"RtlNtStatusToDosError", (pg_funcptr_t *) &pg_RtlNtStatusToDosError},
-	{"NtFlushBuffersFileEx", (pg_funcptr_t *) &pg_NtFlushBuffersFileEx}
-};
-
-static bool initialized;
-
-int
-initialize_ntdll(void)
-{
-	HMODULE		module;
-
-	if (initialized)
-		return 0;
-
-	if (!(module = LoadLibraryEx("ntdll.dll", NULL, 0)))
-	{
-		_dosmaperr(GetLastError());
-		return -1;
-	}
-
-	for (int i = 0; i < lengthof(routines); ++i)
-	{
-		pg_funcptr_t address;
-
-		address = (pg_funcptr_t) GetProcAddress(module, routines[i].name);
-		if (!address)
-		{
-			_dosmaperr(GetLastError());
-			FreeLibrary(module);
-
-			return -1;
-		}
-
-		*(pg_funcptr_t *) routines[i].address = address;
-	}
-
-	initialized = true;
-
-	return 0;
-}
diff --git a/contrib/libs/libpq/src/port/win32setlocale.c b/contrib/libs/libpq/src/port/win32setlocale.c
deleted file mode 100644
index e2c85b0048..0000000000
--- a/contrib/libs/libpq/src/port/win32setlocale.c
+++ /dev/null
@@ -1,193 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * win32setlocale.c
- *		Wrapper to work around bugs in Windows setlocale() implementation
- *
- * Copyright (c) 2011-2023, PostgreSQL Global Development Group
- *
- * IDENTIFICATION
- *	  src/port/win32setlocale.c
- *
- *
- * The setlocale() function in Windows is broken in two ways. First, it
- * has a problem with locale names that have a dot in the country name. For
- * example:
- *
- * "Chinese (Traditional)_Hong Kong S.A.R..950"
- *
- * For some reason, setlocale() doesn't accept that as argument, even though
- * setlocale(LC_ALL, NULL) returns exactly that. Fortunately, it accepts
- * various alternative names for such countries, so to work around the broken
- * setlocale() function, we map the troublemaking locale names to accepted
- * aliases, before calling setlocale().
- *
- * The second problem is that the locale name for "Norwegian (Bokm&aring;l)"
- * contains a non-ASCII character. That's problematic, because it's not clear
- * what encoding the locale name itself is supposed to be in, when you
- * haven't yet set a locale. Also, it causes problems when the cluster
- * contains databases with different encodings, as the locale name is stored
- * in the pg_database system catalog. To work around that, when setlocale()
- * returns that locale name, map it to a pure-ASCII alias for the same
- * locale.
- *-------------------------------------------------------------------------
- */
-
-#include "c.h"
-
-#undef setlocale
-
-struct locale_map
-{
-	/*
-	 * String in locale name to replace. Can be a single string (end is NULL),
-	 * or separate start and end strings. If two strings are given, the locale
-	 * name must contain both of them, and everything between them is
-	 * replaced. This is used for a poor-man's regexp search, allowing
-	 * replacement of "start.*end".
-	 */
-	const char *locale_name_start;
-	const char *locale_name_end;
-
-	const char *replacement;	/* string to replace the match with */
-};
-
-/*
- * Mappings applied before calling setlocale(), to the argument.
- */
-static const struct locale_map locale_map_argument[] = {
-	/*
-	 * "HKG" is listed here:
-	 * http://msdn.microsoft.com/en-us/library/cdax410z%28v=vs.71%29.aspx
-	 * (Country/Region Strings).
-	 *
-	 * "ARE" is the ISO-3166 three-letter code for U.A.E. It is not on the
-	 * above list, but seems to work anyway.
-	 */
-	{"Hong Kong S.A.R.", NULL, "HKG"},
-	{"U.A.E.", NULL, "ARE"},
-
-	/*
-	 * The ISO-3166 country code for Macau S.A.R. is MAC, but Windows doesn't
-	 * seem to recognize that. And Macau isn't listed in the table of accepted
-	 * abbreviations linked above. Fortunately, "ZHM" seems to be accepted as
-	 * an alias for "Chinese (Traditional)_Macau S.A.R..950". I'm not sure
-	 * where "ZHM" comes from, must be some legacy naming scheme. But hey, it
-	 * works.
-	 *
-	 * Note that unlike HKG and ARE, ZHM is an alias for the *whole* locale
-	 * name, not just the country part.
-	 *
-	 * Some versions of Windows spell it "Macau", others "Macao".
-	 */
-	{"Chinese (Traditional)_Macau S.A.R..950", NULL, "ZHM"},
-	{"Chinese_Macau S.A.R..950", NULL, "ZHM"},
-	{"Chinese (Traditional)_Macao S.A.R..950", NULL, "ZHM"},
-	{"Chinese_Macao S.A.R..950", NULL, "ZHM"},
-	{NULL, NULL, NULL}
-};
-
-/*
- * Mappings applied after calling setlocale(), to its return value.
- */
-static const struct locale_map locale_map_result[] = {
-	/*
-	 * "Norwegian (Bokm&aring;l)" locale name contains the a-ring character.
-	 * Map it to a pure-ASCII alias.
-	 *
-	 * It's not clear what encoding setlocale() uses when it returns the
-	 * locale name, so to play it safe, we search for "Norwegian (Bok*l)".
-	 *
-	 * Just to make life even more complicated, some versions of Windows spell
-	 * the locale name without parentheses.  Translate that too.
-	 */
-	{"Norwegian (Bokm", "l)_Norway", "Norwegian_Norway"},
-	{"Norwegian Bokm", "l_Norway", "Norwegian_Norway"},
-	{NULL, NULL, NULL}
-};
-
-#define MAX_LOCALE_NAME_LEN		100
-
-static const char *
-map_locale(const struct locale_map *map, const char *locale)
-{
-	static char aliasbuf[MAX_LOCALE_NAME_LEN];
-	int			i;
-
-	/* Check if the locale name matches any of the problematic ones. */
-	for (i = 0; map[i].locale_name_start != NULL; i++)
-	{
-		const char *needle_start = map[i].locale_name_start;
-		const char *needle_end = map[i].locale_name_end;
-		const char *replacement = map[i].replacement;
-		char	   *match;
-		char	   *match_start = NULL;
-		char	   *match_end = NULL;
-
-		match = strstr(locale, needle_start);
-		if (match)
-		{
-			/*
-			 * Found a match for the first part. If this was a two-part
-			 * replacement, find the second part.
-			 */
-			match_start = match;
-			if (needle_end)
-			{
-				match = strstr(match_start + strlen(needle_start), needle_end);
-				if (match)
-					match_end = match + strlen(needle_end);
-				else
-					match_start = NULL;
-			}
-			else
-				match_end = match_start + strlen(needle_start);
-		}
-
-		if (match_start)
-		{
-			/* Found a match. Replace the matched string. */
-			int			matchpos = match_start - locale;
-			int			replacementlen = strlen(replacement);
-			char	   *rest = match_end;
-			int			restlen = strlen(rest);
-
-			/* check that the result fits in the static buffer */
-			if (matchpos + replacementlen + restlen + 1 > MAX_LOCALE_NAME_LEN)
-				return NULL;
-
-			memcpy(&aliasbuf[0], &locale[0], matchpos);
-			memcpy(&aliasbuf[matchpos], replacement, replacementlen);
-			/* includes null terminator */
-			memcpy(&aliasbuf[matchpos + replacementlen], rest, restlen + 1);
-
-			return aliasbuf;
-		}
-	}
-
-	/* no match, just return the original string */
-	return locale;
-}
-
-char *
-pgwin32_setlocale(int category, const char *locale)
-{
-	const char *argument;
-	char	   *result;
-
-	if (locale == NULL)
-		argument = NULL;
-	else
-		argument = map_locale(locale_map_argument, locale);
-
-	/* Call the real setlocale() function */
-	result = setlocale(category, argument);
-
-	/*
-	 * setlocale() is specified to return a "char *" that the caller is
-	 * forbidden to modify, so casting away the "const" is innocuous.
-	 */
-	if (result)
-		result = unconstify(char *, map_locale(locale_map_result, result));
-
-	return result;
-}
diff --git a/contrib/libs/libpq/src/port/win32stat.c b/contrib/libs/libpq/src/port/win32stat.c
deleted file mode 100644
index aa3a0c174e..0000000000
--- a/contrib/libs/libpq/src/port/win32stat.c
+++ /dev/null
@@ -1,306 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * win32stat.c
- *	  Replacements for <sys/stat.h> functions using GetFileInformationByHandle
- *
- * Portions Copyright (c) 1996-2023, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- *
- * IDENTIFICATION
- *	  src/port/win32stat.c
- *
- *-------------------------------------------------------------------------
- */
-
-#ifdef WIN32
-
-#include "c.h"
-#include "port/win32ntdll.h"
-
-#include <windows.h>
-
-/*
- * Convert a FILETIME struct into a 64 bit time_t.
- */
-static __time64_t
-filetime_to_time(const FILETIME *ft)
-{
-	ULARGE_INTEGER unified_ft = {0};
-	static const uint64 EpochShift = UINT64CONST(116444736000000000);
-
-	unified_ft.LowPart = ft->dwLowDateTime;
-	unified_ft.HighPart = ft->dwHighDateTime;
-
-	if (unified_ft.QuadPart < EpochShift)
-		return -1;
-
-	unified_ft.QuadPart -= EpochShift;
-	unified_ft.QuadPart /= 10 * 1000 * 1000;
-
-	return unified_ft.QuadPart;
-}
-
-/*
- * Convert WIN32 file attributes to a Unix-style mode.
- *
- * Only owner permissions are set.
- */
-static unsigned short
-fileattr_to_unixmode(int attr)
-{
-	unsigned short uxmode = 0;
-
-	uxmode |= (unsigned short) ((attr & FILE_ATTRIBUTE_DIRECTORY) ?
-								(_S_IFDIR) : (_S_IFREG));
-
-	uxmode |= (unsigned short) ((attr & FILE_ATTRIBUTE_READONLY) ?
-								(_S_IREAD) : (_S_IREAD | _S_IWRITE));
-
-	/* there is no need to simulate _S_IEXEC using CMD's PATHEXT extensions */
-	uxmode |= _S_IEXEC;
-
-	return uxmode;
-}
-
-/*
- * Convert WIN32 file information (from a HANDLE) to a struct stat.
- */
-static int
-fileinfo_to_stat(HANDLE hFile, struct stat *buf)
-{
-	BY_HANDLE_FILE_INFORMATION fiData;
-
-	memset(buf, 0, sizeof(*buf));
-
-	/*
-	 * GetFileInformationByHandle minimum supported version: Windows XP and
-	 * Windows Server 2003, so it exists everywhere we care about.
-	 */
-	if (!GetFileInformationByHandle(hFile, &fiData))
-	{
-		_dosmaperr(GetLastError());
-		return -1;
-	}
-
-	if (fiData.ftLastWriteTime.dwLowDateTime ||
-		fiData.ftLastWriteTime.dwHighDateTime)
-		buf->st_mtime = filetime_to_time(&fiData.ftLastWriteTime);
-
-	if (fiData.ftLastAccessTime.dwLowDateTime ||
-		fiData.ftLastAccessTime.dwHighDateTime)
-		buf->st_atime = filetime_to_time(&fiData.ftLastAccessTime);
-	else
-		buf->st_atime = buf->st_mtime;
-
-	if (fiData.ftCreationTime.dwLowDateTime ||
-		fiData.ftCreationTime.dwHighDateTime)
-		buf->st_ctime = filetime_to_time(&fiData.ftCreationTime);
-	else
-		buf->st_ctime = buf->st_mtime;
-
-	buf->st_mode = fileattr_to_unixmode(fiData.dwFileAttributes);
-	buf->st_nlink = fiData.nNumberOfLinks;
-
-	buf->st_size = ((((uint64) fiData.nFileSizeHigh) << 32) |
-					fiData.nFileSizeLow);
-
-	return 0;
-}
-
-/*
- * Windows implementation of lstat().
- */
-int
-_pglstat64(const char *name, struct stat *buf)
-{
-	/*
-	 * Our open wrapper will report STATUS_DELETE_PENDING as ENOENT.  We
-	 * request FILE_FLAG_BACKUP_SEMANTICS so that we can open directories too,
-	 * for limited purposes.  We use the private handle-based version, so we
-	 * don't risk running out of fds.
-	 */
-	HANDLE		hFile;
-	int			ret;
-
-	hFile = pgwin32_open_handle(name, O_RDONLY, true);
-	if (hFile == INVALID_HANDLE_VALUE)
-	{
-		if (errno == ENOENT)
-		{
-			/*
-			 * If it's a junction point pointing to a non-existent path, we'll
-			 * have ENOENT here (because pgwin32_open_handle does not use
-			 * FILE_FLAG_OPEN_REPARSE_POINT).  In that case, we'll try again
-			 * with readlink() below, which will distinguish true ENOENT from
-			 * pseudo-symlink.
-			 */
-			memset(buf, 0, sizeof(*buf));
-			ret = 0;
-		}
-		else
-			return -1;
-	}
-	else
-		ret = fileinfo_to_stat(hFile, buf);
-
-	/*
-	 * Junction points appear as directories to fileinfo_to_stat(), so we'll
-	 * need to do a bit more work to distinguish them.
-	 */
-	if ((ret == 0 && S_ISDIR(buf->st_mode)) || hFile == INVALID_HANDLE_VALUE)
-	{
-		char		next[MAXPGPATH];
-		ssize_t		size;
-
-		/*
-		 * POSIX says we need to put the length of the target path into
-		 * st_size.  Use readlink() to get it, or learn that this is not a
-		 * junction point.
-		 */
-		size = readlink(name, next, sizeof(next));
-		if (size < 0)
-		{
-			if (errno == EACCES &&
-				pg_RtlGetLastNtStatus() == STATUS_DELETE_PENDING)
-			{
-				/* Unlinked underneath us. */
-				errno = ENOENT;
-				ret = -1;
-			}
-			else if (errno == EINVAL)
-			{
-				/* It's not a junction point, nothing to do. */
-			}
-			else
-			{
-				/* Some other failure. */
-				ret = -1;
-			}
-		}
-		else
-		{
-			/* It's a junction point, so report it as a symlink. */
-			buf->st_mode &= ~S_IFDIR;
-			buf->st_mode |= S_IFLNK;
-			buf->st_size = size;
-			ret = 0;
-		}
-	}
-
-	if (hFile != INVALID_HANDLE_VALUE)
-		CloseHandle(hFile);
-	return ret;
-}
-
-/*
- * Windows implementation of stat().
- */
-int
-_pgstat64(const char *name, struct stat *buf)
-{
-	int			loops = 0;
-	int			ret;
-	char		curr[MAXPGPATH];
-
-	ret = _pglstat64(name, buf);
-
-	strlcpy(curr, name, MAXPGPATH);
-
-	/* Do we need to follow a symlink (junction point)? */
-	while (ret == 0 && S_ISLNK(buf->st_mode))
-	{
-		char		next[MAXPGPATH];
-		ssize_t		size;
-
-		if (++loops > 8)
-		{
-			errno = ELOOP;
-			return -1;
-		}
-
-		/*
-		 * _pglstat64() already called readlink() once to be able to fill in
-		 * st_size, and now we need to do it again to get the path to follow.
-		 * That could be optimized, but stat() on symlinks is probably rare
-		 * and this way is simple.
-		 */
-		size = readlink(curr, next, sizeof(next));
-		if (size < 0)
-		{
-			if (errno == EACCES &&
-				pg_RtlGetLastNtStatus() == STATUS_DELETE_PENDING)
-			{
-				/* Unlinked underneath us. */
-				errno = ENOENT;
-			}
-			return -1;
-		}
-		if (size >= sizeof(next))
-		{
-			errno = ENAMETOOLONG;
-			return -1;
-		}
-		next[size] = 0;
-
-		ret = _pglstat64(next, buf);
-		strcpy(curr, next);
-	}
-
-	return ret;
-}
-
-/*
- * Windows implementation of fstat().
- */
-int
-_pgfstat64(int fileno, struct stat *buf)
-{
-	HANDLE		hFile = (HANDLE) _get_osfhandle(fileno);
-	DWORD		fileType = FILE_TYPE_UNKNOWN;
-	unsigned short st_mode;
-
-	if (buf == NULL)
-	{
-		errno = EINVAL;
-		return -1;
-	}
-
-	fileType = pgwin32_get_file_type(hFile);
-	if (errno != 0)
-		return -1;
-
-	switch (fileType)
-	{
-			/* The specified file is a disk file */
-		case FILE_TYPE_DISK:
-			return fileinfo_to_stat(hFile, buf);
-
-			/*
-			 * The specified file is a socket, a named pipe, or an anonymous
-			 * pipe.
-			 */
-		case FILE_TYPE_PIPE:
-			st_mode = _S_IFIFO;
-			break;
-			/* The specified file is a character file */
-		case FILE_TYPE_CHAR:
-			st_mode = _S_IFCHR;
-			break;
-			/* Unused flag and unknown file type */
-		case FILE_TYPE_REMOTE:
-		case FILE_TYPE_UNKNOWN:
-		default:
-			errno = EINVAL;
-			return -1;
-	}
-
-	memset(buf, 0, sizeof(*buf));
-	buf->st_mode = st_mode;
-	buf->st_dev = fileno;
-	buf->st_rdev = fileno;
-	buf->st_nlink = 1;
-	return 0;
-}
-
-#endif							/* WIN32 */
diff --git a/contrib/libs/libpq/ya.make b/contrib/libs/libpq/ya.make
deleted file mode 100644
index 66923a8a11..0000000000
--- a/contrib/libs/libpq/ya.make
+++ /dev/null
@@ -1,155 +0,0 @@
-# Generated by devtools/yamaker from nixpkgs 22.11.
-
-LIBRARY()
-
-LICENSE(
-    Apache-2.0 AND
-    BSD-3-Clause AND
-    BSL-1.0 AND
-    ISC AND
-    PostgreSQL AND
-    Public-Domain
-)
-
-LICENSE_TEXTS(.yandex_meta/licenses.list.txt)
-
-VERSION(16.2)
-
-ORIGINAL_SOURCE(https://github.com/postgres/postgres/archive/REL_16_2.tar.gz)
-
-PEERDIR(
-    contrib/libs/libc_compat
-    contrib/libs/openssl
-    contrib/libs/zlib
-)
-
-ADDINCL(
-    contrib/libs/libpq/src/backend
-    GLOBAL contrib/libs/libpq/src/include
-    contrib/libs/libpq/src/common
-    contrib/libs/libpq/src/interfaces/libpq
-    contrib/libs/libpq/src/port
-)
-
-NO_COMPILER_WARNINGS()
-
-NO_RUNTIME()
-
-CFLAGS(
-    -DFRONTEND
-    -DUNSAFE_STAT_OK
-    -D_POSIX_PTHREAD_SEMANTICS
-    -D_REENTRANT
-    -D_THREAD_SAFE
-)
-
-SRCS(
-    src/common/archive.c
-    src/common/base64.c
-    src/common/checksum_helper.c
-    src/common/compression.c
-    src/common/config_info.c
-    src/common/controldata_utils.c
-    src/common/cryptohash_openssl.c
-    src/common/d2s.c
-    src/common/encnames.c
-    src/common/exec.c
-    src/common/f2s.c
-    src/common/fe_memutils.c
-    src/common/file_perm.c
-    src/common/file_utils.c
-    src/common/hashfn.c
-    src/common/hmac_openssl.c
-    src/common/ip.c
-    src/common/jsonapi.c
-    src/common/keywords.c
-    src/common/kwlookup.c
-    src/common/link-canary.c
-    src/common/logging.c
-    src/common/md5_common.c
-    src/common/percentrepl.c
-    src/common/pg_get_line.c
-    src/common/pg_lzcompress.c
-    src/common/pg_prng.c
-    src/common/pgfnames.c
-    src/common/protocol_openssl.c
-    src/common/psprintf.c
-    src/common/relpath.c
-    src/common/restricted_token.c
-    src/common/rmtree.c
-    src/common/saslprep.c
-    src/common/scram-common.c
-    src/common/sprompt.c
-    src/common/string.c
-    src/common/stringinfo.c
-    src/common/unicode_norm.c
-    src/common/username.c
-    src/common/wait_error.c
-    src/common/wchar.c
-    src/interfaces/libpq/fe-auth-scram.c
-    src/interfaces/libpq/fe-auth.c
-    src/interfaces/libpq/fe-connect.c
-    src/interfaces/libpq/fe-exec.c
-    src/interfaces/libpq/fe-lobj.c
-    src/interfaces/libpq/fe-misc.c
-    src/interfaces/libpq/fe-print.c
-    src/interfaces/libpq/fe-protocol3.c
-    src/interfaces/libpq/fe-secure-common.c
-    src/interfaces/libpq/fe-secure-openssl.c
-    src/interfaces/libpq/fe-secure.c
-    src/interfaces/libpq/fe-trace.c
-    src/interfaces/libpq/libpq-events.c
-    src/interfaces/libpq/pqexpbuffer.c
-    src/port/bsearch_arg.c
-    src/port/chklocale.c
-    src/port/getpeereid.c
-    src/port/inet_net_ntop.c
-    src/port/noblock.c
-    src/port/path.c
-    src/port/pg_bitutils.c
-    src/port/pg_crc32c_sb8.c
-    src/port/pg_strong_random.c
-    src/port/pgcheckdir.c
-    src/port/pgmkdirp.c
-    src/port/pgsleep.c
-    src/port/pgstrcasecmp.c
-    src/port/pgstrsignal.c
-    src/port/pqsignal.c
-    src/port/qsort.c
-    src/port/qsort_arg.c
-    src/port/quotes.c
-    src/port/snprintf.c
-    src/port/strerror.c
-    src/port/tar.c
-    src/port/thread.c
-)
-
-IF (ARCH_X86_64)
-    SRCS(
-        src/port/pg_crc32c_sse42.c
-        src/port/pg_crc32c_sse42_choose.c
-    )
-ENDIF()
-
-IF (OS_WINDOWS)
-    ADDINCL(
-        contrib/libs/libpq/src/include/port
-        contrib/libs/libpq/src/include/port/win32
-        contrib/libs/libpq/src/include/port/win32_msvc
-    )
-    SRCS(
-        src/interfaces/libpq/pthread-win32.c
-        src/interfaces/libpq/win32.c
-        src/port/dirmod.c
-        src/port/inet_aton.c
-        src/port/open.c
-        src/port/win32common.c
-        src/port/win32error.c
-        src/port/win32gettimeofday.c
-        src/port/win32ntdll.c
-        src/port/win32setlocale.c
-        src/port/win32stat.c
-    )
-ENDIF()
-
-END()
diff --git a/contrib/libs/libpqxx/AUTHORS b/contrib/libs/libpqxx/AUTHORS
deleted file mode 100644
index 6a922e950c..0000000000
--- a/contrib/libs/libpqxx/AUTHORS
+++ /dev/null
@@ -1,4 +0,0 @@
-Jeroen T. Vermeulen.  Wrote the code.
-Ray Dassen.  Did most of the autoconf etc. stuff.
-
-Lots of others helped with various other contributions.
diff --git a/contrib/libs/libpqxx/COPYING b/contrib/libs/libpqxx/COPYING
deleted file mode 100755
index 006c39da8b..0000000000
--- a/contrib/libs/libpqxx/COPYING
+++ /dev/null
@@ -1,27 +0,0 @@
-Copyright (c) 2000-2019 Jeroen T. Vermeulen.
-
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without modification,
-are permitted provided that the following conditions are met:
-
-* Redistributions of source code must retain the above copyright notice, this
-  list of conditions and the following disclaimer.
-* Redistributions in binary form must reproduce the above copyright notice,
-  this list of conditions and the following disclaimer in the documentation
-  and/or other materials provided with the distribution.
-* Neither the name of the author, nor the names of other contributors may be
-  used to endorse or promote products derived from this software without
-  specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
-ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
diff --git a/contrib/libs/libpqxx/INSTALL b/contrib/libs/libpqxx/INSTALL
deleted file mode 100755
index bf0aebe736..0000000000
--- a/contrib/libs/libpqxx/INSTALL
+++ /dev/null
@@ -1,212 +0,0 @@
-Basic Installation
-==================
-
-
-The native build system for libpqxx is based on `configure` and `make`,
-but there is also a CMake build.
-
-
-Native build
-------------
-
-   The `configure' shell script attempts to guess correct values for
-various system-dependent variables used during compilation.  It uses
-those values to create a `Makefile' in each directory of the package.
-It may also create one or more `.h' files containing system-dependent
-definitions.  Finally, it creates a shell script `config.status' that
-you can run in the future to recreate the current configuration, a file
-`config.cache' that saves the results of its tests to speed up
-reconfiguring, and a file `config.log' containing compiler output
-(useful mainly for debugging `configure').
-
-   If you need to do unusual things to compile the package, please try
-to figure out how `configure' could check whether to do them, and mail
-diffs or instructions to the address given in the `README.md' so they can
-be considered for the next release.  If at some point `config.cache'
-contains results you don't want to keep, you may remove or edit it.
-
-   The file `configure.in' is used to create `configure' by a program
-called `autoconf'.  You only need `configure.in' if you want to change
-it or regenerate `configure' using a newer version of `autoconf'.
-
-The simplest way to compile this package is:
-
- 1. `cd' to the directory containing the package's source code and type
-    `./configure' to configure the package for your system.  If you're
-    using `csh' on an old version of System V, you might need to type
-    `sh ./configure' instead to prevent `csh' from trying to execute
-    `configure' itself.  Running `configure' takes awhile.  While
-    running, it prints some messages telling which features it is
-    checking for.
- 2. Type `make' to compile the package.  (Add e.g. `-j8` to run up to 8
-    simultanerous compiler processes to speed this up.)
- 3. Optionally, type `make check' to run any self-tests that come with
-    the package.
- 4. Type `make install' to install the programs and any data files and
-    documentation.
- 5. You can remove the program binaries and object files from the
-    source code directory by typing `make clean'.  To also remove the
-    files that `configure' created (so you can compile the package for
-    a different kind of computer), type `make distclean'.  There is
-    also a `make maintainer-clean' target, but that is intended mainly
-    for the package's developers.  If you use it, you may have to get
-    all sorts of other programs in order to regenerate files that came
-    with the distribution.
-
-
-CMake build
------------
-
-With CMake you can generate a build setup in your choice of build
-system.  The one I'm most familiar with is `make`.
-
-Like the native build, the CMake build needs the libpq library and headers
-installed.  But in addition, it also needs the `pg_type.h` header installed.
-On some systems this will be in one of the `postgresql-server-dev-*` packages.
-
-That extra header is just to allow CMake to detect that you have a PostgreSQL
-development setup installed.  The build shouldn't actually need the file
-otherwise, so if you can't find the file, it may be enough to create an empty
-file in the right place.
-
-The CMake build works like:
- 1. Go into the directory where you would like to build the library and
-    its intermediate files.  This may be the source directory.
- 2. Enter `cmake <sourcedir>`, where `<sourcedir>` is the location of
-    the libpqxx source code.  This generates the build configuration.
- 3. Type `make' to compile the package.  (Add e.g. `-j8` to run up to 8
-    simultanerous compiler processes to speed this up.)
-
-
-Compilers and Options
-=====================
-
-   Some systems require unusual options for compilation or linking that
-the `configure' script does not know about.  You can give `configure'
-initial values for variables by setting them in the environment, or by
-adding them to the `configure` command line:
-
-     ./configure CXX='clang++' CXXFLAGS=-O3 LIBS=-lposix
-
-
-Compiling For Multiple Architectures
-====================================
-
-   You can compile the package for more than one kind of computer at the
-same time, by placing the object files for each architecture in their
-own directory.  To do this, you must use a version of `make' that
-supports the `VPATH' variable, such as GNU `make'.  `cd' to the
-directory where you want the object files and executables to go and run
-the `configure' script.  `configure' automatically checks for the
-source code in the directory that `configure' is in and in `..'.
-
-   If you have to use a `make' that does not supports the `VPATH'
-variable, you have to compile the package for one architecture at a time
-in the source code directory.  After you have installed the package for
-one architecture, use `make distclean' before reconfiguring for another
-architecture.
-
-
-Installation Names
-==================
-
-   By default, `make install' will install the package's files in
-`/usr/local/bin', `/usr/local/man', etc.  You can specify an
-installation prefix other than `/usr/local' by giving `configure' the
-option `--prefix=PATH'.
-
-   You can specify separate installation prefixes for
-architecture-specific files and architecture-independent files.  If you
-give `configure' the option `--exec-prefix=PATH', the package will use
-PATH as the prefix for installing programs and libraries.
-Documentation and other data files will still use the regular prefix.
-
-   In addition, if you use an unusual directory layout you can give
-options like `--bindir=PATH' to specify different values for particular
-kinds of files.  Run `configure --help' for a list of the directories
-you can set and what kinds of files go in them.
-
-   If the package supports it, you can cause programs to be installed
-with an extra prefix or suffix on their names by giving `configure' the
-option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
-
-
-Optional Features
-=================
-
-   Some packages pay attention to `--enable-FEATURE' options to
-`configure', where FEATURE indicates an optional part of the package.
-They may also pay attention to `--with-PACKAGE' options, where PACKAGE
-is something like `gnu-as' or `x' (for the X Window System).  The
-`README.md' should mention any `--enable-' and `--with-' options that the
-package recognizes.
-
-   For packages that use the X Window System, `configure' can usually
-find the X include and library files automatically, but if it doesn't,
-you can use the `configure' options `--x-includes=DIR' and
-`--x-libraries=DIR' to specify their locations.
-
-
-Specifying the System Type
-==========================
-
-   There may be some features `configure' can not figure out
-automatically, but needs to determine by the type of host the package
-will run on.  Usually `configure' can figure that out, but if it prints
-a message saying it can not guess the host type, give it the
-`--host=TYPE' option.  TYPE can either be a short name for the system
-type, such as `sun4', or a canonical name with three fields:
-     CPU-COMPANY-SYSTEM
-
-See the file `config.sub' for the possible values of each field.  If
-`config.sub' isn't included in this package, then this package doesn't
-need to know the host type.
-
-   If you are building compiler tools for cross-compiling, you can also
-use the `--target=TYPE' option to select the type of system they will
-produce code for and the `--build=TYPE' option to select the type of
-system on which you are compiling the package.
-
-
-Sharing Defaults
-================
-
-   If you want to set default values for `configure' scripts to share,
-you can create a site shell script called `config.site' that gives
-default values for variables like `CC', `cache_file', and `prefix'.
-`configure' looks for `PREFIX/share/config.site' if it exists, then
-`PREFIX/etc/config.site' if it exists.  Or, you can set the
-`CONFIG_SITE' environment variable to the location of the site script.
-A warning: not all `configure' scripts look for a site script.
-
-
-Operation Controls
-==================
-
-   `configure' recognizes the following options to control how it
-operates.
-
-`--cache-file=FILE'
-     Use and save the results of the tests in FILE instead of
-     `./config.cache'.  Set FILE to `/dev/null' to disable caching, for
-     debugging `configure'.
-
-`--help'
-     Print a summary of the options to `configure', and exit.
-
-`--quiet'
-`--silent'
-`-q'
-     Do not print messages saying which checks are being made.  To
-     suppress all normal output, redirect it to `/dev/null' (any error
-     messages will still be shown).
-
-`--srcdir=DIR'
-     Look for the package's source code in directory DIR.  Usually
-     `configure' can determine that directory automatically.
-
-`--version'
-     Print the version of Autoconf used to generate the `configure'
-     script, and exit.
-
-`configure' also accepts some other, not widely useful, options.
diff --git a/contrib/libs/libpqxx/NEWS b/contrib/libs/libpqxx/NEWS
deleted file mode 100644
index 7fa015859b..0000000000
--- a/contrib/libs/libpqxx/NEWS
+++ /dev/null
@@ -1,750 +0,0 @@
-6.4.5
- - Fixed "const" support in arguments to parameterised/prepared statements.
-6.4.4
- - Use pkg-config if pg-config is not available.
- - In CMake build, prefer CMake's config headers over any found in source tree.
-6.4.3
- - Updated copyright strings.
- - Added missing "stream" headers to autotools-based install.
- - Added stream headers to pqxx/pqxx header.
-6.4.2
- - Fix mistake for Windows in 6.4.1: use PQfreemem, not std::free.
- - Easily enable runtime checks in configure: "--enable-audit".
- - Enable optimisation in CircleCI build.
-6.4.1
- - Fixed more memory leaks.
-6.4.0
- - Half fix, half work around nasty notice processor life time bug.
- - Fix selective running of tests: "test/unit/runner test_infinities".
- - Added some missing `std::` qualifications.
-6.3.3
- - Throw more appropriate error when unable to read client encoding.
- - CMake build fixes.
-6.3.2
- - Conversion errors no longer throw pqxx::failure; always conversion_error!
- - Use C++17's built-in numeric string conversions, if available.
- - Query numeric precision in a more sensible, standard way.
- - Avoid "dead code" warning.
- - Replace obsolete autoconf macros.
- - Remove all "using namespace std".
- - CMake build fixes.
-6.3.1
- - Windows compile fix (CALLBACK is a macro there).
- - Work around Visual Studio 2017 not supporting ISO 646.
-6.3.0
- - New "table stream" classes by Joseph Durel: stream_from/stream_to.
- - Support weird characters in more identifiers: cursors, notifcations, etc.
- - Connection policies are deprecated.  It'll all be one class in 7.0!
- - Connection deactivation/reactivation is deprecated.
- - Some items that were documented as deprecated are now also declared as such.
- - Fix Windows bug where WSAPoll was never used.  Thanks dpolunin.
- - Fix Windows CMake build to link to socket libraries.  Thanks dpolunin.
- - Various other changes to the CMake build.
- - Fix failure when doing multiple string conversions with Visual C++.
- - Fix nested project builds in CMake.  Thanks Andrew Brownsword.
- - In Visual Studio, build for host architecture, not "x64".
- - Fix string conversion link error in Visual Studio.  Thanks Ivan Poiakov.
- - Fix string conversion to bool for "1".  Thanks Amaracs.
- - Fix in escaping of strings in arrays.  Thanks smirql.
- - Faster copying of results of large queries.  Thanks Vsevolod Strukchinsky.
- - Starting to handle encodings properly!  Thanks to Joseph Durel.
- - No longer using std::iterator (deprecated in C++17).
-6.2.5
- - Removed deprecated pqxx-config.
- - Build fix on Visual C++ when not defining NOMINMAX.
- - Reduce setup code for string conversions, hopefully improving speed.
- - Allow nul bytes in tablereader.
- - Support defining string conversions for enum types.
- - Fixed const/pure attributes warning in gcc 8.
- - Updated build documentation to mention CMake option.
- - Fixed a floating-point string conversion failure with Visual Studio 2017.
-6.2.4
- - Fix builds in paths containing non-ASCII characters.
- - New macro: PQXX_HIDE_EXP_OPTIONAL (to work around a client build error).
-6.2.3
- - Build fixes.
-6.2.2
- - Variable number of arguments to prepared or parameterised statement (#75).
- - Windows build fix (#76).
-6.2.1
- - Compile fixes.
-6.2.0
- - At last!  A check against version mismatch between library and headers.
- - Small compile fixes.
-6.1.1
- - Small compile fixes.
- - A particular error string would always come out empty.
-6.1.0
- - Dependencies among headers have changed.  You may need extra includes.
- - Library headers now include "*.hxx" directly, not the user-level headers.
- - Supports parsing of SQL arrays, when using "ASCII-like" encodings.
-6.0.0
- - C++11 is now required.  Your compiler must have shared_ptr, noexcept, etc.
- - Removed configure.ac.in; we now use configure.ac directly.
- - Removed pqxx::items.  Use the new C++11 initialiser syntax.
- - Removed maketemporary.  We weren't using it.
- - Can now be built outside the source tree.
- - New, simpler, lambda-friendly transactor framework.
- - New, simpler, prepared statements and parameterised statements.
- - Result rows can be passed around independently.
- - New exec0(): perform query, expect zero rows of data.
- - New exec1(): perform query, expect (and return) a single row of data.
- - New exec_n(): perform query, expect exactly n rows of data.
- - No longer defines Visual Studio's NOMINMAX in headers.
- - Much faster configure script.
- - Most configuration items are gone.
- - Retired all existing capability flags.
- - Uses WSAPoll() on Windows.
- - Documentation on readthedocs.org, thanks Tim Sheerman-Chase.
-5.1.0
- - Releases after this will require C++11!
- - Internal simplification to pqxx::result.
- - A row object now keeps its result object alive.
- - New exec() variants: "expect & return 1 row," "expect no rows," "expect n."
- - ChangeLog is gone.  It was a drag on maintenance.
-5.0.1
- - Exposed sqlstate in sql_error exception class.
-5.0
- - The PGSTD namespace alias is gone.  Use the std namespace directly.
- - pqxx::tuple is now pqxx::row, to avoid clashes with std::tuple.
- - Deprecated escape_binary functions dropped.
- - Deprecated notify_listener class dropped.
- - Support for many old compilers dropped.
- - Support for "long long" and "long double" types is always enabled.
- - No longer uses obsolete std::tr1 namespace; use plain std instead.
- - Now requires libpq 9.1 or better.
- - Requires server version 9.1 or better.
- - Support for REPEATABLE READ isolation level added.
- - Makefile fixes for Visual Studio 2013.
- - Supports C++11 and C++14.
- - No longer has obsolete debian & RPM packaging built in.
- - Fixed failure to abort uncommitted subtransactions on destruction.
- - Fixed failure to detect some integer overflows during conversion.
- - Build tooling uses /usr/bin/env python instead of /usr/bin/python.
- - New configure options: --with-postgres-include and --with-postgres-lib.
- - In g++ or compatible compilers, non-exported items are no longer accessible.
- - Many build fixes for various platforms and compilers.
-4.0
- - API change: noticers are gone!  Use errorhandlers to capture error output.
- - API change: tablereaders and tablewriters are gone; they weren't safe.
- - API change: prepared statements are now weakly-typed, and much simpler.
- - API change: fields and tuples are now stand-alone classes in ::pqxx.
- - API change: thread-safety field have_strerror_r is now have_safe_strerror.
- - API change: notify_listener has been replaced with notification_receiver.
- - notification_receiver takes a payload parameter.
- - Easier Visual C++ setup.
- - Absolutely requires a libpq version with PQescapeStringConn.
- - Absolutely requires libpq 8.0 or better.
- - Changes for C++0x.
- - Supports clang++.
- - Visual C++ makefiles now support new-style unit tests.
- - Sample headers for more recent Visual Studio versions.
- - Fixes binary-data escaping problems with postgres 9.0.
- - Fixes problems with binary-string handling and escaping.
- - Fixes compatibility problems between 9.x libpq and 7.x backend.
- - quote_name to escape SQL identifiers for use in queries.
- - syntax_error reports error's approximate location in the query.
- - On Windows, now uses ws2_32 instead of wsock32.
- - Various Windows build fixes.
- - Updated for gcc 4.6.0.
- - configure script supports --enable-documentation/--disable-documentation.
- - Streamlined test/release toolchain.
-3.1
- - Shared libraries are now versioned by ABI: 3.1 instead of 3.1.0 etc.
- - Threading behaviour is now documented, and can be queried.
- - Version information available at compile time.
- - Supports parameterized statements.
- - Result tuples now support slicing.
- - Configure with --with-tr1=boost to use BOOST shared_ptr.
- - String conversion now has its own header file.
- - Supports read-only transactions.
- - Fixed breakage with Solaris "make".
- - Uses shared_ptr if available.
- - binarystring::str() is no longer cached; no longer returns reference.
- - Fixed problems in Visual C++ Makefile for test suite.
- - Fixed problems with RPM packaging.
- - Fixed build problem on RedHat/CentOS 5.
- - Lets you check whether a prepared statement has been defined.
- - "Varargs" prepared statements.
- - Unnamed prepared statements now supported.
- - Results have iterator as well as const_iterator.
- - Rewrite of robusttransaction logic; may actually do its job now.
- - Connections support async query cancel from signal handler or thread.
- - More documentation for performance features.
-3.0
- - Website is now at http://pqxx.org/ (no redirects)
- - Completely replaced cursor classes
- - More helpful error messages on failed connections
- - More detailed hierarchy of constraint-violation exception classes
- - trigger is now called notify_listener, trigger header is now notify-listen
- - New mixin base class pqxx_exception distinguishes libpqxx exception types
- - Quoting is back!  transaction_base::quote() & connection_base::quote()
- - Several build & documentation problems with Visual C++ fixed
- - Compile fixes for gcc 4.2, 4.3
- - Compile fixes for Sun Studio Express 5.9
- - Uses strlcpy() where available, instead of strncpy()
- - Keeps better track of applicable text encodings
- - Fixed bug with prepared statement parameters in separate C++ statements
- - robusttransaction now works for multiple users
- - Pipeline lets you cancel ongoing queries, e.g. because they run for too long
- - Fixed broken escaping of binary values in tablewriter
- - Floating-point types now represented with full precision
- - Proper unit tests for new functionality
- - New traits-based system for adding data types
- - Floating-point infinities now supported
- - Flushing/completing a pipeline now frees up the transaction for other use
- - Completely reworked test suite, builds and runs much faster
- - tablewriter supports writing of raw lines
-2.6.9
- - Removed old 1.x API (that means all identifiers with capital letters!)
- - Tested with all current libpq versions and oldest/newest supported backends
- - No longer have old OnCommit()/OnAbort()/OnDoubt() callbacks in transactor!
- - Fixes failure when closing cursors with upper-case letters in their names
- - Fixes bug when adding triggers to connections that aren't open yet
- - Fixes bug when removing triggers
- - Fixes small memory leak when preparing statements
- - Fixes many problems with older backends
- - Fixes bug in result::swap(): protocol versions were not swapped
- - Some errors went undetected when using certain libpq versions
- - Fixes prepared statements on new libpq versions talking to old backends
- - Can estimate server version if libpq does not know how to obtain it
- - Greatly reduced memory usage while escaping strings
- - With Visual C++, creates lib/ directory if not already present
- - Useful error messages when preparing statements
- - Allows prepared statements to be registered explicitly
- - Support for "long long" types; enable with PQXX_ALLOW_LONG_LONG macro
- - Compilation errors for older libpq versions fixed
- - Some new small utility classes for disabling notice processing etc.
- - Result sets remember the queries that yielded them
- - New test script, pqxx-fulltest, tests against all current postgres versions
- - Connections can simulate failure
- - Adds password encryption function
-2.6.8
- - Fixes bug: binary parameters to prepared statements truncated at nul bytes
- - New, more specific exception types to distinguish errors from server
- - Resolved serious problems with generated reference documentation
- - Automatically detect Windows socket library with MinGW
- - Windows "make" fixed to run from main directory, not win32
- - Fixes "mktemp" problems on some BSD-based platforms
- - pqxx-config is deprecated; use pkg-config instead
- - On GNU/Linux, uses poll() instead of select() to avoid file descriptor limit
- - Will provide server and protocol version information where available
- - New cursor class, absolute_cursor
-2.6.7
- - New escape functions for binary data: transaction_base::esc_raw()
- - Improved detection of socket libraries, especially for MinGW
- - Works around bug in some versions of GNU grep 2.5.1
- - Fixes problem with configuration headers
- - Fixes PQprepare() detection
- - Fixes incomplete Visual C++ Makefile
- - Fixes compile error in workaround for older libpq versions
- - Removes "rpath" link option
-2.6.6
- - New, encoding-safe string-escaping functions
- - Upper-case letters now allowed in prepared-statement names
- - Fixes crash in test005
- - More Visual C++ improvements
- - Removed collaboration diagrams from reference docs
- - New templating system for generating Windows Makefiles etc.
-2.6.5
- - Visual C++ users: copy win32/common-sample to win32/common before editing it
- - Should fix problems finding socket library on MinGW
- - Even more work on Visual C++ problems
- - Updated documentation for Visual C++ users
- - Fixed bug in prepared statements (mostly visible on Visual C++)
- - Nested transactions work harder to detect backend support
-2.6.4
- - Massively improved compatibility with Windows and Visual C++
- - Fixed late initialization of "direct" connection state
- - Fixed problem with initialization of connection capabilities
- - Fixed configuration bug for libpq in nonstandard locations
- - Sample configuration header for libpq found in PostgreSQL 8.1
-2.6.3
- - Radical rework of prepared statements; INCOMPATIBLE INTERFACE CHANGE!
- - Dropped support for g++ 2.95
- - Emulate prepared statements support on old libpq or old backend
- - Bug fix: missing tutorial (release script now tests for this)
- - Automatically links in socket library on Windows or Solaris, if needed
- - Bug fix: check for std namespace didn't work
- - Fixes for Cygwin/MSYS/MinGW
-2.6.2
- - Bug fix: connection state was not set up properly in some common cases
- - Bug fix: headers were installed in "include" instead of "include/pqxx"
- - Bug fix: sqlesc(string) broke with multibyte or multiple encodings
- - namedclass is now used as a virtual base; affects all subclass constructors
- - Initial implementation of subtransactions
- - Detect more connection capabilities
- - Standard library namespace can be set from configure script's command line
- - Completely reworked connection hierarchy, with separate policy objects
- - Clients can now define their own connection policies
- - Paved the way for client-defined thread synchronization
- - Now lives at http://thaiopensource.org/development/libpqxx/
-2.6.1
- - Hugely improved recognition of different strerror_r() versions
- - Resolved link problems with gcc 4.0 and shared library
-2.6.0
- - New macro PQXX_SHARED defines whether to use/build libpqxx as shared library
- - Robusttransaction compatible with PostgreSQL 8.1
- - Infrastructure for querying connection/backend capabilities at runtime
- - Greatly improved cursor support
- - Connection reactivation can be inhibited explicitly
- - Tries even harder to make sense of conflicting strerror_r() definitions
- - Detects connection failures that libpq glosses over
- - Reference documentation grouped into more coherent sections
- - Assumes strerror() is threadsafe on systems that have no strerror_r()
- - Now allows connection's socket number to be queried
- - New internal_error class for libpqxx-internal errors
- - With Visual C++, doesn't redefine NOMINMAX if it is defined already
- - Several compatibility improvements for Visual C++
- - Fixes and workarounds for HP-UX and HP aCC compiler
- - Phased old cursor interface out of test suite; tests ported to new interface
- - Added documentation on thread safety
- - New thread safety model
- - Large objects have functions to tell current position
- - Minor updates to tutorial (somebody pay me and I'll do more :)
- - No longer needs libpq-fs.h header
- - Meaningful error messages for ambiguous string conversions fixed
-2.5.6
- - Support null parameters to prepared statements (use C-style char pointers)
-2.5.5
- - Diagnoses connection failure during result transfer
- - Fixes invalid -R link option in pqxx-config
-2.5.4
- - Fix workaround code for older libpq versions without PQunescapeBytea()
- - Work around grep bug in Fedora Core 4 that broke configure in UTF-8 locales
- - In Visual C++, assume libpqxx is a DLL when linking to std library as DLL
- - Missing documentation in distribution archive is back again
- - Export fewer symbols from library binary with gcc 4.0
- - Releases now automatically tested against gcc 4.0
- - Meaningful link errors for additional ambiguous string conversions
- - DLL symbol exports now automatically tested before each release
-2.5.3
- - Greatly improved builds on MinGW with MSYS
- - All known problems with MinGW fixed
- - Fix bugs in stream classes that caused failures and crashes with STLport
- - Detects and uses STLport automatically
-2.5.2
- - Fix memory leaks
- - Fix problems with NaN (not-a-number values) on some compilers
-2.5.1
- - Fix configure script; broke when very recent libpqxx was already installed
- - Fix cursor breakage when "long" is more than 32 bits
- - Fix cases where new-style abort/doubt handlers are used
- - Fix for division-by-zero error in Visual C++ (changed sample headers)
- - Improved checking for strerror_r in configure script
- - Fix for problem MinGW has with configure script
- - Fix spurious failure of Oid check in configure script
-2.5.0
- - Fix race condition in removing triggers
- - Fix binary string conversion with older libpq
- - Fix some error strings that may previously have come out wrong
- - No longer includes any libpq headers while compiling client code
- - Improved thread safety: avoid strerror() where possible
- - Prepared statements
- - Translate more error conditions to std::bad_alloc exception
- - Clearer and more specific explanations for configuration failures
- - Improved documentation
- - Looks for standard library in global namespace as well as std
- - Accepts standard C library in std namespace
- - Release script automatically tests with a range of compilers, not just one
- - Compatible with g++ 2.95 again; this time it's tested automatically
-2.4.4
- - Fix problems building shared library in Visual C++
- - Fix autobuild in Debian, which was broken by mistake in BSD grep workaround
- - Fix conversion of string to floating-point type NaN
- - Remove stray CVS directories from distribution archive
- - Workaround for Visual C++ problem when issuing messages from destructors
- - Yet more workarounds for Visual C++ bugs
- - Fix situation where connection state might not be restored after failure
- - Fix configuration problem on SunOS
- - Network speedup in connection setup with pending variables and/or triggers
-2.4.3
- - Yet more workarounds for bugs in Visual C++ .NET 2003
- - Fixes for SunC++ 5.5
- - On Visual C++, now defines NOMINMAX, fixing large object support
- - Workaround for BSD grep
- - Improvements for builds from CVS
- - Sample config headers for Sun ONE Studio 8
-2.4.2
- - Fix minor problems with Apple's version of g++ 3.3
- - Fix problem with MingW on Windows
- - Workarounds and fixes for Visual C++.NET 2003
- - Renewed compatibility with g++ 2.95
- - More sample configuration headers
- - Updated reference documentation
- - Removed assert code
-2.4.1
- - Several bugs in icursor_iterator fixed; incompatible interface changes
- - Tightens throw specifications on begin(), end(), size(), capacity()
- - Containers define reference and pointer types
- - Implements swap() in all container types
- - Implements == and != in all container types
- - Stabilizes new (but still limited) cursor interface
- - icursor_iterator thinks purely in stride granularity
- - Introduces </<=/>/>= comparisons for icursor_iterators
- - Allows "adopted SQL cursors" in new cursor interface
- - Reference-counting in binarystrings, so they can be copied (and efficiently)
- - Fixes reference-to-temporary problem with std::reverse_iterator in results
- - Result/tuple reverse_iterators no longer require std::reverse_iterator
- - Includes some sample config headers (in config/sample-headers)
- - Replaces iffy autoconf checks (avoid failures with maintainer mode's -Werror)
- - Fixes incompatibility with some implementations of Unix "cut" program (again)
-2.4.0
- - Fixes incompatibility with some implementations of Unix "cut" program
- - Fixes "ptrdiff_t redefinition" problem in some environments
- - More container-like tuples, so fields can be iterated
- - All size_type types are now unsigned
- - More conservative robusttransaction--thanks Tom Lane
- - Stream-like extraction operator for result field conversion
- - Warnings about deprecated headers now suppressed while compiling library
- - Iterator constructors and copy assignments now have empty throw specs
-2.3.0
- - Generates MinGW Makefile automatically
- - Documents MinGW build
- - Workaround for missing prepared-statement support
- - Potential bug fixed in closing of connections
- - Fixed incompatibility between new cursor streams and older backends
- - Removed pqxxbench
-2.2.9
- - Bugfix in removing trigger
- - Added "failed connection" to regression test
- - Some changes to throw specifications
- - Putting libpq in its own namespace is optional
-2.2.8
- - Moved libpq into pqxx::internal::pq namespace
- - New config system separates compiler-related items from libpq-related ones
- - Auto-generates Visual C++ Makefile, should always remain up-to-date now
-2.2.7
- - Bugfix: from_string() didn't handle LONG_MIN--thanks Yannick Boivin
-2.2.6
- - Complete "pipeline" rewrite, for better exception safety
- - New garbage collection scheme for "result;" constructors now exception-free
-2.2.5
- - First new cursor classes!
- - Fixed strange failure in tablewriter during large insertions
- - Updated tutorial
-2.2.4
- - New utility class template, items<> for easy container initialization
- - New utility function template, separated_list()
- - Error handling bugfix in tablewriter
- - Fixed tablereader handling of lines ending in empty fields
- - tablereader lines no longer end in newline with old libpq versions
-2.2.3
- - Trigger names no longer need to be proper identifiers
- - Compile fixes for g++ 3.4.0 and other modern compilers
- - Tablestreams may specify column lists
- - Deprecated Quote() in favour of sqlesc(); improved quoting
- - Fixed generation of libpqxx.spec
-2.2.2
- - Bugfix in fieldstream w.r.t. reading strings on some systems
- - Renamed config.h to internalconfig.h to avoid confusion
- - New connection functions allow client to sleep until notification arrives
- - Notification functions return number of notifications received
- - Even fewer client-visible macros exported by libconfig.h
-2.2.1
- - New, 2.x-style string conversions without locale problem
- - Documentation improvements
- - Implemented result::swap()
-2.2.0
- - Installs to /usr/local by default, NOT to /usr/local/pqxx like before!
- - Uses Postgres-provided script to find Postgres (thanks Peter Eisentraut)
- - Which means no more configure arguments required on Irix (thanks Arjen Baart)
- - Fixes long-standing bug in result class!
- - New pipeline class for throughput optimization
- - New field stream class: read result field as C++ stream
- - Separate namespace pqxx::internal for definitions not relevant to the user
- - More Windows compilation fixes
- - SUN Workshop 6 compile fixes and workarounds (thanks Jon Meinecke)
- - Implemented reverse_iterator for result class
- - Checks for functional std::reverse_iterator template
- - Preliminary Makefile for MinGW compiler (thanks Pasquale Fersini)
- - Changed the way unique<> works
- - Checks for functional std::count_if()
- - Bugs fixed & test programs added
-2.1.3
- - Makefile fixes for Visual C++, thanks Paresh Patel
- - Library ABI versioning implemented, thanks Roger Leigh
- - Uses old SQL isolation level syntax for compatibility, thanks koun@sina.com
- - tablestreams can explicitly complete() before destructor
- - Bugfix in robusttransaction: forgot to set isolation level
- - Fixed off-by-ones in tablewriter escape code
- - tablestreams now use \n-style escape sequences
- - tablestreams support octal numbers
- - Freely definable "null" strings in tablestreams, as originally intended
- - Improved Debian packaging, thanks Roger Leigh
- - tablestreams use libpq's new-style COPY functions, if available
- - Extended automation of build/release procedure
- - tablewriter writes in nonblocking mode to help hide communication latency
- - Can get backend variables as well as set them
- - More configuration macro cleanups
- - Workaround for missing clear() in standard string
- - Merry Christmas!
-2.1.2
- - Compile fix for gcc libstdc++ 2.9, thanks Jaroslaw Staniek
- - Moved deprecated functions below current ones
- - Cleanups for Debian packaging (thanks Roger Leigh, new Debian maintainer!)
- - Updated authors listings
- - Bumped ABI version number for the first time (now 2:0:1)
-2.1.1
- - More workarounds for gcc 2.95
- - Automated tools keep test makefiles up to date
-2.1.0
- - Asynchronous connections
- - Fixed configure --includedir option (thanks Ray Dassen!)
- - Compile fixes for SUN Workshop 6, and one for gcc on FreeBSD 4.8
-2.0.0
- - New stable release!
- - Includes all changes since 1.5 release.
- - Workarounds for Microsoft Visual C++ 7 problems.  Thanks Costin Musteata!
- - No longer need to define PQXX_NO_PARTIAL_CLASS_TEMPLATE_SPECIALISATION
- - Integrated Windows configuration into regular configuration
- - Only uses #warning if preprocessor supports it
- - Works on libpq versions without PQ[un]escapeBytea()
-1.9.9
- - Minor documentation changes
-1.9.8
- - Workaround for compile problem with postgres 7.3
- - Convenience typedef for transaction<>: "work"
-1.9.7
- - binarystring rewritten and moved to its own file
- - binarystring::size() does not include terminating null byte!
- - Implemented escaping of binary strings
- - Fix in workaround for missing numeric_limits on some compilers
- - String conversion supported for unsigned char *
- - More helpful link errors for unsupported string conversions
- - Complete test coverage
-1.9.6
- - Fixes in "field table" support
- - Improved coexistence with client program's config.h, if any
- - Prefixed autoconf macros used in headers with "PQXX_"
-1.9.5
- - Header file contents moved to .hxx files for editor filetype recognition
- - Fixes wrong timestamp for include/pqxx/result in 1.9.4 distribution
-1.9.4
- - Fixes Visual C++ build problem when compiling as library
-1.9.3
- - Quick release for various minor changes
-1.9.2
- - Renamed most public member functions to all-lower-case names
- - <pqxx/all> (previously <pqxx/all.h> is now called <pqxx/pqxx>
-1.9.1
- - tablestream destructor crashed if table didn't exist (thanks Sean [Rogers?])
- - Renamed all header files to remove ".h" suffix
- - Tables created by regression test now prefixed with "pqxx" for safety
- - Large objects now considered stable
- - Migrated tutorial from SGML to DocBook XML (thanks Wichert Akkerman)
- - Added tests 57-59
- - Fixed compile error in largeobject
- - Updated Windows makefiles
-1.9.0
- - EVERYTHING HAS CHANGED.  Read the list or run into trouble!
- - CURSOR HAS INCOMPATIBLE CHANGES AND MAY BE REPLACED COMPLETELY
- - CACHEDRESULT HAS INCOMPATIBLE CHANGES (won't compile without changes)
- - REVISE YOUR TRANSACTORS; now templatized on transaction type
- - Finally got license file in order
- - Incompatible change in setting transactor quality of service
- - Cursors require serializable isolation level (checked at link time)
- - Renamed Connection_base to connection_base, Connection to connection,
-   LazyConnection to lazyconnection
- - Renamed LargeObject to largeobject, LargeObjectAccess to largeobjectaccess
- - Renamed Noticer to noticer
- - Renamed Trigger to trigger
- - Renamed Result to result, Tuple to tuple, Field to field
- - Renamed Unique<> to unique<>
- - Renamed CachedResult to cachedresult
- - Transformed Transaction Taxonomy (TTT):
- - Renamed Transaction_base to transaction_base
- - Renamed Transaction to transaction
- - Renamed Transactor to transactor<> (now a template)
- - Implemented transaction isolation levels as compile-time static properties
- - transaction and robusttransaction now templatized on their isolation levels
- - cachedresult requires serializable isolation level (checked at link time)
- - Now need to include pqxx/transactor.h yourself if you need transactors
- - Large objects require real backend transaction at compile time
- - New type oid and constant oid_none for row identifiers resp. null oid
- - Added some forgotten PQXX_LIBEXPORTs
- - Tweaked documentation in many places
-1.8.1
- - By popular request: more convenient way to read field values
- - Documented locale sensitivity of ToString(), FromString(), Field::to()
-1.8.0
- - Compiles on gcc 2.95 again (heavy streambuf workarounds in largeobject.h)
- - ConnectionItf renamed to Connection_base, TransactionItf to Transaction_base
- - connectionitf.h is now connection_base.h, transactionitf.h connection_base.h
-1.7.8
- - BinaryString class for unescaping bytea strings
- - PQAlloc template keeps track of libpq-allocated objects
- - Removed some consts in Unique<>, ConnectionItf, sorry!
- - Can now set session variables on connections, transactions
-1.7.7
- - ./configure also looks for postgres in /usr/local/pgsql
- - test007 now uses SQL_ASCII as its test encoding
- - integrated Greg Hookey's Debian packaging
-1.7.6
- - added postgres library (libpq) to dynamic link path
-1.7.5
- - added test052 - test055
- - added Result::Tuple::ColumnNumber()
- - also test setting of client encodings
- - removed superfluous versions of to_file() from large object classes
-1.7.4
- - new exception class, sql_error, remembers query text
- - moved exception classes to new file include/pqxx/except.h
- - test cases report texts of any failed queries
- - added tools/rmlo.cxx
-1.7.3
- - default constructors for connection classes
- - revamped seeking operations on large objects
- - better error messages in large objects
- - added test050, test051
-1.7.2
- - more workarounds for Sun CC 5.1, thanks Jeroen van Erp!
- - preliminary support for "named" queries
- - can now Quote() string constants
- - included Doxyfile in distribution archive
- - helps avoid Windows memory allocation problem in DLLs
- - allows setting of client character set encoding
-1.7.1
- - regenerated documentation
-1.7.0
- - removed all deprecated features
- - connection string documentation in README
- - separate Connection, LazyConnection classes
- - made test001 more concise
- - added test049
-1.6.4
- - configure script now respects different std namespace
-1.6.3
- - olostream, lostream now flush themselves before closing
- - fixed compilation problems when using ToString<>() on a plain char *
- - compilation fixes for Sun compiler (thanks Jeroen van Erp!)
- - added .pc file for pkgconfig (thanks Ray Dassen!)
-1.6.2
- - Debian packaging added to distribution archive
- - new ilostream, olostream, lostream classes
-1.6.1
- - large object's cunlink() replaced by remove()
- - default constructor for LargeObject
-1.6.0
- - new large objects interface
- - added test048
-1.5.0
- - allow result fields to be written to streams
- - removed confusing CachedResult::clear()
- - minor documentation updates
- - added test046, test047
- - added <pqxx/all.h> convenience header
-1.4.5
- - fixed crash CachedResult that was less shallow than I thought
- - fixed quoting problem with adopted SQL cursors
-1.4.4
- - (forgot to save cursor.cxx with new constructor in 1.4.4, sorry)
-1.4.3
- - all tests now have three-digit numbers
- - Cursor can adopt SQL cursor returned by a function
-1.4.2
- - bugfix in CachedResult when accessing empty Results
- - minor documentation improvements
-1.4.1
- - documents new homepage: http://pqxx.tk/
- - Connection constructor accepts null connect string
- - Exec() now also takes queries as C++ strings
-1.4.0
- - Connection::IsOpen() renamed to is_open()
- - NoticeProcessor replaced by Noticer (with C++ linkage)
-1.3.7:
- - detects nasty rare problem case with Cursors in unknown positions
-1.3.6:
- - fixed detection of missing PQescapeString().  Thanks David Wright!
-v1.3.5:
- - documented Windows build procedure
- - fixed problem with upper-case letters in cursor names.  Thanks key88!
-2003-01-19 16:00, v1.3.4:
- - support long double type
- - clarified some error messages
-2003-01-08 18:45, v1.3.3:
- - fix missing include in test13
-2003-01-07 02:30, v1.3.2:
- - configure looks for postgres includes/library in more places, thanks Ray!
-2003-01-02 23:00, v1.3.1:
- - bugfix in Cursor positioning
-2003-01-02 20:30, v1.3.0:
- - absolute positioning for Cursor
- - better documentation on cursors
- - reduced, but improved test suite output
-2002-12-23 17:30, v1.2.8:
- - Cursor::Move() returns number of rows skipped
- - new typedef Cursor::size_type
-2002-12-14 23:30, v1.2.7:
- - test suite now distinguishes expected errors from unexpected ones
-2002-12-09 20:00, v1.2.6:
- - fixed some Cursor test cases for change in postgres 7.3
- - added important warning to Cursor
-2002-12-09 02:00, v1.2.5:
- - added important warning to CachedResult
-2002-12-08 14:14, v1.2.4:
- - fixed compile error on some systems in include/pqxx/util.h
-2002-12-04 12:00, v1.2.3:
- - workaround for broken <sys/select.h> on some systems
- - fixed Quote() bug
-2002-12-03 01:30, v1.2.2:
- - fixed serious CachedResult bug
- - added test41
-2002-12-02 17:00, v1.2.1:
- - hopefully fixed cursor bug with PostgreSQL 7.3
-2002-12-01 22:00, v1.2.0:
- - new CachedResult class
-2002-11-07 13:15, v1.1.4:
- - workaround for missing InvalidOid definition
-2002-10-23 16:00, v1.1.3:
- - Cursor & TableStream hierarchy now work on any transaction type
- - get no. of affected rows & oid of inserted row from Result
- - increased test coverage
-2002-10-21 01:30, v1.1.2:
- - updated build procedure
- - Debian packaging improvements
-2002-09-25 03:00, v1.1.1:
- - supports activating/deactivating of connections
- - various Connection getters now activate deferred connection first
-2002-09-23 01:00, v1.1.0:
- - supports lazy connections (added 19 test cases just for these)
- - greatly reduced performance overhead for RobustTransaction
- - removed id field from RobustTransaction's transaction log tables
-2002-09-14 20:00, v1.0.1:
- - now lives on GBorg
- - various packaging updates
-2002-06-12 17:30, v0.5.1:
- - no longer have to destroy one transaction before creating the next
-2002-06-07 17:15, v0.5.0:
- - "make install" now finally installs headers!
- - distribution now includes SGML (DocBook) version of tutorial
-2002-06-04 15:00, v0.4.4:
- - may now have multiple triggers with same name on single connection
-2002-06-02 23:00, v0.4.3:
- - fixed TableReader problem with \t and \n
-2002-06-01 21:00, v0.4.2:
- - hopefully fixes compile problem with broken std::iterator
- - configure no longer requires --with-postgres-include=/usr/include/postgresql
-2002-05-29 22:00, v0.4.1:
- - can now also handle bool, unsigned char, short field types
-2002-05-27 22:30, v0.4.0:
- - RENAMED Transactor::TRANSACTIONTYPE to argument_type for STL conformance
- - RENAMED Result::Field::name() to Name()
- - documentation improvements
- - minor optimizations
-2002-05-18 00:00, v0.3.1:
- - removed broken postgres_fe.h dependency (hopefully permanent fix)
-2002-05-12 22:45, v0.3.0:
- - also looks for postgres_fe.h in postgres' internal/ directory (tmp fix)
-2002-05-05 01:30, v0.2.3:
- - extensive build instructions in README
- - make check now controlled through PG environment variables
-2002-05-04 19:30, v0.2.2:
- - more STL conformance
- - fixed regression test
- - test6 now copies "orgevents" to "events" by default
-2002-04-28 23:45 Version bumped to 0.2
-2002-04-28 23:45 Self-generated distribution archive
-2002-04-27 14:20 Replaced automake symlinks with actual files
-2002-04-07 02:30 Released with configure script
-2002-03-29 01:15 Not yet released.  Still integrating autogen stuff...
diff --git a/contrib/libs/libpqxx/README-UPGRADE b/contrib/libs/libpqxx/README-UPGRADE
deleted file mode 100644
index f0368d6875..0000000000
--- a/contrib/libs/libpqxx/README-UPGRADE
+++ /dev/null
@@ -1,11 +0,0 @@
-NOTICES FOR USERS UPGRADING FROM EARLIER VERSIONS TO 6.x
-
-As of 6.0, libpqxx requires C++11 or better.  Make sure that your libpqxx is
-built against the same version of the C++ standard as your own application, or
-there may be build problems.
-
-It may be possible to paper over some mismatches.  If your application build
-fails with errors about `std::experimental::optional`, try defining a macro
-`PQXX_HIDE_EXP_OPTIONAL` in your application's build.  This will suppress
-support for `std::experimental::optional` even if libpqxx was built to assume
-that the feature is present.
diff --git a/contrib/libs/libpqxx/README.md b/contrib/libs/libpqxx/README.md
deleted file mode 100644
index 754bb02a40..0000000000
--- a/contrib/libs/libpqxx/README.md
+++ /dev/null
@@ -1,489 +0,0 @@
-libpqxx
-=======
-
-Welcome to libpqxx, the C++ API to the PostgreSQL database management system.
-
-Compiling this package requires PostgreSQL to be installed -- including the C
-headers for client development.  The library builds on top of PostgreSQL's
-standard C API, libpq, though this fact is almost completely hidden from
-programmes which use libpqxx.
-
-As of release 6.0, C++11 is the minimum supported C++ version.  Make sure your
-compiler supports this, and if necessary, that you have support for C++11
-configured.
-
-**Version 7.0 will require C++17.**  However, it's probably not a problem if
-your compiler does not implement C++17 fully.  Initially the 7.x series will
-only require some basic C++17 features such as `std::string_view`.  More
-advanced use may follow later.
-
-Also, **7.0 will make some breaking changes in rarely used APIs:**
- * All `connection` classes will be folded into a single class.
- * Custom `connection` classes will no longer be supported.
- * Connection reactivation will be explicit: _you_ call `activate()` if needed.
- * "String traits" (for string conversions) will have a slightly different API.
-
-Find libpqxx on Github: https://github.com/jtv/libpqxx
-
-
-Building libpqxx
-----------------
-
-There are three very different ways of building libpqxx:
- 1. Using CMake, on any system which supports it.
- 2. On Unix-like systems, using a `configure` script.
- 3. With Visual Studio on Windows, using supplied project files and headers.
-
-The CMake build should work on any system where CMake is supported.  This is a
-recently contributed alternative build, so if you run into problems, your help
-could be crucial in fixing them.
-
-The "Unix-like" section applies to systems that look like Unix: GNU/Linux,
-Apple OSX and the BSD family, AIX, HP-UX, Irix, Solaris, etc.  Microsoft
-Windows with a Unix-like environment such as Cygwin or MinGW installed should
-also work in the same way.
-
-There is a separate section below for a Visual C++ build on Windows.  It takes
-a bit of work, and if the CMake build works well, we may drop support for the
-Windows/Visual C++ build later.
-
-
-### Using CMake
-
-On CMake the standard way of working is to have the source tree in one
-directory, and build in another.  (The `configure` script supports this as
-well, but that build is enough work that I didn't bother documenting it.)
-Let's say you have the libpqxx source tree in a location `$SOURCE`, and are
-building in a different location `$BUILD`.
-
-CMake also lets you choose whether to run the ultimate build through `make`,
-or some other tool.  The default on Unix-like systems is `make`, but you may
-have to look in the CMake documentation what works well on your system.
-
-For a default build, using those two directories, go into `$BUILD` and run:
-
-```shell
-    cmake $SOURCE
-```
-
-This sets up the build, in your current directory.
-
-Stay in the `$SOURCE` directory, and run:
-
-```shell
-    make
-```
-
-If you have multiple cores that you want to put to good use, use the `-j`
-option to make it run multiple jobs in parallel.  For instance, if you have 8
-CPU cores, you'll probably want to be compiling about 8 files simultaneously:
-
-```shell
-    make -j8
-```
-
-
-### On Unix-like systems
-
-For the Unix-like systems the procedure is the standard "configure, make, make
-install" sequence.  In order to run the test suite, you'll also need to set up a
-database for the tests to play with.
-
-Run the "configure" script with the `--help` option to see build and
-installation options.  You need to get these right before you compile.  Then:
-
-```shell
-    ./configure	# (plus any options you find appropriate)
-    make
-```
-
-This will compile the library.  You'll also want to run the test suite to make
-sure that everything works.  To prepare for that, you need to set up a
-disposable test database that the test suite to play with.  You'll want
-password-less authentication so that you won't need to log in for every test.
-
-In this example, the test database is called pqxx-test and runs on a server at
-IP address 192.168.1.99.  Before running the test, make sure you can log into
-your test database with psql, the command-line SQL shell that comes with
-PostgreSQL:
-
-```shell
-    PGHOST=192.168.1.99 PGDATฺABASE=pqxx-test psql
-```
-
-Once you have that working, use the same login parameters to run the libpqxx
-test suite:
-
-```shell
-    make PGHOST=192.168.1.99 PGDATABASE=pqxx-test check
-```
-
-
-Assuming that the test suite runs successfully, you are now ready to install.
-You'll typically need superuser privileges to run this command:
-
-```shell
-    make install
-```
-
-Now you should be able to link your own programs with libpqxx.
-
-If something went wrong along the way, or what you have isn't quite what you
-wanted, it's time to move on to that fineprint that we hinted at earlier.
-
-
-#### 1. Configure
-
-A word on the configure script.  It needs to find the C header and the binary
-for libpq, the C-level client library, so that the libpqxx build procedure can
-make use of them.
-
-The configure script finds these files by running a script called pg\_config
-that comes with PostgresQL.  If you have postgres installed, pg\_config should
-be somewhere on your system.  It will "know" where the relevant files are.  The
-configure script just needs to run it.
-
-Make sure that the folder containing pg\_config is in your executable path
-before you run the configure script, or it will fail with a message like:
-
-```
-configure: error: PostgreSQL configuration script pg_config was not found.
-```
-
-If you don't want to have pg\_config in your path for whatever reason, or you
-have multiple PostgreSQL installations on your system (each with their own copy
-of pg\_config) and wish to override the default version, add an option like
-this to your "configure" command line:
-
-```shell
-	PG_CONFIG=/home/me/postgres/bin/pg_config
-```
-
-Here, "/home/me/postgres/bin/pg\_config" is just an example of where your
-preferred copy of pg\_config might be.  This would tell the configure script
-that you wish to build a libpqxx based on the postgres version found in
-/home/me/postgres.
-
-About installing: if you wish to install libpqxx in a custom location, such as
-your home directory /home/me, you can specify this to the configure script
-before you build libpqxx.  You select the installation location using the
-configure script's --prefix option, e.g.: 
-
-```shell
-	./configure --prefix=/home/me
-```
-
-A custom location can be useful to keep locally-build software separate from
-packaged software.  Conventional installation locations for custom software on
-Unix-like systems are /usr/local and /opt.
-
-Custom installation locations can also be handy if you don't have administrator
-rights on the machine you're working on!
-
-The configure scripts supports many other options to tweak how and where
-libpqxx is to be built and installed; try the --help option to get an overview
-if you're interested.
-
-If configuration just plain won't work for whatever reason: take a look in the
-config/sample-headers/ directory.  Here you will find configuration headers for
-various compilers and libpq versions.  Pick the config-internal-\*.h and
-config-public-\*.h headers for the compiler and libpq version most closely
-matching your own, and see if they work for you.  You may also want to tweak
-them manually.
-
-
-#### 2. Make
-
-One problem some people have run into at this stage is that the header files
-for PostgreSQL need the OpenSSL header files to be installed.  If this happens
-to you, make sure openssl is installed and its headers are in your compiler's
-include path.
-
-
-#### 3. Make Check
-
-"Make check" is where you compile and run the test suite that verifies the
-library's functionality.
-
-The "make check" procedure needs a database to play with.  It will create and
-drop various tables in that database.  Use a throwaway database for this or
-risk losing data!
-
-(Actually the test only manipulates tables whose names start with "pqxx" so in
-practice the risk will be small.  But better safe than sorry: use a disposable
-test database separate from your own data.)
-
-To direct the test suite to the right database, set some or all of the
-following environment variables as needed for "make check":
-
-```
-	PGDATABASE	(name of database; defaults to your user name)
-	PGHOST		(database server; defaults to local machine)
-	PGPORT		(TCP port to connect to; default is 5432)
-	PGUSER		(your PostgreSQL user ID; defaults to your login name)
-	PGPASSWORD	(your PostgreSQL password, if needed)
-```
-
-Further environment variables that may be of use to you are documented in the
-libpq documentation and in the manpage for Postgres' command-line client, psql.
-
-Setting environment variables works differently depending on your shell, but
-try one of these:
-
-```shell
-    VARIABLE=value
-    export VARIABLE
-```
-
-or
-
-```shell
-    set VARIABLE=value
-```
-
-Try printing the variable afterwards to make sure.  The command is normally
-
-```shell
-    echo $VARIABLE
-```
-
-If you set the variable successfully, it should print the value you assigned.
-It will print nothing if you failed to set the variable.
-
-On Unix-like systems, postgres may be listening on a Unix domain socket instead
-of a TCP port.  The socket will appear as a file somewhere in the filesystem
-with a name like .s.PGSQL.5432.  To connect to this type of socket, set PGHOST
-to the directory where you find this file, as an absolute path.  For example,
-it may be "/tmp" or "/var/run" or "/var/run/postgresql".  The leading slash
-tells libpq that this is not a network address but a local Unix socket.
-
-
-#### 4. Make Install
-
-This is where you install the libpqxx library and header files to your system.
-
-Assuming this succeeds, you should now be able to build your own programs by
-adding the location of the header files (e.g. /usr/local/pqxx/include) to your
-compiler's include path when compiling your application.  Similarly, add the
-location of the library binary (e.g. /usr/local/pqxx/lib) to your library
-search path when linking your application.  See the documentation and the test
-programs for more information on using libpqxx.
-
-If you link with the dynamic version of the library, you may find that your
-program fails to run because the run-time loader cannot find the library.
-
-There are several ways around that.  Pick the first option that works for you:
-1. by linking to the static version of the library, or
-2. adding a link to the dynamic libpqxx library somewhere in your system's
-   standard library locations, or
-3. adding libpqxx's lib/ directory to your loader's search path before
-   running your program.
-
-On Unix-like systems including GNU/Linux, the loader's search path can be
-extended by setting the LD\_LIBRARY\_PATH variable.
-
-Enjoy!
-
-
-### On Microsoft Windows
-
-Project files for Visual C++ are provided in the win32 directory, along with
-some other Windows-specific material.  These are very old, so if you run into
-problems, please let us know what we can do to fix them.  One known problem is
-that _folder names with spaces in them_ cause trouble.  If you run into
-trouble, try using the alternative build using CMake!
-
-As yet another alternative, if you are running a Unix-like environment such as
-Cygwin, you may want to try if the Unix build procedure works for you.  In
-theory it should be possible to run the configure script and build with Visual
-C++ or any other compiler, so long as you have a reasonably Unix-like shell
-environment.
-
-If you do proceed with the Visual C++ files, you'll need to copy the most
-appropriate compile-time configuration files from various subdirectories in
-config/example-headers/ to include/pqxx.  You'll want to tweak them manually
-to define the exact features your system, compiler, and PostgreSQL versions
-support.  On a Unix-like system the configure script would do this for you.
-
-Before trying to compile with Visual C++, you'll at least need to copy the file
-win32/common-sample to win32/common, and edit the latter to reflect the proper
-paths to your PostgreSQL headers and the libpq library.  See the win32
-subdirectory for more documentation.
-
-
-#### Manual Configuration: config-\*-\*.h
-
-Normally, on any vaguely Unix-like system, the configuration headers (called
-config-internal-\*.h for the library's internal use, config-public-\*.h for
-both the library and client programs) are generated from config.h.in.  All
-these files, once generated, are situated in the include/pqxx/ directory.
-
-The configitems file lists all configuration items and where they go; but see
-win32/INSTALL.txt for a detailed description of how these files work.
-
-Getting the compiler-related configuration right can take several stages of
-trying to build, looking at error messages, looking for configuration items
-that may be related, changing them, and building again.  If nothing seems to
-help, register an issue on Github.  Be sure to read the FAQ though, because
-there are some known problems.
-
-
-#### Windows-Specific Build Problems
-
-One problem specific to Windows is that apparently it doesn't let you free
-memory in a DLL that was allocated in the main program or in another DLL, or
-vice versa.  This can cause trouble when setting your own notice handlers to
-process error or warning output.  Recommended practice is to build libpqxx as
-a static library, not a DLL.
-
-
-Documentation
--------------
-
-The doc/ directory contains API reference documentation and a tutorial, both in
-HTML format.  These are also available online.
-
-For more detailed information, look at the header files themselves.  These are
-in the include/pqxx/ directory.  The reference documentation is extracted from
-the headers using a program called Doxygen.
-
-When learning about programming with libpqxx, you'll want to start off by
-reading about the `connection_base` class and its children, as well as the
-`transaction_base` class.
-
-For programming examples, take a look at the test programs in the test/
-directory.  If you don't know how a certain function or class is used, try
-searching the test programs for that name.
-
-
-Programming with libpqxx
-------------------------
-
-Your first program will involve the libpqxx classes "connection" (see headers
-`pqxx/connection_base.hxx` and `pqxx/connection.hxx`), and `work` (a
-convenience alias for `transaction<>` which conforms to the interface defined
-in `pqxx/transaction_base.hxx`).
-
-These `*.hxx` headers are not the ones you include in your program.  Instead,
-include the versions without filename suffix (e.g. `pqxx/connection_base`).
-Those will include the actual .hxx files for you.  This was done so that
-includes are in standard C++ style (as in `<iostream>` etc.), but an editor
-will still recognize them as files containing C++ code.
-
-Continuing the list of classes, you will most likely also need the result class
-(`pqxx/result.hxx`).  In a nutshell, you create a `connection` based on a
-Postgres connection string (see below), create a `work` in the context of that
-connection, and run one or more queries on the work which return `result`
-objects.  The results are containers of rows of data, each of which you can
-treat as an array of strings: one for each field in the row.  It's that simple.
-
-Here is a simple example program to get you going, with full error handling:
-
-```c++
-#include <iostream>
-#include <pqxx/pqxx>
-
-int main()
-{
-    try
-    {
-        pqxx::connection C;
-        std::cout << "Connected to " << C.dbname() << std::endl;
-        pqxx::work W(C);
-
-        pqxx::result R = W.exec("SELECT name FROM employee");
-
-        std::cout << "Found " << R.size() << "employees:" << std::endl;
-        for (auto row: R)
-            std::cout << row[0].c_str() << std::endl;
-
-        std::cout << "Doubling all employees' salaries..." << std::endl;
-        W.exec("UPDATE employee SET salary = salary*2");
-
-        std::cout << "Making changes definite: ";
-        W.commit();
-        std::cout << "OK." << std::endl;
-    }
-    catch (const std::exception &e)
-    {
-        std::cerr << e.what() << std::endl;
-        return 1;
-    }
-    return 0;
-}
-```
-
-
-Connection strings
-------------------
-
-Postgres connection strings state which database server you wish to connect to,
-under which username, using which password, and so on.  Their format is defined
-in the documentation for libpq, the C client interface for PostgreSQL.
-Alternatively, these values may be defined by setting certain environment
-variables as documented in e.g. the manual for psql, the command line interface
-to PostgreSQL.  Again the definitions are the same for libpqxx-based programs.
-
-The connection strings and variables are not fully and definitively documented
-here; this document will tell you just enough to get going.  Check the
-PostgreSQL documentation for authoritative information.
-
-The connection string consists of attribute=value pairs separated by spaces,
-e.g. "user=john password=1x2y3z4".  The valid attributes include:
-
-- `host`
-	Name of server to connect to, or the full file path (beginning with a
-	slash) to a Unix-domain socket on the local machine.  Defaults to
-	"/tmp".  Equivalent to (but overrides) environment variable PGHOST.
-
-- `hostaddr`
-	IP address of a server to connect to; mutually exclusive with "host".
-
-- `port`
-	Port number at the server host to connect to, or socket file name
-	extension for Unix-domain connections.  Equivalent to (but overrides)
-	environment variable PGPORT.
-
-- `dbname`
-	Name of the database to connect to.  A single server may host multiple
-	databases.  Defaults to the same name as the current user's name.
-	Equivalent to (but overrides) environment variable PGDATABASE.
-
-- `user`
-	User name to connect under.  This defaults to the name of the current
-	user, although PostgreSQL users are not necessarily the same thing as
-	system users.
-
-- `requiressl`
-	If set to 1, demands an encrypted SSL connection (and fails if no SSL
-	connection can be created).
-
-Settings in the connection strings override the environment variables, which in
-turn override the default, on a variable-by-variable basis.  You only need to
-define those variables that require non-default values.
-
-
-Linking with libpqxx
---------------------
-
-To link your final program, make sure you link to both the C-level libpq library
-and the actual C++ library, libpqxx.  With most Unix-style compilers, you'd do
-this using the options
-
-```
-	-lpqxx -lpq
-```
-
-while linking.  Both libraries must be in your link path, so the linker knows
-where to find them.  Any dynamic libraries you use must also be in a place
-where the loader can find them when loading your program at runtime.
-
-Some users have reported problems using the above syntax, however, particularly
-when multiple versions of libpqxx are partially or incorrectly installed on the
-system.  If you get massive link errors, try removing the "-lpqxx" argument from
-the command line and replacing it with the name of the libpqxx library binary
-instead.  That's typically libpqxx.a, but you'll have to add the path to its
-location as well, e.g. /usr/local/pqxx/lib/libpqxx.a.  This will ensure that the
-linker will use that exact version of the library rather than one found
-elsewhere on the system, and eliminate worries about the exact right version of
-the library being installed with your program..
diff --git a/contrib/libs/libpqxx/include/pqxx/array b/contrib/libs/libpqxx/include/pqxx/array
deleted file mode 100644
index 97311d1c18..0000000000
--- a/contrib/libs/libpqxx/include/pqxx/array
+++ /dev/null
@@ -1,4 +0,0 @@
-/** Handling of SQL arrays.
- */
-// Actual definitions in .hxx file so editors and such recognize file type.
-#include "pqxx/array.hxx"
diff --git a/contrib/libs/libpqxx/include/pqxx/array.hxx b/contrib/libs/libpqxx/include/pqxx/array.hxx
deleted file mode 100644
index dbb464c540..0000000000
--- a/contrib/libs/libpqxx/include/pqxx/array.hxx
+++ /dev/null
@@ -1,101 +0,0 @@
-/** Handling of SQL arrays.
- *
- * DO NOT INCLUDE THIS FILE DIRECTLY; include pqxx/field instead.
- *
- * Copyright (c) 2000-2019, Jeroen T. Vermeulen.
- *
- * See COPYING for copyright license.  If you did not receive a file called
- * COPYING with this source code, please notify the distributor of this mistake,
- * or contact the author.
- */
-#ifndef PQXX_H_ARRAY
-#define PQXX_H_ARRAY
-
-#include "pqxx/compiler-public.hxx"
-#include "pqxx/compiler-internal-pre.hxx"
-
-#include "pqxx/internal/encoding_group.hxx"
-#include "pqxx/internal/encodings.hxx"
-
-#include <stdexcept>
-#include <string>
-#include <utility>
-
-
-namespace pqxx
-{
-/// Low-level array parser.
-/** Use this to read an array field retrieved from the database.
- *
- * This parser will only work reliably if your client encoding is UTF-8, ASCII,
- * or a single-byte encoding which is a superset of ASCII (such as Latin-1).
- *
- * Also, the parser only supports array element types which use either a comma
- * or a semicolon ("," or ";") as the separator between array elements.  All
- * built-in types use comma, except for one which uses semicolon, but some
- * custom types may not work.
- *
- * The input is a C-style string containing the textual representation of an
- * array, as returned by the database.  The parser reads this representation
- * on the fly.  The string must remain in memory until parsing is done.
- *
- * Parse the array by making calls to @c get_next until it returns a
- * @c juncture of "done".  The @c juncture tells you what the parser found in
- * that step: did the array "nest" to a deeper level, or "un-nest" back up?
- */
-class PQXX_LIBEXPORT array_parser
-{
-public:
-  /// What's the latest thing found in the array?
-  enum juncture
-  {
-    /// Starting a new row.
-    row_start,
-    /// Ending the current row.
-    row_end,
-    /// Found a NULL value.
-    null_value,
-    /// Found a string value.
-    string_value,
-    /// Parsing has completed.
-    done,
-  };
-
-// XXX: Actually _pass_ encoding group!
-  /// Constructor.  You don't need this; use @c field::as_array instead.
-  explicit array_parser(
-	const char input[],
-	internal::encoding_group=internal::encoding_group::MONOBYTE);
-
-  /// Parse the next step in the array.
-  /** Returns what it found.  If the juncture is @c string_value, the string
-   * will contain the value.  Otherwise, it will be empty.
-   *
-   * Call this until the @c juncture it returns is @c done.
-   */
-  std::pair<juncture, std::string> get_next();
-
-private:
-  const char *const m_input;
-  const std::string::size_type m_end;
-  internal::glyph_scanner_func *const m_scan;
-
-  /// Current parsing position in the input.
-  std::string::size_type m_pos;
-
-  std::string::size_type scan_single_quoted_string() const;
-  std::string parse_single_quoted_string(std::string::size_type end) const;
-  std::string::size_type scan_double_quoted_string() const;
-  std::string parse_double_quoted_string(std::string::size_type end) const;
-  std::string::size_type scan_unquoted_string() const;
-  std::string parse_unquoted_string(std::string::size_type end) const;
-
-  std::string::size_type scan_glyph(std::string::size_type pos) const;
-  std::string::size_type scan_glyph(
-	std::string::size_type pos,
-	std::string::size_type end) const;
-};
-} // namespace pqxx
-
-#include "pqxx/compiler-internal-post.hxx"
-#endif
diff --git a/contrib/libs/libpqxx/include/pqxx/basic_connection.hxx b/contrib/libs/libpqxx/include/pqxx/basic_connection.hxx
deleted file mode 100644
index 6e7372195a..0000000000
--- a/contrib/libs/libpqxx/include/pqxx/basic_connection.hxx
+++ /dev/null
@@ -1,107 +0,0 @@
-/** Definition of the pqxx::basic_connection class template.
- *
- * Instantiations of basic_connection bring connections and policies together.
- *
- * DO NOT INCLUDE THIS FILE DIRECTLY; include pqxx/basic_connection instead.
- *
- * Copyright (c) 2000-2019, Jeroen T. Vermeulen.
- *
- * See COPYING for copyright license.  If you did not receive a file called
- * COPYING with this source code, please notify the distributor of this mistake,
- * or contact the author.
- */
-#ifndef PQXX_H_BASIC_CONNECTION
-#define PQXX_H_BASIC_CONNECTION
-
-#include "pqxx/compiler-public.hxx"
-#include "pqxx/compiler-internal-pre.hxx"
-
-#include <cstddef>
-#include <memory>
-#include <string>
-
-#include "pqxx/connection_base.hxx"
-
-
-namespace pqxx
-{
-
-/// Base-class template for all libpqxx connection types.
-/** @deprecated In libpqxx 7, all built-in connection types will be implemented
- * as a single class.  You'll specify the connection policy as an optional
- * constructor argument.
- *
- * Combines connection_base (the highly complex class implementing essentially
- * all connection-related functionality) with a connection policy (a simpler
- * helper class determining the rules that govern the process of setting up the
- * underlying connection to the backend).
- *
- * The pattern used to combine these classes is the same as for
- * basic_transaction.  Through use of the template mechanism, the policy object
- * is embedded in the basic_connection object so that it does not need to be
- * allocated separately.  This also avoids the need for virtual functions in
- * this class.
- */
-template<typename CONNECTPOLICY> class basic_connection_base :
-  public connection_base
-{
-public:
-  basic_connection_base() :
-    connection_base(m_policy),
-    m_options(std::string{}),
-    m_policy(m_options)
-	{ init(); }
-
-  /// The parsing of options is the same as libpq's PQconnect.
-  /// See: https://www.postgresql.org/docs/10/static/libpq-connect.html
-  explicit basic_connection_base(const std::string &opt) :
-    connection_base(m_policy),
-    m_options(opt),
-    m_policy(m_options)
-	{init();}
-
-  /// See: @c basic_connection(const std::string &opt)
-  explicit basic_connection_base(const char opt[]) :
-    basic_connection_base(opt ? std::string{opt} : std::string{}) {}
-
-  explicit basic_connection_base(std::nullptr_t) : basic_connection_base() {}
-
-  ~basic_connection_base() noexcept
-	{ close(); }
-
-  const std::string &options() const noexcept				//[t01]
-	{return m_policy.options();}
-
-private:
-  /// Connect string.  @warn Must be initialized before the connector!
-  std::string m_options;
-  /// Connection policy.  @warn Must be initialized after the connect string!
-  CONNECTPOLICY m_policy;
-};
-
-
-/// Concrete connection type template.
-/** @deprecated In libpqxx 7, all built-in connection types will be implemented
- * as a single class.  You'll specify the connection policy as an optional
- * constructor argument.
- */
-template<typename CONNECTPOLICY> struct basic_connection :
-	basic_connection_base<CONNECTPOLICY>
-{
-  PQXX_DEPRECATED basic_connection() =default;
-  PQXX_DEPRECATED explicit basic_connection(const std::string &opt) :
-	basic_connection(opt) {}
-  PQXX_DEPRECATED explicit basic_connection(const char opt[]) :
-	basic_connection(opt) {}
-
-  PQXX_DEPRECATED explicit basic_connection(std::nullptr_t) :
-	basic_connection() {}
-
-  using basic_connection_base<CONNECTPOLICY>::options;
-};
-
-} // namespace
-
-#include "pqxx/compiler-internal-post.hxx"
-
-#endif
diff --git a/contrib/libs/libpqxx/include/pqxx/binarystring b/contrib/libs/libpqxx/include/pqxx/binarystring
deleted file mode 100644
index 4214f0257d..0000000000
--- a/contrib/libs/libpqxx/include/pqxx/binarystring
+++ /dev/null
@@ -1,4 +0,0 @@
-/** BYTEA (binary string) conversions.
- */
-// Actual definitions in .hxx file so editors and such recognize file type.
-#include "pqxx/binarystring.hxx"
diff --git a/contrib/libs/libpqxx/include/pqxx/binarystring.hxx b/contrib/libs/libpqxx/include/pqxx/binarystring.hxx
deleted file mode 100644
index 4262938ef3..0000000000
--- a/contrib/libs/libpqxx/include/pqxx/binarystring.hxx
+++ /dev/null
@@ -1,157 +0,0 @@
-/** Representation for raw, binary data.
- *
- * DO NOT INCLUDE THIS FILE DIRECTLY; include pqxx/binarystring instead.
- *
- * Copyright (c) 2000-2019, Jeroen T. Vermeulen.
- *
- * See COPYING for copyright license.  If you did not receive a file called
- * COPYING with this source code, please notify the distributor of this mistake,
- * or contact the author.
- */
-#ifndef PQXX_H_BINARYSTRING
-#define PQXX_H_BINARYSTRING
-
-#include "pqxx/compiler-public.hxx"
-#include "pqxx/compiler-internal-pre.hxx"
-
-#include <memory>
-#include <string>
-
-#include "pqxx/result.hxx"
-
-
-namespace pqxx
-{
-
-/// Binary data corresponding to PostgreSQL's "BYTEA" binary-string type.
-/** @ingroup escaping-functions
- *
- * This class represents a binary string as stored in a field of type bytea.
- * The raw value returned by a bytea field contains escape sequences for certain
- * characters, which are filtered out by binarystring.
- *
- * Internally a binarystring is zero-terminated, but it may also contain zero
- * bytes, just like any other byte value.  So don't assume that it can be
- * treated as a C-style string unless you've made sure of this yourself.
- *
- * The binarystring retains its value even if the result it was obtained from is
- * destroyed, but it cannot be copied or assigned.
- *
- * \relatesalso transaction_base::esc_raw
- *
- * To convert the other way, i.e. from a raw series of bytes to a string
- * suitable for inclusion as bytea values in your SQL, use the transaction's
- * esc_raw() functions.
- *
- * @warning This class is implemented as a reference-counting smart pointer.
- * Copying, swapping, and destroying binarystring objects that refer to the same
- * underlying data block is <em>not thread-safe</em>.  If you wish to pass
- * binarystrings around between threads, make sure that each of these operations
- * is protected against concurrency with similar operations on the same object,
- * or other objects pointing to the same data block.
- */
-class PQXX_LIBEXPORT binarystring
-{
-public:
-  using char_type = unsigned char;
-  using value_type = std::char_traits<char_type>::char_type;
-  using size_type = size_t;
-  using difference_type = long;
-  using const_reference = const value_type &;
-  using const_pointer = const value_type *;
-  using const_iterator = const_pointer;
-  using const_reverse_iterator = std::reverse_iterator<const_iterator>;
-
-  binarystring(const binarystring &) =default;
-
-  /// Read and unescape bytea field
-  /** The field will be zero-terminated, even if the original bytea field isn't.
-   * @param F the field to read; must be a bytea field
-   */
-  explicit binarystring(const field &);					//[t62]
-
-  /// Copy binary data from std::string.
-  explicit binarystring(const std::string &);
-
-  /// Copy binary data of given length straight out of memory.
-  binarystring(const void *, size_t);
-
-  /// Size of converted string in bytes
-  size_type size() const noexcept { return m_size; }			//[t62]
-  /// Size of converted string in bytes
-  size_type length() const noexcept { return size(); }			//[t62]
-  bool empty() const noexcept { return size()==0; }			//[t62]
-
-  const_iterator begin() const noexcept { return data(); }		//[t62]
-  const_iterator cbegin() const noexcept { return begin(); }
-  const_iterator end() const noexcept { return data()+m_size; }		//[t62]
-  const_iterator cend() const noexcept { return end(); }
-
-  const_reference front() const noexcept { return *begin(); }		//[t62]
-  const_reference back() const noexcept					//[t62]
-	{ return *(data()+m_size-1); }
-
-  const_reverse_iterator rbegin() const					//[t62]
-	{ return const_reverse_iterator{end()}; }
-  const_reverse_iterator crbegin() const { return rbegin(); }
-  const_reverse_iterator rend() const					//[t62]
-	{ return const_reverse_iterator{begin()}; }
-  const_reverse_iterator crend() const { return rend(); }
-
-  /// Unescaped field contents
-  const value_type *data() const noexcept {return m_buf.get();}		//[t62]
-
-  const_reference operator[](size_type i) const noexcept		//[t62]
-	{ return data()[i]; }
-
-  PQXX_PURE bool operator==(const binarystring &) const noexcept;	//[t62]
-  bool operator!=(const binarystring &rhs) const noexcept		//[t62]
-	{ return not operator==(rhs); }
-
-  binarystring &operator=(const binarystring &);
-
-  /// Index contained string, checking for valid index
-  const_reference at(size_type) const;					//[t62]
-
-  /// Swap contents with other binarystring
-  void swap(binarystring &);						//[t62]
-
-  /// Raw character buffer (no terminating zero is added)
-  /** @warning No terminating zero is added!  If the binary data did not end in
-   * a null character, you will not find one here.
-   */
-  const char *get() const noexcept					//[t62]
-	{ return reinterpret_cast<const char *>(m_buf.get()); }
-
-  /// Read as regular C++ string (may include null characters)
-  /** @warning libpqxx releases before 3.1 stored the string and returned a
-   * reference to it.  This is no longer the case!  It now creates and returns
-   * a new string object.  Avoid repeated use of this function; retrieve your
-   * string once and keep it in a local variable.  Also, do not expect to be
-   * able to compare the string's address to that of an earlier invocation.
-   */
-  std::string str() const;						//[t62]
-
-private:
-  using smart_pointer_type = std::shared_ptr<value_type>;
-
-  /// Shorthand: construct a smart_pointer_type.
-  static smart_pointer_type make_smart_pointer(unsigned char *buf=nullptr)
-  {
-#if !(defined(_MSC_VER) && defined(__clang__))
-    return smart_pointer_type{
-	buf,
-	internal::freemallocmem_templated<unsigned char>};
-#else
-    return smart_pointer_type{buf, internal::freemallocmem};
-#endif
-  }
-
-  smart_pointer_type m_buf;
-  size_type m_size;
-};
-}
-
-#include "pqxx/compiler-internal-post.hxx"
-
-#endif
diff --git a/contrib/libs/libpqxx/include/pqxx/compiler-internal-post.hxx b/contrib/libs/libpqxx/include/pqxx/compiler-internal-post.hxx
deleted file mode 100644
index 6af34b5d30..0000000000
--- a/contrib/libs/libpqxx/include/pqxx/compiler-internal-post.hxx
+++ /dev/null
@@ -1,21 +0,0 @@
-/** Compiler deficiency workarounds for compiling libpqxx headers.
- *
- * To be included at the end of each libpqxx header, in order to restore the
- * client program's settings.
- *
- * Copyright (c) 2000-2019, Jeroen T. Vermeulen.
- *
- * See COPYING for copyright license.  If you did not receive a file called
- * COPYING with this source code, please notify the distributor of this mistake,
- * or contact the author.
- */
-// NO GUARDS HERE! This code should be executed every time!
-
-#ifdef _WIN32
-
-#ifdef _MSC_VER
-#pragma warning (pop) // Restore client program's warning state
-#endif
-
-#endif
-
diff --git a/contrib/libs/libpqxx/include/pqxx/compiler-internal-pre.hxx b/contrib/libs/libpqxx/include/pqxx/compiler-internal-pre.hxx
deleted file mode 100644
index ac3a7b89ab..0000000000
--- a/contrib/libs/libpqxx/include/pqxx/compiler-internal-pre.hxx
+++ /dev/null
@@ -1,35 +0,0 @@
-/** Compiler deficiency workarounds for compiling libpqxx headers.
- *
- * To be called at the start of each libpqxx header, in order to push the
- * client program's settings and apply libpqxx's settings.
- *
- * Must be balanced by an include of -header-post.hxx at the end
- * of the header.
- *
- * Copyright (c) 2000-2019, Jeroen T. Vermeulen.
- *
- * See COPYING for copyright license.  If you did not receive a file called
- * COPYING with this source code, please notify the distributor of this mistake,
- * or contact the author.
- */
-// NO GUARDS HERE! This code should be executed every time!
-
-#ifdef _WIN32
-#ifdef _MSC_VER
-
-// Save client program warning state, and set warning level 4.
-// Setting the warning level explicitly ensures that libpqxx
-// headers will work with this warning level as well.
-#pragma warning (push,4)
-
-#pragma warning (disable: 4251)
-#pragma warning (disable: 4273)
-#pragma warning (disable: 4275)
-#pragma warning (disable: 4355)
-#pragma warning (disable: 4511) // Copy constructor could not be generated.
-#pragma warning (disable: 4512) // Assignment operator could not be generated.
-#pragma warning (disable: 4996) // Deprecation warning, e.g. about strncpy().
-
-#endif // _MSC_VER
-#endif // _WIN32
-
diff --git a/contrib/libs/libpqxx/include/pqxx/compiler-internal.hxx b/contrib/libs/libpqxx/include/pqxx/compiler-internal.hxx
deleted file mode 100644
index 9743f47866..0000000000
--- a/contrib/libs/libpqxx/include/pqxx/compiler-internal.hxx
+++ /dev/null
@@ -1,42 +0,0 @@
-/** Compiler deficiency workarounds for compiling libpqxx itself.
- *
- * DO NOT INCLUDE THIS FILE when building client programs.
- *
- * Copyright (c) 2000-2019, Jeroen T. Vermeulen.
- *
- * See COPYING for copyright license.  If you did not receive a file called
- * COPYING with this source code, please notify the distributor of this mistake,
- * or contact the author.
- */
-#ifndef PQXX_H_COMPILER_INTERNAL
-#define PQXX_H_COMPILER_INTERNAL
-
-
-// Workarounds & definitions needed to compile libpqxx into a library
-#include "pqxx/config-internal-compiler.h"
-
-#ifdef _WIN32
-
-#ifdef PQXX_SHARED
-#undef  PQXX_LIBEXPORT
-#define PQXX_LIBEXPORT	__declspec(dllexport)
-#define PQXX_PRIVATE	__declspec()
-#endif	// PQXX_SHARED
-
-#ifdef _MSC_VER
-#pragma warning (disable: 4251 4275 4273)
-#pragma warning (disable: 4355)
-#pragma warning (disable: 4996) // Deprecation warning, e.g. about strncpy().
-#endif
-
-#elif defined(__GNUC__) && defined(PQXX_HAVE_GCC_VISIBILITY)	// !_WIN32
-
-#define PQXX_LIBEXPORT __attribute__ ((visibility("default")))
-#define PQXX_PRIVATE __attribute__ ((visibility("hidden")))
-
-#endif	// __GNUC__ && PQXX_HAVE_GCC_VISIBILITY
-
-
-#include "pqxx/compiler-public.hxx"
-
-#endif
diff --git a/contrib/libs/libpqxx/include/pqxx/compiler-public.hxx b/contrib/libs/libpqxx/include/pqxx/compiler-public.hxx
deleted file mode 100644
index 352956c237..0000000000
--- a/contrib/libs/libpqxx/include/pqxx/compiler-public.hxx
+++ /dev/null
@@ -1,122 +0,0 @@
-/** Compiler deficiency workarounds for libpqxx clients.
- *
- * Copyright (c) 2000-2019, Jeroen T. Vermeulen.
- *
- * See COPYING for copyright license.  If you did not receive a file called
- * COPYING with this source code, please notify the distributor of this mistake,
- * or contact the author.
- */
-#ifndef PQXX_H_COMPILER_PUBLIC
-#define PQXX_H_COMPILER_PUBLIC
-
-// Workarounds & definitions that need to be included even in library's headers
-#include "pqxx/config-public-compiler.h"
-
-// Some compilers, Visual Studio in particular, don't seem to support the
-// standard's ISO-646 keywords out of the box.
-#include <ciso646>
-
-
-#if defined(__GNUC__) && defined(PQXX_HAVE_GCC_CONST)
-/// Declare function without effects and without reading anything but its args.
-#define PQXX_CONST __attribute__ ((const))
-#else
-#define PQXX_CONST
-#endif
-
-#if defined(PQXX_HAVE_DEPRECATED)
-/// Mark an item as deprecated.
-#define PQXX_DEPRECATED [[deprecated]]
-#elif defined(__GNUC__) && defined(PQXX_HAVE_GCC_DEPRECATED)
-#define PQXX_DEPRECATED __attribute__ ((deprecated))
-#else
-#define PQXX_DEPRECATED
-#endif
-
-#if defined(__GNUC__) && defined(PQXX_HAVE_GCC_PURE)
-/// Declare function "pure": no side effects, only reads globals and its args.
-#define PQXX_PURE __attribute__ ((pure))
-#else
-#define PQXX_PURE
-#endif
-
-
-// Workarounds for Windows
-#ifdef _WIN32
-
-/* For now, export DLL symbols if _DLL is defined.  This is done automatically
- * by the compiler when linking to the dynamic version of the runtime library,
- * according to "gzh"
- */
-#if !defined(PQXX_LIBEXPORT) && defined(PQXX_SHARED)
-#define PQXX_LIBEXPORT __declspec(dllimport)
-#endif	// !PQXX_LIBEXPORT && PQXX_SHARED
-
-
-// Workarounds for Microsoft Visual C++
-#ifdef _MSC_VER
-
-// Suppress vtables on abstract classes.
-#define PQXX_NOVTABLE __declspec(novtable)
-
-// Automatically link with the appropriate libpq (static or dynamic, debug or
-// release).  The default is to use the release DLL.  Define PQXX_PQ_STATIC to
-// link to a static version of libpq, and _DEBUG to link to a debug version.
-// The two may be combined.
-#if defined(PQXX_AUTOLINK)
-#if defined(PQXX_PQ_STATIC)
-#ifdef _DEBUG
-#pragma comment(lib, "libpqd")
-#else
-#pragma comment(lib, "libpq")
-#endif
-#else
-#ifdef _DEBUG
-#pragma comment(lib, "libpqddll")
-#else
-#pragma comment(lib, "libpqdll")
-#endif
-#endif
-#endif
-
-// If we're not compiling libpqxx itself, automatically link with the
-// appropriate libpqxx library.  To link with the libpqxx DLL, define
-// PQXX_SHARED; the default is to link with the static library.  A static link
-// is the recommended practice.
-//
-// The preprocessor macro PQXX_INTERNAL is used to detect whether we
-// are compiling the libpqxx library itself.  When you compile the library
-// yourself using your own project file, make sure to include this macro.
-#if defined(PQXX_AUTOLINK) && !defined(PQXX_INTERNAL)
-  #ifdef PQXX_SHARED
-    #ifdef _DEBUG
-      #pragma comment(lib, "libpqxxD")
-    #else
-      #pragma comment(lib, "libpqxx")
-    #endif
-  #else // !PQXX_SHARED
-    #ifdef _DEBUG
-      #pragma comment(lib, "libpqxx_staticD")
-    #else
-      #pragma comment(lib, "libpqxx_static")
-    #endif
-  #endif
-#endif
-
-#endif	// _MSC_VER
-#endif	// _WIN32
-
-
-#ifndef PQXX_LIBEXPORT
-#define PQXX_LIBEXPORT
-#endif
-
-#ifndef PQXX_PRIVATE
-#define PQXX_PRIVATE
-#endif
-
-#ifndef PQXX_NOVTABLE
-#define PQXX_NOVTABLE
-#endif
-
-#endif
diff --git a/contrib/libs/libpqxx/include/pqxx/config-internal-compiler.h b/contrib/libs/libpqxx/include/pqxx/config-internal-compiler.h
deleted file mode 100644
index ddf45f0db7..0000000000
--- a/contrib/libs/libpqxx/include/pqxx/config-internal-compiler.h
+++ /dev/null
@@ -1,14 +0,0 @@
-/* Automatically generated from config.h: internal/compiler config. */
-
-#include <util/system/platform.h>
-
-#if defined(_linux_) || defined(_darwin_)
-
-#	define HAVE_POLL 1
-#	define HAVE_SYS_TIME_H 1
-#	define HAVE_SYS_TYPES_H 1
-#	define HAVE_UNISTD_H 1
-#	define PQXX_HAVE_CHARCONV_INT 1
-#	define PQXX_HAVE_GCC_VISIBILITY 1
-
-#endif
diff --git a/contrib/libs/libpqxx/include/pqxx/config-public-compiler.h b/contrib/libs/libpqxx/include/pqxx/config-public-compiler.h
deleted file mode 100644
index 5a6feb5739..0000000000
--- a/contrib/libs/libpqxx/include/pqxx/config-public-compiler.h
+++ /dev/null
@@ -1,11 +0,0 @@
-/* Automatically generated from config.h: public/compiler config. */
-
-#ifndef _MSC_VER
-#define PQXX_HAVE_DEPRECATED 1
-#endif
-#ifndef _MSC_VER
-#define PQXX_HAVE_GCC_CONST 1
-#define PQXX_HAVE_GCC_DEPRECATED 1
-#define PQXX_HAVE_GCC_PURE 1
-#endif
-#define PQXX_HAVE_OPTIONAL 1
diff --git a/contrib/libs/libpqxx/include/pqxx/connection b/contrib/libs/libpqxx/include/pqxx/connection
deleted file mode 100644
index d08e357e93..0000000000
--- a/contrib/libs/libpqxx/include/pqxx/connection
+++ /dev/null
@@ -1,6 +0,0 @@
-/** pqxx::connection and pqxx::lazyconnection classes.
- *
- * Different ways of setting up a backend connection.
- */
-// Actual definitions in .hxx file so editors and such recognize file type.
-#include "pqxx/connection.hxx"
diff --git a/contrib/libs/libpqxx/include/pqxx/connection.hxx b/contrib/libs/libpqxx/include/pqxx/connection.hxx
deleted file mode 100644
index cb00743fec..0000000000
--- a/contrib/libs/libpqxx/include/pqxx/connection.hxx
+++ /dev/null
@@ -1,170 +0,0 @@
-/** Definition of the pqxx::connection and pqxx::lazyconnection classes.
- *
- * Different ways of setting up a backend connection.
- *
- * DO NOT INCLUDE THIS FILE DIRECTLY; include pqxx/connection instead.
- *
- * Copyright (c) 2000-2019, Jeroen T. Vermeulen.
- *
- * See COPYING for copyright license.  If you did not receive a file called
- * COPYING with this source code, please notify the distributor of this mistake,
- * or contact the author.
- */
-#ifndef PQXX_H_CONNECTION
-#define PQXX_H_CONNECTION
-
-#include "pqxx/compiler-public.hxx"
-#include "pqxx/compiler-internal-pre.hxx"
-
-#include "pqxx/connectionpolicy.hxx"
-#include "pqxx/basic_connection.hxx"
-
-namespace pqxx
-{
-
-/**
- * @addtogroup connection Connection classes
- *
- * The connection classes are where the use of a database begins.  You must
- * connect to a database in order to access it.  Your connection represents a
- * session with the database.  In the context of that connection you can create
- * transactions, which in turn you can use to execute SQL.  A connection can
- * have only one regular transaction open at a time, but you can break your work
- * down into any number of consecutive transactions and there is also some
- * support for transaction nesting (using the subtransaction class).
- *
- * Many things come together in the connection classes.  Handling of error and
- * warning messages, for example, is defined by @e errorhandlers in the context
- * of a connection.  Prepared statements are also defined here.
- *
- * @warning In libpqxx 7, all built-in connection types will be implemented
- * as a single class.  You'll specify the connection policy as an optional
- * constructor argument.
- *
- * Several types of connections are available, including plain connection and
- * lazyconnection.  These types are aliases combining a derivative of the
- * connection_base class (where essentially all connection-related functionality
- * is defined) with a policy class which governs how the connection is to be
- * established.  You pass details such as the database you wish to connect to,
- * username and password, and so on as as PostgreSQL "connection string" and
- * certain environment variables that you can learn more about from the core
- * postgres documentation.
- *
- * See the connection_base documentation for a full list of features inherited
- * by all connection classes.  Connections can be deactivated and reactivated if
- * needed (within reason, of course--you can't do this in the middle of a
- * transaction), and where possible, disabled or broken connections are
- * transparently re-enabled when you use them again.  This is called
- * "reactivation," and you may need to understand it because you'll want it
- * disabled in certain situations.
- *
- * @warning Connection deactivation/reactivation will probably be removed in
- * libpqxx 7.  If your application relies on an ability to "put connections to
- * sleep" and reactivate them later, you'll need to wrap them in some way to
- * handle this.
- *
- * You can also set certain variables defined by the backend to influence its
- * behaviour for the duration of your session, such as the applicable text
- * encoding.  You can query the connection's capabilities (because some features
- * will depend on the versions of libpq and of the server backend that you're
- * using) and parameters that you set in your connection string and/or
- * environment variables.
- *
- * @{
- */
-
-/// Connection policy; creates an immediate connection to a database.
-/** This is the policy you typically need when you work with a database through
- * libpqxx.  It connects to the database immediately.  Another option is to
- * defer setting up the underlying connection to the database until it's
- * actually needed; the connect_lazy policy implements such "lazy" * behaviour.
- *
- * The advantage of having an "immediate" connection (as this policy gives you)
- * is that any errors in setting up the connection will occur during
- * construction of the connection object, rather than at some later point
- * further down your program.
- */
-class PQXX_LIBEXPORT connect_direct : public connectionpolicy
-{
-public:
-  /// The parsing of options is the same as in libpq's PQconnect.
-  /// See: https://www.postgresql.org/docs/10/static/libpq-connect.html
-  explicit connect_direct(const std::string &opts) : connectionpolicy{opts} {}
-  virtual handle do_startconnect(handle) override;
-};
-
-/// The "standard" connection type: connect to database right now
-using connection = basic_connection_base<connect_direct>;
-
-
-/// Lazy connection policy; causes connection to be deferred until first use.
-/** This is connect_direct's lazy younger brother.  It does not attempt to open
- * a connection right away; the connection is only created when it is actually
- * used.
- */
-class PQXX_LIBEXPORT connect_lazy : public connectionpolicy
-{
-public:
-  /// The parsing of options is the same as in libpq's PQconnect.
-  /// See: https://www.postgresql.org/docs/10/static/libpq-connect.html
-  explicit connect_lazy(const std::string &opts) : connectionpolicy{opts} {}
-  virtual handle do_completeconnect(handle) override;
-};
-
-
-/// A "lazy" connection type: connect to database only when needed
-using lazyconnection = basic_connection_base<connect_lazy>;
-
-
-/// Asynchronous connection policy; connects "in the background"
-/** Connection is initiated immediately, but completion is deferred until the
- * connection is actually needed.
- *
- * This may help performance by allowing the client to do useful work while
- * waiting for an answer from the server.
- */
-class PQXX_LIBEXPORT connect_async : public connectionpolicy
-{
-public:
-  /// The parsing of options is the same as in libpq's PQConnect
-  /// See: https://www.postgresql.org/docs/10/static/libpq-connect.html
-  explicit connect_async(const std::string &opts);
-  virtual handle do_startconnect(handle) override;
-  virtual handle do_completeconnect(handle) override;
-  virtual handle do_dropconnect(handle) noexcept override;
-  virtual bool is_ready(handle) const noexcept override;
-
-private:
-  /// Is a connection attempt in progress?
-  bool m_connecting;
-};
-
-
-/// "Asynchronous" connection type: start connecting, but don't wait for it
-using asyncconnection = basic_connection_base<connect_async>;
-
-
-/// Nonfunctional, always-down connection policy for testing/debugging purposes
-/** @warning You don't want to use this policy in normal code.
- * Written for debugging and testing, this "connection policy" always fails to
- * connect, and the internal connection pointer always remains null.
- */
-class PQXX_LIBEXPORT connect_null  : public connectionpolicy
-{
-public:
-  explicit connect_null(const std::string &opts) : connectionpolicy{opts} {}
-};
-
-
-/// A "dummy" connection type: don't connect to any database at all
-using nullconnection = basic_connection_base<connect_null>;
-
-/**
- * @}
- */
-
-}
-
-#include "pqxx/compiler-internal-post.hxx"
-
-#endif
diff --git a/contrib/libs/libpqxx/include/pqxx/connection_base b/contrib/libs/libpqxx/include/pqxx/connection_base
deleted file mode 100644
index 187b667cb3..0000000000
--- a/contrib/libs/libpqxx/include/pqxx/connection_base
+++ /dev/null
@@ -1,6 +0,0 @@
-/** pqxx::connection_base abstract base class.
- *
- * pqxx::connection_base encapsulates a frontend-to-backend connection.
- */
-// Actual definitions in .hxx file so editors and such recognize file type.
-#include "pqxx/connection_base.hxx"
diff --git a/contrib/libs/libpqxx/include/pqxx/connection_base.hxx b/contrib/libs/libpqxx/include/pqxx/connection_base.hxx
deleted file mode 100644
index 8809639873..0000000000
--- a/contrib/libs/libpqxx/include/pqxx/connection_base.hxx
+++ /dev/null
@@ -1,940 +0,0 @@
-/** Definition of the pqxx::connection_base abstract base class.
- *
- * pqxx::connection_base encapsulates a frontend to backend connection
- *
- * DO NOT INCLUDE THIS FILE DIRECTLY; include pqxx/connection_base instead.
- *
- * Copyright (c) 2000-2019, Jeroen T. Vermeulen.
- *
- * See COPYING for copyright license.  If you did not receive a file called
- * COPYING with this source code, please notify the distributor of this mistake,
- * or contact the author.
- */
-#ifndef PQXX_H_CONNECTION_BASE
-#define PQXX_H_CONNECTION_BASE
-
-#include "pqxx/compiler-public.hxx"
-#include "pqxx/compiler-internal-pre.hxx"
-
-#include <bitset>
-#include <list>
-#include <map>
-#include <memory>
-
-#include "pqxx/errorhandler.hxx"
-#include "pqxx/except.hxx"
-#include "pqxx/prepared_statement.hxx"
-#include "pqxx/strconv.hxx"
-#include "pqxx/util.hxx"
-#include "pqxx/version.hxx"
-
-
-/* Use of the libpqxx library starts here.
- *
- * Everything that can be done with a database through libpqxx must go through
- * a connection object derived from connection_base.
- */
-
-/* Methods tested in eg. self-test program test1 are marked with "//[t01]"
- */
-
-namespace pqxx
-{
-namespace internal
-{
-class reactivation_avoidance_exemption;
-class sql_cursor;
-
-class reactivation_avoidance_counter
-{
-public:
-  reactivation_avoidance_counter() =default;
-
-  void add(int n) noexcept { m_counter += n; }
-  void clear() noexcept { m_counter = 0; }
-  int get() const noexcept { return m_counter; }
-
-private:
-  int m_counter = 0;
-};
-
-}
-
-
-/// Encrypt password for given user.
-/** Use this when setting a new password for the user if password encryption is
- * enabled.  Inputs are the username the password is for, and the plaintext
- * password.
- *
- * @return encrypted version of the password, suitable for encrypted PostgreSQL
- * authentication.
- *
- * Thus the password for a user can be changed with:
- * @code
- * void setpw(transaction_base &t, const string &user, const string &pw)
- * {
- *   t.exec("ALTER USER " + user + " "
- *   	"PASSWORD '" + encrypt_password(user,pw) + "'");
- * }
- * @endcode
- */
-std::string PQXX_LIBEXPORT encrypt_password(				//[t00]
-	const std::string &user,
-	const std::string &password);
-
-
-namespace internal
-{
-namespace gate
-{
-class connection_dbtransaction;
-class connection_errorhandler;
-class connection_largeobject;
-class connection_notification_receiver;
-class connection_parameterized_invocation;
-class connection_pipeline;
-class connection_prepare_invocation;
-class connection_reactivation_avoidance_exemption;
-class connection_sql_cursor;
-class connection_transaction;
-class const_connection_largeobject;
-} // namespace pqxx::internal::gate
-} // namespace pqxx::internal
-
-
-/// connection_base abstract base class; represents a connection to a database.
-/** This is the first class to look at when you wish to work with a database
- * through libpqxx.  Depending on the implementing concrete child class, a
- * connection can be automatically opened when it is constructed, or when it is
- * first used, or somewhere inbetween.  The connection is automatically closed
- * upon destruction (if it hasn't been closed already).
- *
- * To query or manipulate the database once connected, use one of the
- * transaction classes (see pqxx/transaction_base.hxx) or preferably the
- * transactor framework (see pqxx/transactor.hxx).
- *
- * If a network connection to the database server fails, the connection will be
- * restored automatically (although any transaction going on at the time will
- * have to be aborted).  This also means that any information set in previous
- * transactions that is not stored in the database, such as temp tables or
- * connection-local variables defined with PostgreSQL's SET command, will be
- * lost.  Whenever you create such state, either keept it local to one
- * transaction, where possible, or inhibit automatic reactivation of the
- * connection using the inhibit_reactivation() method.
- *
- * When a connection breaks, you will typically get a broken_connection
- * exception.  This can happen at almost any point, and the details may depend
- * on which connection class (all derived from this one) you use.
- *
- * As a general rule, always avoid raw queries if libpqxx offers a dedicated
- * function for the same purpose.  There may be hidden logic to hide certain
- * complications from you, such as reinstating session variables when a
- * broken or disabled connection is reactivated.
- *
- * @warning On Unix-like systems, including GNU and BSD systems, your program
- * may receive the SIGPIPE signal when the connection to the backend breaks.  By
- * default this signal will abort your program.  Use "signal(SIGPIPE, SIG_IGN)"
- * if you want your program to continue running after a connection fails.
- */
-class PQXX_LIBEXPORT connection_base
-{
-public:
-  /// Explicitly close connection.
-  void disconnect() noexcept;						//[t02]
-
-   /// Is this connection open at the moment?
-  /** @warning This function is @b not needed in most code.  Resist the
-   * temptation to check it after opening a connection; instead, rely on the
-   * broken_connection exception that will be thrown on connection failure.
-   */
-  bool PQXX_PURE is_open() const noexcept;				//[t01]
-
- /**
-   * @name Activation
-   *
-   * @warning Connection deactivation/reactivation will probably be removed in
-   * libpqxx 7.  If your application relies on an ability to "put connections
-   * to sleep" and reactivate them later, you'll need to wrap them in some way
-   * to handle this.
-   *
-   * Connections can be temporarily deactivated, or they can break because of
-   * overly impatient firewalls dropping TCP connections.  Where possible,
-   * libpqxx will try to re-activate these when resume using them, or you can
-   * wake them up explicitly.  You probably won't need this feature, but you
-   * should be aware of it.
-   */
-  //@{
-  /// @deprecated Explicitly activate deferred or deactivated connection.
-  /** Use of this method is entirely optional.  Whenever a connection is used
-   * while in a deferred or deactivated state, it will transparently try to
-   * bring itself into an activated state.  This function is best viewed as an
-   * explicit hint to the connection that "if you're not in an active state, now
-   * would be a good time to get into one."  Whether a connection is currently
-   * in an active state or not makes no real difference to its functionality.
-   * There is also no particular need to match calls to activate() with calls to
-   * deactivate().  A good time to call activate() might be just before you
-   * first open a transaction on a lazy connection.
-   */
-  PQXX_DEPRECATED void activate();					//[t12]
-
-  /// @deprecated Explicitly deactivate connection.
-  /** Like its counterpart activate(), this method is entirely optional.
-   * Calling this function really only makes sense if you won't be using this
-   * connection for a while and want to reduce the number of open connections on
-   * the database server.
-   * There is no particular need to match or pair calls to deactivate() with
-   * calls to activate(), but calling deactivate() during a transaction is an
-   * error.
-   */
-  PQXX_DEPRECATED void deactivate();					//[t12]
-
-  /// @deprecated Disallow (or permit) connection recovery
-  /** A connection whose underlying socket is not currently connected to the
-   * server will normally (re-)establish communication with the server whenever
-   * needed, or when the client program requests it (although for reasons of
-   * integrity, never inside a transaction; but retrying the whole transaction
-   * may implicitly cause the connection to be restored).  In normal use this is
-   * quite a convenient thing to have and presents a simple, safe, predictable
-   * interface.
-   *
-   * There is at least one situation where this feature is not desirable,
-   * however.  Although most session state (prepared statements, session
-   * variables) is automatically restored to its working state upon connection
-   * reactivation, temporary tables and so-called WITH HOLD cursors (which can
-   * live outside transactions) are not.
-   *
-   * Cursors that live outside transactions are automatically handled, and the
-   * library will quietly ignore requests to deactivate or reactivate
-   * connections while they exist; it does not want to give you the illusion of
-   * being back in your transaction when in reality you just dropped a cursor.
-   * With temporary tables this is not so easy: there is no easy way for the
-   * library to detect their creation or track their lifetimes.
-   *
-   * So if your program uses temporary tables, and any part of this use happens
-   * outside of any database transaction (or spans multiple transactions), some
-   * of the work you have done on these tables may unexpectedly be undone if the
-   * connection is broken or deactivated while any of these tables exists, and
-   * then reactivated or implicitly restored before you are finished with it.
-   *
-   * If this describes any part of your program, guard it against unexpected
-   * reconnections by inhibiting reconnection at the beginning.  And if you want
-   * to continue doing work on the connection afterwards that no longer requires
-   * the temp tables, you can permit it again to get the benefits of connection
-   * reactivation for the remainder of the program.
-   *
-   * @param inhibit should reactivation be inhibited from here on?
-   *
-   * @warning Some connection types (the lazy and asynchronous types) defer
-   * completion of the socket-level connection until it is actually needed by
-   * the client program.  Inhibiting reactivation before this connection is
-   * really established will prevent these connection types from doing their
-   * work.  For those connection types, if you are sure that reactivation needs
-   * to be inhibited before any query goes across the connection, activate() the
-   * connection first.  This will ensure that definite activation happens before
-   * you inhibit it.
-   */
-  PQXX_DEPRECATED void inhibit_reactivation(bool inhibit)		//[t86]
-	{ m_inhibit_reactivation=inhibit; }
-
-  /// Make the connection fail.  @warning Do not use this except for testing!
-  /** Breaks the connection in some unspecified, horrible, dirty way to enable
-   * failure testing.
-   *
-   * Do not use this in normal programs.  This is only meant for testing.
-   */
-  void simulate_failure();						//[t94]
-  //@}
-
-  /// Invoke notice processor function.  The message should end in newline.
-  void process_notice(const char[]) noexcept;				//[t14]
-  /// Invoke notice processor function.  Newline at end is recommended.
-  void process_notice(const std::string &) noexcept;			//[t14]
-
-  /// Enable tracing to a given output stream, or nullptr to disable.
-  void trace(std::FILE *) noexcept;					//[t03]
-
-  /**
-   * @name Connection properties
-   *
-   * These are probably not of great interest, since most are derived from
-   * information supplied by the client program itself, but they are included
-   * for completeness.
-   */
-  //@{
-  /// Name of database we're connected to, if any.
-  /** @warning This activates the connection, which may fail with a
-   * broken_connection exception.
-   */
-  const char *dbname();							//[t01]
-
-  /// Database user ID we're connected under, if any.
-  /** @warning This activates the connection, which may fail with a
-   * broken_connection exception.
-   */
-  const char *username();						//[t01]
-
-  /// Address of server, or nullptr if none specified (i.e. default or local)
-  /** @warning This activates the connection, which may fail with a
-   * broken_connection exception.
-   */
-  const char *hostname();						//[t01]
-
-  /// Server port number we're connected to.
-  /** @warning This activates the connection, which may fail with a
-   * broken_connection exception.
-   */
-  const char *port();							//[t01]
-
-  /// Process ID for backend process.
-  /** Use with care: connections may be lost and automatically re-established
-   * without your knowledge, in which case this process ID may no longer be
-   * correct.  You may, however, assume that this number remains constant and
-   * reliable within the span of a successful backend transaction.  If the
-   * transaction fails, which may be due to a lost connection, then this number
-   * will have become invalid at some point within the transaction.
-   *
-   * @return Process identifier, or 0 if not currently connected.
-   */
-  int PQXX_PURE backendpid() const noexcept;				//[t01]
-
-  /// Socket currently used for connection, or -1 for none.  Use with care!
-  /** Query the current socket number.  This is intended for event loops based
-   * on functions such as select() or poll(), where multiple file descriptors
-   * are watched.
-   *
-   * Please try to stay away from this function.  It is really only meant for
-   * event loops that need to wait on more than one file descriptor.  If all you
-   * need is to block until a notification arrives, for instance, use
-   * await_notification().  If you want to issue queries and retrieve results in
-   * nonblocking fashion, check out the pipeline class.
-   *
-   * @warning Don't store this value anywhere, and always be prepared for the
-   * possibility that, at any given time, there may not be a socket!  The
-   * socket may change or even go away or be established during any invocation
-   * of libpqxx code on the connection, no matter how trivial.
-   */
-  int PQXX_PURE sock() const noexcept;					//[t87]
-
-  /**
-   * @name Capabilities
-   *
-   * Some functionality may only be available in certain versions of the
-   * backend, or only when speaking certain versions of the communications
-   * protocol that connects us to the backend.
-   */
-  //@{
-
-  /// Session capabilities.
-  /** No capabilities are defined at the moment: all capabilities that older
-   * versions checked for are now always supported.
-   */
-  enum capability
-  {
-    /// Not a capability value; end-of-enumeration marker
-    cap_end,
-  };
-
-
-  /// Does this connection seem to support the given capability?
-  /** Don't try to be smart by caching this information anywhere.  Obtaining it
-   * is quite fast (especially after the first time) and what's more, a
-   * capability may "suddenly" appear or disappear if the connection is broken
-   * or deactivated, and then restored.  This may happen silently any time no
-   * backend transaction is active; if it turns out that the server was upgraded
-   * or restored from an older backup, or the new connection goes to a different
-   * backend, then the restored session may have different capabilities than
-   * were available previously.
-   *
-   * Some guesswork is involved in establishing the presence of any capability;
-   * try not to rely on this function being exactly right.
-   *
-   * @warning Make sure your connection is active before calling this function,
-   * or the answer will always be "no."  In particular, if you are using this
-   * function on a newly-created lazyconnection, activate the connection first.
-   */
-  bool supports(capability c) const noexcept				//[t88]
-	{ return m_caps.test(c); }
-
-  /// What version of the PostgreSQL protocol is this connection using?
-  /** The answer can be 0 (when there is no connection); 3 for protocol 3.0; or
-   * possibly higher values as newer protocol versions are taken into use.
-   *
-   * If the connection is broken and restored, the restored connection could
-   * possibly use a different server and protocol version.  This would normally
-   * happen if the server is upgraded without shutting down the client program,
-   * for example.
-   */
-  int PQXX_PURE protocol_version() const noexcept;			//[t01]
-
-  /// What version of the PostgreSQL server are we connected to?
-  /** The result is a bit complicated: each of the major, medium, and minor
-   * release numbers is written as a two-digit decimal number, and the three
-   * are then concatenated.  Thus server version 9.4.2 will be returned as the
-   * decimal number 90402.  If there is no connection to the server, this
-   * returns zero.
-   *
-   * @warning When writing version numbers in your code, don't add zero at the
-   * beginning!  Numbers beginning with zero are interpreted as octal (base-8)
-   * in C++.  Thus, 070402 is not the same as 70402, and 080000 is not a number
-   * at all because there is no digit "8" in octal notation.  Use strictly
-   * decimal notation when it comes to these version numbers.
-   */
-  int PQXX_PURE server_version() const noexcept;			//[t01]
-  //@}
-
-  /// @name Text encoding
-  /**
-   * Each connection is governed by a "client encoding," which dictates how
-   * strings and other text is represented in bytes.  The database server will
-   * send text data to you in this encoding, and you should use it for the
-   * queries and data which you send to the server.
-   *
-   * Search the PostgreSQL documentation for "character set encodings" to find
-   * out more about the available encodings, how to extend them, and how to use
-   * them.  Not all server-side encodings are compatible with all client-side
-   * encodings or vice versa.
-   *
-   * Encoding names are case-insensitive, so e.g. "UTF8" is equivalent to
-   * "utf8".
-   *
-   * You can change the client encoding, but this may not work when the
-   * connection is in a special state, such as when streaming a table.  It's
-   * not clear what happens if you change the encoding during a transaction,
-   * and then abort the transaction.
-   */
-  //@{
-  /// Get client-side character encoding, by name.
-  std::string get_client_encoding() const;
-
-  /// Set client-side character encoding, by name.
-  /**
-   * @param Encoding Name of the character set encoding to use.
-   */
-  void set_client_encoding(const std::string &encoding);		//[t07]
-
-  /// Set client-side character encoding, by name.
-  /**
-   * @param Encoding Name of the character set encoding to use.
-   */
-  void set_client_encoding(const char encoding[]);			//[t07]
-
-  /// Get the connection's encoding, as a PostgreSQL-defined code.
-  int PQXX_PRIVATE encoding_id() const;
-
-  //@}
-
-  /// Set session variable
-  /** Set a session variable for this connection, using the SET command.  If the
-   * connection to the database is lost and recovered, the last-set value will
-   * be restored automatically.  See the PostgreSQL documentation for a list of
-   * variables that can be set and their permissible values.
-   * If a transaction is currently in progress, aborting that transaction will
-   * normally discard the newly set value.  However nontransaction (which
-   * doesn't start a real backend transaction) is an exception.
-   *
-   * @warning Do not mix the set_variable interface with manual setting of
-   * variables by executing the corresponding SQL commands, and do not get or
-   * set variables while a tablestream or pipeline is active on the same
-   * connection.
-   * @param Var Variable to set
-   * @param Value Value vor Var to assume: an identifier, a quoted string, or a
-   * number.
-   */
-  void set_variable(							//[t60]
-	const std::string &Var,
-	const std::string &Value);
-
-  /// Read session variable
-  /** Will try to read the value locally, from the list of variables set with
-   * the set_variable function.  If that fails, the database is queried.
-   * @warning Do not mix the set_variable interface with manual setting of
-   * variables by executing the corresponding SQL commands, and do not get or
-   * set variables while a tablestream or pipeline is active on the same
-   * connection.
-   */
-  std::string get_variable(const std::string &);			//[t60]
-  //@}
-
-
-  /**
-   * @name Notifications and Receivers
-   */
-  //@{
-  /// Check for pending notifications and take appropriate action.
-  /**
-   * All notifications found pending at call time are processed by finding
-   * any matching receivers and invoking those.  If no receivers matched the
-   * notification string, none are invoked but the notification is considered
-   * processed.
-   *
-   * Exceptions thrown by client-registered receivers are reported using the
-   * connection's errorhandlers, but the exceptions themselves are not passed
-   * on outside this function.
-   *
-   * @return Number of notifications processed
-   */
-  int get_notifs();							//[t04]
-
-
-  /// Wait for a notification to come in
-  /** The wait may also be terminated by other events, such as the connection
-   * to the backend failing.  Any pending or received notifications are
-   * processed as part of the call.
-   *
-   * @return Number of notifications processed
-   */
-  int await_notification();						//[t78]
-
-  /// Wait for a notification to come in, or for given timeout to pass
-  /** The wait may also be terminated by other events, such as the connection
-   * to the backend failing.  Any pending or received notifications are
-   * processed as part of the call.
-
-   * @return Number of notifications processed
-   */
-  int await_notification(long seconds, long microseconds);		//[t79]
-  //@}
-
-
-  /**
-   * @name Prepared statements
-   *
-   * PostgreSQL supports prepared SQL statements, i.e. statements that can be
-   * registered under a client-provided name, optimized once by the backend, and
-   * executed any number of times under the given name.
-   *
-   * Prepared statement definitions are not sensitive to transaction boundaries;
-   * a statement defined inside a transaction will remain defined outside that
-   * transaction, even if the transaction itself is subsequently aborted.  Once
-   * a statement has been prepared, only closing the connection or explicitly
-   * "unpreparing" it can make it go away.
-   *
-   * Use the @c pqxx::transaction_base::exec_prepared functions to execute a
-   * prepared statement.  Use @c prepared().exists() to find out whether a
-   * statement has been prepared under a given name.  See \ref prepared for a
-   * full discussion.
-   *
-   * Never try to prepare, execute, or unprepare a prepared statement manually
-   * using direct SQL queries.  Always use the functions provided by libpqxx.
-   *
-   * @{
-   */
-
-  /// Define a prepared statement.
-  /**
-   * The statement's definition can refer to a parameter using the parameter's
-   * positional number n in the definition.  For example, the first parameter
-   * can be used as a variable "$1", the second as "$2" and so on.
-   *
-   * Here's an example of how to use prepared statements.  Note the unusual
-   * syntax for passing parameters: every new argument is a parenthesized
-   * expression that is simply tacked onto the end of the statement!
-   *
-   * @code
-   * using namespace pqxx;
-   * void foo(connection_base &C)
-   * {
-   *   C.prepare("findtable", "select * from pg_tables where name=$1");
-   *   work W{C};
-   *   result R = W.exec_prepared("findtable", "mytable");
-   *   if (R.empty()) throw runtime_error{"mytable not found!"};
-   * }
-   * @endcode
-   *
-   * To save time, prepared statements aren't really registered with the backend
-   * until they are first used.  If this is not what you want, e.g. because you
-   * have very specific realtime requirements, you can use the @c prepare_now()
-   * function to force immediate preparation.
-   *
-   * The statement may not be registered with the backend until it is actually
-   * used.  So if, for example, the statement is syntactically incorrect, you
-   * may see a syntax_error here, or later when you try to call the statement,
-   * or during a @c prepare_now() call.
-   *
-   * @param name unique name for the new prepared statement.
-   * @param definition SQL statement to prepare.
-   */
-  void prepare(const std::string &name, const std::string &definition);
-
-  /// Define a nameless prepared statement.
-  /**
-   * This can be useful if you merely want to pass large binary parameters to a
-   * statement without otherwise wishing to prepare it.  If you use this
-   * feature, always keep the definition and the use close together to avoid
-   * the nameless statement being redefined unexpectedly by code somewhere else.
-   */
-  void prepare(const std::string &definition);
-
-  /// Drop prepared statement.
-  void unprepare(const std::string &name);
-
-  /// Request that prepared statement be registered with the server.
-  /** If the statement had already been fully prepared, this will do nothing.
-   *
-   * If the connection should break and be transparently restored, then the new
-   * connection will again defer registering the statement with the server.
-   * Since connections are never restored inside backend transactions, doing
-   * this once at the beginning of your transaction ensures that the statement
-   * will not be re-registered during that transaction.  In most cases, however,
-   * it's probably better not to use this and let the connection decide when and
-   * whether to register prepared statements that you've defined.
-   */
-  void prepare_now(const std::string &name);
-
-  /**
-   * @}
-   */
-
-  /// @deprecated Pre-C++11 transactor function.
-  /**
-   * This has been superseded by the new transactor framework and
-   * @c pqxx::perform.
-   *
-   * Invokes the given transactor, making at most Attempts attempts to perform
-   * the encapsulated code.  If the code throws any exception other than
-   * broken_connection, it will be aborted right away.
-   *
-   * @param T The transactor to be executed.
-   * @param Attempts Maximum number of attempts to be made to execute T.
-   */
-  template<typename TRANSACTOR>
-  PQXX_DEPRECATED void perform(const TRANSACTOR &T, int Attempts);	//[t04]
-
-  /// @deprecated Pre-C++11 transactor function.  Use @c pqxx::perform instead.
-  /**
-   * This has been superseded by the new transactor framework and
-   * @c pqxx::perform.
-   *
-   * @param T The transactor to be executed.
-   */
-  template<typename TRANSACTOR>
-  PQXX_DEPRECATED void perform(const TRANSACTOR &T)
-  {
-#include "pqxx/internal/ignore-deprecated-pre.hxx"
-    perform(T, 3);
-#include "pqxx/internal/ignore-deprecated-post.hxx"
-  }
-
-  /// Suffix unique number to name to make it unique within session context
-  /** Used internally to generate identifiers for SQL objects (such as cursors
-   * and nested transactions) based on a given human-readable base name.
-   */
-  std::string adorn_name(const std::string &);				//[90]
-
-  /**
-   * @defgroup escaping-functions String-escaping functions
-   */
-  //@{
-  /// Escape string for use as SQL string literal on this connection
-  std::string esc(const char str[]);
-
-  /// Escape string for use as SQL string literal on this connection
-  std::string esc(const char str[], size_t maxlen);
-
-  /// Escape string for use as SQL string literal on this connection
-  std::string esc(const std::string &str);
-
-  /// Escape binary string for use as SQL string literal on this connection
-  std::string esc_raw(const unsigned char str[], size_t len);
-
-  /// Unescape binary data, e.g. from a table field or notification payload.
-  /** Takes a binary string as escaped by PostgreSQL, and returns a restored
-   * copy of the original binary data.
-   */
-  std::string unesc_raw(const std::string &text)
-					     { return unesc_raw(text.c_str()); }
-
-  /// Unescape binary data, e.g. from a table field or notification payload.
-  /** Takes a binary string as escaped by PostgreSQL, and returns a restored
-   * copy of the original binary data.
-   */
-  std::string unesc_raw(const char *text);
-
-  /// Escape and quote a string of binary data.
-  std::string quote_raw(const unsigned char str[], size_t len);
-
-  /// Escape and quote an SQL identifier for use in a query.
-  std::string quote_name(const std::string &identifier);
-
-  /// Represent object as SQL string, including quoting & escaping.
-  /** Nulls are recognized and represented as SQL nulls. */
-  template<typename T>
-  std::string quote(const T &t)
-  {
-    if (string_traits<T>::is_null(t)) return "NULL";
-    return "'" + this->esc(to_string(t)) + "'";
-  }
-
-  std::string quote(const binarystring &);
-
-  /// Escape string for literal LIKE match.
-  /** Use this when part of an SQL "LIKE" pattern should match only as a
-   * literal string, not as a pattern, even if it contains "%" or "_"
-   * characters that would normally act as wildcards.
-   *
-   * The string does not get string-escaped or quoted.  You do that later.
-   *
-   * For instance, let's say you have a string @c name entered by the user,
-   * and you're searching a @c file column for items that match @c name
-   * followed by a dot and three letters.  Even if @c name contains wildcard
-   * characters "%" or "_", you only want those to match literally, so "_"
-   * only matches "_" and "%" only matches a single "%".
-   *
-   * You do that by "like-escaping" @c name, appending the wildcard pattern
-   * @c ".___", and finally, escaping and quoting the result for inclusion in
-   * your query:
-   *
-   *    tx.exec(
-   *        "SELECT file FROM item WHERE file LIKE " +
-   *        tx.quote(tx.esc_like(name) + ".___"));
-   *
-   * The SQL "LIKE" operator also lets you choose your own escape character.
-   * This is supported, but must be a single-byte character.
-   */
-  std::string esc_like(const std::string &str, char escape_char='\\') const;
-  //@}
-
-  /// Attempt to cancel the ongoing query, if any.
-  void cancel_query();
-
-  /// Error verbosity levels.
-  enum error_verbosity
-  {
-      // These values must match those in libpq's PGVerbosity enum.
-      terse=0,
-      normal=1,
-      verbose=2
-  };
-
-  /// Set session verbosity.
-  /** Set the verbosity of error messages to "terse", "normal" (i.e. default) or
-   * "verbose."
-   *
-   *  If "terse", returned messages include severity, primary text, and position
-   *  only; this will normally fit on a single line. "normal" produces messages
-   *  that include the above plus any detail, hint, or context fields (these
-   *  might span multiple lines).  "verbose" includes all available fields.
-   */
-  void set_verbosity(error_verbosity verbosity) noexcept;
-   /// Retrieve current error verbosity
-  error_verbosity get_verbosity() const noexcept {return m_verbosity;}
-
-  /// Return pointers to the active errorhandlers.
-  /** The entries are ordered from oldest to newest handler.
-   *
-   * You may use this to find errorhandlers that your application wants to
-   * delete when destroying the connection.  Be aware, however, that libpqxx
-   * may also add errorhandlers of its own, and those will be included in the
-   * list.  If this is a problem for you, derive your errorhandlers from a
-   * custom base class derived from pqxx::errorhandler.  Then use dynamic_cast
-   * to find which of the error handlers are yours.
-   *
-   * The pointers point to the real errorhandlers.  The container it returns
-   * however is a copy of the one internal to the connection, not a reference.
-   */
-  std::vector<errorhandler *> get_errorhandlers() const;
-
-protected:
-  explicit connection_base(connectionpolicy &pol) :
-	m_policy{pol}
-  {
-    // Check library version.  The check_library_version template is declared
-    // for any library version, but only actually defined for the version of
-    // the libpqxx binary against which the code is linked.
-    //
-    // If the library binary is a different version than the one declared in
-    // these headers, then this call will fail to link: there will be no
-    // definition for the function with these exact template parameter values.
-    // There will be a definition, but the version in the parameter values will
-    // be different.
-    //
-    // There is no particular reason to do this here in this constructor, except
-    // to ensure that every meaningful libpqxx client will execute it.  The call
-    // must be in the execution path somewhere or the compiler won't try to link
-    // it.  We can't use it to initialise a global or class-static variable,
-    // because a smart compiler might resolve it at compile time.
-    // 
-    // On the other hand, we don't want to make a useless function call too
-    // often for performance reasons.  A local static variable is initialised
-    // only on the definition's first execution.  Compilers will be well
-    // optimised for this behaviour, so there's a minimal one-time cost.
-    static const auto version_ok =
-      internal::check_library_version<PQXX_VERSION_MAJOR, PQXX_VERSION_MINOR>();
-    ignore_unused(version_ok);
-
-    clearcaps();
-  }
-  void init();
-
-  void close() noexcept;
-  void wait_read() const;
-  void wait_read(long seconds, long microseconds) const;
-  void wait_write() const;
-
-private:
-
-  result make_result(internal::pq::PGresult *rhs, const std::string &query);
-
-  void clearcaps() noexcept;
-  void PQXX_PRIVATE set_up_state();
-  void PQXX_PRIVATE check_result(const result &);
-
-  void PQXX_PRIVATE internal_set_trace() noexcept;
-  int PQXX_PRIVATE PQXX_PURE status() const noexcept;
-
-  friend class internal::gate::const_connection_largeobject;
-  const char * PQXX_PURE err_msg() const noexcept;
-
-  void PQXX_PRIVATE reset();
-  std::string PQXX_PRIVATE raw_get_var(const std::string &);
-  void PQXX_PRIVATE process_notice_raw(const char msg[]) noexcept;
-
-  void read_capabilities();
-
-  prepare::internal::prepared_def &find_prepared(const std::string &);
-
-  prepare::internal::prepared_def &register_prepared(const std::string &);
-
-  friend class internal::gate::connection_prepare_invocation;
-  /// @deprecated Use exec_prepared instead.
-  PQXX_DEPRECATED result prepared_exec(
-	const std::string &,
-	const char *const[],
-	const int[],
-	const int[],
-	int,
-	result_format format);
-  result exec_prepared(const std::string &statement, const internal::params &, result_format format = result_format::text);
-  bool prepared_exists(const std::string &) const;
-
-  /// Connection handle.
-  internal::pq::PGconn *m_conn = nullptr;
-
-  connectionpolicy &m_policy;
-
-  /// Active transaction on connection, if any.
-  internal::unique<transaction_base> m_trans;
-
-  /// Set libpq notice processor to call connection's error handlers chain.
-  void set_notice_processor();
-  /// Clear libpq notice processor.
-  void clear_notice_processor();
-  std::list<errorhandler *> m_errorhandlers;
-
-  /// File to trace to, if any
-  std::FILE *m_trace = nullptr;
-
-  using receiver_list =
-	std::multimap<std::string, pqxx::notification_receiver *>;
-  /// Notification receivers.
-  receiver_list m_receivers;
-
-  /// Variables set in this session
-  std::map<std::string, std::string> m_vars;
-
-  using PSMap = std::map<std::string, prepare::internal::prepared_def>;
-  /// Prepared statements existing in this section
-  PSMap m_prepared;
-
-  /// Server version
-  int m_serverversion = 0;
-
-  /// Stacking counter: known objects that can't be auto-reactivated
-  internal::reactivation_avoidance_counter m_reactivation_avoidance;
-
-  /// Unique number to use as suffix for identifiers (see adorn_name())
-  int m_unique_id = 0;
-
-  /// Have we successfully established this connection?
-  bool m_completed = false;
-
-  /// Is reactivation currently inhibited?
-  bool m_inhibit_reactivation = false;
-
-  /// Set of session capabilities
-  std::bitset<cap_end> m_caps;
-
-  /// Current verbosity level
-  error_verbosity m_verbosity = normal;
-
-  friend class internal::gate::connection_errorhandler;
-  void PQXX_PRIVATE register_errorhandler(errorhandler *);
-  void PQXX_PRIVATE unregister_errorhandler(errorhandler *) noexcept;
-
-  friend class internal::gate::connection_transaction;
-  result PQXX_PRIVATE exec(const char[], int Retries);
-  void PQXX_PRIVATE register_transaction(transaction_base *);
-  void PQXX_PRIVATE unregister_transaction(transaction_base *) noexcept;
-  bool PQXX_PRIVATE read_copy_line(std::string &);
-  void PQXX_PRIVATE write_copy_line(const std::string &);
-  void PQXX_PRIVATE end_copy_write();
-  void PQXX_PRIVATE raw_set_var(const std::string &, const std::string &);
-  void PQXX_PRIVATE add_variables(const std::map<std::string, std::string> &);
-
-  friend class internal::gate::connection_largeobject;
-  internal::pq::PGconn *raw_connection() const { return m_conn; }
-
-  friend class internal::gate::connection_notification_receiver;
-  void add_receiver(notification_receiver *);
-  void remove_receiver(notification_receiver *) noexcept;
-
-  friend class internal::gate::connection_pipeline;
-  void PQXX_PRIVATE start_exec(const std::string &);
-  bool PQXX_PRIVATE consume_input() noexcept;
-  bool PQXX_PRIVATE is_busy() const noexcept;
-  internal::pq::PGresult *get_result();
-
-  friend class internal::gate::connection_dbtransaction;
-
-  friend class internal::gate::connection_sql_cursor;
-  void add_reactivation_avoidance_count(int);
-
-  friend class internal::gate::connection_reactivation_avoidance_exemption;
-
-  friend class internal::gate::connection_parameterized_invocation;
-  /// @deprecated Use exec_params instead.
-  PQXX_DEPRECATED result parameterized_exec(
-	const std::string &query,
-	const char *const params[],
-	const int paramlengths[],
-	const int binaries[],
-	int nparams);
-
-  result exec_params(
-	const std::string &query,
-	const internal::params &args);
-
-  connection_base(const connection_base &) =delete;
-  connection_base &operator=(const connection_base &) =delete;
-};
-
-
-namespace internal
-{
-
-/// Scoped exemption to reactivation avoidance
-class PQXX_LIBEXPORT reactivation_avoidance_exemption
-{
-public:
-  explicit reactivation_avoidance_exemption(connection_base &C);
-  ~reactivation_avoidance_exemption();
-
-  void close_connection() noexcept { m_open = false; }
-
-private:
-  connection_base &m_home;
-  int m_count;
-  bool m_open;
-};
-
-
-void wait_read(const internal::pq::PGconn *);
-void wait_read(const internal::pq::PGconn *, long seconds, long microseconds);
-void wait_write(const internal::pq::PGconn *);
-} // namespace pqxx::internal
-
-} // namespace pqxx
-
-#include "pqxx/compiler-internal-post.hxx"
-
-#endif
diff --git a/contrib/libs/libpqxx/include/pqxx/connectionpolicy.hxx b/contrib/libs/libpqxx/include/pqxx/connectionpolicy.hxx
deleted file mode 100644
index 3eebf9edbe..0000000000
--- a/contrib/libs/libpqxx/include/pqxx/connectionpolicy.hxx
+++ /dev/null
@@ -1,59 +0,0 @@
-/** Definition of the connection policy classes.
- *
- * Interface for defining connection policies
- * DO NOT INCLUDE THIS FILE DIRECTLY; include pqxx/connection instead.
- *
- * Copyright (c) 2000-2019, Jeroen T. Vermeulen.
- *
- * See COPYING for copyright license.  If you did not receive a file called
- * COPYING with this source code, please notify the distributor of this mistake,
- * or contact the author.
- */
-#ifndef PQXX_H_CONNECTIONPOLICY
-#define PQXX_H_CONNECTIONPOLICY
-
-#include "pqxx/compiler-public.hxx"
-#include "pqxx/compiler-internal-pre.hxx"
-
-#include <string>
-
-#include "pqxx/internal/libpq-forward.hxx"
-
-
-namespace pqxx
-{
-
-/**
- * @addtogroup connection Connection classes
- */
-//@{
-
-class PQXX_LIBEXPORT connectionpolicy
-{
-public:
-  using handle = internal::pq::PGconn *;
-
-  explicit connectionpolicy(const std::string &opts);
-  virtual ~connectionpolicy() noexcept;
-
-  const std::string &options() const noexcept { return m_options; }
-
-  virtual handle do_startconnect(handle orig);
-  virtual handle do_completeconnect(handle orig);
-  virtual handle do_dropconnect(handle orig) noexcept;
-  virtual handle do_disconnect(handle orig) noexcept;
-  virtual bool is_ready(handle) const noexcept;
-
-protected:
-  handle normalconnect(handle);
-
-private:
-  std::string m_options;
-};
-
-//@}
-} // namespace
-
-#include "pqxx/compiler-internal-post.hxx"
-
-#endif
diff --git a/contrib/libs/libpqxx/include/pqxx/cursor b/contrib/libs/libpqxx/include/pqxx/cursor
deleted file mode 100644
index 02979afda5..0000000000
--- a/contrib/libs/libpqxx/include/pqxx/cursor
+++ /dev/null
@@ -1,6 +0,0 @@
-/** Definition of the iterator/container-style cursor classes.
- *
- * C++-style wrappers for SQL cursors
- */
-// Actual definitions in .hxx file so editors and such recognize file type.
-#include "pqxx/cursor.hxx"
diff --git a/contrib/libs/libpqxx/include/pqxx/cursor.hxx b/contrib/libs/libpqxx/include/pqxx/cursor.hxx
deleted file mode 100644
index a1b53ab1cb..0000000000
--- a/contrib/libs/libpqxx/include/pqxx/cursor.hxx
+++ /dev/null
@@ -1,437 +0,0 @@
-/** Definition of the iterator/container-style cursor classes.
- *
- * C++-style wrappers for SQL cursors
- *
- * DO NOT INCLUDE THIS FILE DIRECTLY; include pqxx/cursor instead.
- *
- * Copyright (c) 2000-2019, Jeroen T. Vermeulen.
- *
- * See COPYING for copyright license.  If you did not receive a file called
- * COPYING with this source code, please notify the distributor of this mistake,
- * or contact the author.
- */
-#ifndef PQXX_H_CURSOR
-#define PQXX_H_CURSOR
-
-#include "pqxx/compiler-public.hxx"
-#include "pqxx/compiler-internal-pre.hxx"
-
-#include <limits>
-#include <stdexcept>
-
-#include "pqxx/result.hxx"
-#include "pqxx/transaction_base.hxx"
-
-
-namespace pqxx
-{
-/// Common definitions for cursor types
-/** In C++ terms, fetches are always done in pre-increment or pre-decrement
- * fashion--i.e. the result does not include the row the cursor is on at the
- * beginning of the fetch, and the cursor ends up being positioned on the last
- * row in the result.
- *
- * There are singular positions akin to @c end() at both the beginning and the
- * end of the cursor's range of movement, although these fit in so naturally
- * with the semantics that one rarely notices them.  The cursor begins at the
- * first of these, but any fetch in the forward direction will move the cursor
- * off this position and onto the first row before returning anything.
- */
-class PQXX_LIBEXPORT cursor_base
-{
-public:
-  using size_type = result_size_type;
-  using difference_type = result_difference_type;
-
-  /// Cursor access-pattern policy
-  /** Allowing a cursor to move forward only can result in better performance,
-   * so use this access policy whenever possible.
-   */
-  enum accesspolicy
-  {
-    /// Cursor can move forward only
-    forward_only,
-    /// Cursor can move back and forth
-    random_access
-  };
-
-  /// Cursor update policy
-  /**
-   * @warning Not all PostgreSQL versions support updatable cursors.
-   */
-  enum updatepolicy
-  {
-    /// Cursor can be used to read data but not to write
-    read_only,
-    /// Cursor can be used to update data as well as read it
-    update
-  };
-
-  /// Cursor destruction policy
-  /** The normal thing to do is to make a cursor object the owner of the SQL
-   * cursor it represents.  There may be cases, however, where a cursor needs to
-   * persist beyond the end of the current transaction (and thus also beyond the
-   * lifetime of the cursor object that created it!), where it can be "adopted"
-   * into a new cursor object.  See the basic_cursor documentation for an
-   * explanation of cursor adoption.
-   *
-   * If a cursor is created with "loose" ownership policy, the object
-   * representing the underlying SQL cursor will not take the latter with it
-   * when its own lifetime ends, nor will its originating transaction.
-   *
-   * @warning Use this feature with care and moderation.  Only one cursor object
-   * should be responsible for any one underlying SQL cursor at any given time.
-   *
-   * @warning Don't "leak" cursors!  As long as any "loose" cursor exists,
-   * any attempts to deactivate or reactivate the connection, implicitly or
-   * explicitly, are quietly ignored.
-   */
-  enum ownershippolicy
-  {
-    /// Destroy SQL cursor when cursor object is closed at end of transaction
-    owned,
-    /// Leave SQL cursor in existence after close of object and transaction
-    loose
-  };
-
-  cursor_base() =delete;
-  cursor_base(const cursor_base &) =delete;
-  cursor_base &operator=(const cursor_base &) =delete;
-
-  /**
-   * @name Special movement distances.
-   */
-  //@{
-
-  /// Special value: read until end.
-  /** @return Maximum value for result::difference_type, so the cursor will
-   * attempt to read the largest possible result set.
-   */
-  static difference_type all() noexcept;				//[t81]
-
-  /// Special value: read one row only.
-  /** @return Unsurprisingly, 1.
-   */
-  static difference_type next() noexcept { return 1; }			//[t81]
-
-  /// Special value: read backwards, one row only.
-  /** @return Unsurprisingly, -1.
-   */
-  static difference_type prior() noexcept { return -1; }		//[t00]
-
-  /// Special value: read backwards from current position back to origin.
-  /** @return Minimum value for result::difference_type.
-   */
-  static difference_type backward_all() noexcept;			//[t00]
-
-  //@}
-
-  /// Name of underlying SQL cursor
-  /**
-   * @returns Name of SQL cursor, which may differ from original given name.
-   * @warning Don't use this to access the SQL cursor directly without going
-   * through the provided wrapper classes!
-   */
-  const std::string &name() const noexcept { return m_name; }		//[t81]
-
-protected:
-  cursor_base(
-	connection_base &,
-	const std::string &Name,
-	bool embellish_name=true);
-
-  const std::string m_name;
-};
-} // namespace pqxx
-
-
-#include <pqxx/internal/sql_cursor.hxx>
-
-
-namespace pqxx
-{
-/// "Stateless cursor" class: easy API for retrieving parts of result sets
-/** This is a front-end for SQL cursors, but with a more C++-like API.
- *
- * Actually, stateless_cursor feels entirely different from SQL cursors.  You
- * don't keep track of positions, fetches, and moves; you just say which rows
- * you want.  See the retrieve() member function.
- */
-template<cursor_base::updatepolicy up, cursor_base::ownershippolicy op>
-class stateless_cursor
-{
-public:
-  using size_type = result_size_type;
-  using difference_type = result_difference_type;
-
-  /// Create cursor.
-  stateless_cursor(
-	transaction_base &trans,
-	const std::string &query,
-	const std::string &cname,
-	bool hold) :
-    m_cur{trans, query, cname, cursor_base::random_access, up, op, hold}
-  {
-  }
-
-  /// Adopt existing scrolling SQL cursor.
-  stateless_cursor(
-	transaction_base &trans,
-	const std::string adopted_cursor) :
-    m_cur{trans, adopted_cursor, op}
-  {
-    // Put cursor in known position
-    m_cur.move(cursor_base::backward_all());
-  }
-
-  void close() noexcept { m_cur.close(); }
-
-  /// Number of rows in cursor's result set
-  /** @note This function is not const; it may need to scroll to find the size
-   * of the result set.
-   */
-  size_type size() { return internal::obtain_stateless_cursor_size(m_cur); }
-
-  /// Retrieve rows from begin_pos (inclusive) to end_pos (exclusive)
-  /** Rows are numbered starting from 0 to size()-1.
-   *
-   * @param begin_pos First row to retrieve.  May be one row beyond the end of
-   * the result set, to avoid errors for empty result sets.  Otherwise, must be
-   * a valid row number in the result set.
-   * @param end_pos Row up to which to fetch.  Rows are returned ordered from
-   * begin_pos to end_pos, i.e. in ascending order if begin_pos < end_pos but
-   * in descending order if begin_pos > end_pos.  The end_pos may be arbitrarily
-   * inside or outside the result set; only existing rows are included in the
-   * result.
-   */
-  result retrieve(difference_type begin_pos, difference_type end_pos)
-  {
-    return internal::stateless_cursor_retrieve(
-	m_cur,
-	result::difference_type(size()),
-	begin_pos,
-	end_pos);
-  }
-
-  const std::string &name() const noexcept { return m_cur.name(); }
-
-private:
-  internal::sql_cursor m_cur;
-};
-
-
-class icursor_iterator;
-
-
-namespace internal
-{
-namespace gate
-{
-class icursor_iterator_icursorstream;
-class icursorstream_icursor_iterator;
-} // namespace internal::gate
-} // namespace internal
-
-
-/// Simple read-only cursor represented as a stream of results
-/** SQL cursors can be tricky, especially in C++ since the two languages seem to
- * have been designed on different planets.  An SQL cursor has two singular
- * positions akin to @c end() on either side of the underlying result set.
- *
- * These cultural differences are hidden from view somewhat by libpqxx, which
- * tries to make SQL cursors behave more like familiar C++ entities such as
- * iterators, sequences, streams, and containers.
- *
- * Data is fetched from the cursor as a sequence of result objects.  Each of
- * these will contain the number of rows defined as the stream's stride, except
- * of course the last block of data which may contain fewer rows.
- *
- * This class can create or adopt cursors that live outside any backend
- * transaction, which your backend version may not support.
- */
-class PQXX_LIBEXPORT icursorstream
-{
-public:
-  using size_type = cursor_base::size_type;
-  using difference_type = cursor_base::difference_type;
-
-  /// Set up a read-only, forward-only cursor
-  /** Roughly equivalent to a C++ Standard Library istream, this cursor type
-   * supports only two operations: reading a block of rows while moving forward,
-   * and moving forward without reading any data.
-   *
-   * @param context Transaction context that this cursor will be active in
-   * @param query SQL query whose results this cursor shall iterate
-   * @param basename Suggested name for the SQL cursor; a unique code will be
-   * appended by the library to ensure its uniqueness
-   * @param sstride Number of rows to fetch per read operation; must be a
-   * positive number
-   */
-  icursorstream(
-	transaction_base &context,
-	const std::string &query,
-	const std::string &basename,
-	difference_type sstride=1);					//[t81]
-
-  /// Adopt existing SQL cursor.  Use with care.
-  /** Forms a cursor stream around an existing SQL cursor, as returned by e.g. a
-   * server-side function.  The SQL cursor will be cleaned up by the stream's
-   * destructor as if it had been created by the stream; cleaning it up by hand
-   * or adopting the same cursor twice is an error.
-   *
-   * Passing the name of the cursor as a string is not allowed, both to avoid
-   * confusion with the other constructor and to discourage unnecessary use of
-   * adopted cursors.
-   *
-   * @warning It is technically possible to adopt a "WITH HOLD" cursor, i.e. a
-   * cursor that stays alive outside its creating transaction.  However, any
-   * cursor stream (including the underlying SQL cursor, naturally) must be
-   * destroyed before its transaction context object is destroyed.  Therefore
-   * the only way to use SQL's WITH HOLD feature is to adopt the cursor, but
-   * defer doing so until after entering the transaction context that will
-   * eventually destroy it.
-   *
-   * @param context Transaction context that this cursor will be active in.
-   * @param cname Result field containing the name of the SQL cursor to adopt.
-   * @param sstride Number of rows to fetch per read operation; must be a
-   * positive number.
-   * @param op Ownership policy.  Determines whether the cursor underlying this
-   * stream will be destroyed when the stream is closed.
-   */
-  icursorstream(
-	transaction_base &context,
-	const field &cname,
-	difference_type sstride=1,
-	cursor_base::ownershippolicy op=cursor_base::owned);		//[t84]
-
-  operator bool() const noexcept { return not m_done; }
-
-  /// Read new value into given result object; same as operator >>
-  /** The result set may continue any number of rows from zero to the chosen
-   * stride, inclusive.  An empty result will only be returned if there are no
-   * more rows to retrieve.
-   * @return Reference to this very stream, to facilitate "chained" invocations
-   * ("C.get(r1).get(r2);")
-   */
-  icursorstream &get(result &res) { res = fetchblock(); return *this; }	//[t81]
-  /// Read new value into given result object; same as get(result &)
-  /** The result set may continue any number of rows from zero to the chosen
-   * stride, inclusive.  An empty result will only be returned if there are no
-   * more rows to retrieve.
-   * @return Reference to this very stream, to facilitate "chained" invocations
-   * ("C >> r1 >> r2;")
-   */
-  icursorstream &operator>>(result &res) { return get(res); }		//[t81]
-
-  /// Move given number of rows forward (ignoring stride) without reading data
-  /**
-   * @return Reference to this very stream, to facilitate "chained" invocations
-   * ("C.ignore(2).get(r).ignore(4);")
-   */
-  icursorstream &ignore(std::streamsize n=1);				//[t81]
-
-  /// Change stride, i.e. the number of rows to fetch per read operation
-  /**
-   * @param stride Must be a positive number
-   */
-  void set_stride(difference_type stride);				//[t81]
-  difference_type stride() const noexcept { return m_stride; }		//[t81]
-
-private:
-  result fetchblock();
-
-  friend class internal::gate::icursorstream_icursor_iterator;
-  size_type forward(size_type n=1);
-  void insert_iterator(icursor_iterator *) noexcept;
-  void remove_iterator(icursor_iterator *) const noexcept;
-
-  void service_iterators(difference_type);
-
-  internal::sql_cursor m_cur;
-
-  difference_type m_stride;
-  difference_type m_realpos, m_reqpos;
-
-  mutable icursor_iterator *m_iterators;
-
-  bool m_done;
-};
-
-
-/// Approximate istream_iterator for icursorstream
-/** Intended as an implementation of an input_iterator (as defined by the C++
- * Standard Library), this class supports only two basic operations: reading the
- * current element, and moving forward.  In addition to the minimal guarantees
- * for istream_iterators, this class supports multiple successive reads of the
- * same position (the current result set is cached in the iterator) even after
- * copying and even after new data have been read from the stream.  This appears
- * to be a requirement for input_iterators.  Comparisons are also supported in
- * the general case.
- *
- * The iterator does not care about its own position, however.  Moving an
- * iterator forward moves the underlying stream forward and reads the data from
- * the new stream position, regardless of the iterator's old position in the
- * stream.
- *
- * The stream's stride defines the granularity for all iterator movement or
- * access operations, i.e. "ici += 1" advances the stream by one stride's worth
- * of rows, and "*ici++" reads one stride's worth of rows from the stream.
- *
- * @warning Do not read from the underlying stream or its cursor, move its read
- * position, or change its stride, between the time the first icursor_iterator
- * on it is created and the time its last icursor_iterator is destroyed.
- *
- * @warning Manipulating these iterators within the context of a single cursor
- * stream is <em>not thread-safe</em>.  Creating a new iterator, copying one, or
- * destroying one affects the stream as a whole.
- */
-class PQXX_LIBEXPORT icursor_iterator
-{
-public:
-  using iterator_category = std::input_iterator_tag;
-  using value_type = result;
-  using pointer = const result *;
-  using reference = const result &;
-  using istream_type = icursorstream;
-  using size_type = istream_type::size_type;
-  using difference_type = istream_type::difference_type;
-
-  icursor_iterator() noexcept;						//[t84]
-  explicit icursor_iterator(istream_type &) noexcept;			//[t84]
-  icursor_iterator(const icursor_iterator &) noexcept;			//[t84]
-  ~icursor_iterator() noexcept;
-
-  const result &operator*() const { refresh(); return m_here; }		//[t84]
-  const result *operator->() const { refresh(); return &m_here; }	//[t84]
-  icursor_iterator &operator++();					//[t84]
-  icursor_iterator operator++(int);					//[t84]
-  icursor_iterator &operator+=(difference_type);			//[t84]
-  icursor_iterator &operator=(const icursor_iterator &) noexcept;	//[t84]
-
-  bool operator==(const icursor_iterator &rhs) const;			//[t84]
-  bool operator!=(const icursor_iterator &rhs) const noexcept		//[t84]
-	{ return not operator==(rhs); }
-  bool operator<(const icursor_iterator &rhs) const;			//[t84]
-  bool operator>(const icursor_iterator &rhs) const			//[t84]
-	{ return rhs < *this; }
-  bool operator<=(const icursor_iterator &rhs) const			//[t84]
-	{ return not (*this > rhs); }
-  bool operator>=(const icursor_iterator &rhs) const			//[t84]
-	{ return not (*this < rhs); }
-
-private:
-  void refresh() const;
-
-  friend class internal::gate::icursor_iterator_icursorstream;
-  difference_type pos() const noexcept { return m_pos; }
-  void fill(const result &);
-
-  icursorstream *m_stream = nullptr;
-  result m_here;
-  difference_type m_pos;
-  icursor_iterator *m_prev = nullptr, *m_next = nullptr;
-};
-} // namespace pqxx
-
-#include "pqxx/compiler-internal-post.hxx"
-#endif
diff --git a/contrib/libs/libpqxx/include/pqxx/dbtransaction b/contrib/libs/libpqxx/include/pqxx/dbtransaction
deleted file mode 100644
index d3d6092ca9..0000000000
--- a/contrib/libs/libpqxx/include/pqxx/dbtransaction
+++ /dev/null
@@ -1,6 +0,0 @@
-/** pqxx::dbtransaction abstract base class.
- *
- * pqxx::dbransaction defines a real transaction on the database.
- */
-// Actual definitions in .hxx file so editors and such recognize file type.
-#include "pqxx/dbtransaction.hxx"
diff --git a/contrib/libs/libpqxx/include/pqxx/dbtransaction.hxx b/contrib/libs/libpqxx/include/pqxx/dbtransaction.hxx
deleted file mode 100644
index 8ba7d70c6f..0000000000
--- a/contrib/libs/libpqxx/include/pqxx/dbtransaction.hxx
+++ /dev/null
@@ -1,109 +0,0 @@
-/** Definition of the pqxx::dbtransaction abstract base class.
- *
- * pqxx::dbransaction defines a real transaction on the database.
- *
- * DO NOT INCLUDE THIS FILE DIRECTLY; include pqxx/dbtransaction instead.
- *
- * Copyright (c) 2000-2019, Jeroen T. Vermeulen.
- *
- * See COPYING for copyright license.  If you did not receive a file called
- * COPYING with this source code, please notify the distributor of this mistake,
- * or contact the author.
- */
-#ifndef PQXX_H_DBTRANSACTION
-#define PQXX_H_DBTRANSACTION
-
-#include "pqxx/compiler-public.hxx"
-#include "pqxx/compiler-internal-pre.hxx"
-
-#include "pqxx/transaction_base.hxx"
-
-namespace pqxx
-{
-
-enum readwrite_policy
-{
-  read_only,
-  read_write
-};
-
-
-/// Abstract base class responsible for bracketing a backend transaction.
-/**
- * @ingroup transaction
- *
- * Use a dbtransaction-derived object such as "work" (transaction<>) to enclose
- * operations on a database in a single "unit of work."  This ensures that the
- * whole series of operations either succeeds as a whole or fails completely.
- * In no case will it leave half-finished work behind in the database.
- *
- * Once processing on a transaction has succeeded and any changes should be
- * allowed to become permanent in the database, call commit().  If something
- * has gone wrong and the changes should be forgotten, call abort() instead.
- * If you do neither, an implicit abort() is executed at destruction time.
- *
- * It is an error to abort a transaction that has already been committed, or to
- * commit a transaction that has already been aborted.  Aborting an already
- * aborted transaction or committing an already committed one has been allowed
- * to make errors easier to deal with.  Repeated aborts or commits have no
- * effect after the first one.
- *
- * Database transactions are not suitable for guarding long-running processes.
- * If your transaction code becomes too long or too complex, please consider
- * ways to break it up into smaller ones.  There's no easy, general way to do
- * this since application-specific considerations become important at this
- * point.
- *
- * The actual operations for beginning and committing/aborting the backend
- * transaction are implemented by a derived class.  The implementing concrete
- * class must also call Begin() and End() from its constructors and destructors,
- * respectively, and implement do_exec().
- */
-class PQXX_LIBEXPORT PQXX_NOVTABLE dbtransaction : public transaction_base
-{
-public:
-  virtual ~dbtransaction();
-
-protected:
-  dbtransaction(
-	connection_base &,
-	const std::string &IsolationString,
-	readwrite_policy rw=read_write);
-
-  explicit dbtransaction(
-	connection_base &,
-	bool direct=true,
-	readwrite_policy rw=read_write);
-
-
-  /// Start a transaction on the backend and set desired isolation level
-  void start_backend_transaction();
-
-  /// Sensible default implemented here: begin backend transaction
-  virtual void do_begin() override;					//[t01]
-  /// Sensible default implemented here: perform query
-  virtual result do_exec(const char Query[]) override;
-  /// To be implemented by derived class: commit backend transaction
-  virtual void do_commit() override =0;
-  /// Sensible default implemented here: abort backend transaction
-  /** Default implementation does two things:
-   * <ol>
-   * <li>Clears the "connection reactivation avoidance counter"</li>
-   * <li>Executes a ROLLBACK statement</li>
-   * </ol>
-   */
-  virtual void do_abort() override;				//[t13]
-
-  static std::string fullname(const std::string &ttype,
-	const std::string &isolation);
-
-private:
-  /// Precomputed SQL command to run at start of this transaction
-  std::string m_start_cmd;
-};
-
-} // namespace pqxx
-
-#include "pqxx/compiler-internal-post.hxx"
-
-#endif
diff --git a/contrib/libs/libpqxx/include/pqxx/errorhandler b/contrib/libs/libpqxx/include/pqxx/errorhandler
deleted file mode 100644
index fda3c0ae62..0000000000
--- a/contrib/libs/libpqxx/include/pqxx/errorhandler
+++ /dev/null
@@ -1,6 +0,0 @@
-/** pqxx::errorhandler class.
- *
- * Callbacks for handling errors and warnings.
- */
-// Actual definitions in .hxx file so editors and such recognize file type.
-#include "pqxx/errorhandler.hxx"
diff --git a/contrib/libs/libpqxx/include/pqxx/errorhandler.hxx b/contrib/libs/libpqxx/include/pqxx/errorhandler.hxx
deleted file mode 100644
index 03ce923a3b..0000000000
--- a/contrib/libs/libpqxx/include/pqxx/errorhandler.hxx
+++ /dev/null
@@ -1,96 +0,0 @@
-/** Definition of the pqxx::errorhandler class.
- *
- * pqxx::errorhandler handlers errors and warnings in a database session.
- *
- * DO NOT INCLUDE THIS FILE DIRECTLY; include pqxx/connection_base instead.
- *
- * Copyright (c) 2000-2019, Jeroen T. Vermeulen.
- *
- * See COPYING for copyright license.  If you did not receive a file called
- * COPYING with this source code, please notify the distributor of this mistake,
- * or contact the author.
- */
-#ifndef PQXX_H_ERRORHANDLER
-#define PQXX_H_ERRORHANDLER
-
-#include "pqxx/compiler-public.hxx"
-#include "pqxx/compiler-internal-pre.hxx"
-
-#include "pqxx/types.hxx"
-
-
-namespace pqxx
-{
-namespace internal
-{
-namespace gate
-{
-class errorhandler_connection_base;
-}
-}
-
-/**
- * @addtogroup errorhandler
- * @{
- */
-
-/// Base class for error-handler callbacks.
-/** To receive errors and warnings from a connection, subclass this with your
- * own error-handler functor, and instantiate it for the connection.  Destroying
- * the handler un-registers it.
- *
- * A connection can have multiple error handlers at the same time.  When the
- * database connection emits an error or warning message, it passes the message
- * to each error handler, starting with the most recently registered one and
- * progressing towards the oldest one.  However an error handler may also
- * instruct the connection not to pass the message to further handlers by
- * returning "false."
- *
- * @warning Strange things happen when a result object outlives its parent
- * connection.  If you register an error handler on a connection, then you must
- * not access the result after destroying the connection.  This applies even if
- * you destroy the error handler first!
- */
-class PQXX_LIBEXPORT errorhandler
-{
-public:
-  explicit errorhandler(connection_base &);
-  virtual ~errorhandler();
-
-  /// Define in subclass: receive an error or warning message from the database.
-  /**
-   * @return Whether the same error message should also be passed to the
-   * remaining, older errorhandlers.
-   */
-  virtual bool operator()(const char msg[]) noexcept =0;
-
-private:
-  connection_base *m_home;
-
-  friend class internal::gate::errorhandler_connection_base;
-  void unregister() noexcept;
-
-  errorhandler() =delete;
-  errorhandler(const errorhandler &) =delete;
-  errorhandler &operator=(const errorhandler &) =delete;
-};
-
-
-/// An error handler that suppresses any previously registered error handlers.
-class quiet_errorhandler : public errorhandler
-{
-public:
-  quiet_errorhandler(connection_base &conn) : errorhandler{conn} {}
-
-  virtual bool operator()(const char[]) noexcept override { return false; }
-};
-
-/**
- * @}
- */
-
-} // namespace pqxx
-
-#include "pqxx/compiler-internal-post.hxx"
-
-#endif
diff --git a/contrib/libs/libpqxx/include/pqxx/except b/contrib/libs/libpqxx/include/pqxx/except
deleted file mode 100644
index e3cf0b0d5c..0000000000
--- a/contrib/libs/libpqxx/include/pqxx/except
+++ /dev/null
@@ -1,6 +0,0 @@
-/** libpqxx exception classes.
- *
- * pqxx::sql_error, pqxx::broken_connection, pqxx::in_doubt_error, ...
- */
-// Actual definitions in .hxx file so editors and such recognize file type.
-#include "pqxx/except.hxx"
diff --git a/contrib/libs/libpqxx/include/pqxx/except.hxx b/contrib/libs/libpqxx/include/pqxx/except.hxx
deleted file mode 100644
index 24d52d13e3..0000000000
--- a/contrib/libs/libpqxx/include/pqxx/except.hxx
+++ /dev/null
@@ -1,532 +0,0 @@
-/** Definition of libpqxx exception classes.
- *
- * pqxx::sql_error, pqxx::broken_connection, pqxx::in_doubt_error, ...
- *
- * DO NOT INCLUDE THIS FILE DIRECTLY; include pqxx/except instead.
- *
- * Copyright (c) 2000-2019, Jeroen T. Vermeulen.
- *
- * See COPYING for copyright license.  If you did not receive a file called
- * COPYING with this source code, please notify the distributor of this mistake,
- * or contact the author.
- */
-#ifndef PQXX_H_EXCEPT
-#define PQXX_H_EXCEPT
-
-#include "pqxx/compiler-public.hxx"
-#include "pqxx/compiler-internal-pre.hxx"
-
-#include <stdexcept>
-
-#include "pqxx/util.hxx"
-
-
-namespace pqxx
-{
-
-/**
- * @addtogroup exception Exception classes
- *
- * These exception classes follow, roughly, the two-level hierarchy defined by
- * the PostgreSQL error codes (see Appendix A of the PostgreSQL documentation
- * corresponding to your server version).  The hierarchy given here is, as yet,
- * not a complete mirror of the error codes.  There are some other differences
- * as well, e.g. the error code statement_completion_unknown has a separate
- * status in libpqxx as in_doubt_error, and too_many_connections is classified
- * as a broken_connection rather than a subtype of insufficient_resources.
- *
- * @see http://www.postgresql.org/docs/9.4/interactive/errcodes-appendix.html
- *
- * @{
- */
-
-/// Mixin base class to identify libpqxx-specific exception types
-/**
- * If you wish to catch all exception types specific to libpqxx for some reason,
- * catch this type.  All of libpqxx's exception classes are derived from it
- * through multiple-inheritance (they also fit into the standard library's
- * exception hierarchy in more fitting places).
- *
- * This class is not derived from std::exception, since that could easily lead
- * to exception classes with multiple std::exception base-class objects.  As
- * Bart Samwel points out, "catch" is subject to some nasty fineprint in such
- * cases.
- */
-class PQXX_LIBEXPORT PQXX_NOVTABLE pqxx_exception
-{
-public:
-  /// Support run-time polymorphism, and keep this class abstract
-  virtual ~pqxx_exception() noexcept =0;
-
-  /// Return std::exception base-class object
-  /** Use this to get at the exception's what() function, or to downcast to a
-   * more specific type using dynamic_cast.
-   *
-   * Casting directly from pqxx_exception to a specific exception type is not
-   * likely to work since pqxx_exception is not (and could not safely be)
-   * derived from std::exception.
-   *
-   * For example, to test dynamically whether an exception is an sql_error:
-   *
-   * @code
-   * try
-   * {
-   *   // ...
-   * }
-   * catch (const pqxx::pqxx_exception &e)
-   * {
-   *   std::cerr << e.base().what() << std::endl;
-   *   const pqxx::sql_error *s=dynamic_cast<const pqxx::sql_error*>(&e.base());
-   *   if (s) std::cerr << "Query was: " << s->query() << std::endl;
-   * }
-   * @endcode
-   */
-  PQXX_CONST virtual const std::exception &base() const noexcept =0;	//[t00]
-};
-
-
-/// Run-time failure encountered by libpqxx, similar to std::runtime_error
-class PQXX_LIBEXPORT failure :
-  public pqxx_exception, public std::runtime_error
-{
-  virtual const std::exception &base() const noexcept override
-	{ return *this; }
-public:
-  explicit failure(const std::string &);
-};
-
-
-/// Exception class for lost or failed backend connection.
-/**
- * @warning When this happens on Unix-like systems, you may also get a SIGPIPE
- * signal.  That signal aborts the program by default, so if you wish to be able
- * to continue after a connection breaks, be sure to disarm this signal.
- *
- * If you're working on a Unix-like system, see the manual page for
- * @c signal (2) on how to deal with SIGPIPE.  The easiest way to make this
- * signal harmless is to make your program ignore it:
- *
- * @code
- * #include <signal.h>
- *
- * int main()
- * {
- *   signal(SIGPIPE, SIG_IGN);
- *   // ...
- * @endcode
- */
-class PQXX_LIBEXPORT broken_connection : public failure
-{
-public:
-  broken_connection();
-  explicit broken_connection(const std::string &);
-};
-
-
-/// Exception class for failed queries.
-/** Carries, in addition to a regular error message, a copy of the failed query
- * and (if available) the SQLSTATE value accompanying the error.
- */
-class PQXX_LIBEXPORT sql_error : public failure
-{
-  /// Query string.  Empty if unknown.
-  const std::string m_query;
-  /// SQLSTATE string describing the error type, if known; or empty string.
-  const std::string m_sqlstate;
-
-public:
-  explicit sql_error(
-	const std::string &msg="",
-	const std::string &Q="",
-	const char sqlstate[]=nullptr);
-  virtual ~sql_error() noexcept;
-
-  /// The query whose execution triggered the exception
-  PQXX_PURE const std::string &query() const noexcept;			//[t56]
-
-  /// SQLSTATE error code if known, or empty string otherwise.
-  PQXX_PURE const std::string &sqlstate() const noexcept;
-};
-
-
-/// "Help, I don't know whether transaction was committed successfully!"
-/** Exception that might be thrown in rare cases where the connection to the
- * database is lost while finishing a database transaction, and there's no way
- * of telling whether it was actually executed by the backend.  In this case
- * the database is left in an indeterminate (but consistent) state, and only
- * manual inspection will tell which is the case.
- */
-class PQXX_LIBEXPORT in_doubt_error : public failure
-{
-public:
-  explicit in_doubt_error(const std::string &);
-};
-
-
-/// The backend saw itself forced to roll back the ongoing transaction.
-class PQXX_LIBEXPORT transaction_rollback : public failure
-{
-public:
-  explicit transaction_rollback(const std::string &);
-};
-
-
-/// Transaction failed to serialize.  Please retry it.
-/** Can only happen at transaction isolation levels REPEATABLE READ and
- * SERIALIZABLE.
- *
- * The current transaction cannot be committed without violating the guarantees
- * made by its isolation level.  This is the effect of a conflict with another
- * ongoing transaction.  The transaction may still succeed if you try to
- * perform it again.
- */
-class PQXX_LIBEXPORT serialization_failure : public transaction_rollback
-{
-public:
-  explicit serialization_failure(const std::string &);
-};
-
-
-/// We can't tell whether our last statement succeeded.
-class PQXX_LIBEXPORT statement_completion_unknown : public transaction_rollback
-{
-public:
-  explicit statement_completion_unknown(const std::string &);
-};
-
-
-/// The ongoing transaction has deadlocked.  Retrying it may help.
-class PQXX_LIBEXPORT deadlock_detected : public transaction_rollback
-{
-public:
-  explicit deadlock_detected(const std::string &);
-};
-
-
-/// Internal error in libpqxx library
-class PQXX_LIBEXPORT internal_error :
-  public pqxx_exception, public std::logic_error
-{
-  virtual const std::exception &base() const noexcept override
-	{ return *this; }
-public:
-  explicit internal_error(const std::string &);
-};
-
-
-/// Error in usage of libpqxx library, similar to std::logic_error
-class PQXX_LIBEXPORT usage_error :
-  public pqxx_exception, public std::logic_error
-{
-  virtual const std::exception &base() const noexcept override
-	{ return *this; }
-public:
-  explicit usage_error(const std::string &);
-};
-
-
-/// Invalid argument passed to libpqxx, similar to std::invalid_argument
-class PQXX_LIBEXPORT argument_error :
-  public pqxx_exception, public std::invalid_argument
-{
-  virtual const std::exception &base() const noexcept override
-	{ return *this; }
-public:
-  explicit argument_error(const std::string &);
-};
-
-
-/// Value conversion failed, e.g. when converting "Hello" to int.
-class PQXX_LIBEXPORT conversion_error :
-  public pqxx_exception, public std::domain_error
-{
-  virtual const std::exception &base() const noexcept override
-	{ return *this; }
-public:
-  explicit conversion_error(const std::string &);
-};
-
-
-/// Something is out of range, similar to std::out_of_range
-class PQXX_LIBEXPORT range_error :
-  public pqxx_exception, public std::out_of_range
-{
-  virtual const std::exception &base() const noexcept override
-	{ return *this; }
-public:
-  explicit range_error(const std::string &);
-};
-
-
-/// Query returned an unexpected number of rows.
-class PQXX_LIBEXPORT unexpected_rows : public range_error
-{
-  virtual const std::exception &base() const noexcept override
-	{ return *this; }
-public:
-  explicit unexpected_rows(const std::string &msg) : range_error{msg} {}
-};
-
-
-/// Database feature not supported in current setup
-class PQXX_LIBEXPORT feature_not_supported : public sql_error
-{
-public:
-  explicit feature_not_supported(
-	const std::string &err,
-	const std::string &Q="",
-	const char sqlstate[]=nullptr) :
-    sql_error{err, Q, sqlstate} {}
-};
-
-/// Error in data provided to SQL statement
-class PQXX_LIBEXPORT data_exception : public sql_error
-{
-public:
-  explicit data_exception(
-	const std::string &err,
-	const std::string &Q="",
-	const char sqlstate[]=nullptr) :
-    sql_error{err, Q, sqlstate} {}
-};
-
-class PQXX_LIBEXPORT integrity_constraint_violation : public sql_error
-{
-public:
-  explicit integrity_constraint_violation(
-	const std::string &err,
-	const std::string &Q="",
-	const char sqlstate[]=nullptr) :
-    sql_error{err, Q, sqlstate} {}
-};
-
-class PQXX_LIBEXPORT restrict_violation :
-  public integrity_constraint_violation
-{
-public:
-  explicit restrict_violation(
-	const std::string &err,
-	const std::string &Q="",
-	const char sqlstate[]=nullptr) :
-    integrity_constraint_violation{err, Q, sqlstate} {}
-};
-
-class PQXX_LIBEXPORT not_null_violation :
-  public integrity_constraint_violation
-{
-public:
-  explicit not_null_violation(
-	const std::string &err,
-	const std::string &Q="",
-	const char sqlstate[]=nullptr) :
-    integrity_constraint_violation{err, Q, sqlstate} {}
-};
-
-class PQXX_LIBEXPORT foreign_key_violation :
-  public integrity_constraint_violation
-{
-public:
-  explicit foreign_key_violation(
-	const std::string &err,
-	const std::string &Q="",
-	const char sqlstate[]=nullptr) :
-    integrity_constraint_violation{err, Q, sqlstate} {}
-};
-
-class PQXX_LIBEXPORT unique_violation :
-  public integrity_constraint_violation
-{
-public:
-  explicit unique_violation(
-	const std::string &err,
-	const std::string &Q="",
-	const char sqlstate[]=nullptr) :
-    integrity_constraint_violation{err, Q, sqlstate} {}
-};
-
-class PQXX_LIBEXPORT check_violation :
-  public integrity_constraint_violation
-{
-public:
-  explicit check_violation(
-	const std::string &err,
-	const std::string &Q="",
-	const char sqlstate[]=nullptr) :
-    integrity_constraint_violation{err, Q, sqlstate} {}
-};
-
-class PQXX_LIBEXPORT invalid_cursor_state : public sql_error
-{
-public:
-  explicit invalid_cursor_state(
-	const std::string &err,
-	const std::string &Q="",
-	const char sqlstate[]=nullptr) :
-    sql_error{err, Q, sqlstate} {}
-};
-
-class PQXX_LIBEXPORT invalid_sql_statement_name : public sql_error
-{
-public:
-  explicit invalid_sql_statement_name(
-	const std::string &err,
-	const std::string &Q="",
-	const char sqlstate[]=nullptr) :
-    sql_error{err, Q, sqlstate} {}
-};
-
-class PQXX_LIBEXPORT invalid_cursor_name : public sql_error
-{
-public:
-  explicit invalid_cursor_name(
-	const std::string &err,
-	const std::string &Q="",
-	const char sqlstate[]=nullptr) :
-    sql_error{err, Q, sqlstate} {}
-};
-
-class PQXX_LIBEXPORT syntax_error : public sql_error
-{
-public:
-  /// Approximate position in string where error occurred, or -1 if unknown.
-  const int error_position;
-
-  explicit syntax_error(
-	const std::string &err,
-	const std::string &Q="",
-	const char sqlstate[]=nullptr,
-	int pos=-1) :
-    sql_error{err, Q, sqlstate}, error_position{pos} {}
-};
-
-class PQXX_LIBEXPORT undefined_column : public syntax_error
-{
-public:
-  explicit undefined_column(
-	const std::string &err,
-	const std::string &Q="",
-	const char sqlstate[]=nullptr) :
-    syntax_error{err, Q, sqlstate} {}
-};
-
-class PQXX_LIBEXPORT undefined_function : public syntax_error
-{
-public:
-  explicit undefined_function(
-	const std::string &err,
-	const std::string &Q="",
-	const char sqlstate[]=nullptr) :
-    syntax_error{err, Q, sqlstate} {}
-};
-
-class PQXX_LIBEXPORT undefined_table : public syntax_error
-{
-public:
-  explicit undefined_table(
-	const std::string &err,
-	const std::string &Q="",
-	const char sqlstate[]=nullptr) :
-    syntax_error{err, Q, sqlstate} {}
-};
-
-class PQXX_LIBEXPORT insufficient_privilege : public sql_error
-{
-public:
-  explicit insufficient_privilege(
-	const std::string &err,
-	const std::string &Q="",
-	const char sqlstate[]=nullptr) :
-    sql_error{err, Q, sqlstate} {}
-};
-
-/// Resource shortage on the server
-class PQXX_LIBEXPORT insufficient_resources : public sql_error
-{
-public:
-  explicit insufficient_resources(
-	const std::string &err,
-	const std::string &Q="",
-	const char sqlstate[]=nullptr) :
-    sql_error{err,Q, sqlstate} {}
-};
-
-class PQXX_LIBEXPORT disk_full : public insufficient_resources
-{
-public:
-  explicit disk_full(
-	const std::string &err,
-	const std::string &Q="",
-	const char sqlstate[]=nullptr) :
-    insufficient_resources{err, Q, sqlstate} {}
-};
-
-class PQXX_LIBEXPORT out_of_memory : public insufficient_resources
-{
-public:
-  explicit out_of_memory(
-	const std::string &err,
-	const std::string &Q="",
-	const char sqlstate[]=nullptr) :
-    insufficient_resources{err, Q, sqlstate} {}
-};
-
-class PQXX_LIBEXPORT too_many_connections : public broken_connection
-{
-public:
-  explicit too_many_connections(const std::string &err) :
-	broken_connection{err} {}
-};
-
-/// PL/pgSQL error
-/** Exceptions derived from this class are errors from PL/pgSQL procedures.
- */
-class PQXX_LIBEXPORT plpgsql_error : public sql_error
-{
-public:
-  explicit plpgsql_error(
-	const std::string &err,
-	const std::string &Q="",
-	const char sqlstate[]=nullptr) :
-    sql_error{err, Q, sqlstate} {}
-};
-
-/// Exception raised in PL/pgSQL procedure
-class PQXX_LIBEXPORT plpgsql_raise : public plpgsql_error
-{
-public:
-  explicit plpgsql_raise(
-	const std::string &err,
-	const std::string &Q="",
-	const char sqlstate[]=nullptr) :
-    plpgsql_error{err, Q, sqlstate} {}
-};
-
-class PQXX_LIBEXPORT plpgsql_no_data_found : public plpgsql_error
-{
-public:
-  explicit plpgsql_no_data_found(
-	const std::string &err,
-	const std::string &Q="",
-	const char sqlstate[]=nullptr) :
-    plpgsql_error{err, Q, sqlstate} {}
-};
-
-class PQXX_LIBEXPORT plpgsql_too_many_rows : public plpgsql_error
-{
-public:
-  explicit plpgsql_too_many_rows(
-	const std::string &err,
-	const std::string &Q="",
-	const char sqlstate[]=nullptr) :
-    plpgsql_error{err, Q, sqlstate} {}
-};
-
-/**
- * @}
- */
-
-}
-
-#include "pqxx/compiler-internal-post.hxx"
-
-#endif
diff --git a/contrib/libs/libpqxx/include/pqxx/field b/contrib/libs/libpqxx/include/pqxx/field
deleted file mode 100644
index e799e6797b..0000000000
--- a/contrib/libs/libpqxx/include/pqxx/field
+++ /dev/null
@@ -1,6 +0,0 @@
-/** pqxx::field class.
- *
- * pqxx::field refers to a field in a query result.
- */
-// Actual definitions in .hxx file so editors and such recognize file type.
-#include "pqxx/field.hxx"
diff --git a/contrib/libs/libpqxx/include/pqxx/field.hxx b/contrib/libs/libpqxx/include/pqxx/field.hxx
deleted file mode 100644
index 5676d2a848..0000000000
--- a/contrib/libs/libpqxx/include/pqxx/field.hxx
+++ /dev/null
@@ -1,373 +0,0 @@
-/** Definitions for the pqxx::field class.
- *
- * pqxx::field refers to a field in a query result.
- *
- * DO NOT INCLUDE THIS FILE DIRECTLY; include pqxx/field instead.
- *
- * Copyright (c) 2000-2019, Jeroen T. Vermeulen.
- *
- * See COPYING for copyright license.  If you did not receive a file called
- * COPYING with this source code, please notify the distributor of this mistake,
- * or contact the author.
- */
-#ifndef PQXX_H_FIELD
-#define PQXX_H_FIELD
-
-#include "pqxx/compiler-public.hxx"
-#include "pqxx/compiler-internal-pre.hxx"
-#include "pqxx/internal/type_utils.hxx"
-
-#if defined(PQXX_HAVE_OPTIONAL)
-#include <optional>
-
-/* Use std::experimental::optional as a fallback for std::optional, if
- * present.
- *
- * This may break compilation for some software, if using a libpqxx that was
- * configured for a different language version.  To stop libpqxx headers from
- * using or supporting std::experimental::optional, define a macro
- * PQXX_HIDE_EXP_OPTIONAL when building your software.
- */
-#elif defined(PQXX_HAVE_EXP_OPTIONAL) && !defined(PQXX_HIDE_EXP_OPTIONAL)
-#error #include <experimental/optional>
-#endif
-
-#include "pqxx/array.hxx"
-#include "pqxx/result.hxx"
-#include "pqxx/strconv.hxx"
-#include "pqxx/types.hxx"
-
-
-// Methods tested in eg. test module test01 are marked with "//[t01]".
-
-namespace pqxx
-{
-/// Reference to a field in a result set.
-/** A field represents one entry in a row.  It represents an actual value
- * in the result set, and can be converted to various types.
- */
-class PQXX_LIBEXPORT field
-{
-public:
-  using size_type = field_size_type;
-
-  /// Constructor.
-  /** Create field as reference to a field in a result set.
-   * @param R Row that this field is part of.
-   * @param C Column number of this field.
-   */
-  field(const row &R, row_size_type C) noexcept;			//[t01]
-
-  /**
-   * @name Comparison
-   */
-  //@{
-  /// Byte-by-byte comparison of two fields (all nulls are considered equal)
-  /** @warning null handling is still open to discussion and change!
-   *
-   * Handling of null values differs from that in SQL where a comparison
-   * involving a null value yields null, so nulls are never considered equal
-   * to one another or even to themselves.
-   *
-   * Null handling also probably differs from the closest equivalent in C++,
-   * which is the NaN (Not-a-Number) value, a singularity comparable to
-   * SQL's null.  This is because the builtin == operator demands that a == a.
-   *
-   * The usefulness of this operator is questionable.  No interpretation
-   * whatsoever is imposed on the data; 0 and 0.0 are considered different,
-   * as are null vs. the empty string, or even different (but possibly
-   * equivalent and equally valid) encodings of the same Unicode character
-   * etc.
-   */
-  bool operator==(const field &) const;				//[t75]
-
-  /// Byte-by-byte comparison (all nulls are considered equal)
-  /** @warning See operator==() for important information about this operator
-   */
-  bool operator!=(const field &rhs) const				//[t82]
-						   {return not operator==(rhs);}
-  //@}
-
-  /**
-   * @name Column information
-   */
-  //@{
-  /// Column name
-  const char *name() const;						//[t11]
-
-  /// Column type
-  oid type() const;							//[t07]
-
-  /// What table did this column come from?
-  oid table() const;							//[t02]
-
-  row_size_type num() const { return col(); }				//[t82]
-
-  /// What column number in its originating table did this column come from?
-  row_size_type table_column() const;					//[t93]
-  //@}
-
-  /**
-   * @name Content access
-   */
-  //@{
-  /// Read as plain C string
-  /** Since the field's data is stored internally in the form of a
-   * zero-terminated C string, this is the fastest way to read it.  Use the
-   * to() or as() functions to convert the string to other types such as
-   * @c int, or to C++ strings.
-   */
-  const char *c_str() const;						//[t02]
-
-  /// Is this field's value null?
-  bool is_null() const noexcept;					//[t12]
-
-  /// Return number of bytes taken up by the field's value.
-  /**
-   * Includes the terminating zero byte.
-   */
-  size_type size() const noexcept;					//[t11]
-
-  /// Read value into Obj; or leave Obj untouched and return @c false if null
-  /** Note this can be used with optional types (except pointers other than
-   * C-strings)
-   */
-  template<typename T> auto to(T &Obj) const				//[t03]
-    -> typename std::enable_if<(
-      not std::is_pointer<T>::value
-      or std::is_same<T, const char*>::value
-    ), bool>::type
-  {
-    const char *const bytes = c_str();
-    if (bytes[0] == '\0' and is_null()) return false;
-    from_string(bytes, Obj);
-    return true;
-  }
-
-  /// Read value into Obj; or leave Obj untouched and return @c false if null
-  template<typename T> bool operator>>(T &Obj) const			//[t07]
-      { return to(Obj); }
-
-  /// Read value into Obj; or use Default & return @c false if null
-  /** Note this can be used with optional types (except pointers other than
-   * C-strings)
-   */
-  template<typename T> auto to(T &Obj, const T &Default) const	//[t12]
-    -> typename std::enable_if<(
-      not std::is_pointer<T>::value
-      or std::is_same<T, const char*>::value
-    ), bool>::type
-  {
-    const bool NotNull = to(Obj);
-    if (not NotNull) Obj = Default;
-    return NotNull;
-  }
-
-  /// Return value as object of given type, or Default if null
-  /** Note that unless the function is instantiated with an explicit template
-   * argument, the Default value's type also determines the result type.
-   */
-  template<typename T> T as(const T &Default) const			//[t01]
-  {
-    T Obj;
-    to(Obj, Default);
-    return Obj;
-  }
-
-  /// Return value as object of given type, or throw exception if null
-  /** Use as `as<std::optional<int>>()` or `as<my_untemplated_optional_t>()` as
-   * an alternative to `get<int>()`; this is disabled for use with raw pointers
-   * (other than C-strings) because storage for the value can't safely be
-   * allocated here
-   */
-  template<typename T> T as() const					//[t45]
-  {
-    T Obj;
-    if (not to(Obj)) Obj = string_traits<T>::null();
-    return Obj;
-  }
-
-  /// Return value wrapped in some optional type (empty for nulls)
-  /** Use as `get<int>()` as before to obtain previous behavior (i.e. only
-   * usable when `std::optional` or `std::experimental::optional` are
-   * available), or specify container type with `get<int, std::optional>()`
-   */
-  template<typename T, template<typename> class O
-#if defined(PQXX_HAVE_OPTIONAL)
-    = std::optional
-#elif defined(PQXX_HAVE_EXP_OPTIONAL) && !defined(PQXX_HIDE_EXP_OPTIONAL)
-    = std::experimental::optional
-#endif
-  > constexpr O<T> get() const { return as<O<T>>(); }
-
-  /// Parse the field as an SQL array.
-  /** Call the parser to retrieve values (and structure) from the array.
-   *
-   * Make sure the @c result object stays alive until parsing is finished.  If
-   * you keep the @c row of @c field object alive, it will keep the @c result
-   * object alive as well.
-   */
-  array_parser as_array() const
-        { return array_parser{c_str(), m_home.m_encoding}; }
-  //@}
-
-
-protected:
-  const result &home() const noexcept { return m_home; }
-  size_t idx() const noexcept { return m_row; }
-  row_size_type col() const noexcept { return row_size_type(m_col); }
-
-  /**
-   * You'd expect this to be a size_t, but due to the way reverse iterators
-   * are related to regular iterators, it must be allowed to underflow to -1.
-   */
-  long m_col;
-
-private:
-  result m_home;
-  size_t m_row;
-};
-
-
-/// Specialization: <tt>to(string &)</tt>.
-template<>
-inline bool field::to<std::string>(std::string &Obj) const
-{
-  const char *const bytes = c_str();
-  if (bytes[0] == '\0' and is_null()) return false;
-  Obj = std::string{bytes, size()};
-  return true;
-}
-
-/// Specialization: <tt>to(const char *&)</tt>.
-/** The buffer has the same lifetime as the data in this result (i.e. of this
- * result object, or the last remaining one copied from it etc.), so take care
- * not to use it after the last result object referring to this query result is
- * destroyed.
- */
-template<>
-inline bool field::to<const char *>(const char *&Obj) const
-{
-  if (is_null()) return false;
-  Obj = c_str();
-  return true;
-}
-
-
-template<typename CHAR=char, typename TRAITS=std::char_traits<CHAR>>
-  class field_streambuf :
-  public std::basic_streambuf<CHAR, TRAITS>
-{
-public:
-  using char_type = CHAR;
-  using traits_type = TRAITS;
-  using int_type = typename traits_type::int_type;
-  using pos_type = typename traits_type::pos_type;
-  using off_type = typename traits_type::off_type;
-  using openmode = std::ios::openmode;
-  using seekdir = std::ios::seekdir;
-
-  explicit field_streambuf(const field &F) :			//[t74]
-    m_field{F}
-  {
-    initialize();
-  }
-
-protected:
-  virtual int sync() override { return traits_type::eof(); }
-
-protected:
-  virtual pos_type seekoff(off_type, seekdir, openmode) override
-	{ return traits_type::eof(); }
-  virtual pos_type seekpos(pos_type, openmode) override
-	{return traits_type::eof();}
-  virtual int_type overflow(int_type) override
-	{ return traits_type::eof(); }
-  virtual int_type underflow() override
-	{ return traits_type::eof(); }
-
-private:
-  const field &m_field;
-
-  int_type initialize()
-  {
-    char_type *G =
-      reinterpret_cast<char_type *>(const_cast<char *>(m_field.c_str()));
-    this->setg(G, G, G + m_field.size());
-    return int_type(m_field.size());
-  }
-};
-
-
-/// Input stream that gets its data from a result field
-/** Use this class exactly as you would any other istream to read data from a
- * field.  All formatting and streaming operations of @c std::istream are
- * supported.  What you'll typically want to use, however, is the fieldstream
- * alias (which defines a basic_fieldstream for @c char).  This is similar to
- * how e.g. @c std::ifstream relates to @c std::basic_ifstream.
- *
- * This class has only been tested for the char type (and its default traits).
- */
-template<typename CHAR=char, typename TRAITS=std::char_traits<CHAR>>
-  class basic_fieldstream :
-    public std::basic_istream<CHAR, TRAITS>
-{
-  using super = std::basic_istream<CHAR, TRAITS>;
-
-public:
-  using char_type = CHAR;
-  using traits_type = TRAITS;
-  using int_type = typename traits_type::int_type;
-  using pos_type = typename traits_type::pos_type;
-  using off_type = typename traits_type::off_type;
-
-  basic_fieldstream(const field &F) : super{nullptr}, m_buf{F}
-	{ super::init(&m_buf); }
-
-private:
-  field_streambuf<CHAR, TRAITS> m_buf;
-};
-
-using fieldstream = basic_fieldstream<char>;
-
-/// Write a result field to any type of stream
-/** This can be convenient when writing a field to an output stream.  More
- * importantly, it lets you write a field to e.g. a @c stringstream which you
- * can then use to read, format and convert the field in ways that to() does not
- * support.
- *
- * Example: parse a field into a variable of the nonstandard
- * "<tt>long long</tt>" type.
- *
- * @code
- * extern result R;
- * long long L;
- * stringstream S;
- *
- * // Write field's string into S
- * S << R[0][0];
- *
- * // Parse contents of S into L
- * S >> L;
- * @endcode
- */
-template<typename CHAR>
-inline std::basic_ostream<CHAR> &operator<<(
-	std::basic_ostream<CHAR> &S, const field &F)		        //[t46]
-{
-  S.write(F.c_str(), std::streamsize(F.size()));
-  return S;
-}
-
-
-/// Convert a field's string contents to another type.
-template<typename T>
-inline void from_string(const field &F, T &Obj)				//[t46]
-	{ from_string(F.c_str(), Obj, F.size()); }
-
-/// Convert a field to a string.
-template<> PQXX_LIBEXPORT std::string to_string(const field &Obj);	//[t74]
-
-} // namespace pqxx
-#include "pqxx/compiler-internal-post.hxx"
-#endif
diff --git a/contrib/libs/libpqxx/include/pqxx/internal/callgate.hxx b/contrib/libs/libpqxx/include/pqxx/internal/callgate.hxx
deleted file mode 100644
index 02ac152636..0000000000
--- a/contrib/libs/libpqxx/include/pqxx/internal/callgate.hxx
+++ /dev/null
@@ -1,79 +0,0 @@
-#ifndef PQXX_H_CALLGATE
-#define PQXX_H_CALLGATE
-
-/*
-Here's what a typical gate class definition looks like:
-
-#include <pqxx/internal/callgate.hxx>
-
-namespace pqxx
-{
-namespace internal
-{
-namespace gate
-{
-class PQXX_PRIVATE @gateclass@ : callgate<@host@>
-{
-  friend class @client@;
-
-  @gateclass@(reference x) : super(x) {}
-
-  // Methods here.  Use home() to access the host-class object.
-};
-} // namespace pqxx::internal::gate
-} // namespace pqxx::internal
-} // namespace pqxx
-*/
-
-namespace pqxx
-{
-namespace internal
-{
-/// Base class for call gates.
-/**
- * A call gate defines a limited, private interface on the host class that
- * specified client classes can access.
- *
- * The metaphor works as follows: the gate stands in front of a "home," which is
- * really a class, and only lets specific friends in.
- *
- * To implement a call gate that gives client C access to host H,
- *  - derive a gate class from callgate<H>;
- *  - make the gate class a friend of H;
- *  - make C a friend of the gate class; and
- *  - implement "stuff C can do with H" as private members in the gate class.
- *
- * This special kind of "gated" friendship gives C private access to H, but only
- * through an expressly limited interface.  The gate class can access its host
- * object as home().
- *
- * Keep gate classes entirely stateless.  They should be ultra-lightweight
- * wrappers for their host classes, and be optimized away as much as possible by
- * the compiler.  Once you start adding state, you're on a slippery slope away
- * from the pure, clean, limited interface pattern that gate classes are meant
- * to implement.
- *
- * Ideally, all member functions of the gate class should be one-liners passing
- * calls straight on to the host class.  It can be useful however to break this
- * rule temporarily during inter-class refactoring.
- */
-template<typename HOME> class PQXX_PRIVATE callgate
-{
-protected:
-  /// This class, to keep constructors easy.
-  using super = callgate<HOME>;
-  /// A reference to the host class.  Helps keep constructors easy.
-  using reference = HOME &;
-
-  callgate(reference x) : m_home(x) {}
-
-  /// The home object.  The gate class has full "private" access.
-  reference home() const noexcept { return m_home; }
-
-private:
-  reference m_home;
-};
-} // namespace pqxx::internal
-} // namespace pqxx
-
-#endif
diff --git a/contrib/libs/libpqxx/include/pqxx/internal/encoding_group.hxx b/contrib/libs/libpqxx/include/pqxx/internal/encoding_group.hxx
deleted file mode 100644
index be31d083b4..0000000000
--- a/contrib/libs/libpqxx/include/pqxx/internal/encoding_group.hxx
+++ /dev/null
@@ -1,46 +0,0 @@
-/** Enum type for supporting encodings in libpqxx
- *
- * Copyright (c) 2000-2019, Jeroen T. Vermeulen.
- *
- * See COPYING for copyright license.  If you did not receive a file called
- * COPYING with this source code, please notify the distributor of this mistake,
- * or contact the author.
- */
-#ifndef PQXX_H_ENCODING_GROUP
-#define PQXX_H_ENCODING_GROUP
-
-
-namespace pqxx
-{
-namespace internal
-{
-
-// Types of encodings supported by PostgreSQL, see
-// https://www.postgresql.org/docs/current/static/multibyte.html#CHARSET-TABLE
-enum class encoding_group
-{
-  // Handles all single-byte fixed-width encodings
-  MONOBYTE,
-  
-  // Multibyte encodings
-  BIG5,
-  EUC_CN,
-  EUC_JP,
-  EUC_JIS_2004,
-  EUC_KR,
-  EUC_TW,
-  GB18030,
-  GBK,
-  JOHAB,
-  MULE_INTERNAL,
-  SJIS,
-  SHIFT_JIS_2004,
-  UHC,
-  UTF8
-};
-
-} // namespace pqxx::internal
-} // namespace pqxx
-
-
-#endif
diff --git a/contrib/libs/libpqxx/include/pqxx/internal/encodings.hxx b/contrib/libs/libpqxx/include/pqxx/internal/encodings.hxx
deleted file mode 100644
index 01ca223d48..0000000000
--- a/contrib/libs/libpqxx/include/pqxx/internal/encodings.hxx
+++ /dev/null
@@ -1,99 +0,0 @@
-/** Internal string encodings support for libpqxx
- *
- * Copyright (c) 2000-2019, Jeroen T. Vermeulen.
- *
- * See COPYING for copyright license.  If you did not receive a file called
- * COPYING with this source code, please notify the distributor of this mistake,
- * or contact the author.
- */
-#ifndef PQXX_H_ENCODINGS
-#define PQXX_H_ENCODINGS
-
-#include "pqxx/compiler-public.hxx"
-#include "pqxx/compiler-internal-pre.hxx"
-#include "pqxx/internal/encoding_group.hxx"
-
-#include <string>
-
-
-namespace pqxx
-{
-namespace internal
-{
-const char *name_encoding(int encoding_id);
-
-/// Convert libpq encoding enum or encoding name to its libpqxx group.
-encoding_group enc_group(int /* libpq encoding ID */);
-encoding_group enc_group(const std::string&);
-
-
-/// Function type: "find the end of the current glyph."
-/** This type of function takes a text buffer, and a location in that buffer,
- * and returns the location one byte past the end of the current glyph.
- *
- * The start offset marks the beginning of the current glyph.  It must fall
- * within the buffer.
- *
- * There are multiple different glyph scnaner implementations, for different
- * kinds of encodings.
- */
-using glyph_scanner_func =
-  std::string::size_type(
-	const char buffer[],
-	std::string::size_type buffer_len,
-	std::string::size_type start);
-
-
-/// Look up the glyph scanner function for a given encoding group.
-/** To identify the glyph boundaries in a buffer, call this to obtain the
- * scanner function appropriate for the buffer's encoding.  Then, repeatedly
- * call the scanner function to find the glyphs.
- */
-PQXX_LIBEXPORT glyph_scanner_func *get_glyph_scanner(encoding_group);
-
-
-/// Find a single-byte "needle" character in a "haystack" text buffer.
-std::string::size_type find_with_encoding(
-  encoding_group enc,
-  const std::string& haystack,
-  char needle,
-  std::string::size_type start = 0
-);
-
-
-PQXX_LIBEXPORT std::string::size_type find_with_encoding(
-  encoding_group enc,
-  const std::string& haystack,
-  const std::string& needle,
-  std::string::size_type start = 0
-);
-
-
-/// Iterate over the glyphs in a buffer.
-/** Scans the glyphs in the buffer, and for each, passes its begin and its
- * one-past-end pointers to @c callback.
- */
-template<typename CALLABLE> PQXX_LIBEXPORT inline void for_glyphs(
-        encoding_group enc,
-        CALLABLE callback,
-        const char buffer[],
-        std::string::size_type buffer_len,
-        std::string::size_type start = 0
-)
-{
-  const auto scan = get_glyph_scanner(enc);
-  for (
-        std::string::size_type here = start, next;
-        here < buffer_len;
-        here = next
-  )
-  {
-    next = scan(buffer, buffer_len, here);
-    callback(buffer + here, buffer + next);
-  }
-}
-} // namespace pqxx::internal
-} // namespace pqxx
-
-#include "pqxx/compiler-internal-post.hxx"
-#endif
diff --git a/contrib/libs/libpqxx/include/pqxx/internal/gates/connection-dbtransaction.hxx b/contrib/libs/libpqxx/include/pqxx/internal/gates/connection-dbtransaction.hxx
deleted file mode 100644
index 8ef2e4744f..0000000000
--- a/contrib/libs/libpqxx/include/pqxx/internal/gates/connection-dbtransaction.hxx
+++ /dev/null
@@ -1,22 +0,0 @@
-#include <pqxx/internal/callgate.hxx>
-
-namespace pqxx
-{
-class dbtransaction;
-
-namespace internal
-{
-namespace gate
-{
-class PQXX_PRIVATE connection_dbtransaction : callgate<connection_base>
-{
-  friend class pqxx::dbtransaction;
-
-  connection_dbtransaction(reference x) : super(x) {}
-
-  int get_reactivation_avoidance_count() const noexcept
-	{ return home().m_reactivation_avoidance.get(); }
-};
-} // namespace pqxx::internal::gate
-} // namespace pqxx::internal
-} // namespace pqxx
diff --git a/contrib/libs/libpqxx/include/pqxx/internal/gates/connection-errorhandler.hxx b/contrib/libs/libpqxx/include/pqxx/internal/gates/connection-errorhandler.hxx
deleted file mode 100644
index 9c62704dbe..0000000000
--- a/contrib/libs/libpqxx/include/pqxx/internal/gates/connection-errorhandler.hxx
+++ /dev/null
@@ -1,25 +0,0 @@
-#include <pqxx/internal/callgate.hxx>
-
-namespace pqxx
-{
-class connection_base;
-class errorhandler;
-
-namespace internal
-{
-namespace gate
-{
-class PQXX_PRIVATE connection_errorhandler : callgate<connection_base>
-{
-  friend class pqxx::errorhandler;
-
-  connection_errorhandler(reference x) : super(x) {}
-
-  void register_errorhandler(errorhandler *h)
-					    { home().register_errorhandler(h); }
-  void unregister_errorhandler(errorhandler *h)
-					  { home().unregister_errorhandler(h); }
-};
-} // namespace pqxx::internal::gate
-} // namespace pqxx::internal
-} // namespace pqxx
diff --git a/contrib/libs/libpqxx/include/pqxx/internal/gates/connection-largeobject.hxx b/contrib/libs/libpqxx/include/pqxx/internal/gates/connection-largeobject.hxx
deleted file mode 100644
index e4f3b28fcc..0000000000
--- a/contrib/libs/libpqxx/include/pqxx/internal/gates/connection-largeobject.hxx
+++ /dev/null
@@ -1,35 +0,0 @@
-#include <string>
-
-#include <pqxx/internal/callgate.hxx>
-#include <pqxx/internal/libpq-forward.hxx>
-
-namespace pqxx
-{
-class largeobject;
-
-namespace internal
-{
-namespace gate
-{
-class PQXX_PRIVATE connection_largeobject : callgate<connection_base>
-{
-  friend class pqxx::largeobject;
-
-  connection_largeobject(reference x) : super(x) {}
-
-  pq::PGconn *raw_connection() const { return home().raw_connection(); }
-};
-
-
-class PQXX_PRIVATE const_connection_largeobject :
-	callgate<const connection_base>
-{
-  friend class pqxx::largeobject;
-
-  const_connection_largeobject(reference x) : super(x) {}
-
-  std::string error_message() const { return home().err_msg(); }
-};
-} // namespace pqxx::internal::gate
-} // namespace pqxx::internal
-} // namespace pqxx
diff --git a/contrib/libs/libpqxx/include/pqxx/internal/gates/connection-notification_receiver.hxx b/contrib/libs/libpqxx/include/pqxx/internal/gates/connection-notification_receiver.hxx
deleted file mode 100644
index d03f048f37..0000000000
--- a/contrib/libs/libpqxx/include/pqxx/internal/gates/connection-notification_receiver.hxx
+++ /dev/null
@@ -1,27 +0,0 @@
-#include <pqxx/internal/callgate.hxx>
-
-#include <pqxx/connection_base>
-
-
-namespace pqxx
-{
-class notification_receiver;
-
-namespace internal
-{
-namespace gate
-{
-class PQXX_PRIVATE connection_notification_receiver : callgate<connection_base>
-{
-  friend class pqxx::notification_receiver;
-
-  connection_notification_receiver(reference x) : super(x) {}
-
-  void add_receiver(notification_receiver *receiver)
-	{ home().add_receiver(receiver); }
-  void remove_receiver(notification_receiver *receiver) noexcept
-	{ home().remove_receiver(receiver); }
-};
-} // namespace pqxx::internal::gate
-} // namespace pqxx::internal
-} // namespace pqxx
diff --git a/contrib/libs/libpqxx/include/pqxx/internal/gates/connection-parameterized_invocation.hxx b/contrib/libs/libpqxx/include/pqxx/internal/gates/connection-parameterized_invocation.hxx
deleted file mode 100644
index 364c5b6dac..0000000000
--- a/contrib/libs/libpqxx/include/pqxx/internal/gates/connection-parameterized_invocation.hxx
+++ /dev/null
@@ -1,37 +0,0 @@
-#include <pqxx/internal/callgate.hxx>
-
-namespace pqxx
-{
-class connection_base;
-
-namespace internal
-{
-namespace gate
-{
-class PQXX_PRIVATE connection_parameterized_invocation :
-  callgate<connection_base>
-{
-  friend class pqxx::internal::parameterized_invocation;
-
-  connection_parameterized_invocation(reference x) : super(x) {}
-
-  result parameterized_exec(
-	const std::string &query,
-	const char *const params[],
-	const int paramlengths[],
-	const int binaries[],
-	int nparams)
-  {
-#include <pqxx/internal/ignore-deprecated-pre.hxx>
-    return home().parameterized_exec(
-	query,
-	params,
-	paramlengths,
-	binaries,
-	nparams);
-#include <pqxx/internal/ignore-deprecated-post.hxx>
-  }
-};
-} // namespace pqxx::internal::gate
-} // namespace pqxx::internal
-} // namespace pqxx
diff --git a/contrib/libs/libpqxx/include/pqxx/internal/gates/connection-pipeline.hxx b/contrib/libs/libpqxx/include/pqxx/internal/gates/connection-pipeline.hxx
deleted file mode 100644
index d7d42ef981..0000000000
--- a/contrib/libs/libpqxx/include/pqxx/internal/gates/connection-pipeline.hxx
+++ /dev/null
@@ -1,27 +0,0 @@
-#include <pqxx/internal/callgate.hxx>
-#include "pqxx/internal/libpq-forward.hxx"
-
-namespace pqxx
-{
-namespace internal
-{
-namespace gate
-{
-class PQXX_PRIVATE connection_pipeline : callgate<connection_base>
-{
-  friend class pqxx::pipeline;
-
-  connection_pipeline(reference x) : super(x) {}
-
-  void start_exec(const std::string &query) { home().start_exec(query); }
-  pqxx::internal::pq::PGresult *get_result() { return home().get_result(); }
-  void cancel_query() { home().cancel_query(); }
-
-  bool consume_input() noexcept { return home().consume_input(); }
-  bool is_busy() const noexcept { return home().is_busy(); }
-
-  int encoding_id() { return home().encoding_id(); }
-};
-} // namespace pqxx::internal::gate
-} // namespace pqxx::internal
-} // namespace pqxx
diff --git a/contrib/libs/libpqxx/include/pqxx/internal/gates/connection-prepare-invocation.hxx b/contrib/libs/libpqxx/include/pqxx/internal/gates/connection-prepare-invocation.hxx
deleted file mode 100644
index c1c29583cc..0000000000
--- a/contrib/libs/libpqxx/include/pqxx/internal/gates/connection-prepare-invocation.hxx
+++ /dev/null
@@ -1,45 +0,0 @@
-#include <pqxx/internal/callgate.hxx>
-
-namespace pqxx
-{
-namespace prepare
-{
-class invocation;
-} // namespace pqxx::prepare
-
-namespace internal
-{
-namespace gate
-{
-class PQXX_PRIVATE connection_prepare_invocation : callgate<connection_base>
-{
-  friend class pqxx::prepare::invocation;
-
-  connection_prepare_invocation(reference x) : super(x) {}
-
-  /// @deprecated To be replaced by exec_prepared.
-  result prepared_exec(
-	const std::string &statement,
-	const char *const params[],
-	const int paramlengths[],
-	const int binary[],
-	int nparams,
-	result_format format)
-  {
-#include <pqxx/internal/ignore-deprecated-pre.hxx>
-    return home().prepared_exec(
-	statement,
-	params,
-	paramlengths,
-	binary,
-	nparams,
-	format);
-#include <pqxx/internal/ignore-deprecated-post.hxx>
-  }
-
-  bool prepared_exists(const std::string &statement) const
-	{ return home().prepared_exists(statement); }
-};
-} // namespace pqxx::internal::gate
-} // namespace pqxx::internal
-} // namespace pqxx
diff --git a/contrib/libs/libpqxx/include/pqxx/internal/gates/connection-reactivation_avoidance_exemption.hxx b/contrib/libs/libpqxx/include/pqxx/internal/gates/connection-reactivation_avoidance_exemption.hxx
deleted file mode 100644
index 48ef89a46e..0000000000
--- a/contrib/libs/libpqxx/include/pqxx/internal/gates/connection-reactivation_avoidance_exemption.hxx
+++ /dev/null
@@ -1,24 +0,0 @@
-#include <pqxx/internal/callgate.hxx>
-
-namespace pqxx
-{
-namespace internal
-{
-class reactivation_avoidance_exemption;
-
-namespace gate
-{
-class PQXX_PRIVATE connection_reactivation_avoidance_exemption :
-  callgate<connection_base>
-{
-  friend class pqxx::internal::reactivation_avoidance_exemption;
-
-  connection_reactivation_avoidance_exemption(reference x) : super(x) {}
-
-  int get_counter() const { return home().m_reactivation_avoidance.get(); }
-  void add_counter(int x) const { home().m_reactivation_avoidance.add(x); }
-  void clear_counter() { home().m_reactivation_avoidance.clear(); }
-};
-} // namespace pqxx::internal::gate
-} // namespace pqxx::internal
-} // namespace pqxx
diff --git a/contrib/libs/libpqxx/include/pqxx/internal/gates/connection-sql_cursor.hxx b/contrib/libs/libpqxx/include/pqxx/internal/gates/connection-sql_cursor.hxx
deleted file mode 100644
index bb2cfee177..0000000000
--- a/contrib/libs/libpqxx/include/pqxx/internal/gates/connection-sql_cursor.hxx
+++ /dev/null
@@ -1,25 +0,0 @@
-#include <pqxx/internal/callgate.hxx>
-
-namespace pqxx
-{
-namespace internal
-{
-class sql_cursor;
-
-namespace gate
-{
-class PQXX_PRIVATE connection_sql_cursor : callgate<connection_base>
-{
-  friend class pqxx::internal::sql_cursor;
-
-  connection_sql_cursor(reference x) : super(x) {}
-
-  result exec(const char query[], int retries)
-	{ return home().exec(query, retries); }
-
-  void add_reactivation_avoidance_count(int n)
-	{ home().add_reactivation_avoidance_count(n); }
-};
-} // namespace pqxx::internal::gate
-} // namespace pqxx::internal
-} // namespace pqxx
diff --git a/contrib/libs/libpqxx/include/pqxx/internal/gates/connection-transaction.hxx b/contrib/libs/libpqxx/include/pqxx/internal/gates/connection-transaction.hxx
deleted file mode 100644
index f2aaac07f7..0000000000
--- a/contrib/libs/libpqxx/include/pqxx/internal/gates/connection-transaction.hxx
+++ /dev/null
@@ -1,77 +0,0 @@
-#include <pqxx/internal/callgate.hxx>
-
-namespace pqxx
-{
-class connection_base;
-
-namespace internal
-{
-namespace gate
-{
-class PQXX_PRIVATE connection_transaction : callgate<connection_base>
-{
-  friend class pqxx::transaction_base;
-
-  connection_transaction(reference x) : super(x) {}
-
-  result exec(const char query[], int retries)
-	{ return home().exec(query, retries); }
-  void register_transaction(transaction_base *t)
-	{ home().register_transaction(t); }
-  void unregister_transaction(transaction_base *t) noexcept
-	{ home().unregister_transaction(t); }
-
-  bool read_copy_line(std::string &line)
-	{ return home().read_copy_line(line); }
-  void write_copy_line(const std::string &line)
-	{ home().write_copy_line(line); }
-  void end_copy_write() { home().end_copy_write(); }
-
-  std::string raw_get_var(const std::string &var)
-	{ return home().raw_get_var(var); }
-  void raw_set_var(const std::string &var, const std::string &value)
-	{ home().raw_set_var(var, value); }
-  void add_variables(const std::map<std::string, std::string> &vars)
-	{ home().add_variables(vars); }
-
-  /// @deprecated To be replaced by exec_prepared.
-  result prepared_exec(
-	const std::string &statement,
-	const char *const params[],
-	const int paramlengths[],
-	const int binaries[],
-	int nparams)
-  {
-#include <pqxx/internal/ignore-deprecated-pre.hxx>
-    return home().prepared_exec(
-	statement,
-	params,
-	paramlengths,
-	binaries,
-	nparams,
-    result_format::text);
-#include <pqxx/internal/ignore-deprecated-post.hxx>
-  }
-
-  result exec_prepared(
-	const std::string &statement,
-	const internal::params &args,
-	result_format format)
-  {
-    return home().exec_prepared(statement, args, format);
-  }
-
-  result exec_params(const std::string &query, const internal::params &args)
-  {
-    return home().exec_params(query, args);
-  }
-
-  bool prepared_exists(const std::string &statement) const
-	{ return home().prepared_exists(statement); }
-
-  void take_reactivation_avoidance(int counter)
-	{ home().m_reactivation_avoidance.add(counter); }
-};
-} // namespace pqxx::internal::gate
-} // namespace pqxx::internal
-} // namespace pqxx
diff --git a/contrib/libs/libpqxx/include/pqxx/internal/gates/errorhandler-connection.hxx b/contrib/libs/libpqxx/include/pqxx/internal/gates/errorhandler-connection.hxx
deleted file mode 100644
index 1b118e5610..0000000000
--- a/contrib/libs/libpqxx/include/pqxx/internal/gates/errorhandler-connection.hxx
+++ /dev/null
@@ -1,19 +0,0 @@
-#include <pqxx/internal/callgate.hxx>
-
-namespace pqxx
-{
-namespace internal
-{
-namespace gate
-{
-class PQXX_PRIVATE errorhandler_connection_base : callgate<errorhandler>
-{
-  friend class pqxx::connection_base;
-
-  errorhandler_connection_base(reference x) : super(x) {}
-
-  void unregister() noexcept { home().unregister(); }
-};
-} // namespace pqxx::internal::gate
-} // namespace pqxx::internal
-} // namespace pqxx
diff --git a/contrib/libs/libpqxx/include/pqxx/internal/gates/icursor_iterator-icursorstream.hxx b/contrib/libs/libpqxx/include/pqxx/internal/gates/icursor_iterator-icursorstream.hxx
deleted file mode 100644
index 9c17cf2916..0000000000
--- a/contrib/libs/libpqxx/include/pqxx/internal/gates/icursor_iterator-icursorstream.hxx
+++ /dev/null
@@ -1,28 +0,0 @@
-#include <pqxx/internal/callgate.hxx>
-
-namespace pqxx
-{
-namespace internal
-{
-namespace gate
-{
-class PQXX_PRIVATE icursor_iterator_icursorstream : callgate<icursor_iterator>
-{
-  friend class pqxx::icursorstream;
-
-  icursor_iterator_icursorstream(reference x) : super(x) {}
-
-  icursor_iterator::difference_type pos() const noexcept
-	{ return home().pos(); }
-
-  icursor_iterator *get_prev() { return home().m_prev; }
-  void set_prev(icursor_iterator *i) { home().m_prev = i; }
-
-  icursor_iterator *get_next() { return home().m_next; }
-  void set_next(icursor_iterator *i) { home().m_next = i; }
-
-  void fill(const result &r) { home().fill(r); }
-};
-} // namespace pqxx::internal::gate
-} // namespace pqxx::internal
-} // namespace pqxx
diff --git a/contrib/libs/libpqxx/include/pqxx/internal/gates/icursorstream-icursor_iterator.hxx b/contrib/libs/libpqxx/include/pqxx/internal/gates/icursorstream-icursor_iterator.hxx
deleted file mode 100644
index 8f28336bb5..0000000000
--- a/contrib/libs/libpqxx/include/pqxx/internal/gates/icursorstream-icursor_iterator.hxx
+++ /dev/null
@@ -1,30 +0,0 @@
-#include <pqxx/internal/callgate.hxx>
-
-namespace pqxx
-{
-namespace internal
-{
-namespace gate
-{
-class PQXX_PRIVATE icursorstream_icursor_iterator : callgate<icursorstream>
-{
-  friend class pqxx::icursor_iterator;
-
-  icursorstream_icursor_iterator(reference x) : super(x) {}
-
-  void insert_iterator(icursor_iterator *i) noexcept
-	{ home().insert_iterator(i); }
-
-  void remove_iterator(icursor_iterator *i) const noexcept
-	{ home().remove_iterator(i); }
-
-  icursorstream::size_type forward() { return home().forward(); }
-  icursorstream::size_type forward(icursorstream::size_type n)
-	{ return home().forward(n); }
-
-  void service_iterators(icursorstream::difference_type p)
-	{ home().service_iterators(p); }
-};
-} // namespace pqxx::internal::gate
-} // namespace pqxx::internal
-} // namespace pqxx
diff --git a/contrib/libs/libpqxx/include/pqxx/internal/gates/result-connection.hxx b/contrib/libs/libpqxx/include/pqxx/internal/gates/result-connection.hxx
deleted file mode 100644
index 76c8e7a1f1..0000000000
--- a/contrib/libs/libpqxx/include/pqxx/internal/gates/result-connection.hxx
+++ /dev/null
@@ -1,20 +0,0 @@
-#include <pqxx/internal/callgate.hxx>
-
-namespace pqxx
-{
-namespace internal
-{
-namespace gate
-{
-class PQXX_PRIVATE result_connection : callgate<const result>
-{
-  friend class pqxx::connection_base;
-
-  result_connection(reference x) : super(x) {}
-
-  operator bool() const { return bool(home()); }
-  bool operator!() const { return not home(); }
-};
-} // namespace pqxx::internal::gate
-} // namespace pqxx::internal
-} // namespace pqxx
diff --git a/contrib/libs/libpqxx/include/pqxx/internal/gates/result-creation.hxx b/contrib/libs/libpqxx/include/pqxx/internal/gates/result-creation.hxx
deleted file mode 100644
index 6d5671c529..0000000000
--- a/contrib/libs/libpqxx/include/pqxx/internal/gates/result-creation.hxx
+++ /dev/null
@@ -1,28 +0,0 @@
-#include <pqxx/internal/callgate.hxx>
-
-namespace pqxx
-{
-namespace internal
-{
-namespace gate
-{
-class PQXX_PRIVATE result_creation : callgate<const result>
-{
-  friend class pqxx::connection_base;
-  friend class pqxx::pipeline;
-
-  result_creation(reference x) : super(x) {}
-
-  static result create(
-        internal::pq::PGresult *rhs,
-        const std::string &query,
-        encoding_group enc)
-  {
-    return result(rhs, query, enc);
-  }
-
-  void check_status() const { return home().check_status(); }
-};
-} // namespace pqxx::internal::gate
-} // namespace pqxx::internal
-} // namespace pqxx
diff --git a/contrib/libs/libpqxx/include/pqxx/internal/gates/result-row.hxx b/contrib/libs/libpqxx/include/pqxx/internal/gates/result-row.hxx
deleted file mode 100644
index 692d3b5f5b..0000000000
--- a/contrib/libs/libpqxx/include/pqxx/internal/gates/result-row.hxx
+++ /dev/null
@@ -1,22 +0,0 @@
-#include <pqxx/internal/callgate.hxx>
-
-namespace pqxx
-{
-namespace internal
-{
-class row;
-
-namespace gate
-{
-class PQXX_PRIVATE result_row : callgate<result>
-{
-  friend class pqxx::row;
-
-  result_row(reference x) : super(x) {}
-
-  operator bool()
-	{ return bool(home()); }
-};
-} // namespace pqxx::internal::gate
-} // namespace pqxx::internal
-} // namespace pqxx
diff --git a/contrib/libs/libpqxx/include/pqxx/internal/gates/transaction-sql_cursor.hxx b/contrib/libs/libpqxx/include/pqxx/internal/gates/transaction-sql_cursor.hxx
deleted file mode 100644
index 878b171b95..0000000000
--- a/contrib/libs/libpqxx/include/pqxx/internal/gates/transaction-sql_cursor.hxx
+++ /dev/null
@@ -1,16 +0,0 @@
-#include <pqxx/internal/callgate.hxx>
-
-namespace pqxx
-{
-namespace internal
-{
-namespace gate
-{
-class PQXX_PRIVATE transaction_sql_cursor : callgate<transaction_base>
-{
-  friend class pqxx::internal::sql_cursor;
-  transaction_sql_cursor(reference x) : super(x) {}
-};
-} // namespace pqxx::internal::gate
-} // namespace pqxx::internal
-} // namespace pqxx
diff --git a/contrib/libs/libpqxx/include/pqxx/internal/gates/transaction-stream_from.hxx b/contrib/libs/libpqxx/include/pqxx/internal/gates/transaction-stream_from.hxx
deleted file mode 100644
index 6345543dda..0000000000
--- a/contrib/libs/libpqxx/include/pqxx/internal/gates/transaction-stream_from.hxx
+++ /dev/null
@@ -1,23 +0,0 @@
-#include <pqxx/internal/callgate.hxx>
-
-namespace pqxx
-{
-namespace internal
-{
-namespace gate
-{
-class PQXX_PRIVATE transaction_stream_from : callgate<transaction_base>
-{
-  friend class pqxx::stream_from;
-
-  transaction_stream_from(reference x) : super(x) {}
-
-  void BeginCopyRead(const std::string &table, const std::string &columns)
-	{ home().BeginCopyRead(table, columns); }
-
-  bool read_copy_line(std::string &line)
-	{ return home().read_copy_line(line); }
-};
-} // namespace pqxx::internal::gate
-} // namespace pqxx::internal
-} // namespace pqxx
diff --git a/contrib/libs/libpqxx/include/pqxx/internal/gates/transaction-stream_to.hxx b/contrib/libs/libpqxx/include/pqxx/internal/gates/transaction-stream_to.hxx
deleted file mode 100644
index 6ee9e9b7d6..0000000000
--- a/contrib/libs/libpqxx/include/pqxx/internal/gates/transaction-stream_to.hxx
+++ /dev/null
@@ -1,27 +0,0 @@
-#include <pqxx/internal/callgate.hxx>
-
-namespace pqxx
-{
-namespace internal
-{
-namespace gate
-{
-class PQXX_PRIVATE transaction_stream_to : callgate<transaction_base>
-{
-  friend class pqxx::stream_to;
-
-  transaction_stream_to(reference x) : super(x) {}
-
-  void BeginCopyWrite(
-	const std::string &table,
-	const std::string &columns = std::string{})
-	{ home().BeginCopyWrite(table, columns); }
-
-  void write_copy_line(const std::string &line)
-	{ home().write_copy_line(line); }
-
-  void end_copy_write() { home().end_copy_write(); }
-};
-} // namespace pqxx::internal::gate
-} // namespace pqxx::internal
-} // namespace pqxx
diff --git a/contrib/libs/libpqxx/include/pqxx/internal/gates/transaction-subtransaction.hxx b/contrib/libs/libpqxx/include/pqxx/internal/gates/transaction-subtransaction.hxx
deleted file mode 100644
index 243f47a798..0000000000
--- a/contrib/libs/libpqxx/include/pqxx/internal/gates/transaction-subtransaction.hxx
+++ /dev/null
@@ -1,20 +0,0 @@
-#include <pqxx/internal/callgate.hxx>
-
-namespace pqxx
-{
-namespace internal
-{
-namespace gate
-{
-class PQXX_PRIVATE transaction_subtransaction : callgate<transaction_base>
-{
-  friend class pqxx::subtransaction;
-
-  transaction_subtransaction(reference x) : super(x) {}
-
-  void add_reactivation_avoidance_count(int n)
-	{ home().m_reactivation_avoidance.add(n); }
-};
-} // namespace pqxx::internal::gate
-} // namespace pqxx::internal
-} // namespace pqxx
diff --git a/contrib/libs/libpqxx/include/pqxx/internal/gates/transaction-tablereader.hxx b/contrib/libs/libpqxx/include/pqxx/internal/gates/transaction-tablereader.hxx
deleted file mode 100644
index 6946d36391..0000000000
--- a/contrib/libs/libpqxx/include/pqxx/internal/gates/transaction-tablereader.hxx
+++ /dev/null
@@ -1,23 +0,0 @@
-#include <pqxx/internal/callgate.hxx>
-
-namespace pqxx
-{
-namespace internal
-{
-namespace gate
-{
-class PQXX_PRIVATE transaction_tablereader : callgate<transaction_base>
-{
-  friend class pqxx::tablereader;
-
-  transaction_tablereader(reference x) : super(x) {}
-
-  void BeginCopyRead(const std::string &table, const std::string &columns)
-	{ home().BeginCopyRead(table, columns); }
-
-  bool read_copy_line(std::string &line)
-	{ return home().read_copy_line(line); }
-};
-} // namespace pqxx::internal::gate
-} // namespace pqxx::internal
-} // namespace pqxx
diff --git a/contrib/libs/libpqxx/include/pqxx/internal/gates/transaction-tablewriter.hxx b/contrib/libs/libpqxx/include/pqxx/internal/gates/transaction-tablewriter.hxx
deleted file mode 100644
index 3256090a2f..0000000000
--- a/contrib/libs/libpqxx/include/pqxx/internal/gates/transaction-tablewriter.hxx
+++ /dev/null
@@ -1,27 +0,0 @@
-#include <pqxx/internal/callgate.hxx>
-
-namespace pqxx
-{
-namespace internal
-{
-namespace gate
-{
-class PQXX_PRIVATE transaction_tablewriter : callgate<transaction_base>
-{
-  friend class pqxx::tablewriter;
-
-  transaction_tablewriter(reference x) : super(x) {}
-
-  void BeginCopyWrite(
-	const std::string &table,
-	const std::string &columns = std::string{})
-	{ home().BeginCopyWrite(table, columns); }
-
-  void write_copy_line(const std::string &line)
-	{ home().write_copy_line(line); }
-
-  void end_copy_write() { home().end_copy_write(); }
-};
-} // namespace pqxx::internal::gate
-} // namespace pqxx::internal
-} // namespace pqxx
diff --git a/contrib/libs/libpqxx/include/pqxx/internal/gates/transaction-transactionfocus.hxx b/contrib/libs/libpqxx/include/pqxx/internal/gates/transaction-transactionfocus.hxx
deleted file mode 100644
index 9ea117a2ea..0000000000
--- a/contrib/libs/libpqxx/include/pqxx/internal/gates/transaction-transactionfocus.hxx
+++ /dev/null
@@ -1,23 +0,0 @@
-#include <pqxx/internal/callgate.hxx>
-
-namespace pqxx
-{
-namespace internal
-{
-namespace gate
-{
-class PQXX_PRIVATE transaction_transactionfocus : callgate<transaction_base>
-{
-  friend class pqxx::internal::transactionfocus;
-
-  transaction_transactionfocus(reference x) : super(x) {}
-
-  void register_focus(transactionfocus *focus) { home().register_focus(focus); }
-  void unregister_focus(transactionfocus *focus) noexcept
-	{ home().unregister_focus(focus); }
-  void register_pending_error(const std::string &error)
-	{ home().register_pending_error(error); }
-};
-} // namespace pqxx::internal::gate
-} // namespace pqxx::internal
-} // namespace pqxx
diff --git a/contrib/libs/libpqxx/include/pqxx/internal/ignore-deprecated-post.hxx b/contrib/libs/libpqxx/include/pqxx/internal/ignore-deprecated-post.hxx
deleted file mode 100644
index 32a84b2751..0000000000
--- a/contrib/libs/libpqxx/include/pqxx/internal/ignore-deprecated-post.hxx
+++ /dev/null
@@ -1,6 +0,0 @@
-/// End a code block started by "ignore-deprecated-pre.hxx".
-#if defined(__GNUC__)
-
-#pragma GCC diagnostic pop
-
-#endif // __GNUC__
diff --git a/contrib/libs/libpqxx/include/pqxx/internal/ignore-deprecated-pre.hxx b/contrib/libs/libpqxx/include/pqxx/internal/ignore-deprecated-pre.hxx
deleted file mode 100644
index 9ada1b7205..0000000000
--- a/contrib/libs/libpqxx/include/pqxx/internal/ignore-deprecated-pre.hxx
+++ /dev/null
@@ -1,19 +0,0 @@
-/** Start a block of deprecated code which may call other deprecated code.
- *
- * Most compilers will emit warnings when deprecated code is invoked from
- * non-deprecated code.  But some compilers (notably gcc) will always emit the
- * warning, even when the calling code is also deprecated.
- *
- * This header starts a block where those warnings are suppressed.  It can be
- * included inside a code block.
- *
- * Always match the #include with a closing #include of
- * "ignore-deprecated-post.hxx".  To avoid mistakes, keep the enclosed area as
- * small as possible.
- */
-#if defined(__GNUC__)
-
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
-
-#endif // __GNUC__
diff --git a/contrib/libs/libpqxx/include/pqxx/internal/libpq-forward.hxx b/contrib/libs/libpqxx/include/pqxx/internal/libpq-forward.hxx
deleted file mode 100644
index 394f3068b2..0000000000
--- a/contrib/libs/libpqxx/include/pqxx/internal/libpq-forward.hxx
+++ /dev/null
@@ -1,34 +0,0 @@
-/** Minimal forward declarations of libpq types needed in libpqxx headers.
- *
- * DO NOT INCLUDE THIS FILE when building client programs.
- *
- * Copyright (c) 2000-2019, Jeroen T. Vermeulen.
- *
- * See COPYING for copyright license.  If you did not receive a file called
- * COPYING with this source code, please notify the distributor of this mistake,
- * or contact the author.
- */
-extern "C"
-{
-struct pg_conn;
-struct pg_result;
-struct pgNotify;
-}
-
-namespace pqxx
-{
-namespace internal
-{
-/// Forward declarations of libpq types as needed in libpqxx headers
-namespace pq
-{
-using PGconn = pg_conn;
-using PGresult = pg_result;
-using PGnotify = pgNotify;
-using PQnoticeProcessor = void (*)(void *, const char *);
-}
-}
-
-/// PostgreSQL database row identifier
-using oid = unsigned int;
-} // extern "C"
diff --git a/contrib/libs/libpqxx/include/pqxx/internal/sql_cursor.hxx b/contrib/libs/libpqxx/include/pqxx/internal/sql_cursor.hxx
deleted file mode 100644
index 828f9d3e6e..0000000000
--- a/contrib/libs/libpqxx/include/pqxx/internal/sql_cursor.hxx
+++ /dev/null
@@ -1,122 +0,0 @@
-/** Internal wrapper for SQL cursors.  Supports higher-level cursor classes.
- *
- * DO NOT INCLUDE THIS FILE DIRECTLY.  Other headers include it for you.
- *
- * Copyright (c) 2000-2019, Jeroen T. Vermeulen.
- *
- * See COPYING for copyright license.  If you did not receive a file called
- * COPYING with this source code, please notify the distributor of this
- * mistake, or contact the author.
- */
-#ifndef PQXX_H_SQL_CURSOR
-#define PQXX_H_SQL_CURSOR
-
-namespace pqxx
-{
-namespace internal
-{
-/// Cursor with SQL positioning semantics.
-/** Thin wrapper around an SQL cursor, with SQL's ideas of positioning.
- *
- * SQL cursors have pre-increment/pre-decrement semantics, with on either end of
- * the result set a special position that does not repesent a row.  This class
- * models SQL cursors for the purpose of implementing more C++-like semantics on
- * top.
- *
- * Positions of actual rows are numbered starting at 1.  Position 0 exists but
- * does not refer to a row.  There is a similar non-row position at the end of
- * the result set.
- *
- * Don't use this at home.  You deserve better.  Use the stateles_cursor
- * instead.
- */
-class PQXX_LIBEXPORT sql_cursor : public cursor_base
-{
-public:
-  sql_cursor(
-	transaction_base &t,
-	const std::string &query,
-	const std::string &cname,
-	cursor_base::accesspolicy ap,
-	cursor_base::updatepolicy up,
-	cursor_base::ownershippolicy op,
-	bool hold,
-	result_format format = result_format::text);
-
-  sql_cursor(
-	transaction_base &t,
-	const std::string &cname,
-	cursor_base::ownershippolicy op);
-
-  ~sql_cursor() noexcept { close(); }
-
-  result fetch(difference_type rows, difference_type &displacement);
-  result fetch(difference_type rows)
-				{ difference_type d=0; return fetch(rows, d); }
-  difference_type move(difference_type rows, difference_type &displacement);
-  difference_type move(difference_type rows)
-				{ difference_type d=0; return move(rows, d); }
-
-  /// Current position, or -1 for unknown
-  /**
-   * The starting position, just before the first row, counts as position zero.
-   *
-   * Position may be unknown if (and only if) this cursor was adopted, and has
-   * never hit its starting position (position zero).
-   */
-  difference_type pos() const noexcept { return m_pos; }
-
-  /// End position, or -1 for unknown
-  /**
-   * Returns the final position, just after the last row in the result set.  The
-   * starting position, just before the first row, counts as position zero.
-   *
-   * End position is unknown until it is encountered during use.
-   */
-  difference_type endpos() const noexcept { return m_endpos; }
-
-  /// Return zero-row result for this cursor
-  const result &empty_result() const noexcept { return m_empty_result; }
-
-  void close() noexcept;
-
-private:
-  difference_type adjust(difference_type hoped, difference_type actual);
-  static std::string stridestring(difference_type);
-  /// Initialize cached empty result.  Call only at beginning or end!
-  void init_empty_result(transaction_base &);
-
-  /// Connection this cursor lives in
-  connection_base &m_home;
-
-  /// Zero-row result from this cursor (or plain empty one if cursor is adopted)
-  result m_empty_result;
-
-  result m_cached_current_row;
-
-  /// Is this cursor adopted (as opposed to created by this cursor object)?
-  bool m_adopted;
-
-  /// Will this cursor object destroy its SQL cursor when it dies?
-  cursor_base::ownershippolicy m_ownership;
-
-  /// At starting position (-1), somewhere in the middle (0), or past end (1)
-  int m_at_end;
-
-  /// Position, or -1 for unknown
-  difference_type m_pos;
-
-  /// End position, or -1 for unknown
-  difference_type m_endpos = -1;
-};
-
-
-PQXX_LIBEXPORT result_size_type obtain_stateless_cursor_size(sql_cursor &);
-PQXX_LIBEXPORT result stateless_cursor_retrieve(
-	sql_cursor &,
-	result::difference_type size,
-	result::difference_type begin_pos,
-	result::difference_type end_pos);
-} // namespace internal
-} // namespace pqxx
-#endif
diff --git a/contrib/libs/libpqxx/include/pqxx/internal/statement_parameters.hxx b/contrib/libs/libpqxx/include/pqxx/internal/statement_parameters.hxx
deleted file mode 100644
index 8c80f6df48..0000000000
--- a/contrib/libs/libpqxx/include/pqxx/internal/statement_parameters.hxx
+++ /dev/null
@@ -1,227 +0,0 @@
-/** Common implementation for statement parameter lists.
- *
- * These are used for both prepared statements and parameterized statements.
- *
- * DO NOT INCLUDE THIS FILE DIRECTLY.  Other headers include it for you.
- *
- * Copyright (c) 2000-2019, Jeroen T. Vermeulen.
- *
- * See COPYING for copyright license.  If you did not receive a file called
- * COPYING with this source code, please notify the distributor of this mistake,
- * or contact the author.
- */
-#ifndef PQXX_H_STATEMENT_PARAMETER
-#define PQXX_H_STATEMENT_PARAMETER
-
-#include "pqxx/compiler-public.hxx"
-#include "pqxx/compiler-internal-pre.hxx"
-
-#include <cstring>
-#include <iterator>
-#include <string>
-#include <vector>
-
-#include "pqxx/binarystring"
-#include "pqxx/strconv"
-#include "pqxx/util"
-
-#include "pqxx/internal/type_utils.hxx"
-
-
-namespace pqxx
-{
-namespace internal
-{
-/// Marker type: pass a dynamically-determined number of statement parameters.
-/** Normally when invoking a prepared or parameterised statement, the number
- * of parameters is known at compile time.  For instance,
- * @c t.exec_prepared("foo", 1, "x"); executes statement @c foo with two
- * parameters, an @c int and a C string.
- *
- * But sometimes you may want to pass a number of parameters known only at run
- * time.  In those cases, a @c dynamic_params encodes a dynamically
- * determined number of parameters.
- */
-template<typename IT> class dynamic_params
-{
-public:
-  /// Wrap a sequence of pointers or iterators.
-  dynamic_params(IT begin, IT end) : m_begin(begin), m_end(end) {}
-
-  /// Wrap a container.
-  template<typename C> explicit dynamic_params(const C &container) :
-        m_begin(std::begin(container)),
-        m_end(std::end(container))
-  {}
-
-  IT begin() const { return m_begin; }
-  IT end() const { return m_end; }
-
-private:
-  const IT m_begin, m_end;
-};
-
-
-class PQXX_LIBEXPORT statement_parameters
-{
-protected:
-  statement_parameters() =default;
-  statement_parameters &operator=(const statement_parameters &) =delete;
-
-  void add_param() { this->add_checked_param("", false, false); }
-  template<typename T> void add_param(const T &v, bool nonnull)
-  {
-    nonnull = (nonnull && not pqxx::string_traits<T>::is_null(v));
-    this->add_checked_param(
-	(nonnull ? pqxx::to_string(v) : ""),
-	nonnull,
-	false);
-  }
-  void add_binary_param(const binarystring &b, bool nonnull)
-	{ this->add_checked_param(b.str(), nonnull, true); }
-
-  /// Marshall parameter values into C-compatible arrays for passing to libpq.
-  int marshall(
-	std::vector<const char *> &values,
-	std::vector<int> &lengths,
-	std::vector<int> &binaries) const;
-
-private:
-  void add_checked_param(const std::string &value, bool nonnull, bool binary);
-
-  std::vector<std::string> m_values;
-  std::vector<bool> m_nonnull;
-  std::vector<bool> m_binary;
-};
-
-
-/// Internal type: encode statement parameters.
-/** Compiles arguments for prepared statements and parameterised queries into
- * a format that can be passed into libpq.
- *
- * Objects of this type are meant to be short-lived.  If you pass in a non-null
- * pointer as a parameter, it may simply use that pointer as a parameter value.
- */
-struct params
-{
-  /// Construct directly from a series of statement arguments.
-  /** The arrays all default to zero, null, and empty strings.
-   */
-  template<typename ...Args> params(Args && ... args)
-  {
-    strings.reserve(sizeof...(args));
-    lengths.reserve(sizeof...(args));
-    nonnulls.reserve(sizeof...(args));
-    binaries.reserve(sizeof...(args));
-
-    // Start recursively storing parameters.
-    add_fields(std::forward<Args>(args)...);
-  }
-
-  /// Compose a vector of pointers to parameter string values.
-  std::vector<const char *> get_pointers() const
-  {
-    const std::size_t num_fields = lengths.size();
-    std::size_t cur_string = 0, cur_bin_string = 0;
-    std::vector<const char *> pointers(num_fields);
-    for (std::size_t index = 0; index < num_fields; index++)
-    {
-      const char *value;
-      if (binaries[index])
-      {
-        value = bin_strings[cur_bin_string].get();
-        cur_bin_string++;
-      }
-      else if (nonnulls[index])
-      {
-        value = strings[cur_string].c_str();
-        cur_string++;
-      }
-      else
-      {
-         value = nullptr;
-      }
-      pointers[index] = value;
-    }
-    return pointers;
-  }
-
-  /// String values, for string parameters.
-  std::vector<std::string> strings;
-  /// As used by libpq: lengths of non-null arguments, in bytes.
-  std::vector<int> lengths;
-  /// As used by libpq: boolean "is this parameter non-null?"
-  std::vector<int> nonnulls;
-  /// As used by libpq: boolean "is this parameter in binary format?"
-  std::vector<int> binaries;
-  /// Binary string values, for binary parameters.
-  std::vector<pqxx::binarystring> bin_strings;
-
-private:
-  /// Add a non-null string field.
-  void add_field(std::string str)
-  {
-    lengths.push_back(int(str.size()));
-    nonnulls.push_back(1);
-    binaries.push_back(0);
-    strings.emplace_back(std::move(str));
-  }
-
-  /// Compile one argument (specialised for null pointer, a null value).
-  void add_field(std::nullptr_t)
-  {
-    lengths.push_back(0);
-    nonnulls.push_back(0);
-    binaries.push_back(0);
-  }
-
-  /// Compile one argument (specialised for binarystring).
-  void add_field(const binarystring &arg)
-  {
-    lengths.push_back(int(arg.size()));
-    nonnulls.push_back(1);
-    binaries.push_back(1);
-    bin_strings.push_back(arg);
-  }
-
-  /// Compile one argument (default, generic implementation).
-  /** Uses string_traits to represent the argument as a std::string.
-   */
-  template<typename Arg> void add_field(const Arg &arg)
-  {
-    if (string_traits<Arg>::is_null(arg)) add_field(nullptr);
-    else add_field(to_string(arg));
-  }
-
-  /// Compile a dynamic_params object into a dynamic number of parameters.
-  template<typename IT> void add_field(const dynamic_params<IT> &parameters)
-  {
-    for (auto param: parameters) add_field(param);
-  }
-
-  /// Compile argument list.
-  /** This recursively "peels off" the next remaining element, compiles its
-   * information into its final form, and calls itself for the rest of the
-   * list.
-   *
-   * @param arg Current argument to be compiled.
-   * @param args Optional remaining arguments, to be compiled recursively.
-   */
-  template<typename Arg, typename ...More>
-  void add_fields(Arg &&arg, More && ... args)
-  {
-    add_field(std::forward<Arg>(arg));
-    // Compile remaining arguments, if any.
-    add_fields(std::forward<More>(args)...);
-  }
-
-  /// Terminating version of add_fields, at the end of the list.
-  /** Recursion in add_fields ends with this call.
-   */
-  void add_fields() {}
-};
-} // namespace pqxx::internal
-} // namespace pqxx
-
-#include "pqxx/compiler-internal-post.hxx"
-#endif
diff --git a/contrib/libs/libpqxx/include/pqxx/internal/type_utils.hxx b/contrib/libs/libpqxx/include/pqxx/internal/type_utils.hxx
deleted file mode 100644
index 7bf5528018..0000000000
--- a/contrib/libs/libpqxx/include/pqxx/internal/type_utils.hxx
+++ /dev/null
@@ -1,211 +0,0 @@
-/** Type/template metaprogramming utilities for use internally in libpqxx
- *
- * Copyright (c) 2000-2019, Jeroen T. Vermeulen.
- *
- * See COPYING for copyright license.  If you did not receive a file called
- * COPYING with this source code, please notify the distributor of this mistake,
- * or contact the author.
- */
-#ifndef PQXX_H_TYPE_UTILS
-#define PQXX_H_TYPE_UTILS
-
-#include <memory>
-#include <type_traits>
-
-#if defined(PQXX_HAVE_OPTIONAL)
-#include <optional>
-#elif defined(PQXX_HAVE_EXP_OPTIONAL) && !defined(PQXX_HIDE_EXP_OPTIONAL)
-#error #include <experimental/optional>
-#endif
-
-#include "pqxx/strconv"
-
-namespace pqxx
-{
-namespace internal
-{
-
-/// Replicate std::void_t<> (available in C++17).
-template<typename... T> using void_t = void;
-
-/// Extract the content type held by an `optional`-like wrapper type.
-/* Replace nested `std::remove_*`s with `std::remove_cvref` in C++20 */
-template<typename T> using inner_type = typename std::remove_cv<
-  typename std::remove_reference<
-    decltype(*std::declval<T>())
-  >::type
->::type;
-
-/// Does the given type have an `operator *()`?
-template<typename T, typename = void> struct is_derefable : std::false_type {};
-template<typename T> struct is_derefable<T, void_t<
-  // Disable for arrays so they don't erroneously decay to pointers.
-  inner_type<typename std::enable_if<not std::is_array<T>::value, T>::type>
->> : std::true_type {};
-
-/// Should the given type be treated as an optional-value wrapper type?
-template<typename T, typename = void> struct is_optional : std::false_type {};
-template<typename T> struct is_optional<T, typename std::enable_if<(
-  is_derefable<T>::value
-  // Check if an `explicit operator bool` exists for this type
-  && std::is_constructible<bool, T>::value
-)>::type> : std::true_type {};
-
-/// Can `nullopt_t` implicitly convert to type T?
-template<
-  typename T,
-  typename = void
-> struct takes_std_nullopt : std::false_type {};
-#if defined(PQXX_HAVE_OPTIONAL)
-template<typename T> struct takes_std_nullopt<
-    T,
-    typename std::enable_if<std::is_assignable<T, std::nullopt_t>::value>::type
-> : std::true_type {};
-#elif defined(PQXX_HAVE_EXP_OPTIONAL) && !defined(PQXX_HIDE_EXP_OPTIONAL)
-template<typename T> struct takes_std_nullopt<
-    T,
-    typename std::enable_if<
-      std::is_assignable<T, std::experimental::nullopt_t>::value
-    >::type
-> : std::true_type {};
-#endif
-
-/// Is type T a `std::tuple<>`?
-template<typename T, typename = void> struct is_tuple : std::false_type {};
-template<typename T> struct is_tuple<
-  T,
-  typename std::enable_if<(std::tuple_size<T>::value >= 0)>::type
-> : std::true_type {};
-
-/// Is type T an iterable container?
-template<typename T, typename = void> struct is_container : std::false_type {};
-template<typename T> struct is_container<
-  T,
-  void_t<
-    decltype(std::begin(std::declval<T>())),
-    decltype(std::end(std::declval<T>())),
-    // Some people might implement a `std::tuple<>` specialization that is
-    // iterable when all the contained types are the same ;)
-    typename std::enable_if<not is_tuple<T>::value>::type
-  >
-> : std::true_type {};
-
-/// Get an appropriate null value for the given type.
-/**
- * pointer types                         `nullptr`
- * `std::optional<>`-like                `std::nullopt`
- * `std::experimental::optional<>`-like  `std::experimental::nullopt`
- * other types                           `pqxx::string_traits<>::null()`
- * Users may add support for their own wrapper types following this pattern.
- */
-template<typename T> constexpr auto null_value()
-  -> typename std::enable_if<
-    (
-      is_optional<T>::value
-      && not takes_std_nullopt<T>::value
-      && std::is_assignable<T, std::nullptr_t>::value
-    ),
-    std::nullptr_t
-  >::type
-{ return nullptr; }
-template<typename T> constexpr auto null_value()
-  -> typename std::enable_if<
-    (not is_optional<T>::value && not takes_std_nullopt<T>::value),
-    decltype(pqxx::string_traits<T>::null())
-  >::type
-{ return pqxx::string_traits<T>::null(); }
-#if defined(PQXX_HAVE_OPTIONAL)
-template<typename T> constexpr auto null_value()
-  -> typename std::enable_if<
-    takes_std_nullopt<T>::value,
-    std::nullopt_t
-  >::type
-{ return std::nullopt; }
-#elif defined(PQXX_HAVE_EXP_OPTIONAL) && !defined(PQXX_HIDE_EXP_OPTIONAL)
-template<typename T> constexpr auto null_value()
-  -> typename std::enable_if<
-    takes_std_nullopt<T>::value,
-    std::experimental::nullopt_t
-  >::type
-{ return std::experimental::nullopt; }
-#endif
-
-/// Construct an optional-like type from the stored type.
-/** 
- * While these may seem redundant, they are necessary to support smart pointers
- * as optional storage types in a generic manner.  It is suggested NOT to
- * provide a version for `inner_type<T>*` as that will almost certainly leak
- * memory.
- * Users may add support for their own wrapper types following this pattern.
- */
-// Enabled if the wrapper type can be directly constructed from the wrapped type
-// (e.g. `std::optional<>`); explicitly disabled for raw pointers in case the
-// inner type is convertible to a pointer (e.g. `int`)
-template<typename T, typename V> constexpr auto make_optional(V&& v)
-  -> typename std::enable_if<
-    not std::is_same<T, inner_type<T>*>::value,
-    decltype(T(std::forward<V>(v)))
-  >::type
-{ return T(std::forward<V>(v)); }
-// Enabled if T is a specialization of `std::unique_ptr<>`.
-template<typename T, typename V> constexpr auto make_optional(V&& v)
-  -> typename std::enable_if<
-    std::is_same<T, std::unique_ptr<inner_type<T>>>::value,
-    std::unique_ptr<inner_type<T>>
-  >::type
-{
-  return std::unique_ptr<inner_type<T>>(new inner_type<T>(std::forward<V>(v)));
-}
-// Enabled if T is a specialization of `std::shared_ptr<>`.
-template<typename T, typename V> constexpr auto make_optional(V&& v)
-  -> typename std::enable_if<
-    std::is_same<T, std::shared_ptr<inner_type<T>>>::value,
-    std::shared_ptr<inner_type<T>>
-  >::type
-{ return std::make_shared<inner_type<T>>(std::forward<V>(v)); }
-
-} // namespace pqxx::internal
-} // namespace pqxx
-
-
-// TODO: Move?
-namespace pqxx
-{
-
-/// Meta `pqxx::string_traits` for std::optional-like types.
-template<typename T> struct string_traits<
-  T,
-  typename std::enable_if<internal::is_optional<T>::value>::type
->
-{
-private:
-  using I = internal::inner_type<T>;
-public:
-  static constexpr const char *name() noexcept
-    { return string_traits<I>::name(); }
-  static constexpr bool has_null() noexcept { return true; }
-  static bool is_null(const T& v)
-    { return (not v || string_traits<I>::is_null(*v)); }
-  static constexpr T null() { return internal::null_value<T>(); }
-  static void from_string(const char Str[], T &Obj)
-  {
-    if (not Str) Obj = null();
-    else
-    {
-      I inner;
-      string_traits<I>::from_string(Str, inner);
-      // Utilize existing memory if possible (e.g. for pointer types).
-      if (Obj) *Obj = inner;
-      // Important to assign to set valid flag for smart optional types.
-      else Obj = internal::make_optional<T>(inner);
-    }
-  }
-  static std::string to_string(const T& Obj)
-  {
-    if (is_null(Obj)) internal::throw_null_conversion(name());
-    return string_traits<I>::to_string(*Obj);
-  }
-};
-
-} // namespace pqxx
-#endif
diff --git a/contrib/libs/libpqxx/include/pqxx/isolation.hxx b/contrib/libs/libpqxx/include/pqxx/isolation.hxx
deleted file mode 100644
index fbabb994ed..0000000000
--- a/contrib/libs/libpqxx/include/pqxx/isolation.hxx
+++ /dev/null
@@ -1,87 +0,0 @@
-/** Definitions of transaction isolation levels.
- *
- * Policies and traits describing SQL transaction isolation levels
- *
- * DO NOT INCLUDE THIS FILE DIRECTLY; include pqxx/isolation instead.
- *
- * Copyright (c) 2000-2019, Jeroen T. Vermeulen.
- *
- * See COPYING for copyright license.  If you did not receive a file called
- * COPYING with this source code, please notify the distributor of this mistake,
- * or contact the author.
- */
-#ifndef PQXX_H_ISOLATION
-#define PQXX_H_ISOLATION
-
-#include "pqxx/compiler-public.hxx"
-#include "pqxx/compiler-internal-pre.hxx"
-
-#include "pqxx/util.hxx"
-
-namespace pqxx
-{
-
-/// Transaction isolation levels.
-/** These are as defined in the SQL standard.  But there are a few notes
- * specific to PostgreSQL.
- *
- * First, postgres does not support "read uncommitted."  The lowest level you
- * can get is "read committed," which is better.  PostgreSQL is built on the
- * MVCC paradigm, which guarantees "read committed" isolation without any
- * additional performance overhead, so there was no point in providing the
- * lower level.
- *
- * Second, "repeatable read" also makes more isolation guarantees than the
- * standard requires.  According to the standard, this level prevents "dirty
- * reads" and "nonrepeatable reads," but not "phantom reads."  In postgres,
- * it actually prevents all three.
- *
- * Third, "serializable" is only properly supported starting at postgres 9.1.
- * If you request "serializable" isolation on an older backend, you will get
- * the same isolation as in "repeatable read."  It's better than the "repeatable
- * read" defined in the SQL standard, but not a complete implementation of the
- * standard's "serializable" isolation level.
- *
- * In general, a lower isolation level will allow more surprising interactions
- * between ongoing transactions, but improve performance.  A higher level
- * gives you more protection from subtle concurrency bugs, but sometimes it
- * may not be possible to complete your transaction without avoiding paradoxes
- * in the data.  In that case a transaction may fail, and the application will
- * have to re-do the whole thing based on the latest state of the database.
- * (If you want to retry your code in that situation, have a look at the
- * transactor framework.)
- *
- * Study the levels and design your application with the right level in mind.
- */
-enum isolation_level
-{
-  // read_uncommitted,
-  read_committed,
-  repeatable_read,
-  serializable
-};
-
-/// Traits class to describe an isolation level; primarly for libpqxx's own use
-template<isolation_level LEVEL> struct isolation_traits
-{
-  static constexpr isolation_level level() noexcept { return LEVEL; }
-  static constexpr const char *name() noexcept;
-};
-
-
-template<>
-inline constexpr const char *isolation_traits<read_committed>::name() noexcept
-	{ return "READ COMMITTED"; }
-
-template<>
-inline constexpr const char *isolation_traits<repeatable_read>::name() noexcept
-	{ return "REPEATABLE READ"; }
-
-template<>
-inline constexpr const char *isolation_traits<serializable>::name() noexcept
-	{ return "SERIALIZABLE"; }
-
-}
-
-#include "pqxx/compiler-internal-post.hxx"
-#endif
diff --git a/contrib/libs/libpqxx/include/pqxx/largeobject b/contrib/libs/libpqxx/include/pqxx/largeobject
deleted file mode 100644
index b1dedd597a..0000000000
--- a/contrib/libs/libpqxx/include/pqxx/largeobject
+++ /dev/null
@@ -1,6 +0,0 @@
-/** Large Objects interface.
- *
- * Supports direct access to large objects, as well as through I/O streams
- */
-// Actual definitions in .hxx file so editors and such recognize file type.
-#include "pqxx/largeobject.hxx"
diff --git a/contrib/libs/libpqxx/include/pqxx/largeobject.hxx b/contrib/libs/libpqxx/include/pqxx/largeobject.hxx
deleted file mode 100644
index f2f7c0e7fe..0000000000
--- a/contrib/libs/libpqxx/include/pqxx/largeobject.hxx
+++ /dev/null
@@ -1,672 +0,0 @@
-/** Large Objects interface.
- *
- * Allows access to large objects directly, or through I/O streams.
- *
- * DO NOT INCLUDE THIS FILE DIRECTLY; include pqxx/largeobject instead.
- *
- * Copyright (c) 2000-2019, Jeroen T. Vermeulen.
- *
- * See COPYING for copyright license.  If you did not receive a file called
- * COPYING with this source code, please notify the distributor of this mistake,
- * or contact the author.
- */
-#ifndef PQXX_H_LARGEOBJECT
-#define PQXX_H_LARGEOBJECT
-
-#include "pqxx/compiler-public.hxx"
-#include "pqxx/compiler-internal-pre.hxx"
-
-#include <streambuf>
-
-#include "pqxx/dbtransaction.hxx"
-
-
-namespace pqxx
-{
-/// Identity of a large object
-/** This class encapsulates the identity of a large object.  To access the
- * contents of the object, create a largeobjectaccess, a largeobject_streambuf,
- * or an ilostream, an olostream or a lostream around the largeobject.
- *
- * A largeobject must be accessed only from within a backend transaction, but
- * the object's identity remains valid as long as the object exists.
- */
-class PQXX_LIBEXPORT largeobject
-{
-public:
-  using size_type = large_object_size_type;
-
-  /// Refer to a nonexistent large object (similar to what a null pointer does)
-  largeobject() noexcept =default;					//[t48]
-
-  /// Create new large object
-  /** @param T Backend transaction in which the object is to be created
-   */
-  explicit largeobject(dbtransaction &T);				//[t48]
-
-  /// Wrap object with given oid
-  /** Convert combination of a transaction and object identifier into a
-   * large object identity.  Does not affect the database.
-   * @param O Object identifier for the given object
-   */
-  explicit largeobject(oid O) noexcept : m_id{O} {}			//[t48]
-
-  /// Import large object from a local file
-  /** Creates a large object containing the data found in the given file.
-   * @param T Backend transaction in which the large object is to be created
-   * @param File A filename on the client program's filesystem
-   */
-  largeobject(dbtransaction &T, const std::string &File);		//[t53]
-
-  /// Take identity of an opened large object
-  /** Copy identity of already opened large object.  Note that this may be done
-   * as an implicit conversion.
-   * @param O Already opened large object to copy identity from
-   */
-  largeobject(const largeobjectaccess &O) noexcept;			//[t50]
-
-  /// Object identifier
-  /** The number returned by this function identifies the large object in the
-   * database we're connected to (or oid_none is returned if we refer to the
-   * null object).
-   */
-  oid id() const noexcept { return m_id; }				//[t48]
-
-  /**
-   * @name Identity comparisons
-   *
-   * These operators compare the object identifiers of large objects.  This has
-   * nothing to do with the objects' actual contents; use them only for keeping
-   * track of containers of references to large objects and such.
-   */
-  //@{
-  /// Compare object identities
-  /** @warning Only valid between large objects in the same database. */
-  bool operator==(const largeobject &other) const			//[t51]
-	  { return m_id == other.m_id; }
-  /// Compare object identities
-  /** @warning Only valid between large objects in the same database. */
-  bool operator!=(const largeobject &other) const			//[t51]
-	  { return m_id != other.m_id; }
-  /// Compare object identities
-  /** @warning Only valid between large objects in the same database. */
-  bool operator<=(const largeobject &other) const			//[t51]
-	  { return m_id <= other.m_id; }
-  /// Compare object identities
-  /** @warning Only valid between large objects in the same database. */
-  bool operator>=(const largeobject &other) const			//[t51]
-	  { return m_id >= other.m_id; }
-  /// Compare object identities
-  /** @warning Only valid between large objects in the same database. */
-  bool operator<(const largeobject &other) const			//[t51]
-	  { return m_id < other.m_id; }
-  /// Compare object identities
-  /** @warning Only valid between large objects in the same database. */
-  bool operator>(const largeobject &other) const			//[t51]
-	  { return m_id > other.m_id; }
-  //@}
-
-  /// Export large object's contents to a local file
-  /** Writes the data stored in the large object to the given file.
-   * @param T Transaction in which the object is to be accessed
-   * @param File A filename on the client's filesystem
-   */
-  void to_file(dbtransaction &T, const std::string &File) const;	//[t52]
-
-  /// Delete large object from database
-  /** Unlike its low-level equivalent cunlink, this will throw an exception if
-   * deletion fails.
-   * @param T Transaction in which the object is to be deleted
-   */
-  void remove(dbtransaction &T) const;					//[t48]
-
-protected:
-  PQXX_PURE static internal::pq::PGconn *raw_connection(
-	const dbtransaction &T);
-
-  PQXX_PRIVATE std::string reason(const connection_base &, int err) const;
-
-private:
-  oid m_id = oid_none;
-};
-
-
-// TODO: New hierarchy with separate read / write / mixed-mode access
-
-/// Accessor for large object's contents.
-class PQXX_LIBEXPORT largeobjectaccess : private largeobject
-{
-public:
-  using largeobject::size_type;
-  using off_type = long;
-  using pos_type = size_type;
-
-  /// Open mode: @c in, @c out (can be combined with the "or" operator)
-  /** According to the C++ standard, these should be in @c std::ios_base.  We
-   * take them from @c std::ios instead, which should be safe because it
-   * inherits the same definition, to accommodate gcc 2.95 & 2.96.
-   */
-  using openmode = std::ios::openmode;
-
-  /// Seek direction: @c beg, @c cur, @c end
-  /** According to the C++ standard, these should be in @c std::ios_base.  We
-   * take them from @c std::ios instead, which should be safe because it
-   * inherits the same definition, to accommodate gcc 2.95 & 2.96.
-   */
-  using seekdir = std::ios::seekdir;
-
-  /// Create new large object and open it
-  /**
-   * @param T Backend transaction in which the object is to be created
-   * @param mode Access mode, defaults to ios_base::in | ios_base::out
-   */
-  explicit largeobjectaccess(						//[t51]
-	dbtransaction &T,
-	openmode mode=std::ios::in|std::ios::out);
-
-  /// Open large object with given oid
-  /** Convert combination of a transaction and object identifier into a
-   * large object identity.  Does not affect the database.
-   * @param T Transaction in which the object is to be accessed
-   * @param O Object identifier for the given object
-   * @param mode Access mode, defaults to ios_base::in | ios_base::out
-   */
-  largeobjectaccess(							//[t52]
-	dbtransaction &T,
-	oid O,
-	openmode mode=std::ios::in|std::ios::out);
-
-  /// Open given large object
-  /** Open a large object with the given identity for reading and/or writing
-   * @param T Transaction in which the object is to be accessed
-   * @param O Identity for the large object to be accessed
-   * @param mode Access mode, defaults to ios_base::in | ios_base::out
-   */
-  largeobjectaccess(							//[t50]
-	dbtransaction &T,
-	largeobject O,
-	openmode mode=std::ios::in|std::ios::out);
-
-  /// Import large object from a local file and open it
-  /** Creates a large object containing the data found in the given file.
-   * @param T Backend transaction in which the large object is to be created
-   * @param File A filename on the client program's filesystem
-   * @param mode Access mode, defaults to ios_base::in | ios_base::out
-   */
-  largeobjectaccess(							//[t55]
-	dbtransaction &T,
-	const std::string &File,
-	openmode mode=std::ios::in|std::ios::out);
-
-  ~largeobjectaccess() noexcept { close(); }
-
-  /// Object identifier
-  /** The number returned by this function uniquely identifies the large object
-   * in the context of the database we're connected to.
-   */
-  using largeobject::id;
-
-  /// Export large object's contents to a local file
-  /** Writes the data stored in the large object to the given file.
-   * @param File A filename on the client's filesystem
-   */
-  void to_file(const std::string &File) const				//[t54]
-	{ largeobject::to_file(m_trans, File); }
-
-  using largeobject::to_file;
-
-  /**
-   * @name High-level access to object contents
-   */
-  //@{
-  /// Write data to large object
-  /** If not all bytes could be written, an exception is thrown.
-   * @param Buf Data to write
-   * @param Len Number of bytes from Buf to write
-   */
-  void write(const char Buf[], size_type Len);				//[t51]
-
-  /// Write string to large object
-  /** If not all bytes could be written, an exception is thrown.
-   * @param Buf Data to write; no terminating zero is written
-   */
-  void write(const std::string &Buf)					//[t50]
-	{ write(Buf.c_str(), static_cast<size_type>(Buf.size())); }
-
-  /// Read data from large object
-  /** Throws an exception if an error occurs while reading.
-   * @param Buf Location to store the read data in
-   * @param Len Number of bytes to try and read
-   * @return Number of bytes read, which may be less than the number requested
-   * if the end of the large object is reached
-   */
-  size_type read(char Buf[], size_type Len);				//[t50]
-
-  /// Seek in large object's data stream
-  /** Throws an exception if an error occurs.
-   * @return The new position in the large object
-   */
-  size_type seek(size_type dest, seekdir dir);				//[t51]
-
-  /// Report current position in large object's data stream
-  /** Throws an exception if an error occurs.
-   * @return The current position in the large object
-   */
-  size_type tell() const;						//[t50]
-  //@}
-
-  /**
-   * @name Low-level access to object contents
-   *
-   * These functions provide a more "C-like" access interface, returning special
-   * values instead of throwing exceptions on error.  These functions are
-   * generally best avoided in favour of the high-level access functions, which
-   * behave more like C++ functions should.
-   */
-  //@{
-  /// Seek in large object's data stream
-  /** Does not throw exception in case of error; inspect return value and
-   * @c errno instead.
-   * @param dest Offset to go to
-   * @param dir Origin to which dest is relative: ios_base::beg (from beginning
-   *        of the object), ios_base::cur (from current access position), or
-   *        ios_base;:end (from end of object)
-   * @return New position in large object, or -1 if an error occurred.
-   */
-  pos_type cseek(off_type dest, seekdir dir) noexcept;			//[t50]
-
-  /// Write to large object's data stream
-  /** Does not throw exception in case of error; inspect return value and
-   * @c errno instead.
-   * @param Buf Data to write
-   * @param Len Number of bytes to write
-   * @return Number of bytes actually written, or -1 if an error occurred.
-   */
-  off_type cwrite(const char Buf[], size_type Len) noexcept;		//[t50]
-
-  /// Read from large object's data stream
-  /** Does not throw exception in case of error; inspect return value and
-   * @c errno instead.
-   * @param Buf Area where incoming bytes should be stored
-   * @param Len Number of bytes to read
-   * @return Number of bytes actually read, or -1 if an error occurred.
-   */
-  off_type cread(char Buf[], size_type Len) noexcept;			//[t50]
-
-  /// Report current position in large object's data stream
-  /** Does not throw exception in case of error; inspect return value and
-   * @c errno instead.
-   * @return Current position in large object, of -1 if an error occurred.
-   */
-  pos_type ctell() const noexcept;					//[t50]
-  //@}
-
-  /**
-   * @name Error/warning output
-   */
-  //@{
-  /// Issue message to transaction's notice processor
-  void process_notice(const std::string &) noexcept;			//[t50]
-  //@}
-
-  using largeobject::remove;
-
-  using largeobject::operator==;
-  using largeobject::operator!=;
-  using largeobject::operator<;
-  using largeobject::operator<=;
-  using largeobject::operator>;
-  using largeobject::operator>=;
-
-private:
-  PQXX_PRIVATE std::string reason(int err) const;
-  internal::pq::PGconn *raw_connection() const
-	{ return largeobject::raw_connection(m_trans); }
-
-  PQXX_PRIVATE void open(openmode mode);
-  void close() noexcept;
-
-  dbtransaction &m_trans;
-  int m_fd = -1;
-
-  largeobjectaccess() =delete;
-  largeobjectaccess(const largeobjectaccess &) =delete;
-  largeobjectaccess operator=(const largeobjectaccess &) =delete;
-};
-
-
-/// Streambuf to use large objects in standard I/O streams
-/** The standard streambuf classes provide uniform access to data storage such
- * as files or string buffers, so they can be accessed using standard input or
- * output streams.  This streambuf implementation provides similar access to
- * large objects, so they can be read and written using the same stream classes.
- *
- * @warning This class may not work properly in compiler environments that don't
- * fully support Standard-compliant streambufs, such as g++ 2.95 or older.
- */
-template<typename CHAR=char, typename TRAITS=std::char_traits<CHAR>>
-  class largeobject_streambuf :
-    public std::basic_streambuf<CHAR, TRAITS>
-{
-  using size_type = long;
-public:
-  using char_type = CHAR;
-  using traits_type = TRAITS;
-  using int_type = typename traits_type::int_type;
-  using pos_type = typename traits_type::pos_type;
-  using off_type = typename traits_type::off_type;
-  using openmode = largeobjectaccess::openmode;
-  using seekdir = largeobjectaccess::seekdir;
-
-  largeobject_streambuf(						//[t48]
-	dbtransaction &T,
-	largeobject O,
-	openmode mode=std::ios::in|std::ios::out,
-	size_type BufSize=512) :
-    m_bufsize{BufSize},
-    m_obj{T, O, mode},
-    m_g{nullptr},
-    m_p{nullptr}
-	{ initialize(mode); }
-
-  largeobject_streambuf(						//[t48]
-	dbtransaction &T,
-	oid O,
-	openmode mode=std::ios::in|std::ios::out,
-	size_type BufSize=512) :
-    m_bufsize{BufSize},
-    m_obj{T, O, mode},
-    m_g{nullptr},
-    m_p{nullptr}
-	{ initialize(mode); }
-
-  virtual ~largeobject_streambuf() noexcept
-	{ delete [] m_p; delete [] m_g; }
-
-
-  /// For use by large object stream classes
-  void process_notice(const std::string &s) { m_obj.process_notice(s); }
-
-protected:
-  virtual int sync() override
-  {
-    // setg() sets eback, gptr, egptr
-    this->setg(this->eback(), this->eback(), this->egptr());
-    return overflow(EoF());
-  }
-
-  virtual pos_type seekoff(
-	off_type offset,
-	seekdir dir,
-	openmode)
-	override
-  {
-    return AdjustEOF(m_obj.cseek(largeobjectaccess::off_type(offset), dir));
-  }
-
-  virtual pos_type seekpos(pos_type pos, openmode) override
-  {
-    const largeobjectaccess::pos_type newpos = m_obj.cseek(
-	largeobjectaccess::off_type(pos),
-	std::ios::beg);
-    return AdjustEOF(newpos);
-  }
-
-  virtual int_type overflow(int_type ch = EoF()) override
-  {
-    char *const pp = this->pptr();
-    if (pp == nullptr) return EoF();
-    char *const pb = this->pbase();
-    int_type res = 0;
-
-    if (pp > pb) res = int_type(AdjustEOF(m_obj.cwrite(pb, pp-pb)));
-    this->setp(m_p, m_p + m_bufsize);
-
-    // Write that one more character, if it's there.
-    if (ch != EoF())
-    {
-      *this->pptr() = char(ch);
-      this->pbump(1);
-    }
-    return res;
-  }
-
-  virtual int_type underflow() override
-  {
-    if (this->gptr() == nullptr) return EoF();
-    char *const eb = this->eback();
-    const int_type res(static_cast<int_type>(
-	AdjustEOF(m_obj.cread(this->eback(), m_bufsize))));
-    this->setg(eb, eb, eb + ((res==EoF()) ? 0 : res));
-    return ((res == 0) or (res == EoF())) ? EoF() : *eb;
-  }
-
-private:
-  /// Shortcut for traits_type::eof().
-  static int_type EoF() { return traits_type::eof(); }
-
-  /// Helper: change error position of -1 to EOF (probably a no-op).
-  template<typename INTYPE>
-  static std::streampos AdjustEOF(INTYPE pos)
-	{ return (pos==-1) ? std::streampos(EoF()) : std::streampos(pos); }
-
-  void initialize(openmode mode)
-  {
-    if (mode & std::ios::in)
-    {
-      m_g = new char_type[unsigned(m_bufsize)];
-      this->setg(m_g, m_g, m_g);
-    }
-    if (mode & std::ios::out)
-    {
-      m_p = new char_type[unsigned(m_bufsize)];
-      this->setp(m_p, m_p + m_bufsize);
-    }
-  }
-
-  const size_type m_bufsize;
-  largeobjectaccess m_obj;
-
-  /// Get & put buffers.
-  char_type *m_g, *m_p;
-};
-
-
-/// Input stream that gets its data from a large object.
-/** Use this class exactly as you would any other istream to read data from a
- * large object.  All formatting and streaming operations of @c std::istream are
- * supported.  What you'll typically want to use, however, is the ilostream
- * alias (which defines a basic_ilostream for @c char).  This is similar to
- * how e.g. @c std::ifstream relates to @c std::basic_ifstream.
- *
- * Currently only works for <tt><char, std::char_traits<char>></tt>.
- */
-template<typename CHAR=char, typename TRAITS=std::char_traits<CHAR>>
-  class basic_ilostream :
-    public std::basic_istream<CHAR, TRAITS>
-{
-  using super = std::basic_istream<CHAR, TRAITS>;
-
-public:
-  using char_type = CHAR;
-  using traits_type = TRAITS;
-  using int_type = typename traits_type::int_type;
-  using pos_type = typename traits_type::pos_type;
-  using off_type = typename traits_type::off_type;
-
-  /// Create a basic_ilostream
-  /**
-   * @param T Transaction in which this stream is to exist
-   * @param O Large object to access
-   * @param BufSize Size of buffer to use internally (optional)
-   */
-  basic_ilostream(							//[t57]
-	dbtransaction &T,
-        largeobject O,
-	largeobject::size_type BufSize=512) :
-    super{nullptr},
-    m_buf{T, O, std::ios::in, BufSize}
-	{ super::init(&m_buf); }
-
-  /// Create a basic_ilostream
-  /**
-   * @param T Transaction in which this stream is to exist
-   * @param O Identifier of a large object to access
-   * @param BufSize Size of buffer to use internally (optional)
-   */
-  basic_ilostream(							//[t48]
-	dbtransaction &T,
-        oid O,
-	largeobject::size_type BufSize=512) :
-    super{nullptr},
-    m_buf{T, O, std::ios::in, BufSize}
-	{ super::init(&m_buf); }
-
-private:
-  largeobject_streambuf<CHAR,TRAITS> m_buf;
-};
-
-using ilostream = basic_ilostream<char>;
-
-
-/// Output stream that writes data back to a large object
-/** Use this class exactly as you would any other ostream to write data to a
- * large object.  All formatting and streaming operations of @c std::ostream are
- * supported.  What you'll typically want to use, however, is the olostream
- * alias (which defines a basic_olostream for @c char).  This is similar to
- * how e.g. @c std::ofstream is related to @c std::basic_ofstream.
- *
- * Currently only works for <tt><char, std::char_traits<char>></tt>.
- */
-template<typename CHAR=char, typename TRAITS=std::char_traits<CHAR>>
-  class basic_olostream :
-    public std::basic_ostream<CHAR, TRAITS>
-{
-  using super = std::basic_ostream<CHAR, TRAITS>;
-public:
-  using char_type = CHAR;
-  using traits_type = TRAITS;
-  using int_type = typename traits_type::int_type;
-  using pos_type = typename traits_type::pos_type;
-  using off_type = typename traits_type::off_type;
-
-  /// Create a basic_olostream
-  /**
-   * @param T transaction in which this stream is to exist
-   * @param O a large object to access
-   * @param BufSize size of buffer to use internally (optional)
-   */
-  basic_olostream(							//[t48]
-	dbtransaction &T,
-        largeobject O,
-	largeobject::size_type BufSize=512) :
-    super{nullptr},
-    m_buf{T, O, std::ios::out, BufSize}
-	{ super::init(&m_buf); }
-
-  /// Create a basic_olostream
-  /**
-   * @param T transaction in which this stream is to exist
-   * @param O a large object to access
-   * @param BufSize size of buffer to use internally (optional)
-   */
-  basic_olostream(							//[t57]
-	dbtransaction &T,
-	oid O,
-	largeobject::size_type BufSize=512) :
-    super{nullptr},
-    m_buf{T, O, std::ios::out, BufSize}
-	{ super::init(&m_buf); }
-
-  ~basic_olostream()
-  {
-    try
-    {
-      m_buf.pubsync(); m_buf.pubsync();
-    }
-    catch (const std::exception &e)
-    {
-      m_buf.process_notice(e.what());
-    }
-  }
-
-private:
-  largeobject_streambuf<CHAR,TRAITS> m_buf;
-};
-
-using olostream = basic_olostream<char>;
-
-
-/// Stream that reads and writes a large object
-/** Use this class exactly as you would a std::iostream to read data from, or
- * write data to a large object.  All formatting and streaming operations of
- * @c std::iostream are supported.  What you'll typically want to use, however,
- * is the lostream alias (which defines a basic_lostream for @c char).  This
- * is similar to how e.g. @c std::fstream is related to @c std::basic_fstream.
- *
- * Currently only works for <tt><char, std::char_traits<char>></tt>.
- */
-template<typename CHAR=char, typename TRAITS=std::char_traits<CHAR>>
-  class basic_lostream :
-    public std::basic_iostream<CHAR, TRAITS>
-{
-  using super = std::basic_iostream<CHAR, TRAITS>;
-
-public:
-  using char_type = CHAR;
-  using traits_type = TRAITS;
-  using int_type = typename traits_type::int_type;
-  using pos_type = typename traits_type::pos_type;
-  using off_type = typename traits_type::off_type;
-
-  /// Create a basic_lostream
-  /**
-   * @param T Transaction in which this stream is to exist
-   * @param O Large object to access
-   * @param BufSize Size of buffer to use internally (optional)
-   */
-  basic_lostream(							//[t59]
-	dbtransaction &T,
-	largeobject O,
-	largeobject::size_type BufSize=512) :
-    super{nullptr},
-    m_buf{T, O, std::ios::in | std::ios::out, BufSize}
-	{ super::init(&m_buf); }
-
-  /// Create a basic_lostream
-  /**
-   * @param T Transaction in which this stream is to exist
-   * @param O Large object to access
-   * @param BufSize Size of buffer to use internally (optional)
-   */
-  basic_lostream(							//[t59]
-	dbtransaction &T,
-	oid O,
-	largeobject::size_type BufSize=512) :
-    super{nullptr},
-    m_buf{T, O, std::ios::in | std::ios::out, BufSize}
-	{ super::init(&m_buf); }
-
-  ~basic_lostream()
-  {
-    try
-    {
-      m_buf.pubsync(); m_buf.pubsync();
-    }
-    catch (const std::exception &e)
-    {
-      m_buf.process_notice(e.what());
-    }
-  }
-
-private:
-  largeobject_streambuf<CHAR,TRAITS> m_buf;
-};
-
-using lostream = basic_lostream<char>;
-
-} // namespace pqxx
-
-#include "pqxx/compiler-internal-post.hxx"
-
-#endif
diff --git a/contrib/libs/libpqxx/include/pqxx/nontransaction b/contrib/libs/libpqxx/include/pqxx/nontransaction
deleted file mode 100644
index e62ebdbc0b..0000000000
--- a/contrib/libs/libpqxx/include/pqxx/nontransaction
+++ /dev/null
@@ -1,6 +0,0 @@
-/** pqxx::nontransaction class.
- *
- * pqxx::nontransaction provides nontransactional database access.
- */
-// Actual definitions in .hxx file so editors and such recognize file type.
-#include "pqxx/nontransaction.hxx"
diff --git a/contrib/libs/libpqxx/include/pqxx/nontransaction.hxx b/contrib/libs/libpqxx/include/pqxx/nontransaction.hxx
deleted file mode 100644
index 40fb1331cf..0000000000
--- a/contrib/libs/libpqxx/include/pqxx/nontransaction.hxx
+++ /dev/null
@@ -1,80 +0,0 @@
-/** Definition of the pqxx::nontransaction class.
- *
- * pqxx::nontransaction provides nontransactional database access
- *
- * DO NOT INCLUDE THIS FILE DIRECTLY; include pqxx/nontransaction instead.
- *
- * Copyright (c) 2000-2019, Jeroen T. Vermeulen.
- *
- * See COPYING for copyright license.  If you did not receive a file called
- * COPYING with this source code, please notify the distributor of this mistake,
- * or contact the author.
- */
-#ifndef PQXX_H_NONTRANSACTION
-#define PQXX_H_NONTRANSACTION
-
-#include "pqxx/compiler-public.hxx"
-#include "pqxx/compiler-internal-pre.hxx"
-
-#include "pqxx/connection_base.hxx"
-#include "pqxx/result.hxx"
-#include "pqxx/transaction_base.hxx"
-
-// Methods tested in eg. test module test01 are marked with "//[t01]".
-
-namespace pqxx
-{
-
-/// Simple "transaction" class offering no transactional integrity.
-/**
- * @ingroup transaction
- *
- * nontransaction, like transaction or any other transaction_base-derived class,
- * provides access to a database through a connection.  Unlike its siblings,
- * however, nontransaction does not maintain any kind of transactional
- * integrity.  This may be useful eg. for read-only access to the database that
- * does not require a consistent, atomic view on its data; or for operations
- * that are not allowed within a backend transaction, such as creating tables.
- *
- * For queries that update the database, however, a real transaction is likely
- * to be faster unless the transaction consists of only a single record update.
- *
- * Also, you can keep a nontransaction open for as long as you like.  Actual
- * back-end transactions are limited in lifespan, and will sometimes fail just
- * because they took too long to execute or were left idle for too long.  This
- * will not happen with a nontransaction (although the connection may still time
- * out, e.g. when the network is unavailable for a very long time).
- *
- * Any query executed in a nontransaction is committed immediately, and neither
- * commit() nor abort() has any effect.
- *
- * Database features that require a backend transaction, such as cursors or
- * large objects, will not work in a nontransaction.
- */
-class PQXX_LIBEXPORT nontransaction : public transaction_base
-{
-public:
-  /// Constructor.
-  /** Create a "dummy" transaction.
-   * @param C Connection that this "transaction" will operate on.
-   * @param Name Optional name for the transaction, beginning with a letter
-   * and containing only letters and digits.
-   */
-  explicit nontransaction(						//[t14]
-	connection_base &C,
-	const std::string &Name=std::string{}) :
-    namedclass{"nontransaction", Name}, transaction_base{C} { Begin(); }
-
-  virtual ~nontransaction();						//[t14]
-
-private:
-  virtual void do_begin() override {}					//[t14]
-  virtual result do_exec(const char C[]) override;			//[t14]
-  virtual void do_commit() override {}					//[t14]
-  virtual void do_abort() override {}					//[t14]
-};
-
-} // namespace pqxx
-
-#include "pqxx/compiler-internal-post.hxx"
-#endif
diff --git a/contrib/libs/libpqxx/include/pqxx/notification b/contrib/libs/libpqxx/include/pqxx/notification
deleted file mode 100644
index 025b220baf..0000000000
--- a/contrib/libs/libpqxx/include/pqxx/notification
+++ /dev/null
@@ -1,6 +0,0 @@
-/** pqxx::notification_receiver functor interface.
- *
- * pqxx::notification_receiver handles incoming notifications.
- */
-// Actual definitions in .hxx file so editors and such recognize file type.
-#include "pqxx/notification.hxx"
diff --git a/contrib/libs/libpqxx/include/pqxx/notification.hxx b/contrib/libs/libpqxx/include/pqxx/notification.hxx
deleted file mode 100644
index 77e818e009..0000000000
--- a/contrib/libs/libpqxx/include/pqxx/notification.hxx
+++ /dev/null
@@ -1,91 +0,0 @@
-/** Definition of the pqxx::notification_receiver functor interface.
- *
- * pqxx::notification_receiver handles incoming notifications.
- *
- * DO NOT INCLUDE THIS FILE DIRECTLY; include pqxx/notification instead.
- *
- * Copyright (c) 2000-2019, Jeroen T. Vermeulen.
- *
- * See COPYING for copyright license.  If you did not receive a file called
- * COPYING with this source code, please notify the distributor of this mistake,
- * or contact the author.
- */
-#ifndef PQXX_H_NOTIFICATION
-#define PQXX_H_NOTIFICATION
-
-#include "pqxx/compiler-public.hxx"
-#include "pqxx/compiler-internal-pre.hxx"
-
-#include <string>
-
-#include "pqxx/types.hxx"
-
-
-namespace pqxx
-{
-/// "Observer" base class for notifications.
-/** @addtogroup notification Notifications and Receivers
- *
- * To listen on a notification issued using the NOTIFY command, derive your own
- * class from notification_receiver and define its function-call operator to
- * perform whatever action you wish to take when the given notification arrives.
- * Then create an object of that class and pass it to your connection.  DO NOT
- * use raw SQL to listen for notifications, or your attempts to listen won't be
- * resumed when a connection fails--and you'll have no way to notice.
- *
- * Notifications never arrive inside a transaction, not even in a
- * nontransaction.  Therefore, you are free to open a transaction of your own
- * inside your receiver's function invocation operator.
- *
- * Notifications you are listening for may arrive anywhere within libpqxx code,
- * but be aware that @b PostgreSQL @b defers @b notifications @b occurring
- * @b inside @b transactions.  (This was done for excellent reasons; just think
- * about what happens if the transaction where you happen to handle an incoming
- * notification is later rolled back for other reasons).  So if you're keeping a
- * transaction open, don't expect any of your receivers on the same connection
- * to be notified.
- *
- * (For very similar reasons, outgoing notifications are also not sent until the
- * transaction that sends them commits.)
- *
- * Multiple receivers on the same connection may listen on a notification of the
- * same name.  An incoming notification is processed by invoking all receivers
- * (zero or more) of the same name.
- */
-class PQXX_LIBEXPORT PQXX_NOVTABLE notification_receiver
-{
-public:
-  /// Register the receiver with a connection.
-  /**
-   * @param c Connnection to operate on.
-   * @param channel Name of the notification to listen for.
-   */
-  notification_receiver(connection_base &c, const std::string &channel);
-  notification_receiver(const notification_receiver &) =delete;
-  notification_receiver &operator=(const notification_receiver &) =delete;
-  virtual ~notification_receiver();
-
-  /// The channel that this receiver listens on.
-  const std::string &channel() const { return m_channel; }
-
-  /// Overridable: action to invoke when notification arrives.
-  /**
-   * @param payload On PostgreSQL 9.0 or later, an optional string that may have
-   * been passed to the NOTIFY command.
-   * @param backend_pid Process ID of the database backend process that served
-   * our connection when the notification arrived.  The actual process ID behind
-   * the connection may have changed by the time this method is called.
-   */
-  virtual void operator()(const std::string &payload, int backend_pid) =0;
-
-protected:
-  connection_base &conn() const noexcept { return m_conn; }
-
-private:
-  connection_base &m_conn;
-  std::string m_channel;
-};
-}
-
-#include "pqxx/compiler-internal-post.hxx"
-#endif
diff --git a/contrib/libs/libpqxx/include/pqxx/pipeline b/contrib/libs/libpqxx/include/pqxx/pipeline
deleted file mode 100644
index 6029f14622..0000000000
--- a/contrib/libs/libpqxx/include/pqxx/pipeline
+++ /dev/null
@@ -1,6 +0,0 @@
-/** pqxx::pipeline class.
- *
- * Throughput-optimized query interface.
- */
-// Actual definitions in .hxx file so editors and such recognize file type.
-#include "pqxx/pipeline.hxx"
diff --git a/contrib/libs/libpqxx/include/pqxx/pipeline.hxx b/contrib/libs/libpqxx/include/pqxx/pipeline.hxx
deleted file mode 100644
index 25a5dea6a6..0000000000
--- a/contrib/libs/libpqxx/include/pqxx/pipeline.hxx
+++ /dev/null
@@ -1,210 +0,0 @@
-/** Definition of the pqxx::pipeline class.
- *
- *   Throughput-optimized query manager
- *
- * DO NOT INCLUDE THIS FILE DIRECTLY; include pqxx/pipeline instead.
- *
- * Copyright (c) 2000-2019, Jeroen T. Vermeulen.
- *
- * See COPYING for copyright license.  If you did not receive a file called
- * COPYING with this source code, please notify the distributor of this mistake,
- * or contact the author.
- */
-#ifndef PQXX_H_PIPELINE
-#define PQXX_H_PIPELINE
-
-#include "pqxx/compiler-public.hxx"
-#include "pqxx/compiler-internal-pre.hxx"
-
-#include <limits>
-#include <map>
-#include <string>
-
-#include "pqxx/transaction_base.hxx"
-
-
-// Methods tested in eg. test module test01 are marked with "//[t01]".
-
-namespace pqxx
-{
-
-/// Processes several queries in FIFO manner, optimized for high throughput
-/** Use a pipeline if you want to execute queries without always sitting still
- * while they execute.  Result retrieval is decoupled from execution request;
- * queries "go in at the front" and results "come out the back."  Actually
- * results may be retrieved in any order, if you want.
- *
- * Feel free to pump as many queries into the pipeline as possible, even if they
- * were generated after looking at a result from the same pipeline.  To get the
- * best possible throughput, try to make insertion of queries run as far ahead
- * of results retrieval as possible; issue each query as early as possible and
- * retrieve their results as late as possible, so the pipeline has as many
- * ongoing queries as possible at any given time.  In other words, keep it busy!
- *
- * One warning: if any of the queries you insert leads to a syntactic error, the
- * error may be returned as if it were generated by an older query.  Future
- * versions may try to work around this if working in a nontransaction.
- */
-class PQXX_LIBEXPORT pipeline : public internal::transactionfocus
-{
-public:
-  using query_id = long;
-
-  pipeline(const pipeline &) =delete;
-  pipeline &operator=(const pipeline &) =delete;
-
-  explicit pipeline(							//[t69]
-	transaction_base &,
-	const std::string &Name=std::string{});
-
-  ~pipeline() noexcept;
-
-  /// Add query to the pipeline.
-  /** Queries are accumulated in the pipeline and sent to the backend in a
-   * concatenated format, separated by semicolons.  The queries you insert must
-   * not use this construct themselves, or the pipeline will get hopelessly
-   * confused!
-   * @return Identifier for this query, unique only within this pipeline
-   */
-  query_id insert(const std::string &);					//[t69]
-
-  /// Wait for all ongoing or pending operations to complete.
-  /** Detaches from the transaction when done. */
-  void complete();							//[t71]
-
-  /// Forget all ongoing or pending operations and retrieved results
-  /** Queries already sent to the backend may still be completed, depending
-   * on implementation and timing.
-   *
-   * Any error state (unless caused by an internal error) will also be cleared.
-   * This is mostly useful in a nontransaction, since a backend transaction is
-   * aborted automatically when an error occurs.
-   *
-   * Detaches from the transaction when done.
-   */
-  void flush();								//[t70]
-
-  /// Cancel ongoing query, if any.
-  /** May cancel any or all of the queries that have been inserted at this point
-   * whose results have not yet been retrieved.  If the pipeline lives in a
-   * backend transaction, that transaction may be left in a nonfunctional state
-   * in which it can only be aborted.
-   *
-   * Therefore, either use this function in a nontransaction, or abort the
-   * transaction after calling it.
-   */
-  void cancel();
-
-  /// Is result for given query available?
-  bool is_finished(query_id) const;					//[t71]
-
-  /// Retrieve result for given query.
-  /** If the query failed for whatever reason, this will throw an exception.
-   * The function will block if the query has not finished yet.
-   * @warning If results are retrieved out-of-order, i.e. in a different order
-   * than the one in which their queries were inserted, errors may "propagate"
-   * to subsequent queries.
-   */
-  result retrieve(query_id qid)						//[t71]
-	{ return retrieve(m_queries.find(qid)).second; }
-
-  /// Retrieve oldest unretrieved result (possibly wait for one)
-  /** @return The query's identifier and its result set */
-  std::pair<query_id, result> retrieve();				//[t69]
-
-  bool empty() const noexcept { return m_queries.empty(); }		//[t69]
-
-  /// Set maximum number of queries to retain before issuing them to the backend
-  /** The pipeline will perform better if multiple queries are issued at once,
-   * but retaining queries until the results are needed (as opposed to issuing
-   * them to the backend immediately) may negate any performance benefits the
-   * pipeline can offer.
-   *
-   * Recommended practice is to set this value no higher than the number of
-   * queries you intend to insert at a time.
-   * @param retain_max A nonnegative "retention capacity;" passing zero will
-   * cause queries to be issued immediately
-   * @return Old retention capacity
-   */
-  int retain(int retain_max=2);						//[t70]
-
-
-  /// Resume retained query emission (harmless when not needed)
-  void resume();							//[t70]
-
-private:
-  class PQXX_PRIVATE Query
-  {
-  public:
-    explicit Query(const std::string &q) : m_query{q}, m_res{} {}
-
-    const result &get_result() const noexcept { return m_res; }
-    void set_result(const result &r) noexcept { m_res = r; }
-    const std::string &get_query() const noexcept { return m_query; }
-
-  private:
-    std::string m_query;
-    result m_res;
-  };
-
-  using QueryMap = std::map<query_id,Query>;
-
-  void attach();
-  void detach();
-
-  /// Upper bound to query id's
-  static constexpr query_id qid_limit() noexcept
-  {
-    // Parenthesise this to work around an eternal Visual C++ problem:
-    // Without the extra parentheses, unless NOMINMAX is defined, the
-    // preprocessor will mistake this "max" for its annoying built-in macro
-    // of the same name.
-    return (std::numeric_limits<query_id>::max)();
-  }
-
-  /// Create new query_id
-  PQXX_PRIVATE query_id generate_id();
-
-  bool have_pending() const noexcept
-	{ return m_issuedrange.second != m_issuedrange.first; }
-
-  PQXX_PRIVATE void issue();
-
-  /// The given query failed; never issue anything beyond that
-  void set_error_at(query_id qid) noexcept
-	{ if (qid < m_error) m_error = qid; }
-
-  /// Throw pqxx::internal_error.
-  [[noreturn]] PQXX_PRIVATE void internal_error(const std::string &err);
-
-  PQXX_PRIVATE bool obtain_result(bool expect_none=false);
-
-  PQXX_PRIVATE void obtain_dummy();
-  PQXX_PRIVATE void get_further_available_results();
-  PQXX_PRIVATE void check_end_results();
-
-  /// Receive any results that happen to be available; it's not urgent
-  PQXX_PRIVATE void receive_if_available();
-
-  /// Receive results, up to stop if possible
-  PQXX_PRIVATE void receive(pipeline::QueryMap::const_iterator stop);
-  std::pair<pipeline::query_id, result>
-    retrieve(pipeline::QueryMap::iterator);
-
-  QueryMap m_queries;
-  std::pair<QueryMap::iterator,QueryMap::iterator> m_issuedrange;
-  int m_retain = 0;
-  int m_num_waiting = 0;
-  query_id m_q_id = 0;
-
-  /// Is there a "dummy query" pending?
-  bool m_dummy_pending = false;
-
-  /// Point at which an error occurred; no results beyond it will be available
-  query_id m_error = qid_limit();
-};
-
-} // namespace
-
-#include "pqxx/compiler-internal-post.hxx"
-#endif
diff --git a/contrib/libs/libpqxx/include/pqxx/pqxx b/contrib/libs/libpqxx/include/pqxx/pqxx
deleted file mode 100644
index 9cc33ad121..0000000000
--- a/contrib/libs/libpqxx/include/pqxx/pqxx
+++ /dev/null
@@ -1,19 +0,0 @@
-/// Convenience header: include all libpqxx definitions.
-#include "pqxx/array"
-#include "pqxx/binarystring"
-#include "pqxx/connection"
-#include "pqxx/cursor"
-#include "pqxx/errorhandler"
-#include "pqxx/except"
-#include "pqxx/largeobject"
-#include "pqxx/nontransaction"
-#include "pqxx/notification"
-#include "pqxx/pipeline"
-#include "pqxx/prepared_statement"
-#include "pqxx/result"
-#include "pqxx/robusttransaction"
-#include "pqxx/stream_from"
-#include "pqxx/stream_to"
-#include "pqxx/subtransaction"
-#include "pqxx/transaction"
-#include "pqxx/transactor"
diff --git a/contrib/libs/libpqxx/include/pqxx/prepared_statement b/contrib/libs/libpqxx/include/pqxx/prepared_statement
deleted file mode 100644
index 20c645f301..0000000000
--- a/contrib/libs/libpqxx/include/pqxx/prepared_statement
+++ /dev/null
@@ -1,6 +0,0 @@
-/** Helper classes for defining and executing prepared statements.
- *
- * See the connection_base hierarchy for more about prepared statements
- */
-// Actual definitions in .hxx file so editors and such recognize file type.
-#include "pqxx/prepared_statement.hxx"
diff --git a/contrib/libs/libpqxx/include/pqxx/prepared_statement.hxx b/contrib/libs/libpqxx/include/pqxx/prepared_statement.hxx
deleted file mode 100644
index 604d40665a..0000000000
--- a/contrib/libs/libpqxx/include/pqxx/prepared_statement.hxx
+++ /dev/null
@@ -1,177 +0,0 @@
-/** Helper classes for defining and executing prepared statements.
- *
- * See the connection_base hierarchy for more about prepared statements.
- *
- * Copyright (c) 2000-2019, Jeroen T. Vermeulen.
- *
- * See COPYING for copyright license.  If you did not receive a file called
- * COPYING with this source code, please notify the distributor of this mistake,
- * or contact the author.
- */
-#ifndef PQXX_H_PREPARED_STATEMENT
-#define PQXX_H_PREPARED_STATEMENT
-
-#include "pqxx/compiler-public.hxx"
-#include "pqxx/compiler-internal-pre.hxx"
-
-#include "pqxx/types.hxx"
-#include "pqxx/internal/statement_parameters.hxx"
-
-
-
-namespace pqxx
-{
-/// Dedicated namespace for helper types related to prepared statements.
-namespace prepare
-{
-/// Pass a number of statement parameters only known at runtime.
-/** When you call any of the @c exec_params functions, the number of arguments
- * is normally known at compile time.  This helper function supports the case
- * where it is not.
- *
- * Use this function to pass a variable number of parameters, based on a
- * sequence ranging from @c begin to @c end exclusively.
- *
- * The technique combines with the regular static parameters.  You can use it
- * to insert dynamic parameter lists in any place, or places, among the call's
- * parameters.  You can even insert multiple dynamic sequences.
- *
- * @param begin A pointer or iterator for iterating parameters.
- * @param end A pointer or iterator for iterating parameters.
- * @return An object representing the parameters.
- */
-template<typename IT> inline pqxx::internal::dynamic_params<IT>
-make_dynamic_params(IT begin, IT end)
-{
-  return pqxx::internal::dynamic_params<IT>(begin, end);
-}
-
-
-/// Pass a number of statement parameters only known at runtime.
-/** When you call any of the @c exec_params functions, the number of arguments
- * is normally known at compile time.  This helper function supports the case
- * where it is not.
- *
- * Use this function to pass a variable number of parameters, based on a
- * container of parameter values.
- *
- * The technique combines with the regular static parameters.  You can use it
- * to insert dynamic parameter lists in any place, or places, among the call's
- * parameters.  You can even insert multiple dynamic containers.
- *
- * @param container A container of parameter values.
- * @return An object representing the parameters.
- */
-template<typename C>
-inline pqxx::internal::dynamic_params<typename C::const_iterator>
-make_dynamic_params(const C &container)
-{
-  return pqxx::internal::dynamic_params<typename C::const_iterator>(container);
-}
-} // namespace prepare
-} // namespace pqxx
-
-namespace pqxx
-{
-namespace prepare
-{
-/// Helper class for passing parameters to, and executing, prepared statements
-/** @deprecated As of 6.0, use @c transaction_base::exec_prepared and friends.
- */
-class PQXX_LIBEXPORT invocation : internal::statement_parameters
-{
-public:
-  PQXX_DEPRECATED invocation(transaction_base &, const std::string &statement);
-  invocation &operator=(const invocation &) =delete;
-
-  /// Execute!
-  result exec() const;
-
-  /// Execute and return result in binary format
-  result exec_binary() const;
-
-  /// Has a statement of this name been defined?
-  bool exists() const;
-
-  /// Pass null parameter.
-  invocation &operator()() { add_param(); return *this; }
-
-  /// Pass parameter value.
-  /**
-   * @param v parameter value; will be represented as a string internally.
-   */
-  template<typename T> invocation &operator()(const T &v)
-	{ add_param(v, true); return *this; }
-
-  /// Pass binary parameter value for a BYTEA field.
-  /**
-   * @param v binary string; will be passed on directly in binary form.
-   */
-  invocation &operator()(const binarystring &v)
-	{ add_binary_param(v, true); return *this; }
-
-  /// Pass parameter value.
-  /**
-   * @param v parameter value (will be represented as a string internally).
-   * @param nonnull replaces value with null if set to false.
-   */
-  template<typename T> invocation &operator()(const T &v, bool nonnull)
-	{ add_param(v, nonnull); return *this; }
-
-  /// Pass binary parameter value for a BYTEA field.
-  /**
-   * @param v binary string; will be passed on directly in binary form.
-   * @param nonnull determines whether to pass a real value, or nullptr.
-   */
-  invocation &operator()(const binarystring &v, bool nonnull)
-	{ add_binary_param(v, nonnull); return *this; }
-
-  /// Pass C-style parameter string, or null if pointer is null.
-  /**
-   * This version is for passing C-style strings; it's a template, so any
-   * pointer type that @c to_string accepts will do.
-   *
-   * @param v parameter value (will be represented as a C++ string internally)
-   * @param nonnull replaces value with null if set to @c false
-   */
-  template<typename T> invocation &operator()(T *v, bool nonnull=true)
-	{ add_param(v, nonnull); return *this; }
-
-  /// Pass C-style string parameter, or null if pointer is null.
-  /** This duplicates the pointer-to-template-argument-type version of the
-   * operator, but helps compilers with less advanced template implementations
-   * disambiguate calls where C-style strings are passed.
-   */
-  invocation &operator()(const char *v, bool nonnull=true)
-	{ add_param(v, nonnull); return *this; }
-
-private:
-  transaction_base &m_home;
-  const std::string m_statement;
-
-  invocation &setparam(const std::string &, bool nonnull);
-
-  result internal_exec(result_format format) const;
-};
-
-
-namespace internal
-{
-/// Internal representation of a prepared statement definition.
-struct PQXX_LIBEXPORT prepared_def
-{
-  /// Text of prepared query.
-  std::string definition;
-  /// Has this prepared statement been prepared in the current session?
-  bool registered = false;
-
-  prepared_def() =default;
-  explicit prepared_def(const std::string &);
-};
-
-} // namespace pqxx::prepare::internal
-} // namespace pqxx::prepare
-} // namespace pqxx
-
-#include "pqxx/compiler-internal-post.hxx"
-#endif
diff --git a/contrib/libs/libpqxx/include/pqxx/result b/contrib/libs/libpqxx/include/pqxx/result
deleted file mode 100644
index d61e588681..0000000000
--- a/contrib/libs/libpqxx/include/pqxx/result
+++ /dev/null
@@ -1,11 +0,0 @@
-/** pqxx::result class and support classes.
- *
- * pqxx::result represents the set of result rows from a database query.
- */
-// Actual definitions in .hxx file so editors and such recognize file type.
-#include "pqxx/result.hxx"
-
-// Now include some types which depend on result, but which the user will
-// expect to see defined after including this header.
-#include "pqxx/result_iterator.hxx"
-#include "pqxx/field.hxx"
diff --git a/contrib/libs/libpqxx/include/pqxx/result.hxx b/contrib/libs/libpqxx/include/pqxx/result.hxx
deleted file mode 100644
index b1f5ce3f4c..0000000000
--- a/contrib/libs/libpqxx/include/pqxx/result.hxx
+++ /dev/null
@@ -1,249 +0,0 @@
-/** Definitions for the pqxx::result class and support classes.
- *
- * pqxx::result represents the set of result rows from a database query.
- *
- * DO NOT INCLUDE THIS FILE DIRECTLY; include pqxx/result instead.
- *
- * Copyright (c) 2000-2019, Jeroen T. Vermeulen.
- *
- * See COPYING for copyright license.  If you did not receive a file called
- * COPYING with this source code, please notify the distributor of this mistake,
- * or contact the author.
- */
-#ifndef PQXX_H_RESULT
-#define PQXX_H_RESULT
-
-#include "pqxx/compiler-public.hxx"
-#include "pqxx/compiler-internal-pre.hxx"
-
-#include <ios>
-#include <memory>
-#include <stdexcept>
-
-#include "pqxx/except.hxx"
-#include "pqxx/types.hxx"
-#include "pqxx/util.hxx"
-
-#include "pqxx/internal/encodings.hxx"
-
-
-// Methods tested in eg. test module test01 are marked with "//[t01]".
-
-namespace pqxx
-{
-namespace internal
-{
-PQXX_LIBEXPORT void clear_result(const pq::PGresult *);
-
-namespace gate
-{
-class result_connection;
-class result_creation;
-class result_row;
-class result_sql_cursor;
-} // namespace internal::gate
-} // namespace internal
-
-
-enum class result_format
-{
-    text = 0,
-    binary = 1
-};
-
-
-/// Result set containing data returned by a query or command.
-/** This behaves as a container (as defined by the C++ standard library) and
- * provides random access const iterators to iterate over its rows.  A row
- * can also be accessed by indexing a result R by the row's zero-based
- * number:
- *
- * @code
- *	for (result::size_type i=0; i < R.size(); ++i) Process(R[i]);
- * @endcode
- *
- * Result sets in libpqxx are lightweight, reference-counted wrapper objects
- * which are relatively small and cheap to copy.  Think of a result object as
- * a "smart pointer" to an underlying result set.
- *
- * @warning The result set that a result object points to is not thread-safe.
- * If you copy a result object, it still refers to the same underlying result
- * set.  So never copy, destroy, query, or otherwise access a result while
- * another thread may be copying, destroying, querying, or otherwise accessing
- * the same result set--even if it is doing so through a different result
- * object!
- */
-class PQXX_LIBEXPORT result
-{
-public:
-  using size_type = result_size_type;
-  using difference_type = result_difference_type;
-  using reference = row;
-  using const_iterator = const_result_iterator;
-  using pointer = const_iterator;
-  using iterator = const_iterator;
-  using const_reverse_iterator = const_reverse_result_iterator;
-  using reverse_iterator = const_reverse_iterator;
-
-  result() noexcept :		                                        //[t03]
-      m_data(make_data_pointer()),
-      m_query(),
-      m_encoding(internal::encoding_group::MONOBYTE)
-    {}
-  result(const result &rhs) noexcept =default;				//[t01]
-
-  result &operator=(const result &rhs) noexcept =default;		//[t10]
-
-  /**
-   * @name Comparisons
-   */
-  //@{
-  bool operator==(const result &) const noexcept;			//[t70]
-  bool operator!=(const result &rhs) const noexcept			//[t70]
-	{ return not operator==(rhs); }
-  //@}
-
-  const_reverse_iterator rbegin() const;				//[t75]
-  const_reverse_iterator crbegin() const;
-  const_reverse_iterator rend() const;					//[t75]
-  const_reverse_iterator crend() const;
-
-  const_iterator begin() const noexcept;				//[t01]
-  const_iterator cbegin() const noexcept;
-  inline const_iterator end() const noexcept;				//[t01]
-  inline const_iterator cend() const noexcept;
-
-  reference front() const noexcept;					//[t74]
-  reference back() const noexcept;					//[t75]
-
-  PQXX_PURE size_type size() const noexcept;				//[t02]
-  PQXX_PURE bool empty() const noexcept;				//[t11]
-  size_type capacity() const noexcept { return size(); }		//[t20]
-
-  void swap(result &) noexcept;						//[t77]
-
-  const row operator[](size_type i) const noexcept;			//[t02]
-  const row at(size_type) const;					//[t10]
-
-  void clear() noexcept { m_data.reset(); m_query = nullptr; }		//[t20]
-
-  /**
-   * @name Column information
-   */
-  //@{
-  /// Number of columns in result.
-  PQXX_PURE row_size_type columns() const noexcept;			//[t11]
-
-  /// Number of given column (throws exception if it doesn't exist).
-  row_size_type column_number(const char ColName[]) const;		//[t11]
-
-  /// Number of given column (throws exception if it doesn't exist).
-  row_size_type column_number(const std::string &Name) const		//[t11]
-	{return column_number(Name.c_str());}
-
-  /// Name of column with this number (throws exception if it doesn't exist)
-  const char *column_name(row_size_type Number) const;			//[t11]
-
-  /// Type of given column
-  oid column_type(row_size_type ColNum) const;				//[t07]
-  /// Type of given column
-  oid column_type(int ColNum) const					//[t07]
-	{ return column_type(row_size_type(ColNum)); }
-
-  /// Type of given column
-  oid column_type(const std::string &ColName) const			//[t07]
-	{ return column_type(column_number(ColName)); }
-
-  /// Type of given column
-  oid column_type(const char ColName[]) const				//[t07]
-	{ return column_type(column_number(ColName)); }
-
-  /// What table did this column come from?
-  oid column_table(row_size_type ColNum) const;				//[t02]
-
-  /// What table did this column come from?
-  oid column_table(int ColNum) const					//[t02]
-	{ return column_table(row_size_type(ColNum)); }
-
-  /// What table did this column come from?
-  oid column_table(const std::string &ColName) const			//[t02]
-	{ return column_table(column_number(ColName)); }
-
-  /// What column in its table did this column come from?
-  row_size_type table_column(row_size_type ColNum) const;		//[t93]
-
-  /// What column in its table did this column come from?
-  row_size_type table_column(int ColNum) const				//[t93]
-	{ return table_column(row_size_type(ColNum)); }
-
-  /// What column in its table did this column come from?
-  row_size_type table_column(const std::string &ColName) const		//[t93]
-	{ return table_column(column_number(ColName)); }
-  //@}
-
-  /// Query that produced this result, if available (empty string otherwise)
-  PQXX_PURE const std::string &query() const noexcept;			//[t70]
-
-  /// If command was @c INSERT of 1 row, return oid of inserted row
-  /** @return Identifier of inserted row if exactly one row was inserted, or
-   * oid_none otherwise.
-   */
-  PQXX_PURE oid inserted_oid() const;					//[t13]
-
-  /// If command was @c INSERT, @c UPDATE, or @c DELETE: number of affected rows
-  /** @return Number of affected rows if last command was @c INSERT, @c UPDATE,
-   * or @c DELETE; zero for all other commands.
-   */
-  PQXX_PURE size_type affected_rows() const;				//[t07]
-
-
-private:
-  using data_pointer = std::shared_ptr<const internal::pq::PGresult>;
-
-  /// Underlying libpq result set.
-   data_pointer m_data;
-
-  /// Factory for data_pointer.
-  static data_pointer make_data_pointer(
-	const internal::pq::PGresult *res=nullptr)
-	{ return data_pointer{res, internal::clear_result}; }
-
-  /// Query string.
-  std::shared_ptr<std::string> m_query;
-
-  internal::encoding_group m_encoding;
-
-  static const std::string s_empty_string;
-
-  friend class pqxx::field;
-  PQXX_PURE const char *GetValue(size_type Row, row_size_type Col) const;
-  PQXX_PURE bool get_is_null(size_type Row, row_size_type Col) const;
-  PQXX_PURE field_size_type get_length(
-	size_type,
-	row_size_type) const noexcept;
-
-  friend class pqxx::internal::gate::result_creation;
-  result(
-        internal::pq::PGresult *rhs,
-        const std::string &Query,
-        internal::encoding_group enc);
-
-  PQXX_PRIVATE void check_status() const;
-
-  friend class pqxx::internal::gate::result_connection;
-  friend class pqxx::internal::gate::result_row;
-  bool operator!() const noexcept { return not m_data.get(); }
-  operator bool() const noexcept { return m_data.get() != nullptr; }
-
-  [[noreturn]] PQXX_PRIVATE void ThrowSQLError(
-	const std::string &Err,
-	const std::string &Query) const;
-  PQXX_PRIVATE PQXX_PURE int errorposition() const;
-  PQXX_PRIVATE std::string StatusError() const;
-
-  friend class pqxx::internal::gate::result_sql_cursor;
-  PQXX_PURE const char *cmd_status() const noexcept;
-};
-} // namespace pqxx
-#include "pqxx/compiler-internal-post.hxx"
-#endif
diff --git a/contrib/libs/libpqxx/include/pqxx/result_iterator.hxx b/contrib/libs/libpqxx/include/pqxx/result_iterator.hxx
deleted file mode 100644
index b8e54d23ec..0000000000
--- a/contrib/libs/libpqxx/include/pqxx/result_iterator.hxx
+++ /dev/null
@@ -1,245 +0,0 @@
-/** Definitions for the pqxx::result class and support classes.
- *
- * pqxx::result represents the set of result rows from a database query.
- *
- * DO NOT INCLUDE THIS FILE DIRECTLY; include pqxx/result instead.
- *
- * Copyright (c) 2000-2019, Jeroen T. Vermeulen.
- *
- * See COPYING for copyright license.  If you did not receive a file called
- * COPYING with this source code, please notify the distributor of this mistake,
- * or contact the author.
- */
-#ifndef PQXX_H_RESULT_ITERATOR
-#define PQXX_H_RESULT_ITERATOR
-
-#include "pqxx/compiler-public.hxx"
-#include "pqxx/compiler-internal-pre.hxx"
-
-#include "pqxx/row.hxx"
-
-
-/* Result iterator.
- *
- * Don't include this header from your own application; it is included for you
- * by other libpqxx headers.
- */
-
-namespace pqxx
-{
-/// Iterator for rows in a result.  Use as result::const_iterator.
-/** A result, once obtained, cannot be modified.  Therefore there is no
- * plain iterator type for result.  However its const_iterator type can be
- * used to inspect its rows without changing them.
- */
-class PQXX_LIBEXPORT const_result_iterator : public row
-{
-public:
-  using iterator_category = std::random_access_iterator_tag;
-  using value_type = const row;
-  using pointer = const row *;
-  using reference = row;
-  using size_type = result_size_type;
-  using difference_type = result_difference_type;
-
-  const_result_iterator() noexcept : row{result(), 0} {}
-  const_result_iterator(const row &t) noexcept : row{t} {}
-
-  /**
-   * @name Dereferencing operators
-   */
-  //@{
-  /** The iterator "points to" its own row, which is also itself.  This
-   * allows a result to be addressed as a two-dimensional container without
-   * going through the intermediate step of dereferencing the iterator.  I
-   * hope this works out to be similar to C pointer/array semantics in useful
-   * cases.
-   *
-   * IIRC Alex Stepanov, the inventor of the STL, once remarked that having
-   * this as standard behaviour for pointers would be useful in some
-   * algorithms.  So even if this makes me look foolish, I would seem to be in
-   * distinguished company.
-   */
-  pointer operator->() const { return this; }				//[t12]
-  reference operator*() const { return row{*this}; }			//[t12]
-  //@}
-
-  /**
-   * @name Manipulations
-   */
-  //@{
-  const_result_iterator operator++(int);				//[t12]
-  const_result_iterator &operator++() { ++m_index; return *this; }	//[t01]
-  const_result_iterator operator--(int);				//[t12]
-  const_result_iterator &operator--() { --m_index; return *this; }	//[t12]
-
-  const_result_iterator &operator+=(difference_type i)			//[t12]
-      { m_index += i; return *this; }
-  const_result_iterator &operator-=(difference_type i)			//[t12]
-      { m_index -= i; return *this; }
-  //@}
-
-  /**
-   * @name Comparisons
-   */
-  //@{
-  bool operator==(const const_result_iterator &i) const			//[t12]
-      {return m_index==i.m_index;}
-  bool operator!=(const const_result_iterator &i) const			//[t12]
-      {return m_index!=i.m_index;}
-  bool operator<(const const_result_iterator &i) const			//[t12]
-      {return m_index<i.m_index;}
-  bool operator<=(const const_result_iterator &i) const			//[t12]
-      {return m_index<=i.m_index;}
-  bool operator>(const const_result_iterator &i) const			//[t12]
-      {return m_index>i.m_index;}
-  bool operator>=(const const_result_iterator &i) const			//[t12]
-      {return m_index>=i.m_index;}
-  //@}
-
-  /**
-   * @name Arithmetic operators
-   */
-  //@{
-  inline const_result_iterator operator+(difference_type) const;	//[t12]
-  friend const_result_iterator operator+(				//[t12]
-	difference_type,
-	const_result_iterator);
-  inline const_result_iterator operator-(difference_type) const;	//[t12]
-  inline difference_type operator-(const_result_iterator) const;	//[t12]
-  //@}
-
-private:
-  friend class pqxx::result;
-  const_result_iterator(const pqxx::result *r, result_size_type i) noexcept :
-    row{*r, i} {}
-};
-
-
-/// Reverse iterator for result.  Use as result::const_reverse_iterator.
-class PQXX_LIBEXPORT const_reverse_result_iterator :
-  private const_result_iterator
-{
-public:
-  using super = const_result_iterator;
-  using iterator_type = const_result_iterator;
-  using iterator_type::iterator_category;
-  using iterator_type::difference_type;
-  using iterator_type::pointer;
-  using value_type = iterator_type::value_type;
-  using reference = iterator_type::reference;
-
-  const_reverse_result_iterator(					//[t75]
-	const const_reverse_result_iterator &rhs) :
-    const_result_iterator{rhs} {}
-  explicit const_reverse_result_iterator(				//[t75]
-	const const_result_iterator &rhs) :
-    const_result_iterator{rhs} { super::operator--(); }
-
-  PQXX_PURE const_result_iterator base() const noexcept;		//[t75]
-
-  /**
-   * @name Dereferencing operators
-   */
-  //@{
-  using const_result_iterator::operator->;				//[t75]
-  using const_result_iterator::operator*;				//[t75]
-  //@}
-
-  /**
-   * @name Manipulations
-   */
-  //@{
-  const_reverse_result_iterator &operator=(				//[t75]
-	const const_reverse_result_iterator &r)
-      { iterator_type::operator=(r); return *this; }
-  const_reverse_result_iterator &operator++()				//[t75]
-      { iterator_type::operator--(); return *this; }
-  const_reverse_result_iterator operator++(int);			//[t75]
-  const_reverse_result_iterator &operator--()				//[t75]
-      { iterator_type::operator++(); return *this; }
-  const_reverse_result_iterator operator--(int);			//[t75]
-  const_reverse_result_iterator &operator+=(difference_type i)		//[t75]
-      { iterator_type::operator-=(i); return *this; }
-  const_reverse_result_iterator &operator-=(difference_type i)		//[t75]
-      { iterator_type::operator+=(i); return *this; }
-  //@}
-
-  /**
-   * @name Arithmetic operators
-   */
-  //@{
-  const_reverse_result_iterator operator+(difference_type i) const	//[t75]
-      { return const_reverse_result_iterator(base() - i); }
-  const_reverse_result_iterator operator-(difference_type i)		//[t75]
-      { return const_reverse_result_iterator(base() + i); }
-  difference_type operator-(						//[t75]
-	const const_reverse_result_iterator &rhs) const
-      { return rhs.const_result_iterator::operator-(*this); }
-  //@}
-
-  /**
-   * @name Comparisons
-   */
-  //@{
-  bool operator==(							//[t75]
-	const const_reverse_result_iterator &rhs) const noexcept
-      { return iterator_type::operator==(rhs); }
-  bool operator!=(							//[t75]
-	const const_reverse_result_iterator &rhs) const noexcept
-      { return not operator==(rhs); }
-
-  bool operator<(const const_reverse_result_iterator &rhs) const	//[t75]
-      { return iterator_type::operator>(rhs); }
-  bool operator<=(const const_reverse_result_iterator &rhs) const	//[t75]
-      { return iterator_type::operator>=(rhs); }
-  bool operator>(const const_reverse_result_iterator &rhs) const	//[t75]
-      { return iterator_type::operator<(rhs); }
-  bool operator>=(const const_reverse_result_iterator &rhs) const	//[t75]
-      { return iterator_type::operator<=(rhs); }
-  //@}
-};
-
-
-inline const_result_iterator
-const_result_iterator::operator+(result::difference_type o) const
-{
-  return const_result_iterator{
-	&m_result, size_type(result::difference_type(m_index) + o)};
-}
-
-inline const_result_iterator
-operator+(result::difference_type o, const_result_iterator i)
-	{ return i + o; }
-
-inline const_result_iterator
-const_result_iterator::operator-(result::difference_type o) const
-{
-  return const_result_iterator{
-	&m_result,
-	result_size_type(result::difference_type(m_index) - o)};
-}
-
-inline result::difference_type
-const_result_iterator::operator-(const_result_iterator i) const
-	{ return result::difference_type(num() - i.num()); }
-
-inline const_result_iterator result::end() const noexcept
-	{ return const_result_iterator{this, size()}; }
-
-
-inline const_result_iterator result::cend() const noexcept
-	{ return end(); }
-
-
-inline const_reverse_result_iterator
-operator+(
-	result::difference_type n,
-	const const_reverse_result_iterator &i)
-	{ return const_reverse_result_iterator{i.base() - n}; }
-
-} // namespace pqxx
-
-#include "pqxx/compiler-internal-post.hxx"
-
-#endif
diff --git a/contrib/libs/libpqxx/include/pqxx/robusttransaction b/contrib/libs/libpqxx/include/pqxx/robusttransaction
deleted file mode 100644
index 4d8c99fc33..0000000000
--- a/contrib/libs/libpqxx/include/pqxx/robusttransaction
+++ /dev/null
@@ -1,6 +0,0 @@
-/** pqxx::robusttransaction class.
- *
- * pqxx::robusttransaction is a slower but safer transaction class.
- */
-// Actual definitions in .hxx file so editors and such recognize file type.
-#include "pqxx/robusttransaction.hxx"
diff --git a/contrib/libs/libpqxx/include/pqxx/robusttransaction.hxx b/contrib/libs/libpqxx/include/pqxx/robusttransaction.hxx
deleted file mode 100644
index c4c16323b1..0000000000
--- a/contrib/libs/libpqxx/include/pqxx/robusttransaction.hxx
+++ /dev/null
@@ -1,168 +0,0 @@
-/** Definition of the pqxx::robusttransaction class.
- *
- * pqxx::robusttransaction is a slower but safer transaction class.
- *
- * DO NOT INCLUDE THIS FILE DIRECTLY; include pqxx/robusttransaction instead.
- *
- * Copyright (c) 2000-2019, Jeroen T. Vermeulen.
- *
- * See COPYING for copyright license.  If you did not receive a file called
- * COPYING with this source code, please notify the distributor of this mistake,
- * or contact the author.
- */
-#ifndef PQXX_H_ROBUSTTRANSACTION
-#define PQXX_H_ROBUSTTRANSACTION
-
-#include "pqxx/compiler-public.hxx"
-#include "pqxx/compiler-internal-pre.hxx"
-
-#include "pqxx/dbtransaction.hxx"
-
-
-// Methods tested in eg. test module test01 are marked with "//[t01]".
-
-namespace pqxx
-{
-
-namespace internal
-{
-/// Helper base class for the @c robusttransaction class template.
-class PQXX_LIBEXPORT PQXX_NOVTABLE basic_robusttransaction :
-  public dbtransaction
-{
-public:
-  /// Isolation level is read_committed by default.
-  using isolation_tag = isolation_traits<read_committed>;
-
-  virtual ~basic_robusttransaction() =0;				//[t16]
-
-protected:
-  basic_robusttransaction(
-	connection_base &C,
-	const std::string &IsolationLevel,
-	const std::string &table_name=std::string{});			//[t16]
-
-private:
-  using IDType = unsigned long;
-  IDType m_record_id = 0;
-  std::string m_xid;
-  std::string m_log_table;
-  std::string m_sequence;
-  int m_backendpid = -1;
-
-  virtual void do_begin() override;					//[t18]
-  virtual void do_commit() override;					//[t16]
-  virtual void do_abort() override;					//[t18]
-
-  PQXX_PRIVATE void CreateLogTable();
-  PQXX_PRIVATE void CreateTransactionRecord();
-  PQXX_PRIVATE std::string sql_delete() const;
-  PQXX_PRIVATE void DeleteTransactionRecord() noexcept;
-  PQXX_PRIVATE bool CheckTransactionRecord();
-};
-} // namespace internal
-
-
-/**
- * @ingroup transaction
- *
- * @{
- */
-
-/// Slightly slower, better-fortified version of transaction
-/** robusttransaction is similar to transaction, but spends more effort (and
- * performance!) to deal with the hopefully rare case that the connection to
- * the backend is lost just as the current transaction is being committed.  In
- * this case, there is no way to determine whether the backend managed to
- * commit the transaction before noticing the loss of connection.
- *
- * In such cases, this class tries to reconnect to the database and figure out
- * what happened.  It will need to store and manage some information (pretty
- * much a user-level transaction log) in the back-end for each and every
- * transaction just on the off chance that this problem might occur.
- * This service level was made optional since you may not want to pay this
- * overhead where it is not necessary.  Certainly the use of this class makes
- * no sense for local connections, or for transactions that read the database
- * but never modify it, or for noncritical database manipulations.
- *
- * Besides being slower, it's theoretically possible that robusttransaction
- * actually fails more instead of less often than a normal transaction.  This is
- * due to the added work and complexity.  What robusttransaction tries to
- * achieve is to be more deterministic, not more successful per se.
- *
- * When a user first uses a robusttransaction in a database, the class will
- * attempt to create a log table there to keep vital transaction-related state
- * information in.  This table, located in that same database, will be called
- * pqxxlog_*user*, where *user* is the PostgreSQL username for that user.  If
- * the log table can not be created, the transaction fails immediately.
- *
- * If the user does not have permission to create the log table, the database
- * administrator may create one for him beforehand, and give ownership (or at
- * least full insert/update rights) to the user.  The table must contain two
- * non-unique fields (which will never be null): "name" (of text type,
- * @c varchar(256) by default) and "date" (of @c timestamp type).  Older
- * versions of robusttransaction also added a unique "id" field; this field is
- * now obsolete and the log table's implicit oids are used instead.  The log
- * tables' names may be made configurable in a future version of libpqxx.
- *
- * The transaction log table contains records describing unfinished
- * transactions, i.e. ones that have been started but not, as far as the client
- * knows, committed or aborted.  This can mean any of the following:
- *
- * <ol>
- * <li> The transaction is in progress.  Since backend transactions can't run
- * for extended periods of time, this can only be the case if the log record's
- * timestamp (compared to the server's clock) is not very old, provided of
- * course that the server's system clock hasn't just made a radical jump.
- * <li> The client's connection to the server was lost, just when the client was
- * committing the transaction, and the client so far has not been able to
- * re-establish the connection to verify whether the transaction was actually
- * completed or rolled back by the server.  This is a serious (and luckily a
- * rare) condition and requires manual inspection of the database to determine
- * what happened.  The robusttransaction will emit clear and specific warnings
- * to this effect, and will identify the log record describing the transaction
- * in question.
- * <li> The transaction was completed (either by commit or by rollback), but the
- * client's connection was durably lost just as it tried to clean up the log
- * record.  Again, robusttransaction will emit a clear and specific warning to
- * tell you about this and request that the record be deleted as soon as
- * possible.
- * <li> The client has gone offline at any time while in one of the preceding
- * states.  This also requires manual intervention, but the client obviously is
- * not able to issue a warning.
- * </ol>
- *
- * It is safe to drop a log table when it is not in use (ie., it is empty or all
- * records in it represent states 2-4 above).  Each robusttransaction will
- * attempt to recreate the table at its next time of use.
- */
-template<isolation_level ISOLATIONLEVEL=read_committed>
-class robusttransaction : public internal::basic_robusttransaction
-{
-public:
-  using isolation_tag = isolation_traits<ISOLATIONLEVEL>;
-
-  /// Constructor
-  /** Creates robusttransaction of given name
-   * @param C Connection that this robusttransaction should live inside.
-   * @param Name optional human-readable name for this transaction
-   */
-  explicit robusttransaction(
-	connection_base &C,
-	const std::string &Name=std::string{}) :
-    namedclass{fullname("robusttransaction",isolation_tag::name()), Name},
-    internal::basic_robusttransaction(C, isolation_tag::name())
-	{ Begin(); }
-
-  virtual ~robusttransaction() noexcept
-	{ End(); }
-};
-
-/**
- * @}
- */
-
-} // namespace pqxx
-
-#include "pqxx/compiler-internal-post.hxx"
-#endif
diff --git a/contrib/libs/libpqxx/include/pqxx/row.hxx b/contrib/libs/libpqxx/include/pqxx/row.hxx
deleted file mode 100644
index 2d8543795f..0000000000
--- a/contrib/libs/libpqxx/include/pqxx/row.hxx
+++ /dev/null
@@ -1,403 +0,0 @@
-/** Definitions for the pqxx::result class and support classes.
- *
- * pqxx::result represents the set of result rows from a database query.
- *
- * DO NOT INCLUDE THIS FILE DIRECTLY; include pqxx/result instead.
- *
- * Copyright (c) 2000-2019, Jeroen T. Vermeulen.
- *
- * See COPYING for copyright license.  If you did not receive a file called
- * COPYING with this source code, please notify the distributor of this mistake,
- * or contact the author.
- */
-#ifndef PQXX_H_ROW
-#define PQXX_H_ROW
-
-#include "pqxx/compiler-public.hxx"
-#include "pqxx/compiler-internal-pre.hxx"
-
-#include "pqxx/except.hxx"
-#include "pqxx/field.hxx"
-#include "pqxx/result.hxx"
-
-
-// Methods tested in eg. test module test01 are marked with "//[t01]".
-
-namespace pqxx
-{
-/// Reference to one row in a result.
-/** A row represents one row (also called a row) in a query result set.
- * It also acts as a container mapping column numbers or names to field
- * values (see below):
- *
- * @code
- *	cout << row["date"].c_str() << ": " << row["name"].c_str() << endl;
- * @endcode
- *
- * The row itself acts like a (non-modifyable) container, complete with its
- * own const_iterator and const_reverse_iterator.
- */
-class PQXX_LIBEXPORT row
-{
-public:
-  using size_type = row_size_type;
-  using difference_type = row_difference_type;
-  using const_iterator = const_row_iterator;
-  using iterator = const_iterator;
-  using reference = field;
-  using pointer = const_row_iterator;
-  using const_reverse_iterator = const_reverse_row_iterator;
-  using reverse_iterator = const_reverse_iterator;
-
-  row() =default;
-
-  /// @deprecated Do not use this constructor.  It will become private.
-  row(result r, size_t i) noexcept;
-
-  ~row() noexcept =default; // Yes Scott Meyers, you're absolutely right[1]
-
-  /**
-   * @name Comparison
-   */
-  //@{
-  PQXX_PURE bool operator==(const row &) const noexcept;		//[t75]
-  bool operator!=(const row &rhs) const noexcept			//[t75]
-      { return not operator==(rhs); }
-  //@}
-
-  const_iterator begin() const noexcept;				//[t82]
-  const_iterator cbegin() const noexcept;
-  const_iterator end() const noexcept;					//[t82]
-  const_iterator cend() const noexcept;
-
-  /**
-   * @name Field access
-   */
-  //@{
-  reference front() const noexcept;					//[t74]
-  reference back() const noexcept;					//[t75]
-
-  const_reverse_row_iterator rbegin() const;				//[t82]
-  const_reverse_row_iterator crbegin() const;
-  const_reverse_row_iterator rend() const;				//[t82]
-  const_reverse_row_iterator crend() const;
-
-  reference operator[](size_type) const noexcept;			//[t11]
-  reference operator[](int) const noexcept;				//[t02]
-  /** Address field by name.
-   * @warning This is much slower than indexing by number, or iterating.
-   */
-  reference operator[](const char[]) const;				//[t11]
-  /** Address field by name.
-   * @warning This is much slower than indexing by number, or iterating.
-   */
-  reference operator[](const std::string &) const;			//[t11]
-  reference at(size_type) const; 					//[t11]
-  reference at(int) const;						//[t11]
-  /** Address field by name.
-   * @warning This is much slower than indexing by number, or iterating.
-   */
-  reference at(const char[]) const;					//[t11]
-  /** Address field by name.
-   * @warning This is much slower than indexing by number, or iterating.
-   */
-  reference at(const std::string &) const;				//[t11]
-  //@}
-
-  size_type size() const noexcept					//[t11]
-						     { return m_end-m_begin; }
-
-  void swap(row &) noexcept;						//[t11]
-
-  /// Row number, assuming this is a real row and not end()/rend().
-  size_t rownumber() const noexcept { return size_t(m_index); }		//[t11]
-
-  /**
-   * @name Column information
-   */
-  //@{
-  /// Number of given column (throws exception if it doesn't exist)
-  size_type column_number(const std::string &ColName) const		//[t30]
-      { return column_number(ColName.c_str()); }
-
-  /// Number of given column (throws exception if it doesn't exist)
-  size_type column_number(const char[]) const;       			//[t30]
-
-  /// Type of given column
-  oid column_type(size_type) const;					//[t07]
-
-  /// Type of given column
-  oid column_type(int ColNum) const					//[t07]
-      { return column_type(size_type(ColNum)); }
-
-  /// Type of given column
-  oid column_type(const std::string &ColName) const			//[t07]
-      { return column_type(column_number(ColName)); }
-
-  /// Type of given column
-  oid column_type(const char ColName[]) const				//[t07]
-      { return column_type(column_number(ColName)); }
-
-  /// What table did this column come from?
-  oid column_table(size_type ColNum) const;				//[t02]
-
-  /// What table did this column come from?
-  oid column_table(int ColNum) const					//[t02]
-      { return column_table(size_type(ColNum)); }
-  /// What table did this column come from?
-  oid column_table(const std::string &ColName) const			//[t02]
-      { return column_table(column_number(ColName)); }
-
-  /// What column number in its table did this result column come from?
-  /** A meaningful answer can be given only if the column in question comes
-   * directly from a column in a table.  If the column is computed in any
-   * other way, a logic_error will be thrown.
-   *
-   * @param ColNum a zero-based column number in this result set
-   * @return a zero-based column number in originating table
-   */
-  size_type table_column(size_type) const;				//[t93]
-
-  /// What column number in its table did this result column come from?
-  size_type table_column(int ColNum) const				//[t93]
-      { return table_column(size_type(ColNum)); }
-
-  /// What column number in its table did this result column come from?
-  size_type table_column(const std::string &ColName) const		//[t93]
-      { return table_column(column_number(ColName)); }
-  //@}
-
-  size_t num() const { return rownumber(); }				//[t01]
-
-  /** Produce a slice of this row, containing the given range of columns.
-   *
-   * The slice runs from the range's starting column to the range's end
-   * column, exclusive.  It looks just like a normal result row, except
-   * slices can be empty.
-   *
-   * @warning Slicing is a relatively new feature, and not all software may be
-   * prepared to deal with empty slices.  If there is any chance that your
-   * program might be creating empty slices and passing them to code that may
-   * not be designed with the possibility of empty rows in mind, be sure to
-   * test for that case.
-   */
-  row slice(size_type Begin, size_type End) const;
-
-  // Is this an empty slice?
-  PQXX_PURE bool empty() const noexcept;
-
-protected:
-  friend class field;
-  /// Result set of which this is one row.
-  result m_result;
-  /// Row number.
-  /**
-   * You'd expect this to be a size_t, but due to the way reverse iterators
-   * are related to regular iterators, it must be allowed to underflow to -1.
-   */
-  long m_index = 0;
-  /// First column in slice.  This row ignores lower-numbered columns.
-  size_type m_begin = 0;
-  /// End column in slice.  This row only sees lower-numbered columns.
-  size_type m_end = 0;
-};
-
-
-/// Iterator for fields in a row.  Use as row::const_iterator.
-class PQXX_LIBEXPORT const_row_iterator : public field
-{
-public:
-  using iterator_category = std::random_access_iterator_tag;
-  using value_type = const field;
-  using pointer = const field *;
-  using size_type = row_size_type;
-  using difference_type = row_difference_type;
-  using reference = field;
-
-  const_row_iterator(const row &T, row_size_type C) noexcept :		//[t82]
-    field{T, C} {}
-  const_row_iterator(const field &F) noexcept : field{F} {}		//[t82]
-
-  /**
-   * @name Dereferencing operators
-   */
-  //@{
-  pointer operator->() const { return this; }				//[t82]
-  reference operator*() const { return field{*this}; }			//[t82]
-  //@}
-
-  /**
-   * @name Manipulations
-   */
-  //@{
-  const_row_iterator operator++(int);					//[t82]
-  const_row_iterator &operator++() { ++m_col; return *this; }		//[t82]
-  const_row_iterator operator--(int);					//[t82]
-  const_row_iterator &operator--() { --m_col; return *this; }		//[t82]
-
-  const_row_iterator &operator+=(difference_type i)			//[t82]
-      { m_col = size_type(difference_type(m_col) + i); return *this; }
-  const_row_iterator &operator-=(difference_type i)			//[t82]
-      { m_col = size_type(difference_type(m_col) - i); return *this; }
-  //@}
-
-  /**
-   * @name Comparisons
-   */
-  //@{
-  bool operator==(const const_row_iterator &i) const			//[t82]
-      {return col()==i.col();}
-  bool operator!=(const const_row_iterator &i) const			//[t82]
-      {return col()!=i.col();}
-  bool operator<(const const_row_iterator &i) const			//[t82]
-      {return col()<i.col();}
-  bool operator<=(const const_row_iterator &i) const			//[t82]
-      {return col()<=i.col();}
-  bool operator>(const const_row_iterator &i) const			//[t82]
-      {return col()>i.col();}
-  bool operator>=(const const_row_iterator &i) const			//[t82]
-      {return col()>=i.col();}
-  //@}
-
-  /**
-   * @name Arithmetic operators
-   */
-  //@{
-  inline const_row_iterator operator+(difference_type) const;		//[t82]
-
-  friend const_row_iterator operator+(					//[t82]
-	difference_type,
-	const_row_iterator);
-
-  inline const_row_iterator operator-(difference_type) const;		//[t82]
-  inline difference_type operator-(const_row_iterator) const;		//[t82]
-  //@}
-};
-
-
-/// Reverse iterator for a row.  Use as row::const_reverse_iterator.
-class PQXX_LIBEXPORT const_reverse_row_iterator : private const_row_iterator
-{
-public:
-  using super = const_row_iterator;
-  using iterator_type = const_row_iterator;
-  using iterator_type::iterator_category;
-  using iterator_type::difference_type;
-  using iterator_type::pointer;
-  using value_type = iterator_type::value_type;
-  using reference = iterator_type::reference;
-
-  const_reverse_row_iterator(const const_reverse_row_iterator &r) :	//[t82]
-    const_row_iterator{r} {}
-  explicit
-    const_reverse_row_iterator(const super &rhs) noexcept :		//[t82]
-      const_row_iterator{rhs} { super::operator--(); }
-
-  PQXX_PURE iterator_type base() const noexcept;			//[t82]
-
-  /**
-   * @name Dereferencing operators
-   */
-  //@{
-  using iterator_type::operator->;					//[t82]
-  using iterator_type::operator*;					//[t82]
-  //@}
-
-  /**
-   * @name Manipulations
-   */
-  //@{
-  const_reverse_row_iterator &
-    operator=(const const_reverse_row_iterator &r)			//[t82]
-      { iterator_type::operator=(r); return *this; }
-  const_reverse_row_iterator operator++()				//[t82]
-      { iterator_type::operator--(); return *this; }
-  const_reverse_row_iterator operator++(int);				//[t82]
-  const_reverse_row_iterator &operator--()				//[t82]
-      { iterator_type::operator++(); return *this; }
-  const_reverse_row_iterator operator--(int);				//[t82]
-  const_reverse_row_iterator &operator+=(difference_type i)		//[t82]
-      { iterator_type::operator-=(i); return *this; }
-  const_reverse_row_iterator &operator-=(difference_type i)		//[t82]
-      { iterator_type::operator+=(i); return *this; }
-  //@}
-
-  /**
-   * @name Arithmetic operators
-   */
-  //@{
-  const_reverse_row_iterator operator+(difference_type i) const		//[t82]
-      { return const_reverse_row_iterator{base()-i}; }
-  const_reverse_row_iterator operator-(difference_type i)		//[t82]
-      { return const_reverse_row_iterator{base()+i}; }
-  difference_type
-    operator-(const const_reverse_row_iterator &rhs) const		//[t82]
-      { return rhs.const_row_iterator::operator-(*this); }
-  //@}
-
-  /**
-   * @name Comparisons
-   */
-  //@{
-  bool operator==(const const_reverse_row_iterator &rhs) const noexcept	//[t82]
-      { return iterator_type::operator==(rhs); }
-  bool operator!=(const const_reverse_row_iterator &rhs) const noexcept	//[t82]
-      { return !operator==(rhs); }
-
-  bool operator<(const const_reverse_row_iterator &rhs) const		//[t82]
-      { return iterator_type::operator>(rhs); }
-  bool operator<=(const const_reverse_row_iterator &rhs) const		//[t82]
-      { return iterator_type::operator>=(rhs); }
-  bool operator>(const const_reverse_row_iterator &rhs) const		//[t82]
-      { return iterator_type::operator<(rhs); }
-  bool operator>=(const const_reverse_row_iterator &rhs) const		//[t82]
-      { return iterator_type::operator<=(rhs); }
-  //@}
-};
-
-
-inline const_row_iterator
-const_row_iterator::operator+(difference_type o) const
-{
-  return const_row_iterator{
-	row(home(), idx()),
-	size_type(difference_type(col()) + o)};
-}
-
-inline const_row_iterator
-operator+(const_row_iterator::difference_type o, const_row_iterator i)
-	{ return i + o; }
-
-inline const_row_iterator
-const_row_iterator::operator-(difference_type o) const
-{
-  return const_row_iterator{
-	row(home(), idx()),
-	size_type(difference_type(col()) - o)};
-}
-
-inline const_row_iterator::difference_type
-const_row_iterator::operator-(const_row_iterator i) const
-	{ return difference_type(num() - i.num()); }
-
-
-} // namespace pqxx
-
-
-/*
-[1] Scott Meyers, in one of his essential books, "Effective C++" and "More
-Effective C++", points out that it is good style to have any class containing
-a member of pointer type define a destructor--just to show that it knows what
-it is doing with the pointer.  This helps prevent nasty memory leak / double
-deletion bugs typically resulting from programmers' omission to deal with such
-issues in their destructors.
-
-The @c -Weffc++ option in gcc generates warnings for noncompliance with Scott's
-style guidelines, and hence necessitates the definition of this destructor,
-trivial as it may be.
-*/
-
-
-#include "pqxx/compiler-internal-post.hxx"
-
-#endif
diff --git a/contrib/libs/libpqxx/include/pqxx/strconv b/contrib/libs/libpqxx/include/pqxx/strconv
deleted file mode 100644
index b70bf39bf4..0000000000
--- a/contrib/libs/libpqxx/include/pqxx/strconv
+++ /dev/null
@@ -1,4 +0,0 @@
-/** String conversion definitions.
- */
-// Actual definitions in .hxx file so editors and such recognize file type.
-#include "pqxx/strconv.hxx"
diff --git a/contrib/libs/libpqxx/include/pqxx/strconv.hxx b/contrib/libs/libpqxx/include/pqxx/strconv.hxx
deleted file mode 100644
index 0cb120d876..0000000000
--- a/contrib/libs/libpqxx/include/pqxx/strconv.hxx
+++ /dev/null
@@ -1,341 +0,0 @@
-/** String conversion definitions.
- *
- * DO NOT INCLUDE THIS FILE DIRECTLY; include pqxx/stringconv instead.
- *
- * Copyright (c) 2000-2019, Jeroen T. Vermeulen.
- *
- * See COPYING for copyright license.  If you did not receive a file called
- * COPYING with this source code, please notify the distributor of this mistake,
- * or contact the author.
- */
-#ifndef PQXX_H_STRINGCONV
-#define PQXX_H_STRINGCONV
-
-#include "pqxx/compiler-public.hxx"
-
-#include <limits>
-#include <sstream>
-#include <stdexcept>
-
-
-namespace pqxx
-{
-
-/**
- * @defgroup stringconversion String conversion
- *
- * The PostgreSQL server accepts and represents data in string form.  It has
- * its own formats for various data types.  The string conversions define how
- * various C++ types translate to and from their respective PostgreSQL text
- * representations.
- *
- * Each conversion is defined by a specialisation of the @c string_traits
- * template.  This template implements some basic functions to support the
- * conversion, ideally in both directions.
- *
- * If you need to convert a type which is not supported out of the box, define
- * your own @c string_traits specialisation for that type, similar to the ones
- * defined here.  Any conversion code which "sees" your specialisation will now
- * support your conversion.  In particular, you'll be able to read result
- * fields into a variable of the new type.
- *
- * There is a macro to help you define conversions for individual enumeration
- * types.  The conversion will represent enumeration values as numeric strings.
- */
-//@{
-
-/// Traits class for use in string conversions
-/** Specialize this template for a type that you wish to add to_string and
- * from_string support for.
- */
-template<typename T, typename = void> struct string_traits;
-
-namespace internal
-{
-/// Throw exception for attempt to convert null to given type.
-[[noreturn]] PQXX_LIBEXPORT void throw_null_conversion(
-	const std::string &type);
-
-/// Give a human-readable name for a type, at compile time.
-/** Each instantiation contains a static member called @c value which is the
- * type's name, as a string.
- *
- * This template should not be around for long.  C++14's variable templates
- * make it easier (eliminating the cumbersome struct) and C++20's introspection
- * should obviate it completely.
- */
-template<typename TYPE> struct type_name;
-#define PQXX_DECLARE_TYPE_NAME(TYPE) \
-  template<> struct type_name<TYPE> \
-  { static constexpr const char *value = #TYPE; }
-
-PQXX_DECLARE_TYPE_NAME(bool);
-PQXX_DECLARE_TYPE_NAME(short);
-PQXX_DECLARE_TYPE_NAME(unsigned short);
-PQXX_DECLARE_TYPE_NAME(int);
-PQXX_DECLARE_TYPE_NAME(unsigned int);
-PQXX_DECLARE_TYPE_NAME(long);
-PQXX_DECLARE_TYPE_NAME(unsigned long);
-PQXX_DECLARE_TYPE_NAME(long long);
-PQXX_DECLARE_TYPE_NAME(unsigned long long);
-PQXX_DECLARE_TYPE_NAME(float);
-PQXX_DECLARE_TYPE_NAME(double);
-PQXX_DECLARE_TYPE_NAME(long double);
-PQXX_DECLARE_TYPE_NAME(char *);
-PQXX_DECLARE_TYPE_NAME(const char *);
-PQXX_DECLARE_TYPE_NAME(std::string);
-PQXX_DECLARE_TYPE_NAME(const std::string);
-PQXX_DECLARE_TYPE_NAME(std::stringstream);
-#undef PQXX_DECLARE_TYPE_NAME
-
-template<size_t N> struct type_name<char[N]>
-{ static constexpr const char *value = "char[]"; };
-
-
-/// Helper: string traits implementation for built-in types.
-/** These types all look much alike, so they can share much of their traits
- * classes (though templatised, of course).
- *
- * The actual `to_string` and `from_string` are implemented in the library,
- * but the rest is defined inline.
- */
-template<typename TYPE> struct PQXX_LIBEXPORT builtin_traits
-{
-  static constexpr const char *name() noexcept
-	{ return internal::type_name<TYPE>::value; }
-  static constexpr bool has_null() noexcept { return false; }
-  static bool is_null(TYPE) { return false; }
-  [[noreturn]] static TYPE null() { throw_null_conversion(name()); }
-  static void from_string(const char Str[], TYPE &Obj);
-  static std::string to_string(TYPE Obj);
-};
-} // namespace pqxx::internal
-
-
-/// Helper: declare a string_traits specialisation for a builtin type.
-#define PQXX_DECLARE_STRING_TRAITS_SPECIALIZATION(TYPE) \
-  template<> struct PQXX_LIBEXPORT string_traits<TYPE> : \
-    internal::builtin_traits<TYPE> {};
-
-PQXX_DECLARE_STRING_TRAITS_SPECIALIZATION(bool)
-
-PQXX_DECLARE_STRING_TRAITS_SPECIALIZATION(short)
-PQXX_DECLARE_STRING_TRAITS_SPECIALIZATION(unsigned short)
-PQXX_DECLARE_STRING_TRAITS_SPECIALIZATION(int)
-PQXX_DECLARE_STRING_TRAITS_SPECIALIZATION(unsigned int)
-PQXX_DECLARE_STRING_TRAITS_SPECIALIZATION(long)
-PQXX_DECLARE_STRING_TRAITS_SPECIALIZATION(unsigned long)
-PQXX_DECLARE_STRING_TRAITS_SPECIALIZATION(long long)
-PQXX_DECLARE_STRING_TRAITS_SPECIALIZATION(unsigned long long)
-
-PQXX_DECLARE_STRING_TRAITS_SPECIALIZATION(float)
-PQXX_DECLARE_STRING_TRAITS_SPECIALIZATION(double)
-PQXX_DECLARE_STRING_TRAITS_SPECIALIZATION(long double)
-
-#undef PQXX_DECLARE_STRING_TRAITS_SPECIALIZATION
-
-
-/// Helper class for defining enum conversions.
-/** The conversion will convert enum values to numeric strings, and vice versa.
- *
- * To define a string conversion for an enum type, derive a @c string_traits
- * specialisation for the enum from this struct.
- *
- * There's usually an easier way though: the @c PQXX_DECLARE_ENUM_CONVERSION
- * macro.  Use @c enum_traits manually only if you need to customise your
- * traits type in more detail, e.g. if your enum has a "null" value built in.
- */
-template<typename ENUM>
-struct enum_traits
-{
-  using underlying_type = typename std::underlying_type<ENUM>::type;
-  using underlying_traits = string_traits<underlying_type>;
-
-  static constexpr bool has_null() noexcept { return false; }
-  [[noreturn]] static ENUM null()
-	{ internal::throw_null_conversion("enum type"); }
-
-  static void from_string(const char Str[], ENUM &Obj)
-  {
-    underlying_type tmp;
-    underlying_traits::from_string(Str, tmp);
-    Obj = ENUM(tmp);
-  }
-
-  static std::string to_string(ENUM Obj)
-	{ return underlying_traits::to_string(underlying_type(Obj)); }
-};
-
-
-/// Macro: Define a string conversion for an enum type.
-/** This specialises the @c pqxx::string_traits template, so use it in the
- * @c ::pqxx namespace.
- *
- * For example:
- *
- *      #include <iostream>
- *      #include <pqxx/strconv>
- *      enum X { xa, xb };
- *      namespace pqxx { PQXX_DECLARE_ENUM_CONVERSION(x); }
- *      int main() { std::cout << to_string(xa) << std::endl; }
- */
-#define PQXX_DECLARE_ENUM_CONVERSION(ENUM) \
-template<> \
-struct string_traits<ENUM> : pqxx::enum_traits<ENUM> \
-{ \
-  static constexpr const char *name() noexcept { return #ENUM; } \
-  [[noreturn]] static ENUM null() \
-	{ internal::throw_null_conversion(name()); } \
-}
-
-
-/// String traits for C-style string ("pointer to const char")
-template<> struct PQXX_LIBEXPORT string_traits<const char *>
-{
-  static constexpr const char *name() noexcept { return "const char *"; }
-  static constexpr bool has_null() noexcept { return true; }
-  static bool is_null(const char *t) { return t == nullptr; }
-  static const char *null() { return nullptr; }
-  static void from_string(const char Str[], const char *&Obj) { Obj = Str; }
-  static std::string to_string(const char *Obj) { return Obj; }
-};
-
-/// String traits for non-const C-style string ("pointer to char")
-template<> struct PQXX_LIBEXPORT string_traits<char *>
-{
-  static constexpr const char *name() noexcept { return "char *"; }
-  static constexpr bool has_null() noexcept { return true; }
-  static bool is_null(const char *t) { return t == nullptr; }
-  static const char *null() { return nullptr; }
-
-  // Don't allow this conversion since it breaks const-safety.
-  // static void from_string(const char Str[], char *&Obj);
-
-  static std::string to_string(char *Obj) { return Obj; }
-};
-
-/// String traits for C-style string constant ("array of char")
-template<size_t N> struct PQXX_LIBEXPORT string_traits<char[N]>
-{
-  static constexpr const char *name() noexcept { return "char[]"; }
-  static constexpr bool has_null() noexcept { return true; }
-  static bool is_null(const char t[]) { return t == nullptr; }
-  static const char *null() { return nullptr; }
-  static std::string to_string(const char Obj[]) { return Obj; }
-};
-
-template<> struct PQXX_LIBEXPORT string_traits<std::string>
-{
-  static constexpr const char *name() noexcept { return "string"; }
-  static constexpr bool has_null() noexcept { return false; }
-  static bool is_null(const std::string &) { return false; }
-  [[noreturn]] static std::string null()
-	{ internal::throw_null_conversion(name()); }
-  static void from_string(const char Str[], std::string &Obj) { Obj=Str; }
-  static std::string to_string(const std::string &Obj) { return Obj; }
-};
-
-template<> struct PQXX_LIBEXPORT string_traits<const std::string>
-{
-  static constexpr const char *name() noexcept { return "const string"; }
-  static constexpr bool has_null() noexcept { return false; }
-  static bool is_null(const std::string &) { return false; }
-  [[noreturn]] static const std::string null()
-	{ internal::throw_null_conversion(name()); }
-  static const std::string to_string(const std::string &Obj) { return Obj; }
-};
-
-template<> struct PQXX_LIBEXPORT string_traits<std::stringstream>
-{
-  static constexpr const char *name() noexcept { return "stringstream"; }
-  static constexpr bool has_null() noexcept { return false; }
-  static bool is_null(const std::stringstream &) { return false; }
-  [[noreturn]] static std::stringstream null()
-	{ internal::throw_null_conversion(name()); }
-  static void from_string(const char Str[], std::stringstream &Obj)
-	{ Obj.clear(); Obj << Str; }
-  static std::string to_string(const std::stringstream &Obj)
-	{ return Obj.str(); }
-};
-
-
-// TODO: Implement date conversions.
-
-/// Attempt to convert postgres-generated string to given built-in type
-/** If the form of the value found in the string does not match the expected
- * type, e.g. if a decimal point is found when converting to an integer type,
- * the conversion fails.  Overflows (e.g. converting "9999999999" to a 16-bit
- * C++ type) are also treated as errors.  If in some cases this behaviour should
- * be inappropriate, convert to something bigger such as @c long @c int first
- * and then truncate the resulting value.
- *
- * Only the simplest possible conversions are supported.  No fancy features
- * such as hexadecimal or octal, spurious signs, or exponent notation will work.
- * No whitespace is stripped away.  Only the kinds of strings that come out of
- * PostgreSQL and out of to_string() can be converted.
- */
-template<typename T>
-  inline void from_string(const char Str[], T &Obj)
-{
-  if (Str == nullptr) throw std::runtime_error{"Attempt to read null string."};
-  string_traits<T>::from_string(Str, Obj);
-}
-
-
-/// Conversion with known string length (for strings that may contain nuls)
-/** This is only used for strings, where embedded nul bytes should not determine
- * the end of the string.
- *
- * For all other types, this just uses the regular, nul-terminated version of
- * from_string().
- */
-template<typename T> inline void from_string(const char Str[], T &Obj, size_t)
-{
-  return from_string(Str, Obj);
-}
-
-template<>
-  inline void from_string<std::string>(					//[t00]
-	const char Str[],
-	std::string &Obj,
-	size_t len)
-{
-  if (Str == nullptr) throw std::runtime_error{"Attempt to read null string."};
-  Obj.assign(Str, len);
-}
-
-template<typename T>
-  inline void from_string(const std::string &Str, T &Obj)		//[t45]
-	{ from_string(Str.c_str(), Obj); }
-
-template<typename T>
-  inline void from_string(const std::stringstream &Str, T &Obj)		//[t00]
-	{ from_string(Str.str(), Obj); }
-
-template<> inline void
-from_string(const std::string &Str, std::string &Obj)			//[t46]
-	{ Obj = Str; }
-
-
-namespace internal
-{
-/// Compute numeric value of given textual digit (assuming that it is a digit)
-constexpr int digit_to_number(char c) noexcept { return c-'0'; }
-constexpr char number_to_digit(int i) noexcept
-	{ return static_cast<char>(i+'0'); }
-} // namespace pqxx::internal
-
-
-/// Convert built-in type to a readable string that PostgreSQL will understand
-/** No special formatting is done, and any locale settings are ignored.  The
- * resulting string will be human-readable and in a format suitable for use in
- * SQL queries.
- */
-template<typename T> inline std::string to_string(const T &Obj)
-	{ return string_traits<T>::to_string(Obj); }
-
-//@}
-
-} // namespace pqxx
-
-#endif
diff --git a/contrib/libs/libpqxx/include/pqxx/stream_base.hxx b/contrib/libs/libpqxx/include/pqxx/stream_base.hxx
deleted file mode 100644
index d4af37fb07..0000000000
--- a/contrib/libs/libpqxx/include/pqxx/stream_base.hxx
+++ /dev/null
@@ -1,62 +0,0 @@
-/** Definition of the pqxx::stream_base class.
- *
- * pqxx::stream_base provides optimized batch access to a database table.
- *
- * DO NOT INCLUDE THIS FILE DIRECTLY; include pqxx/stream_base instead.
- *
- * Copyright (c) 2000-2019, Jeroen T. Vermeulen.
- *
- * See COPYING for copyright license.  If you did not receive a file called
- * COPYING with this source code, please notify the distributor of this mistake,
- * or contact the author.
- */
-#ifndef PQXX_H_STREAM_BASE
-#define PQXX_H_STREAM_BASE
-
-#include "pqxx/compiler-public.hxx"
-#include "pqxx/compiler-internal-pre.hxx"
-#include "pqxx/transaction_base.hxx"
-#include "pqxx/util.hxx"
-
-#include <string>
-
-
-namespace pqxx
-{
-
-class PQXX_LIBEXPORT PQXX_NOVTABLE stream_base :
-  public internal::transactionfocus
-{
-public:
-  explicit stream_base(transaction_base &);
-  // TODO: Can we get rid of the vtable?
-  virtual ~stream_base() noexcept =default;
-  virtual void complete() = 0;
-  operator bool() const noexcept;
-  bool operator!() const noexcept;
-protected:
-  bool m_finished;
-  virtual void close();
-  template<typename C> static std::string columnlist(const C &);
-  template<typename I> static std::string columnlist(I begin, I end);
-private:
-  stream_base();
-  stream_base(const stream_base&);
-  stream_base & operator=(const stream_base &);
-};
-
-template<typename C> std::string stream_base::columnlist(const C &c)
-{
-  return columnlist(std::begin(c), std::end(c));
-}
-
-template<typename I> std::string stream_base::columnlist(I begin, I end)
-{
-  return separated_list(",", begin, end);
-}
-
-} // namespace pqxx
-
-
-#include "pqxx/compiler-internal-post.hxx"
-#endif
diff --git a/contrib/libs/libpqxx/include/pqxx/stream_from b/contrib/libs/libpqxx/include/pqxx/stream_from
deleted file mode 100644
index 71dbb7dfe7..0000000000
--- a/contrib/libs/libpqxx/include/pqxx/stream_from
+++ /dev/null
@@ -1,6 +0,0 @@
-/** pqxx::stream_from class.
- *
- * pqxx::stream_from enables optimized batch reads from a database table.
- */
-// Actual definitions in .hxx file so editors and such recognize file type.
-#include "pqxx/stream_from.hxx"
diff --git a/contrib/libs/libpqxx/include/pqxx/stream_from.hxx b/contrib/libs/libpqxx/include/pqxx/stream_from.hxx
deleted file mode 100644
index bc6bcc7231..0000000000
--- a/contrib/libs/libpqxx/include/pqxx/stream_from.hxx
+++ /dev/null
@@ -1,210 +0,0 @@
-/** Definition of the pqxx::stream_from class.
- *
- * pqxx::stream_from enables optimized batch reads from a database table.
- *
- * DO NOT INCLUDE THIS FILE DIRECTLY; include pqxx/stream_from instead.
- *
- * Copyright (c) 2000-2019, Jeroen T. Vermeulen.
- *
- * See COPYING for copyright license.  If you did not receive a file called
- * COPYING with this source code, please notify the distributor of this mistake,
- * or contact the author.
- */
-#ifndef PQXX_H_STREAM_FROM
-#define PQXX_H_STREAM_FROM
-
-#include "pqxx/compiler-public.hxx"
-#include "pqxx/compiler-internal-pre.hxx"
-#include "pqxx/transaction_base.hxx"
-#include "pqxx/stream_base.hxx"
-#include "pqxx/internal/type_utils.hxx"
-
-#include <string>
-
-
-namespace pqxx
-{
-
-/// Efficiently pull data directly out of a table.
-class PQXX_LIBEXPORT stream_from : public stream_base
-{
-public:
-  stream_from(
-    transaction_base &,
-    const std::string &table_name
-  );
-  template<typename Columns> stream_from(
-    transaction_base &,
-    const std::string &table_name,
-    const Columns& columns
-  );
-  template<typename Iter> stream_from(
-    transaction_base &,
-    const std::string &table_name,
-    Iter columns_begin,
-    Iter columns_end
-  );
-
-  ~stream_from() noexcept;
-
-  void complete() override;
-
-  bool get_raw_line(std::string &);
-  template<typename Tuple> stream_from & operator>>(Tuple &);
-
-private:
-  internal::encoding_group m_copy_encoding;
-  std::string m_current_line;
-  bool m_retry_line;
-
-  void set_up(transaction_base &, const std::string &table_name);
-  void set_up(
-    transaction_base &,
-    const std::string &table_name,
-    const std::string &columns
-  );
-
-  void close() override;
-
-  bool extract_field(
-    const std::string &,
-    std::string::size_type &,
-    std::string &
-  ) const;
-
-  template<typename Tuple, std::size_t I> auto tokenize_ith(
-    const std::string &,
-    Tuple &,
-    std::string::size_type,
-    std::string &
-  ) const -> typename std::enable_if<(
-    std::tuple_size<Tuple>::value > I
-  )>::type;
-  template<typename Tuple, std::size_t I> auto tokenize_ith(
-    const std::string &,
-    Tuple &,
-    std::string::size_type,
-    std::string &
-  ) const -> typename std::enable_if<(
-    std::tuple_size<Tuple>::value <= I
-  )>::type;
-
-  template<typename T> void extract_value(
-    const std::string &line,
-    T& t,
-    std::string::size_type &here,
-    std::string &workspace
-  ) const;
-};
-
-
-template<typename Columns> stream_from::stream_from(
-  transaction_base &tb,
-  const std::string &table_name,
-  const Columns& columns
-) : stream_from{
-  tb,
-  table_name,
-  std::begin(columns),
-  std::end(columns)
-} {}
-
-
-template<typename Iter> stream_from::stream_from(
-  transaction_base &tb,
-  const std::string &table_name,
-  Iter columns_begin,
-  Iter columns_end
-) :
-  namedclass{"stream_from", table_name},
-  stream_base{tb}
-{
-  set_up(
-    tb,
-    table_name,
-    columnlist(columns_begin, columns_end)
-  );
-}
-
-
-template<typename Tuple> stream_from & stream_from::operator>>(
-  Tuple &t
-)
-{
-  if (m_retry_line or get_raw_line(m_current_line))
-  {
-    std::string workspace;
-    try
-    {
-      tokenize_ith<Tuple, 0>(m_current_line, t, 0, workspace);
-      m_retry_line = false;
-    }
-    catch (...)
-    {
-      m_retry_line = true;
-      throw;
-    }
-  }
-  return *this;
-}
-
-
-template<typename Tuple, std::size_t I> auto stream_from::tokenize_ith(
-  const std::string &line,
-  Tuple &t,
-  std::string::size_type here,
-  std::string &workspace
-) const -> typename std::enable_if<(
-  std::tuple_size<Tuple>::value > I
-)>::type
-{
-  if (here >= line.size())
-    throw usage_error{"Too few fields to extract from stream_from line."};
-
-  extract_value(line, std::get<I>(t), here, workspace);
-  tokenize_ith<Tuple, I+1>(line, t, here, workspace);
-}
-
-
-template<typename Tuple, std::size_t I> auto stream_from::tokenize_ith(
-  const std::string &line,
-  Tuple & /* t */,
-  std::string::size_type here,
-  std::string & /* workspace */
-) const -> typename std::enable_if<(
-  std::tuple_size<Tuple>::value <= I
-)>::type
-{
-  // Zero-column line may still have a trailing newline
-  if (
-	here < line.size() and
-        not (here == line.size() - 1 and line[here] == '\n'))
-    throw usage_error{"Not all fields extracted from stream_from line"};
-}
-
-
-template<typename T> void stream_from::extract_value(
-  const std::string &line,
-  T& t,
-  std::string::size_type &here,
-  std::string &workspace
-) const
-{
-  if (extract_field(line, here, workspace))
-    from_string<T>(workspace, t);
-  else
-    t = internal::null_value<T>();
-}
-
-template<> void stream_from::extract_value<std::nullptr_t>(
-  const std::string &line,
-  std::nullptr_t&,
-  std::string::size_type &here,
-  std::string &workspace
-) const;
-
-} // namespace pqxx
-
-
-#include "pqxx/compiler-internal-post.hxx"
-#endif
diff --git a/contrib/libs/libpqxx/include/pqxx/stream_to b/contrib/libs/libpqxx/include/pqxx/stream_to
deleted file mode 100644
index a5100969d0..0000000000
--- a/contrib/libs/libpqxx/include/pqxx/stream_to
+++ /dev/null
@@ -1,6 +0,0 @@
-/** pqxx::stream_to class.
- *
- * pqxx::stream_to enables optimized batch updates to a database table.
- */
-// Actual definitions in .hxx file so editors and such recognize file type.
-#include "pqxx/stream_to.hxx"
diff --git a/contrib/libs/libpqxx/include/pqxx/stream_to.hxx b/contrib/libs/libpqxx/include/pqxx/stream_to.hxx
deleted file mode 100644
index cf23f980f5..0000000000
--- a/contrib/libs/libpqxx/include/pqxx/stream_to.hxx
+++ /dev/null
@@ -1,192 +0,0 @@
-/** Definition of the pqxx::stream_to class.
- *
- * pqxx::stream_to enables optimized batch updates to a database table.
- *
- * DO NOT INCLUDE THIS FILE DIRECTLY; include pqxx/stream_to.hxx instead.
- *
- * Copyright (c) 2000-2019, Jeroen T. Vermeulen.
- *
- * See COPYING for copyright license.  If you did not receive a file called
- * COPYING with this source code, please notify the distributor of this mistake,
- * or contact the author.
- */
-#ifndef PQXX_H_STREAM_TO
-#define PQXX_H_STREAM_TO
-
-#include "pqxx/compiler-public.hxx"
-#include "pqxx/compiler-internal-pre.hxx"
-#include "pqxx/transaction_base.hxx"
-#include "pqxx/stream_base.hxx"
-#include "pqxx/stream_from.hxx"
-#include "pqxx/internal/type_utils.hxx"
-
-#include <string>
-
-
-namespace pqxx
-{
-
-/// Efficiently write data directly to a database table.
-/** If you wish to insert rows of data into a table, you can compose INSERT
- * statements and execute them.  But it's slow and tedious, and you need to
- * worry about quoting and escaping the data.
- *
- * If you're just inserting a single row, it probably won't matter much.  You
- * can use prepared or parameterised statements to take care of the escaping
- * for you.  But if you're inserting large numbers of rows you will want
- * something better.
- *
- * Inserting rows one by one tends to take a lot of time, especially when you
- * are working with a remote database server over the network.  Every single
- * row involves sending the data over the network, and waiting for a reply.
- * Do it "in bulk" using @c stream_to, and you may find that it goes many times
- * faster, sometimes even by orders of magnitude.
- *
- * Here's how it works: you create a @c stream_to stream to start writing to
- * your table.  You will probably want to specify the columns.  Then, you
- * feed your data into the stream one row at a time.  And finally, you call the
- * stream's @c complete() to tell it to finalise the operation, wait for
- * completion, and check for errors.
- *
- * You insert data using the @c << ("shift-left") operator.  Each row must be
- * something that can be iterated in order to get its constituent fields: a
- * @c std::tuple, a @c std::vector, or anything else with a @c begin and
- * @c end.  It could be a class of your own.  Of course the fields have to
- * match the columns you specified when creating the stream.
- *
- * There is also a matching stream_from for reading data in bulk.
- */
-class PQXX_LIBEXPORT stream_to : public stream_base
-{
-public:
-  /// Create a stream, without specifying columns.
-  /** Fields will be inserted in whatever order the columns have in the
-   * database.
-   *
-   * You'll probably want to specify the columns, so that the mapping between
-   * your data fields and the table is explicit in your code, and not hidden
-   * in an "implicit contract" between your code and your schema.
-   */
-  stream_to(transaction_base &, const std::string &table_name);
-
-  /// Create a stream, specifying column names as a container of strings.
-  template<typename Columns> stream_to(
-    transaction_base &,
-    const std::string &table_name,
-    const Columns& columns
-  );
-
-  /// Create a stream, specifying column names as a sequence of strings.
-  template<typename Iter> stream_to(
-    transaction_base &,
-    const std::string &table_name,
-    Iter columns_begin,
-    Iter columns_end
-  );
-
-  ~stream_to() noexcept;
-
-  /// Complete the operation, and check for errors.
-  /** Always call this to close the stream in an orderly fashion, even after
-   * an error.  (In the case of an error, abort the transaction afterwards.)
-   *
-   * The only circumstance where it's safe to skip this is after an error, if
-   * you're discarding the entire connection right away.
-   */
-  void complete() override;
-
-  /// Insert a row of data.
-  /** The data can be any type that can be iterated.  Each iterated item
-   * becomes a field in the row, in the same order as the columns you
-   * specified when creating the stream.
-   *
-   * Each field will be converted into the database's format using
-   * @c pqxx::to_string.
-   */
-  template<typename Tuple> stream_to & operator<<(const Tuple &);
-
-  /// Stream a `stream_from` straight into a `stream_to`.
-  /** This can be useful when copying between different databases.  If the
-   * source and the destination are on the same database, you'll get better
-   * performance doing it all in a regular query.
-   */
-  stream_to &operator<<(stream_from &);
-
-private:
-  /// Write a row of data, as a line of text.
-  void write_raw_line(const std::string &);
-
-  void set_up(transaction_base &, const std::string &table_name);
-  void set_up(
-    transaction_base &,
-    const std::string &table_name,
-    const std::string &columns
-  );
-
-  void close() override;
-};
-
-
-template<typename Columns> inline stream_to::stream_to(
-  transaction_base &tb,
-  const std::string &table_name,
-  const Columns& columns
-) : stream_to{
-  tb,
-  table_name,
-  std::begin(columns),
-  std::end(columns)
-}
-{}
-
-
-template<typename Iter> inline stream_to::stream_to(
-  transaction_base &tb,
-  const std::string &table_name,
-  Iter columns_begin,
-  Iter columns_end
-) :
-  namedclass{"stream_from", table_name},
-  stream_base{tb}
-{
-  set_up(
-    tb,
-    table_name,
-    columnlist(columns_begin, columns_end)
-  );
-}
-
-
-namespace internal
-{
-
-class PQXX_LIBEXPORT TypedCopyEscaper
-{
-  static std::string escape(const std::string &);
-public:
-  template<typename T> std::string operator()(const T* t) const
-  {
-    return string_traits<T>::is_null(*t) ? "\\N" : escape(to_string(*t));
-  }
-};
-
-// Explicit specialization so we don't need a string_traits<> for nullptr_t
-template<> inline std::string TypedCopyEscaper::operator()<std::nullptr_t>(
-  const std::nullptr_t*
-) const
-{ return "\\N"; }
-
-} // namespace pqxx::internal
-
-
-template<typename Tuple> stream_to & stream_to::operator<<(const Tuple &t)
-{
-  write_raw_line(separated_list("\t", t, internal::TypedCopyEscaper()));
-  return *this;
-}
-
-} // namespace pqxx
-
-
-#include "pqxx/compiler-internal-post.hxx"
-#endif
diff --git a/contrib/libs/libpqxx/include/pqxx/subtransaction b/contrib/libs/libpqxx/include/pqxx/subtransaction
deleted file mode 100644
index 364ccab3fc..0000000000
--- a/contrib/libs/libpqxx/include/pqxx/subtransaction
+++ /dev/null
@@ -1,6 +0,0 @@
-/** pqxx::subtransaction class.
- *
- * pqxx::subtransaction is a nested transaction, i.e. one inside a transaction.
- */
-// Actual definitions in .hxx file so editors and such recognize file type.
-#include "pqxx/subtransaction.hxx"
diff --git a/contrib/libs/libpqxx/include/pqxx/subtransaction.hxx b/contrib/libs/libpqxx/include/pqxx/subtransaction.hxx
deleted file mode 100644
index 2b353e63db..0000000000
--- a/contrib/libs/libpqxx/include/pqxx/subtransaction.hxx
+++ /dev/null
@@ -1,105 +0,0 @@
-/** Definition of the pqxx::subtransaction class.
- *
- * pqxx::subtransaction is a nested transaction, i.e. one within a transaction.
- *
- * DO NOT INCLUDE THIS FILE DIRECTLY; include pqxx/subtransaction instead.
- *
- * Copyright (c) 2000-2019, Jeroen T. Vermeulen.
- *
- * See COPYING for copyright license.  If you did not receive a file called
- * COPYING with this source code, please notify the distributor of this mistake,
- * or contact the author.
- */
-#ifndef PQXX_H_SUBTRANSACTION
-#define PQXX_H_SUBTRANSACTION
-
-#include "pqxx/compiler-public.hxx"
-#include "pqxx/compiler-internal-pre.hxx"
-
-#include "pqxx/dbtransaction.hxx"
-
-
-/* Methods tested in eg. self-test program test1 are marked with "//[t01]"
- */
-
-
-namespace pqxx
-{
-
-/**
- * @ingroup transaction
- */
-/// "Transaction" nested within another transaction
-/** A subtransaction can be executed inside a backend transaction, or inside
- * another subtransaction.  This can be useful when, for example, statements in
- * a transaction may harmlessly fail and you don't want them to abort the entire
- * transaction.  Here's an example of how a temporary table may be dropped
- * before re-creating it, without failing if the table did not exist:
- *
- * @code
- * void do_job(connection_base &C)
- * {
- *   const string temptable = "fleetingtable";
- *
- *   // Since we're dealing with a temporary table here, disallow automatic
- *   // recovery of the connection in case it breaks.
- *   C.inhibit_reactivation(true);
- *
- *   work W(C, "do_job");
- *   do_firstpart(W);
- *
- *   // Attempt to delete our temporary table if it already existed
- *   try
- *   {
- *     subtransaction S(W, "droptemp");
- *     S.exec0("DROP TABLE " + temptable);
- *     S.commit();
- *   }
- *   catch (const undefined_table &)
- *   {
- *     // Table did not exist.  Which is what we were hoping to achieve anyway.
- *     // Carry on without regrets.
- *   }
- *
- *   // S may have gone into a failed state and been destroyed, but the
- *   // upper-level transaction W is still fine.  We can continue to use it.
- *   W.exec("CREATE TEMP TABLE " + temptable + "(bar integer, splat varchar)");
- *
- *   do_lastpart(W);
- * }
- * @endcode
- *
- * (This is just an example.  If you really wanted to do drop a table without an
- * error if it doesn't exist, you'd use DROP TABLE IF EXISTS.)
- *
- * There are no isolation levels inside a transaction.  They are not needed
- * because all actions within the same backend transaction are always performed
- * sequentially anyway.
- */
-class PQXX_LIBEXPORT subtransaction :
-  public internal::transactionfocus,
-  public dbtransaction
-{
-public:
-  /// Nest a subtransaction nested in another transaction.
-  explicit subtransaction(						//[t88]
-	dbtransaction &T, const std::string &Name=std::string{});
-
-  /// Nest a subtransaction in another subtransaction.
-  explicit subtransaction(
-	subtransaction &T, const std::string &Name=std::string{});
-
-  virtual ~subtransaction() noexcept
-	{ End(); }
-
-private:
-  virtual void do_begin() override;					//[t88]
-  virtual void do_commit() override;					//[t88]
-  virtual void do_abort() override;					//[t88]
-
-  dbtransaction &m_parent;
-};
-}
-
-#include "pqxx/compiler-internal-post.hxx"
-#endif
diff --git a/contrib/libs/libpqxx/include/pqxx/tablereader b/contrib/libs/libpqxx/include/pqxx/tablereader
deleted file mode 100644
index daa5ec93e8..0000000000
--- a/contrib/libs/libpqxx/include/pqxx/tablereader
+++ /dev/null
@@ -1,6 +0,0 @@
-/** pqxx::tablereader class.
- *
- * pqxx::tablereader enables optimized batch reads from a database table.
- */
-// Actual definitions in .hxx file so editors and such recognize file type.
-#include "pqxx/tablereader.hxx"
diff --git a/contrib/libs/libpqxx/include/pqxx/tablereader.hxx b/contrib/libs/libpqxx/include/pqxx/tablereader.hxx
deleted file mode 100644
index f5300cbeb0..0000000000
--- a/contrib/libs/libpqxx/include/pqxx/tablereader.hxx
+++ /dev/null
@@ -1,118 +0,0 @@
-/** Definition of the pqxx::tablereader class.
- *
- * pqxx::tablereader enables optimized batch reads from a database table.
- *
- * DO NOT INCLUDE THIS FILE DIRECTLY; include pqxx/tablereader instead.
- *
- * Copyright (c) 2000-2019, Jeroen T. Vermeulen.
- *
- * See COPYING for copyright license.  If you did not receive a file called
- * COPYING with this source code, please notify the distributor of this mistake,
- * or contact the author.
- */
-#ifndef PQXX_H_TABLEREADER
-#define PQXX_H_TABLEREADER
-
-#include "pqxx/compiler-public.hxx"
-#include "pqxx/compiler-internal-pre.hxx"
-#include "pqxx/result.hxx"
-#include "pqxx/tablestream.hxx"
-
-
-namespace pqxx
-{
-/// @deprecated Use stream_from instead.
-/** Efficiently pull data directly out of a table.
- * @warning This class does not work reliably with multibyte encodings.  Using
- * it with some multi-byte encodings may pose a security risk.
- */
-class PQXX_LIBEXPORT tablereader : public tablestream
-{
-public:
-  PQXX_DEPRECATED tablereader(
-	transaction_base &,
-	const std::string &Name,
-	const std::string &Null=std::string{});
-  template<typename ITER>
-  PQXX_DEPRECATED tablereader(
-	transaction_base &,
-	const std::string &Name,
-	ITER begincolumns,
-	ITER endcolumns);
-  template<typename ITER>
-  PQXX_DEPRECATED tablereader(
-	transaction_base &,
-	const std::string &Name,
-	ITER begincolumns,
-	ITER endcolumns,
-	const std::string &Null);
-  ~tablereader() noexcept;
-  template<typename TUPLE> tablereader &operator>>(TUPLE &);
-  operator bool() const noexcept { return not m_done; }
-  bool operator!() const noexcept { return m_done; }
-  bool get_raw_line(std::string &Line);
-  template<typename TUPLE>
-  void tokenize(std::string, TUPLE &) const;
-  virtual void complete() override;
-private:
-  void set_up(
-	transaction_base &T,
-	const std::string &RName,
-	const std::string &Columns=std::string{});
-  PQXX_PRIVATE void reader_close();
-  std::string extract_field(
-	const std::string &,
-	std::string::size_type &) const;
-  bool m_done;
-};
-
-
-template<typename ITER> inline
-tablereader::tablereader(
-	transaction_base &T,
-	const std::string &Name,
-	ITER begincolumns,
-	ITER endcolumns) :
-  namedclass{Name, "tablereader"},
-  tablestream{T, std::string{}},
-  m_done{true}
-{
-  set_up(T, Name, columnlist(begincolumns, endcolumns));
-}
-
-
-template<typename ITER> inline
-tablereader::tablereader(
-	transaction_base &T,
-	const std::string &Name,
-	ITER begincolumns,
-	ITER endcolumns,
-	const std::string &Null) :
-  namedclass{Name, "tablereader"},
-  tablestream{T, Null},
-  m_done{true}
-{
-  set_up(T, Name, columnlist(begincolumns, endcolumns));
-}
-
-
-template<typename TUPLE>
-inline void tablereader::tokenize(std::string Line, TUPLE &T) const
-{
-  std::back_insert_iterator<TUPLE> ins = std::back_inserter(T);
-  std::string::size_type here = 0;
-  while (here < Line.size()) *ins++ = extract_field(Line, here);
-}
-
-
-template<typename TUPLE>
-inline tablereader &pqxx::tablereader::operator>>(TUPLE &T)
-{
-  std::string Line;
-  if (get_raw_line(Line)) tokenize(Line, T);
-  return *this;
-}
-} // namespace pqxx
-
-#include "pqxx/compiler-internal-post.hxx"
-#endif
diff --git a/contrib/libs/libpqxx/include/pqxx/tablestream b/contrib/libs/libpqxx/include/pqxx/tablestream
deleted file mode 100644
index 57d700e800..0000000000
--- a/contrib/libs/libpqxx/include/pqxx/tablestream
+++ /dev/null
@@ -1,6 +0,0 @@
-/** pqxx::tablestream class.
- *
- * pqxx::tablestream provides optimized batch access to a database table.
- */
-// Actual definitions in .hxx file so editors and such recognize file type.
-#include "pqxx/tablestream.hxx"
diff --git a/contrib/libs/libpqxx/include/pqxx/tablestream.hxx b/contrib/libs/libpqxx/include/pqxx/tablestream.hxx
deleted file mode 100644
index 1803604bec..0000000000
--- a/contrib/libs/libpqxx/include/pqxx/tablestream.hxx
+++ /dev/null
@@ -1,59 +0,0 @@
-/** Definition of the pqxx::tablestream class.
- *
- * pqxx::tablestream provides optimized batch access to a database table.
- *
- * DO NOT INCLUDE THIS FILE DIRECTLY; include pqxx/tablestream instead.
- *
- * Copyright (c) 2000-2019, Jeroen T. Vermeulen.
- *
- * See COPYING for copyright license.  If you did not receive a file called
- * COPYING with this source code, please notify the distributor of this mistake,
- * or contact the author.
- */
-#ifndef PQXX_H_TABLESTREAM
-#define PQXX_H_TABLESTREAM
-
-#include "pqxx/compiler-public.hxx"
-#include "pqxx/compiler-internal-pre.hxx"
-#include "pqxx/transaction_base.hxx"
-
-
-namespace pqxx
-{
-/// Base class for obsolete tablereader/tablewriter classes.
-/** @deprecated Use stream_from and stream_to instead.
- */
-class PQXX_LIBEXPORT PQXX_NOVTABLE tablestream :
-  public internal::transactionfocus
-{
-public:
-  explicit tablestream(
-	transaction_base &Trans,
-	const std::string &Null=std::string{});
-  virtual ~tablestream() noexcept =0;
-  virtual void complete() =0;
-protected:
-  const std::string &NullStr() const { return m_null; }
-  bool is_finished() const noexcept { return m_finished; }
-  void base_close();
-  template<typename ITER>
-  static std::string columnlist(ITER colbegin, ITER colend);
-private:
-  std::string m_null;
-  bool m_finished = false;
-
-  tablestream() =delete;
-  tablestream(const tablestream &) =delete;
-  tablestream &operator=(const tablestream &) =delete;
-};
-
-
-template<typename ITER> inline
-std::string tablestream::columnlist(ITER colbegin, ITER colend)
-{
-  return separated_list(",", colbegin, colend);
-}
-} // namespace pqxx
-
-#include "pqxx/compiler-internal-post.hxx"
-#endif
diff --git a/contrib/libs/libpqxx/include/pqxx/tablewriter b/contrib/libs/libpqxx/include/pqxx/tablewriter
deleted file mode 100644
index 80bdf59b2b..0000000000
--- a/contrib/libs/libpqxx/include/pqxx/tablewriter
+++ /dev/null
@@ -1,6 +0,0 @@
-/** pqxx::tablewriter class.
- *
- * pqxx::tablewriter enables optimized batch updates to a database table.
- */
-// Actual definitions in .hxx file so editors and such recognize file type.
-#include "pqxx/tablewriter.hxx"
diff --git a/contrib/libs/libpqxx/include/pqxx/tablewriter.hxx b/contrib/libs/libpqxx/include/pqxx/tablewriter.hxx
deleted file mode 100644
index 32e7a98b7c..0000000000
--- a/contrib/libs/libpqxx/include/pqxx/tablewriter.hxx
+++ /dev/null
@@ -1,209 +0,0 @@
-/** Definition of the pqxx::tablewriter class.
- *
- * pqxx::tablewriter enables optimized batch updates to a database table.
- *
- * DO NOT INCLUDE THIS FILE DIRECTLY; include pqxx/tablewriter.hxx instead.
- *
- * Copyright (c) 2000-2019, Jeroen T. Vermeulen.
- *
- * See COPYING for copyright license.  If you did not receive a file called
- * COPYING with this source code, please notify the distributor of this mistake,
- * or contact the author.
- */
-#ifndef PQXX_H_TABLEWRITER
-#define PQXX_H_TABLEWRITER
-
-#include <iterator>
-
-#include "pqxx/compiler-public.hxx"
-#include "pqxx/compiler-internal-pre.hxx"
-
-#include "pqxx/tablestream.hxx"
-
-
-namespace pqxx
-{
-/// @deprecated Use stream_to instead.
-/** Efficiently write data directly to a database table.
- * @warning This class does not work reliably with multibyte encodings.  Using
- * it with some multi-byte encodings may pose a security risk.
- */
-class PQXX_LIBEXPORT tablewriter : public tablestream
-{
-public:
-  PQXX_DEPRECATED tablewriter(
-	transaction_base &,
-	const std::string &WName,
-	const std::string &Null=std::string{});
-  template<typename ITER>
-        PQXX_DEPRECATED tablewriter(
-	transaction_base &,
-	const std::string &WName,
-	ITER begincolumns,
-	ITER endcolumns);
-  template<typename ITER>
-        PQXX_DEPRECATED tablewriter(
-	transaction_base &T,
-	const std::string &WName,
-	ITER begincolumns,
-	ITER endcolumns,
-	const std::string &Null);
-  ~tablewriter() noexcept;
-  template<typename IT> void insert(IT Begin, IT End);
-  template<typename TUPLE> void insert(const TUPLE &);
-  template<typename IT> void push_back(IT Begin, IT End);
-  template<typename TUPLE> void push_back(const TUPLE &);
-  template<typename SIZE> void reserve(SIZE) {}
-  template<typename TUPLE> tablewriter &operator<<(const TUPLE &);
-  tablewriter &operator<<(tablereader &);
-  template<typename IT> std::string generate(IT Begin, IT End) const;
-  template<typename TUPLE> std::string generate(const TUPLE &) const;
-  virtual void complete() override;
-  void write_raw_line(const std::string &);
-private:
-  void set_up(
-	transaction_base &,
-	const std::string &WName,
-	const std::string &Columns = std::string{});
-  PQXX_PRIVATE void writer_close();
-};
-} // namespace pqxx
-
-
-namespace std
-{
-template<>
-  class back_insert_iterator<pqxx::tablewriter>
-{
-public:
-  using iterator_category = output_iterator_tag;
-
-  explicit back_insert_iterator(pqxx::tablewriter &W) noexcept :
-    m_writer{&W} {}
-
-  back_insert_iterator &
-    operator=(const back_insert_iterator &rhs) noexcept
-  {
-    m_writer = rhs.m_writer;
-    return *this;
-  }
-
-  template<typename TUPLE>
-  back_insert_iterator &operator=(const TUPLE &T)
-  {
-    m_writer->insert(T);
-    return *this;
-  }
-
-  back_insert_iterator &operator++() { return *this; }
-  back_insert_iterator &operator++(int) { return *this; }
-  back_insert_iterator &operator*() { return *this; }
-
-private:
-  pqxx::tablewriter *m_writer;
-};
-} // namespace std
-
-
-namespace pqxx
-{
-template<typename ITER> inline tablewriter::tablewriter(
-	transaction_base &T,
-	const std::string &WName,
-	ITER begincolumns,
-	ITER endcolumns) :
-  namedclass{"tablewriter", WName},
-  tablestream{T, std::string{}}
-{
-  set_up(T, WName, columnlist(begincolumns, endcolumns));
-}
-
-
-template<typename ITER> inline tablewriter::tablewriter(
-	transaction_base &T,
-	const std::string &WName,
-	ITER begincolumns,
-	ITER endcolumns,
-	const std::string &Null) :
-  namedclass{"tablewriter", WName},
-  tablestream{T, Null}
-{
-  set_up(T, WName, columnlist(begincolumns, endcolumns));
-}
-
-
-namespace internal
-{
-PQXX_LIBEXPORT std::string escape(
-	const std::string &s,
-	const std::string &null);
-
-inline std::string escape_any(
-	const std::string &s,
-	const std::string &null)
-{ return escape(s, null); }
-
-inline std::string escape_any(
-	const char s[],
-	const std::string &null)
-{ return s ? escape(std::string{s}, null) : "\\N"; }
-
-template<typename T> inline std::string escape_any(
-	const T &t,
-	const std::string &null)
-{ return escape(to_string(t), null); }
-
-
-template<typename IT> class Escaper
-{
-  const std::string &m_null;
-public:
-  explicit Escaper(const std::string &null) : m_null{null} {}
-  std::string operator()(IT i) const { return escape_any(*i, m_null); }
-};
-}
-
-
-template<typename IT>
-inline std::string tablewriter::generate(IT Begin, IT End) const
-{
-  return separated_list("\t", Begin, End, internal::Escaper<IT>{NullStr()});
-}
-template<typename TUPLE>
-inline std::string tablewriter::generate(const TUPLE &T) const
-{
-  return generate(std::begin(T), std::end(T));
-}
-
-template<typename IT> inline void tablewriter::insert(IT Begin, IT End)
-{
-  write_raw_line(generate(Begin, End));
-}
-
-template<typename TUPLE> inline void tablewriter::insert(const TUPLE &T)
-{
-  insert(std::begin(T), std::end(T));
-}
-
-template<typename IT>
-inline void tablewriter::push_back(IT Begin, IT End)
-{
-  insert(Begin, End);
-}
-
-template<typename TUPLE>
-inline void tablewriter::push_back(const TUPLE &T)
-{
-  insert(std::begin(T), std::end(T));
-}
-
-template<typename TUPLE>
-inline tablewriter &tablewriter::operator<<(const TUPLE &T)
-{
-  insert(T);
-  return *this;
-}
-
-} // namespace pqxx
-#include "pqxx/compiler-internal-post.hxx"
-#endif
diff --git a/contrib/libs/libpqxx/include/pqxx/transaction b/contrib/libs/libpqxx/include/pqxx/transaction
deleted file mode 100644
index 755cd4179b..0000000000
--- a/contrib/libs/libpqxx/include/pqxx/transaction
+++ /dev/null
@@ -1,6 +0,0 @@
-/** pqxx::transaction class.
- *
- * pqxx::transaction represents a standard database transaction.
- */
-// Actual definitions in .hxx file so editors and such recognize file type.
-#include "pqxx/transaction.hxx"
diff --git a/contrib/libs/libpqxx/include/pqxx/transaction.hxx b/contrib/libs/libpqxx/include/pqxx/transaction.hxx
deleted file mode 100644
index 6c0b1da0b2..0000000000
--- a/contrib/libs/libpqxx/include/pqxx/transaction.hxx
+++ /dev/null
@@ -1,116 +0,0 @@
-/** Definition of the pqxx::transaction class.
- * pqxx::transaction represents a standard database transaction.
- *
- * DO NOT INCLUDE THIS FILE DIRECTLY; include pqxx/transaction instead.
- *
- * Copyright (c) 2000-2019, Jeroen T. Vermeulen.
- *
- * See COPYING for copyright license.  If you did not receive a file called
- * COPYING with this source code, please notify the distributor of this mistake,
- * or contact the author.
- */
-#ifndef PQXX_H_TRANSACTION
-#define PQXX_H_TRANSACTION
-
-#include "pqxx/compiler-public.hxx"
-#include "pqxx/compiler-internal-pre.hxx"
-
-#include "pqxx/dbtransaction.hxx"
-
-
-/* Methods tested in eg. self-test program test1 are marked with "//[t01]"
- */
-
-
-namespace pqxx
-{
-
-namespace internal
-{
-/// Helper base class for the @c transaction class template.
-class PQXX_LIBEXPORT basic_transaction : public dbtransaction
-{
-protected:
-  basic_transaction(							//[t01]
-	connection_base &C,
-	const std::string &IsolationLevel,
-	readwrite_policy);
-
-private:
-  virtual void do_commit() override;					//[t01]
-};
-} // namespace internal
-
-
-/**
- * @ingroup transaction
- */
-//@{
-
-/// Standard back-end transaction, templatized on isolation level
-/** This is the type you'll normally want to use to represent a transaction on
- * the database.
- *
- * While you may choose to create your own transaction object to interface to
- * the database backend, it is recommended that you wrap your transaction code
- * into a transactor code instead and let the transaction be created for you.
- * @see pqxx/transactor.hxx
- *
- * If you should find that using a transactor makes your code less portable or
- * too complex, go ahead, create your own transaction anyway.
- *
- * Usage example: double all wages
- *
- * @code
- * extern connection C;
- * work T(C);
- * try
- * {
- *   T.exec("UPDATE employees SET wage=wage*2");
- *   T.commit();	// NOTE: do this inside try block
- * }
- * catch (const exception &e)
- * {
- *   cerr << e.what() << endl;
- *   T.abort();		// Usually not needed; same happens when T's life ends.
- * }
- * @endcode
- */
-template<
-	isolation_level ISOLATIONLEVEL=read_committed,
-	readwrite_policy READWRITE=read_write>
-class transaction : public internal::basic_transaction
-{
-public:
-  using isolation_tag = isolation_traits<ISOLATIONLEVEL>;
-
-  /// Create a transaction.
-  /**
-   * @param C Connection for this transaction to operate on
-   * @param TName Optional name for transaction; must begin with a letter and
-   * may contain letters and digits only
-   */
-  explicit transaction(connection_base &C, const std::string &TName):	//[t01]
-    namedclass{fullname("transaction", isolation_tag::name()), TName},
-    internal::basic_transaction(C, isolation_tag::name(), READWRITE)
-	{ Begin(); }
-
-  explicit transaction(connection_base &C) :				//[t01]
-    transaction(C, "") {}
-
-  virtual ~transaction() noexcept
-	{ End(); }
-};
-
-
-/// The default transaction type.
-using work = transaction<>;
-
-/// Read-only transaction.
-using read_transaction = transaction<read_committed, read_only>;
-
-//@}
-}
-
-#include "pqxx/compiler-internal-post.hxx"
-#endif
diff --git a/contrib/libs/libpqxx/include/pqxx/transaction_base b/contrib/libs/libpqxx/include/pqxx/transaction_base
deleted file mode 100644
index 929c50d226..0000000000
--- a/contrib/libs/libpqxx/include/pqxx/transaction_base
+++ /dev/null
@@ -1,7 +0,0 @@
-/** Base for the transaction classes.
- *
- * pqxx::transaction_base defines the interface for any abstract class that
- * represents a database transaction.
- */
-// Actual definitions in .hxx file so editors and such recognize file type.
-#include "pqxx/transaction_base.hxx"
diff --git a/contrib/libs/libpqxx/include/pqxx/transaction_base.hxx b/contrib/libs/libpqxx/include/pqxx/transaction_base.hxx
deleted file mode 100644
index 06c2788d5a..0000000000
--- a/contrib/libs/libpqxx/include/pqxx/transaction_base.hxx
+++ /dev/null
@@ -1,664 +0,0 @@
-/** Common code and definitions for the transaction classes.
- *
- * pqxx::transaction_base defines the interface for any abstract class that
- * represents a database transaction.
- *
- * DO NOT INCLUDE THIS FILE DIRECTLY; include pqxx/transaction_base instead.
- *
- * Copyright (c) 2000-2019, Jeroen T. Vermeulen.
- *
- * See COPYING for copyright license.  If you did not receive a file called
- * COPYING with this source code, please notify the distributor of this mistake,
- * or contact the author.
- */
-#ifndef PQXX_H_TRANSACTION_BASE
-#define PQXX_H_TRANSACTION_BASE
-
-#include "pqxx/compiler-public.hxx"
-#include "pqxx/compiler-internal-pre.hxx"
-
-/* End-user programs need not include this file, unless they define their own
- * transaction classes.  This is not something the typical program should want
- * to do.
- *
- * However, reading this file is worthwhile because it defines the public
- * interface for the available transaction classes such as transaction and
- * nontransaction.
- */
-
-#include "pqxx/connection_base.hxx"
-#include "pqxx/internal/encoding_group.hxx"
-#include "pqxx/isolation.hxx"
-#include "pqxx/result.hxx"
-#include "pqxx/row.hxx"
-
-// Methods tested in eg. test module test01 are marked with "//[t01]".
-
-namespace pqxx
-{
-namespace internal
-{
-class sql_cursor;
-
-class PQXX_LIBEXPORT transactionfocus : public virtual namedclass
-{
-public:
-  explicit transactionfocus(transaction_base &t) :
-    namedclass{"transactionfocus"},
-    m_trans{t},
-    m_registered{false}
-  {
-  }
-
-  transactionfocus() =delete;
-  transactionfocus(const transactionfocus &) =delete;
-  transactionfocus &operator=(const transactionfocus &) =delete;
-
-protected:
-  void register_me();
-  void unregister_me() noexcept;
-  void reg_pending_error(const std::string &) noexcept;
-  bool registered() const noexcept { return m_registered; }
-
-  transaction_base &m_trans;
-
-private:
-  bool m_registered;
-};
-
-
-/// Helper class to construct an invocation of a parameterised statement.
-/** @deprecated Use @c exec_params and friends instead.
- */
-class PQXX_LIBEXPORT parameterized_invocation : statement_parameters
-{
-public:
-  PQXX_DEPRECATED parameterized_invocation(
-	connection_base &, const std::string &query);
-
-  parameterized_invocation &operator()() { add_param(); return *this; }
-  parameterized_invocation &operator()(const binarystring &v)
-	{ add_binary_param(v, true); return *this; }
-  template<typename T> parameterized_invocation &operator()(const T &v)
-	{ add_param(v, true); return *this; }
-  parameterized_invocation &operator()(const binarystring &v, bool nonnull)
-	{ add_binary_param(v, nonnull); return *this; }
-  template<typename T>
-	parameterized_invocation &operator()(const T &v, bool nonnull)
-	{ add_param(v, nonnull); return *this; }
-
-  result exec();
-
-private:
-  /// Not allowed
-  parameterized_invocation &operator=(const parameterized_invocation &)
-	=delete;
-
-  connection_base &m_home;
-  const std::string m_query;
-};
-} // namespace internal
-
-
-namespace internal
-{
-namespace gate
-{
-class transaction_subtransaction;
-class transaction_tablereader;
-class transaction_sql_cursor;
-class transaction_stream_from;
-class transaction_tablewriter;
-class transaction_stream_to;
-class transaction_transactionfocus;
-} // namespace internal::gate
-} // namespace internal
-
-
-/**
- * @defgroup transaction Transaction classes
- *
- * All database access goes through instances of these classes.
- * However, not all implementations of this interface need to provide
- * full transactional integrity.
- *
- * Several implementations of this interface are shipped with libpqxx, including
- * the plain transaction class, the entirely unprotected nontransaction, and the
- * more cautious robusttransaction.
- */
-
-/// Interface definition (and common code) for "transaction" classes.
-/**
- * @ingroup transaction
- *
- * Abstract base class for all transaction types.
- */
-class PQXX_LIBEXPORT PQXX_NOVTABLE transaction_base :
-  public virtual internal::namedclass
-{
-public:
-  /// If nothing else is known, our isolation level is at least read_committed
-  using isolation_tag = isolation_traits<read_committed>;
-
-  transaction_base() =delete;
-  transaction_base(const transaction_base &) =delete;
-  transaction_base &operator=(const transaction_base &) =delete;
-
-  virtual ~transaction_base() =0;					//[t01]
-
-  /// Commit the transaction
-  /** Unless this function is called explicitly, the transaction will not be
-   * committed (actually the nontransaction implementation breaks this rule,
-   * hence the name).
-   *
-   * Once this function returns, the whole transaction will typically be
-   * irrevocably completed in the database.  There is also, however, a minute
-   * risk that the connection to the database may be lost at just the wrong
-   * moment.  In that case, libpqxx may be unable to determine whether the
-   * transaction was completed or aborted and an in_doubt_error will be thrown
-   * to make this fact known to the caller.  The robusttransaction
-   * implementation takes some special precautions to reduce this risk.
-   */
-  void commit();							//[t01]
-
-  /// Abort the transaction
-  /** No special effort is required to call this function; it will be called
-   * implicitly when the transaction is destructed.
-   */
-  void abort();								//[t10]
-
-  /**
-   * @ingroup escaping-functions
-   */
-  //@{
-  /// Escape string for use as SQL string literal in this transaction
-  std::string esc(const char str[]) const            { return conn().esc(str); }
-  /// Escape string for use as SQL string literal in this transaction
-  std::string esc(const char str[], size_t maxlen) const
-                                             { return conn().esc(str, maxlen); }
-  /// Escape string for use as SQL string literal in this transaction
-  std::string esc(const std::string &str) const      { return conn().esc(str); }
-
-  /// Escape binary data for use as SQL string literal in this transaction
-  /** Raw, binary data is treated differently from regular strings.  Binary
-   * strings are never interpreted as text, so they may safely include byte
-   * values or byte sequences that don't happen to represent valid characters in
-   * the character encoding being used.
-   *
-   * The binary string does not stop at the first zero byte, as is the case with
-   * textual strings.  Instead, they may contain zero bytes anywhere.  If it
-   * happens to contain bytes that look like quote characters, or other things
-   * that can disrupt their use in SQL queries, they will be replaced with
-   * special escape sequences.
-   */
-  std::string esc_raw(const unsigned char data[], size_t len) const	//[t62]
-                                           { return conn().esc_raw(data, len); }
-  /// Escape binary data for use as SQL string literal in this transaction
-  std::string esc_raw(const std::string &) const;			//[t62]
-
-  /// Unescape binary data, e.g. from a table field or notification payload.
-  /** Takes a binary string as escaped by PostgreSQL, and returns a restored
-   * copy of the original binary data.
-   */
-  std::string unesc_raw(const std::string &text) const
-					      { return conn().unesc_raw(text); }
-
-  /// Unescape binary data, e.g. from a table field or notification payload.
-  /** Takes a binary string as escaped by PostgreSQL, and returns a restored
-   * copy of the original binary data.
-   */
-  std::string unesc_raw(const char *text) const
-					      { return conn().unesc_raw(text); }
-
-  /// Represent object as SQL string, including quoting & escaping.
-  /** Nulls are recognized and represented as SQL nulls. */
-  template<typename T> std::string quote(const T &t) const
-                                                     { return conn().quote(t); }
-
-  /// Binary-escape and quote a binarystring for use as an SQL constant.
-  std::string quote_raw(const unsigned char str[], size_t len) const
-					  { return conn().quote_raw(str, len); }
-
-  std::string quote_raw(const std::string &str) const;
-
-  /// Escape an SQL identifier for use in a query.
-  std::string quote_name(const std::string &identifier) const
-				       { return conn().quote_name(identifier); }
-
-  /// Escape string for literal LIKE match.
-  std::string esc_like(const std::string &str, char escape_char='\\') const
-				   { return conn().esc_like(str, escape_char); }
-  //@}
-
-  /// Execute query
-  /** Perform a query in this transaction.
-   *
-   * This is one of the most important functions in libpqxx.
-   *
-   * Most libpqxx exceptions can be thrown from here, including sql_error,
-   * broken_connection, and many sql_error subtypes such as
-   * feature_not_supported or insufficient_privilege.  But any exception thrown
-   * by the C++ standard library may also occur here.  All exceptions will be
-   * derived from std::exception, however, and all libpqxx-specific exception
-   * types are derived from pqxx::pqxx_exception.
-   *
-   * @param Query Query or command to execute
-   * @param Desc Optional identifier for query, to help pinpoint SQL errors
-   * @return A result set describing the query's or command's result
-   */
-  result exec(
-	const std::string &Query,
-	const std::string &Desc=std::string{});				//[t01]
-
-  result exec(
-	const std::stringstream &Query,
-	const std::string &Desc=std::string{})
-	{ return exec(Query.str(), Desc); }
-
-  /// Execute query, which should zero rows of data.
-  /** Works like exec, but fails if the result contains data.  It still returns
-   * a result, however, which may contain useful metadata.
-   *
-   * @throw unexpected_rows If the query returned the wrong number of rows.
-   */
-  result exec0(
-	const std::string &Query,
-	const std::string &Desc=std::string{})
-	{ return exec_n(0, Query, Desc); }
-
-  /// Execute query returning a single row of data.
-  /** Works like exec, but requires the result to contain exactly one row.
-   * The row can be addressed directly, without the need to find the first row
-   * in a result set.
-   *
-   * @throw unexpected_rows If the query returned the wrong number of rows.
-   */
-  row exec1(const std::string &Query, const std::string &Desc=std::string{})
-	{ return exec_n(1, Query, Desc).front(); }
-
-  /// Execute query, expect given number of rows.
-  /** Works like exec, but checks that the number of rows is exactly what's
-   * expected.
-   *
-   * @throw unexpected_rows If the query returned the wrong number of rows.
-   */
-  result exec_n(
-        size_t rows,
-	const std::string &Query,
-	const std::string &Desc=std::string{});
-
-  /**
-   * @name Parameterized statements
-   *
-   * You'll often need parameters in the queries you execute: "select the
-   * car with this licence plate."  If the parameter is a string, you need to
-   * quote it and escape any special characters inside it, or it may become a
-   * target for an SQL injection attack.  If it's an integer (for example),
-   * you need to convert it to a string, but in the database's format, without
-   * locale-specific niceties like "," separators between the thousands.
-   *
-   * Parameterised statements are an easier and safer way to do this.  They're
-   * like prepared statements, but for a single use.  You don't need to name
-   * them, and you don't need to prepare them first.
-   *
-   * Your query will include placeholders like @c $1 and $2 etc. in the places
-   * where you want the arguments to go.  Then, you pass the argument values
-   * and the actual query is constructed for you.
-   *
-   * Pass the exact right number of parameters, and in the right order.  The
-   * parameters in the query don't have to be neatly ordered from @c $1 to
-   * @c $2 to @c $3 - but you must pass the argument for @c $1 first, the one
-   * for @c $2 second, etc.
-   *
-   * @warning Beware of "nul" bytes.  Any string you pass as a parameter will
-   * end at the first char with value zero.  If you pass a @c std::string that
-   * contains a zero byte, the last byte in the value will be the one just
-   * before the zero.
-   */
-  //@{
-  /// Execute an SQL statement with parameters.
-  template<typename ...Args>
-  result exec_params(const std::string &query, Args &&...args)
-  {
-    return internal_exec_params(
-      query, internal::params(std::forward<Args>(args)...));
-  }
-
-  // Execute parameterised statement, expect a single-row result.
-  /** @throw unexpected_rows if the result does not consist of exactly one row.
-   */
-  template<typename ...Args>
-  row exec_params1(const std::string &query, Args&&... args)
-  {
-    return exec_params_n(1, query, std::forward<Args>(args)...).front();
-  }
-
-  // Execute parameterised statement, expect a result with zero rows.
-  /** @throw unexpected_rows if the result contains rows.
-   */
-  template<typename ...Args>
-  result exec_params0(const std::string &query, Args &&...args)
-  {
-    return exec_params_n(0, query, std::forward<Args>(args)...);
-  }
-
-  // Execute parameterised statement, expect exactly a given number of rows.
-  /** @throw unexpected_rows if the result contains the wrong number of rows.
-   */
-  template<typename ...Args>
-  result exec_params_n(size_t rows, const std::string &query, Args &&...args)
-  {
-    const auto r = exec_params(query, std::forward<Args>(args)...);
-    check_rowcount_params(rows, r.size());
-    return r;
-  }
-
-  /// Parameterize a statement.  @deprecated Use @c exec_params instead.
-  /* Use this to build up a parameterized statement invocation, then invoke it
-   * using @c exec()
-   *
-   * Example: @c trans.parameterized("SELECT $1 + 1")(1).exec();
-   *
-   * This is the old, pre-C++11 way of handling parameterised statements.  As
-   * of libpqxx 6.0, it's made much easier using variadic templates.
-   */
-  PQXX_DEPRECATED internal::parameterized_invocation
-  parameterized(const std::string &query);
-  //@}
-
-  /**
-   * @name Prepared statements
-   *
-   * These are very similar to parameterised statements.  The difference is
-   * that you prepare them in advance, giving them identifying names.  You can
-   * then call them by these names, passing in the argument values appropriate
-   * for that call.
-   *
-   * You prepare a statement on the connection, using
-   * @c pqxx::connection_base::prepare().  But you then call the statement in a
-   * transaction, using the functions you see here.
-   *
-   * Never try to prepare, execute, or unprepare a prepared statement manually
-   * using direct SQL queries.  Always use the functions provided by libpqxx.
-   *
-   * See \ref prepared for a full discussion.
-   *
-   * @warning Beware of "nul" bytes.  Any string you pass as a parameter will
-   * end at the first char with value zero.  If you pass a @c std::string that
-   * contains a zero byte, the last byte in the value will be the one just
-   * before the zero.  If you need a zero byte, consider using
-   * pqxx::binarystring and/or SQL's @c bytea type.
-   */
-  //@{
-
-  /// Execute a prepared statement, with optional arguments.
-  template<typename ...Args>
-  result exec_prepared(const std::string &statement, Args&&... args)
-  {
-    return internal_exec_prepared(
-      statement, internal::params(std::forward<Args>(args)...), result_format::text);
-  }
-
-  /// Execute a prepared statement, with optional arguments.
-  template<typename ...Args>
-  result exec_prepared_binary(const std::string &statement, Args&&... args)
-  {
-    return internal_exec_prepared(
-      statement, internal::params(std::forward<Args>(args)...), result_format::binary);
-  }
-
-  /// Execute a prepared statement, and expect a single-row result.
-  /** @throw pqxx::unexpected_rows if the result was not exactly 1 row.
-   */
-  template<typename ...Args>
-  row exec_prepared1(const std::string &statement, Args&&... args)
-  {
-    return exec_prepared_n(1, statement, std::forward<Args>(args)...).front();
-  }
-
-  /// Execute a prepared statement, and expect a result with zero rows.
-  /** @throw pqxx::unexpected_rows if the result contained rows.
-   */
-  template<typename ...Args>
-  result exec_prepared0(const std::string &statement, Args&&... args)
-  {
-    return exec_prepared_n(0, statement, std::forward<Args>(args)...);
-  }
-
-  /// Execute a prepared statement, expect a result with given number of rows.
-  /** @throw pqxx::unexpected_rows if the result did not contain exactly the
-   *  given number of rows.
-   */
-  template<typename ...Args>
-  result exec_prepared_n(
-	size_t rows,
-	const std::string &statement,
-	Args&&... args)
-  {
-    const auto r = exec_prepared(statement, std::forward<Args>(args)...);
-    check_rowcount_prepared(statement, rows, r.size());
-    return r;
-  }
-
-  /// Execute prepared statement.  @deprecated Use exec_prepared instead.
-  /** Just like param_declaration is a helper class that lets you tag parameter
-   * declarations onto the statement declaration, the invocation class returned
-   * here lets you tag parameter values onto the call:
-   *
-   * @code
-   * result run_mystatement(transaction_base &T)
-   * {
-   *   return T.exec_prepared("mystatement", "param1", 2, nullptr, 4);
-   * }
-   * @endcode
-   *
-   * Here, parameter 1 (written as "<tt>$1</tt>" in the statement's body) is a
-   * string that receives the value "param1"; the second parameter is an integer
-   * with the value 2; the third receives a null, making its type irrelevant;
-   * and number 4 again is an integer.  The ultimate invocation of exec() is
-   * essential; if you forget this, nothing happens.
-   *
-   * To see whether any prepared statement has been defined under a given name,
-   * use:
-   *
-   * @code
-   * T.prepared("mystatement").exists()
-   * @endcode
-   *
-   * @warning Do not try to execute a prepared statement manually through direct
-   * SQL statements.  This is likely not to work, and even if it does, is likely
-   * to be slower than using the proper libpqxx functions.  Also, libpqxx knows
-   * how to emulate prepared statements if some part of the infrastructure does
-   * not support them.
-   *
-   * @warning Actual definition of the prepared statement on the backend may be
-   * deferred until its first use, which means that any errors in the prepared
-   * statement may not show up until it is executed--and perhaps abort the
-   * ongoing transaction in the process.
-   *
-   * If you leave out the statement name, the call refers to the nameless
-   * statement instead.
-   */
-  PQXX_DEPRECATED prepare::invocation
-  prepared(const std::string &statement=std::string{});
-
-  //@}
-
-  /**
-   * @name Error/warning output
-   */
-  //@{
-  /// Have connection process warning message
-  void process_notice(const char Msg[]) const				//[t14]
-	{ m_conn.process_notice(Msg); }
-  /// Have connection process warning message
-  void process_notice(const std::string &Msg) const			//[t14]
-	{ m_conn.process_notice(Msg); }
-  //@}
-
-  /// Connection this transaction is running in
-  connection_base &conn() const { return m_conn; }			//[t04]
-
-  /// Set session variable in this connection
-  /** The new value is typically forgotten if the transaction aborts.
-   * However nontransaction is an exception to this rule: in that case the set
-   * value will be kept regardless.  Also, if the connection ever needs to be
-   * recovered, a value you set in a nontransaction will not be restored.
-   * @param Var The variable to set
-   * @param Val The new value to store in the variable
-   */
-  void set_variable(const std::string &Var, const std::string &Val);	//[t61]
-
-  /// Get currently applicable value of variable
-  /** First consults an internal cache of variables that have been set (whether
-   * in the ongoing transaction or in the connection) using the set_variable
-   * functions.  If it is not found there, the database is queried.
-   *
-   * @warning Do not mix the set_variable with raw "SET" queries, and do not
-   * try to set or get variables while a pipeline or table stream is active.
-   *
-   * @warning This function used to be declared as @c const but isn't anymore.
-   */
-  std::string get_variable(const std::string &);			//[t61]
-
-protected:
-  /// Create a transaction (to be called by implementation classes only)
-  /** The optional name, if nonempty, must begin with a letter and may contain
-   * letters and digits only.
-   *
-   * @param c The connection that this transaction is to act on.
-   * @param direct Running directly in connection context (i.e. not nested)?
-   */
-  explicit transaction_base(connection_base &c, bool direct=true);
-
-  /// Begin transaction (to be called by implementing class)
-  /** Will typically be called from implementing class' constructor.
-   */
-  void Begin();
-
-  /// End transaction.  To be called by implementing class' destructor
-  void End() noexcept;
-
-  /// To be implemented by derived implementation class: start transaction
-  virtual void do_begin() =0;
-  /// To be implemented by derived implementation class: perform query
-  virtual result do_exec(const char Query[]) =0;
-  /// To be implemented by derived implementation class: commit transaction
-  virtual void do_commit() =0;
-  /// To be implemented by derived implementation class: abort transaction
-  virtual void do_abort() =0;
-
-  // For use by implementing class:
-
-  /// Execute query on connection directly
-  /**
-   * @param C Query or command to execute
-   * @param Retries Number of times to retry the query if it fails.  Be
-   * extremely careful with this option; if you retry in the middle of a
-   * transaction, you may be setting up a new connection transparently and
-   * executing the latter part of the transaction without a backend transaction
-   * being active (and with the former part aborted).
-   */
-  result direct_exec(const char C[], int Retries=0);
-
-  /// Forget about any reactivation-blocking resources we tried to allocate
-  void reactivation_avoidance_clear() noexcept
-	{m_reactivation_avoidance.clear();}
-
-protected:
-  /// Resources allocated in this transaction that make reactivation impossible
-  /** This number may be negative!
-   */
-  internal::reactivation_avoidance_counter m_reactivation_avoidance;
-
-private:
-  /* A transaction goes through the following stages in its lifecycle:
-   * <ul>
-   * <li> nascent: the transaction hasn't actually begun yet.  If our connection
-   *    fails at this stage, it may recover and the transaction can attempt to
-   *    establish itself again.
-   * <li> active: the transaction has begun.  Since no commit command has been
-   *    issued, abortion is implicit if the connection fails now.
-   * <li> aborted: an abort has been issued; the transaction is terminated and
-   *    its changes to the database rolled back.  It will accept no further
-   *    commands.
-   * <li> committed: the transaction has completed successfully, meaning that a
-   *    commit has been issued.  No further commands are accepted.
-   * <li> in_doubt: the connection was lost at the exact wrong time, and there
-   *    is no way of telling whether the transaction was committed or aborted.
-   * </ul>
-   *
-   * Checking and maintaining state machine logic is the responsibility of the
-   * base class (ie., this one).
-   */
-  enum Status
-  {
-    st_nascent,
-    st_active,
-    st_aborted,
-    st_committed,
-    st_in_doubt
-  };
-
-  /// Make sure transaction is opened on backend, if appropriate
-  PQXX_PRIVATE void activate();
-
-  PQXX_PRIVATE void CheckPendingError();
-
-  template<typename T> bool parm_is_null(T *p) const noexcept
-	{ return p == nullptr; }
-  template<typename T> bool parm_is_null(T) const noexcept
-	{ return false; }
-
-  result internal_exec_prepared(
-	const std::string &statement,
-	const internal::params &args,
-	result_format format);
-
-  result internal_exec_params(
-	const std::string &query,
-	const internal::params &args);
-
-  /// Throw unexpected_rows if prepared statement returned wrong no. of rows.
-  void check_rowcount_prepared(
-	const std::string &statement,
-	size_t expected_rows,
-	size_t actual_rows);
-
-  /// Throw unexpected_rows if wrong row count from parameterised statement.
-  void check_rowcount_params(
-	size_t expected_rows, size_t actual_rows);
-
-  friend class pqxx::internal::gate::transaction_transactionfocus;
-  PQXX_PRIVATE void register_focus(internal::transactionfocus *);
-  PQXX_PRIVATE void unregister_focus(internal::transactionfocus *) noexcept;
-  PQXX_PRIVATE void register_pending_error(const std::string &) noexcept;
-
-  friend class pqxx::internal::gate::transaction_tablereader;
-  friend class pqxx::internal::gate::transaction_stream_from;
-  PQXX_PRIVATE void BeginCopyRead(const std::string &, const std::string &);
-  bool read_copy_line(std::string &);
-
-  friend class pqxx::internal::gate::transaction_tablewriter;
-  friend class pqxx::internal::gate::transaction_stream_to;
-  PQXX_PRIVATE void BeginCopyWrite(
-	const std::string &Table,
-	const std::string &Columns);
-  void write_copy_line(const std::string &);
-  void end_copy_write();
-
-  friend class pqxx::internal::gate::transaction_subtransaction;
-
-  connection_base &m_conn;
-
-  internal::unique<internal::transactionfocus> m_focus;
-  Status m_status = st_nascent;
-  bool m_registered = false;
-  std::map<std::string, std::string> m_vars;
-  std::string m_pending_error;
-};
-
-} // namespace pqxx
-
-#include "pqxx/compiler-internal-post.hxx"
-#endif
diff --git a/contrib/libs/libpqxx/include/pqxx/transactor b/contrib/libs/libpqxx/include/pqxx/transactor
deleted file mode 100644
index 658551f9b6..0000000000
--- a/contrib/libs/libpqxx/include/pqxx/transactor
+++ /dev/null
@@ -1,6 +0,0 @@
-/** pqxx::transactor class.
- *
- * pqxx::transactor is a framework-style wrapper for safe transactions.
- */
-// Actual definitions in .hxx file so editors and such recognize file type.
-#include "pqxx/transactor.hxx"
diff --git a/contrib/libs/libpqxx/include/pqxx/transactor.hxx b/contrib/libs/libpqxx/include/pqxx/transactor.hxx
deleted file mode 100644
index 5aba0193cb..0000000000
--- a/contrib/libs/libpqxx/include/pqxx/transactor.hxx
+++ /dev/null
@@ -1,274 +0,0 @@
-/* Transactor framework, a wrapper for safely retryable transactions.
- *
- * DO NOT INCLUDE THIS FILE DIRECTLY; include pqxx/transactor instead.
- *
- * Copyright (c) 2000-2019, Jeroen T. Vermeulen.
- *
- * See COPYING for copyright license.  If you did not receive a file called
- * COPYING with this source code, please notify the distributor of this mistake,
- * or contact the author.
- */
-#ifndef PQXX_H_TRANSACTOR
-#define PQXX_H_TRANSACTOR
-
-#include "pqxx/compiler-public.hxx"
-#include "pqxx/compiler-internal-pre.hxx"
-
-#include "pqxx/connection_base.hxx"
-#include "pqxx/transaction.hxx"
-
-
-// Methods tested in eg. test module test01 are marked with "//[t01]".
-
-namespace pqxx
-{
-/**
- * @defgroup transactor Transactor framework
- *
- * Sometimes a transaction can fail for completely transient reasons, such as a
- * conflict with another transaction in SERIALIZABLE isolation.  The right way
- * to handle those failures is often just to re-run the transaction from
- * scratch.
- *
- * For example, your REST API might be handling each HTTP request in its own
- * database transaction, and if this kind of transient failure happens, you
- * simply want to "replay" the whole request, in a fresh transaction.
- *
- * You won't necessarily want to execute the exact same SQL commands with the
- * exact same data.  Some of your SQL statements may depend on state that can
- * vary between retries.  So instead of dumbly replaying the SQL, you re-run
- * the same application code that produced those SQL commands.
- *
- * The transactor framework makes it a little easier for you to do this safely,
- * and avoid typical pitfalls.  You encapsulate the work that you want to do
- * into a callable that you pass to the @c perform function.
- *
- * Here's how it works.  You write your transaction code as a lambda or
- * function, which creates its own transaction object, does its work, and
- * commits at the end.  You pass that callback to @c pqxx::perform, which runs
- * it for you.
- *
- * If there's a failure inside your callback, there will be an exception.  Your
- * transaction object goes out of scope and gets destroyed, so that it aborts
- * implicitly.  Seeing this, @c perform tries running your callback again.  It
- * stops doing that when the callback succeeds, or when it has failed too many
- * times, or when there's an error that leaves the database in an unknown
- * state, such as a lost connection just while we're waiting for the database
- * to confirm a commit.  It all depends on the type of exception.
- *
- * The callback takes no arguments.  If you're using lambdas, the easy way to
- * pass arguments is for the lambda to "capture" them from your variables.  Or,
- * if you're using functions, you may want to use @c std::bind.
- *
- * Once your callback succeeds, it can return a result, and @c perform will
- * return that result back to you.
- */
-//@{
-
-/// Simple way to execute a transaction with automatic retry.
-/**
- * Executes your transaction code as a callback.  Repeats it until it completes
- * normally, or it throws an error other than the few libpqxx-generated
- * exceptions that the framework understands, or after a given number of failed
- * attempts, or if the transaction ends in an "in-doubt" state.
- *
- * (An in-doubt state is one where libpqxx cannot determine whether the server
- * finally committed a transaction or not.  This can happen if the network
- * connection to the server is lost just while we're waiting for its reply to
- * a "commit" statement.  The server may have completed the commit, or not, but
- * it can't tell you because there's no longer a connection.
- *
- * Using this still takes a bit of care.  If your callback makes use of data
- * from the database, you'll probably have to query that data within your
- * callback.  If the attempt to perform your callback fails, and the framework
- * tries again, you'll be in a new transaction and the data in the database may
- * have changed under your feet.
- *
- * Also be careful about changing variables or data structures from within
- * your callback.  The run may still fail, and perhaps get run again.  The
- * ideal way to do it (in most cases) is to return your result from your
- * callback, and change your program's data state only after @c perform
- * completes successfully.
- *
- * @param callback Transaction code that can be called with no arguments.
- * @param attempts Maximum number of times to attempt performing callback.
- *	Must be greater than zero.
- * @return Whatever your callback returns.
- */
-template<typename TRANSACTION_CALLBACK>
-inline auto perform(const TRANSACTION_CALLBACK &callback, int attempts=3)
-  -> decltype(callback())
-{
-  if (attempts <= 0)
-    throw std::invalid_argument{
-	"Zero or negative number of attempts passed to pqxx::perform()."};
-
-  for (; attempts > 0; --attempts)
-  {
-    try
-    {
-      return callback();
-    }
-    catch (const in_doubt_error &)
-    {
-      // Not sure whether transaction went through or not.  The last thing in
-      // the world that we should do now is try again!
-      throw;
-    }
-    catch (const statement_completion_unknown &)
-    {
-      // Not sure whether our last statement succeeded.  Don't risk running it
-      // again.
-      throw;
-    }
-    catch (const broken_connection &)
-    {
-      // Connection failed.  Definitely worth retrying.
-      if (attempts <= 1) throw;
-      continue;
-    }
-    catch (const transaction_rollback &)
-    {
-      // Some error that may well be transient, such as serialization failure
-      // or deadlock.  Worth retrying.
-      if (attempts <= 1) throw;
-      continue;
-    }
-  }
-  throw pqxx::internal_error{"No outcome reached on perform()."};
-}
-
-/// @deprecated Pre-C++11 wrapper for automatically retrying transactions.
-/**
- * Pass an object of your transactor-based class to connection_base::perform()
- * to execute the transaction code embedded in it.
- *
- * connection_base::perform() is actually a template, specializing itself to any
- * transactor type you pass to it.  This means you will have to pass it a
- * reference of your object's ultimate static type; runtime polymorphism is
- * not allowed.  Hence the absence of virtual methods in transactor.  The
- * exact methods to be called at runtime *must* be resolved at compile time.
- *
- * Your transactor-derived class must define a copy constructor.  This will be
- * used to create a "clean" copy of your transactor for every attempt that
- * perform() makes to run it.
- */
-template<typename TRANSACTION=transaction<read_committed>> class transactor
-{
-public:
-  using argument_type = TRANSACTION;
-  PQXX_DEPRECATED explicit transactor(					//[t04]
-	const std::string &TName="transactor") :
-    m_name{TName} { }
-
-  /// Overridable transaction definition; insert your database code here
-  /** The operation will be retried if the connection to the backend is lost or
-   * the operation fails, but not if the connection is broken in such a way as
-   * to leave the library in doubt as to whether the operation succeeded.  In
-   * that case, an in_doubt_error will be thrown.
-   *
-   * Recommended practice is to allow this operator to modify only the
-   * transactor itself, and the dedicated transaction object it is passed as an
-   * argument.  This is what makes side effects, retrying etc. controllable in
-   * the transactor framework.
-   * @param T Dedicated transaction context created to perform this operation.
-   */
-  void operator()(TRANSACTION &T);					//[t04]
-
-  // Overridable member functions, called by connection_base::perform() if an
-  // attempt to run transaction fails/succeeds, respectively, or if the
-  // connection is lost at just the wrong moment, goes into an indeterminate
-  // state.  Use these to patch up runtime state to match events, if needed, or
-  // to report failure conditions.
-
-  /// Optional overridable function to be called if transaction is aborted
-  /** This need not imply complete failure; the transactor will automatically
-   * retry the operation a number of times before giving up.  on_abort() will be
-   * called for each of the failed attempts.
-   *
-   * One parameter is passed in by the framework: an error string describing why
-   * the transaction failed.  This will also be logged to the connection's
-   * notice processor.
-   */
-  void on_abort(const char[]) noexcept {}				//[t13]
-
-  /// Optional overridable function to be called after successful commit
-  /** If your on_commit() throws an exception, the actual back-end transaction
-   * will remain committed, so any changes in the database remain regardless of
-   * how this function terminates.
-   */
-  void on_commit() {}							//[t07]
-
-  /// Overridable function to be called when "in doubt" about outcome
-  /** This may happen if the connection to the backend is lost while attempting
-   * to commit.  In that case, the backend may have committed the transaction
-   * but is unable to confirm this to the frontend; or the transaction may have
-   * failed, causing it to be rolled back, but again without acknowledgement to
-   * the client program.  The best way to deal with this situation is typically
-   * to wave red flags in the user's face and ask him to investigate.
-   *
-   * The robusttransaction class is intended to reduce the chances of this
-   * error occurring, at a certain cost in performance.
-   * @see robusttransaction
-   */
-  void on_doubt() noexcept {}						//[t13]
-
-  /// The transactor's name.
-  std::string name() const { return m_name; }				//[t13]
-
-private:
-  std::string m_name;
-};
-
-
-template<typename TRANSACTOR>
-inline void connection_base::perform(
-	const TRANSACTOR &T,
-        int Attempts)
-{
-  if (Attempts <= 0) return;
-
-  bool Done = false;
-
-  // Make attempts to perform T
-  do
-  {
-    --Attempts;
-
-    // Work on a copy of T2 so we can restore the starting situation if need be
-    TRANSACTOR T2{T};
-    try
-    {
-      typename TRANSACTOR::argument_type X{*this, T2.name()};
-      T2(X);
-      X.commit();
-      Done = true;
-    }
-    catch (const in_doubt_error &)
-    {
-      // Not sure whether transaction went through or not.  The last thing in
-      // the world that we should do now is retry.
-      T2.on_doubt();
-      throw;
-    }
-    catch (const std::exception &e)
-    {
-      // Could be any kind of error.
-      T2.on_abort(e.what());
-      if (Attempts <= 0) throw;
-      continue;
-    }
-    catch (...)
-    {
-      // Don't try to forge ahead if we don't even know what happened
-      T2.on_abort("Unknown exception");
-      throw;
-    }
-
-    T2.on_commit();
-  } while (not Done);
-}
-} // namespace pqxx
-//@}
-#include "pqxx/compiler-internal-post.hxx"
-#endif
diff --git a/contrib/libs/libpqxx/include/pqxx/types.hxx b/contrib/libs/libpqxx/include/pqxx/types.hxx
deleted file mode 100644
index 49d1a0d1f0..0000000000
--- a/contrib/libs/libpqxx/include/pqxx/types.hxx
+++ /dev/null
@@ -1,57 +0,0 @@
-/**
- * Basic type aliases and forward declarations.
- *
- * Copyright (c) 2000-2019, Jeroen T. Vermeulen
- *
- * See COPYING for copyright license.  If you did not receive a file called
- * COPYING with this source code, please notify the distributor of this
- * mistake, or contact the author.
- */
-#ifndef PQXX_H_TYPES
-#define PQXX_H_TYPES
-
-#include <cstddef>
-
-namespace pqxx
-{
-/// Number of rows in a result set.
-using result_size_type = unsigned long;
-
-/// Difference between result sizes.
-using result_difference_type = signed long;
-
-/// Number of fields in a row of database data.
-using row_size_type = unsigned int;
-
-/// Difference between row sizes.
-using row_difference_type = signed int;
-
-/// Number of bytes in a field of database data.
-using field_size_type = std::size_t;
-
-/// Number of bytes in a large object.  (Unusual: it's signed.)
-using large_object_size_type = long;
-
-
-// Forward declarations, to help break compilation dependencies.
-// These won't necessarily include all classes in libpqxx.
-class binarystring;
-class connectionpolicy;
-class connection_base;
-class const_result_iterator;
-class const_reverse_result_iterator;
-class const_reverse_row_iterator;
-class const_row_iterator;
-class dbtransaction;
-class field;
-class largeobjectaccess;
-class notification_receiver;
-class range_error;
-class result;
-class row;
-class tablereader;
-class transaction_base;
-
-} // namespace pqxx
-
-#endif
diff --git a/contrib/libs/libpqxx/include/pqxx/util b/contrib/libs/libpqxx/include/pqxx/util
deleted file mode 100644
index 6ec38ac111..0000000000
--- a/contrib/libs/libpqxx/include/pqxx/util
+++ /dev/null
@@ -1,5 +0,0 @@
-/** Various utility definitions for libpqxx.
- */
-// Actual definitions in .hxx file so editors and such recognize file type
-#include "pqxx/util.hxx"
-
diff --git a/contrib/libs/libpqxx/include/pqxx/util.hxx b/contrib/libs/libpqxx/include/pqxx/util.hxx
deleted file mode 100644
index 86a9134c38..0000000000
--- a/contrib/libs/libpqxx/include/pqxx/util.hxx
+++ /dev/null
@@ -1,309 +0,0 @@
-/** Various utility definitions for libpqxx.
- *
- * DO NOT INCLUDE THIS FILE DIRECTLY; include pqxx/util instead.
- *
- * Copyright (c) 2000-2019, Jeroen T. Vermeulen.
- *
- * See COPYING for copyright license.  If you did not receive a file called
- * COPYING with this source code, please notify the distributor of this mistake,
- * or contact the author.
- */
-#ifndef PQXX_H_UTIL
-#define PQXX_H_UTIL
-
-#include "pqxx/compiler-public.hxx"
-
-#include <cstdio>
-#include <cctype>
-#include <iterator>
-#include <memory>
-#include <stdexcept>
-#include <string>
-#include <type_traits>
-#include <typeinfo>
-#include <vector>
-
-#include "pqxx/strconv.hxx"
-
-
-/// The home of all libpqxx classes, functions, templates, etc.
-namespace pqxx {}
-
-#include <pqxx/internal/libpq-forward.hxx>
-
-
-namespace pqxx
-{
-/// Suppress compiler warning about an unused item.
-template<typename T> inline void ignore_unused(T) {}
-
-
-/// Descriptor of library's thread-safety model.
-/** This describes what the library knows about various risks to thread-safety.
- */
-struct PQXX_LIBEXPORT thread_safety_model
-{
-  /// @deprecated Is error reporting thread-safe?  Now always true.
-  bool have_safe_strerror = true;
-
-  /// Is the underlying libpq build thread-safe?
-  bool safe_libpq;
-
-  /// @deprecated Query cancel is always thread-safe now.
-  bool safe_query_cancel = true;
-
-  /// @deprecated Always thread-safe to copy a 'result' or 'binarystring' now.
-  bool safe_result_copy = true;
-
-  /// Is Kerberos thread-safe?
-  /** @warning Is currently always @c false.
-   *
-   * If your application uses Kerberos, all accesses to libpqxx or Kerberos must
-   * be serialized.  Confine their use to a single thread, or protect it with a
-   * global lock.
-   */
-  bool safe_kerberos;
-
-  /// A human-readable description of any thread-safety issues.
-  std::string description;
-};
-
-
-/// Describe thread safety available in this build.
-PQXX_LIBEXPORT thread_safety_model describe_thread_safety() noexcept;
-
-
-/// The "null" oid.
-constexpr oid oid_none = 0;
-
-
-/**
- * @defgroup utility Utility functions
- */
-//@{
-
-/// Represent sequence of values as a string, joined by a given separator.
-/**
- * Use this to turn e.g. the numbers 1, 2, and 3 into a string "1, 2, 3".
- *
- * @param sep separator string (to be placed between items)
- * @param begin beginning of items sequence
- * @param end end of items sequence
- * @param access functor defining how to dereference sequence elements
- */
-template<typename ITER, typename ACCESS> inline
-std::string separated_list(						//[t00]
-	const std::string &sep,
-	ITER begin,
-	ITER end,
-	ACCESS access)
-{
-  std::string result;
-  if (begin != end)
-  {
-    result = to_string(access(begin));
-    for (++begin; begin != end; ++begin)
-    {
-      result += sep;
-      result += to_string(access(begin));
-    }
-  }
-  return result;
-}
-
-
-/// Render sequence as a string, using given separator between items.
-template<typename ITER> inline std::string
-separated_list(const std::string &sep, ITER begin, ITER end)		//[t00]
-	{ return separated_list(sep, begin, end, [](ITER i){ return *i; }); }
-
-
-/// Render items in a container as a string, using given separator.
-template<typename CONTAINER> inline auto
-separated_list(const std::string &sep, const CONTAINER &c)		//[t10]
-	/*
-	Always std::string; necessary because SFINAE doesn't work with the
-	contents of function bodies, so the check for iterability has to be in
-	the signature.
-	*/
-	-> typename std::enable_if<
-		(
-			not std::is_void<decltype(std::begin(c))>::value
-			and not std::is_void<decltype(std::end(c))>::value
-		),
-		std::string
-	>::type
-{
-  return separated_list(sep, std::begin(c), std::end(c));
-}
-
-
-/// Render items in a tuple as a string, using given separator.
-template<
-	typename TUPLE,
-	std::size_t INDEX=0,
-	typename ACCESS,
-	typename std::enable_if<
-		(INDEX == std::tuple_size<TUPLE>::value-1),
-		int
-	>::type=0
->
-inline std::string
-separated_list(
-	const std::string & /* sep */,
-	const TUPLE &t,
-	const ACCESS& access
-)
-{
-  return to_string(access(&std::get<INDEX>(t)));
-}
-
-template<
-	typename TUPLE,
-	std::size_t INDEX=0,
-	typename ACCESS,
-	typename std::enable_if<
-		(INDEX < std::tuple_size<TUPLE>::value-1),
-		int
-	>::type=0
->
-inline std::string
-separated_list(const std::string &sep, const TUPLE &t, const ACCESS& access)
-{
-  return
-	to_string(access(&std::get<INDEX>(t))) +
-	sep +
-	separated_list<TUPLE, INDEX+1>(sep, t, access);
-}
-
-template<
-	typename TUPLE,
-	std::size_t INDEX=0,
-	typename std::enable_if<
-		(INDEX <= std::tuple_size<TUPLE>::value),
-		int
-	>::type=0
->
-inline std::string
-separated_list(const std::string &sep, const TUPLE &t)
-{
-  return separated_list(sep, t, [](const TUPLE &tup){return *tup;});
-}
-//@}
-
-
-/// Private namespace for libpqxx's internal use; do not access.
-/** This namespace hides definitions internal to libpqxx.  These are not
- * supposed to be used by client programs, and they may change at any time
- * without notice.
- *
- * Conversely, if you find something in this namespace tremendously useful, by
- * all means do lodge a request for its publication.
- *
- * @warning Here be dragons!
- */
-namespace internal
-{
-PQXX_LIBEXPORT void freepqmem(const void *) noexcept;
-template<typename P> inline void freepqmem_templated(P *p) noexcept
-{
-  freepqmem(p);
-}
-
-PQXX_LIBEXPORT void freemallocmem(const void *) noexcept;
-template<typename P> inline void freemallocmem_templated(P *p) noexcept
-{
-  freemallocmem(p);
-}
-
-
-/// Helper base class: object descriptions for error messages and such.
-/**
- * Classes derived from namedclass have a class name (such as "transaction"),
- * an optional object name (such as "delete-old-logs"), and a description
- * generated from the two names (such as "transaction delete-old-logs").
- *
- * The class name is dynamic here, in order to support inheritance hierarchies
- * where the exact class name may not be known statically.
- *
- * In inheritance hierarchies, make namedclass a virtual base class so that
- * each class in the hierarchy can specify its own class name in its
- * constructors.
- */
-class PQXX_LIBEXPORT namedclass
-{
-public:
-  explicit namedclass(const std::string &Classname) :
-    m_classname{Classname},
-    m_name{}
-  {
-  }
-
-  namedclass(const std::string &Classname, const std::string &Name) :
-    m_classname{Classname},
-    m_name{Name}
-  {
-  }
-
-  /// Object name, or the empty string if no name was given.
-  const std::string &name() const noexcept { return m_name; }		//[t01]
-
-  /// Class name.
-  const std::string &classname() const noexcept				//[t73]
-	{ return m_classname; }
-
-  /// Combination of class name and object name; or just class name.
-  std::string description() const;
-
-private:
-  std::string m_classname, m_name;
-};
-
-
-PQXX_PRIVATE void CheckUniqueRegistration(
-        const namedclass *New, const namedclass *Old);
-PQXX_PRIVATE void CheckUniqueUnregistration(
-        const namedclass *New, const namedclass *Old);
-
-
-/// Ensure proper opening/closing of GUEST objects related to a "host" object
-/** Only a single GUEST may exist for a single host at any given time.  GUEST
- * must be derived from namedclass.
- */
-template<typename GUEST>
-class unique
-{
-public:
-  unique() =default;
-  unique(const unique &) =delete;
-  unique &operator=(const unique &) =delete;
-
-  GUEST *get() const noexcept { return m_guest; }
-
-  void register_guest(GUEST *G)
-  {
-    CheckUniqueRegistration(G, m_guest);
-    m_guest = G;
-  }
-
-  void unregister_guest(GUEST *G)
-  {
-    CheckUniqueUnregistration(G, m_guest);
-    m_guest = nullptr;
-  }
-
-private:
-  GUEST *m_guest = nullptr;
-};
-
-
-/// Sleep for the given number of seconds
-/** May return early, e.g. when interrupted by a signal.  Completes instantly if
- * a zero or negative sleep time is requested.
- */
-PQXX_LIBEXPORT void sleep_seconds(int);
-
-} // namespace internal
-} // namespace pqxx
-
-#endif
diff --git a/contrib/libs/libpqxx/include/pqxx/version b/contrib/libs/libpqxx/include/pqxx/version
deleted file mode 100644
index 5f7ab6a14e..0000000000
--- a/contrib/libs/libpqxx/include/pqxx/version
+++ /dev/null
@@ -1,4 +0,0 @@
-/** libpqxx version info.
- */
-// Actual definitions in .hxx file so editors and such recognize file type.
-#include "pqxx/version.hxx"
diff --git a/contrib/libs/libpqxx/include/pqxx/version.hxx b/contrib/libs/libpqxx/include/pqxx/version.hxx
deleted file mode 100644
index 6fe982d433..0000000000
--- a/contrib/libs/libpqxx/include/pqxx/version.hxx
+++ /dev/null
@@ -1,57 +0,0 @@
-/** Version info for libpqxx.
- *
- * DO NOT INCLUDE THIS FILE DIRECTLY; include pqxx/version instead.
- *
- * Copyright (c) 2000-2019, Jeroen T. Vermeulen.
- *
- * See COPYING for copyright license.  If you did not receive a file called
- * COPYING with this source code, please notify the distributor of this mistake,
- * or contact the author.
- */
-#ifndef PQXX_H_VERSION
-
-#include "pqxx/compiler-public.hxx"
-#include "pqxx/compiler-internal-pre.hxx"
-
-/// Full libpqxx version string.
-#define PQXX_VERSION "6.4.4"
-/// Library ABI version.
-#define PQXX_ABI "6.4"
-
-/// Major version number.
-#define PQXX_VERSION_MAJOR 6
-/// Minor version number.
-#define PQXX_VERSION_MINOR 4
-
-namespace pqxx
-{
-namespace internal
-{
-/// Library version check stub.
-/** Helps detect version mismatches between libpqxx headers and the libpqxx
- * library binary.
- *
- * Sometimes users run into trouble linking their code against libpqxx because
- * they build their own libpqxx, but the system also has a different version
- * installed.  The declarations in the headers against which they compile their
- * code will differ from the ones used to build the libpqxx version they're
- * using, leading to confusing link errors.  The solution is to generate a link
- * error when the libpqxx binary is not the same version as the libpqxx headers
- * used to compile the code.
- *
- * This is a template declaration, but its only actual definition is a
- * sepcialisation for the current library version.  The definition is in the
- * libpqxx binary, so it's based on the version as found in the binary.  The
- * headers contain a call to the function, specialised on the libpqxx version
- * as found in the headers.  (The library build process will use its own local
- * headers even if another version of the headers is installed on the system.)
- *
- * If the libpqxx binary was compiled for a different version than the user's
- * code, linking will fail with an error: @c check_library_version will not
- * exist for the given version number.
- */
-template<int, int> PQXX_LIBEXPORT int check_library_version() noexcept;
-}
-}
-#include "pqxx/compiler-internal-post.hxx"
-#endif
diff --git a/contrib/libs/libpqxx/src/array.cxx b/contrib/libs/libpqxx/src/array.cxx
deleted file mode 100644
index c16c7ae586..0000000000
--- a/contrib/libs/libpqxx/src/array.cxx
+++ /dev/null
@@ -1,312 +0,0 @@
-/** Handling of SQL arrays.
- *
- * Copyright (c) 2000-2019, Jeroen T. Vermeulen.
- *
- * See COPYING for copyright license.  If you did not receive a file called
- * COPYING with this source code, please notify the distributor of this mistake,
- * or contact the author.
- */
-#include "pqxx/compiler-internal.hxx"
-
-#include <cassert>
-#include <cstddef>
-#include <cstring>
-#include <utility>
-
-#include "pqxx/array"
-#include "pqxx/except"
-
-
-namespace pqxx
-{
-/// Scan to next glyph in the buffer.  Assumes there is one.
-std::string::size_type array_parser::scan_glyph(
-	std::string::size_type pos) const
-{
-  assert(pos < m_end);
-  return m_scan(m_input, m_end, pos);
-}
-
-
-/// Scan to next glyph in a substring.  Assumes there is one.
-std::string::size_type array_parser::scan_glyph(
-	std::string::size_type pos,
-	std::string::size_type end) const
-{
-  assert(pos < end);
-  assert(end <= m_end);
-  return m_scan(m_input, end, pos);
-}
-
-
-/// Find the end of a single-quoted SQL string in an SQL array.
-/** Returns the offset of the first character after the closing quote.
- */
-std::string::size_type array_parser::scan_single_quoted_string() const
-{
-  auto here = m_pos, next = scan_glyph(here);
-  assert(next < m_end);
-  assert(next - here == 1);
-  assert(m_input[here] == '\'');
-  for (
-	here = next, next = scan_glyph(here);
-	here < m_end;
-	here = next, next = scan_glyph(here)
-  )
-  {
-    if (next - here == 1) switch (m_input[here])
-    {
-    case '\'':
-      // SQL escapes single quotes by doubling them.  Terrible idea, but it's
-      // what we have.  Inspect the next character to find out whether this is
-      // the closing quote, or an escaped one inside the string.
-      here = next;
-      // (We can read beyond this quote because the array will always end in
-      // a closing brace.)
-      next = scan_glyph(here);
-
-      if ((here + 1 < next) or (m_input[here] != '\''))
-      {
-        // Our lookahead character is not an escaped quote.  It's the first
-        // character outside our string.  So, return it.
-        return here;
-      }
-
-      // We've just scanned an escaped quote.  Keep going.
-      break;
-
-    case '\\':
-      // Backslash escape.  Skip ahead by one more character.
-      here = next;
-      next = scan_glyph(here);
-      break;
-    }
-  }
-  throw argument_error{"Null byte in SQL string: " + std::string{m_input}};
-}
-
-
-/// Parse a single-quoted SQL string: un-quote it and un-escape it.
-std::string array_parser::parse_single_quoted_string(
-	std::string::size_type end) const
-{
-  // There have to be at least 2 characters: the opening and closing quotes.
-  assert(m_pos + 1 < end);
-  assert(m_input[m_pos] == '\'');
-  assert(m_input[end - 1] == '\'');
-
-  std::string output;
-  // Maximum output size is same as the input size, minus the opening and
-  // closing quotes.  In the worst case, the real number could be half that.
-  // Usually it'll be a pretty close estimate.
-  output.reserve(end - m_pos - 2);
-  for (
-	auto here = m_pos + 1, next = scan_glyph(here, end);
-	here < end - 1;
-	here = next, next = scan_glyph(here, end)
-  )
-  {
-    if (
-	next - here == 1 and
-        (m_input[here] == '\'' or m_input[here] == '\\')
-    )
-    {
-      // Skip escape.
-      here = next;
-      next = scan_glyph(here, end);
-    }
-
-    output.append(m_input + here, m_input + next);
-  }
-
-  return output;
-}
-
-
-/// Find the end of a double-quoted SQL string in an SQL array.
-std::string::size_type array_parser::scan_double_quoted_string() const
-{
-  auto here = m_pos;
-  assert(here < m_end);
-  auto next = scan_glyph(here);
-  assert(next - here == 1);
-  assert(m_input[here] == '"');
-  for (
-	here = next, next = scan_glyph(here);
-	here < m_end;
-	here = next, next = scan_glyph(here)
-  )
-  {
-    if (next - here == 1) switch (m_input[here])
-    {
-    case '\\':
-      // Backslash escape.  Skip ahead by one more character.
-      here = next;
-      next = scan_glyph(here);
-      break;
-
-    case '"':
-      // Closing quote.  Return the position right after.
-      return next;
-    }
-  }
-  throw argument_error{"Null byte in SQL string: " + std::string{m_input}};
-}
-
-
-/// Parse a double-quoted SQL string: un-quote it and un-escape it.
-std::string array_parser::parse_double_quoted_string(
-	std::string::size_type end) const
-{
-  // There have to be at least 2 characters: the opening and closing quotes.
-  assert(m_pos + 1 < end);
-  assert(m_input[m_pos] == '"');
-  assert(m_input[end - 1] == '"');
-
-  std::string output;
-  // Maximum output size is same as the input size, minus the opening and
-  // closing quotes.  In the worst case, the real number could be half that.
-  // Usually it'll be a pretty close estimate.
-  output.reserve(std::size_t(end - m_pos - 2));
-
-  for (
-	auto here = scan_glyph(m_pos, end), next = scan_glyph(here, end);
-	here < end - 1;
-	here = next, next = scan_glyph(here, end)
-  )
-  {
-    if ((next - here == 1) and (m_input[here] == '\\'))
-    {
-      // Skip escape.
-      here = next;
-      next = scan_glyph(here, end);
-    }
-
-    output.append(m_input + here, m_input + next);
-  }
-
-  return output;
-}
-
-
-/// Find the end of an unquoted string in an SQL array.
-/** Assumes UTF-8 or an ASCII-superset single-byte encoding.
- */
-std::string::size_type array_parser::scan_unquoted_string() const
-{
-  auto here = m_pos, next = scan_glyph(here);
-  assert(here < m_end);
-  assert((next - here > 1) or (m_input[here] != '\''));
-  assert((next - here > 1) or (m_input[here] != '"'));
-
-  while (
-        (next - here) > 1 or
-        (
-	  m_input[here] != ',' and
-	  m_input[here] != ';' and
-	  m_input[here] != '}'
-        )
-  )
-  {
-    here = next;
-    next = scan_glyph(here);
-  }
-  return here;
-}
-
-
-/// Parse an unquoted SQL string.
-/** Here, the special unquoted value NULL means a null value, not a string
- * that happens to spell "NULL".
- */
-std::string array_parser::parse_unquoted_string(
-	std::string::size_type end) const
-{
-  return std::string{m_input + m_pos, m_input + end};
-}
-
-
-array_parser::array_parser(
-	const char input[],
-	internal::encoding_group enc) :
-  m_input(input),
-  m_end(input == nullptr ? 0 : std::strlen(input)),
-  m_scan(internal::get_glyph_scanner(enc)),
-  m_pos(0)
-{
-}
-
-
-std::pair<array_parser::juncture, std::string>
-array_parser::get_next()
-{
-  juncture found;
-  std::string value;
-  std::string::size_type end;
-
-  if (m_input == nullptr or (m_pos >= m_end))
-    return std::make_pair(juncture::done, value);
-
-  if (scan_glyph(m_pos) - m_pos > 1)
-  {
-    // Non-ASCII unquoted string.
-    end = scan_unquoted_string();
-    value = parse_unquoted_string(end);
-    found = juncture::string_value;
-  }
-  else switch (m_input[m_pos])
-  {
-  case '\0':
-    // TODO: Maybe just raise an error?
-    found = juncture::done;
-    end = m_pos;
-    break;
-  case '{':
-    found = juncture::row_start;
-    end = scan_glyph(m_pos);
-    break;
-  case '}':
-    found = juncture::row_end;
-    end = scan_glyph(m_pos);
-    break;
-  case '\'':
-    found = juncture::string_value;
-    end = scan_single_quoted_string();
-    value = parse_single_quoted_string(end);
-    break;
-  case '"':
-    found = juncture::string_value;
-    end = scan_double_quoted_string();
-    value = parse_double_quoted_string(end);
-    break;
-  default:
-    end = scan_unquoted_string();
-    value = parse_unquoted_string(end);
-    if (value == "NULL")
-    {
-      // In this one situation, as a special case, NULL means a null field,
-      // not a string that happens to spell "NULL".
-      value.clear();
-      found = juncture::null_value;
-    }
-    else
-    {
-      // The normal case: we just parsed an unquoted string.  The value is
-      // what we need.
-      found = juncture::string_value;
-    }
-    break;
-  }
-
-  // Skip a trailing field separator, if present.
-  if (end < m_end)
-  {
-    auto next = scan_glyph(end);
-    if (next - end == 1 and (m_input[end] == ',' or m_input[end] == ';'))
-      end = next;
-  }
-
-  m_pos = end;
-  return std::make_pair(found, value);
-}
-} // namespace pqxx
diff --git a/contrib/libs/libpqxx/src/binarystring.cxx b/contrib/libs/libpqxx/src/binarystring.cxx
deleted file mode 100644
index 0091f48baf..0000000000
--- a/contrib/libs/libpqxx/src/binarystring.cxx
+++ /dev/null
@@ -1,150 +0,0 @@
-/** Implementation of bytea (binary string) conversions.
- *
- * Copyright (c) 2000-2019, Jeroen T. Vermeulen.
- *
- * See COPYING for copyright license.  If you did not receive a file called
- * COPYING with this source code, please notify the distributor of this mistake,
- * or contact the author.
- */
-#include "pqxx/compiler-internal.hxx"
-
-#include <cstdio>
-#include <cstdlib>
-#include <cstring>
-#include <new>
-#include <stdexcept>
-
-extern "C"
-{
-#include "libpq-fe.h"
-}
-
-#include "pqxx/binarystring"
-#include "pqxx/field"
-
-
-using namespace pqxx::internal;
-
-namespace
-{
-using unsigned_char = unsigned char;
-using buffer = std::pair<unsigned char *, size_t>;
-
-
-buffer to_buffer(const void *data, size_t len)
-{
-  void *const output{malloc(len + 1)};
-  if (output == nullptr) throw std::bad_alloc{};
-  static_cast<char *>(output)[len] = '\0';
-  memcpy(static_cast<char *>(output), data, len);
-  return buffer{static_cast<unsigned char *>(output), len};
-}
-
-
-buffer to_buffer(const std::string &source)
-{
-  return to_buffer(source.c_str(), source.size());
-}
-
-
-
-buffer unescape(const unsigned char escaped[])
-{
-#ifdef _WIN32
-  /* On Windows only, the return value from PQunescapeBytea() must be freed
-   * using PQfreemem.  Copy to a buffer allocated by libpqxx, so that the
-   * binarystring's buffer can be freed uniformly,
-   */
-  size_t unescaped_len = 0;
-  // TODO: Use make_unique once we require C++14.  Sooo much easier.
-  std::unique_ptr<unsigned char, void(*)(unsigned char *)> A(
-	PQunescapeBytea(const_cast<unsigned char *>(escaped), &unescaped_len),
-	freepqmem_templated<unsigned char>);
-  void *data = A.get();
-  if (data == nullptr) throw std::bad_alloc{};
-  return to_buffer(data, unescaped_len);
-#else
-  /* On non-Windows platforms, it's okay to free libpq-allocated memory using
-   * free().  No extra copy needed.
-   */
-  buffer unescaped;
-  unescaped.first = PQunescapeBytea(
-	const_cast<unsigned char *>(escaped), &unescaped.second);
-  if (unescaped.first == nullptr) throw std::bad_alloc{};
-  return unescaped;
-#endif
-}
-
-} // namespace
-
-
-pqxx::binarystring::binarystring(const field &F) :
-  m_buf{make_smart_pointer()},
-  m_size{0}
-{
-  buffer unescaped{unescape(reinterpret_cast<const_pointer>(F.c_str()))};
-  m_buf = make_smart_pointer(unescaped.first);
-  m_size = unescaped.second;
-}
-
-
-pqxx::binarystring::binarystring(const std::string &s) :
-  m_buf{make_smart_pointer()},
-  m_size{s.size()}
-{
-  m_buf = make_smart_pointer(to_buffer(s).first);
-}
-
-
-pqxx::binarystring::binarystring(const void *binary_data, size_t len) :
-  m_buf{make_smart_pointer()},
-  m_size{len}
-{
-  m_buf = make_smart_pointer(to_buffer(binary_data, len).first);
-}
-
-
-bool pqxx::binarystring::operator==(const binarystring &rhs) const noexcept
-{
-  if (rhs.size() != size()) return false;
-  return std::memcmp(data(), rhs.data(), size()) == 0;
-}
-
-
-pqxx::binarystring &pqxx::binarystring::operator=(const binarystring &rhs)
-{
-  m_buf = rhs.m_buf;
-  m_size = rhs.m_size;
-  return *this;
-}
-
-
-pqxx::binarystring::const_reference pqxx::binarystring::at(size_type n) const
-{
-  if (n >= m_size)
-  {
-    if (m_size == 0)
-      throw std::out_of_range{"Accessing empty binarystring"};
-    throw std::out_of_range{
-	"binarystring index out of range: " +
-	to_string(n) + " (should be below " + to_string(m_size) + ")"};
-  }
-  return data()[n];
-}
-
-
-void pqxx::binarystring::swap(binarystring &rhs)
-{
-  m_buf.swap(rhs.m_buf);
-
-  // This part very obviously can't go wrong, so do it last
-  const auto s = m_size;
-  m_size = rhs.m_size;
-  rhs.m_size = s;
-}
-
-
-std::string pqxx::binarystring::str() const
-{
-  return std::string{get(), m_size};
-}
diff --git a/contrib/libs/libpqxx/src/connection.cxx b/contrib/libs/libpqxx/src/connection.cxx
deleted file mode 100644
index 982b6d60f9..0000000000
--- a/contrib/libs/libpqxx/src/connection.cxx
+++ /dev/null
@@ -1,182 +0,0 @@
-/** Implementation of the pqxx::connection and sibling classes.
- *
- * Different ways of setting up a backend connection.
- *
- * Copyright (c) 2000-2019, Jeroen T. Vermeulen.
- *
- * See COPYING for copyright license.  If you did not receive a file called
- * COPYING with this source code, please notify the distributor of this mistake,
- * or contact the author.
- */
-#include "pqxx/compiler-internal.hxx"
-
-#include <stdexcept>
-
-extern "C"
-{
-#include "libpq-fe.h"
-}
-
-#include "pqxx/connection"
-
-
-pqxx::connectionpolicy::connectionpolicy(const std::string &opts) :
-  m_options{opts}
-{
-}
-
-
-pqxx::connectionpolicy::~connectionpolicy() noexcept
-{
-}
-
-
-pqxx::connectionpolicy::handle
-pqxx::connectionpolicy::normalconnect(handle orig)
-{
-  if (orig) return orig;
-  orig = PQconnectdb(options().c_str());
-  if (orig == nullptr) throw std::bad_alloc{};
-  if (PQstatus(orig) != CONNECTION_OK)
-  {
-    const std::string msg{PQerrorMessage(orig)};
-    PQfinish(orig);
-    throw broken_connection{msg};
-  }
-  return orig;
-}
-
-
-pqxx::connectionpolicy::handle
-pqxx::connectionpolicy::do_startconnect(handle orig)
-{
-  return orig;
-}
-
-pqxx::connectionpolicy::handle
-pqxx::connectionpolicy::do_completeconnect(handle orig)
-{
-  return orig;
-}
-
-pqxx::connectionpolicy::handle
-pqxx::connectionpolicy::do_dropconnect(handle orig) noexcept
-{
-  return orig;
-}
-
-pqxx::connectionpolicy::handle
-pqxx::connectionpolicy::do_disconnect(handle orig) noexcept
-{
-  orig = do_dropconnect(orig);
-  if (orig) PQfinish(orig);
-  return nullptr;
-}
-
-
-bool pqxx::connectionpolicy::is_ready(handle h) const noexcept
-{
-  return h != nullptr;
-}
-
-
-pqxx::connectionpolicy::handle
-pqxx::connect_direct::do_startconnect(handle orig)
-{
-  if (orig) return orig;
-  orig = normalconnect(orig);
-  if (PQstatus(orig) != CONNECTION_OK)
-  {
-    const std::string msg{PQerrorMessage(orig)};
-    do_disconnect(orig);
-    throw broken_connection{msg};
-  }
-  return orig;
-}
-
-
-pqxx::connectionpolicy::handle
-pqxx::connect_lazy::do_completeconnect(handle orig)
-{
-  return normalconnect(orig);
-}
-
-
-pqxx::connect_async::connect_async(const std::string &opts) :
-  connectionpolicy{opts},
-  m_connecting{false}
-{
-}
-
-pqxx::connectionpolicy::handle
-pqxx::connect_async::do_startconnect(handle orig)
-{
-  if (orig != nullptr) return orig;	// Already connecting or connected.
-  m_connecting = false;
-  orig = PQconnectStart(options().c_str());
-  if (orig == nullptr) throw std::bad_alloc{};
-  if (PQstatus(orig) == CONNECTION_BAD)
-  {
-    do_dropconnect(orig);
-    throw broken_connection{std::string{PQerrorMessage(orig)}};
-  }
-  m_connecting = true;
-  return orig;
-}
-
-
-pqxx::connectionpolicy::handle
-pqxx::connect_async::do_completeconnect(handle orig)
-{
-  const bool makenew = (orig == nullptr);
-  if (makenew) orig = do_startconnect(orig);
-  if (not m_connecting) return orig;
-
-  // Our "attempt to connect" state ends here, for better or for worse
-  m_connecting = false;
-
-  PostgresPollingStatusType pollstatus = PGRES_POLLING_WRITING;
-
-  do
-  {
-    switch (pollstatus)
-    {
-    case PGRES_POLLING_FAILED:
-      if (makenew) do_disconnect(orig);
-      throw broken_connection{std::string{PQerrorMessage(orig)}};
-
-    case PGRES_POLLING_READING:
-      internal::wait_read(orig);
-      break;
-
-    case PGRES_POLLING_WRITING:
-      internal::wait_write(orig);
-      break;
-
-    case PGRES_POLLING_OK:
-      break;
-
-    default:
-      // Meaningless, really, but deals with the obsolete PGRES_POLLING_ACTIVE
-      // without requiring it to be defined.
-      break;
-    }
-    pollstatus = PQconnectPoll(orig);
-  } while (pollstatus != PGRES_POLLING_OK);
-
-  return orig;
-}
-
-
-pqxx::connectionpolicy::handle
-pqxx::connect_async::do_dropconnect(handle orig) noexcept
-{
-  m_connecting = false;
-  return orig;
-}
-
-
-bool pqxx::connect_async::is_ready(handle h) const noexcept
-{
-  return h != nullptr and not m_connecting;
-}
diff --git a/contrib/libs/libpqxx/src/connection_base.cxx b/contrib/libs/libpqxx/src/connection_base.cxx
deleted file mode 100644
index 345e3414ee..0000000000
--- a/contrib/libs/libpqxx/src/connection_base.cxx
+++ /dev/null
@@ -1,1475 +0,0 @@
-/** Implementation of the pqxx::connection_base abstract base class.
- *
- * pqxx::connection_base encapsulates a frontend to backend connection.
- *
- * Copyright (c) 2000-2019, Jeroen T. Vermeulen.
- *
- * See COPYING for copyright license.  If you did not receive a file called
- * COPYING with this source code, please notify the distributor of this mistake,
- * or contact the author.
- */
-#include "pqxx/compiler-internal.hxx"
-
-#include <algorithm>
-#include <cassert>
-#include <cerrno>
-#include <cstdio>
-#include <cstdlib>
-#include <cstring>
-#include <ctime>
-#include <iterator>
-#include <memory>
-#include <stdexcept>
-
-#if defined(_WIN32)
-// Includes for WSAPoll().
-#include <winsock2.h>
-#include <ws2tcpip.h>
-#include <mstcpip.h>
-#elif defined(HAVE_POLL)
-// Include for poll().
-#include <poll.h>
-#elif defined(HAVE_SYS_SELECT_H)
-// Include for select() on (recent) POSIX systems.
-#include <sys/select.h>
-#else
-// Includes for select() according to various older standards.
-#if defined(HAVE_SYS_TYPES_H)
-#include <sys/types.h>
-#endif
-#if defined(HAVE_UNISTD_H)
-#include <unistd.h>
-#endif
-#endif
-#if defined(HAVE_SYS_TIME_H)
-#include <sys/time.h>
-#endif
-
-extern "C"
-{
-#include "libpq-fe.h"
-}
-
-#include "pqxx/binarystring"
-#include "pqxx/connection"
-#include "pqxx/connection_base"
-#include "pqxx/nontransaction"
-#include "pqxx/pipeline"
-#include "pqxx/result"
-#include "pqxx/strconv"
-#include "pqxx/transaction"
-#include "pqxx/notification"
-
-#include "pqxx/internal/gates/connection-reactivation_avoidance_exemption.hxx"
-#include "pqxx/internal/gates/errorhandler-connection.hxx"
-#include "pqxx/internal/gates/result-creation.hxx"
-#include "pqxx/internal/gates/result-connection.hxx"
-
-using namespace pqxx;
-using namespace pqxx::internal;
-using namespace pqxx::prepare;
-
-
-extern "C"
-{
-// The PQnoticeProcessor that receives an error or warning from libpq and sends
-// it to the appropriate connection for processing.
-void pqxx_notice_processor(void *conn, const char *msg) noexcept
-{
-  reinterpret_cast<pqxx::connection_base *>(conn)->process_notice(msg);
-}
-
-
-// There's no way in libpq to disable a connection's notice processor.  So,
-// set an inert one to get the same effect.
-void inert_notice_processor(void *, const char *) noexcept {}
-}
-
-
-std::string pqxx::encrypt_password(
-        const std::string &user, const std::string &password)
-{
-  std::unique_ptr<char, void (*)(char *)> p{
-	PQencryptPassword(password.c_str(), user.c_str()),
-        freepqmem_templated<char>};
-  return std::string{p.get()};
-}
-
-
-void pqxx::connection_base::init()
-{
-  m_conn = m_policy.do_startconnect(m_conn);
-#include "pqxx/internal/ignore-deprecated-pre.hxx"
-  if (m_policy.is_ready(m_conn)) activate();
-#include "pqxx/internal/ignore-deprecated-post.hxx"
-}
-
-
-pqxx::result pqxx::connection_base::make_result(
-	internal::pq::PGresult *rhs,
-	const std::string &query)
-{
-  return gate::result_creation::create(
-        rhs,
-        query,
-        internal::enc_group(encoding_id()));
-}
-
-
-int pqxx::connection_base::backendpid() const noexcept
-{
-  return m_conn ? PQbackendPID(m_conn) : 0;
-}
-
-
-namespace
-{
-PQXX_PURE int socket_of(const ::pqxx::internal::pq::PGconn *c) noexcept
-{
-  return c ? PQsocket(c) : -1;
-}
-}
-
-
-int pqxx::connection_base::sock() const noexcept
-{
-  return socket_of(m_conn);
-}
-
-
-void pqxx::connection_base::activate()
-{
-  if (not is_open())
-  {
-    if (m_inhibit_reactivation)
-      throw broken_connection{
-	"Could not reactivate connection; "
-	"reactivation is inhibited"};
-
-    // If any objects were open that didn't survive the closing of our
-    // connection, don't try to reactivate
-    if (m_reactivation_avoidance.get()) return;
-
-    try
-    {
-      m_conn = m_policy.do_startconnect(m_conn);
-      m_conn = m_policy.do_completeconnect(m_conn);
-      m_completed = true;	// (But retracted if error is thrown below)
-
-      if (not is_open()) throw broken_connection{};
-
-      set_up_state();
-    }
-    catch (const broken_connection &e)
-    {
-      disconnect();
-      m_completed = false;
-      throw broken_connection{e.what()};
-    }
-    catch (const std::exception &)
-    {
-      m_completed = false;
-      throw;
-    }
-  }
-}
-
-
-void pqxx::connection_base::deactivate()
-{
-  if (m_conn == nullptr) return;
-
-  if (m_trans.get())
-    throw usage_error{
-	"Attempt to deactivate connection while " +
-	m_trans.get()->description() + " still open"};
-
-  if (m_reactivation_avoidance.get())
-  {
-    process_notice(
-	"Attempt to deactivate connection while it is in a state "
-	"that cannot be fully recovered later (ignoring)");
-    return;
-  }
-
-  m_completed = false;
-  m_conn = m_policy.do_disconnect(m_conn);
-}
-
-
-void pqxx::connection_base::simulate_failure()
-{
-  if (m_conn)
-  {
-    m_conn = m_policy.do_disconnect(m_conn);
-#include <pqxx/internal/ignore-deprecated-pre.hxx>
-    inhibit_reactivation(true);
-#include <pqxx/internal/ignore-deprecated-post.hxx>
-  }
-}
-
-
-int pqxx::connection_base::protocol_version() const noexcept
-{
-  return m_conn ? PQprotocolVersion(m_conn) : 0;
-}
-
-
-int pqxx::connection_base::server_version() const noexcept
-{
-  return m_serverversion;
-}
-
-
-void pqxx::connection_base::set_variable(const std::string &Var,
-	const std::string &Value)
-{
-  if (m_trans.get())
-  {
-    // We're in a transaction.  The variable should go in there.
-    m_trans.get()->set_variable(Var, Value);
-  }
-  else
-  {
-    // We're not in a transaction.  Set a session variable.
-    if (is_open()) raw_set_var(Var, Value);
-    m_vars[Var] = Value;
-  }
-}
-
-
-std::string pqxx::connection_base::get_variable(const std::string &Var)
-{
-  return m_trans.get() ? m_trans.get()->get_variable(Var) : raw_get_var(Var);
-}
-
-
-std::string pqxx::connection_base::raw_get_var(const std::string &Var)
-{
-  // Is this variable in our local map of set variables?
-  const auto i = m_vars.find(Var);
-  if (i != m_vars.end()) return i->second;
-
-  return exec(("SHOW " + Var).c_str(), 0).at(0).at(0).as(std::string{});
-}
-
-
-void pqxx::connection_base::clearcaps() noexcept
-{
-  m_caps.reset();
-}
-
-
-/** Set up various parts of logical connection state that may need to be
- * recovered because the physical connection to the database was lost and is
- * being reset, or that may not have been initialized yet.
- */
-void pqxx::connection_base::set_up_state()
-{
-  if (m_conn == nullptr)
-    throw internal_error{"set_up_state() on no connection"};
-
-  if (status() != CONNECTION_OK)
-  {
-    const auto msg = err_msg();
-    m_conn = m_policy.do_disconnect(m_conn);
-    throw failure{msg};
-  }
-
-  read_capabilities();
-
-  for (auto &p: m_prepared) p.second.registered = false;
-
-  // The default notice processor in libpq writes to stderr.  Ours does
-  // nothing.
-  // If the caller registers an error handler, this gets replaced with an
-  // error handler that walks down the connection's chain of handlers.  We
-  // don't do that by default because there's a danger: libpq may call the
-  // notice processor via a result object, even after the connection has been
-  // destroyed and the handlers list no longer exists.
-  clear_notice_processor();
-
-  internal_set_trace();
-
-  if (not m_receivers.empty() or not m_vars.empty())
-  {
-    std::stringstream restore_query;
-
-    // Pipeline all queries needed to restore receivers and variables, so we can
-    // send them over in one go.
-
-    // Reinstate all active receivers
-    if (not m_receivers.empty())
-    {
-      std::string Last;
-      for (auto &i: m_receivers)
-      {
-        // m_receivers can handle multiple receivers waiting on the same event;
-        // issue just one LISTEN for each event.
-        if (i.first != Last)
-        {
-          restore_query << "LISTEN " << quote_name(i.first) << "; ";
-          Last = i.first;
-        }
-      }
-    }
-
-    for (auto &i: m_vars)
-      restore_query << "SET " << i.first << "=" << i.second << "; ";
-
-    // Now do the whole batch at once
-    PQsendQuery(m_conn, restore_query.str().c_str());
-    result r;
-    do
-      r = make_result(PQgetResult(m_conn), "[RECONNECT]");
-    while (gate::result_connection(r));
-  }
-
-  m_completed = true;
-  if (not is_open()) throw broken_connection{};
-}
-
-
-void pqxx::connection_base::check_result(const result &R)
-{
-  if (not is_open()) throw broken_connection{};
-
-  // A shame we can't quite detect out-of-memory to turn this into a bad_alloc!
-  if (not gate::result_connection{R}) throw failure(err_msg());
-
-  gate::result_creation{R}.check_status();
-}
-
-
-void pqxx::connection_base::disconnect() noexcept
-{
-  // When we activate again, the server may be different!
-  clearcaps();
-
-  m_conn = m_policy.do_disconnect(m_conn);
-}
-
-
-bool pqxx::connection_base::is_open() const noexcept
-{
-  return m_conn and m_completed and (status() == CONNECTION_OK);
-}
-
-
-void pqxx::connection_base::process_notice_raw(const char msg[]) noexcept
-{
-  if ((msg == nullptr) or (*msg == '\0')) return;
-  const auto
-	rbegin = m_errorhandlers.crbegin(),
-	rend = m_errorhandlers.crend();
-  for (auto i = rbegin; (i != rend) and (**i)(msg); ++i) ;
-}
-
-
-void pqxx::connection_base::process_notice(const char msg[]) noexcept
-{
-  if (msg == nullptr) return;
-  const auto len = strlen(msg);
-  if (len == 0) return;
-  if (msg[len-1] == '\n')
-  {
-    process_notice_raw(msg);
-  }
-  else try
-  {
-    // Newline is missing.  Try the C++ string version of this function.
-    process_notice(std::string{msg});
-  }
-  catch (const std::exception &)
-  {
-    // If we can't even do that, use plain old buffer copying instead
-    // (unavoidably, this will break up overly long messages!)
-    const char separator[] = "[...]\n";
-    char buf[1007];
-    size_t bytes = sizeof(buf)-sizeof(separator)-1;
-    size_t written;
-    strcpy(&buf[bytes], separator);
-    // Write all chunks but last.  Each will fill the buffer exactly.
-    for (written = 0; (written+bytes) < len; written += bytes)
-    {
-      memcpy(buf, &msg[written], bytes);
-      process_notice_raw(buf);
-    }
-    // Write any remaining bytes (which won't fill an entire buffer)
-    bytes = len-written;
-    memcpy(buf, &msg[written], bytes);
-    // Add trailing nul byte, plus newline unless there already is one
-    strcpy(&buf[bytes], &"\n"[buf[bytes-1]=='\n']);
-    process_notice_raw(buf);
-  }
-}
-
-
-void pqxx::connection_base::process_notice(const std::string &msg) noexcept
-{
-  // Ensure that message passed to errorhandler ends in newline
-  if (msg[msg.size()-1] == '\n')
-  {
-    process_notice_raw(msg.c_str());
-  }
-  else try
-  {
-    const std::string nl = msg + "\n";
-    process_notice_raw(nl.c_str());
-  }
-  catch (const std::exception &)
-  {
-    // If nothing else works, try writing the message without the newline
-    process_notice_raw(msg.c_str());
-    // This is ugly.
-    process_notice_raw("\n");
-  }
-}
-
-
-void pqxx::connection_base::trace(FILE *Out) noexcept
-{
-  m_trace = Out;
-  if (m_conn) internal_set_trace();
-}
-
-
-void pqxx::connection_base::add_receiver(pqxx::notification_receiver *T)
-{
-  if (T == nullptr) throw argument_error{"Null receiver registered"};
-
-  // Add to receiver list and attempt to start listening.
-  const auto p = m_receivers.find(T->channel());
-  const receiver_list::value_type NewVal(T->channel(), T);
-
-  if (p == m_receivers.end())
-  {
-    // Not listening on this event yet, start doing so.
-    const std::string LQ("LISTEN " + quote_name(T->channel()));
-
-    if (is_open()) try
-    {
-      check_result(make_result(PQexec(m_conn, LQ.c_str()), LQ));
-    }
-    catch (const broken_connection &)
-    {
-    }
-    m_receivers.insert(NewVal);
-  }
-  else
-  {
-    m_receivers.insert(p, NewVal);
-  }
-}
-
-
-void pqxx::connection_base::remove_receiver(pqxx::notification_receiver *T)
-	noexcept
-{
-  if (T == nullptr) return;
-
-  try
-  {
-    const std::pair<const std::string, notification_receiver *> needle{
-	T->channel(), T};
-    auto R = m_receivers.equal_range(needle.first);
-    const auto i = find(R.first, R.second, needle);
-
-    if (i == R.second)
-    {
-      process_notice(
-	"Attempt to remove unknown receiver '" + needle.first + "'");
-    }
-    else
-    {
-      // Erase first; otherwise a notification for the same receiver may yet
-      // come in and wreak havoc.  Thanks Dragan Milenkovic.
-      const bool gone = (m_conn and (R.second == ++R.first));
-      m_receivers.erase(i);
-      if (gone) exec(("UNLISTEN " + quote_name(needle.first)).c_str(), 0);
-    }
-  }
-  catch (const std::exception &e)
-  {
-    process_notice(e.what());
-  }
-}
-
-
-bool pqxx::connection_base::consume_input() noexcept
-{
-  return PQconsumeInput(m_conn) != 0;
-}
-
-
-bool pqxx::connection_base::is_busy() const noexcept
-{
-  return PQisBusy(m_conn) != 0;
-}
-
-
-namespace
-{
-/// Stateful libpq "cancel" operation.
-class cancel_wrapper
-{
-  PGcancel *m_cancel;
-  char m_errbuf[500];
-
-public:
-  explicit cancel_wrapper(PGconn *conn) :
-    m_cancel{nullptr},
-    m_errbuf{}
-  {
-    if (conn)
-    {
-      m_cancel = PQgetCancel(conn);
-      if (m_cancel == nullptr) throw std::bad_alloc{};
-    }
-  }
-  ~cancel_wrapper() { if (m_cancel) PQfreeCancel(m_cancel); }
-
-  void operator()()
-  {
-    if (not m_cancel) return;
-    if (PQcancel(m_cancel, m_errbuf, int{sizeof(m_errbuf)}) == 0)
-      throw sql_error{std::string{m_errbuf}};
-  }
-};
-}
-
-
-void pqxx::connection_base::cancel_query()
-{
-  cancel_wrapper cancel{m_conn};
-  cancel();
-}
-
-
-void pqxx::connection_base::set_verbosity(error_verbosity verbosity) noexcept
-{
-    PQsetErrorVerbosity(m_conn, static_cast<PGVerbosity>(verbosity));
-    m_verbosity = verbosity;
-}
-
-
-namespace
-{
-/// Unique pointer to PGnotify.
-using notify_ptr = std::unique_ptr<PGnotify, void (*)(PGnotify *)>;
-
-
-/// Get one notification from a connection, or null.
-notify_ptr get_notif(pqxx::internal::pq::PGconn *conn)
-{
-  return notify_ptr(PQnotifies(conn), freepqmem_templated<PGnotify>);
-}
-}
-
-
-int pqxx::connection_base::get_notifs()
-{
-  if (not is_open()) return 0;
-
-  if (not consume_input()) throw broken_connection{};
-
-  // Even if somehow we receive notifications during our transaction, don't
-  // deliver them.
-  if (m_trans.get()) return 0;
-
-  int notifs = 0;
-  for (auto N = get_notif(m_conn); N.get(); N = get_notif(m_conn))
-  {
-    notifs++;
-
-    const auto Hit = m_receivers.equal_range(std::string{N->relname});
-    for (auto i = Hit.first; i != Hit.second; ++i) try
-    {
-      (*i->second)(N->extra, N->be_pid);
-    }
-    catch (const std::exception &e)
-    {
-      try
-      {
-        process_notice(
-		"Exception in notification receiver '" +
-		i->first +
-		"': " +
-		e.what() +
-		"\n");
-      }
-      catch (const std::bad_alloc &)
-      {
-        // Out of memory.  Try to get the message out in a more robust way.
-        process_notice(
-		"Exception in notification receiver, "
-		"and also ran out of memory\n");
-      }
-      catch (const std::exception &)
-      {
-        process_notice(
-		"Exception in notification receiver "
-		"(compounded by other error)\n");
-      }
-    }
-
-    N.reset();
-  }
-  return notifs;
-}
-
-
-const char *pqxx::connection_base::dbname()
-{
-#include <pqxx/internal/ignore-deprecated-pre.hxx>
-  if (m_conn == nullptr) activate();
-#include <pqxx/internal/ignore-deprecated-post.hxx>
-  return PQdb(m_conn);
-}
-
-
-const char *pqxx::connection_base::username()
-{
-#include <pqxx/internal/ignore-deprecated-pre.hxx>
-  if (m_conn == nullptr) activate();
-#include <pqxx/internal/ignore-deprecated-post.hxx>
-  return PQuser(m_conn);
-}
-
-
-const char *pqxx::connection_base::hostname()
-{
-#include <pqxx/internal/ignore-deprecated-pre.hxx>
-  if (m_conn == nullptr) activate();
-#include <pqxx/internal/ignore-deprecated-post.hxx>
-  return PQhost(m_conn);
-}
-
-
-const char *pqxx::connection_base::port()
-{
-#include <pqxx/internal/ignore-deprecated-pre.hxx>
-  if (m_conn == nullptr) activate();
-#include <pqxx/internal/ignore-deprecated-post.hxx>
-  return PQport(m_conn);
-}
-
-
-const char *pqxx::connection_base::err_msg() const noexcept
-{
-  return m_conn ? PQerrorMessage(m_conn) : "No connection to database";
-}
-
-
-void pqxx::connection_base::clear_notice_processor()
-{
-  PQsetNoticeProcessor(m_conn, inert_notice_processor, nullptr);
-}
-
-
-void pqxx::connection_base::set_notice_processor()
-{
-  PQsetNoticeProcessor(m_conn, pqxx_notice_processor, this);
-}
-
-
-void pqxx::connection_base::register_errorhandler(errorhandler *handler)
-{
-  // Set notice processor on demand, i.e. only when the caller actually
-  // registers an error handler.
-  // We do this just to make it less likely that users fall into the trap
-  // where a result object may hold a notice processor derived from its parent
-  // connection which has already been destroyed.  Our notice processor goes
-  // through the connection's list of error handlers.  If the connection object
-  // has already been destroyed though, that list no longer exists.
-  // By setting the notice processor on demand, we absolve users who never
-  // register an error handler from ahving to care about this nasty subtlety.
-  if (m_errorhandlers.empty()) set_notice_processor();
-  m_errorhandlers.push_back(handler);
-}
-
-
-void pqxx::connection_base::unregister_errorhandler(errorhandler *handler)
-  noexcept
-{
-  // The errorhandler itself will take care of nulling its pointer to this
-  // connection.
-  m_errorhandlers.remove(handler);
-  if (m_errorhandlers.empty()) clear_notice_processor();
-}
-
-
-std::vector<errorhandler *> pqxx::connection_base::get_errorhandlers() const
-{
-  return std::vector<errorhandler *>{
-    std::begin(m_errorhandlers), std::end(m_errorhandlers)};
-}
-
-
-pqxx::result pqxx::connection_base::exec(const char Query[], int Retries)
-{
-#include <pqxx/internal/ignore-deprecated-pre.hxx>
-  activate();
-#include <pqxx/internal/ignore-deprecated-post.hxx>
-
-  auto R = make_result(PQexec(m_conn, Query), Query);
-
-  while ((Retries > 0) and not gate::result_connection{R} and not is_open())
-  {
-    Retries--;
-    reset();
-    if (is_open()) R = make_result(PQexec(m_conn, Query), Query);
-  }
-
-  check_result(R);
-
-  get_notifs();
-  return R;
-}
-
-
-void pqxx::connection_base::prepare(
-	const std::string &name,
-	const std::string &definition)
-{
-  auto i = m_prepared.find(name);
-  if (i != m_prepared.end())
-  {
-    if (definition != i->second.definition)
-    {
-      if (not name.empty())
-        throw argument_error{
-		"Inconsistent redefinition of prepared statement " + name};
-
-      i->second.registered = false;
-      i->second.definition = definition;
-    }
-  }
-  else
-  {
-    m_prepared.insert(make_pair(
-	name,
-	prepare::internal::prepared_def{definition}));
-  }
-}
-
-
-void pqxx::connection_base::prepare(const std::string &definition)
-{
-  this->prepare(std::string{}, definition);
-}
-
-
-void pqxx::connection_base::unprepare(const std::string &name)
-{
-  auto i = m_prepared.find(name);
-
-  // Quietly ignore duplicated or spurious unprepare()s
-  if (i == m_prepared.end()) return;
-
-  if (i->second.registered)
-    exec(("DEALLOCATE " + quote_name(name)).c_str(), 0);
-
-  m_prepared.erase(i);
-}
-
-
-pqxx::prepare::internal::prepared_def &
-pqxx::connection_base::find_prepared(const std::string &statement)
-{
-  auto s = m_prepared.find(statement);
-  if (s == m_prepared.end())
-    throw argument_error{"Unknown prepared statement '" + statement + "'"};
-  return s->second;
-}
-
-
-pqxx::prepare::internal::prepared_def &
-pqxx::connection_base::register_prepared(const std::string &name)
-{
-#include <pqxx/internal/ignore-deprecated-pre.hxx>
-  activate();
-#include <pqxx/internal/ignore-deprecated-post.hxx>
-  auto &s = find_prepared(name);
-
-  // "Register" (i.e., define) prepared statement with backend on demand
-  if (not s.registered)
-  {
-    auto r = make_result(
-      PQprepare(m_conn, name.c_str(), s.definition.c_str(), 0, nullptr),
-      "[PREPARE " + name + "]");
-    check_result(r);
-    s.registered = not name.empty();
-    return s;
-  }
-
-  return s;
-}
-
-
-void pqxx::connection_base::prepare_now(const std::string &name)
-{
-  register_prepared(name);
-}
-
-
-pqxx::result pqxx::connection_base::prepared_exec(
-	const std::string &statement,
-	const char *const params[],
-	const int paramlengths[],
-	const int binary[],
-	int nparams,
-	result_format format)
-{
-  register_prepared(statement);
-#include <pqxx/internal/ignore-deprecated-pre.hxx>
-  activate();
-#include <pqxx/internal/ignore-deprecated-post.hxx>
-  auto r = make_result(
-	PQexecPrepared(
-		m_conn,
-		statement.c_str(),
-		nparams,
-		params,
-		paramlengths,
-		binary,
-		format == result_format::binary? 1 : 0),
-    	statement);
-  check_result(r);
-  get_notifs();
-  return r;
-}
-
-
-pqxx::result pqxx::connection_base::exec_prepared(
-	const std::string &statement,
-	const internal::params &args,
-	result_format format)
-{
-  register_prepared(statement);
-#include <pqxx/internal/ignore-deprecated-pre.hxx>
-  activate();
-#include <pqxx/internal/ignore-deprecated-post.hxx>
-  const auto pointers = args.get_pointers();
-  const auto pq_result = PQexecPrepared(
-	m_conn,
-	statement.c_str(),
-	int(args.nonnulls.size()),
-	pointers.data(),
-	args.lengths.data(),
-	args.binaries.data(),
-	format == result_format::binary? 1 : 0);
-  const auto r = make_result(pq_result, statement);
-  check_result(r);
-  get_notifs();
-  return r;
-}
-
-
-bool pqxx::connection_base::prepared_exists(const std::string &statement) const
-{
-  auto s = m_prepared.find(statement);
-  return s != PSMap::const_iterator(m_prepared.end());
-}
-
-
-void pqxx::connection_base::reset()
-{
-  if (m_inhibit_reactivation)
-    throw broken_connection{
-	"Could not reset connection: reactivation is inhibited"};
-  if (m_reactivation_avoidance.get()) return;
-
-  // TODO: Probably need to go through a full disconnect/reconnect!
-  // Forget about any previously ongoing connection attempts
-  m_conn = m_policy.do_dropconnect(m_conn);
-  m_completed = false;
-
-  if (m_conn)
-  {
-    // Reset existing connection
-    PQreset(m_conn);
-    set_up_state();
-  }
-  else
-  {
-    // No existing connection--start a new one
-#include <pqxx/internal/ignore-deprecated-pre.hxx>
-    activate();
-#include <pqxx/internal/ignore-deprecated-post.hxx>
-  }
-}
-
-
-void pqxx::connection_base::close() noexcept
-{
-  m_completed = false;
-#include <pqxx/internal/ignore-deprecated-pre.hxx>
-  inhibit_reactivation(false);
-#include <pqxx/internal/ignore-deprecated-post.hxx>
-  m_reactivation_avoidance.clear();
-  try
-  {
-    if (m_trans.get())
-      process_notice(
-	"Closing connection while " + m_trans.get()->description() +
-	" still open");
-
-    if (not m_receivers.empty())
-    {
-      process_notice("Closing connection with outstanding receivers.");
-      m_receivers.clear();
-    }
-
-    std::list<errorhandler *> old_handlers;
-    m_errorhandlers.swap(old_handlers);
-    const auto
-	rbegin = old_handlers.crbegin(),
-	rend = old_handlers.crend();
-    for (auto i = rbegin; i!=rend; ++i)
-      gate::errorhandler_connection_base{**i}.unregister();
-
-    m_conn = m_policy.do_disconnect(m_conn);
-  }
-  catch (...)
-  {
-  }
-}
-
-
-void pqxx::connection_base::raw_set_var(
-	const std::string &Var,
-	const std::string &Value)
-{
-    exec(("SET " + Var + "=" + Value).c_str(), 0);
-}
-
-
-void pqxx::connection_base::add_variables(
-	const std::map<std::string,std::string> &Vars)
-{
-  for (auto &i: Vars) m_vars[i.first] = i.second;
-}
-
-
-void pqxx::connection_base::internal_set_trace() noexcept
-{
-  if (m_conn)
-  {
-    if (m_trace) PQtrace(m_conn, m_trace);
-    else PQuntrace(m_conn);
-  }
-}
-
-
-int pqxx::connection_base::status() const noexcept
-{
-  return PQstatus(m_conn);
-}
-
-
-void pqxx::connection_base::register_transaction(transaction_base *T)
-{
-  m_trans.register_guest(T);
-}
-
-
-void pqxx::connection_base::unregister_transaction(transaction_base *T)
-	noexcept
-{
-  try
-  {
-    m_trans.unregister_guest(T);
-  }
-  catch (const std::exception &e)
-  {
-    process_notice(e.what());
-  }
-}
-
-
-bool pqxx::connection_base::read_copy_line(std::string &Line)
-{
-  if (not is_open())
-    throw internal_error{"read_copy_line() without connection"};
-
-  Line.erase();
-  bool Result;
-
-  char *Buf = nullptr;
-  const std::string query = "[END COPY]";
-  const auto line_len = PQgetCopyData(m_conn, &Buf, false);
-  switch (line_len)
-  {
-  case -2:
-    throw failure{"Reading of table data failed: " + std::string{err_msg()}};
-
-  case -1:
-    for (
-	auto R = make_result(PQgetResult(m_conn), query);
-        gate::result_connection(R);
-	R=make_result(PQgetResult(m_conn), query)
-	)
-      check_result(R);
-    Result = false;
-    break;
-
-  case 0:
-    throw internal_error{"table read inexplicably went asynchronous"};
-
-  default:
-    if (Buf)
-    {
-      std::unique_ptr<char, void (*)(char *)> PQA(
-          Buf, freepqmem_templated<char>);
-      Line.assign(Buf, unsigned(line_len));
-    }
-    Result = true;
-  }
-
-  return Result;
-}
-
-
-void pqxx::connection_base::write_copy_line(const std::string &Line)
-{
-  if (not is_open())
-    throw internal_error{"write_copy_line() without connection"};
-
-  const std::string L = Line + '\n';
-  const char *const LC = L.c_str();
-  const auto Len = L.size();
-
-  if (PQputCopyData(m_conn, LC, int(Len)) <= 0)
-  {
-    const std::string msg = (
-        std::string{"Error writing to table: "} + err_msg());
-// TODO: PQendcopy() is documented as obsolete!
-    PQendcopy(m_conn);
-    throw failure{msg};
-  }
-}
-
-
-void pqxx::connection_base::end_copy_write()
-{
-  int Res = PQputCopyEnd(m_conn, nullptr);
-  switch (Res)
-  {
-  case -1:
-    throw failure{"Write to table failed: " + std::string{err_msg()}};
-  case 0:
-    throw internal_error{"table write is inexplicably asynchronous"};
-  case 1:
-    // Normal termination.  Retrieve result object.
-    break;
-
-  default:
-    throw internal_error{
-	"unexpected result " + to_string(Res) + " from PQputCopyEnd()"};
-  }
-
-  check_result(make_result(PQgetResult(m_conn), "[END COPY]"));
-}
-
-
-void pqxx::connection_base::start_exec(const std::string &Q)
-{
-#include <pqxx/internal/ignore-deprecated-pre.hxx>
-  activate();
-#include <pqxx/internal/ignore-deprecated-post.hxx>
-  if (PQsendQuery(m_conn, Q.c_str()) == 0) throw failure{err_msg()};
-}
-
-
-pqxx::internal::pq::PGresult *pqxx::connection_base::get_result()
-{
-  if (m_conn == nullptr) throw broken_connection{};
-  return PQgetResult(m_conn);
-}
-
-
-void pqxx::connection_base::add_reactivation_avoidance_count(int n)
-{
-  m_reactivation_avoidance.add(n);
-}
-
-
-std::string pqxx::connection_base::esc(const char str[], size_t maxlen)
-{
-  // We need a connection object...  This is the one reason why this function is
-  // not const!
-#include <pqxx/internal/ignore-deprecated-pre.hxx>
-  if (m_conn == nullptr) activate();
-#include <pqxx/internal/ignore-deprecated-post.hxx>
-
-  std::vector<char> buf(2 * maxlen + 1);
-  int err = 0;
-  // TODO: Can we make a callback-based string_view alternative to this?
-  // TODO: If we can, then quote() can wrap PQescapeLiteral()!
-  PQescapeStringConn(m_conn, buf.data(), str, maxlen, &err);
-  if (err) throw argument_error{err_msg()};
-  return std::string{buf.data()};
-}
-
-
-std::string pqxx::connection_base::esc(const char str[])
-{
-  return this->esc(str, strlen(str));
-}
-
-
-std::string pqxx::connection_base::esc(const std::string &str)
-{
-  return this->esc(str.c_str(), str.size());
-}
-
-
-std::string pqxx::connection_base::esc_raw(
-        const unsigned char str[],
-        size_t len)
-{
-  size_t bytes = 0;
-  // We need a connection object...  This is the one reason why this function is
-  // not const!
-#include <pqxx/internal/ignore-deprecated-pre.hxx>
-  activate();
-#include <pqxx/internal/ignore-deprecated-post.hxx>
-
-  std::unique_ptr<unsigned char, void (*)(unsigned char *)> buf{
-	PQescapeByteaConn(m_conn, str, len, &bytes),
-	freepqmem_templated<unsigned char>};
-  if (buf.get() == nullptr) throw std::bad_alloc{};
-  return std::string{reinterpret_cast<char *>(buf.get())};
-}
-
-
-std::string pqxx::connection_base::unesc_raw(const char *text)
-{
-  size_t len;
-  unsigned char *bytes = const_cast<unsigned char *>(
-	reinterpret_cast<const unsigned char *>(text));
-  const std::unique_ptr<unsigned char, decltype(internal::freepqmem)*> ptr{
-    PQunescapeBytea(bytes, &len),
-    internal::freepqmem};
-  return std::string{ptr.get(), ptr.get() + len};
-}
-
-
-std::string pqxx::connection_base::quote_raw(
-        const unsigned char str[],
-        size_t len)
-{
-  return "'" + esc_raw(str, len) + "'::bytea";
-}
-
-
-std::string pqxx::connection_base::quote(const binarystring &b)
-{
-  return quote_raw(b.data(), b.size());
-}
-
-
-std::string pqxx::connection_base::quote_name(const std::string &identifier)
-{
-  // We need a connection object...  This is the one reason why this function is
-  // not const!
-#include <pqxx/internal/ignore-deprecated-pre.hxx>
-  activate();
-#include <pqxx/internal/ignore-deprecated-post.hxx>
-  std::unique_ptr<char, void (*)(char *)> buf{
-	PQescapeIdentifier(m_conn, identifier.c_str(), identifier.size()),
-        freepqmem_templated<char>};
-  if (buf.get() == nullptr) throw failure{err_msg()};
-  return std::string{buf.get()};
-}
-
-
-std::string pqxx::connection_base::esc_like(
-	const std::string &str,
-	char escape_char) const
-{
-  std::string out;
-  out.reserve(str.size());
-  internal::for_glyphs(
-	internal::enc_group(encoding_id()),
-	[&out, escape_char](const char *gbegin, const char *gend)
-	{
-	  if ((gend - gbegin == 1) and (*gbegin == '_' or *gbegin == '%'))
-	    out.push_back(escape_char);
-
-          for (; gbegin != gend; ++gbegin) out.push_back(*gbegin);
-	},
-	str.c_str(),
-	str.size());
-  return out;
-}
-
-
-pqxx::internal::reactivation_avoidance_exemption::
-  reactivation_avoidance_exemption(
-	connection_base &C) :
-  m_home{C},
-  m_count{gate::connection_reactivation_avoidance_exemption(C).get_counter()},
-  m_open{C.is_open()}
-{
-  gate::connection_reactivation_avoidance_exemption gate{C};
-  gate.clear_counter();
-}
-
-
-pqxx::internal::reactivation_avoidance_exemption::
-  ~reactivation_avoidance_exemption()
-{
-  // Don't leave the connection open if reactivation avoidance is in effect and
-  // the connection needed to be reactivated temporarily.
-  if (m_count and not m_open)
-  {
-#include "pqxx/internal/ignore-deprecated-pre.hxx"
-    m_home.deactivate();
-#include "pqxx/internal/ignore-deprecated-post.hxx"
-  }
-  gate::connection_reactivation_avoidance_exemption gate{m_home};
-  gate.add_counter(m_count);
-}
-
-
-namespace
-{
-#if defined(_WIN32) || defined(HAVE_POLL)
-// Convert a timeval to milliseconds, or -1 if no timeval is given.
-inline int tv_milliseconds(timeval *tv = nullptr)
-{
-  return tv ? int(tv->tv_sec * 1000 + tv->tv_usec/1000) : -1;
-}
-#endif
-
-
-/// Wait for an fd to become free for reading/writing.  Optional timeout.
-void wait_fd(int fd, bool forwrite=false, timeval *tv=nullptr)
-{
-  if (fd < 0) throw pqxx::broken_connection{};
-
-// WSAPoll is available in winsock2.h only for versions of Windows >= 0x0600
-#if defined(_WIN32) && (_WIN32_WINNT >= 0x0600)
-  const short events = (forwrite ? POLLWRNORM : POLLRDNORM);
-  WSAPOLLFD fdarray{SOCKET(fd), events, 0};
-  WSAPoll(&fdarray, 1, tv_milliseconds(tv));
-#elif defined(HAVE_POLL)
-  const short events = short(
-        POLLERR|POLLHUP|POLLNVAL | (forwrite?POLLOUT:POLLIN));
-  pollfd pfd{fd, events, 0};
-  poll(&pfd, 1, tv_milliseconds(tv));
-#else
-  // No poll()?  Our last option is select().
-  fd_set read_fds;
-  FD_ZERO(&read_fds);
-  if (not forwrite) FD_SET(fd, &read_fds);
-
-  fd_set write_fds;
-  FD_ZERO(&write_fds);
-  if (forwrite) FD_SET(fd, &write_fds);
-
-  fd_set except_fds;
-  FD_ZERO(&except_fds);
-  FD_SET(fd, &except_fds);
-
-  select(fd+1, &read_fds, &write_fds, &except_fds, tv);
-#endif
-
-  // No need to report errors.  The caller will try to use the file
-  // descriptor right after we return, so if the file descriptor is broken,
-  // the caller will notice soon enough.
-}
-} // namespace
-
-void pqxx::internal::wait_read(const internal::pq::PGconn *c)
-{
-  wait_fd(socket_of(c));
-}
-
-
-void pqxx::internal::wait_read(
-	const internal::pq::PGconn *c,
-	long seconds,
-	long microseconds)
-{
-  // These are really supposed to be time_t and suseconds_t.  But not all
-  // platforms have that type; some use "long" instead, and some 64-bit
-  // systems use 32-bit integers here.  So "int" seems to be the only really
-  // safe type to use.
-  timeval tv = { time_t(seconds), int(microseconds) };
-  wait_fd(socket_of(c), false, &tv);
-}
-
-
-void pqxx::internal::wait_write(const internal::pq::PGconn *c)
-{
-  wait_fd(socket_of(c), true);
-}
-
-
-void pqxx::connection_base::wait_read() const
-{
-  internal::wait_read(m_conn);
-}
-
-
-void pqxx::connection_base::wait_read(long seconds, long microseconds) const
-{
-  internal::wait_read(m_conn, seconds, microseconds);
-}
-
-
-void pqxx::connection_base::wait_write() const
-{
-  internal::wait_write(m_conn);
-}
-
-
-int pqxx::connection_base::await_notification()
-{
-#include <pqxx/internal/ignore-deprecated-pre.hxx>
-  activate();
-#include <pqxx/internal/ignore-deprecated-post.hxx>
-  int notifs = get_notifs();
-  if (notifs == 0)
-  {
-    wait_read();
-    notifs = get_notifs();
-  }
-  return notifs;
-}
-
-
-int pqxx::connection_base::await_notification(long seconds, long microseconds)
-{
-#include <pqxx/internal/ignore-deprecated-pre.hxx>
-  activate();
-#include <pqxx/internal/ignore-deprecated-post.hxx>
-  int notifs = get_notifs();
-  if (notifs == 0)
-  {
-    wait_read(seconds, microseconds);
-    notifs = get_notifs();
-  }
-  return notifs;
-}
-
-
-void pqxx::connection_base::read_capabilities()
-{
-  m_serverversion = PQserverVersion(m_conn);
-  if (m_serverversion <= 90000)
-    throw feature_not_supported{
-	"Unsupported server version; 9.0 is the minimum."};
-
-  switch (protocol_version()) {
-  case 0:
-    throw broken_connection{};
-  case 1:
-  case 2:
-    throw feature_not_supported{
-        "Unsupported frontend/backend protocol version; 3.0 is the minimum."};
-  default:
-    break;
-  }
-
-  // TODO: Check for capabilities here.  Currently don't need any checks.
-}
-
-
-std::string pqxx::connection_base::adorn_name(const std::string &n)
-{
-  const std::string id = to_string(++m_unique_id);
-  return n.empty() ? ("x"+id) : (n+"_"+id);
-}
-
-
-std::string pqxx::connection_base::get_client_encoding() const
-{
-  return internal::name_encoding(encoding_id());
-}
-
-
-void pqxx::connection_base::set_client_encoding(const char encoding[])
-{
-  const auto retval = PQsetClientEncoding(m_conn, encoding);
-  switch (retval)
-  {
-  case 0:
-    // OK.
-    break;
-  case -1:
-    // TODO: Any helpful information we could give here?
-    throw failure{"Setting client encoding failed."};
-  default:
-    throw internal_error{
-	"Unexpected result from PQsetClientEncoding: " + to_string(retval)};
-  }
-}
-
-
-void pqxx::connection_base::set_client_encoding(const std::string &encoding)
-{
-  set_client_encoding(encoding.c_str());
-}
-
-
-int pqxx::connection_base::encoding_id() const
-{
-  const int enc = PQclientEncoding(m_conn);
-  if (enc == -1)
-  {
-    if (not is_open())
-      throw broken_connection{
-	"Could not obtain client encoding: not connected."};
-    throw failure{"Could not obtain client encoding."};
-  }
-  return enc;
-}
-
-
-pqxx::result pqxx::connection_base::parameterized_exec(
-	const std::string &query,
-	const char *const params[],
-	const int paramlengths[],
-	const int binaries[],
-	int nparams)
-{
-  auto r = make_result(
-  	PQexecParams(
-		m_conn,
-		query.c_str(),
-		nparams,
-		nullptr,
-		params,
-		paramlengths,
-		binaries,
-		0),
-	query);
-  check_result(r);
-  get_notifs();
-  return r;
-}
-
-
-pqxx::result pqxx::connection_base::exec_params(
-	const std::string &query,
-	const internal::params &args)
-{
-  const auto pointers = args.get_pointers();
-  const auto pq_result = PQexecParams(
-	m_conn,
-	query.c_str(),
-	int(args.nonnulls.size()),
-	nullptr,
-	pointers.data(),
-	args.lengths.data(),
-	args.binaries.data(),
-	0);
-  const auto r = make_result(pq_result, query);
-  check_result(r);
-  get_notifs();
-  return r;
-}
diff --git a/contrib/libs/libpqxx/src/cursor.cxx b/contrib/libs/libpqxx/src/cursor.cxx
deleted file mode 100644
index 8d2c7dfb25..0000000000
--- a/contrib/libs/libpqxx/src/cursor.cxx
+++ /dev/null
@@ -1,321 +0,0 @@
-/** Implementation of libpqxx STL-style cursor classes.
- *
- * These classes wrap SQL cursors in STL-like interfaces.
- *
- * Copyright (c) 2000-2019, Jeroen T. Vermeulen.
- *
- * See COPYING for copyright license.  If you did not receive a file called
- * COPYING with this source code, please notify the distributor of this mistake,
- * or contact the author.
- */
-#include "pqxx/compiler-internal.hxx"
-
-#include <iterator>
-
-#include "pqxx/cursor"
-#include "pqxx/result"
-#include "pqxx/strconv"
-#include "pqxx/transaction"
-
-#include "pqxx/internal/gates/icursor_iterator-icursorstream.hxx"
-#include "pqxx/internal/gates/icursorstream-icursor_iterator.hxx"
-
-using namespace pqxx;
-using namespace pqxx::internal;
-
-
-pqxx::cursor_base::difference_type pqxx::cursor_base::all() noexcept
-{
-  // Implemented out-of-line so we don't fall afoul of Visual Studio defining
-  // min() and max() macros, which turn this expression into malformed code:
-  return std::numeric_limits<int>::max() - 1;
-}
-
-
-pqxx::cursor_base::difference_type cursor_base::backward_all() noexcept
-{
-  // Implemented out-of-line so we don't fall afoul of Visual Studio defining
-  // min() and max() macros, which turn this expression into malformed code:
-  return std::numeric_limits<int>::min() + 1;
-}
-
-
-pqxx::cursor_base::cursor_base(
-	connection_base &context,
-	const std::string &Name,
-	bool embellish_name) :
-  m_name{embellish_name ? context.adorn_name(Name) : Name}
-{
-}
-
-
-result::size_type pqxx::internal::obtain_stateless_cursor_size(sql_cursor &cur)
-{
-  if (cur.endpos() == -1) cur.move(cursor_base::all());
-  return result::size_type(cur.endpos() - 1);
-}
-
-
-result pqxx::internal::stateless_cursor_retrieve(
-	sql_cursor &cur,
-	result::difference_type size,
-	result::difference_type begin_pos,
-	result::difference_type end_pos)
-{
-  if (begin_pos < 0 or begin_pos > size)
-    throw range_error{"Starting position out of range"};
-
-  if (end_pos < -1) end_pos = -1;
-  else if (end_pos > size) end_pos = size;
-
-  if (begin_pos == end_pos) return cur.empty_result();
-
-  const int direction = ((begin_pos < end_pos) ? 1 : -1);
-  cur.move((begin_pos-direction) - (cur.pos()-1));
-  return cur.fetch(end_pos - begin_pos);
-}
-
-
-pqxx::icursorstream::icursorstream(
-    transaction_base &context,
-    const std::string &query,
-    const std::string &basename,
-    difference_type sstride) :
-  m_cur{context,
-	query,
-	basename,
-	cursor_base::forward_only,
-	cursor_base::read_only,
-	cursor_base::owned,
-	false},
-  m_stride{sstride},
-  m_realpos{0},
-  m_reqpos{0},
-  m_iterators{nullptr},
-  m_done{false}
-{
-  set_stride(sstride);
-}
-
-
-pqxx::icursorstream::icursorstream(
-    transaction_base &context,
-    const field &cname,
-    difference_type sstride,
-    cursor_base::ownershippolicy op) :
-  m_cur{context, cname.c_str(), op},
-  m_stride{sstride},
-  m_realpos{0},
-  m_reqpos{0},
-  m_iterators{nullptr},
-  m_done{false}
-{
-  set_stride(sstride);
-}
-
-
-void pqxx::icursorstream::set_stride(difference_type n)
-{
-  if (n < 1)
-    throw argument_error{"Attempt to set cursor stride to " + to_string(n)};
-  m_stride = n;
-}
-
-result pqxx::icursorstream::fetchblock()
-{
-  const result r{m_cur.fetch(m_stride)};
-  m_realpos += r.size();
-  if (r.empty()) m_done = true;
-  return r;
-}
-
-
-icursorstream &pqxx::icursorstream::ignore(std::streamsize n)
-{
-  auto offset = m_cur.move(difference_type(n));
-  m_realpos += offset;
-  if (offset < n) m_done = true;
-  return *this;
-}
-
-
-icursorstream::size_type pqxx::icursorstream::forward(size_type n)
-{
-  m_reqpos += difference_type(n) * m_stride;
-  return icursorstream::size_type(m_reqpos);
-}
-
-
-void pqxx::icursorstream::insert_iterator(icursor_iterator *i) noexcept
-{
-  gate::icursor_iterator_icursorstream{*i}.set_next(m_iterators);
-  if (m_iterators)
-    gate::icursor_iterator_icursorstream{*m_iterators}.set_prev(i);
-  m_iterators = i;
-}
-
-
-void pqxx::icursorstream::remove_iterator(icursor_iterator *i) const noexcept
-{
-  gate::icursor_iterator_icursorstream igate{*i};
-  if (i == m_iterators)
-  {
-    m_iterators = igate.get_next();
-    if (m_iterators)
-      gate::icursor_iterator_icursorstream{*m_iterators}.set_prev(nullptr);
-  }
-  else
-  {
-    auto prev = igate.get_prev(), next = igate.get_next();
-    gate::icursor_iterator_icursorstream{*prev}.set_next(next);
-    if (next) gate::icursor_iterator_icursorstream{*next}.set_prev(prev);
-  }
-  igate.set_prev(nullptr);
-  igate.set_next(nullptr);
-}
-
-
-void pqxx::icursorstream::service_iterators(difference_type topos)
-{
-  if (topos < m_realpos) return;
-
-  using todolist = std::multimap<difference_type,icursor_iterator*>;
-  todolist todo;
-  for (icursor_iterator *i = m_iterators, *next; i; i = next)
-  {
-    gate::icursor_iterator_icursorstream gate{*i};
-    const auto ipos = gate.pos();
-    if (ipos >= m_realpos and ipos <= topos)
-      todo.insert(todolist::value_type(ipos, i));
-    next = gate.get_next();
-  }
-  const auto todo_end = std::end(todo);
-  for (auto i = std::begin(todo); i != todo_end; )
-  {
-    const auto readpos = i->first;
-    if (readpos > m_realpos) ignore(readpos - m_realpos);
-    const result r = fetchblock();
-    for ( ; i != todo_end and i->first == readpos; ++i)
-      gate::icursor_iterator_icursorstream{*i->second}.fill(r);
-  }
-}
-
-
-pqxx::icursor_iterator::icursor_iterator() noexcept :
-  m_pos{0}
-{
-}
-
-
-pqxx::icursor_iterator::icursor_iterator(istream_type &s) noexcept :
-  m_stream{&s},
-  m_pos{difference_type(gate::icursorstream_icursor_iterator(s).forward(0))}
-{
-  gate::icursorstream_icursor_iterator{*m_stream}.insert_iterator(this);
-}
-
-
-pqxx::icursor_iterator::icursor_iterator(const icursor_iterator &rhs)
-	noexcept :
-  m_stream{rhs.m_stream},
-  m_here{rhs.m_here},
-  m_pos{rhs.m_pos}
-{
-  if (m_stream)
-    gate::icursorstream_icursor_iterator{*m_stream}.insert_iterator(this);
-}
-
-
-pqxx::icursor_iterator::~icursor_iterator() noexcept
-{
-  if (m_stream)
-    gate::icursorstream_icursor_iterator{*m_stream}.remove_iterator(this);
-}
-
-
-icursor_iterator pqxx::icursor_iterator::operator++(int)
-{
-  icursor_iterator old{*this};
-  m_pos = difference_type(
-	gate::icursorstream_icursor_iterator{*m_stream}.forward());
-  m_here.clear();
-  return old;
-}
-
-
-icursor_iterator &pqxx::icursor_iterator::operator++()
-{
-  m_pos = difference_type(
-	gate::icursorstream_icursor_iterator{*m_stream}.forward());
-  m_here.clear();
-  return *this;
-}
-
-
-icursor_iterator &pqxx::icursor_iterator::operator+=(difference_type n)
-{
-  if (n <= 0)
-  {
-    if (n == 0) return *this;
-    throw argument_error{"Advancing icursor_iterator by negative offset."};
-  }
-  m_pos = difference_type(
-	gate::icursorstream_icursor_iterator{*m_stream}.forward(
-		icursorstream::size_type(n)));
-  m_here.clear();
-  return *this;
-}
-
-
-icursor_iterator &
-pqxx::icursor_iterator::operator=(const icursor_iterator &rhs) noexcept
-{
-  if (rhs.m_stream == m_stream)
-  {
-    m_here = rhs.m_here;
-    m_pos = rhs.m_pos;
-  }
-  else
-  {
-    if (m_stream)
-      gate::icursorstream_icursor_iterator{*m_stream}.remove_iterator(this);
-    m_here = rhs.m_here;
-    m_pos = rhs.m_pos;
-    m_stream = rhs.m_stream;
-    if (m_stream)
-      gate::icursorstream_icursor_iterator{*m_stream}.insert_iterator(this);
-  }
-  return *this;
-}
-
-
-bool pqxx::icursor_iterator::operator==(const icursor_iterator &rhs) const
-{
-  if (m_stream == rhs.m_stream) return pos() == rhs.pos();
-  if (m_stream and rhs.m_stream) return false;
-  refresh();
-  rhs.refresh();
-  return m_here.empty() and rhs.m_here.empty();
-}
-
-
-bool pqxx::icursor_iterator::operator<(const icursor_iterator &rhs) const
-{
-  if (m_stream == rhs.m_stream) return pos() < rhs.pos();
-  refresh();
-  rhs.refresh();
-  return not m_here.empty();
-}
-
-
-void pqxx::icursor_iterator::refresh() const
-{
-  if (m_stream)
-    gate::icursorstream_icursor_iterator{*m_stream}.service_iterators(pos());
-}
-
-
-void pqxx::icursor_iterator::fill(const result &r)
-{
-  m_here = r;
-}
diff --git a/contrib/libs/libpqxx/src/dbtransaction.cxx b/contrib/libs/libpqxx/src/dbtransaction.cxx
deleted file mode 100644
index 9d0938a181..0000000000
--- a/contrib/libs/libpqxx/src/dbtransaction.cxx
+++ /dev/null
@@ -1,99 +0,0 @@
-/** Implementation of the pqxx::dbtransaction class.
- *
- * pqxx::dbtransaction represents a real backend transaction.
- *
- * Copyright (c) 2000-2019, Jeroen T. Vermeulen.
- *
- * See COPYING for copyright license.  If you did not receive a file called
- * COPYING with this source code, please notify the distributor of this mistake,
- * or contact the author.
- */
-#include "pqxx/compiler-internal.hxx"
-
-#include "pqxx/dbtransaction"
-
-#include "pqxx/internal/gates/connection-dbtransaction.hxx"
-
-using namespace pqxx::internal;
-
-
-namespace
-{
-std::string generate_set_transaction(
-	pqxx::readwrite_policy rw,
-	const std::string &IsolationString=std::string{})
-{
-  std::string args;
-
-  if (not IsolationString.empty())
-    if (IsolationString != pqxx::isolation_traits<pqxx::read_committed>::name())
-      args += " ISOLATION LEVEL " + IsolationString;
-
-  if (rw != pqxx::read_write) args += " READ ONLY";
-
-  return args.empty() ? "BEGIN" : ("BEGIN; SET TRANSACTION" + args);
-}
-} // namespace
-
-
-pqxx::dbtransaction::dbtransaction(
-	connection_base &C,
-	const std::string &IsolationString,
-	readwrite_policy rw) :
-  namedclass{"dbtransaction"},
-  transaction_base{C},
-  m_start_cmd{generate_set_transaction(rw, IsolationString)}
-{
-}
-
-
-pqxx::dbtransaction::dbtransaction(
-	connection_base &C,
-	bool direct,
-	readwrite_policy rw) :
-  namedclass{"dbtransaction"},
-  transaction_base(C, direct),
-  m_start_cmd{generate_set_transaction(rw)}
-{
-}
-
-
-pqxx::dbtransaction::~dbtransaction()
-{
-}
-
-
-void pqxx::dbtransaction::do_begin()
-{
-  const gate::connection_dbtransaction gate(conn());
-  const int avoidance_counter = gate.get_reactivation_avoidance_count();
-  direct_exec(m_start_cmd.c_str(), avoidance_counter ? 0 : 2);
-}
-
-
-pqxx::result pqxx::dbtransaction::do_exec(const char Query[])
-{
-  try
-  {
-    return direct_exec(Query);
-  }
-  catch (const std::exception &)
-  {
-    try { abort(); } catch (const std::exception &) {}
-    throw;
-  }
-}
-
-
-void pqxx::dbtransaction::do_abort()
-{
-  reactivation_avoidance_clear();
-  direct_exec("ROLLBACK");
-}
-
-
-std::string pqxx::dbtransaction::fullname(const std::string &ttype,
-	const std::string &isolation)
-{
-  return ttype + "<" + isolation + ">";
-}
diff --git a/contrib/libs/libpqxx/src/encodings.cxx b/contrib/libs/libpqxx/src/encodings.cxx
deleted file mode 100644
index 7102c891c4..0000000000
--- a/contrib/libs/libpqxx/src/encodings.cxx
+++ /dev/null
@@ -1,826 +0,0 @@
-/** Implementation of string encodings support
- *
- * Copyright (c) 2000-2019, Jeroen T. Vermeulen.
- *
- * See COPYING for copyright license.  If you did not receive a file called
- * COPYING with this source code, please notify the distributor of this mistake,
- * or contact the author.
- */
-#include "pqxx/compiler-internal.hxx"
-
-#include "pqxx/except.hxx"
-#include "pqxx/internal/encodings.hxx"
-
-#include <cstring>
-#include <iomanip>
-#include <map>
-#include <sstream>
-
-using namespace pqxx::internal;
-
-extern "C"
-{
-#include "libpq-fe.h"
-}
-
-
-// Internal helper functions
-namespace
-{
-/// Extract byte from buffer, return as unsigned char.
-unsigned char get_byte(const char buffer[], std::string::size_type offset)
-{
-  return static_cast<unsigned char>(buffer[offset]);
-}
-
-
-[[noreturn]] void throw_for_encoding_error(
-  const char* encoding_name,
-  const char buffer[],
-  std::string::size_type start,
-  std::string::size_type count
-)
-{
-  std::stringstream s;
-  s
-    << "Invalid byte sequence for encoding "
-    << encoding_name
-    << " at byte "
-    << start
-    << ": "
-    << std::hex
-    << std::setw(2)
-    << std::setfill('0')
-  ;
-  for (std::string::size_type i{0}; i < count; ++i)
-  {
-    s << "0x" << static_cast<unsigned int>(get_byte(buffer, start + i));
-    if (i + 1 < count) s << " ";
-  }
-  throw pqxx::argument_error{s.str()};
-}
-
-
-/// Does value lie between bottom and top, inclusive?
-constexpr bool between_inc(unsigned char value, unsigned bottom, unsigned top)
-{
-  return value >= bottom and value <= top;
-}
-
-
-/*
-EUC-JP and EUC-JIS-2004 represent slightly different code points but iterate
-the same:
- * https://en.wikipedia.org/wiki/Extended_Unix_Code#EUC-JP
- * http://x0213.org/codetable/index.en.html
-*/
-std::string::size_type next_seq_for_euc_jplike(
-	const char buffer[],
-	std::string::size_type buffer_len,
-	std::string::size_type start,
-	const char encoding_name[])
-{
-  if (start >= buffer_len) return std::string::npos;
-
-  const auto byte1 = get_byte(buffer, start);
-  if (byte1 < 0x80) return start + 1;
-
-  if (start + 2 > buffer_len)
-    throw_for_encoding_error(encoding_name, buffer, start, 1);
-
-  const auto byte2 = get_byte(buffer, start + 1);
-  if (byte1 == 0x8e)
-  {
-    if (not between_inc(byte2, 0xa1, 0xfe))
-      throw_for_encoding_error(encoding_name, buffer, start, 2);
-
-    return start + 2;
-  }
-
-  if (between_inc(byte1, 0xa1, 0xfe))
-  {
-    if (not between_inc(byte2, 0xa1, 0xfe))
-      throw_for_encoding_error(encoding_name, buffer, start, 2);
-
-    return start + 2;
-  }
-
-  if (byte1 == 0x8f and start + 3 <= buffer_len)
-  {
-    const auto byte3 = get_byte(buffer, start + 2);
-    if (
-	not between_inc(byte2, 0xa1, 0xfe) or
-        not between_inc(byte3, 0xa1, 0xfe)
-      )
-      throw_for_encoding_error(encoding_name, buffer, start, 3);
-
-    return start + 3;
-  }
-
-  throw_for_encoding_error(encoding_name, buffer, start, 1);
-}
-
-/*
-As far as I can tell, for the purposes of iterating the only difference between
-SJIS and SJIS-2004 is increased range in the first byte of two-byte sequences
-(0xEF increased to 0xFC).  Officially, that is; apparently the version of SJIS
-used by Postgres has the same range as SJIS-2004.  They both have increased
-range over the documented versions, not having the even/odd restriction for the
-first byte in 2-byte sequences.
-*/
-// https://en.wikipedia.org/wiki/Shift_JIS#Shift_JIS_byte_map
-// http://x0213.org/codetable/index.en.html
-std::string::size_type next_seq_for_sjislike(
-  const char buffer[],
-  std::string::size_type buffer_len,
-  std::string::size_type start,
-  const char* encoding_name
-)
-{
-  if (start >= buffer_len) return std::string::npos;
-
-  const auto byte1 = get_byte(buffer, start);
-  if (byte1 < 0x80 or between_inc(byte1, 0xa1, 0xdf)) return start + 1;
-
-  if (
-	not between_inc(byte1, 0x81, 0x9f) and
-	not between_inc(byte1, 0xe0, 0xfc)
-  )
-    throw_for_encoding_error(encoding_name, buffer, start, 1);
-
-  if (start + 2 > buffer_len)
-    throw_for_encoding_error(
-	encoding_name,
-	buffer,
-	start,
-	buffer_len - start);
-
-  const auto byte2 = get_byte(buffer, start + 1);
-  if (byte2 == 0x7f) throw_for_encoding_error(encoding_name, buffer, start, 2);
-
-  if (between_inc(byte2, 0x40, 0x9e) or between_inc(byte2, 0x9f, 0xfc))
-    return start + 2;
-
-  throw_for_encoding_error(encoding_name, buffer, start, 2);
-}
-} // namespace
-
-
-// Implement template specializations first
-namespace pqxx
-{
-namespace internal
-{
-template<encoding_group> struct glyph_scanner
-{
-  static std::string::size_type call(
-	const char buffer[],
-	std::string::size_type buffer_len,
-	std::string::size_type start);
-};
-
-template<>
-std::string::size_type glyph_scanner<encoding_group::MONOBYTE>::call(
-  const char /* buffer */[],
-  std::string::size_type buffer_len,
-  std::string::size_type start
-)
-{
-  if (start >= buffer_len) return std::string::npos;
-  else return start + 1;
-}
-
-// https://en.wikipedia.org/wiki/Big5#Organization
-template<> std::string::size_type glyph_scanner<encoding_group::BIG5>::call(
-  const char buffer[],
-  std::string::size_type buffer_len,
-  std::string::size_type start
-)
-{
-  if (start >= buffer_len) return std::string::npos;
-
-  const auto byte1 = get_byte(buffer, start);
-  if (byte1 < 0x80) return start + 1;
-
-  if (not between_inc(byte1, 0x81, 0xfe) or (start + 2 > buffer_len))
-    throw_for_encoding_error("BIG5", buffer, start, 1);
-
-  const auto byte2 = get_byte(buffer, start + 1);
-  if (
-	not between_inc(byte2, 0x40, 0x7e) and
-	not between_inc(byte2, 0xa1, 0xfe))
-    throw_for_encoding_error("BIG5", buffer, start, 2);
-
-  return start + 2;
-}
-
-/*
-The PostgreSQL documentation claims that the EUC_* encodings are 1-3 bytes each,
-but other documents explain that the EUC sets can contain 1-(2,3,4) bytes
-depending on the specific extension:
-    EUC_CN      : 1-2
-    EUC_JP      : 1-3
-    EUC_JIS_2004: 1-2
-    EUC_KR      : 1-2
-    EUC_TW      : 1-4
-*/
-
-// https://en.wikipedia.org/wiki/GB_2312#EUC-CN
-template<> std::string::size_type glyph_scanner<encoding_group::EUC_CN>::call(
-  const char buffer[],
-  std::string::size_type buffer_len,
-  std::string::size_type start
-)
-{
-  if (start >= buffer_len) return std::string::npos;
-
-  const auto byte1 = get_byte(buffer, start);
-  if (byte1 < 0x80) return start + 1;
-
-  if (not between_inc(byte1, 0xa1, 0xf7) or start + 2 > buffer_len)
-    throw_for_encoding_error("EUC_CN", buffer, start, 1);
-
-  const auto byte2 = get_byte(buffer, start + 1);
-  if (not between_inc(byte2, 0xa1, 0xfe))
-    throw_for_encoding_error("EUC_CN", buffer, start, 2);
-
-  return start + 2;
-}
-
-template<> std::string::size_type glyph_scanner<encoding_group::EUC_JP>::call(
-  const char buffer[],
-  std::string::size_type buffer_len,
-  std::string::size_type start
-)
-{
-  return next_seq_for_euc_jplike(buffer, buffer_len, start, "EUC_JP");
-}
-
-template<>
-std::string::size_type glyph_scanner<encoding_group::EUC_JIS_2004>::call(
-  const char buffer[],
-  std::string::size_type buffer_len,
-  std::string::size_type start
-)
-{
-  return next_seq_for_euc_jplike(buffer, buffer_len, start, "EUC_JIS_2004");
-}
-
-// https://en.wikipedia.org/wiki/Extended_Unix_Code#EUC-KR
-template<> std::string::size_type glyph_scanner<encoding_group::EUC_KR>::call(
-  const char buffer[],
-  std::string::size_type buffer_len,
-  std::string::size_type start
-)
-{
-  if (start >= buffer_len) return std::string::npos;
-
-  const auto byte1 = get_byte(buffer, start);
-  if (byte1 < 0x80) return start + 1;
-
-  if (not between_inc(byte1, 0xa1, 0xfe) or start + 2 > buffer_len)
-    throw_for_encoding_error("EUC_KR", buffer, start, 1);
-
-  const auto byte2 = get_byte(buffer, start + 1);
-  if (not between_inc(byte2, 0xa1, 0xfe))
-    throw_for_encoding_error("EUC_KR", buffer, start, 1);
-
-  return start + 2;
-}
-
-// https://en.wikipedia.org/wiki/Extended_Unix_Code#EUC-TW
-template<> std::string::size_type glyph_scanner<encoding_group::EUC_TW>::call(
-  const char buffer[],
-  std::string::size_type buffer_len,
-  std::string::size_type start
-)
-{
-  if (start >= buffer_len) return std::string::npos;
-
-  const auto byte1 = get_byte(buffer, start);
-  if (byte1 < 0x80) return start + 1;
-
-  if (start + 2 > buffer_len)
-    throw_for_encoding_error("EUC_KR", buffer, start, 1);
-
-  const auto byte2 = get_byte(buffer, start + 1);
-  if (between_inc(byte1, 0xa1, 0xfe))
-  {
-    if (not between_inc(byte2, 0xa1, 0xfe))
-      throw_for_encoding_error("EUC_KR", buffer, start, 2);
-
-    return start + 2;
-  }
-
-  if (byte1 != 0x8e or start + 4 > buffer_len)
-    throw_for_encoding_error("EUC_KR", buffer, start, 1);
-
-  if (
-        between_inc(byte2, 0xa1, 0xb0) and
-        between_inc(get_byte(buffer, start + 2), 0xa1, 0xfe) and
-        between_inc(get_byte(buffer, start + 3), 0xa1, 0xfe)
-  )
-    return start + 4;
-
-  throw_for_encoding_error("EUC_KR", buffer, start, 4);
-}
-
-// https://en.wikipedia.org/wiki/GB_18030#Mapping
-template<> std::string::size_type glyph_scanner<encoding_group::GB18030>::call(
-  const char buffer[],
-  std::string::size_type buffer_len,
-  std::string::size_type start
-)
-{
-  if (start >= buffer_len) return std::string::npos;
-
-  const auto byte1 = get_byte(buffer, start);
-  if (between_inc(byte1, 0x80, 0xff)) return start + 1;
-
-  if (start + 2 > buffer_len)
-    throw_for_encoding_error("GB18030", buffer, start, buffer_len - start);
-
-  const auto byte2 = get_byte(buffer, start + 1);
-  if (between_inc(byte2, 0x40, 0xfe))
-  {
-    if (byte2 == 0x7f)
-      throw_for_encoding_error("GB18030", buffer, start, 2);
-
-    return start + 2;
-  }
-
-  if (start + 4 > buffer_len)
-    throw_for_encoding_error("GB18030", buffer, start, buffer_len - start);
-
-  if (
-	between_inc(byte2, 0x30, 0x39) and
-	between_inc(get_byte(buffer, start + 2), 0x81, 0xfe) and
-	between_inc(get_byte(buffer, start + 3), 0x30, 0x39)
-  )
-    return start + 4;
-
-  throw_for_encoding_error("GB18030", buffer, start, 4);
-}
-
-// https://en.wikipedia.org/wiki/GBK_(character_encoding)#Encoding
-template<> std::string::size_type glyph_scanner<encoding_group::GBK>::call(
-  const char buffer[],
-  std::string::size_type buffer_len,
-  std::string::size_type start
-)
-{
-  if (start >= buffer_len) return std::string::npos;
-
-  const auto byte1 = get_byte(buffer, start);
-  if (byte1 < 0x80) return start + 1;
-
-  if (start + 2 > buffer_len)
-    throw_for_encoding_error("GBK", buffer, start, 1);
-
-  const auto byte2 = get_byte(buffer, start + 1);
-  if (
-    (between_inc(byte1, 0xa1, 0xa9) and between_inc(byte2, 0xa1, 0xfe))
-    or
-    (between_inc(byte1, 0xb0, 0xf7) and between_inc(byte2, 0xa1, 0xfe))
-    or
-    (
-      between_inc(byte1, 0x81, 0xa0) and
-      between_inc(byte2, 0x40, 0xfe) and
-      byte2 != 0x7f
-    )
-    or
-    (
-      between_inc(byte1, 0xaa, 0xfe) and
-      between_inc(byte2, 0x40, 0xa0) and
-      byte2 != 0x7f
-    )
-    or
-    (
-      between_inc(byte1, 0xa8, 0xa9) and
-      between_inc(byte2, 0x40, 0xa0) and
-      byte2 != 0x7f
-    )
-    or
-    (between_inc(byte1, 0xaa, 0xaf) and between_inc(byte2, 0xa1, 0xfe))
-    or
-    (between_inc(byte1, 0xf8, 0xfe) and between_inc(byte2, 0xa1, 0xfe))
-    or
-    (
-      between_inc(byte1, 0xa1, 0xa7) and
-      between_inc(byte2, 0x40, 0xa0) and
-      byte2 != 0x7f
-    )
-  )
-    return start + 2;
-
-  throw_for_encoding_error("GBK", buffer, start, 2);
-}
-
-/*
-The PostgreSQL documentation claims that the JOHAB encoding is 1-3 bytes, but
-"CJKV Information Processing" describes it (actually just the Hangul portion)
-as "three five-bit segments" that reside inside 16 bits (2 bytes).
-
-CJKV Information Processing by Ken Lunde, pg. 269:
-
-  https://bit.ly/2BEOu5V
-*/
-template<> std::string::size_type glyph_scanner<encoding_group::JOHAB>::call(
-  const char buffer[],
-  std::string::size_type buffer_len,
-  std::string::size_type start
-)
-{
-  if (start >= buffer_len) return std::string::npos;
-
-  const auto byte1 = get_byte(buffer, start);
-  if (byte1 < 0x80) return start + 1;
-
-  if (start + 2 > buffer_len)
-    throw_for_encoding_error("JOHAB", buffer, start, 1);
-
-  const auto byte2 = get_byte(buffer, start);
-  if (
-    (
-      between_inc(byte1, 0x84, 0xd3) and
-      (between_inc(byte2, 0x41, 0x7e) or between_inc(byte2, 0x81, 0xfe))
-    )
-    or
-    (
-      (between_inc(byte1, 0xd8, 0xde) or between_inc(byte1, 0xe0, 0xf9)) and
-      (between_inc(byte2, 0x31, 0x7e) or between_inc(byte2, 0x91, 0xfe))
-    )
-  )
-    return start + 2;
-
-  throw_for_encoding_error("JOHAB", buffer, start, 2);
-}
-
-/*
-PostgreSQL's MULE_INTERNAL is the emacs rather than Xemacs implementation;
-see the server/mb/pg_wchar.h PostgreSQL header file.
-This is implemented according to the description in said header file, but I was
-unable to get it to successfully iterate a MULE-encoded test CSV generated using
-PostgreSQL 9.2.23.  Use this at your own risk.
-*/
-template<>
-std::string::size_type glyph_scanner<encoding_group::MULE_INTERNAL>::call(
-  const char buffer[],
-  std::string::size_type buffer_len,
-  std::string::size_type start
-)
-{
-  if (start >= buffer_len) return std::string::npos;
-
-  const auto byte1 = get_byte(buffer, start);
-  if (byte1 < 0x80) return start + 1;
-
-  if (start + 2 > buffer_len)
-    throw_for_encoding_error("MULE_INTERNAL", buffer, start, 1);
-
-  const auto byte2 = get_byte(buffer, start + 1);
-  if (between_inc(byte1, 0x81, 0x8d) and byte2 >= 0xA0)
-    return start + 2;
-
-  if (start + 3 > buffer_len)
-    throw_for_encoding_error("MULE_INTERNAL", buffer, start, 2);
-
-  if (
-    (
-      (byte1 == 0x9A and between_inc(byte2, 0xa0, 0xdf)) or
-      (byte1 == 0x9B and between_inc(byte2, 0xe0, 0xef)) or
-      (between_inc(byte1, 0x90, 0x99) and byte2 >= 0xa0)
-    )
-    and
-    (
-      byte2 >= 0xA0
-    )
-  )
-    return start + 3;
-
-  if (start + 4 > buffer_len)
-    throw_for_encoding_error("MULE_INTERNAL", buffer, start, 3);
-
-  if (
-    (
-      (byte1 == 0x9C and between_inc(byte2, 0xf0, 0xf4)) or
-      (byte1 == 0x9D and between_inc(byte2, 0xf5, 0xfe))
-    )
-    and
-    get_byte(buffer, start + 2) >= 0xa0 and
-    get_byte(buffer, start + 4) >= 0xa0
-  )
-    return start + 4;
-
-  throw_for_encoding_error("MULE_INTERNAL", buffer, start, 4);
-}
-
-template<> std::string::size_type glyph_scanner<encoding_group::SJIS>::call(
-  const char buffer[],
-  std::string::size_type buffer_len,
-  std::string::size_type start
-)
-{
-  return next_seq_for_sjislike(buffer, buffer_len, start, "SJIS");
-}
-
-template<>
-std::string::size_type glyph_scanner<encoding_group::SHIFT_JIS_2004>::call(
-  const char buffer[],
-  std::string::size_type buffer_len,
-  std::string::size_type start
-)
-{
-  return next_seq_for_sjislike(buffer, buffer_len, start, "SHIFT_JIS_2004");
-}
-
-// https://en.wikipedia.org/wiki/Unified_Hangul_Code
-template<> std::string::size_type glyph_scanner<encoding_group::UHC>::call(
-  const char buffer[],
-  std::string::size_type buffer_len,
-  std::string::size_type start
-)
-{
-  if (start >= buffer_len) return std::string::npos;
-
-  const auto byte1 = get_byte(buffer, start);
-  if (byte1 < 0x80) return start + 1;
-
-  if (start + 2 > buffer_len)
-    throw_for_encoding_error("UHC", buffer, start, buffer_len - start);
-
-  const auto byte2 = get_byte(buffer, start + 1);
-  if (between_inc(byte1, 0x80, 0xc6))
-  {
-    if (
-      between_inc(byte2, 0x41, 0x5a) or
-      between_inc(byte2, 0x61, 0x7a) or
-      between_inc(byte2, 0x80, 0xfe)
-    )
-      return start + 2;
-
-    throw_for_encoding_error("UHC", buffer, start, 2);
-  }
-
-  if (between_inc(byte1, 0xa1, 0xfe))
-  {
-    if (not between_inc(byte2, 0xa1, 0xfe))
-      throw_for_encoding_error("UHC", buffer, start, 2);
-
-   return start + 2;
-  }
-
-  throw_for_encoding_error("UHC", buffer, start, 1);
-}
-
-// https://en.wikipedia.org/wiki/UTF-8#Description
-template<> std::string::size_type glyph_scanner<encoding_group::UTF8>::call(
-  const char buffer[],
-  std::string::size_type buffer_len,
-  std::string::size_type start
-)
-{
-  if (start >= buffer_len) return std::string::npos;
-
-  const auto byte1 = get_byte(buffer, start);
-  if (byte1 < 0x80) return start + 1;
-
-  if (start + 2 > buffer_len)
-      throw_for_encoding_error("UTF8", buffer, start, buffer_len - start);
-
-  const auto byte2 = get_byte(buffer, start + 1);
-  if (between_inc(byte1, 0xc0, 0xdf))
-  {
-    if (not between_inc(byte2, 0x80, 0xbf))
-      throw_for_encoding_error("UTF8", buffer, start, 2);
-
-    return start + 2;
-  }
-
-  if (start + 3 > buffer_len)
-      throw_for_encoding_error("UTF8", buffer, start, buffer_len - start);
-
-  const auto byte3 = get_byte(buffer, start + 2);
-  if (between_inc(byte1, 0xe0, 0xef))
-  {
-    if (between_inc(byte2, 0x80, 0xbf) and between_inc(byte3, 0x80, 0xbf))
-      return start + 3;
-
-    throw_for_encoding_error("UTF8", buffer, start, 3);
-  }
-
-  if (start + 4 > buffer_len)
-      throw_for_encoding_error("UTF8", buffer, start, buffer_len - start);
-
-  if (between_inc(byte1, 0xf0, 0xf7))
-  {
-    if (
-      between_inc(byte2, 0x80, 0xbf) and
-      between_inc(byte3, 0x80, 0xbf) and
-      between_inc(get_byte(buffer, start + 3), 0x80, 0xbf)
-    )
-      return start + 4;
-
-    throw_for_encoding_error("UTF8", buffer, start, 4);
-  }
-
-  throw_for_encoding_error("UTF8", buffer, start, 1);
-}
-
-
-const char *name_encoding(int encoding_id)
-{
-  return pg_encoding_to_char(encoding_id);
-}
-
-
-encoding_group enc_group(int libpq_enc_id)
-{
-  return enc_group(name_encoding(libpq_enc_id));
-}
-
-
-encoding_group enc_group(const std::string& encoding_name)
-{
-  static const std::map<std::string, encoding_group> encoding_map{
-    {"BIG5", encoding_group::BIG5},
-    {"EUC_CN", encoding_group::EUC_CN},
-    {"EUC_JP", encoding_group::EUC_JP},
-    {"EUC_JIS_2004", encoding_group::EUC_JIS_2004},
-    {"EUC_KR", encoding_group::EUC_KR},
-    {"EUC_TW", encoding_group::EUC_TW},
-    {"GB18030", encoding_group::GB18030},
-    {"GBK", encoding_group::GBK},
-    {"ISO_8859_5", encoding_group::MONOBYTE},
-    {"ISO_8859_6", encoding_group::MONOBYTE},
-    {"ISO_8859_7", encoding_group::MONOBYTE},
-    {"ISO_8859_8", encoding_group::MONOBYTE},
-    {"JOHAB", encoding_group::JOHAB},
-    {"KOI8R", encoding_group::MONOBYTE},
-    {"KOI8U", encoding_group::MONOBYTE},
-    {"LATIN1", encoding_group::MONOBYTE},
-    {"LATIN2", encoding_group::MONOBYTE},
-    {"LATIN3", encoding_group::MONOBYTE},
-    {"LATIN4", encoding_group::MONOBYTE},
-    {"LATIN5", encoding_group::MONOBYTE},
-    {"LATIN6", encoding_group::MONOBYTE},
-    {"LATIN7", encoding_group::MONOBYTE},
-    {"LATIN8", encoding_group::MONOBYTE},
-    {"LATIN9", encoding_group::MONOBYTE},
-    {"LATIN10", encoding_group::MONOBYTE},
-    {"MULE_INTERNAL", encoding_group::MULE_INTERNAL},
-    {"SJIS", encoding_group::SJIS},
-    {"SHIFT_JIS_2004", encoding_group::SHIFT_JIS_2004},
-    {"SQL_ASCII", encoding_group::MONOBYTE},
-    {"UHC", encoding_group::UHC},
-    {"UTF8", encoding_group::UTF8},
-    {"WIN866", encoding_group::MONOBYTE},
-    {"WIN874", encoding_group::MONOBYTE},
-    {"WIN1250", encoding_group::MONOBYTE},
-    {"WIN1251", encoding_group::MONOBYTE},
-    {"WIN1252", encoding_group::MONOBYTE},
-    {"WIN1253", encoding_group::MONOBYTE},
-    {"WIN1254", encoding_group::MONOBYTE},
-    {"WIN1255", encoding_group::MONOBYTE},
-    {"WIN1256", encoding_group::MONOBYTE},
-    {"WIN1257", encoding_group::MONOBYTE},
-    {"WIN1258", encoding_group::MONOBYTE},
-  };
-  
-  const auto found_encoding_group = encoding_map.find(encoding_name);
-  if (found_encoding_group == encoding_map.end())
-    throw std::invalid_argument{
-      "unrecognized encoding '" + encoding_name + "'"
-    };
-  return found_encoding_group->second;
-}
-
-
-/// Look up instantiation @c T<enc>::call at runtime.
-/** Here, "T" is a struct template with a static member function "call", whose
- * type is "F".
- *
- * The return value is a pointer to the "call" member function for the
- * instantiation of T for encoding group enc.
- */
-template<template<encoding_group> class T, typename F>
-inline F *for_encoding(encoding_group enc)
-{
-
-#define CASE_GROUP(ENC) \
-	case encoding_group::ENC: return T<encoding_group::ENC>::call
-
-  switch (enc)
-  {
-  CASE_GROUP(MONOBYTE);
-  CASE_GROUP(BIG5);
-  CASE_GROUP(EUC_CN);
-  CASE_GROUP(EUC_JP);
-  CASE_GROUP(EUC_JIS_2004);
-  CASE_GROUP(EUC_KR);
-  CASE_GROUP(EUC_TW);
-  CASE_GROUP(GB18030);
-  CASE_GROUP(GBK);
-  CASE_GROUP(JOHAB);
-  CASE_GROUP(MULE_INTERNAL);
-  CASE_GROUP(SJIS);
-  CASE_GROUP(SHIFT_JIS_2004);
-  CASE_GROUP(UHC);
-  CASE_GROUP(UTF8);
-  }
-  throw pqxx::usage_error{
-	"Unsupported encoding group code " + to_string(int(enc)) + "."};
-
-#undef CASE_GROUP
-}
-
-
-glyph_scanner_func *get_glyph_scanner(encoding_group enc)
-{
-  return for_encoding<glyph_scanner, glyph_scanner_func>(enc);
-}
-
-
-template<encoding_group E> struct char_finder
-{
-  static std::string::size_type call(
-	const std::string &haystack,
-	char needle,
-	std::string::size_type start)
-  {
-    const auto buffer = haystack.c_str();
-    const auto size = haystack.size();
-    for (
-	auto here = start;
-	here + 1 <= size;
-	here = glyph_scanner<E>::call(buffer, size, here)
-    )
-    {
-      if (haystack[here] == needle) return here;
-    }
-    return std::string::npos;
-  }
-};
-
-
-template<encoding_group E> struct string_finder
-{
-  static std::string::size_type call(
-	const std::string &haystack,
-	const std::string &needle,
-	std::string::size_type start)
-  {
-    const auto buffer = haystack.c_str();
-    const auto size = haystack.size();
-    const auto needle_size = needle.size();
-    for (
-	auto here = start;
-	here + needle_size <= size;
-	here = glyph_scanner<E>::call(buffer, size, here)
-    )
-    {
-      if (std::memcmp(buffer + here, needle.c_str(), needle_size) == 0)
-        return here;
-    }
-    return std::string::npos;
-  }
-};
-
-
-std::string::size_type find_with_encoding(
-	encoding_group enc,
-	const std::string& haystack,
-	char needle,
-	std::string::size_type start
-)
-{
-  using finder_func =
-    std::string::size_type(
-	const std::string &haystack,
-	char needle,
-	std::string::size_type start);
-  const auto finder = for_encoding<char_finder, finder_func>(enc);
-  return finder(haystack, needle, start);
-}
-
-
-std::string::size_type find_with_encoding(
-	encoding_group enc,
-	const std::string& haystack,
-	const std::string& needle,
-	std::string::size_type start
-)
-{
-  using finder_func =
-    std::string::size_type(
-	const std::string &haystack,
-	const std::string &needle,
-	std::string::size_type start);
-  const auto finder = for_encoding<string_finder, finder_func>(enc);
-  return finder(haystack, needle, start);
-}
-
-#undef DISPATCH_ENCODING_OPERATION
-
-} // namespace pqxx::internal
-} // namespace pqxx
diff --git a/contrib/libs/libpqxx/src/errorhandler.cxx b/contrib/libs/libpqxx/src/errorhandler.cxx
deleted file mode 100644
index f561746f9e..0000000000
--- a/contrib/libs/libpqxx/src/errorhandler.cxx
+++ /dev/null
@@ -1,44 +0,0 @@
-/** Implementation of pqxx::errorhandler and helpers.
- *
- * pqxx::errorhandler allows programs to receive errors and warnings.
- *
- * Copyright (c) 2000-2019, Jeroen T. Vermeulen.
- *
- * See COPYING for copyright license.  If you did not receive a file called
- * COPYING with this source code, please notify the distributor of this mistake,
- * or contact the author.
- */
-#include "pqxx/compiler-internal.hxx"
-
-#include "pqxx/connection_base"
-#include "pqxx/errorhandler"
-
-#include "pqxx/internal/gates/connection-errorhandler.hxx"
-
-
-using namespace pqxx;
-using namespace pqxx::internal;
-
-
-pqxx::errorhandler::errorhandler(connection_base &conn) :
-  m_home{&conn}
-{
-  gate::connection_errorhandler{*m_home}.register_errorhandler(this);
-}
-
-
-pqxx::errorhandler::~errorhandler()
-{
-  unregister();
-}
-
-
-void pqxx::errorhandler::unregister() noexcept
-{
-  if (m_home != nullptr)
-  {
-    gate::connection_errorhandler connection_gate{*m_home};
-    m_home = nullptr;
-    connection_gate.unregister_errorhandler(this);
-  }
-}
diff --git a/contrib/libs/libpqxx/src/except.cxx b/contrib/libs/libpqxx/src/except.cxx
deleted file mode 100644
index 9dcc8a8201..0000000000
--- a/contrib/libs/libpqxx/src/except.cxx
+++ /dev/null
@@ -1,124 +0,0 @@
-/** Implementation of libpqxx exception classes.
- *
- * Copyright (c) 2000-2019, Jeroen T. Vermeulen.
- *
- * See COPYING for copyright license.  If you did not receive a file called
- * COPYING with this source code, please notify the distributor of this mistake,
- * or contact the author.
- */
-#include "pqxx/compiler-internal.hxx"
-
-#include "pqxx/except"
-
-
-pqxx::pqxx_exception::~pqxx_exception() noexcept
-{
-}
-
-
-pqxx::failure::failure(const std::string &whatarg) :
-  std::runtime_error{whatarg}
-{
-}
-
-
-pqxx::broken_connection::broken_connection() :
-  failure{"Connection to database failed"}
-{
-}
-
-
-pqxx::broken_connection::broken_connection(const std::string &whatarg) :
-  failure{whatarg}
-{
-}
-
-
-pqxx::sql_error::sql_error(
-	const std::string &whatarg,
-	const std::string &Q,
-	const char sqlstate[]) :
-  failure{whatarg},
-  m_query{Q},
-  m_sqlstate{sqlstate ? sqlstate : ""}
-{
-}
-
-
-pqxx::sql_error::~sql_error() noexcept
-{
-}
-
-
-PQXX_PURE const std::string &pqxx::sql_error::query() const noexcept
-{
-  return m_query;
-}
-
-
-PQXX_PURE const std::string &pqxx::sql_error::sqlstate() const noexcept
-{
-  return m_sqlstate;
-}
-
-
-pqxx::in_doubt_error::in_doubt_error(const std::string &whatarg) :
-  failure{whatarg}
-{
-}
-
-
-pqxx::transaction_rollback::transaction_rollback(const std::string &whatarg) :
-  failure{whatarg}
-{
-}
-
-
-pqxx::serialization_failure::serialization_failure(
-	const std::string &whatarg) :
-  transaction_rollback{whatarg}
-{
-}
-
-
-pqxx::statement_completion_unknown::statement_completion_unknown(
-	const std::string &whatarg) :
-  transaction_rollback{whatarg}
-{
-}
-
-
-pqxx::deadlock_detected::deadlock_detected(const std::string &whatarg) :
-  transaction_rollback{whatarg}
-{
-}
-
-
-pqxx::internal_error::internal_error(const std::string &whatarg) :
-  logic_error{"libpqxx internal error: " + whatarg}
-{
-}
-
-
-pqxx::usage_error::usage_error(const std::string &whatarg) :
-  logic_error{whatarg}
-{
-}
-
-
-pqxx::argument_error::argument_error(const std::string &whatarg) :
-  invalid_argument{whatarg}
-{
-}
-
-
-pqxx::conversion_error::conversion_error(const std::string &whatarg) :
-  domain_error{whatarg}
-{
-}
-
-
-pqxx::range_error::range_error(const std::string &whatarg) :
-  out_of_range{whatarg}
-{
-}
diff --git a/contrib/libs/libpqxx/src/field.cxx b/contrib/libs/libpqxx/src/field.cxx
deleted file mode 100644
index 10f0f69e2b..0000000000
--- a/contrib/libs/libpqxx/src/field.cxx
+++ /dev/null
@@ -1,77 +0,0 @@
-/** Implementation of the pqxx::field class.
- *
- * pqxx::field refers to a field in a query result.
- *
- * Copyright (c) 2000-2019, Jeroen T. Vermeulen.
- *
- * See COPYING for copyright license.  If you did not receive a file called
- * COPYING with this source code, please notify the distributor of this mistake,
- * or contact the author.
- */
-#include "pqxx/compiler-internal.hxx"
-
-#include <cstring>
-
-#include "pqxx/internal/libpq-forward.hxx"
-
-#include "pqxx/result"
-
-
-pqxx::field::field(const pqxx::row &R, pqxx::row::size_type C) noexcept :
-  m_col{static_cast<decltype(m_col)>(C)},
-  m_home{R.m_result},
-  m_row{pqxx::result_size_type(R.m_index)}
-{
-}
-
-
-bool pqxx::field::operator==(const field &rhs) const
-{
-  if (is_null() != rhs.is_null()) return false;
-  // TODO: Verify null handling decision
-  const size_type s = size();
-  if (s != rhs.size()) return false;
-  return std::memcmp(c_str(), rhs.c_str(), s) == 0;
-}
-
-
-const char *pqxx::field::name() const
-{
-  return home().column_name(col());
-}
-
-
-pqxx::oid pqxx::field::type() const
-{
-  return home().column_type(col());
-}
-
-
-pqxx::oid pqxx::field::table() const
-{
-  return home().column_table(col());
-}
-
-
-pqxx::row::size_type pqxx::field::table_column() const
-{
-  return home().table_column(col());
-}
-
-
-const char *pqxx::field::c_str() const
-{
-  return home().GetValue(idx(), col());
-}
-
-
-bool pqxx::field::is_null() const noexcept
-{
-  return home().get_is_null(idx(), col());
-}
-
-
-pqxx::field::size_type pqxx::field::size() const noexcept
-{
-  return home().get_length(idx(), col());
-}
diff --git a/contrib/libs/libpqxx/src/largeobject.cxx b/contrib/libs/libpqxx/src/largeobject.cxx
deleted file mode 100644
index 8020a2fc04..0000000000
--- a/contrib/libs/libpqxx/src/largeobject.cxx
+++ /dev/null
@@ -1,313 +0,0 @@
-/** Implementation of the Large Objects interface.
- *
- * Allows direct access to large objects, as well as though I/O streams.
- *
- * Copyright (c) 2000-2019, Jeroen T. Vermeulen.
- *
- * See COPYING for copyright license.  If you did not receive a file called
- * COPYING with this source code, please notify the distributor of this mistake,
- * or contact the author.
- */
-#include "pqxx/compiler-internal.hxx"
-
-#include <algorithm>
-#include <cerrno>
-#include <stdexcept>
-
-extern "C"
-{
-#include "libpq-fe.h"
-}
-
-#include "pqxx/largeobject"
-
-#include "pqxx/internal/gates/connection-largeobject.hxx"
-
-
-using namespace pqxx::internal;
-
-namespace
-{
-inline int StdModeToPQMode(std::ios::openmode mode)
-{
-  /// Mode bits, copied from libpq-fs.h so that we no longer need that header.
-  constexpr int
-    INV_WRITE = 0x00020000,
-    INV_READ = 0x00040000;
-
-  return
-	((mode & std::ios::in)  ? INV_READ  : 0) |
-	((mode & std::ios::out) ? INV_WRITE : 0);
-}
-
-
-inline int StdDirToPQDir(std::ios::seekdir dir) noexcept
-{
-  // TODO: Figure out whether seekdir values match C counterparts!
-#ifdef PQXX_SEEKDIRS_MATCH_C
-  return dir;
-#else
-  int pqdir;
-  switch (dir)
-  {
-  case std::ios::beg: pqdir=SEEK_SET; break;
-  case std::ios::cur: pqdir=SEEK_CUR; break;
-  case std::ios::end: pqdir=SEEK_END; break;
-
-  /* Added mostly to silence compiler warning, but also to help compiler detect
-   * cases where this function can be optimized away completely.  This latter
-   * reason should go away as soon as PQXX_SEEKDIRS_MATCH_C works.
-   */
-  default: pqdir = dir; break;
-  }
-  return pqdir;
-#endif
-}
-
-
-} // namespace
-
-
-pqxx::largeobject::largeobject(dbtransaction &T) :
-  m_id{}
-{
-  // (Mode is ignored as of postgres 8.1.)
-  m_id = lo_creat(raw_connection(T), 0);
-  if (m_id == oid_none)
-  {
-    const int err = errno;
-    if (err == ENOMEM) throw std::bad_alloc{};
-    throw failure{"Could not create large object: " + reason(T.conn(), err)};
-  }
-}
-
-
-pqxx::largeobject::largeobject(dbtransaction &T, const std::string &File) :
-  m_id{}
-{
-  m_id = lo_import(raw_connection(T), File.c_str());
-  if (m_id == oid_none)
-  {
-    const int err = errno;
-    if (err == ENOMEM) throw std::bad_alloc{};
-    throw failure{
-	"Could not import file '" + File + "' to large object: " +
-	reason(T.conn(), err)};
-  }
-}
-
-
-pqxx::largeobject::largeobject(const largeobjectaccess &O) noexcept :
-  m_id{O.id()}
-{
-}
-
-
-void pqxx::largeobject::to_file(
-	dbtransaction &T,
-	const std::string &File) const
-{
-  if (lo_export(raw_connection(T), id(), File.c_str()) == -1)
-  {
-    const int err = errno;
-    if (err == ENOMEM) throw std::bad_alloc{};
-    throw failure{
-	"Could not export large object " + to_string(m_id) + " "
-	"to file '" + File + "': " + reason(T.conn(), err)};
-  }
-}
-
-
-void pqxx::largeobject::remove(dbtransaction &T) const
-{
-  if (lo_unlink(raw_connection(T), id()) == -1)
-  {
-    const int err = errno;
-    if (err == ENOMEM) throw std::bad_alloc{};
-    throw failure{
-	"Could not delete large object " + to_string(m_id) + ": " +
-	reason(T.conn(), err)};
-  }
-}
-
-
-pqxx::internal::pq::PGconn *pqxx::largeobject::raw_connection(
-	const dbtransaction &T)
-{
-  return gate::connection_largeobject{T.conn()}.raw_connection();
-}
-
-
-std::string pqxx::largeobject::reason(const connection_base &c, int err) const
-{
-  if (err == ENOMEM) return "Out of memory";
-  if (id() == oid_none) return "No object selected";
-  return gate::const_connection_largeobject{c}.error_message();
-}
-
-
-pqxx::largeobjectaccess::largeobjectaccess(dbtransaction &T, openmode mode) :
-  largeobject{T},
-  m_trans{T}
-{
-  open(mode);
-}
-
-
-pqxx::largeobjectaccess::largeobjectaccess(
-	dbtransaction &T,
-	oid O,
-	openmode mode) :
-  largeobject{O},
-  m_trans{T}
-{
-  open(mode);
-}
-
-
-pqxx::largeobjectaccess::largeobjectaccess(
-	dbtransaction &T,
-	largeobject O,
-	openmode mode) :
-  largeobject{O},
-  m_trans{T}
-{
-  open(mode);
-}
-
-
-pqxx::largeobjectaccess::largeobjectaccess(
-	dbtransaction &T,
-	const std::string &File,
-	openmode mode) :
-  largeobject{T, File},
-  m_trans{T}
-{
-  open(mode);
-}
-
-
-pqxx::largeobjectaccess::size_type
-pqxx::largeobjectaccess::seek(size_type dest, seekdir dir)
-{
-  const auto Result = cseek(dest, dir);
-  if (Result == -1)
-  {
-    const int err = errno;
-    if (err == ENOMEM) throw std::bad_alloc{};
-    throw failure{"Error seeking in large object: " + reason(err)};
-  }
-
-  return Result;
-}
-
-
-pqxx::largeobjectaccess::pos_type
-pqxx::largeobjectaccess::cseek(off_type dest, seekdir dir) noexcept
-{
-  return lo_lseek(raw_connection(), m_fd, int(dest), StdDirToPQDir(dir));
-}
-
-
-pqxx::largeobjectaccess::pos_type
-pqxx::largeobjectaccess::cwrite(const char Buf[], size_type Len) noexcept
-{
-  return
-    std::max(
-	lo_write(raw_connection(), m_fd,const_cast<char *>(Buf), size_t(Len)),
-        -1);
-}
-
-
-pqxx::largeobjectaccess::pos_type
-pqxx::largeobjectaccess::cread(char Buf[], size_type Bytes) noexcept
-{
-  return std::max(lo_read(raw_connection(), m_fd, Buf, size_t(Bytes)), -1);
-}
-
-
-pqxx::largeobjectaccess::pos_type
-pqxx::largeobjectaccess::ctell() const noexcept
-{
-  return lo_tell(raw_connection(), m_fd);
-}
-
-
-void pqxx::largeobjectaccess::write(const char Buf[], size_type Len)
-{
-  const auto Bytes = cwrite(Buf, Len);
-  if (Bytes < Len)
-  {
-    const int err = errno;
-    if (err == ENOMEM) throw std::bad_alloc{};
-    if (Bytes < 0)
-      throw failure{
-	"Error writing to large object #" + to_string(id()) + ": " +
-	reason(err)};
-    if (Bytes == 0)
-      throw failure{
-	"Could not write to large object #" + to_string(id()) + ": " +
-	reason(err)};
-
-    throw failure{
-	"Wanted to write " + to_string(Len) + " bytes to large object #" +
-	to_string(id()) + "; " "could only write " + to_string(Bytes)};
-  }
-}
-
-
-pqxx::largeobjectaccess::size_type
-pqxx::largeobjectaccess::read(char Buf[], size_type Len)
-{
-  const auto Bytes = cread(Buf, Len);
-  if (Bytes < 0)
-  {
-    const int err = errno;
-    if (err == ENOMEM) throw std::bad_alloc{};
-    throw failure{
-	"Error reading from large object #" + to_string(id()) + ": " +
-	reason(err)};
-  }
-  return Bytes;
-}
-
-
-void pqxx::largeobjectaccess::open(openmode mode)
-{
-  m_fd = lo_open(raw_connection(), id(), StdModeToPQMode(mode));
-  if (m_fd < 0)
-  {
-    const int err = errno;
-    if (err == ENOMEM) throw std::bad_alloc{};
-    throw failure{
-	"Could not open large object " + to_string(id()) + ": " +
-	reason(err)};
-  }
-}
-
-
-void pqxx::largeobjectaccess::close() noexcept
-{
-  if (m_fd >= 0) lo_close(raw_connection(), m_fd);
-}
-
-
-pqxx::largeobjectaccess::size_type pqxx::largeobjectaccess::tell() const
-{
-  const size_type res = ctell();
-  if (res == -1) throw failure{reason(errno)};
-  return res;
-}
-
-
-std::string pqxx::largeobjectaccess::reason(int err) const
-{
-  if (m_fd == -1) return "No object opened.";
-  return largeobject::reason(m_trans.conn(), err);
-}
-
-
-void pqxx::largeobjectaccess::process_notice(const std::string &s) noexcept
-{
-  m_trans.process_notice(s);
-}
diff --git a/contrib/libs/libpqxx/src/nontransaction.cxx b/contrib/libs/libpqxx/src/nontransaction.cxx
deleted file mode 100644
index 09e13a94d0..0000000000
--- a/contrib/libs/libpqxx/src/nontransaction.cxx
+++ /dev/null
@@ -1,25 +0,0 @@
-/** Implementation of the pqxx::nontransaction class.
- *
- * pqxx::nontransaction provides nontransactional database access.
- *
- * Copyright (c) 2000-2019, Jeroen T. Vermeulen.
- *
- * See COPYING for copyright license.  If you did not receive a file called
- * COPYING with this source code, please notify the distributor of this mistake,
- * or contact the author.
- */
-#include "pqxx/compiler-internal.hxx"
-
-#include "pqxx/nontransaction"
-
-
-pqxx::nontransaction::~nontransaction()
-{
-  End();
-}
-
-
-pqxx::result pqxx::nontransaction::do_exec(const char Query[])
-{
-  return direct_exec(Query, 0);
-}
diff --git a/contrib/libs/libpqxx/src/notification.cxx b/contrib/libs/libpqxx/src/notification.cxx
deleted file mode 100644
index 391a71c1a4..0000000000
--- a/contrib/libs/libpqxx/src/notification.cxx
+++ /dev/null
@@ -1,36 +0,0 @@
-/** Implementation of the pqxx::notification_receiever class.
- *
- * pqxx::notification_receiver processes notifications.
- *
- * Copyright (c) 2000-2019, Jeroen T. Vermeulen.
- *
- * See COPYING for copyright license.  If you did not receive a file called
- * COPYING with this source code, please notify the distributor of this mistake,
- * or contact the author.
- */
-#include "pqxx/compiler-internal.hxx"
-
-#include <string>
-
-#include "pqxx/internal/gates/connection-notification_receiver.hxx"
-
-#include "pqxx/notification"
-
-
-using namespace pqxx::internal;
-
-
-pqxx::notification_receiver::notification_receiver(
-	connection_base &c,
-	const std::string &channel_name) :
-  m_conn{c},
-  m_channel{channel_name}
-{
-  gate::connection_notification_receiver{c}.add_receiver(this);
-}
-
-
-pqxx::notification_receiver::~notification_receiver()
-{
-  gate::connection_notification_receiver{this->conn()}.remove_receiver(this);
-}
diff --git a/contrib/libs/libpqxx/src/pipeline.cxx b/contrib/libs/libpqxx/src/pipeline.cxx
deleted file mode 100644
index 15b646ea3b..0000000000
--- a/contrib/libs/libpqxx/src/pipeline.cxx
+++ /dev/null
@@ -1,413 +0,0 @@
-/** Implementation of the pqxx::pipeline class.
- *
- * Throughput-optimized query interface.
- *
- * Copyright (c) 2000-2019, Jeroen T. Vermeulen.
- *
- * See COPYING for copyright license.  If you did not receive a file called
- * COPYING with this source code, please notify the distributor of this mistake,
- * or contact the author.
- */
-#include "pqxx/compiler-internal.hxx"
-
-#include <iterator>
-
-#include "pqxx/dbtransaction"
-#include "pqxx/pipeline"
-
-#include "pqxx/internal/gates/connection-pipeline.hxx"
-#include "pqxx/internal/gates/result-creation.hxx"
-
-
-using namespace pqxx;
-using namespace pqxx::internal;
-
-
-namespace
-{
-const std::string theSeparator{"; "};
-const std::string theDummyValue{"1"};
-const std::string theDummyQuery{"SELECT " + theDummyValue + theSeparator};
-}
-
-
-pqxx::pipeline::pipeline(transaction_base &t, const std::string &Name) :
-  namedclass{"pipeline", Name},
-  transactionfocus{t}
-{
-  m_issuedrange = make_pair(m_queries.end(), m_queries.end());
-  attach();
-}
-
-
-pqxx::pipeline::~pipeline() noexcept
-{
-  try { cancel(); } catch (const std::exception &) {}
-  detach();
-}
-
-
-void pqxx::pipeline::attach()
-{
-  if (not registered()) register_me();
-}
-
-
-void pqxx::pipeline::detach()
-{
-  if (registered()) unregister_me();
-}
-
-
-pipeline::query_id pqxx::pipeline::insert(const std::string &q)
-{
-  attach();
-  const query_id qid = generate_id();
-  const auto i = m_queries.insert(std::make_pair(qid,Query(q))).first;
-
-  if (m_issuedrange.second == m_queries.end())
-  {
-    m_issuedrange.second = i;
-    if (m_issuedrange.first == m_queries.end()) m_issuedrange.first = i;
-  }
-  m_num_waiting++;
-
-  if (m_num_waiting > m_retain)
-  {
-    if (have_pending()) receive_if_available();
-    if (not have_pending()) issue();
-  }
-
-  return qid;
-}
-
-
-void pqxx::pipeline::complete()
-{
-  if (have_pending()) receive(m_issuedrange.second);
-  if (m_num_waiting and (m_error == qid_limit()))
-  {
-    issue();
-    receive(m_queries.end());
-  }
-  detach();
-}
-
-
-void pqxx::pipeline::flush()
-{
-  if (not m_queries.empty())
-  {
-    if (have_pending()) receive(m_issuedrange.second);
-    m_issuedrange.first = m_issuedrange.second = m_queries.end();
-    m_num_waiting = 0;
-    m_dummy_pending = false;
-    m_queries.clear();
-  }
-  detach();
-}
-
-
-void pqxx::pipeline::cancel()
-{
-  while (have_pending())
-  {
-    gate::connection_pipeline(m_trans.conn()).cancel_query();
-    auto canceled_query = m_issuedrange.first;
-    ++m_issuedrange.first;
-    m_queries.erase(canceled_query);
-  }
-}
-
-
-bool pqxx::pipeline::is_finished(pipeline::query_id q) const
-{
-  if (m_queries.find(q) == m_queries.end())
-    throw std::logic_error{
-      "Requested status for unknown query '" + to_string(q) + "'."};
-  return
-	(QueryMap::const_iterator(m_issuedrange.first)==m_queries.end()) or
-	(q < m_issuedrange.first->first and q < m_error);
-}
-
-
-std::pair<pipeline::query_id, result> pqxx::pipeline::retrieve()
-{
-  if (m_queries.empty())
-    throw std::logic_error{"Attempt to retrieve result from empty pipeline."};
-  return retrieve(std::begin(m_queries));
-}
-
-
-int pqxx::pipeline::retain(int retain_max)
-{
-  if (retain_max < 0)
-    throw range_error{
-	"Attempt to make pipeline retain " +
-	to_string(retain_max) + " queries"};
-
-  const int oldvalue = m_retain;
-  m_retain = retain_max;
-
-  if (m_num_waiting >= m_retain) resume();
-
-  return oldvalue;
-}
-
-
-void pqxx::pipeline::resume()
-{
-  if (have_pending()) receive_if_available();
-  if (not have_pending() and m_num_waiting)
-  {
-    issue();
-    receive_if_available();
-  }
-}
-
-
-pipeline::query_id pqxx::pipeline::generate_id()
-{
-  if (m_q_id == qid_limit())
-    throw std::overflow_error{"Too many queries went through pipeline."};
-  ++m_q_id;
-  return m_q_id;
-}
-
-
-
-void pqxx::pipeline::issue()
-{
-  // TODO: Wrap in nested transaction if available, for extra "replayability"
-
-  // Retrieve that null result for the last query, if needed
-  obtain_result();
-
-  // Don't issue anything if we've encountered an error
-  if (m_error < qid_limit()) return;
-
-  // Start with oldest query (lowest id) not in previous issue range
-  auto oldest = m_issuedrange.second;
-
-  // Construct cumulative query string for entire batch
-  std::string cum = separated_list(
-          theSeparator, oldest, m_queries.end(),
-          [](QueryMap::const_iterator i){return i->second.get_query();});
-  const auto num_issued = QueryMap::size_type(std::distance(
-	oldest, m_queries.end()));
-  const bool prepend_dummy = (num_issued > 1);
-  if (prepend_dummy) cum = theDummyQuery + cum;
-
-  gate::connection_pipeline{m_trans.conn()}.start_exec(cum);
-
-  // Since we managed to send out these queries, update state to reflect this
-  m_dummy_pending = prepend_dummy;
-  m_issuedrange.first = oldest;
-  m_issuedrange.second = m_queries.end();
-  m_num_waiting -= int(num_issued);
-}
-
-
-void pqxx::pipeline::internal_error(const std::string &err)
-{
-  set_error_at(0);
-  throw pqxx::internal_error{err};
-}
-
-
-bool pqxx::pipeline::obtain_result(bool expect_none)
-{
-  gate::connection_pipeline gate{m_trans.conn()};
-  const auto r = gate.get_result();
-  if (r == nullptr)
-  {
-    if (have_pending() and not expect_none)
-    {
-      set_error_at(m_issuedrange.first->first);
-      m_issuedrange.second = m_issuedrange.first;
-    }
-    return false;
-  }
-
-  const result res = gate::result_creation::create(
-	r, std::begin(m_queries)->second.get_query(),
-        internal::enc_group(m_trans.conn().encoding_id()));
-
-  if (not have_pending())
-  {
-    set_error_at(std::begin(m_queries)->first);
-    throw std::logic_error{
-      "Got more results from pipeline than there were queries."};
-  }
-
-  // Must be the result for the oldest pending query
-  if (not m_issuedrange.first->second.get_result().empty())
-    internal_error("Multiple results for one query.");
-
-  m_issuedrange.first->second.set_result(res);
-  ++m_issuedrange.first;
-
-  return true;
-}
-
-
-void pqxx::pipeline::obtain_dummy()
-{
-  gate::connection_pipeline gate{m_trans.conn()};
-  const auto r = gate.get_result();
-  m_dummy_pending = false;
-
-  if (r == nullptr)
-    internal_error("Pipeline got no result from backend when it expected one.");
-
-  result R = gate::result_creation::create(
-        r,
-        "[DUMMY PIPELINE QUERY]",
-        internal::enc_group(m_trans.conn().encoding_id()));
-
-  bool OK = false;
-  try
-  {
-    gate::result_creation{R}.check_status();
-    OK = true;
-  }
-  catch (const sql_error &)
-  {
-  }
-  if (OK)
-  {
-    if (R.size() > 1)
-      internal_error("Unexpected result for dummy query in pipeline.");
-
-    if (std::string{R.at(0).at(0).c_str()} != theDummyValue)
-      internal_error("Dummy query in pipeline returned unexpected value.");
-    return;
-  }
-
-  /* Since none of the queries in the batch were actually executed, we can
-   * afford to replay them one by one until we find the exact query that
-   * caused the error.  This gives us not only a more specific error message
-   * to report, but also tells us which query to report it for.
-   */
-  // First, give the whole batch the same syntax error message, in case all else
-  // is going to fail.
-  for (auto i = m_issuedrange.first; i != m_issuedrange.second; ++i)
-    i->second.set_result(R);
-
-  // Remember where the end of this batch was
-  const auto stop = m_issuedrange.second;
-
-  // Retrieve that null result for the last query, if needed
-  obtain_result(true);
-
-
-  // Reset internal state to forget botched batch attempt
-  m_num_waiting += int(std::distance(m_issuedrange.first, stop));
-  m_issuedrange.second = m_issuedrange.first;
-
-  // Issue queries in failed batch one at a time.
-  unregister_me();
-  try
-  {
-    do
-    {
-      m_num_waiting--;
-      const std::string &query = m_issuedrange.first->second.get_query();
-      const result res{m_trans.exec(query)};
-      m_issuedrange.first->second.set_result(res);
-      gate::result_creation{res}.check_status();
-      ++m_issuedrange.first;
-    }
-    while (m_issuedrange.first != stop);
-  }
-  catch (const std::exception &)
-  {
-    const query_id thud = m_issuedrange.first->first;
-    ++m_issuedrange.first;
-    m_issuedrange.second = m_issuedrange.first;
-    auto q = m_issuedrange.first;
-    set_error_at( (q == m_queries.end()) ?  thud + 1 : q->first);
-  }
-}
-
-
-std::pair<pipeline::query_id, result>
-pqxx::pipeline::retrieve(pipeline::QueryMap::iterator q)
-{
-  if (q == m_queries.end())
-    throw std::logic_error{"Attempt to retrieve result for unknown query."};
-
-  if (q->first >= m_error)
-    throw std::runtime_error{
-	"Could not complete query in pipeline due to error in earlier query."};
-
-  // If query hasn't issued yet, do it now
-  if (m_issuedrange.second != m_queries.end() and
-      (q->first >= m_issuedrange.second->first))
-  {
-    if (have_pending()) receive(m_issuedrange.second);
-    if (m_error == qid_limit()) issue();
-  }
-
-  // If result not in yet, get it; else get at least whatever's convenient
-  if (have_pending())
-  {
-    if (q->first >= m_issuedrange.first->first)
-    {
-      auto suc = q;
-      ++suc;
-      receive(suc);
-    }
-    else
-    {
-      receive_if_available();
-    }
-  }
-
-  if (q->first >= m_error)
-    throw std::runtime_error{
-	"Could not complete query in pipeline due to error in earlier query."};
-
-  // Don't leave the backend idle if there are queries waiting to be issued
-  if (m_num_waiting and not have_pending() and (m_error==qid_limit())) issue();
-
-  const result R = q->second.get_result();
-  const auto P = std::make_pair(q->first, R);
-
-  m_queries.erase(q);
-
-  gate::result_creation{R}.check_status();
-  return P;
-}
-
-
-void pqxx::pipeline::get_further_available_results()
-{
-  gate::connection_pipeline gate{m_trans.conn()};
-  while (not gate.is_busy() and obtain_result())
-    if (not gate.consume_input()) throw broken_connection{};
-}
-
-
-void pqxx::pipeline::receive_if_available()
-{
-  gate::connection_pipeline gate{m_trans.conn()};
-  if (not gate.consume_input()) throw broken_connection{};
-  if (gate.is_busy()) return;
-
-  if (m_dummy_pending) obtain_dummy();
-  if (have_pending()) get_further_available_results();
-}
-
-
-void pqxx::pipeline::receive(pipeline::QueryMap::const_iterator stop)
-{
-  if (m_dummy_pending) obtain_dummy();
-
-  while (obtain_result() and
-         QueryMap::const_iterator{m_issuedrange.first} != stop) ;
-
-  // Also haul in any remaining "targets of opportunity"
-  if (QueryMap::const_iterator{m_issuedrange.first} == stop)
-    get_further_available_results();
-}
diff --git a/contrib/libs/libpqxx/src/prepared_statement.cxx b/contrib/libs/libpqxx/src/prepared_statement.cxx
deleted file mode 100644
index c2d7fe23f9..0000000000
--- a/contrib/libs/libpqxx/src/prepared_statement.cxx
+++ /dev/null
@@ -1,69 +0,0 @@
-/** Helper classes for defining and executing prepared statements>
- *
- * See the connection_base hierarchy for more about prepared statements.
- *
- * Copyright (c) 2000-2019, Jeroen T. Vermeulen.
- *
- * See COPYING for copyright license.  If you did not receive a file called
- * COPYING with this source code, please notify the distributor of this mistake,
- * or contact the author.
- */
-#include "pqxx/compiler-internal.hxx"
-
-#include "pqxx/connection_base"
-#include "pqxx/prepared_statement"
-#include "pqxx/result"
-#include "pqxx/transaction_base"
-
-#include "pqxx/internal/gates/connection-prepare-invocation.hxx"
-
-
-using namespace pqxx;
-using namespace pqxx::internal;
-
-
-pqxx::prepare::invocation::invocation(
-	transaction_base &home,
-	const std::string &statement) :
-  m_home{home},
-  m_statement{statement}
-{
-}
-
-pqxx::result pqxx::prepare::invocation::exec() const
-{
-    return internal_exec(result_format::text);
-}
-
-pqxx::result pqxx::prepare::invocation::exec_binary() const
-{
-    return internal_exec(result_format::binary);
-}
-
-pqxx::result pqxx::prepare::invocation::internal_exec(result_format format) const
-{
-  std::vector<const char *> ptrs;
-  std::vector<int> lens;
-  std::vector<int> binaries;
-  const int elts = marshall(ptrs, lens, binaries);
-
-  return gate::connection_prepare_invocation{m_home.conn()}.prepared_exec(
-	m_statement,
-	ptrs.data(),
-	lens.data(),
-	binaries.data(),
-	elts,
-	format);
-}
-
-bool pqxx::prepare::invocation::exists() const
-{
-  return gate::connection_prepare_invocation{m_home.conn()}.prepared_exists(
-	m_statement);
-}
-
-
-pqxx::prepare::internal::prepared_def::prepared_def(const std::string &def) :
-  definition{def}
-{
-}
diff --git a/contrib/libs/libpqxx/src/result.cxx b/contrib/libs/libpqxx/src/result.cxx
deleted file mode 100644
index fcb602d779..0000000000
--- a/contrib/libs/libpqxx/src/result.cxx
+++ /dev/null
@@ -1,454 +0,0 @@
-/** Implementation of the pqxx::result class and support classes.
- *
- * pqxx::result represents the set of result rows from a database query
- *
- * Copyright (c) 2000-2019, Jeroen T. Vermeulen.
- *
- * See COPYING for copyright license.  If you did not receive a file called
- * COPYING with this source code, please notify the distributor of this mistake,
- * or contact the author.
- */
-#include "pqxx/compiler-internal.hxx"
-
-#include <cstdlib>
-#include <cstring>
-#include <stdexcept>
-
-extern "C"
-{
-#include "libpq-fe.h"
-}
-
-#include "pqxx/except"
-#include "pqxx/result"
-
-
-const std::string pqxx::result::s_empty_string;
-
-
-/// C++ wrapper for libpq's PQclear.
-void pqxx::internal::clear_result(const pq::PGresult *data)
-{
-  PQclear(const_cast<pq::PGresult *>(data));
-}
-
-
-pqxx::result::result(
-	pqxx::internal::pq::PGresult *rhs,
-	const std::string &Query,
-        internal::encoding_group enc) :
-  m_data{make_data_pointer(rhs)},
-  m_query{std::make_shared<std::string>(Query)},
-  m_encoding(enc)
-{
-}
-
-
-bool pqxx::result::operator==(const result &rhs) const noexcept
-{
-  if (&rhs == this) return true;
-  const auto s = size();
-  if (rhs.size() != s) return false;
-  for (size_type i=0; i<s; ++i)
-    if ((*this)[i] != rhs[i]) return false;
-  return true;
-}
-
-
-pqxx::result::const_reverse_iterator pqxx::result::rbegin() const
-{
-  return const_reverse_iterator{end()};
-}
-
-
-pqxx::result::const_reverse_iterator pqxx::result::crbegin() const
-{
-  return rbegin();
-}
-
-
-pqxx::result::const_reverse_iterator pqxx::result::rend() const
-{
-  return const_reverse_iterator{begin()};
-}
-
-
-pqxx::result::const_reverse_iterator pqxx::result::crend() const
-{
-  return rend();
-}
-
-
-pqxx::result::const_iterator pqxx::result::begin() const noexcept
-{
-  return const_iterator{this, 0};
-}
-
-
-pqxx::result::const_iterator pqxx::result::cbegin() const noexcept
-{
-  return begin();
-}
-
-
-pqxx::result::size_type pqxx::result::size() const noexcept
-{
-  return m_data.get() ? size_type(PQntuples(m_data.get())) : 0;
-}
-
-
-bool pqxx::result::empty() const noexcept
-{
-  return (m_data.get() == nullptr) or (PQntuples(m_data.get()) == 0);
-}
-
-
-pqxx::result::reference pqxx::result::front() const noexcept
-{
-  return row{*this, 0};
-}
-
-
-pqxx::result::reference pqxx::result::back() const noexcept
-{
-  return row{*this, size() - 1};
-}
-
-
-void pqxx::result::swap(result &rhs) noexcept
-{
-  m_data.swap(rhs.m_data);
-  m_query.swap(rhs.m_query);
-}
-
-
-const pqxx::row pqxx::result::operator[](result_size_type i) const noexcept
-{
-  return row{*this, i};
-}
-
-
-const pqxx::row pqxx::result::at(pqxx::result::size_type i) const
-{
-  if (i >= size()) throw range_error{"Row number out of range."};
-  return operator[](i);
-}
-
-
-namespace
-{
-/// C string comparison.
-inline bool equal(const char lhs[], const char rhs[])
-{
-  return strcmp(lhs, rhs) == 0;
-}
-} // namespace
-
-void pqxx::result::ThrowSQLError(
-	const std::string &Err,
-	const std::string &Query) const
-{
-  // Try to establish more precise error type, and throw corresponding
-  // type of exception.
-  const char *const code = PQresultErrorField(m_data.get(), PG_DIAG_SQLSTATE);
-  if (code) switch (code[0])
-  {
-  case '0':
-    switch (code[1])
-    {
-    case '8':
-      throw broken_connection{Err};
-    case 'A':
-      throw feature_not_supported{Err, Query, code};
-    }
-    break;
-  case '2':
-    switch (code[1])
-    {
-    case '2':
-      throw data_exception{Err, Query, code};
-    case '3':
-      if (equal(code,"23001")) throw restrict_violation{Err, Query, code};
-      if (equal(code,"23502")) throw not_null_violation{Err, Query, code};
-      if (equal(code,"23503"))
-        throw foreign_key_violation{Err, Query, code};
-      if (equal(code,"23505")) throw unique_violation{Err, Query, code};
-      if (equal(code,"23514")) throw check_violation{Err, Query, code};
-      throw integrity_constraint_violation{Err, Query, code};
-    case '4':
-      throw invalid_cursor_state{Err, Query, code};
-    case '6':
-      throw invalid_sql_statement_name{Err, Query, code};
-    }
-    break;
-  case '3':
-    switch (code[1])
-    {
-    case '4':
-      throw invalid_cursor_name{Err, Query, code};
-    }
-    break;
-  case '4':
-    switch (code[1])
-    {
-    case '0':
-      if (equal(code, "40000")) throw transaction_rollback{Err};
-      if (equal(code, "40001")) throw serialization_failure{Err};
-      if (equal(code, "40003")) throw statement_completion_unknown{Err};
-      if (equal(code, "40P01")) throw deadlock_detected{Err};
-      break;
-    case '2':
-      if (equal(code,"42501")) throw insufficient_privilege{Err, Query};
-      if (equal(code,"42601"))
-        throw syntax_error{Err, Query, code, errorposition()};
-      if (equal(code,"42703")) throw undefined_column{Err, Query, code};
-      if (equal(code,"42883")) throw undefined_function{Err, Query, code};
-      if (equal(code,"42P01")) throw undefined_table{Err, Query, code};
-    }
-    break;
-  case '5':
-    switch (code[1])
-    {
-    case '3':
-      if (equal(code,"53100")) throw disk_full{Err, Query, code};
-      if (equal(code,"53200")) throw out_of_memory{Err, Query, code};
-      if (equal(code,"53300")) throw too_many_connections{Err};
-      throw insufficient_resources{Err, Query, code};
-    }
-    break;
-
-  case 'P':
-    if (equal(code, "P0001")) throw plpgsql_raise{Err, Query, code};
-    if (equal(code, "P0002"))
-      throw plpgsql_no_data_found{Err, Query, code};
-    if (equal(code, "P0003"))
-      throw plpgsql_too_many_rows{Err, Query, code};
-    throw plpgsql_error{Err, Query, code};
-  }
-  // Fallback: No error code.
-  throw sql_error{Err, Query, code};
-}
-
-void pqxx::result::check_status() const
-{
-  const std::string Err = StatusError();
-  if (not Err.empty()) ThrowSQLError(Err, query());
-}
-
-
-std::string pqxx::result::StatusError() const
-{
-  if (m_data.get() == nullptr) throw failure{"No result set given."};
-
-  std::string Err;
-
-  switch (PQresultStatus(m_data.get()))
-  {
-  case PGRES_EMPTY_QUERY: // The string sent to the backend was empty.
-  case PGRES_COMMAND_OK: // Successful completion of a command returning no data
-  case PGRES_TUPLES_OK: // The query successfully executed
-    break;
-
-  case PGRES_COPY_OUT: // Copy Out (from server) data transfer started
-  case PGRES_COPY_IN: // Copy In (to server) data transfer started
-    break;
-
-  case PGRES_BAD_RESPONSE: // The server's response was not understood
-  case PGRES_NONFATAL_ERROR:
-  case PGRES_FATAL_ERROR:
-    Err = PQresultErrorMessage(m_data.get());
-    break;
-
-  default:
-    throw internal_error{
-	"pqxx::result: Unrecognized response code " +
-	to_string(int(PQresultStatus(m_data.get())))};
-  }
-  return Err;
-}
-
-
-const char *pqxx::result::cmd_status() const noexcept
-{
-  return PQcmdStatus(const_cast<internal::pq::PGresult *>(m_data.get()));
-}
-
-
-const std::string &pqxx::result::query() const noexcept
-{
-  return m_query ? *m_query : s_empty_string;
-}
-
-
-pqxx::oid pqxx::result::inserted_oid() const
-{
-  if (m_data.get() == nullptr)
-    throw usage_error{
-	"Attempt to read oid of inserted row without an INSERT result"};
-  return PQoidValue(const_cast<internal::pq::PGresult *>(m_data.get()));
-}
-
-
-pqxx::result::size_type pqxx::result::affected_rows() const
-{
-  const char *const RowsStr = PQcmdTuples(
-	const_cast<internal::pq::PGresult *>(m_data.get()));
-  return RowsStr[0] ? size_type(atoi(RowsStr)) : 0;
-}
-
-
-const char *pqxx::result::GetValue(
-	pqxx::result::size_type Row,
-	pqxx::row::size_type Col) const
-{
-  return PQgetvalue(m_data.get(), int(Row), int(Col));
-}
-
-
-bool pqxx::result::get_is_null(
-	pqxx::result::size_type Row,
-	pqxx::row::size_type Col) const
-{
-  return PQgetisnull(m_data.get(), int(Row), int(Col)) != 0;
-}
-
-pqxx::field::size_type pqxx::result::get_length(
-	pqxx::result::size_type Row,
-        pqxx::row::size_type Col) const noexcept
-{
-  return field::size_type(PQgetlength(m_data.get(), int(Row), int(Col)));
-}
-
-
-pqxx::oid pqxx::result::column_type(row::size_type ColNum) const
-{
-  const oid T = PQftype(m_data.get(), int(ColNum));
-  if (T == oid_none)
-    throw argument_error{
-	"Attempt to retrieve type of nonexistent column " +
-	to_string(ColNum) + " of query result."};
-  return T;
-}
-
-
-pqxx::oid pqxx::result::column_table(row::size_type ColNum) const
-{
-  const oid T = PQftable(m_data.get(), int(ColNum));
-
-  /* If we get oid_none, it may be because the column is computed, or because we
-   * got an invalid row number.
-   */
-  if (T == oid_none and ColNum >= columns())
-    throw argument_error{
-	"Attempt to retrieve table ID for column " + to_string(ColNum) +
-	" out of " + to_string(columns())};
-
-  return T;
-}
-
-
-pqxx::row::size_type pqxx::result::table_column(row::size_type ColNum) const
-{
-  const auto n = row::size_type(PQftablecol(m_data.get(), int(ColNum)));
-  if (n != 0) return n-1;
-
-  // Failed.  Now find out why, so we can throw a sensible exception.
-  const std::string col_num = to_string(ColNum);
-  if (ColNum > columns())
-    throw range_error{"Invalid column index in table_column(): " + col_num};
-
-  if (m_data.get() == nullptr)
-    throw usage_error{
-      "Can't query origin of column " + col_num + ": "
-      "result is not initialized."};
-
-  throw usage_error{
-    "Can't query origin of column " + col_num + ": "
-    "not derived from table column."};
-}
-
-int pqxx::result::errorposition() const
-{
-  int pos = -1;
-  if (m_data.get())
-  {
-    const char *p = PQresultErrorField(
-	const_cast<internal::pq::PGresult *>(m_data.get()),
-	PG_DIAG_STATEMENT_POSITION);
-    if (p) from_string(p, pos);
-  }
-  return pos;
-}
-
-
-const char *pqxx::result::column_name(pqxx::row::size_type Number) const
-{
-  const char *const N = PQfname(m_data.get(), int(Number));
-  if (N == nullptr)
-  {
-    if (m_data.get() == nullptr)
-      throw usage_error{"Queried column name on null result."};
-    throw range_error{
-	"Invalid column number: " + to_string(Number) +
-	" (maximum is " + to_string(columns() - 1) + ")."};
-  }
-  return N;
-}
-
-
-pqxx::row::size_type pqxx::result::columns() const noexcept
-{
-  auto ptr = const_cast<internal::pq::PGresult *>(m_data.get());
-  return ptr ? row::size_type(PQnfields(ptr)) : 0;
-}
-
-
-// const_result_iterator
-
-pqxx::const_result_iterator pqxx::const_result_iterator::operator++(int)
-{
-  const_result_iterator old{*this};
-  m_index++;
-  return old;
-}
-
-
-pqxx::const_result_iterator pqxx::const_result_iterator::operator--(int)
-{
-  const_result_iterator old{*this};
-  m_index--;
-  return old;
-}
-
-
-pqxx::result::const_iterator
-pqxx::result::const_reverse_iterator::base() const noexcept
-{
-  iterator_type tmp{*this};
-  return ++tmp;
-}
-
-
-pqxx::const_reverse_result_iterator
-pqxx::const_reverse_result_iterator::operator++(int)
-{
-  const_reverse_result_iterator tmp{*this};
-  iterator_type::operator--();
-  return tmp;
-}
-
-
-pqxx::const_reverse_result_iterator
-pqxx::const_reverse_result_iterator::operator--(int)
-{
-  const_reverse_result_iterator tmp{*this};
-  iterator_type::operator++();
-  return tmp;
-}
-
-
-template<>
-std::string pqxx::to_string(const field &Obj)
-{
-  return std::string{Obj.c_str(), Obj.size()};
-}
diff --git a/contrib/libs/libpqxx/src/robusttransaction.cxx b/contrib/libs/libpqxx/src/robusttransaction.cxx
deleted file mode 100644
index fbada337df..0000000000
--- a/contrib/libs/libpqxx/src/robusttransaction.cxx
+++ /dev/null
@@ -1,317 +0,0 @@
-/** Implementation of the pqxx::robusttransaction class.
- *
- * pqxx::robusttransaction is a slower but safer transaction class.
- *
- * Copyright (c) 2000-2019, Jeroen T. Vermeulen.
- *
- * See COPYING for copyright license.  If you did not receive a file called
- * COPYING with this source code, please notify the distributor of this mistake,
- * or contact the author.
- */
-#include "pqxx/compiler-internal.hxx"
-
-#include <stdexcept>
-
-#include "pqxx/connection_base"
-#include "pqxx/result"
-#include "pqxx/robusttransaction"
-
-
-using namespace pqxx::internal;
-
-
-// TODO: Log username in more places.
-
-pqxx::internal::basic_robusttransaction::basic_robusttransaction(
-	connection_base &C,
-	const std::string &IsolationLevel,
-	const std::string &table_name) :
-  namedclass{"robusttransaction"},
-  dbtransaction(C, IsolationLevel),
-  m_log_table{table_name}
-{
-  if (table_name.empty()) m_log_table = "pqxx_robusttransaction_log";
-  m_sequence = m_log_table + "_seq";
-}
-
-
-pqxx::internal::basic_robusttransaction::~basic_robusttransaction()
-{
-}
-
-
-void pqxx::internal::basic_robusttransaction::do_begin()
-{
-  try
-  {
-    CreateTransactionRecord();
-  }
-  catch (const std::exception &)
-  {
-    // The problem here *may* be that the log table doesn't exist yet.  Create
-    // one, start a new transaction, and try again.
-    try { dbtransaction::do_abort(); } catch (const std::exception &) {}
-    CreateLogTable();
-    dbtransaction::do_begin();
-    m_backendpid = conn().backendpid();
-    CreateTransactionRecord();
-  }
-
-  dbtransaction::do_begin();
-
-  // If this transaction commits, the transaction record should also be gone.
-  direct_exec(sql_delete().c_str());
-
-  if (conn().server_version() >= 80300)
-    direct_exec("SELECT txid_current()")[0][0].to(m_xid);
-}
-
-
-
-void pqxx::internal::basic_robusttransaction::do_commit()
-{
-  if (m_record_id == 0)
-    throw internal_error{"transaction '" + name() + "' has no ID."};
-
-  // Check constraints before sending the COMMIT to the database to reduce the
-  // work being done inside our in-doubt window.
-  try
-  {
-    direct_exec("SET CONSTRAINTS ALL IMMEDIATE");
-  }
-  catch (...)
-  {
-    do_abort();
-    throw;
-  }
-
-  // Here comes the critical part.  If we lose our connection here, we'll be
-  // left clueless as to whether the backend got the message and is trying to
-  // commit the transaction (let alone whether it will succeed if so).  That
-  // case requires some special handling that makes robusttransaction what it
-  // is.
-  try
-  {
-    direct_exec("COMMIT");
-
-    // If we make it here, great.  Normal, successful commit.
-    m_record_id = 0;
-    return;
-  }
-  catch (const broken_connection &)
-  {
-    // Oops, lost connection at the crucial moment.  Fall through to in-doubt
-    // handling below.
-  }
-  catch (...)
-  {
-    if (conn().is_open())
-    {
-      // Commit failed--probably due to a constraint violation or something
-      // similar.  But we're still connected, so no worries from a consistency
-      // point of view.
-      do_abort();
-      throw;
-    }
-    // Otherwise, fall through to in-doubt handling.
-  }
-
-  // If we get here, we're in doubt.  Talk to the backend, figure out what
-  // happened.  If the transaction record still exists, the transaction failed.
-  // If not, it succeeded.
-
-  bool exists;
-  try
-  {
-    exists = CheckTransactionRecord();
-  }
-  catch (const std::exception &f)
-  {
-    // Couldn't check for transaction record.  We're still in doubt as to
-    // whether the transaction was performed.
-    const std::string Msg =
-	"WARNING: Connection lost while committing transaction "
-	"'" + name() + "' (id " + to_string(m_record_id) + ", "
-	"transaction_id " + m_xid + "). "
-	"Please check for this record in the "
-	"'" + m_log_table + "' table.  "
-	"If the record exists, the transaction was executed. "
-	"If not, then it wasn't.\n";
-
-    process_notice(Msg);
-    process_notice(
-	"Could not verify existence of transaction record because of the "
-	"following error:\n");
-    process_notice(std::string{f.what()} + "\n");
-
-    throw in_doubt_error{Msg};
-  }
-
-  // Transaction record is still there, so the transaction failed and all we
-  // have is a "normal" transaction failure.
-  if (exists)
-  {
-    do_abort();
-    throw broken_connection{"Connection lost while committing."};
-  }
-
-  // Otherwise, the transaction succeeded.  Forget there was ever an error.
-}
-
-
-void pqxx::internal::basic_robusttransaction::do_abort()
-{
-  dbtransaction::do_abort();
-  DeleteTransactionRecord();
-}
-
-
-// Create transaction log table if it didn't already exist
-void pqxx::internal::basic_robusttransaction::CreateLogTable()
-{
-  // Create log table in case it doesn't already exist.  This code must only be
-  // executed before the backend transaction has properly started.
-  std::string CrTab =
-	"CREATE TABLE " + quote_name(m_log_table) + " ("
-	"id INTEGER NOT NULL, "
-        "username VARCHAR(256), "
-	"transaction_id xid, "
-	"name VARCHAR(256), "
-	"date TIMESTAMP NOT NULL"
-	")";
-
-  try
-  {
-    direct_exec(CrTab.c_str(), 1);
-  }
-  catch (const std::exception &e)
-  {
-    conn().process_notice(
-	"Could not create transaction log table: " + std::string{e.what()});
-  }
-
-  try
-  {
-    direct_exec(("CREATE SEQUENCE " + m_sequence).c_str());
-  }
-  catch (const std::exception &e)
-  {
-    conn().process_notice(
-	"Could not create transaction log sequence: " + std::string{e.what()});
-  }
-}
-
-
-void pqxx::internal::basic_robusttransaction::CreateTransactionRecord()
-{
-  // Clean up old transaction records.
-  direct_exec((
-	"DELETE FROM " + m_log_table + " "
-	"WHERE date < CURRENT_TIMESTAMP - '30 days'::interval").c_str());
-
-  // Allocate id.
-  const std::string sql_get_id{"SELECT nextval(" + quote(m_sequence) + ")"};
-  direct_exec(sql_get_id.c_str())[0][0].to(m_record_id);
-
-  direct_exec((
-	"INSERT INTO " + quote_name(m_log_table) +
-	" (id, username, name, date) "
-	"VALUES "
-	"(" +
-	to_string(m_record_id) + ", " +
-        quote(conn().username()) + ", " +
-	(name().empty() ? "NULL" : quote(name())) + ", "
-	"CURRENT_TIMESTAMP"
-	")").c_str());
-}
-
-
-std::string pqxx::internal::basic_robusttransaction::sql_delete() const
-{
-  return
-	"DELETE FROM " + quote_name(m_log_table) + " "
-	"WHERE id = " + to_string(m_record_id);
-}
-
-
-void pqxx::internal::basic_robusttransaction::DeleteTransactionRecord()
-        noexcept
-{
-  if (m_record_id == 0) return;
-
-  try
-  {
-    const std::string Del = sql_delete();
-
-    reactivation_avoidance_exemption E(conn());
-    direct_exec(Del.c_str(), 20);
-
-    // Now that we've arrived here, we're about as sure as we can be that that
-    // record is quite dead.
-    m_record_id = 0;
-  }
-  catch (const std::exception &)
-  {
-  }
-
-  if (m_record_id != 0) try
-  {
-    process_notice(
-	"WARNING: "
-	"Failed to delete obsolete transaction record with id " +
-	to_string(m_record_id) + " ('" + name() + "'). "
-	"Please delete it manually.  Thank you.\n");
-  }
-  catch (const std::exception &)
-  {
-  }
-}
-
-
-// Attempt to establish whether transaction record with given ID still exists
-bool pqxx::internal::basic_robusttransaction::CheckTransactionRecord()
-{
-  bool hold = true;
-  for (int c=20; hold and c; internal::sleep_seconds(5), --c)
-  {
-    if (conn().server_version() > 80300)
-    {
-      const std::string query{
-	"SELECT " + m_xid + " >= txid_snapshot_xmin(txid_current_snapshot())"};
-      direct_exec(query.c_str())[0][0].to(hold);
-    }
-    else
-    {
-      /* Wait for the old backend (with the lost connection) to die.
-       *
-       * Actually this is only possible if stats_command_string (or maybe
-       * stats_start_collector?) has been set in postgresql.conf and we're
-       * running as the postgres superuser.
-       *
-       * Starting with 7.4, we could also use pg_locks.  The entry for a zombied
-       * transaction will have a "relation" field of null, a "transaction" field
-       * with the transaction ID, and "pid" set to our backend pid.  If the
-       * relation exists but no such record is found, then the transaction is no
-       * longer running.
-       */
-      const result R{direct_exec((
-	"SELECT current_query "
-	"FROM pq_stat_activity "
-	"WHERE procpid = " + to_string(m_backendpid)).c_str())};
-      hold = not R.empty();
-    }
-  }
-
-  if (hold)
-    throw in_doubt_error{
-	"Old backend process stays alive too long to wait for."};
-
-  // Now look for our transaction record
-  const std::string Find =
-        "SELECT id FROM " + quote_name(m_log_table) + " "
-        "WHERE "
-            "id = " + to_string(m_record_id) + " AND "
-            "user = " + conn().username();
-
-  return not direct_exec(Find.c_str(), 20).empty();
-}
diff --git a/contrib/libs/libpqxx/src/row.cxx b/contrib/libs/libpqxx/src/row.cxx
deleted file mode 100644
index 3ae9a19a81..0000000000
--- a/contrib/libs/libpqxx/src/row.cxx
+++ /dev/null
@@ -1,276 +0,0 @@
-/** Implementation of the pqxx::result class and support classes.
- *
- * pqxx::result represents the set of result rows from a database query.
- *
- * Copyright (c) 2000-2019, Jeroen T. Vermeulen.
- *
- * See COPYING for copyright license.  If you did not receive a file called
- * COPYING with this source code, please notify the distributor of this mistake,
- * or contact the author.
- */
-#include "pqxx/compiler-internal.hxx"
-
-#include <cstdlib>
-#include <cstring>
-
-extern "C"
-{
-#include "libpq-fe.h"
-}
-
-#include "pqxx/except"
-#include "pqxx/result"
-
-#include "pqxx/internal/gates/result-row.hxx"
-
-
-pqxx::row::row(result r, size_t i) noexcept :
-  m_result{r},
-  m_index{long(i)},
-  m_end{internal::gate::result_row(r) ? r.columns() : 0}
-{
-}
-
-
-pqxx::row::const_iterator pqxx::row::begin() const noexcept
-{
-  return const_iterator{*this, m_begin};
-}
-
-
-pqxx::row::const_iterator pqxx::row::cbegin() const noexcept
-{
-  return begin();
-}
-
-
-pqxx::row::const_iterator pqxx::row::end() const noexcept
-{
-  return const_iterator{*this, m_end};
-}
-
-
-pqxx::row::const_iterator pqxx::row::cend() const noexcept
-{
-  return end();
-}
-
-
-pqxx::row::reference pqxx::row::front() const noexcept
-{
-  return field{*this, m_begin};
-}
-
-
-pqxx::row::reference pqxx::row::back() const noexcept
-{
-  return field{*this, m_end - 1};
-}
-
-
-pqxx::row::const_reverse_iterator pqxx::row::rbegin() const
-{
-  return const_reverse_row_iterator{end()};
-}
-
-
-pqxx::row::const_reverse_iterator pqxx::row::crbegin() const
-{
-  return rbegin();
-}
-
-
-pqxx::row::const_reverse_iterator pqxx::row::rend() const
-{
-  return const_reverse_row_iterator{begin()};
-}
-
-
-pqxx::row::const_reverse_iterator pqxx::row::crend() const
-{
-  return rend();
-}
-
-
-bool pqxx::row::operator==(const row &rhs) const noexcept
-{
-  if (&rhs == this) return true;
-  const auto s = size();
-  if (rhs.size() != s) return false;
-  // TODO: Depends on how null is handled!
-  for (size_type i=0; i<s; ++i) if ((*this)[i] != rhs[i]) return false;
-  return true;
-}
-
-
-pqxx::row::reference pqxx::row::operator[](size_type i) const noexcept
-{
-  return field{*this, m_begin + i};
-}
-
-
-pqxx::row::reference pqxx::row::operator[](int i) const noexcept
-{
-  return operator[](size_type(i));
-}
-
-
-pqxx::row::reference pqxx::row::operator[](const char f[]) const
-{
-  return at(f);
-}
-
-
-pqxx::row::reference pqxx::row::operator[](const std::string &s) const
-{
-  return operator[](s.c_str());
-}
-
-
-pqxx::row::reference pqxx::row::at(int i) const
-{
-  return at(size_type(i));
-}
-
-
-pqxx::row::reference pqxx::row::at(const std::string &s) const
-{
-  return at(s.c_str());
-}
-
-
-void pqxx::row::swap(row &rhs) noexcept
-{
-  const auto i = m_index;
-  const auto b= m_begin;
-  const auto e = m_end;
-  m_result.swap(rhs.m_result);
-  m_index = rhs.m_index;
-  m_begin = rhs.m_begin;
-  m_end = rhs.m_end;
-  rhs.m_index = i;
-  rhs.m_begin = b;
-  rhs.m_end = e;
-}
-
-
-pqxx::field pqxx::row::at(const char f[]) const
-{
-  return field{*this, m_begin + column_number(f)};
-}
-
-
-pqxx::field pqxx::row::at(pqxx::row::size_type i) const
-{
-  if (i >= size())
-    throw range_error{"Invalid field number."};
-
-  return operator[](i);
-}
-
-
-pqxx::oid pqxx::row::column_type(size_type ColNum) const
-{
-  return m_result.column_type(m_begin + ColNum);
-}
-
-
-pqxx::oid pqxx::row::column_table(size_type ColNum) const
-{
-  return m_result.column_table(m_begin + ColNum);
-}
-
-
-pqxx::row::size_type pqxx::row::table_column(size_type ColNum) const
-{
-  return m_result.table_column(m_begin + ColNum);
-}
-
-
-pqxx::row::size_type pqxx::row::column_number(const char ColName[]) const
-{
-  const auto n = m_result.column_number(ColName);
-  if (n >= m_end)
-    return result{}.column_number(ColName);
-  if (n >= m_begin)
-    return n - m_begin;
-
-  const char *const AdaptedColName = m_result.column_name(n);
-  for (auto i = m_begin; i < m_end; ++i)
-    if (strcmp(AdaptedColName, m_result.column_name(i)) == 0)
-      return i - m_begin;
-
-  return result{}.column_number(ColName);
-}
-
-
-pqxx::row::size_type pqxx::result::column_number(const char ColName[]) const
-{
-  const int N = PQfnumber(
-	const_cast<internal::pq::PGresult *>(m_data.get()), ColName);
-  if (N == -1)
-    throw argument_error{
-	"Unknown column name: '" + std::string{ColName} + "'."};
-
-  return row::size_type(N);
-}
-
-
-pqxx::row pqxx::row::slice(size_type Begin, size_type End) const
-{
-  if (Begin > End or End > size())
-    throw range_error{"Invalid field range."};
-
-  row result{*this};
-  result.m_begin = m_begin + Begin;
-  result.m_end = m_begin + End;
-  return result;
-}
-
-
-bool pqxx::row::empty() const noexcept
-{
-  return m_begin == m_end;
-}
-
-
-pqxx::const_row_iterator pqxx::const_row_iterator::operator++(int)
-{
-  const_row_iterator old{*this};
-  m_col++;
-  return old;
-}
-
-
-pqxx::const_row_iterator pqxx::const_row_iterator::operator--(int)
-{
-  const_row_iterator old{*this};
-  m_col--;
-  return old;
-}
-
-
-pqxx::const_row_iterator
-pqxx::const_reverse_row_iterator::base() const noexcept
-{
-  iterator_type tmp{*this};
-  return ++tmp;
-}
-
-
-pqxx::const_reverse_row_iterator
-pqxx::const_reverse_row_iterator::operator++(int)
-{
-  const_reverse_row_iterator tmp{*this};
-  operator++();
-  return tmp;
-}
-
-
-pqxx::const_reverse_row_iterator
-pqxx::const_reverse_row_iterator::operator--(int)
-{
-  const_reverse_row_iterator tmp{*this};
-  operator--();
-  return tmp;
-}
diff --git a/contrib/libs/libpqxx/src/sql_cursor.cxx b/contrib/libs/libpqxx/src/sql_cursor.cxx
deleted file mode 100644
index 2ebdb1304d..0000000000
--- a/contrib/libs/libpqxx/src/sql_cursor.cxx
+++ /dev/null
@@ -1,309 +0,0 @@
-/** Implementation of libpqxx STL-style cursor classes.
- *
- * These classes wrap SQL cursors in STL-like interfaces.
- *
- * Copyright (c) 2000-2019, Jeroen T. Vermeulen.
- *
- * See COPYING for copyright license.  If you did not receive a file called
- * COPYING with this source code, please notify the distributor of this mistake,
- * or contact the author.
- */
-#include "pqxx/compiler-internal.hxx"
-
-#include <iterator>
-
-#include "pqxx/cursor"
-
-#include "pqxx/internal/encodings.hxx"
-#include "pqxx/internal/gates/connection-sql_cursor.hxx"
-#include "pqxx/internal/gates/transaction-sql_cursor.hxx"
-
-using namespace pqxx;
-using namespace pqxx::internal;
-
-
-namespace
-{
-/// Is this character a "useless trailing character" in a query?
-/** A character is "useless" at the end of a query if it is either whitespace or
- * a semicolon.
- */
-inline bool useless_trail(char c)
-{
-  return isspace(c) or c==';';
-}
-
-
-/// Find end of nonempty query, stripping off any trailing semicolon.
-/** When executing a normal query, a trailing semicolon is meaningless but
- * won't hurt.  That's why we can't rule out that some code may include one.
- *
- * But for cursor queries, a trailing semicolon is a problem.  The query gets
- * embedded in a larger statement, which a semicolon would break into two.
- * We'll have to remove it if present.
- *
- * A trailing semicolon may not actually be at the end.  It could be masked by
- * subsequent whitespace.  If there's also a comment though, that's the
- * caller's own lookout.  We can't guard against every possible mistake, and
- * text processing is actually remarkably sensitive to mistakes in a
- * multi-encoding world.
- *
- * If there is a trailing semicolon, this function returns its offset.  If
- * there are more than one, it returns the offset of the first one.  If there
- * is no trailing semicolon, it returns the length of the query string.
- *
- * The query must be nonempty.
- */
-std::string::size_type find_query_end(
-	const std::string &query,
-	encoding_group enc)
-{
-  const auto text = query.c_str();
-  const auto size = query.size();
-  std::string::size_type end;
-  if (enc == encoding_group::MONOBYTE)
-  {
-    // This is an encoding where we can scan backwards from the end.
-    for (end = query.size(); end > 0 and useless_trail(text[end-1]); --end);
-  }
-  else
-  {
-    // Complex encoding.  We only know how to iterate forwards, so start from
-    // the beginning.
-    end = 0;
-
-    pqxx::internal::for_glyphs(
-        enc,
-        [text, &end](const char *gbegin, const char *gend)
-        {
-          if (gend - gbegin > 1 or not useless_trail(*gbegin))
-            end = std::string::size_type(gend - text);
-        },
-        text, size);
-  }
-
-  return end;
-}
-} // namespace
-
-
-pqxx::internal::sql_cursor::sql_cursor(
-	transaction_base &t,
-	const std::string &query,
-	const std::string &cname,
-	cursor_base::accesspolicy ap,
-	cursor_base::updatepolicy up,
-	cursor_base::ownershippolicy op,
-	bool hold,
-	result_format format) :
-  cursor_base{t.conn(), cname},
-  m_home{t.conn()},
-  m_adopted{false},
-  m_at_end{-1},
-  m_pos{0}
-{
-  if (&t.conn() != &m_home) throw internal_error{"Cursor in wrong connection"};
-
-#include "pqxx/internal/ignore-deprecated-pre.hxx"
-  m_home.activate();
-#include "pqxx/internal/ignore-deprecated-post.hxx"
-
-  if (query.empty()) throw usage_error{"Cursor has empty query."};
-  const auto enc = enc_group(t.conn().encoding_id());
-  const auto qend = find_query_end(query, enc);
-  if (qend == 0) throw usage_error{"Cursor has effectively empty query."};
-
-  std::stringstream cq, qn;
-
-  cq << "DECLARE " << t.quote_name(name()) << " ";
-
-  if (format == result_format::binary) {
-    cq << "BINARY ";
-  }
-
-  if (ap == cursor_base::forward_only) cq << "NO ";
-  cq << "SCROLL ";
-
-  cq << "CURSOR ";
-
-  if (hold) cq << "WITH HOLD ";
-
-  cq << "FOR ";
-  cq.write(query.c_str(), std::streamsize(qend));
-  cq << ' ';
-
-  if (up != cursor_base::update) cq << "FOR READ ONLY ";
-  else cq << "FOR UPDATE ";
-
-  qn << "[DECLARE " << name() << ']';
-  t.exec(cq, qn.str());
-
-  // Now that we're here in the starting position, keep a copy of an empty
-  // result.  That may come in handy later, because we may not be able to
-  // construct an empty result with all the right metadata due to the weird
-  // meaning of "FETCH 0."
-  init_empty_result(t);
-
-  // If we're creating a WITH HOLD cursor, noone is going to destroy it until
-  // after this transaction.  That means the connection cannot be deactivated
-  // without losing the cursor.
-  if (hold)
-    gate::connection_sql_cursor{t.conn()}.add_reactivation_avoidance_count(1);
-
-  m_ownership = op;
-}
-
-
-pqxx::internal::sql_cursor::sql_cursor(
-	transaction_base &t,
-	const std::string &cname,
-	cursor_base::ownershippolicy op) :
-  cursor_base{t.conn(), cname, false},
-  m_home{t.conn()},
-  m_empty_result{},
-  m_adopted{true},
-  m_at_end{0},
-  m_pos{-1}
-{
-  // If we take responsibility for destroying the cursor, that's one less
-  // reason not to allow the connection to be deactivated and reactivated.
-  // TODO: Go over lifetime/reactivation rules again to be sure they work.
-  if (op==cursor_base::owned)
-    gate::connection_sql_cursor{t.conn()}.add_reactivation_avoidance_count(-1);
-  m_adopted = true;
-  m_ownership = op;
-}
-
-
-void pqxx::internal::sql_cursor::close() noexcept
-{
-  if (m_ownership==cursor_base::owned)
-  {
-    try
-    {
-      gate::connection_sql_cursor{m_home}.exec(
-	("CLOSE " + m_home.quote_name(name())).c_str(),
-	0);
-    }
-    catch (const std::exception &)
-    {
-    }
-
-    if (m_adopted)
-      gate::connection_sql_cursor{m_home}.add_reactivation_avoidance_count(-1);
-
-    m_ownership = cursor_base::loose;
-  }
-}
-
-
-void pqxx::internal::sql_cursor::init_empty_result(transaction_base &t)
-{
-  if (pos() != 0) throw internal_error{"init_empty_result() from bad pos()."};
-  m_empty_result = t.exec("FETCH 0 IN " + m_home.quote_name(name()));
-}
-
-
-/// Compute actual displacement based on requested and reported displacements.
-internal::sql_cursor::difference_type
-pqxx::internal::sql_cursor::adjust(difference_type hoped,
-	difference_type actual)
-{
-  if (actual < 0) throw internal_error{"Negative rows in cursor movement."};
-  if (hoped == 0) return 0;
-  const int direction = ((hoped < 0) ? -1 : 1);
-  bool hit_end = false;
-  if (actual != labs(hoped))
-  {
-    if (actual > labs(hoped))
-      throw internal_error{"Cursor displacement larger than requested."};
-
-    // If we see fewer rows than requested, then we've hit an end (on either
-    // side) of the result set.  Wether we make an extra step to a one-past-end
-    // position or whether we're already there depends on where we were
-    // previously: if our last move was in the same direction and also fell
-    // short, we're already at a one-past-end row.
-    if (m_at_end != direction) ++actual;
-
-    // If we hit the beginning, make sure our position calculation ends up
-    // at zero (even if we didn't previously know where we were!), and if we
-    // hit the other end, register the fact that we now know where the end
-    // of the result set is.
-    if (direction > 0) hit_end = true;
-    else if (m_pos == -1) m_pos = actual;
-    else if (m_pos != actual)
-      throw internal_error{
-	"Moved back to beginning, but wrong position: "
-        "hoped=" + to_string(hoped) + ", "
-        "actual=" + to_string(actual) + ", "
-        "m_pos=" + to_string(m_pos) + ", "
-        "direction=" + to_string(direction) + "."};
-
-    m_at_end = direction;
-  }
-  else
-  {
-    m_at_end = 0;
-  }
-
-  if (m_pos >= 0) m_pos += direction*actual;
-  if (hit_end)
-  {
-    if (m_endpos >= 0 and m_pos != m_endpos)
-      throw internal_error{"Inconsistent cursor end positions."};
-    m_endpos = m_pos;
-  }
-  return direction*actual;
-}
-
-
-result pqxx::internal::sql_cursor::fetch(
-	difference_type rows,
-	difference_type &displacement)
-{
-  if (rows == 0)
-  {
-    displacement = 0;
-    return m_empty_result;
-  }
-  const std::string query =
-      "FETCH " + stridestring(rows) + " IN " + m_home.quote_name(name());
-  const result r{gate::connection_sql_cursor{m_home}.exec(query.c_str(), 0)};
-  displacement = adjust(rows, difference_type(r.size()));
-  return r;
-}
-
-
-cursor_base::difference_type pqxx::internal::sql_cursor::move(
-	difference_type rows,
-	difference_type &displacement)
-{
-  if (rows == 0)
-  {
-    displacement = 0;
-    return 0;
-  }
-
-  const std::string query =
-      "MOVE " + stridestring(rows) + " IN " + m_home.quote_name(name());
-  const result r(gate::connection_sql_cursor{m_home}.exec(query.c_str(), 0));
-  difference_type d = difference_type(r.affected_rows());
-  displacement = adjust(rows, d);
-  return d;
-}
-
-
-std::string pqxx::internal::sql_cursor::stridestring(difference_type n)
-{
-  /* Some special-casing for ALL and BACKWARD ALL here.  We used to use numeric
-   * "infinities" for difference_type for this (the highest and lowest possible
-   * values for "long"), but for PostgreSQL 8.0 at least, the backend appears to
-   * expect a 32-bit number and fails to parse large 64-bit numbers.
-   * We could change the alias to match this behaviour, but that would break
-   * if/when Postgres is changed to accept 64-bit displacements.
-   */
-  static const std::string All{"ALL"}, BackAll{"BACKWARD ALL"};
-  if (n >= cursor_base::all()) return All;
-  else if (n <= cursor_base::backward_all()) return BackAll;
-  return to_string(n);
-}
diff --git a/contrib/libs/libpqxx/src/statement_parameters.cxx b/contrib/libs/libpqxx/src/statement_parameters.cxx
deleted file mode 100644
index 3500cb04a9..0000000000
--- a/contrib/libs/libpqxx/src/statement_parameters.cxx
+++ /dev/null
@@ -1,58 +0,0 @@
-/** Common implementation for statement parameter lists.
- *
- * See the connection_base hierarchy for more about prepared statements
- *
- * Copyright (c) 2000-2019, Jeroen T. Vermeulen.
- *
- * See COPYING for copyright license.  If you did not receive a file called
- * COPYING with this source code, please notify the distributor of this mistake,
- * or contact the author.
- */
-#include "pqxx/compiler-internal.hxx"
-
-#include "pqxx/util"
-
-#include "pqxx/internal/statement_parameters.hxx"
-
-
-void pqxx::internal::statement_parameters::add_checked_param(
-	const std::string &value,
-	bool nonnull,
-	bool binary)
-{
-  m_nonnull.push_back(nonnull);
-  if (nonnull) m_values.push_back(value);
-  m_binary.push_back(binary);
-}
-
-
-int pqxx::internal::statement_parameters::marshall(
-	std::vector<const char *> &values,
-	std::vector<int> &lengths,
-	std::vector<int> &binaries) const
-{
-  const auto elements = m_nonnull.size();
-  const auto array_size = elements + 1;
-  values.clear();
-  values.resize(array_size, nullptr);
-  lengths.clear();
-  lengths.resize(array_size, 0);
-  // "Unpack" from m_values, which skips arguments that are null, to the
-  // outputs which represent all parameters including nulls.
-  size_t arg = 0;
-  for (size_t param = 0; param < elements; ++param)
-    if (m_nonnull[param])
-    {
-      values[param] = m_values[arg].c_str();
-      lengths[param] = int(m_values[arg].size());
-      ++arg;
-    }
-
-  // The binaries array is simpler: it maps 1-on-1.
-  binaries.resize(array_size);
-  for (size_t param = 0; param < elements; ++param)
-    binaries[param] = int(m_binary[param]);
-  binaries.back() = 0;
-
-  return int(elements);
-}
diff --git a/contrib/libs/libpqxx/src/strconv.cxx b/contrib/libs/libpqxx/src/strconv.cxx
deleted file mode 100644
index 9e67d55bb3..0000000000
--- a/contrib/libs/libpqxx/src/strconv.cxx
+++ /dev/null
@@ -1,724 +0,0 @@
-/** Implementation of string conversions.
- *
- * Copyright (c) 2000-2019, Jeroen T. Vermeulen.
- *
- * See COPYING for copyright license.  If you did not receive a file called
- * COPYING with this source code, please notify the distributor of this mistake,
- * or contact the author.
- */
-#include "pqxx/compiler-internal.hxx"
-
-#include <algorithm>
-#include <cmath>
-#include <cstring>
-#include <limits>
-#include <locale>
-#include <system_error>
-
-#if __cplusplus < 201703
-// This is not C++17 or better.  Don't use to_chars/from_chars; the code which
-// uses those also relies on other C++17 features.
-#if defined(PQXX_HAVE_CHARCONV_INT)
-#undef PQXX_HAVE_CHARCONV_INT
-#endif
-#if defined(PQXX_HAVE_CHARCONV_FLOAT)
-#undef PQXX_HAVE_CHARCONV_FLOAT
-#endif
-#endif
-
-#if defined(PQXX_HAVE_CHARCONV_INT) || defined(PQXX_HAVE_CHARCONV_FLOAT)
-#include <charconv>
-#endif
-
-#if __cplusplus >= 201703
-#include <string_view>
-#endif
-
-#include "pqxx/except"
-#include "pqxx/strconv"
-
-
-using namespace pqxx::internal;
-
-
-namespace
-{
-/// C string comparison.
-inline bool equal(const char lhs[], const char rhs[])
-{
-  return strcmp(lhs, rhs) == 0;
-}
-} // namespace
-
-
-namespace pqxx
-{
-namespace internal
-{
-void throw_null_conversion(const std::string &type)
-{
-  throw conversion_error{"Attempt to convert null to " + type + "."};
-}
-} // namespace pqxx::internal
-} // namespace pqxx
-
-
-#if defined(PQXX_HAVE_CHARCONV_INT) || defined(PQXX_HAVE_CHARCONV_FLOAT)
-namespace
-{
-template<typename T> void wrap_from_chars(std::string_view in, T &out)
-{
-  using traits = pqxx::string_traits<T>;
-  const char *end = in.data() + in.size();
-  const auto res = std::from_chars(in.data(), end, out);
-  if (res.ec == std::errc() and res.ptr == end) return;
-
-  std::string msg;
-  if (res.ec == std::errc())
-  {
-    msg = "Could not parse full string.";
-  }
-  else switch (res.ec)
-  {
-  case std::errc::result_out_of_range:
-    msg = "Value out of range.";
-    break;
-  case std::errc::invalid_argument:
-    msg = "Invalid argument.";
-    break;
-  default:
-    break;
-  }
-
-  const std::string base =
-	"Could not convert '" + std::string(in) + "' "
-	"to " + traits::name();
-  if (msg.empty()) throw pqxx::conversion_error{base + "."};
-  else throw pqxx::conversion_error{base + ": " + msg};
-}
-
-
-/// How big of a buffer do we want for representing a T?
-template<typename T> constexpr int size_buffer()
-{
-  using lim = std::numeric_limits<T>;
-  // Allocate room for how many digits?  There's "max_digits10" for
-  // floating-point numbers, but only "digits10" for integer types.
-  constexpr auto digits = std::max({lim::digits10, lim::max_digits10});
-  // Leave a little bit of extra room for signs, decimal points, and the like.
-  return digits + 4;
-}
-
-
-/// Call @c std::to_chars.  It differs for integer vs. floating-point types.
-template<typename TYPE, bool INTEGRAL> struct to_chars_caller;
-
-#if defined(PQXX_HAVE_CHARCONV_INT)
-/// For integer types, we pass "base 10" to @c std::to_chars.
-template<typename TYPE> struct to_chars_caller<TYPE, true>
-{
-  static std::to_chars_result call(char *begin, char *end, TYPE in)
-	{ return std::to_chars(begin, end, in, 10); }
-};
-#endif
-
-#if defined(PQXX_HAVE_CHARCONV_FLOAT)
-/// For floating-point types, we pass "general format" to @c std::to_chars.
-template<typename TYPE>
-template<typename TYPE> struct to_chars_caller<TYPE, true>
-{
-  static std::to_chars_result call(char *begin, char *end, TYPE in)
-	{ return std::to_chars(begin, end, in, std::chars_format::general); }
-};
-#endif
-} // namespace
-
-
-namespace pqxx
-{
-namespace internal
-{
-template<typename T> std::string builtin_traits<T>::to_string(T in)
-{
-  using traits = pqxx::string_traits<T>;
-  char buf[size_buffer<T>()];
-
-  // Annoying: we need to make slightly different calls to std::to_chars
-  // depending on whether this is an integral type or a floating-point type.
-  // Use to_chars_caller to hide the difference.
-  constexpr bool is_integer = std::numeric_limits<T>::is_integer;
-  const auto res = to_chars_caller<T, is_integer>::call(
-	buf, buf + sizeof(buf), in);
-  if (res.ec == std::errc()) return std::string(buf, res.ptr);
-
-  std::string msg;
-  switch (res.ec)
-  {
-  case std::errc::value_too_large:
-    msg = "Value too large.";
-    break;
-  default:
-    break;
-  }
-
-  const std::string base =
-    std::string{"Could not convert "} + traits::name() + " to string";
-  if (msg.empty()) throw pqxx::conversion_error{base + "."};
-  else throw pqxx::conversion_error{base + ": " + msg};
-}
-
-
-/// Translate @c from_string calls to @c wrap_from_chars calls.
-/** The only difference is the type of the string.
- */
-template<typename TYPE>
-void builtin_traits<TYPE>::from_string(const char Str[], TYPE &Obj)
-	{ wrap_from_chars(std::string_view{Str}, Obj); }
-} // namespace pqxx::internal
-} // namespace pqxx
-#endif // PQXX_HAVE_CHARCONV_INT || PQXX_HAVE_CHARCONV_FLOAT
-
-
-#if !defined(PQXX_HAVE_CHARCONV_FLOAT)
-namespace
-{
-template<typename T> inline void set_to_Inf(T &t, int sign=1)
-{
-  T value = std::numeric_limits<T>::infinity();
-  if (sign < 0) value = -value;
-  t = value;
-}
-} // namespace
-#endif // !PQXX_HAVE_CHARCONV_FLOAT
-
-
-#if !defined(PQXX_HAVE_CHARCONV_INT)
-namespace
-{
-[[noreturn]] void report_overflow()
-{
-  throw pqxx::conversion_error{
-	"Could not convert string to integer: value out of range."};
-}
-
-
-/** Helper to check for underflow before multiplying a number by 10.
- *
- * Needed just so the compiler doesn't get to complain about an "if (n < 0)"
- * clause that's pointless for unsigned numbers.
- */
-template<typename T, bool is_signed> struct underflow_check;
-
-/* Specialization for signed types: check.
- */
-template<typename T> struct underflow_check<T, true>
-{
-  static void check_before_adding_digit(T n)
-  {
-    constexpr T ten{10};
-    if (n < 0 and (std::numeric_limits<T>::min() / ten) > n) report_overflow();
-  }
-};
-
-/* Specialization for unsigned types: no check needed becaue negative
- * numbers don't exist.
- */
-template<typename T> struct underflow_check<T, false>
-{
-  static void check_before_adding_digit(T) {}
-};
-
-
-/// Return 10*n, or throw exception if it overflows.
-template<typename T> T safe_multiply_by_ten(T n)
-{
-  using limits = std::numeric_limits<T>;
-  constexpr T ten{10};
-  if (n > 0 and (limits::max() / n) < ten) report_overflow();
-  underflow_check<T, limits::is_signed>::check_before_adding_digit(n);
-  return T(n * ten);
-}
-
-
-/// Add a digit d to n, or throw exception if it overflows.
-template<typename T> T safe_add_digit(T n, T d)
-{
-  assert((n >= 0 and d >= 0) or (n <=0 and d <= 0));
-  if ((n > 0) and (n > (std::numeric_limits<T>::max() - d))) report_overflow();
-  if ((n < 0) and (n < (std::numeric_limits<T>::min() - d))) report_overflow();
-  return n + d;
-}
-
-
-/// For use in string parsing: add new numeric digit to intermediate value
-template<typename L, typename R>
-  inline L absorb_digit(L value, R digit)
-{
-  return L(safe_multiply_by_ten(value) + L(digit));
-}
-
-
-template<typename T> void from_string_signed(const char Str[], T &Obj)
-{
-  int i = 0;
-  T result = 0;
-
-  if (not isdigit(Str[i]))
-  {
-    if (Str[i] != '-')
-      throw pqxx::conversion_error{
-        "Could not convert string to integer: '" + std::string{Str} + "'."};
-
-    for (++i; isdigit(Str[i]); ++i)
-      result = absorb_digit(result, -digit_to_number(Str[i]));
-  }
-  else
-  {
-    for (; isdigit(Str[i]); ++i)
-      result = absorb_digit(result, digit_to_number(Str[i]));
-  }
-
-  if (Str[i])
-    throw pqxx::conversion_error{
-      "Unexpected text after integer: '" + std::string{Str} + "'."};
-
-  Obj = result;
-}
-
-template<typename T> void from_string_unsigned(const char Str[], T &Obj)
-{
-  int i = 0;
-  T result = 0;
-
-  if (not isdigit(Str[i]))
-    throw pqxx::conversion_error{
-      "Could not convert string to unsigned integer: '" +
-      std::string{Str} + "'."};
-
-  for (; isdigit(Str[i]); ++i)
-    result = absorb_digit(result, digit_to_number(Str[i]));
-
-  if (Str[i])
-    throw pqxx::conversion_error{
-      "Unexpected text after integer: '" + std::string{Str} + "'."};
-
-  Obj = result;
-}
-} // namespace
-#endif // !PQXX_HAVE_CHARCONV_INT
-
-
-#if !defined(PQXX_HAVE_CHARCONV_FLOAT)
-namespace
-{
-bool valid_infinity_string(const char str[]) noexcept
-{
-  return
-	equal("infinity", str) or
-	equal("Infinity", str) or
-	equal("INFINITY", str) or
-	equal("inf", str);
-}
-
-
-/// Wrapper for std::stringstream with C locale.
-/** Some of our string conversions use the standard library.  But, they must
- * _not_ obey the system's locale settings, or a value like 1000.0 might end
- * up looking like "1.000,0".
- *
- * Initialising the stream (including locale and tweaked precision) seems to
- * be expensive though.  So, create thread-local instances which we re-use.
- * It's a lockless way of keeping global variables thread-safe, basically.
- *
- * The stream initialisation happens once per thread, in the constructor.
- * And that's why we need to wrap this in a class.  We can't just do it at the
- * call site, or we'd still be doing it for every call.
- */
-template<typename T> class dumb_stringstream : public std::stringstream
-{
-public:
-  // Do not initialise the base-class object using "stringstream{}" (with curly
-  // braces): that breaks on Visual C++.  The classic "stringstream()" syntax
-  // (with parentheses) does work.
-  dumb_stringstream()
-  {
-    this->imbue(std::locale::classic());
-    this->precision(std::numeric_limits<T>::max_digits10);
-  }
-};
-
-
-/* These are hard.  Sacrifice performance of specialized, nonflexible,
- * non-localized code and lean on standard library.  Some special-case code
- * handles NaNs.
- */
-template<typename T> inline void from_string_float(const char Str[], T &Obj)
-{
-  bool ok = false;
-  T result;
-
-  switch (Str[0])
-  {
-  case 'N':
-  case 'n':
-    // Accept "NaN," "nan," etc.
-    ok = (
-      (Str[1]=='A' or Str[1]=='a') and
-      (Str[2]=='N' or Str[2]=='n') and
-      (Str[3] == '\0'));
-    result = std::numeric_limits<T>::quiet_NaN();
-    break;
-
-  case 'I':
-  case 'i':
-    ok = valid_infinity_string(Str);
-    set_to_Inf(result);
-    break;
-
-  default:
-    if (Str[0] == '-' and valid_infinity_string(&Str[1]))
-    {
-      ok = true;
-      set_to_Inf(result, -1);
-    }
-    else
-    {
-      thread_local dumb_stringstream<T> S;
-      // Visual Studio 2017 seems to fail on repeated conversions if the
-      // clear() is done before the seekg().  Still don't know why!  See #124
-      // and #125.
-      S.seekg(0);
-      S.clear();
-      S.str(Str);
-      ok = static_cast<bool>(S >> result);
-    }
-    break;
-  }
-
-  if (not ok)
-    throw pqxx::conversion_error{
-      "Could not convert string to numeric value: '" +
-      std::string{Str} + "'."};
-
-  Obj = result;
-}
-} // namespace
-#endif // !PQXX_HAVE_CHARCONV_FLOAT
-
-
-#if !defined(PQXX_HAVE_CHARCONV_INT)
-namespace
-{
-template<typename T> inline std::string to_string_unsigned(T Obj)
-{
-  if (not Obj) return "0";
-
-  // Every byte of width on T adds somewhere between 3 and 4 digits to the
-  // maximum length of our decimal string.
-  char buf[4*sizeof(T)+1];
-
-  char *p = &buf[sizeof(buf)];
-  *--p = '\0';
-  while (Obj > 0)
-  {
-    *--p = number_to_digit(int(Obj%10));
-    Obj = T(Obj / 10);
-  }
-  return p;
-}
-} // namespace
-#endif // !PQXX_HAVE_CHARCONV_INT
-
-
-#if !defined(PQXX_HAVE_CHARCONV_INT) || !defined(PQXX_HAVE_CHARCONV_FLOAT)
-namespace
-{
-template<typename T> inline std::string to_string_fallback(T Obj)
-{
-  thread_local dumb_stringstream<T> S;
-  S.str("");
-  S << Obj;
-  return S.str();
-}
-} // namespace
-#endif // !PQXX_HAVE_CHARCONV_INT || !PQXX_HAVE_CHARCONV_FLOAT
-
-
-#if !defined(PQXX_HAVE_CHARCONV_FLOAT)
-namespace
-{
-template<typename T> inline std::string to_string_float(T Obj)
-{
-  if (std::isnan(Obj)) return "nan";
-  if (std::isinf(Obj)) return Obj > 0 ? "infinity" : "-infinity";
-  return to_string_fallback(Obj);
-}
-} // namespace
-#endif // !PQXX_HAVE_CHARCONV_FLOAT
-
-
-#if !defined(PQXX_HAVE_CHARCONV_INT)
-namespace
-{
-template<typename T> inline std::string to_string_signed(T Obj)
-{
-  if (Obj < 0)
-  {
-    // Remember--the smallest negative number for a given two's-complement type
-    // cannot be negated.
-    const bool negatable = (Obj != std::numeric_limits<T>::min());
-    if (negatable)
-      return '-' + to_string_unsigned(-Obj);
-    else
-      return to_string_fallback(Obj);
-  }
-
-  return to_string_unsigned(Obj);
-}
-} // namespace
-#endif // !PQXX_HAVE_CHARCONV_INT
-
-
-#if defined(PQXX_HAVE_CHARCONV_INT)
-namespace pqxx
-{
-template void
-builtin_traits<short>::from_string(const char[], short &);
-template void
-builtin_traits<unsigned short>::from_string(const char[], unsigned short &);
-template void
-builtin_traits<int>::from_string(const char[], int &);
-template void
-builtin_traits<unsigned int>::from_string(const char[], unsigned int &);
-template void
-builtin_traits<long>::from_string(const char[], long &);
-template void
-builtin_traits<unsigned long>::from_string(const char[], unsigned long &);
-template void
-builtin_traits<long long>::from_string(const char[], long long &);
-template void
-builtin_traits<unsigned long long>::from_string(
-	const char[], unsigned long long &);
-} // namespace pqxx
-#endif // PQXX_HAVE_CHARCONV_INT
-
-
-#if defined(PQXX_HAVE_CHARCONV_FLOAT)
-namespace pqxx
-{
-template
-void string_traits<float>::from_string(const char Str[], float &Obj);
-template
-void string_traits<double>::from_string(const char Str[], double &Obj);
-template
-void string_traits<long double>::from_string(
-	const char Str[],
-	long double &Obj);
-} // namespace pqxx
-#endif // PQXX_HAVE_CHARCONV_FLOAT
-
-
-#if defined(PQXX_HAVE_CHARCONV_INT)
-namespace pqxx
-{
-namespace internal
-{
-template
-std::string builtin_traits<short>::to_string(short Obj);
-template
-std::string builtin_traits<unsigned short>::to_string(unsigned short Obj);
-template
-std::string builtin_traits<int>::to_string(int Obj);
-template
-std::string builtin_traits<unsigned int>::to_string(unsigned int Obj);
-template
-std::string builtin_traits<long>::to_string(long Obj);
-template
-std::string builtin_traits<unsigned long>::to_string(unsigned long Obj);
-template
-std::string builtin_traits<long long>::to_string(long long Obj);
-template
-std::string builtin_traits<unsigned long long>::to_string(
-	unsigned long long Obj);
-} // namespace pqxx::internal
-} // namespace pqxx
-#endif // PQXX_HAVE_CHARCONV_INT
-
-
-#if defined(PQXX_HAVE_CHARCONV_FLOAT)
-namespace pqxx
-{
-namespace internal
-{
-template
-std::string builtin_traits<float>::to_string(float Obj);
-template
-std::string builtin_traits<double>::to_string(double Obj);
-template
-std::string builtin_traits<long double>::to_string(long double Obj);
-} // namespace pqxx::internal
-} // namespace pqxx
-#endif // PQXX_HAVE_CHARCONV_FLOAT
-
-
-#if !defined(PQXX_HAVE_CHARCONV_INT)
-namespace pqxx
-{
-namespace internal
-{
-template<>
-void builtin_traits<short>::from_string(const char Str[], short &Obj)
-	{ from_string_signed(Str, Obj); }
-template<>
-std::string builtin_traits<short>::to_string(short Obj)
-	{ return to_string_signed(Obj); }
-template<>
-void builtin_traits<unsigned short>::from_string(
-	const char Str[],
-	unsigned short &Obj)
-	{ from_string_unsigned(Str, Obj); }
-template<>
-std::string builtin_traits<unsigned short>::to_string(unsigned short Obj)
-	{ return to_string_unsigned(Obj); }
-template<>
-void builtin_traits<int>::from_string(const char Str[], int &Obj)
-	{ from_string_signed(Str, Obj); }
-template<>
-std::string builtin_traits<int>::to_string(int Obj)
-	{ return to_string_signed(Obj); }
-template<>
-void builtin_traits<unsigned int>::from_string(
-	const char Str[],
-	unsigned int &Obj)
-	{ from_string_unsigned(Str, Obj); }
-template<>
-std::string builtin_traits<unsigned int>::to_string(unsigned int Obj)
-	{ return to_string_unsigned(Obj); }
-template<>
-void builtin_traits<long>::from_string(const char Str[], long &Obj)
-	{ from_string_signed(Str, Obj); }
-template<>
-std::string builtin_traits<long>::to_string(long Obj)
-	{ return to_string_signed(Obj); }
-template<>
-void builtin_traits<unsigned long>::from_string(
-	const char Str[],
-	unsigned long &Obj)
-	{ from_string_unsigned(Str, Obj); }
-template<>
-std::string builtin_traits<unsigned long>::to_string(unsigned long Obj)
-	{ return to_string_unsigned(Obj); }
-template<>
-void builtin_traits<long long>::from_string(const char Str[], long long &Obj)
-	{ from_string_signed(Str, Obj); }
-template<>
-std::string builtin_traits<long long>::to_string(long long Obj)
-	{ return to_string_signed(Obj); }
-template<>
-void builtin_traits<unsigned long long>::from_string(
-	const char Str[],
-	unsigned long long &Obj)
-	{ from_string_unsigned(Str, Obj); }
-template<>
-std::string builtin_traits<unsigned long long>::to_string(
-        unsigned long long Obj)
-	{ return to_string_unsigned(Obj); }
-} // namespace pqxx::internal
-} // namespace pqxx
-#endif // !PQXX_HAVE_CHARCONV_INT
-
-
-#if !defined(PQXX_HAVE_CHARCONV_FLOAT)
-namespace pqxx
-{
-namespace internal
-{
-template<>
-void builtin_traits<float>::from_string(const char Str[], float &Obj)
-	{ from_string_float(Str, Obj); }
-template<>
-std::string builtin_traits<float>::to_string(float Obj)
-	{ return to_string_float(Obj); }
-template<>
-void builtin_traits<double>::from_string(const char Str[], double &Obj)
-	{ from_string_float(Str, Obj); }
-template<>
-std::string builtin_traits<double>::to_string(double Obj)
-	{ return to_string_float(Obj); }
-template<>
-void builtin_traits<long double>::from_string(
-	const char Str[], long double &Obj)
-	{ from_string_float(Str, Obj); }
-template<>
-std::string builtin_traits<long double>::to_string(long double Obj)
-	{ return to_string_float(Obj); }
-} // namespace pqxx::internal
-} // namespace pqxx
-#endif // !PQXX_HAVE_CHARCONV_FLOAT
-
-
-namespace pqxx
-{
-namespace internal
-{
-template<> void builtin_traits<bool>::from_string(const char Str[], bool &Obj)
-{
-  bool OK, result=false;
-
-  switch (Str[0])
-  {
-  case 0:
-    result = false;
-    OK = true;
-    break;
-
-  case 'f':
-  case 'F':
-    result = false;
-    OK = not (
-	(Str[1] != '\0') and
-	(not equal(Str+1, "alse")) and
-	(not equal(Str+1, "ALSE")));
-    break;
-
-  case '0':
-    {
-      int I;
-      string_traits<int>::from_string(Str, I);
-      result = (I != 0);
-      OK = ((I == 0) or (I == 1));
-    }
-    break;
-
-  case '1':
-    result = true;
-    OK = (Str[1] == '\0');
-    break;
-
-  case 't':
-  case 'T':
-    result = true;
-    OK = not (
-	(Str[1] != '\0') and
-	(not equal(Str+1, "rue")) and
-	(not equal(Str+1, "RUE")));
-    break;
-
-  default:
-    OK = false;
-  }
-
-  if (not OK)
-    throw conversion_error{
-      "Failed conversion to bool: '" + std::string{Str} + "'."};
-
-  Obj = result;
-}
-
-
-template<> std::string builtin_traits<bool>::to_string(bool Obj)
-{
-  return Obj ? "true" : "false";
-}
-} // namespace pqxx::internal
-} // namespace pqxx
diff --git a/contrib/libs/libpqxx/src/stream_base.cxx b/contrib/libs/libpqxx/src/stream_base.cxx
deleted file mode 100644
index 598c2260e4..0000000000
--- a/contrib/libs/libpqxx/src/stream_base.cxx
+++ /dev/null
@@ -1,43 +0,0 @@
-/** Implementation of the pqxx::stream_base class.
- *
- * pqxx::stream_base provides optimized batch access to a database table.
- *
- * Copyright (c) 2000-2019, Jeroen T. Vermeulen.
- *
- * See COPYING for copyright license.  If you did not receive a file called
- * COPYING with this source code, please notify the distributor of this mistake,
- * or contact the author.
- */
-#include "pqxx/compiler-internal.hxx"
-
-#include "pqxx/stream_base.hxx"
-#include "pqxx/transaction"
-
-
-pqxx::stream_base::stream_base(transaction_base &tb) :
-  internal::namedclass("stream_base"),
-  internal::transactionfocus{tb},
-  m_finished{false}
-{}
-
-
-pqxx::stream_base::operator bool() const noexcept
-{
-  return not m_finished;
-}
-
-
-bool pqxx::stream_base::operator!() const noexcept
-{
-  return not static_cast<bool>(*this);
-}
-
-
-void pqxx::stream_base::close()
-{
-  if (*this)
-  {
-    m_finished = true;
-    unregister_me();
-  }
-}
diff --git a/contrib/libs/libpqxx/src/stream_from.cxx b/contrib/libs/libpqxx/src/stream_from.cxx
deleted file mode 100644
index 8dbe2df3f3..0000000000
--- a/contrib/libs/libpqxx/src/stream_from.cxx
+++ /dev/null
@@ -1,261 +0,0 @@
-/** Implementation of the pqxx::stream_from class.
- *
- * pqxx::stream_from enables optimized batch reads from a database table.
- *
- * Copyright (c) 2000-2019, Jeroen T. Vermeulen.
- *
- * See COPYING for copyright license.  If you did not receive a file called
- * COPYING with this source code, please notify the distributor of this mistake,
- * or contact the author.
- */
-#include "pqxx/compiler-internal.hxx"
-
-#include "pqxx/stream_from"
-
-#include "pqxx/internal/encodings.hxx"
-#include "pqxx/internal/gates/transaction-stream_from.hxx"
-
-
-namespace
-{
-  // bool is_octalchar(char o) noexcept
-  // {
-  //   return (o>='0') and (o<='7');
-  // }
-
-  /// Find first tab character at or after start position in string
-  /** If not found, returns line.size() rather than string::npos.
-   */
-  std::string::size_type find_tab(
-    pqxx::internal::encoding_group enc,
-    const std::string &line,
-    std::string::size_type start
-  )
-  {
-    auto here = pqxx::internal::find_with_encoding(enc, line, '\t', start);
-    return (here == std::string::npos) ? line.size() : here;
-  }
-} // namespace
-
-
-pqxx::stream_from::stream_from(
-  transaction_base &tb,
-  const std::string &table_name
-) :
-  namedclass{"stream_from", table_name},
-  stream_base{tb},
-  m_retry_line{false}
-{
-  set_up(tb, table_name);
-}
-
-
-pqxx::stream_from::~stream_from() noexcept
-{
-  try
-  {
-    complete();
-  }
-  catch (const std::exception &e)
-  {
-    reg_pending_error(e.what());
-  }
-}
-
-
-void pqxx::stream_from::complete()
-{
-  close();
-}
-
-
-bool pqxx::stream_from::get_raw_line(std::string &line)
-{
-  internal::gate::transaction_stream_from gate{m_trans};
-  if (*this)
-    try
-    {
-      if (not gate.read_copy_line(line)) close();
-    }
-    catch (const std::exception &)
-    {
-      close();
-      throw;
-    }
-  return *this;
-}
-
-
-void pqxx::stream_from::set_up(
-  transaction_base &tb,
-  const std::string &table_name
-)
-{
-  set_up(tb, table_name, "");
-}
-
-
-void pqxx::stream_from::set_up(
-  transaction_base &tb,
-  const std::string &table_name,
-  const std::string &columns
-)
-{
-  // Get the encoding before starting the COPY, otherwise reading the the
-  // variable will interrupt it
-  m_copy_encoding = internal::enc_group(m_trans.conn().encoding_id());
-  internal::gate::transaction_stream_from{tb}.BeginCopyRead(
-    table_name,
-    columns
-  );
-  register_me();
-}
-
-
-void pqxx::stream_from::close()
-{
-  pqxx::stream_base::close();
-  try
-  {
-    // Flush any remaining lines
-    std::string s;
-    while (get_raw_line(s));
-  }
-  catch (const broken_connection &)
-  {
-    try
-    {
-      pqxx::stream_base::close();
-    }
-    catch (const std::exception &) {}
-    throw;
-  }
-  catch (const std::exception &e)
-  {
-    reg_pending_error(e.what());
-  }
-}
-
-
-bool pqxx::stream_from::extract_field(
-	const std::string &line,
-	std::string::size_type &i,
-	std::string &s
-) const
-{
-  using namespace pqxx::internal;
-
-  const auto next_seq = get_glyph_scanner(m_copy_encoding);
-  s.clear();
-  bool is_null{false};
-  auto stop = find_tab(m_copy_encoding, line, i);
-  while (i < stop)
-  {
-    auto glyph_end = next_seq(line.c_str(), line.size(), i);
-    auto seq_len = glyph_end - i;
-    if (seq_len == 1)
-    {
-      switch (line[i])
-      {
-      case '\n':
-        // End-of-row; shouldn't happen, but we may get old-style
-        // newline-terminated lines.
-        i = stop;
-        break;
-
-      case '\\':
-        {
-        // Escape sequence.
-          if (glyph_end >= line.size())
-            throw failure{"Row ends in backslash"};
-          char n = line[glyph_end++];
-          
-          /*
-           * "Presently, COPY TO will never emit an octal or hex-digits
-           * backslash sequence [...]"
-           *  - https://www.postgresql.org/docs/10/sql-copy.html
-           */
-          // if (is_octalchar(n))
-          // {
-          //   if (here.end_byte+2 >= line.size())
-          //     throw failure{"Row ends in middle of octal value"};
-          //   char n1 = line[here.end_byte++];
-          //   char n2 = line[here.end_byte++];
-          //   if (not is_octalchar(n1) or not is_octalchar(n2))
-          //     throw failure{
-          //       "Invalid octal in encoded table stream"
-          //     };
-          //   s += (
-          //     (digit_to_number(n)<<6) |
-          //     (digit_to_number(n1)<<3) |
-          //     digit_to_number(n2)
-          //   );
-          //   break;
-          // }
-          // else
-            switch (n)
-            {
-            case 'N':
-              // Null value
-              if (not s.empty())
-                throw failure{
-                  "Null sequence found in nonempty field"
-                };
-              is_null = true;
-              break;
-
-            case 'b': // Backspace
-              s += '\b'; break;
-            case 'f': // Vertical tab
-              s += '\f'; break;
-            case 'n': // Form feed
-              s += '\n'; break;
-            case 'r': // Newline
-              s += '\r'; break;
-            case 't': // Tab
-              s += '\t'; break;
-            case 'v': // Carriage return
-              s += '\v'; break;
-
-            default:
-              // Self-escaped character
-              s += n;
-              break;
-            }
-        }
-        break;
-
-      default:
-        s += line[i];
-        break;
-      }
-    }
-    else
-    {
-      // Multi-byte sequence; never treated specially, so just append
-      s.insert(s.size(), line.c_str() + i, seq_len);
-    }
-
-    i = glyph_end;
-  }
-
-  // Skip field separator
-  i += 1;
-
-  return not is_null;
-}
-
-template<> void pqxx::stream_from::extract_value<std::nullptr_t>(
-  const std::string &line,
-  std::nullptr_t&,
-  std::string::size_type &here,
-  std::string &workspace
-) const
-{
-  if (extract_field(line, here, workspace))
-    throw pqxx::conversion_error{
-      "Attempt to convert non-null '"
-      + workspace
-      + "' to null"
-    };
-}
diff --git a/contrib/libs/libpqxx/src/stream_to.cxx b/contrib/libs/libpqxx/src/stream_to.cxx
deleted file mode 100644
index 18e52b1e6a..0000000000
--- a/contrib/libs/libpqxx/src/stream_to.cxx
+++ /dev/null
@@ -1,142 +0,0 @@
-/** Implementation of the pqxx::stream_to class.
- *
- * pqxx::stream_to enables optimized batch updates to a database table.
- *
- * Copyright (c) 2000-2019, Jeroen T. Vermeulen.
- *
- * See COPYING for copyright license.  If you did not receive a file called
- * COPYING with this source code, please notify the distributor of this mistake,
- * or contact the author.
- */
-#include "pqxx/compiler-internal.hxx"
-
-#include "pqxx/stream_to.hxx"
-
-#include "pqxx/internal/gates/transaction-stream_to.hxx"
-
-
-pqxx::stream_to::stream_to(
-  transaction_base &tb,
-  const std::string &table_name
-) :
-  namedclass{"stream_to", table_name},
-  stream_base{tb}
-{
-  set_up(tb, table_name);
-}
-
-
-pqxx::stream_to::~stream_to() noexcept
-{
-  try
-  {
-    complete();
-  }
-  catch (const std::exception &e)
-  {
-    reg_pending_error(e.what());
-  }
-}
-
-
-void pqxx::stream_to::complete()
-{
-  close();
-}
-
-
-void pqxx::stream_to::write_raw_line(const std::string &line)
-{
-  internal::gate::transaction_stream_to{m_trans}.write_copy_line(line);
-}
-
-
-pqxx::stream_to & pqxx::stream_to::operator<<(stream_from &tr)
-{
-  std::string line;
-  while (tr)
-  {
-    tr.get_raw_line(line);
-    write_raw_line(line);
-  }
-  return *this;
-}
-
-
-void pqxx::stream_to::set_up(
-  transaction_base &tb,
-  const std::string &table_name
-)
-{
-  set_up(tb, table_name, "");
-}
-
-
-void pqxx::stream_to::set_up(
-  transaction_base &tb,
-  const std::string &table_name,
-  const std::string &columns
-)
-{
-  internal::gate::transaction_stream_to{tb}.BeginCopyWrite(
-    table_name,
-    columns
-  );
-  register_me();
-}
-
-
-void pqxx::stream_to::close()
-{
-  if (*this)
-  {
-    stream_base::close();
-    try
-    {
-      internal::gate::transaction_stream_to{m_trans}.end_copy_write();
-    }
-    catch (const std::exception &)
-    {
-      try
-      {
-        stream_base::close();
-      }
-      catch (const std::exception &) {}
-      throw;
-    }
-  }
-}
-
-
-std::string pqxx::internal::TypedCopyEscaper::escape(const std::string &s)
-{
-  if (s.empty())
-    return s;
-
-  std::string escaped;
-  escaped.reserve(s.size()+1);
-
-  for (auto c : s)
-    switch (c)
-    {
-    case '\b': escaped += "\\b";  break; // Backspace
-    case '\f': escaped += "\\f";  break; // Vertical tab
-    case '\n': escaped += "\\n";  break; // Form feed
-    case '\r': escaped += "\\r";  break; // Newline
-    case '\t': escaped += "\\t";  break; // Tab
-    case '\v': escaped += "\\v";  break; // Carriage return
-    case '\\': escaped += "\\\\"; break; // Backslash
-    default:
-      if (c < ' ' or c > '~')
-      {
-        escaped += "\\";
-        for (auto i = 2; i >= 0; --i)
-          escaped += number_to_digit((c >> (3*i)) & 0x07);
-      }
-      else
-        escaped += c;
-      break;
-    }
-
-  return escaped;
-}
diff --git a/contrib/libs/libpqxx/src/subtransaction.cxx b/contrib/libs/libpqxx/src/subtransaction.cxx
deleted file mode 100644
index 539c3c7847..0000000000
--- a/contrib/libs/libpqxx/src/subtransaction.cxx
+++ /dev/null
@@ -1,74 +0,0 @@
-/** Implementation of the pqxx::subtransaction class.
- *
- * pqxx::transaction is a nested transaction, i.e. one within a transaction
- *
- * Copyright (c) 2000-2019, Jeroen T. Vermeulen.
- *
- * See COPYING for copyright license.  If you did not receive a file called
- * COPYING with this source code, please notify the distributor of this mistake,
- * or contact the author.
- */
-#include "pqxx/compiler-internal.hxx"
-
-#include <stdexcept>
-
-#include "pqxx/connection_base"
-#include "pqxx/subtransaction"
-
-#include "pqxx/internal/gates/transaction-subtransaction.hxx"
-
-using namespace pqxx::internal;
-
-
-pqxx::subtransaction::subtransaction(
-	dbtransaction &T,
-	const std::string &Name) :
-  namedclass{"subtransaction", T.conn().adorn_name(Name)},
-  transactionfocus{T},
-  dbtransaction(T.conn(), false),
-  m_parent{T}
-{
-}
-
-
-namespace
-{
-using dbtransaction_ref = pqxx::dbtransaction &;
-}
-
-
-pqxx::subtransaction::subtransaction(
-	subtransaction &T,
-	const std::string &Name) :
-  subtransaction(dbtransaction_ref(T), Name)
-{
-}
-
-
-void pqxx::subtransaction::do_begin()
-{
-  try
-  {
-    direct_exec(("SAVEPOINT " + quote_name(name())).c_str());
-  }
-  catch (const sql_error &)
-  {
-    throw;
-  }
-}
-
-
-void pqxx::subtransaction::do_commit()
-{
-  const int ra = m_reactivation_avoidance.get();
-  m_reactivation_avoidance.clear();
-  direct_exec(("RELEASE SAVEPOINT " + quote_name(name())).c_str());
-  gate::transaction_subtransaction{m_parent}.add_reactivation_avoidance_count(
-	ra);
-}
-
-
-void pqxx::subtransaction::do_abort()
-{
-  direct_exec(("ROLLBACK TO SAVEPOINT " + quote_name(name())).c_str());
-}
diff --git a/contrib/libs/libpqxx/src/tablereader.cxx b/contrib/libs/libpqxx/src/tablereader.cxx
deleted file mode 100644
index 4e4f315c66..0000000000
--- a/contrib/libs/libpqxx/src/tablereader.cxx
+++ /dev/null
@@ -1,227 +0,0 @@
-/** Implementation of the pqxx::tablereader class.
- *
- * pqxx::tablereader enables optimized batch reads from a database table.
- *
- * Copyright (c) 2000-2019, Jeroen T. Vermeulen.
- *
- * See COPYING for copyright license.  If you did not receive a file called
- * COPYING with this source code, please notify the distributor of this mistake,
- * or contact the author.
- */
-#include "pqxx/compiler-internal.hxx"
-
-#include "pqxx/tablereader"
-#include "pqxx/transaction"
-
-#include "pqxx/internal/gates/transaction-tablereader.hxx"
-
-using namespace pqxx::internal;
-
-
-pqxx::tablereader::tablereader(
-	transaction_base &T,
-	const std::string &Name,
-	const std::string &Null) :
-  namedclass{"tablereader", Name},
-  tablestream(T, Null),
-  m_done{true}
-{
-  set_up(T, Name);
-}
-
-void pqxx::tablereader::set_up(
-	transaction_base &T,
-	const std::string &Name,
-	const std::string &Columns)
-{
-  gate::transaction_tablereader{T}.BeginCopyRead(Name, Columns);
-  register_me();
-  m_done = false;
-}
-
-pqxx::tablereader::~tablereader() noexcept
-{
-  try
-  {
-    reader_close();
-  }
-  catch (const std::exception &e)
-  {
-    reg_pending_error(e.what());
-  }
-}
-
-
-bool pqxx::tablereader::get_raw_line(std::string &Line)
-{
-  if (not m_done) try
-  {
-    m_done = not gate::transaction_tablereader{m_trans}.read_copy_line(Line);
-  }
-  catch (const std::exception &)
-  {
-    m_done = true;
-    throw;
-  }
-  return not m_done;
-}
-
-
-void pqxx::tablereader::complete()
-{
-  reader_close();
-}
-
-
-void pqxx::tablereader::reader_close()
-{
-  if (not is_finished())
-  {
-    base_close();
-
-    // If any lines remain to be read, consume them to not confuse PQendcopy()
-    if (not m_done)
-    {
-      try
-      {
-        std::string Dummy;
-        while (get_raw_line(Dummy)) ;
-      }
-      catch (const broken_connection &)
-      {
-	try { base_close(); } catch (const std::exception &) {}
-	throw;
-      }
-      catch (const std::exception &e)
-      {
-        reg_pending_error(e.what());
-      }
-    }
-  }
-}
-
-
-namespace
-{
-inline bool is_octalchar(char o) noexcept
-{
-  return (o>='0') and (o<='7');
-}
-
-/// Find first tab character at or after start position in string
-/** If not found, returns Line.size() rather than string::npos.
- */
-std::string::size_type findtab(
-	const std::string &Line,
-	std::string::size_type start)
-{
-  // TODO: Fix for multibyte encodings?
-  const auto here = Line.find('\t', start);
-  return (here == std::string::npos) ? Line.size() : here;
-}
-} // namespace
-
-
-std::string pqxx::tablereader::extract_field(
-	const std::string &Line,
-	std::string::size_type &i) const
-{
-  // TODO: Pick better exception types
-  std::string R;
-  bool isnull=false;
-  auto stop = findtab(Line, i);
-  for (; i < stop; ++i)
-  {
-    const char c = Line[i];
-    switch (c)
-    {
-    case '\n':			// End of row
-      // Shouldn't happen, but we may get old-style, newline-terminated lines
-      i = stop;
-      break;
-
-    case '\\':			// Escape sequence
-      {
-        const char n = Line[++i];
-        if (i >= Line.size())
-          throw failure{"Row ends in backslash."};
-
-	switch (n)
-	{
-	case 'N':	// Null value
-	  if (not R.empty())
-	    throw failure{"Null sequence found in nonempty field."};
-	  R = NullStr();
-	  isnull = true;
-	  break;
-
-	case '0':	// Octal sequence (3 digits)
-	case '1':
-	case '2':
-	case '3':
-	case '4':
-	case '5':
-	case '6':
-	case '7':
-          {
-	    if ((i+2) >= Line.size())
-	      throw failure{"Row ends in middle of octal value."};
-	    const char n1 = Line[++i];
-	    const char n2 = Line[++i];
-	    if (not is_octalchar(n1) or not is_octalchar(n2))
-	      throw failure{"Invalid octal in encoded table stream."};
-	    R += char(
-		(digit_to_number(n)<<6) |
-		(digit_to_number(n1)<<3) |
-		digit_to_number(n2));
-          }
-	  break;
-
-	case 'b':
-	  // TODO: Escape code?
-	  R += char(8);
-	  break;	// Backspace
-	case 'v':
-	  // TODO: Escape code?
-	  R += char(11);
-	  break;	// Vertical tab
-	case 'f':
-	  // TODO: Escape code?
-	  R += char(12);
-	  break;	// Form feed
-	case 'n':
-	  R += '\n';
-	  break;	// Newline
-	case 't':
-	  R += '\t';
-	  break;	// Tab
-	case 'r':
-	  R += '\r';
-	  break;	// Carriage return;
-
-	default:	// Self-escaped character
-	  R += n;
-	  // This may be a self-escaped tab that we thought was a terminator...
-	  if (i == stop)
-	  {
-	    if ((i+1) >= Line.size())
-	      throw internal_error{"COPY line ends in backslash."};
-	    stop = findtab(Line, i+1);
-	  }
-	  break;
-	}
-      }
-      break;
-
-    default:
-      R += c;
-      break;
-    }
-  }
-  ++i;
-
-  if (isnull and (R.size() != NullStr().size()))
-    throw failure{"Field contains data behind null sequence."};
-
-  return R;
-}
diff --git a/contrib/libs/libpqxx/src/tablestream.cxx b/contrib/libs/libpqxx/src/tablestream.cxx
deleted file mode 100644
index 6ab0148e1e..0000000000
--- a/contrib/libs/libpqxx/src/tablestream.cxx
+++ /dev/null
@@ -1,38 +0,0 @@
-/** Implementation of the pqxx::tablestream class.
- *
- * pqxx::tablestream provides optimized batch access to a database table.
- *
- * Copyright (c) 2000-2019, Jeroen T. Vermeulen.
- *
- * See COPYING for copyright license.  If you did not receive a file called
- * COPYING with this source code, please notify the distributor of this mistake,
- * or contact the author.
- */
-#include "pqxx/compiler-internal.hxx"
-
-#include "pqxx/tablestream"
-#include "pqxx/transaction"
-
-
-pqxx::tablestream::tablestream(transaction_base &STrans,
-	const std::string &Null) :
-  internal::namedclass{"tablestream"},
-  internal::transactionfocus{STrans},
-  m_null{Null}
-{
-}
-
-
-pqxx::tablestream::~tablestream() noexcept
-{
-}
-
-
-void pqxx::tablestream::base_close()
-{
-  if (not is_finished())
-  {
-    m_finished = true;
-    unregister_me();
-  }
-}
diff --git a/contrib/libs/libpqxx/src/tablewriter.cxx b/contrib/libs/libpqxx/src/tablewriter.cxx
deleted file mode 100644
index 3ca5dae253..0000000000
--- a/contrib/libs/libpqxx/src/tablewriter.cxx
+++ /dev/null
@@ -1,160 +0,0 @@
-/** Implementation of the pqxx::tablewriter class.
- *
- * pqxx::tablewriter enables optimized batch updates to a database table.
- *
- * Copyright (c) 2000-2019, Jeroen T. Vermeulen.
- *
- * See COPYING for copyright license.  If you did not receive a file called
- * COPYING with this source code, please notify the distributor of this mistake,
- * or contact the author.
- */
-#include "pqxx/compiler-internal.hxx"
-
-#include "pqxx/tablereader"
-#include "pqxx/tablewriter"
-#include "pqxx/transaction"
-
-#include "pqxx/internal/gates/transaction-tablewriter.hxx"
-
-using namespace pqxx::internal;
-
-
-pqxx::tablewriter::tablewriter(
-	transaction_base &T,
-	const std::string &WName,
-	const std::string &Null) :
-  namedclass{"tablewriter", WName},
-  tablestream(T, Null)
-{
-  set_up(T, WName);
-}
-
-
-pqxx::tablewriter::~tablewriter() noexcept
-{
-  try
-  {
-    writer_close();
-  }
-  catch (const std::exception &e)
-  {
-    reg_pending_error(e.what());
-  }
-}
-
-
-void pqxx::tablewriter::set_up(
-	transaction_base &T,
-	const std::string &WName,
-	const std::string &Columns)
-{
-  gate::transaction_tablewriter{T}.BeginCopyWrite(WName, Columns);
-  register_me();
-}
-
-
-pqxx::tablewriter &pqxx::tablewriter::operator<<(pqxx::tablereader &R)
-{
-  std::string Line;
-  // TODO: Can we do this in binary mode? (Might require protocol version check)
-  while (R.get_raw_line(Line)) write_raw_line(Line);
-  return *this;
-}
-
-
-void pqxx::tablewriter::write_raw_line(const std::string &Line)
-{
-  const std::string::size_type len = Line.size();
-  gate::transaction_tablewriter{m_trans}.write_copy_line(
-	((len == 0) or (Line[len-1] != '\n')) ?
-	Line :
-        std::string{Line, 0, len-1});
-}
-
-
-void pqxx::tablewriter::complete()
-{
-  writer_close();
-}
-
-
-void pqxx::tablewriter::writer_close()
-{
-  if (not is_finished())
-  {
-    base_close();
-    try
-    {
-      gate::transaction_tablewriter{m_trans}.end_copy_write();
-    }
-    catch (const std::exception &)
-    {
-      try { base_close(); } catch (const std::exception &) {}
-      throw;
-    }
-  }
-}
-
-
-namespace
-{
-inline char escapechar(char i) noexcept
-{
-  char r = '\0';
-  switch (i)
-  {
-    case 8:	r='b';	break;	// backspace
-    case 11:	r='v';	break;	// vertical tab
-    case 12:	r='f';	break;	// form feed
-    case '\n':	r='n';	break;	// newline
-    case '\t':	r='t';	break;	// tab
-    case '\r':	r='r';	break;	// carriage return
-    case '\\':	r='\\';	break;	// backslash
-  }
-  return r;
-}
-
-inline bool unprintable(char i) noexcept
-{
-  return i < ' ' or i > '~';
-}
-
-inline char tooctdigit(char c, int n)
-{
-  using unsigned_char = unsigned char;
-  unsigned int i = unsigned_char(c);
-  return number_to_digit((i>>(3*n)) & 0x07);
-}
-} // namespace
-
-
-std::string pqxx::internal::escape(
-        const std::string &s,
-        const std::string &null)
-{
-  if (s == null) return "\\N";
-  if (s.empty()) return s;
-
-  std::string R;
-  R.reserve(s.size()+1);
-
-  for (const auto c: s)
-  {
-    const char e = escapechar(c);
-    if (e)
-    {
-      R += '\\';
-      R += e;
-    }
-    else if (unprintable(c))
-    {
-      R += "\\";
-      for (int n=2; n>=0; --n) R += tooctdigit(c, n);
-    }
-    else
-    {
-      R += c;
-    }
-  }
-  return R;
-}
diff --git a/contrib/libs/libpqxx/src/transaction.cxx b/contrib/libs/libpqxx/src/transaction.cxx
deleted file mode 100644
index ff0f469e6c..0000000000
--- a/contrib/libs/libpqxx/src/transaction.cxx
+++ /dev/null
@@ -1,72 +0,0 @@
-/** Implementation of the pqxx::transaction class.
- *
- * pqxx::transaction represents a regular database transaction.
- *
- * Copyright (c) 2000-2019, Jeroen T. Vermeulen.
- *
- * See COPYING for copyright license.  If you did not receive a file called
- * COPYING with this source code, please notify the distributor of this mistake,
- * or contact the author.
- */
-#include "pqxx/compiler-internal.hxx"
-
-#include <stdexcept>
-
-#include "pqxx/connection_base"
-#include "pqxx/result"
-#include "pqxx/transaction"
-
-
-pqxx::internal::basic_transaction::basic_transaction(
-	connection_base &C,
-	const std::string &IsolationLevel,
-	readwrite_policy rw) :
-  namedclass{"transaction"},
-  dbtransaction(C, IsolationLevel, rw)
-{
-}
-
-
-void pqxx::internal::basic_transaction::do_commit()
-{
-  try
-  {
-    direct_exec("COMMIT");
-  }
-  catch (const statement_completion_unknown &e)
-  {
-    // Outcome of "commit" is unknown.  This is a disaster: we don't know the
-    // resulting state of the database.
-    process_notice(e.what() + std::string{"\n"});
-    const std::string msg =
-      "WARNING: Commit of transaction '" + name() + "' is unknown. "
-	"There is no way to tell whether the transaction succeeded "
-	"or was aborted except to check manually.";
-    process_notice(msg + "\n");
-    throw in_doubt_error{msg};
-  }
-  catch (const std::exception &e)
-  {
-    if (not conn().is_open())
-    {
-      // We've lost the connection while committing.  There is just no way of
-      // telling what happened on the other end.  >8-O
-      process_notice(e.what() + std::string{"\n"});
-
-      const std::string Msg =
-	"WARNING: Connection lost while committing transaction "
-	"'" + name() + "'. "
-	"There is no way to tell whether the transaction succeeded "
-	"or was aborted except to check manually.";
-
-      process_notice(Msg + "\n");
-      throw in_doubt_error{Msg};
-    }
-    else
-    {
-      // Commit failed--probably due to a constraint violation or something
-      // similar.
-      throw;
-    }
-  }
-}
diff --git a/contrib/libs/libpqxx/src/transaction_base.cxx b/contrib/libs/libpqxx/src/transaction_base.cxx
deleted file mode 100644
index 84a7ab7e1b..0000000000
--- a/contrib/libs/libpqxx/src/transaction_base.cxx
+++ /dev/null
@@ -1,577 +0,0 @@
-/** Common code and definitions for the transaction classes.
- *
- * pqxx::transaction_base defines the interface for any abstract class that
- * represents a database transaction.
- *
- * Copyright (c) 2000-2019, Jeroen T. Vermeulen.
- *
- * See COPYING for copyright license.  If you did not receive a file called
- * COPYING with this source code, please notify the distributor of this mistake,
- * or contact the author.
- */
-#include "pqxx/compiler-internal.hxx"
-
-#include <cstring>
-#include <stdexcept>
-
-#include "pqxx/connection_base"
-#include "pqxx/result"
-#include "pqxx/transaction_base"
-
-#include "pqxx/internal/gates/connection-transaction.hxx"
-#include "pqxx/internal/gates/connection-parameterized_invocation.hxx"
-#include "pqxx/internal/gates/transaction-transactionfocus.hxx"
-
-#include "pqxx/internal/encodings.hxx"
-
-
-using namespace pqxx::internal;
-
-
-pqxx::internal::parameterized_invocation::parameterized_invocation(
-	connection_base &c,
-	const std::string &query) :
-  m_home{c},
-  m_query{query}
-{
-}
-
-
-pqxx::result pqxx::internal::parameterized_invocation::exec()
-{
-  std::vector<const char *> values;
-  std::vector<int> lengths;
-  std::vector<int> binaries;
-  const int elements = marshall(values, lengths, binaries);
-
-  return gate::connection_parameterized_invocation{m_home}.parameterized_exec(
-	m_query,
-	values.data(),
-	lengths.data(),
-	binaries.data(),
-	elements);
-}
-
-
-pqxx::transaction_base::transaction_base(connection_base &C, bool direct) :
-  namedclass{"transaction_base"},
-  m_conn{C}
-{
-  if (direct)
-  {
-    gate::connection_transaction gate{conn()};
-    gate.register_transaction(this);
-    m_registered = true;
-  }
-}
-
-
-pqxx::transaction_base::~transaction_base()
-{
-  try
-  {
-    reactivation_avoidance_clear();
-    if (not m_pending_error.empty())
-      process_notice("UNPROCESSED ERROR: " + m_pending_error + "\n");
-
-    if (m_registered)
-    {
-      m_conn.process_notice(description() + " was never closed properly!\n");
-      gate::connection_transaction gate{conn()};
-      gate.unregister_transaction(this);
-    }
-  }
-  catch (const std::exception &e)
-  {
-    try
-    {
-      process_notice(std::string{e.what()} + "\n");
-    }
-    catch (const std::exception &)
-    {
-      process_notice(e.what());
-    }
-  }
-}
-
-
-void pqxx::transaction_base::commit()
-{
-  CheckPendingError();
-
-  // Check previous status code.  Caller should only call this function if
-  // we're in "implicit" state, but multiple commits are silently accepted.
-  switch (m_status)
-  {
-  case st_nascent:	// Empty transaction.  No skin off our nose.
-    return;
-
-  case st_active:	// Just fine.  This is what we expect.
-    break;
-
-  case st_aborted:
-    throw usage_error{"Attempt to commit previously aborted " + description()};
-
-  case st_committed:
-    // Transaction has been committed already.  This is not exactly proper
-    // behaviour, but throwing an exception here would only give the impression
-    // that an abort is needed--which would only confuse things further at this
-    // stage.
-    // Therefore, multiple commits are accepted, though under protest.
-    m_conn.process_notice(description() + " committed more than once.\n");
-    return;
-
-  case st_in_doubt:
-    // Transaction may or may not have been committed.  The only thing we can
-    // really do is keep telling the caller that the transaction is in doubt.
-    throw in_doubt_error{
-	description() + " committed again while in an indeterminate state."};
-
-  default:
-    throw internal_error{"pqxx::transaction: invalid status code."};
-  }
-
-  // Tricky one.  If stream is nested in transaction but inside the same scope,
-  // the commit() will come before the stream is closed.  Which means the
-  // commit is premature.  Punish this swiftly and without fail to discourage
-  // the habit from forming.
-  if (m_focus.get())
-    throw failure{
-	"Attempt to commit " + description() + " with " +
-	m_focus.get()->description() + " still open."};
-
-  // Check that we're still connected (as far as we know--this is not an
-  // absolute thing!) before trying to commit.  If the connection was broken
-  // already, the commit would fail anyway but this way at least we don't remain
-  // in-doubt as to whether the backend got the commit order at all.
-  if (not m_conn.is_open())
-    throw broken_connection{
-	"Broken connection to backend; cannot complete transaction."};
-
-  try
-  {
-    do_commit();
-    m_status = st_committed;
-  }
-  catch (const in_doubt_error &)
-  {
-    m_status = st_in_doubt;
-    throw;
-  }
-  catch (const std::exception &)
-  {
-    m_status = st_aborted;
-    throw;
-  }
-
-  gate::connection_transaction gate{conn()};
-  gate.add_variables(m_vars);
-
-  End();
-}
-
-
-void pqxx::transaction_base::abort()
-{
-  // Check previous status code.  Quietly accept multiple aborts to
-  // simplify emergency bailout code.
-  switch (m_status)
-  {
-  case st_nascent:	// Never began transaction.  No need to issue rollback.
-    break;
-
-  case st_active:
-    try { do_abort(); } catch (const std::exception &) { }
-    break;
-
-  case st_aborted:
-    return;
-
-  case st_committed:
-    throw usage_error{"Attempt to abort previously committed " + description()};
-
-  case st_in_doubt:
-    // Aborting an in-doubt transaction is probably a reasonably sane response
-    // to an insane situation.  Log it, but do not complain.
-    m_conn.process_notice(
-	"Warning: " + description() + " aborted after going into "
-	"indeterminate state; it may have been executed anyway.\n");
-    return;
-
-  default:
-    throw internal_error{"Invalid transaction status."};
-  }
-
-  m_status = st_aborted;
-  End();
-}
-
-
-std::string pqxx::transaction_base::esc_raw(const std::string &str) const
-{
-  const unsigned char *p = reinterpret_cast<const unsigned char *>(str.c_str());
-  return conn().esc_raw(p, str.size());
-}
-
-
-std::string pqxx::transaction_base::quote_raw(const std::string &str) const
-{
-  const unsigned char *p = reinterpret_cast<const unsigned char *>(str.c_str());
-  return conn().quote_raw(p, str.size());
-}
-
-
-void pqxx::transaction_base::activate()
-{
-  switch (m_status)
-  {
-  case st_nascent:
-    // Make sure transaction has begun before executing anything
-    Begin();
-    break;
-
-  case st_active:
-    break;
-
-  case st_committed:
-  case st_aborted:
-  case st_in_doubt:
-    throw usage_error{
-	"Attempt to activate " + description() + " "
-	"which is already closed."};
-
-  default:
-    throw internal_error{"pqxx::transaction: invalid status code."};
-  }
-}
-
-
-pqxx::result pqxx::transaction_base::exec(
-	const std::string &Query,
-	const std::string &Desc)
-{
-  CheckPendingError();
-
-  const std::string N = (Desc.empty() ? "" : "'" + Desc + "' ");
-
-  if (m_focus.get())
-    throw usage_error{
-	"Attempt to execute query " + N +
-	"on " + description() + " "
-	"with " + m_focus.get()->description() + " still open."};
-
-  try
-  {
-    activate();
-  }
-  catch (const usage_error &e)
-  {
-    throw usage_error{"Error executing query " + N + ".  " + e.what()};
-  }
-
-  // TODO: Pass Desc to do_exec(), and from there on down
-  return do_exec(Query.c_str());
-}
-
-
-pqxx::result pqxx::transaction_base::exec_n(
-	size_t rows,
-	const std::string &Query,
-	const std::string &Desc)
-{
-  const result r = exec(Query, Desc);
-  if (r.size() != rows)
-  {
-    const std::string N = (Desc.empty() ? "" : "'" + Desc + "'");
-    throw unexpected_rows{
-	"Expected " + to_string(rows) + " row(s) of data "
-        "from query " + N + ", got " + to_string(r.size()) + "."};
-  }
-  return r;
-}
-
-
-void pqxx::transaction_base::check_rowcount_prepared(
-	const std::string &statement,
-	size_t expected_rows,
-	size_t actual_rows)
-{
-  if (actual_rows != expected_rows)
-  {
-    throw unexpected_rows{
-	"Expected " + to_string(expected_rows) + " row(s) of data "
-	"from prepared statement '" + statement + "', got " +
-	to_string(actual_rows) + "."};
-  }
-}
-
-
-void pqxx::transaction_base::check_rowcount_params(
-	size_t expected_rows,
-	size_t actual_rows)
-{
-  if (actual_rows != expected_rows)
-  {
-    throw unexpected_rows{
-	"Expected " + to_string(expected_rows) + " row(s) of data "
-	"from parameterised query, got " + to_string(actual_rows) + "."};
-  }
-}
-
-
-pqxx::internal::parameterized_invocation
-pqxx::transaction_base::parameterized(const std::string &query)
-{
-#include "pqxx/internal/ignore-deprecated-pre.hxx"
-  return internal::parameterized_invocation{conn(), query};
-#include "pqxx/internal/ignore-deprecated-post.hxx"
-}
-
-
-pqxx::prepare::invocation
-pqxx::transaction_base::prepared(const std::string &statement)
-{
-  try
-  {
-    activate();
-  }
-  catch (const usage_error &e)
-  {
-    throw usage_error{
-	"Error executing prepared statement " + statement + ".  " + e.what()};
-  }
-#include "pqxx/internal/ignore-deprecated-pre.hxx"
-  return prepare::invocation{*this, statement};
-#include "pqxx/internal/ignore-deprecated-post.hxx"
-}
-
-
-pqxx::result pqxx::transaction_base::internal_exec_prepared(
-	const std::string &statement,
-	const internal::params &args,
-	result_format format)
-{
-  gate::connection_transaction gate{conn()};
-  return gate.exec_prepared(statement, args, format);
-}
-
-
-pqxx::result pqxx::transaction_base::internal_exec_params(
-	const std::string &query,
-	const internal::params &args)
-{
-  gate::connection_transaction gate{conn()};
-  return gate.exec_params(query, args);
-}
-
-
-void pqxx::transaction_base::set_variable(
-	const std::string &Var,
-	const std::string &Value)
-{
-  // Before committing to this new value, see what the backend thinks about it
-  gate::connection_transaction gate{conn()};
-  gate.raw_set_var(Var, Value);
-  m_vars[Var] = Value;
-}
-
-
-std::string pqxx::transaction_base::get_variable(const std::string &Var)
-{
-  const std::map<std::string,std::string>::const_iterator i = m_vars.find(Var);
-  if (i != m_vars.end()) return i->second;
-  return gate::connection_transaction{conn()}.raw_get_var(Var);
-}
-
-
-void pqxx::transaction_base::Begin()
-{
-  if (m_status != st_nascent)
-    throw internal_error{
-	"pqxx::transaction: Begin() called while not in nascent state."};
-
-  try
-  {
-    // Better handle any pending notifications before we begin
-    m_conn.get_notifs();
-
-    do_begin();
-    m_status = st_active;
-  }
-  catch (const std::exception &)
-  {
-    End();
-    throw;
-  }
-}
-
-
-void pqxx::transaction_base::End() noexcept
-{
-  try
-  {
-    try { CheckPendingError(); }
-    catch (const std::exception &e) { m_conn.process_notice(e.what()); }
-
-    gate::connection_transaction gate{conn()};
-    if (m_registered)
-    {
-      m_registered = false;
-      gate.unregister_transaction(this);
-    }
-
-    if (m_status != st_active) return;
-
-    if (m_focus.get())
-      m_conn.process_notice(
-	"Closing " + description() + "  with " +
-	m_focus.get()->description() + " still open.\n");
-
-    try { abort(); }
-    catch (const std::exception &e) { m_conn.process_notice(e.what()); }
-
-    gate.take_reactivation_avoidance(m_reactivation_avoidance.get());
-    m_reactivation_avoidance.clear();
-  }
-  catch (const std::exception &e)
-  {
-    try { m_conn.process_notice(e.what()); } catch (const std::exception &) {}
-  }
-}
-
-
-void pqxx::transaction_base::register_focus(internal::transactionfocus *S)
-{
-  m_focus.register_guest(S);
-}
-
-
-void pqxx::transaction_base::unregister_focus(internal::transactionfocus *S)
-	noexcept
-{
-  try
-  {
-    m_focus.unregister_guest(S);
-  }
-  catch (const std::exception &e)
-  {
-    m_conn.process_notice(std::string{e.what()} + "\n");
-  }
-}
-
-
-pqxx::result pqxx::transaction_base::direct_exec(const char C[], int Retries)
-{
-  CheckPendingError();
-  return gate::connection_transaction{conn()}.exec(C, Retries);
-}
-
-
-void pqxx::transaction_base::register_pending_error(const std::string &Err)
-	noexcept
-{
-  if (m_pending_error.empty() and not Err.empty())
-  {
-    try
-    {
-      m_pending_error = Err;
-    }
-    catch (const std::exception &e)
-    {
-      try
-      {
-        process_notice("UNABLE TO PROCESS ERROR\n");
-        process_notice(e.what());
-        process_notice("ERROR WAS:");
-        process_notice(Err);
-      }
-      catch (...)
-      {
-      }
-    }
-  }
-}
-
-
-void pqxx::transaction_base::CheckPendingError()
-{
-  if (not m_pending_error.empty())
-  {
-    const std::string Err{m_pending_error};
-    m_pending_error.clear();
-    throw failure{Err};
-  }
-}
-
-
-namespace
-{
-std::string MakeCopyString(
-        const std::string &Table,
-        const std::string &Columns)
-{
-  std::string Q = "COPY " + Table + " ";
-  if (not Columns.empty()) Q += "(" + Columns + ") ";
-  return Q;
-}
-} // namespace
-
-
-void pqxx::transaction_base::BeginCopyRead(
-	const std::string &Table,
-	const std::string &Columns)
-{
-  exec(MakeCopyString(Table, Columns) + "TO STDOUT");
-}
-
-
-void pqxx::transaction_base::BeginCopyWrite(
-	const std::string &Table,
-	const std::string &Columns)
-{
-  exec(MakeCopyString(Table, Columns) + "FROM STDIN");
-}
-
-
-bool pqxx::transaction_base::read_copy_line(std::string &line)
-{
-  return gate::connection_transaction{conn()}.read_copy_line(line);
-}
-
-
-void pqxx::transaction_base::write_copy_line(const std::string &line)
-{
-  gate::connection_transaction gate{conn()};
-  gate.write_copy_line(line);
-}
-
-
-void pqxx::transaction_base::end_copy_write()
-{
-  gate::connection_transaction gate{conn()};
-  gate.end_copy_write();
-}
-
-
-void pqxx::internal::transactionfocus::register_me()
-{
-  gate::transaction_transactionfocus gate{m_trans};
-  gate.register_focus(this);
-  m_registered = true;
-}
-
-
-void pqxx::internal::transactionfocus::unregister_me() noexcept
-{
-  gate::transaction_transactionfocus gate{m_trans};
-  gate.unregister_focus(this);
-  m_registered = false;
-}
-
-void
-pqxx::internal::transactionfocus::reg_pending_error(const std::string &err)
-	noexcept
-{
-  gate::transaction_transactionfocus gate{m_trans};
-  gate.register_pending_error(err);
-}
diff --git a/contrib/libs/libpqxx/src/util.cxx b/contrib/libs/libpqxx/src/util.cxx
deleted file mode 100644
index 646ace9930..0000000000
--- a/contrib/libs/libpqxx/src/util.cxx
+++ /dev/null
@@ -1,121 +0,0 @@
-/** Various utility functions.
- *
- * Copyright (c) 2000-2019, Jeroen T. Vermeulen.
- *
- * See COPYING for copyright license.  If you did not receive a file called
- * COPYING with this source code, please notify the distributor of this mistake,
- * or contact the author.
- */
-#include "pqxx/compiler-internal.hxx"
-
-#include <cerrno>
-#include <chrono>
-#include <cmath>
-#include <cstdlib>
-#include <cstring>
-#include <new>
-#include <thread>
-
-extern "C"
-{
-#include "libpq-fe.h"
-}
-
-#include "pqxx/except"
-#include "pqxx/util"
-
-
-using namespace pqxx::internal;
-
-
-pqxx::thread_safety_model pqxx::describe_thread_safety() noexcept
-{
-  thread_safety_model model;
-
-  if (PQisthreadsafe())
-  {
-    model.safe_libpq = true;
-  }
-  else
-  {
-    model.safe_libpq = false;
-    model.description += "Using a libpq build that is not thread-safe.\n";
-  }
-
-  // Sadly I'm not aware of any way to avoid this just yet.
-  model.safe_kerberos = false;
-  model.description +=
-	"Kerberos is not thread-safe.  If your application uses Kerberos, "
-	"protect all calls to Kerberos or libpqxx using a global lock.\n";
-
-  return model;
-}
-
-
-std::string pqxx::internal::namedclass::description() const
-{
-  try
-  {
-    std::string desc = classname();
-    if (not name().empty()) desc += " '" + name() + "'";
-    return desc;
-  }
-  catch (const std::exception &)
-  {
-    // Oops, string composition failed!  Probably out of memory.
-    // Let's try something easier.
-  }
-  return name().empty() ? classname() : name();
-}
-
-
-void pqxx::internal::CheckUniqueRegistration(const namedclass *New,
-    const namedclass *Old)
-{
-  if (New == nullptr)
-    throw internal_error{"null pointer registered."};
-  if (Old)
-  {
-    if (Old == New)
-      throw usage_error{"Started twice: " + New->description()};
-    throw usage_error{
-	"Started " + New->description() + " while " + Old->description() +
-	" still active."};
-  }
-}
-
-
-void pqxx::internal::CheckUniqueUnregistration(const namedclass *New,
-    const namedclass *Old)
-{
-  if (New != Old)
-  {
-    if (New == nullptr)
-      throw usage_error{
-	"Expected to close " + Old->description() + ", "
-	"but got null pointer instead."};
-    if (Old == nullptr)
-      throw usage_error{"Closed while not open: " + New->description()};
-    throw usage_error{
-	"Closed " + New->description() + "; "
-	"expected to close " + Old->description()};
-  }
-}
-
-
-void pqxx::internal::freepqmem(const void *p) noexcept
-{
-  PQfreemem(const_cast<void *>(p));
-}
-
-
-void pqxx::internal::freemallocmem(const void *p) noexcept
-{
-  free(const_cast<void *>(p));
-}
-
-
-void pqxx::internal::sleep_seconds(int s)
-{
-  std::this_thread::sleep_for(std::chrono::seconds(s));
-}
diff --git a/contrib/libs/libpqxx/src/version.cxx b/contrib/libs/libpqxx/src/version.cxx
deleted file mode 100644
index 1fba1ec6d4..0000000000
--- a/contrib/libs/libpqxx/src/version.cxx
+++ /dev/null
@@ -1,18 +0,0 @@
-#include "pqxx/compiler-internal.hxx"
-
-#include "pqxx/version"
-
-namespace pqxx
-{
-namespace internal
-{
-// One, single definition of this function.  If a call fails to link, then the
-// libpqxx binary was built against a different libpqxx version than the code
-// which is being linked against it.
-template<> PQXX_LIBEXPORT
-int check_library_version<PQXX_VERSION_MAJOR, PQXX_VERSION_MINOR>() noexcept
-{
-  return 0;
-}
-}
-}
diff --git a/contrib/libs/libpqxx/ya.make b/contrib/libs/libpqxx/ya.make
deleted file mode 100644
index cd0e48d9a2..0000000000
--- a/contrib/libs/libpqxx/ya.make
+++ /dev/null
@@ -1,66 +0,0 @@
-# Generated by devtools/yamaker from nixpkgs 22.05.
-
-LIBRARY()
-
-LICENSE(BSD-3-Clause)
-
-LICENSE_TEXTS(.yandex_meta/licenses.list.txt)
-
-VERSION(6.4.5)
-
-ORIGINAL_SOURCE(https://github.com/jtv/libpqxx/archive/6.4.5.tar.gz)
-
-PEERDIR(
-    contrib/libs/libpq
-)
-
-ADDINCL(
-    GLOBAL contrib/libs/libpqxx/include
-    contrib/libs/libpq
-    contrib/libs/libpq/src/interfaces/libpq
-)
-
-NO_COMPILER_WARNINGS()
-
-NO_UTIL()
-
-CFLAGS(
-    -DHAVE_CONFIG_H
-)
-
-SRCS(
-    src/array.cxx
-    src/binarystring.cxx
-    src/connection.cxx
-    src/connection_base.cxx
-    src/cursor.cxx
-    src/dbtransaction.cxx
-    src/encodings.cxx
-    src/errorhandler.cxx
-    src/except.cxx
-    src/field.cxx
-    src/largeobject.cxx
-    src/nontransaction.cxx
-    src/notification.cxx
-    src/pipeline.cxx
-    src/prepared_statement.cxx
-    src/result.cxx
-    src/robusttransaction.cxx
-    src/row.cxx
-    src/sql_cursor.cxx
-    src/statement_parameters.cxx
-    src/strconv.cxx
-    src/stream_base.cxx
-    src/stream_from.cxx
-    src/stream_to.cxx
-    src/subtransaction.cxx
-    src/tablereader.cxx
-    src/tablestream.cxx
-    src/tablewriter.cxx
-    src/transaction.cxx
-    src/transaction_base.cxx
-    src/util.cxx
-    src/version.cxx
-)
-
-END()
diff --git a/library/cpp/clickhouse/client/base/coded.cpp b/library/cpp/clickhouse/client/base/coded.cpp
deleted file mode 100644
index 5a5d56d158..0000000000
--- a/library/cpp/clickhouse/client/base/coded.cpp
+++ /dev/null
@@ -1,101 +0,0 @@
-#include "coded.h"
-
-#include <memory.h>
-
-namespace NClickHouse {
-    static const int MAX_VARINT_BYTES = 10;
-
-    TCodedInputStream::TCodedInputStream(IZeroCopyInput* input)
-        : Input_(input)
-    {
-    }
-
-    bool TCodedInputStream::ReadRaw(void* buffer, size_t size) {
-        ui8* p = static_cast<ui8*>(buffer);
-
-        while (size > 0) {
-            const void* ptr;
-
-            if (size_t len = Input_->Next(&ptr, size)) {
-                memcpy(p, ptr, len);
-
-                p += len;
-                size -= len;
-            } else {
-                break;
-            }
-        }
-
-        return size == 0;
-    }
-
-    bool TCodedInputStream::Skip(size_t count) {
-        while (count > 0) {
-            const void* ptr;
-            size_t len = Input_->Next(&ptr, count);
-
-            if (len == 0) {
-                return false;
-            }
-
-            count -= len;
-        }
-
-        return true;
-    }
-
-    bool TCodedInputStream::ReadVarint64(ui64* value) {
-        *value = 0;
-
-        for (size_t i = 0; i < 9; ++i) {
-            ui8 byte;
-
-            if (!Input_->Read(&byte, sizeof(byte))) {
-                return false;
-            } else {
-                *value |= (byte & 0x7F) << (7 * i);
-
-                if (!(byte & 0x80)) {
-                    return true;
-                }
-            }
-        }
-
-        // TODO skip invalid
-        return false;
-    }
-
-    TCodedOutputStream::TCodedOutputStream(IOutputStream* output)
-        : Output_(output)
-    {
-    }
-
-    void TCodedOutputStream::Flush() {
-        Output_->Flush();
-    }
-
-    void TCodedOutputStream::WriteRaw(const void* buffer, int size) {
-        Output_->Write(buffer, size);
-    }
-
-    void TCodedOutputStream::WriteVarint64(ui64 value) {
-        ui8 bytes[MAX_VARINT_BYTES];
-        int size = 0;
-
-        for (size_t i = 0; i < 9; ++i) {
-            ui8 byte = value & 0x7F;
-            if (value > 0x7F)
-                byte |= 0x80;
-
-            bytes[size++] = byte;
-
-            value >>= 7;
-            if (!value) {
-                break;
-            }
-        }
-
-        WriteRaw(bytes, size);
-    }
-
-}
diff --git a/library/cpp/clickhouse/client/base/coded.h b/library/cpp/clickhouse/client/base/coded.h
deleted file mode 100644
index 486cfc8165..0000000000
--- a/library/cpp/clickhouse/client/base/coded.h
+++ /dev/null
@@ -1,64 +0,0 @@
-#pragma once
-
-#include <util/generic/string.h>
-#include <util/stream/output.h>
-#include <util/stream/zerocopy.h>
-
-namespace NClickHouse {
-    /**
- * Class which reads and decodes binary data which is composed of varint-
- * encoded integers and fixed-width pieces.
- */
-    class TCodedInputStream {
-    public:
-        TCodedInputStream() = default;
-        /// Create a CodedInputStream that reads from the given ZeroCopyInput.
-        explicit TCodedInputStream(IZeroCopyInput* input);
-
-        // Read an unsigned integer with Varint encoding, truncating to 32 bits.
-        // Reading a 32-bit value is equivalent to reading a 64-bit one and casting
-        // it to uint32, but may be more efficient.
-        bool ReadVarint32(ui32* value);
-
-        // Read an unsigned integer with Varint encoding.
-        bool ReadVarint64(ui64* value);
-
-        // Read raw bytes, copying them into the given buffer.
-        bool ReadRaw(void* buffer, size_t size);
-
-        // Like ReadRaw, but reads into a string.
-        //
-        // Implementation Note:  ReadString() grows the string gradually as it
-        // reads in the data, rather than allocating the entire requested size
-        // upfront.  This prevents denial-of-service attacks in which a client
-        // could claim that a string is going to be MAX_INT bytes long in order to
-        // crash the server because it can't allocate this much space at once.
-        bool ReadString(TString* buffer, int size);
-
-        // Skips a number of bytes.  Returns false if an underlying read error
-        // occurs.
-        bool Skip(size_t count);
-
-    private:
-        IZeroCopyInput* Input_;
-    };
-
-    class TCodedOutputStream {
-    public:
-        TCodedOutputStream() = default;
-        /// Create a CodedInputStream that writes to the given ZeroCopyOutput.
-        explicit TCodedOutputStream(IOutputStream* output);
-
-        void Flush();
-
-        // Write raw bytes, copying them from the given buffer.
-        void WriteRaw(const void* buffer, int size);
-
-        /// Write an unsigned integer with Varint encoding.
-        void WriteVarint64(const ui64 value);
-
-    private:
-        IOutputStream* Output_;
-    };
-
-}
diff --git a/library/cpp/clickhouse/client/base/compressed.cpp b/library/cpp/clickhouse/client/base/compressed.cpp
deleted file mode 100644
index b883d534ee..0000000000
--- a/library/cpp/clickhouse/client/base/compressed.cpp
+++ /dev/null
@@ -1,88 +0,0 @@
-#include "compressed.h"
-#include "wire_format.h"
-
-#include <util/generic/yexception.h>
-
-#include <contrib/libs/lz4/lz4.h>
-#include <contrib/restricted/cityhash-1.0.2/city.h>
-
-#define DBMS_MAX_COMPRESSED_SIZE 0x40000000ULL // 1GB
-
-namespace NClickHouse {
-    TCompressedInput::TCompressedInput(TCodedInputStream* input)
-        : Input_(input)
-    {
-    }
-
-    TCompressedInput::~TCompressedInput() {
-        if (!Mem_.Exhausted()) {
-            Y_ABORT("some data was not read");
-        }
-    }
-
-    size_t TCompressedInput::DoNext(const void** ptr, size_t len) {
-        if (Mem_.Exhausted()) {
-            if (!Decompress()) {
-                return 0;
-            }
-        }
-
-        return Mem_.Next(ptr, len);
-    }
-
-    bool TCompressedInput::Decompress() {
-        CityHash_v1_0_2::uint128 hash;
-        ui32 compressed = 0;
-        ui32 original = 0;
-        ui8 method = 0;
-
-        if (!TWireFormat::ReadFixed(Input_, &hash)) {
-            return false;
-        }
-        if (!TWireFormat::ReadFixed(Input_, &method)) {
-            return false;
-        }
-
-        if (method != 0x82) {
-            ythrow yexception() << "unsupported compression method "
-                                << int(method);
-        } else {
-            if (!TWireFormat::ReadFixed(Input_, &compressed)) {
-                return false;
-            }
-            if (!TWireFormat::ReadFixed(Input_, &original)) {
-                return false;
-            }
-
-            if (compressed > DBMS_MAX_COMPRESSED_SIZE) {
-                ythrow yexception() << "compressed data too big";
-            }
-
-            TTempBuf tmp(compressed);
-
-            // Заполнить заголовок сжатых данных.
-            tmp.Append(&method, sizeof(method));
-            tmp.Append(&compressed, sizeof(compressed));
-            tmp.Append(&original, sizeof(original));
-
-            if (!TWireFormat::ReadBytes(Input_, tmp.Data() + 9, compressed - 9)) {
-                return false;
-            } else {
-                if (hash != CityHash_v1_0_2::CityHash128(tmp.Data(), compressed)) {
-                    ythrow yexception() << "data was corrupted";
-                }
-            }
-
-            Data_ = TTempBuf(original);
-
-            if (LZ4_decompress_fast(tmp.Data() + 9, Data_.Data(), original) < 0) {
-                ythrow yexception() << "can't decompress data";
-            } else {
-                Mem_.Reset(Data_.Data(), original);
-            }
-        }
-
-        return true;
-    }
-
-}
diff --git a/library/cpp/clickhouse/client/base/compressed.h b/library/cpp/clickhouse/client/base/compressed.h
deleted file mode 100644
index d7c628ebb7..0000000000
--- a/library/cpp/clickhouse/client/base/compressed.h
+++ /dev/null
@@ -1,27 +0,0 @@
-#pragma once
-
-#include "coded.h"
-
-#include <util/memory/tempbuf.h>
-#include <util/stream/zerocopy.h>
-#include <util/stream/mem.h>
-
-namespace NClickHouse {
-    class TCompressedInput: public IZeroCopyInput {
-    public:
-        TCompressedInput(TCodedInputStream* input);
-        ~TCompressedInput();
-
-    protected:
-        size_t DoNext(const void** ptr, size_t len) override;
-
-        bool Decompress();
-
-    private:
-        TCodedInputStream* const Input_;
-
-        TTempBuf Data_;
-        TMemoryInput Mem_;
-    };
-
-}
diff --git a/library/cpp/clickhouse/client/base/wire_format.h b/library/cpp/clickhouse/client/base/wire_format.h
deleted file mode 100644
index 805a2d3212..0000000000
--- a/library/cpp/clickhouse/client/base/wire_format.h
+++ /dev/null
@@ -1,103 +0,0 @@
-#pragma once
-
-#include "coded.h"
-
-#include <util/generic/string.h>
-#include <util/memory/tempbuf.h>
-
-namespace NClickHouse {
-    class TWireFormat {
-    public:
-        template <typename T>
-        static bool ReadFixed(TCodedInputStream* input, T* value);
-
-        static bool ReadString(TCodedInputStream* input, TString* value);
-
-        static bool ReadBytes(TCodedInputStream* input, void* buf, size_t len);
-
-        static bool ReadUInt64(TCodedInputStream* input, ui64* value);
-
-        template <typename T>
-        static void WriteFixed(TCodedOutputStream* output, const T& value);
-
-        static void WriteBytes(TCodedOutputStream* output, const void* buf, size_t len);
-
-        static void WriteString(TCodedOutputStream* output, const TString& value);
-
-        static void WriteStringBuf(TCodedOutputStream* output, const TStringBuf value);
-
-        static void WriteUInt64(TCodedOutputStream* output, const ui64 value);
-    };
-
-    template <typename T>
-    inline bool TWireFormat::ReadFixed(
-        TCodedInputStream* input,
-        T* value) {
-        return input->ReadRaw(value, sizeof(T));
-    }
-
-    inline bool TWireFormat::ReadString(
-        TCodedInputStream* input,
-        TString* value) {
-        ui64 len;
-
-        if (input->ReadVarint64(&len)) {
-            if (len > 0x00FFFFFFULL) {
-                return false;
-            }
-            TTempBuf buf(len);
-            if (input->ReadRaw(buf.Data(), (size_t)len)) {
-                value->assign(buf.Data(), len);
-                return true;
-            }
-        }
-
-        return false;
-    }
-
-    inline bool TWireFormat::ReadBytes(
-        TCodedInputStream* input, void* buf, size_t len) {
-        return input->ReadRaw(buf, len);
-    }
-
-    inline bool TWireFormat::ReadUInt64(
-        TCodedInputStream* input,
-        ui64* value) {
-        return input->ReadVarint64(value);
-    }
-
-    template <typename T>
-    inline void TWireFormat::WriteFixed(
-        TCodedOutputStream* output,
-        const T& value) {
-        output->WriteRaw(&value, sizeof(T));
-    }
-
-    inline void TWireFormat::WriteBytes(
-        TCodedOutputStream* output,
-        const void* buf,
-        size_t len) {
-        output->WriteRaw(buf, len);
-    }
-
-    inline void TWireFormat::WriteString(
-        TCodedOutputStream* output,
-        const TString& value) {
-        output->WriteVarint64(value.size());
-        output->WriteRaw(value.data(), value.size());
-    }
-
-    inline void TWireFormat::WriteStringBuf(
-        TCodedOutputStream* output,
-        const TStringBuf value) {
-        output->WriteVarint64(value.size());
-        output->WriteRaw(value.data(), value.size());
-    }
-
-    inline void TWireFormat::WriteUInt64(
-        TCodedOutputStream* output,
-        const ui64 value) {
-        output->WriteVarint64(value);
-    }
-
-}
diff --git a/library/cpp/clickhouse/client/base/ya.make b/library/cpp/clickhouse/client/base/ya.make
deleted file mode 100644
index 8c3a1f6552..0000000000
--- a/library/cpp/clickhouse/client/base/ya.make
+++ /dev/null
@@ -1,9 +0,0 @@
-LIBRARY()
-
-SRCS(
-    coded.cpp
-    compressed.cpp
-    wire_format.h
-)
-
-END()
diff --git a/library/cpp/clickhouse/client/block.cpp b/library/cpp/clickhouse/client/block.cpp
deleted file mode 100644
index d39f1967c7..0000000000
--- a/library/cpp/clickhouse/client/block.cpp
+++ /dev/null
@@ -1,107 +0,0 @@
-#include "block.h"
-
-#include <util/generic/yexception.h>
-
-namespace NClickHouse {
-    TBlock::TIterator::TIterator(const TBlock& block)
-        : Block_(block)
-        , Idx_(0)
-    {
-    }
-
-    const TString& TBlock::TIterator::Name() const {
-        return Block_.Columns_[Idx_].Name;
-    }
-
-    TTypeRef TBlock::TIterator::Type() const {
-        return Block_.Columns_[Idx_].Column->Type();
-    }
-
-    TColumnRef TBlock::TIterator::Column() const {
-        return Block_.Columns_[Idx_].Column;
-    }
-
-    void TBlock::TIterator::Next() {
-        ++Idx_;
-    }
-
-    bool TBlock::TIterator::IsValid() const {
-        return Idx_ < Block_.Columns_.size();
-    }
-
-    TBlock::TBlock()
-        : Rows_(0)
-    {
-    }
-
-    TBlock::TBlock(size_t cols, size_t rows)
-        : Rows_(rows)
-    {
-        Columns_.reserve(cols);
-    }
-
-    TBlock::~TBlock() = default;
-
-    void TBlock::AppendColumn(const TString& name, const TColumnRef& col) {
-        if (Columns_.empty()) {
-            Rows_ = col->Size();
-        } else if (col->Size() != Rows_) {
-            ythrow yexception()
-                << "all clumns in block must have same count of rows";
-        }
-
-        Columns_.push_back(TColumnItem{name, col});
-    }
-
-    /// Count of columns in the block.
-    size_t TBlock::GetColumnCount() const {
-        return Columns_.size();
-    }
-
-    const TBlockInfo& TBlock::Info() const {
-        return Info_;
-    }
-
-    /// Count of rows in the block.
-    size_t TBlock::GetRowCount() const {
-        return Rows_;
-    }
-
-    void TBlock::AppendBlock(const TBlock& block) {
-        if (block.GetRowCount() == 0) {
-            return;
-        }
-        size_t columnCount = GetColumnCount();
-        if (columnCount == 0) {
-            Rows_ = block.GetRowCount();
-            Columns_ = block.Columns_;
-            return;
-        }
-
-        if (columnCount != block.GetColumnCount()) {
-            ythrow yexception() << "Can't concatenate two blocks. Different number of columns (current_block: "
-                << columnCount << ", added: " << block.GetColumnCount() << ")";
-        }
-
-        for (size_t i = 0; i < columnCount; ++i) {
-            if (Columns_[i].Name != block.Columns_[i].Name) {
-                ythrow yexception() << "Can't concatenate two blocks. Different names of columns (current_block: "
-                    << Columns_[i].Name << ", added: " << block.Columns_[i].Name << ")";
-            }
-        }
-
-        for (size_t i = 0; i < columnCount; ++i) {
-            Columns_[i].Column->Append(block.Columns_[i].Column);
-        }
-        Rows_ += block.GetRowCount();
-    }
-
-    TColumnRef TBlock::operator[](size_t idx) const {
-        if (idx < Columns_.size()) {
-            return Columns_[idx].Column;
-        }
-
-        ythrow yexception() << "column index is out of range";
-    }
-
-}
diff --git a/library/cpp/clickhouse/client/block.h b/library/cpp/clickhouse/client/block.h
deleted file mode 100644
index d85c6ffbf6..0000000000
--- a/library/cpp/clickhouse/client/block.h
+++ /dev/null
@@ -1,74 +0,0 @@
-#pragma once
-
-#include "columns/column.h"
-
-namespace NClickHouse {
-    struct TBlockInfo {
-        ui8 IsOverflows = 0;
-        i32 BucketNum = -1;
-    };
-
-    class TBlock {
-    public:
-        /// Allow to iterate over block's columns.
-        class TIterator {
-        public:
-            TIterator(const TBlock& block);
-
-            /// Name of column.
-            const TString& Name() const;
-
-            /// Type of column.
-            TTypeRef Type() const;
-
-            /// Reference to column object.
-            TColumnRef Column() const;
-
-            /// Move to next column.
-            void Next();
-
-            /// Is the iterator still valid.
-            bool IsValid() const;
-
-        private:
-            TIterator() = delete;
-
-            const TBlock& Block_;
-            size_t Idx_;
-        };
-
-    public:
-        TBlock();
-        TBlock(size_t cols, size_t rows);
-        ~TBlock();
-
-        /// Append named column to the block.
-        void AppendColumn(const TString& name, const TColumnRef& col);
-
-        /// Count of columns in the block.
-        size_t GetColumnCount() const;
-
-        const TBlockInfo& Info() const;
-
-        /// Count of rows in the block.
-        size_t GetRowCount() const;
-
-        /// Append block to the current (vertical scale)
-        void AppendBlock(const TBlock& block);
-
-        /// Reference to column by index in the block.
-        TColumnRef operator[](size_t idx) const;
-
-    private:
-        struct TColumnItem {
-            TString Name;
-            TColumnRef Column;
-        };
-
-        TBlockInfo Info_;
-        TVector<TColumnItem> Columns_;
-        /// Count of rows in the block.
-        size_t Rows_;
-    };
-
-}
diff --git a/library/cpp/clickhouse/client/client.cpp b/library/cpp/clickhouse/client/client.cpp
deleted file mode 100644
index d91ea55194..0000000000
--- a/library/cpp/clickhouse/client/client.cpp
+++ /dev/null
@@ -1,768 +0,0 @@
-#include "client.h"
-#include "protocol.h"
-
-#include <library/cpp/clickhouse/client/base/coded.h>
-#include <library/cpp/clickhouse/client/base/compressed.h>
-#include <library/cpp/clickhouse/client/base/wire_format.h>
-#include <library/cpp/clickhouse/client/columns/factory.h>
-#include <library/cpp/openssl/io/stream.h>
-
-#include <util/generic/buffer.h>
-#include <util/generic/vector.h>
-#include <util/network/socket.h>
-#include <util/random/random.h>
-#include <util/stream/buffered.h>
-#include <util/stream/buffer.h>
-#include <util/stream/mem.h>
-#include <util/string/builder.h>
-#include <util/string/cast.h>
-#include <util/system/unaligned_mem.h>
-
-#include <contrib/libs/lz4/lz4.h>
-#include <contrib/restricted/cityhash-1.0.2/city.h>
-
-#define DBMS_NAME "ClickHouse"
-#define DBMS_VERSION_MAJOR 1
-#define DBMS_VERSION_MINOR 1
-#define REVISION 54126
-
-#define DBMS_MIN_REVISION_WITH_TEMPORARY_TABLES 50264
-#define DBMS_MIN_REVISION_WITH_TOTAL_ROWS_IN_PROGRESS 51554
-#define DBMS_MIN_REVISION_WITH_BLOCK_INFO 51903
-#define DBMS_MIN_REVISION_WITH_CLIENT_INFO 54032
-#define DBMS_MIN_REVISION_WITH_SERVER_TIMEZONE 54058
-#define DBMS_MIN_REVISION_WITH_QUOTA_KEY_IN_CLIENT_INFO 54060
-
-namespace NClickHouse {
-    struct TClientInfo {
-        ui8 IfaceType = 1; // TCP
-        ui8 QueryKind;
-        TString InitialUser;
-        TString InitialQueryId;
-        TString QuotaKey;
-        TString OsUser;
-        TString ClientHostname;
-        TString ClientName;
-        TString InitialAddress = "[::ffff:127.0.0.1]:0";
-        ui64 ClientVersionMajor = 0;
-        ui64 ClientVersionMinor = 0;
-        ui32 ClientRevision = 0;
-    };
-
-    struct TServerInfo {
-        TString Name;
-        TString Timezone;
-        ui64 VersionMajor;
-        ui64 VersionMinor;
-        ui64 Revision;
-    };
-
-    class TClient::TImpl {
-    public:
-        TImpl(const TClientOptions& opts);
-        ~TImpl();
-
-        void ExecuteQuery(TQuery query);
-
-        void Insert(const TString& table_name, const TBlock& block, const TString& query_id, const TString& deduplication_token);
-
-        void Ping();
-
-        void ResetConnection();
-
-    private:
-        bool Handshake();
-
-        bool ReceivePacket(ui64* server_packet = nullptr);
-
-        void SendQuery(const TString& query, const TString& query_id, const TString& deduplication_token = "");
-
-        void SendData(const TBlock& block);
-
-        bool SendHello();
-
-        bool ReadBlock(TBlock* block, TCodedInputStream* input);
-
-        bool ReceiveHello();
-
-        /// Reads data packet form input stream.
-        bool ReceiveData();
-
-        /// Reads exception packet form input stream.
-        bool ReceiveException(bool rethrow = false);
-
-        void WriteBlock(const TBlock& block, TCodedOutputStream* output);
-
-    private:
-        void Disconnect() {
-            Socket_ = TSocket();
-        }
-
-        /// In case of network errors tries to reconnect to server and
-        /// call fuc several times.
-        void RetryGuard(std::function<void()> fuc);
-
-    private:
-        class EnsureNull {
-        public:
-            inline EnsureNull(TQueryEvents* ev, TQueryEvents** ptr)
-                : ptr_(ptr)
-            {
-                if (ptr_) {
-                    *ptr_ = ev;
-                }
-            }
-
-            inline ~EnsureNull() {
-                if (ptr_) {
-                    *ptr_ = nullptr;
-                }
-            }
-
-        private:
-            TQueryEvents** ptr_;
-        };
-
-        const TClientOptions Options_;
-        TQueryEvents* Events_;
-        int Compression_ = CompressionState::Disable;
-
-        TSocket Socket_;
-
-        TSocketInput SocketInput_;
-        TSocketOutput SocketOutput_;
-        THolder<TBufferedInput> BufferedInput_;
-        THolder<TBufferedOutput> BufferedOutput_;
-        THolder<TOpenSslClientIO> SslClient_;
-
-        TCodedInputStream Input_;
-        TCodedOutputStream Output_;
-
-        TServerInfo ServerInfo_;
-    };
-
-    TClient::TImpl::TImpl(const TClientOptions& opts)
-        : Options_(opts)
-        , Events_(nullptr)
-        , Socket_(TNetworkAddress(opts.Host, opts.Port), Options_.ConnectTimeout)
-        , SocketInput_(Socket_)
-        , SocketOutput_(Socket_)
-    {
-        if (opts.UseSsl) {
-            SslClient_ = MakeHolder<TOpenSslClientIO>(&SocketInput_, &SocketOutput_, opts.SslOptions);
-            BufferedInput_ = MakeHolder<TBufferedInput>(SslClient_.Get());
-            BufferedOutput_ = MakeHolder<TBufferedOutput>(SslClient_.Get());
-        } else {
-            BufferedInput_ = MakeHolder<TBufferedInput>(&SocketInput_);
-            BufferedOutput_ = MakeHolder<TBufferedOutput>(&SocketOutput_);
-        }
-        Input_ = TCodedInputStream(BufferedInput_.Get());
-        Output_ = TCodedOutputStream(BufferedOutput_.Get());
-
-        if (Options_.RequestTimeout.Seconds()) {
-            Socket_.SetSocketTimeout(Options_.RequestTimeout.Seconds());
-        }
-
-        if (!Handshake()) {
-            ythrow yexception() << "fail to connect to " << Options_.Host;
-        }
-
-        if (Options_.CompressionMethod != ECompressionMethod::None) {
-            Compression_ = CompressionState::Enable;
-        }
-    }
-
-    TClient::TImpl::~TImpl() {
-        Disconnect();
-    }
-
-    void TClient::TImpl::ExecuteQuery(TQuery query) {
-        EnsureNull en(static_cast<TQueryEvents*>(&query), &Events_);
-
-        if (Options_.PingBeforeQuery) {
-            RetryGuard([this]() { Ping(); });
-        }
-
-        SendQuery(query.GetText(), query.GetId());
-
-        ui64 server_packet = 0;
-        while (ReceivePacket(&server_packet)) {
-            ;
-        }
-        if (server_packet != ServerCodes::EndOfStream && server_packet != ServerCodes::Exception) {
-            ythrow yexception() << "unexpected packet from server while receiving end of query (got: "
-                                << (server_packet ? ToString(server_packet) : "nothing") << ")";
-        }
-    }
-
-    void TClient::TImpl::Insert(const TString& table_name, const TBlock& block, const TString& query_id, const TString& deduplication_token) {
-        if (Options_.PingBeforeQuery) {
-            RetryGuard([this]() { Ping(); });
-        }
-        TVector<TString> fields;
-        fields.reserve(block.GetColumnCount());
-
-        // Enumerate all fields
-        for (TBlock::TIterator bi(block); bi.IsValid(); bi.Next()) {
-            fields.push_back(bi.Name());
-        }
-
-        TStringBuilder fields_section;
-        for (auto elem = fields.begin(); elem != fields.end(); ++elem) {
-            if (std::distance(elem, fields.end()) == 1) {
-                fields_section << *elem;
-            } else {
-                fields_section << *elem << ",";
-            }
-        }
-
-        SendQuery("INSERT INTO " + table_name + " ( " + fields_section + " ) VALUES", query_id, deduplication_token);
-
-        ui64 server_packet(0);
-        // Receive data packet.
-        while (true) {
-            bool ret = ReceivePacket(&server_packet);
-
-            if (!ret) {
-                ythrow yexception() << "unable to receive data packet";
-            }
-            if (server_packet == ServerCodes::Data) {
-                break;
-            }
-            if (server_packet == ServerCodes::Progress) {
-                continue;
-            }
-        }
-
-        // Send data.
-        SendData(block);
-        // Send empty block as marker of
-        // end of data.
-        SendData(TBlock());
-
-        // Wait for EOS.
-        ui64 eos_packet{0};
-        while (ReceivePacket(&eos_packet)) {
-            ;
-        }
-
-        if (eos_packet != ServerCodes::EndOfStream && eos_packet != ServerCodes::Exception
-            && eos_packet != ServerCodes::Log && Options_.RethrowExceptions) {
-            ythrow yexception() << "unexpected packet from server while receiving end of query, expected (expected Exception, EndOfStream or Log, got: "
-                                << (eos_packet ? ToString(eos_packet) : "nothing") << ")";
-        }
-    }
-
-    void TClient::TImpl::Ping() {
-        TWireFormat::WriteUInt64(&Output_, ClientCodes::Ping);
-        Output_.Flush();
-
-        ui64 server_packet;
-        const bool ret = ReceivePacket(&server_packet);
-
-        if (!ret || server_packet != ServerCodes::Pong) {
-            ythrow yexception() << "fail to ping server";
-        }
-    }
-
-    void TClient::TImpl::ResetConnection() {
-        Socket_ = TSocket(TNetworkAddress(Options_.Host, Options_.Port), Options_.ConnectTimeout);
-
-        if (Options_.UseSsl) {
-            SslClient_.Reset(new TOpenSslClientIO(&SocketInput_, &SocketOutput_, Options_.SslOptions));
-            BufferedInput_.Reset(new TBufferedInput(SslClient_.Get()));
-            BufferedOutput_.Reset(new TBufferedOutput(SslClient_.Get()));
-        } else {
-            BufferedInput_.Reset(new TBufferedInput(&SocketInput_));
-            BufferedOutput_.Reset(new TBufferedOutput(&SocketOutput_));
-        }
-
-        SocketInput_ = TSocketInput(Socket_);
-        SocketOutput_ = TSocketOutput(Socket_);
-
-        Input_ = TCodedInputStream(BufferedInput_.Get());
-        Output_ = TCodedOutputStream(BufferedOutput_.Get());
-
-        if (Options_.RequestTimeout.Seconds()) {
-            Socket_.SetSocketTimeout(Options_.RequestTimeout.Seconds());
-        }
-
-        if (!Handshake()) {
-            ythrow yexception() << "fail to connect to " << Options_.Host;
-        }
-    }
-
-    bool TClient::TImpl::Handshake() {
-        if (!SendHello()) {
-            return false;
-        }
-        if (!ReceiveHello()) {
-            return false;
-        }
-        return true;
-    }
-
-    bool TClient::TImpl::ReceivePacket(ui64* server_packet) {
-        ui64 packet_type = 0;
-
-        if (!Input_.ReadVarint64(&packet_type)) {
-            return false;
-        }
-        if (server_packet) {
-            *server_packet = packet_type;
-        }
-
-        switch (packet_type) {
-            case ServerCodes::Totals:
-            case ServerCodes::Data: {
-                if (!ReceiveData()) {
-                    ythrow yexception() << "can't read data packet from input stream";
-                }
-                return true;
-            }
-
-            case ServerCodes::Exception: {
-                ReceiveException();
-                return false;
-            }
-
-            case ServerCodes::ProfileInfo: {
-                TProfile profile;
-
-                if (!TWireFormat::ReadUInt64(&Input_, &profile.rows)) {
-                    return false;
-                }
-                if (!TWireFormat::ReadUInt64(&Input_, &profile.blocks)) {
-                    return false;
-                }
-                if (!TWireFormat::ReadUInt64(&Input_, &profile.bytes)) {
-                    return false;
-                }
-                if (!TWireFormat::ReadFixed(&Input_, &profile.applied_limit)) {
-                    return false;
-                }
-                if (!TWireFormat::ReadUInt64(&Input_, &profile.rows_before_limit)) {
-                    return false;
-                }
-                if (!TWireFormat::ReadFixed(&Input_, &profile.calculated_rows_before_limit)) {
-                    return false;
-                }
-
-                if (Events_) {
-                    Events_->OnProfile(profile);
-                }
-
-                return true;
-            }
-
-            case ServerCodes::Progress: {
-                TProgress info;
-
-                if (!TWireFormat::ReadUInt64(&Input_, &info.rows)) {
-                    return false;
-                }
-                if (!TWireFormat::ReadUInt64(&Input_, &info.bytes)) {
-                    return false;
-                }
-                if (REVISION >= DBMS_MIN_REVISION_WITH_TOTAL_ROWS_IN_PROGRESS) {
-                    if (!TWireFormat::ReadUInt64(&Input_, &info.total_rows)) {
-                        return false;
-                    }
-                }
-
-                if (Events_) {
-                    Events_->OnProgress(info);
-                }
-
-                return true;
-            }
-
-            case ServerCodes::Pong: {
-                return true;
-            }
-
-            case ServerCodes::EndOfStream: {
-                if (Events_) {
-                    Events_->OnFinish();
-                }
-                return false;
-            }
-
-            default:
-                ythrow yexception() << "unimplemented " << (int)packet_type;
-                break;
-        }
-
-        return false;
-    }
-
-    bool TClient::TImpl::ReadBlock(TBlock* block, TCodedInputStream* input) {
-        // Additional information about block.
-        if (REVISION >= DBMS_MIN_REVISION_WITH_BLOCK_INFO) {
-            ui64 num;
-            TBlockInfo info;
-
-            // BlockInfo
-            if (!TWireFormat::ReadUInt64(input, &num)) {
-                return false;
-            }
-            if (!TWireFormat::ReadFixed(input, &info.IsOverflows)) {
-                return false;
-            }
-            if (!TWireFormat::ReadUInt64(input, &num)) {
-                return false;
-            }
-            if (!TWireFormat::ReadFixed(input, &info.BucketNum)) {
-                return false;
-            }
-            if (!TWireFormat::ReadUInt64(input, &num)) {
-                return false;
-            }
-
-            // TODO use data
-        }
-
-        ui64 num_columns = 0;
-        ui64 num_rows = 0;
-
-        if (!TWireFormat::ReadUInt64(input, &num_columns)) {
-            return false;
-        }
-        if (!TWireFormat::ReadUInt64(input, &num_rows)) {
-            return false;
-        }
-
-        for (size_t i = 0; i < num_columns; ++i) {
-            TString name;
-            TString type;
-
-            if (!TWireFormat::ReadString(input, &name)) {
-                return false;
-            }
-            if (!TWireFormat::ReadString(input, &type)) {
-                return false;
-            }
-
-            if (TColumnRef col = CreateColumnByType(type)) {
-                if (num_rows && !col->Load(input, num_rows)) {
-                    ythrow yexception() << "can't load";
-                }
-
-                block->AppendColumn(name, col);
-            } else {
-                ythrow yexception() << "unsupported column type: " << type;
-            }
-        }
-
-        return true;
-    }
-
-    bool TClient::TImpl::ReceiveData() {
-        TBlock block;
-
-        if (REVISION >= DBMS_MIN_REVISION_WITH_TEMPORARY_TABLES) {
-            TString table_name;
-
-            if (!TWireFormat::ReadString(&Input_, &table_name)) {
-                return false;
-            }
-        }
-
-        if (Compression_ == CompressionState::Enable) {
-            TCompressedInput compressed(&Input_);
-            TCodedInputStream coded(&compressed);
-
-            if (!ReadBlock(&block, &coded)) {
-                return false;
-            }
-        } else {
-            if (!ReadBlock(&block, &Input_)) {
-                return false;
-            }
-        }
-
-        if (Events_) {
-            Events_->OnData(block);
-        }
-
-        return true;
-    }
-
-    bool TClient::TImpl::ReceiveException(bool rethrow) {
-        std::unique_ptr<TException> e(new TException);
-        TException* current = e.get();
-
-        bool exception_received = true;
-        do {
-            bool has_nested = false;
-
-            if (!TWireFormat::ReadFixed(&Input_, &current->Code)) {
-                exception_received = false;
-                break;
-            }
-            if (!TWireFormat::ReadString(&Input_, &current->Name)) {
-                exception_received = false;
-                break;
-            }
-            if (!TWireFormat::ReadString(&Input_, &current->DisplayText)) {
-                exception_received = false;
-                break;
-            }
-            if (!TWireFormat::ReadString(&Input_, &current->StackTrace)) {
-                exception_received = false;
-                break;
-            }
-            if (!TWireFormat::ReadFixed(&Input_, &has_nested)) {
-                exception_received = false;
-                break;
-            }
-
-            if (has_nested) {
-                current->Nested.reset(new TException);
-                current = current->Nested.get();
-            } else {
-                break;
-            }
-        } while (true);
-
-        if (Events_) {
-            Events_->OnServerException(*e);
-        }
-
-        if (rethrow || Options_.RethrowExceptions) {
-            throw TServerException(std::move(e));
-        }
-
-        return exception_received;
-    }
-
-    void TClient::TImpl::SendQuery(const TString& query, const TString& query_id, const TString& deduplication_token) {
-        TWireFormat::WriteUInt64(&Output_, ClientCodes::Query);
-        TWireFormat::WriteString(&Output_, query_id);
-
-        /// Client info.
-        if (ServerInfo_.Revision >= DBMS_MIN_REVISION_WITH_CLIENT_INFO) {
-            TClientInfo info;
-
-            info.QueryKind = 1;
-            info.ClientName = "ClickHouse client";
-            info.ClientVersionMajor = DBMS_VERSION_MAJOR;
-            info.ClientVersionMinor = DBMS_VERSION_MINOR;
-            info.ClientRevision = REVISION;
-
-            TWireFormat::WriteFixed(&Output_, info.QueryKind);
-            TWireFormat::WriteString(&Output_, info.InitialUser);
-            TWireFormat::WriteString(&Output_, info.InitialQueryId);
-            TWireFormat::WriteString(&Output_, info.InitialAddress);
-            TWireFormat::WriteFixed(&Output_, info.IfaceType);
-
-            TWireFormat::WriteString(&Output_, info.OsUser);
-            TWireFormat::WriteString(&Output_, info.ClientHostname);
-            TWireFormat::WriteString(&Output_, info.ClientName);
-            TWireFormat::WriteUInt64(&Output_, info.ClientVersionMajor);
-            TWireFormat::WriteUInt64(&Output_, info.ClientVersionMinor);
-            TWireFormat::WriteUInt64(&Output_, info.ClientRevision);
-
-            if (ServerInfo_.Revision >= DBMS_MIN_REVISION_WITH_QUOTA_KEY_IN_CLIENT_INFO)
-                TWireFormat::WriteString(&Output_, info.QuotaKey);
-        }
-
-        if (!deduplication_token.empty()) {
-            static const TString insert_deduplication_token_setting_name = "insert_deduplication_token";
-            TWireFormat::WriteString(&Output_, insert_deduplication_token_setting_name);
-            TWireFormat::WriteString(&Output_, deduplication_token);
-        }
-        TWireFormat::WriteString(&Output_, TString()); // Empty string is a marker of end SETTINGS section
-
-        TWireFormat::WriteUInt64(&Output_, Stages::Complete);
-        TWireFormat::WriteUInt64(&Output_, Compression_);
-        TWireFormat::WriteString(&Output_, query);
-        // Send empty block as marker of
-        // end of data
-        SendData(TBlock());
-
-        Output_.Flush();
-    }
-
-    void TClient::TImpl::WriteBlock(const TBlock& block, TCodedOutputStream* output) {
-        /// Дополнительная информация о блоке.
-        if (ServerInfo_.Revision >= DBMS_MIN_REVISION_WITH_BLOCK_INFO) {
-            TWireFormat::WriteUInt64(output, 1);
-            TWireFormat::WriteFixed(output, block.Info().IsOverflows);
-            TWireFormat::WriteUInt64(output, 2);
-            TWireFormat::WriteFixed(output, block.Info().BucketNum);
-            TWireFormat::WriteUInt64(output, 0);
-        }
-
-        TWireFormat::WriteUInt64(output, block.GetColumnCount());
-        TWireFormat::WriteUInt64(output, block.GetRowCount());
-
-        for (TBlock::TIterator bi(block); bi.IsValid(); bi.Next()) {
-            TWireFormat::WriteString(output, bi.Name());
-            TWireFormat::WriteString(output, bi.Type()->GetName());
-
-            bi.Column()->Save(output);
-        }
-    }
-
-    void TClient::TImpl::SendData(const TBlock& block) {
-        TWireFormat::WriteUInt64(&Output_, ClientCodes::Data);
-
-        if (ServerInfo_.Revision >= DBMS_MIN_REVISION_WITH_TEMPORARY_TABLES) {
-            TWireFormat::WriteString(&Output_, TString());
-        }
-
-        if (Compression_ == CompressionState::Enable) {
-            switch (Options_.CompressionMethod) {
-                case ECompressionMethod::None: {
-                    Y_ABORT_UNLESS(false, "invalid state");
-                    break;
-                }
-
-                case ECompressionMethod::LZ4: {
-                    TBufferOutput tmp;
-
-                    // Serialize block's data
-                    {
-                        TCodedOutputStream out(&tmp);
-                        WriteBlock(block, &out);
-                    }
-                    // Reserver space for data
-                    TBuffer buf;
-                    buf.Resize(9 + LZ4_compressBound(tmp.Buffer().Size()));
-
-                    // Compress data
-                    int size = LZ4_compress(tmp.Buffer().Data(), buf.Data() + 9, tmp.Buffer().Size());
-                    buf.Resize(9 + size);
-
-                    // Fill header
-                    ui8* p = (ui8*)buf.Data();
-                    // Compression method
-                    WriteUnaligned<ui8>(p, (ui8)0x82);
-                    p += 1;
-                    // Compressed data size with header
-                    WriteUnaligned<ui32>(p, (ui32)buf.Size());
-                    p += 4;
-                    // Original data size
-                    WriteUnaligned<ui32>(p, (ui32)tmp.Buffer().Size());
-
-                    TWireFormat::WriteFixed(&Output_, CityHash_v1_0_2::CityHash128(
-                                                          buf.Data(), buf.Size()));
-                    TWireFormat::WriteBytes(&Output_, buf.Data(), buf.Size());
-                    break;
-                }
-            }
-        } else {
-            WriteBlock(block, &Output_);
-        }
-
-        Output_.Flush();
-    }
-
-    bool TClient::TImpl::SendHello() {
-        TWireFormat::WriteUInt64(&Output_, ClientCodes::Hello);
-        TWireFormat::WriteString(&Output_, TString(DBMS_NAME) + " client");
-        TWireFormat::WriteUInt64(&Output_, DBMS_VERSION_MAJOR);
-        TWireFormat::WriteUInt64(&Output_, DBMS_VERSION_MINOR);
-        TWireFormat::WriteUInt64(&Output_, REVISION);
-        TWireFormat::WriteString(&Output_, Options_.DefaultDatabase);
-        TWireFormat::WriteString(&Output_, Options_.User);
-        TWireFormat::WriteString(&Output_, Options_.Password);
-
-        Output_.Flush();
-
-        return true;
-    }
-
-    bool TClient::TImpl::ReceiveHello() {
-        ui64 packet_type = 0;
-
-        if (!Input_.ReadVarint64(&packet_type)) {
-            return false;
-        }
-
-        if (packet_type == ServerCodes::Hello) {
-            if (!TWireFormat::ReadString(&Input_, &ServerInfo_.Name)) {
-                return false;
-            }
-            if (!TWireFormat::ReadUInt64(&Input_, &ServerInfo_.VersionMajor)) {
-                return false;
-            }
-            if (!TWireFormat::ReadUInt64(&Input_, &ServerInfo_.VersionMinor)) {
-                return false;
-            }
-            if (!TWireFormat::ReadUInt64(&Input_, &ServerInfo_.Revision)) {
-                return false;
-            }
-
-            if (ServerInfo_.Revision >= DBMS_MIN_REVISION_WITH_SERVER_TIMEZONE) {
-                if (!TWireFormat::ReadString(&Input_, &ServerInfo_.Timezone)) {
-                    return false;
-                }
-            }
-
-            return true;
-        } else if (packet_type == ServerCodes::Exception) {
-            ReceiveException(true);
-            return false;
-        }
-
-        return false;
-    }
-
-    void TClient::TImpl::RetryGuard(std::function<void()> func) {
-        for (int i = 0; i <= Options_.SendRetries; ++i) {
-            try {
-                func();
-                return;
-            } catch (const yexception&) {
-                bool ok = true;
-
-                try {
-                    Sleep(Options_.RetryTimeout);
-                    ResetConnection();
-                } catch (...) {
-                    ok = false;
-                }
-
-                if (!ok) {
-                    throw;
-                }
-            }
-        }
-    }
-
-    TClient::TClient(const TClientOptions& opts)
-        : Options_(opts)
-        , Impl_(new TImpl(opts))
-    {
-    }
-
-    TClient::~TClient() {
-    }
-
-    void TClient::Execute(const TQuery& query) {
-        Impl_->ExecuteQuery(query);
-    }
-
-    void TClient::Select(const TString& query, TSelectCallback cb, const TString& query_id) {
-        Execute(TQuery(query, query_id).OnData(cb));
-    }
-
-    void TClient::Select(const TQuery& query) {
-        Execute(query);
-    }
-
-    void TClient::Insert(const TString& table_name, const TBlock& block, const TString& query_id, const TString& deduplication_token) {
-        Impl_->Insert(table_name, block, query_id, deduplication_token);
-    }
-
-    void TClient::Ping() {
-        Impl_->Ping();
-    }
-
-    void TClient::ResetConnection() {
-        Impl_->ResetConnection();
-    }
-
-}
diff --git a/library/cpp/clickhouse/client/client.h b/library/cpp/clickhouse/client/client.h
deleted file mode 100644
index e8497f7ab8..0000000000
--- a/library/cpp/clickhouse/client/client.h
+++ /dev/null
@@ -1,105 +0,0 @@
-#pragma once
-
-#include "query.h"
-#include "exceptions.h"
-
-#include "columns/array.h"
-#include "columns/date.h"
-#include "columns/nullable.h"
-#include "columns/numeric.h"
-#include "columns/string.h"
-#include "columns/tuple.h"
-
-#include <library/cpp/openssl/io/stream.h>
-
-#include <util/generic/string.h>
-
-namespace NClickHouse {
-    /// Метод сжатия
-    enum class ECompressionMethod {
-        None = -1,
-        LZ4 = 1,
-    };
-
-    struct TClientOptions {
-#define DECLARE_FIELD(name, type, default)                \
-    type name{default};                                   \
-    inline TClientOptions& Set##name(const type& value) { \
-        name = value;                                     \
-        return *this;                                     \
-    }
-
-        /// Hostname of the server.
-        DECLARE_FIELD(Host, TString, TString());
-        /// Service port.
-        DECLARE_FIELD(Port, int, 9000);
-
-        /// Default database.
-        DECLARE_FIELD(DefaultDatabase, TString, "default");
-        /// User name.
-        DECLARE_FIELD(User, TString, "default");
-        /// Access password.
-        DECLARE_FIELD(Password, TString, TString());
-
-        /// By default all exceptions received during query execution will be
-        /// passed to OnException handler.  Set rethrow_exceptions to true to
-        /// enable throwing exceptions with standard c++ exception mechanism.
-        DECLARE_FIELD(RethrowExceptions, bool, true);
-
-        /// Ping server every time before execute any query.
-        DECLARE_FIELD(PingBeforeQuery, bool, false);
-        /// Count of retry to send request to server.
-        DECLARE_FIELD(SendRetries, int, 1);
-        /// Amount of time to wait before next retry.
-        DECLARE_FIELD(RetryTimeout, TDuration, TDuration::Seconds(5));
-        /// Define timeout for establishing a connection to server.
-        DECLARE_FIELD(ConnectTimeout, TDuration, TDuration::Seconds(5));
-        /// Define timeout for any operations.
-        DECLARE_FIELD(RequestTimeout, TDuration, TDuration::Zero());
-
-        /// Compression method.
-        DECLARE_FIELD(CompressionMethod, ECompressionMethod, ECompressionMethod::None);
-
-        /// Use SSL encryption
-        DECLARE_FIELD(UseSsl, bool, false);
-        /// SSL Options
-        DECLARE_FIELD(SslOptions, TOpenSslClientIO::TOptions, TOpenSslClientIO::TOptions());
-
-#undef DECLARE_FIELD
-    };
-
-    /**
- *
- */
-    class TClient {
-    public:
-        TClient(const TClientOptions& opts);
-        ~TClient();
-
-        /// Intends for execute arbitrary queries.
-        void Execute(const TQuery& query);
-
-        /// Intends for execute select queries.  Data will be returned with
-        /// one or more call of \p cb.
-        void Select(const TString& query, TSelectCallback cb, const TString& query_id = "");
-
-        /// Alias for Execute.
-        void Select(const TQuery& query);
-
-        /// Intends for insert block of data into a table \p table_name.
-        void Insert(const TString& table_name, const TBlock& block, const TString& query_id = "", const TString& deduplication_token = "");
-
-        /// Ping server for aliveness.
-        void Ping();
-
-        /// Reset connection with initial params.
-        void ResetConnection();
-
-    private:
-        TClientOptions Options_;
-
-        class TImpl;
-        THolder<TImpl> Impl_;
-    };
-
-}
diff --git a/library/cpp/clickhouse/client/columns/array.cpp b/library/cpp/clickhouse/client/columns/array.cpp
deleted file mode 100644
index 8a83c36f72..0000000000
--- a/library/cpp/clickhouse/client/columns/array.cpp
+++ /dev/null
@@ -1,87 +0,0 @@
-#include "array.h"
-
-#include <util/generic/yexception.h>
-
-namespace NClickHouse {
-    TColumnArray::TColumnArray(TColumnRef data)
-        : TColumn(TType::CreateArray(data->Type()))
-        , Data_(data)
-        , Offsets_(TColumnUInt64::Create())
-    {
-    }
-
-    TColumnArray::TColumnArray(TColumnRef data, TVector<ui64>&& offsets)
-        : TColumn(TType::CreateArray(data->Type()))
-        , Data_(data)
-        , Offsets_(TColumnUInt64::Create(std::move(offsets)))
-    {
-    }
-
-    TIntrusivePtr<TColumnArray> TColumnArray::Create(TColumnRef data) {
-        return new TColumnArray(data);
-    }
-
-    TIntrusivePtr<TColumnArray> TColumnArray::Create(TColumnRef data, TVector<ui64>&& offsets) {
-        return new TColumnArray(data, std::move(offsets));
-    }
-
-    void TColumnArray::AppendAsColumn(TColumnRef array) {
-        if (!Data_->Type()->IsEqual(array->Type())) {
-            ythrow yexception()
-                << "can't append column of type " << array->Type()->GetName() << " "
-                << "to column type " << Data_->Type()->GetName();
-        }
-
-        if (Offsets_->Size() == 0) {
-            Offsets_->Append(array->Size());
-        } else {
-            Offsets_->Append((*Offsets_)[Offsets_->Size() - 1] + array->Size());
-        }
-
-        Data_->Append(array);
-    }
-
-    void TColumnArray::Append(TColumnRef column) {
-        if (auto col = column->As<TColumnArray>()) {
-            if (!col->Data_->Type()->IsEqual(Data_->Type())) {
-                return;
-            }
-
-            for (size_t i = 0; i < col->Size(); ++i) {
-                AppendAsColumn(col->GetAsColumn(i));
-            }
-        }
-    }
-
-    TColumnRef TColumnArray::GetAsColumn(size_t n) const {
-        return Data_->Slice(GetOffset(n), GetSize(n));
-    }
-
-    bool TColumnArray::Load(TCodedInputStream* input, size_t rows) {
-        if (!Offsets_->Load(input, rows)) {
-            return false;
-        }
-        if (!Data_->Load(input, (*Offsets_)[rows - 1])) {
-            return false;
-        }
-        return true;
-    }
-
-    void TColumnArray::Save(TCodedOutputStream* output) {
-        Offsets_->Save(output);
-        Data_->Save(output);
-    }
-
-    size_t TColumnArray::Size() const {
-        return Offsets_->Size();
-    }
-
-    size_t TColumnArray::GetOffset(size_t n) const {
-        return (n == 0) ? 0 : (*Offsets_)[n - 1];
-    }
-
-    size_t TColumnArray::GetSize(size_t n) const {
-        return (n == 0) ? (*Offsets_)[n] : ((*Offsets_)[n] - (*Offsets_)[n - 1]);
-    }
-
-}
diff --git a/library/cpp/clickhouse/client/columns/array.h b/library/cpp/clickhouse/client/columns/array.h
deleted file mode 100644
index 1a5e7f429a..0000000000
--- a/library/cpp/clickhouse/client/columns/array.h
+++ /dev/null
@@ -1,55 +0,0 @@
-#pragma once
-
-#include "numeric.h"
-
-namespace NClickHouse {
-    /**
- * Represents column of Array(T).
- */
-    class TColumnArray: public TColumn {
-    public:
-        static TIntrusivePtr<TColumnArray> Create(TColumnRef data);
-
-        static TIntrusivePtr<TColumnArray> Create(TColumnRef data, TVector<ui64>&& offsets);
-
-        /// Converts input column to array and appends
-        /// as one row to the current column.
-        void AppendAsColumn(TColumnRef array);
-
-        /// Convets array at pos n to column.
-        /// Type of element of result column same as type of array element.
-        TColumnRef GetAsColumn(size_t n) const;
-
-    public:
-        /// Appends content of given column to the end of current one.
-        void Append(TColumnRef) override;
-
-        /// Loads column data from input stream.
-        bool Load(TCodedInputStream* input, size_t rows) override;
-
-        /// Saves column data to output stream.
-        void Save(TCodedOutputStream* output) override;
-
-        /// Returns count of rows in the column.
-        size_t Size() const override;
-
-        /// Makes slice of the current column.
-        TColumnRef Slice(size_t, size_t) override {
-            return TColumnRef();
-        }
-
-    private:
-        TColumnArray(TColumnRef data);
-
-        TColumnArray(TColumnRef data, TVector<ui64>&& offsets);
-
-        size_t GetOffset(size_t n) const;
-
-        size_t GetSize(size_t n) const;
-
-    private:
-        TColumnRef Data_;
-        TIntrusivePtr<TColumnUInt64> Offsets_;
-    };
-
-}
diff --git a/library/cpp/clickhouse/client/columns/column.h b/library/cpp/clickhouse/client/columns/column.h
deleted file mode 100644
index d858338443..0000000000
--- a/library/cpp/clickhouse/client/columns/column.h
+++ /dev/null
@@ -1,60 +0,0 @@
-#pragma once
-
-#include <library/cpp/clickhouse/client/base/coded.h>
-#include <library/cpp/clickhouse/client/types/types.h>
-
-#include <util/generic/ptr.h>
-
-namespace NClickHouse {
-    using TColumnRef = TIntrusivePtr<class TColumn>;
-
-    /**
- * An abstract base of all columns classes.
- */
-    class TColumn: public TAtomicRefCount<TColumn> {
-    public:
-        virtual ~TColumn() {
-        }
-
-        /// Downcast pointer to the specific culumn's subtype.
-        template <typename T>
-        inline TIntrusivePtr<T> As() {
-            return TIntrusivePtr<T>(dynamic_cast<T*>(this));
-        }
-
-        /// Downcast pointer to the specific culumn's subtype.
-        template <typename T>
-        inline TIntrusivePtr<const T> As() const {
-            return TIntrusivePtr<const T>(dynamic_cast<const T*>(this));
-        }
-
-        /// Get type object of the column.
-        inline TTypeRef Type() const {
-            return Type_;
-        }
-
-        /// Appends content of given column to the end of current one.
-        virtual void Append(TColumnRef column) = 0;
-
-        /// Loads column data from input stream.
-        virtual bool Load(TCodedInputStream* input, size_t rows) = 0;
-
-        /// Saves column data to output stream.
-        virtual void Save(TCodedOutputStream* output) = 0;
-
-        /// Returns count of rows in the column.
-        virtual size_t Size() const = 0;
-
-        /// Makes slice of the current column.
-        virtual TColumnRef Slice(size_t begin, size_t len) = 0;
-
-    protected:
-        explicit inline TColumn(TTypeRef type)
-            : Type_(type)
-        {
-        }
-
-        TTypeRef Type_;
-    };
-
-}
diff --git a/library/cpp/clickhouse/client/columns/date.cpp b/library/cpp/clickhouse/client/columns/date.cpp
deleted file mode 100644
index 242511a7eb..0000000000
--- a/library/cpp/clickhouse/client/columns/date.cpp
+++ /dev/null
@@ -1,126 +0,0 @@
-#include "date.h"
-
-namespace NClickHouse {
-    TIntrusivePtr<TColumnDate> TColumnDate::Create() {
-        return new TColumnDate();
-    }
-
-    TIntrusivePtr<TColumnDate> TColumnDate::Create(const TVector<TInstant>& data) {
-        return new TColumnDate(data);
-    }
-
-    TColumnDate::TColumnDate()
-        : TColumn(TType::CreateDate())
-        , Data_(TColumnUInt16::Create())
-    {
-    }
-
-    TColumnDate::TColumnDate(const TVector<TInstant>& data)
-        : TColumnDate()
-    {
-        for (const auto& value : data) {
-            Append(value);
-        }
-    }
-
-    void TColumnDate::Append(const TInstant& value) {
-        Data_->Append(static_cast<ui16>(value.Days()));
-    }
-
-    std::time_t TColumnDate::At(size_t n) const {
-        return Data_->At(n) * 86400;
-    }
-
-    void TColumnDate::SetAt(size_t n, const TInstant& value) {
-        Data_->SetAt(n, static_cast<ui16>(value.Days()));
-    }
-
-    void TColumnDate::Append(TColumnRef column) {
-        if (auto col = column->As<TColumnDate>()) {
-            Data_->Append(col->Data_);
-        }
-    }
-
-    bool TColumnDate::Load(TCodedInputStream* input, size_t rows) {
-        return Data_->Load(input, rows);
-    }
-
-    void TColumnDate::Save(TCodedOutputStream* output) {
-        Data_->Save(output);
-    }
-
-    size_t TColumnDate::Size() const {
-        return Data_->Size();
-    }
-
-    TColumnRef TColumnDate::Slice(size_t begin, size_t len) {
-        auto col = Data_->Slice(begin, len)->As<TColumnUInt16>();
-        auto result = TColumnDate::Create();
-
-        result->Data_->Append(col);
-
-        return result;
-    }
-
-    TColumnDateTime::TColumnDateTime()
-        : TColumn(TType::CreateDateTime())
-        , Data_(TColumnUInt32::Create())
-    {
-    }
-
-    TColumnDateTime::TColumnDateTime(const TVector<TInstant>& data)
-        : TColumnDateTime()
-    {
-        for (const auto& value : data) {
-            Append(value);
-        }
-    }
-
-    TIntrusivePtr<TColumnDateTime> TColumnDateTime::Create() {
-        return new TColumnDateTime();
-    }
-
-    TIntrusivePtr<TColumnDateTime> TColumnDateTime::Create(const TVector<TInstant>& data) {
-        return new TColumnDateTime(data);
-    }
-
-    void TColumnDateTime::Append(const TInstant& value) {
-        Data_->Append(static_cast<ui32>(value.Seconds()));
-    }
-
-    std::time_t TColumnDateTime::At(size_t n) const {
-        return Data_->At(n);
-    }
-
-    void TColumnDateTime::SetAt(size_t n, const TInstant& value) {
-        Data_->SetAt(n, static_cast<ui32>(value.Seconds()));
-    }
-
-    void TColumnDateTime::Append(TColumnRef column) {
-        if (auto col = column->As<TColumnDateTime>()) {
-            Data_->Append(col->Data_);
-        }
-    }
-
-    bool TColumnDateTime::Load(TCodedInputStream* input, size_t rows) {
-        return Data_->Load(input, rows);
-    }
-
-    void TColumnDateTime::Save(TCodedOutputStream* output) {
-        Data_->Save(output);
-    }
-
-    size_t TColumnDateTime::Size() const {
-        return Data_->Size();
-    }
-
-    TColumnRef TColumnDateTime::Slice(size_t begin, size_t len) {
-        auto col = Data_->Slice(begin, len)->As<TColumnUInt32>();
-        auto result = TColumnDateTime::Create();
-
-        result->Data_->Append(col);
-
-        return result;
-    }
-
-}
diff --git a/library/cpp/clickhouse/client/columns/date.h b/library/cpp/clickhouse/client/columns/date.h
deleted file mode 100644
index 003d3a0707..0000000000
--- a/library/cpp/clickhouse/client/columns/date.h
+++ /dev/null
@@ -1,84 +0,0 @@
-#pragma once
-
-#include "numeric.h"
-
-#include <util/datetime/base.h>
-
-namespace NClickHouse {
-    /** */
-    class TColumnDate: public TColumn {
-    public:
-        static TIntrusivePtr<TColumnDate> Create();
-        static TIntrusivePtr<TColumnDate> Create(const TVector<TInstant>& data);
-
-        /// Appends one element to the end of column.
-        void Append(const TInstant& value);
-
-        /// Returns element at given row number.
-        std::time_t At(size_t n) const;
-
-        /// Set element at given row number.
-        void SetAt(size_t n, const TInstant& value);
-
-    public:
-        /// Appends content of given column to the end of current one.
-        void Append(TColumnRef column) override;
-
-        /// Loads column data from input stream.
-        bool Load(TCodedInputStream* input, size_t rows) override;
-
-        /// Saves column data to output stream.
-        void Save(TCodedOutputStream* output) override;
-
-        /// Returns count of rows in the column.
-        size_t Size() const override;
-
-        /// Makes slice of the current column.
-        TColumnRef Slice(size_t begin, size_t len) override;
-
-    private:
-        TColumnDate();
-        TColumnDate(const TVector<TInstant>& data);
-
-        TIntrusivePtr<TColumnUInt16> Data_;
-    };
-
-    /** */
-    class TColumnDateTime: public TColumn {
-    public:
-        static TIntrusivePtr<TColumnDateTime> Create();
-        static TIntrusivePtr<TColumnDateTime> Create(const TVector<TInstant>& data);
-
-        /// Appends one element to the end of column.
-        void Append(const TInstant& value);
-
-        /// Returns element at given row number.
-        std::time_t At(size_t n) const;
-
-        /// Set element at given row number.
-        void SetAt(size_t n, const TInstant& value);
-
-    public:
-        /// Appends content of given column to the end of current one.
-        void Append(TColumnRef column) override;
-
-        /// Loads column data from input stream.
-        bool Load(TCodedInputStream* input, size_t rows) override;
-
-        /// Saves column data to output stream.
-        void Save(TCodedOutputStream* output) override;
-
-        /// Returns count of rows in the column.
-        size_t Size() const override;
-
-        /// Makes slice of the current column.
-        TColumnRef Slice(size_t begin, size_t len) override;
-
-    private:
-        TColumnDateTime();
-        TColumnDateTime(const TVector<TInstant>& data);
-
-        TIntrusivePtr<TColumnUInt32> Data_;
-    };
-
-}
diff --git a/library/cpp/clickhouse/client/columns/enum.cpp b/library/cpp/clickhouse/client/columns/enum.cpp
deleted file mode 100644
index cd96903a8e..0000000000
--- a/library/cpp/clickhouse/client/columns/enum.cpp
+++ /dev/null
@@ -1,157 +0,0 @@
-#include "enum.h"
-#include "utils.h"
-#include <util/string/printf.h>
-
-namespace NClickHouse {
-    template <typename T>
-    TColumnEnum<T>::TColumnEnum(TTypeRef type)
-        : TColumn(type)
-    {
-    }
-
-    template <typename T>
-    TColumnEnum<T>::TColumnEnum(TTypeRef type, const TVector<T>& data)
-        : TColumn(type)
-        , Data_(data)
-    {
-    }
-
-    template <>
-    TIntrusivePtr<TColumnEnum<i8>> TColumnEnum<i8>::Create(const TVector<TEnumItem>& enumItems) {
-        TTypeRef type = TType::CreateEnum8(enumItems);
-        return new TColumnEnum<i8>(type);
-    }
-
-    template <>
-    TIntrusivePtr<TColumnEnum<i8>> TColumnEnum<i8>::Create(
-        const TVector<TEnumItem>& enumItems,
-        const TVector<i8>& values,
-        bool checkValues) {
-        TTypeRef type = TType::CreateEnum8(enumItems);
-        if (checkValues) {
-            for (i8 value : values) {
-                Y_ENSURE(type->HasEnumValue(value), Sprintf("Enum type doesn't have value %d", value));
-            }
-        }
-        return new TColumnEnum<i8>(type, values);
-    }
-
-    template <>
-    TIntrusivePtr<TColumnEnum<i8>> TColumnEnum<i8>::Create(
-        const TVector<TEnumItem>& enumItems,
-        const TVector<TString>& names) {
-        TTypeRef type = TType::CreateEnum8(enumItems);
-        TVector<i8> values;
-        values.reserve(names.size());
-        for (const TString& name : names) {
-            values.push_back(type->GetEnumValue(name));
-        }
-        return new TColumnEnum<i8>(type, values);
-    }
-
-    template <>
-    TIntrusivePtr<TColumnEnum<i16>> TColumnEnum<i16>::Create(const TVector<TEnumItem>& enumItems) {
-        TTypeRef type = TType::CreateEnum16(enumItems);
-        return new TColumnEnum<i16>(type);
-    }
-
-    template <>
-    TIntrusivePtr<TColumnEnum<i16>> TColumnEnum<i16>::Create(
-        const TVector<TEnumItem>& enumItems,
-        const TVector<i16>& values,
-        bool checkValues) {
-        TTypeRef type = TType::CreateEnum16(enumItems);
-        if (checkValues) {
-            for (i16 value : values) {
-                Y_ENSURE(type->HasEnumValue(value), Sprintf("Enum type doesn't have value %d", value));
-            }
-        }
-        return new TColumnEnum<i16>(type, values);
-    }
-
-    template <>
-    TIntrusivePtr<TColumnEnum<i16>> TColumnEnum<i16>::Create(
-        const TVector<TEnumItem>& enumItems,
-        const TVector<TString>& names) {
-        TTypeRef type = TType::CreateEnum16(enumItems);
-        TVector<i16> values;
-        values.reserve(names.size());
-        for (const TString& name : names) {
-            values.push_back(type->GetEnumValue(name));
-        }
-        return new TColumnEnum<i16>(type, values);
-    }
-
-    template <typename T>
-    void TColumnEnum<T>::Append(const T& value, bool checkValue) {
-        if (checkValue) {
-            Y_ENSURE(Type_->HasEnumValue(value), Sprintf("Enum type doesn't have value %d", value));
-        }
-        Data_.push_back(value);
-    }
-
-    template <typename T>
-    void TColumnEnum<T>::Append(const TString& name) {
-        Data_.push_back(Type_->GetEnumValue(name));
-    }
-
-    template <typename T>
-    const T& TColumnEnum<T>::At(size_t n) const {
-        return Data_.at(n);
-    }
-
-    template <typename T>
-    const TString& TColumnEnum<T>::NameAt(size_t n) const {
-        return Type_->GetEnumName(Data_.at(n));
-    }
-
-    template <typename T>
-    const T& TColumnEnum<T>::operator[](size_t n) const {
-        return Data_[n];
-    }
-
-    template <typename T>
-    void TColumnEnum<T>::SetAt(size_t n, const T& value, bool checkValue) {
-        if (checkValue) {
-            Y_ENSURE(Type_->HasEnumValue(value), Sprintf("Enum type doesn't have value %d", value));
-        }
-        Data_.at(n) = value;
-    }
-
-    template <typename T>
-    void TColumnEnum<T>::SetNameAt(size_t n, const TString& name) {
-        Data_.at(n) = Type_->GetEnumValue(name);
-    }
-
-    template <typename T>
-    void TColumnEnum<T>::Append(TColumnRef column) {
-        if (auto col = column->As<TColumnEnum<T>>()) {
-            Data_.insert(Data_.end(), col->Data_.begin(), col->Data_.end());
-        }
-    }
-
-    template <typename T>
-    bool TColumnEnum<T>::Load(TCodedInputStream* input, size_t rows) {
-        Data_.resize(rows);
-        return input->ReadRaw(Data_.data(), Data_.size() * sizeof(T));
-    }
-
-    template <typename T>
-    void TColumnEnum<T>::Save(TCodedOutputStream* output) {
-        output->WriteRaw(Data_.data(), Data_.size() * sizeof(T));
-    }
-
-    template <typename T>
-    size_t TColumnEnum<T>::Size() const {
-        return Data_.size();
-    }
-
-    template <typename T>
-    TColumnRef TColumnEnum<T>::Slice(size_t begin, size_t len) {
-        return new TColumnEnum<T>(Type_, SliceVector(Data_, begin, len));
-    }
-
-    template class TColumnEnum<i8>;
-    template class TColumnEnum<i16>;
-
-}
diff --git a/library/cpp/clickhouse/client/columns/enum.h b/library/cpp/clickhouse/client/columns/enum.h
deleted file mode 100644
index 90d773bd9f..0000000000
--- a/library/cpp/clickhouse/client/columns/enum.h
+++ /dev/null
@@ -1,57 +0,0 @@
-#pragma once
-
-#include "column.h"
-
-namespace NClickHouse {
-    template <typename T>
-    class TColumnEnum: public TColumn {
-    public:
-        static TIntrusivePtr<TColumnEnum<T>> Create(const TVector<TEnumItem>& enumItems);
-        static TIntrusivePtr<TColumnEnum<T>> Create(
-            const TVector<TEnumItem>& enumItems,
-            const TVector<T>& values,
-            bool checkValues = false);
-        static TIntrusivePtr<TColumnEnum<T>> Create(const TVector<TEnumItem>& enumItems, const TVector<TString>& names);
-
-        /// Appends one element to the end of column.
-        void Append(const T& value, bool checkValue = false);
-        void Append(const TString& name);
-
-        /// Returns element at given row number.
-        const T& At(size_t n) const;
-        const TString& NameAt(size_t n) const;
-
-        /// Returns element at given row number.
-        const T& operator[](size_t n) const;
-
-        /// Set element at given row number.
-        void SetAt(size_t n, const T& value, bool checkValue = false);
-        void SetNameAt(size_t n, const TString& name);
-
-    public:
-        /// Appends content of given column to the end of current one.
-        void Append(TColumnRef column) override;
-
-        /// Loads column data from input stream.
-        bool Load(TCodedInputStream* input, size_t rows) override;
-
-        /// Saves column data to output stream.
-        void Save(TCodedOutputStream* output) override;
-
-        /// Returns count of rows in the column.
-        size_t Size() const override;
-
-        /// Makes slice of the current column.
-        TColumnRef Slice(size_t begin, size_t len) override;
-
-    private:
-        TColumnEnum(TTypeRef type);
-        TColumnEnum(TTypeRef type, const TVector<T>& data);
-
-        TVector<T> Data_;
-    };
-
-    using TColumnEnum8 = TColumnEnum<i8>;
-    using TColumnEnum16 = TColumnEnum<i16>;
-
-}
diff --git a/library/cpp/clickhouse/client/columns/factory.cpp b/library/cpp/clickhouse/client/columns/factory.cpp
deleted file mode 100644
index a29ee70b8d..0000000000
--- a/library/cpp/clickhouse/client/columns/factory.cpp
+++ /dev/null
@@ -1,118 +0,0 @@
-#include "factory.h"
-
-#include "array.h"
-#include "date.h"
-#include "enum.h"
-#include "nullable.h"
-#include "numeric.h"
-#include "string.h"
-#include "tuple.h"
-
-#include <library/cpp/clickhouse/client/types/type_parser.h>
-
-namespace NClickHouse {
-    namespace {
-        TColumnRef CreateTerminalColumn(const TTypeAst& ast) {
-            if (ast.Name == "UInt8")
-                return TColumnUInt8::Create();
-            if (ast.Name == "UInt16")
-                return TColumnUInt16::Create();
-            if (ast.Name == "UInt32")
-                return TColumnUInt32::Create();
-            if (ast.Name == "UInt64")
-                return TColumnUInt64::Create();
-
-            if (ast.Name == "Int8")
-                return TColumnInt8::Create();
-            if (ast.Name == "Int16")
-                return TColumnInt16::Create();
-            if (ast.Name == "Int32")
-                return TColumnInt32::Create();
-            if (ast.Name == "Int64")
-                return TColumnInt64::Create();
-
-            if (ast.Name == "Float32")
-                return TColumnFloat32::Create();
-            if (ast.Name == "Float64")
-                return TColumnFloat64::Create();
-
-            if (ast.Name == "String")
-                return TColumnString::Create();
-            if (ast.Name == "FixedString")
-                return TColumnFixedString::Create(ast.Elements.front().Value);
-
-            if (ast.Name == "DateTime")
-                return TColumnDateTime::Create();
-            if (ast.Name == "Date")
-                return TColumnDate::Create();
-
-            return nullptr;
-        }
-
-        TColumnRef CreateColumnFromAst(const TTypeAst& ast) {
-            switch (ast.Meta) {
-                case TTypeAst::Array: {
-                    return TColumnArray::Create(
-                        CreateColumnFromAst(ast.Elements.front()));
-                }
-
-                case TTypeAst::Nullable: {
-                    return TColumnNullable::Create(
-                        CreateColumnFromAst(ast.Elements.front()));
-                }
-
-                case TTypeAst::Terminal: {
-                    return CreateTerminalColumn(ast);
-                }
-
-                case TTypeAst::Tuple: {
-                    TVector<TColumnRef> columns;
-
-                    for (const auto& elem : ast.Elements) {
-                        if (auto col = CreateColumnFromAst(elem)) {
-                            columns.push_back(col);
-                        } else {
-                            return nullptr;
-                        }
-                    }
-
-                    return TColumnTuple::Create(columns);
-                }
-
-                case TTypeAst::Enum: {
-                    TVector<TEnumItem> enum_items;
-
-                    for (const auto& elem : ast.Elements) {
-                        TString name(elem.Name);
-                        i16 value = elem.Value;
-                        enum_items.push_back({name, value});
-                    }
-
-                    if (ast.Name == "Enum8") {
-                        return TColumnEnum8::Create(enum_items);
-                    } else {
-                        return TColumnEnum16::Create(enum_items);
-                    }
-                }
-
-                case TTypeAst::Null:
-                case TTypeAst::Number:
-                    break;
-            }
-
-            return nullptr;
-        }
-
-    }
-
-    TColumnRef CreateColumnByType(const TString& type_name) {
-        TTypeAst ast;
-
-        if (TTypeParser(type_name).Parse(&ast)) {
-            return CreateColumnFromAst(ast);
-        }
-
-        return nullptr;
-    }
-
-}
diff --git a/library/cpp/clickhouse/client/columns/factory.h b/library/cpp/clickhouse/client/columns/factory.h
deleted file mode 100644
index 0b2b82ece3..0000000000
--- a/library/cpp/clickhouse/client/columns/factory.h
+++ /dev/null
@@ -1,7 +0,0 @@
-#pragma once
-
-#include "column.h"
-
-namespace NClickHouse {
-    TColumnRef CreateColumnByType(const TString& type_name);
-}
diff --git a/library/cpp/clickhouse/client/columns/nullable.cpp b/library/cpp/clickhouse/client/columns/nullable.cpp
deleted file mode 100644
index 1d9dffea27..0000000000
--- a/library/cpp/clickhouse/client/columns/nullable.cpp
+++ /dev/null
@@ -1,70 +0,0 @@
-#include "nullable.h"
-
-#include <util/generic/yexception.h>
-#include <util/system/yassert.h>
-
-namespace NClickHouse {
-    TColumnNullable::TColumnNullable(TColumnRef nested, TColumnRef nulls)
-        : TColumn(TType::CreateNullable(nested->Type()))
-        , Nested_(nested)
-        , Nulls_(nulls->As<TColumnUInt8>())
-    {
-        if (Nested_->Size() != nulls->Size()) {
-            ythrow yexception() << "count of elements in nested and nulls should be the same";
-        }
-    }
-
-    TIntrusivePtr<TColumnNullable> TColumnNullable::Create(TColumnRef nested) {
-        return new TColumnNullable(nested, TColumnUInt8::Create());
-    }
-
-    TIntrusivePtr<TColumnNullable> TColumnNullable::Create(TColumnRef nested, TColumnRef nulls) {
-        return new TColumnNullable(nested, nulls);
-    }
-
-    bool TColumnNullable::IsNull(size_t n) const {
-        return Nulls_->At(n) != 0;
-    }
-
-    TColumnRef TColumnNullable::Nested() const {
-        return Nested_;
-    }
-
-    void TColumnNullable::Append(TColumnRef column) {
-        if (auto col = column->As<TColumnNullable>()) {
-            if (!col->Nested_->Type()->IsEqual(Nested_->Type())) {
-                return;
-            }
-
-            Nested_->Append(col->Nested_);
-            Nulls_->Append(col->Nulls_);
-        }
-    }
-
-    bool TColumnNullable::Load(TCodedInputStream* input, size_t rows) {
-        if (!Nulls_->Load(input, rows)) {
-            return false;
-        }
-        if (!Nested_->Load(input, rows)) {
-            return false;
-        }
-        return true;
-    }
-
-    void TColumnNullable::Save(TCodedOutputStream* output) {
-        Nulls_->Save(output);
-        Nested_->Save(output);
-    }
-
-    size_t TColumnNullable::Size() const {
-        Y_ASSERT(Nested_->Size() == Nulls_->Size());
-        return Nulls_->Size();
-    }
-
-    TColumnRef TColumnNullable::Slice(size_t begin, size_t len) {
-        (void)begin;
-        (void)len;
-        return TColumnRef();
-    }
-
-}
diff --git a/library/cpp/clickhouse/client/columns/nullable.h b/library/cpp/clickhouse/client/columns/nullable.h
deleted file mode 100644
index e0f88e6f75..0000000000
--- a/library/cpp/clickhouse/client/columns/nullable.h
+++ /dev/null
@@ -1,44 +0,0 @@
-#pragma once
-
-#include "column.h"
-#include "numeric.h"
-
-namespace NClickHouse {
-    /**
- * Represents column of Nullable(T).
- */
-    class TColumnNullable: public TColumn {
-    public:
-        static TIntrusivePtr<TColumnNullable> Create(TColumnRef nested);
-        static TIntrusivePtr<TColumnNullable> Create(TColumnRef nested, TColumnRef nulls);
-
-        /// Returns null flag at given row number.
-        bool IsNull(size_t n) const;
-
-        /// Returns nested column.
-        TColumnRef Nested() const;
-
-    public:
-        /// Appends content of given column to the end of current one.
-        void Append(TColumnRef column) override;
-
-        /// Loads column data from input stream.
-        bool Load(TCodedInputStream* input, size_t rows) override;
-
-        /// Saves column data to output stream.
-        void Save(TCodedOutputStream* output) override;
-
-        /// Returns count of rows in the column.
-        size_t Size() const override;
-
-        /// Makes slice of the current column.
-        TColumnRef Slice(size_t begin, size_t len) override;
-
-    private:
-        TColumnNullable(TColumnRef nested, TColumnRef nulls);
-
-        TColumnRef Nested_;
-        TIntrusivePtr<TColumnUInt8> Nulls_;
-    };
-
-}
diff --git a/library/cpp/clickhouse/client/columns/numeric.cpp b/library/cpp/clickhouse/client/columns/numeric.cpp
deleted file mode 100644
index 68cbe3d4e4..0000000000
--- a/library/cpp/clickhouse/client/columns/numeric.cpp
+++ /dev/null
@@ -1,103 +0,0 @@
-#include "numeric.h"
-
-#include "utils.h"
-
-namespace NClickHouse {
-    template <typename T>
-    TColumnVector<T>::TColumnVector()
-        : TColumn(TType::CreateSimple<T>())
-    {
-    }
-
-    template <typename T>
-    TColumnVector<T>::TColumnVector(const TVector<T>& data)
-        : TColumn(TType::CreateSimple<T>())
-        , Data_(data)
-    {
-    }
-
-    template <typename T>
-    TColumnVector<T>::TColumnVector(TVector<T>&& data)
-        : TColumn(TType::CreateSimple<T>())
-        , Data_(std::move(data))
-    {
-    }
-
-    template <typename T>
-    TIntrusivePtr<TColumnVector<T>> TColumnVector<T>::Create() {
-        return new TColumnVector<T>();
-    }
-
-    template <typename T>
-    TIntrusivePtr<TColumnVector<T>> TColumnVector<T>::Create(const TVector<T>& data) {
-        return new TColumnVector<T>(data);
-    }
-
-    template <typename T>
-    TIntrusivePtr<TColumnVector<T>> TColumnVector<T>::Create(TVector<T>&& data) {
-        return new TColumnVector<T>(std::move(data));
-    }
-
-    template <typename T>
-    void TColumnVector<T>::Append(const T& value) {
-        Data_.push_back(value);
-    }
-
-    template <typename T>
-    const T& TColumnVector<T>::At(size_t n) const {
-        return Data_.at(n);
-    }
-
-    template <typename T>
-    const T& TColumnVector<T>::operator[](size_t n) const {
-        return Data_[n];
-    }
-
-    template <typename T>
-    void TColumnVector<T>::SetAt(size_t n, const T& value) {
-        Data_.at(n) = value;
-    }
-
-    template <typename T>
-    void TColumnVector<T>::Append(TColumnRef column) {
-        if (auto col = column->As<TColumnVector<T>>()) {
-            Data_.insert(Data_.end(), col->Data_.begin(), col->Data_.end());
-        }
-    }
-
-    template <typename T>
-    bool TColumnVector<T>::Load(TCodedInputStream* input, size_t rows) {
-        Data_.resize(rows);
-
-        return input->ReadRaw(Data_.data(), Data_.size() * sizeof(T));
-    }
-
-    template <typename T>
-    void TColumnVector<T>::Save(TCodedOutputStream* output) {
-        output->WriteRaw(Data_.data(), Data_.size() * sizeof(T));
-    }
-
-    template <typename T>
-    size_t TColumnVector<T>::Size() const {
-        return Data_.size();
-    }
-
-    template <typename T>
-    TColumnRef TColumnVector<T>::Slice(size_t begin, size_t len) {
-        return new TColumnVector<T>(SliceVector(Data_, begin, len));
-    }
-
-    template class TColumnVector<i8>;
-    template class TColumnVector<i16>;
-    template class TColumnVector<i32>;
-    template class TColumnVector<i64>;
-
-    template class TColumnVector<ui8>;
-    template class TColumnVector<ui16>;
-    template class TColumnVector<ui32>;
-    template class TColumnVector<ui64>;
-
-    template class TColumnVector<float>;
-    template class TColumnVector<double>;
-
-}
diff --git a/library/cpp/clickhouse/client/columns/numeric.h b/library/cpp/clickhouse/client/columns/numeric.h
deleted file mode 100644
index 11a2ddac00..0000000000
--- a/library/cpp/clickhouse/client/columns/numeric.h
+++ /dev/null
@@ -1,65 +0,0 @@
-#pragma once
-
-#include "column.h"
-
-namespace NClickHouse {
-    /**
- * Represents various numeric columns.
- */
-    template <typename T>
-    class TColumnVector: public TColumn {
-    public:
-        static TIntrusivePtr<TColumnVector<T>> Create();
-        static TIntrusivePtr<TColumnVector<T>> Create(const TVector<T>& data);
-        static TIntrusivePtr<TColumnVector<T>> Create(TVector<T>&& data);
-
-        /// Appends one element to the end of column.
-        void Append(const T& value);
-
-        /// Returns element at given row number.
-        const T& At(size_t n) const;
-
-        /// Returns element at given row number.
-        const T& operator[](size_t n) const;
-
-        /// Set element at given row number.
-        void SetAt(size_t n, const T& value);
-
-    public:
-        /// Appends content of given column to the end of current one.
-        void Append(TColumnRef column) override;
-
-        /// Loads column data from input stream.
-        bool Load(TCodedInputStream* input, size_t rows) override;
-
-        /// Saves column data to output stream.
-        void Save(TCodedOutputStream* output) override;
-
-        /// Returns count of rows in the column.
-        size_t Size() const override;
-
-        /// Makes slice of the current column.
-        TColumnRef Slice(size_t begin, size_t len) override;
-
-    private:
-        TColumnVector();
-        TColumnVector(const TVector<T>& data);
-        TColumnVector(TVector<T>&& data);
-
-        TVector<T> Data_;
-    };
-
-    using TColumnUInt8 = TColumnVector<ui8>;
-    using TColumnUInt16 = TColumnVector<ui16>;
-    using TColumnUInt32 = TColumnVector<ui32>;
-    using TColumnUInt64 = TColumnVector<ui64>;
-
-    using TColumnInt8 = TColumnVector<i8>;
-    using TColumnInt16 = TColumnVector<i16>;
-    using TColumnInt32 = TColumnVector<i32>;
-    using TColumnInt64 = TColumnVector<i64>;
-
-    using TColumnFloat32 = TColumnVector<float>;
-    using TColumnFloat64 = TColumnVector<double>;
-
-}
diff --git a/library/cpp/clickhouse/client/columns/string.cpp b/library/cpp/clickhouse/client/columns/string.cpp
deleted file mode 100644
index 92053aadc8..0000000000
--- a/library/cpp/clickhouse/client/columns/string.cpp
+++ /dev/null
@@ -1,241 +0,0 @@
-#include "string.h"
-#include "utils.h"
-
-#include <library/cpp/clickhouse/client/base/wire_format.h>
-
-#include <util/memory/tempbuf.h>
-
-namespace NClickHouse {
-    TColumnFixedString::TColumnFixedString(size_t n)
-        : TColumn(TType::CreateString(n))
-        , StringSize_(n)
-    {
-    }
-
-    TColumnFixedString::TColumnFixedString(size_t n, const TVector<TString>& data)
-        : TColumnFixedString(n)
-    {
-        Data_.reserve(data.size());
-        for (const auto& value : data) {
-            Append(value);
-        }
-    }
-
-    TIntrusivePtr<TColumnFixedString> TColumnFixedString::Create(size_t n) {
-        return new TColumnFixedString(n);
-    }
-
-    TIntrusivePtr<TColumnFixedString> TColumnFixedString::Create(size_t n, const TVector<TString>& data) {
-        return new TColumnFixedString(n, data);
-    }
-
-    void TColumnFixedString::Append(const TString& str) {
-        Data_.push_back(str);
-        Data_.back().resize(StringSize_);
-    }
-
-    const TString& TColumnFixedString::At(size_t n) const {
-        return Data_.at(n);
-    }
-
-    const TString& TColumnFixedString::operator[](size_t n) const {
-        return Data_[n];
-    }
-
-    void TColumnFixedString::SetAt(size_t n, const TString& value) {
-        TString stringResized(value);
-        stringResized.resize(StringSize_);
-        Data_.at(n) = stringResized;
-    }
-
-    void TColumnFixedString::Append(TColumnRef column) {
-        if (auto col = column->As<TColumnFixedString>()) {
-            if (StringSize_ == col->StringSize_) {
-                Data_.insert(Data_.end(), col->Data_.begin(), col->Data_.end());
-            }
-        }
-    }
-
-    bool TColumnFixedString::Load(TCodedInputStream* input, size_t rows) {
-        for (size_t i = 0; i < rows; ++i) {
-            TTempBuf s(StringSize_);
-
-            if (!TWireFormat::ReadBytes(input, s.Data(), StringSize_)) {
-                return false;
-            }
-
-            Data_.push_back(TString(s.Data(), StringSize_));
-        }
-
-        return true;
-    }
-
-    void TColumnFixedString::Save(TCodedOutputStream* output) {
-        for (size_t i = 0; i < Data_.size(); ++i) {
-            TWireFormat::WriteBytes(output, Data_[i].data(), StringSize_);
-        }
-    }
-
-    size_t TColumnFixedString::Size() const {
-        return Data_.size();
-    }
-
-    TColumnRef TColumnFixedString::Slice(size_t begin, size_t len) {
-        auto result = new TColumnFixedString(StringSize_);
-
-        if (begin < Data_.size()) {
-            result->Data_ = SliceVector(Data_, begin, len);
-        }
-
-        return result;
-    }
-
-    TColumnString::TColumnString()
-        : TColumn(TType::CreateString())
-    {
-    }
-
-    TColumnString::TColumnString(const TVector<TString>& data)
-        : TColumn(TType::CreateString())
-        , Data_(data)
-    {
-    }
-
-    TColumnString::TColumnString(TVector<TString>&& data)
-        : TColumn(TType::CreateString())
-        , Data_(std::move(data))
-    {
-    }
-
-    TIntrusivePtr<TColumnString> TColumnString::Create() {
-        return new TColumnString();
-    }
-
-    TIntrusivePtr<TColumnString> TColumnString::Create(const TVector<TString>& data) {
-        return new TColumnString(data);
-    }
-
-    TIntrusivePtr<TColumnString> TColumnString::Create(TVector<TString>&& data) {
-        return new TColumnString(std::move(data));
-    }
-
-    void TColumnString::Append(const TString& str) {
-        Data_.push_back(str);
-    }
-
-    const TString& TColumnString::At(size_t n) const {
-        return Data_.at(n);
-    }
-
-    const TString& TColumnString::operator[](size_t n) const {
-        return Data_[n];
-    }
-
-    void TColumnString::SetAt(size_t n, const TString& value) {
-        Data_.at(n) = value;
-    }
-
-    void TColumnString::Append(TColumnRef column) {
-        if (auto col = column->As<TColumnString>()) {
-            Data_.insert(Data_.end(), col->Data_.begin(), col->Data_.end());
-        }
-    }
-
-    bool TColumnString::Load(TCodedInputStream* input, size_t rows) {
-        for (size_t i = 0; i < rows; ++i) {
-            TString s;
-
-            if (!TWireFormat::ReadString(input, &s)) {
-                return false;
-            }
-
-            Data_.push_back(s);
-        }
-
-        return true;
-    }
-
-    void TColumnString::Save(TCodedOutputStream* output) {
-        for (auto si = Data_.begin(); si != Data_.end(); ++si) {
-            TWireFormat::WriteString(output, *si);
-        }
-    }
-
-    size_t TColumnString::Size() const {
-        return Data_.size();
-    }
-
-    TColumnRef TColumnString::Slice(size_t begin, size_t len) {
-        return new TColumnString(SliceVector(Data_, begin, len));
-    }
-
-    TColumnStringBuf::TColumnStringBuf()
-        : TColumn(TType::CreateString())
-    {
-    }
-
-    TColumnStringBuf::TColumnStringBuf(const TVector<TStringBuf>& data)
-        : TColumn(TType::CreateString())
-        , Data_(data)
-    {
-    }
-
-    TColumnStringBuf::TColumnStringBuf(TVector<TStringBuf>&& data)
-        : TColumn(TType::CreateString())
-        , Data_(std::move(data))
-    {
-    }
-
-    TIntrusivePtr<TColumnStringBuf> TColumnStringBuf::Create() {
-        return new TColumnStringBuf();
-    }
-
-    TIntrusivePtr<TColumnStringBuf> TColumnStringBuf::Create(const TVector<TStringBuf>& data) {
-        return new TColumnStringBuf(data);
-    }
-
-    TIntrusivePtr<TColumnStringBuf> TColumnStringBuf::Create(TVector<TStringBuf>&& data) {
-        return new TColumnStringBuf(std::move(data));
-    }
-
-    void TColumnStringBuf::Append(TStringBuf str) {
-        Data_.push_back(str);
-    }
-
-    const TStringBuf& TColumnStringBuf::At(size_t n) const {
-        return Data_.at(n);
-    }
-
-    const TStringBuf& TColumnStringBuf::operator[](size_t n) const {
-        return Data_[n];
-    }
-
-    void TColumnStringBuf::SetAt(size_t n, TStringBuf value) {
-        Data_.at(n) = value;
-    }
-
-    void TColumnStringBuf::Append(TColumnRef column) {
-        if (auto col = column->As<TColumnStringBuf>()) {
-            Data_.insert(Data_.end(), col->Data_.begin(), col->Data_.end());
-        }
-    }
-
-    bool TColumnStringBuf::Load(TCodedInputStream*, size_t) {
-        ythrow yexception() << "load not implemented";
-    }
-
-    void TColumnStringBuf::Save(TCodedOutputStream* output) {
-        for (auto si = Data_.begin(); si != Data_.end(); ++si) {
-            TWireFormat::WriteStringBuf(output, *si);
-        }
-    }
-
-    size_t TColumnStringBuf::Size() const {
-        return Data_.size();
-    }
-
-    TColumnRef TColumnStringBuf::Slice(size_t begin, size_t len) {
-        return new TColumnStringBuf(SliceVector(Data_, begin, len));
-    }
-
-}
diff --git a/library/cpp/clickhouse/client/columns/string.h b/library/cpp/clickhouse/client/columns/string.h
deleted file mode 100644
index 19c41fcda3..0000000000
--- a/library/cpp/clickhouse/client/columns/string.h
+++ /dev/null
@@ -1,142 +0,0 @@
-#pragma once
-
-#include "column.h"
-
-#include <util/generic/string.h>
-
-namespace NClickHouse {
-    /**
- * Represents column of fixed-length strings.
- */
-    class TColumnFixedString: public TColumn {
-    public:
-        static TIntrusivePtr<TColumnFixedString> Create(size_t n);
-        static TIntrusivePtr<TColumnFixedString> Create(size_t n, const TVector<TString>& data);
-
-        /// Appends one element to the column.
-        void Append(const TString& str);
-
-        /// Returns element at given row number.
-        const TString& At(size_t n) const;
-
-        /// Returns element at given row number.
-        const TString& operator[](size_t n) const;
-
-        /// Set element at given row number.
-        void SetAt(size_t n, const TString& value);
-
-    public:
-        /// Appends content of given column to the end of current one.
-        void Append(TColumnRef column) override;
-
-        /// Loads column data from input stream.
-        bool Load(TCodedInputStream* input, size_t rows) override;
-
-        /// Saves column data to output stream.
-        void Save(TCodedOutputStream* output) override;
-
-        /// Returns count of rows in the column.
-        size_t Size() const override;
-
-        /// Makes slice of the current column.
-        TColumnRef Slice(size_t begin, size_t len) override;
-
-    private:
-        TColumnFixedString(size_t n);
-        TColumnFixedString(size_t n, const TVector<TString>& data);
-
-        const size_t StringSize_;
-        TVector<TString> Data_;
-    };
-
-    /**
- * Represents column of variable-length strings.
- */
-    class TColumnString: public TColumn {
-    public:
-        static TIntrusivePtr<TColumnString> Create();
-        static TIntrusivePtr<TColumnString> Create(const TVector<TString>& data);
-        static TIntrusivePtr<TColumnString> Create(TVector<TString>&& data);
-
-        /// Appends one element to the column.
-        void Append(const TString& str);
-
-        /// Returns element at given row number.
-        const TString& At(size_t n) const;
-
-        /// Returns element at given row number.
-        const TString& operator[](size_t n) const;
-
-        /// Set element at given row number.
-        void SetAt(size_t n, const TString& value);
-
-    public:
-        /// Appends content of given column to the end of current one.
-        void Append(TColumnRef column) override;
-
-        /// Loads column data from input stream.
-        bool Load(TCodedInputStream* input, size_t rows) override;
-
-        /// Saves column data to output stream.
-        void Save(TCodedOutputStream* output) override;
-
-        /// Returns count of rows in the column.
-        size_t Size() const override;
-
-        /// Makes slice of the current column.
-        TColumnRef Slice(size_t begin, size_t len) override;
-
-    private:
-        TColumnString();
-        TColumnString(const TVector<TString>& data);
-        TColumnString(TVector<TString>&& data);
-
-        TVector<TString> Data_;
-    };
-
-    /**
-* Represents column of variable-length strings but use TStringBuf instead TString.
-*/
-    class TColumnStringBuf: public NClickHouse::TColumn {
-    public:
-        static TIntrusivePtr<TColumnStringBuf> Create();
-        static TIntrusivePtr<TColumnStringBuf> Create(const TVector<TStringBuf>& data);
-        static TIntrusivePtr<TColumnStringBuf> Create(TVector<TStringBuf>&& data);
-
-        /// Appends one element to the column.
-        void Append(TStringBuf str);
-
-        /// Returns element at given row number.
-        const TStringBuf& At(size_t n) const;
-
-        /// Returns element at given row number.
-        const TStringBuf& operator[](size_t n) const;
-
-        /// Set element at given row number.
-        void SetAt(size_t n, TStringBuf value);
-
-    public:
-        /// Appends content of given column to the end of current one.
-        void Append(NClickHouse::TColumnRef column) override;
-
-        /// Loads column data from input stream.
-        bool Load(NClickHouse::TCodedInputStream* input, size_t rows) override;
-
-        /// Saves column data to output stream.
-        void Save(NClickHouse::TCodedOutputStream* output) override;
-
-        /// Returns count of rows in the column.
-        size_t Size() const override;
-
-        /// Makes slice of the current column.
-        NClickHouse::TColumnRef Slice(size_t begin, size_t len) override;
-
-    private:
-        TColumnStringBuf();
-        TColumnStringBuf(const TVector<TStringBuf>& data);
-        TColumnStringBuf(TVector<TStringBuf>&& data);
-
-        TVector<TStringBuf> Data_;
-    };
-
-}
diff --git a/library/cpp/clickhouse/client/columns/tuple.cpp b/library/cpp/clickhouse/client/columns/tuple.cpp
deleted file mode 100644
index 3d0d00e772..0000000000
--- a/library/cpp/clickhouse/client/columns/tuple.cpp
+++ /dev/null
@@ -1,42 +0,0 @@
-#include "tuple.h"
-
-namespace NClickHouse {
-    static TVector<TTypeRef> CollectTypes(const TVector<TColumnRef>& columns) {
-        TVector<TTypeRef> types;
-        for (const auto& col : columns) {
-            types.push_back(col->Type());
-        }
-        return types;
-    }
-
-    TColumnTuple::TColumnTuple(const TVector<TColumnRef>& columns)
-        : TColumn(TType::CreateTuple(CollectTypes(columns)))
-        , Columns_(columns)
-    {
-    }
-
-    TIntrusivePtr<TColumnTuple> TColumnTuple::Create(const TVector<TColumnRef>& columns) {
-        return new TColumnTuple(columns);
-    }
-
-    size_t TColumnTuple::Size() const {
-        return Columns_.empty() ? 0 : Columns_[0]->Size();
-    }
-
-    bool TColumnTuple::Load(TCodedInputStream* input, size_t rows) {
-        for (auto ci = Columns_.begin(); ci != Columns_.end(); ++ci) {
-            if (!(*ci)->Load(input, rows)) {
-                return false;
-            }
-        }
-
-        return true;
-    }
-
-    void TColumnTuple::Save(TCodedOutputStream* output) {
-        for (auto ci = Columns_.begin(); ci != Columns_.end(); ++ci) {
-            (*ci)->Save(output);
-        }
-    }
-
-}
diff --git a/library/cpp/clickhouse/client/columns/tuple.h b/library/cpp/clickhouse/client/columns/tuple.h
deleted file mode 100644
index d388a7b9a9..0000000000
--- a/library/cpp/clickhouse/client/columns/tuple.h
+++ /dev/null
@@ -1,37 +0,0 @@
-#pragma once
-
-#include "column.h"
-
-#include <util/generic/vector.h>
-
-namespace NClickHouse {
-    /** */
-    class TColumnTuple: public TColumn {
-    public:
-        static TIntrusivePtr<TColumnTuple> Create(const TVector<TColumnRef>& columns);
-
-        TColumnRef operator[](size_t n) const {
-            return Columns_[n];
-        }
-
-        /// Appends content of given column to the end of current one.
-        void Append(TColumnRef) override {
-        }
-
-        size_t Size() const override;
-
-        bool Load(TCodedInputStream* input, size_t rows) override;
-
-        void Save(TCodedOutputStream* output) override;
-
-        TColumnRef Slice(size_t, size_t) override {
-            return TColumnRef();
-        }
-
-    private:
-        TColumnTuple(const TVector<TColumnRef>& columns);
-
-        TVector<TColumnRef> Columns_;
-    };
-
-}
diff --git a/library/cpp/clickhouse/client/columns/utils.h b/library/cpp/clickhouse/client/columns/utils.h
deleted file mode 100644
index fc43828c63..0000000000
--- a/library/cpp/clickhouse/client/columns/utils.h
+++ /dev/null
@@ -1,19 +0,0 @@
-#pragma once
-
-#include <algorithm>
-#include <util/generic/vector.h>
-
-namespace NClickHouse {
-    template <typename T>
-    TVector<T> SliceVector(const TVector<T>& vec, size_t begin, size_t len) {
-        TVector<T> result;
-
-        if (begin < vec.size()) {
-            len = std::min(len, vec.size() - begin);
-            result.assign(vec.begin() + begin, vec.begin() + (begin + len));
-        }
-
-        return result;
-    }
-
-}
diff --git a/library/cpp/clickhouse/client/columns/ya.make b/library/cpp/clickhouse/client/columns/ya.make
deleted file mode 100644
index 29330f949e..0000000000
--- a/library/cpp/clickhouse/client/columns/ya.make
+++ /dev/null
@@ -1,19 +0,0 @@
-LIBRARY()
-
-SRCS(
-    array.cpp
-    date.cpp
-    enum.cpp
-    factory.cpp
-    nullable.cpp
-    numeric.cpp
-    string.cpp
-    tuple.cpp
-)
-
-PEERDIR(
-    library/cpp/clickhouse/client/base
-    library/cpp/clickhouse/client/types
-)
-
-END()
diff --git a/library/cpp/clickhouse/client/exceptions.h b/library/cpp/clickhouse/client/exceptions.h
deleted file mode 100644
index d27c5352f9..0000000000
--- a/library/cpp/clickhouse/client/exceptions.h
+++ /dev/null
@@ -1,27 +0,0 @@
-#pragma once
-
-#include "query.h"
-
-#include <util/generic/yexception.h>
-
-namespace NClickHouse {
-    class TServerException: public yexception {
-    public:
-        TServerException(std::unique_ptr<TException> e)
-            : Exception_(std::move(e))
-        {
-        }
-
-        const TException& GetException() const {
-            return *Exception_;
-        }
-
-        const char* what() const noexcept override {
-            return Exception_->DisplayText.c_str();
-        }
-
-    private:
-        std::unique_ptr<TException> Exception_;
-    };
-
-}
diff --git a/library/cpp/clickhouse/client/protocol.h b/library/cpp/clickhouse/client/protocol.h
deleted file mode 100644
index 3cb5b2646f..0000000000
--- a/library/cpp/clickhouse/client/protocol.h
+++ /dev/null
@@ -1,52 +0,0 @@
-#pragma once
-
-namespace NClickHouse {
-    /// То, что передаёт сервер.
-    namespace ServerCodes {
-        enum {
-            Hello = 0,       /// Имя, версия, ревизия.
-            Data = 1,        /// Блок данных со сжатием или без.
-            Exception = 2,   /// Исключение во время обработки запроса.
-            Progress = 3,    /// Прогресс выполнения запроса: строк считано, байт считано.
-            Pong = 4,        /// Ответ на Ping.
-            EndOfStream = 5, /// Все пакеты были переданы.
-            ProfileInfo = 6, /// Пакет с профайлинговой информацией.
-            Totals = 7,      /// Блок данных с тотальными значениями, со сжатием или без.
-            Extremes = 8,    /// Блок данных с минимумами и максимумами, аналогично.
-            Log = 10,        /// Системный лог исполнения запроса.
-        };
-    }
-
-    /// То, что передаёт клиент.
-    namespace ClientCodes {
-        enum {
-            Hello = 0,  /// Имя, версия, ревизия, БД по-умолчанию.
-            Query = 1,  /** Идентификатор запроса, настройки на отдельный запрос,
-                                  * информация, до какой стадии исполнять запрос,
-                                  * использовать ли сжатие, текст запроса (без данных для INSERT-а).
-                                  */
-            Data = 2,   /// Блок данных со сжатием или без.
-            Cancel = 3, /// Отменить выполнение запроса.
-            Ping = 4,   /// Проверка живости соединения с сервером.
-        };
-    }
-
-    /// Использовать ли сжатие.
-    namespace CompressionState {
-        enum {
-            Disable = 0,
-            Enable = 1,
-        };
-    }
-
-    namespace Stages {
-        enum {
-            Complete = 2,
-        };
-    }
-
-    enum class ECompressionMethodByte : ui8 {
-        LZ4 = 0x82,
-        ZSTD = 0x90,
-    };
-}
diff --git a/library/cpp/clickhouse/client/query.cpp b/library/cpp/clickhouse/client/query.cpp
deleted file mode 100644
index 4c20bc8d88..0000000000
--- a/library/cpp/clickhouse/client/query.cpp
+++ /dev/null
@@ -1,26 +0,0 @@
-#include "query.h"
-
-namespace NClickHouse {
-    TQuery::TQuery() {
-    }
-
-    TQuery::TQuery(const char* query)
-        : Query_(query)
-    {
-    }
-
-    TQuery::TQuery(const TString& query)
-        : Query_(query)
-    {
-    }
-
-    TQuery::TQuery(const TString& query, const TString& query_id)
-        : Query_(query)
-        , QueryId_(query_id)
-    {
-    }
-
-    TQuery::~TQuery() {
-    }
-
-}
diff --git a/library/cpp/clickhouse/client/query.h b/library/cpp/clickhouse/client/query.h
deleted file mode 100644
index 5d4a578df5..0000000000
--- a/library/cpp/clickhouse/client/query.h
+++ /dev/null
@@ -1,159 +0,0 @@
-#pragma once
-
-#include "block.h"
-
-#include <util/generic/string.h>
-
-#include <cstdint>
-#include <functional>
-#include <memory>
-
-namespace NClickHouse {
-    /**
- * Settings of individual query.
- */
-    struct TQuerySettings {
-        /// Максимальное количество потоков выполнения запроса. По-умолчанию - определять автоматически.
-        int MaxThreads = 0;
-        /// Считать минимумы и максимумы столбцов результата.
-        bool Extremes = false;
-        /// Тихо пропускать недоступные шарды.
-        bool SkipUnavailableShards = false;
-        /// Write statistics about read rows, bytes, time elapsed, etc.
-        bool OutputFormatWriteStatistics = true;
-        /// Use client timezone for interpreting DateTime string values, instead of adopting server timezone.
-        bool UseClientTimeZone = false;
-
-        // connect_timeout
-        // max_block_size
-        // distributed_group_by_no_merge = false
-        // strict_insert_defaults = 0
-        // network_compression_method = LZ4
-        // priority = 0
-    };
-
-    struct TException {
-        int Code = 0;
-        TString Name;
-        TString DisplayText;
-        TString StackTrace;
-        /// Pointer to nested exception.
-        std::unique_ptr<TException> Nested;
-    };
-
-    struct TProfile {
-        ui64 rows = 0;
-        ui64 blocks = 0;
-        ui64 bytes = 0;
-        ui64 rows_before_limit = 0;
-        bool applied_limit = false;
-        bool calculated_rows_before_limit = false;
-    };
-
-    struct TProgress {
-        ui64 rows = 0;
-        ui64 bytes = 0;
-        ui64 total_rows = 0;
-    };
-
-    class TQueryEvents {
-    public:
-        virtual ~TQueryEvents() {
-        }
-
-        /// Some data was received.
-        virtual void OnData(const TBlock& block) = 0;
-
-        virtual void OnServerException(const TException& e) = 0;
-
-        virtual void OnProfile(const TProfile& profile) = 0;
-
-        virtual void OnProgress(const TProgress& progress) = 0;
-
-        virtual void OnFinish() = 0;
-    };
-
-    using TExceptionCallback = std::function<void(const TException& e)>;
-    using TProfileCallback = std::function<void(const TProfile& profile)>;
-    using TProgressCallback = std::function<void(const TProgress& progress)>;
-    using TSelectCallback = std::function<void(const TBlock& block)>;
-
-    class TQuery: public TQueryEvents {
-    public:
-        TQuery();
-        TQuery(const char* query);
-        TQuery(const TString& query);
-        TQuery(const TString& query, const TString& query_id);
-        ~TQuery();
-
-        ///
-        inline TString GetText() const {
-            return Query_;
-        }
-
-        inline TString GetId() const {
-            return QueryId_;
-        }
-
-        /// Set handler for receiving result data.
-        inline TQuery& OnData(TSelectCallback cb) {
-            SelectCb_ = cb;
-            return *this;
-        }
-
-        /// Set handler for receiving server's exception.
-        inline TQuery& OnException(TExceptionCallback cb) {
-            ExceptionCb_ = cb;
-            return *this;
-        }
-
-        /// Set handler for receiving a profile of query execution.
-        inline TQuery& OnProfile(TProfileCallback pb) {
-            ProfileCb_ = pb;
-            return *this;
-        }
-
-        /// Set handler for receiving a progress of query exceution.
-        inline TQuery& OnProgress(TProgressCallback cb) {
-            ProgressCb_ = cb;
-            return *this;
-        }
-
-    private:
-        void OnData(const TBlock& block) override {
-            if (SelectCb_) {
-                SelectCb_(block);
-            }
-        }
-
-        void OnServerException(const TException& e) override {
-            if (ExceptionCb_) {
-                ExceptionCb_(e);
-            }
-        }
-
-        void OnProfile(const TProfile& profile) override {
-            if (ProfileCb_) {
-                ProfileCb_(profile);
-            }
-        }
-
-        void OnProgress(const TProgress& progress) override {
-            if (ProgressCb_) {
-                ProgressCb_(progress);
-            }
-        }
-
-        void OnFinish() override {
-        }
-
-    private:
-        TString Query_;
-        TString QueryId_;
-        TExceptionCallback ExceptionCb_;
-        TProfileCallback ProfileCb_;
-        TProgressCallback ProgressCb_;
-        TSelectCallback SelectCb_;
-    };
-
-}
diff --git a/library/cpp/clickhouse/client/types/type_parser.cpp b/library/cpp/clickhouse/client/types/type_parser.cpp
deleted file mode 100644
index 4fea43291b..0000000000
--- a/library/cpp/clickhouse/client/types/type_parser.cpp
+++ /dev/null
@@ -1,231 +0,0 @@
-#include "type_parser.h"
-
-#include <util/string/cast.h>
-
-namespace NClickHouse {
-    static TTypeAst::EMeta GetTypeMeta(const TStringBuf& name) {
-        if (name == "Array") {
-            return TTypeAst::Array;
-        }
-
-        if (name == "Null") {
-            return TTypeAst::Null;
-        }
-
-        if (name == "Nullable") {
-            return TTypeAst::Nullable;
-        }
-
-        if (name == "Tuple") {
-            return TTypeAst::Tuple;
-        }
-
-        if (name == "Enum8" || name == "Enum16") {
-            return TTypeAst::Enum;
-        }
-
-        return TTypeAst::Terminal;
-    }
-
-    TTypeParser::TTypeParser(const TStringBuf& name)
-        : Cur_(name.data())
-        , End_(name.data() + name.size())
-        , Type_(nullptr)
-    {
-    }
-
-    TTypeParser::~TTypeParser() = default;
-
-    bool TTypeParser::Parse(TTypeAst* type) {
-        Type_ = type;
-        OpenElements_.push(Type_);
-
-        do {
-            const TToken& TToken = NextToken();
-
-            switch (TToken.Type) {
-                case TToken::QuotedString:
-                {
-                    Type_->Meta = TTypeAst::Terminal;
-                    if (TToken.Value.length() < 1)
-                        Type_->Name = {};
-                    else
-                        Type_->Name = TToken.Value.substr(1, TToken.Value.length() - 2);
-                    //Type_->code = Type::String;
-                    break;
-                }
-                case TToken::Name:
-                    Type_->Meta = GetTypeMeta(TToken.Value);
-                    Type_->Name = TToken.Value;
-                    break;
-                case TToken::Number:
-                    Type_->Meta = TTypeAst::Number;
-                    Type_->Value = FromString<i64>(TToken.Value);
-                    break;
-                case TToken::LPar:
-                    Type_->Elements.emplace_back(TTypeAst());
-                    OpenElements_.push(Type_);
-                    Type_ = &Type_->Elements.back();
-                    break;
-                case TToken::RPar:
-                    Type_ = OpenElements_.top();
-                    OpenElements_.pop();
-                    break;
-                case TToken::Comma:
-                    Type_ = OpenElements_.top();
-                    OpenElements_.pop();
-                    Type_->Elements.emplace_back(TTypeAst());
-                    OpenElements_.push(Type_);
-                    Type_ = &Type_->Elements.back();
-                    break;
-                case TToken::EOS:
-                    return true;
-                case TToken::Invalid:
-                    return false;
-            }
-        } while (true);
-    }
-
-    TTypeParser::TToken TTypeParser::NextToken() {
-        for (; Cur_ < End_; ++Cur_) {
-            switch (*Cur_) {
-                case ' ':
-                case '\n':
-                case '\t':
-                case '\0':
-                case '=':
-                    continue;
-
-                case '(':
-                    return TToken{TToken::LPar, TStringBuf(Cur_++, 1)};
-                case ')':
-                    return TToken{TToken::RPar, TStringBuf(Cur_++, 1)};
-                case ',':
-                    return TToken{TToken::Comma, TStringBuf(Cur_++, 1)};
-                case '\'':
-                {
-                    const size_t end_quote_length = 1;
-                    const TStringBuf end_quote{Cur_, end_quote_length};
-                    // Fast forward to the closing quote.
-                    const auto start = Cur_++;
-                    for (; Cur_ < End_ - end_quote_length; ++Cur_) {
-                        // TODO (nemkov): handle escaping ?
-                        if (end_quote == TStringBuf{Cur_, end_quote_length}) {
-                            Cur_ += end_quote_length;
-
-                            return TToken{TToken::QuotedString, TStringBuf{start, Cur_}};
-                        }
-                    }
-                    return TToken{TToken::QuotedString, TStringBuf(Cur_++, 1)};
-                }
-
-                default: {
-                    const char* st = Cur_;
-
-                    if (isalpha(*Cur_) || *Cur_ == '_') {
-                        for (; Cur_ < End_; ++Cur_) {
-                            if (!isalpha(*Cur_) && !isdigit(*Cur_) && *Cur_ != '_') {
-                                break;
-                            }
-                        }
-
-                        return TToken{TToken::Name, TStringBuf(st, Cur_)};
-                    }
-
-                    if (isdigit(*Cur_) || *Cur_ == '-') {
-                        ++Cur_;
-                        for (; Cur_ < End_; ++Cur_) {
-                            if (!isdigit(*Cur_)) {
-                                break;
-                            }
-                        }
-
-                        return TToken{TToken::Number, TStringBuf(st, Cur_)};
-                    }
-
-                    return TToken{TToken::Invalid, TStringBuf()};
-                }
-            }
-        }
-
-        return TToken{TToken::EOS, TStringBuf()};
-    }
-
-    static TTypeRef CreateTypeFromAst(const TTypeAst& ast) {
-        if (ast.Meta == TTypeAst::Terminal) {
-            if (ast.Name == "UInt8")
-                return TType::CreateSimple<ui8>();
-            if (ast.Name == "UInt16")
-                return TType::CreateSimple<ui16>();
-            if (ast.Name == "UInt32")
-                return TType::CreateSimple<ui32>();
-            if (ast.Name == "UInt64")
-                return TType::CreateSimple<ui64>();
-
-            if (ast.Name == "Int8")
-                return TType::CreateSimple<i8>();
-            if (ast.Name == "Int16")
-                return TType::CreateSimple<i16>();
-            if (ast.Name == "Int32")
-                return TType::CreateSimple<i32>();
-            if (ast.Name == "Int64")
-                return TType::CreateSimple<i64>();
-
-            if (ast.Name == "Float32")
-                return TType::CreateSimple<float>();
-            if (ast.Name == "Float64")
-                return TType::CreateSimple<double>();
-
-            if (ast.Name == "String")
-                return TType::CreateString();
-            if (ast.Name == "FixedString")
-                return TType::CreateString(ast.Elements.front().Value);
-
-            if (ast.Name == "DateTime")
-                return TType::CreateDateTime();
-            if (ast.Name == "Date")
-                return TType::CreateDate();
-        } else if (ast.Meta == TTypeAst::Tuple) {
-            TVector<TTypeRef> columns;
-
-            for (const auto& elem : ast.Elements) {
-                if (auto col = CreateTypeFromAst(elem)) {
-                    columns.push_back(col);
-                } else {
-                    return nullptr;
-                }
-            }
-
-            return TType::CreateTuple(columns);
-        } else if (ast.Meta == TTypeAst::Array) {
-            return TType::CreateArray(CreateTypeFromAst(ast.Elements.front()));
-        } else if (ast.Meta == TTypeAst::Enum) {
-            TVector<TEnumItem> enum_items;
-
-            for (const auto& elem : ast.Elements) {
-                TString name(elem.Name);
-                i16 value = elem.Value;
-                enum_items.push_back({name, value});
-            }
-
-            if (ast.Name == "Enum8") {
-                return TType::CreateEnum8(enum_items);
-            } else {
-                return TType::CreateEnum16(enum_items);
-            }
-        }
-
-        return nullptr;
-    }
-
-    TTypeRef ParseTypeFromString(const TStringBuf& type_name) {
-        TTypeAst ast;
-
-        if (TTypeParser(type_name).Parse(&ast)) {
-            return CreateTypeFromAst(ast);
-        }
-
-        return TTypeRef();
-    }
-
-}
diff --git a/library/cpp/clickhouse/client/types/type_parser.h b/library/cpp/clickhouse/client/types/type_parser.h
deleted file mode 100644
index c912c4cc40..0000000000
--- a/library/cpp/clickhouse/client/types/type_parser.h
+++ /dev/null
@@ -1,68 +0,0 @@
-#pragma once
-
-#include "types.h"
-
-#include <util/generic/strbuf.h>
-#include <util/generic/list.h>
-#include <util/generic/stack.h>
-
-namespace NClickHouse {
-    struct TTypeAst {
-        enum EMeta {
-            Array,
-            Null,
-            Nullable,
-            Number,
-            Terminal,
-            Tuple,
-            Enum
-        };
-
-        /// Type's category.
-        EMeta Meta;
-        /// Type's name.
-        TStringBuf Name;
-        /// Value associated with the node, used for fixed-width types and enum values.
-        i64 Value = 0;
-        /// Subelements of the type. Used to store enum's names and values as well.
-        TList<TTypeAst> Elements;
-    };
-
-    class TTypeParser {
-        struct TToken {
-            enum EType {
-                Invalid = 0,
-                Name,
-                Number,
-                LPar,
-                RPar,
-                Comma,
-                QuotedString, // string with quotation marks included
-                EOS
-            };
-
-            EType Type;
-            TStringBuf Value;
-        };
-
-    public:
-        explicit TTypeParser(const TStringBuf& name);
-        ~TTypeParser();
-
-        bool Parse(TTypeAst* type);
-
-    private:
-        TToken NextToken();
-
-    private:
-        const char* Cur_;
-        const char* End_;
-
-        TTypeAst* Type_;
-        TStack<TTypeAst*> OpenElements_;
-    };
-
-    /// Create type instance from string representation.
-    TTypeRef ParseTypeFromString(const TStringBuf& type_name);
-
-}
diff --git a/library/cpp/clickhouse/client/types/types.cpp b/library/cpp/clickhouse/client/types/types.cpp
deleted file mode 100644
index 98d88a8f4c..0000000000
--- a/library/cpp/clickhouse/client/types/types.cpp
+++ /dev/null
@@ -1,197 +0,0 @@
-#include "types.h"
-
-#include <util/string/builder.h>
-#include <util/string/cast.h>
-#include <util/string/join.h>
-#include <util/string/printf.h>
-
-namespace NClickHouse {
-    TType::TType(const ECode code)
-        : Code_(code)
-    {
-        if (Code_ == Array) {
-            Array_ = new TArray;
-        } else if (Code_ == Tuple) {
-            Tuple_ = new TTuple;
-        } else if (Code_ == Nullable) {
-            Nullable_ = new TNullable;
-        }
-    }
-
-    TType::~TType() {
-        if (Code_ == Array) {
-            delete Array_;
-        } else if (Code_ == Tuple) {
-            delete Tuple_;
-        } else if (Code_ == Nullable) {
-            delete Nullable_;
-        }
-    }
-
-    TType::ECode TType::GetCode() const {
-        return Code_;
-    }
-
-    TTypeRef TType::GetItemType() const {
-        if (Code_ == Array) {
-            return Array_->ItemType;
-        }
-        return TTypeRef();
-    }
-
-    const TVector<TEnumItem>& TType::GetEnumItems() const {
-        return EnumItems_;
-    }
-
-    const TString& TType::GetEnumName(i16 enumValue) const {
-        return EnumValueToName_.at(enumValue);
-    }
-
-    i16 TType::GetEnumValue(const TString& enumName) const {
-        return EnumNameToValue_.at(enumName);
-    }
-
-    bool TType::HasEnumName(const TString& enumName) const {
-        return EnumNameToValue_.contains(enumName);
-    }
-
-    bool TType::HasEnumValue(i16 enumValue) const {
-        return EnumValueToName_.contains(enumValue);
-    }
-
-    TString TType::GetName() const {
-        switch (Code_) {
-            case Void:
-                return "Void";
-            case Int8:
-                return "Int8";
-            case Int16:
-                return "Int16";
-            case Int32:
-                return "Int32";
-            case Int64:
-                return "Int64";
-            case UInt8:
-                return "UInt8";
-            case UInt16:
-                return "UInt16";
-            case UInt32:
-                return "UInt32";
-            case UInt64:
-                return "UInt64";
-            case Enum8:
-            case Enum16: {
-                TVector<TString> pairs;
-                for (const auto& item : EnumItems_) {
-                    pairs.push_back(TStringBuilder() << "'" << item.Name << "' = " << item.Value);
-                }
-                TStringBuilder ret;
-                if (Code_ == Enum8) {
-                    ret << "Enum8";
-                } else {
-                    ret << "Enum16";
-                }
-                ret << "(" << JoinRange(", ", pairs.begin(), pairs.end()) << ")";
-                return ret;
-            }
-            case Float32:
-                return "Float32";
-            case Float64:
-                return "Float64";
-            case String:
-                return "String";
-            case FixedString:
-                return "FixedString(" + ToString(StringSize_) + ")";
-            case DateTime:
-                return "DateTime";
-            case Date:
-                return "Date";
-            case Array:
-                return TString("Array(") + Array_->ItemType->GetName() + ")";
-            case Nullable:
-                return TString("Nullable(") + Nullable_->NestedType->GetName() + ")";
-            case Tuple: {
-                TString result("Tuple(");
-                for (size_t i = 0; i < Tuple_->ItemTypes.size(); ++i) {
-                    result += Tuple_->ItemTypes[i]->GetName();
-
-                    if (i + 1 != Tuple_->ItemTypes.size()) {
-                        result += ", ";
-                    }
-                }
-                result += ")";
-                return result;
-            }
-        }
-
-        return TString();
-    }
-
-    bool TType::IsEqual(const TTypeRef& other) const {
-        return this->GetName() == other->GetName();
-    }
-
-    TTypeRef TType::CreateArray(TTypeRef item_type) {
-        TTypeRef type(new TType(TType::Array));
-        type->Array_->ItemType = item_type;
-        return type;
-    }
-
-    TTypeRef TType::CreateDate() {
-        return TTypeRef(new TType(TType::Date));
-    }
-
-    TTypeRef TType::CreateDateTime() {
-        return TTypeRef(new TType(TType::DateTime));
-    }
-
-    TTypeRef TType::CreateNullable(TTypeRef nested_type) {
-        TTypeRef type(new TType(TType::Nullable));
-        type->Nullable_->NestedType = nested_type;
-        return type;
-    }
-
-    TTypeRef TType::CreateString() {
-        return TTypeRef(new TType(TType::String));
-    }
-
-    TTypeRef TType::CreateString(size_t n) {
-        TTypeRef type(new TType(TType::FixedString));
-        type->StringSize_ = n;
-        return type;
-    }
-
-    TTypeRef TType::CreateTuple(const TVector<TTypeRef>& item_types) {
-        TTypeRef type(new TType(TType::Tuple));
-        type->Tuple_->ItemTypes.assign(item_types.begin(), item_types.end());
-        return type;
-    }
-
-    TTypeRef TType::CreateEnum8(const TVector<TEnumItem>& enum_items) {
-        for (const auto& item : enum_items) {
-            Y_ENSURE(item.Value >= Min<i8>() && item.Value <= Max<i8>(),
-                     Sprintf("Enum value %d for %s doesn't fit into Int8", item.Value, item.Name.data()));
-        }
-
-        TTypeRef type(new TType(TType::Enum8));
-        type->EnumItems_.assign(enum_items.begin(), enum_items.end());
-        for (const auto& item : enum_items) {
-            type->EnumNameToValue_.insert({item.Name, item.Value});
-            type->EnumValueToName_.insert({item.Value, item.Name});
-        }
-
-        return type;
-    }
-
-    TTypeRef TType::CreateEnum16(const TVector<TEnumItem>& enum_items) {
-        TTypeRef type(new TType(TType::Enum16));
-        type->EnumItems_.assign(enum_items.begin(), enum_items.end());
-        for (const auto& item : enum_items) {
-            type->EnumNameToValue_.insert({item.Name, item.Value});
-            type->EnumValueToName_.insert({item.Value, item.Name});
-        }
-
-        return type;
-    }
-
-}
diff --git a/library/cpp/clickhouse/client/types/types.h b/library/cpp/clickhouse/client/types/types.h
deleted file mode 100644
index 71bd3620aa..0000000000
--- a/library/cpp/clickhouse/client/types/types.h
+++ /dev/null
@@ -1,163 +0,0 @@
-#pragma once
-
-#include <util/generic/hash.h>
-#include <util/generic/ptr.h>
-#include <util/generic/string.h>
-#include <util/generic/vector.h>
-
-namespace NClickHouse {
-    using TTypeRef = TIntrusivePtr<class TType>;
-
-    struct TEnumItem {
-        TString Name;
-        i16 Value;
-    };
-
-    class TType: public TAtomicRefCount<TType> {
-    public:
-        enum ECode {
-            Void = 0,
-            Int8,
-            Int16,
-            Int32,
-            Int64,
-            UInt8,
-            UInt16,
-            UInt32,
-            UInt64,
-            Enum8,
-            Enum16,
-            Float32,
-            Float64,
-            String,
-            FixedString,
-            DateTime,
-            Date,
-            Array,
-            Nullable,
-            Tuple
-        };
-
-        /// Destructor
-        ~TType();
-
-        /// Type's code.
-        ECode GetCode() const;
-
-        /// Type of array's elements.
-        TTypeRef GetItemType() const;
-
-        /// Methods to work with enum types.
-        const TVector<TEnumItem>& GetEnumItems() const;
-        const TString& GetEnumName(i16 enumValue) const;
-        i16 GetEnumValue(const TString& enumName) const;
-        bool HasEnumName(const TString& enumName) const;
-        bool HasEnumValue(i16 enumValue) const;
-
-        /// String representation of the type.
-        TString GetName() const;
-
-        /// Is given type same as current one.
-        bool IsEqual(const TTypeRef& other) const;
-
-    public:
-        static TTypeRef CreateArray(TTypeRef item_type);
-
-        static TTypeRef CreateDate();
-
-        static TTypeRef CreateDateTime();
-
-        static TTypeRef CreateNullable(TTypeRef nested_type);
-
-        template <typename T>
-        static TTypeRef CreateSimple();
-
-        static TTypeRef CreateString();
-
-        static TTypeRef CreateString(size_t n);
-
-        static TTypeRef CreateTuple(const TVector<TTypeRef>& item_types);
-
-        static TTypeRef CreateEnum8(const TVector<TEnumItem>& enum_items);
-
-        static TTypeRef CreateEnum16(const TVector<TEnumItem>& enum_items);
-
-    private:
-        TType(const ECode code);
-
-        struct TArray {
-            TTypeRef ItemType;
-        };
-
-        struct TNullable {
-            TTypeRef NestedType;
-        };
-
-        struct TTuple {
-            TVector<TTypeRef> ItemTypes;
-        };
-
-        TVector<TEnumItem> EnumItems_;
-        THashMap<i16, TString> EnumValueToName_;
-        THashMap<TString, i16> EnumNameToValue_;
-
-        const ECode Code_;
-        union {
-            TArray* Array_;
-            TNullable* Nullable_;
-            TTuple* Tuple_;
-            int StringSize_;
-        };
-    };
-
-    template <>
-    inline TTypeRef TType::CreateSimple<i8>() {
-        return TTypeRef(new TType(Int8));
-    }
-
-    template <>
-    inline TTypeRef TType::CreateSimple<i16>() {
-        return TTypeRef(new TType(Int16));
-    }
-
-    template <>
-    inline TTypeRef TType::CreateSimple<i32>() {
-        return TTypeRef(new TType(Int32));
-    }
-
-    template <>
-    inline TTypeRef TType::CreateSimple<i64>() {
-        return TTypeRef(new TType(Int64));
-    }
-
-    template <>
-    inline TTypeRef TType::CreateSimple<ui8>() {
-        return TTypeRef(new TType(UInt8));
-    }
-
-    template <>
-    inline TTypeRef TType::CreateSimple<ui16>() {
-        return TTypeRef(new TType(UInt16));
-    }
-
-    template <>
-    inline TTypeRef TType::CreateSimple<ui32>() {
-        return TTypeRef(new TType(UInt32));
-    }
-
-    template <>
-    inline TTypeRef TType::CreateSimple<ui64>() {
-        return TTypeRef(new TType(UInt64));
-    }
-
-    template <>
-    inline TTypeRef TType::CreateSimple<float>() {
-        return TTypeRef(new TType(Float32));
-    }
-
-    template <>
-    inline TTypeRef TType::CreateSimple<double>() {
-        return TTypeRef(new TType(Float64));
-    }
-
-}
diff --git a/library/cpp/clickhouse/client/types/ya.make b/library/cpp/clickhouse/client/types/ya.make
deleted file mode 100644
index 1c9f7f5932..0000000000
--- a/library/cpp/clickhouse/client/types/ya.make
+++ /dev/null
@@ -1,8 +0,0 @@
-LIBRARY()
-
-SRCS(
-    type_parser.cpp
-    types.cpp
-)
-
-END()
diff --git a/library/cpp/clickhouse/client/ya.make b/library/cpp/clickhouse/client/ya.make
deleted file mode 100644
index a07ddff2bb..0000000000
--- a/library/cpp/clickhouse/client/ya.make
+++ /dev/null
@@ -1,18 +0,0 @@
-LIBRARY()
-
-SRCS(
-    block.cpp
-    client.cpp
-    query.cpp
-)
-
-PEERDIR(
-    contrib/libs/lz4
-    contrib/restricted/cityhash-1.0.2
-    library/cpp/clickhouse/client/base
-    library/cpp/clickhouse/client/columns
-    library/cpp/clickhouse/client/types
-    library/cpp/openssl/io
-)
-
-END()
-- 
cgit v1.2.3


From 29bf532922e81ca725c9b9bb5bfea7debabc0ea1 Mon Sep 17 00:00:00 2001
From: apachee <apachee@yandex-team.com>
Date: Wed, 10 Apr 2024 15:59:01 +0300
Subject: YT-21331: Fix minor issues for create queue producer

Change producer type to queue_producer and change file names accordingly
d2ca166930a70bbcb6e6588d3baafe1b38a1ab46
---
 yt/yt/client/object_client/helpers.cpp | 2 +-
 yt/yt/client/object_client/public.h    | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/yt/yt/client/object_client/helpers.cpp b/yt/yt/client/object_client/helpers.cpp
index cea2e62332..df9d62e45b 100644
--- a/yt/yt/client/object_client/helpers.cpp
+++ b/yt/yt/client/object_client/helpers.cpp
@@ -124,7 +124,7 @@ bool IsVersionedType(EObjectType type)
         type == EObjectType::SequoiaMapNode ||
         type == EObjectType::Pipeline ||
         type == EObjectType::QueueConsumer ||
-        type == EObjectType::Producer;
+        type == EObjectType::QueueProducer;
 }
 
 bool IsUserType(EObjectType type)
diff --git a/yt/yt/client/object_client/public.h b/yt/yt/client/object_client/public.h
index 8d90ef0d5e..1cfc0f6070 100644
--- a/yt/yt/client/object_client/public.h
+++ b/yt/yt/client/object_client/public.h
@@ -342,7 +342,7 @@ DEFINE_ENUM(EObjectType,
 
     // Queue stuff
     ((QueueConsumer)                               (1700))
-    ((Producer)                                    (1701))
+    ((QueueProducer)                               (1701))
 );
 
 //! A bit mask marking schema types.
-- 
cgit v1.2.3


From b60b02be71d14b134c11afcd73120c388f6a4300 Mon Sep 17 00:00:00 2001
From: hiddenpath <hiddenpath@yandex-team.com>
Date: Wed, 10 Apr 2024 16:47:22 +0300
Subject: Remove old go 1.21 293ba5bee758f97e4f202016a531f846e295f38d

---
 build/conf/go.conf                                 |   3 -
 build/external_resources/go_tools/ya.make          |   2 -
 contrib/go/_std_1.21/src/net/cgo_stub.go           |  40 ----
 .../go/_std_1.21/src/os/user/listgroups_unix.go    | 109 ----------
 contrib/go/_std_1.21/src/os/user/lookup_stubs.go   |  83 --------
 contrib/go/_std_1.21/src/os/user/lookup_unix.go    | 234 ---------------------
 6 files changed, 471 deletions(-)
 delete mode 100644 contrib/go/_std_1.21/src/net/cgo_stub.go
 delete mode 100644 contrib/go/_std_1.21/src/os/user/listgroups_unix.go
 delete mode 100644 contrib/go/_std_1.21/src/os/user/lookup_stubs.go
 delete mode 100644 contrib/go/_std_1.21/src/os/user/lookup_unix.go

diff --git a/build/conf/go.conf b/build/conf/go.conf
index e497cb7b54..b0c6e3c82e 100644
--- a/build/conf/go.conf
+++ b/build/conf/go.conf
@@ -63,9 +63,6 @@ GOSTD_VERSION=1.22
 when ($GOSTD_VERSION == "1.22") {
     GOSTD=contrib/go/_std_1.22/src
 }
-elsewhen ($GOSTD_VERSION == "1.21") {
-    GOSTD=contrib/go/_std_1.21/src
-}
 otherwise {
     GOSTD=__unsupported_go_std_library_version_[$GOSTD_VERSION]__
 }
diff --git a/build/external_resources/go_tools/ya.make b/build/external_resources/go_tools/ya.make
index fb979cd8e2..0fe77ccbe5 100644
--- a/build/external_resources/go_tools/ya.make
+++ b/build/external_resources/go_tools/ya.make
@@ -2,8 +2,6 @@ RESOURCES_LIBRARY()
 
 IF(GOSTD_VERSION == 1.22)
     DECLARE_EXTERNAL_HOST_RESOURCES_BUNDLE_BY_JSON(GO_TOOLS go1.22.json)
-ELSEIF(GOSTD_VERSION == 1.21)
-    DECLARE_EXTERNAL_HOST_RESOURCES_BUNDLE_BY_JSON(GO_TOOLS go1.21.json)
 ELSE()
     MESSAGE(FATAL_ERROR Unsupported version [${GOSTD_VERSION}] of Go Standard Library)
 ENDIF()
diff --git a/contrib/go/_std_1.21/src/net/cgo_stub.go b/contrib/go/_std_1.21/src/net/cgo_stub.go
deleted file mode 100644
index b26b11af8b..0000000000
--- a/contrib/go/_std_1.21/src/net/cgo_stub.go
+++ /dev/null
@@ -1,40 +0,0 @@
-// Copyright 2011 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// This file holds stub versions of the cgo functions called on Unix systems.
-// We build this file:
-// - if using the netgo build tag on a Unix system
-// - on a Unix system without the cgo resolver functions
-//   (Darwin always provides the cgo functions, in cgo_unix_syscall.go)
-// - on wasip1, where cgo is never available
-
-//go:build (netgo && unix) || (unix && !cgo && !darwin) || wasip1
-
-package net
-
-import "context"
-
-// cgoAvailable set to false to indicate that the cgo resolver
-// is not available on this system.
-const cgoAvailable = false
-
-func cgoLookupHost(ctx context.Context, name string) (addrs []string, err error) {
-	panic("cgo stub: cgo not available")
-}
-
-func cgoLookupPort(ctx context.Context, network, service string) (port int, err error) {
-	panic("cgo stub: cgo not available")
-}
-
-func cgoLookupIP(ctx context.Context, network, name string) (addrs []IPAddr, err error) {
-	panic("cgo stub: cgo not available")
-}
-
-func cgoLookupCNAME(ctx context.Context, name string) (cname string, err error, completed bool) {
-	panic("cgo stub: cgo not available")
-}
-
-func cgoLookupPTR(ctx context.Context, addr string) (ptrs []string, err error) {
-	panic("cgo stub: cgo not available")
-}
diff --git a/contrib/go/_std_1.21/src/os/user/listgroups_unix.go b/contrib/go/_std_1.21/src/os/user/listgroups_unix.go
deleted file mode 100644
index 67bd8a776e..0000000000
--- a/contrib/go/_std_1.21/src/os/user/listgroups_unix.go
+++ /dev/null
@@ -1,109 +0,0 @@
-// Copyright 2021 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-//go:build ((darwin || dragonfly || freebsd || (js && wasm) || wasip1 || (!android && linux) || netbsd || openbsd || solaris) && ((!cgo && !darwin) || osusergo)) || aix || illumos
-
-package user
-
-import (
-	"bufio"
-	"bytes"
-	"errors"
-	"fmt"
-	"io"
-	"os"
-	"strconv"
-)
-
-func listGroupsFromReader(u *User, r io.Reader) ([]string, error) {
-	if u.Username == "" {
-		return nil, errors.New("user: list groups: empty username")
-	}
-	primaryGid, err := strconv.Atoi(u.Gid)
-	if err != nil {
-		return nil, fmt.Errorf("user: list groups for %s: invalid gid %q", u.Username, u.Gid)
-	}
-
-	userCommas := []byte("," + u.Username + ",")  // ,john,
-	userFirst := userCommas[1:]                   // john,
-	userLast := userCommas[:len(userCommas)-1]    // ,john
-	userOnly := userCommas[1 : len(userCommas)-1] // john
-
-	// Add primary Gid first.
-	groups := []string{u.Gid}
-
-	rd := bufio.NewReader(r)
-	done := false
-	for !done {
-		line, err := rd.ReadBytes('\n')
-		if err != nil {
-			if err == io.EOF {
-				done = true
-			} else {
-				return groups, err
-			}
-		}
-
-		// Look for username in the list of users. If user is found,
-		// append the GID to the groups slice.
-
-		// There's no spec for /etc/passwd or /etc/group, but we try to follow
-		// the same rules as the glibc parser, which allows comments and blank
-		// space at the beginning of a line.
-		line = bytes.TrimSpace(line)
-		if len(line) == 0 || line[0] == '#' ||
-			// If you search for a gid in a row where the group
-			// name (the first field) starts with "+" or "-",
-			// glibc fails to find the record, and so should we.
-			line[0] == '+' || line[0] == '-' {
-			continue
-		}
-
-		// Format of /etc/group is
-		// 	groupname:password:GID:user_list
-		// for example
-		// 	wheel:x:10:john,paul,jack
-		//	tcpdump:x:72:
-		listIdx := bytes.LastIndexByte(line, ':')
-		if listIdx == -1 || listIdx == len(line)-1 {
-			// No commas, or empty group list.
-			continue
-		}
-		if bytes.Count(line[:listIdx], colon) != 2 {
-			// Incorrect number of colons.
-			continue
-		}
-		list := line[listIdx+1:]
-		// Check the list for user without splitting or copying.
-		if !(bytes.Equal(list, userOnly) || bytes.HasPrefix(list, userFirst) || bytes.HasSuffix(list, userLast) || bytes.Contains(list, userCommas)) {
-			continue
-		}
-
-		// groupname:password:GID
-		parts := bytes.Split(line[:listIdx], colon)
-		if len(parts) != 3 || len(parts[0]) == 0 {
-			continue
-		}
-		gid := string(parts[2])
-		// Make sure it's numeric and not the same as primary GID.
-		numGid, err := strconv.Atoi(gid)
-		if err != nil || numGid == primaryGid {
-			continue
-		}
-
-		groups = append(groups, gid)
-	}
-
-	return groups, nil
-}
-
-func listGroups(u *User) ([]string, error) {
-	f, err := os.Open(groupFile)
-	if err != nil {
-		return nil, err
-	}
-	defer f.Close()
-
-	return listGroupsFromReader(u, f)
-}
diff --git a/contrib/go/_std_1.21/src/os/user/lookup_stubs.go b/contrib/go/_std_1.21/src/os/user/lookup_stubs.go
deleted file mode 100644
index 89dfe455b5..0000000000
--- a/contrib/go/_std_1.21/src/os/user/lookup_stubs.go
+++ /dev/null
@@ -1,83 +0,0 @@
-// Copyright 2011 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-//go:build (!cgo && !darwin && !windows && !plan9) || android || (osusergo && !windows && !plan9)
-
-package user
-
-import (
-	"fmt"
-	"os"
-	"runtime"
-	"strconv"
-)
-
-var (
-	// unused variables (in this implementation)
-	// modified during test to exercise code paths in the cgo implementation.
-	userBuffer  = 0
-	groupBuffer = 0
-)
-
-func current() (*User, error) {
-	uid := currentUID()
-	// $USER and /etc/passwd may disagree; prefer the latter if we can get it.
-	// See issue 27524 for more information.
-	u, err := lookupUserId(uid)
-	if err == nil {
-		return u, nil
-	}
-
-	homeDir, _ := os.UserHomeDir()
-	u = &User{
-		Uid:      uid,
-		Gid:      currentGID(),
-		Username: os.Getenv("USER"),
-		Name:     "", // ignored
-		HomeDir:  homeDir,
-	}
-	// On Android, return a dummy user instead of failing.
-	switch runtime.GOOS {
-	case "android":
-		if u.Uid == "" {
-			u.Uid = "1"
-		}
-		if u.Username == "" {
-			u.Username = "android"
-		}
-	}
-	// cgo isn't available, but if we found the minimum information
-	// without it, use it:
-	if u.Uid != "" && u.Username != "" && u.HomeDir != "" {
-		return u, nil
-	}
-	var missing string
-	if u.Username == "" {
-		missing = "$USER"
-	}
-	if u.HomeDir == "" {
-		if missing != "" {
-			missing += ", "
-		}
-		missing += "$HOME"
-	}
-	return u, fmt.Errorf("user: Current requires cgo or %s set in environment", missing)
-}
-
-func currentUID() string {
-	if id := os.Getuid(); id >= 0 {
-		return strconv.Itoa(id)
-	}
-	// Note: Windows returns -1, but this file isn't used on
-	// Windows anyway, so this empty return path shouldn't be
-	// used.
-	return ""
-}
-
-func currentGID() string {
-	if id := os.Getgid(); id >= 0 {
-		return strconv.Itoa(id)
-	}
-	return ""
-}
diff --git a/contrib/go/_std_1.21/src/os/user/lookup_unix.go b/contrib/go/_std_1.21/src/os/user/lookup_unix.go
deleted file mode 100644
index a4308269e0..0000000000
--- a/contrib/go/_std_1.21/src/os/user/lookup_unix.go
+++ /dev/null
@@ -1,234 +0,0 @@
-// Copyright 2016 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-//go:build ((unix && !android) || (js && wasm) || wasip1) && ((!cgo && !darwin) || osusergo)
-
-package user
-
-import (
-	"bufio"
-	"bytes"
-	"errors"
-	"io"
-	"os"
-	"strconv"
-	"strings"
-)
-
-// lineFunc returns a value, an error, or (nil, nil) to skip the row.
-type lineFunc func(line []byte) (v any, err error)
-
-// readColonFile parses r as an /etc/group or /etc/passwd style file, running
-// fn for each row. readColonFile returns a value, an error, or (nil, nil) if
-// the end of the file is reached without a match.
-//
-// readCols is the minimum number of colon-separated fields that will be passed
-// to fn; in a long line additional fields may be silently discarded.
-func readColonFile(r io.Reader, fn lineFunc, readCols int) (v any, err error) {
-	rd := bufio.NewReader(r)
-
-	// Read the file line-by-line.
-	for {
-		var isPrefix bool
-		var wholeLine []byte
-
-		// Read the next line. We do so in chunks (as much as reader's
-		// buffer is able to keep), check if we read enough columns
-		// already on each step and store final result in wholeLine.
-		for {
-			var line []byte
-			line, isPrefix, err = rd.ReadLine()
-
-			if err != nil {
-				// We should return (nil, nil) if EOF is reached
-				// without a match.
-				if err == io.EOF {
-					err = nil
-				}
-				return nil, err
-			}
-
-			// Simple common case: line is short enough to fit in a
-			// single reader's buffer.
-			if !isPrefix && len(wholeLine) == 0 {
-				wholeLine = line
-				break
-			}
-
-			wholeLine = append(wholeLine, line...)
-
-			// Check if we read the whole line (or enough columns)
-			// already.
-			if !isPrefix || bytes.Count(wholeLine, []byte{':'}) >= readCols {
-				break
-			}
-		}
-
-		// There's no spec for /etc/passwd or /etc/group, but we try to follow
-		// the same rules as the glibc parser, which allows comments and blank
-		// space at the beginning of a line.
-		wholeLine = bytes.TrimSpace(wholeLine)
-		if len(wholeLine) == 0 || wholeLine[0] == '#' {
-			continue
-		}
-		v, err = fn(wholeLine)
-		if v != nil || err != nil {
-			return
-		}
-
-		// If necessary, skip the rest of the line
-		for ; isPrefix; _, isPrefix, err = rd.ReadLine() {
-			if err != nil {
-				// We should return (nil, nil) if EOF is reached without a match.
-				if err == io.EOF {
-					err = nil
-				}
-				return nil, err
-			}
-		}
-	}
-}
-
-func matchGroupIndexValue(value string, idx int) lineFunc {
-	var leadColon string
-	if idx > 0 {
-		leadColon = ":"
-	}
-	substr := []byte(leadColon + value + ":")
-	return func(line []byte) (v any, err error) {
-		if !bytes.Contains(line, substr) || bytes.Count(line, colon) < 3 {
-			return
-		}
-		// wheel:*:0:root
-		parts := strings.SplitN(string(line), ":", 4)
-		if len(parts) < 4 || parts[0] == "" || parts[idx] != value ||
-			// If the file contains +foo and you search for "foo", glibc
-			// returns an "invalid argument" error. Similarly, if you search
-			// for a gid for a row where the group name starts with "+" or "-",
-			// glibc fails to find the record.
-			parts[0][0] == '+' || parts[0][0] == '-' {
-			return
-		}
-		if _, err := strconv.Atoi(parts[2]); err != nil {
-			return nil, nil
-		}
-		return &Group{Name: parts[0], Gid: parts[2]}, nil
-	}
-}
-
-func findGroupId(id string, r io.Reader) (*Group, error) {
-	if v, err := readColonFile(r, matchGroupIndexValue(id, 2), 3); err != nil {
-		return nil, err
-	} else if v != nil {
-		return v.(*Group), nil
-	}
-	return nil, UnknownGroupIdError(id)
-}
-
-func findGroupName(name string, r io.Reader) (*Group, error) {
-	if v, err := readColonFile(r, matchGroupIndexValue(name, 0), 3); err != nil {
-		return nil, err
-	} else if v != nil {
-		return v.(*Group), nil
-	}
-	return nil, UnknownGroupError(name)
-}
-
-// returns a *User for a row if that row's has the given value at the
-// given index.
-func matchUserIndexValue(value string, idx int) lineFunc {
-	var leadColon string
-	if idx > 0 {
-		leadColon = ":"
-	}
-	substr := []byte(leadColon + value + ":")
-	return func(line []byte) (v any, err error) {
-		if !bytes.Contains(line, substr) || bytes.Count(line, colon) < 6 {
-			return
-		}
-		// kevin:x:1005:1006::/home/kevin:/usr/bin/zsh
-		parts := strings.SplitN(string(line), ":", 7)
-		if len(parts) < 6 || parts[idx] != value || parts[0] == "" ||
-			parts[0][0] == '+' || parts[0][0] == '-' {
-			return
-		}
-		if _, err := strconv.Atoi(parts[2]); err != nil {
-			return nil, nil
-		}
-		if _, err := strconv.Atoi(parts[3]); err != nil {
-			return nil, nil
-		}
-		u := &User{
-			Username: parts[0],
-			Uid:      parts[2],
-			Gid:      parts[3],
-			Name:     parts[4],
-			HomeDir:  parts[5],
-		}
-		// The pw_gecos field isn't quite standardized. Some docs
-		// say: "It is expected to be a comma separated list of
-		// personal data where the first item is the full name of the
-		// user."
-		u.Name, _, _ = strings.Cut(u.Name, ",")
-		return u, nil
-	}
-}
-
-func findUserId(uid string, r io.Reader) (*User, error) {
-	i, e := strconv.Atoi(uid)
-	if e != nil {
-		return nil, errors.New("user: invalid userid " + uid)
-	}
-	if v, err := readColonFile(r, matchUserIndexValue(uid, 2), 6); err != nil {
-		return nil, err
-	} else if v != nil {
-		return v.(*User), nil
-	}
-	return nil, UnknownUserIdError(i)
-}
-
-func findUsername(name string, r io.Reader) (*User, error) {
-	if v, err := readColonFile(r, matchUserIndexValue(name, 0), 6); err != nil {
-		return nil, err
-	} else if v != nil {
-		return v.(*User), nil
-	}
-	return nil, UnknownUserError(name)
-}
-
-func lookupGroup(groupname string) (*Group, error) {
-	f, err := os.Open(groupFile)
-	if err != nil {
-		return nil, err
-	}
-	defer f.Close()
-	return findGroupName(groupname, f)
-}
-
-func lookupGroupId(id string) (*Group, error) {
-	f, err := os.Open(groupFile)
-	if err != nil {
-		return nil, err
-	}
-	defer f.Close()
-	return findGroupId(id, f)
-}
-
-func lookupUser(username string) (*User, error) {
-	f, err := os.Open(userFile)
-	if err != nil {
-		return nil, err
-	}
-	defer f.Close()
-	return findUsername(username, f)
-}
-
-func lookupUserId(uid string) (*User, error) {
-	f, err := os.Open(userFile)
-	if err != nil {
-		return nil, err
-	}
-	defer f.Close()
-	return findUserId(uid, f)
-}
-- 
cgit v1.2.3


From 872940489b0b1edf944e610b7bb9254bb319ed9a Mon Sep 17 00:00:00 2001
From: spreis <spreis@yandex-team.com>
Date: Wed, 10 Apr 2024 18:29:49 +0300
Subject: =?UTF-8?q?Revert=20commit=20rXXXXXX,=20Make=20PY23=5FNATIVE=5FLIB?=
 =?UTF-8?q?RARY=20=D0=A1++=20(as=20it=20is)=201307bba11fa1bba1999752e1ae68?=
 =?UTF-8?q?566988f617e8?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 build/conf/python.conf | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/build/conf/python.conf b/build/conf/python.conf
index a6a1719565..2df0e3e47e 100644
--- a/build/conf/python.conf
+++ b/build/conf/python.conf
@@ -1037,7 +1037,7 @@ multimodule PY23_NATIVE_LIBRARY {
         .RESTRICTED=PY_SRCS USE_PYTHON2 USE_PYTHON3 PYTHON3_ADDINCL RUN_ANTLR4_PYTHON
         OBJ_SUF=.py2
         PYTHON2_ADDINCL()
-        SET(MODULE_LANG CPP)
+        SET(MODULE_LANG PY2)
     }
     module PY3: LIBRARY {
         .RESTRICTED=PY_SRCS USE_PYTHON2 USE_PYTHON3 RUN_ANTLR4_PYTHON
@@ -1045,7 +1045,7 @@ multimodule PY23_NATIVE_LIBRARY {
         .SEM=CPP_LIBRARY_SEM
         .GLOBAL_SEM=CPP_OBJ_LIBRARY_SEM
         PYTHON3_ADDINCL()
-        SET(MODULE_LANG CPP)
+        SET(MODULE_LANG PY3)
         when ($MSVC == "yes" || $CYGWIN == "yes") {
             MODULE_PREFIX=py3c
         }
-- 
cgit v1.2.3


From 4dcc12e16cc13e3e8016d717c850f9c1dbcfd916 Mon Sep 17 00:00:00 2001
From: akhropov <akhropov@yandex-team.com>
Date: Wed, 10 Apr 2024 19:35:01 +0300
Subject: Fix grammar and use more idiomatic language
 644d67c2ad0310b3c6fcab741e9d60e7f2174461

---
 build/export_generators/hardcoded-cmake/disclaimer.jinja | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/build/export_generators/hardcoded-cmake/disclaimer.jinja b/build/export_generators/hardcoded-cmake/disclaimer.jinja
index f7c762d5e5..1377e21809 100644
--- a/build/export_generators/hardcoded-cmake/disclaimer.jinja
+++ b/build/export_generators/hardcoded-cmake/disclaimer.jinja
@@ -1,10 +1,10 @@
-# This file was generated by the build system used internally in the Yandex and called "ya"
+# This file was generated by the build system used internally in Yandex and called "ya"
 # (https://github.com/yandex/yatool).
 #
-# Configuration files of ya build system usually named as ya.make. If ya.make file is presented
-# at the  root of the repository, then this repository supports ya build. 
+# Configuration files of ya build system are usually named ya.make. If ya.make file is present
+# at the root of the repository, then this repository supports ya build. 
 # 
-# If the repository supports both CMake and ya build configuration, please modify both of them.
+# If the repository supports both CMake and ya build configurations, please modify both of them.
 #
 # If only CMake build configuration is supported then modify only CMake files and note that only
 # simple modifications are allowed like adding source-files to targets or adding simple properties
-- 
cgit v1.2.3


From f75da0b4f12053d1e9f6115b785f0f20111de7de Mon Sep 17 00:00:00 2001
From: robot-ratatosk <robot-ratatosk@yandex-team.com>
Date: Wed, 10 Apr 2024 23:14:22 +0300
Subject: New version of the tld SKIP_CHECK SKIP_REVIEW
 bdeed1cefc753fe53d18db1219ca5e6b9e030933

---
 library/cpp/tld/tlds-alpha-by-domain.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/library/cpp/tld/tlds-alpha-by-domain.txt b/library/cpp/tld/tlds-alpha-by-domain.txt
index eb3b65c176..5eb9f78826 100644
--- a/library/cpp/tld/tlds-alpha-by-domain.txt
+++ b/library/cpp/tld/tlds-alpha-by-domain.txt
@@ -1,4 +1,4 @@
-# Version 2024040700, Last Updated Sun Apr  7 07:07:01 2024 UTC
+# Version 2024041000, Last Updated Wed Apr 10 07:07:02 2024 UTC
 AAA
 AARP
 ABB
-- 
cgit v1.2.3


From 8ee95ccae309141e34f6f447be95731a1b24342d Mon Sep 17 00:00:00 2001
From: don-dron <don-dron@yandex-team.com>
Date: Thu, 11 Apr 2024 00:18:40 +0300
Subject: YT-21501: Remove ChunkMemoryAllocator from TPacketDecoder
 82d49dd66617a5911d6d428a09d09aaf20f98ffb

---
 yt/yt/core/bus/tcp/client.h           |  2 ++
 yt/yt/core/bus/tcp/packet.cpp         | 38 +++++------------------------------
 yt/yt/core/bus/tcp/packet.h           |  4 +---
 yt/yt/core/bus/tcp/server.h           |  2 ++
 yt/yt/core/rpc/bus/channel.cpp        |  4 ++--
 yt/yt/core/rpc/unittests/lib/common.h |  4 ++--
 6 files changed, 14 insertions(+), 40 deletions(-)

diff --git a/yt/yt/core/bus/tcp/client.h b/yt/yt/core/bus/tcp/client.h
index 9cfbe84beb..1e916236cb 100644
--- a/yt/yt/core/bus/tcp/client.h
+++ b/yt/yt/core/bus/tcp/client.h
@@ -4,6 +4,8 @@
 
 #include "packet.h"
 
+#include <yt/yt/core/misc/memory_usage_tracker.h>
+
 namespace NYT::NBus {
 
 ////////////////////////////////////////////////////////////////////////////////
diff --git a/yt/yt/core/bus/tcp/packet.cpp b/yt/yt/core/bus/tcp/packet.cpp
index aed8a6f932..1ed6f6f6c5 100644
--- a/yt/yt/core/bus/tcp/packet.cpp
+++ b/yt/yt/core/bus/tcp/packet.cpp
@@ -6,8 +6,6 @@
 
 #include <library/cpp/yt/string/guid.h>
 
-#include <library/cpp/yt/memory/chunked_memory_allocator.h>
-
 namespace NYT::NBus {
 
 ////////////////////////////////////////////////////////////////////////////////
@@ -17,7 +15,6 @@ constexpr ui32 NullPacketPartSize = 0xffffffff;
 
 constexpr int TypicalPacketPartCount = 16;
 constexpr int TypicalVariableHeaderSize = TypicalPacketPartCount * (sizeof(ui32) + sizeof(ui64));
-constexpr i64 PacketDecoderChunkSize = 16_KB;
 
 ////////////////////////////////////////////////////////////////////////////////
 
@@ -162,18 +159,10 @@ class TPacketDecoder
 public:
     TPacketDecoder(
         const NLogging::TLogger& logger,
-        bool verifyChecksum,
-        IMemoryUsageTrackerPtr memoryUsageTracker)
+        bool verifyChecksum)
         : TPacketTranscoderBase(logger)
-        , Allocator_(
-            PacketDecoderChunkSize,
-            TChunkedMemoryAllocator::DefaultMaxSmallBlockSizeRatio,
-            GetRefCountedTypeCookie<TPacketDecoderTag>())
         , VerifyChecksum_(verifyChecksum)
-        , MemoryUsageTracker_(std::move(memoryUsageTracker))
     {
-        YT_VERIFY(MemoryUsageTracker_);
-
         Restart();
     }
 
@@ -207,7 +196,6 @@ public:
         Phase_ = EPacketPhase::FixedHeader;
         PacketSize_ = 0;
         Parts_.clear();
-        MemoryGuard_ = TMemoryUsageTrackerGuard::Acquire(MemoryUsageTracker_, 0);
         PartIndex_ = -1;
         Message_.Reset();
 
@@ -247,17 +235,12 @@ public:
 private:
     friend class TPacketTranscoderBase<TPacketDecoder>;
 
-    TChunkedMemoryAllocator Allocator_;
-
     std::vector<TSharedRef> Parts_;
-    TMemoryUsageTrackerGuard MemoryGuard_;
 
     size_t PacketSize_ = 0;
 
     const bool VerifyChecksum_;
 
-    const IMemoryUsageTrackerPtr MemoryUsageTracker_;
-
     bool EndFixedHeaderPhase()
     {
         if (FixedHeader_.Signature != PacketSignature) {
@@ -360,9 +343,7 @@ private:
             } else if (partSize == 0) {
                 Parts_.push_back(TSharedRef::MakeEmpty());
             } else {
-                auto part = Allocator_.AllocateAligned(partSize);
-                MemoryGuard_.IncrementSize(part.Size());
-
+                TSharedMutableRef part = TSharedMutableRef::Allocate(partSize);
                 BeginPhase(EPacketPhase::MessagePart, part.Begin(), part.Size());
                 Parts_.push_back(std::move(part));
                 break;
@@ -510,17 +491,11 @@ class TPacketTranscoderFactory
     : public IPacketTranscoderFactory
 {
 public:
-    TPacketTranscoderFactory(IMemoryUsageTrackerPtr memoryUsageTracker)
-        : MemoryUsageTracker_(std::move(memoryUsageTracker))
-    {
-        YT_VERIFY(MemoryUsageTracker_);
-    }
-
     std::unique_ptr<IPacketDecoder> CreateDecoder(
         const NLogging::TLogger& logger,
         bool verifyChecksum) const override
     {
-        return std::make_unique<TPacketDecoder>(logger, verifyChecksum, MemoryUsageTracker_);
+        return std::make_unique<TPacketDecoder>(logger, verifyChecksum);
     }
 
     std::unique_ptr<IPacketEncoder> CreateEncoder(
@@ -528,16 +503,13 @@ public:
     {
         return std::make_unique<TPacketEncoder>(logger);
     }
-
-private:
-    const IMemoryUsageTrackerPtr MemoryUsageTracker_;
 };
 
 ////////////////////////////////////////////////////////////////////////////////
 
-IPacketTranscoderFactory* GetYTPacketTranscoderFactory(IMemoryUsageTrackerPtr memoryUsageTracker)
+IPacketTranscoderFactory* GetYTPacketTranscoderFactory()
 {
-    return LeakySingleton<TPacketTranscoderFactory>(std::move(memoryUsageTracker));
+    return LeakySingleton<TPacketTranscoderFactory>();
 }
 
 ////////////////////////////////////////////////////////////////////////////////
diff --git a/yt/yt/core/bus/tcp/packet.h b/yt/yt/core/bus/tcp/packet.h
index 2e2a729ee1..05e4693128 100644
--- a/yt/yt/core/bus/tcp/packet.h
+++ b/yt/yt/core/bus/tcp/packet.h
@@ -2,8 +2,6 @@
 
 #include "private.h"
 
-#include <yt/yt/core/misc/memory_usage_tracker.h>
-
 namespace NYT::NBus {
 
 ////////////////////////////////////////////////////////////////////////////////
@@ -78,7 +76,7 @@ struct IPacketTranscoderFactory
 
 ////////////////////////////////////////////////////////////////////////////////
 
-IPacketTranscoderFactory* GetYTPacketTranscoderFactory(IMemoryUsageTrackerPtr memoryUsageTracker = GetNullMemoryUsageTracker());
+IPacketTranscoderFactory* GetYTPacketTranscoderFactory();
 
 ////////////////////////////////////////////////////////////////////////////////
 
diff --git a/yt/yt/core/bus/tcp/server.h b/yt/yt/core/bus/tcp/server.h
index 57b3a0cde9..b7de29a8a3 100644
--- a/yt/yt/core/bus/tcp/server.h
+++ b/yt/yt/core/bus/tcp/server.h
@@ -4,6 +4,8 @@
 
 #include "packet.h"
 
+#include <yt/yt/core/misc/memory_usage_tracker.h>
+
 namespace NYT::NBus {
 
 ////////////////////////////////////////////////////////////////////////////////
diff --git a/yt/yt/core/rpc/bus/channel.cpp b/yt/yt/core/rpc/bus/channel.cpp
index a43b5c8f3e..b085986df7 100644
--- a/yt/yt/core/rpc/bus/channel.cpp
+++ b/yt/yt/core/rpc/bus/channel.cpp
@@ -1261,7 +1261,7 @@ public:
         config->Load(Config_, /*postprocess*/ true, /*setDefaults*/ false);
         auto client = CreateBusClient(
             std::move(config),
-            GetYTPacketTranscoderFactory(MemoryUsageTracker_),
+            GetYTPacketTranscoderFactory(),
             MemoryUsageTracker_);
         return CreateBusChannel(std::move(client));
     }
@@ -1301,7 +1301,7 @@ public:
         config->Load(Config_, /*postprocess*/ true, /*setDefaults*/ false);
         auto client = CreateBusClient(
             std::move(config),
-            GetYTPacketTranscoderFactory(MemoryUsageTracker_),
+            GetYTPacketTranscoderFactory(),
             MemoryUsageTracker_);
         return CreateBusChannel(std::move(client));
     }
diff --git a/yt/yt/core/rpc/unittests/lib/common.h b/yt/yt/core/rpc/unittests/lib/common.h
index ccb272df66..71fd251a80 100644
--- a/yt/yt/core/rpc/unittests/lib/common.h
+++ b/yt/yt/core/rpc/unittests/lib/common.h
@@ -265,7 +265,7 @@ public:
         auto busConfig = NYT::NBus::TBusServerConfig::CreateTcp(port);
         return CreateBusServer(
             busConfig,
-            NYT::NBus::GetYTPacketTranscoderFactory(memoryUsageTracker),
+            NYT::NBus::GetYTPacketTranscoderFactory(),
             memoryUsageTracker);
     }
 };
@@ -486,7 +486,7 @@ public:
         auto busConfig = NYT::NBus::TBusServerConfig::CreateUds(SocketPath_);
         return CreateBusServer(
             busConfig,
-            NYT::NBus::GetYTPacketTranscoderFactory(memoryUsageTracker),
+            NYT::NBus::GetYTPacketTranscoderFactory(),
             memoryUsageTracker);
     }
 
-- 
cgit v1.2.3


From ca7c60d70c549b4464557560f4d6761a3cb1aefe Mon Sep 17 00:00:00 2001
From: arkady-e1ppa <arkady-e1ppa@yandex-team.com>
Date: Thu, 11 Apr 2024 00:30:43 +0300
Subject: YT-21517: Fix local variables leak if coro is abandoned
 37387257cd070822da8998d67eda34c29a129167

---
 yt/yt/core/concurrency/coroutine-inl.h | 20 ++++++++++++++------
 yt/yt/core/concurrency/coroutine.cpp   | 19 ++++++++++++++-----
 yt/yt/core/concurrency/coroutine.h     | 15 +++++++++++++--
 3 files changed, 41 insertions(+), 13 deletions(-)

diff --git a/yt/yt/core/concurrency/coroutine-inl.h b/yt/yt/core/concurrency/coroutine-inl.h
index f9f28eab55..1a849112e1 100644
--- a/yt/yt/core/concurrency/coroutine-inl.h
+++ b/yt/yt/core/concurrency/coroutine-inl.h
@@ -38,21 +38,29 @@ void TCoroutineBase::TTrampoLine<TBody>::DoRun()
 {
     // Move/Copy stuff on stack frame.
     auto* owner = Owner_;
+    bool abandoned = false;
 
     {
         auto body = std::move(*Body_);
 
-        owner->Suspend();
+        try {
+            owner->Suspend();
+        } catch (TCoroutineAbandonedException) {
+            abandoned = true;
+        }
 
         // Actual execution.
-        try {
-            body();
-        } catch (...) {
-            owner->CoroutineException_ = std::current_exception();
+        if (!abandoned) {
+            try {
+                body();
+            } catch (TCoroutineAbandonedException) {
+            } catch (...) {
+                owner->CoroutineException_ = std::current_exception();
+            }
         }
     }
 
-    owner->Completed_ = true;
+    owner->State_ = ECoroState::Completed;
     owner->Suspend();
 
     YT_ABORT();
diff --git a/yt/yt/core/concurrency/coroutine.cpp b/yt/yt/core/concurrency/coroutine.cpp
index af80580c9e..6dc08abf5d 100644
--- a/yt/yt/core/concurrency/coroutine.cpp
+++ b/yt/yt/core/concurrency/coroutine.cpp
@@ -6,17 +6,26 @@ namespace NYT::NConcurrency::NDetail {
 
 TCoroutineBase::~TCoroutineBase()
 {
-    std::destroy_at(&CoroutineContext);
+    if (State_ == ECoroState::Running) {
+        State_ = ECoroState::Abandoned;
+        Resume();
+    }
+
+    std::destroy_at(std::launder(&CoroutineContext));
 }
 
-void TCoroutineBase::Suspend() noexcept
+void TCoroutineBase::Suspend()
 {
-    CoroutineContext.SwitchTo(&CallerContext_);
+    std::launder(&CoroutineContext)->SwitchTo(&CallerContext_);
+
+    if (State_ == ECoroState::Abandoned) {
+        throw TCoroutineAbandonedException{};
+    }
 }
 
 void TCoroutineBase::Resume()
 {
-    CallerContext_.SwitchTo(&CoroutineContext);
+    CallerContext_.SwitchTo(std::launder(&CoroutineContext));
 
     if (CoroutineException_) {
         std::exception_ptr exception;
@@ -27,7 +36,7 @@ void TCoroutineBase::Resume()
 
 bool TCoroutineBase::IsCompleted() const noexcept
 {
-    return Completed_;
+    return State_ == ECoroState::Completed;
 }
 
 ////////////////////////////////////////////////////////////////////////////////
diff --git a/yt/yt/core/concurrency/coroutine.h b/yt/yt/core/concurrency/coroutine.h
index ba1ac139ac..275870456b 100644
--- a/yt/yt/core/concurrency/coroutine.h
+++ b/yt/yt/core/concurrency/coroutine.h
@@ -20,6 +20,14 @@ namespace NYT::NConcurrency {
 
 namespace NDetail {
 
+DEFINE_ENUM(ECoroState,
+    ((Running)               (0))
+    ((Abandoned)             (1))
+    ((Completed)             (2))
+);
+
+////////////////////////////////////////////////////////////////////////////////
+
 class TCoroutineBase
 {
 public:
@@ -35,7 +43,7 @@ protected:
     explicit TCoroutineBase(TBody body, EExecutionStackKind stackKind);
 
     void Resume();
-    void Suspend() noexcept;
+    void Suspend();
 
 private:
     std::shared_ptr<TExecutionStack> CoroutineStack_;
@@ -48,8 +56,11 @@ private:
         TExceptionSafeContext CoroutineContext;
     };
 
+    ECoroState State_ = ECoroState::Running;
+    struct TCoroutineAbandonedException
+    { };
+
     std::exception_ptr CoroutineException_;
-    bool Completed_ = false;
 
     // NB(arkady-e1ppa): We make a "proxy-trampoline"
     // which DoRun consist of two parts:
-- 
cgit v1.2.3


From f23341d903ec562ebc7da4b59f59fe5c06a8522c Mon Sep 17 00:00:00 2001
From: robot-piglet <robot-piglet@yandex-team.com>
Date: Thu, 11 Apr 2024 07:47:47 +0300
Subject: Intermediate changes

---
 .../python/requests-mock/py3/.dist-info/METADATA   | 22 ++--------
 contrib/python/requests-mock/py3/AUTHORS           | 50 ----------------------
 .../requests-mock/py3/requests_mock/adapter.py     | 20 ++++-----
 .../requests-mock/py3/requests_mock/adapter.pyi    |  2 +-
 .../requests-mock/py3/requests_mock/compat.py      | 30 -------------
 .../requests-mock/py3/requests_mock/mocker.py      |  6 +--
 .../requests-mock/py3/requests_mock/mocker.pyi     | 29 +++++++------
 .../requests-mock/py3/requests_mock/request.py     | 10 ++---
 .../requests-mock/py3/requests_mock/response.py    | 35 +++++++--------
 .../requests-mock/py3/requests_mock/response.pyi   |  6 +--
 contrib/python/requests-mock/py3/ya.make           |  4 +-
 yt/yt/library/process/process.cpp                  | 14 ++++++
 yt/yt/library/process/process.h                    |  1 +
 13 files changed, 75 insertions(+), 154 deletions(-)
 delete mode 100644 contrib/python/requests-mock/py3/AUTHORS
 delete mode 100644 contrib/python/requests-mock/py3/requests_mock/compat.py

diff --git a/contrib/python/requests-mock/py3/.dist-info/METADATA b/contrib/python/requests-mock/py3/.dist-info/METADATA
index d8eadeaec2..6ce8ea41a6 100644
--- a/contrib/python/requests-mock/py3/.dist-info/METADATA
+++ b/contrib/python/requests-mock/py3/.dist-info/METADATA
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: requests-mock
-Version: 1.11.0
+Version: 1.12.0
 Summary: Mock out responses from the requests package
 Home-page: https://requests-mock.readthedocs.io/
 Author: Jamie Lennox
@@ -13,32 +13,19 @@ Classifier: Intended Audience :: Information Technology
 Classifier: License :: OSI Approved :: Apache Software License
 Classifier: Operating System :: OS Independent
 Classifier: Programming Language :: Python
-Classifier: Programming Language :: Python :: 2
-Classifier: Programming Language :: Python :: 2.7
 Classifier: Programming Language :: Python :: 3
-Classifier: Programming Language :: Python :: 3.4
-Classifier: Programming Language :: Python :: 3.5
-Classifier: Programming Language :: Python :: 3.6
-Classifier: Programming Language :: Python :: 3.7
 Classifier: Programming Language :: Python :: 3.8
 Classifier: Programming Language :: Python :: 3.9
 Classifier: Programming Language :: Python :: 3.10
+Classifier: Programming Language :: Python :: 3.11
+Classifier: Programming Language :: Python :: 3.12
 Classifier: Programming Language :: Python :: Implementation :: CPython
 Classifier: Programming Language :: Python :: Implementation :: PyPy
 Classifier: Topic :: Software Development :: Testing
 License-File: LICENSE
-Requires-Dist: requests (<3,>=2.3)
-Requires-Dist: six
+Requires-Dist: requests <3,>=2.22
 Provides-Extra: fixture
 Requires-Dist: fixtures ; extra == 'fixture'
-Provides-Extra: test
-Requires-Dist: fixtures ; extra == 'test'
-Requires-Dist: purl ; extra == 'test'
-Requires-Dist: pytest ; extra == 'test'
-Requires-Dist: sphinx ; extra == 'test'
-Requires-Dist: testtools ; extra == 'test'
-Requires-Dist: requests-futures ; extra == 'test'
-Requires-Dist: mock ; (( python_version < '3.3')) and extra == 'test'
 
 ===============================
 requests-mock
@@ -141,4 +128,3 @@ under the License.
 .. _docs: https://requests-mock.readthedocs.io/
 .. _GitHub: https://github.com/jamielennox/requests-mock
 .. _StackOverflow: https://stackoverflow.com/questions/tagged/requests-mock
-
diff --git a/contrib/python/requests-mock/py3/AUTHORS b/contrib/python/requests-mock/py3/AUTHORS
deleted file mode 100644
index ae2e02a612..0000000000
--- a/contrib/python/requests-mock/py3/AUTHORS
+++ /dev/null
@@ -1,50 +0,0 @@
-Adam Johnson <me@adamj.eu>
-Alex Peters <alex@peters.net>
-Allan Lewis <allanlewis99@gmail.com>
-Andreas Jaeger <aj@suse.com>
-Andrii Oriekhov <andriyorehov@gmail.com>
-Arjan Keeman <arjan.keeman@falckon.nl>
-Axel H <noirbizarre@users.noreply.github.com>
-Christian Clauss <cclauss@me.com>
-Colas Le Guernic <clslgrnc@users.noreply.github.com>
-Cyrille Corpet <cyrille@bayesimpact.org>
-Darragh Bailey <dbailey@hpe.com>
-David Kremer <courrier@david-kremer.fr>
-Ian Cordasco <ian.cordasco@rackspace.com>
-Ilya Konstantinov <ilya.konstantinov@gmail.com>
-Jamie Lennox <jamie.lennox@agoda.com>
-Jamie Lennox <jamie@vibrato.com.au>
-Jamie Lennox <jamielennox@gmail.com>
-Jamie Lennox <jamielennox@redhat.com>
-Janne Pulkkinen <janne.pulkkinen@protonmail.com>
-Janonymous <janonymous.codevulture@gmail.com>
-Jelle van der Waa <jelle@archlinux.org>
-Jeremy Stanley <fungi@yuggoth.org>
-Jochen Kupperschmidt <homework@nwsnet.de>
-Joel Andrews <oldsneerjaw@gmail.com>
-Jon Dufresne <jon.dufresne@gmail.com>
-Kenny Nguyen <kkenny.nguyen@pm.me>
-Louis Taylor <louis@kragniz.eu>
-Manuel Kaufmann <humitos@gmail.com>
-Matthias Bilger <matthias@bilger.info>
-Michał Górny <mgorny@gentoo.org>
-Miroslav Šedivý <6774676+eumiro@users.noreply.github.com>
-Monty Taylor <mordred@inaugust.com>
-Noam <noamkush@gmail.com>
-Pascal Corpet <pascal@bayesimpact.org>
-Peter Hodge <peter.hodge84@gmail.com>
-Petre Mierlutiu <petrem@users.noreply.github.com>
-Rick van de Loo <rickvandeloo@gmail.com>
-Ryan Brooke Payne <ryan.payne@daveramsey.com>
-Sebastian Kalinowski <sebastian@kalinowski.eu>
-Simon Willison <swillison@gmail.com>
-Stefaan Lippens <stefaan.lippens@vito.be>
-Swapnil Kulkarni (coolsvap) <me@coolsvap.net>
-Ville Skyttä <ville.skytta@iki.fi>
-boncheff <boncheff@users.noreply.github.com>
-clslgrnc <clslgrnc@users.noreply.github.com>
-dongfangtianyu <7629022+dongfangtianyu@users.noreply.github.com>
-popokatapepel <jan-seins@hotmail.de>
-reedip <reedip.banerjee@nectechnologies.in>
-rfportilla <rfportilla@yahoo.com>
-voith <voithjm1@gmail.com>
diff --git a/contrib/python/requests-mock/py3/requests_mock/adapter.py b/contrib/python/requests-mock/py3/requests_mock/adapter.py
index e0560b2226..b6f00529ee 100644
--- a/contrib/python/requests-mock/py3/requests_mock/adapter.py
+++ b/contrib/python/requests-mock/py3/requests_mock/adapter.py
@@ -10,12 +10,11 @@
 # License for the specific language governing permissions and limitations
 # under the License.
 
+import urllib.parse
 import weakref
 
 from requests.adapters import BaseAdapter
 from requests.utils import requote_uri
-import six
-from six.moves.urllib import parse as urlparse
 
 from requests_mock import exceptions
 from requests_mock.request import _RequestObjectProxy
@@ -99,8 +98,8 @@ class _Matcher(_RequestHistoryTracker):
         self._additional_matcher = additional_matcher
 
         # url can be a regex object or ANY so don't always run urlparse
-        if isinstance(url, six.string_types):
-            url_parts = urlparse.urlparse(url)
+        if isinstance(url, str):
+            url_parts = urllib.parse.urlparse(url)
             self._scheme = url_parts.scheme.lower()
             self._netloc = url_parts.netloc.lower()
             self._path = requote_uri(url_parts.path or '/')
@@ -155,10 +154,11 @@ class _Matcher(_RequestHistoryTracker):
             return False
 
         # construct our own qs structure as we remove items from it below
-        request_qs = urlparse.parse_qs(request.query, keep_blank_values=True)
-        matcher_qs = urlparse.parse_qs(self._query, keep_blank_values=True)
+        request_qs = urllib.parse.parse_qs(request.query,
+                                           keep_blank_values=True)
+        matcher_qs = urllib.parse.parse_qs(self._query, keep_blank_values=True)
 
-        for k, vals in six.iteritems(matcher_qs):
+        for k, vals in matcher_qs.items():
             for v in vals:
                 try:
                     request_qs.get(k, []).remove(v)
@@ -166,14 +166,14 @@ class _Matcher(_RequestHistoryTracker):
                     return False
 
         if self._complete_qs:
-            for v in six.itervalues(request_qs):
+            for v in request_qs.values():
                 if v:
                     return False
 
         return True
 
     def _match_headers(self, request):
-        for k, vals in six.iteritems(self._request_headers):
+        for k, vals in self._request_headers.items():
 
             try:
                 header = request.headers[k]
@@ -182,7 +182,7 @@ class _Matcher(_RequestHistoryTracker):
                 # difference, in 2 they are just whatever the user inputted in
                 # 1 they are bytes. Let's optionally handle both and look at
                 # removing this when we depend on requests 2.
-                if not isinstance(k, six.text_type):
+                if not isinstance(k, str):
                     return False
 
                 try:
diff --git a/contrib/python/requests-mock/py3/requests_mock/adapter.pyi b/contrib/python/requests-mock/py3/requests_mock/adapter.pyi
index dbeba496ba..b793a928fc 100644
--- a/contrib/python/requests-mock/py3/requests_mock/adapter.pyi
+++ b/contrib/python/requests-mock/py3/requests_mock/adapter.pyi
@@ -66,7 +66,7 @@ class Adapter(BaseAdapter, _RequestHistoryTracker):
         text: Union[str, Callback[str]] = ...,
         content: Union[bytes, Callback[bytes]] = ...,
         body: Union[IOBase, Callback[IOBase]] = ...,
-        raw: HTTPResponse = ...,
+        raw: Union[HTTPResponse, Callback[HTTPResponse]] = ...,
         exc: Union[Exception, Type[Exception]] = ...,
         additional_matcher: AdditionalMatcher = ...,
         **kwargs: Any
diff --git a/contrib/python/requests-mock/py3/requests_mock/compat.py b/contrib/python/requests-mock/py3/requests_mock/compat.py
deleted file mode 100644
index 8b6293af15..0000000000
--- a/contrib/python/requests-mock/py3/requests_mock/compat.py
+++ /dev/null
@@ -1,30 +0,0 @@
-# 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
-#
-#      https://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.
-
-
-class _FakeHTTPMessage(object):
-
-    def __init__(self, headers):
-        self.headers = headers
-
-    def getheaders(self, name):
-        try:
-            return [self.headers[name]]
-        except KeyError:
-            return []
-
-    def get_all(self, name, failobj=None):
-        # python 3 only, overrides email.message.Message.get_all
-        try:
-            return [self.headers[name]]
-        except KeyError:
-            return failobj
diff --git a/contrib/python/requests-mock/py3/requests_mock/mocker.py b/contrib/python/requests-mock/py3/requests_mock/mocker.py
index d3bc85538e..3a7be37880 100644
--- a/contrib/python/requests-mock/py3/requests_mock/mocker.py
+++ b/contrib/python/requests-mock/py3/requests_mock/mocker.py
@@ -17,7 +17,6 @@ import threading
 import types
 
 import requests
-import six
 
 from requests_mock import adapter
 from requests_mock import exceptions
@@ -60,8 +59,9 @@ def _is_bound_method(method):
     bound_method 's self is a obj
     unbound_method 's self is None
     """
-    if isinstance(method, types.MethodType) and six.get_method_self(method):
+    if isinstance(method, types.MethodType) and hasattr(method, '__self__'):
         return True
+
     return False
 
 
@@ -74,7 +74,7 @@ def _set_method(target, name, method):
     If method is a bound_method, can direct setattr
     """
     if not isinstance(target, type) and not _is_bound_method(method):
-        method = six.create_bound_method(method, target)
+        method = types.MethodType(method, target)
 
     setattr(target, name, method)
 
diff --git a/contrib/python/requests-mock/py3/requests_mock/mocker.pyi b/contrib/python/requests-mock/py3/requests_mock/mocker.pyi
index 891e7d6c9a..e2008446ef 100644
--- a/contrib/python/requests-mock/py3/requests_mock/mocker.pyi
+++ b/contrib/python/requests-mock/py3/requests_mock/mocker.pyi
@@ -3,7 +3,7 @@
 from json import JSONEncoder
 from http.cookiejar import CookieJar
 from io import IOBase
-from typing import Any, Callable, Dict, List, Optional, Pattern, Type, TypeVar, Union
+from typing import Any, Callable, Dict, List, Optional, Pattern, Type, TypeVar, Union, overload
 
 from requests import Response, Session
 from urllib3.response import HTTPResponse
@@ -54,7 +54,7 @@ class MockerCore:
       text: Union[str, Callback[str]] = ...,
       content: Union[bytes, Callback[bytes]] = ...,
       body: Union[IOBase, Callback[IOBase]] = ...,
-      raw: HTTPResponse = ...,
+      raw: Union[HTTPResponse, Callback[HTTPResponse]] = ...,
       exc: Union[Exception, Type[Exception]] = ...,
       additional_matcher: AdditionalMatcher = ...,
       json_encoder: Optional[Type[JSONEncoder]] = ...,
@@ -77,7 +77,7 @@ class MockerCore:
       text: Union[str, Callback[str]] = ...,
       content: Union[bytes, Callback[bytes]] = ...,
       body: Union[IOBase, Callback[IOBase]] = ...,
-      raw: HTTPResponse = ...,
+      raw: Union[HTTPResponse, Callback[HTTPResponse]] = ...,
       exc: Union[Exception, Type[Exception]] = ...,
       additional_matcher: AdditionalMatcher = ...,
       json_encoder: Optional[Type[JSONEncoder]] = ...,
@@ -99,7 +99,7 @@ class MockerCore:
       text: Union[str, Callback[str]] = ...,
       content: Union[bytes, Callback[bytes]] = ...,
       body: Union[IOBase, Callback[IOBase]] = ...,
-      raw: HTTPResponse = ...,
+      raw: Union[HTTPResponse, Callback[HTTPResponse]] = ...,
       exc: Union[Exception, Type[Exception]] = ...,
       additional_matcher: AdditionalMatcher = ...,
       json_encoder: Optional[Type[JSONEncoder]] = ...,
@@ -121,7 +121,7 @@ class MockerCore:
       text: Union[str, Callback[str]] = ...,
       content: Union[bytes, Callback[bytes]] = ...,
       body: Union[IOBase, Callback[IOBase]] = ...,
-      raw: HTTPResponse = ...,
+      raw: Union[HTTPResponse, Callback[HTTPResponse]] = ...,
       exc: Union[Exception, Type[Exception]] = ...,
       additional_matcher: AdditionalMatcher = ...,
       json_encoder: Optional[Type[JSONEncoder]] = ...,
@@ -143,7 +143,7 @@ class MockerCore:
       text: Union[str, Callback[str]] = ...,
       content: Union[bytes, Callback[bytes]] = ...,
       body: Union[IOBase, Callback[IOBase]] = ...,
-      raw: HTTPResponse = ...,
+      raw: Union[HTTPResponse, Callback[HTTPResponse]] = ...,
       exc: Union[Exception, Type[Exception]] = ...,
       additional_matcher: AdditionalMatcher = ...,
       json_encoder: Optional[Type[JSONEncoder]] = ...,
@@ -165,7 +165,7 @@ class MockerCore:
       text: Union[str, Callback[str]] = ...,
       content: Union[bytes, Callback[bytes]] = ...,
       body: Union[IOBase, Callback[IOBase]] = ...,
-      raw: HTTPResponse = ...,
+      raw: Union[HTTPResponse, Callback[HTTPResponse]] = ...,
       exc: Union[Exception, Type[Exception]] = ...,
       additional_matcher: AdditionalMatcher = ...,
       json_encoder: Optional[Type[JSONEncoder]] = ...,
@@ -187,7 +187,7 @@ class MockerCore:
       text: Union[str, Callback[str]] = ...,
       content: Union[bytes, Callback[bytes]] = ...,
       body: Union[IOBase, Callback[IOBase]] = ...,
-      raw: HTTPResponse = ...,
+      raw: Union[HTTPResponse, Callback[HTTPResponse]] = ...,
       exc: Union[Exception, Type[Exception]] = ...,
       additional_matcher: AdditionalMatcher = ...,
       json_encoder: Optional[Type[JSONEncoder]] = ...,
@@ -209,7 +209,7 @@ class MockerCore:
       text: Union[str, Callback[str]] = ...,
       content: Union[bytes, Callback[bytes]] = ...,
       body: Union[IOBase, Callback[IOBase]] = ...,
-      raw: HTTPResponse = ...,
+      raw: Union[HTTPResponse, Callback[HTTPResponse]] = ...,
       exc: Union[Exception, Type[Exception]] = ...,
       additional_matcher: AdditionalMatcher = ...,
       json_encoder: Optional[Type[JSONEncoder]] = ...,
@@ -231,7 +231,7 @@ class MockerCore:
       text: Union[str, Callback[str]] = ...,
       content: Union[bytes, Callback[bytes]] = ...,
       body: Union[IOBase, Callback[IOBase]] = ...,
-      raw: HTTPResponse = ...,
+      raw: Union[HTTPResponse, Callback[HTTPResponse]] = ...,
       exc: Union[Exception, Type[Exception]] = ...,
       additional_matcher: AdditionalMatcher = ...,
       json_encoder: Optional[Type[JSONEncoder]] = ...,
@@ -239,6 +239,7 @@ class MockerCore:
     ) -> _Matcher: ...
 
 _T = TypeVar('_T')
+_CallableT = TypeVar("_CallableT", bound=Callable)
 
 class Mocker(MockerCore):
     TEST_PREFIX: str = ...
@@ -246,6 +247,7 @@ class Mocker(MockerCore):
 
     def __init__(
       self,
+      *,
       kw: str = ...,
       case_sensitive: bool = ...,
       adapter: Any = ...,
@@ -255,9 +257,12 @@ class Mocker(MockerCore):
     ) -> None: ...
     def __enter__(self) -> Any: ...
     def __exit__(self, type: Any, value: Any, traceback: Any) -> None: ...
-    def __call__(self, obj: Any) -> Any: ...
+    @overload
+    def __call__(self, obj: type[_T]) -> type[_T]: ...
+    @overload
+    def __call__(self, obj: _CallableT) -> _CallableT: ...
     def copy(self) -> Mocker: ...
-    def decorate_callable(self, func: Callable[..., _T]) -> Callable[..., _T]: ...
+    def decorate_callable(self, func: _CallableT) -> _CallableT: ...
     def decorate_class(self, klass: Type[_T]) -> Type[_T]: ...
 
 mock = Mocker
diff --git a/contrib/python/requests-mock/py3/requests_mock/request.py b/contrib/python/requests-mock/py3/requests_mock/request.py
index 05cbc3d4a3..8f7a367f95 100644
--- a/contrib/python/requests-mock/py3/requests_mock/request.py
+++ b/contrib/python/requests-mock/py3/requests_mock/request.py
@@ -12,10 +12,9 @@
 
 import copy
 import json
+import urllib.parse
 
 import requests
-import six
-from six.moves.urllib import parse as urlparse
 
 
 class _RequestObjectProxy(object):
@@ -61,7 +60,7 @@ class _RequestObjectProxy(object):
             if not self._case_sensitive:
                 url = url.lower()
 
-            self._url_parts_ = urlparse.urlparse(url)
+            self._url_parts_ = urllib.parse.urlparse(url)
 
         return self._url_parts_
 
@@ -110,7 +109,8 @@ class _RequestObjectProxy(object):
     @property
     def qs(self):
         if self._qs is None:
-            self._qs = urlparse.parse_qs(self.query, keep_blank_values=True)
+            self._qs = urllib.parse.parse_qs(self.query,
+                                             keep_blank_values=True)
 
         return self._qs
 
@@ -146,7 +146,7 @@ class _RequestObjectProxy(object):
     def text(self):
         body = self.body
 
-        if isinstance(body, six.binary_type):
+        if isinstance(body, bytes):
             body = body.decode('utf-8')
 
         return body
diff --git a/contrib/python/requests-mock/py3/requests_mock/response.py b/contrib/python/requests-mock/py3/requests_mock/response.py
index 5855539273..92032623bc 100644
--- a/contrib/python/requests-mock/py3/requests_mock/response.py
+++ b/contrib/python/requests-mock/py3/requests_mock/response.py
@@ -10,17 +10,17 @@
 # License for the specific language governing permissions and limitations
 # under the License.
 
+import io
+import http.client
 import json as jsonutils
 
 from requests.adapters import HTTPAdapter
 from requests.cookies import MockRequest, MockResponse
 from requests.cookies import RequestsCookieJar
 from requests.cookies import merge_cookies, cookiejar_from_dict
-from requests.packages.urllib3.response import HTTPResponse
 from requests.utils import get_encoding_from_headers
-import six
+from urllib3.response import HTTPResponse
 
-from requests_mock import compat
 from requests_mock import exceptions
 
 _BODY_ARGS = frozenset(['raw', 'body', 'content', 'text', 'json'])
@@ -100,8 +100,7 @@ def _extract_cookies(request, response, cookies):
     """
     # This will add cookies set manually via the Set-Cookie or Set-Cookie2
     # header but this only allows 1 cookie to be set.
-    http_message = compat._FakeHTTPMessage(response.headers)
-    response.cookies.extract_cookies(MockResponse(http_message),
+    response.cookies.extract_cookies(MockResponse(response.raw.headers),
                                      MockRequest(request))
 
     # This allows you to pass either a CookieJar or a dictionary to request_uri
@@ -110,7 +109,7 @@ def _extract_cookies(request, response, cookies):
         merge_cookies(response.cookies, cookies)
 
 
-class _IOReader(six.BytesIO):
+class _IOReader(io.BytesIO):
     """A reader that makes a BytesIO look like a HTTPResponse.
 
     A HTTPResponse will return an empty string when you read from it after
@@ -120,20 +119,19 @@ class _IOReader(six.BytesIO):
 
     def read(self, *args, **kwargs):
         if self.closed:
-            return six.b('')
+            return b''
 
         # if the file is open, but you asked for zero bytes read you should get
         # back zero without closing the stream.
         if len(args) > 0 and args[0] == 0:
-            return six.b('')
+            return b''
 
-        # not a new style object in python 2
-        result = six.BytesIO.read(self, *args, **kwargs)
+        result = io.BytesIO.read(self, *args, **kwargs)
 
         # when using resp.iter_content(None) it'll go through a different
         # request path in urllib3. This path checks whether the object is
         # marked closed instead of the return value. see gh124.
-        if result == six.b(''):
+        if result == b'':
             self.close()
 
         return result
@@ -172,9 +170,9 @@ def create_response(request, **kwargs):
     headers = kwargs.pop('headers', {})
     encoding = None
 
-    if content is not None and not isinstance(content, six.binary_type):
+    if content is not None and not isinstance(content, bytes):
         raise TypeError('Content should be binary data')
-    if text is not None and not isinstance(text, six.string_types):
+    if text is not None and not isinstance(text, str):
         raise TypeError('Text should be string data')
 
     if json is not None:
@@ -187,13 +185,12 @@ def create_response(request, **kwargs):
         body = _IOReader(content)
     if not raw:
         status = kwargs.get('status_code', _DEFAULT_STATUS)
-        reason = kwargs.get('reason',
-                            six.moves.http_client.responses.get(status))
+        reason = kwargs.get('reason', http.client.responses.get(status))
 
         raw = HTTPResponse(status=status,
                            reason=reason,
                            headers=headers,
-                           body=body or _IOReader(six.b('')),
+                           body=body or _IOReader(b''),
                            decode_content=False,
                            enforce_content_length=False,
                            preload_content=False,
@@ -241,11 +238,11 @@ class _MatcherResponse(object):
         text = self._params.get('text')
 
         if content is not None and not (callable(content) or
-                                        isinstance(content, six.binary_type)):
+                                        isinstance(content, bytes)):
             raise TypeError('Content should be a callback or binary data')
 
         if text is not None and not (callable(text) or
-                                     isinstance(text, six.string_types)):
+                                     isinstance(text, str)):
             raise TypeError('Text should be a callback or string data')
 
     def get_response(self, request):
@@ -273,7 +270,7 @@ class _MatcherResponse(object):
                                text=_call(self._params.get('text')),
                                content=_call(self._params.get('content')),
                                body=_call(self._params.get('body')),
-                               raw=self._params.get('raw'),
+                               raw=_call(self._params.get('raw')),
                                json_encoder=self._params.get('json_encoder'),
                                status_code=context.status_code,
                                reason=context.reason,
diff --git a/contrib/python/requests-mock/py3/requests_mock/response.pyi b/contrib/python/requests-mock/py3/requests_mock/response.pyi
index e7c8977883..fbcb535eac 100644
--- a/contrib/python/requests-mock/py3/requests_mock/response.pyi
+++ b/contrib/python/requests-mock/py3/requests_mock/response.pyi
@@ -1,9 +1,8 @@
 # Stubs for requests_mock.response
 
+import io
 from typing import Any, Dict
 
-import six
-
 from requests import Request, Response
 from requests.cookies import RequestsCookieJar
 
@@ -14,7 +13,8 @@ class _FakeConnection:
     def send(self, request: Any, **kwargs: Any) -> None: ...
     def close(self) -> None: ...
 
-class _IOReader(six.BytesIO):
+class _IOReader(io.BytesIO):
+
     def read(self, *args: Any, **kwargs: Any) -> Any: ...
 
 def create_response(request: Any, **kwargs: Any) -> Response: ...
diff --git a/contrib/python/requests-mock/py3/ya.make b/contrib/python/requests-mock/py3/ya.make
index b022b84019..d54c1b3e5a 100644
--- a/contrib/python/requests-mock/py3/ya.make
+++ b/contrib/python/requests-mock/py3/ya.make
@@ -2,13 +2,12 @@
 
 PY3_LIBRARY()
 
-VERSION(1.11.0)
+VERSION(1.12.0)
 
 LICENSE(Apache-2.0)
 
 PEERDIR(
     contrib/python/requests
-    contrib/python/six
 )
 
 NO_LINT()
@@ -24,7 +23,6 @@ PY_SRCS(
     requests_mock/__init__.pyi
     requests_mock/adapter.py
     requests_mock/adapter.pyi
-    requests_mock/compat.py
     requests_mock/contrib/__init__.py
     requests_mock/contrib/_pytest_plugin.py
     requests_mock/contrib/_pytest_plugin.pyi
diff --git a/yt/yt/library/process/process.cpp b/yt/yt/library/process/process.cpp
index 28f699e398..a775bd4090 100644
--- a/yt/yt/library/process/process.cpp
+++ b/yt/yt/library/process/process.cpp
@@ -144,6 +144,20 @@ TErrorOr<TString> ResolveBinaryPath(const TString& binary)
     return failure();
 }
 
+std::vector<TString> GetEnviron()
+{
+    std::vector<TString> env;
+    size_t size = 0;
+    for (char** envIt = environ; *envIt; ++envIt) {
+        ++size;
+    }
+    env.reserve(size);
+    for (char** envIt = environ; *envIt; ++envIt) {
+        env.emplace_back(*envIt);
+    }
+    return env;
+}
+
 bool TryKillProcessByPid(int pid, int signal)
 {
 #ifdef _unix_
diff --git a/yt/yt/library/process/process.h b/yt/yt/library/process/process.h
index b38ae3f4b3..effc5892f1 100644
--- a/yt/yt/library/process/process.h
+++ b/yt/yt/library/process/process.h
@@ -17,6 +17,7 @@ namespace NYT {
 ////////////////////////////////////////////////////////////////////////////////
 
 TErrorOr<TString> ResolveBinaryPath(const TString& binary);
+std::vector<TString> GetEnviron();
 bool TryKillProcessByPid(int pid, int signal);
 
 ////////////////////////////////////////////////////////////////////////////////
-- 
cgit v1.2.3


From c51653cb452928e226b2abf4298b68dae555ed94 Mon Sep 17 00:00:00 2001
From: osidorkin <osidorkin@yandex-team.com>
Date: Thu, 11 Apr 2024 07:48:20 +0300
Subject: YT-19625: Calculate replicas lag per card in RTT
 db2931a285837071f96a32dc0a7b364b35b16681

---
 yt/yt/client/chaos_client/replication_card.cpp | 27 ++++++++++++++++++++++++++
 yt/yt/client/chaos_client/replication_card.h   |  2 ++
 2 files changed, 29 insertions(+)

diff --git a/yt/yt/client/chaos_client/replication_card.cpp b/yt/yt/client/chaos_client/replication_card.cpp
index 5c32290d76..ec61deb64d 100644
--- a/yt/yt/client/chaos_client/replication_card.cpp
+++ b/yt/yt/client/chaos_client/replication_card.cpp
@@ -834,6 +834,33 @@ TDuration ComputeReplicationProgressLag(
     return lag;
 }
 
+THashMap<TReplicaId, TDuration> ComputeReplicasLag(const THashMap<TReplicaId, TReplicaInfo>& replicas)
+{
+    TReplicationProgress syncProgress;
+    for (const auto& [replicaId, replicaInfo] : replicas) {
+        if (IsReplicaReallySync(replicaInfo.Mode, replicaInfo.State, replicaInfo.History.back())) {
+            if (syncProgress.Segments.empty()) {
+                syncProgress = replicaInfo.ReplicationProgress;
+            } else {
+                syncProgress = BuildMaxProgress(syncProgress, replicaInfo.ReplicationProgress);
+            }
+        }
+    }
+
+    THashMap<TReplicaId, TDuration> result;
+    for (const auto& [replicaId, replicaInfo] : replicas) {
+        if (IsReplicaReallySync(replicaInfo.Mode, replicaInfo.State, replicaInfo.History.back())) {
+            result.emplace(replicaId, TDuration::Zero());
+        } else {
+            result.emplace(
+                replicaId,
+                ComputeReplicationProgressLag(syncProgress, replicaInfo.ReplicationProgress));
+        }
+    }
+
+    return result;
+}
+
 ////////////////////////////////////////////////////////////////////////////////
 
 } // namespace NYT::NChaosClient
diff --git a/yt/yt/client/chaos_client/replication_card.h b/yt/yt/client/chaos_client/replication_card.h
index 307622af07..58a2cc8f0c 100644
--- a/yt/yt/client/chaos_client/replication_card.h
+++ b/yt/yt/client/chaos_client/replication_card.h
@@ -190,6 +190,8 @@ TDuration ComputeReplicationProgressLag(
     const TReplicationProgress& maxProgress,
     const TReplicationProgress& replicaProgress);
 
+THashMap<TReplicaId, TDuration> ComputeReplicasLag(const THashMap<TReplicaId, TReplicaInfo>& replicas);
+
 ////////////////////////////////////////////////////////////////////////////////
 
 } // namespace NYT::NChaosClient
-- 
cgit v1.2.3


From 30aa997daf4dffeb303c1b36e29421c46c872e73 Mon Sep 17 00:00:00 2001
From: robot-piglet <robot-piglet@yandex-team.com>
Date: Thu, 11 Apr 2024 08:25:40 +0300
Subject: Intermediate changes

---
 contrib/python/httpcore/.dist-info/METADATA         | 11 ++++++++---
 contrib/python/httpcore/httpcore/__init__.py        |  2 +-
 contrib/python/httpcore/httpcore/_async/http2.py    |  6 +++---
 contrib/python/httpcore/httpcore/_backends/anyio.py |  2 ++
 contrib/python/httpcore/httpcore/_models.py         |  2 +-
 contrib/python/httpcore/httpcore/_sync/http2.py     |  6 +++---
 contrib/python/httpcore/ya.make                     |  2 +-
 7 files changed, 19 insertions(+), 12 deletions(-)

diff --git a/contrib/python/httpcore/.dist-info/METADATA b/contrib/python/httpcore/.dist-info/METADATA
index 7804db1a8b..0e2009536e 100644
--- a/contrib/python/httpcore/.dist-info/METADATA
+++ b/contrib/python/httpcore/.dist-info/METADATA
@@ -1,6 +1,6 @@
-Metadata-Version: 2.1
+Metadata-Version: 2.3
 Name: httpcore
-Version: 1.0.4
+Version: 1.0.5
 Summary: A minimal low-level HTTP client.
 Project-URL: Documentation, https://www.encode.io/httpcore
 Project-URL: Homepage, https://www.encode.io/httpcore/
@@ -33,7 +33,7 @@ Requires-Dist: h2<5,>=3; extra == 'http2'
 Provides-Extra: socks
 Requires-Dist: socksio==1.*; extra == 'socks'
 Provides-Extra: trio
-Requires-Dist: trio<0.25.0,>=0.22.0; extra == 'trio'
+Requires-Dist: trio<0.26.0,>=0.22.0; extra == 'trio'
 Description-Content-Type: text/markdown
 
 # HTTP Core
@@ -153,6 +153,11 @@ All notable changes to this project will be documented in this file.
 
 The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
 
+## 1.0.5 (March 27th, 2024)
+
+- Handle `EndOfStream` exception for anyio backend. (#899)
+- Allow trio `0.25.*` series in package dependancies. (#903)
+
 ## 1.0.4 (February 21st, 2024)
 
 - Add `target` request extension. (#888)
diff --git a/contrib/python/httpcore/httpcore/__init__.py b/contrib/python/httpcore/httpcore/__init__.py
index ea2a240921..014213bae7 100644
--- a/contrib/python/httpcore/httpcore/__init__.py
+++ b/contrib/python/httpcore/httpcore/__init__.py
@@ -130,7 +130,7 @@ __all__ = [
     "WriteError",
 ]
 
-__version__ = "1.0.4"
+__version__ = "1.0.5"
 
 
 __locals = locals()
diff --git a/contrib/python/httpcore/httpcore/_async/http2.py b/contrib/python/httpcore/httpcore/_async/http2.py
index 8dc776ffa0..c201ee4cbc 100644
--- a/contrib/python/httpcore/httpcore/_async/http2.py
+++ b/contrib/python/httpcore/httpcore/_async/http2.py
@@ -75,9 +75,9 @@ class AsyncHTTP2Connection(AsyncConnectionInterface):
 
         # Connection terminated events are stored as state since
         # we need to handle them for all streams.
-        self._connection_terminated: typing.Optional[
-            h2.events.ConnectionTerminated
-        ] = None
+        self._connection_terminated: typing.Optional[h2.events.ConnectionTerminated] = (
+            None
+        )
 
         self._read_exception: typing.Optional[Exception] = None
         self._write_exception: typing.Optional[Exception] = None
diff --git a/contrib/python/httpcore/httpcore/_backends/anyio.py b/contrib/python/httpcore/httpcore/_backends/anyio.py
index 1ed5228dbd..5731f5e78c 100644
--- a/contrib/python/httpcore/httpcore/_backends/anyio.py
+++ b/contrib/python/httpcore/httpcore/_backends/anyio.py
@@ -27,6 +27,7 @@ class AnyIOStream(AsyncNetworkStream):
             TimeoutError: ReadTimeout,
             anyio.BrokenResourceError: ReadError,
             anyio.ClosedResourceError: ReadError,
+            anyio.EndOfStream: ReadError,
         }
         with map_exceptions(exc_map):
             with anyio.fail_after(timeout):
@@ -62,6 +63,7 @@ class AnyIOStream(AsyncNetworkStream):
         exc_map = {
             TimeoutError: ConnectTimeout,
             anyio.BrokenResourceError: ConnectError,
+            anyio.EndOfStream: ConnectError,
         }
         with map_exceptions(exc_map):
             try:
diff --git a/contrib/python/httpcore/httpcore/_models.py b/contrib/python/httpcore/httpcore/_models.py
index 397bd758d0..dadee79f69 100644
--- a/contrib/python/httpcore/httpcore/_models.py
+++ b/contrib/python/httpcore/httpcore/_models.py
@@ -339,7 +339,7 @@ class Request:
             url: The request URL, either as a `URL` instance, or as a string or bytes.
                 For example: `"https://www.example.com".`
             headers: The HTTP request headers.
-            content: The content of the response body.
+            content: The content of the request body.
             extensions: A dictionary of optional extra information included on
                 the request. Possible keys include `"timeout"`, and `"trace"`.
         """
diff --git a/contrib/python/httpcore/httpcore/_sync/http2.py b/contrib/python/httpcore/httpcore/_sync/http2.py
index d141d459a5..1ee4bbb34f 100644
--- a/contrib/python/httpcore/httpcore/_sync/http2.py
+++ b/contrib/python/httpcore/httpcore/_sync/http2.py
@@ -75,9 +75,9 @@ class HTTP2Connection(ConnectionInterface):
 
         # Connection terminated events are stored as state since
         # we need to handle them for all streams.
-        self._connection_terminated: typing.Optional[
-            h2.events.ConnectionTerminated
-        ] = None
+        self._connection_terminated: typing.Optional[h2.events.ConnectionTerminated] = (
+            None
+        )
 
         self._read_exception: typing.Optional[Exception] = None
         self._write_exception: typing.Optional[Exception] = None
diff --git a/contrib/python/httpcore/ya.make b/contrib/python/httpcore/ya.make
index 66ea31672f..36f416f0d6 100644
--- a/contrib/python/httpcore/ya.make
+++ b/contrib/python/httpcore/ya.make
@@ -2,7 +2,7 @@
 
 PY3_LIBRARY()
 
-VERSION(1.0.4)
+VERSION(1.0.5)
 
 LICENSE(BSD-3-Clause)
 
-- 
cgit v1.2.3


From 4aa583ab304fabf62f63ac89fd649e4dd731c386 Mon Sep 17 00:00:00 2001
From: robot-ya-builder <robot-ya-builder@yandex-team.com>
Date: Thu, 11 Apr 2024 08:27:05 +0300
Subject: Automatic release build for ymake, os_ymake

From hash: [dec4f4c4a6a9c6bfe6360ac606f49c9a2904da5d](https://a.yandex-team.ru/arcadia/commit/dec4f4c4a6a9c6bfe6360ac606f49c9a2904da5d)
From revision: [13809811](https://a.yandex-team.ru/arcadia/commit/rXXXXXX)
[CI flow](https://a.yandex-team.ru/projects/ya_make/ci/releases/flow?dir=devtools%2Fya&id=release-ymake&version=182)
Flow triggered by user: [snermolaev](https://staff.yandex-team.ru/snermolaev)

Update tools: ymake, os_ymake
dbbb65c6c8fe6f9dd1295b7848b46d080ad63952
---
 build/external_resources/ymake/public.resources.json | 10 +++++-----
 build/external_resources/ymake/resources.json        | 10 +++++-----
 build/mapping.conf.json                              | 10 ++++++++++
 3 files changed, 20 insertions(+), 10 deletions(-)

diff --git a/build/external_resources/ymake/public.resources.json b/build/external_resources/ymake/public.resources.json
index 5a4aff20f5..52aa3816c2 100644
--- a/build/external_resources/ymake/public.resources.json
+++ b/build/external_resources/ymake/public.resources.json
@@ -1,19 +1,19 @@
 {
     "by_platform": {
         "darwin": {
-            "uri": "sbr:6083564572"
+            "uri": "sbr:6137609839"
         },
         "darwin-arm64": {
-            "uri": "sbr:6083563814"
+            "uri": "sbr:6137609447"
         },
         "linux": {
-            "uri": "sbr:6083566146"
+            "uri": "sbr:6137610792"
         },
         "linux-aarch64": {
-            "uri": "sbr:6083563061"
+            "uri": "sbr:6137609077"
         },
         "win32-clang-cl": {
-            "uri": "sbr:6083565386"
+            "uri": "sbr:6137610326"
         }
     }
 }
diff --git a/build/external_resources/ymake/resources.json b/build/external_resources/ymake/resources.json
index 113ab4c113..ba951bcf07 100644
--- a/build/external_resources/ymake/resources.json
+++ b/build/external_resources/ymake/resources.json
@@ -1,19 +1,19 @@
 {
     "by_platform": {
         "darwin": {
-            "uri": "sbr:6083558257"
+            "uri": "sbr:6137616406"
         },
         "darwin-arm64": {
-            "uri": "sbr:6083557311"
+            "uri": "sbr:6137615686"
         },
         "linux": {
-            "uri": "sbr:6083559980"
+            "uri": "sbr:6137618079"
         },
         "linux-aarch64": {
-            "uri": "sbr:6083556511"
+            "uri": "sbr:6137615044"
         },
         "win32-clang-cl": {
-            "uri": "sbr:6083559213"
+            "uri": "sbr:6137617218"
         }
     }
 }
diff --git a/build/mapping.conf.json b/build/mapping.conf.json
index 56a96edd45..fcfa077cd0 100644
--- a/build/mapping.conf.json
+++ b/build/mapping.conf.json
@@ -269,6 +269,7 @@
         "6026847409": "https://devtools-registry.s3.yandex.net/6026847409",
         "6058478017": "https://devtools-registry.s3.yandex.net/6058478017",
         "6083564572": "https://devtools-registry.s3.yandex.net/6083564572",
+        "6137609839": "https://devtools-registry.s3.yandex.net/6137609839",
         "5766171800": "https://devtools-registry.s3.yandex.net/5766171800",
         "5805430761": "https://devtools-registry.s3.yandex.net/5805430761",
         "5829025456": "https://devtools-registry.s3.yandex.net/5829025456",
@@ -282,6 +283,7 @@
         "6026846979": "https://devtools-registry.s3.yandex.net/6026846979",
         "6058474382": "https://devtools-registry.s3.yandex.net/6058474382",
         "6083563814": "https://devtools-registry.s3.yandex.net/6083563814",
+        "6137609447": "https://devtools-registry.s3.yandex.net/6137609447",
         "5766173070": "https://devtools-registry.s3.yandex.net/5766173070",
         "5805432830": "https://devtools-registry.s3.yandex.net/5805432830",
         "5829031598": "https://devtools-registry.s3.yandex.net/5829031598",
@@ -295,6 +297,7 @@
         "6026848429": "https://devtools-registry.s3.yandex.net/6026848429",
         "6058485428": "https://devtools-registry.s3.yandex.net/6058485428",
         "6083566146": "https://devtools-registry.s3.yandex.net/6083566146",
+        "6137610792": "https://devtools-registry.s3.yandex.net/6137610792",
         "5766171341": "https://devtools-registry.s3.yandex.net/5766171341",
         "5805430188": "https://devtools-registry.s3.yandex.net/5805430188",
         "5829023352": "https://devtools-registry.s3.yandex.net/5829023352",
@@ -308,6 +311,7 @@
         "6026846278": "https://devtools-registry.s3.yandex.net/6026846278",
         "6058468676": "https://devtools-registry.s3.yandex.net/6058468676",
         "6083563061": "https://devtools-registry.s3.yandex.net/6083563061",
+        "6137609077": "https://devtools-registry.s3.yandex.net/6137609077",
         "5766172695": "https://devtools-registry.s3.yandex.net/5766172695",
         "5805432230": "https://devtools-registry.s3.yandex.net/5805432230",
         "5829029743": "https://devtools-registry.s3.yandex.net/5829029743",
@@ -321,6 +325,7 @@
         "6026847927": "https://devtools-registry.s3.yandex.net/6026847927",
         "6058481335": "https://devtools-registry.s3.yandex.net/6058481335",
         "6083565386": "https://devtools-registry.s3.yandex.net/6083565386",
+        "6137610326": "https://devtools-registry.s3.yandex.net/6137610326",
         "4307890075": "https://devtools-registry.s3.yandex.net/4307890075",
         "5517245192": "https://devtools-registry.s3.yandex.net/5517245192",
         "4307901240": "https://devtools-registry.s3.yandex.net/4307901240",
@@ -699,6 +704,7 @@
         "6026847409": "devtools/ymake/bin/ymake for darwin",
         "6058478017": "devtools/ymake/bin/ymake for darwin",
         "6083564572": "devtools/ymake/bin/ymake for darwin",
+        "6137609839": "devtools/ymake/bin/ymake for darwin",
         "5766171800": "devtools/ymake/bin/ymake for darwin-arm64",
         "5805430761": "devtools/ymake/bin/ymake for darwin-arm64",
         "5829025456": "devtools/ymake/bin/ymake for darwin-arm64",
@@ -712,6 +718,7 @@
         "6026846979": "devtools/ymake/bin/ymake for darwin-arm64",
         "6058474382": "devtools/ymake/bin/ymake for darwin-arm64",
         "6083563814": "devtools/ymake/bin/ymake for darwin-arm64",
+        "6137609447": "devtools/ymake/bin/ymake for darwin-arm64",
         "5766173070": "devtools/ymake/bin/ymake for linux",
         "5805432830": "devtools/ymake/bin/ymake for linux",
         "5829031598": "devtools/ymake/bin/ymake for linux",
@@ -725,6 +732,7 @@
         "6026848429": "devtools/ymake/bin/ymake for linux",
         "6058485428": "devtools/ymake/bin/ymake for linux",
         "6083566146": "devtools/ymake/bin/ymake for linux",
+        "6137610792": "devtools/ymake/bin/ymake for linux",
         "5766171341": "devtools/ymake/bin/ymake for linux-aarch64",
         "5805430188": "devtools/ymake/bin/ymake for linux-aarch64",
         "5829023352": "devtools/ymake/bin/ymake for linux-aarch64",
@@ -738,6 +746,7 @@
         "6026846278": "devtools/ymake/bin/ymake for linux-aarch64",
         "6058468676": "devtools/ymake/bin/ymake for linux-aarch64",
         "6083563061": "devtools/ymake/bin/ymake for linux-aarch64",
+        "6137609077": "devtools/ymake/bin/ymake for linux-aarch64",
         "5766172695": "devtools/ymake/bin/ymake for win32-clang-cl",
         "5805432230": "devtools/ymake/bin/ymake for win32-clang-cl",
         "5829029743": "devtools/ymake/bin/ymake for win32-clang-cl",
@@ -751,6 +760,7 @@
         "6026847927": "devtools/ymake/bin/ymake for win32-clang-cl",
         "6058481335": "devtools/ymake/bin/ymake for win32-clang-cl",
         "6083565386": "devtools/ymake/bin/ymake for win32-clang-cl",
+        "6137610326": "devtools/ymake/bin/ymake for win32-clang-cl",
         "4307890075": "flake8_linter for linux",
         "5517245192": "flake8_linter for linux",
         "4307901240": "flake8_linter for linux-aarch64",
-- 
cgit v1.2.3


From 4814576bfe95ed19aaaa8b8a02ce13ef441b0436 Mon Sep 17 00:00:00 2001
From: snermolaev <snermolaev@yandex-team.com>
Date: Thu, 11 Apr 2024 09:27:43 +0300
Subject: cleanup: PYTHON2 and PYTHON3 are always defined
 9a8e477f76971b1ea26f990386186cebd289796b

---
 build/conf/python.conf | 2 --
 1 file changed, 2 deletions(-)

diff --git a/build/conf/python.conf b/build/conf/python.conf
index 2df0e3e47e..a4a0b510c2 100644
--- a/build/conf/python.conf
+++ b/build/conf/python.conf
@@ -938,8 +938,6 @@ macro NO_CYTHON_COVERAGE() {
 ### Documentation: https://wiki.yandex-team.ru/arcadia/python/pysrcs/#modulipylibrarypy3libraryimakrospysrcs
 macro PY_SRCS() {
     DEFAULT(MODULE_TAG PY2)
-    DEFAULT(PYTHON2 yes)
-    DEFAULT(PYTHON3 no)
 }
 
 # tag:python-specific
-- 
cgit v1.2.3


From b2dd3109ecde5869a2c8856501d27ef16f055782 Mon Sep 17 00:00:00 2001
From: khoden <khoden@yandex-team.com>
Date: Thu, 11 Apr 2024 12:12:46 +0300
Subject: =?UTF-8?q?TS=5FWEBPACK:=20=D0=9F=D0=BE=D0=B4=D0=B4=D0=B5=D1=80?=
 =?UTF-8?q?=D0=B6=D0=B0=D1=82=D1=8C=20=D0=BD=D0=B5=D1=81=D0=BA=D0=BE=D0=BB?=
 =?UTF-8?q?=D1=8C=D0=BA=D0=BE=20=D0=B2=D1=8B=D1=85=D0=BE=D0=B4=D0=BD=D1=8B?=
 =?UTF-8?q?=D1=85=20=D0=B4=D0=B8=D1=80=D0=B5=D0=BA=D1=82=D0=BE=D1=80=D0=B8?=
 =?UTF-8?q?=D0=B9=20(=D0=B2=D1=82=D0=BE=D1=80=D0=B0=D1=8F=20=D0=BF=D0=BE?=
 =?UTF-8?q?=D0=BF=D1=8B=D1=82=D0=BA=D0=B0)=20adef71a669e1a634917cbda95bcff?=
 =?UTF-8?q?2b327b03444?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 build/conf/ts/ts.conf         |  2 +-
 build/conf/ts/ts_next.conf    |  2 +-
 build/conf/ts/ts_vite.conf    |  2 +-
 build/conf/ts/ts_webpack.conf | 12 ++++++------
 4 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/build/conf/ts/ts.conf b/build/conf/ts/ts.conf
index 6c5953491e..4d419a0bd5 100644
--- a/build/conf/ts/ts.conf
+++ b/build/conf/ts/ts.conf
@@ -33,7 +33,7 @@ TS_CONFIG_PATH=tsconfig.json
 TS_OUTPUT_FILE=output.tar
 TS_OUTPUT_FILE_UUID=output.tar.uuid
 TS_EXCLUDE_DIR_GLOB=(.idea|.vscode|node_modules)/**/*
-TS_COMMON_OUTDIR_GLOB=(build|dist|bundle|$WEBPACK_OUTPUT_DIR|$TS_NEXT_OUTPUT_DIR|$VITE_OUTPUT_DIR)/**/*
+TS_COMMON_OUTDIR_GLOB=(build|dist|bundle|\${join=|:WEBPACK_OUTPUT_DIR}|$TS_NEXT_OUTPUT_DIR|$VITE_OUTPUT_DIR)/**/*
 TS_GLOB_EXCLUDE_ADDITIONAL=
 
 module _TS_BASE_UNIT: _BARE_UNIT {
diff --git a/build/conf/ts/ts_next.conf b/build/conf/ts/ts_next.conf
index 58465b3a0d..b4f1c63a5c 100644
--- a/build/conf/ts/ts_next.conf
+++ b/build/conf/ts/ts_next.conf
@@ -6,7 +6,7 @@ TS_NEXT_CMD=$TOUCH_UNIT \
     && $ADD_VCS_INFO_FILE_CMD \
     && $NOTS_TOOL $NOTS_TOOL_BASE_ARGS build-next $NOTS_TOOL_COMMON_BUILDER_ARGS \
       --bundler-config-path ${input:TS_NEXT_CONFIG_PATH} \
-      --output-dir ${TS_NEXT_OUTPUT_DIR} \
+      --output-dirs ${TS_NEXT_OUTPUT_DIR} \
     $_NODE_MODULES_INOUTS ${hide:PEERS} \
     ${input;hide:"package.json"} ${TS_CONFIG_FILES} $_AS_HIDDEN_INPUTS(IN $TS_INPUT_FILES) \
     ${output;hide:"package.json"} \
diff --git a/build/conf/ts/ts_vite.conf b/build/conf/ts/ts_vite.conf
index 04ee37227e..d34520e97c 100644
--- a/build/conf/ts/ts_vite.conf
+++ b/build/conf/ts/ts_vite.conf
@@ -6,7 +6,7 @@ TS_VITE_CMD=$TOUCH_UNIT \
     && $ADD_VCS_INFO_FILE_CMD \
     && $NOTS_TOOL $NOTS_TOOL_BASE_ARGS build-vite $NOTS_TOOL_COMMON_BUILDER_ARGS \
       --bundler-config-path ${input:VITE_CONFIG_PATH} \
-      --output-dir ${VITE_OUTPUT_DIR} \
+      --output-dirs ${VITE_OUTPUT_DIR} \
     $_NODE_MODULES_INOUTS ${hide:PEERS} \
     ${input;hide:"package.json"} ${TS_CONFIG_FILES} $_AS_HIDDEN_INPUTS(IN $TS_INPUT_FILES) \
     ${output;hide:"package.json"} \
diff --git a/build/conf/ts/ts_webpack.conf b/build/conf/ts/ts_webpack.conf
index 6e9e0571cf..091b73bb70 100644
--- a/build/conf/ts/ts_webpack.conf
+++ b/build/conf/ts/ts_webpack.conf
@@ -6,19 +6,19 @@ TS_WEBPACK_CMD=$TOUCH_UNIT \
     && $ADD_VCS_INFO_FILE_CMD \
     && $NOTS_TOOL $NOTS_TOOL_BASE_ARGS build-webpack $NOTS_TOOL_COMMON_BUILDER_ARGS \
       --bundler-config-path ${input:WEBPACK_CONFIG_PATH} \
-      --output-dir ${WEBPACK_OUTPUT_DIR} \
+      --output-dirs ${WEBPACK_OUTPUT_DIR} \
     $_NODE_MODULES_INOUTS ${hide:PEERS} \
     ${input;hide:"package.json"} ${TS_CONFIG_FILES} $_AS_HIDDEN_INPUTS(IN $TS_INPUT_FILES) \
     ${output;hide:"package.json"} \
     ${kv;hide:"pc magenta"} ${kv;hide:"p TS_WPK"}
 
-### @usage: WEBPACK_OUTPUT(DirName)
+### @usage: WEBPACK_OUTPUT(DirNames)
 ###
-### Macro sets the output directory name for TS_WEBPACK module.
+### Macro sets the output directory name/names for TS_WEBPACK module.
 ###
-### - DirName - output directory name ("bundle" by default).
-macro WEBPACK_OUTPUT(DirName) {
-    SET(WEBPACK_OUTPUT_DIR $DirName)
+### - DirNames - output directory name/names ("bundle" by default).
+macro WEBPACK_OUTPUT(DirNames...) {
+    SET(WEBPACK_OUTPUT_DIR $DirNames)
 }
 
 ### @usage: TS_WEBPACK([name])
-- 
cgit v1.2.3


From 4d7c690806562e640d5ea9635327b837affe218b Mon Sep 17 00:00:00 2001
From: akhropov <akhropov@yandex-team.com>
Date: Thu, 11 Apr 2024 12:14:29 +0300
Subject: Fix Windows build with MSVC after update to 1.2.0.
 31e49330615a13cb7f14649a90105b7bfb92cf64

---
 contrib/libs/snappy/config-win.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/contrib/libs/snappy/config-win.h b/contrib/libs/snappy/config-win.h
index 58b8be4839..91acd79054 100644
--- a/contrib/libs/snappy/config-win.h
+++ b/contrib/libs/snappy/config-win.h
@@ -7,3 +7,4 @@
 #undef HAVE_UNISTD_H
 #undef HAVE_BUILTIN_EXPECT
 #undef HAVE_BUILTIN_CTZ
+#undef HAVE_BUILTIN_PREFETCH
-- 
cgit v1.2.3


From 77a2f79874c0555c4528b1d0a7be09dc9f894abe Mon Sep 17 00:00:00 2001
From: khoden <khoden@yandex-team.com>
Date: Thu, 11 Apr 2024 13:09:59 +0300
Subject: =?UTF-8?q?TS=5FWEBPACK:=20=D0=9F=D0=BE=D0=B4=D0=B4=D0=B5=D1=80?=
 =?UTF-8?q?=D0=B6=D0=B0=D1=82=D1=8C=20=D0=BD=D0=B5=D1=81=D0=BA=D0=BE=D0=BB?=
 =?UTF-8?q?=D1=8C=D0=BA=D0=BE=20=D0=B2=D1=8B=D1=85=D0=BE=D0=B4=D0=BD=D1=8B?=
 =?UTF-8?q?=D1=85=20=D0=B4=D0=B8=D1=80=D0=B5=D0=BA=D1=82=D0=BE=D1=80=D0=B8?=
 =?UTF-8?q?=D0=B9=20(=D0=B4=D0=BE=D1=80=D0=B0=D0=B1=D0=BE=D1=82=D0=BA?=
 =?UTF-8?q?=D0=B0)=20b01b89a11275e2cb656a9550f53f7dae0160d7d6?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 build/conf/ts/ts_webpack.conf | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/build/conf/ts/ts_webpack.conf b/build/conf/ts/ts_webpack.conf
index 091b73bb70..36638af41d 100644
--- a/build/conf/ts/ts_webpack.conf
+++ b/build/conf/ts/ts_webpack.conf
@@ -12,13 +12,13 @@ TS_WEBPACK_CMD=$TOUCH_UNIT \
     ${output;hide:"package.json"} \
     ${kv;hide:"pc magenta"} ${kv;hide:"p TS_WPK"}
 
-### @usage: WEBPACK_OUTPUT(DirNames)
+### @usage: WEBPACK_OUTPUT(FirstDirName DirNames)
 ###
-### Macro sets the output directory name/names for TS_WEBPACK module.
+### Macro sets the output directory names (one at least) for TS_WEBPACK module.
 ###
-### - DirNames - output directory name/names ("bundle" by default).
-macro WEBPACK_OUTPUT(DirNames...) {
-    SET(WEBPACK_OUTPUT_DIR $DirNames)
+### - DirNames - output directory names (one at least) ("bundle" by default).
+macro WEBPACK_OUTPUT(FirstDirName, DirNames...) {
+    SET(WEBPACK_OUTPUT_DIR $FirstDirName $DirNames)
 }
 
 ### @usage: TS_WEBPACK([name])
-- 
cgit v1.2.3


From c8bd9e33dfed3117fc059480a9b85f096f8b0be2 Mon Sep 17 00:00:00 2001
From: robot-cozmo <robot-cozmo@yandex-team.com>
Date: Thu, 11 Apr 2024 13:26:11 +0300
Subject: Update yfm-docs for ya make to Build time: 15.176ms

4.21.0
Author: v8tenko
Sandbox task: https://sandbox.yandex-team.ru/task/2270273832
Docs version: None
365068e8bd372f6fbfa26971f5b3266777b2a040
---
 build/platform/yfm/ya.make | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/build/platform/yfm/ya.make b/build/platform/yfm/ya.make
index a537245bfb..fe8be4dffc 100644
--- a/build/platform/yfm/ya.make
+++ b/build/platform/yfm/ya.make
@@ -6,10 +6,10 @@ ENDIF()
 
 DECLARE_EXTERNAL_HOST_RESOURCES_BUNDLE(
     YFM_TOOL
-    sbr:6102346852 FOR DARWIN-ARM64
-    sbr:6102346852 FOR DARWIN
-    sbr:6102344156 FOR LINUX
-    sbr:6102349361 FOR WIN32
+    sbr:6147397665 FOR DARWIN-ARM64
+    sbr:6147397665 FOR DARWIN
+    sbr:6147393008 FOR LINUX
+    sbr:6147403306 FOR WIN32
 )
 
 END()
-- 
cgit v1.2.3


From 450e62a01220775eef49b15c7ad0ddba4160a2b1 Mon Sep 17 00:00:00 2001
From: robot-ya-builder <robot-ya-builder@yandex-team.com>
Date: Thu, 11 Apr 2024 14:46:54 +0300
Subject: YA-TC release 11

Update tools: ya-tc, os-ya-tc
5823d3ac6a1dcb5846f49f088f1f09de1ad9586d
---
 build/external_resources/ya-tc/public.resources.json | 8 ++++----
 build/mapping.conf.json                              | 8 ++++++++
 2 files changed, 12 insertions(+), 4 deletions(-)

diff --git a/build/external_resources/ya-tc/public.resources.json b/build/external_resources/ya-tc/public.resources.json
index 31a4c77f30..6fa4775f3b 100644
--- a/build/external_resources/ya-tc/public.resources.json
+++ b/build/external_resources/ya-tc/public.resources.json
@@ -1,16 +1,16 @@
 {
     "by_platform": {
         "darwin": {
-            "uri": "sbr:5054517618"
+            "uri": "sbr:6148089711"
         },
         "darwin-arm64": {
-            "uri": "sbr:5054512910"
+            "uri": "sbr:6148088723"
         },
         "linux": {
-            "uri": "sbr:5054518131"
+            "uri": "sbr:6148087756"
         },
         "linux-aarch64": {
-            "uri": "sbr:5054515588"
+            "uri": "sbr:6148086856"
         }
     }
 }
diff --git a/build/mapping.conf.json b/build/mapping.conf.json
index fcfa077cd0..cba14ded5d 100644
--- a/build/mapping.conf.json
+++ b/build/mapping.conf.json
@@ -140,6 +140,10 @@
         "3877389037": "https://devtools-registry.s3.yandex.net/3877389037",
         "3877389242": "https://devtools-registry.s3.yandex.net/3877389242",
         "3877388826": "https://devtools-registry.s3.yandex.net/3877388826",
+        "6148089711": "https://devtools-registry.s3.yandex.net/6148089711",
+        "6148088723": "https://devtools-registry.s3.yandex.net/6148088723",
+        "6148087756": "https://devtools-registry.s3.yandex.net/6148087756",
+        "6148086856": "https://devtools-registry.s3.yandex.net/6148086856",
         "3961412335": "https://devtools-registry.s3.yandex.net/3961412335",
         "3961411314": "https://devtools-registry.s3.yandex.net/3961411314",
         "3961413236": "https://devtools-registry.s3.yandex.net/3961413236",
@@ -575,6 +579,10 @@
         "3877389037": "devtools/huge_python3/python3 for linux-aarch64",
         "3877389242": "devtools/huge_python3/python3 for linux-ppc64le",
         "3877388826": "devtools/huge_python3/python3 for win32-clang-cl",
+        "6148089711": "devtools/local_cache/toolscache/server/ya-tc for darwin",
+        "6148088723": "devtools/local_cache/toolscache/server/ya-tc for darwin-arm64",
+        "6148087756": "devtools/local_cache/toolscache/server/ya-tc for linux",
+        "6148086856": "devtools/local_cache/toolscache/server/ya-tc for linux-aarch64",
         "3961412335": "devtools/ya/test/programs/flake8/py2/flake8 for darwin",
         "3961411314": "devtools/ya/test/programs/flake8/py2/flake8 for darwin-arm64",
         "3961413236": "devtools/ya/test/programs/flake8/py2/flake8 for linux",
-- 
cgit v1.2.3


From c69c158e5a3d1a39602cf1497af47a20786106a4 Mon Sep 17 00:00:00 2001
From: arkady-e1ppa <arkady-e1ppa@yandex-team.com>
Date: Thu, 11 Apr 2024 15:09:13 +0300
Subject: YT-19731: Whitelist now prevents dropping inner errors with
 whitelisted attributes

No tests for now
9e6aa6815b8d892d1e76281e95f5d044196801e1
---
 library/cpp/yt/misc/optional.h         | 40 +++++++++++++++
 yt/yt/core/misc/error.cpp              | 89 ++++++++++++++++++++++++++++------
 yt/yt/core/misc/error_helpers-inl.h    | 37 ++++++++++++++
 yt/yt/core/misc/error_helpers.h        | 27 +++++++++++
 yt/yt/core/misc/unittests/error_ut.cpp | 43 ++++++++++++++++
 5 files changed, 222 insertions(+), 14 deletions(-)
 create mode 100644 yt/yt/core/misc/error_helpers-inl.h
 create mode 100644 yt/yt/core/misc/error_helpers.h

diff --git a/library/cpp/yt/misc/optional.h b/library/cpp/yt/misc/optional.h
index cfae5c36d5..d5e3c07fbe 100644
--- a/library/cpp/yt/misc/optional.h
+++ b/library/cpp/yt/misc/optional.h
@@ -13,6 +13,16 @@ struct TOptionalTraits
 {
     using TOptional = std::optional<T>;
     using TValue = T;
+
+    static constexpr bool HasValue(const TOptional& opt)
+    {
+        return opt.has_value();
+    }
+
+    static constexpr TOptional Empty()
+    {
+        return std::nullopt;
+    }
 };
 
 template <class T>
@@ -20,6 +30,16 @@ struct TOptionalTraits<std::optional<T>>
 {
     using TOptional = std::optional<T>;
     using TValue = T;
+
+    static constexpr bool HasValue(const TOptional& opt)
+    {
+        return opt.has_value();
+    }
+
+    static constexpr TOptional Empty()
+    {
+        return std::nullopt;
+    }
 };
 
 template <class T>
@@ -27,6 +47,16 @@ struct TOptionalTraits<T*>
 {
     using TOptional = T*;
     using TValue = T*;
+
+    static constexpr bool HasValue(const TOptional& opt)
+    {
+        return opt != nullptr;
+    }
+
+    static constexpr TOptional Empty()
+    {
+        return nullptr;
+    }
 };
 
 template <class T>
@@ -34,6 +64,16 @@ struct TOptionalTraits<TIntrusivePtr<T>>
 {
     using TOptional = TIntrusivePtr<T>;
     using TValue = TIntrusivePtr<T>;
+
+    static bool HasValue(const TOptional& opt)
+    {
+        return opt.Get() != nullptr;
+    }
+
+    static constexpr TOptional Empty()
+    {
+        return TIntrusivePtr<T>{};
+    }
 };
 
 ////////////////////////////////////////////////////////////////////////////////
diff --git a/yt/yt/core/misc/error.cpp b/yt/yt/core/misc/error.cpp
index 7784292c70..e84b9da94b 100644
--- a/yt/yt/core/misc/error.cpp
+++ b/yt/yt/core/misc/error.cpp
@@ -355,6 +355,51 @@ private:
 
 ////////////////////////////////////////////////////////////////////////////////
 
+bool IsWhitelisted(const TError& error, const THashSet<TStringBuf>& attributeWhitelist)
+{
+    for (const auto& key : error.Attributes().ListKeys()) {
+        if (attributeWhitelist.contains(key)) {
+            return true;
+        }
+    }
+
+    for (const auto& innerError : error.InnerErrors()) {
+        if (IsWhitelisted(innerError, attributeWhitelist)) {
+            return true;
+        }
+    }
+
+    return false;
+}
+
+//! Returns vector which consists of objects from errors such that:
+//! if N is the number of objects in errors s.t. IsWhitelisted is true
+//! then first N objects of returned vector are the ones for which IsWhitelisted is true
+//! followed by std::max(0, maxInnerErrorCount - N - 1) remaining objects
+//! finally followed by errors.back().
+std::vector<TError>& ApplyWhitelist(std::vector<TError>& errors, const THashSet<TStringBuf>& attributeWhitelist, int maxInnerErrorCount)
+{
+    if (std::ssize(errors) < std::max(2, maxInnerErrorCount)) {
+        return errors;
+    }
+
+    auto firstNotWhitelisted = std::partition(
+        errors.begin(),
+        std::prev(errors.end()),
+        [&attributeWhitelist] (const TError& error) {
+            return IsWhitelisted(error, attributeWhitelist);
+        });
+
+    int lastErrorOffset = std::max<int>(firstNotWhitelisted - errors.begin(), maxInnerErrorCount - 1);
+
+    *(errors.begin() + lastErrorOffset) = std::move(errors.back());
+    errors.resize(lastErrorOffset + 1);
+
+    return errors;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+
 TError::TErrorOr() = default;
 
 TError::~TErrorOr() = default;
@@ -629,7 +674,10 @@ std::vector<TError>* TError::MutableInnerErrors()
 
 const TString InnerErrorsTruncatedKey("inner_errors_truncated");
 
-TError TError::Truncate(int maxInnerErrorCount, i64 stringLimit, const THashSet<TStringBuf>& attributeWhitelist) const &
+TError TError::Truncate(
+    int maxInnerErrorCount,
+    i64 stringLimit,
+    const THashSet<TStringBuf>& attributeWhitelist) const &
 {
     if (!Impl_) {
         return TError();
@@ -666,22 +714,37 @@ TError TError::Truncate(int maxInnerErrorCount, i64 stringLimit, const THashSet<
     }
     result->CopyBuiltinAttributesFrom(*Impl_);
 
-    if (std::ssize(InnerErrors()) <= maxInnerErrorCount) {
-        for (const auto& innerError : InnerErrors()) {
-            result->MutableInnerErrors()->push_back(truncateInnerError(innerError));
+    const auto& innerErrors = InnerErrors();
+    auto& copiedInnerErrors = *result->MutableInnerErrors();
+
+    if (std::ssize(innerErrors) <= maxInnerErrorCount) {
+        for (const auto& innerError : innerErrors) {
+            copiedInnerErrors.push_back(truncateInnerError(innerError));
         }
     } else {
         result->MutableAttributes()->Set(InnerErrorsTruncatedKey, true);
-        for (int i = 0; i + 1 < maxInnerErrorCount; ++i) {
-            result->MutableInnerErrors()->push_back(truncateInnerError(InnerErrors()[i]));
+
+        // NB(arkady-e1ppa): We want to always keep the last inner error,
+        // so we make room for it and do not check if it is whitelisted.
+        for (int idx = 0; idx < std::ssize(innerErrors) - 1; ++idx) {
+            const auto& innerError = innerErrors[idx];
+            if (
+                IsWhitelisted(innerError, attributeWhitelist) ||
+                std::ssize(copiedInnerErrors) < maxInnerErrorCount - 1)
+            {
+                copiedInnerErrors.push_back(truncateInnerError(innerError));
+            }
         }
-        result->MutableInnerErrors()->push_back(truncateInnerError(InnerErrors().back()));
+        copiedInnerErrors.push_back(truncateInnerError(innerErrors.back()));
     }
 
     return TError(std::move(result));
 }
 
-TError TError::Truncate(int maxInnerErrorCount, i64 stringLimit, const THashSet<TStringBuf>& attributeWhitelist) &&
+TError TError::Truncate(
+    int maxInnerErrorCount,
+    i64 stringLimit,
+    const THashSet<TStringBuf>& attributeWhitelist) &&
 {
     if (!Impl_) {
         return TError();
@@ -711,14 +774,12 @@ TError TError::Truncate(int maxInnerErrorCount, i64 stringLimit, const THashSet<
             truncateInnerError(innerError);
         }
     } else {
-        auto& innerErrors = *MutableInnerErrors();
+        auto& innerErrors = ApplyWhitelist(*MutableInnerErrors(), attributeWhitelist, maxInnerErrorCount);
         MutableAttributes()->Set(InnerErrorsTruncatedKey, true);
-        for (int i = 0; i + 1 < maxInnerErrorCount; ++i) {
-            truncateInnerError(innerErrors[i]);
+
+        for (auto& innerError : innerErrors) {
+            truncateInnerError(innerError);
         }
-        truncateInnerError(innerErrors.back());
-        innerErrors[maxInnerErrorCount - 1] = std::move(innerErrors.back());
-        innerErrors.resize(maxInnerErrorCount);
     }
 
     return std::move(*this);
diff --git a/yt/yt/core/misc/error_helpers-inl.h b/yt/yt/core/misc/error_helpers-inl.h
new file mode 100644
index 0000000000..d15c5f6f93
--- /dev/null
+++ b/yt/yt/core/misc/error_helpers-inl.h
@@ -0,0 +1,37 @@
+#ifndef ERROR_HELPERS_INL_H_
+#error "Direct inclusion of this file is not allowed, include error_helpers.h"
+// For the sake of sane code completion.
+#include "error_helpers.h"
+#endif
+
+namespace NYT {
+
+////////////////////////////////////////////////////////////////////////////////
+
+template <class T>
+typename TOptionalTraits<T>::TOptional FindAttribute(const TError& error, TStringBuf key)
+{
+    return error.Attributes().Find<T>(key);
+}
+
+template <class T>
+typename TOptionalTraits<T>::TOptional FindAttributeRecursive(const TError& error, TStringBuf key)
+{
+    auto attr = FindAttribute<T>(error, key);
+    if (TOptionalTraits<T>::HasValue(attr)) {
+        return attr;
+    }
+
+    for (const auto& inner : error.InnerErrors()) {
+        attr = FindAttribute<T>(inner, key);
+        if (TOptionalTraits<T>::HasValue(attr)) {
+            return attr;
+        }
+    }
+
+    return TOptionalTraits<T>::Empty();
+}
+
+////////////////////////////////////////////////////////////////////////////////
+
+} // namespace NYT
diff --git a/yt/yt/core/misc/error_helpers.h b/yt/yt/core/misc/error_helpers.h
new file mode 100644
index 0000000000..5eda19e4bf
--- /dev/null
+++ b/yt/yt/core/misc/error_helpers.h
@@ -0,0 +1,27 @@
+#pragma once
+
+#include "error.h"
+
+#include <yt/yt/core/ytree/attributes.h>
+
+#include <library/cpp/yt/misc/optional.h>
+
+namespace NYT {
+
+// NB: Methods below are listed in a separate file and not in error.h to prevent
+// circular includes cause by the fact that attributes include error.
+////////////////////////////////////////////////////////////////////////////////
+
+template <class T>
+typename TOptionalTraits<T>::TOptional FindAttribute(const TError& error, TStringBuf key);
+
+template <class T>
+typename TOptionalTraits<T>::TOptional FindAttributeRecursive(const TError& error, TStringBuf key);
+
+////////////////////////////////////////////////////////////////////////////////
+
+} // namespace NYT
+
+#define ERROR_HELPERS_INL_H_
+#include "error_helpers-inl.h"
+#undef ERROR_HELPERS_INL_H_
diff --git a/yt/yt/core/misc/unittests/error_ut.cpp b/yt/yt/core/misc/unittests/error_ut.cpp
index 6fc88ef8ab..9b33cb935c 100644
--- a/yt/yt/core/misc/unittests/error_ut.cpp
+++ b/yt/yt/core/misc/unittests/error_ut.cpp
@@ -2,6 +2,7 @@
 #include <yt/yt/core/test_framework/framework.h>
 
 #include <yt/yt/core/misc/error.h>
+#include <yt/yt/core/misc/error_helpers.h>
 
 #include <yt/yt/core/yson/string.h>
 
@@ -478,6 +479,25 @@ TEST(TErrorTest, FormatCtor)
     EXPECT_EQ("Some error hello", TError("Some error %v", "hello").GetMessage());
 }
 
+TEST(TErrorTest, FindRecursive)
+{
+    auto inner = TError("Inner")
+        << TErrorAttribute("inner_attr", 42);
+    auto error = TError("Error")
+        << inner
+        << TErrorAttribute("attr", 8);
+
+    auto attr = FindAttribute<int>(error, "attr");
+    EXPECT_TRUE(attr);
+    EXPECT_EQ(*attr, 8);
+
+    EXPECT_FALSE(FindAttribute<int>(error, "inner_attr"));
+
+    auto innerAttr = FindAttributeRecursive<int>(error, "inner_attr");
+    EXPECT_TRUE(innerAttr);
+    EXPECT_EQ(*innerAttr, 42);
+}
+
 TEST(TErrorTest, TruncateSimple)
 {
     auto error = TError("Some error")
@@ -653,6 +673,29 @@ TEST(TErrorTest, TruncateWhitelistInnerErrorsRValue)
     EXPECT_EQ("Some long long attr", truncatedInnerError.Attributes().Get<TString>("attr2"));
 }
 
+TEST(TErrorTest, TruncateWhitelistSaveInnerError)
+{
+    auto genericInner = TError("GenericInner");
+    auto whitelistedInner = TError("Inner")
+        << TErrorAttribute("whitelisted_key", 42);
+
+    auto error = TError("Error")
+        << (genericInner << TErrorAttribute("foo", "bar"))
+        << whitelistedInner
+        << genericInner;
+
+    error = std::move(error).Truncate(1, 20, {
+        "whitelisted_key"
+    });
+    EXPECT_TRUE(!error.IsOK());
+    EXPECT_EQ(error.InnerErrors().size(), 2u);
+    EXPECT_EQ(error.InnerErrors()[0], whitelistedInner);
+    EXPECT_EQ(error.InnerErrors()[1], genericInner);
+
+    EXPECT_TRUE(FindAttributeRecursive<int>(error, "whitelisted_key"));
+    EXPECT_FALSE(FindAttributeRecursive<int>(error, "foo"));
+}
+
 TEST(TErrorTest, YTExceptionToError)
 {
     try {
-- 
cgit v1.2.3


From afe9a2e8d0bd9c3e6c61ca56cb40ef9f108cfcd3 Mon Sep 17 00:00:00 2001
From: spreis <spreis@yandex-team.com>
Date: Thu, 11 Apr 2024 15:36:50 +0300
Subject: Make more readable b38a4ee8796e34e191d1dca393a381080e41544b

---
 build/platform/java/protoc/ya.make | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/build/platform/java/protoc/ya.make b/build/platform/java/protoc/ya.make
index a7384f6206..8fa09f14a7 100644
--- a/build/platform/java/protoc/ya.make
+++ b/build/platform/java/protoc/ya.make
@@ -1,8 +1,9 @@
 SET_RESOURCE_URI_FROM_JSON(SANDBOX_RESOURCE_URI ${ARCADIA_ROOT}/build/platform/java/protoc/resources.json)
 ENABLE(PREBUILT)
+
 PREBUILT_PROGRAM()
-IF (SANDBOX_RESOURCE_URI)
-DECLARE_EXTERNAL_RESOURCE(JAVA_PROTOC ${SANDBOX_RESOURCE_URI})
-PRIMARY_OUTPUT(${JAVA_PROTOC_RESOURCE_GLOBAL}/bin/protoc${MODULE_SUFFIX})
-ENDIF()
+  IF (SANDBOX_RESOURCE_URI)
+    DECLARE_EXTERNAL_RESOURCE(JAVA_PROTOC ${SANDBOX_RESOURCE_URI})
+    PRIMARY_OUTPUT(${JAVA_PROTOC_RESOURCE_GLOBAL}/bin/protoc${MODULE_SUFFIX})
+  ENDIF()
 END()
-- 
cgit v1.2.3


From 9b6896144521146a81c633555dd67ba846d5a98f Mon Sep 17 00:00:00 2001
From: robot-piglet <robot-piglet@yandex-team.com>
Date: Thu, 11 Apr 2024 17:06:57 +0300
Subject: Intermediate changes

---
 contrib/libs/pybind11/README.rst                   |   9 +-
 contrib/libs/pybind11/include/pybind11/cast.h      | 151 +++++++++++++++--
 .../libs/pybind11/include/pybind11/detail/class.h  |  31 ++--
 .../libs/pybind11/include/pybind11/detail/common.h |  20 ++-
 .../libs/pybind11/include/pybind11/detail/init.h   |   2 +-
 .../pybind11/include/pybind11/detail/internals.h   |  21 ++-
 .../include/pybind11/detail/type_caster_base.h     |  61 +++++--
 contrib/libs/pybind11/include/pybind11/gil.h       |  14 +-
 .../pybind11/include/pybind11/gil_safe_call_once.h |  91 +++++++++++
 contrib/libs/pybind11/include/pybind11/numpy.h     | 179 ++++++++++++++++++---
 contrib/libs/pybind11/include/pybind11/pybind11.h  | 169 +++++++++++++------
 contrib/libs/pybind11/include/pybind11/pytypes.h   |  27 +++-
 contrib/libs/pybind11/include/pybind11/typing.h    | 125 ++++++++++++++
 contrib/libs/pybind11/ya.make                      |   4 +-
 .../py3/matplotlib/backends/backend_webagg.py      |  22 ++-
 15 files changed, 800 insertions(+), 126 deletions(-)
 create mode 100644 contrib/libs/pybind11/include/pybind11/gil_safe_call_once.h
 create mode 100644 contrib/libs/pybind11/include/pybind11/typing.h

diff --git a/contrib/libs/pybind11/README.rst b/contrib/libs/pybind11/README.rst
index 80213a4062..4032f97a57 100644
--- a/contrib/libs/pybind11/README.rst
+++ b/contrib/libs/pybind11/README.rst
@@ -36,10 +36,10 @@ with everything stripped away that isn't relevant for binding
 generation. Without comments, the core header files only require ~4K
 lines of code and depend on Python (3.6+, or PyPy) and the C++
 standard library. This compact implementation was possible thanks to
-some of the new C++11 language features (specifically: tuples, lambda
-functions and variadic templates). Since its creation, this library has
-grown beyond Boost.Python in many ways, leading to dramatically simpler
-binding code in many common situations.
+some C++11 language features (specifically: tuples, lambda functions and
+variadic templates). Since its creation, this library has grown beyond
+Boost.Python in many ways, leading to dramatically simpler binding code in many
+common situations.
 
 Tutorial and reference documentation is provided at
 `pybind11.readthedocs.io <https://pybind11.readthedocs.io/en/latest>`_.
@@ -71,6 +71,7 @@ pybind11 can map the following core C++ features to Python:
 - Internal references with correct reference counting
 - C++ classes with virtual (and pure virtual) methods can be extended
   in Python
+- Integrated NumPy support (NumPy 2 requires pybind11 2.12+)
 
 Goodies
 -------
diff --git a/contrib/libs/pybind11/include/pybind11/cast.h b/contrib/libs/pybind11/include/pybind11/cast.h
index aa7dd494ad..6a37d265c0 100644
--- a/contrib/libs/pybind11/include/pybind11/cast.h
+++ b/contrib/libs/pybind11/include/pybind11/cast.h
@@ -43,13 +43,15 @@ using make_caster = type_caster<intrinsic_t<type>>;
 // Shortcut for calling a caster's `cast_op_type` cast operator for casting a type_caster to a T
 template <typename T>
 typename make_caster<T>::template cast_op_type<T> cast_op(make_caster<T> &caster) {
-    return caster.operator typename make_caster<T>::template cast_op_type<T>();
+    using result_t = typename make_caster<T>::template cast_op_type<T>; // See PR #4893
+    return caster.operator result_t();
 }
 template <typename T>
 typename make_caster<T>::template cast_op_type<typename std::add_rvalue_reference<T>::type>
 cast_op(make_caster<T> &&caster) {
-    return std::move(caster).operator typename make_caster<T>::
-        template cast_op_type<typename std::add_rvalue_reference<T>::type>();
+    using result_t = typename make_caster<T>::template cast_op_type<
+        typename std::add_rvalue_reference<T>::type>; // See PR #4893
+    return std::move(caster).operator result_t();
 }
 
 template <typename type>
@@ -326,8 +328,9 @@ public:
             value = false;
             return true;
         }
-        if (convert || (std::strcmp("numpy.bool_", Py_TYPE(src.ptr())->tp_name) == 0)) {
-            // (allow non-implicit conversion for numpy booleans)
+        if (convert || is_numpy_bool(src)) {
+            // (allow non-implicit conversion for numpy booleans), use strncmp
+            // since NumPy 1.x had an additional trailing underscore.
 
             Py_ssize_t res = -1;
             if (src.is_none()) {
@@ -359,6 +362,15 @@ public:
         return handle(src ? Py_True : Py_False).inc_ref();
     }
     PYBIND11_TYPE_CASTER(bool, const_name("bool"));
+
+private:
+    // Test if an object is a NumPy boolean (without fetching the type).
+    static inline bool is_numpy_bool(handle object) {
+        const char *type_name = Py_TYPE(object.ptr())->tp_name;
+        // Name changed to `numpy.bool` in NumPy 2, `numpy.bool_` is needed for 1.x support
+        return std::strcmp("numpy.bool", type_name) == 0
+               || std::strcmp("numpy.bool_", type_name) == 0;
+    }
 };
 
 // Helper class for UTF-{8,16,32} C++ stl strings:
@@ -687,8 +699,9 @@ public:
         return cast(*src, policy, parent);
     }
 
-    static constexpr auto name
-        = const_name("Tuple[") + concat(make_caster<Ts>::name...) + const_name("]");
+    static constexpr auto name = const_name("tuple[")
+                                 + ::pybind11::detail::concat(make_caster<Ts>::name...)
+                                 + const_name("]");
 
     template <typename T>
     using cast_op_type = type;
@@ -896,10 +909,53 @@ struct is_holder_type
 template <typename base, typename deleter>
 struct is_holder_type<base, std::unique_ptr<base, deleter>> : std::true_type {};
 
+#ifdef PYBIND11_DISABLE_HANDLE_TYPE_NAME_DEFAULT_IMPLEMENTATION // See PR #4888
+
+// This leads to compilation errors if a specialization is missing.
+template <typename T>
+struct handle_type_name;
+
+#else
+
 template <typename T>
 struct handle_type_name {
     static constexpr auto name = const_name<T>();
 };
+
+#endif
+
+template <>
+struct handle_type_name<object> {
+    static constexpr auto name = const_name("object");
+};
+template <>
+struct handle_type_name<list> {
+    static constexpr auto name = const_name("list");
+};
+template <>
+struct handle_type_name<dict> {
+    static constexpr auto name = const_name("dict");
+};
+template <>
+struct handle_type_name<anyset> {
+    static constexpr auto name = const_name("Union[set, frozenset]");
+};
+template <>
+struct handle_type_name<set> {
+    static constexpr auto name = const_name("set");
+};
+template <>
+struct handle_type_name<frozenset> {
+    static constexpr auto name = const_name("frozenset");
+};
+template <>
+struct handle_type_name<str> {
+    static constexpr auto name = const_name("str");
+};
+template <>
+struct handle_type_name<tuple> {
+    static constexpr auto name = const_name("tuple");
+};
 template <>
 struct handle_type_name<bool_> {
     static constexpr auto name = const_name("bool");
@@ -909,6 +965,10 @@ struct handle_type_name<bytes> {
     static constexpr auto name = const_name(PYBIND11_BYTES_NAME);
 };
 template <>
+struct handle_type_name<buffer> {
+    static constexpr auto name = const_name("Buffer");
+};
+template <>
 struct handle_type_name<int_> {
     static constexpr auto name = const_name("int");
 };
@@ -925,10 +985,50 @@ struct handle_type_name<float_> {
     static constexpr auto name = const_name("float");
 };
 template <>
+struct handle_type_name<function> {
+    static constexpr auto name = const_name("Callable");
+};
+template <>
+struct handle_type_name<handle> {
+    static constexpr auto name = handle_type_name<object>::name;
+};
+template <>
 struct handle_type_name<none> {
     static constexpr auto name = const_name("None");
 };
 template <>
+struct handle_type_name<sequence> {
+    static constexpr auto name = const_name("Sequence");
+};
+template <>
+struct handle_type_name<bytearray> {
+    static constexpr auto name = const_name("bytearray");
+};
+template <>
+struct handle_type_name<memoryview> {
+    static constexpr auto name = const_name("memoryview");
+};
+template <>
+struct handle_type_name<slice> {
+    static constexpr auto name = const_name("slice");
+};
+template <>
+struct handle_type_name<type> {
+    static constexpr auto name = const_name("type");
+};
+template <>
+struct handle_type_name<capsule> {
+    static constexpr auto name = const_name("capsule");
+};
+template <>
+struct handle_type_name<ellipsis> {
+    static constexpr auto name = const_name("ellipsis");
+};
+template <>
+struct handle_type_name<weakref> {
+    static constexpr auto name = const_name("weakref");
+};
+template <>
 struct handle_type_name<args> {
     static constexpr auto name = const_name("*args");
 };
@@ -936,6 +1036,30 @@ template <>
 struct handle_type_name<kwargs> {
     static constexpr auto name = const_name("**kwargs");
 };
+template <>
+struct handle_type_name<obj_attr_accessor> {
+    static constexpr auto name = const_name<obj_attr_accessor>();
+};
+template <>
+struct handle_type_name<str_attr_accessor> {
+    static constexpr auto name = const_name<str_attr_accessor>();
+};
+template <>
+struct handle_type_name<item_accessor> {
+    static constexpr auto name = const_name<item_accessor>();
+};
+template <>
+struct handle_type_name<sequence_accessor> {
+    static constexpr auto name = const_name<sequence_accessor>();
+};
+template <>
+struct handle_type_name<list_accessor> {
+    static constexpr auto name = const_name<list_accessor>();
+};
+template <>
+struct handle_type_name<tuple_accessor> {
+    static constexpr auto name = const_name<tuple_accessor>();
+};
 
 template <typename type>
 struct pyobject_caster {
@@ -1416,7 +1540,15 @@ inline namespace literals {
 /** \rst
     String literal version of `arg`
  \endrst */
-constexpr arg operator"" _a(const char *name, size_t) { return arg(name); }
+constexpr arg
+#if !defined(__clang__) && defined(__GNUC__) && __GNUC__ < 5
+operator"" _a // gcc 4.8.5 insists on having a space (hard error).
+#else
+operator""_a // clang 17 generates a deprecation warning if there is a space.
+#endif
+    (const char *name, size_t) {
+    return arg(name);
+}
 } // namespace literals
 
 PYBIND11_NAMESPACE_BEGIN(detail)
@@ -1477,7 +1609,8 @@ public:
     static_assert(args_pos == -1 || args_pos == constexpr_first<argument_is_args, Args...>(),
                   "py::args cannot be specified more than once");
 
-    static constexpr auto arg_names = concat(type_descr(make_caster<Args>::name)...);
+    static constexpr auto arg_names
+        = ::pybind11::detail::concat(type_descr(make_caster<Args>::name)...);
 
     bool load_args(function_call &call) { return load_impl_sequence(call, indices{}); }
 
diff --git a/contrib/libs/pybind11/include/pybind11/detail/class.h b/contrib/libs/pybind11/include/pybind11/detail/class.h
index fd192530b5..2657148af2 100644
--- a/contrib/libs/pybind11/include/pybind11/detail/class.h
+++ b/contrib/libs/pybind11/include/pybind11/detail/class.h
@@ -86,17 +86,16 @@ inline PyTypeObject *make_static_property_type() {
     type->tp_descr_get = pybind11_static_get;
     type->tp_descr_set = pybind11_static_set;
 
-    if (PyType_Ready(type) < 0) {
-        pybind11_fail("make_static_property_type(): failure in PyType_Ready()!");
-    }
-
 #    if PY_VERSION_HEX >= 0x030C0000
-    // PRE 3.12 FEATURE FREEZE. PLEASE REVIEW AFTER FREEZE.
     // Since Python-3.12 property-derived types are required to
     // have dynamic attributes (to set `__doc__`)
     enable_dynamic_attributes(heap_type);
 #    endif
 
+    if (PyType_Ready(type) < 0) {
+        pybind11_fail("make_static_property_type(): failure in PyType_Ready()!");
+    }
+
     setattr((PyObject *) type, "__module__", str("pybind11_builtins"));
     PYBIND11_SET_OLDPY_QUALNAME(type, name_obj);
 
@@ -191,12 +190,10 @@ extern "C" inline PyObject *pybind11_meta_call(PyObject *type, PyObject *args, P
         return nullptr;
     }
 
-    // This must be a pybind11 instance
-    auto *instance = reinterpret_cast<detail::instance *>(self);
-
     // Ensure that the base __init__ function(s) were called
-    for (const auto &vh : values_and_holders(instance)) {
-        if (!vh.holder_constructed()) {
+    values_and_holders vhs(self);
+    for (const auto &vh : vhs) {
+        if (!vh.holder_constructed() && !vhs.is_redundant_value_and_holder(vh)) {
             PyErr_Format(PyExc_TypeError,
                          "%.200s.__init__() must be called when overriding __init__",
                          get_fully_qualified_tp_name(vh.type->type).c_str());
@@ -379,7 +376,7 @@ extern "C" inline PyObject *pybind11_object_new(PyTypeObject *type, PyObject *,
 extern "C" inline int pybind11_object_init(PyObject *self, PyObject *, PyObject *) {
     PyTypeObject *type = Py_TYPE(self);
     std::string msg = get_fully_qualified_tp_name(type) + ": No constructor defined!";
-    PyErr_SetString(PyExc_TypeError, msg.c_str());
+    set_error(PyExc_TypeError, msg.c_str());
     return -1;
 }
 
@@ -553,8 +550,12 @@ extern "C" inline int pybind11_set_dict(PyObject *self, PyObject *new_dict, void
 
 /// dynamic_attr: Allow the garbage collector to traverse the internal instance `__dict__`.
 extern "C" inline int pybind11_traverse(PyObject *self, visitproc visit, void *arg) {
+#if PY_VERSION_HEX >= 0x030D0000
+    PyObject_VisitManagedDict(self, visit, arg);
+#else
     PyObject *&dict = *_PyObject_GetDictPtr(self);
     Py_VISIT(dict);
+#endif
 // https://docs.python.org/3/c-api/typeobj.html#c.PyTypeObject.tp_traverse
 #if PY_VERSION_HEX >= 0x03090000
     Py_VISIT(Py_TYPE(self));
@@ -564,8 +565,12 @@ extern "C" inline int pybind11_traverse(PyObject *self, visitproc visit, void *a
 
 /// dynamic_attr: Allow the GC to clear the dictionary.
 extern "C" inline int pybind11_clear(PyObject *self) {
+#if PY_VERSION_HEX >= 0x030D0000
+    PyObject_ClearManagedDict(self);
+#else
     PyObject *&dict = *_PyObject_GetDictPtr(self);
     Py_CLEAR(dict);
+#endif
     return 0;
 }
 
@@ -615,7 +620,7 @@ extern "C" inline int pybind11_getbuffer(PyObject *obj, Py_buffer *view, int fla
         if (view) {
             view->obj = nullptr;
         }
-        PyErr_SetString(PyExc_BufferError, "pybind11_getbuffer(): Internal error");
+        set_error(PyExc_BufferError, "pybind11_getbuffer(): Internal error");
         return -1;
     }
     std::memset(view, 0, sizeof(Py_buffer));
@@ -623,7 +628,7 @@ extern "C" inline int pybind11_getbuffer(PyObject *obj, Py_buffer *view, int fla
     if ((flags & PyBUF_WRITABLE) == PyBUF_WRITABLE && info->readonly) {
         delete info;
         // view->obj = nullptr;  // Was just memset to 0, so not necessary
-        PyErr_SetString(PyExc_BufferError, "Writable buffer requested for readonly storage");
+        set_error(PyExc_BufferError, "Writable buffer requested for readonly storage");
         return -1;
     }
     view->obj = obj;
diff --git a/contrib/libs/pybind11/include/pybind11/detail/common.h b/contrib/libs/pybind11/include/pybind11/detail/common.h
index 601408153a..f14ea1238f 100644
--- a/contrib/libs/pybind11/include/pybind11/detail/common.h
+++ b/contrib/libs/pybind11/include/pybind11/detail/common.h
@@ -10,12 +10,12 @@
 #pragma once
 
 #define PYBIND11_VERSION_MAJOR 2
-#define PYBIND11_VERSION_MINOR 11
-#define PYBIND11_VERSION_PATCH 1
+#define PYBIND11_VERSION_MINOR 12
+#define PYBIND11_VERSION_PATCH 0
 
 // Similar to Python's convention: https://docs.python.org/3/c-api/apiabiversion.html
 // Additional convention: 0xD = dev
-#define PYBIND11_VERSION_HEX 0x020B0100
+#define PYBIND11_VERSION_HEX 0x020C0000
 
 // Define some generic pybind11 helper macros for warning management.
 //
@@ -118,6 +118,14 @@
 #    endif
 #endif
 
+#if defined(PYBIND11_CPP20)
+#    define PYBIND11_CONSTINIT constinit
+#    define PYBIND11_DTOR_CONSTEXPR constexpr
+#else
+#    define PYBIND11_CONSTINIT
+#    define PYBIND11_DTOR_CONSTEXPR
+#endif
+
 // Compiler version assertions
 #if defined(__INTEL_COMPILER)
 #    if __INTEL_COMPILER < 1800
@@ -285,6 +293,10 @@ PYBIND11_WARNING_DISABLE_MSVC(4505)
 #    undef copysign
 #endif
 
+#if defined(PYBIND11_NUMPY_1_ONLY)
+#    define PYBIND11_INTERNAL_NUMPY_1_ONLY_DETECTED
+#endif
+
 #if defined(PYPY_VERSION) && !defined(PYBIND11_SIMPLE_GIL_MANAGEMENT)
 #    define PYBIND11_SIMPLE_GIL_MANAGEMENT
 #endif
@@ -433,7 +445,7 @@ PYBIND11_WARNING_POP
             return nullptr;                                                                       \
         }                                                                                         \
         catch (const std::exception &e) {                                                         \
-            PyErr_SetString(PyExc_ImportError, e.what());                                         \
+            ::pybind11::set_error(PyExc_ImportError, e.what());                                   \
             return nullptr;                                                                       \
         }
 
diff --git a/contrib/libs/pybind11/include/pybind11/detail/init.h b/contrib/libs/pybind11/include/pybind11/detail/init.h
index ca5a5178c8..89a471f5b4 100644
--- a/contrib/libs/pybind11/include/pybind11/detail/init.h
+++ b/contrib/libs/pybind11/include/pybind11/detail/init.h
@@ -65,7 +65,7 @@ constexpr bool is_alias(void *) {
 }
 
 // Constructs and returns a new object; if the given arguments don't map to a constructor, we fall
-// back to brace aggregate initiailization so that for aggregate initialization can be used with
+// back to brace aggregate initialization so that for aggregate initialization can be used with
 // py::init, e.g.  `py::init<int, int>` to initialize a `struct T { int a; int b; }`.  For
 // non-aggregate types, we need to use an ordinary T(...) constructor (invoking as `T{...}` usually
 // works, but will not do the expected thing when `T` has an `initializer_list<T>` constructor).
diff --git a/contrib/libs/pybind11/include/pybind11/detail/internals.h b/contrib/libs/pybind11/include/pybind11/detail/internals.h
index 5f4ba6959a..049dbcaa19 100644
--- a/contrib/libs/pybind11/include/pybind11/detail/internals.h
+++ b/contrib/libs/pybind11/include/pybind11/detail/internals.h
@@ -36,8 +36,9 @@
 /// further ABI-incompatible changes may be made before the ABI is officially
 /// changed to the new version.
 #ifndef PYBIND11_INTERNALS_VERSION
-#    if PY_VERSION_HEX >= 0x030C0000
+#    if PY_VERSION_HEX >= 0x030C0000 || defined(_MSC_VER)
 // Version bump for Python 3.12+, before first 3.12 beta release.
+// Version bump for MSVC piggy-backed on PR #4779. See comments there.
 #        define PYBIND11_INTERNALS_VERSION 5
 #    else
 #        define PYBIND11_INTERNALS_VERSION 4
@@ -68,9 +69,14 @@ inline PyObject *make_object_base_type(PyTypeObject *metaclass);
 // `Py_LIMITED_API` anyway.
 #    if PYBIND11_INTERNALS_VERSION > 4
 #        define PYBIND11_TLS_KEY_REF Py_tss_t &
-#        if defined(__GNUC__) && !defined(__INTEL_COMPILER)
-// Clang on macOS warns due to `Py_tss_NEEDS_INIT` not specifying an initializer
-// for every field.
+#        if defined(__clang__)
+#            define PYBIND11_TLS_KEY_INIT(var)                                                    \
+                _Pragma("clang diagnostic push")                                         /**/     \
+                    _Pragma("clang diagnostic ignored \"-Wmissing-field-initializers\"") /**/     \
+                    Py_tss_t var                                                                  \
+                    = Py_tss_NEEDS_INIT;                                                          \
+                _Pragma("clang diagnostic pop")
+#        elif defined(__GNUC__) && !defined(__INTEL_COMPILER)
 #            define PYBIND11_TLS_KEY_INIT(var)                                                    \
                 _Pragma("GCC diagnostic push")                                         /**/       \
                     _Pragma("GCC diagnostic ignored \"-Wmissing-field-initializers\"") /**/       \
@@ -293,9 +299,12 @@ struct type_info {
 #endif
 
 /// On Linux/OSX, changes in __GXX_ABI_VERSION__ indicate ABI incompatibility.
+/// On MSVC, changes in _MSC_VER may indicate ABI incompatibility (#2898).
 #ifndef PYBIND11_BUILD_ABI
 #    if defined(__GXX_ABI_VERSION)
 #        define PYBIND11_BUILD_ABI "_cxxabi" PYBIND11_TOSTRING(__GXX_ABI_VERSION)
+#    elif defined(_MSC_VER)
+#        define PYBIND11_BUILD_ABI "_mscver" PYBIND11_TOSTRING(_MSC_VER)
 #    else
 #        define PYBIND11_BUILD_ABI ""
 #    endif
@@ -365,7 +374,7 @@ inline bool raise_err(PyObject *exc_type, const char *msg) {
         return true;
     }
 #endif
-    PyErr_SetString(exc_type, msg);
+    set_error(exc_type, msg);
     return false;
 }
 
@@ -462,6 +471,7 @@ inline object get_python_state_dict() {
     if (!state_dict) {
 #if PY_VERSION_HEX >= 0x03030000
         raise_from(PyExc_SystemError, "pybind11::detail::get_python_state_dict() FAILED");
+        throw error_already_set();
 #else
         PyErr_SetString(PyExc_SystemError, "pybind11::detail::get_python_state_dict() FAILED");
 #endif
@@ -478,6 +488,7 @@ inline internals **get_internals_pp_from_capsule(handle obj) {
     if (raw_ptr == nullptr) {
 #if PY_VERSION_HEX >= 0x03030000
         raise_from(PyExc_SystemError, "pybind11::detail::get_internals_pp_from_capsule() FAILED");
+        throw error_already_set();
 #else
         PyErr_SetString(PyExc_SystemError, "pybind11::detail::get_internals_pp_from_capsule() FAILED");
 #endif
diff --git a/contrib/libs/pybind11/include/pybind11/detail/type_caster_base.h b/contrib/libs/pybind11/include/pybind11/detail/type_caster_base.h
index 245bf99d2d..4d5e322c2b 100644
--- a/contrib/libs/pybind11/include/pybind11/detail/type_caster_base.h
+++ b/contrib/libs/pybind11/include/pybind11/detail/type_caster_base.h
@@ -103,8 +103,22 @@ public:
 inline std::pair<decltype(internals::registered_types_py)::iterator, bool>
 all_type_info_get_cache(PyTypeObject *type);
 
+// Band-aid workaround to fix a subtle but serious bug in a minimalistic fashion. See PR #4762.
+inline void all_type_info_add_base_most_derived_first(std::vector<type_info *> &bases,
+                                                      type_info *addl_base) {
+    for (auto it = bases.begin(); it != bases.end(); it++) {
+        type_info *existing_base = *it;
+        if (PyType_IsSubtype(addl_base->type, existing_base->type) != 0) {
+            bases.insert(it, addl_base);
+            return;
+        }
+    }
+    bases.push_back(addl_base);
+}
+
 // Populates a just-created cache entry.
 PYBIND11_NOINLINE void all_type_info_populate(PyTypeObject *t, std::vector<type_info *> &bases) {
+    assert(bases.empty());
     std::vector<PyTypeObject *> check;
     for (handle parent : reinterpret_borrow<tuple>(t->tp_bases)) {
         check.push_back((PyTypeObject *) parent.ptr());
@@ -137,7 +151,7 @@ PYBIND11_NOINLINE void all_type_info_populate(PyTypeObject *t, std::vector<type_
                     }
                 }
                 if (!found) {
-                    bases.push_back(tinfo);
+                    all_type_info_add_base_most_derived_first(bases, tinfo);
                 }
             }
         } else if (type->tp_bases) {
@@ -323,18 +337,29 @@ public:
     explicit values_and_holders(instance *inst)
         : inst{inst}, tinfo(all_type_info(Py_TYPE(inst))) {}
 
+    explicit values_and_holders(PyObject *obj)
+        : inst{nullptr}, tinfo(all_type_info(Py_TYPE(obj))) {
+        if (!tinfo.empty()) {
+            inst = reinterpret_cast<instance *>(obj);
+        }
+    }
+
     struct iterator {
     private:
         instance *inst = nullptr;
         const type_vec *types = nullptr;
         value_and_holder curr;
         friend struct values_and_holders;
-        iterator(instance *inst, const type_vec *tinfo)
-            : inst{inst}, types{tinfo},
-              curr(inst /* instance */,
-                   types->empty() ? nullptr : (*types)[0] /* type info */,
-                   0, /* vpos: (non-simple types only): the first vptr comes first */
-                   0 /* index */) {}
+        iterator(instance *inst, const type_vec *tinfo) : inst{inst}, types{tinfo} {
+            if (inst != nullptr) {
+                assert(!types->empty());
+                curr = value_and_holder(
+                    inst /* instance */,
+                    (*types)[0] /* type info */,
+                    0, /* vpos: (non-simple types only): the first vptr comes first */
+                    0 /* index */);
+            }
+        }
         // Past-the-end iterator:
         explicit iterator(size_t end) : curr(end) {}
 
@@ -365,6 +390,16 @@ public:
     }
 
     size_t size() { return tinfo.size(); }
+
+    // Band-aid workaround to fix a subtle but serious bug in a minimalistic fashion. See PR #4762.
+    bool is_redundant_value_and_holder(const value_and_holder &vh) {
+        for (size_t i = 0; i < vh.index; i++) {
+            if (PyType_IsSubtype(tinfo[i]->type, tinfo[vh.index]->type) != 0) {
+                return true;
+            }
+        }
+        return false;
+    }
 };
 
 /**
@@ -496,8 +531,10 @@ inline PyThreadState *get_thread_state_unchecked() {
     return PyThreadState_GET();
 #elif PY_VERSION_HEX < 0x03000000
     return _PyThreadState_Current;
-#else
+#elif PY_VERSION_HEX < 0x030D0000
     return _PyThreadState_UncheckedGet();
+#else
+    return PyThreadState_GetUnchecked();
 #endif
 }
 
@@ -796,7 +833,7 @@ public:
         std::string tname = rtti_type ? rtti_type->name() : cast_type.name();
         detail::clean_type_id(tname);
         std::string msg = "Unregistered type : " + tname;
-        PyErr_SetString(PyExc_TypeError, msg.c_str());
+        set_error(PyExc_TypeError, msg.c_str());
         return {nullptr, nullptr};
     }
 
@@ -1174,13 +1211,17 @@ protected:
     static Constructor make_move_constructor(...) { return nullptr; }
 };
 
+inline std::string quote_cpp_type_name(const std::string &cpp_type_name) {
+    return cpp_type_name; // No-op for now. See PR #4888
+}
+
 PYBIND11_NOINLINE std::string type_info_description(const std::type_info &ti) {
     if (auto *type_data = get_type_info(ti)) {
         handle th((PyObject *) type_data->type);
         return th.attr("__module__").cast<std::string>() + '.'
                + th.attr("__qualname__").cast<std::string>();
     }
-    return clean_type_id(ti.name());
+    return quote_cpp_type_name(clean_type_id(ti.name()));
 }
 
 PYBIND11_NAMESPACE_END(detail)
diff --git a/contrib/libs/pybind11/include/pybind11/gil.h b/contrib/libs/pybind11/include/pybind11/gil.h
index 570a5581d5..b9d8b88a3b 100644
--- a/contrib/libs/pybind11/include/pybind11/gil.h
+++ b/contrib/libs/pybind11/include/pybind11/gil.h
@@ -11,6 +11,8 @@
 
 #include "detail/common.h"
 
+#include <cassert>
+
 #if defined(WITH_THREAD) && !defined(PYBIND11_SIMPLE_GIL_MANAGEMENT)
 #    include "detail/internals.h"
 #endif
@@ -137,7 +139,11 @@ private:
 
 class gil_scoped_release {
 public:
+    // PRECONDITION: The GIL must be held when this constructor is called.
     explicit gil_scoped_release(bool disassoc = false) : disassoc(disassoc) {
+#ifdef PYBIND11_ASSERT_GIL_HELD_INCREF_DECREF
+        assert(PyGILState_Check());
+#endif
         // `get_internals()` must be called here unconditionally in order to initialize
         // `internals.tstate` for subsequent `gil_scoped_acquire` calls. Otherwise, an
         // initialization race could occur as multiple threads try `gil_scoped_acquire`.
@@ -201,7 +207,13 @@ class gil_scoped_release {
     PyThreadState *state;
 
 public:
-    gil_scoped_release() : state{PyEval_SaveThread()} {}
+    // PRECONDITION: The GIL must be held when this constructor is called.
+    gil_scoped_release() {
+#ifdef PYBIND11_ASSERT_GIL_HELD_INCREF_DECREF
+        assert(PyGILState_Check());
+#endif
+        state = PyEval_SaveThread();
+    }
     gil_scoped_release(const gil_scoped_release &) = delete;
     gil_scoped_release &operator=(const gil_scoped_release &) = delete;
     ~gil_scoped_release() { PyEval_RestoreThread(state); }
diff --git a/contrib/libs/pybind11/include/pybind11/gil_safe_call_once.h b/contrib/libs/pybind11/include/pybind11/gil_safe_call_once.h
new file mode 100644
index 0000000000..eaf84d16e8
--- /dev/null
+++ b/contrib/libs/pybind11/include/pybind11/gil_safe_call_once.h
@@ -0,0 +1,91 @@
+// Copyright (c) 2023 The pybind Community.
+
+#pragma once
+
+#include "detail/common.h"
+#include "gil.h"
+
+#include <cassert>
+#include <mutex>
+
+PYBIND11_NAMESPACE_BEGIN(PYBIND11_NAMESPACE)
+
+// Use the `gil_safe_call_once_and_store` class below instead of the naive
+//
+//   static auto imported_obj = py::module_::import("module_name"); // BAD, DO NOT USE!
+//
+// which has two serious issues:
+//
+//     1. Py_DECREF() calls potentially after the Python interpreter was finalized already, and
+//     2. deadlocks in multi-threaded processes (because of missing lock ordering).
+//
+// The following alternative avoids both problems:
+//
+//   PYBIND11_CONSTINIT static py::gil_safe_call_once_and_store<py::object> storage;
+//   auto &imported_obj = storage // Do NOT make this `static`!
+//       .call_once_and_store_result([]() {
+//           return py::module_::import("module_name");
+//       })
+//       .get_stored();
+//
+// The parameter of `call_once_and_store_result()` must be callable. It can make
+// CPython API calls, and in particular, it can temporarily release the GIL.
+//
+// `T` can be any C++ type, it does not have to involve CPython API types.
+//
+// The behavior with regard to signals, e.g. `SIGINT` (`KeyboardInterrupt`),
+// is not ideal. If the main thread is the one to actually run the `Callable`,
+// then a `KeyboardInterrupt` will interrupt it if it is running normal Python
+// code. The situation is different if a non-main thread runs the
+// `Callable`, and then the main thread starts waiting for it to complete:
+// a `KeyboardInterrupt` will not interrupt the non-main thread, but it will
+// get processed only when it is the main thread's turn again and it is running
+// normal Python code. However, this will be unnoticeable for quick call-once
+// functions, which is usually the case.
+template <typename T>
+class gil_safe_call_once_and_store {
+public:
+    // PRECONDITION: The GIL must be held when `call_once_and_store_result()` is called.
+    template <typename Callable>
+    gil_safe_call_once_and_store &call_once_and_store_result(Callable &&fn) {
+        if (!is_initialized_) { // This read is guarded by the GIL.
+            // Multiple threads may enter here, because the GIL is released in the next line and
+            // CPython API calls in the `fn()` call below may release and reacquire the GIL.
+            gil_scoped_release gil_rel; // Needed to establish lock ordering.
+            std::call_once(once_flag_, [&] {
+                // Only one thread will ever enter here.
+                gil_scoped_acquire gil_acq;
+                ::new (storage_) T(fn()); // fn may release, but will reacquire, the GIL.
+                is_initialized_ = true;   // This write is guarded by the GIL.
+            });
+            // All threads will observe `is_initialized_` as true here.
+        }
+        // Intentionally not returning `T &` to ensure the calling code is self-documenting.
+        return *this;
+    }
+
+    // This must only be called after `call_once_and_store_result()` was called.
+    T &get_stored() {
+        assert(is_initialized_);
+        PYBIND11_WARNING_PUSH
+#if !defined(__clang__) && defined(__GNUC__) && __GNUC__ < 5
+        // Needed for gcc 4.8.5
+        PYBIND11_WARNING_DISABLE_GCC("-Wstrict-aliasing")
+#endif
+        return *reinterpret_cast<T *>(storage_);
+        PYBIND11_WARNING_POP
+    }
+
+    constexpr gil_safe_call_once_and_store() = default;
+    PYBIND11_DTOR_CONSTEXPR ~gil_safe_call_once_and_store() = default;
+
+private:
+    alignas(T) char storage_[sizeof(T)] = {};
+    std::once_flag once_flag_ = {};
+    bool is_initialized_ = false;
+    // The `is_initialized_`-`storage_` pair is very similar to `std::optional`,
+    // but the latter does not have the triviality properties of former,
+    // therefore `std::optional` is not a viable alternative here.
+};
+
+PYBIND11_NAMESPACE_END(PYBIND11_NAMESPACE)
diff --git a/contrib/libs/pybind11/include/pybind11/numpy.h b/contrib/libs/pybind11/include/pybind11/numpy.h
index 8162908edd..b0af0a42ec 100644
--- a/contrib/libs/pybind11/include/pybind11/numpy.h
+++ b/contrib/libs/pybind11/include/pybind11/numpy.h
@@ -10,7 +10,10 @@
 #pragma once
 
 #include "pybind11.h"
+#include "detail/common.h"
 #include "complex.h"
+#include "gil_safe_call_once.h"
+#include "pytypes.h"
 
 #include <algorithm>
 #include <array>
@@ -26,10 +29,15 @@
 #include <utility>
 #include <vector>
 
+#if defined(PYBIND11_NUMPY_1_ONLY) && !defined(PYBIND11_INTERNAL_NUMPY_1_ONLY_DETECTED)
+#    error PYBIND11_NUMPY_1_ONLY must be defined before any pybind11 header is included.
+#endif
+
 /* This will be true on all flat address space platforms and allows us to reduce the
    whole npy_intp / ssize_t / Py_intptr_t business down to just ssize_t for all size
    and dimension types (e.g. shape, strides, indexing), instead of inflicting this
-   upon the library user. */
+   upon the library user.
+   Note that NumPy 2 now uses ssize_t for `npy_intp` to simplify this. */
 static_assert(sizeof(::pybind11::ssize_t) == sizeof(Py_intptr_t), "ssize_t != Py_intptr_t");
 static_assert(std::is_signed<Py_intptr_t>::value, "Py_intptr_t must be signed");
 // We now can reinterpret_cast between py::ssize_t and Py_intptr_t (MSVC + PyPy cares)
@@ -38,10 +46,16 @@ PYBIND11_NAMESPACE_BEGIN(PYBIND11_NAMESPACE)
 
 PYBIND11_WARNING_DISABLE_MSVC(4127)
 
+class dtype; // Forward declaration
 class array; // Forward declaration
 
 PYBIND11_NAMESPACE_BEGIN(detail)
 
+template <>
+struct handle_type_name<dtype> {
+    static constexpr auto name = const_name("numpy.dtype");
+};
+
 template <>
 struct handle_type_name<array> {
     static constexpr auto name = const_name("numpy.ndarray");
@@ -50,7 +64,8 @@ struct handle_type_name<array> {
 template <typename type, typename SFINAE = void>
 struct npy_format_descriptor;
 
-struct PyArrayDescr_Proxy {
+/* NumPy 1 proxy (always includes legacy fields) */
+struct PyArrayDescr1_Proxy {
     PyObject_HEAD
     PyObject *typeobj;
     char kind;
@@ -65,6 +80,43 @@ struct PyArrayDescr_Proxy {
     PyObject *names;
 };
 
+#ifndef PYBIND11_NUMPY_1_ONLY
+struct PyArrayDescr_Proxy {
+    PyObject_HEAD
+    PyObject *typeobj;
+    char kind;
+    char type;
+    char byteorder;
+    char _former_flags;
+    int type_num;
+    /* Additional fields are NumPy version specific. */
+};
+#else
+/* NumPy 1.x only, we can expose all fields */
+using PyArrayDescr_Proxy = PyArrayDescr1_Proxy;
+#endif
+
+/* NumPy 2 proxy, including legacy fields */
+struct PyArrayDescr2_Proxy {
+    PyObject_HEAD
+    PyObject *typeobj;
+    char kind;
+    char type;
+    char byteorder;
+    char _former_flags;
+    int type_num;
+    std::uint64_t flags;
+    ssize_t elsize;
+    ssize_t alignment;
+    PyObject *metadata;
+    Py_hash_t hash;
+    void *reserved_null[2];
+    /* The following fields only exist if 0 <= type_num < 2056 */
+    char *subarray;
+    PyObject *fields;
+    PyObject *names;
+};
+
 struct PyArray_Proxy {
     PyObject_HEAD
     char *data;
@@ -120,6 +172,28 @@ inline numpy_internals &get_numpy_internals() {
     return *ptr;
 }
 
+PYBIND11_NOINLINE module_ import_numpy_core_submodule(const char *submodule_name) {
+    module_ numpy = module_::import("numpy");
+    str version_string = numpy.attr("__version__");
+
+    module_ numpy_lib = module_::import("numpy.lib");
+    object numpy_version = numpy_lib.attr("NumpyVersion")(version_string);
+    int major_version = numpy_version.attr("major").cast<int>();
+
+#ifdef PYBIND11_NUMPY_1_ONLY
+    if (major_version >= 2) {
+        throw std::runtime_error(
+            "This extension was built with PYBIND11_NUMPY_1_ONLY defined, "
+            "but NumPy 2 is used in this process. For NumPy2 compatibility, "
+            "this extension needs to be rebuilt without the PYBIND11_NUMPY_1_ONLY define.");
+    }
+#endif
+    /* `numpy.core` was renamed to `numpy._core` in NumPy 2.0 as it officially
+        became a private module. */
+    std::string numpy_core_path = major_version >= 2 ? "numpy._core" : "numpy.core";
+    return module_::import((numpy_core_path + "." + submodule_name).c_str());
+}
+
 template <typename T>
 struct same_size {
     template <typename U>
@@ -186,14 +260,16 @@ struct npy_api {
             NPY_ULONG_, NPY_ULONGLONG_, NPY_UINT_),
     };
 
+    unsigned int PyArray_RUNTIME_VERSION_;
+
     struct PyArray_Dims {
         Py_intptr_t *ptr;
         int len;
     };
 
     static npy_api &get() {
-        static npy_api api = lookup();
-        return api;
+        PYBIND11_CONSTINIT static gil_safe_call_once_and_store<npy_api> storage;
+        return storage.call_once_and_store_result(lookup).get_stored();
     }
 
     bool PyArray_Check_(PyObject *obj) const {
@@ -224,6 +300,7 @@ struct npy_api {
     PyObject *(*PyArray_FromAny_)(PyObject *, PyObject *, int, int, int, PyObject *);
     int (*PyArray_DescrConverter_)(PyObject *, PyObject **);
     bool (*PyArray_EquivTypes_)(PyObject *, PyObject *);
+#ifdef PYBIND11_NUMPY_1_ONLY
     int (*PyArray_GetArrayParamsFromObject_)(PyObject *,
                                              PyObject *,
                                              unsigned char,
@@ -232,6 +309,7 @@ struct npy_api {
                                              Py_intptr_t *,
                                              PyObject **,
                                              PyObject *);
+#endif
     PyObject *(*PyArray_Squeeze_)(PyObject *);
     // Unused. Not removed because that affects ABI of the class.
     int (*PyArray_SetBaseObject_)(PyObject *, PyObject *);
@@ -249,7 +327,8 @@ private:
         API_PyArray_DescrFromScalar = 57,
         API_PyArray_FromAny = 69,
         API_PyArray_Resize = 80,
-        API_PyArray_CopyInto = 82,
+        // CopyInto was slot 82 and 50 was effectively an alias. NumPy 2 removed 82.
+        API_PyArray_CopyInto = 50,
         API_PyArray_NewCopy = 85,
         API_PyArray_NewFromDescr = 94,
         API_PyArray_DescrNewFromType = 96,
@@ -258,22 +337,29 @@ private:
         API_PyArray_View = 137,
         API_PyArray_DescrConverter = 174,
         API_PyArray_EquivTypes = 182,
+#ifdef PYBIND11_NUMPY_1_ONLY
         API_PyArray_GetArrayParamsFromObject = 278,
+#endif
         API_PyArray_SetBaseObject = 282
     };
 
     static npy_api lookup() {
-        module_ m = module_::import("numpy.core.multiarray");
+        module_ m = detail::import_numpy_core_submodule("multiarray");
         auto c = m.attr("_ARRAY_API");
 #if PY_MAJOR_VERSION >= 3
         void **api_ptr = (void **) PyCapsule_GetPointer(c.ptr(), nullptr);
 #else
         void **api_ptr = (void **) PyCObject_AsVoidPtr(c.ptr());
 #endif
+        if (api_ptr == nullptr) {
+            raise_from(PyExc_SystemError, "FAILURE obtaining numpy _ARRAY_API pointer.");
+            throw error_already_set();
+        }
         npy_api api;
 #define DECL_NPY_API(Func) api.Func##_ = (decltype(api.Func##_)) api_ptr[API_##Func];
         DECL_NPY_API(PyArray_GetNDArrayCFeatureVersion);
-        if (api.PyArray_GetNDArrayCFeatureVersion_() < 0x7) {
+        api.PyArray_RUNTIME_VERSION_ = api.PyArray_GetNDArrayCFeatureVersion_();
+        if (api.PyArray_RUNTIME_VERSION_ < 0x7) {
             pybind11_fail("pybind11 numpy support requires numpy >= 1.7.0");
         }
         DECL_NPY_API(PyArray_Type);
@@ -292,7 +378,9 @@ private:
         DECL_NPY_API(PyArray_View);
         DECL_NPY_API(PyArray_DescrConverter);
         DECL_NPY_API(PyArray_EquivTypes);
+#ifdef PYBIND11_NUMPY_1_ONLY
         DECL_NPY_API(PyArray_GetArrayParamsFromObject);
+#endif
         DECL_NPY_API(PyArray_SetBaseObject);
 
 #undef DECL_NPY_API
@@ -314,6 +402,14 @@ inline const PyArrayDescr_Proxy *array_descriptor_proxy(const PyObject *ptr) {
     return reinterpret_cast<const PyArrayDescr_Proxy *>(ptr);
 }
 
+inline const PyArrayDescr1_Proxy *array_descriptor1_proxy(const PyObject *ptr) {
+    return reinterpret_cast<const PyArrayDescr1_Proxy *>(ptr);
+}
+
+inline const PyArrayDescr2_Proxy *array_descriptor2_proxy(const PyObject *ptr) {
+    return reinterpret_cast<const PyArrayDescr2_Proxy *>(ptr);
+}
+
 inline bool check_flags(const void *ptr, int flag) {
     return (flag == (array_proxy(ptr)->flags & flag));
 }
@@ -354,7 +450,7 @@ struct array_info<std::array<T, N>> {
     }
 
     static constexpr auto extents = const_name<array_info<T>::is_array>(
-        concat(const_name<N>(), array_info<T>::extents), const_name<N>());
+        ::pybind11::detail::concat(const_name<N>(), array_info<T>::extents), const_name<N>());
 };
 // For numpy we have special handling for arrays of characters, so we don't include
 // the size in the array extents.
@@ -593,10 +689,32 @@ public:
     }
 
     /// Size of the data type in bytes.
+#ifdef PYBIND11_NUMPY_1_ONLY
     ssize_t itemsize() const { return detail::array_descriptor_proxy(m_ptr)->elsize; }
+#else
+    ssize_t itemsize() const {
+        if (detail::npy_api::get().PyArray_RUNTIME_VERSION_ < 0x12) {
+            return detail::array_descriptor1_proxy(m_ptr)->elsize;
+        }
+        return detail::array_descriptor2_proxy(m_ptr)->elsize;
+    }
+#endif
 
     /// Returns true for structured data types.
+#ifdef PYBIND11_NUMPY_1_ONLY
     bool has_fields() const { return detail::array_descriptor_proxy(m_ptr)->names != nullptr; }
+#else
+    bool has_fields() const {
+        if (detail::npy_api::get().PyArray_RUNTIME_VERSION_ < 0x12) {
+            return detail::array_descriptor1_proxy(m_ptr)->names != nullptr;
+        }
+        const auto *proxy = detail::array_descriptor2_proxy(m_ptr);
+        if (proxy->type_num < 0 || proxy->type_num >= 2056) {
+            return false;
+        }
+        return proxy->names != nullptr;
+    }
+#endif
 
     /// Single-character code for dtype's kind.
     /// For example, floating point types are 'f' and integral types are 'i'.
@@ -622,20 +740,39 @@ public:
     /// Single character for byteorder
     char byteorder() const { return detail::array_descriptor_proxy(m_ptr)->byteorder; }
 
-    /// Alignment of the data type
+/// Alignment of the data type
+#ifdef PYBIND11_NUMPY_1_ONLY
     int alignment() const { return detail::array_descriptor_proxy(m_ptr)->alignment; }
+#else
+    ssize_t alignment() const {
+        if (detail::npy_api::get().PyArray_RUNTIME_VERSION_ < 0x12) {
+            return detail::array_descriptor1_proxy(m_ptr)->alignment;
+        }
+        return detail::array_descriptor2_proxy(m_ptr)->alignment;
+    }
+#endif
 
-    /// Flags for the array descriptor
+/// Flags for the array descriptor
+#ifdef PYBIND11_NUMPY_1_ONLY
     char flags() const { return detail::array_descriptor_proxy(m_ptr)->flags; }
+#else
+    std::uint64_t flags() const {
+        if (detail::npy_api::get().PyArray_RUNTIME_VERSION_ < 0x12) {
+            return (unsigned char) detail::array_descriptor1_proxy(m_ptr)->flags;
+        }
+        return detail::array_descriptor2_proxy(m_ptr)->flags;
+    }
+#endif
 
 private:
-    static object _dtype_from_pep3118() {
-        static PyObject *obj = module_::import("numpy.core._internal")
-                                   .attr("_dtype_from_pep3118")
-                                   .cast<object>()
-                                   .release()
-                                   .ptr();
-        return reinterpret_borrow<object>(obj);
+    static object &_dtype_from_pep3118() {
+        PYBIND11_CONSTINIT static gil_safe_call_once_and_store<object> storage;
+        return storage
+            .call_once_and_store_result([]() {
+                return detail::import_numpy_core_submodule("_internal")
+                    .attr("_dtype_from_pep3118");
+            })
+            .get_stored();
     }
 
     dtype strip_padding(ssize_t itemsize) {
@@ -792,9 +929,7 @@ public:
     }
 
     /// Byte size of a single element
-    ssize_t itemsize() const {
-        return detail::array_descriptor_proxy(detail::array_proxy(m_ptr)->descr)->elsize;
-    }
+    ssize_t itemsize() const { return dtype().itemsize(); }
 
     /// Total number of bytes
     ssize_t nbytes() const { return size() * itemsize(); }
@@ -1012,7 +1147,7 @@ protected:
     /// Create array from any object -- always returns a new reference
     static PyObject *raw_array(PyObject *ptr, int ExtraFlags = 0) {
         if (ptr == nullptr) {
-            PyErr_SetString(PyExc_ValueError, "cannot create a pybind11::array from a nullptr");
+            set_error(PyExc_ValueError, "cannot create a pybind11::array from a nullptr");
             return nullptr;
         }
         return detail::npy_api::get().PyArray_FromAny_(
@@ -1159,7 +1294,7 @@ protected:
     /// Create array from any object -- always returns a new reference
     static PyObject *raw_array_t(PyObject *ptr) {
         if (ptr == nullptr) {
-            PyErr_SetString(PyExc_ValueError, "cannot create a pybind11::array_t from a nullptr");
+            set_error(PyExc_ValueError, "cannot create a pybind11::array_t from a nullptr");
             return nullptr;
         }
         return detail::npy_api::get().PyArray_FromAny_(ptr,
diff --git a/contrib/libs/pybind11/include/pybind11/pybind11.h b/contrib/libs/pybind11/include/pybind11/pybind11.h
index cd30063303..ffbf4db39a 100644
--- a/contrib/libs/pybind11/include/pybind11/pybind11.h
+++ b/contrib/libs/pybind11/include/pybind11/pybind11.h
@@ -14,7 +14,9 @@
 #include "detail/init.h"
 #include "attr.h"
 #include "gil.h"
+#include "gil_safe_call_once.h"
 #include "options.h"
+#include "typing.h"
 
 #include <cstdlib>
 #include <cstring>
@@ -52,6 +54,47 @@ PYBIND11_WARNING_DISABLE_MSVC(4127)
 
 PYBIND11_NAMESPACE_BEGIN(detail)
 
+inline std::string replace_newlines_and_squash(const char *text) {
+    const char *whitespaces = " \t\n\r\f\v";
+    std::string result(text);
+    bool previous_is_whitespace = false;
+
+    if (result.size() >= 2) {
+        // Do not modify string representations
+        char first_char = result[0];
+        char last_char = result[result.size() - 1];
+        if (first_char == last_char && first_char == '\'') {
+            return result;
+        }
+    }
+    result.clear();
+
+    // Replace characters in whitespaces array with spaces and squash consecutive spaces
+    while (*text != '\0') {
+        if (std::strchr(whitespaces, *text)) {
+            if (!previous_is_whitespace) {
+                result += ' ';
+                previous_is_whitespace = true;
+            }
+        } else {
+            result += *text;
+            previous_is_whitespace = false;
+        }
+        ++text;
+    }
+
+    // Strip leading and trailing whitespaces
+    const size_t str_begin = result.find_first_not_of(whitespaces);
+    if (str_begin == std::string::npos) {
+        return "";
+    }
+
+    const size_t str_end = result.find_last_not_of(whitespaces);
+    const size_t str_range = str_end - str_begin + 1;
+
+    return result.substr(str_begin, str_range);
+}
+
 // Apply all the extensions translators from a list
 // Return true if one of the translators completed without raising an exception
 // itself. Return of false indicates that if there are other translators
@@ -424,7 +467,7 @@ protected:
                 // Write default value if available.
                 if (!is_starred && arg_index < rec->args.size() && rec->args[arg_index].descr) {
                     signature += " = ";
-                    signature += rec->args[arg_index].descr;
+                    signature += detail::replace_newlines_and_squash(rec->args[arg_index].descr);
                 }
                 // Separator for positional-only arguments (placed after the
                 // argument, rather than before like *
@@ -449,9 +492,7 @@ protected:
                     signature += rec->scope.attr("__module__").cast<std::string>() + "."
                                  + rec->scope.attr("__qualname__").cast<std::string>();
                 } else {
-                    std::string tname(t->name());
-                    detail::clean_type_id(tname);
-                    signature += tname;
+                    signature += detail::quote_cpp_type_name(detail::clean_type_id(t->name()));
                 }
             } else {
                 signature += c;
@@ -689,7 +730,7 @@ protected:
         /* Iterator over the list of potentially admissible overloads */
         const function_record *overloads = reinterpret_cast<function_record *>(
                                   PyCapsule_GetPointer(self, get_function_record_capsule_name())),
-                              *it = overloads;
+                              *current_overload = overloads;
         assert(overloads != nullptr);
 
         /* Need to know how many arguments + keyword arguments there are to pick the right
@@ -703,9 +744,8 @@ protected:
         if (overloads->is_constructor) {
             if (!parent
                 || !PyObject_TypeCheck(parent.ptr(), (PyTypeObject *) overloads->scope.ptr())) {
-                PyErr_SetString(
-                    PyExc_TypeError,
-                    "__init__(self, ...) called with invalid or missing `self` argument");
+                set_error(PyExc_TypeError,
+                          "__init__(self, ...) called with invalid or missing `self` argument");
                 return nullptr;
             }
 
@@ -728,9 +768,10 @@ protected:
             std::vector<function_call> second_pass;
 
             // However, if there are no overloads, we can just skip the no-convert pass entirely
-            const bool overloaded = it != nullptr && it->next != nullptr;
+            const bool overloaded
+                = current_overload != nullptr && current_overload->next != nullptr;
 
-            for (; it != nullptr; it = it->next) {
+            for (; current_overload != nullptr; current_overload = current_overload->next) {
 
                 /* For each overload:
                    1. Copy all positional arguments we were given, also checking to make sure that
@@ -751,7 +792,7 @@ protected:
                    a result other than PYBIND11_TRY_NEXT_OVERLOAD.
                  */
 
-                const function_record &func = *it;
+                const function_record &func = *current_overload;
                 size_t num_args = func.nargs; // Number of positional arguments that we need
                 if (func.has_args) {
                     --num_args; // (but don't count py::args
@@ -989,10 +1030,10 @@ protected:
                     }
 
                     if (result.ptr() != PYBIND11_TRY_NEXT_OVERLOAD) {
-                        // The error reporting logic below expects 'it' to be valid, as it would be
-                        // if we'd encountered this failure in the first-pass loop.
+                        // The error reporting logic below expects 'current_overload' to be valid,
+                        // as it would be if we'd encountered this failure in the first-pass loop.
                         if (!result) {
-                            it = &call.func;
+                            current_overload = &call.func;
                         }
                         break;
                     }
@@ -1016,7 +1057,7 @@ protected:
 
                A translator may choose to do one of the following:
 
-                - catch the exception and call PyErr_SetString or PyErr_SetObject
+                - catch the exception and call py::set_error()
                   to set a standard (or custom) Python exception, or
                 - do nothing and let the exception fall through to the next translator, or
                 - delegate translation to the next translator by throwing a new type of exception.
@@ -1032,8 +1073,7 @@ protected:
                 return nullptr;
             }
 
-            PyErr_SetString(PyExc_SystemError,
-                            "Exception escaped from default exception translator!");
+            set_error(PyExc_SystemError, "Exception escaped from default exception translator!");
             return nullptr;
         }
 
@@ -1111,7 +1151,7 @@ protected:
                     }
                     msg += "kwargs: ";
                     bool first = true;
-                    for (auto kwarg : kwargs) {
+                    for (const auto &kwarg : kwargs) {
                         if (first) {
                             first = false;
                         } else {
@@ -1136,13 +1176,14 @@ protected:
                 return nullptr;
             }
 #endif
-            PyErr_SetString(PyExc_TypeError, msg.c_str());
+            set_error(PyExc_TypeError, msg.c_str());
             return nullptr;
         }
         if (!result) {
             std::string msg = "Unable to convert function return value to a "
                               "Python type! The signature was\n\t";
-            msg += it->signature;
+            assert(current_overload != nullptr);
+            msg += current_overload->signature;
             append_note_if_missing_header_is_suspected(msg);
 #if PY_VERSION_HEX >= 0x03030000
             // Attach additional error info to the exception if supported
@@ -1151,7 +1192,7 @@ protected:
                 return nullptr;
             }
 #endif
-            PyErr_SetString(PyExc_TypeError, msg.c_str());
+            set_error(PyExc_TypeError, msg.c_str());
             return nullptr;
         }
         if (overloads->is_constructor && !self_value_and_holder.holder_constructed()) {
@@ -1162,6 +1203,15 @@ protected:
     }
 };
 
+PYBIND11_NAMESPACE_BEGIN(detail)
+
+template <>
+struct handle_type_name<cpp_function> {
+    static constexpr auto name = const_name("Callable");
+};
+
+PYBIND11_NAMESPACE_END(detail)
+
 /// Wrapper for Python extension modules
 class module_ : public object {
 public:
@@ -1305,6 +1355,15 @@ public:
     }
 };
 
+PYBIND11_NAMESPACE_BEGIN(detail)
+
+template <>
+struct handle_type_name<module_> {
+    static constexpr auto name = const_name("module");
+};
+
+PYBIND11_NAMESPACE_END(detail)
+
 // When inside a namespace (or anywhere as long as it's not the first item on a line),
 // C++20 allows "module" to be used. This is provided for backward compatibility, and for
 // simplicity, if someone wants to use py::module for example, that is perfectly safe.
@@ -2008,7 +2067,7 @@ struct enum_base {
                 object type_name = type::handle_of(arg).attr("__name__");
                 return pybind11::str("{}.{}").format(std::move(type_name), enum_name(arg));
             },
-            name("name"),
+            name("__str__"),
             is_method(m_base));
 
         if (options::show_enum_members_docstring()) {
@@ -2429,7 +2488,7 @@ iterator make_iterator_impl(Iterator first, Sentinel last, Extra &&...extra) {
                 Policy);
     }
 
-    return cast(state{first, last, true});
+    return cast(state{std::forward<Iterator>(first), std::forward<Sentinel>(last), true});
 }
 
 PYBIND11_NAMESPACE_END(detail)
@@ -2440,13 +2499,15 @@ template <return_value_policy Policy = return_value_policy::reference_internal,
           typename Sentinel,
           typename ValueType = typename detail::iterator_access<Iterator>::result_type,
           typename... Extra>
-iterator make_iterator(Iterator first, Sentinel last, Extra &&...extra) {
+typing::Iterator<ValueType> make_iterator(Iterator first, Sentinel last, Extra &&...extra) {
     return detail::make_iterator_impl<detail::iterator_access<Iterator>,
                                       Policy,
                                       Iterator,
                                       Sentinel,
                                       ValueType,
-                                      Extra...>(first, last, std::forward<Extra>(extra)...);
+                                      Extra...>(std::forward<Iterator>(first),
+                                                std::forward<Sentinel>(last),
+                                                std::forward<Extra>(extra)...);
 }
 
 /// Makes a python iterator over the keys (`.first`) of a iterator over pairs from a
@@ -2456,13 +2517,15 @@ template <return_value_policy Policy = return_value_policy::reference_internal,
           typename Sentinel,
           typename KeyType = typename detail::iterator_key_access<Iterator>::result_type,
           typename... Extra>
-iterator make_key_iterator(Iterator first, Sentinel last, Extra &&...extra) {
+typing::Iterator<KeyType> make_key_iterator(Iterator first, Sentinel last, Extra &&...extra) {
     return detail::make_iterator_impl<detail::iterator_key_access<Iterator>,
                                       Policy,
                                       Iterator,
                                       Sentinel,
                                       KeyType,
-                                      Extra...>(first, last, std::forward<Extra>(extra)...);
+                                      Extra...>(std::forward<Iterator>(first),
+                                                std::forward<Sentinel>(last),
+                                                std::forward<Extra>(extra)...);
 }
 
 /// Makes a python iterator over the values (`.second`) of a iterator over pairs from a
@@ -2472,21 +2535,25 @@ template <return_value_policy Policy = return_value_policy::reference_internal,
           typename Sentinel,
           typename ValueType = typename detail::iterator_value_access<Iterator>::result_type,
           typename... Extra>
-iterator make_value_iterator(Iterator first, Sentinel last, Extra &&...extra) {
+typing::Iterator<ValueType> make_value_iterator(Iterator first, Sentinel last, Extra &&...extra) {
     return detail::make_iterator_impl<detail::iterator_value_access<Iterator>,
                                       Policy,
                                       Iterator,
                                       Sentinel,
                                       ValueType,
-                                      Extra...>(first, last, std::forward<Extra>(extra)...);
+                                      Extra...>(std::forward<Iterator>(first),
+                                                std::forward<Sentinel>(last),
+                                                std::forward<Extra>(extra)...);
 }
 
 /// Makes an iterator over values of an stl container or other container supporting
 /// `std::begin()`/`std::end()`
 template <return_value_policy Policy = return_value_policy::reference_internal,
           typename Type,
+          typename ValueType = typename detail::iterator_access<
+              decltype(std::begin(std::declval<Type &>()))>::result_type,
           typename... Extra>
-iterator make_iterator(Type &value, Extra &&...extra) {
+typing::Iterator<ValueType> make_iterator(Type &value, Extra &&...extra) {
     return make_iterator<Policy>(
         std::begin(value), std::end(value), std::forward<Extra>(extra)...);
 }
@@ -2495,8 +2562,10 @@ iterator make_iterator(Type &value, Extra &&...extra) {
 /// `std::begin()`/`std::end()`
 template <return_value_policy Policy = return_value_policy::reference_internal,
           typename Type,
+          typename KeyType = typename detail::iterator_key_access<
+              decltype(std::begin(std::declval<Type &>()))>::result_type,
           typename... Extra>
-iterator make_key_iterator(Type &value, Extra &&...extra) {
+typing::Iterator<KeyType> make_key_iterator(Type &value, Extra &&...extra) {
     return make_key_iterator<Policy>(
         std::begin(value), std::end(value), std::forward<Extra>(extra)...);
 }
@@ -2505,8 +2574,10 @@ iterator make_key_iterator(Type &value, Extra &&...extra) {
 /// `std::begin()`/`std::end()`
 template <return_value_policy Policy = return_value_policy::reference_internal,
           typename Type,
+          typename ValueType = typename detail::iterator_value_access<
+              decltype(std::begin(std::declval<Type &>()))>::result_type,
           typename... Extra>
-iterator make_value_iterator(Type &value, Extra &&...extra) {
+typing::Iterator<ValueType> make_value_iterator(Type &value, Extra &&...extra) {
     return make_value_iterator<Policy>(
         std::begin(value), std::end(value), std::forward<Extra>(extra)...);
 }
@@ -2562,7 +2633,7 @@ inline void register_local_exception_translator(ExceptionTranslator &&translator
 /**
  * Wrapper to generate a new Python exception type.
  *
- * This should only be used with PyErr_SetString for now.
+ * This should only be used with py::set_error() for now.
  * It is not (yet) possible to use as a py::base.
  * Template type argument is reserved for future use.
  */
@@ -2583,27 +2654,25 @@ public:
     }
 
     // Sets the current python exception to this exception object with the given message
-    void operator()(const char *message) { PyErr_SetString(m_ptr, message); }
+    PYBIND11_DEPRECATED("Please use py::set_error() instead "
+                        "(https://github.com/pybind/pybind11/pull/4772)")
+    void operator()(const char *message) const { set_error(*this, message); }
 };
 
 PYBIND11_NAMESPACE_BEGIN(detail)
-// Returns a reference to a function-local static exception object used in the simple
-// register_exception approach below.  (It would be simpler to have the static local variable
-// directly in register_exception, but that makes clang <3.5 segfault - issue #1349).
-template <typename CppException>
-exception<CppException> &get_exception_object() {
-    static exception<CppException> ex;
-    return ex;
-}
+
+template <>
+struct handle_type_name<exception<void>> {
+    static constexpr auto name = const_name("Exception");
+};
 
 // Helper function for register_exception and register_local_exception
 template <typename CppException>
 exception<CppException> &
 register_exception_impl(handle scope, const char *name, handle base, bool isLocal) {
-    auto &ex = detail::get_exception_object<CppException>();
-    if (!ex) {
-        ex = exception<CppException>(scope, name, base);
-    }
+    PYBIND11_CONSTINIT static gil_safe_call_once_and_store<exception<CppException>> exc_storage;
+    exc_storage.call_once_and_store_result(
+        [&]() { return exception<CppException>(scope, name, base); });
 
     auto register_func
         = isLocal ? &register_local_exception_translator : &register_exception_translator;
@@ -2615,10 +2684,10 @@ register_exception_impl(handle scope, const char *name, handle base, bool isLoca
         try {
             std::rethrow_exception(p);
         } catch (const CppException &e) {
-            detail::get_exception_object<CppException>()(e.what());
+            set_error(exc_storage.get_stored(), e.what());
         }
     });
-    return ex;
+    return exc_storage.get_stored();
 }
 
 PYBIND11_NAMESPACE_END(detail)
@@ -2737,7 +2806,11 @@ get_type_override(const void *this_ptr, const type_info *this_type, const char *
         if ((std::string) str(f_code->co_name) == name && f_code->co_argcount > 0) {
             PyObject *locals = PyEval_GetLocals();
             if (locals != nullptr) {
+#        if PY_VERSION_HEX >= 0x030b0000
+                PyObject *co_varnames = PyCode_GetVarnames(f_code);
+#        else
                 PyObject *co_varnames = PyObject_GetAttrString((PyObject *) f_code, "co_varnames");
+#        endif
                 PyObject *self_arg = PyTuple_GET_ITEM(co_varnames, 0);
                 Py_DECREF(co_varnames);
                 PyObject *self_caller = dict_getitem(locals, self_arg);
diff --git a/contrib/libs/pybind11/include/pybind11/pytypes.h b/contrib/libs/pybind11/include/pybind11/pytypes.h
index 6c255c6cde..e48ecf676f 100644
--- a/contrib/libs/pybind11/include/pybind11/pytypes.h
+++ b/contrib/libs/pybind11/include/pybind11/pytypes.h
@@ -59,6 +59,7 @@ struct sequence_item;
 struct list_item;
 struct tuple_item;
 } // namespace accessor_policies
+// PLEASE KEEP handle_type_name SPECIALIZATIONS IN SYNC.
 using obj_attr_accessor = accessor<accessor_policies::obj_attr>;
 using str_attr_accessor = accessor<accessor_policies::str_attr>;
 using item_accessor = accessor<accessor_policies::generic_item>;
@@ -310,19 +311,19 @@ private:
             "https://pybind11.readthedocs.io/en/stable/advanced/"
             "misc.html#common-sources-of-global-interpreter-lock-errors for debugging advice.\n"
             "If you are convinced there is no bug in your code, you can #define "
-            "PYBIND11_NO_ASSERT_GIL_HELD_INCREF_DECREF"
+            "PYBIND11_NO_ASSERT_GIL_HELD_INCREF_DECREF "
             "to disable this check. In that case you have to ensure this #define is consistently "
             "used for all translation units linked into a given pybind11 extension, otherwise "
             "there will be ODR violations.",
             function_name.c_str());
-        fflush(stderr);
         if (Py_TYPE(m_ptr)->tp_name != nullptr) {
             fprintf(stderr,
-                    "The failing %s call was triggered on a %s object.\n",
+                    " The failing %s call was triggered on a %s object.",
                     function_name.c_str(),
                     Py_TYPE(m_ptr)->tp_name);
-            fflush(stderr);
         }
+        fprintf(stderr, "\n");
+        fflush(stderr);
         throw std::runtime_error(function_name + " PyGILState_Check() failure.");
     }
 #endif
@@ -339,6 +340,14 @@ public:
 #endif
 };
 
+inline void set_error(const handle &type, const char *message) {
+    PyErr_SetString(type.ptr(), message);
+}
+
+inline void set_error(const handle &type, const handle &value) {
+    PyErr_SetObject(type.ptr(), value.ptr());
+}
+
 /** \rst
     Holds a reference to a Python object (with reference counting)
 
@@ -1639,7 +1648,15 @@ inline namespace literals {
 /** \rst
     String literal version of `str`
  \endrst */
-inline str operator"" _s(const char *s, size_t size) { return {s, size}; }
+inline str
+#if !defined(__clang__) && defined(__GNUC__) && __GNUC__ < 5
+operator"" _s // gcc 4.8.5 insists on having a space (hard error).
+#else
+operator""_s // clang 17 generates a deprecation warning if there is a space.
+#endif
+    (const char *s, size_t size) {
+    return {s, size};
+}
 } // namespace literals
 
 /// \addtogroup pytypes
diff --git a/contrib/libs/pybind11/include/pybind11/typing.h b/contrib/libs/pybind11/include/pybind11/typing.h
new file mode 100644
index 0000000000..bc275fc50b
--- /dev/null
+++ b/contrib/libs/pybind11/include/pybind11/typing.h
@@ -0,0 +1,125 @@
+/*
+    pybind11/typing.h: Convenience wrapper classes for basic Python types
+    with more explicit annotations.
+
+    Copyright (c) 2023 Dustin Spicuzza <dustin@virtualroadside.com>
+
+    All rights reserved. Use of this source code is governed by a
+    BSD-style license that can be found in the LICENSE file.
+*/
+
+#pragma once
+
+#include "detail/common.h"
+#include "cast.h"
+#include "pytypes.h"
+
+PYBIND11_NAMESPACE_BEGIN(PYBIND11_NAMESPACE)
+PYBIND11_NAMESPACE_BEGIN(typing)
+
+/*
+    The following types can be used to direct pybind11-generated docstrings
+    to have have more explicit types (e.g., `list[str]` instead of `list`).
+    Just use these in place of existing types.
+
+    There is no additional enforcement of types at runtime.
+*/
+
+template <typename... Types>
+class Tuple : public tuple {
+    using tuple::tuple;
+};
+
+template <typename K, typename V>
+class Dict : public dict {
+    using dict::dict;
+};
+
+template <typename T>
+class List : public list {
+    using list::list;
+};
+
+template <typename T>
+class Set : public set {
+    using set::set;
+};
+
+template <typename T>
+class Iterable : public iterable {
+    using iterable::iterable;
+};
+
+template <typename T>
+class Iterator : public iterator {
+    using iterator::iterator;
+};
+
+template <typename Signature>
+class Callable;
+
+template <typename Return, typename... Args>
+class Callable<Return(Args...)> : public function {
+    using function::function;
+};
+
+PYBIND11_NAMESPACE_END(typing)
+
+PYBIND11_NAMESPACE_BEGIN(detail)
+
+template <typename... Types>
+struct handle_type_name<typing::Tuple<Types...>> {
+    static constexpr auto name = const_name("tuple[")
+                                 + ::pybind11::detail::concat(make_caster<Types>::name...)
+                                 + const_name("]");
+};
+
+template <>
+struct handle_type_name<typing::Tuple<>> {
+    // PEP 484 specifies this syntax for an empty tuple
+    static constexpr auto name = const_name("tuple[()]");
+};
+
+template <typename T>
+struct handle_type_name<typing::Tuple<T, ellipsis>> {
+    // PEP 484 specifies this syntax for a variable-length tuple
+    static constexpr auto name
+        = const_name("tuple[") + make_caster<T>::name + const_name(", ...]");
+};
+
+template <typename K, typename V>
+struct handle_type_name<typing::Dict<K, V>> {
+    static constexpr auto name = const_name("dict[") + make_caster<K>::name + const_name(", ")
+                                 + make_caster<V>::name + const_name("]");
+};
+
+template <typename T>
+struct handle_type_name<typing::List<T>> {
+    static constexpr auto name = const_name("list[") + make_caster<T>::name + const_name("]");
+};
+
+template <typename T>
+struct handle_type_name<typing::Set<T>> {
+    static constexpr auto name = const_name("set[") + make_caster<T>::name + const_name("]");
+};
+
+template <typename T>
+struct handle_type_name<typing::Iterable<T>> {
+    static constexpr auto name = const_name("Iterable[") + make_caster<T>::name + const_name("]");
+};
+
+template <typename T>
+struct handle_type_name<typing::Iterator<T>> {
+    static constexpr auto name = const_name("Iterator[") + make_caster<T>::name + const_name("]");
+};
+
+template <typename Return, typename... Args>
+struct handle_type_name<typing::Callable<Return(Args...)>> {
+    using retval_type = conditional_t<std::is_same<Return, void>::value, void_type, Return>;
+    static constexpr auto name
+        = const_name("Callable[[") + ::pybind11::detail::concat(make_caster<Args>::name...)
+          + const_name("], ") + make_caster<retval_type>::name + const_name("]");
+};
+
+PYBIND11_NAMESPACE_END(detail)
+PYBIND11_NAMESPACE_END(PYBIND11_NAMESPACE)
diff --git a/contrib/libs/pybind11/ya.make b/contrib/libs/pybind11/ya.make
index 95a7f21ea3..8e7f534a2c 100644
--- a/contrib/libs/pybind11/ya.make
+++ b/contrib/libs/pybind11/ya.make
@@ -6,9 +6,9 @@ LICENSE(BSD-3-Clause)
 
 LICENSE_TEXTS(.yandex_meta/licenses.list.txt)
 
-VERSION(2.11.1)
+VERSION(2.12.0)
 
-ORIGINAL_SOURCE(https://github.com/pybind/pybind11/archive/v2.11.1.tar.gz)
+ORIGINAL_SOURCE(https://github.com/pybind/pybind11/archive/v2.12.0.tar.gz)
 
 ADDINCL(
     GLOBAL contrib/libs/pybind11/include
diff --git a/contrib/python/matplotlib/py3/matplotlib/backends/backend_webagg.py b/contrib/python/matplotlib/py3/matplotlib/backends/backend_webagg.py
index 14c0b525fb..030ab8519b 100644
--- a/contrib/python/matplotlib/py3/matplotlib/backends/backend_webagg.py
+++ b/contrib/python/matplotlib/py3/matplotlib/backends/backend_webagg.py
@@ -19,6 +19,10 @@ import random
 import sys
 import signal
 import threading
+import tempfile
+import os
+
+from library.python.resource import iteritems
 
 try:
     import tornado
@@ -177,12 +181,14 @@ class WebAggApplication(tornado.web.Application):
             assert url_prefix[0] == '/' and url_prefix[-1] != '/', \
                 'url_prefix must start with a "/" and not end with one.'
 
+        self._store_resources()
+        package_resources_abspath = os.path.join(self._stored_package_path, core.FigureManagerWebAgg.get_static_file_path())
         super().__init__(
             [
                 # Static files for the CSS and JS
                 (url_prefix + r'/_static/(.*)',
                  tornado.web.StaticFileHandler,
-                 {'path': core.FigureManagerWebAgg.get_static_file_path()}),
+                 {'path': package_resources_abspath}),
 
                 # Static images for the toolbar
                 (url_prefix + r'/_images/(.*)',
@@ -210,7 +216,19 @@ class WebAggApplication(tornado.web.Application):
                 (url_prefix + r'/([0-9]+)/download.([a-z0-9.]+)',
                  self.Download),
             ],
-            template_path=core.FigureManagerWebAgg.get_static_file_path())
+            template_path=package_resources_abspath)
+
+    def _store_resources(self):
+        self._stored_package_dir = tempfile.TemporaryDirectory()
+        self._stored_package_path = self._stored_package_dir.name
+        package_path = os.path.join(*"contrib/python/matplotlib/py3/".split("/"))
+        for key, data in iteritems(prefix="resfs/file/" + package_path, strip_prefix=True):
+            path = os.path.join(self._stored_package_path, *os.path.split(package_path), *os.path.split(key))
+            dir = os.path.dirname(path)
+            if not os.path.exists(dir):
+                os.makedirs(dir)
+            with open(path, "wb") as file:
+                file.write(data)
 
     @classmethod
     def initialize(cls, url_prefix='', port=None, address=None):
-- 
cgit v1.2.3


From 20b0215d972706b6c6d9aacaf0c8c7e969e73c4c Mon Sep 17 00:00:00 2001
From: ignat <ignat@yandex-team.com>
Date: Thu, 11 Apr 2024 17:07:07 +0300
Subject: Add InterruptionFailed abort reason
 dd0ca088a1ee8fcfbff875f343211b99d4a7aa2d

---
 yt/yt/client/scheduler/public.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/yt/yt/client/scheduler/public.h b/yt/yt/client/scheduler/public.h
index 88b99d91b2..cfa4b7c0c8 100644
--- a/yt/yt/client/scheduler/public.h
+++ b/yt/yt/client/scheduler/public.h
@@ -134,6 +134,7 @@ DEFINE_ENUM(EAbortReason,
     ((WrongSchedulingSegmentModule)    ( 52))
     ((UnresolvedNodeId)                ( 53))
     ((RootVolumePreparationFailed)     ( 54))
+    ((InterruptionFailed)              ( 55))
     ((SchedulingFirst)                 (100))
     ((SchedulingTimeout)               (101))
     ((SchedulingResourceOvercommit)    (102))
-- 
cgit v1.2.3


From 9fba1bddfd89cb0d0d93cce75a5b77a86743abd8 Mon Sep 17 00:00:00 2001
From: mikhnenko <mikhnenko@yandex-team.com>
Date: Thu, 11 Apr 2024 19:06:18 +0300
Subject: Disable warnings in py3 flatbuffers
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Отключаем по аналогии с C++
6d0d16beb8caa061db8fa7ceccf70df80710b76b
---
 build/conf/fbs.conf | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/build/conf/fbs.conf b/build/conf/fbs.conf
index 81ce899dc1..000ec9a1eb 100644
--- a/build/conf/fbs.conf
+++ b/build/conf/fbs.conf
@@ -22,7 +22,7 @@ _PY_FBS_DEPS=contrib/python/flatbuffers
 ### processed when --add-flatbuf-result flag is specified on the command line
 ### for 'ya make ...' (tar archive is extracted to output directory).
 macro FBS_TO_PYSRC(OUT_NAME, IN_FBS_FILES...) {
-    .CMD=${cwd:ARCADIA_BUILD_ROOT} ${tool:FLATC} --python --python-typing --gen-mutable ${FLATC_FLAGS_VALUE} ${pre=-I :_FLATC__INCLUDE} -o ${BINDIR} ${input:IN_FBS_FILES} && $YMAKE_PYTHON3 ${input:"build/scripts/tar_sources.py"} --exts .py --input $BINDIR --output ${output;noauto;tared:OUT_NAME.py3.fbs.pysrc} ${kv;hide:"p FP"} ${kv;hide:"pc light-green"} ${kv;hide:"tared_kind nodir"} ${hide:FBS_FAKEID}
+    .CMD=${cwd:ARCADIA_BUILD_ROOT} ${tool:FLATC} --python --no-warnings --python-typing --gen-mutable ${FLATC_FLAGS_VALUE} ${pre=-I :_FLATC__INCLUDE} -o ${BINDIR} ${input:IN_FBS_FILES} && $YMAKE_PYTHON3 ${input:"build/scripts/tar_sources.py"} --exts .py --input $BINDIR --output ${output;noauto;tared:OUT_NAME.py3.fbs.pysrc} ${kv;hide:"p FP"} ${kv;hide:"pc light-green"} ${kv;hide:"tared_kind nodir"} ${hide:FBS_FAKEID}
 }
 
 macro FBS_TO_PY2SRC(OUT_NAME, IN_FBS_FILES...) {
-- 
cgit v1.2.3


From 6e92acd38db2b95841e460129787b86b2fd445d8 Mon Sep 17 00:00:00 2001
From: gryzlov-ad <gryzlov-ad@yandex-team.com>
Date: Thu, 11 Apr 2024 19:22:06 +0300
Subject: New message distributor 607561e5e668802e53c45f0740eb94458e14daaa

---
 yt/yt/core/concurrency/nonblocking_batcher-inl.h   |  39 ++++-
 yt/yt/core/concurrency/nonblocking_batcher.h       |   7 +-
 .../unittests/nonblocking_batcher_ut.cpp           | 185 ++++++++++++---------
 3 files changed, 145 insertions(+), 86 deletions(-)

diff --git a/yt/yt/core/concurrency/nonblocking_batcher-inl.h b/yt/yt/core/concurrency/nonblocking_batcher-inl.h
index b95df3cc88..1676f9ee45 100644
--- a/yt/yt/core/concurrency/nonblocking_batcher-inl.h
+++ b/yt/yt/core/concurrency/nonblocking_batcher-inl.h
@@ -87,7 +87,7 @@ TFuture<typename TNonblockingBatcher<T, TBatchLimiter>::TBatch> TNonblockingBatc
 template <class T, CBatchLimiter<T> TBatchLimiter>
 void TNonblockingBatcher<T, TBatchLimiter>::Drop()
 {
-    std::queue<TBatch> batches;
+    std::deque<TBatch> batches;
     std::deque<TPromise<TBatch>> promises;
     {
         auto guard = Guard(SpinLock_);
@@ -178,7 +178,7 @@ void TNonblockingBatcher<T, TBatchLimiter>::CheckFlush(TGuard<NThreading::TSpinL
         return;
     }
     ResetTimer(guard);
-    Batches_.push(std::move(CurrentBatch_));
+    Batches_.push_back(std::move(CurrentBatch_));
     CurrentBatch_.clear();
     CurrentBatchLimiter_ = BatchLimiter_;
     CheckReturn(guard);
@@ -191,7 +191,7 @@ void TNonblockingBatcher<T, TBatchLimiter>::CheckReturn(TGuard<NThreading::TSpin
         return;
     }
     auto batch = std::move(Batches_.front());
-    Batches_.pop();
+    Batches_.pop_front();
     auto promise = std::move(Promises_.front());
     Promises_.pop_front();
     if (AllowEmptyBatches_ && !Promises_.empty()) {
@@ -213,6 +213,39 @@ void TNonblockingBatcher<T, TBatchLimiter>::OnBatchTimeout(ui64 generation)
     CheckFlush(guard);
 }
 
+template <class T, CBatchLimiter<T> TBatchLimiter>
+std::vector<typename TNonblockingBatcher<T, TBatchLimiter>::TBatch> TNonblockingBatcher<T, TBatchLimiter>::Drain()
+{
+    std::deque<TPromise<TBatch>> promises;
+    std::vector<TBatch> result;
+
+    {
+        auto guard = Guard(SpinLock_);
+
+        result.reserve(Batches_.size() + (CurrentBatch_.empty() ? 0 : 1));
+
+        for (auto& batch : Batches_) {
+            result.push_back(std::move(batch));
+        }
+        Batches_.clear();
+
+        if (!CurrentBatch_.empty()) {
+            result.push_back(std::move(CurrentBatch_));
+            CurrentBatch_.clear();
+        }
+
+        std::swap(promises, Promises_);
+        CurrentBatchLimiter_ = BatchLimiter_;
+        ResetTimer(guard);
+    }
+
+    for (auto& promise : promises) {
+        promise.Set(TError("Batcher is drained"));
+    }
+
+    return result;
+}
+
 ////////////////////////////////////////////////////////////////////////////////
 
 } // namespace NYT::NConcurrency
diff --git a/yt/yt/core/concurrency/nonblocking_batcher.h b/yt/yt/core/concurrency/nonblocking_batcher.h
index a6665e4c6f..5681f27b13 100644
--- a/yt/yt/core/concurrency/nonblocking_batcher.h
+++ b/yt/yt/core/concurrency/nonblocking_batcher.h
@@ -2,7 +2,6 @@
 
 #include <yt/yt/core/actions/future.h>
 
-#include <queue>
 #include <vector>
 
 namespace NYT::NConcurrency {
@@ -93,6 +92,10 @@ public:
 
     void UpdateSettings(TDuration batchDuration, TBatchLimiter batchLimiter, bool allowEmptyBatches);
 
+    //! Flush all prepared and in-progress batches and set active promises with error.
+    //! Used to clear batcher at the end of its lifetime.
+    std::vector<TBatch> Drain();
+
 private:
     using ETimerState = ETNonblockingBatcherTimerState;
 
@@ -105,7 +108,7 @@ private:
     TBatchLimiter CurrentBatchLimiter_;
 
     ETimerState TimerState_ = ETimerState::Initial;
-    std::queue<TBatch> Batches_;
+    std::deque<TBatch> Batches_;
     std::deque<TPromise<TBatch>> Promises_;
     TDelayedExecutorCookie BatchFlushCookie_;
     ui64 FlushGeneration_ = 0;
diff --git a/yt/yt/core/concurrency/unittests/nonblocking_batcher_ut.cpp b/yt/yt/core/concurrency/unittests/nonblocking_batcher_ut.cpp
index a06390dd2b..c82941782a 100644
--- a/yt/yt/core/concurrency/unittests/nonblocking_batcher_ut.cpp
+++ b/yt/yt/core/concurrency/unittests/nonblocking_batcher_ut.cpp
@@ -21,29 +21,29 @@ void EnqueueAll(
 
 TEST(TNonblockingBatcherTest, Simple)
 {
-    auto b = New<TNonblockingBatcher<int>>(TBatchSizeLimiter(3), TDuration::Max());
-    b->Enqueue(1);
-    auto e1 = b->DequeueBatch();
-    auto e2 = b->DequeueBatch();
+    auto batcher = New<TNonblockingBatcher<int>>(TBatchSizeLimiter(3), TDuration::Max());
+    batcher->Enqueue(1);
+    auto e1 = batcher->DequeueBatch();
+    auto e2 = batcher->DequeueBatch();
     ASSERT_FALSE(e1.IsSet());
     ASSERT_FALSE(e2.IsSet());
-    b->Enqueue(2);
+    batcher->Enqueue(2);
     ASSERT_FALSE(e1.IsSet());
     ASSERT_FALSE(e2.IsSet());
-    b->Enqueue(3);
+    batcher->Enqueue(3);
     ASSERT_TRUE(e1.IsSet());
     ASSERT_FALSE(e2.IsSet());
     ASSERT_EQ(e1.Get().ValueOrThrow(), std::vector<int>({1, 2, 3}));
-    b->Enqueue(10);
-    b->Enqueue(11);
+    batcher->Enqueue(10);
+    batcher->Enqueue(11);
     ASSERT_FALSE(e2.IsSet());
-    b->Enqueue(12);
+    batcher->Enqueue(12);
     ASSERT_TRUE(e2.IsSet());
     ASSERT_EQ(e2.Get().ValueOrThrow(), std::vector<int>({10, 11, 12}));
-    b->Enqueue(0);
-    b->Enqueue(1);
-    b->Enqueue(2);
-    auto e3 = b->DequeueBatch();
+    batcher->Enqueue(0);
+    batcher->Enqueue(1);
+    batcher->Enqueue(2);
+    auto e3 = batcher->DequeueBatch();
     ASSERT_TRUE(e3.IsSet());
     ASSERT_EQ(e3.Get().ValueOrThrow(), std::vector<int>({0, 1, 2}));
 }
@@ -53,21 +53,21 @@ TEST(TNonblockingBatcherTest, Duration)
     auto timeout = Quantum;
     auto overTimeout = timeout * 2;
 
-    auto b = New<TNonblockingBatcher<int>>(TBatchSizeLimiter(2), timeout);
-    auto e1 = b->DequeueBatch();
+    auto batcher = New<TNonblockingBatcher<int>>(TBatchSizeLimiter(2), timeout);
+    auto e1 = batcher->DequeueBatch();
     Sleep(overTimeout);
     ASSERT_FALSE(e1.IsSet());
-    b->Enqueue(1);
-    auto e2 = b->DequeueBatch();
+    batcher->Enqueue(1);
+    auto e2 = batcher->DequeueBatch();
     ASSERT_FALSE(e1.IsSet());
     ASSERT_FALSE(e2.IsSet());
     Sleep(overTimeout);
     ASSERT_TRUE(e1.IsSet());
     ASSERT_FALSE(e2.IsSet());
     ASSERT_EQ(e1.Get().ValueOrThrow(), std::vector<int>{1});
-    b->Enqueue(2);
+    batcher->Enqueue(2);
     ASSERT_FALSE(e2.IsSet());
-    b->Enqueue(3);
+    batcher->Enqueue(3);
     ASSERT_TRUE(e2.IsSet());
     ASSERT_EQ(e2.Get().ValueOrThrow(), std::vector<int>({2, 3}));
 }
@@ -77,40 +77,40 @@ TEST(TNonblockingBatcherTest, Dequeue)
     auto timeout = Quantum;
     auto overTimeout = timeout * 2;
 
-    auto b = New<TNonblockingBatcher<int>>(TBatchSizeLimiter(2), timeout);
-    EnqueueAll(b, {1, 2, 3, 4, 5});
+    auto batcher = New<TNonblockingBatcher<int>>(TBatchSizeLimiter(2), timeout);
+    EnqueueAll(batcher, {1, 2, 3, 4, 5});
     {
-        auto e = b->DequeueBatch();
+        auto e = batcher->DequeueBatch();
         ASSERT_TRUE(e.IsSet());
         ASSERT_EQ(e.Get().ValueOrThrow(), std::vector<int>({1, 2}));
     }
     {
-        auto e = b->DequeueBatch();
+        auto e = batcher->DequeueBatch();
         ASSERT_TRUE(e.IsSet());
         ASSERT_EQ(e.Get().ValueOrThrow(), std::vector<int>({3, 4}));
     }
     {
-        auto e = b->DequeueBatch();
+        auto e = batcher->DequeueBatch();
         ASSERT_FALSE(e.IsSet());
         Sleep(overTimeout);
         ASSERT_TRUE(e.IsSet());
         ASSERT_EQ(e.Get().ValueOrThrow(), std::vector<int>({5}));
     }
-    EnqueueAll(b, {6, 7, 8});
+    EnqueueAll(batcher, {6, 7, 8});
     {
-        auto e = b->DequeueBatch();
+        auto e = batcher->DequeueBatch();
         ASSERT_TRUE(e.IsSet());
         ASSERT_EQ(e.Get().ValueOrThrow(), std::vector<int>({6, 7}));
     }
     {
-        auto e = b->DequeueBatch();
+        auto e = batcher->DequeueBatch();
         ASSERT_FALSE(e.IsSet());
-        EnqueueAll(b, {9, 10, 11});
+        EnqueueAll(batcher, {9, 10, 11});
         ASSERT_TRUE(e.IsSet());
         ASSERT_EQ(e.Get().ValueOrThrow(), std::vector<int>({8, 9}));
     }
     {
-        auto e = b->DequeueBatch();
+        auto e = batcher->DequeueBatch();
         ASSERT_TRUE(e.IsSet());
         ASSERT_EQ(e.Get().ValueOrThrow(), std::vector<int>({10, 11}));
     }
@@ -120,22 +120,22 @@ TEST(TNonblockingBatcherTest, Drop)
 {
     auto timeout = Quantum;
 
-    auto b = New<TNonblockingBatcher<int>>(TBatchSizeLimiter(2), timeout);
-    auto e1 = b->DequeueBatch();
-    auto e2 = b->DequeueBatch();
+    auto batcher = New<TNonblockingBatcher<int>>(TBatchSizeLimiter(2), timeout);
+    auto e1 = batcher->DequeueBatch();
+    auto e2 = batcher->DequeueBatch();
     ASSERT_FALSE(e1.IsSet());
     ASSERT_FALSE(e2.IsSet());
-    EnqueueAll(b, {1, 2, 3});
+    EnqueueAll(batcher, {1, 2, 3});
     ASSERT_TRUE(e1.IsSet());
     ASSERT_FALSE(e2.IsSet());
-    b->Drop();
+    batcher->Drop();
     ASSERT_EQ(e1.Get().ValueOrThrow(), std::vector<int>({1, 2}));
     ASSERT_TRUE(e2.IsSet());
     ASSERT_EQ(e2.Get().ValueOrThrow(), std::vector<int>());
-    b->Enqueue(10);
-    auto e3 = b->DequeueBatch();
+    batcher->Enqueue(10);
+    auto e3 = batcher->DequeueBatch();
     ASSERT_FALSE(e3.IsSet());
-    b->Drop();
+    batcher->Drop();
     ASSERT_TRUE(e3.IsSet());
     ASSERT_EQ(e3.Get().ValueOrThrow(), std::vector<int>());
 }
@@ -145,11 +145,11 @@ TEST(TNonblockingBatcherTest, EnqueueTimeout)
     auto timeout = Quantum;
     auto overTimeout = timeout * 2;
 
-    auto b = New<TNonblockingBatcher<int>>(TBatchSizeLimiter(3), timeout);
+    auto batcher = New<TNonblockingBatcher<int>>(TBatchSizeLimiter(3), timeout);
     Sleep(overTimeout);
     {
-        auto e = b->DequeueBatch();
-        b->Enqueue(1);
+        auto e = batcher->DequeueBatch();
+        batcher->Enqueue(1);
         ASSERT_FALSE(e.IsSet());
         Sleep(overTimeout);
         ASSERT_TRUE(e.IsSet());
@@ -182,19 +182,19 @@ TEST(TNonblockingBatcherTest, SumLimiter)
 {
     auto timeout = Quantum;
 
-    auto b = New<TNonblockingBatcher<int, TSumLimiter>>(TSumLimiter(10), timeout);
-    EnqueueAll(b, {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1});
-    auto e1 = b->DequeueBatch();
-    auto e2 = b->DequeueBatch();
-    auto e3 = b->DequeueBatch();
-    auto e4 = b->DequeueBatch();
-    auto e5 = b->DequeueBatch();
+    auto batcher = New<TNonblockingBatcher<int, TSumLimiter>>(TSumLimiter(10), timeout);
+    EnqueueAll(batcher, {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1});
+    auto e1 = batcher->DequeueBatch();
+    auto e2 = batcher->DequeueBatch();
+    auto e3 = batcher->DequeueBatch();
+    auto e4 = batcher->DequeueBatch();
+    auto e5 = batcher->DequeueBatch();
     ASSERT_TRUE(e1.IsSet());
     ASSERT_TRUE(e2.IsSet());
     ASSERT_TRUE(e3.IsSet());
     ASSERT_TRUE(e4.IsSet());
     ASSERT_FALSE(e5.IsSet());
-    b->Enqueue(9);
+    batcher->Enqueue(9);
     ASSERT_TRUE(e5.IsSet());
     ASSERT_EQ(e1.Get().ValueOrThrow(), std::vector<int>({1, 2, 3, 4}));
     ASSERT_EQ(e2.Get().ValueOrThrow(), std::vector<int>({5, 6}));
@@ -207,19 +207,19 @@ TEST(TNonblockingBatcherTest, CompositeLimiterLimiter)
 {
     auto timeout = Quantum;
     using TLimiter = TCompositeBatchLimiter<TBatchSizeLimiter, TSumLimiter>;
-    auto b = New<TNonblockingBatcher<int, TLimiter>>(TLimiter(TBatchSizeLimiter{3}, TSumLimiter{10}), timeout);
-    EnqueueAll(b, {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1});
-    auto e1 = b->DequeueBatch();
-    auto e2 = b->DequeueBatch();
-    auto e3 = b->DequeueBatch();
-    auto e4 = b->DequeueBatch();
-    auto e5 = b->DequeueBatch();
+    auto batcher = New<TNonblockingBatcher<int, TLimiter>>(TLimiter(TBatchSizeLimiter{3}, TSumLimiter{10}), timeout);
+    EnqueueAll(batcher, {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1});
+    auto e1 = batcher->DequeueBatch();
+    auto e2 = batcher->DequeueBatch();
+    auto e3 = batcher->DequeueBatch();
+    auto e4 = batcher->DequeueBatch();
+    auto e5 = batcher->DequeueBatch();
     ASSERT_TRUE(e1.IsSet());
     ASSERT_TRUE(e2.IsSet());
     ASSERT_TRUE(e3.IsSet());
     ASSERT_TRUE(e4.IsSet());
     ASSERT_FALSE(e5.IsSet());
-    b->Enqueue(9);
+    batcher->Enqueue(9);
     ASSERT_TRUE(e5.IsSet());
     ASSERT_EQ(e1.Get().ValueOrThrow(), std::vector<int>({1, 2, 3}));
     ASSERT_EQ(e2.Get().ValueOrThrow(), std::vector<int>({4, 5, 6}));
@@ -234,33 +234,33 @@ TEST(TNonblockingBatcherTest, UpdateLimiter)
     auto overTimeout = timeout * 2;
 
     using TLimiter = TCompositeBatchLimiter<TBatchSizeLimiter, TSumLimiter>;
-    auto b = New<TNonblockingBatcher<int, TLimiter>>(TLimiter(TBatchSizeLimiter{3}, TSumLimiter{6}), timeout);
-    EnqueueAll(b, {1, 2, 3, 3, 2});
+    auto batcher = New<TNonblockingBatcher<int, TLimiter>>(TLimiter(TBatchSizeLimiter{3}, TSumLimiter{6}), timeout);
+    EnqueueAll(batcher, {1, 2, 3, 3, 2});
     {
-        auto e = b->DequeueBatch();
+        auto e = batcher->DequeueBatch();
         ASSERT_TRUE(e.IsSet());
         ASSERT_EQ(e.Get().ValueOrThrow(), std::vector<int>({1, 2, 3}));
     }
-    b->UpdateBatchLimiter(TLimiter(TBatchSizeLimiter{3}, TSumLimiter{4}));
+    batcher->UpdateBatchLimiter(TLimiter(TBatchSizeLimiter{3}, TSumLimiter{4}));
     {
         // continue to use previous limiter
-        auto e = b->DequeueBatch();
+        auto e = batcher->DequeueBatch();
         ASSERT_FALSE(e.IsSet());
         Sleep(overTimeout);
         ASSERT_TRUE(e.IsSet());
         ASSERT_EQ(e.Get().ValueOrThrow(), std::vector<int>({3, 2}));
     }
-    EnqueueAll(b, {3, 2});
+    EnqueueAll(batcher, {3, 2});
     {
         // new batch with new limiter
-        auto e = b->DequeueBatch();
+        auto e = batcher->DequeueBatch();
         ASSERT_TRUE(e.IsSet());
         ASSERT_EQ(e.Get().ValueOrThrow(), std::vector<int>({3, 2}));
     }
-    b->UpdateBatchLimiter(TLimiter(TBatchSizeLimiter{3}, TSumLimiter{100}));
-    EnqueueAll(b, {5, 6, 7});
+    batcher->UpdateBatchLimiter(TLimiter(TBatchSizeLimiter{3}, TSumLimiter{100}));
+    EnqueueAll(batcher, {5, 6, 7});
     {
-        auto e = b->DequeueBatch();
+        auto e = batcher->DequeueBatch();
         ASSERT_TRUE(e.IsSet());
         ASSERT_EQ(e.Get().ValueOrThrow(), std::vector<int>({5, 6, 7}));
     }
@@ -271,15 +271,15 @@ TEST(TNonblockingBatcherTest, NoEmptyBatches)
     auto timeout = Quantum;
     auto overTimeout = timeout * 2;
 
-    auto b = New<TNonblockingBatcher<int>>(TBatchSizeLimiter(2), timeout, false);
-    auto e1 = b->DequeueBatch();
-    auto e2 = b->DequeueBatch();
+    auto batcher = New<TNonblockingBatcher<int>>(TBatchSizeLimiter(2), timeout, false);
+    auto e1 = batcher->DequeueBatch();
+    auto e2 = batcher->DequeueBatch();
     ASSERT_FALSE(e1.IsSet());
     ASSERT_FALSE(e2.IsSet());
     Sleep(overTimeout);
     ASSERT_FALSE(e1.IsSet());
     ASSERT_FALSE(e2.IsSet());
-    EnqueueAll(b, {1});
+    EnqueueAll(batcher, {1});
     ASSERT_FALSE(e1.IsSet());
     ASSERT_FALSE(e2.IsSet());
     Sleep(overTimeout);
@@ -287,7 +287,7 @@ TEST(TNonblockingBatcherTest, NoEmptyBatches)
     ASSERT_FALSE(e2.IsSet());
     Sleep(overTimeout);
     ASSERT_FALSE(e2.IsSet());
-    EnqueueAll(b, {2});
+    EnqueueAll(batcher, {2});
     ASSERT_FALSE(e2.IsSet());
     Sleep(overTimeout);
     ASSERT_TRUE(e2.IsSet());
@@ -300,9 +300,9 @@ TEST(TNonblockingBatcherTest, AllowEmptyBatches)
     auto timeout = Quantum;
     auto overTimeout = timeout * 2;
 
-    auto b = New<TNonblockingBatcher<int>>(TBatchSizeLimiter(2), timeout, true);
-    auto e1 = b->DequeueBatch();
-    auto e2 = b->DequeueBatch();
+    auto batcher = New<TNonblockingBatcher<int>>(TBatchSizeLimiter(2), timeout, true);
+    auto e1 = batcher->DequeueBatch();
+    auto e2 = batcher->DequeueBatch();
     ASSERT_FALSE(e1.IsSet());
     ASSERT_FALSE(e2.IsSet());
     Sleep(overTimeout);
@@ -318,20 +318,43 @@ TEST(TNonblockingBatcherTest, IncompleteBatchAfterDeque)
     auto timeout = Quantum;
     auto overTimeout = timeout * 2;
 
-    auto b = New<TNonblockingBatcher<int>>(TBatchSizeLimiter(2), timeout, false);
-    b->Enqueue(1);
-    b->Enqueue(2);
-    b->Enqueue(3);
-    auto e1 = b->DequeueBatch();
+    auto batcher = New<TNonblockingBatcher<int>>(TBatchSizeLimiter(2), timeout, false);
+    batcher->Enqueue(1);
+    batcher->Enqueue(2);
+    batcher->Enqueue(3);
+    auto e1 = batcher->DequeueBatch();
     ASSERT_TRUE(e1.IsSet());
     ASSERT_EQ(e1.Get().ValueOrThrow(), std::vector<int>({1, 2}));
     Sleep(overTimeout);
-    b->Enqueue(4);
-    auto e2 = b->DequeueBatch();
+    batcher->Enqueue(4);
+    auto e2 = batcher->DequeueBatch();
     ASSERT_TRUE(e2.IsSet());
     ASSERT_EQ(e2.Get().ValueOrThrow(), std::vector<int>({3, 4}));
 }
 
+TEST(TNonblockingBatcherTest, Drain)
+{
+    auto batcher = New<TNonblockingBatcher<int>>(TBatchSizeLimiter(2), TDuration::Max());
+    for (int i = 0; i < 5; ++i) {
+        batcher->Enqueue(i);
+    }
+
+    auto batches = batcher->Drain();
+
+    ASSERT_EQ(std::ssize(batches), 3);
+    ASSERT_EQ(batches[0], std::vector({0, 1}));
+    ASSERT_EQ(batches[1], std::vector({2, 3}));
+    ASSERT_EQ(batches[2], std::vector({4}));
+
+    batcher->Enqueue(0);
+    auto batch = batcher->DequeueBatch();
+    auto drainedBatches = batcher->Drain();
+
+    ASSERT_FALSE(batch.Get().IsOK());
+    ASSERT_EQ(std::ssize(drainedBatches), 1);
+    ASSERT_EQ(drainedBatches[0], std::vector({0}));
+}
+
 ////////////////////////////////////////////////////////////////////////////////
 
 } // namespace
-- 
cgit v1.2.3


From c7906f50268a8a123f9c00e5e22779e695d76a22 Mon Sep 17 00:00:00 2001
From: spreis <spreis@yandex-team.com>
Date: Thu, 11 Apr 2024 19:39:48 +0300
Subject: Fix path of config 435fc8c2256c7aeaf416cc1ef3506c4173396efa

---
 build/conf/python.conf   | 2 +-
 build/plugins/pybuild.py | 5 ++++-
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/build/conf/python.conf b/build/conf/python.conf
index a4a0b510c2..f1b25a2e36 100644
--- a/build/conf/python.conf
+++ b/build/conf/python.conf
@@ -246,7 +246,7 @@ macro STYLE_PYTHON(pyproject...) {
 
 # tag:python-specific tag:test
 STYLE_RUFF_VALUE=no
-RUFF_CONFIG_PATHS_FILE=build/config/tests/ruff/ruff_config_paths.json
+RUFF_CONFIG_PATHS_FILE=${ARCADIA_ROOT}/build/config/tests/ruff/ruff_config_paths.json
 ### @usage: STYLE_RUFF()
 ###
 ### Check python3 sources for style issues using ruff.
diff --git a/build/plugins/pybuild.py b/build/plugins/pybuild.py
index 65470a8c75..1853d3524b 100644
--- a/build/plugins/pybuild.py
+++ b/build/plugins/pybuild.py
@@ -217,7 +217,10 @@ def add_python_lint_checks(unit, py_ver, files):
             params = ["ruff", "tools/ruff_linter/bin/ruff_linter"]
             params += ["FILES"] + resolved_files
             params += ["GLOBAL_RESOURCES", resource]
-            configs = [unit.get('RUFF_CONFIG_PATHS_FILE'), 'build/config/tests/ruff/ruff.toml'] + get_ruff_configs(unit)
+            configs = [
+                rootrel_arc_src(unit.get('RUFF_CONFIG_PATHS_FILE'), unit),
+                'build/config/tests/ruff/ruff.toml',
+            ] + get_ruff_configs(unit)
             params += ['CONFIGS'] + configs
             unit.on_add_linter_check(params)
 
-- 
cgit v1.2.3


From 2ab5f8b12b9381254255f38fe3c34dd0dd0de2c8 Mon Sep 17 00:00:00 2001
From: robot-piglet <robot-piglet@yandex-team.com>
Date: Thu, 11 Apr 2024 21:22:54 +0300
Subject: Intermediate changes

---
 contrib/python/ydb/py3/ydb/scheme.py | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/contrib/python/ydb/py3/ydb/scheme.py b/contrib/python/ydb/py3/ydb/scheme.py
index 6019c763e5..04951b5eae 100644
--- a/contrib/python/ydb/py3/ydb/scheme.py
+++ b/contrib/python/ydb/py3/ydb/scheme.py
@@ -19,6 +19,7 @@ class SchemeEntryType(enum.IntEnum):
     RTMR_VOLUME = 5
     BLOCK_STORE_VOLUME = 6
     COORDINATION_NODE = 7
+    COLUMN_STORE = 12
     COLUMN_TABLE = 13
     SEQUENCE = 15
     REPLICATION = 16
@@ -54,6 +55,14 @@ class SchemeEntryType(enum.IntEnum):
         """
         return entry == SchemeEntryType.COLUMN_TABLE
 
+    @staticmethod
+    def is_column_store(entry):
+        """
+        :param entry: A scheme entry to check
+        :return: True if scheme entry is a column store and False otherwise
+        """
+        return entry == SchemeEntryType.COLUMN_STORE
+
     @staticmethod
     def is_row_table(entry):
         """
@@ -128,6 +137,12 @@ class SchemeEntry(object):
         """
         return SchemeEntryType.is_directory(self.type)
 
+    def is_column_store(self):
+        """
+        :return: True if scheme entry is a column store and False otherwise
+        """
+        return SchemeEntryType.is_column_store(self.type)
+
     def is_table(self):
         """
         :return: True if scheme entry is a row table and False otherwise (same as is_row_table)
-- 
cgit v1.2.3


From e777f6fe503bff0abc88aec2b1f7da675bfb68ae Mon Sep 17 00:00:00 2001
From: pg <pg@yandex-team.com>
Date: Thu, 11 Apr 2024 21:23:34 +0300
Subject: v2 40d1f0a9f746bb174ebd93119c192ba825d8545c

---
 build/conf/proto.conf                |  2 +-
 contrib/tools/protoc/plugins/ya.make |  6 ++++++
 contrib/tools/protoc/ya.make         | 16 ++++++++++++++++
 3 files changed, 23 insertions(+), 1 deletion(-)
 create mode 100644 contrib/tools/protoc/plugins/ya.make
 create mode 100644 contrib/tools/protoc/ya.make

diff --git a/build/conf/proto.conf b/build/conf/proto.conf
index 4416f5ec57..82f9ca5851 100644
--- a/build/conf/proto.conf
+++ b/build/conf/proto.conf
@@ -1,6 +1,6 @@
 # tag:tool-specific tag:proto
 PROTOC=${tool:"contrib/tools/protoc"}
-when ($PYTHON2) {
+when ($PYTHON2 == "yes") {
     PROTOC=${tool:"contrib/tools/protoc_old"}
 }
 JAVA_PROTOC=${tool:"contrib/tools/protoc"}
diff --git a/contrib/tools/protoc/plugins/ya.make b/contrib/tools/protoc/plugins/ya.make
new file mode 100644
index 0000000000..44254ae111
--- /dev/null
+++ b/contrib/tools/protoc/plugins/ya.make
@@ -0,0 +1,6 @@
+RECURSE(
+    cpp_styleguide
+    grpc_cpp
+    grpc_java
+    grpc_python
+)
diff --git a/contrib/tools/protoc/ya.make b/contrib/tools/protoc/ya.make
new file mode 100644
index 0000000000..59b96b2a63
--- /dev/null
+++ b/contrib/tools/protoc/ya.make
@@ -0,0 +1,16 @@
+# WARN:
+#   The Piglet sync service (abc:cc-piglet) relies on prebuiltness of protoc.
+#   DO NOT REMOVE ya.make.prebuilt.
+
+IF (USE_PREBUILT_TOOLS)
+    INCLUDE(ya.make.prebuilt)
+ENDIF()
+
+IF (NOT PREBUILT)
+    INCLUDE(bin/ya.make)
+ENDIF()
+
+RECURSE(
+    bin
+    plugins
+)
-- 
cgit v1.2.3


From 00ff372db04018582b653a028eb3647b40544256 Mon Sep 17 00:00:00 2001
From: shadchin <shadchin@yandex-team.com>
Date: Thu, 11 Apr 2024 21:35:50 +0300
Subject: Fix utilitycode generation for const fused typedef (backport)

Need for update scikit-learn
371604d3522a7676f7380c48b63025dbe6dcf25f
---
 contrib/tools/cython/Cython/Compiler/FusedNode.py  |  8 +++--
 contrib/tools/cython/Cython/Compiler/Naming.py     |  1 +
 contrib/tools/cython/cython.py                     |  2 +-
 .../patches/pr5233-backport-support-const.patch    | 37 ++++++++++++++++++++++
 4 files changed, 44 insertions(+), 4 deletions(-)
 create mode 100644 contrib/tools/cython/patches/pr5233-backport-support-const.patch

diff --git a/contrib/tools/cython/Cython/Compiler/FusedNode.py b/contrib/tools/cython/Cython/Compiler/FusedNode.py
index c32b02d941..b833e35189 100644
--- a/contrib/tools/cython/Cython/Compiler/FusedNode.py
+++ b/contrib/tools/cython/Cython/Compiler/FusedNode.py
@@ -3,7 +3,8 @@ from __future__ import absolute_import
 import copy
 
 from . import (ExprNodes, PyrexTypes, MemoryView,
-               ParseTreeTransforms, StringEncoding, Errors)
+               ParseTreeTransforms, StringEncoding, Errors,
+               Naming)
 from .ExprNodes import CloneNode, ProxyNode, TupleNode
 from .Nodes import FuncDefNode, CFuncDefNode, StatListNode, DefNode
 from ..Utils import OrderedSet
@@ -291,9 +292,10 @@ class FusedCFuncDefNode(StatListNode):
                 """)
 
     def _dtype_name(self, dtype):
+        name = str(dtype).replace('_', '__').replace(' ', '_')
         if dtype.is_typedef:
-            return '___pyx_%s' % dtype
-        return str(dtype).replace(' ', '_')
+            name = Naming.fused_dtype_prefix + name
+        return name
 
     def _dtype_type(self, dtype):
         if dtype.is_typedef:
diff --git a/contrib/tools/cython/Cython/Compiler/Naming.py b/contrib/tools/cython/Cython/Compiler/Naming.py
index 4dd6cbbd5c..ceaddf4b18 100644
--- a/contrib/tools/cython/Cython/Compiler/Naming.py
+++ b/contrib/tools/cython/Cython/Compiler/Naming.py
@@ -118,6 +118,7 @@ frame_cname      = pyrex_prefix + "frame"
 frame_code_cname = pyrex_prefix + "frame_code"
 binding_cfunc    = pyrex_prefix + "binding_PyCFunctionType"
 fused_func_prefix = pyrex_prefix + 'fuse_'
+fused_dtype_prefix = pyrex_prefix + 'fused_dtype_'
 quick_temp_cname = pyrex_prefix + "temp" # temp variable for quick'n'dirty temping
 tp_dict_version_temp = pyrex_prefix + "tp_dict_version"
 obj_dict_version_temp = pyrex_prefix + "obj_dict_version"
diff --git a/contrib/tools/cython/cython.py b/contrib/tools/cython/cython.py
index 554ba1b4ff..4111f048da 100755
--- a/contrib/tools/cython/cython.py
+++ b/contrib/tools/cython/cython.py
@@ -1,6 +1,6 @@
 #!/usr/bin/env python
 
-# Change content of this file to change uids for cython programs - cython 0.29.37 r0
+# Change content of this file to change uids for cython programs - cython 0.29.37 r1
 
 #
 #   Cython -- Main Program, generic
diff --git a/contrib/tools/cython/patches/pr5233-backport-support-const.patch b/contrib/tools/cython/patches/pr5233-backport-support-const.patch
new file mode 100644
index 0000000000..bb7a9c3f6e
--- /dev/null
+++ b/contrib/tools/cython/patches/pr5233-backport-support-const.patch
@@ -0,0 +1,37 @@
+https://github.com/cython/cython/pull/5233
+
+--- contrib/tools/cython/Cython/Compiler/FusedNode.py	(index)
++++ contrib/tools/cython/Cython/Compiler/FusedNode.py	(working tree)
+@@ -3,7 +3,8 @@ from __future__ import absolute_import
+ import copy
+ 
+ from . import (ExprNodes, PyrexTypes, MemoryView,
+-               ParseTreeTransforms, StringEncoding, Errors)
++               ParseTreeTransforms, StringEncoding, Errors,
++               Naming)
+ from .ExprNodes import CloneNode, ProxyNode, TupleNode
+ from .Nodes import FuncDefNode, CFuncDefNode, StatListNode, DefNode
+ from ..Utils import OrderedSet
+@@ -291,9 +292,10 @@ class FusedCFuncDefNode(StatListNode):
+                 """)
+ 
+     def _dtype_name(self, dtype):
++        name = str(dtype).replace('_', '__').replace(' ', '_')
+         if dtype.is_typedef:
+-            return '___pyx_%s' % dtype
+-        return str(dtype).replace(' ', '_')
++            name = Naming.fused_dtype_prefix + name
++        return name
+ 
+     def _dtype_type(self, dtype):
+         if dtype.is_typedef:
+--- contrib/tools/cython/Cython/Compiler/Naming.py	(index)
++++ contrib/tools/cython/Cython/Compiler/Naming.py	(working tree)
+@@ -118,6 +118,7 @@ frame_cname      = pyrex_prefix + "frame"
+ frame_code_cname = pyrex_prefix + "frame_code"
+ binding_cfunc    = pyrex_prefix + "binding_PyCFunctionType"
+ fused_func_prefix = pyrex_prefix + 'fuse_'
++fused_dtype_prefix = pyrex_prefix + 'fused_dtype_'
+ quick_temp_cname = pyrex_prefix + "temp" # temp variable for quick'n'dirty temping
+ tp_dict_version_temp = pyrex_prefix + "tp_dict_version"
+ obj_dict_version_temp = pyrex_prefix + "obj_dict_version"
-- 
cgit v1.2.3


From 384788280f0a875070dc2590512b7eea09c0ac03 Mon Sep 17 00:00:00 2001
From: don-dron <don-dron@yandex-team.com>
Date: Fri, 12 Apr 2024 00:30:10 +0300
Subject: YT-21534: Modify RPC memory tracking
 76e19fad047a3929e625cf7c8411551b5eedb174

---
 yt/yt/core/rpc/message.cpp                         |   5 +
 yt/yt/core/rpc/message.h                           |   1 +
 yt/yt/core/rpc/server_detail.cpp                   |  32 ++++
 yt/yt/core/rpc/server_detail.h                     |  25 ++++
 yt/yt/core/rpc/service.h                           |   6 +
 yt/yt/core/rpc/service_detail.cpp                  |  52 +++++--
 yt/yt/core/rpc/service_detail.h                    |  33 ++++-
 yt/yt/core/rpc/unittests/bin/main.cpp              |   2 +-
 .../rpc/unittests/handle_channel_failure_ut.cpp    |  16 +-
 yt/yt/core/rpc/unittests/lib/common.cpp            |  25 +++-
 yt/yt/core/rpc/unittests/lib/common.h              | 162 ++++++++++++++-------
 yt/yt/core/rpc/unittests/lib/test_service.cpp      |  13 +-
 yt/yt/core/rpc/unittests/lib/test_service.h        |   3 +-
 yt/yt/core/rpc/unittests/mock/service.h            |  14 ++
 .../core/rpc/unittests/rpc_allocation_tags_ut.cpp  |   4 +-
 yt/yt/core/rpc/unittests/rpc_ut.cpp                | 160 ++++++++++++++++----
 yt/yt/core/ytree/ypath_detail.cpp                  |   4 +
 17 files changed, 439 insertions(+), 118 deletions(-)

diff --git a/yt/yt/core/rpc/message.cpp b/yt/yt/core/rpc/message.cpp
index 6a5b6b7b2b..5df17b9513 100644
--- a/yt/yt/core/rpc/message.cpp
+++ b/yt/yt/core/rpc/message.cpp
@@ -385,6 +385,11 @@ bool ParseStreamingFeedbackHeader(
 
 ////////////////////////////////////////////////////////////////////////////////
 
+i64 GetMessageHeaderSize(const TSharedRefArray& message)
+{
+    return message.Size() >= 1 ? static_cast<i64>(message[0].Size()) : 0;
+}
+
 i64 GetMessageBodySize(const TSharedRefArray& message)
 {
     return message.Size() >= 2 ? static_cast<i64>(message[1].Size()) : 0;
diff --git a/yt/yt/core/rpc/message.h b/yt/yt/core/rpc/message.h
index 1b573dc576..4f8baa031a 100644
--- a/yt/yt/core/rpc/message.h
+++ b/yt/yt/core/rpc/message.h
@@ -105,6 +105,7 @@ bool ParseStreamingFeedbackHeader(
     const TSharedRefArray& message,
     NProto::TStreamingFeedbackHeader* header);
 
+i64 GetMessageHeaderSize(const TSharedRefArray& message);
 i64 GetMessageBodySize(const TSharedRefArray& message);
 int GetMessageAttachmentCount(const TSharedRefArray& message);
 i64 GetTotalMessageAttachmentSize(const TSharedRefArray& message);
diff --git a/yt/yt/core/rpc/server_detail.cpp b/yt/yt/core/rpc/server_detail.cpp
index 018fe746cb..bf8886478b 100644
--- a/yt/yt/core/rpc/server_detail.cpp
+++ b/yt/yt/core/rpc/server_detail.cpp
@@ -27,10 +27,14 @@ using NYT::FromProto;
 TServiceContextBase::TServiceContextBase(
     std::unique_ptr<TRequestHeader> header,
     TSharedRefArray requestMessage,
+    TMemoryUsageTrackerGuard memoryGuard,
+    IMemoryUsageTrackerPtr memoryUsageTracker,
     NLogging::TLogger logger,
     NLogging::ELogLevel logLevel)
     : RequestHeader_(std::move(header))
     , RequestMessage_(std::move(requestMessage))
+    , RequestMemoryGuard_(std::move(memoryGuard))
+    , MemoryUsageTracker_(std::move(memoryUsageTracker))
     , Logger(std::move(logger))
     , LogLevel_(logLevel)
 {
@@ -39,10 +43,14 @@ TServiceContextBase::TServiceContextBase(
 
 TServiceContextBase::TServiceContextBase(
     TSharedRefArray requestMessage,
+    TMemoryUsageTrackerGuard memoryGuard,
+    IMemoryUsageTrackerPtr memoryUsageTracker,
     NLogging::TLogger logger,
     NLogging::ELogLevel logLevel)
     : RequestHeader_(new TRequestHeader())
     , RequestMessage_(std::move(requestMessage))
+    , RequestMemoryGuard_(std::move(memoryGuard))
+    , MemoryUsageTracker_(std::move(memoryUsageTracker))
     , Logger(std::move(logger))
     , LogLevel_(logLevel)
 {
@@ -67,6 +75,10 @@ void TServiceContextBase::Initialize()
     RequestAttachments_ = std::vector<TSharedRef>(
         RequestMessage_.Begin() + 2,
         RequestMessage_.End());
+    TotalSize_ = TypicalRequestSize +
+        GetMessageHeaderSize(RequestMessage_) +
+        GetMessageBodySize(RequestMessage_) +
+        GetTotalMessageAttachmentSize(RequestMessage_);
 }
 
 void TServiceContextBase::Reply(const TError& error)
@@ -299,6 +311,11 @@ TRequestId TServiceContextBase::GetRequestId() const
     return RequestId_;
 }
 
+i64 TServiceContextBase::GetTotalSize() const
+{
+    return TotalSize_;
+}
+
 TBusNetworkStatistics TServiceContextBase::GetBusNetworkStatistics() const
 {
     return {};
@@ -450,6 +467,11 @@ void TServiceContextBase::SetRawResponseInfo(TString info, bool incremental)
     }
 }
 
+const IMemoryUsageTrackerPtr& TServiceContextBase::GetMemoryUsageTracker() const
+{
+    return MemoryUsageTracker_;
+}
+
 const NLogging::TLogger& TServiceContextBase::GetLogger() const
 {
     return Logger;
@@ -591,6 +613,11 @@ TRealmId TServiceContextWrapper::GetRealmId() const
     return UnderlyingContext_->GetRealmId();
 }
 
+i64 TServiceContextWrapper::GetTotalSize() const
+{
+    return UnderlyingContext_->GetTotalSize();
+}
+
 const TAuthenticationIdentity& TServiceContextWrapper::GetAuthenticationIdentity() const
 {
     return UnderlyingContext_->GetAuthenticationIdentity();
@@ -724,6 +751,11 @@ void TServiceContextWrapper::SetRawResponseInfo(TString info, bool incremental)
     UnderlyingContext_->SetRawResponseInfo(std::move(info), incremental);
 }
 
+const IMemoryUsageTrackerPtr& TServiceContextWrapper::GetMemoryUsageTracker() const
+{
+    return UnderlyingContext_->GetMemoryUsageTracker();
+}
+
 const NLogging::TLogger& TServiceContextWrapper::GetLogger() const
 {
     return UnderlyingContext_->GetLogger();
diff --git a/yt/yt/core/rpc/server_detail.h b/yt/yt/core/rpc/server_detail.h
index aceba1f14e..64e076d1d5 100644
--- a/yt/yt/core/rpc/server_detail.h
+++ b/yt/yt/core/rpc/server_detail.h
@@ -7,6 +7,8 @@
 
 #include <yt/yt/core/logging/log.h>
 
+#include <yt/yt/core/misc/memory_usage_tracker.h>
+
 #include <yt/yt_proto/yt/core/rpc/proto/rpc.pb.h>
 
 #include <library/cpp/yt/threading/rw_spin_lock.h>
@@ -16,6 +18,11 @@ namespace NYT::NRpc {
 
 ////////////////////////////////////////////////////////////////////////////////
 
+// Magic constant! This is the lower limit of the memory allocated for the request.
+constexpr i64 TypicalRequestSize = 4_KB;
+
+////////////////////////////////////////////////////////////////////////////////
+
 //! \note Thread affinity: single-threaded (unless noted otherwise)
 class TServiceContextBase
     : public virtual IServiceContext
@@ -29,6 +36,8 @@ public:
     const NYTree::IAttributeDictionary& GetEndpointAttributes() const override;
     const TString& GetEndpointDescription() const override;
 
+    i64 GetTotalSize() const override;
+
     std::optional<TInstant> GetStartTime() const override;
     std::optional<TDuration> GetTimeout() const override;
     TInstant GetArriveInstant() const override;
@@ -94,6 +103,8 @@ public:
     void SuppressMissingRequestInfoCheck() override;
     void SetRawResponseInfo(TString info, bool incremental) override;
 
+    const IMemoryUsageTrackerPtr& GetMemoryUsageTracker() const override;
+
     const NLogging::TLogger& GetLogger() const override;
     NLogging::ELogLevel GetLogLevel() const override;
 
@@ -108,6 +119,10 @@ public:
 protected:
     std::unique_ptr<NProto::TRequestHeader> RequestHeader_;
     TSharedRefArray RequestMessage_;
+
+    TMemoryUsageTrackerGuard RequestMemoryGuard_;
+    const IMemoryUsageTrackerPtr MemoryUsageTracker_;
+
     const NLogging::TLogger Logger;
     const NLogging::ELogLevel LogLevel_;
 
@@ -124,6 +139,8 @@ protected:
     std::atomic<bool> Replied_ = false;
     TError Error_;
 
+    i64 TotalSize_ = 0;
+
     TSharedRef ResponseBody_;
     std::vector<TSharedRef> ResponseAttachments_;
 
@@ -140,10 +157,14 @@ protected:
     TServiceContextBase(
         std::unique_ptr<NProto::TRequestHeader> header,
         TSharedRefArray requestMessage,
+        TMemoryUsageTrackerGuard memoryGuard,
+        IMemoryUsageTrackerPtr memoryUsageTracker,
         NLogging::TLogger logger,
         NLogging::ELogLevel logLevel);
     TServiceContextBase(
         TSharedRefArray requestMessage,
+        TMemoryUsageTrackerGuard memoryGuard,
+        IMemoryUsageTrackerPtr memoryUsageTracker,
         NLogging::TLogger logger,
         NLogging::ELogLevel logLevel);
 
@@ -199,6 +220,8 @@ public:
     TRealmId GetRealmId() const override;
     const TAuthenticationIdentity& GetAuthenticationIdentity() const override;
 
+    i64 GetTotalSize() const override;
+
     bool IsReplied() const override;
     void Reply(const TError& error) override;
     void Reply(const TSharedRefArray& responseMessage) override;
@@ -241,6 +264,8 @@ public:
     void SuppressMissingRequestInfoCheck() override;
     void SetRawResponseInfo(TString info, bool incremental) override;
 
+    const IMemoryUsageTrackerPtr& GetMemoryUsageTracker() const override;
+
     const NLogging::TLogger& GetLogger() const override;
     NLogging::ELogLevel GetLogLevel() const override;
 
diff --git a/yt/yt/core/rpc/service.h b/yt/yt/core/rpc/service.h
index 1c2e721730..b92aabac5d 100644
--- a/yt/yt/core/rpc/service.h
+++ b/yt/yt/core/rpc/service.h
@@ -216,6 +216,9 @@ struct IServiceContext
      */
     virtual void SetRawResponseInfo(TString info, bool incremental) = 0;
 
+    //! Returns the memory usage tracker for request/response messages.
+    virtual const IMemoryUsageTrackerPtr& GetMemoryUsageTracker() const = 0;
+
     //! Returns the logger for request/response messages.
     virtual const NLogging::TLogger& GetLogger() const = 0;
 
@@ -236,6 +239,9 @@ struct IServiceContext
     virtual bool IsResponseBodySerializedWithCompression() const = 0;
     virtual void SetResponseBodySerializedWithCompression() = 0;
 
+    //! Return total size of request. Sum of Header, Body, Attachments, TServiceContext, parsed RequestHeaderProto and TraceContext.
+    virtual i64 GetTotalSize() const = 0;
+
     // Extension methods.
 
     void SetRequestInfo();
diff --git a/yt/yt/core/rpc/service_detail.cpp b/yt/yt/core/rpc/service_detail.cpp
index 7440d9c9c9..23c7284dab 100644
--- a/yt/yt/core/rpc/service_detail.cpp
+++ b/yt/yt/core/rpc/service_detail.cpp
@@ -345,6 +345,8 @@ public:
         : TServiceContextBase(
             std::move(acceptedRequest.Header),
             std::move(acceptedRequest.Message),
+            std::move(acceptedRequest.MemoryGuard),
+            std::move(acceptedRequest.MemoryUsageTracker),
             std::move(logger),
             acceptedRequest.RuntimeInfo->LogLevel.load(std::memory_order::relaxed))
         , Service_(std::move(service))
@@ -722,7 +724,6 @@ private:
     TAttachmentsInputStreamPtr RequestAttachmentsStream_;
     TAttachmentsOutputStreamPtr ResponseAttachmentsStream_;
 
-
     bool IsRegistrable()
     {
         if (Cancelable_) {
@@ -1077,9 +1078,7 @@ private:
         }
 
         if (RequestRun_) {
-            auto requestTotalSize = GetMessageBodySize(RequestMessage_) +
-                GetTotalMessageAttachmentSize(RequestMessage_);
-            RequestQueue_->OnRequestFinished(requestTotalSize);
+            RequestQueue_->OnRequestFinished(TotalSize_);
         }
 
         if (ActiveRequestCountIncremented_) {
@@ -1432,7 +1431,7 @@ void TRequestQueue::OnRequestArrived(const TServiceBase::TServiceContextPtr& con
     }
 
     // Slow path.
-    DecrementConcurrency(GetTotalRequestSize(context));
+    DecrementConcurrency(context->GetTotalSize());
     IncrementQueueSize(context);
 
     context->BeforeEnqueued();
@@ -1526,28 +1525,22 @@ void TRequestQueue::RunRequest(TServiceBase::TServiceContextPtr context)
 void TRequestQueue::IncrementQueueSize(const TServiceBase::TServiceContextPtr& context)
 {
     ++QueueSize_;
-    QueueByteSize_.fetch_add(GetTotalRequestSize(context));
+    QueueByteSize_.fetch_add(context->GetTotalSize());
 }
 
 void  TRequestQueue::DecrementQueueSize(const TServiceBase::TServiceContextPtr& context)
 {
     auto newQueueSize = --QueueSize_;
-    auto oldQueueByteSize = QueueByteSize_.fetch_sub(GetTotalRequestSize(context));
+    auto oldQueueByteSize = QueueByteSize_.fetch_sub(context->GetTotalSize());
 
     YT_ASSERT(newQueueSize >= 0);
     YT_ASSERT(oldQueueByteSize >= 0);
 }
 
-i64 TRequestQueue::GetTotalRequestSize(const TServiceBase::TServiceContextPtr& context)
-{
-    return GetMessageBodySize(context->GetRequestMessage()) +
-        GetTotalMessageAttachmentSize(context->GetRequestMessage());
-}
-
 bool TRequestQueue::IncrementConcurrency(const TServiceBase::TServiceContextPtr& context)
 {
     auto resultSize = ++Concurrency_ <= RuntimeInfo_->ConcurrencyLimit.GetDynamicLimit();
-    auto resultByteSize = ConcurrencyByte_.fetch_add(GetTotalRequestSize(context)) <= RuntimeInfo_->ConcurrencyByteLimit.GetDynamicByteLimit();
+    auto resultByteSize = ConcurrencyByte_.fetch_add(context->GetTotalSize()) <= RuntimeInfo_->ConcurrencyByteLimit.GetDynamicByteLimit();
     return resultSize && resultByteSize;
 }
 
@@ -1572,7 +1565,7 @@ void TRequestQueue::AcquireThrottlers(const TServiceBase::TServiceContextPtr& co
 {
     if (BytesThrottler_.Specified.load(std::memory_order::acquire)) {
         // Slow path.
-        auto requestSize = GetTotalRequestSize(context);
+        auto requestSize = context->GetTotalSize();
         BytesThrottler_.Throttler->Acquire(requestSize);
     }
     if (WeightThrottler_.Specified.load(std::memory_order::acquire)) {
@@ -1637,11 +1630,28 @@ TServiceBase::TServiceBase(
     const NLogging::TLogger& logger,
     TRealmId realmId,
     IAuthenticatorPtr authenticator)
+    : TServiceBase(
+        std::move(defaultInvoker),
+        descriptor,
+        GetNullMemoryUsageTracker(),
+        logger,
+        realmId,
+        authenticator)
+{ }
+
+TServiceBase::TServiceBase(
+    IInvokerPtr defaultInvoker,
+    const TServiceDescriptor& descriptor,
+    IMemoryUsageTrackerPtr memoryUsageTracker,
+    const NLogging::TLogger& logger,
+    TRealmId realmId,
+    IAuthenticatorPtr authenticator)
     : Logger(logger)
     , DefaultInvoker_(std::move(defaultInvoker))
     , Authenticator_(std::move(authenticator))
     , ServiceDescriptor_(descriptor)
     , ServiceId_(descriptor.FullServiceName, realmId)
+    , MemoryUsageTracker_(std::move(memoryUsageTracker))
     , Profiler_(RpcServerProfiler.WithHot().WithTag("yt_service", TString(ServiceId_.ServiceName)))
     , AuthenticationTimer_(Profiler_.Timer("/authentication_time"))
     , ServiceLivenessChecker_(New<TPeriodicExecutor>(
@@ -1701,6 +1711,14 @@ void TServiceBase::HandleRequest(
         return;
     }
 
+    auto memoryGuard = TMemoryUsageTrackerGuard::Acquire(MemoryUsageTracker_, TypicalRequestSize);
+    message = TrackMemory(MemoryUsageTracker_, std::move(message));
+    if (MemoryUsageTracker_ && MemoryUsageTracker_->IsExceeded()) {
+        return replyError(TError(
+            NRpc::EErrorCode::MemoryOverflow,
+            "Request is dropped due to high memory pressure"));
+    }
+
     auto tracingMode = runtimeInfo->TracingMode.load(std::memory_order::relaxed);
     auto traceContext = tracingMode == ERequestTracingMode::Disable
         ? NTracing::TTraceContextPtr()
@@ -1747,7 +1765,9 @@ void TServiceBase::HandleRequest(
         std::move(header),
         std::move(message),
         requestQueue,
-        maybeThrottled
+        maybeThrottled,
+        std::move(memoryGuard),
+        MemoryUsageTracker_,
     };
 
     if (!IsAuthenticationNeeded(acceptedRequest)) {
diff --git a/yt/yt/core/rpc/service_detail.h b/yt/yt/core/rpc/service_detail.h
index e21e9d59c2..2c2f7f3b1c 100644
--- a/yt/yt/core/rpc/service_detail.h
+++ b/yt/yt/core/rpc/service_detail.h
@@ -20,6 +20,7 @@
 #include <yt/yt/core/misc/object_pool.h>
 #include <yt/yt/core/misc/protobuf_helpers.h>
 #include <yt/yt/core/misc/ring_queue.h>
+#include <yt/yt/core/misc/memory_usage_tracker.h>
 
 #include <yt/yt/core/profiling/timing.h>
 
@@ -195,6 +196,7 @@ public:
         }
 
         Request_->Context_ = underlyingContext.Get();
+        auto tracker = Request_->Context_->GetMemoryUsageTracker();
 
         const auto& requestHeader = this->GetRequestHeader();
         // COMPAT(danilalexeev): legacy RPC codecs
@@ -226,12 +228,12 @@ public:
                 formatOptionsYson = NYson::TYsonString(requestHeader.request_format_options());
             }
             if (format != EMessageFormat::Protobuf) {
-                body = ConvertMessageFromFormat(
+                body = TrackMemory(tracker, ConvertMessageFromFormat(
                     body,
                     format,
                     NYson::ReflectProtobufMessageType<TRequestMessage>(),
                     formatOptionsYson,
-                    !bodyCodecId.has_value());
+                    !bodyCodecId.has_value()));
             }
         }
 
@@ -247,9 +249,19 @@ public:
 
         std::vector<TSharedRef> requestAttachments;
         try {
-            requestAttachments = DecompressAttachments(
-                underlyingContext->RequestAttachments(),
-                attachmentCodecId);
+            if (attachmentCodecId == NCompression::ECodec::None) {
+                requestAttachments = underlyingContext->RequestAttachments();
+            } else {
+                requestAttachments = DecompressAttachments(
+                    underlyingContext->RequestAttachments(),
+                    attachmentCodecId);
+
+                // For decompressed blocks, memory tracking must be used again,
+                // since they are allocated in a new allocation.
+                for (auto& attachment : requestAttachments) {
+                    attachment = TrackMemory(tracker, attachment);
+                }
+            }
         } catch (const std::exception& ex) {
             underlyingContext->Reply(TError(
                 NRpc::EErrorCode::ProtocolError,
@@ -815,6 +827,14 @@ protected:
         TRealmId realmId = NullRealmId,
         IAuthenticatorPtr authenticator = nullptr);
 
+    TServiceBase(
+        IInvokerPtr defaultInvoker,
+        const TServiceDescriptor& descriptor,
+        IMemoryUsageTrackerPtr memoryUsageTracker,
+        const NLogging::TLogger& logger,
+        TRealmId realmId = NullRealmId,
+        IAuthenticatorPtr authenticator = nullptr);
+
     //! Registers a method handler.
     //! This call is must be performed prior to service registration.
     virtual TRuntimeMethodInfoPtr RegisterMethod(const TMethodDescriptor& descriptor);
@@ -894,6 +914,7 @@ private:
     const IAuthenticatorPtr Authenticator_;
     const TServiceDescriptor ServiceDescriptor_;
     const TServiceId ServiceId_;
+    const IMemoryUsageTrackerPtr MemoryUsageTracker_;
 
     const NProfiling::TProfiler Profiler_;
 
@@ -977,6 +998,8 @@ private:
         TSharedRefArray Message;
         TRequestQueue* RequestQueue;
         std::optional<TError> ThrottledError;
+        TMemoryUsageTrackerGuard MemoryGuard;
+        IMemoryUsageTrackerPtr MemoryUsageTracker;
     };
 
     void DoDeclareServerFeature(int featureId);
diff --git a/yt/yt/core/rpc/unittests/bin/main.cpp b/yt/yt/core/rpc/unittests/bin/main.cpp
index 2b3e4f2c9e..a4c90bb160 100644
--- a/yt/yt/core/rpc/unittests/bin/main.cpp
+++ b/yt/yt/core/rpc/unittests/bin/main.cpp
@@ -28,7 +28,7 @@ int main(int argc, char* argv[])
         auto server = CreateBusServer(busServer);
 
         auto workerPool = CreateThreadPool(4, "Worker");
-        auto service = CreateTestService(workerPool->GetInvoker(), false, /*createChannel*/ {});
+        auto service = CreateTestService(workerPool->GetInvoker(), false, /*createChannel*/ {}, GetNullMemoryUsageTracker());
         server->RegisterService(service);
         server->Start();
 
diff --git a/yt/yt/core/rpc/unittests/handle_channel_failure_ut.cpp b/yt/yt/core/rpc/unittests/handle_channel_failure_ut.cpp
index fd9165b570..23196016bc 100644
--- a/yt/yt/core/rpc/unittests/handle_channel_failure_ut.cpp
+++ b/yt/yt/core/rpc/unittests/handle_channel_failure_ut.cpp
@@ -16,9 +16,13 @@ class THandleChannelFailureTestBase
     : public ::testing::Test
 {
 public:
-    IServerPtr CreateServer(const TTestServerHost& serverHost, IMemoryUsageTrackerPtr memoryUsageTracker)
+    IServerPtr CreateServer(
+        const TTestServerHost& serverHost,
+        IMemoryUsageTrackerPtr memoryUsageTracker)
     {
-        return TImpl::CreateServer(serverHost.GetPort(), memoryUsageTracker);
+        return TImpl::CreateServer(
+            serverHost.GetPort(),
+            memoryUsageTracker);
     }
 
     IChannelPtr CreateChannel(const TString& address)
@@ -50,7 +54,9 @@ TYPED_TEST(THandleChannelFailureTest, HandleChannelFailureTest)
     auto workerPool = NConcurrency::CreateThreadPool(4, "Worker");
 
     outerServer.InitializeServer(
-        this->CreateServer(outerServer, New<TTestNodeMemoryTracker>(32_MB)),
+        this->CreateServer(
+            outerServer,
+            outerServer.GetMemoryUsageTracker()),
         workerPool->GetInvoker(),
         /*secure*/ false,
         BIND([&] (const TString& address) {
@@ -58,7 +64,9 @@ TYPED_TEST(THandleChannelFailureTest, HandleChannelFailureTest)
         }));
 
     innerServer.InitializeServer(
-        this->CreateServer(innerServer, New<TTestNodeMemoryTracker>(32_MB)),
+        this->CreateServer(
+            innerServer,
+            innerServer.GetMemoryUsageTracker()),
         workerPool->GetInvoker(),
         /*secure*/ false,
         /*createChannel*/ {});
diff --git a/yt/yt/core/rpc/unittests/lib/common.cpp b/yt/yt/core/rpc/unittests/lib/common.cpp
index 089d3b90cd..a1f72f5c07 100644
--- a/yt/yt/core/rpc/unittests/lib/common.cpp
+++ b/yt/yt/core/rpc/unittests/lib/common.cpp
@@ -108,11 +108,28 @@ i64 TTestNodeMemoryTracker::GetTotalUsage() const
     return TotalUsage_;
 }
 
-TSharedRef TTestNodeMemoryTracker::Track(
-    TSharedRef reference,
-    bool /*keepHolder*/)
+TSharedRef TTestNodeMemoryTracker::Track(TSharedRef reference, bool keepExistingTracking)
 {
-    return reference;
+    if (!reference) {
+        return reference;
+    }
+
+    auto rawReference = TRef(reference);
+    const auto& holder = reference.GetHolder();
+
+    // Reference could be without a holder, e.g. empty reference.
+    if (!holder) {
+        YT_VERIFY(reference.Begin() == TRef::MakeEmpty().Begin());
+        return reference;
+    }
+
+    auto guard = TMemoryUsageTrackerGuard::Acquire(this, reference.Size());
+
+    auto underlyingHolder = holder->Clone({.KeepMemoryReferenceTracking = keepExistingTracking});
+    auto underlyingReference = TSharedRef(rawReference, std::move(underlyingHolder));
+    return TSharedRef(
+        rawReference,
+        New<TTestTrackedReferenceHolder>(std::move(underlyingReference), std::move(guard)));
 }
 
 ////////////////////////////////////////////////////////////////////////////////
diff --git a/yt/yt/core/rpc/unittests/lib/common.h b/yt/yt/core/rpc/unittests/lib/common.h
index 71fd251a80..f87c544c20 100644
--- a/yt/yt/core/rpc/unittests/lib/common.h
+++ b/yt/yt/core/rpc/unittests/lib/common.h
@@ -59,6 +59,74 @@ namespace NYT::NRpc {
 
 ////////////////////////////////////////////////////////////////////////////////
 
+class TTestNodeMemoryTracker
+    : public IMemoryUsageTracker
+{
+public:
+    explicit TTestNodeMemoryTracker(size_t limit);
+
+    i64 GetLimit() const override;
+    i64 GetUsed() const override;
+    i64 GetFree() const override;
+    bool IsExceeded() const override;
+
+    TError TryAcquire(i64 size) override;
+    TError TryChange(i64 size) override;
+    bool Acquire(i64 size) override;
+    void Release(i64 size) override;
+    void SetLimit(i64 size) override;
+
+    void ClearTotalUsage();
+    i64 GetTotalUsage() const;
+
+    TSharedRef Track(
+        TSharedRef reference,
+        bool keepHolder = false) override;
+private:
+    class TTestTrackedReferenceHolder
+        : public TSharedRangeHolder
+    {
+    public:
+        TTestTrackedReferenceHolder(
+            TSharedRef underlying,
+            TMemoryUsageTrackerGuard guard)
+            : Underlying_(std::move(underlying))
+            , Guard_(std::move(guard))
+        { }
+
+        TSharedRangeHolderPtr Clone(const TSharedRangeHolderCloneOptions& options) override
+        {
+            if (options.KeepMemoryReferenceTracking) {
+                return this;
+            }
+            return Underlying_.GetHolder()->Clone(options);
+        }
+
+        std::optional<size_t> GetTotalByteSize() const override
+        {
+            return Underlying_.GetHolder()->GetTotalByteSize();
+        }
+
+    private:
+        const TSharedRef Underlying_;
+        const TMemoryUsageTrackerGuard Guard_;
+    };
+
+    YT_DECLARE_SPIN_LOCK(NThreading::TSpinLock, Lock_);
+    i64 Usage_;
+    i64 Limit_;
+    i64 TotalUsage_;
+
+    TError DoTryAcquire(i64 size);
+    void DoAcquire(i64 size);
+    void DoRelease(i64 size);
+};
+
+DECLARE_REFCOUNTED_CLASS(TTestNodeMemoryTracker)
+DEFINE_REFCOUNTED_TYPE(TTestNodeMemoryTracker)
+
+////////////////////////////////////////////////////////////////////////////////
+
 class TTestServerHost
 {
 public:
@@ -66,6 +134,7 @@ public:
     {
         Port_ = NTesting::GetFreePort();
         Address_ = Format("localhost:%v", Port_);
+        MemoryUsageTracker_ = New<TTestNodeMemoryTracker>(32_MB);
     }
 
     void InitializeServer(
@@ -75,7 +144,7 @@ public:
         TTestCreateChannelCallback createChannel)
     {
         Server_ = server;
-        TestService_ = CreateTestService(invoker, secure, createChannel);
+        TestService_ = CreateTestService(invoker, secure, createChannel, MemoryUsageTracker_);
         NoBaggageService_ = CreateNoBaggageService(invoker);
         Server_->RegisterService(TestService_);
         Server_->RegisterService(NoBaggageService_);
@@ -93,11 +162,26 @@ public:
         return Port_;
     }
 
+    TTestNodeMemoryTrackerPtr GetMemoryUsageTracker()
+    {
+        return MemoryUsageTracker_;
+    }
+
     TString GetAddress() const
     {
         return Address_;
     }
 
+    ITestServicePtr GetTestService()
+    {
+        return TestService_;
+    }
+
+    IServerPtr GetServer()
+    {
+        return Server_;
+    }
+
 protected:
     NTesting::TPortHolder Port_;
     TString Address_;
@@ -105,64 +189,24 @@ protected:
     ITestServicePtr TestService_;
     IServicePtr NoBaggageService_;
     IServerPtr Server_;
+    TTestNodeMemoryTrackerPtr MemoryUsageTracker_;
 };
 
 ////////////////////////////////////////////////////////////////////////////////
 
-class TTestNodeMemoryTracker
-    : public IMemoryUsageTracker
-{
-public:
-    explicit TTestNodeMemoryTracker(size_t limit);
-
-    i64 GetLimit() const override;
-    i64 GetUsed() const override;
-    i64 GetFree() const override;
-    bool IsExceeded() const override;
-
-    TError TryAcquire(i64 size) override;
-    TError TryChange(i64 size) override;
-    bool Acquire(i64 size) override;
-    void Release(i64 size) override;
-    void SetLimit(i64 size) override;
-
-    void ClearTotalUsage();
-    i64 GetTotalUsage() const;
-
-    TSharedRef Track(
-        TSharedRef reference,
-        bool keepHolder = false) override;
-private:
-    YT_DECLARE_SPIN_LOCK(NThreading::TSpinLock, Lock_);
-    i64 Usage_;
-    i64 Limit_;
-    i64 TotalUsage_;
-
-    TError DoTryAcquire(i64 size);
-    void DoAcquire(i64 size);
-    void DoRelease(i64 size);
-};
-
-DECLARE_REFCOUNTED_CLASS(TTestNodeMemoryTracker)
-DEFINE_REFCOUNTED_TYPE(TTestNodeMemoryTracker)
-
-////////////////////////////////////////////////////////////////////////////////
-
 template <class TImpl>
 class TTestBase
     : public ::testing::Test
-    , public TTestServerHost
 {
 public:
     void SetUp() final
     {
-        TTestServerHost::InitilizeAddress();
+        Host_.InitilizeAddress();
 
         WorkerPool_ = NConcurrency::CreateThreadPool(4, "Worker");
         bool secure = TImpl::Secure;
-        MemoryUsageTracker_ = New<TTestNodeMemoryTracker>(32_MB);
-        TTestServerHost::InitializeServer(
-            TImpl::CreateServer(Port_, MemoryUsageTracker_),
+        Host_.InitializeServer(
+            TImpl::CreateServer(Host_.GetPort(), Host_.GetMemoryUsageTracker()),
             WorkerPool_->GetInvoker(),
             secure,
             /*createChannel*/ {});
@@ -170,12 +214,7 @@ public:
 
     void TearDown() final
     {
-        TTestServerHost::TearDown();
-    }
-
-    TTestNodeMemoryTrackerPtr GetNodeMemoryUsageTracker()
-    {
-        return MemoryUsageTracker_;
+        Host_.TearDown();
     }
 
     IChannelPtr CreateChannel(
@@ -183,12 +222,27 @@ public:
         THashMap<TString, NYTree::INodePtr> grpcArguments = {})
     {
         if (address) {
-            return TImpl::CreateChannel(*address, Address_, std::move(grpcArguments));
+            return TImpl::CreateChannel(*address, Host_.GetAddress(), std::move(grpcArguments));
         } else {
-            return TImpl::CreateChannel(Address_, Address_, std::move(grpcArguments));
+            return TImpl::CreateChannel(Host_.GetAddress(), Host_.GetAddress(), std::move(grpcArguments));
         }
     }
 
+    TTestNodeMemoryTrackerPtr GetMemoryUsageTracker()
+    {
+        return Host_.GetMemoryUsageTracker();
+    }
+
+    ITestServicePtr GetTestService()
+    {
+        return Host_.GetTestService();
+    }
+
+    IServerPtr GetServer()
+    {
+        return Host_.GetServer();
+    }
+
     static bool CheckCancelCode(TErrorCode code)
     {
         if (code == NYT::EErrorCode::Canceled) {
@@ -213,7 +267,7 @@ public:
 
 private:
     NConcurrency::IThreadPoolPtr WorkerPool_;
-    TTestNodeMemoryTrackerPtr MemoryUsageTracker_;
+    TTestServerHost Host_;
 };
 
 ////////////////////////////////////////////////////////////////////////////////
diff --git a/yt/yt/core/rpc/unittests/lib/test_service.cpp b/yt/yt/core/rpc/unittests/lib/test_service.cpp
index 0e51ffe6e7..5794a239cd 100644
--- a/yt/yt/core/rpc/unittests/lib/test_service.cpp
+++ b/yt/yt/core/rpc/unittests/lib/test_service.cpp
@@ -28,10 +28,12 @@ public:
     TTestService(
         IInvokerPtr invoker,
         bool secure,
-        TTestCreateChannelCallback createChannel)
+        TTestCreateChannelCallback createChannel,
+        IMemoryUsageTrackerPtr memoryUsageTracker)
         : TServiceBase(
             invoker,
             TTestProxy::GetDescriptor(),
+            std::move(memoryUsageTracker),
             NLogging::TLogger("Main"))
         , Secure_(secure)
         , CreateChannel_(createChannel)
@@ -380,9 +382,14 @@ private:
 ITestServicePtr CreateTestService(
     IInvokerPtr invoker,
     bool secure,
-    TTestCreateChannelCallback createChannel)
+    TTestCreateChannelCallback createChannel,
+    IMemoryUsageTrackerPtr memoryUsageTracker)
 {
-    return New<TTestService>(invoker, secure, createChannel);
+    return New<TTestService>(
+        invoker,
+        secure,
+        createChannel,
+        std::move(memoryUsageTracker));
 }
 
 ////////////////////////////////////////////////////////////////////////////////
diff --git a/yt/yt/core/rpc/unittests/lib/test_service.h b/yt/yt/core/rpc/unittests/lib/test_service.h
index da18cf132d..45d261f002 100644
--- a/yt/yt/core/rpc/unittests/lib/test_service.h
+++ b/yt/yt/core/rpc/unittests/lib/test_service.h
@@ -70,7 +70,8 @@ using TTestCreateChannelCallback = TCallback<IChannelPtr(const TString& address)
 ITestServicePtr CreateTestService(
     IInvokerPtr invoker,
     bool secure,
-    TTestCreateChannelCallback createChannel);
+    TTestCreateChannelCallback createChannel,
+    IMemoryUsageTrackerPtr memoryUsageTracker);
 
 ////////////////////////////////////////////////////////////////////////////////
 
diff --git a/yt/yt/core/rpc/unittests/mock/service.h b/yt/yt/core/rpc/unittests/mock/service.h
index 21204b12d9..d99c1a9370 100644
--- a/yt/yt/core/rpc/unittests/mock/service.h
+++ b/yt/yt/core/rpc/unittests/mock/service.h
@@ -48,6 +48,13 @@ public:
         (const, override)
     );
 
+    MOCK_METHOD(
+        i64,
+        GetTotalSize,
+        (),
+        (const, override)
+    );
+
     MOCK_METHOD(
         NYTree::IAttributeDictionary&,
         GetEndpointAttributes,
@@ -328,6 +335,13 @@ public:
         (override)
     );
 
+    MOCK_METHOD(
+        const IMemoryUsageTrackerPtr&,
+        GetMemoryUsageTracker,
+        (),
+        (const, override)
+    );
+
     MOCK_METHOD(
         const NLogging::TLogger&,
         GetLogger,
diff --git a/yt/yt/core/rpc/unittests/rpc_allocation_tags_ut.cpp b/yt/yt/core/rpc/unittests/rpc_allocation_tags_ut.cpp
index dce15890fd..f8bc40e8ed 100644
--- a/yt/yt/core/rpc/unittests/rpc_allocation_tags_ut.cpp
+++ b/yt/yt/core/rpc/unittests/rpc_allocation_tags_ut.cpp
@@ -29,7 +29,7 @@ TYPED_TEST_SUITE(TRpcTest, TAllTransports);
 
 TYPED_TEST(TRpcTest, ResponseWithAllocationTags)
 {
-    auto memoryUsageTracker = this->GetNodeMemoryUsageTracker();
+    auto memoryUsageTracker = this->GetMemoryUsageTracker();
     auto previousLimit = memoryUsageTracker->GetLimit();
     memoryUsageTracker->SetLimit(2_GB);
     static TMemoryTag testMemoryTag = 1 << 20;
@@ -79,7 +79,7 @@ TYPED_TEST(TRpcTest, ResponseWithAllocationTags)
     }
 
     auto memoryUsageBefore = CollectMemoryUsageSnapshot()->GetUsage(MemoryAllocationTag, ToString(testMemoryTag));
-    EXPECT_LE(memoryUsageBefore, numberOfLoops * 1536_KB);
+    EXPECT_LE(memoryUsageBefore, numberOfLoops * 2048_KB);
 
     for (const auto& rsp : responses) {
         WaitFor(rsp).ValueOrThrow();
diff --git a/yt/yt/core/rpc/unittests/rpc_ut.cpp b/yt/yt/core/rpc/unittests/rpc_ut.cpp
index a28e9e0a37..eb3e393603 100644
--- a/yt/yt/core/rpc/unittests/rpc_ut.cpp
+++ b/yt/yt/core/rpc/unittests/rpc_ut.cpp
@@ -250,7 +250,7 @@ TYPED_TEST(TNotGrpcTest, ServerStreamsAborted)
     auto rspOrError = WaitFor(req->Invoke());
     EXPECT_EQ(NYT::EErrorCode::Timeout, rspOrError.GetCode());
 
-    WaitFor(this->TestService_->GetServerStreamsAborted())
+    WaitFor(this->GetTestService()->GetServerStreamsAborted())
         .ThrowOnError();
 }
 
@@ -339,7 +339,7 @@ TYPED_TEST(TNotGrpcTest, ServerNotReading)
         EXPECT_EQ(expectedInvokeErrorCode, rspOrError.GetCode());
     }
 
-    WaitFor(this->TestService_->GetSlowCallCanceled())
+    WaitFor(this->GetTestService()->GetSlowCallCanceled())
         .ThrowOnError();
 }
 
@@ -365,7 +365,7 @@ TYPED_TEST(TNotGrpcTest, ServerNotWriting)
         EXPECT_EQ(expectedInvokeErrorCode, rspOrError.GetCode());
     }
 
-    WaitFor(this->TestService_->GetSlowCallCanceled())
+    WaitFor(this->GetTestService()->GetSlowCallCanceled())
         .ThrowOnError();
 }
 
@@ -400,7 +400,7 @@ TYPED_TEST(TNotGrpcTest, VeryLaggyStreamingRequest)
         };
     })");
     auto config = ConvertTo<TServerConfigPtr>(TYsonString(configText));
-    this->Server_->Configure(config);
+    this->GetServer()->Configure(config);
 
     TTestProxy proxy(this->CreateChannel());
     proxy.DefaultServerAttachmentsStreamingParameters().ReadTimeout = TDuration::MilliSeconds(500);
@@ -506,6 +506,36 @@ TYPED_TEST(TRpcTest, RegularAttachments)
     EXPECT_EQ("TTestProxy_",  StringFromSharedRef(attachments[2]));
 }
 
+TYPED_TEST(TNotGrpcTest, TrackedRegularAttachments)
+{
+    TTestProxy proxy(this->CreateChannel());
+    auto req = proxy.RegularAttachments();
+
+    auto memoryUsageTracker = this->GetMemoryUsageTracker();
+    memoryUsageTracker->ClearTotalUsage();
+
+    req->Attachments().push_back(TSharedRef::FromString("Hello"));
+    req->Attachments().push_back(TSharedRef::FromString("from"));
+    req->Attachments().push_back(TSharedRef::FromString("TTestProxy"));
+
+    auto rspOrError = req->Invoke().Get();
+    EXPECT_TRUE(rspOrError.IsOK());
+    const auto& rsp = rspOrError.Value();
+
+    const auto& attachments = rsp->Attachments();
+    // Attachment allocator proactively allocate slice of 4 KB.
+    // See NYT::NBus::TPacketDecoder::TChunkedMemoryTrackingAllocator::Allocate.
+    // default stub = 4096.
+    // header + body = 110 bytes.
+    // attachments = 22 bytes.
+    // sum is 4228 bytes.
+    EXPECT_EQ(4228 + 32768, memoryUsageTracker->GetTotalUsage());
+    EXPECT_EQ(3u, attachments.size());
+    EXPECT_EQ("Hello_",     StringFromSharedRef(attachments[0]));
+    EXPECT_EQ("from_",      StringFromSharedRef(attachments[1]));
+    EXPECT_EQ("TTestProxy_",  StringFromSharedRef(attachments[2]));
+}
+
 TYPED_TEST(TRpcTest, NullAndEmptyAttachments)
 {
     TTestProxy proxy(this->CreateChannel());
@@ -530,6 +560,9 @@ TYPED_TEST(TNotGrpcTest, Compression)
     const auto requestCodecId = NCompression::ECodec::Zstd_2;
     const auto responseCodecId = NCompression::ECodec::Snappy;
 
+    auto memoryUsageTracker = this->GetMemoryUsageTracker();
+    memoryUsageTracker->ClearTotalUsage();
+
     TString message("This is a message string.");
     std::vector<TString> attachmentStrings({
         "This is an attachment string.",
@@ -554,6 +587,15 @@ TYPED_TEST(TNotGrpcTest, Compression)
     EXPECT_TRUE(rspOrError.IsOK());
     auto rsp = rspOrError.Value();
 
+    // Attachment allocator proactively allocate slice of 4 KB.
+    // 32 KB - is read/write buffers per connection.
+    // See NYT::NBus::TPacketDecoder::TChunkedMemoryTrackingAllocator::Allocate.
+    // default stub = 4096.
+    // attachmentStrings[0].size() = 29 * 2 bytes from decoder.
+    // attachmentStrings[1].size() = 36 * 2 bytes from decoder.
+    // attachmentStrings[2].size() = 90 * 2 bytes from decoder.
+    // sum is 4591 bytes.
+    EXPECT_EQ(4591 + 32768, memoryUsageTracker->GetTotalUsage());
     EXPECT_TRUE(rsp->message() == message);
     EXPECT_TRUE(rsp->GetResponseMessage().Size() >= 2);
     const auto& serializedResponseBody = SerializeProtoToRefWithCompression(*rsp, responseCodecId);
@@ -620,7 +662,7 @@ TYPED_TEST(TNotGrpcTest, RequestBytesThrottling)
         };
     })");
     auto config = ConvertTo<TServerConfigPtr>(TYsonString(configText));
-    this->Server_->Configure(config);
+    this->GetServer()->Configure(config);
 
     TTestProxy proxy(this->CreateChannel());
 
@@ -640,8 +682,7 @@ TYPED_TEST(TNotGrpcTest, RequestBytesThrottling)
     EXPECT_LE(std::abs(static_cast<i64>(timer.GetElapsedTime().MilliSeconds()) - 3000), 200);
 }
 
-// Now test different types of errors
-
+// Now test different types of errors.
 TYPED_TEST(TRpcTest, OK)
 {
     TTestProxy proxy(this->CreateChannel());
@@ -710,7 +751,7 @@ TYPED_TEST(TRpcTest, ServerTimeout)
     auto req = proxy.SlowCanceledCall();
     auto rspOrError = req->Invoke().Get();
     EXPECT_TRUE(this->CheckTimeoutCode(rspOrError.GetCode()));
-    WaitFor(this->TestService_->GetSlowCallCanceled())
+    WaitFor(this->GetTestService()->GetSlowCallCanceled())
         .ThrowOnError();
 }
 
@@ -726,7 +767,7 @@ TYPED_TEST(TRpcTest, ClientCancel)
     EXPECT_TRUE(asyncRspOrError.IsSet());
     auto rspOrError = asyncRspOrError.Get();
     EXPECT_TRUE(this->CheckCancelCode(rspOrError.GetCode()));
-    WaitFor(this->TestService_->GetSlowCallCanceled())
+    WaitFor(this->GetTestService()->GetSlowCallCanceled())
         .ThrowOnError();
 }
 
@@ -744,7 +785,7 @@ TYPED_TEST(TRpcTest, RequestQueueSizeLimit)
     std::vector<TFuture<void>> futures;
     std::vector<TTestProxy> proxies;
 
-    // Concurrency byte limit + queue byte size limit = 10 + 20 = 30
+    // Concurrency byte limit + queue byte size limit = 10 + 20 = 30.
     // First 30 requests must be successful, 31st request must be failed.
     for (int i = 0; i < 30; ++i) {
         proxies.push_back(TTestProxy(this->CreateChannel()));
@@ -767,11 +808,30 @@ TYPED_TEST(TRpcTest, RequestQueueSizeLimit)
     EXPECT_TRUE(AllSucceeded(std::move(futures)).Get().IsOK());
 }
 
+TYPED_TEST(TNotGrpcTest, RequestMemoryOverflowException)
+{
+    auto memoryUsageTracker = this->GetMemoryUsageTracker();
+    memoryUsageTracker->ClearTotalUsage();
+    auto memoryReferenceUsageTracker = this->GetMemoryUsageTracker();
+    memoryReferenceUsageTracker->ClearTotalUsage();
+
+    TTestProxy proxy(this->CreateChannel());
+    proxy.SetDefaultTimeout(TDuration::Seconds(10.0));
+    auto req = proxy.SomeCall();
+    req->set_a(42);
+    req->Attachments().push_back(TSharedRef::FromString(TString(34_MB, 'x')));
+    auto result = WaitFor(req->Invoke().AsVoid());
+
+    // Limit of memory is 32 MB.
+    EXPECT_EQ(NRpc::EErrorCode::MemoryOverflow, req->Invoke().Get().GetCode());
+}
+
 TYPED_TEST(TNotGrpcTest, MemoryTracking)
 {
     TTestProxy proxy(this->CreateChannel());
-    auto memoryUsageTracker = this->GetNodeMemoryUsageTracker();
+    auto memoryUsageTracker = this->GetMemoryUsageTracker();
     memoryUsageTracker->ClearTotalUsage();
+
     proxy.SetDefaultTimeout(TDuration::Seconds(10.0));
     for (int i = 0; i < 300; ++i) {
         auto req = proxy.SomeCall();
@@ -779,15 +839,20 @@ TYPED_TEST(TNotGrpcTest, MemoryTracking)
         WaitFor(req->Invoke().AsVoid()).ThrowOnError();
     }
 
+    Sleep(TDuration::MilliSeconds(200));
+
     {
         auto rpcUsage = memoryUsageTracker->GetTotalUsage();
-        EXPECT_EQ(rpcUsage, (static_cast<i64>(32_KB)));
+
+        // 1261568 = 32768 + 1228800 = 32768 + 4096 * 300 + 300 * 110 (header + body).
+        // 32768 - socket buffers, 4096 - default size per request.
+        EXPECT_EQ(rpcUsage, 1294568);
     }
 }
 
 TYPED_TEST(TNotGrpcTest, MemoryTrackingMultipleConnections)
 {
-    auto memoryUsageTracker = this->GetNodeMemoryUsageTracker();
+    auto memoryUsageTracker = this->GetMemoryUsageTracker();
     memoryUsageTracker->ClearTotalUsage();
     for (int i = 0; i < 300; ++i) {
         TTestProxy proxy(this->CreateChannel());
@@ -798,15 +863,18 @@ TYPED_TEST(TNotGrpcTest, MemoryTrackingMultipleConnections)
     }
 
     {
-        auto rpcUsage = memoryUsageTracker->GetTotalUsage();
-        EXPECT_EQ(rpcUsage, (static_cast<i64>(32_KB) * 300));
+        // 11059200 / 300 = 36974 = 32768 + 4096 + 110 (header + body).
+        // 4 KB - stub for request.
+        // See NYT::NBus::TPacketDecoder::TChunkedMemoryTrackingAllocator::Allocate.
+        EXPECT_EQ(11092200, memoryUsageTracker->GetTotalUsage());
     }
 }
 
 TYPED_TEST(TNotGrpcTest, MemoryTrackingMultipleConcurrent)
 {
-    auto memoryUsageTracker = this->GetNodeMemoryUsageTracker();
+    auto memoryUsageTracker = this->GetMemoryUsageTracker();
     memoryUsageTracker->ClearTotalUsage();
+
     std::vector<TFuture<void>> futures;
     std::vector<TTestProxy> proxies;
 
@@ -820,15 +888,44 @@ TYPED_TEST(TNotGrpcTest, MemoryTrackingMultipleConcurrent)
         futures.push_back(req->Invoke().AsVoid());
     }
 
-    Sleep(TDuration::MilliSeconds(300));
+    Sleep(TDuration::MilliSeconds(100));
+
     {
         auto rpcUsage = memoryUsageTracker->GetUsed();
-        // 20 = concurrency (10) + queue (20)
-        EXPECT_EQ(rpcUsage, (static_cast<i64>(32_KB) * 40));
+
+        // connections count - per connection size.
+        // 40 per connections, 30 per request (concurrency + queue = 10 + 20 = 30). Each request 4096 - by default + 108 (body + header).
+        EXPECT_TRUE(rpcUsage > (static_cast<i64>(32_KB) * 40));
     }
+
     EXPECT_TRUE(AllSet(std::move(futures)).Get().IsOK());
 }
 
+TYPED_TEST(TNotGrpcTest, MemoryOvercommit)
+{
+    const auto requestCodecId = NCompression::ECodec::Zstd_2;
+
+    auto memoryReferenceUsageTracker = this->GetMemoryUsageTracker();
+    memoryReferenceUsageTracker->ClearTotalUsage();
+
+    TTestProxy proxy(this->CreateChannel());
+    proxy.SetDefaultTimeout(TDuration::Seconds(60.0));
+    auto req = proxy.SlowCall();
+    req->set_request_codec(static_cast<int>(requestCodecId));
+    req->Attachments().push_back(TSharedRef::FromString(TString(6_KB, 'x')));
+    WaitFor(req->Invoke()).ThrowOnError();
+    {
+        auto rpcUsage = memoryReferenceUsageTracker->GetTotalUsage();
+
+        // Attachment allocator proactively allocate slice of 4 KB.
+        // See NYT::NBus::TPacketDecoder::TChunkedMemoryTrackingAllocator::Allocate.
+        // default stub = 4096.
+        // header + body = 110 bytes.
+        // attachments = 6_KB  kbytes.
+        EXPECT_EQ(rpcUsage, 32768 + 4096 + 6144 + 110);
+    }
+}
+
 TYPED_TEST(TNotGrpcTest, RequestQueueByteSizeLimit)
 {
     const auto requestCodecId = NCompression::ECodec::Zstd_2;
@@ -837,7 +934,7 @@ TYPED_TEST(TNotGrpcTest, RequestQueueByteSizeLimit)
     std::vector<TTestProxy> proxies;
 
     // Every request contains 2 MB, 15 requests contain 30 MB.
-    // Concurrency byte limit + queue byte size limit = 10 MB + 20 MB = 30 MB
+    // Concurrency byte limit + queue byte size limit = 10 MB + 20 MB = 30 MB.
     // First 15 requests must be successful, 16th request must be failed.
     for (int i = 0; i < 15; ++i) {
         proxies.push_back(TTestProxy(this->CreateChannel()));
@@ -866,17 +963,19 @@ TYPED_TEST(TNotGrpcTest, RequestQueueByteSizeLimit)
 
 TYPED_TEST(TRpcTest, ConcurrencyLimit)
 {
-    TTestProxy proxy(this->CreateChannel());
     std::vector<TFuture<void>> futures;
     for (int i = 0; i < 10; ++i) {
+        TTestProxy proxy(this->CreateChannel());
+        proxy.SetDefaultTimeout(TDuration::Seconds(10.0));
         auto req = proxy.SlowCall();
         futures.push_back(req->Invoke().AsVoid());
     }
 
-    Sleep(TDuration::MilliSeconds(100));
+    Sleep(TDuration::MilliSeconds(200));
 
     TFuture<void> backlogFuture;
     {
+        TTestProxy proxy(this->CreateChannel());
         auto req = proxy.SlowCall();
         backlogFuture = req->Invoke().AsVoid();
     }
@@ -908,7 +1007,7 @@ TYPED_TEST(TRpcTest, CustomErrorMessage)
 
 TYPED_TEST(TRpcTest, ServerStopped)
 {
-    this->Server_->Stop().Get().ThrowOnError();
+    this->GetServer()->Stop().Get().ThrowOnError();
     TTestProxy proxy(this->CreateChannel());
     auto req = proxy.SomeCall();
     req->set_a(42);
@@ -926,14 +1025,14 @@ TYPED_TEST(TRpcTest, ConnectionLost)
     Sleep(TDuration::Seconds(0.5));
 
     EXPECT_FALSE(asyncRspOrError.IsSet());
-    YT_UNUSED_FUTURE(this->Server_->Stop(false));
+    YT_UNUSED_FUTURE(this->GetServer()->Stop(false));
 
     Sleep(TDuration::Seconds(2));
 
     EXPECT_TRUE(asyncRspOrError.IsSet());
     auto rspOrError = asyncRspOrError.Get();
     EXPECT_EQ(NRpc::EErrorCode::TransportError, rspOrError.GetCode());
-    WaitFor(this->TestService_->GetSlowCallCanceled())
+    WaitFor(this->GetTestService()->GetSlowCallCanceled())
         .ThrowOnError();
 }
 
@@ -988,7 +1087,7 @@ TYPED_TEST(TNotGrpcTest, RequiredClientFeatureNotSupported)
 
 TYPED_TEST(TRpcTest, StopWithoutActiveRequests)
 {
-    auto stopResult = this->TestService_->Stop();
+    auto stopResult = this->GetTestService()->Stop();
     EXPECT_TRUE(stopResult.IsSet());
 }
 
@@ -997,8 +1096,11 @@ TYPED_TEST(TRpcTest, StopWithActiveRequests)
     TTestProxy proxy(this->CreateChannel());
     auto req = proxy.SlowCall();
     auto reqResult = req->Invoke();
+
     Sleep(TDuration::Seconds(0.5));
-    auto stopResult = this->TestService_->Stop();
+
+    auto stopResult = this->GetTestService()->Stop();
+
     EXPECT_FALSE(stopResult.IsSet());
     EXPECT_TRUE(reqResult.Get().IsOK());
     Sleep(TDuration::Seconds(0.5));
@@ -1007,11 +1109,13 @@ TYPED_TEST(TRpcTest, StopWithActiveRequests)
 
 TYPED_TEST(TRpcTest, NoMoreRequestsAfterStop)
 {
-    auto stopResult = this->TestService_->Stop();
+    auto stopResult = this->GetTestService()->Stop();
     EXPECT_TRUE(stopResult.IsSet());
+
     TTestProxy proxy(this->CreateChannel());
     auto req = proxy.SlowCall();
     auto reqResult = req->Invoke();
+
     EXPECT_FALSE(reqResult.Get().IsOK());
 }
 
diff --git a/yt/yt/core/ytree/ypath_detail.cpp b/yt/yt/core/ytree/ypath_detail.cpp
index 1cc159b24f..0e15508993 100644
--- a/yt/yt/core/ytree/ypath_detail.cpp
+++ b/yt/yt/core/ytree/ypath_detail.cpp
@@ -1775,6 +1775,8 @@ IYPathServiceContextPtr CreateYPathContext(
 
     return New<TYPathServiceContext>(
         std::move(requestMessage),
+        TMemoryUsageTrackerGuard{},
+        GetNullMemoryUsageTracker(),
         std::move(logger),
         logLevel);
 }
@@ -1790,6 +1792,8 @@ IYPathServiceContextPtr CreateYPathContext(
     return New<TYPathServiceContext>(
         std::move(requestHeader),
         std::move(requestMessage),
+        TMemoryUsageTrackerGuard{},
+        GetNullMemoryUsageTracker(),
         std::move(logger),
         logLevel);
 }
-- 
cgit v1.2.3


From 0f11fd0799a47beb400c526f15e2a3ac86ee5448 Mon Sep 17 00:00:00 2001
From: babenko <babenko@yandex-team.com>
Date: Fri, 12 Apr 2024 00:56:41 +0300
Subject: YT-21539: Fix deep recursion in TCancelableBoundedConcurrencyRunner
 6e8d537565228971a64736d14e8bfeb00280ecab

---
 yt/yt/core/actions/future-inl.h   | 25 +++++++++++++------------
 yt/yt/core/actions/invoker_util.h |  1 -
 yt/yt/core/misc/fs.cpp            |  2 ++
 yt/yt/library/process/process.cpp |  2 ++
 4 files changed, 17 insertions(+), 13 deletions(-)

diff --git a/yt/yt/core/actions/future-inl.h b/yt/yt/core/actions/future-inl.h
index 3b82586642..dbc2de6df4 100644
--- a/yt/yt/core/actions/future-inl.h
+++ b/yt/yt/core/actions/future-inl.h
@@ -6,7 +6,6 @@
 #undef FUTURE_INL_H_
 
 #include "bind.h"
-#include "invoker_util.h"
 
 #include <yt/yt/core/concurrency/delayed_executor.h>
 #include <yt/yt/core/concurrency/thread_affinity.h>
@@ -22,21 +21,21 @@
 namespace NYT {
 
 ////////////////////////////////////////////////////////////////////////////////
-// Forward declarations
 
 namespace NConcurrency {
 
-// scheduler.h
+// Forward declaration from scheduler.h
 TCallback<void(const NYT::TError&)> GetCurrentFiberCanceler();
 
-////////////////////////////////////////////////////////////////////////////////
-
 //! Thrown when a fiber is being terminated by an external event.
 class TFiberCanceledException
 { };
 
 } // namespace NConcurrency
 
+// Forward declaration from invoker_util.h.
+IInvokerPtr GetSyncInvoker();
+
 namespace NDetail {
 
 ////////////////////////////////////////////////////////////////////////////////
@@ -700,7 +699,7 @@ void InterceptExceptions(const TPromise<T>& promise, const F& func)
         promise.Set(ex.Error());
     } catch (const std::exception& ex) {
         promise.Set(NYT::TError(ex));
-    } catch (NConcurrency::TFiberCanceledException& ) {
+    } catch (const NConcurrency::TFiberCanceledException&) {
         promise.Set(MakeAbandonedError());
     }
 }
@@ -2184,7 +2183,7 @@ private:
     std::atomic<int> ResponseCount_ = 0;
 
     YT_DECLARE_SPIN_LOCK(NThreading::TSpinLock, ErrorsLock_);
-    std::vector<TError> Errors_;
+    std::vector<NYT::TError> Errors_;
 
     void OnFutureSet(int /*index*/, const NYT::TErrorOr<T>& result)
     {
@@ -2408,7 +2407,7 @@ public:
         , ConcurrencyLimit_(concurrencyLimit)
         , Futures_(Callbacks_.size(), VoidFuture)
         , Results_(Callbacks_.size())
-        , CurrentIndex_(std::min(ConcurrencyLimit_, ssize(Callbacks_)))
+        , CurrentIndex_(std::min<int>(ConcurrencyLimit_, ssize(Callbacks_)))
     { }
 
     TFuture<std::vector<TErrorOr<T>>> Run()
@@ -2431,14 +2430,14 @@ public:
 
 private:
     const std::vector<TCallback<TFuture<T>()>> Callbacks_;
-    const i64 ConcurrencyLimit_;
+    const int ConcurrencyLimit_;
     const TPromise<std::vector<TErrorOr<T>>> Promise_ = NewPromise<std::vector<TErrorOr<T>>>();
 
     YT_DECLARE_SPIN_LOCK(NThreading::TSpinLock, SpinLock_);
     std::optional<TError> CancelationError_;
     std::vector<TFuture<void>> Futures_;
     std::vector<TErrorOr<T>> Results_;
-    i64 CurrentIndex_;
+    int CurrentIndex_;
     int FinishedCount_ = 0;
 
 
@@ -2463,7 +2462,9 @@ private:
         }
 
         future.Subscribe(
-            BIND_NO_PROPAGATE(&TCancelableBoundedConcurrencyRunner::OnResult, MakeStrong(this), index));
+            BIND_NO_PROPAGATE(&TCancelableBoundedConcurrencyRunner::OnResult, MakeStrong(this), index)
+                // NB: Sync invoker protects from unbounded recursion.
+                .Via(GetSyncInvoker()));
     }
 
     void OnResult(int index, const NYT::TErrorOr<T>& result)
@@ -2504,7 +2505,7 @@ private:
         }
 
         // NB: Setting of CancelationError_ disallows modification of CurrentIndex_ and Futures_.
-        for (int index = 0; index < std::min(ssize(Futures_), CurrentIndex_); ++index) {
+        for (int index = 0; index < std::min<int>(ssize(Futures_), CurrentIndex_); ++index) {
             Futures_[index].Cancel(wrappedError);
         }
 
diff --git a/yt/yt/core/actions/invoker_util.h b/yt/yt/core/actions/invoker_util.h
index f74f217123..0b020c3f6b 100644
--- a/yt/yt/core/actions/invoker_util.h
+++ b/yt/yt/core/actions/invoker_util.h
@@ -2,7 +2,6 @@
 
 #include "public.h"
 
-#include <yt/yt/core/concurrency/public.h>
 #include <yt/yt/core/concurrency/scheduler_api.h>
 
 namespace NYT {
diff --git a/yt/yt/core/misc/fs.cpp b/yt/yt/core/misc/fs.cpp
index a6e0de19b6..20e97165a4 100644
--- a/yt/yt/core/misc/fs.cpp
+++ b/yt/yt/core/misc/fs.cpp
@@ -5,6 +5,8 @@
 
 #include <yt/yt/core/misc/proc.h>
 
+#include <yt/yt/core/actions/invoker_util.h>
+
 #include <library/cpp/yt/system/handle_eintr.h>
 
 #include <util/folder/dirut.h>
diff --git a/yt/yt/library/process/process.cpp b/yt/yt/library/process/process.cpp
index a775bd4090..dba02116e9 100644
--- a/yt/yt/library/process/process.cpp
+++ b/yt/yt/library/process/process.cpp
@@ -12,6 +12,8 @@
 #include <yt/yt/core/concurrency/periodic_executor.h>
 #include <yt/yt/core/concurrency/delayed_executor.h>
 
+#include <yt/yt/core/actions/invoker_util.h>
+
 #include <library/cpp/yt/system/handle_eintr.h>
 
 #include <util/folder/dirut.h>
-- 
cgit v1.2.3


From 174505ce5cdff80adfba073dc3ee3528c7f0c94a Mon Sep 17 00:00:00 2001
From: ermolovd <ermolovd@yandex-team.com>
Date: Fri, 12 Apr 2024 01:27:33 +0300
Subject: Fix crash in retryful writer v2
 d95cdb95b36efff7cbf942996a10ee4ff755bbfc

---
 yt/cpp/mapreduce/client/retryful_writer_v2.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/yt/cpp/mapreduce/client/retryful_writer_v2.cpp b/yt/cpp/mapreduce/client/retryful_writer_v2.cpp
index 583bef8954..cabc6cf8fa 100644
--- a/yt/cpp/mapreduce/client/retryful_writer_v2.cpp
+++ b/yt/cpp/mapreduce/client/retryful_writer_v2.cpp
@@ -60,7 +60,7 @@ public:
     }
 
 private:
-    std::shared_ptr<std::string> Buffer_ = nullptr;
+    std::shared_ptr<std::string> Buffer_ = std::make_shared<std::string>();
     ssize_t Size_ = 0;
     ssize_t Capacity_ = 0;
 };
@@ -246,7 +246,7 @@ private:
     struct TWriteTask
     {
         NThreading::TPromise<void> SendingComplete;
-        std::shared_ptr<std::string> Data;
+        std::shared_ptr<std::string> Data = std::make_shared<std::string>();
         ssize_t Size = 0;
         bool BufferComplete = false;
     };
-- 
cgit v1.2.3


From e8207cbbcd0c8f03d2bd747936c406748306856c Mon Sep 17 00:00:00 2001
From: robot-piglet <robot-piglet@yandex-team.com>
Date: Fri, 12 Apr 2024 11:56:34 +0300
Subject: Intermediate changes

---
 .../python/clickhouse-connect/.dist-info/METADATA    |  2 +-
 .../clickhouse_connect/__version__.py                |  2 +-
 .../cc_sqlalchemy/ddl/tableengine.py                 | 20 ++++++++++++++++++++
 .../clickhouse_connect/driver/external.py            |  4 ++--
 .../clickhouse_connect/driver/query.py               |  2 +-
 contrib/python/clickhouse-connect/ya.make            |  2 +-
 yt/yt/core/rpc/unittests/rpc_ut.cpp                  | 10 +++++-----
 7 files changed, 31 insertions(+), 11 deletions(-)

diff --git a/contrib/python/clickhouse-connect/.dist-info/METADATA b/contrib/python/clickhouse-connect/.dist-info/METADATA
index 7e568e330b..093e1bf5ed 100644
--- a/contrib/python/clickhouse-connect/.dist-info/METADATA
+++ b/contrib/python/clickhouse-connect/.dist-info/METADATA
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: clickhouse-connect
-Version: 0.7.4
+Version: 0.7.5
 Summary: ClickHouse Database Core Driver for Python, Pandas, and Superset
 Home-page: https://github.com/ClickHouse/clickhouse-connect
 Author: ClickHouse Inc.
diff --git a/contrib/python/clickhouse-connect/clickhouse_connect/__version__.py b/contrib/python/clickhouse-connect/clickhouse_connect/__version__.py
index 33c23e6624..c584cf2c45 100644
--- a/contrib/python/clickhouse-connect/clickhouse_connect/__version__.py
+++ b/contrib/python/clickhouse-connect/clickhouse_connect/__version__.py
@@ -1 +1 @@
-version = '0.7.4'
+version = '0.7.5'
diff --git a/contrib/python/clickhouse-connect/clickhouse_connect/cc_sqlalchemy/ddl/tableengine.py b/contrib/python/clickhouse-connect/clickhouse_connect/cc_sqlalchemy/ddl/tableengine.py
index 598e2e5adb..483beaabe2 100644
--- a/contrib/python/clickhouse-connect/clickhouse_connect/cc_sqlalchemy/ddl/tableengine.py
+++ b/contrib/python/clickhouse-connect/clickhouse_connect/cc_sqlalchemy/ddl/tableengine.py
@@ -226,6 +226,26 @@ class ReplicatedSummingMergeTree(ReplicatedMergeTree):
     pass
 
 
+class SharedReplacingMergeTree(ReplacingMergeTree):
+    pass
+
+
+class SharedAggregatingMergeTree(AggregatingMergeTree):
+    pass
+
+
+class SharedSummingMergeTree(SummingMergeTree):
+    pass
+
+
+class SharedVersionedCollapsingMergeTree(VersionedCollapsingMergeTree):
+    pass
+
+
+class SharedGraphiteMergeTree(GraphiteMergeTree):
+    pass
+
+
 def build_engine(full_engine: str) -> Optional[TableEngine]:
     """
     Factory function to create TableEngine class from ClickHouse full_engine expression
diff --git a/contrib/python/clickhouse-connect/clickhouse_connect/driver/external.py b/contrib/python/clickhouse-connect/clickhouse_connect/driver/external.py
index 2d34f71ba8..be78e4e2bc 100644
--- a/contrib/python/clickhouse-connect/clickhouse_connect/driver/external.py
+++ b/contrib/python/clickhouse-connect/clickhouse_connect/driver/external.py
@@ -35,7 +35,7 @@ class ExternalFile:
                 self.file_name = file_name
                 if file_name != path_name and path_base != self.name:
                     logger.warning('External data name %s and file_path %s use different names', file_name, path_name)
-        elif data:
+        elif data is not None:
             if not file_name:
                 raise ProgrammingError('Name is required for query external data')
             self.data = data
@@ -85,7 +85,7 @@ class ExternalData:
                  structure: Optional[Union[str, Sequence[str]]] = None,
                  mime_type: Optional[str] = None):
         self.files: list[ExternalFile] = []
-        if file_path or data:
+        if file_path or data is not None:
             first_file = ExternalFile(file_path=file_path,
                                       file_name=file_name,
                                       data=data,
diff --git a/contrib/python/clickhouse-connect/clickhouse_connect/driver/query.py b/contrib/python/clickhouse-connect/clickhouse_connect/driver/query.py
index 6ad3fae9f1..235fe5e7de 100644
--- a/contrib/python/clickhouse-connect/clickhouse_connect/driver/query.py
+++ b/contrib/python/clickhouse-connect/clickhouse_connect/driver/query.py
@@ -412,7 +412,7 @@ def format_query_value(value: Any, server_tz: tzinfo = pytz.UTC):
         return format_query_value(value.value, server_tz)
     if isinstance(value, (uuid.UUID, ipaddress.IPv4Address, ipaddress.IPv6Address)):
         return f"'{value}'"
-    return str(value)
+    return value
 
 
 # pylint: disable=too-many-branches
diff --git a/contrib/python/clickhouse-connect/ya.make b/contrib/python/clickhouse-connect/ya.make
index cd5de03ec7..6bd170d5af 100644
--- a/contrib/python/clickhouse-connect/ya.make
+++ b/contrib/python/clickhouse-connect/ya.make
@@ -2,7 +2,7 @@
 
 PY3_LIBRARY()
 
-VERSION(0.7.4)
+VERSION(0.7.5)
 
 LICENSE(Apache-2.0)
 
diff --git a/yt/yt/core/rpc/unittests/rpc_ut.cpp b/yt/yt/core/rpc/unittests/rpc_ut.cpp
index eb3e393603..bf4a23928c 100644
--- a/yt/yt/core/rpc/unittests/rpc_ut.cpp
+++ b/yt/yt/core/rpc/unittests/rpc_ut.cpp
@@ -529,7 +529,7 @@ TYPED_TEST(TNotGrpcTest, TrackedRegularAttachments)
     // header + body = 110 bytes.
     // attachments = 22 bytes.
     // sum is 4228 bytes.
-    EXPECT_EQ(4228 + 32768, memoryUsageTracker->GetTotalUsage());
+    EXPECT_TRUE(4228 + 32768 <= memoryUsageTracker->GetTotalUsage());
     EXPECT_EQ(3u, attachments.size());
     EXPECT_EQ("Hello_",     StringFromSharedRef(attachments[0]));
     EXPECT_EQ("from_",      StringFromSharedRef(attachments[1]));
@@ -595,7 +595,7 @@ TYPED_TEST(TNotGrpcTest, Compression)
     // attachmentStrings[1].size() = 36 * 2 bytes from decoder.
     // attachmentStrings[2].size() = 90 * 2 bytes from decoder.
     // sum is 4591 bytes.
-    EXPECT_EQ(4591 + 32768, memoryUsageTracker->GetTotalUsage());
+    EXPECT_TRUE(4591 + 32768 <= memoryUsageTracker->GetTotalUsage());
     EXPECT_TRUE(rsp->message() == message);
     EXPECT_TRUE(rsp->GetResponseMessage().Size() >= 2);
     const auto& serializedResponseBody = SerializeProtoToRefWithCompression(*rsp, responseCodecId);
@@ -846,7 +846,7 @@ TYPED_TEST(TNotGrpcTest, MemoryTracking)
 
         // 1261568 = 32768 + 1228800 = 32768 + 4096 * 300 + 300 * 110 (header + body).
         // 32768 - socket buffers, 4096 - default size per request.
-        EXPECT_EQ(rpcUsage, 1294568);
+        EXPECT_TRUE(rpcUsage >= 1294568);
     }
 }
 
@@ -866,7 +866,7 @@ TYPED_TEST(TNotGrpcTest, MemoryTrackingMultipleConnections)
         // 11059200 / 300 = 36974 = 32768 + 4096 + 110 (header + body).
         // 4 KB - stub for request.
         // See NYT::NBus::TPacketDecoder::TChunkedMemoryTrackingAllocator::Allocate.
-        EXPECT_EQ(11092200, memoryUsageTracker->GetTotalUsage());
+        EXPECT_TRUE(11092200 <= memoryUsageTracker->GetTotalUsage());
     }
 }
 
@@ -922,7 +922,7 @@ TYPED_TEST(TNotGrpcTest, MemoryOvercommit)
         // default stub = 4096.
         // header + body = 110 bytes.
         // attachments = 6_KB  kbytes.
-        EXPECT_EQ(rpcUsage, 32768 + 4096 + 6144 + 110);
+        EXPECT_TRUE(rpcUsage >= 32768 + 4096 + 6144 + 110);
     }
 }
 
-- 
cgit v1.2.3


From dd11d72c358cf78610025a4d12ef888be70054bf Mon Sep 17 00:00:00 2001
From: thegeorg <thegeorg@yandex-team.com>
Date: Fri, 12 Apr 2024 11:56:36 +0300
Subject: Modernize superseded grpc includes

`include/grpc++` was the original directory name for all C++ header files but it conflicted with the naming scheme required for some build systems.
It is superseded by `include/grpcpp`.
ede5ac168419131cfa95db8f7d3cb0bf11597992
---
 library/cpp/unified_agent_client/grpc_io.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/library/cpp/unified_agent_client/grpc_io.h b/library/cpp/unified_agent_client/grpc_io.h
index 5f368a5943..07f4b31d94 100644
--- a/library/cpp/unified_agent_client/grpc_io.h
+++ b/library/cpp/unified_agent_client/grpc_io.h
@@ -4,7 +4,7 @@
 #include <library/cpp/unified_agent_client/f_maybe.h>
 
 #include <contrib/libs/grpc/include/grpcpp/alarm.h>
-#include <contrib/libs/grpc/include/grpc++/grpc++.h>
+#include <contrib/libs/grpc/include/grpcpp/grpcpp.h>
 
 #include <thread>
 
-- 
cgit v1.2.3


From a592841bc0deb67c364dea234d7c5adbe0dadad5 Mon Sep 17 00:00:00 2001
From: robot-piglet <robot-piglet@yandex-team.com>
Date: Fri, 12 Apr 2024 12:45:55 +0300
Subject: Intermediate changes

---
 contrib/python/PyJWT/py2/.dist-info/METADATA       | 115 ------
 .../python/PyJWT/py2/.dist-info/entry_points.txt   |   3 -
 contrib/python/PyJWT/py2/.dist-info/top_level.txt  |   1 -
 contrib/python/PyJWT/py2/jwt/__init__.py           |  31 --
 contrib/python/PyJWT/py2/jwt/__main__.py           | 168 ---------
 contrib/python/PyJWT/py2/jwt/algorithms.py         | 403 ---------------------
 contrib/python/PyJWT/py2/jwt/api_jws.py            | 242 -------------
 contrib/python/PyJWT/py2/jwt/api_jwt.py            | 222 ------------
 contrib/python/PyJWT/py2/jwt/compat.py             |  68 ----
 contrib/python/PyJWT/py2/jwt/contrib/__init__.py   |   0
 .../PyJWT/py2/jwt/contrib/algorithms/__init__.py   |   0
 .../PyJWT/py2/jwt/contrib/algorithms/py_ecdsa.py   |  60 ---
 .../PyJWT/py2/jwt/contrib/algorithms/pycrypto.py   |  46 ---
 contrib/python/PyJWT/py2/jwt/exceptions.py         |  59 ---
 contrib/python/PyJWT/py2/jwt/help.py               |  61 ----
 contrib/python/PyJWT/py2/jwt/utils.py              | 113 ------
 contrib/python/PyJWT/py2/ya.make                   |  43 ---
 contrib/python/ydb/py3/.dist-info/METADATA         |   3 +-
 contrib/python/ydb/py3/ya.make                     |   3 +-
 .../ydb/py3/ydb/_topic_reader/topic_reader_sync.py |   8 +-
 contrib/python/ydb/py3/ydb/aio/iam.py              | 109 +-----
 contrib/python/ydb/py3/ydb/driver.py               |   7 -
 contrib/python/ydb/py3/ydb/iam/__init__.py         |   1 -
 contrib/python/ydb/py3/ydb/iam/auth.py             | 151 ++------
 contrib/python/ydb/py3/ydb/ydb_version.py          |   2 +-
 25 files changed, 38 insertions(+), 1881 deletions(-)
 delete mode 100644 contrib/python/PyJWT/py2/.dist-info/METADATA
 delete mode 100644 contrib/python/PyJWT/py2/.dist-info/entry_points.txt
 delete mode 100644 contrib/python/PyJWT/py2/.dist-info/top_level.txt
 delete mode 100644 contrib/python/PyJWT/py2/jwt/__init__.py
 delete mode 100644 contrib/python/PyJWT/py2/jwt/__main__.py
 delete mode 100644 contrib/python/PyJWT/py2/jwt/algorithms.py
 delete mode 100644 contrib/python/PyJWT/py2/jwt/api_jws.py
 delete mode 100644 contrib/python/PyJWT/py2/jwt/api_jwt.py
 delete mode 100644 contrib/python/PyJWT/py2/jwt/compat.py
 delete mode 100644 contrib/python/PyJWT/py2/jwt/contrib/__init__.py
 delete mode 100644 contrib/python/PyJWT/py2/jwt/contrib/algorithms/__init__.py
 delete mode 100644 contrib/python/PyJWT/py2/jwt/contrib/algorithms/py_ecdsa.py
 delete mode 100644 contrib/python/PyJWT/py2/jwt/contrib/algorithms/pycrypto.py
 delete mode 100644 contrib/python/PyJWT/py2/jwt/exceptions.py
 delete mode 100644 contrib/python/PyJWT/py2/jwt/help.py
 delete mode 100644 contrib/python/PyJWT/py2/jwt/utils.py
 delete mode 100644 contrib/python/PyJWT/py2/ya.make

diff --git a/contrib/python/PyJWT/py2/.dist-info/METADATA b/contrib/python/PyJWT/py2/.dist-info/METADATA
deleted file mode 100644
index 47ee558907..0000000000
--- a/contrib/python/PyJWT/py2/.dist-info/METADATA
+++ /dev/null
@@ -1,115 +0,0 @@
-Metadata-Version: 2.1
-Name: PyJWT
-Version: 1.7.1
-Summary: JSON Web Token implementation in Python
-Home-page: http://github.com/jpadilla/pyjwt
-Author: Jose Padilla
-Author-email: hello@jpadilla.com
-License: MIT
-Keywords: jwt json web token security signing
-Platform: UNKNOWN
-Classifier: Development Status :: 5 - Production/Stable
-Classifier: Intended Audience :: Developers
-Classifier: Natural Language :: English
-Classifier: License :: OSI Approved :: MIT License
-Classifier: Programming Language :: Python
-Classifier: Programming Language :: Python :: 2.7
-Classifier: Programming Language :: Python :: 3.4
-Classifier: Programming Language :: Python :: 3.5
-Classifier: Programming Language :: Python :: 3.6
-Classifier: Programming Language :: Python :: 3.7
-Classifier: Topic :: Utilities
-Provides-Extra: crypto
-Requires-Dist: cryptography (>=1.4) ; extra == 'crypto'
-Provides-Extra: flake8
-Requires-Dist: flake8 ; extra == 'flake8'
-Requires-Dist: flake8-import-order ; extra == 'flake8'
-Requires-Dist: pep8-naming ; extra == 'flake8'
-Provides-Extra: test
-Requires-Dist: pytest (<5.0.0,>=4.0.1) ; extra == 'test'
-Requires-Dist: pytest-cov (<3.0.0,>=2.6.0) ; extra == 'test'
-Requires-Dist: pytest-runner (<5.0.0,>=4.2) ; extra == 'test'
-
-PyJWT
-=====
-
-.. image:: https://travis-ci.com/jpadilla/pyjwt.svg?branch=master
-   :target: http://travis-ci.com/jpadilla/pyjwt?branch=master
-
-.. image:: https://ci.appveyor.com/api/projects/status/h8nt70aqtwhht39t?svg=true
-   :target: https://ci.appveyor.com/project/jpadilla/pyjwt
-
-.. image:: https://img.shields.io/pypi/v/pyjwt.svg
-   :target: https://pypi.python.org/pypi/pyjwt
-
-.. image:: https://coveralls.io/repos/jpadilla/pyjwt/badge.svg?branch=master
-   :target: https://coveralls.io/r/jpadilla/pyjwt?branch=master
-
-.. image:: https://readthedocs.org/projects/pyjwt/badge/?version=latest
-   :target: https://pyjwt.readthedocs.io
-
-A Python implementation of `RFC 7519 <https://tools.ietf.org/html/rfc7519>`_. Original implementation was written by `@progrium <https://github.com/progrium>`_.
-
-Sponsor
--------
-
-+--------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
-| |auth0-logo| | If you want to quickly add secure token-based authentication to Python projects, feel free to check Auth0's Python SDK and free plan at `auth0.com/overview <https://auth0.com/overview?utm_source=GHsponsor&utm_medium=GHsponsor&utm_campaign=pyjwt&utm_content=auth>`_. |
-+--------------+-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
-
-.. |auth0-logo| image:: https://user-images.githubusercontent.com/83319/31722733-de95bbde-b3ea-11e7-96bf-4f4e8f915588.png
-
-Installing
-----------
-
-Install with **pip**:
-
-.. code-block:: sh
-
-    $ pip install PyJWT
-
-
-Usage
------
-
-.. code:: python
-
-    >>> import jwt
-    >>> encoded = jwt.encode({'some': 'payload'}, 'secret', algorithm='HS256')
-    'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzb21lIjoicGF5bG9hZCJ9.4twFt5NiznN84AWoo1d7KO1T_yoc0Z6XOpOVswacPZg'
-
-    >>> jwt.decode(encoded, 'secret', algorithms=['HS256'])
-    {'some': 'payload'}
-
-
-Command line
-------------
-
-Usage::
-
-    pyjwt [options] INPUT
-
-Decoding examples::
-
-    pyjwt --key=secret decode TOKEN
-    pyjwt decode --no-verify TOKEN
-
-See more options executing ``pyjwt --help``.
-
-
-Documentation
--------------
-
-View the full docs online at https://pyjwt.readthedocs.io/en/latest/
-
-
-Tests
------
-
-You can run tests from the project root after cloning with:
-
-.. code-block:: sh
-
-    $ python setup.py test
-
-
diff --git a/contrib/python/PyJWT/py2/.dist-info/entry_points.txt b/contrib/python/PyJWT/py2/.dist-info/entry_points.txt
deleted file mode 100644
index 78717b2661..0000000000
--- a/contrib/python/PyJWT/py2/.dist-info/entry_points.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-[console_scripts]
-pyjwt = jwt.__main__:main
-
diff --git a/contrib/python/PyJWT/py2/.dist-info/top_level.txt b/contrib/python/PyJWT/py2/.dist-info/top_level.txt
deleted file mode 100644
index 27ccc9bc3a..0000000000
--- a/contrib/python/PyJWT/py2/.dist-info/top_level.txt
+++ /dev/null
@@ -1 +0,0 @@
-jwt
diff --git a/contrib/python/PyJWT/py2/jwt/__init__.py b/contrib/python/PyJWT/py2/jwt/__init__.py
deleted file mode 100644
index 946983f022..0000000000
--- a/contrib/python/PyJWT/py2/jwt/__init__.py
+++ /dev/null
@@ -1,31 +0,0 @@
-# -*- coding: utf-8 -*-
-# flake8: noqa
-
-"""
-JSON Web Token implementation
-
-Minimum implementation based on this spec:
-http://self-issued.info/docs/draft-jones-json-web-token-01.html
-"""
-
-
-__title__ = 'pyjwt'
-__version__ = '1.7.1'
-__author__ = 'José Padilla'
-__license__ = 'MIT'
-__copyright__ = 'Copyright 2015-2018 José Padilla'
-
-
-from .api_jwt import (
-    encode, decode, register_algorithm, unregister_algorithm,
-    get_unverified_header, PyJWT
-)
-from .api_jws import PyJWS
-from .exceptions import (
-    InvalidTokenError, DecodeError, InvalidAlgorithmError,
-    InvalidAudienceError, ExpiredSignatureError, ImmatureSignatureError,
-    InvalidIssuedAtError, InvalidIssuerError, ExpiredSignature,
-    InvalidAudience, InvalidIssuer, MissingRequiredClaimError,
-    InvalidSignatureError,
-    PyJWTError,
-)
diff --git a/contrib/python/PyJWT/py2/jwt/__main__.py b/contrib/python/PyJWT/py2/jwt/__main__.py
deleted file mode 100644
index bf50aabf4a..0000000000
--- a/contrib/python/PyJWT/py2/jwt/__main__.py
+++ /dev/null
@@ -1,168 +0,0 @@
-#!/usr/bin/env python
-
-from __future__ import absolute_import, print_function
-
-import argparse
-import json
-import sys
-import time
-
-from . import DecodeError, __version__, decode, encode
-
-
-def encode_payload(args):
-    # Try to encode
-    if args.key is None:
-        raise ValueError('Key is required when encoding. See --help for usage.')
-
-    # Build payload object to encode
-    payload = {}
-
-    for arg in args.payload:
-        k, v = arg.split('=', 1)
-
-        # exp +offset special case?
-        if k == 'exp' and v[0] == '+' and len(v) > 1:
-            v = str(int(time.time()+int(v[1:])))
-
-        # Cast to integer?
-        if v.isdigit():
-            v = int(v)
-        else:
-            # Cast to float?
-            try:
-                v = float(v)
-            except ValueError:
-                pass
-
-        # Cast to true, false, or null?
-        constants = {'true': True, 'false': False, 'null': None}
-
-        if v in constants:
-            v = constants[v]
-
-        payload[k] = v
-
-    token = encode(
-        payload,
-        key=args.key,
-        algorithm=args.algorithm
-    )
-
-    return token.decode('utf-8')
-
-
-def decode_payload(args):
-    try:
-        if args.token:
-            token = args.token
-        else:
-            if sys.stdin.isatty():
-                token = sys.stdin.readline().strip()
-            else:
-                raise IOError('Cannot read from stdin: terminal not a TTY')
-
-        token = token.encode('utf-8')
-        data = decode(token, key=args.key, verify=args.verify)
-
-        return json.dumps(data)
-
-    except DecodeError as e:
-        raise DecodeError('There was an error decoding the token: %s' % e)
-
-
-def build_argparser():
-
-    usage = '''
-    Encodes or decodes JSON Web Tokens based on input.
-
-    %(prog)s [options] <command> [options] input
-
-    Decoding examples:
-
-    %(prog)s --key=secret decode json.web.token
-    %(prog)s decode --no-verify json.web.token
-
-    Encoding requires the key option and takes space separated key/value pairs
-    separated by equals (=) as input. Examples:
-
-    %(prog)s --key=secret encode iss=me exp=1302049071
-    %(prog)s --key=secret encode foo=bar exp=+10
-
-    The exp key is special and can take an offset to current Unix time.
-    '''
-
-    arg_parser = argparse.ArgumentParser(
-        prog='pyjwt',
-        usage=usage
-    )
-
-    arg_parser.add_argument(
-        '-v', '--version',
-        action='version',
-        version='%(prog)s ' + __version__
-    )
-
-    arg_parser.add_argument(
-        '--key',
-        dest='key',
-        metavar='KEY',
-        default=None,
-        help='set the secret key to sign with'
-    )
-
-    arg_parser.add_argument(
-        '--alg',
-        dest='algorithm',
-        metavar='ALG',
-        default='HS256',
-        help='set crypto algorithm to sign with. default=HS256'
-    )
-
-    subparsers = arg_parser.add_subparsers(
-        title='PyJWT subcommands',
-        description='valid subcommands',
-        help='additional help'
-    )
-
-    # Encode subcommand
-    encode_parser = subparsers.add_parser('encode', help='use to encode a supplied payload')
-
-    payload_help = """Payload to encode. Must be a space separated list of key/value
-    pairs separated by equals (=) sign."""
-
-    encode_parser.add_argument('payload', nargs='+', help=payload_help)
-    encode_parser.set_defaults(func=encode_payload)
-
-    # Decode subcommand
-    decode_parser = subparsers.add_parser('decode', help='use to decode a supplied JSON web token')
-    decode_parser.add_argument(
-        'token',
-        help='JSON web token to decode.',
-        nargs='?')
-
-    decode_parser.add_argument(
-        '-n', '--no-verify',
-        action='store_false',
-        dest='verify',
-        default=True,
-        help='ignore signature and claims verification on decode'
-    )
-
-    decode_parser.set_defaults(func=decode_payload)
-
-    return arg_parser
-
-
-def main():
-    arg_parser = build_argparser()
-
-    try:
-        arguments = arg_parser.parse_args(sys.argv[1:])
-
-        output = arguments.func(arguments)
-
-        print(output)
-    except Exception as e:
-        print('There was an unforseen error: ', e)
-        arg_parser.print_help()
diff --git a/contrib/python/PyJWT/py2/jwt/algorithms.py b/contrib/python/PyJWT/py2/jwt/algorithms.py
deleted file mode 100644
index 1343688341..0000000000
--- a/contrib/python/PyJWT/py2/jwt/algorithms.py
+++ /dev/null
@@ -1,403 +0,0 @@
-import hashlib
-import hmac
-import json
-
-
-from .compat import constant_time_compare, string_types
-from .exceptions import InvalidKeyError
-from .utils import (
-    base64url_decode, base64url_encode, der_to_raw_signature,
-    force_bytes, force_unicode, from_base64url_uint, raw_to_der_signature,
-    to_base64url_uint
-)
-
-try:
-    from cryptography.hazmat.primitives import hashes
-    from cryptography.hazmat.primitives.serialization import (
-        load_pem_private_key, load_pem_public_key, load_ssh_public_key
-    )
-    from cryptography.hazmat.primitives.asymmetric.rsa import (
-        RSAPrivateKey, RSAPublicKey, RSAPrivateNumbers, RSAPublicNumbers,
-        rsa_recover_prime_factors, rsa_crt_dmp1, rsa_crt_dmq1, rsa_crt_iqmp
-    )
-    from cryptography.hazmat.primitives.asymmetric.ec import (
-        EllipticCurvePrivateKey, EllipticCurvePublicKey
-    )
-    from cryptography.hazmat.primitives.asymmetric import ec, padding
-    from cryptography.hazmat.backends import default_backend
-    from cryptography.exceptions import InvalidSignature
-
-    has_crypto = True
-except ImportError:
-    has_crypto = False
-
-requires_cryptography = set(['RS256', 'RS384', 'RS512', 'ES256', 'ES384',
-                             'ES521', 'ES512', 'PS256', 'PS384', 'PS512'])
-
-
-def get_default_algorithms():
-    """
-    Returns the algorithms that are implemented by the library.
-    """
-    default_algorithms = {
-        'none': NoneAlgorithm(),
-        'HS256': HMACAlgorithm(HMACAlgorithm.SHA256),
-        'HS384': HMACAlgorithm(HMACAlgorithm.SHA384),
-        'HS512': HMACAlgorithm(HMACAlgorithm.SHA512)
-    }
-
-    if has_crypto:
-        default_algorithms.update({
-            'RS256': RSAAlgorithm(RSAAlgorithm.SHA256),
-            'RS384': RSAAlgorithm(RSAAlgorithm.SHA384),
-            'RS512': RSAAlgorithm(RSAAlgorithm.SHA512),
-            'ES256': ECAlgorithm(ECAlgorithm.SHA256),
-            'ES384': ECAlgorithm(ECAlgorithm.SHA384),
-            'ES521': ECAlgorithm(ECAlgorithm.SHA512),
-            'ES512': ECAlgorithm(ECAlgorithm.SHA512),  # Backward compat for #219 fix
-            'PS256': RSAPSSAlgorithm(RSAPSSAlgorithm.SHA256),
-            'PS384': RSAPSSAlgorithm(RSAPSSAlgorithm.SHA384),
-            'PS512': RSAPSSAlgorithm(RSAPSSAlgorithm.SHA512)
-        })
-
-    return default_algorithms
-
-
-class Algorithm(object):
-    """
-    The interface for an algorithm used to sign and verify tokens.
-    """
-    def prepare_key(self, key):
-        """
-        Performs necessary validation and conversions on the key and returns
-        the key value in the proper format for sign() and verify().
-        """
-        raise NotImplementedError
-
-    def sign(self, msg, key):
-        """
-        Returns a digital signature for the specified message
-        using the specified key value.
-        """
-        raise NotImplementedError
-
-    def verify(self, msg, key, sig):
-        """
-        Verifies that the specified digital signature is valid
-        for the specified message and key values.
-        """
-        raise NotImplementedError
-
-    @staticmethod
-    def to_jwk(key_obj):
-        """
-        Serializes a given RSA key into a JWK
-        """
-        raise NotImplementedError
-
-    @staticmethod
-    def from_jwk(jwk):
-        """
-        Deserializes a given RSA key from JWK back into a PublicKey or PrivateKey object
-        """
-        raise NotImplementedError
-
-
-class NoneAlgorithm(Algorithm):
-    """
-    Placeholder for use when no signing or verification
-    operations are required.
-    """
-    def prepare_key(self, key):
-        if key == '':
-            key = None
-
-        if key is not None:
-            raise InvalidKeyError('When alg = "none", key value must be None.')
-
-        return key
-
-    def sign(self, msg, key):
-        return b''
-
-    def verify(self, msg, key, sig):
-        return False
-
-
-class HMACAlgorithm(Algorithm):
-    """
-    Performs signing and verification operations using HMAC
-    and the specified hash function.
-    """
-    SHA256 = hashlib.sha256
-    SHA384 = hashlib.sha384
-    SHA512 = hashlib.sha512
-
-    def __init__(self, hash_alg):
-        self.hash_alg = hash_alg
-
-    def prepare_key(self, key):
-        key = force_bytes(key)
-
-        invalid_strings = [
-            b'-----BEGIN PUBLIC KEY-----',
-            b'-----BEGIN CERTIFICATE-----',
-            b'-----BEGIN RSA PUBLIC KEY-----',
-            b'ssh-rsa'
-        ]
-
-        if any([string_value in key for string_value in invalid_strings]):
-            raise InvalidKeyError(
-                'The specified key is an asymmetric key or x509 certificate and'
-                ' should not be used as an HMAC secret.')
-
-        return key
-
-    @staticmethod
-    def to_jwk(key_obj):
-        return json.dumps({
-            'k': force_unicode(base64url_encode(force_bytes(key_obj))),
-            'kty': 'oct'
-        })
-
-    @staticmethod
-    def from_jwk(jwk):
-        obj = json.loads(jwk)
-
-        if obj.get('kty') != 'oct':
-            raise InvalidKeyError('Not an HMAC key')
-
-        return base64url_decode(obj['k'])
-
-    def sign(self, msg, key):
-        return hmac.new(key, msg, self.hash_alg).digest()
-
-    def verify(self, msg, key, sig):
-        return constant_time_compare(sig, self.sign(msg, key))
-
-
-if has_crypto:
-
-    class RSAAlgorithm(Algorithm):
-        """
-        Performs signing and verification operations using
-        RSASSA-PKCS-v1_5 and the specified hash function.
-        """
-        SHA256 = hashes.SHA256
-        SHA384 = hashes.SHA384
-        SHA512 = hashes.SHA512
-
-        def __init__(self, hash_alg):
-            self.hash_alg = hash_alg
-
-        def prepare_key(self, key):
-            if isinstance(key, RSAPrivateKey) or \
-               isinstance(key, RSAPublicKey):
-                return key
-
-            if isinstance(key, string_types):
-                key = force_bytes(key)
-
-                try:
-                    if key.startswith(b'ssh-rsa'):
-                        key = load_ssh_public_key(key, backend=default_backend())
-                    else:
-                        key = load_pem_private_key(key, password=None, backend=default_backend())
-                except ValueError:
-                    key = load_pem_public_key(key, backend=default_backend())
-            else:
-                raise TypeError('Expecting a PEM-formatted key.')
-
-            return key
-
-        @staticmethod
-        def to_jwk(key_obj):
-            obj = None
-
-            if getattr(key_obj, 'private_numbers', None):
-                # Private key
-                numbers = key_obj.private_numbers()
-
-                obj = {
-                    'kty': 'RSA',
-                    'key_ops': ['sign'],
-                    'n': force_unicode(to_base64url_uint(numbers.public_numbers.n)),
-                    'e': force_unicode(to_base64url_uint(numbers.public_numbers.e)),
-                    'd': force_unicode(to_base64url_uint(numbers.d)),
-                    'p': force_unicode(to_base64url_uint(numbers.p)),
-                    'q': force_unicode(to_base64url_uint(numbers.q)),
-                    'dp': force_unicode(to_base64url_uint(numbers.dmp1)),
-                    'dq': force_unicode(to_base64url_uint(numbers.dmq1)),
-                    'qi': force_unicode(to_base64url_uint(numbers.iqmp))
-                }
-
-            elif getattr(key_obj, 'verify', None):
-                # Public key
-                numbers = key_obj.public_numbers()
-
-                obj = {
-                    'kty': 'RSA',
-                    'key_ops': ['verify'],
-                    'n': force_unicode(to_base64url_uint(numbers.n)),
-                    'e': force_unicode(to_base64url_uint(numbers.e))
-                }
-            else:
-                raise InvalidKeyError('Not a public or private key')
-
-            return json.dumps(obj)
-
-        @staticmethod
-        def from_jwk(jwk):
-            try:
-                obj = json.loads(jwk)
-            except ValueError:
-                raise InvalidKeyError('Key is not valid JSON')
-
-            if obj.get('kty') != 'RSA':
-                raise InvalidKeyError('Not an RSA key')
-
-            if 'd' in obj and 'e' in obj and 'n' in obj:
-                # Private key
-                if 'oth' in obj:
-                    raise InvalidKeyError('Unsupported RSA private key: > 2 primes not supported')
-
-                other_props = ['p', 'q', 'dp', 'dq', 'qi']
-                props_found = [prop in obj for prop in other_props]
-                any_props_found = any(props_found)
-
-                if any_props_found and not all(props_found):
-                    raise InvalidKeyError('RSA key must include all parameters if any are present besides d')
-
-                public_numbers = RSAPublicNumbers(
-                    from_base64url_uint(obj['e']), from_base64url_uint(obj['n'])
-                )
-
-                if any_props_found:
-                    numbers = RSAPrivateNumbers(
-                        d=from_base64url_uint(obj['d']),
-                        p=from_base64url_uint(obj['p']),
-                        q=from_base64url_uint(obj['q']),
-                        dmp1=from_base64url_uint(obj['dp']),
-                        dmq1=from_base64url_uint(obj['dq']),
-                        iqmp=from_base64url_uint(obj['qi']),
-                        public_numbers=public_numbers
-                    )
-                else:
-                    d = from_base64url_uint(obj['d'])
-                    p, q = rsa_recover_prime_factors(
-                        public_numbers.n, d, public_numbers.e
-                    )
-
-                    numbers = RSAPrivateNumbers(
-                        d=d,
-                        p=p,
-                        q=q,
-                        dmp1=rsa_crt_dmp1(d, p),
-                        dmq1=rsa_crt_dmq1(d, q),
-                        iqmp=rsa_crt_iqmp(p, q),
-                        public_numbers=public_numbers
-                    )
-
-                return numbers.private_key(default_backend())
-            elif 'n' in obj and 'e' in obj:
-                # Public key
-                numbers = RSAPublicNumbers(
-                    from_base64url_uint(obj['e']), from_base64url_uint(obj['n'])
-                )
-
-                return numbers.public_key(default_backend())
-            else:
-                raise InvalidKeyError('Not a public or private key')
-
-        def sign(self, msg, key):
-            return key.sign(msg, padding.PKCS1v15(), self.hash_alg())
-
-        def verify(self, msg, key, sig):
-            try:
-                key.verify(sig, msg, padding.PKCS1v15(), self.hash_alg())
-                return True
-            except InvalidSignature:
-                return False
-
-    class ECAlgorithm(Algorithm):
-        """
-        Performs signing and verification operations using
-        ECDSA and the specified hash function
-        """
-        SHA256 = hashes.SHA256
-        SHA384 = hashes.SHA384
-        SHA512 = hashes.SHA512
-
-        def __init__(self, hash_alg):
-            self.hash_alg = hash_alg
-
-        def prepare_key(self, key):
-            if isinstance(key, EllipticCurvePrivateKey) or \
-               isinstance(key, EllipticCurvePublicKey):
-                return key
-
-            if isinstance(key, string_types):
-                key = force_bytes(key)
-
-                # Attempt to load key. We don't know if it's
-                # a Signing Key or a Verifying Key, so we try
-                # the Verifying Key first.
-                try:
-                    if key.startswith(b'ecdsa-sha2-'):
-                        key = load_ssh_public_key(key, backend=default_backend())
-                    else:
-                        key = load_pem_public_key(key, backend=default_backend())
-                except ValueError:
-                    key = load_pem_private_key(key, password=None, backend=default_backend())
-
-            else:
-                raise TypeError('Expecting a PEM-formatted key.')
-
-            return key
-
-        def sign(self, msg, key):
-            der_sig = key.sign(msg, ec.ECDSA(self.hash_alg()))
-
-            return der_to_raw_signature(der_sig, key.curve)
-
-        def verify(self, msg, key, sig):
-            try:
-                der_sig = raw_to_der_signature(sig, key.curve)
-            except ValueError:
-                return False
-
-            try:
-                key.verify(der_sig, msg, ec.ECDSA(self.hash_alg()))
-                return True
-            except InvalidSignature:
-                return False
-
-    class RSAPSSAlgorithm(RSAAlgorithm):
-        """
-        Performs a signature using RSASSA-PSS with MGF1
-        """
-
-        def sign(self, msg, key):
-            return key.sign(
-                msg,
-                padding.PSS(
-                    mgf=padding.MGF1(self.hash_alg()),
-                    salt_length=self.hash_alg.digest_size
-                ),
-                self.hash_alg()
-            )
-
-        def verify(self, msg, key, sig):
-            try:
-                key.verify(
-                    sig,
-                    msg,
-                    padding.PSS(
-                        mgf=padding.MGF1(self.hash_alg()),
-                        salt_length=self.hash_alg.digest_size
-                    ),
-                    self.hash_alg()
-                )
-                return True
-            except InvalidSignature:
-                return False
diff --git a/contrib/python/PyJWT/py2/jwt/api_jws.py b/contrib/python/PyJWT/py2/jwt/api_jws.py
deleted file mode 100644
index a9354adb06..0000000000
--- a/contrib/python/PyJWT/py2/jwt/api_jws.py
+++ /dev/null
@@ -1,242 +0,0 @@
-import binascii
-import json
-import warnings
-try:
-    # import required by mypy to perform type checking, not used for normal execution
-    from typing import Callable, Dict, List, Optional, Union # NOQA
-except ImportError:
-    pass
-
-from .algorithms import (
-    Algorithm, get_default_algorithms, has_crypto, requires_cryptography  # NOQA
-)
-from .compat import Mapping, binary_type, string_types, text_type
-from .exceptions import (
-    DecodeError, InvalidAlgorithmError, InvalidSignatureError,
-    InvalidTokenError
-)
-from .utils import base64url_decode, base64url_encode, force_bytes, merge_dict
-
-
-class PyJWS(object):
-    header_typ = 'JWT'
-
-    def __init__(self, algorithms=None, options=None):
-        self._algorithms = get_default_algorithms()
-        self._valid_algs = (set(algorithms) if algorithms is not None
-                            else set(self._algorithms))
-
-        # Remove algorithms that aren't on the whitelist
-        for key in list(self._algorithms.keys()):
-            if key not in self._valid_algs:
-                del self._algorithms[key]
-
-        if not options:
-            options = {}
-
-        self.options = merge_dict(self._get_default_options(), options)
-
-    @staticmethod
-    def _get_default_options():
-        return {
-            'verify_signature': True
-        }
-
-    def register_algorithm(self, alg_id, alg_obj):
-        """
-        Registers a new Algorithm for use when creating and verifying tokens.
-        """
-        if alg_id in self._algorithms:
-            raise ValueError('Algorithm already has a handler.')
-
-        if not isinstance(alg_obj, Algorithm):
-            raise TypeError('Object is not of type `Algorithm`')
-
-        self._algorithms[alg_id] = alg_obj
-        self._valid_algs.add(alg_id)
-
-    def unregister_algorithm(self, alg_id):
-        """
-        Unregisters an Algorithm for use when creating and verifying tokens
-        Throws KeyError if algorithm is not registered.
-        """
-        if alg_id not in self._algorithms:
-            raise KeyError('The specified algorithm could not be removed'
-                           ' because it is not registered.')
-
-        del self._algorithms[alg_id]
-        self._valid_algs.remove(alg_id)
-
-    def get_algorithms(self):
-        """
-        Returns a list of supported values for the 'alg' parameter.
-        """
-        return list(self._valid_algs)
-
-    def encode(self,
-               payload,  # type: Union[Dict, bytes]
-               key,  # type: str
-               algorithm='HS256',  # type: str
-               headers=None,  # type: Optional[Dict]
-               json_encoder=None  # type: Optional[Callable]
-               ):
-        segments = []
-
-        if algorithm is None:
-            algorithm = 'none'
-
-        if algorithm not in self._valid_algs:
-            pass
-
-        # Header
-        header = {'typ': self.header_typ, 'alg': algorithm}
-
-        if headers:
-            self._validate_headers(headers)
-            header.update(headers)
-
-        json_header = force_bytes(
-            json.dumps(
-                header,
-                separators=(',', ':'),
-                cls=json_encoder
-            )
-        )
-
-        segments.append(base64url_encode(json_header))
-        segments.append(base64url_encode(payload))
-
-        # Segments
-        signing_input = b'.'.join(segments)
-        try:
-            alg_obj = self._algorithms[algorithm]
-            key = alg_obj.prepare_key(key)
-            signature = alg_obj.sign(signing_input, key)
-
-        except KeyError:
-            if not has_crypto and algorithm in requires_cryptography:
-                raise NotImplementedError(
-                    "Algorithm '%s' could not be found. Do you have cryptography "
-                    "installed?" % algorithm
-                )
-            else:
-                raise NotImplementedError('Algorithm not supported')
-
-        segments.append(base64url_encode(signature))
-
-        return b'.'.join(segments)
-
-    def decode(self,
-               jwt,  # type: str
-               key='',   # type: str
-               verify=True,  # type: bool
-               algorithms=None,  # type: List[str]
-               options=None,  # type: Dict
-               **kwargs):
-
-        merged_options = merge_dict(self.options, options)
-        verify_signature = merged_options['verify_signature']
-
-        if verify_signature and not algorithms:
-            warnings.warn(
-                'It is strongly recommended that you pass in a ' +
-                'value for the "algorithms" argument when calling decode(). ' +
-                'This argument will be mandatory in a future version.',
-                DeprecationWarning
-            )
-
-        payload, signing_input, header, signature = self._load(jwt)
-
-        if not verify:
-            warnings.warn('The verify parameter is deprecated. '
-                          'Please use verify_signature in options instead.',
-                          DeprecationWarning, stacklevel=2)
-        elif verify_signature:
-            self._verify_signature(payload, signing_input, header, signature,
-                                   key, algorithms)
-
-        return payload
-
-    def get_unverified_header(self, jwt):
-        """Returns back the JWT header parameters as a dict()
-
-        Note: The signature is not verified so the header parameters
-        should not be fully trusted until signature verification is complete
-        """
-        headers = self._load(jwt)[2]
-        self._validate_headers(headers)
-
-        return headers
-
-    def _load(self, jwt):
-        if isinstance(jwt, text_type):
-            jwt = jwt.encode('utf-8')
-
-        if not issubclass(type(jwt), binary_type):
-            raise DecodeError("Invalid token type. Token must be a {0}".format(
-                binary_type))
-
-        try:
-            signing_input, crypto_segment = jwt.rsplit(b'.', 1)
-            header_segment, payload_segment = signing_input.split(b'.', 1)
-        except ValueError:
-            raise DecodeError('Not enough segments')
-
-        try:
-            header_data = base64url_decode(header_segment)
-        except (TypeError, binascii.Error):
-            raise DecodeError('Invalid header padding')
-
-        try:
-            header = json.loads(header_data.decode('utf-8'))
-        except ValueError as e:
-            raise DecodeError('Invalid header string: %s' % e)
-
-        if not isinstance(header, Mapping):
-            raise DecodeError('Invalid header string: must be a json object')
-
-        try:
-            payload = base64url_decode(payload_segment)
-        except (TypeError, binascii.Error):
-            raise DecodeError('Invalid payload padding')
-
-        try:
-            signature = base64url_decode(crypto_segment)
-        except (TypeError, binascii.Error):
-            raise DecodeError('Invalid crypto padding')
-
-        return (payload, signing_input, header, signature)
-
-    def _verify_signature(self, payload, signing_input, header, signature,
-                          key='', algorithms=None):
-
-        alg = header.get('alg')
-
-        if algorithms is not None and alg not in algorithms:
-            raise InvalidAlgorithmError('The specified alg value is not allowed')
-
-        try:
-            alg_obj = self._algorithms[alg]
-            key = alg_obj.prepare_key(key)
-
-            if not alg_obj.verify(signing_input, key, signature):
-                raise InvalidSignatureError('Signature verification failed')
-
-        except KeyError:
-            raise InvalidAlgorithmError('Algorithm not supported')
-
-    def _validate_headers(self, headers):
-        if 'kid' in headers:
-            self._validate_kid(headers['kid'])
-
-    def _validate_kid(self, kid):
-        if not isinstance(kid, string_types):
-            raise InvalidTokenError('Key ID header parameter must be a string')
-
-
-_jws_global_obj = PyJWS()
-encode = _jws_global_obj.encode
-decode = _jws_global_obj.decode
-register_algorithm = _jws_global_obj.register_algorithm
-unregister_algorithm = _jws_global_obj.unregister_algorithm
-get_unverified_header = _jws_global_obj.get_unverified_header
diff --git a/contrib/python/PyJWT/py2/jwt/api_jwt.py b/contrib/python/PyJWT/py2/jwt/api_jwt.py
deleted file mode 100644
index 85504acf93..0000000000
--- a/contrib/python/PyJWT/py2/jwt/api_jwt.py
+++ /dev/null
@@ -1,222 +0,0 @@
-import json
-import warnings
-from calendar import timegm
-from datetime import datetime, timedelta
-try:
-    # import required by mypy to perform type checking, not used for normal execution
-    from typing import Callable, Dict, List, Optional, Union # NOQA
-except ImportError:
-    pass
-
-from .api_jws import PyJWS
-from .algorithms import Algorithm, get_default_algorithms  # NOQA
-from .compat import Iterable, Mapping, string_types
-from .exceptions import (
-    DecodeError, ExpiredSignatureError, ImmatureSignatureError,
-    InvalidAudienceError, InvalidIssuedAtError,
-    InvalidIssuerError, MissingRequiredClaimError
-)
-from .utils import merge_dict
-
-
-class PyJWT(PyJWS):
-    header_type = 'JWT'
-
-    @staticmethod
-    def _get_default_options():
-        # type: () -> Dict[str, bool]
-        return {
-            'verify_signature': True,
-            'verify_exp': True,
-            'verify_nbf': True,
-            'verify_iat': True,
-            'verify_aud': True,
-            'verify_iss': True,
-            'require_exp': False,
-            'require_iat': False,
-            'require_nbf': False
-        }
-
-    def encode(self,
-               payload,  # type: Union[Dict, bytes]
-               key,  # type: str
-               algorithm='HS256',  # type: str
-               headers=None,  # type: Optional[Dict]
-               json_encoder=None  # type: Optional[Callable]
-               ):
-        # Check that we get a mapping
-        if not isinstance(payload, Mapping):
-            raise TypeError('Expecting a mapping object, as JWT only supports '
-                            'JSON objects as payloads.')
-
-        # Payload
-        for time_claim in ['exp', 'iat', 'nbf']:
-            # Convert datetime to a intDate value in known time-format claims
-            if isinstance(payload.get(time_claim), datetime):
-                payload[time_claim] = timegm(payload[time_claim].utctimetuple())  # type: ignore
-
-        json_payload = json.dumps(
-            payload,
-            separators=(',', ':'),
-            cls=json_encoder
-        ).encode('utf-8')
-
-        return super(PyJWT, self).encode(
-            json_payload, key, algorithm, headers, json_encoder
-        )
-
-    def decode(self,
-               jwt,  # type: str
-               key='',   # type: str
-               verify=True,  # type: bool
-               algorithms=None,  # type: List[str]
-               options=None,  # type: Dict
-               **kwargs):
-
-        if verify and not algorithms:
-            warnings.warn(
-                'It is strongly recommended that you pass in a ' +
-                'value for the "algorithms" argument when calling decode(). ' +
-                'This argument will be mandatory in a future version.',
-                DeprecationWarning
-            )
-
-        payload, _, _, _ = self._load(jwt)
-
-        if options is None:
-            options = {'verify_signature': verify}
-        else:
-            options.setdefault('verify_signature', verify)
-
-        decoded = super(PyJWT, self).decode(
-            jwt, key=key, algorithms=algorithms, options=options, **kwargs
-        )
-
-        try:
-            payload = json.loads(decoded.decode('utf-8'))
-        except ValueError as e:
-            raise DecodeError('Invalid payload string: %s' % e)
-        if not isinstance(payload, Mapping):
-            raise DecodeError('Invalid payload string: must be a json object')
-
-        if verify:
-            merged_options = merge_dict(self.options, options)
-            self._validate_claims(payload, merged_options, **kwargs)
-
-        return payload
-
-    def _validate_claims(self, payload, options, audience=None, issuer=None,
-                         leeway=0, **kwargs):
-
-        if 'verify_expiration' in kwargs:
-            options['verify_exp'] = kwargs.get('verify_expiration', True)
-            warnings.warn('The verify_expiration parameter is deprecated. '
-                          'Please use verify_exp in options instead.',
-                          DeprecationWarning)
-
-        if isinstance(leeway, timedelta):
-            leeway = leeway.total_seconds()
-
-        if not isinstance(audience, (string_types, type(None), Iterable)):
-            raise TypeError('audience must be a string, iterable, or None')
-
-        self._validate_required_claims(payload, options)
-
-        now = timegm(datetime.utcnow().utctimetuple())
-
-        if 'iat' in payload and options.get('verify_iat'):
-            self._validate_iat(payload, now, leeway)
-
-        if 'nbf' in payload and options.get('verify_nbf'):
-            self._validate_nbf(payload, now, leeway)
-
-        if 'exp' in payload and options.get('verify_exp'):
-            self._validate_exp(payload, now, leeway)
-
-        if options.get('verify_iss'):
-            self._validate_iss(payload, issuer)
-
-        if options.get('verify_aud'):
-            self._validate_aud(payload, audience)
-
-    def _validate_required_claims(self, payload, options):
-        if options.get('require_exp') and payload.get('exp') is None:
-            raise MissingRequiredClaimError('exp')
-
-        if options.get('require_iat') and payload.get('iat') is None:
-            raise MissingRequiredClaimError('iat')
-
-        if options.get('require_nbf') and payload.get('nbf') is None:
-            raise MissingRequiredClaimError('nbf')
-
-    def _validate_iat(self, payload, now, leeway):
-        try:
-            int(payload['iat'])
-        except ValueError:
-            raise InvalidIssuedAtError('Issued At claim (iat) must be an integer.')
-
-    def _validate_nbf(self, payload, now, leeway):
-        try:
-            nbf = int(payload['nbf'])
-        except ValueError:
-            raise DecodeError('Not Before claim (nbf) must be an integer.')
-
-        if nbf > (now + leeway):
-            raise ImmatureSignatureError('The token is not yet valid (nbf)')
-
-    def _validate_exp(self, payload, now, leeway):
-        try:
-            exp = int(payload['exp'])
-        except ValueError:
-            raise DecodeError('Expiration Time claim (exp) must be an'
-                              ' integer.')
-
-        if exp < (now - leeway):
-            raise ExpiredSignatureError('Signature has expired')
-
-    def _validate_aud(self, payload, audience):
-        if audience is None and 'aud' not in payload:
-            return
-
-        if audience is not None and 'aud' not in payload:
-            # Application specified an audience, but it could not be
-            # verified since the token does not contain a claim.
-            raise MissingRequiredClaimError('aud')
-
-        if audience is None and 'aud' in payload:
-            # Application did not specify an audience, but
-            # the token has the 'aud' claim
-            raise InvalidAudienceError('Invalid audience')
-
-        audience_claims = payload['aud']
-
-        if isinstance(audience_claims, string_types):
-            audience_claims = [audience_claims]
-        if not isinstance(audience_claims, list):
-            raise InvalidAudienceError('Invalid claim format in token')
-        if any(not isinstance(c, string_types) for c in audience_claims):
-            raise InvalidAudienceError('Invalid claim format in token')
-
-        if isinstance(audience, string_types):
-            audience = [audience]
-
-        if not any(aud in audience_claims for aud in audience):
-            raise InvalidAudienceError('Invalid audience')
-
-    def _validate_iss(self, payload, issuer):
-        if issuer is None:
-            return
-
-        if 'iss' not in payload:
-            raise MissingRequiredClaimError('iss')
-
-        if payload['iss'] != issuer:
-            raise InvalidIssuerError('Invalid issuer')
-
-
-_jwt_global_obj = PyJWT()
-encode = _jwt_global_obj.encode
-decode = _jwt_global_obj.decode
-register_algorithm = _jwt_global_obj.register_algorithm
-unregister_algorithm = _jwt_global_obj.unregister_algorithm
-get_unverified_header = _jwt_global_obj.get_unverified_header
diff --git a/contrib/python/PyJWT/py2/jwt/compat.py b/contrib/python/PyJWT/py2/jwt/compat.py
deleted file mode 100644
index e79e258e56..0000000000
--- a/contrib/python/PyJWT/py2/jwt/compat.py
+++ /dev/null
@@ -1,68 +0,0 @@
-"""
-The `compat` module provides support for backwards compatibility with older
-versions of python, and compatibility wrappers around optional packages.
-"""
-# flake8: noqa
-import hmac
-import struct
-import sys
-
-
-PY3 = sys.version_info[0] == 3
-
-
-if PY3:
-    text_type = str
-    binary_type = bytes
-else:
-    text_type = unicode
-    binary_type = str
-
-string_types = (text_type, binary_type)
-
-try:
-    # Importing ABCs from collections will be removed in PY3.8
-    from collections.abc import Iterable, Mapping
-except ImportError:
-    from collections import Iterable, Mapping
-
-try:
-    constant_time_compare = hmac.compare_digest
-except AttributeError:
-    # Fallback for Python < 2.7
-    def constant_time_compare(val1, val2):
-        """
-        Returns True if the two strings are equal, False otherwise.
-
-        The time taken is independent of the number of characters that match.
-        """
-        if len(val1) != len(val2):
-            return False
-
-        result = 0
-
-        for x, y in zip(val1, val2):
-            result |= ord(x) ^ ord(y)
-
-        return result == 0
-
-# Use int.to_bytes if it exists (Python 3)
-if getattr(int, 'to_bytes', None):
-    def bytes_from_int(val):
-        remaining = val
-        byte_length = 0
-
-        while remaining != 0:
-            remaining = remaining >> 8
-            byte_length += 1
-
-        return val.to_bytes(byte_length, 'big', signed=False)
-else:
-    def bytes_from_int(val):
-        buf = []
-        while val:
-            val, remainder = divmod(val, 256)
-            buf.append(remainder)
-
-        buf.reverse()
-        return struct.pack('%sB' % len(buf), *buf)
diff --git a/contrib/python/PyJWT/py2/jwt/contrib/__init__.py b/contrib/python/PyJWT/py2/jwt/contrib/__init__.py
deleted file mode 100644
index e69de29bb2..0000000000
diff --git a/contrib/python/PyJWT/py2/jwt/contrib/algorithms/__init__.py b/contrib/python/PyJWT/py2/jwt/contrib/algorithms/__init__.py
deleted file mode 100644
index e69de29bb2..0000000000
diff --git a/contrib/python/PyJWT/py2/jwt/contrib/algorithms/py_ecdsa.py b/contrib/python/PyJWT/py2/jwt/contrib/algorithms/py_ecdsa.py
deleted file mode 100644
index bf0dea5ae2..0000000000
--- a/contrib/python/PyJWT/py2/jwt/contrib/algorithms/py_ecdsa.py
+++ /dev/null
@@ -1,60 +0,0 @@
-# Note: This file is named py_ecdsa.py because import behavior in Python 2
-# would cause ecdsa.py to squash the ecdsa library that it depends upon.
-
-import hashlib
-
-import ecdsa
-
-from jwt.algorithms import Algorithm
-from jwt.compat import string_types, text_type
-
-
-class ECAlgorithm(Algorithm):
-    """
-    Performs signing and verification operations using
-    ECDSA and the specified hash function
-
-    This class requires the ecdsa package to be installed.
-
-    This is based off of the implementation in PyJWT 0.3.2
-    """
-    SHA256 = hashlib.sha256
-    SHA384 = hashlib.sha384
-    SHA512 = hashlib.sha512
-
-    def __init__(self, hash_alg):
-        self.hash_alg = hash_alg
-
-    def prepare_key(self, key):
-
-        if isinstance(key, ecdsa.SigningKey) or \
-           isinstance(key, ecdsa.VerifyingKey):
-            return key
-
-        if isinstance(key, string_types):
-            if isinstance(key, text_type):
-                key = key.encode('utf-8')
-
-            # Attempt to load key. We don't know if it's
-            # a Signing Key or a Verifying Key, so we try
-            # the Verifying Key first.
-            try:
-                key = ecdsa.VerifyingKey.from_pem(key)
-            except ecdsa.der.UnexpectedDER:
-                key = ecdsa.SigningKey.from_pem(key)
-
-        else:
-            raise TypeError('Expecting a PEM-formatted key.')
-
-        return key
-
-    def sign(self, msg, key):
-        return key.sign(msg, hashfunc=self.hash_alg,
-                        sigencode=ecdsa.util.sigencode_string)
-
-    def verify(self, msg, key, sig):
-        try:
-            return key.verify(sig, msg, hashfunc=self.hash_alg,
-                              sigdecode=ecdsa.util.sigdecode_string)
-        except AssertionError:
-            return False
diff --git a/contrib/python/PyJWT/py2/jwt/contrib/algorithms/pycrypto.py b/contrib/python/PyJWT/py2/jwt/contrib/algorithms/pycrypto.py
deleted file mode 100644
index e49cdbfe40..0000000000
--- a/contrib/python/PyJWT/py2/jwt/contrib/algorithms/pycrypto.py
+++ /dev/null
@@ -1,46 +0,0 @@
-import Crypto.Hash.SHA256
-import Crypto.Hash.SHA384
-import Crypto.Hash.SHA512
-from Crypto.PublicKey import RSA
-from Crypto.Signature import PKCS1_v1_5
-
-from jwt.algorithms import Algorithm
-from jwt.compat import string_types, text_type
-
-
-class RSAAlgorithm(Algorithm):
-    """
-    Performs signing and verification operations using
-    RSASSA-PKCS-v1_5 and the specified hash function.
-
-    This class requires PyCrypto package to be installed.
-
-    This is based off of the implementation in PyJWT 0.3.2
-    """
-    SHA256 = Crypto.Hash.SHA256
-    SHA384 = Crypto.Hash.SHA384
-    SHA512 = Crypto.Hash.SHA512
-
-    def __init__(self, hash_alg):
-        self.hash_alg = hash_alg
-
-    def prepare_key(self, key):
-
-        if isinstance(key, RSA._RSAobj):
-            return key
-
-        if isinstance(key, string_types):
-            if isinstance(key, text_type):
-                key = key.encode('utf-8')
-
-            key = RSA.importKey(key)
-        else:
-            raise TypeError('Expecting a PEM- or RSA-formatted key.')
-
-        return key
-
-    def sign(self, msg, key):
-        return PKCS1_v1_5.new(key).sign(self.hash_alg.new(msg))
-
-    def verify(self, msg, key, sig):
-        return PKCS1_v1_5.new(key).verify(self.hash_alg.new(msg), sig)
diff --git a/contrib/python/PyJWT/py2/jwt/exceptions.py b/contrib/python/PyJWT/py2/jwt/exceptions.py
deleted file mode 100644
index 2a6aa596ba..0000000000
--- a/contrib/python/PyJWT/py2/jwt/exceptions.py
+++ /dev/null
@@ -1,59 +0,0 @@
-class PyJWTError(Exception):
-    """
-    Base class for all exceptions
-    """
-    pass
-
-
-class InvalidTokenError(PyJWTError):
-    pass
-
-
-class DecodeError(InvalidTokenError):
-    pass
-
-
-class InvalidSignatureError(DecodeError):
-    pass
-
-
-class ExpiredSignatureError(InvalidTokenError):
-    pass
-
-
-class InvalidAudienceError(InvalidTokenError):
-    pass
-
-
-class InvalidIssuerError(InvalidTokenError):
-    pass
-
-
-class InvalidIssuedAtError(InvalidTokenError):
-    pass
-
-
-class ImmatureSignatureError(InvalidTokenError):
-    pass
-
-
-class InvalidKeyError(PyJWTError):
-    pass
-
-
-class InvalidAlgorithmError(InvalidTokenError):
-    pass
-
-
-class MissingRequiredClaimError(InvalidTokenError):
-    def __init__(self, claim):
-        self.claim = claim
-
-    def __str__(self):
-        return 'Token is missing the "%s" claim' % self.claim
-
-
-# Compatibility aliases (deprecated)
-ExpiredSignature = ExpiredSignatureError
-InvalidAudience = InvalidAudienceError
-InvalidIssuer = InvalidIssuerError
diff --git a/contrib/python/PyJWT/py2/jwt/help.py b/contrib/python/PyJWT/py2/jwt/help.py
deleted file mode 100644
index 55e39ebb27..0000000000
--- a/contrib/python/PyJWT/py2/jwt/help.py
+++ /dev/null
@@ -1,61 +0,0 @@
-from __future__ import print_function
-
-import json
-import platform
-import sys
-
-from . import __version__ as pyjwt_version
-
-try:
-    import cryptography
-except ImportError:
-    cryptography = None
-
-try:
-    import ecdsa
-except ImportError:
-    ecdsa = None
-
-
-def info():
-    """
-    Generate information for a bug report.
-    Based on the requests package help utility module.
-    """
-    try:
-        platform_info = {"system": platform.system(), "release": platform.release()}
-    except IOError:
-        platform_info = {"system": "Unknown", "release": "Unknown"}
-
-    implementation = platform.python_implementation()
-
-    if implementation == "CPython":
-        implementation_version = platform.python_version()
-    elif implementation == "PyPy":
-        implementation_version = "%s.%s.%s" % (
-            sys.pypy_version_info.major,
-            sys.pypy_version_info.minor,
-            sys.pypy_version_info.micro,
-        )
-        if sys.pypy_version_info.releaselevel != "final":
-            implementation_version = "".join(
-                [implementation_version, sys.pypy_version_info.releaselevel]
-            )
-    else:
-        implementation_version = "Unknown"
-
-    return {
-        "platform": platform_info,
-        "implementation": {"name": implementation, "version": implementation_version},
-        "cryptography": {"version": getattr(cryptography, "__version__", "")},
-        "pyjwt": {"version": pyjwt_version},
-    }
-
-
-def main():
-    """Pretty-print the bug information as JSON."""
-    print(json.dumps(info(), sort_keys=True, indent=2))
-
-
-if __name__ == "__main__":
-    main()
diff --git a/contrib/python/PyJWT/py2/jwt/utils.py b/contrib/python/PyJWT/py2/jwt/utils.py
deleted file mode 100644
index b33c7a2d45..0000000000
--- a/contrib/python/PyJWT/py2/jwt/utils.py
+++ /dev/null
@@ -1,113 +0,0 @@
-import base64
-import binascii
-import struct
-
-from .compat import binary_type, bytes_from_int, text_type
-
-try:
-    from cryptography.hazmat.primitives.asymmetric.utils import (
-        decode_dss_signature, encode_dss_signature
-    )
-except ImportError:
-    pass
-
-
-def force_unicode(value):
-    if isinstance(value, binary_type):
-        return value.decode('utf-8')
-    elif isinstance(value, text_type):
-        return value
-    else:
-        raise TypeError('Expected a string value')
-
-
-def force_bytes(value):
-    if isinstance(value, text_type):
-        return value.encode('utf-8')
-    elif isinstance(value, binary_type):
-        return value
-    else:
-        raise TypeError('Expected a string value')
-
-
-def base64url_decode(input):
-    if isinstance(input, text_type):
-        input = input.encode('ascii')
-
-    rem = len(input) % 4
-
-    if rem > 0:
-        input += b'=' * (4 - rem)
-
-    return base64.urlsafe_b64decode(input)
-
-
-def base64url_encode(input):
-    return base64.urlsafe_b64encode(input).replace(b'=', b'')
-
-
-def to_base64url_uint(val):
-    if val < 0:
-        raise ValueError('Must be a positive integer')
-
-    int_bytes = bytes_from_int(val)
-
-    if len(int_bytes) == 0:
-        int_bytes = b'\x00'
-
-    return base64url_encode(int_bytes)
-
-
-def from_base64url_uint(val):
-    if isinstance(val, text_type):
-        val = val.encode('ascii')
-
-    data = base64url_decode(val)
-
-    buf = struct.unpack('%sB' % len(data), data)
-    return int(''.join(["%02x" % byte for byte in buf]), 16)
-
-
-def merge_dict(original, updates):
-    if not updates:
-        return original
-
-    try:
-        merged_options = original.copy()
-        merged_options.update(updates)
-    except (AttributeError, ValueError) as e:
-        raise TypeError('original and updates must be a dictionary: %s' % e)
-
-    return merged_options
-
-
-def number_to_bytes(num, num_bytes):
-    padded_hex = '%0*x' % (2 * num_bytes, num)
-    big_endian = binascii.a2b_hex(padded_hex.encode('ascii'))
-    return big_endian
-
-
-def bytes_to_number(string):
-    return int(binascii.b2a_hex(string), 16)
-
-
-def der_to_raw_signature(der_sig, curve):
-    num_bits = curve.key_size
-    num_bytes = (num_bits + 7) // 8
-
-    r, s = decode_dss_signature(der_sig)
-
-    return number_to_bytes(r, num_bytes) + number_to_bytes(s, num_bytes)
-
-
-def raw_to_der_signature(raw_sig, curve):
-    num_bits = curve.key_size
-    num_bytes = (num_bits + 7) // 8
-
-    if len(raw_sig) != 2 * num_bytes:
-        raise ValueError('Invalid signature')
-
-    r = bytes_to_number(raw_sig[:num_bytes])
-    s = bytes_to_number(raw_sig[num_bytes:])
-
-    return encode_dss_signature(r, s)
diff --git a/contrib/python/PyJWT/py2/ya.make b/contrib/python/PyJWT/py2/ya.make
deleted file mode 100644
index 57a9352fba..0000000000
--- a/contrib/python/PyJWT/py2/ya.make
+++ /dev/null
@@ -1,43 +0,0 @@
-# Generated by devtools/yamaker (pypi).
-
-PY2_LIBRARY()
-
-VERSION(1.7.1)
-
-LICENSE(MIT)
-
-PEERDIR(
-    contrib/python/cryptography
-)
-
-NO_LINT()
-
-NO_CHECK_IMPORTS(
-    jwt.contrib.*
-)
-
-PY_SRCS(
-    TOP_LEVEL
-    jwt/__init__.py
-    jwt/__main__.py
-    jwt/algorithms.py
-    jwt/api_jws.py
-    jwt/api_jwt.py
-    jwt/compat.py
-    jwt/contrib/__init__.py
-    jwt/contrib/algorithms/__init__.py
-    jwt/contrib/algorithms/py_ecdsa.py
-    jwt/contrib/algorithms/pycrypto.py
-    jwt/exceptions.py
-    jwt/help.py
-    jwt/utils.py
-)
-
-RESOURCE_FILES(
-    PREFIX contrib/python/PyJWT/py2/
-    .dist-info/METADATA
-    .dist-info/entry_points.txt
-    .dist-info/top_level.txt
-)
-
-END()
diff --git a/contrib/python/ydb/py3/.dist-info/METADATA b/contrib/python/ydb/py3/.dist-info/METADATA
index d921ac7f1f..e7397b376d 100644
--- a/contrib/python/ydb/py3/.dist-info/METADATA
+++ b/contrib/python/ydb/py3/.dist-info/METADATA
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: ydb
-Version: 3.9.0
+Version: 3.10.0
 Summary: YDB Python SDK
 Home-page: http://github.com/ydb-platform/ydb-python-sdk
 Author: Yandex LLC
@@ -18,7 +18,6 @@ Requires-Dist: grpcio >=1.42.0
 Requires-Dist: packaging
 Requires-Dist: protobuf <5.0.0,>=3.13.0
 Requires-Dist: aiohttp <4
-Requires-Dist: pyjwt ==2.8.0
 Provides-Extra: yc
 Requires-Dist: yandexcloud ; extra == 'yc'
 
diff --git a/contrib/python/ydb/py3/ya.make b/contrib/python/ydb/py3/ya.make
index b8611eae13..df4b531e51 100644
--- a/contrib/python/ydb/py3/ya.make
+++ b/contrib/python/ydb/py3/ya.make
@@ -2,12 +2,11 @@
 
 PY3_LIBRARY()
 
-VERSION(3.9.0)
+VERSION(3.10.0)
 
 LICENSE(Apache-2.0)
 
 PEERDIR(
-    contrib/python/PyJWT
     contrib/python/aiohttp
     contrib/python/grpcio
     contrib/python/packaging
diff --git a/contrib/python/ydb/py3/ydb/_topic_reader/topic_reader_sync.py b/contrib/python/ydb/py3/ydb/_topic_reader/topic_reader_sync.py
index e5b4e1a2b4..c266de828e 100644
--- a/contrib/python/ydb/py3/ydb/_topic_reader/topic_reader_sync.py
+++ b/contrib/python/ydb/py3/ydb/_topic_reader/topic_reader_sync.py
@@ -76,11 +76,11 @@ class TopicReaderSync:
 
     def async_wait_message(self) -> concurrent.futures.Future:
         """
-        Return future, which will completed when the reader has least one message in queue.
-        If reader already has message - future will return completed.
+        Returns a future, which will complete when the reader has at least one message in queue.
+        If the reader already has a message - the future will complete immediately.
 
-        Possible situation when receive signal about message available, but no messages when try to receive a message.
-        If message expired between send event and try to retrieve message (for example connection broken).
+        A message may expire before it gets read so that the attempt to receive the massage will fail
+        despite the future has signaled about its availability.
         """
         self._check_closed()
 
diff --git a/contrib/python/ydb/py3/ydb/aio/iam.py b/contrib/python/ydb/py3/ydb/aio/iam.py
index 40622f8a9d..eab8faffe0 100644
--- a/contrib/python/ydb/py3/ydb/aio/iam.py
+++ b/contrib/python/ydb/py3/ydb/aio/iam.py
@@ -5,19 +5,15 @@ import abc
 import logging
 from ydb.iam import auth
 from .credentials import AbstractExpiringTokenCredentials
-from ydb import issues
 
 logger = logging.getLogger(__name__)
 
-try:
-    import jwt
-except ImportError:
-    jwt = None
-
 try:
     from yandex.cloud.iam.v1 import iam_token_service_pb2_grpc
     from yandex.cloud.iam.v1 import iam_token_service_pb2
+    import jwt
 except ImportError:
+    jwt = None
     iam_token_service_pb2_grpc = None
     iam_token_service_pb2 = None
 
@@ -59,51 +55,6 @@ class TokenServiceCredentials(AbstractExpiringTokenCredentials):
 IamTokenCredentials = TokenServiceCredentials
 
 
-class OAuth2JwtTokenExchangeCredentials(AbstractExpiringTokenCredentials, auth.BaseJWTCredentials):
-    def __init__(
-        self,
-        token_exchange_url,
-        account_id,
-        access_key_id,
-        private_key,
-        algorithm,
-        token_service_url,
-        subject=None,
-    ):
-        super(OAuth2JwtTokenExchangeCredentials, self).__init__()
-        auth.BaseJWTCredentials.__init__(
-            self, account_id, access_key_id, private_key, algorithm, token_service_url, subject
-        )
-        assert aiohttp is not None, "Install aiohttp library to use OAuth 2.0 token exchange credentials provider"
-        self._token_exchange_url = token_exchange_url
-
-    async def _make_token_request(self):
-        params = {
-            "grant_type": "urn:ietf:params:oauth:grant-type:token-exchange",
-            "requested_token_type": "urn:ietf:params:oauth:token-type:access_token",
-            "subject_token": self._get_jwt(),
-            "subject_token_type": "urn:ietf:params:oauth:token-type:jwt",
-        }
-        headers = {"Content-Type": "application/x-www-form-urlencoded"}
-
-        timeout = aiohttp.ClientTimeout(total=2)
-        async with aiohttp.ClientSession(timeout=timeout) as session:
-            async with session.post(self._token_exchange_url, data=params, headers=headers) as response:
-                if response.status == 403:
-                    raise issues.Unauthenticated(await response.text())
-                if response.status >= 500:
-                    raise issues.Unavailable(await response.text())
-                if response.status >= 400:
-                    raise issues.BadRequest(await response.text())
-                if response.status != 200:
-                    raise issues.Error(await response.text())
-
-                response_json = await response.json()
-                access_token = response_json["access_token"]
-                expires_in = response_json["expires_in"]
-                return {"access_token": access_token, "expires_in": expires_in}
-
-
 class JWTIamCredentials(TokenServiceCredentials, auth.BaseJWTCredentials):
     def __init__(
         self,
@@ -114,39 +65,16 @@ class JWTIamCredentials(TokenServiceCredentials, auth.BaseJWTCredentials):
         iam_channel_credentials=None,
     ):
         TokenServiceCredentials.__init__(self, iam_endpoint, iam_channel_credentials)
-        auth.BaseJWTCredentials.__init__(
-            self,
-            account_id,
-            access_key_id,
-            private_key,
-            auth.YANDEX_CLOUD_JWT_ALGORITHM,
-            auth.YANDEX_CLOUD_IAM_TOKEN_SERVICE_URL,
-        )
+        auth.BaseJWTCredentials.__init__(self, account_id, access_key_id, private_key)
 
     def _get_token_request(self):
-        return iam_token_service_pb2.CreateIamTokenRequest(jwt=self._get_jwt())
-
-
-class NebiusJWTIamCredentials(OAuth2JwtTokenExchangeCredentials):
-    def __init__(
-        self,
-        account_id,
-        access_key_id,
-        private_key,
-        token_exchange_url=None,
-    ):
-        url = token_exchange_url
-        if url is None:
-            url = auth.NEBIUS_CLOUD_IAM_TOKEN_EXCHANGE_URL
-        OAuth2JwtTokenExchangeCredentials.__init__(
-            self,
-            url,
-            account_id,
-            access_key_id,
-            private_key,
-            auth.NEBIUS_CLOUD_JWT_ALGORITHM,
-            auth.NEBIUS_CLOUD_IAM_TOKEN_SERVICE_AUDIENCE,
-            account_id,
+        return iam_token_service_pb2.CreateIamTokenRequest(
+            jwt=auth.get_jwt(
+                self._account_id,
+                self._access_key_id,
+                self._private_key,
+                self._jwt_expiration_timeout,
+            )
         )
 
 
@@ -202,20 +130,3 @@ class ServiceAccountCredentials(JWTIamCredentials):
             iam_endpoint,
             iam_channel_credentials,
         )
-
-
-class NebiusServiceAccountCredentials(NebiusJWTIamCredentials):
-    def __init__(
-        self,
-        service_account_id,
-        access_key_id,
-        private_key,
-        iam_endpoint=None,
-        iam_channel_credentials=None,
-    ):
-        super(NebiusServiceAccountCredentials, self).__init__(
-            service_account_id,
-            access_key_id,
-            private_key,
-            iam_endpoint,
-        )
diff --git a/contrib/python/ydb/py3/ydb/driver.py b/contrib/python/ydb/py3/ydb/driver.py
index 16bba15154..89109b9b57 100644
--- a/contrib/python/ydb/py3/ydb/driver.py
+++ b/contrib/python/ydb/py3/ydb/driver.py
@@ -38,13 +38,6 @@ def credentials_from_env_variables(tracer=None):
 
             return ydb.iam.ServiceAccountCredentials.from_file(service_account_key_file)
 
-        nebius_service_account_key_file = os.getenv("YDB_NEBIUS_SERVICE_ACCOUNT_KEY_FILE_CREDENTIALS")
-        if nebius_service_account_key_file is not None:
-            ctx.trace({"credentials.nebius_service_account_key_file": True})
-            import ydb.iam
-
-            return ydb.iam.NebiusServiceAccountCredentials.from_file(nebius_service_account_key_file)
-
         anonymous_credetials = os.getenv("YDB_ANONYMOUS_CREDENTIALS", "0") == "1"
         if anonymous_credetials:
             ctx.trace({"credentials.anonymous": True})
diff --git a/contrib/python/ydb/py3/ydb/iam/__init__.py b/contrib/python/ydb/py3/ydb/iam/__init__.py
index cf835769db..7167efe13e 100644
--- a/contrib/python/ydb/py3/ydb/iam/__init__.py
+++ b/contrib/python/ydb/py3/ydb/iam/__init__.py
@@ -1,4 +1,3 @@
 # -*- coding: utf-8 -*-
 from .auth import ServiceAccountCredentials  # noqa
-from .auth import NebiusServiceAccountCredentials  # noqa
 from .auth import MetadataUrlCredentials  # noqa
diff --git a/contrib/python/ydb/py3/ydb/iam/auth.py b/contrib/python/ydb/py3/ydb/iam/auth.py
index 852c0c28bb..82e7c9f6c8 100644
--- a/contrib/python/ydb/py3/ydb/iam/auth.py
+++ b/contrib/python/ydb/py3/ydb/iam/auth.py
@@ -1,5 +1,5 @@
 # -*- coding: utf-8 -*-
-from ydb import credentials, tracing, issues
+from ydb import credentials, tracing
 import grpc
 import time
 import abc
@@ -7,15 +7,12 @@ from datetime import datetime
 import json
 import os
 
-try:
-    import jwt
-except ImportError:
-    jwt = None
-
 try:
     from yandex.cloud.iam.v1 import iam_token_service_pb2_grpc
     from yandex.cloud.iam.v1 import iam_token_service_pb2
+    import jwt
 except ImportError:
+    jwt = None
     iam_token_service_pb2_grpc = None
     iam_token_service_pb2 = None
 
@@ -26,32 +23,22 @@ except ImportError:
 
 
 DEFAULT_METADATA_URL = "http://169.254.169.254/computeMetadata/v1/instance/service-accounts/default/token"
-YANDEX_CLOUD_IAM_TOKEN_SERVICE_URL = "https://iam.api.cloud.yandex.net/iam/v1/tokens"
-NEBIUS_CLOUD_IAM_TOKEN_SERVICE_AUDIENCE = "token-service.iam.new.nebiuscloud.net"
-NEBIUS_CLOUD_IAM_TOKEN_EXCHANGE_URL = "https://auth.new.nebiuscloud.net/oauth2/token/exchange"
 
-YANDEX_CLOUD_JWT_ALGORITHM = "PS256"
-NEBIUS_CLOUD_JWT_ALGORITHM = "RS256"
 
-
-def get_jwt(account_id, access_key_id, private_key, jwt_expiration_timeout, algorithm, token_service_url, subject=None):
-    assert jwt is not None, "Install pyjwt library to use jwt tokens"
+def get_jwt(account_id, access_key_id, private_key, jwt_expiration_timeout):
     now = time.time()
     now_utc = datetime.utcfromtimestamp(now)
     exp_utc = datetime.utcfromtimestamp(now + jwt_expiration_timeout)
-    payload = {
-        "iss": account_id,
-        "aud": token_service_url,
-        "iat": now_utc,
-        "exp": exp_utc,
-    }
-    if subject is not None:
-        payload["sub"] = subject
     return jwt.encode(
         key=private_key,
-        algorithm=algorithm,
-        headers={"typ": "JWT", "alg": algorithm, "kid": access_key_id},
-        payload=payload,
+        algorithm="PS256",
+        headers={"typ": "JWT", "alg": "PS256", "kid": access_key_id},
+        payload={
+            "iss": account_id,
+            "aud": "https://iam.api.cloud.yandex.net/iam/v1/tokens",
+            "iat": now_utc,
+            "exp": exp_utc,
+        },
     )
 
 
@@ -86,15 +73,12 @@ class TokenServiceCredentials(credentials.AbstractExpiringTokenCredentials):
 
 
 class BaseJWTCredentials(abc.ABC):
-    def __init__(self, account_id, access_key_id, private_key, algorithm, token_service_url, subject=None):
+    def __init__(self, account_id, access_key_id, private_key):
         self._account_id = account_id
         self._jwt_expiration_timeout = 60.0 * 60
         self._token_expiration_timeout = 120
         self._access_key_id = access_key_id
         self._private_key = private_key
-        self._algorithm = algorithm
-        self._token_service_url = token_service_url
-        self._subject = subject
 
     def set_token_expiration_timeout(self, value):
         self._token_expiration_timeout = value
@@ -115,64 +99,6 @@ class BaseJWTCredentials(abc.ABC):
             iam_channel_credentials=iam_channel_credentials,
         )
 
-    def _get_jwt(self):
-        return get_jwt(
-            self._account_id,
-            self._access_key_id,
-            self._private_key,
-            self._jwt_expiration_timeout,
-            self._algorithm,
-            self._token_service_url,
-            self._subject,
-        )
-
-
-class OAuth2JwtTokenExchangeCredentials(credentials.AbstractExpiringTokenCredentials, BaseJWTCredentials):
-    def __init__(
-        self,
-        token_exchange_url,
-        account_id,
-        access_key_id,
-        private_key,
-        algorithm,
-        token_service_url,
-        subject=None,
-        tracer=None,
-    ):
-        BaseJWTCredentials.__init__(self, account_id, access_key_id, private_key, algorithm, token_service_url, subject)
-        super(OAuth2JwtTokenExchangeCredentials, self).__init__(tracer)
-        assert requests is not None, "Install requests library to use OAuth 2.0 token exchange credentials provider"
-        self._token_exchange_url = token_exchange_url
-
-    def _process_response_status_code(self, response):
-        if response.status_code == 403:
-            raise issues.Unauthenticated(response.content)
-        if response.status_code >= 500:
-            raise issues.Unavailable(response.content)
-        if response.status_code >= 400:
-            raise issues.BadRequest(response.content)
-        if response.status_code != 200:
-            raise issues.Error(response.content)
-
-    def _process_response(self, response):
-        self._process_response_status_code(response)
-        response_json = json.loads(response.content)
-        access_token = response_json["access_token"]
-        expires_in = response_json["expires_in"]
-        return {"access_token": access_token, "expires_in": expires_in}
-
-    @tracing.with_trace()
-    def _make_token_request(self):
-        params = {
-            "grant_type": "urn:ietf:params:oauth:grant-type:token-exchange",
-            "requested_token_type": "urn:ietf:params:oauth:token-type:access_token",
-            "subject_token": self._get_jwt(),
-            "subject_token_type": "urn:ietf:params:oauth:token-type:jwt",
-        }
-        headers = {"Content-Type": "application/x-www-form-urlencoded"}
-        response = requests.post(self._token_exchange_url, data=params, headers=headers)
-        return self._process_response(response)
-
 
 class JWTIamCredentials(TokenServiceCredentials, BaseJWTCredentials):
     def __init__(
@@ -184,34 +110,16 @@ class JWTIamCredentials(TokenServiceCredentials, BaseJWTCredentials):
         iam_channel_credentials=None,
     ):
         TokenServiceCredentials.__init__(self, iam_endpoint, iam_channel_credentials)
-        BaseJWTCredentials.__init__(
-            self, account_id, access_key_id, private_key, YANDEX_CLOUD_JWT_ALGORITHM, YANDEX_CLOUD_IAM_TOKEN_SERVICE_URL
-        )
+        BaseJWTCredentials.__init__(self, account_id, access_key_id, private_key)
 
     def _get_token_request(self):
-        return self._iam_token_service_pb2.CreateIamTokenRequest(jwt=self._get_jwt())
-
-
-class NebiusJWTIamCredentials(OAuth2JwtTokenExchangeCredentials):
-    def __init__(
-        self,
-        account_id,
-        access_key_id,
-        private_key,
-        token_exchange_url=None,
-    ):
-        url = token_exchange_url
-        if url is None:
-            url = NEBIUS_CLOUD_IAM_TOKEN_EXCHANGE_URL
-        OAuth2JwtTokenExchangeCredentials.__init__(
-            self,
-            url,
-            account_id,
-            access_key_id,
-            private_key,
-            NEBIUS_CLOUD_JWT_ALGORITHM,
-            NEBIUS_CLOUD_IAM_TOKEN_SERVICE_AUDIENCE,
-            account_id,
+        return self._iam_token_service_pb2.CreateIamTokenRequest(
+            jwt=get_jwt(
+                self._account_id,
+                self._access_key_id,
+                self._private_key,
+                self._jwt_expiration_timeout,
+            )
         )
 
 
@@ -268,20 +176,3 @@ class ServiceAccountCredentials(JWTIamCredentials):
             iam_endpoint,
             iam_channel_credentials,
         )
-
-
-class NebiusServiceAccountCredentials(NebiusJWTIamCredentials):
-    def __init__(
-        self,
-        service_account_id,
-        access_key_id,
-        private_key,
-        iam_endpoint=None,
-        iam_channel_credentials=None,
-    ):
-        super(NebiusServiceAccountCredentials, self).__init__(
-            service_account_id,
-            access_key_id,
-            private_key,
-            iam_endpoint,
-        )
diff --git a/contrib/python/ydb/py3/ydb/ydb_version.py b/contrib/python/ydb/py3/ydb/ydb_version.py
index 10baa2a41a..71960e35b5 100644
--- a/contrib/python/ydb/py3/ydb/ydb_version.py
+++ b/contrib/python/ydb/py3/ydb/ydb_version.py
@@ -1 +1 @@
-VERSION = "3.9.0"
+VERSION = "3.10.0"
-- 
cgit v1.2.3


From d1497f1514198c888fa7dc82c65515e28d461eae Mon Sep 17 00:00:00 2001
From: thegeorg <thegeorg@yandex-team.com>
Date: Fri, 12 Apr 2024 12:45:55 +0300
Subject: Move ios_sdk to build/internal
 bf69dc66620000d9c282ddc042e66e621ae21cf4

---
 build/ymake_conf.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/build/ymake_conf.py b/build/ymake_conf.py
index 1d0dcc2647..7d733d5f59 100755
--- a/build/ymake_conf.py
+++ b/build/ymake_conf.py
@@ -1349,7 +1349,7 @@ class GnuToolchain(Toolchain):
 
     def setup_apple_arcadia_sdk(self, target):
         if target.is_ios:
-            self.setup_xcode_sdk(project='build/platform/ios_sdk', var='${IOS_SDK_ROOT_RESOURCE_GLOBAL}')
+            self.setup_xcode_sdk(project='build/internal/platform/ios_sdk', var='${IOS_SDK_ROOT_RESOURCE_GLOBAL}')
             self.platform_projects.append('build/internal/platform/macos_system_stl')
         if target.is_macos:
             self.setup_xcode_sdk(project='build/internal/platform/macos_sdk', var='${MACOS_SDK_RESOURCE_GLOBAL}')
-- 
cgit v1.2.3


From 0cf62e63269c57775e2990bcc45f6e00e984c3ec Mon Sep 17 00:00:00 2001
From: iaz1607 <iaz1607@yandex-team.com>
Date: Fri, 12 Apr 2024 13:54:33 +0300
Subject: Revert commit rXXXXXX,Update asm in jacoco
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Откатываем обновление jacoco из-за того, что обновление приводит к поломкам сбора покрытия для некоторых проектов, например https://st.yandex-team.ru/
a18938fdb0501d6fc04893cb2ee44272765450b3
---
 build/mapping.conf.json | 2 --
 1 file changed, 2 deletions(-)

diff --git a/build/mapping.conf.json b/build/mapping.conf.json
index cba14ded5d..1d4021ca37 100644
--- a/build/mapping.conf.json
+++ b/build/mapping.conf.json
@@ -122,7 +122,6 @@
         "5786828167": "https://devtools-registry.s3.yandex.net/5786828167",
         "5786827891": "https://devtools-registry.s3.yandex.net/5786827891",
         "5786826302": "https://devtools-registry.s3.yandex.net/5786826302",
-        "6115438948": "https://devtools-registry.s3.yandex.net/6115438948",
         "2842390994": "https://devtools-registry.s3.yandex.net/2842390994",
         "5310288728": "https://devtools-registry.s3.yandex.net/5310288728",
         "5620327787": "https://devtools-registry.s3.yandex.net/5620327787",
@@ -561,7 +560,6 @@
         "5786828167": "contrib/tools/python3/python3 for linux",
         "5786827891": "contrib/tools/python3/python3 for linux-aarch64",
         "5786826302": "contrib/tools/python3/python3 for win32",
-        "6115438948": "devtools jacoco agent 0.8.7",
         "2842390994": "devtools jacoco agent 0.8.7 with shaded asm",
         "5310288728": "devtools jstyle runner 10.12.4",
         "5620327787": "devtools jstyle runner 10.12.4",
-- 
cgit v1.2.3


From f34afc9271d1a64cc057402be5aacc49b995ab0f Mon Sep 17 00:00:00 2001
From: zhuravsky-max <zhuravsky-max@yandex-team.com>
Date: Fri, 12 Apr 2024 13:58:33 +0300
Subject: =?UTF-8?q?=D0=92=D0=BE=D0=B7=D0=BC=D0=BE=D0=B6=D0=BD=D0=BE=D1=81?=
 =?UTF-8?q?=D1=82=D1=8C=20=D1=83=D0=BF=D1=80=D0=B0=D0=B2=D0=BB=D0=B5=D0=BD?=
 =?UTF-8?q?=D0=B8=D1=8F=20=D0=BF=D1=83=D0=BB=D0=BE=D0=BC=20nexting=20threa?=
 =?UTF-8?q?d=20=D0=B2=20gRPC?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Добавил возможность управлять количеством потоков в пуле `nexting_thread` в gRPC библиотеке.

Судя по коду количество потоков в пуле в этом месте выбирается, исходя из количества ядер, доступных на машине. Для некоторых сценариев использования это избыточно.
159df251a530632c3c611ce85ff87f63907d917a
---
 .../libs/grpc/src/cpp/common/completion_queue_cc.cc  | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/contrib/libs/grpc/src/cpp/common/completion_queue_cc.cc b/contrib/libs/grpc/src/cpp/common/completion_queue_cc.cc
index abb20e245d..154e3471b8 100644
--- a/contrib/libs/grpc/src/cpp/common/completion_queue_cc.cc
+++ b/contrib/libs/grpc/src/cpp/common/completion_queue_cc.cc
@@ -31,10 +31,23 @@
 #include "src/core/lib/gpr/useful.h"
 #include "src/core/lib/gprpp/sync.h"
 #include "src/core/lib/gprpp/thd.h"
+#include "src/core/lib/gprpp/env.h"
+#include "src/core/lib/gpr/string.h"
 
 namespace grpc {
 namespace {
 
+size_t GetNextingThreadNumFromEnv() {
+  auto value = grpc_core::GetEnv("GRPC_NEXTING_THREAD_NUM_ENV");
+  if (!value.has_value()) return 0;
+  int parse_succeeded = gpr_parse_nonnegative_int(value->c_str());
+
+  if (parse_succeeded <= 0) {
+      return 0;
+  }
+  return static_cast<size_t>(parse_succeeded);
+}
+
 gpr_once g_once_init_callback_alternative = GPR_ONCE_INIT;
 grpc_core::Mutex* g_callback_alternative_mu;
 
@@ -55,6 +68,13 @@ struct CallbackAlternativeCQ {
       cq = new CompletionQueue;
       int num_nexting_threads =
           grpc_core::Clamp(gpr_cpu_num_cores() / 2, 2u, 16u);
+
+      auto threads_limit_env = GetNextingThreadNumFromEnv();
+      if (threads_limit_env) {
+        gpr_log(GPR_INFO, "Nexting thread number changed via env from %d to %zd", num_nexting_threads, threads_limit_env);
+        num_nexting_threads = static_cast<int>(threads_limit_env);
+      }
+
       nexting_threads = new std::vector<grpc_core::Thread>;
       for (int i = 0; i < num_nexting_threads; i++) {
         nexting_threads->emplace_back(
-- 
cgit v1.2.3


From 2e559c763bf282ef96928ea8893863b72c958131 Mon Sep 17 00:00:00 2001
From: robot-piglet <robot-piglet@yandex-team.com>
Date: Fri, 12 Apr 2024 19:32:51 +0300
Subject: Intermediate changes

---
 yt/yt/RpcProxyProtocolVersion.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/yt/yt/RpcProxyProtocolVersion.txt b/yt/yt/RpcProxyProtocolVersion.txt
index 11c57e2d37..7c59a18624 100644
--- a/yt/yt/RpcProxyProtocolVersion.txt
+++ b/yt/yt/RpcProxyProtocolVersion.txt
@@ -19,7 +19,7 @@ SET(YT_RPC_MODIFY_ROWS_STRONG_LOCKS_VERSION 2)
 SET(YT_RPC_PYTHON_BINDINGS_PATCH_VERSION 18)
 
 # YT proto package has protocol version plus some patch version
-SET(YT_PROTO_PACKAGE_PATCH_VERSION 14)
+SET(YT_PROTO_PACKAGE_PATCH_VERSION 15)
 
 SET(YT_RPC_PROXY_PROTOCOL_VERSION "${YT_RPC_PROXY_PROTOCOL_VERSION_MAJOR}.${YT_RPC_PROXY_SERVER_PROTOCOL_VERSION_MINOR}")
 SET(YT_RPC_PYTHON_BINDINGS_VERSION "${YT_RPC_PROXY_PROTOCOL_VERSION}.${YT_RPC_PYTHON_BINDINGS_PATCH_VERSION}")
-- 
cgit v1.2.3


From 39d2b82b888f5a640099579def110a7066555ee6 Mon Sep 17 00:00:00 2001
From: robot-brewer <robot-brewer@yandex-team.com>
Date: Fri, 12 Apr 2024 19:32:55 +0300
Subject: Release clang16 #6

https://github.com/yandex/toolchain-registry/releases/tag/clang16-v6
796293a7d2437569d8a0847cfd197dcedacd280e
---
 build/mapping.conf.json           | 10 ++++++++++
 build/platform/clang/clang16.json | 10 +++++-----
 2 files changed, 15 insertions(+), 5 deletions(-)

diff --git a/build/mapping.conf.json b/build/mapping.conf.json
index 1d4021ca37..f05698374f 100644
--- a/build/mapping.conf.json
+++ b/build/mapping.conf.json
@@ -82,22 +82,27 @@
         "4312063561": "https://devtools-registry.s3.yandex.net/4312063561",
         "6140209067": "https://devtools-registry.s3.yandex.net/6140209067",
         "6033368058": "https://devtools-registry.s3.yandex.net/6033368058",
+        "6156880073": "https://devtools-registry.s3.yandex.net/6156880073",
         "6016439034": "https://devtools-registry.s3.yandex.net/6016439034",
         "6023726156": "https://devtools-registry.s3.yandex.net/6023726156",
         "6139882607": "https://devtools-registry.s3.yandex.net/6139882607",
         "6033369023": "https://devtools-registry.s3.yandex.net/6033369023",
+        "6156858657": "https://devtools-registry.s3.yandex.net/6156858657",
         "6016474886": "https://devtools-registry.s3.yandex.net/6016474886",
         "6023744448": "https://devtools-registry.s3.yandex.net/6023744448",
         "6139820676": "https://devtools-registry.s3.yandex.net/6139820676",
         "6033489391": "https://devtools-registry.s3.yandex.net/6033489391",
+        "6156772751": "https://devtools-registry.s3.yandex.net/6156772751",
         "6016673656": "https://devtools-registry.s3.yandex.net/6016673656",
         "6023846084": "https://devtools-registry.s3.yandex.net/6023846084",
         "6139782997": "https://devtools-registry.s3.yandex.net/6139782997",
         "6033465229": "https://devtools-registry.s3.yandex.net/6033465229",
+        "6156782090": "https://devtools-registry.s3.yandex.net/6156782090",
         "6016864019": "https://devtools-registry.s3.yandex.net/6016864019",
         "6023877997": "https://devtools-registry.s3.yandex.net/6023877997",
         "6139792533": "https://devtools-registry.s3.yandex.net/6139792533",
         "6033421763": "https://devtools-registry.s3.yandex.net/6033421763",
+        "6156841007": "https://devtools-registry.s3.yandex.net/6156841007",
         "6017210355": "https://devtools-registry.s3.yandex.net/6017210355",
         "6024131244": "https://devtools-registry.s3.yandex.net/6024131244",
         "2062930743": "https://devtools-registry.s3.yandex.net/2062930743",
@@ -520,22 +525,27 @@
         "4312063561": "black_linter for linux-aarch64",
         "6140209067": "clang-16-darwin-arm64-29085bdbacf3a977f3f7e0e53f553dd1445da84f",
         "6033368058": "clang-16-darwin-arm64-4a1002ac4598237a2d1439e314fbecda678cbb8e",
+        "6156880073": "clang-16-darwin-arm64-eebb503c0378c36b4f84227cccb224d1bb2a79ad",
         "6016439034": "clang-16-darwin-arm64-f116dc6707c5baf24345777e6c4730785eff4535",
         "6023726156": "clang-16-darwin-arm64-f116dc6707c5baf24345777e6c4730785eff4535",
         "6139882607": "clang-16-darwin-x86_64-29085bdbacf3a977f3f7e0e53f553dd1445da84f",
         "6033369023": "clang-16-darwin-x86_64-4a1002ac4598237a2d1439e314fbecda678cbb8e",
+        "6156858657": "clang-16-darwin-x86_64-eebb503c0378c36b4f84227cccb224d1bb2a79ad",
         "6016474886": "clang-16-darwin-x86_64-f116dc6707c5baf24345777e6c4730785eff4535",
         "6023744448": "clang-16-darwin-x86_64-f116dc6707c5baf24345777e6c4730785eff4535",
         "6139820676": "clang-16-linux-aarch64-29085bdbacf3a977f3f7e0e53f553dd1445da84f",
         "6033489391": "clang-16-linux-aarch64-4a1002ac4598237a2d1439e314fbecda678cbb8e",
+        "6156772751": "clang-16-linux-aarch64-eebb503c0378c36b4f84227cccb224d1bb2a79ad",
         "6016673656": "clang-16-linux-aarch64-f116dc6707c5baf24345777e6c4730785eff4535",
         "6023846084": "clang-16-linux-aarch64-f116dc6707c5baf24345777e6c4730785eff4535",
         "6139782997": "clang-16-linux-x86_64-29085bdbacf3a977f3f7e0e53f553dd1445da84f",
         "6033465229": "clang-16-linux-x86_64-4a1002ac4598237a2d1439e314fbecda678cbb8e",
+        "6156782090": "clang-16-linux-x86_64-eebb503c0378c36b4f84227cccb224d1bb2a79ad",
         "6016864019": "clang-16-linux-x86_64-f116dc6707c5baf24345777e6c4730785eff4535",
         "6023877997": "clang-16-linux-x86_64-f116dc6707c5baf24345777e6c4730785eff4535",
         "6139792533": "clang-16-mingw-w64-x86_64-29085bdbacf3a977f3f7e0e53f553dd1445da84f",
         "6033421763": "clang-16-mingw-w64-x86_64-4a1002ac4598237a2d1439e314fbecda678cbb8e",
+        "6156841007": "clang-16-mingw-w64-x86_64-eebb503c0378c36b4f84227cccb224d1bb2a79ad",
         "6017210355": "clang-16-mingw-w64-x86_64-f116dc6707c5baf24345777e6c4730785eff4535",
         "6024131244": "clang-16-mingw-w64-x86_64-f116dc6707c5baf24345777e6c4730785eff4535",
         "2062930743": "contrib/libs/clang11/pkg-windows-x86_64.json",
diff --git a/build/platform/clang/clang16.json b/build/platform/clang/clang16.json
index 3ac0b53b62..3415156e91 100644
--- a/build/platform/clang/clang16.json
+++ b/build/platform/clang/clang16.json
@@ -1,19 +1,19 @@
 {
     "by_platform": {
         "darwin-arm64": {
-            "uri": "sbr:6140209067"
+            "uri": "sbr:6156880073"
         },
         "darwin-x86_64": {
-            "uri": "sbr:6139882607"
+            "uri": "sbr:6156858657"
         },
         "linux-aarch64": {
-            "uri": "sbr:6139820676"
+            "uri": "sbr:6156772751"
         },
         "linux-x86_64": {
-            "uri": "sbr:6139782997"
+            "uri": "sbr:6156782090"
         },
         "win32-x86_64": {
-            "uri": "sbr:6139792533"
+            "uri": "sbr:6156841007"
         }
     }
 }
-- 
cgit v1.2.3


From 68bc6e97593f4c41266b2ddca54eff8d23416fee Mon Sep 17 00:00:00 2001
From: ermolovd <ermolovd@yandex-team.com>
Date: Fri, 12 Apr 2024 21:38:02 +0300
Subject: BufferMemory usage for retryful writer v2
 ca66c0e73475f3596f6fb2e4e655f2ec378a71a9

---
 yt/cpp/mapreduce/client/retryful_writer_v2.cpp | 5 +++++
 yt/cpp/mapreduce/client/retryful_writer_v2.h   | 2 ++
 2 files changed, 7 insertions(+)

diff --git a/yt/cpp/mapreduce/client/retryful_writer_v2.cpp b/yt/cpp/mapreduce/client/retryful_writer_v2.cpp
index cabc6cf8fa..40297500ae 100644
--- a/yt/cpp/mapreduce/client/retryful_writer_v2.cpp
+++ b/yt/cpp/mapreduce/client/retryful_writer_v2.cpp
@@ -338,6 +338,11 @@ void TRetryfulWriterV2::Abort()
     }
 }
 
+size_t TRetryfulWriterV2::GetBufferMemoryUsage() const
+{
+    return BufferSize_ * 4;
+}
+
 void TRetryfulWriterV2::DoFinish()
 {
     if (Sender_) {
diff --git a/yt/cpp/mapreduce/client/retryful_writer_v2.h b/yt/cpp/mapreduce/client/retryful_writer_v2.h
index c344fd0c6c..bda55d96a6 100644
--- a/yt/cpp/mapreduce/client/retryful_writer_v2.h
+++ b/yt/cpp/mapreduce/client/retryful_writer_v2.h
@@ -32,6 +32,8 @@ public:
     void NotifyRowEnd() override;
     void Abort() override;
 
+    size_t GetBufferMemoryUsage() const override;
+
 protected:
     void DoWrite(const void* buf, size_t len) override;
     void DoFinish() override;
-- 
cgit v1.2.3


From 7896a53ef056dc4c2418f145ab291679774cf5bd Mon Sep 17 00:00:00 2001
From: snermolaev <snermolaev@yandex-team.com>
Date: Sat, 13 Apr 2024 05:43:46 +0300
Subject: do not consider BUILD_TYPE for GO module commands explicitly
 ffd1faf4812e419717a589f1e924fb848852490d

---
 build/conf/go.conf | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/build/conf/go.conf b/build/conf/go.conf
index b0c6e3c82e..6cf067a48a 100644
--- a/build/conf/go.conf
+++ b/build/conf/go.conf
@@ -118,7 +118,7 @@ GO_YNDEXER_OUTPUT=${output;pre=${MODULE_PREFIX};suf=${MODULE_SUFFIX}${_GO_YNDEXE
 GO_PROJECT_PREFIXES=++std-lib-prefix $GO_STD_LIB_PREFIX ++arc-project-prefix $GO_ARCADIA_PROJECT_PREFIX
 
 # tag:go-specific
-_GO_FAKEID=${FAKEID}.${BUILD_TYPE}.${GOSTD_VERSION}.${GO_FAKEID}
+_GO_FAKEID=${FAKEID}.${GOSTD_VERSION}.${GO_FAKEID}
 _CGO_FAKEID=${_GO_FAKEID}.${CPP_FAKEID}
 
 # tag:go-specific
-- 
cgit v1.2.3


From 92aa08112896f9f3fb5b6c124b7eff16fcedcb95 Mon Sep 17 00:00:00 2001
From: yuryalekseev <yuryalekseev@yandex-team.com>
Date: Sat, 13 Apr 2024 06:02:51 +0300
Subject: YT-20113: Use code generated comparator in SimpleSort, PartitionSort
 if possible. e23ff70d06989bb2b299bd02b1ac3c6c8f09b4e4

---
 yt/yt/client/table_client/comparator.cpp | 16 +++++++++++++++-
 yt/yt/client/table_client/comparator.h   |  8 ++++++--
 yt/yt/client/table_client/public.h       |  3 +++
 yt/yt/client/table_client/schema.cpp     | 29 +++++++++++++++++++----------
 yt/yt/client/table_client/schema.h       |  3 ++-
 5 files changed, 45 insertions(+), 14 deletions(-)

diff --git a/yt/yt/client/table_client/comparator.cpp b/yt/yt/client/table_client/comparator.cpp
index 1d8375387b..f49bec0fba 100644
--- a/yt/yt/client/table_client/comparator.cpp
+++ b/yt/yt/client/table_client/comparator.cpp
@@ -19,8 +19,9 @@ static const TLogger Logger("TableClientComparator");
 
 ////////////////////////////////////////////////////////////////////////////////
 
-TComparator::TComparator(std::vector<ESortOrder> sortOrders)
+TComparator::TComparator(std::vector<ESortOrder> sortOrders, TCallback<TUUComparerSignature> CGComparator)
     : SortOrders_(std::move(sortOrders))
+    , CGComparator_(CGComparator)
 { }
 
 void TComparator::Persist(const TPersistenceContext& context)
@@ -249,6 +250,19 @@ int TComparator::CompareKeys(const TKey& lhs, const TKey& rhs) const
     ValidateKey(lhs);
     ValidateKey(rhs);
 
+    if (CGComparator_) {
+        // Compare keys with code generated comparator.
+        int comparisonResult = CGComparator_.Run(lhs.Begin(), rhs.Begin(), GetLength());
+
+        if (comparisonResult == 0) {
+            return comparisonResult;
+        }
+
+        int differentColumnIdx = abs(comparisonResult) - 1;
+        int orderSign = SortOrders_[differentColumnIdx] == ESortOrder::Ascending ? +1 : -1;
+        return comparisonResult * orderSign;
+    }
+
     for (int index = 0; index < lhs.GetLength(); ++index) {
         auto valueComparisonResult = CompareValues(index, lhs[index], rhs[index]);
         if (valueComparisonResult != 0) {
diff --git a/yt/yt/client/table_client/comparator.h b/yt/yt/client/table_client/comparator.h
index 9c9e1d78d8..b228356555 100644
--- a/yt/yt/client/table_client/comparator.h
+++ b/yt/yt/client/table_client/comparator.h
@@ -28,7 +28,7 @@ public:
 
 public:
     TComparator() = default;
-    explicit TComparator(std::vector<ESortOrder> sortOrders);
+    TComparator(std::vector<ESortOrder> sortOrders, TCallback<TUUComparerSignature> CGComparator = {});
 
     void Persist(const TPersistenceContext& context);
 
@@ -84,6 +84,10 @@ public:
     //! This may be used instead of TComparator.
     explicit operator bool() const;
 
+private:
+    // Compiler generated comparer that is used in CompareKeys().
+    TCallback<TUUComparerSignature> CGComparator_;
+
 private:
     void ValidateKey(const TKey& key) const;
     void ValidateKeyBound(const TKeyBound& keyBound) const;
@@ -96,7 +100,7 @@ void Serialize(const TComparator& comparator, NYson::IYsonConsumer* consumer);
 
 ////////////////////////////////////////////////////////////////////////////////
 
-using TPrefixComparer = int(const TUnversionedValue*, const TUnversionedValue*, int);
+using TPrefixComparer = TUUComparerSignature;
 
 ////////////////////////////////////////////////////////////////////////////////
 
diff --git a/yt/yt/client/table_client/public.h b/yt/yt/client/table_client/public.h
index 73b6c8dca6..f5285e898f 100644
--- a/yt/yt/client/table_client/public.h
+++ b/yt/yt/client/table_client/public.h
@@ -429,6 +429,9 @@ using TDynamicTableKeyMask = ui64;
 
 static_assert(sizeof(TDynamicTableKeyMask) * 8 == MaxKeyColumnCountInDynamicTable);
 
+// Function that compares two TUnversionedValue values.
+using TUUComparerSignature = int(const TUnversionedValue*, const TUnversionedValue*, int);
+
 ////////////////////////////////////////////////////////////////////////////////
 
 } // namespace NYT::NTableClient
diff --git a/yt/yt/client/table_client/schema.cpp b/yt/yt/client/table_client/schema.cpp
index 26b11be183..241c8019f2 100644
--- a/yt/yt/client/table_client/schema.cpp
+++ b/yt/yt/client/table_client/schema.cpp
@@ -749,6 +749,14 @@ bool TTableSchema::IsEmpty() const
     return Columns().empty();
 }
 
+bool TTableSchema::IsCGCompatarorApplicable() const
+{
+    auto keyTypes = GetKeyColumnTypes();
+    return std::none_of(keyTypes.begin(), keyTypes.end(), [] (auto type) {
+        return type == EValueType::Any;
+    });
+}
+
 std::optional<int> TTableSchema::GetTtlColumnIndex() const
 {
     auto* column = FindColumn(TtlColumnName);
@@ -1297,18 +1305,19 @@ TTableSchemaPtr TTableSchema::ToModifiedSchema(ETableSchemaModification schemaMo
     }
 }
 
-TComparator TTableSchema::ToComparator() const
+TComparator TTableSchema::ToComparator(TCallback<TUUComparerSignature> CGComparator) const
 {
-    if (!ColumnInfo_) {
-        return TComparator(std::vector<ESortOrder>());
-    }
-    const auto& info = *ColumnInfo_;
-    std::vector<ESortOrder> sortOrders(KeyColumnCount_);
-    for (int index = 0; index < KeyColumnCount_; ++index) {
-        YT_VERIFY(info.Columns[index].SortOrder());
-        sortOrders[index] = *info.Columns[index].SortOrder();
+    std::vector<ESortOrder> sortOrders;
+    if (ColumnInfo_) {
+        const auto& info = *ColumnInfo_;
+        sortOrders.resize(KeyColumnCount_);
+        for (int index = 0; index < KeyColumnCount_; ++index) {
+            YT_VERIFY(info.Columns[index].SortOrder());
+            sortOrders[index] = *info.Columns[index].SortOrder();
+        }
     }
-    return TComparator(std::move(sortOrders));
+
+    return TComparator(std::move(sortOrders), std::move(CGComparator));
 }
 
 void TTableSchema::Save(TStreamSaveContext& context) const
diff --git a/yt/yt/client/table_client/schema.h b/yt/yt/client/table_client/schema.h
index c425f244a2..8ece5019e9 100644
--- a/yt/yt/client/table_client/schema.h
+++ b/yt/yt/client/table_client/schema.h
@@ -286,6 +286,7 @@ public:
     bool IsUniqueKeys() const;
     bool HasRenamedColumns() const;
     bool IsEmpty() const;
+    bool IsCGCompatarorApplicable() const;
 
     std::optional<int> GetTtlColumnIndex() const;
 
@@ -380,7 +381,7 @@ public:
 
     TTableSchemaPtr ToModifiedSchema(ETableSchemaModification schemaModification) const;
 
-    TComparator ToComparator() const;
+    TComparator ToComparator(TCallback<TUUComparerSignature> CGComparator = {}) const;
 
     TKeyColumnTypes GetKeyColumnTypes() const;
 
-- 
cgit v1.2.3


From 3fddd05c708d5078858c4da1716e6cc28ef3815a Mon Sep 17 00:00:00 2001
From: robot-piglet <robot-piglet@yandex-team.com>
Date: Sat, 13 Apr 2024 14:03:20 +0300
Subject: Intermediate changes

---
 contrib/python/requests-mock/py3/.dist-info/METADATA | 3 ++-
 contrib/python/requests-mock/py3/ya.make             | 2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/contrib/python/requests-mock/py3/.dist-info/METADATA b/contrib/python/requests-mock/py3/.dist-info/METADATA
index 6ce8ea41a6..1140c6ced2 100644
--- a/contrib/python/requests-mock/py3/.dist-info/METADATA
+++ b/contrib/python/requests-mock/py3/.dist-info/METADATA
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: requests-mock
-Version: 1.12.0
+Version: 1.12.1
 Summary: Mock out responses from the requests package
 Home-page: https://requests-mock.readthedocs.io/
 Author: Jamie Lennox
@@ -22,6 +22,7 @@ Classifier: Programming Language :: Python :: 3.12
 Classifier: Programming Language :: Python :: Implementation :: CPython
 Classifier: Programming Language :: Python :: Implementation :: PyPy
 Classifier: Topic :: Software Development :: Testing
+Requires-Python: >=3.5
 License-File: LICENSE
 Requires-Dist: requests <3,>=2.22
 Provides-Extra: fixture
diff --git a/contrib/python/requests-mock/py3/ya.make b/contrib/python/requests-mock/py3/ya.make
index d54c1b3e5a..a8452fa562 100644
--- a/contrib/python/requests-mock/py3/ya.make
+++ b/contrib/python/requests-mock/py3/ya.make
@@ -2,7 +2,7 @@
 
 PY3_LIBRARY()
 
-VERSION(1.12.0)
+VERSION(1.12.1)
 
 LICENSE(Apache-2.0)
 
-- 
cgit v1.2.3


From 6314a988276bdaf1916a5013d309448aa31c7598 Mon Sep 17 00:00:00 2001
From: robot-ratatosk <robot-ratatosk@yandex-team.com>
Date: Sat, 13 Apr 2024 14:03:34 +0300
Subject: New version of the tld SKIP_CHECK SKIP_REVIEW
 2a8ad5153e705d400848986ee41961e9727ba64a

---
 library/cpp/tld/tlds-alpha-by-domain.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/library/cpp/tld/tlds-alpha-by-domain.txt b/library/cpp/tld/tlds-alpha-by-domain.txt
index 5eb9f78826..7fb11b28f4 100644
--- a/library/cpp/tld/tlds-alpha-by-domain.txt
+++ b/library/cpp/tld/tlds-alpha-by-domain.txt
@@ -1,4 +1,4 @@
-# Version 2024041000, Last Updated Wed Apr 10 07:07:02 2024 UTC
+# Version 2024041300, Last Updated Sat Apr 13 07:07:01 2024 UTC
 AAA
 AARP
 ABB
-- 
cgit v1.2.3


From da6de0aefb4620d2a3515de3f478b5a0925d55ef Mon Sep 17 00:00:00 2001
From: shadchin <shadchin@yandex-team.com>
Date: Sat, 13 Apr 2024 18:01:38 +0300
Subject: Simplify support `importlib.metadata`
 996025a2ee725b626c3b77aac016d8f8c0ac4e76

---
 library/python/runtime_py3/importer.pxi      | 13 +++++++++++++
 library/python/runtime_py3/sitecustomize.pyx | 14 +++-----------
 2 files changed, 16 insertions(+), 11 deletions(-)

diff --git a/library/python/runtime_py3/importer.pxi b/library/python/runtime_py3/importer.pxi
index 493c17204d..bd65921840 100644
--- a/library/python/runtime_py3/importer.pxi
+++ b/library/python/runtime_py3/importer.pxi
@@ -408,6 +408,19 @@ class ResourceImporter:
         path = os.path.dirname(self.get_filename(fullname))
         return _ResfsResourceReader(self, path)
 
+    @staticmethod
+    def find_distributions(*args, **kwargs):
+        """
+        Find distributions.
+
+        Return an iterable of all Distribution instances capable of
+        loading the metadata for packages matching ``context.name``
+        (or all names if ``None`` indicated) along the paths in the list
+        of directories ``context.path``.
+        """
+        from sitecustomize import MetadataArcadiaFinder
+        return MetadataArcadiaFinder.find_distributions(*args, **kwargs)
+
 
 class _ResfsResourceReader:
 
diff --git a/library/python/runtime_py3/sitecustomize.pyx b/library/python/runtime_py3/sitecustomize.pyx
index 46ca0f986e..7a73f3241b 100644
--- a/library/python/runtime_py3/sitecustomize.pyx
+++ b/library/python/runtime_py3/sitecustomize.pyx
@@ -8,7 +8,6 @@ import warnings
 from importlib.metadata import (
     Distribution,
     DistributionFinder,
-    PackageNotFoundError,
     Prepared,
 )
 from importlib.resources.abc import Traversable
@@ -129,7 +128,7 @@ class ArcadiaDistribution(Distribution):
         return self._path.parent / path
 
 
-class ArcadiaMetadataFinder(DistributionFinder):
+class MetadataArcadiaFinder(DistributionFinder):
     prefixes = {}
 
     @classmethod
@@ -148,8 +147,7 @@ class ArcadiaMetadataFinder(DistributionFinder):
             data = __res.resfs_read(resource).decode("utf-8")
             metadata_name = METADATA_NAME.search(data)
             if metadata_name:
-                metadata_name = Prepared(metadata_name.group(1))
-                cls.prefixes[metadata_name.normalized] = resource[: -len("METADATA")]
+                cls.prefixes[Prepared(metadata_name.group(1)).normalized] = resource.removesuffix("METADATA")
 
     @classmethod
     def _search_prefixes(cls, name):
@@ -160,12 +158,6 @@ class ArcadiaMetadataFinder(DistributionFinder):
             try:
                 yield cls.prefixes[Prepared(name).normalized]
             except KeyError:
-                raise PackageNotFoundError(name)
+                pass
         else:
             yield from sorted(cls.prefixes.values())
-
-
-# monkeypatch standart library
-import importlib.metadata
-
-importlib.metadata.MetadataPathFinder = ArcadiaMetadataFinder
-- 
cgit v1.2.3


From 51e5eb32e4344ee9c710455de559b5bbfd95c35d Mon Sep 17 00:00:00 2001
From: robot-piglet <robot-piglet@yandex-team.com>
Date: Sun, 14 Apr 2024 13:33:45 +0300
Subject: Intermediate changes

---
 .../py3/importlib_metadata/__init__.py             | 40 ++++++++++------------
 contrib/python/importlib-metadata/py3/ya.make      |  4 ---
 2 files changed, 18 insertions(+), 26 deletions(-)

diff --git a/contrib/python/importlib-metadata/py3/importlib_metadata/__init__.py b/contrib/python/importlib-metadata/py3/importlib_metadata/__init__.py
index 0ed3e8dfb5..b512d89d6e 100644
--- a/contrib/python/importlib-metadata/py3/importlib_metadata/__init__.py
+++ b/contrib/python/importlib-metadata/py3/importlib_metadata/__init__.py
@@ -50,7 +50,7 @@ __all__ = [
 ]
 
 try:
-    import library.python.resource
+    import __res as res
     ARCADIA = True
 except ImportError:
     ARCADIA = False
@@ -966,24 +966,24 @@ class PathDistribution(Distribution):
 
 
 class ArcadiaDistribution(Distribution):
-
     def __init__(self, prefix):
-        self.prefix = prefix
+        self._prefix = prefix
+        self._path = pathlib.Path(prefix)
 
     def read_text(self, filename):
-        from library.python.resource import resfs_read
-        data = resfs_read('{}{}'.format(self.prefix, filename))
-        if data:
-            return data.decode('utf-8')
+        data = res.resfs_read(f"{self._prefix}{filename}")
+        if data is not None:
+            return data.decode("utf-8")
+
     read_text.__doc__ = Distribution.read_text.__doc__
 
     def locate_file(self, path):
-        return '{}{}'.format(self.prefix, path)
+        return self._path.parent / path
 
 
 @install(ARCADIA == True)
-class ArcadiaMetadataFinder(NullFinder, DistributionFinder):
-
+class MetadataArcadiaFinder(DistributionFinder):
+    METADATA_NAME = re.compile("^Name: (.*)$", re.MULTILINE)
     prefixes = {}
 
     @classmethod
@@ -993,19 +993,16 @@ class ArcadiaMetadataFinder(NullFinder, DistributionFinder):
 
     @classmethod
     def _init_prefixes(cls):
-        from library.python.resource import resfs_read, resfs_files
         cls.prefixes.clear()
 
-        METADATA_NAME = re.compile('^Name: (.*)$', re.MULTILINE)
-
-        for resource in resfs_files():
-            if not resource.endswith('METADATA'):
+        for resource in res.resfs_files():
+            resource = resource.decode("utf-8")
+            if not resource.endswith("METADATA"):
                 continue
-            data = resfs_read(resource).decode('utf-8')
-            metadata_name = METADATA_NAME.search(data)
+            data = res.resfs_read(resource).decode("utf-8")
+            metadata_name = cls.METADATA_NAME.search(data)
             if metadata_name:
-                metadata_name = Prepared(metadata_name.group(1))
-                cls.prefixes[metadata_name.normalized] = resource[:-len('METADATA')]
+                cls.prefixes[Prepared(metadata_name.group(1)).normalized] = resource.removesuffix("METADATA")
 
     @classmethod
     def _search_prefixes(cls, name):
@@ -1016,10 +1013,9 @@ class ArcadiaMetadataFinder(NullFinder, DistributionFinder):
             try:
                 yield cls.prefixes[Prepared(name).normalized]
             except KeyError:
-                raise PackageNotFoundError(name)
+                pass
         else:
-            for prefix in sorted(cls.prefixes.values()):
-                yield prefix
+            yield from sorted(cls.prefixes.values())
 
 
 def distribution(distribution_name: str) -> Distribution:
diff --git a/contrib/python/importlib-metadata/py3/ya.make b/contrib/python/importlib-metadata/py3/ya.make
index 00d69e1c37..ecdc5d99ec 100644
--- a/contrib/python/importlib-metadata/py3/ya.make
+++ b/contrib/python/importlib-metadata/py3/ya.make
@@ -6,10 +6,6 @@ VERSION(7.1.0)
 
 LICENSE(Apache-2.0)
 
-PEERDIR(
-    library/python/resource
-)
-
 NO_LINT()
 
 PY_SRCS(
-- 
cgit v1.2.3


From 89f2322ff646da7f9719ae9f7145368da9ee79d4 Mon Sep 17 00:00:00 2001
From: robot-brewer <robot-brewer@yandex-team.com>
Date: Sun, 14 Apr 2024 13:35:49 +0300
Subject: Release gdb14 #8

https://github.com/yandex/toolchain-registry/releases/tag/gdb14-v8
96908d69ac44690643b10e6c59c5c5ec017c9748
---
 build/external_resources/gdb/resources.json | 4 ++--
 build/mapping.conf.json                     | 4 ++++
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/build/external_resources/gdb/resources.json b/build/external_resources/gdb/resources.json
index 2ac3f573e2..aa1d733087 100644
--- a/build/external_resources/gdb/resources.json
+++ b/build/external_resources/gdb/resources.json
@@ -7,10 +7,10 @@
             "uri": "sbr:3833498694"
         },
         "linux-aarch64": {
-            "uri": "sbr:6133337898"
+            "uri": "sbr:6164166258"
         },
         "linux-x86_64": {
-            "uri": "sbr:6133419349"
+            "uri": "sbr:6164128408"
         }
     },
     "match": "GDB",
diff --git a/build/mapping.conf.json b/build/mapping.conf.json
index f05698374f..9e0838bf14 100644
--- a/build/mapping.conf.json
+++ b/build/mapping.conf.json
@@ -339,7 +339,9 @@
         "4307901240": "https://devtools-registry.s3.yandex.net/4307901240",
         "5517239368": "https://devtools-registry.s3.yandex.net/5517239368",
         "3833498694": "https://devtools-registry.s3.yandex.net/3833498694",
+        "6164166258": "https://devtools-registry.s3.yandex.net/6164166258",
         "6133337898": "https://devtools-registry.s3.yandex.net/6133337898",
+        "6164128408": "https://devtools-registry.s3.yandex.net/6164128408",
         "6133419349": "https://devtools-registry.s3.yandex.net/6133419349",
         "1277521710": "https://devtools-registry.s3.yandex.net/1277521710",
         "5776380974": "https://devtools-registry.s3.yandex.net/5776380974",
@@ -782,7 +784,9 @@
         "4307901240": "flake8_linter for linux-aarch64",
         "5517239368": "flake8_linter for linux-aarch64",
         "3833498694": "gdb 11.2 for osx_10.15_catalina",
+        "6164166258": "gdb-14-linux-aarch64-2f60b923acb68d45b101313954b70779c13a19b8",
         "6133337898": "gdb-14-linux-aarch64-b1fa9be28bbf4ee845d6a39a049c7b60018a3695",
+        "6164128408": "gdb-14-linux-x86_64-2f60b923acb68d45b101313954b70779c13a19b8",
         "6133419349": "gdb-14-linux-x86_64-b1fa9be28bbf4ee845d6a39a049c7b60018a3695",
         "1277521710": "infra/kernel/tools/atop/build/atop-static.tar.gz",
         "5776380974": "none-none-none-result_resources/jdk-darwin-aarch64.yandex.tgz",
-- 
cgit v1.2.3


From e646c0d6f331d5baf752fa3dd60e2cde92ffc966 Mon Sep 17 00:00:00 2001
From: swarmer <swarmer@yandex-team.com>
Date: Sun, 14 Apr 2024 14:26:05 +0300
Subject: reduce code bloat in the DecodeOpenMode function

The loop version works as fast as unrolled one. But the binary code size is about 7 times smaller.
9c014c6ba2ab744670f9ac2fe3bf57942e01b0a1
---
 util/system/file.cpp | 100 ++++++++++++++++++++++++++++-----------------------
 1 file changed, 56 insertions(+), 44 deletions(-)

diff --git a/util/system/file.cpp b/util/system/file.cpp
index 349e2a667e..d9acde845d 100644
--- a/util/system/file.cpp
+++ b/util/system/file.cpp
@@ -832,52 +832,64 @@ TString DecodeOpenMode(ui32 mode0) {
 
     TStringBuilder r;
 
-#define F(flag)                   \
-    if ((mode & flag) == flag) {  \
-        mode &= ~flag;            \
-        if (r) {                  \
-            r << TStringBuf("|"); \
-        }                         \
-        r << TStringBuf(#flag);   \
-    }
-
-    F(RdWr)
-    F(RdOnly)
-    F(WrOnly)
-
-    F(CreateAlways)
-    F(CreateNew)
-    F(OpenAlways)
-    F(TruncExisting)
-    F(ForAppend)
-    F(Transient)
-    F(CloseOnExec)
-
-    F(Temp)
-    F(Sync)
-    F(Direct)
-    F(DirectAligned)
-    F(Seq)
-    F(NoReuse)
-    F(NoReadAhead)
-
-    F(AX)
-    F(AR)
-    F(AW)
-    F(ARW)
-
-    F(AXOther)
-    F(AWOther)
-    F(AROther)
-    F(AXGroup)
-    F(AWGroup)
-    F(ARGroup)
-    F(AXUser)
-    F(AWUser)
-    F(ARUser)
+    struct TFlagCombo {
+        ui32 Value;
+        TStringBuf Name;
+    };
+
+    static constexpr TFlagCombo knownFlagCombos[]{
+
+#define F(flag) {flag, #flag}
+
+        F(RdWr),
+        F(RdOnly),
+        F(WrOnly),
+
+        F(CreateAlways),
+        F(CreateNew),
+        F(OpenAlways),
+        F(TruncExisting),
+        F(ForAppend),
+        F(Transient),
+        F(CloseOnExec),
+
+        F(Temp),
+        F(Sync),
+        F(Direct),
+        F(DirectAligned),
+        F(Seq),
+        F(NoReuse),
+        F(NoReadAhead),
+
+        F(AX),
+        F(AR),
+        F(AW),
+        F(ARW),
+
+        F(AXOther),
+        F(AWOther),
+        F(AROther),
+        F(AXGroup),
+        F(AWGroup),
+        F(ARGroup),
+        F(AXUser),
+        F(AWUser),
+        F(ARUser),
 
 #undef F
 
+    };
+
+    for (const auto& [flag, name] : knownFlagCombos) {
+        if ((mode & flag) == flag) {
+            mode &= ~flag;
+            if (r) {
+                r << '|';
+            }
+            r << name;
+        }
+    }
+
     if (mode != 0) {
         if (r) {
             r << TStringBuf("|");
@@ -890,7 +902,7 @@ TString DecodeOpenMode(ui32 mode0) {
         return "0";
     }
 
-    return r;
+    return std::move(r);
 }
 
 class TFile::TImpl: public TAtomicRefCount<TImpl> {
-- 
cgit v1.2.3


From 93702c900844c92c3d8daef5a75ac89eb32157ab Mon Sep 17 00:00:00 2001
From: tema-m <tema-m@yandex-team.com>
Date: Sun, 14 Apr 2024 14:26:46 +0300
Subject: refactor in vector

some refactor in vector
2c11be2b50c10b1786950201317ef103cff8c79a
---
 util/generic/vector.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/util/generic/vector.h b/util/generic/vector.h
index 1723961e53..cbb50951a5 100644
--- a/util/generic/vector.h
+++ b/util/generic/vector.h
@@ -77,7 +77,7 @@ public:
     }
 
     inline TVector(TSelf&& src) noexcept
-        : TBase(std::forward<TSelf>(src))
+        : TBase(std::move(src))
     {
     }
 
@@ -93,7 +93,7 @@ public:
     }
 
     inline TSelf& operator=(TSelf&& src) noexcept {
-        TBase::operator=(std::forward<TSelf>(src));
+        TBase::operator=(std::move(src));
         return *this;
     }
 
@@ -111,7 +111,7 @@ public:
     }
 
     inline yssize_t ysize() const noexcept {
-        return (yssize_t)TBase::size();
+        return static_cast<yssize_t>(TBase::size());
     }
 
 #if defined(_YNDX_LIBCXX_ENABLE_VECTOR_POD_RESIZE_UNINITIALIZED) && !defined(__CUDACC__)
-- 
cgit v1.2.3


From 4b72cdcffc13ee30879636f719934b6f95285c90 Mon Sep 17 00:00:00 2001
From: ilnurkh <ilnurkh@yandex-team.com>
Date: Sun, 14 Apr 2024 18:25:13 +0300
Subject: [[nodiscard]]  for static function TDuration::Parse
 4475987f399172bada73db028180b5e773e58a30

---
 util/datetime/base.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/util/datetime/base.h b/util/datetime/base.h
index c43b9775d0..a0fc71bab4 100644
--- a/util/datetime/base.h
+++ b/util/datetime/base.h
@@ -308,7 +308,7 @@ public:
     }
 
     /// parses strings like 10s, 15ms, 15.05s, 20us, or just 25 (s). See parser_ut.cpp for details
-    static TDuration Parse(const TStringBuf input);
+    [[nodiscard]] static TDuration Parse(const TStringBuf input);
 
     static bool TryParse(const TStringBuf input, TDuration& result);
 
-- 
cgit v1.2.3


From bffcd51478a9aeba25357eaa4169e63f29b33dc8 Mon Sep 17 00:00:00 2001
From: osidorkin <osidorkin@yandex-team.com>
Date: Sun, 14 Apr 2024 20:34:26 +0300
Subject: Trivial: use FromProto e0daa6cd21ba43e5424a234a4a739471157b4823

---
 yt/yt/client/transaction_client/remote_timestamp_provider.cpp | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/yt/yt/client/transaction_client/remote_timestamp_provider.cpp b/yt/yt/client/transaction_client/remote_timestamp_provider.cpp
index c45478975f..576029efe5 100644
--- a/yt/yt/client/transaction_client/remote_timestamp_provider.cpp
+++ b/yt/yt/client/transaction_client/remote_timestamp_provider.cpp
@@ -92,6 +92,7 @@ private:
             auto responseClockClusterTag = rsp->has_clock_cluster_tag()
                 ? FromProto<TCellTag>(rsp->clock_cluster_tag())
                 : InvalidCellTag;
+            auto responseTimestamp = FromProto<TTimestamp>(rsp->timestamp());
 
             if (clockClusterTag != InvalidCellTag && responseClockClusterTag != InvalidCellTag &&
                 clockClusterTag != responseClockClusterTag)
@@ -101,8 +102,8 @@ private:
                     << TErrorAttribute("response_clock_cluster_tag", responseClockClusterTag);
             }
 
-                return static_cast<TTimestamp>(rsp->timestamp());
-            }));
+            return responseTimestamp;
+        }));
     }
 };
 
-- 
cgit v1.2.3


From a7654daa3d423e4329a620082ff6fe8c02cec726 Mon Sep 17 00:00:00 2001
From: osidorkin <osidorkin@yandex-team.com>
Date: Sun, 14 Apr 2024 23:46:06 +0300
Subject: YT-20971: Move clock error codes to better namespace
 7de5c2c09cc0ddb55f5dad646f7b0936f71989e3

---
 yt/yt/client/transaction_client/public.h                      | 2 ++
 yt/yt/client/transaction_client/remote_timestamp_provider.cpp | 2 +-
 yt/yt/core/rpc/public.h                                       | 2 --
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/yt/yt/client/transaction_client/public.h b/yt/yt/client/transaction_client/public.h
index 6920bbd19c..fd3f41b370 100644
--- a/yt/yt/client/transaction_client/public.h
+++ b/yt/yt/client/transaction_client/public.h
@@ -46,6 +46,8 @@ YT_DEFINE_ERROR_ENUM(
     ((ForeignPrerequisiteTransaction)   (11011))
     ((IncompletePrepareSignature)       (11012))
     ((TransactionSuccessorHasLeases)    (11013))
+    ((UnknownClockClusterTag)           (11014))
+    ((ClockClusterTagMismatch)          (11015))
 );
 
 ////////////////////////////////////////////////////////////////////////////////
diff --git a/yt/yt/client/transaction_client/remote_timestamp_provider.cpp b/yt/yt/client/transaction_client/remote_timestamp_provider.cpp
index 576029efe5..39ac63f605 100644
--- a/yt/yt/client/transaction_client/remote_timestamp_provider.cpp
+++ b/yt/yt/client/transaction_client/remote_timestamp_provider.cpp
@@ -97,7 +97,7 @@ private:
             if (clockClusterTag != InvalidCellTag && responseClockClusterTag != InvalidCellTag &&
                 clockClusterTag != responseClockClusterTag)
             {
-                THROW_ERROR_EXCEPTION(NRpc::EErrorCode::ClockClusterTagMismatch, "Clock cluster tag mismatch")
+                THROW_ERROR_EXCEPTION(EErrorCode::ClockClusterTagMismatch, "Clock cluster tag mismatch")
                     << TErrorAttribute("request_clock_cluster_tag", clockClusterTag)
                     << TErrorAttribute("response_clock_cluster_tag", responseClockClusterTag);
             }
diff --git a/yt/yt/core/rpc/public.h b/yt/yt/core/rpc/public.h
index db8dff99fb..759f741bd8 100644
--- a/yt/yt/core/rpc/public.h
+++ b/yt/yt/core/rpc/public.h
@@ -185,8 +185,6 @@ YT_DEFINE_ERROR_ENUM(
     ((SslError)                     (static_cast<int>(NBus::EErrorCode::SslError)))
     ((MemoryOverflow)               (120))
     ((GlobalDiscoveryError)         (121)) // Single peer discovery interrupts discovery session.
-    ((UnknownClockClusterTag)       (122))
-    ((ClockClusterTagMismatch)      (123))
 );
 
 DEFINE_ENUM(EMessageFormat,
-- 
cgit v1.2.3


From d76026294d19bef7cf008a495792b027f5485e58 Mon Sep 17 00:00:00 2001
From: robot-piglet <robot-piglet@yandex-team.com>
Date: Mon, 15 Apr 2024 08:08:27 +0300
Subject: Intermediate changes

---
 contrib/python/hypothesis/py3/.dist-info/METADATA  |    6 +-
 .../hypothesis/py3/hypothesis/extra/numpy.py       |    6 +-
 .../py3/hypothesis/vendor/tlds-alpha-by-domain.txt |    3 +-
 .../python/hypothesis/py3/hypothesis/version.py    |    2 +-
 contrib/python/hypothesis/py3/ya.make              |    2 +-
 contrib/python/pg8000/.dist-info/METADATA          | 1527 ++++++++++----
 contrib/python/pg8000/README.md                    | 2214 ++++++++++++++++++++
 contrib/python/pg8000/README.rst                   | 1407 -------------
 contrib/python/pg8000/pg8000/core.py               |   48 +-
 contrib/python/pg8000/ya.make                      |    2 +-
 10 files changed, 3421 insertions(+), 1796 deletions(-)
 create mode 100644 contrib/python/pg8000/README.md
 delete mode 100644 contrib/python/pg8000/README.rst

diff --git a/contrib/python/hypothesis/py3/.dist-info/METADATA b/contrib/python/hypothesis/py3/.dist-info/METADATA
index 59c5ae6875..a4cff64dd9 100644
--- a/contrib/python/hypothesis/py3/.dist-info/METADATA
+++ b/contrib/python/hypothesis/py3/.dist-info/METADATA
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: hypothesis
-Version: 6.99.13
+Version: 6.100.0
 Summary: A library for property-based testing
 Home-page: https://hypothesis.works
 Author: David R. MacIver and Zac Hatfield-Dodds
@@ -41,7 +41,7 @@ Requires-Dist: exceptiongroup >=1.0.0 ; python_version < "3.11"
 Provides-Extra: all
 Requires-Dist: black >=19.10b0 ; extra == 'all'
 Requires-Dist: click >=7.0 ; extra == 'all'
-Requires-Dist: crosshair-tool >=0.0.53 ; extra == 'all'
+Requires-Dist: crosshair-tool >=0.0.54 ; extra == 'all'
 Requires-Dist: django >=3.2 ; extra == 'all'
 Requires-Dist: dpcontracts >=0.4 ; extra == 'all'
 Requires-Dist: hypothesis-crosshair >=0.0.2 ; extra == 'all'
@@ -64,7 +64,7 @@ Provides-Extra: codemods
 Requires-Dist: libcst >=0.3.16 ; extra == 'codemods'
 Provides-Extra: crosshair
 Requires-Dist: hypothesis-crosshair >=0.0.2 ; extra == 'crosshair'
-Requires-Dist: crosshair-tool >=0.0.53 ; extra == 'crosshair'
+Requires-Dist: crosshair-tool >=0.0.54 ; extra == 'crosshair'
 Provides-Extra: dateutil
 Requires-Dist: python-dateutil >=1.4 ; extra == 'dateutil'
 Provides-Extra: django
diff --git a/contrib/python/hypothesis/py3/hypothesis/extra/numpy.py b/contrib/python/hypothesis/py3/hypothesis/extra/numpy.py
index 90ecb400b4..9edca6ee00 100644
--- a/contrib/python/hypothesis/py3/hypothesis/extra/numpy.py
+++ b/contrib/python/hypothesis/py3/hypothesis/extra/numpy.py
@@ -219,7 +219,11 @@ def from_dtype(
             # it here because we'd have to guard against equivalents in arrays()
             # regardless and drawing scalars is a valid use-case.
             res = st.sampled_from(TIME_RESOLUTIONS)
-        result = st.builds(dtype.type, st.integers(-(2**63), 2**63 - 1), res)
+        if allow_nan is not False:
+            elems = st.integers(-(2**63), 2**63 - 1) | st.just("NaT")
+        else:  # NEP-7 defines the NaT value as integer -(2**63)
+            elems = st.integers(-(2**63) + 1, 2**63 - 1)
+        result = st.builds(dtype.type, elems, res)
     else:
         raise InvalidArgument(f"No strategy inference for {dtype}")
     return result.map(dtype.type)
diff --git a/contrib/python/hypothesis/py3/hypothesis/vendor/tlds-alpha-by-domain.txt b/contrib/python/hypothesis/py3/hypothesis/vendor/tlds-alpha-by-domain.txt
index 7b2f84dfad..08ad35057e 100644
--- a/contrib/python/hypothesis/py3/hypothesis/vendor/tlds-alpha-by-domain.txt
+++ b/contrib/python/hypothesis/py3/hypothesis/vendor/tlds-alpha-by-domain.txt
@@ -1,4 +1,4 @@
-# Version 2024031000, Last Updated Sun Mar 10 07:07:01 2024 UTC
+# Version 2024033000, Last Updated Sat Mar 30 07:07:01 2024 UTC
 AAA
 AARP
 ABB
@@ -85,7 +85,6 @@ AUSPOST
 AUTHOR
 AUTO
 AUTOS
-AVIANCA
 AW
 AWS
 AX
diff --git a/contrib/python/hypothesis/py3/hypothesis/version.py b/contrib/python/hypothesis/py3/hypothesis/version.py
index 27443504c2..158a440f0a 100644
--- a/contrib/python/hypothesis/py3/hypothesis/version.py
+++ b/contrib/python/hypothesis/py3/hypothesis/version.py
@@ -8,5 +8,5 @@
 # v. 2.0. If a copy of the MPL was not distributed with this file, You can
 # obtain one at https://mozilla.org/MPL/2.0/.
 
-__version_info__ = (6, 99, 13)
+__version_info__ = (6, 100, 0)
 __version__ = ".".join(map(str, __version_info__))
diff --git a/contrib/python/hypothesis/py3/ya.make b/contrib/python/hypothesis/py3/ya.make
index dbfb51e4f1..986fc7ae78 100644
--- a/contrib/python/hypothesis/py3/ya.make
+++ b/contrib/python/hypothesis/py3/ya.make
@@ -2,7 +2,7 @@
 
 PY3_LIBRARY()
 
-VERSION(6.99.13)
+VERSION(6.100.0)
 
 LICENSE(MPL-2.0)
 
diff --git a/contrib/python/pg8000/.dist-info/METADATA b/contrib/python/pg8000/.dist-info/METADATA
index 291f74df6f..54299a8c78 100644
--- a/contrib/python/pg8000/.dist-info/METADATA
+++ b/contrib/python/pg8000/.dist-info/METADATA
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: pg8000
-Version: 1.30.5
+Version: 1.31.0
 Summary: PostgreSQL interface library
 License: BSD 3-Clause License
 Project-URL: Homepage, https://github.com/tlocke/pg8000
@@ -21,60 +21,43 @@ Classifier: Operating System :: OS Independent
 Classifier: Topic :: Database :: Front-Ends
 Classifier: Topic :: Software Development :: Libraries :: Python Modules
 Requires-Python: >=3.8
-Description-Content-Type: text/x-rst
+Description-Content-Type: text/markdown
 License-File: LICENSE
 Requires-Dist: scramp >=1.4.4
 Requires-Dist: python-dateutil >=2.8.2
 
-======
-pg8000
-======
+# pg8000
 
-.. |ssl.SSLContext| replace:: ``ssl.SSLContext``
-.. _ssl.SSLContext: https://docs.python.org/3/library/ssl.html#ssl.SSLContext
-
-.. |ssl.create_default_context()| replace:: ``ssl.create_default_context()``
-.. _ssl.create_default_context(): https://docs.python.org/3/library/ssl.html#ssl.create_default_context
-
-pg8000 is a pure-`Python <https://www.python.org/>`_
-`PostgreSQL <http://www.postgresql.org/>`_ driver that complies with
-`DB-API 2.0 <http://www.python.org/dev/peps/pep-0249/>`_. It is tested on Python
-versions 3.8+, on CPython and PyPy, and PostgreSQL versions 12+. pg8000's name comes
-from the belief that it is probably about the 8000th PostgreSQL interface for Python.
-pg8000 is distributed under the BSD 3-clause license.
+pg8000 is a pure-[Python](https://www.python.org/)
+[PostgreSQL](http://www.postgresql.org/) driver that complies with
+[DB-API 2.0](http://www.python.org/dev/peps/pep-0249/). It is tested on Python versions
+3.8+, on CPython and PyPy, and PostgreSQL versions 12+. pg8000's name comes from the
+belief that it is probably about the 8000th PostgreSQL interface for Python. pg8000 is
+distributed under the BSD 3-clause license.
 
 All bug reports, feature requests and contributions are welcome at
-`http://github.com/tlocke/pg8000/ <http://github.com/tlocke/pg8000/>`_.
-
-.. image:: https://github.com/tlocke/pg8000/workflows/pg8000/badge.svg
-   :alt: Build Status
-
-.. contents:: Table of Contents
-   :depth: 2
-   :local:
+[http://github.com/tlocke/pg8000/](http://github.com/tlocke/pg8000/).
 
-Installation
-------------
+[![Workflow Status Badge](https://github.com/tlocke/pg8000/workflows/pg8000/badge.svg)](https://github.com/tlocke/pg8000/actions)
 
-To install pg8000 using `pip` type:
+## Installation
 
-`pip install pg8000`
+To install pg8000 using `pip` type: `pip install pg8000`
 
 
-Native API Interactive Examples
--------------------------------
+## Native API Interactive Examples
 
 pg8000 comes with two APIs, the native pg8000 API and the DB-API 2.0 standard
 API. These are the examples for the native API, and the DB-API 2.0 examples
 follow in the next section.
 
 
-Basic Example
-`````````````
+### Basic Example
 
 Import pg8000, connect to the database, create a table, add some rows and then
 query the table:
 
+```python
 >>> import pg8000.native
 >>>
 >>> # Connect to the database with user name postgres
@@ -99,13 +82,15 @@ query the table:
 >>>
 >>> con.close()
 
+```
 
-Transactions
-````````````
+
+### Transactions
 
 Here's how to run groups of SQL statements in a
-`transaction <https://www.postgresql.org/docs/current/tutorial-transactions.html>`_:
+[transaction](https://www.postgresql.org/docs/current/tutorial-transactions.html>):
 
+```python
 >>> import pg8000.native
 >>>
 >>> con = pg8000.native.Connection("postgres", password="cpsnow")
@@ -126,8 +111,11 @@ Here's how to run groups of SQL statements in a
 >>>
 >>> con.close()
 
+```
+
 rolling back a transaction:
 
+```python
 >>> import pg8000.native
 >>>
 >>> con = pg8000.native.Connection("postgres", password="cpsnow")
@@ -149,18 +137,19 @@ rolling back a transaction:
 >>>
 >>> con.close()
 
-NB. There is `a longstanding bug <https://github.com/tlocke/pg8000/issues/36>`_
-in the PostgreSQL server whereby if a `COMMIT` is issued against a failed
-transaction, the transaction is silently rolled back, rather than an error being
-returned. pg8000 attempts to detect when this has happened and raise an
-`InterfaceError`.
+```
+
+NB. There is [a longstanding bug](https://github.com/tlocke/pg8000/issues/36>) in the
+PostgreSQL server whereby if a `COMMIT` is issued against a failed transaction, the
+transaction is silently rolled back, rather than an error being returned. pg8000
+attempts to detect when this has happened and raise an `InterfaceError`.
 
 
-Query Using Functions
-`````````````````````
+### Query Using Functions
 
 Another query, using some PostgreSQL functions:
 
+```python
 >>> import pg8000.native
 >>>
 >>> con = pg8000.native.Connection("postgres", password="cpsnow")
@@ -170,12 +159,14 @@ Another query, using some PostgreSQL functions:
 >>>
 >>> con.close()
 
+```
 
-Interval Type
-`````````````
+
+### Interval Type
 
 A query that returns the PostgreSQL interval type:
 
+```python
 >>> import pg8000.native
 >>>
 >>> con = pg8000.native.Connection("postgres", password="cpsnow")
@@ -188,14 +179,16 @@ A query that returns the PostgreSQL interval type:
 >>>
 >>> con.close()
 
+```
+
 
-Point Type
-``````````
+### Point Type
 
 A round-trip with a
-`PostgreSQL point <https://www.postgresql.org/docs/current/datatype-geometric.html>`_
+[PostgreSQL point](https://www.postgresql.org/docs/current/datatype-geometric.html)
 type:
 
+```python
 >>> import pg8000.native
 >>>
 >>> con = pg8000.native.Connection("postgres", password="cpsnow")
@@ -205,16 +198,18 @@ type:
 >>>
 >>> con.close()
 
+```
 
-Client Encoding
-```````````````
+
+### Client Encoding
 
 When communicating with the server, pg8000 uses the character set that the server asks
 it to use (the client encoding). By default the client encoding is the database's
 character set (chosen when the database is created), but the client encoding can be
-changed in a number of ways (eg. setting ``CLIENT_ENCODING`` in ``postgresql.conf``).
+changed in a number of ways (eg. setting `CLIENT_ENCODING` in `postgresql.conf`).
 Another way of changing the client encoding is by using an SQL command. For example:
 
+```python
 >>> import pg8000.native
 >>>
 >>> con = pg8000.native.Connection("postgres", password="cpsnow")
@@ -225,14 +220,15 @@ Another way of changing the client encoding is by using an SQL command. For exam
 >>>
 >>> con.close()
 
+```
 
-JSON
-````
+### JSON
 
-`JSON <https://www.postgresql.org/docs/current/datatype-json.html>`_ always comes back
+[JSON](https://www.postgresql.org/docs/current/datatype-json.html) always comes back
 from the server de-serialized. If the JSON you want to send is a ``dict`` then you can
 just do:
 
+```python
 >>> import pg8000.native
 >>>
 >>> con = pg8000.native.Connection("postgres", password="cpsnow")
@@ -243,8 +239,11 @@ just do:
 >>>
 >>> con.close()
 
+```
+
 JSON can always be sent in serialized form to the server:
 
+```python
 >>> import json
 >>> import pg8000.native
 >>>
@@ -257,20 +256,25 @@ JSON can always be sent in serialized form to the server:
 >>>
 >>> con.close()
 
+```
+
 JSON queries can be have parameters:
 
+```python
 >>> import pg8000.native
 >>>
 >>> with pg8000.native.Connection("postgres", password="cpsnow") as con:
 ...     con.run(""" SELECT CAST('{"a":1, "b":2}' AS jsonb) @> :v """, v={"b": 2})
 [[True]]
 
+```
+
 
-Retrieve Column Metadata From Results
-`````````````````````````````````````
+### Retrieve Column Metadata From Results
 
 Find the column metadata returned from a query:
 
+```python
 >>> import pg8000.native
 >>>
 >>> con = pg8000.native.Connection("postgres", password="cpsnow")
@@ -295,16 +299,18 @@ Find the column metadata returned from a query:
 >>>
 >>> con.close()
 
+```
+
 
-Notices And Notifications
-`````````````````````````
+### Notices And Notifications
 
-PostgreSQL `notices
-<https://www.postgresql.org/docs/current/static/plpgsql-errors-and-messages.html>`_ are
-stored in a deque called ``Connection.notices`` and added using the ``append()``
-method. Similarly there are ``Connection.notifications`` for `notifications
-<https://www.postgresql.org/docs/current/static/sql-notify.html>`_. Here's an example:
+PostgreSQL [notices
+](https://www.postgresql.org/docs/current/static/plpgsql-errors-and-messages.html) are
+stored in a deque called `Connection.notices` and added using the `append()` method.
+Similarly there are `Connection.notifications` for [notifications
+](https://www.postgresql.org/docs/current/static/sql-notify.html). Here's an example:
 
+```python
 >>> import pg8000.native
 >>>
 >>> con = pg8000.native.Connection("postgres", password="cpsnow")
@@ -318,16 +324,19 @@ method. Similarly there are ``Connection.notifications`` for `notifications
 >>>
 >>> con.close()
 
+```
 
-Parameter Statuses
-``````````````````
 
-`Certain parameter values are reported by the server automatically at connection startup or whenever
+### Parameter Statuses
+
+[Certain parameter values are reported by the server automatically at connection startup or whenever
 their values change
-<https://www.postgresql.org/docs/current/libpq-status.html#LIBPQ-PQPARAMETERSTATUS>`_ and pg8000
-stores the latest values in a dict called ``Connection.parameter_statuses``. Here's an example where
-we set the ``aplication_name`` parameter and then read it from the ``parameter_statuses``:
+](https://www.postgresql.org/docs/current/libpq-status.html#LIBPQ-PQPARAMETERSTATUS>) and
+pg8000 stores the latest values in a dict called `Connection.parameter_statuses`. Here's
+an example where we set the `aplication_name` parameter and then read it from the
+`parameter_statuses`:
 
+```python
 >>> import pg8000.native
 >>>
 >>> con = pg8000.native.Connection(
@@ -338,12 +347,14 @@ we set the ``aplication_name`` parameter and then read it from the ``parameter_s
 >>>
 >>> con.close()
 
+```
+
 
-LIMIT ALL
-`````````
+### LIMIT ALL
 
 You might think that the following would work, but in fact it fails:
 
+```python
 >>> import pg8000.native
 >>>
 >>> con = pg8000.native.Connection("postgres", password="cpsnow")
@@ -354,9 +365,12 @@ pg8000.exceptions.DatabaseError: ...
 >>>
 >>> con.close()
 
-Instead the `docs say <https://www.postgresql.org/docs/current/sql-select.html>`_ that
-you can send ``null`` as an alternative to ``ALL``, which does work:
+```
 
+Instead the [docs say](https://www.postgresql.org/docs/current/sql-select.html) that you
+can send `null` as an alternative to `ALL`, which does work:
+
+```python
 >>> import pg8000.native
 >>>
 >>> con = pg8000.native.Connection("postgres", password="cpsnow")
@@ -366,12 +380,14 @@ you can send ``null`` as an alternative to ``ALL``, which does work:
 >>>
 >>> con.close()
 
+```
+
 
-IN and NOT IN
-`````````````
+### IN and NOT IN
 
 You might think that the following would work, but in fact the server doesn't like it:
 
+```python
 >>> import pg8000.native
 >>>
 >>> con = pg8000.native.Connection("postgres", password="cpsnow")
@@ -382,9 +398,12 @@ pg8000.exceptions.DatabaseError: ...
 >>>
 >>> con.close()
 
-instead you can write it using the `unnest
-<https://www.postgresql.org/docs/current/functions-array.html>`_ function:
+```
 
+instead you can write it using the [unnest
+](https://www.postgresql.org/docs/current/functions-array.html) function:
+
+```python
 >>> import pg8000.native
 >>>
 >>> con = pg8000.native.Connection("postgres", password="cpsnow")
@@ -395,16 +414,18 @@ instead you can write it using the `unnest
 [['silo 1']]
 >>> con.close()
 
-and you can do the same for ``NOT IN``.
+```
+
+and you can do the same for `NOT IN`.
 
 
-Many SQL Statements Can't Be Parameterized
-``````````````````````````````````````````
+### Many SQL Statements Can't Be Parameterized
 
-In PostgreSQL parameters can only be used for `data values, not identifiers
-<https://www.postgresql.org/docs/current/xfunc-sql.html#XFUNC-SQL-FUNCTION-ARGUMENTS>`_.
+In PostgreSQL parameters can only be used for [data values, not identifiers
+](https://www.postgresql.org/docs/current/xfunc-sql.html#XFUNC-SQL-FUNCTION-ARGUMENTS).
 Sometimes this might not work as expected, for example the following fails:
 
+```python
 >>> import pg8000.native
 >>>
 >>> con = pg8000.native.Connection("postgres", password="cpsnow")
@@ -417,12 +438,15 @@ pg8000.exceptions.DatabaseError: ...
 >>>
 >>> con.close()
 
+```
+
 It fails because the PostgreSQL server doesn't allow this statement to have any
 parameters. There are many SQL statements that one might think would have parameters,
 but don't. For these cases the SQL has to be created manually, being careful to use the
-``identifier()`` and ``literal()`` functions to escape the values to avoid `SQL
-injection attacks <https://en.wikipedia.org/wiki/SQL_injection>`_:
+`identifier()` and `literal()` functions to escape the values to avoid [SQL injection
+attacks](https://en.wikipedia.org/wiki/SQL_injection>):
 
+```python
 >>> from pg8000.native import Connection, identifier, literal
 >>>
 >>> con = Connection("postgres", password="cpsnow")
@@ -437,14 +461,16 @@ injection attacks <https://en.wikipedia.org/wiki/SQL_injection>`_:
 >>>
 >>> con.close()
 
+```
 
-COPY FROM And TO A Stream
-`````````````````````````
 
-The SQL `COPY <https://www.postgresql.org/docs/current/sql-copy.html>`_ statement can be
-used to copy from and to a file or file-like object. Here' an example using the CSV
+### COPY FROM And TO A Stream
+
+The SQL [COPY](https://www.postgresql.org/docs/current/sql-copy.html) statement can be
+used to copy from and to a file or file-like object. Here's an example using the CSV
 format:
 
+```python
 >>> import pg8000.native
 >>> from io import StringIO
 >>> import csv
@@ -483,9 +509,12 @@ format:
 >>>
 >>> con.close()
 
+```
+
 It's also possible to COPY FROM an iterable, which is useful if you're creating rows
 programmatically:
 
+```python
 >>> import pg8000.native
 >>>
 >>> con = pg8000.native.Connection("postgres", password="cpsnow")
@@ -514,13 +543,15 @@ programmatically:
 >>>
 >>> con.close()
 
+```
+
 
-Execute Multiple SQL Statements
-```````````````````````````````
+### Execute Multiple SQL Statements
 
-If you want to execute a series of SQL statements (eg. an ``.sql`` file), you can run
+If you want to execute a series of SQL statements (eg. an `.sql` file), you can run
 them as expected:
 
+```python
 >>> import pg8000.native
 >>>
 >>> con = pg8000.native.Connection("postgres", password="cpsnow")
@@ -532,18 +563,20 @@ them as expected:
 >>>
 >>> con.close()
 
+```
+
 The only caveat is that when executing multiple statements you can't have any
 parameters.
 
 
-Quoted Identifiers in SQL
-`````````````````````````
+### Quoted Identifiers in SQL
 
-Say you had a column called ``My Column``. Since it's case sensitive and contains a
-space, you'd have to `surround it by double quotes
-<https://www.postgresql.org/docs/current/sql-syntax-lexical.html#SQL-SYNTAX-IDENTIFIER>`_.
+Say you had a column called `My Column`. Since it's case sensitive and contains a space,
+you'd have to [surround it by double quotes
+](https://www.postgresql.org/docs/current/sql-syntax-lexical.html#SQL-SYNTAX-IDENTIFIER).
 But you can't do:
 
+```python
 >>> import pg8000.native
 >>>
 >>> con = pg8000.native.Connection("postgres", password="cpsnow")
@@ -554,11 +587,14 @@ SyntaxError: invalid syntax...
 >>>
 >>> con.close()
 
+```
+
 since Python uses double quotes to delimit string literals, so one solution is
-to use Python's `triple quotes
-<https://docs.python.org/3/tutorial/introduction.html#strings>`_ to delimit the string
+to use Python's [triple quotes
+](https://docs.python.org/3/tutorial/introduction.html#strings) to delimit the string
 instead:
 
+```python
 >>> import pg8000.native
 >>>
 >>> con = pg8000.native.Connection("postgres", password="cpsnow")
@@ -568,10 +604,13 @@ instead:
 >>>
 >>> con.close()
 
+```
+
 another solution, that's especially useful if the identifier comes from an untrusted
-source, is to use the ``identifier()`` function, which correctly quotes and escapes the
+source, is to use the `identifier()` function, which correctly quotes and escapes the
 identifier as needed:
 
+```python
 >>> from pg8000.native import Connection, identifier
 >>>
 >>> con = Connection("postgres", password="cpsnow")
@@ -585,11 +624,14 @@ SELECT 'hello' as "My Column"
 >>>
 >>> con.close()
 
-this approach guards against `SQL injection attacks
-<https://en.wikipedia.org/wiki/SQL_injection>`_. One thing to note if you're using
-explicit schemas (eg. ``pg_catalog.pg_language``) is that the schema name and table name
+```
+
+this approach guards against [SQL injection attacks
+](https://en.wikipedia.org/wiki/SQL_injection). One thing to note if you're using
+explicit schemas (eg. `pg_catalog.pg_language`) is that the schema name and table name
 are both separate identifiers. So to escape them you'd do:
 
+```python
 >>> from pg8000.native import Connection, identifier
 >>>
 >>> con = Connection("postgres", password="cpsnow")
@@ -606,19 +648,21 @@ SELECT lanname FROM pg_catalog.pg_language WHERE lanname = 'sql'
 >>>
 >>> con.close()
 
+```
+
 
-Custom adapter from a Python type to a PostgreSQL type
-``````````````````````````````````````````````````````
+### Custom adapter from a Python type to a PostgreSQL type
 
 pg8000 has a mapping from Python types to PostgreSQL types for when it needs to send
 SQL parameters to the server. The default mapping that comes with pg8000 is designed to
 work well in most cases, but you might want to add or replace the default mapping.
 
-A Python ``datetime.timedelta`` object is sent to the server as a PostgreSQL
-``interval`` type,  which has the ``oid`` 1186. But let's say we wanted to create our
-own Python class to be sent as an ``interval`` type. Then we'd have to register an
+A Python `datetime.timedelta` object is sent to the server as a PostgreSQL
+`interval` type,  which has the `oid` 1186. But let's say we wanted to create our
+own Python class to be sent as an `interval` type. Then we'd have to register an
 adapter:
 
+```python
 >>> import pg8000.native
 >>>
 >>> con = pg8000.native.Connection("postgres", password="cpsnow")
@@ -635,23 +679,25 @@ adapter:
 >>>
 >>> con.close()
 
-Note that it still came back as a ``datetime.timedelta`` object because we only changed
+```
+
+Note that it still came back as a `datetime.timedelta` object because we only changed
 the mapping from Python to PostgreSQL. See below for an example of how to change the
 mapping from PostgreSQL to Python.
 
 
-Custom adapter from a PostgreSQL type to a Python type
-``````````````````````````````````````````````````````
+### Custom adapter from a PostgreSQL type to a Python type
 
 pg8000 has a mapping from PostgreSQL types to Python types for when it receives SQL
 results from the server. The default mapping that comes with pg8000 is designed to work
 well in most cases, but you might want to add or replace the default mapping.
 
-If pg8000 receives PostgreSQL ``interval`` type, which has the ``oid`` 1186, it converts
-it into a Python ``datetime.timedelta`` object. But let's say we wanted to create our
-own Python class to be used instead of ``datetime.timedelta``. Then we'd have to
+If pg8000 receives PostgreSQL `interval` type, which has the `oid` 1186, it converts
+it into a Python `datetime.timedelta` object. But let's say we wanted to create our
+own Python class to be used instead of `datetime.timedelta`. Then we'd have to
 register an adapter:
 
+```python
 >>> import pg8000.native
 >>>
 >>> con = pg8000.native.Connection("postgres", password="cpsnow")
@@ -668,17 +714,19 @@ register an adapter:
 >>>
 >>> con.close()
 
+```
+
 Note that registering the 'in' adapter only afects the mapping from the PostgreSQL type
 to the Python type. See above for an example of how to change the mapping from
 PostgreSQL to Python.
 
 
-Could Not Determine Data Type Of Parameter
-``````````````````````````````````````````
+### Could Not Determine Data Type Of Parameter
 
-Sometimes you'll get the 'could not determine data type of parameter' error message from
+Sometimes you'll get the `could not determine data type of parameter` error message from
 the server:
 
+```python
 >>> import pg8000.native
 >>>
 >>> con = pg8000.native.Connection("postgres", password="cpsnow")
@@ -689,8 +737,11 @@ pg8000.exceptions.DatabaseError: {'S': 'ERROR', 'V': 'ERROR', 'C': '42P18', 'M':
 >>>
 >>> con.close()
 
-One way of solving it is to put a ``CAST`` in the SQL:
+```
 
+One way of solving it is to put a `CAST` in the SQL:
+
+```python
 >>> import pg8000.native
 >>>
 >>> con = pg8000.native.Connection("postgres", password="cpsnow")
@@ -700,8 +751,11 @@ One way of solving it is to put a ``CAST`` in the SQL:
 >>>
 >>> con.close()
 
+```
+
 Another way is to override the type that pg8000 sends along with each parameter:
 
+```python
 >>> import pg8000.native
 >>>
 >>> con = pg8000.native.Connection("postgres", password="cpsnow")
@@ -711,14 +765,16 @@ Another way is to override the type that pg8000 sends along with each parameter:
 >>>
 >>> con.close()
 
+```
+
 
-Prepared Statements
-```````````````````
+### Prepared Statements
 
-`Prepared statements <https://www.postgresql.org/docs/current/sql-prepare.html>`_
-can be useful in improving performance when you have a statement that's executed
-repeatedly. Here's an example:
+[Prepared statements](https://www.postgresql.org/docs/current/sql-prepare.html) can be
+useful in improving performance when you have a statement that's executed repeatedly.
+Here's an example:
 
+```python
 >>> import pg8000.native
 >>>
 >>> con = pg8000.native.Connection("postgres", password="cpsnow")
@@ -739,12 +795,14 @@ repeatedly. Here's an example:
 >>>
 >>> con.close()
 
+```
+
 
-Use Environment Variables As Connection Defaults
-````````````````````````````````````````````````
+### Use Environment Variables As Connection Defaults
 
 You might want to use the current user as the database username for example:
 
+```python
 >>> import pg8000.native
 >>> import getpass
 >>>
@@ -757,9 +815,12 @@ You might want to use the current user as the database username for example:
 >>>
 >>> connection.close()
 
-or perhaps you may want to use some of the same `environment variables that libpg uses
-<https://www.postgresql.org/docs/current/libpq-envars.html>`_:
+```
 
+or perhaps you may want to use some of the same [environment variables that libpg uses
+](https://www.postgresql.org/docs/current/libpq-envars.html):
+
+```python
 >>> import pg8000.native
 >>> from os import environ
 >>>
@@ -777,66 +838,69 @@ or perhaps you may want to use some of the same `environment variables that libp
 >>>
 >>> connection.close()
 
+```
+
 It might be asked, why doesn't pg8000 have this behaviour built in? The thinking
-follows the second aphorism of `The Zen of Python
-<https://www.python.org/dev/peps/pep-0020/>`_:
+follows the second aphorism of [The Zen of Python
+](https://www.python.org/dev/peps/pep-0020/):
 
-    Explicit is better than implicit.
+> Explicit is better than implicit.
 
 So we've taken the approach of only being able to set connection parameters using the
-``pg8000.native.Connection()`` constructor.
+`pg8000.native.Connection()` constructor.
 
 
-Connect To PostgreSQL Over SSL
-``````````````````````````````
+### Connect To PostgreSQL Over SSL
 
-To connect to the server using SSL defaults do::
+By default the `ssl_context` connection parameter has the value `None` which means pg8000 will
+attempt to connect to the server using SSL, and then fall back to a plain socket if the server
+refuses SSL. If you want to *require* SSL (ie. to fail if it's not achieved) then you can set
+`ssl_context=True`:
 
-  import pg8000.native
-  connection = pg8000.native.Connection('postgres', password="cpsnow", ssl_context=True)
-  connection.run("SELECT 'The game is afoot!'")
-
-To connect over SSL with custom settings, set the ``ssl_context`` parameter to an
-|ssl.SSLContext|_ object:
+```python
+>>> import pg8000.native
+>>>
+>>> con = pg8000.native.Connection('postgres', password="cpsnow", ssl_context=True)
+>>> con.run("SELECT 'The game is afoot!'")
+[['The game is afoot!']]
+>>> con.close()
 
-::
+```
 
-  import pg8000.native
-  import ssl
+If on the other hand you want to connect over SSL with custom settings, set the `ssl_context`
+parameter to an [`ssl.SSLContext`](https://docs.python.org/3/library/ssl.html#ssl.SSLContext) object:
 
+```python
+>>> import pg8000.native
+>>> import ssl
+>>>
+>>> ssl_context = ssl.create_default_context()
+>>> ssl_context.check_hostname = False
+>>> ssl_context.verify_mode = ssl.CERT_NONE
+>>> con = pg8000.native.Connection(
+...     'postgres', password="cpsnow", ssl_context=ssl_context)
+>>> con.run("SELECT 'Work is the curse of the drinking classes.'")
+[['Work is the curse of the drinking classes.']]
+>>> con.close()
 
-  ssl_context = ssl.create_default_context()
-  ssl_context.verify_mode = ssl.CERT_REQUIRED
-  ssl_context.load_verify_locations('root.pem')        
-  connection = pg8000.native.Connection(
-    'postgres', password="cpsnow", ssl_context=ssl_context)
+```
 
 It may be that your PostgreSQL server is behind an SSL proxy server in which case you
-can set a pg8000-specific attribute ``ssl.SSLContext.request_ssl = False`` which tells
-pg8000 to connect using an SSL socket, but not to request SSL from the PostgreSQL
-server:
-
-::
-
-  import pg8000.native
-  import ssl
+can give pg8000 the SSL socket with the `sock` parameter, and then set
+`ssl_context=False` which means that no attempt will be made to create an SSL connection
+to the server.
 
-  ssl_context = ssl.create_default_context()
-  ssl_context.request_ssl = False
-  connection = pg8000.native.Connection(
-      'postgres', password="cpsnow", ssl_context=ssl_context)
 
+### Server-Side Cursors
 
-Server-Side Cursors
-```````````````````
-
-You can use the SQL commands `DECLARE
-<https://www.postgresql.org/docs/current/sql-declare.html>`_,
-`FETCH <https://www.postgresql.org/docs/current/sql-fetch.html>`_,
-`MOVE <https://www.postgresql.org/docs/current/sql-move.html>`_ and
-`CLOSE <https://www.postgresql.org/docs/current/sql-close.html>`_ to manipulate
+You can use the SQL commands [DECLARE
+](https://www.postgresql.org/docs/current/sql-declare.html),
+[FETCH](https://www.postgresql.org/docs/current/sql-fetch.html),
+[MOVE](https://www.postgresql.org/docs/current/sql-move.html) and
+[CLOSE](https://www.postgresql.org/docs/current/sql-close.html) to manipulate
 server-side cursors. For example:
 
+```python
 >>> import pg8000.native
 >>>
 >>> con = pg8000.native.Connection('postgres', password="cpsnow")
@@ -852,14 +916,16 @@ server-side cursors. For example:
 >>>
 >>> con.close()
 
+```
+
 
-BLOBs (Binary Large Objects)
-````````````````````````````
+### BLOBs (Binary Large Objects)
 
-There's a set of `SQL functions
-<https://www.postgresql.org/docs/current/lo-funcs.html>`_ for manipulating BLOBs.
+There's a set of [SQL functions
+](https://www.postgresql.org/docs/current/lo-funcs.html) for manipulating BLOBs.
 Here's an example:
 
+```python
 >>> import pg8000.native
 >>>
 >>> con = pg8000.native.Connection('postgres', password="cpsnow")
@@ -893,14 +959,16 @@ Here's an example:
 >>>
 >>> con.close()
 
+```
+
 
-Replication Protocol
-````````````````````
+### Replication Protocol
 
-The PostgreSQL `Replication Protocol
-<https://www.postgresql.org/docs/current/protocol-replication.html>`_ is supported using
-the ``replication`` keyword when creating a connection:
+The PostgreSQL [Replication Protocol
+](https://www.postgresql.org/docs/current/protocol-replication.html) is supported using
+the `replication` keyword when creating a connection:
 
+```python
 >>> import pg8000.native
 >>>
 >>> con = pg8000.native.Connection(
@@ -911,19 +979,20 @@ the ``replication`` keyword when creating a connection:
 >>>
 >>> con.close()
 
+```
 
-DB-API 2 Interactive Examples
------------------------------
+
+## DB-API 2 Interactive Examples
 
 These examples stick to the DB-API 2.0 standard.
 
 
-Basic Example
-`````````````
+### Basic Example
 
 Import pg8000, connect to the database, create a table, add some rows and then query the
 table:
 
+```python
 >>> import pg8000.dbapi
 >>>
 >>> conn = pg8000.dbapi.connect(user="postgres", password="cpsnow")
@@ -942,12 +1011,14 @@ id = 2, title = Speaker for the Dead
 >>>
 >>> conn.close()
 
+```
+
 
-Query Using Functions
-`````````````````````
+### Query Using Functions
 
 Another query, using some PostgreSQL functions:
 
+```python
 >>> import pg8000.dbapi
 >>>
 >>> con = pg8000.dbapi.connect(user="postgres", password="cpsnow")
@@ -959,12 +1030,14 @@ Another query, using some PostgreSQL functions:
 >>>
 >>> con.close()
 
+```
+
 
-Interval Type
-`````````````
+### Interval Type
 
 A query that returns the PostgreSQL interval type:
 
+```python
 >>> import datetime
 >>> import pg8000.dbapi
 >>>
@@ -978,13 +1051,15 @@ A query that returns the PostgreSQL interval type:
 >>>
 >>> con.close()
 
+```
 
-Point Type
-``````````
 
-A round-trip with a `PostgreSQL point
-<https://www.postgresql.org/docs/current/datatype-geometric.html>`_ type:
+### Point Type
 
+A round-trip with a [PostgreSQL point
+](https://www.postgresql.org/docs/current/datatype-geometric.html) type:
+
+```python
 >>> import pg8000.dbapi
 >>>
 >>> con = pg8000.dbapi.connect(user="postgres", password="cpsnow")
@@ -996,13 +1071,15 @@ A round-trip with a `PostgreSQL point
 >>>
 >>> con.close()
 
+```
+
 
-Numeric Parameter Style
-```````````````````````
+### Numeric Parameter Style
 
 pg8000 supports all the DB-API parameter styles. Here's an example of using the
 'numeric' parameter style:
 
+```python
 >>> import pg8000.dbapi
 >>>
 >>> pg8000.dbapi.paramstyle = "numeric"
@@ -1016,13 +1093,15 @@ pg8000 supports all the DB-API parameter styles. Here's an example of using the
 >>>
 >>> con.close()
 
+```
 
-Autocommit
-``````````
+
+### Autocommit
 
 Following the DB-API specification, autocommit is off by default. It can be turned on by
 using the autocommit property of the connection:
 
+```python
 >>> import pg8000.dbapi
 >>>
 >>> con = pg8000.dbapi.connect(user="postgres", password="cpsnow")
@@ -1035,16 +1114,18 @@ using the autocommit property of the connection:
 >>>
 >>> con.close()
 
+```
+
 
-Client Encoding
-```````````````
+### Client Encoding
 
 When communicating with the server, pg8000 uses the character set that the server asks
 it to use (the client encoding). By default the client encoding is the database's
 character set (chosen when the database is created), but the client encoding can be
-changed in a number of ways (eg. setting ``CLIENT_ENCODING`` in ``postgresql.conf``).
+changed in a number of ways (eg. setting `CLIENT_ENCODING` in `postgresql.conf`).
 Another way of changing the client encoding is by using an SQL command. For example:
 
+```python
 >>> import pg8000.dbapi
 >>>
 >>> con = pg8000.dbapi.connect(user="postgres", password="cpsnow")
@@ -1057,12 +1138,14 @@ Another way of changing the client encoding is by using an SQL command. For exam
 >>>
 >>> con.close()
 
+```
 
-JSON
-````
+
+### JSON
 
 JSON is sent to the server serialized, and returned de-serialized. Here's an example:
 
+```python
 >>> import json
 >>> import pg8000.dbapi
 >>>
@@ -1076,8 +1159,11 @@ JSON is sent to the server serialized, and returned de-serialized. Here's an exa
 >>>
 >>> con.close()
 
+```
+
 JSON queries can be have parameters:
 
+```python
 >>> import pg8000.dbapi
 >>>
 >>> with pg8000.dbapi.connect("postgres", password="cpsnow") as con:
@@ -1087,12 +1173,14 @@ JSON queries can be have parameters:
 ...         print(row)
 [True]
 
+```
+
 
-Retrieve Column Names From Results
-``````````````````````````````````
+### Retrieve Column Names From Results
 
 Use the columns names retrieved from a query:
 
+```python
 >>> import pg8000
 >>> conn = pg8000.dbapi.connect(user="postgres", password="cpsnow")
 >>> c = conn.cursor()
@@ -1109,13 +1197,15 @@ Use the columns names retrieved from a query:
 >>>
 >>> conn.close()
 
+```
 
-COPY from and to a file
-```````````````````````
 
-The SQL `COPY <https://www.postgresql.org/docs/current/sql-copy.html>`__ statement can
+### COPY from and to a file
+
+The SQL [COPY](https://www.postgresql.org/docs/current/sql-copy.html) statement can
 be used to copy from and to a file or file-like object:
 
+```python
 >>> from io import StringIO
 >>> import pg8000.dbapi
 >>>
@@ -1138,17 +1228,19 @@ be used to copy from and to a file or file-like object:
 >>>
 >>> con.close()
 
+```
+
 
-Server-Side Cursors
-```````````````````
+### Server-Side Cursors
 
-You can use the SQL commands `DECLARE
-<https://www.postgresql.org/docs/current/sql-declare.html>`_,
-`FETCH <https://www.postgresql.org/docs/current/sql-fetch.html>`_,
-`MOVE <https://www.postgresql.org/docs/current/sql-move.html>`_ and
-`CLOSE <https://www.postgresql.org/docs/current/sql-close.html>`_ to manipulate
+You can use the SQL commands [DECLARE
+](https://www.postgresql.org/docs/current/sql-declare.html),
+[FETCH](https://www.postgresql.org/docs/current/sql-fetch.html),
+[MOVE](https://www.postgresql.org/docs/current/sql-move.html) and
+[CLOSE](https://www.postgresql.org/docs/current/sql-close.html) to manipulate
 server-side cursors. For example:
 
+```python
 >>> import pg8000.dbapi
 >>>
 >>> con = pg8000.dbapi.connect(user="postgres", password="cpsnow")
@@ -1168,14 +1260,16 @@ server-side cursors. For example:
 >>>
 >>> con.close()
 
+```
 
-BLOBs (Binary Large Objects)
-````````````````````````````
 
-There's a set of `SQL functions
-<https://www.postgresql.org/docs/current/lo-funcs.html>`_ for manipulating BLOBs.
+### BLOBs (Binary Large Objects)
+
+There's a set of [SQL functions
+](https://www.postgresql.org/docs/current/lo-funcs.html) for manipulating BLOBs.
 Here's an example:
 
+```python
 >>> import pg8000.dbapi
 >>>
 >>> con = pg8000.dbapi.connect(user="postgres", password="cpsnow")
@@ -1211,9 +1305,48 @@ Here's an example:
 >>>
 >>> con.close()
 
+```
+
 
-Type Mapping
-------------
+### Parameter Limit
+
+The protocol that PostgreSQL uses limits the number of parameters to 6,5535. The following will give
+an error:
+
+```python
+>>> import pg8000.dbapi
+>>>
+>>> conn = pg8000.dbapi.connect(user="postgres", password="cpsnow")
+>>> cursor = conn.cursor()
+>>> SIZE = 100000
+>>> cursor.execute(
+...    f"SELECT 1 WHERE 1 IN ({','.join(['%s'] * SIZE)})",
+...    [1] * SIZE,
+... )
+Traceback (most recent call last):
+struct.error: 'H' format requires 0 <= number <= 65535
+
+```
+
+One way of working round this problem is to use the [unnest
+](https://www.postgresql.org/docs/current/functions-array.html) function:
+
+```python
+>>> import pg8000.dbapi
+>>>
+>>> conn = pg8000.dbapi.connect(user="postgres", password="cpsnow")
+>>> cursor = conn.cursor()
+>>> SIZE = 100000
+>>> cursor.execute(
+...    "SELECT 1 WHERE 1 IN (SELECT unnest(CAST(%s AS int[])))",
+...    [[1] * SIZE],
+... )
+>>> conn.close()
+
+```
+
+
+## Type Mapping
 
 The following table shows the default mapping between Python types and PostgreSQL types,
 and vice versa.
@@ -1222,214 +1355,888 @@ If pg8000 doesn't recognize a type that it receives from PostgreSQL, it will ret
 as a ``str`` type. This is how pg8000 handles PostgreSQL ``enum`` and XML types. It's
 possible to change the default mapping using adapters (see the examples).
 
-.. table:: Python to PostgreSQL Type Mapping
-
-   +-----------------------+-----------------+-----------------------------------------+
-   | Python Type           | PostgreSQL Type | Notes                                   |
-   +=======================+=================+=========================================+
-   | bool                  | bool            |                                         |
-   +-----------------------+-----------------+-----------------------------------------+
-   | int                   | int4            |                                         |
-   +-----------------------+-----------------+-----------------------------------------+
-   | str                   | text            |                                         |
-   +-----------------------+-----------------+-----------------------------------------+
-   | float                 | float8          |                                         |
-   +-----------------------+-----------------+-----------------------------------------+
-   | decimal.Decimal       | numeric         |                                         |
-   +-----------------------+-----------------+-----------------------------------------+
-   | bytes                 | bytea           |                                         |
-   +-----------------------+-----------------+-----------------------------------------+
-   | datetime.datetime     | timestamp       | +/-infinity PostgreSQL values are       |
-   | (without tzinfo)      | without         | represented as Python ``str`` values.   |
-   |                       | timezone        | If a ``timestamp`` is too big for       |
-   |                       |                 | ``datetime.datetime`` then a ``str`` is |
-   |                       |                 | used.                                   |
-   +-----------------------+-----------------+-----------------------------------------+
-   | datetime.datetime     | timestamp with  | +/-infinity PostgreSQL values are       |
-   | (with tzinfo)         | timezone        | represented as Python ``str`` values.   |
-   |                       |                 | If a ``timestamptz`` is too big for     |
-   |                       |                 | ``datetime.datetime`` then a ``str`` is |
-   |                       |                 | used.                                   |
-   +-----------------------+-----------------+-----------------------------------------+
-   | datetime.date         | date            | +/-infinity PostgreSQL values are       |
-   |                       |                 | represented as Python ``str`` values.   |
-   |                       |                 | If a ``date`` is too big for a          |
-   |                       |                 | ``datetime.date`` then a ``str`` is     |
-   |                       |                 | used.                                   |
-   +-----------------------+-----------------+-----------------------------------------+
-   | datetime.time         | time without    |                                         |
-   |                       | time zone       |                                         |
-   +-----------------------+-----------------+-----------------------------------------+
-   | datetime.timedelta    | interval        | If an ``interval`` is too big for       |
-   |                       |                 | ``datetime.timedelta`` then a           |
-   |                       |                 | ``PGInterval``  is used.                |
-   +-----------------------+-----------------+-----------------------------------------+
-   | None                  | NULL            |                                         |
-   +-----------------------+-----------------+-----------------------------------------+
-   | uuid.UUID             | uuid            |                                         |
-   +-----------------------+-----------------+-----------------------------------------+
-   | ipaddress.IPv4Address | inet            |                                         |
-   +-----------------------+-----------------+-----------------------------------------+
-   | ipaddress.IPv6Address | inet            |                                         |
-   +-----------------------+-----------------+-----------------------------------------+
-   | ipaddress.IPv4Network | inet            |                                         |
-   +-----------------------+-----------------+-----------------------------------------+
-   | ipaddress.IPv6Network | inet            |                                         |
-   +-----------------------+-----------------+-----------------------------------------+
-   | int                   | xid             |                                         |
-   +-----------------------+-----------------+-----------------------------------------+
-   | list of int           | INT4[]          |                                         |
-   +-----------------------+-----------------+-----------------------------------------+
-   | list of float         | FLOAT8[]        |                                         |
-   +-----------------------+-----------------+-----------------------------------------+
-   | list of bool          | BOOL[]          |                                         |
-   +-----------------------+-----------------+-----------------------------------------+
-   | list of str           | TEXT[]          |                                         |
-   +-----------------------+-----------------+-----------------------------------------+
-   | int                   | int2vector      | Only from PostgreSQL to Python          |
-   +-----------------------+-----------------+-----------------------------------------+
-   | JSON                  | json, jsonb     | The Python JSON is provided as a Python |
-   |                       |                 | serialized string. Results returned as  |
-   |                       |                 | de-serialized JSON.                     |
-   +-----------------------+-----------------+-----------------------------------------+
-   | pg8000.Range          | \*range         | PostgreSQL multirange types are         |
-   |                       |                 | represented in Python as a list of      |
-   |                       |                 | range types.                            |
-   +-----------------------+-----------------+-----------------------------------------+
-   | tuple                 | composite type  | Only from Python to PostgreSQL          |
-   +-----------------------+-----------------+-----------------------------------------+
-
-
-
-Theory Of Operation
--------------------
-
-  A concept is tolerated inside the microkernel only if moving it outside the kernel,
-  i.e., permitting competing implementations, would prevent the implementation of the
-  system's required functionality.
-
-  -- Jochen Liedtke, Liedtke's minimality principle
+| Python Type           | PostgreSQL Type | Notes                                   |
+|-----------------------|-----------------|-----------------------------------------|
+| bool                  | bool            |                                         |
+| int                   | int4            |                                         |
+| str                   | text            |                                         |
+| float                 | float8          |                                         |
+| decimal.Decimal       | numeric         |                                         |
+| bytes                 | bytea           |                                         |
+| datetime.datetime (without tzinfo) | timestamp without timezone | +/-infinity PostgreSQL values are represented as Python `str` values. If a `timestamp` is too big for `datetime.datetime` then a `str` is used. |
+| datetime.datetime (with tzinfo) | timestamp with timezone | +/-infinity PostgreSQL values are represented as Python `str` values. If a `timestamptz` is too big for `datetime.datetime` then a `str` is used. |
+| datetime.date | date | +/-infinity PostgreSQL values are represented as Python `str` values. If a `date` is too big for a `datetime.date` then a `str` is used. |
+| datetime.time         | time without time zone |                                  |
+| datetime.timedelta | interval | If an ``interval`` is too big for `datetime.timedelta` then a `PGInterval`  is used. |
+| None                  | NULL            |                                         |
+| uuid.UUID             | uuid            |                                         |
+| ipaddress.IPv4Address | inet            |                                         |
+| ipaddress.IPv6Address | inet            |                                         |
+| ipaddress.IPv4Network | inet            |                                         |
+| ipaddress.IPv6Network | inet            |                                         |
+| int                   | xid             |                                         |
+| list of int           | INT4[]          |                                         |
+| list of float         | FLOAT8[]        |                                         |
+| list of bool          | BOOL[]          |                                         |
+| list of str           | TEXT[]          |                                         |
+| int                   | int2vector      | Only from PostgreSQL to Python          |
+| JSON                  | json, jsonb     | The Python JSON is provided as a Python serialized string. Results returned as de-serialized JSON. |
+| pg8000.Range | range | PostgreSQL multirange types are | represented in Python as a list of  range types. |
+| tuple                 | composite type  | Only from Python to PostgreSQL          |
+
+
+## Theory Of Operation
+
+> A concept is tolerated inside the microkernel only if moving it outside the kernel,
+> i.e., permitting competing implementations, would prevent the implementation of the
+> system's required functionality.
+>
+> -- Jochen Liedtke, Liedtke's minimality principle
 
 pg8000 is designed to be used with one thread per connection.
 
-Pg8000 communicates with the database using the `PostgreSQL Frontend/Backend Protocol
-<https://www.postgresql.org/docs/current/protocol.html>`_ (FEBE). If a query has no
+pg8000 communicates with the database using the [PostgreSQL Frontend/Backend Protocol
+](https://www.postgresql.org/docs/current/protocol.html) (FEBE). If a query has no
 parameters, pg8000 uses the 'simple query protocol'. If a query does have parameters,
 pg8000 uses the 'extended query protocol' with unnamed prepared statements. The steps
 for a query with parameters are:
 
 1. Query comes in.
 
-#. Send a PARSE message to the server to create an unnamed prepared statement.
+2. Send a PARSE message to the server to create an unnamed prepared statement.
 
-#. Send a BIND message to run against the unnamed prepared statement, resulting in an
+3. Send a BIND message to run against the unnamed prepared statement, resulting in an
    unnamed portal on the server.
 
-#. Send an EXECUTE message to read all the results from the portal.
+4. Send an EXECUTE message to read all the results from the portal.
 
 It's also possible to use named prepared statements. In which case the prepared
 statement persists on the server, and represented in pg8000 using a
-``PreparedStatement`` object. This means that the PARSE step gets executed once up
+`PreparedStatement` object. This means that the PARSE step gets executed once up
 front, and then only the BIND and EXECUTE steps are repeated subsequently.
 
 There are a lot of PostgreSQL data types, but few primitive data types in Python. By
 default, pg8000 doesn't send PostgreSQL data type information in the PARSE step, in
 which case PostgreSQL assumes the types implied by the SQL statement. In some cases
-PostgreSQL can't work out a parameter type and so an `explicit cast
-<https://www.postgresql.org/docs/current/static/sql-expressions.html#SQL-SYNTAX-TYPE-CASTS>`_
+PostgreSQL can't work out a parameter type and so an [explicit cast
+](https://www.postgresql.org/docs/current/static/sql-expressions.html#SQL-SYNTAX-TYPE-CASTS)
 can be used in the SQL.
 
 In the FEBE protocol, each query parameter can be sent to the server either as binary
 or text according to the format code. In pg8000 the parameters are always sent as text.
 
 Occasionally, the network connection between pg8000 and the server may go down. If
-pg8000 encounters a network problem it'll raise an ``InterfaceError`` with the message
-``network error`` and with the original exception set as the `cause
-<https://docs.python.org/3/reference/simple_stmts.html#the-raise-statement>`_.
+pg8000 encounters a network problem it'll raise an `InterfaceError` with the message
+`network error` and with the original exception set as the [cause
+](https://docs.python.org/3/reference/simple_stmts.html#the-raise-statement).
+
+
+## Native API Docs
+
+### pg8000.native.Error
+
+Generic exception that is the base exception of the other error exceptions.
+
+
+### pg8000.native.InterfaceError
+
+For errors that originate within pg8000.
+
+
+### pg8000.native.DatabaseError
+
+For errors that originate from the server.
+
+### pg8000.native.Connection(user, host='localhost', database=None, port=5432, password=None, source\_address=None, unix\_sock=None, ssl\_context=None, timeout=None, tcp\_keepalive=True, application\_name=None, replication=None, sock=None)
+
+Creates a connection to a PostgreSQL database.
+
+- *user* - The username to connect to the PostgreSQL server with. If your server character encoding is not `ascii` or `utf8`, then you need to provide `user` as bytes, eg. `'my_name'.encode('EUC-JP')`.
+- *host* - The hostname of the PostgreSQL server to connect with. Providing this parameter is necessary for TCP/IP connections. One of either `host` or `unix_sock` must be provided. The default is `localhost`.
+- *database* - The name of the database instance to connect with. If `None` then the PostgreSQL server will assume the database name is the same as the username. If your server character encoding is not `ascii` or `utf8`, then you need to provide `database` as bytes, eg. `'my_db'.encode('EUC-JP')`.
+- *port* - The TCP/IP port of the PostgreSQL server instance.  This parameter defaults to `5432`, the registered common port of PostgreSQL TCP/IP servers.
+- *password* - The user password to connect to the server with. This parameter is optional; if omitted and the database server requests password-based authentication, the connection will fail to open. If this parameter is provided but not requested by the server, no error will occur. If your server character encoding is not `ascii` or `utf8`, then you need to provide `password` as bytes, eg.  `'my_password'.encode('EUC-JP')`.
+- *source_address* - The source IP address which initiates the connection to the PostgreSQL server. The default is `None` which means that the operating system will choose the source address.
+- *unix_sock* - The path to the UNIX socket to access the database through, for example, `'/tmp/.s.PGSQL.5432'`. One of either `host` or `unix_sock` must be provided.
+- *ssl_context* - This governs SSL encryption for TCP/IP sockets. It can have four values:
+  - `None`, the default, meaning that an attempt will be made to connect over SSL, but if this is rejected by the server then pg8000 will fall back to using a plain socket.
+  - `True`, means use SSL with an `ssl.SSLContext` with the minimum of checks.
+  - `False`, means to not attempt to create an SSL socket.
+  - An instance of `ssl.SSLContext` which will be used to create the SSL connection.
+- *timeout* - This is the time in seconds before the connection to the server will time out. The default is `None` which means no timeout.
+- *tcp_keepalive* - If `True` then use [TCP keepalive](https://en.wikipedia.org/wiki/Keepalive#TCP_keepalive). The default is `True`.
+- *application_name* - Sets the [application\_name](https://www.postgresql.org/docs/current/runtime-config-logging.html#GUC-APPLICATION-NAME). If your server character encoding is not `ascii` or `utf8`, then you need to provide values as bytes, eg.  `'my_application_name'.encode('EUC-JP')`. The default is `None` which means that the server will set the application name.
+- *replication* - Used to run in [streaming replication mode](https://www.postgresql.org/docs/current/protocol-replication.html). If your server character encoding is not `ascii` or `utf8`, then you need to provide values as bytes, eg. `'database'.encode('EUC-JP')`.
+- *sock*  - A socket-like object to use for the connection. For example, `sock` could be a plain `socket.socket`, or it could represent an SSH tunnel or perhaps an `ssl.SSLSocket` to an SSL proxy. If an `ssl.SSLContext` is provided, then it will be used to attempt to create an SSL socket from the provided socket. 
+
+### pg8000.native.Connection.notifications
+
+A deque of server-side
+[notifications](https://www.postgresql.org/docs/current/sql-notify.html) received by
+this database connection (via the `LISTEN` / `NOTIFY` PostgreSQL commands). Each list
+item is a three-element tuple containing the PostgreSQL backend PID that issued the
+notify, the channel and the payload.
+
+
+### pg8000.native.Connection.notices
+
+A deque of server-side notices received by this database connection.
+
+
+### pg8000.native.Connection.parameter\_statuses
+
+A `dict` of server-side parameter statuses received by this database connection.
+
+
+### pg8000.native.Connection.run(sql, stream=None, types=None, \*\*kwargs)
+
+Executes an sql statement, and returns the results as a `list`. For example:
+
+```
+con.run("SELECT * FROM cities where population > :pop", pop=10000)
+```
+
+- *sql* - The SQL statement to execute. Parameter placeholders appear as a `:` followed by the parameter name.
+- *stream* - For use with the PostgreSQL [COPY](http://www.postgresql.org/docs/current/static/sql-copy.html) command. The nature of the parameter depends on whether the SQL command is `COPY FROM` or `COPY TO`.
+  - `COPY FROM` - The stream parameter must be a readable file-like object or an iterable. If it's an
+    iterable then the items can be ``str`` or binary.
+  - `COPY TO` - The stream parameter must be a writable file-like object.
+- *types* - A dictionary of oids. A key corresponds to a parameter. 
+- *kwargs* - The parameters of the SQL statement.
+
+
+### pg8000.native.Connection.row\_count
+
+This read-only attribute contains the number of rows that the last `run()` method
+produced (for query statements like ``SELECT``) or affected (for modification statements
+like `UPDATE`.
+
+The value is -1 if:
+
+- No `run()` method has been performed yet.
+- There was no rowcount associated with the last `run()`.
+
+
+### pg8000.native.Connection.columns
+
+A list of column metadata. Each item in the list is a dictionary with the following
+keys:
+
+- name
+- table\_oid
+- column\_attrnum
+- type\_oid
+- type\_size
+- type\_modifier
+- format
+
+
+### pg8000.native.Connection.close()
+
+Closes the database connection.
+
+
+### pg8000.native.Connection.register\_out\_adapter(typ, out\_func)
+
+Register a type adapter for types going out from pg8000 to the server.
+
+- *typ* - The Python class that the adapter is for.
+- *out_func* - A function that takes the Python object and returns its string representation in the format that the server requires.
+
+
+### pg8000.native.Connection.register\_in\_adapter(oid, in\_func)
+
+Register a type adapter for types coming in from the server to pg8000.
+
+- *oid* - The PostgreSQL type identifier found in the [pg\_type system catalog](https://www.postgresql.org/docs/current/catalog-pg-type.html).
+- *in_func*  - A function that takes the PostgreSQL string representation and returns a corresponding
+  Python object.
+
+
+### pg8000.native.Connection.prepare(sql)
+
+Returns a `PreparedStatement` object which represents a [prepared statement
+](https://www.postgresql.org/docs/current/sql-prepare.html) on the server. It can
+subsequently be repeatedly executed.
+
+- *sql* - The SQL statement to prepare. Parameter placeholders appear as a `:` followed by the parameter name.
+
+
+### pg8000.native.PreparedStatement
+
+A prepared statement object is returned by the `pg8000.native.Connection.prepare()`
+method of a connection. It has the following methods:
+
+
+#### pg8000.native.PreparedStatement.run(\*\*kwargs)
+
+Executes the prepared statement, and returns the results as a `tuple`.
+
+- *kwargs* - The parameters of the prepared statement.
+
+
+#### pg8000.native.PreparedStatement.close()
+
+Closes the prepared statement, releasing the prepared statement held on the server.
+
+
+### pg8000.native.identifier(ident)
+
+Correctly quotes and escapes a string to be used as an [SQL identifier
+](https://www.postgresql.org/docs/current/sql-syntax-lexical.html#SQL-SYNTAX-IDENTIFIERS).
+- *ident* - The `str` to be used as an SQL identifier.
+
+
+### pg8000.native.literal(value)
+
+Correctly quotes and escapes a value to be used as an [SQL literal
+](https://www.postgresql.org/docs/current/sql-syntax-lexical.html#SQL-SYNTAX-CONSTANTS).
+- *value* - The value to be used as an SQL literal.
+
+
+## DB-API 2 Docs
+
+### Properties
+
+#### pg8000.dbapi.apilevel
+
+The DBAPI level supported, currently "2.0".
+
+
+#### pg8000.dbapi.threadsafety
+
+Integer constant stating the level of thread safety the DBAPI interface supports. For
+pg8000, the threadsafety value is 1, meaning that threads may share the module but not
+connections.
+
+
+#### pg8000.dbapi.paramstyle
+
+String property stating the type of parameter marker formatting expected by
+the interface.  This value defaults to "format", in which parameters are
+marked in this format: "WHERE name=%s".
+
+As an extension to the DBAPI specification, this value is not constant; it can be
+changed to any of the following values:
+
+- *qmark* - Question mark style, eg. `WHERE name=?`
+- *numeric* - Numeric positional style, eg. `WHERE name=:1`
+- *named* - Named style, eg. `WHERE name=:paramname`
+- *format* - printf format codes, eg. `WHERE name=%s`
+- *pyformat* - Python format codes, eg. `WHERE name=%(paramname)s`
+
+
+#### pg8000.dbapi.STRING
+
+String type oid.
+
+
+#### pg8000.dbapi.BINARY
+
+
+#### pg8000.dbapi.NUMBER
+
+Numeric type oid.
+
+
+#### pg8000.dbapi.DATETIME
+
+Timestamp type oid
+
+
+#### pg8000.dbapi.ROWID
+
+ROWID type oid
+
+
+### Functions
+
+#### pg8000.dbapi.connect(user, host='localhost', database=None, port=5432, password=None, source\_address=None, unix\_sock=None, ssl\_context=None, timeout=None, tcp\_keepalive=True, applicationa_name=None, replication=None, sock=None)
+
+Creates a connection to a PostgreSQL database.
+
+- *user*  - The username to connect to the PostgreSQL server with. If your server character encoding is not `ascii` or `utf8`, then you need to provide `user` as bytes, eg. `'my_name'.encode('EUC-JP')`.
+- *host* - The hostname of the PostgreSQL server to connect with. Providing this parameter is necessary for TCP/IP connections. One of either `host` or `unix_sock` must be provided. The default is `localhost`.
+- *database* - The name of the database instance to connect with. If `None` then the PostgreSQL server will assume the database name is the same as the username. If your server character encoding is not `ascii` or `utf8`, then you need to provide `database` as bytes, eg. `'my_db'.encode('EUC-JP')`.
+- *port* - The TCP/IP port of the PostgreSQL server instance.  This parameter defaults to `5432`, the registered common port of PostgreSQL TCP/IP servers.
+- *password* - The user password to connect to the server with. This parameter is optional; if omitted and the database server requests password-based authentication, the connection will fail to open. If this parameter is provided but not requested by the server, no error will occur. If your server character encoding is not `ascii` or `utf8`, then you need to provide `password` as bytes, eg.  `'my_password'.encode('EUC-JP')`.
+- *source_address* - The source IP address which initiates the connection to the PostgreSQL server. The default is `None` which means that the operating system will choose the source address.
+- *unix_sock* - The path to the UNIX socket to access the database through, for example, `'/tmp/.s.PGSQL.5432'`. One of either `host` or `unix_sock` must be provided.
+- *ssl_context* - This governs SSL encryption for TCP/IP sockets. It can have four values:
+  - `None`, the default, meaning that an attempt will be made to connect over SSL, but if this is rejected by the server then pg8000 will fall back to using a plain socket.
+  - `True`, means use SSL with an `ssl.SSLContext` with the minimum of checks.
+  - `False`, means to not attempt to create an SSL socket.
+  - An instance of `ssl.SSLContext` which will be used to create the SSL connection.
+- *timeout* - This is the time in seconds before the connection to the server will time out. The default is `None` which means no timeout.
+- *tcp_keepalive* - If `True` then use [TCP keepalive](https://en.wikipedia.org/wiki/Keepalive#TCP_keepalive). The default is `True`.
+- *application_name* - Sets the [application\_name](https://www.postgresql.org/docs/current/runtime-config-logging.html#GUC-APPLICATION-NAME). If your server character encoding is not `ascii` or `utf8`, then you need to provide values as bytes, eg. `'my_application_name'.encode('EUC-JP')`. The default is `None` which means that the server will set the application name.
+- *replication* - Used to run in [streaming replication mode](https://www.postgresql.org/docs/current/protocol-replication.html). If your server character encoding is not `ascii` or `utf8`, then you need to provide values as bytes, eg. `'database'.encode('EUC-JP')`.
+- *sock* - A socket-like object to use for the connection. For example, `sock` could be a plain `socket.socket`, or it could represent an SSH tunnel or perhaps an `ssl.SSLSocket` to an SSL proxy. If an `ssl.SSLContext` is provided, then it will be used to attempt to create an SSL socket from the provided socket. 
+
+
+#### pg8000.dbapi.Date(year, month, day)
+
+Construct an object holding a date value.
+
+This property is part of the `DBAPI 2.0 specification
+<http://www.python.org/dev/peps/pep-0249/>`_.
+
+Returns: `datetime.date`
+
+
+#### pg8000.dbapi.Time(hour, minute, second)
+
+Construct an object holding a time value.
+
+Returns: `datetime.time`
+
+
+#### pg8000.dbapi.Timestamp(year, month, day, hour, minute, second)
+
+Construct an object holding a timestamp value.
+
+Returns: `datetime.datetime`
+
+
+#### pg8000.dbapi.DateFromTicks(ticks)
+
+Construct an object holding a date value from the given ticks value (number of seconds
+since the epoch).
+
+Returns: `datetime.datetime`
+
+
+#### pg8000.dbapi.TimeFromTicks(ticks)
+
+Construct an object holding a time value from the given ticks value (number of seconds
+since the epoch).
+
+Returns: `datetime.time`
+
+
+#### pg8000.dbapi.TimestampFromTicks(ticks)
+
+Construct an object holding a timestamp value from the given ticks value (number of
+seconds since the epoch).
+
+Returns: `datetime.datetime`
+
+
+#### pg8000.dbapi.Binary(value)
+
+Construct an object holding binary data.
 
+Returns: `bytes`
 
-Native API Docs
----------------
 
-`Native API Docs <docs/native_api_docs.rst>`_
+### Generic Exceptions
 
+Pg8000 uses the standard DBAPI 2.0 exception tree as "generic" exceptions. Generally,
+more specific exception types are raised; these specific exception types are derived
+from the generic exceptions.
 
-DB-API 2 Docs
--------------
+#### pg8000.dbapi.Warning
 
-`DB-API 2 Docs <docs/dbapi2_docs.rst>`_
+Generic exception raised for important database warnings like data truncations. This
+exception is not currently used by pg8000.
 
 
-Design Decisions
-----------------
+#### pg8000.dbapi.Error
 
-For the ``Range`` type, the constructor follows the `PostgreSQL range constructor functions <https://www.postgresql.org/docs/current/rangetypes.html#RANGETYPES-CONSTRUCT>`_
-which makes `[closed, open) <https://fhur.me/posts/always-use-closed-open-intervals>`_
+Generic exception that is the base exception of all other error exceptions.
+
+
+#### pg8000.dbapi.InterfaceError
+
+Generic exception raised for errors that are related to the database interface rather
+than the database itself. For example, if the interface attempts to use an SSL
+connection but the server refuses, an InterfaceError will be raised.
+
+
+#### pg8000.dbapi.DatabaseError
+
+Generic exception raised for errors that are related to the database. This exception is
+currently never raised by pg8000.
+
+
+#### pg8000.dbapi.DataError
+
+Generic exception raised for errors that are due to problems with the processed data.
+This exception is not currently raised by pg8000.
+
+
+#### pg8000.dbapi.OperationalError
+
+Generic exception raised for errors that are related to the database's operation and not
+necessarily under the control of the programmer. This exception is currently never
+raised by pg8000.
+
+
+#### pg8000.dbapi.IntegrityError
+
+Generic exception raised when the relational integrity of the database is affected. This
+exception is not currently raised by pg8000.
+
+
+#### pg8000.dbapi.InternalError
+
+Generic exception raised when the database encounters an internal error. This is
+currently only raised when unexpected state occurs in the pg8000 interface itself, and
+is typically the result of a interface bug.
+
+
+#### pg8000.dbapi.ProgrammingError
+
+Generic exception raised for programming errors. For example, this exception is raised
+if more parameter fields are in a query string than there are available parameters.
+
+
+#### pg8000.dbapi.NotSupportedError
+
+Generic exception raised in case a method or database API was used which is not
+supported by the database.
+
+
+### Classes
+
+
+#### pg8000.dbapi.Connection
+
+A connection object is returned by the `pg8000.dbapi.connect()` function. It represents a
+single physical connection to a PostgreSQL database.
+
+
+#### pg8000.dbapi.Connection.autocommit
+
+Following the DB-API specification, autocommit is off by default. It can be turned on by
+setting this boolean pg8000-specific autocommit property to ``True``.
+
+
+#### pg8000.dbapi.Connection.close()
+
+Closes the database connection.
+
+
+#### pg8000.dbapi.Connection.cursor()
+
+Creates a `pg8000.dbapi.Cursor` object bound to this connection.
+
+
+#### pg8000.dbapi.Connection.rollback()
+
+Rolls back the current database transaction.
+
+
+#### pg8000.dbapi.Connection.tpc_begin(xid)
+
+Begins a TPC transaction with the given transaction ID xid. This method should be
+called outside of a transaction (i.e. nothing may have executed since the last
+`commit()`  or `rollback()`. Furthermore, it is an error to call `commit()` or
+`rollback()` within the TPC transaction. A `ProgrammingError` is raised, if the
+application calls `commit()` or `rollback()` during an active TPC transaction.
+
+
+#### pg8000.dbapi.Connection.tpc_commit(xid=None)
+
+When called with no arguments, `tpc_commit()` commits a TPC transaction previously
+prepared with `tpc_prepare()`. If `tpc_commit()` is called prior to
+`tpc_prepare()`, a single phase commit is performed. A transaction manager may choose
+to do this if only a single resource is participating in the global transaction.
+
+When called with a transaction ID `xid`, the database commits the given transaction.
+If an invalid transaction ID is provided, a `ProgrammingError` will be raised. This
+form should be called outside of a transaction, and is intended for use in recovery.
+
+On return, the TPC transaction is ended.
+
+
+#### pg8000.dbapi.Connection.tpc_prepare()
+
+Performs the first phase of a transaction started with `.tpc_begin()`. A
+`ProgrammingError` is be raised if this method is called outside of a TPC transaction.
+
+After calling `tpc_prepare()`, no statements can be executed until `tpc_commit()` or
+`tpc_rollback()` have been called.
+
+
+#### pg8000.dbapi.Connection.tpc_recover()
+
+Returns a list of pending transaction IDs suitable for use with `tpc_commit(xid)` or
+`tpc_rollback(xid)`.
+
+
+#### pg8000.dbapi.Connection.tpc_rollback(xid=None)
+
+When called with no arguments, `tpc_rollback()` rolls back a TPC transaction. It may
+be called before or after `tpc_prepare()`.
+
+When called with a transaction ID xid, it rolls back the given transaction. If an
+invalid transaction ID is provided, a `ProgrammingError` is raised. This form should
+be called outside of a transaction, and is intended for use in recovery.
+
+On return, the TPC transaction is ended.
+
+
+#### pg8000.dbapi.Connection.xid(format_id, global_transaction_id, branch_qualifier)
+
+Create a Transaction IDs (only global_transaction_id is used in pg) format_id and
+branch_qualifier are not used in postgres global_transaction_id may be any string
+identifier supported by postgres returns a tuple (format_id, global_transaction_id,
+branch_qualifier)
+
+
+#### pg8000.dbapi.Cursor
+
+A cursor object is returned by the `pg8000.dbapi.Connection.cursor()` method of a
+connection. It has the following attributes and methods:
+
+##### pg8000.dbapi.Cursor.arraysize
+
+This read/write attribute specifies the number of rows to fetch at a time with
+`pg8000.dbapi.Cursor.fetchmany()`.  It defaults to 1.
+
+
+##### pg8000.dbapi.Cursor.connection
+
+This read-only attribute contains a reference to the connection object (an instance of
+`pg8000.dbapi.Connection`) on which the cursor was created.
+
+
+##### pg8000.dbapi.Cursor.rowcount
+
+This read-only attribute contains the number of rows that the last `execute()` or
+`executemany()` method produced (for query statements like `SELECT`) or affected
+(for modification statements like `UPDATE`.
+
+The value is -1 if:
+
+- No `execute()` or `executemany()` method has been performed yet on the cursor.
+- There was no rowcount associated with the last `execute()`.
+- At least one of the statements executed as part of an `executemany()` had no row
+  count associated with it.
+
+
+##### pg8000.dbapi.Cursor.description
+
+This read-only attribute is a sequence of 7-item sequences. Each value contains
+information describing one result column. The 7 items returned for each column are
+(name, type_code, display_size, internal_size, precision, scale, null_ok). Only the
+first two values are provided by the current implementation.
+
+
+##### pg8000.dbapi.Cursor.close()
+
+Closes the cursor.
+
+
+##### pg8000.dbapi.Cursor.execute(operation, args=None, stream=None)
+
+Executes a database operation. Parameters may be provided as a sequence, or as a
+mapping, depending upon the value of `pg8000.dbapi.paramstyle`. Returns the cursor,
+which may be iterated over.
+
+- *operation* - The SQL statement to execute.
+- *args* - If `pg8000.dbapi.paramstyle` is `qmark`, `numeric`, or `format`, this argument should be an array of parameters to bind into the statement. If `pg8000.dbapi.paramstyle` is `named`, the argument should be a `dict` mapping of parameters. If `pg8000.dbapi.paramstyle` is `pyformat`, the argument value may be either an array or a mapping.
+- *stream* - This is a pg8000 extension for use with the PostgreSQL [COPY](http://www.postgresql.org/docs/current/static/sql-copy.html) command. For a `COPY FROM` the parameter must be a readable file-like object, and for `COPY TO` it must be writable.
+
+
+##### pg8000.dbapi.Cursor.executemany(operation, param_sets)
+
+Prepare a database operation, and then execute it against all parameter sequences or
+mappings provided.
+
+- *operation* - The SQL statement to execute.
+- *parameter_sets* - A sequence of parameters to execute the statement with. The values in the sequence should be sequences or mappings of parameters, the same as the args argument of the `pg8000.dbapi.Cursor.execute()` method.
+
+
+##### pg8000.dbapi.Cursor.callproc(procname, parameters=None)
+
+Call a stored database procedure with the given name and optional parameters.
+
+- *procname* - The name of the procedure to call.
+- *parameters* - A list of parameters.
+
+
+##### pg8000.dbapi.Cursor.fetchall()
+
+Fetches all remaining rows of a query result.
+
+Returns: A sequence, each entry of which is a sequence of field values making up a row.
+
+
+##### pg8000.dbapi.Cursor.fetchmany(size=None)
+
+Fetches the next set of rows of a query result.
+
+- *size* - The number of rows to fetch when called.  If not provided, the `pg8000.dbapi.Cursor.arraysize` attribute value is used instead.
+
+Returns: A sequence, each entry of which is a sequence of field values making up a row.
+If no more rows are available, an empty sequence will be returned.
+
+
+##### pg8000.dbapi.Cursor.fetchone()
+
+Fetch the next row of a query result set.
+
+Returns: A row as a sequence of field values, or `None` if no more rows are available.
+
+
+##### pg8000.dbapi.Cursor.setinputsizes(\*sizes)
+
+Used to set the parameter types of the next query. This is useful if it's difficult for
+pg8000 to work out the types from the parameters themselves (eg. for parameters of type
+None).
+
+- *sizes* - Positional parameters that are either the Python type of the parameter to be sent, or the PostgreSQL oid. Common oids are available as constants such as `pg8000.STRING`, `pg8000.INTEGER`, `pg8000.TIME` etc.
+
+
+##### pg8000.dbapi.Cursor.setoutputsize(size, column=None)
+
+Not implemented by pg8000.
+
+
+#### pg8000.dbapi.Interval
+
+An Interval represents a measurement of time.  In PostgreSQL, an interval is defined in
+the measure of months, days, and microseconds; as such, the pg8000 interval type
+represents the same information.
+
+Note that values of the `pg8000.dbapi.Interval.microseconds`,
+`pg8000.dbapi.Interval.days`, and `pg8000.dbapi.Interval.months` properties are
+independently measured and cannot be converted to each other. A month may be 28, 29, 30,
+or 31 days, and a day may occasionally be lengthened slightly by a leap second.
+
+
+## Design Decisions
+
+For the `Range` type, the constructor follows the [PostgreSQL range constructor functions
+](https://www.postgresql.org/docs/current/rangetypes.html#RANGETYPES-CONSTRUCT)
+which makes [[closed, open)](https://fhur.me/posts/always-use-closed-open-intervals)
 the easiest to express:
 
+```python
 >>> from pg8000.types import Range
 >>>
 >>> pg_range = Range(2, 6)
 
+```
 
-Tests
------
 
-- Install `tox <http://testrun.org/tox/latest/>`_: ``pip install tox``
+## Tests
 
-- Enable the PostgreSQL hstore extension by running the SQL command:
-  ``create extension hstore;``
+- Install [tox](http://testrun.org/tox/latest/): `pip install tox`
 
-- Add a line to ``pg_hba.conf`` for the various authentication options:
+- Enable the PostgreSQL hstore extension by running the SQL command:
+  `create extension hstore;`
 
-::
+- Add a line to `pg_hba.conf` for the various authentication options:
 
-  host    pg8000_md5           all        127.0.0.1/32            md5
-  host    pg8000_gss           all        127.0.0.1/32            gss
-  host    pg8000_password      all        127.0.0.1/32            password
-  host    pg8000_scram_sha_256 all        127.0.0.1/32            scram-sha-256
-  host    all                  all        127.0.0.1/32            trust
+```
+host    pg8000_md5           all        127.0.0.1/32            md5
+host    pg8000_gss           all        127.0.0.1/32            gss
+host    pg8000_password      all        127.0.0.1/32            password
+host    pg8000_scram_sha_256 all        127.0.0.1/32            scram-sha-256
+host    all                  all        127.0.0.1/32            trust
+```
 
-- Set password encryption to ``scram-sha-256`` in ``postgresql.conf``:
-  ``password_encryption = 'scram-sha-256'``
+- Set password encryption to `scram-sha-256` in `postgresql.conf`:
+  `password_encryption = 'scram-sha-256'`
 
-- Set the password for the postgres user: ``ALTER USER postgresql WITH PASSWORD 'pw';``
+- Set the password for the postgres user: `ALTER USER postgresql WITH PASSWORD 'pw';`
 
-- Run ``tox`` from the ``pg8000`` directory: ``tox``
+- Run `tox` from the `pg8000` directory: `tox`
 
 This will run the tests against the Python version of the virtual environment, on the
-machine, and the installed PostgreSQL version listening on port 5432, or the ``PGPORT``
+machine, and the installed PostgreSQL version listening on port 5432, or the `PGPORT`
 environment variable if set.
 
-Benchmarks are run as part of the test suite at ``tests/test_benchmarks.py``.
+Benchmarks are run as part of the test suite at `tests/test_benchmarks.py`.
+
+
+## Doing A Release Of pg8000
+
+Run `tox` to make sure all tests pass, then update the release notes, then do:
+
+
+```
+git tag -a x.y.z -m "version x.y.z"
+rm -r dist
+python -m build
+twine upload dist/*
+```
+
+
+## Release Notes
+
+### Version 1.31.0, 2024-03-31
+
+- Now the `ssl_context` connection parameter can have one of four values:
+  - None - The default, meaning it'll try and connect over SSL but fall back to a plain socket if not.
+  - True - Will try and connect over SSL and fail if not.
+  - False - It'll not try to connect over SSL.
+  - SSLContext object - It'll use this object to connect over SSL.
+
+
+### Version 1.30.5, 2024-02-22
+
+- Fix bug that now means the number of parameters cam be as high as an unsigned 16 bit
+  integer will go.
+
+
+### Version 1.30.4, 2024-01-03
+
+- Add support for more range and multirange types.
+- Make the `Connection.parameter_statuses` property a `dict` rather than a `dequeue`.
+
+
+### Version 1.30.3, 2023-10-31
+
+- Fix problem with PG date overflowing Python types. Now we return the `str` we got from the
+  server if we can't parse it. 
+
+
+### Version 1.30.2, 2023-09-17
+
+- Bug fix where dollar-quoted string constants weren't supported.
+
+
+### Version 1.30.1, 2023-07-29
+
+- There was a problem uploading the previous version (1.30.0) to PyPI because the markup of the README.rst was invalid. There's now a step in the automated tests to check for this.
+
+
+### Version 1.30.0, 2023-07-27
+
+- Remove support for Python 3.7
+- Add a `sock` keyword parameter for creating a connection from a pre-configured socket.
+
+
+### Version 1.29.8, 2023-06-16
+
+- Ranges don't work with legacy API.
+
+
+### Version 1.29.7, 2023-06-16
+
+- Add support for PostgreSQL `range` and `multirange` types. Previously pg8000 would just return them as strings, but now they're returned as `Range` and lists of `Range`.
+- The PostgreSQL `record` type is now returned as a `tuple` of strings, whereas before it was returned as one string.
+
+
+### Version 1.29.6, 2023-05-29
+
+- Fixed two bugs with composite types. Nulls should be represented by an empty string, and in an array of composite types, the elements should be surrounded by double quotes.
+
+
+### Version 1.29.5, 2023-05-09
+
+- Fixed bug where pg8000 didn't handle the case when the number of bytes received from a socket was fewer than requested. This was being interpreted as a network error, but in fact we just needed to wait until more bytes were available.
+- When using the `PGInterval` type, if a response from the server contained the period `millennium`, it wasn't recognised. This was caused by a spelling mistake where we had `millenium` rather than `millennium`.
+- Added support for sending PostgreSQL composite types. If a value is sent as a `tuple`, pg8000 will send it to the server as a `(` delimited composite string.
+
+
+### Version 1.29.4, 2022-12-14
+
+- Fixed bug in `pg8000.dbapi` in the `setinputsizes()` method where if a `size` was a recognized Python type, the method failed.
+
+
+### Version 1.29.3, 2022-10-26
+
+- Upgrade the SCRAM library to version 1.4.3. This adds support for the case where the client supports channel binding but the server doesn't.
+
+
+### Version 1.29.2, 2022-10-09
+
+- Fixed a bug where in a literal array, items such as `\n` and `\r` weren't escaped properly before being sent to the server.
+- Fixed a bug where if the PostgreSQL server has a half-hour time zone set, values of type `timestamp with time zone` failed. This has been fixed by using the `parse` function of the `dateutil` package if the `datetime` parser fails.
+
+
+### Version 1.29.1, 2022-05-23
+
+- In trying to determine if there's been a failed commit, check for `ROLLBACK TO SAVEPOINT`.
+
+
+### Version 1.29.0, 2022-05-21
+
+- Implement a workaround for the [silent failed commit](https://github.com/tlocke/pg8000/issues/36) bug.
+- Previously if an empty string was sent as the query an exception would be raised, but that isn't done now.
+
+
+### Version 1.28.3, 2022-05-18
+
+- Put back `__version__` attributes that were inadvertently removed.
+
+
+### Version 1.28.2, 2022-05-17
+
+- Use a build system that's compliant with PEP517.
+
+
+### Version 1.28.1, 2022-05-17
+
+- If when doing a `COPY FROM` the `stream` parameter is an iterator of `str`, pg8000 used to silently append a newline to the end. That no longer happens.
+
+
+### Version 1.28.0, 2022-05-17
+
+- When using the `COPY FROM` SQL statement, allow the `stream` parameter to be an iterable.
+
+
+### Version 1.27.1, 2022-05-16
+
+- The `seconds` attribute of `PGInterval` is now always a `float`, to cope with fractional seconds.
+- Updated the `interval` parsers for `iso_8601` and `sql_standard` to take account of fractional seconds.
+
+
+### Version 1.27.0, 2022-05-16
+
+- It used to be that by default, if pg8000 received an `interval` type from the server and it was too big to fit into a `datetime.timedelta` then an exception would be raised. Now if an interval is too big for `datetime.timedelta` a `PGInterval` is returned.
+- pg8000 now supports all the output formats for an `interval` (`postgres`, `postgres_verbose`, `iso_8601` and `sql_standard`).
+
+
+### Version 1.26.1, 2022-04-23
+
+- Make sure all tests are run by the GitHub Actions tests on commit.
+- Remove support for Python 3.6
+- Remove support for PostgreSQL 9.6
+
+
+### Version 1.26.0, 2022-04-18
+
+- When connecting, raise an `InterfaceError('network error')` rather than let the underlying `struct.error` float up.
+- Make licence text the same as that used by the OSI. Previously the licence wording differed slightly from the BSD 3 Clause licence at https://opensource.org/licenses/BSD-3-Clause. This meant that automated tools didn't pick it up as being Open Source. The changes are believed to not alter the meaning of the license at all.
+
+
+### Version 1.25.0, 2022-04-17
+
+- Fix more cases where a `ResourceWarning` would be raise because of a socket that had been left open.
+- We now have a single `InterfaceError` with the message 'network error' for all network errors, with the underlying exception held in the `cause` of the exception.
+
+
+### Version 1.24.2, 2022-04-15
+
+- To prevent a `ResourceWarning` close socket if a connection can't be created.
+
+
+### Version 1.24.1, 2022-03-02
+
+- Return pg +/-infinity dates as `str`. Previously +/-infinity pg values would cause an error when returned, but now we return +/-infinity as strings.
 
 
-README.rst
-----------
+### Version 1.24.0, 2022-02-06
 
-This file is written in the `reStructuredText
-<https://docutils.sourceforge.io/docs/user/rst/quickref.html>`_ format. To generate an
-HTML page from it, do:
+- Add SQL escape functions identifier() and literal() to the native API. For use when a query can't be parameterised and the SQL string has to be created using untrusted values.
 
-- Activate the virtual environment: ``source venv/bin/activate``
-- Install ``Sphinx``: ``pip install Sphinx``
-- Run ``rst2html.py``: ``rst2html.py README.rst README.html``
 
+### Version 1.23.0, 2021-11-13
 
-Doing A Release Of pg8000
--------------------------
+- If a query has no parameters, then the query will no longer be parsed. Although there are performance benefits for doing this, the main reason is to avoid query rewriting, which can introduce errors.
 
-Run ``tox`` to make sure all tests pass, then update the release notes, then do:
 
-::
+### Version 1.22.1, 2021-11-10
 
-  git tag -a x.y.z -m "version x.y.z"
-  rm -r dist
-  python -m build
-  twine upload dist/*
+- Fix bug in PGInterval type where `str()` failed for a millennia value.
 
 
-Release Notes
--------------
+### Version 1.22.0, 2021-10-13
 
-`Release Notes <docs/release_notes.rst>`_
+- Rather than specifying the oids in the `Parse` step of the Postgres protocol, pg8000 now omits them, and so Postgres will use the oids it determines from the query. This makes the pg8000 code simpler and also it should also make the nuances of type matching more straightforward.
diff --git a/contrib/python/pg8000/README.md b/contrib/python/pg8000/README.md
new file mode 100644
index 0000000000..2583174426
--- /dev/null
+++ b/contrib/python/pg8000/README.md
@@ -0,0 +1,2214 @@
+# pg8000
+
+pg8000 is a pure-[Python](https://www.python.org/)
+[PostgreSQL](http://www.postgresql.org/) driver that complies with
+[DB-API 2.0](http://www.python.org/dev/peps/pep-0249/). It is tested on Python versions
+3.8+, on CPython and PyPy, and PostgreSQL versions 12+. pg8000's name comes from the
+belief that it is probably about the 8000th PostgreSQL interface for Python. pg8000 is
+distributed under the BSD 3-clause license.
+
+All bug reports, feature requests and contributions are welcome at
+[http://github.com/tlocke/pg8000/](http://github.com/tlocke/pg8000/).
+
+[![Workflow Status Badge](https://github.com/tlocke/pg8000/workflows/pg8000/badge.svg)](https://github.com/tlocke/pg8000/actions)
+
+## Installation
+
+To install pg8000 using `pip` type: `pip install pg8000`
+
+
+## Native API Interactive Examples
+
+pg8000 comes with two APIs, the native pg8000 API and the DB-API 2.0 standard
+API. These are the examples for the native API, and the DB-API 2.0 examples
+follow in the next section.
+
+
+### Basic Example
+
+Import pg8000, connect to the database, create a table, add some rows and then
+query the table:
+
+```python
+>>> import pg8000.native
+>>>
+>>> # Connect to the database with user name postgres
+>>>
+>>> con = pg8000.native.Connection("postgres", password="cpsnow")
+>>>
+>>> # Create a temporary table
+>>>
+>>> con.run("CREATE TEMPORARY TABLE book (id SERIAL, title TEXT)")
+>>>
+>>> # Populate the table
+>>>
+>>> for title in ("Ender's Game", "The Magus"):
+...     con.run("INSERT INTO book (title) VALUES (:title)", title=title)
+>>>
+>>> # Print all the rows in the table
+>>>
+>>> for row in con.run("SELECT * FROM book"):
+...     print(row)
+[1, "Ender's Game"]
+[2, 'The Magus']
+>>>
+>>> con.close()
+
+```
+
+
+### Transactions
+
+Here's how to run groups of SQL statements in a
+[transaction](https://www.postgresql.org/docs/current/tutorial-transactions.html>):
+
+```python
+>>> import pg8000.native
+>>>
+>>> con = pg8000.native.Connection("postgres", password="cpsnow")
+>>>
+>>> con.run("START TRANSACTION")
+>>>
+>>> # Create a temporary table
+>>> con.run("CREATE TEMPORARY TABLE book (id SERIAL, title TEXT)")
+>>>
+>>> for title in ("Ender's Game", "The Magus", "Phineas Finn"):
+...     con.run("INSERT INTO book (title) VALUES (:title)", title=title)
+>>> con.run("COMMIT")
+>>> for row in con.run("SELECT * FROM book"):
+...     print(row)
+[1, "Ender's Game"]
+[2, 'The Magus']
+[3, 'Phineas Finn']
+>>>
+>>> con.close()
+
+```
+
+rolling back a transaction:
+
+```python
+>>> import pg8000.native
+>>>
+>>> con = pg8000.native.Connection("postgres", password="cpsnow")
+>>>
+>>> # Create a temporary table
+>>> con.run("CREATE TEMPORARY TABLE book (id SERIAL, title TEXT)")
+>>>
+>>> for title in ("Ender's Game", "The Magus", "Phineas Finn"):
+...     con.run("INSERT INTO book (title) VALUES (:title)", title=title)
+>>>
+>>> con.run("START TRANSACTION")
+>>> con.run("DELETE FROM book WHERE title = :title", title="Phineas Finn") 
+>>> con.run("ROLLBACK")
+>>> for row in con.run("SELECT * FROM book"):
+...     print(row)
+[1, "Ender's Game"]
+[2, 'The Magus']
+[3, 'Phineas Finn']
+>>>
+>>> con.close()
+
+```
+
+NB. There is [a longstanding bug](https://github.com/tlocke/pg8000/issues/36>) in the
+PostgreSQL server whereby if a `COMMIT` is issued against a failed transaction, the
+transaction is silently rolled back, rather than an error being returned. pg8000
+attempts to detect when this has happened and raise an `InterfaceError`.
+
+
+### Query Using Functions
+
+Another query, using some PostgreSQL functions:
+
+```python
+>>> import pg8000.native
+>>>
+>>> con = pg8000.native.Connection("postgres", password="cpsnow")
+>>>
+>>> con.run("SELECT TO_CHAR(TIMESTAMP '2021-10-10', 'YYYY BC')")
+[['2021 AD']]
+>>>
+>>> con.close()
+
+```
+
+
+### Interval Type
+
+A query that returns the PostgreSQL interval type:
+
+```python
+>>> import pg8000.native
+>>>
+>>> con = pg8000.native.Connection("postgres", password="cpsnow")
+>>>
+>>> import datetime
+>>>
+>>> ts = datetime.date(1980, 4, 27)
+>>> con.run("SELECT timestamp '2013-12-01 16:06' - :ts", ts=ts)
+[[datetime.timedelta(days=12271, seconds=57960)]]
+>>>
+>>> con.close()
+
+```
+
+
+### Point Type
+
+A round-trip with a
+[PostgreSQL point](https://www.postgresql.org/docs/current/datatype-geometric.html)
+type:
+
+```python
+>>> import pg8000.native
+>>>
+>>> con = pg8000.native.Connection("postgres", password="cpsnow")
+>>>
+>>> con.run("SELECT CAST(:pt as point)", pt=(2.3,1))
+[[(2.3, 1.0)]]
+>>>
+>>> con.close()
+
+```
+
+
+### Client Encoding
+
+When communicating with the server, pg8000 uses the character set that the server asks
+it to use (the client encoding). By default the client encoding is the database's
+character set (chosen when the database is created), but the client encoding can be
+changed in a number of ways (eg. setting `CLIENT_ENCODING` in `postgresql.conf`).
+Another way of changing the client encoding is by using an SQL command. For example:
+
+```python
+>>> import pg8000.native
+>>>
+>>> con = pg8000.native.Connection("postgres", password="cpsnow")
+>>>
+>>> con.run("SET CLIENT_ENCODING TO 'UTF8'")
+>>> con.run("SHOW CLIENT_ENCODING")
+[['UTF8']]
+>>>
+>>> con.close()
+
+```
+
+### JSON
+
+[JSON](https://www.postgresql.org/docs/current/datatype-json.html) always comes back
+from the server de-serialized. If the JSON you want to send is a ``dict`` then you can
+just do:
+
+```python
+>>> import pg8000.native
+>>>
+>>> con = pg8000.native.Connection("postgres", password="cpsnow")
+>>>
+>>> val = {'name': 'Apollo 11 Cave', 'zebra': True, 'age': 26.003}
+>>> con.run("SELECT CAST(:apollo as jsonb)", apollo=val)
+[[{'age': 26.003, 'name': 'Apollo 11 Cave', 'zebra': True}]]
+>>>
+>>> con.close()
+
+```
+
+JSON can always be sent in serialized form to the server:
+
+```python
+>>> import json
+>>> import pg8000.native
+>>>
+>>> con = pg8000.native.Connection("postgres", password="cpsnow")
+>>>
+>>>
+>>> val = ['Apollo 11 Cave', True, 26.003]
+>>> con.run("SELECT CAST(:apollo as jsonb)", apollo=json.dumps(val))
+[[['Apollo 11 Cave', True, 26.003]]]
+>>>
+>>> con.close()
+
+```
+
+JSON queries can be have parameters:
+
+```python
+>>> import pg8000.native
+>>>
+>>> with pg8000.native.Connection("postgres", password="cpsnow") as con:
+...     con.run(""" SELECT CAST('{"a":1, "b":2}' AS jsonb) @> :v """, v={"b": 2})
+[[True]]
+
+```
+
+
+### Retrieve Column Metadata From Results
+
+Find the column metadata returned from a query:
+
+```python
+>>> import pg8000.native
+>>>
+>>> con = pg8000.native.Connection("postgres", password="cpsnow")
+>>>
+>>> con.run("create temporary table quark (id serial, name text)")
+>>> for name in ('Up', 'Down'):
+...     con.run("INSERT INTO quark (name) VALUES (:name)", name=name)
+>>> # Now execute the query
+>>>
+>>> con.run("SELECT * FROM quark")
+[[1, 'Up'], [2, 'Down']]
+>>>
+>>> # and retrieve the metadata
+>>>
+>>> con.columns
+[{'table_oid': ..., 'column_attrnum': 1, 'type_oid': 23, 'type_size': 4, 'type_modifier': -1, 'format': 0, 'name': 'id'}, {'table_oid': ..., 'column_attrnum': 2, 'type_oid': 25, 'type_size': -1, 'type_modifier': -1, 'format': 0, 'name': 'name'}]
+>>>
+>>> # Show just the column names
+>>>
+>>> [c['name'] for c in con.columns]
+['id', 'name']
+>>>
+>>> con.close()
+
+```
+
+
+### Notices And Notifications
+
+PostgreSQL [notices
+](https://www.postgresql.org/docs/current/static/plpgsql-errors-and-messages.html) are
+stored in a deque called `Connection.notices` and added using the `append()` method.
+Similarly there are `Connection.notifications` for [notifications
+](https://www.postgresql.org/docs/current/static/sql-notify.html). Here's an example:
+
+```python
+>>> import pg8000.native
+>>>
+>>> con = pg8000.native.Connection("postgres", password="cpsnow")
+>>>
+>>> con.run("LISTEN aliens_landed")
+>>> con.run("NOTIFY aliens_landed")
+>>> # A notification is a tuple containing (backend_pid, channel, payload)
+>>>
+>>> con.notifications[0]
+(..., 'aliens_landed', '')
+>>>
+>>> con.close()
+
+```
+
+
+### Parameter Statuses
+
+[Certain parameter values are reported by the server automatically at connection startup or whenever
+their values change
+](https://www.postgresql.org/docs/current/libpq-status.html#LIBPQ-PQPARAMETERSTATUS>) and
+pg8000 stores the latest values in a dict called `Connection.parameter_statuses`. Here's
+an example where we set the `aplication_name` parameter and then read it from the
+`parameter_statuses`:
+
+```python
+>>> import pg8000.native
+>>>
+>>> con = pg8000.native.Connection(
+...     "postgres", password="cpsnow", application_name='AGI')
+>>>
+>>> con.parameter_statuses['application_name']
+'AGI'
+>>>
+>>> con.close()
+
+```
+
+
+### LIMIT ALL
+
+You might think that the following would work, but in fact it fails:
+
+```python
+>>> import pg8000.native
+>>>
+>>> con = pg8000.native.Connection("postgres", password="cpsnow")
+>>>
+>>> con.run("SELECT 'silo 1' LIMIT :lim", lim='ALL')
+Traceback (most recent call last):
+pg8000.exceptions.DatabaseError: ...
+>>>
+>>> con.close()
+
+```
+
+Instead the [docs say](https://www.postgresql.org/docs/current/sql-select.html) that you
+can send `null` as an alternative to `ALL`, which does work:
+
+```python
+>>> import pg8000.native
+>>>
+>>> con = pg8000.native.Connection("postgres", password="cpsnow")
+>>>
+>>> con.run("SELECT 'silo 1' LIMIT :lim", lim=None)
+[['silo 1']]
+>>>
+>>> con.close()
+
+```
+
+
+### IN and NOT IN
+
+You might think that the following would work, but in fact the server doesn't like it:
+
+```python
+>>> import pg8000.native
+>>>
+>>> con = pg8000.native.Connection("postgres", password="cpsnow")
+>>>
+>>> con.run("SELECT 'silo 1' WHERE 'a' IN :v", v=['a', 'b'])
+Traceback (most recent call last):
+pg8000.exceptions.DatabaseError: ...
+>>>
+>>> con.close()
+
+```
+
+instead you can write it using the [unnest
+](https://www.postgresql.org/docs/current/functions-array.html) function:
+
+```python
+>>> import pg8000.native
+>>>
+>>> con = pg8000.native.Connection("postgres", password="cpsnow")
+>>>
+>>> con.run(
+...     "SELECT 'silo 1' WHERE 'a' IN (SELECT unnest(CAST(:v as varchar[])))",
+...     v=['a', 'b'])
+[['silo 1']]
+>>> con.close()
+
+```
+
+and you can do the same for `NOT IN`.
+
+
+### Many SQL Statements Can't Be Parameterized
+
+In PostgreSQL parameters can only be used for [data values, not identifiers
+](https://www.postgresql.org/docs/current/xfunc-sql.html#XFUNC-SQL-FUNCTION-ARGUMENTS).
+Sometimes this might not work as expected, for example the following fails:
+
+```python
+>>> import pg8000.native
+>>>
+>>> con = pg8000.native.Connection("postgres", password="cpsnow")
+>>>
+>>> channel = 'top_secret'
+>>>
+>>> con.run("LISTEN :channel", channel=channel)
+Traceback (most recent call last):
+pg8000.exceptions.DatabaseError: ...
+>>>
+>>> con.close()
+
+```
+
+It fails because the PostgreSQL server doesn't allow this statement to have any
+parameters. There are many SQL statements that one might think would have parameters,
+but don't. For these cases the SQL has to be created manually, being careful to use the
+`identifier()` and `literal()` functions to escape the values to avoid [SQL injection
+attacks](https://en.wikipedia.org/wiki/SQL_injection>):
+
+```python
+>>> from pg8000.native import Connection, identifier, literal
+>>>
+>>> con = Connection("postgres", password="cpsnow")
+>>>
+>>> channel = 'top_secret'
+>>> payload = 'Aliens Landed!'
+>>> con.run(f"LISTEN {identifier(channel)}")
+>>> con.run(f"NOTIFY {identifier(channel)}, {literal(payload)}")
+>>>
+>>> con.notifications[0]
+(..., 'top_secret', 'Aliens Landed!')
+>>>
+>>> con.close()
+
+```
+
+
+### COPY FROM And TO A Stream
+
+The SQL [COPY](https://www.postgresql.org/docs/current/sql-copy.html) statement can be
+used to copy from and to a file or file-like object. Here's an example using the CSV
+format:
+
+```python
+>>> import pg8000.native
+>>> from io import StringIO
+>>> import csv
+>>>
+>>> con = pg8000.native.Connection("postgres", password="cpsnow")
+>>>
+>>> # Create a CSV file in memory
+>>>
+>>> stream_in = StringIO()
+>>> csv_writer = csv.writer(stream_in)
+>>> csv_writer.writerow([1, "electron"])
+12
+>>> csv_writer.writerow([2, "muon"])
+8
+>>> csv_writer.writerow([3, "tau"])
+7
+>>> stream_in.seek(0)
+0
+>>>
+>>> # Create a table and then copy the CSV into it
+>>>
+>>> con.run("CREATE TEMPORARY TABLE lepton (id SERIAL, name TEXT)")
+>>> con.run("COPY lepton FROM STDIN WITH (FORMAT CSV)", stream=stream_in)
+>>>
+>>> # COPY from a table to a stream
+>>>
+>>> stream_out = StringIO()
+>>> con.run("COPY lepton TO STDOUT WITH (FORMAT CSV)", stream=stream_out)
+>>> stream_out.seek(0)
+0
+>>> for row in csv.reader(stream_out):
+...     print(row)
+['1', 'electron']
+['2', 'muon']
+['3', 'tau']
+>>>
+>>> con.close()
+
+```
+
+It's also possible to COPY FROM an iterable, which is useful if you're creating rows
+programmatically:
+
+```python
+>>> import pg8000.native
+>>>
+>>> con = pg8000.native.Connection("postgres", password="cpsnow")
+>>>
+>>> # Generator function for creating rows
+>>> def row_gen():
+...     for i, name in ((1, "electron"), (2, "muon"), (3, "tau")):
+...         yield f"{i},{name}\n"
+>>>
+>>> # Create a table and then copy the CSV into it
+>>>
+>>> con.run("CREATE TEMPORARY TABLE lepton (id SERIAL, name TEXT)")
+>>> con.run("COPY lepton FROM STDIN WITH (FORMAT CSV)", stream=row_gen())
+>>>
+>>> # COPY from a table to a stream
+>>>
+>>> stream_out = StringIO()
+>>> con.run("COPY lepton TO STDOUT WITH (FORMAT CSV)", stream=stream_out)
+>>> stream_out.seek(0)
+0
+>>> for row in csv.reader(stream_out):
+...     print(row)
+['1', 'electron']
+['2', 'muon']
+['3', 'tau']
+>>>
+>>> con.close()
+
+```
+
+
+### Execute Multiple SQL Statements
+
+If you want to execute a series of SQL statements (eg. an `.sql` file), you can run
+them as expected:
+
+```python
+>>> import pg8000.native
+>>>
+>>> con = pg8000.native.Connection("postgres", password="cpsnow")
+>>>
+>>> statements = "SELECT 5; SELECT 'Erich Fromm';"
+>>>
+>>> con.run(statements)
+[[5], ['Erich Fromm']]
+>>>
+>>> con.close()
+
+```
+
+The only caveat is that when executing multiple statements you can't have any
+parameters.
+
+
+### Quoted Identifiers in SQL
+
+Say you had a column called `My Column`. Since it's case sensitive and contains a space,
+you'd have to [surround it by double quotes
+](https://www.postgresql.org/docs/current/sql-syntax-lexical.html#SQL-SYNTAX-IDENTIFIER).
+But you can't do:
+
+```python
+>>> import pg8000.native
+>>>
+>>> con = pg8000.native.Connection("postgres", password="cpsnow")
+>>>
+>>> con.run("select 'hello' as "My Column"")
+Traceback (most recent call last):
+SyntaxError: invalid syntax...
+>>>
+>>> con.close()
+
+```
+
+since Python uses double quotes to delimit string literals, so one solution is
+to use Python's [triple quotes
+](https://docs.python.org/3/tutorial/introduction.html#strings) to delimit the string
+instead:
+
+```python
+>>> import pg8000.native
+>>>
+>>> con = pg8000.native.Connection("postgres", password="cpsnow")
+>>>
+>>> con.run('''SELECT 'hello' AS "My Column"''')
+[['hello']]
+>>>
+>>> con.close()
+
+```
+
+another solution, that's especially useful if the identifier comes from an untrusted
+source, is to use the `identifier()` function, which correctly quotes and escapes the
+identifier as needed:
+
+```python
+>>> from pg8000.native import Connection, identifier
+>>>
+>>> con = Connection("postgres", password="cpsnow")
+>>>
+>>> sql = f"SELECT 'hello' as {identifier('My Column')}"
+>>> print(sql)
+SELECT 'hello' as "My Column"
+>>>
+>>> con.run(sql)
+[['hello']]
+>>>
+>>> con.close()
+
+```
+
+this approach guards against [SQL injection attacks
+](https://en.wikipedia.org/wiki/SQL_injection). One thing to note if you're using
+explicit schemas (eg. `pg_catalog.pg_language`) is that the schema name and table name
+are both separate identifiers. So to escape them you'd do:
+
+```python
+>>> from pg8000.native import Connection, identifier
+>>>
+>>> con = Connection("postgres", password="cpsnow")
+>>>
+>>> query = (
+...     f"SELECT lanname FROM {identifier('pg_catalog')}.{identifier('pg_language')} "
+...     f"WHERE lanname = 'sql'"
+... )
+>>> print(query)
+SELECT lanname FROM pg_catalog.pg_language WHERE lanname = 'sql'
+>>>
+>>> con.run(query)
+[['sql']]
+>>>
+>>> con.close()
+
+```
+
+
+### Custom adapter from a Python type to a PostgreSQL type
+
+pg8000 has a mapping from Python types to PostgreSQL types for when it needs to send
+SQL parameters to the server. The default mapping that comes with pg8000 is designed to
+work well in most cases, but you might want to add or replace the default mapping.
+
+A Python `datetime.timedelta` object is sent to the server as a PostgreSQL
+`interval` type,  which has the `oid` 1186. But let's say we wanted to create our
+own Python class to be sent as an `interval` type. Then we'd have to register an
+adapter:
+
+```python
+>>> import pg8000.native
+>>>
+>>> con = pg8000.native.Connection("postgres", password="cpsnow")
+>>>
+>>> class MyInterval(str):
+...     pass
+>>>
+>>> def my_interval_out(my_interval):
+...     return my_interval  # Must return a str
+>>>
+>>> con.register_out_adapter(MyInterval, my_interval_out)
+>>> con.run("SELECT CAST(:interval as interval)", interval=MyInterval("2 hours"))
+[[datetime.timedelta(seconds=7200)]]
+>>>
+>>> con.close()
+
+```
+
+Note that it still came back as a `datetime.timedelta` object because we only changed
+the mapping from Python to PostgreSQL. See below for an example of how to change the
+mapping from PostgreSQL to Python.
+
+
+### Custom adapter from a PostgreSQL type to a Python type
+
+pg8000 has a mapping from PostgreSQL types to Python types for when it receives SQL
+results from the server. The default mapping that comes with pg8000 is designed to work
+well in most cases, but you might want to add or replace the default mapping.
+
+If pg8000 receives PostgreSQL `interval` type, which has the `oid` 1186, it converts
+it into a Python `datetime.timedelta` object. But let's say we wanted to create our
+own Python class to be used instead of `datetime.timedelta`. Then we'd have to
+register an adapter:
+
+```python
+>>> import pg8000.native
+>>>
+>>> con = pg8000.native.Connection("postgres", password="cpsnow")
+>>>
+>>> class MyInterval(str):
+...     pass
+>>>
+>>> def my_interval_in(my_interval_str):  # The parameter is of type str
+...     return MyInterval(my_interval)
+>>>
+>>> con.register_in_adapter(1186, my_interval_in)
+>>> con.run("SELECT \'2 years'")
+[['2 years']]
+>>>
+>>> con.close()
+
+```
+
+Note that registering the 'in' adapter only afects the mapping from the PostgreSQL type
+to the Python type. See above for an example of how to change the mapping from
+PostgreSQL to Python.
+
+
+### Could Not Determine Data Type Of Parameter
+
+Sometimes you'll get the `could not determine data type of parameter` error message from
+the server:
+
+```python
+>>> import pg8000.native
+>>>
+>>> con = pg8000.native.Connection("postgres", password="cpsnow")
+>>>
+>>> con.run("SELECT :v IS NULL", v=None)
+Traceback (most recent call last):
+pg8000.exceptions.DatabaseError: {'S': 'ERROR', 'V': 'ERROR', 'C': '42P18', 'M': 'could not determine data type of parameter $1', 'F': 'postgres.c', 'L': '...', 'R': '...'}
+>>>
+>>> con.close()
+
+```
+
+One way of solving it is to put a `CAST` in the SQL:
+
+```python
+>>> import pg8000.native
+>>>
+>>> con = pg8000.native.Connection("postgres", password="cpsnow")
+>>>
+>>> con.run("SELECT cast(:v as TIMESTAMP) IS NULL", v=None)
+[[True]]
+>>>
+>>> con.close()
+
+```
+
+Another way is to override the type that pg8000 sends along with each parameter:
+
+```python
+>>> import pg8000.native
+>>>
+>>> con = pg8000.native.Connection("postgres", password="cpsnow")
+>>>
+>>> con.run("SELECT :v IS NULL", v=None, types={'v': pg8000.native.TIMESTAMP})
+[[True]]
+>>>
+>>> con.close()
+
+```
+
+
+### Prepared Statements
+
+[Prepared statements](https://www.postgresql.org/docs/current/sql-prepare.html) can be
+useful in improving performance when you have a statement that's executed repeatedly.
+Here's an example:
+
+```python
+>>> import pg8000.native
+>>>
+>>> con = pg8000.native.Connection("postgres", password="cpsnow")
+>>>
+>>> # Create the prepared statement
+>>> ps = con.prepare("SELECT cast(:v as varchar)")
+>>>
+>>> # Execute the statement repeatedly
+>>> ps.run(v="speedy")
+[['speedy']]
+>>> ps.run(v="rapid")
+[['rapid']]
+>>> ps.run(v="swift")
+[['swift']]
+>>>
+>>> # Close the prepared statement, releasing resources on the server
+>>> ps.close()
+>>>
+>>> con.close()
+
+```
+
+
+### Use Environment Variables As Connection Defaults
+
+You might want to use the current user as the database username for example:
+
+```python
+>>> import pg8000.native
+>>> import getpass
+>>>
+>>> # Connect to the database with current user name
+>>> username = getpass.getuser()
+>>> connection = pg8000.native.Connection(username, password="cpsnow")
+>>>
+>>> connection.run("SELECT 'pilau'")
+[['pilau']]
+>>>
+>>> connection.close()
+
+```
+
+or perhaps you may want to use some of the same [environment variables that libpg uses
+](https://www.postgresql.org/docs/current/libpq-envars.html):
+
+```python
+>>> import pg8000.native
+>>> from os import environ
+>>>
+>>> username = environ.get('PGUSER', 'postgres')
+>>> password = environ.get('PGPASSWORD', 'cpsnow')
+>>> host = environ.get('PGHOST', 'localhost')
+>>> port = environ.get('PGPORT', '5432')
+>>> database = environ.get('PGDATABASE')
+>>>
+>>> connection = pg8000.native.Connection(
+...     username, password=password, host=host, port=port, database=database)
+>>>
+>>> connection.run("SELECT 'Mr Cairo'")
+[['Mr Cairo']]
+>>>
+>>> connection.close()
+
+```
+
+It might be asked, why doesn't pg8000 have this behaviour built in? The thinking
+follows the second aphorism of [The Zen of Python
+](https://www.python.org/dev/peps/pep-0020/):
+
+> Explicit is better than implicit.
+
+So we've taken the approach of only being able to set connection parameters using the
+`pg8000.native.Connection()` constructor.
+
+
+### Connect To PostgreSQL Over SSL
+
+By default the `ssl_context` connection parameter has the value `None` which means pg8000 will
+attempt to connect to the server using SSL, and then fall back to a plain socket if the server
+refuses SSL. If you want to *require* SSL (ie. to fail if it's not achieved) then you can set
+`ssl_context=True`:
+
+```python
+>>> import pg8000.native
+>>>
+>>> con = pg8000.native.Connection('postgres', password="cpsnow", ssl_context=True)
+>>> con.run("SELECT 'The game is afoot!'")
+[['The game is afoot!']]
+>>> con.close()
+
+```
+
+If on the other hand you want to connect over SSL with custom settings, set the `ssl_context`
+parameter to an [`ssl.SSLContext`](https://docs.python.org/3/library/ssl.html#ssl.SSLContext) object:
+
+```python
+>>> import pg8000.native
+>>> import ssl
+>>>
+>>> ssl_context = ssl.create_default_context()
+>>> ssl_context.check_hostname = False
+>>> ssl_context.verify_mode = ssl.CERT_NONE
+>>> con = pg8000.native.Connection(
+...     'postgres', password="cpsnow", ssl_context=ssl_context)
+>>> con.run("SELECT 'Work is the curse of the drinking classes.'")
+[['Work is the curse of the drinking classes.']]
+>>> con.close()
+
+```
+
+It may be that your PostgreSQL server is behind an SSL proxy server in which case you
+can give pg8000 the SSL socket with the `sock` parameter, and then set
+`ssl_context=False` which means that no attempt will be made to create an SSL connection
+to the server.
+
+
+### Server-Side Cursors
+
+You can use the SQL commands [DECLARE
+](https://www.postgresql.org/docs/current/sql-declare.html),
+[FETCH](https://www.postgresql.org/docs/current/sql-fetch.html),
+[MOVE](https://www.postgresql.org/docs/current/sql-move.html) and
+[CLOSE](https://www.postgresql.org/docs/current/sql-close.html) to manipulate
+server-side cursors. For example:
+
+```python
+>>> import pg8000.native
+>>>
+>>> con = pg8000.native.Connection('postgres', password="cpsnow")
+>>> con.run("START TRANSACTION")
+>>> con.run("DECLARE c SCROLL CURSOR FOR SELECT * FROM generate_series(1, 100)")
+>>> con.run("FETCH FORWARD 5 FROM c")
+[[1], [2], [3], [4], [5]]
+>>> con.run("MOVE FORWARD 50 FROM c")
+>>> con.run("FETCH BACKWARD 10 FROM c")
+[[54], [53], [52], [51], [50], [49], [48], [47], [46], [45]]
+>>> con.run("CLOSE c")
+>>> con.run("ROLLBACK")
+>>>
+>>> con.close()
+
+```
+
+
+### BLOBs (Binary Large Objects)
+
+There's a set of [SQL functions
+](https://www.postgresql.org/docs/current/lo-funcs.html) for manipulating BLOBs.
+Here's an example:
+
+```python
+>>> import pg8000.native
+>>>
+>>> con = pg8000.native.Connection('postgres', password="cpsnow")
+>>>
+>>> # Create a BLOB and get its oid
+>>> data = b'hello'
+>>> res = con.run("SELECT lo_from_bytea(0, :data)", data=data)
+>>> oid = res[0][0]
+>>>
+>>> # Create a table and store the oid of the BLOB
+>>> con.run("CREATE TEMPORARY TABLE image (raster oid)")
+>>>
+>>> con.run("INSERT INTO image (raster) VALUES (:oid)", oid=oid)
+>>> # Retrieve the data using the oid
+>>> con.run("SELECT lo_get(:oid)", oid=oid)
+[[b'hello']]
+>>>
+>>> # Add some data to the end of the BLOB
+>>> more_data = b' all'
+>>> offset = len(data)
+>>> con.run(
+...     "SELECT lo_put(:oid, :offset, :data)",
+...     oid=oid, offset=offset, data=more_data)
+[['']]
+>>> con.run("SELECT lo_get(:oid)", oid=oid)
+[[b'hello all']]
+>>>
+>>> # Download a part of the data
+>>> con.run("SELECT lo_get(:oid, 6, 3)", oid=oid)
+[[b'all']]
+>>>
+>>> con.close()
+
+```
+
+
+### Replication Protocol
+
+The PostgreSQL [Replication Protocol
+](https://www.postgresql.org/docs/current/protocol-replication.html) is supported using
+the `replication` keyword when creating a connection:
+
+```python
+>>> import pg8000.native
+>>>
+>>> con = pg8000.native.Connection(
+...    'postgres', password="cpsnow", replication="database")
+>>>
+>>> con.run("IDENTIFY_SYSTEM")
+[['...', 1, '.../...', 'postgres']]
+>>>
+>>> con.close()
+
+```
+
+
+## DB-API 2 Interactive Examples
+
+These examples stick to the DB-API 2.0 standard.
+
+
+### Basic Example
+
+Import pg8000, connect to the database, create a table, add some rows and then query the
+table:
+
+```python
+>>> import pg8000.dbapi
+>>>
+>>> conn = pg8000.dbapi.connect(user="postgres", password="cpsnow")
+>>> cursor = conn.cursor()
+>>> cursor.execute("CREATE TEMPORARY TABLE book (id SERIAL, title TEXT)")
+>>> cursor.execute(
+...     "INSERT INTO book (title) VALUES (%s), (%s) RETURNING id, title",
+...     ("Ender's Game", "Speaker for the Dead"))
+>>> results = cursor.fetchall()
+>>> for row in results:
+...     id, title = row
+...     print("id = %s, title = %s" % (id, title))
+id = 1, title = Ender's Game
+id = 2, title = Speaker for the Dead
+>>> conn.commit()
+>>>
+>>> conn.close()
+
+```
+
+
+### Query Using Functions
+
+Another query, using some PostgreSQL functions:
+
+```python
+>>> import pg8000.dbapi
+>>>
+>>> con = pg8000.dbapi.connect(user="postgres", password="cpsnow")
+>>> cursor = con.cursor()
+>>>
+>>> cursor.execute("SELECT TO_CHAR(TIMESTAMP '2021-10-10', 'YYYY BC')")
+>>> cursor.fetchone()
+['2021 AD']
+>>>
+>>> con.close()
+
+```
+
+
+### Interval Type
+
+A query that returns the PostgreSQL interval type:
+
+```python
+>>> import datetime
+>>> import pg8000.dbapi
+>>>
+>>> con = pg8000.dbapi.connect(user="postgres", password="cpsnow")
+>>> cursor = con.cursor()
+>>>
+>>> cursor.execute("SELECT timestamp '2013-12-01 16:06' - %s",
+... (datetime.date(1980, 4, 27),))
+>>> cursor.fetchone()
+[datetime.timedelta(days=12271, seconds=57960)]
+>>>
+>>> con.close()
+
+```
+
+
+### Point Type
+
+A round-trip with a [PostgreSQL point
+](https://www.postgresql.org/docs/current/datatype-geometric.html) type:
+
+```python
+>>> import pg8000.dbapi
+>>>
+>>> con = pg8000.dbapi.connect(user="postgres", password="cpsnow")
+>>> cursor = con.cursor()
+>>>
+>>> cursor.execute("SELECT cast(%s as point)", ((2.3,1),))
+>>> cursor.fetchone()
+[(2.3, 1.0)]
+>>>
+>>> con.close()
+
+```
+
+
+### Numeric Parameter Style
+
+pg8000 supports all the DB-API parameter styles. Here's an example of using the
+'numeric' parameter style:
+
+```python
+>>> import pg8000.dbapi
+>>>
+>>> pg8000.dbapi.paramstyle = "numeric"
+>>> con = pg8000.dbapi.connect(user="postgres", password="cpsnow")
+>>> cursor = con.cursor()
+>>>
+>>> cursor.execute("SELECT array_prepend(:1, CAST(:2 AS int[]))", (500, [1, 2, 3, 4],))
+>>> cursor.fetchone()
+[[500, 1, 2, 3, 4]]
+>>> pg8000.dbapi.paramstyle = "format"
+>>>
+>>> con.close()
+
+```
+
+
+### Autocommit
+
+Following the DB-API specification, autocommit is off by default. It can be turned on by
+using the autocommit property of the connection:
+
+```python
+>>> import pg8000.dbapi
+>>>
+>>> con = pg8000.dbapi.connect(user="postgres", password="cpsnow")
+>>> con.autocommit = True
+>>>
+>>> cur = con.cursor()
+>>> cur.execute("vacuum")
+>>> conn.autocommit = False
+>>> cur.close()
+>>>
+>>> con.close()
+
+```
+
+
+### Client Encoding
+
+When communicating with the server, pg8000 uses the character set that the server asks
+it to use (the client encoding). By default the client encoding is the database's
+character set (chosen when the database is created), but the client encoding can be
+changed in a number of ways (eg. setting `CLIENT_ENCODING` in `postgresql.conf`).
+Another way of changing the client encoding is by using an SQL command. For example:
+
+```python
+>>> import pg8000.dbapi
+>>>
+>>> con = pg8000.dbapi.connect(user="postgres", password="cpsnow")
+>>> cur = con.cursor()
+>>> cur.execute("SET CLIENT_ENCODING TO 'UTF8'")
+>>> cur.execute("SHOW CLIENT_ENCODING")
+>>> cur.fetchone()
+['UTF8']
+>>> cur.close()
+>>>
+>>> con.close()
+
+```
+
+
+### JSON
+
+JSON is sent to the server serialized, and returned de-serialized. Here's an example:
+
+```python
+>>> import json
+>>> import pg8000.dbapi
+>>>
+>>> con = pg8000.dbapi.connect(user="postgres", password="cpsnow")
+>>> cur = con.cursor()
+>>> val = ['Apollo 11 Cave', True, 26.003]
+>>> cur.execute("SELECT cast(%s as json)", (json.dumps(val),))
+>>> cur.fetchone()
+[['Apollo 11 Cave', True, 26.003]]
+>>> cur.close()
+>>>
+>>> con.close()
+
+```
+
+JSON queries can be have parameters:
+
+```python
+>>> import pg8000.dbapi
+>>>
+>>> with pg8000.dbapi.connect("postgres", password="cpsnow") as con:
+...     cur = con.cursor()
+...     cur.execute(""" SELECT CAST('{"a":1, "b":2}' AS jsonb) @> %s """, ({"b": 2},))
+...     for row in cur.fetchall():
+...         print(row)
+[True]
+
+```
+
+
+### Retrieve Column Names From Results
+
+Use the columns names retrieved from a query:
+
+```python
+>>> import pg8000
+>>> conn = pg8000.dbapi.connect(user="postgres", password="cpsnow")
+>>> c = conn.cursor()
+>>> c.execute("create temporary table quark (id serial, name text)")
+>>> c.executemany("INSERT INTO quark (name) VALUES (%s)", (("Up",), ("Down",)))
+>>> #
+>>> # Now retrieve the results
+>>> #
+>>> c.execute("select * from quark")
+>>> rows = c.fetchall()
+>>> keys = [k[0] for k in c.description]
+>>> results = [dict(zip(keys, row)) for row in rows]
+>>> assert results == [{'id': 1, 'name': 'Up'}, {'id': 2, 'name': 'Down'}]
+>>>
+>>> conn.close()
+
+```
+
+
+### COPY from and to a file
+
+The SQL [COPY](https://www.postgresql.org/docs/current/sql-copy.html) statement can
+be used to copy from and to a file or file-like object:
+
+```python
+>>> from io import StringIO
+>>> import pg8000.dbapi
+>>>
+>>> con = pg8000.dbapi.connect(user="postgres", password="cpsnow")
+>>> cur = con.cursor()
+>>> #
+>>> # COPY from a stream to a table
+>>> #
+>>> stream_in = StringIO('1\telectron\n2\tmuon\n3\ttau\n')
+>>> cur = con.cursor()
+>>> cur.execute("create temporary table lepton (id serial, name text)")
+>>> cur.execute("COPY lepton FROM stdin", stream=stream_in)
+>>> #
+>>> # Now COPY from a table to a stream
+>>> #
+>>> stream_out = StringIO()
+>>> cur.execute("copy lepton to stdout", stream=stream_out)
+>>> stream_out.getvalue()
+'1\telectron\n2\tmuon\n3\ttau\n'
+>>>
+>>> con.close()
+
+```
+
+
+### Server-Side Cursors
+
+You can use the SQL commands [DECLARE
+](https://www.postgresql.org/docs/current/sql-declare.html),
+[FETCH](https://www.postgresql.org/docs/current/sql-fetch.html),
+[MOVE](https://www.postgresql.org/docs/current/sql-move.html) and
+[CLOSE](https://www.postgresql.org/docs/current/sql-close.html) to manipulate
+server-side cursors. For example:
+
+```python
+>>> import pg8000.dbapi
+>>>
+>>> con = pg8000.dbapi.connect(user="postgres", password="cpsnow")
+>>> cur = con.cursor()
+>>> cur.execute("START TRANSACTION")
+>>> cur.execute(
+...    "DECLARE c SCROLL CURSOR FOR SELECT * FROM generate_series(1, 100)")
+>>> cur.execute("FETCH FORWARD 5 FROM c")
+>>> cur.fetchall()
+([1], [2], [3], [4], [5])
+>>> cur.execute("MOVE FORWARD 50 FROM c")
+>>> cur.execute("FETCH BACKWARD 10 FROM c")
+>>> cur.fetchall()
+([54], [53], [52], [51], [50], [49], [48], [47], [46], [45])
+>>> cur.execute("CLOSE c")
+>>> cur.execute("ROLLBACK")
+>>>
+>>> con.close()
+
+```
+
+
+### BLOBs (Binary Large Objects)
+
+There's a set of [SQL functions
+](https://www.postgresql.org/docs/current/lo-funcs.html) for manipulating BLOBs.
+Here's an example:
+
+```python
+>>> import pg8000.dbapi
+>>>
+>>> con = pg8000.dbapi.connect(user="postgres", password="cpsnow")
+>>> cur = con.cursor()
+>>>
+>>> # Create a BLOB and get its oid
+>>> data = b'hello'
+>>> cur = con.cursor()
+>>> cur.execute("SELECT lo_from_bytea(0, %s)", [data])
+>>> oid = cur.fetchone()[0]
+>>>
+>>> # Create a table and store the oid of the BLOB
+>>> cur.execute("CREATE TEMPORARY TABLE image (raster oid)")
+>>> cur.execute("INSERT INTO image (raster) VALUES (%s)", [oid])
+>>>
+>>> # Retrieve the data using the oid
+>>> cur.execute("SELECT lo_get(%s)", [oid])
+>>> cur.fetchall()
+([b'hello'],)
+>>>
+>>> # Add some data to the end of the BLOB
+>>> more_data = b' all'
+>>> offset = len(data)
+>>> cur.execute("SELECT lo_put(%s, %s, %s)", [oid, offset, more_data])
+>>> cur.execute("SELECT lo_get(%s)", [oid])
+>>> cur.fetchall()
+([b'hello all'],)
+>>>
+>>> # Download a part of the data
+>>> cur.execute("SELECT lo_get(%s, 6, 3)", [oid])
+>>> cur.fetchall()
+([b'all'],)
+>>>
+>>> con.close()
+
+```
+
+
+### Parameter Limit
+
+The protocol that PostgreSQL uses limits the number of parameters to 6,5535. The following will give
+an error:
+
+```python
+>>> import pg8000.dbapi
+>>>
+>>> conn = pg8000.dbapi.connect(user="postgres", password="cpsnow")
+>>> cursor = conn.cursor()
+>>> SIZE = 100000
+>>> cursor.execute(
+...    f"SELECT 1 WHERE 1 IN ({','.join(['%s'] * SIZE)})",
+...    [1] * SIZE,
+... )
+Traceback (most recent call last):
+struct.error: 'H' format requires 0 <= number <= 65535
+
+```
+
+One way of working round this problem is to use the [unnest
+](https://www.postgresql.org/docs/current/functions-array.html) function:
+
+```python
+>>> import pg8000.dbapi
+>>>
+>>> conn = pg8000.dbapi.connect(user="postgres", password="cpsnow")
+>>> cursor = conn.cursor()
+>>> SIZE = 100000
+>>> cursor.execute(
+...    "SELECT 1 WHERE 1 IN (SELECT unnest(CAST(%s AS int[])))",
+...    [[1] * SIZE],
+... )
+>>> conn.close()
+
+```
+
+
+## Type Mapping
+
+The following table shows the default mapping between Python types and PostgreSQL types,
+and vice versa.
+
+If pg8000 doesn't recognize a type that it receives from PostgreSQL, it will return it
+as a ``str`` type. This is how pg8000 handles PostgreSQL ``enum`` and XML types. It's
+possible to change the default mapping using adapters (see the examples).
+
+| Python Type           | PostgreSQL Type | Notes                                   |
+|-----------------------|-----------------|-----------------------------------------|
+| bool                  | bool            |                                         |
+| int                   | int4            |                                         |
+| str                   | text            |                                         |
+| float                 | float8          |                                         |
+| decimal.Decimal       | numeric         |                                         |
+| bytes                 | bytea           |                                         |
+| datetime.datetime (without tzinfo) | timestamp without timezone | +/-infinity PostgreSQL values are represented as Python `str` values. If a `timestamp` is too big for `datetime.datetime` then a `str` is used. |
+| datetime.datetime (with tzinfo) | timestamp with timezone | +/-infinity PostgreSQL values are represented as Python `str` values. If a `timestamptz` is too big for `datetime.datetime` then a `str` is used. |
+| datetime.date | date | +/-infinity PostgreSQL values are represented as Python `str` values. If a `date` is too big for a `datetime.date` then a `str` is used. |
+| datetime.time         | time without time zone |                                  |
+| datetime.timedelta | interval | If an ``interval`` is too big for `datetime.timedelta` then a `PGInterval`  is used. |
+| None                  | NULL            |                                         |
+| uuid.UUID             | uuid            |                                         |
+| ipaddress.IPv4Address | inet            |                                         |
+| ipaddress.IPv6Address | inet            |                                         |
+| ipaddress.IPv4Network | inet            |                                         |
+| ipaddress.IPv6Network | inet            |                                         |
+| int                   | xid             |                                         |
+| list of int           | INT4[]          |                                         |
+| list of float         | FLOAT8[]        |                                         |
+| list of bool          | BOOL[]          |                                         |
+| list of str           | TEXT[]          |                                         |
+| int                   | int2vector      | Only from PostgreSQL to Python          |
+| JSON                  | json, jsonb     | The Python JSON is provided as a Python serialized string. Results returned as de-serialized JSON. |
+| pg8000.Range | range | PostgreSQL multirange types are | represented in Python as a list of  range types. |
+| tuple                 | composite type  | Only from Python to PostgreSQL          |
+
+
+## Theory Of Operation
+
+> A concept is tolerated inside the microkernel only if moving it outside the kernel,
+> i.e., permitting competing implementations, would prevent the implementation of the
+> system's required functionality.
+>
+> -- Jochen Liedtke, Liedtke's minimality principle
+
+pg8000 is designed to be used with one thread per connection.
+
+pg8000 communicates with the database using the [PostgreSQL Frontend/Backend Protocol
+](https://www.postgresql.org/docs/current/protocol.html) (FEBE). If a query has no
+parameters, pg8000 uses the 'simple query protocol'. If a query does have parameters,
+pg8000 uses the 'extended query protocol' with unnamed prepared statements. The steps
+for a query with parameters are:
+
+1. Query comes in.
+
+2. Send a PARSE message to the server to create an unnamed prepared statement.
+
+3. Send a BIND message to run against the unnamed prepared statement, resulting in an
+   unnamed portal on the server.
+
+4. Send an EXECUTE message to read all the results from the portal.
+
+It's also possible to use named prepared statements. In which case the prepared
+statement persists on the server, and represented in pg8000 using a
+`PreparedStatement` object. This means that the PARSE step gets executed once up
+front, and then only the BIND and EXECUTE steps are repeated subsequently.
+
+There are a lot of PostgreSQL data types, but few primitive data types in Python. By
+default, pg8000 doesn't send PostgreSQL data type information in the PARSE step, in
+which case PostgreSQL assumes the types implied by the SQL statement. In some cases
+PostgreSQL can't work out a parameter type and so an [explicit cast
+](https://www.postgresql.org/docs/current/static/sql-expressions.html#SQL-SYNTAX-TYPE-CASTS)
+can be used in the SQL.
+
+In the FEBE protocol, each query parameter can be sent to the server either as binary
+or text according to the format code. In pg8000 the parameters are always sent as text.
+
+Occasionally, the network connection between pg8000 and the server may go down. If
+pg8000 encounters a network problem it'll raise an `InterfaceError` with the message
+`network error` and with the original exception set as the [cause
+](https://docs.python.org/3/reference/simple_stmts.html#the-raise-statement).
+
+
+## Native API Docs
+
+### pg8000.native.Error
+
+Generic exception that is the base exception of the other error exceptions.
+
+
+### pg8000.native.InterfaceError
+
+For errors that originate within pg8000.
+
+
+### pg8000.native.DatabaseError
+
+For errors that originate from the server.
+
+### pg8000.native.Connection(user, host='localhost', database=None, port=5432, password=None, source\_address=None, unix\_sock=None, ssl\_context=None, timeout=None, tcp\_keepalive=True, application\_name=None, replication=None, sock=None)
+
+Creates a connection to a PostgreSQL database.
+
+- *user* - The username to connect to the PostgreSQL server with. If your server character encoding is not `ascii` or `utf8`, then you need to provide `user` as bytes, eg. `'my_name'.encode('EUC-JP')`.
+- *host* - The hostname of the PostgreSQL server to connect with. Providing this parameter is necessary for TCP/IP connections. One of either `host` or `unix_sock` must be provided. The default is `localhost`.
+- *database* - The name of the database instance to connect with. If `None` then the PostgreSQL server will assume the database name is the same as the username. If your server character encoding is not `ascii` or `utf8`, then you need to provide `database` as bytes, eg. `'my_db'.encode('EUC-JP')`.
+- *port* - The TCP/IP port of the PostgreSQL server instance.  This parameter defaults to `5432`, the registered common port of PostgreSQL TCP/IP servers.
+- *password* - The user password to connect to the server with. This parameter is optional; if omitted and the database server requests password-based authentication, the connection will fail to open. If this parameter is provided but not requested by the server, no error will occur. If your server character encoding is not `ascii` or `utf8`, then you need to provide `password` as bytes, eg.  `'my_password'.encode('EUC-JP')`.
+- *source_address* - The source IP address which initiates the connection to the PostgreSQL server. The default is `None` which means that the operating system will choose the source address.
+- *unix_sock* - The path to the UNIX socket to access the database through, for example, `'/tmp/.s.PGSQL.5432'`. One of either `host` or `unix_sock` must be provided.
+- *ssl_context* - This governs SSL encryption for TCP/IP sockets. It can have four values:
+  - `None`, the default, meaning that an attempt will be made to connect over SSL, but if this is rejected by the server then pg8000 will fall back to using a plain socket.
+  - `True`, means use SSL with an `ssl.SSLContext` with the minimum of checks.
+  - `False`, means to not attempt to create an SSL socket.
+  - An instance of `ssl.SSLContext` which will be used to create the SSL connection.
+- *timeout* - This is the time in seconds before the connection to the server will time out. The default is `None` which means no timeout.
+- *tcp_keepalive* - If `True` then use [TCP keepalive](https://en.wikipedia.org/wiki/Keepalive#TCP_keepalive). The default is `True`.
+- *application_name* - Sets the [application\_name](https://www.postgresql.org/docs/current/runtime-config-logging.html#GUC-APPLICATION-NAME). If your server character encoding is not `ascii` or `utf8`, then you need to provide values as bytes, eg.  `'my_application_name'.encode('EUC-JP')`. The default is `None` which means that the server will set the application name.
+- *replication* - Used to run in [streaming replication mode](https://www.postgresql.org/docs/current/protocol-replication.html). If your server character encoding is not `ascii` or `utf8`, then you need to provide values as bytes, eg. `'database'.encode('EUC-JP')`.
+- *sock*  - A socket-like object to use for the connection. For example, `sock` could be a plain `socket.socket`, or it could represent an SSH tunnel or perhaps an `ssl.SSLSocket` to an SSL proxy. If an `ssl.SSLContext` is provided, then it will be used to attempt to create an SSL socket from the provided socket. 
+
+### pg8000.native.Connection.notifications
+
+A deque of server-side
+[notifications](https://www.postgresql.org/docs/current/sql-notify.html) received by
+this database connection (via the `LISTEN` / `NOTIFY` PostgreSQL commands). Each list
+item is a three-element tuple containing the PostgreSQL backend PID that issued the
+notify, the channel and the payload.
+
+
+### pg8000.native.Connection.notices
+
+A deque of server-side notices received by this database connection.
+
+
+### pg8000.native.Connection.parameter\_statuses
+
+A `dict` of server-side parameter statuses received by this database connection.
+
+
+### pg8000.native.Connection.run(sql, stream=None, types=None, \*\*kwargs)
+
+Executes an sql statement, and returns the results as a `list`. For example:
+
+```
+con.run("SELECT * FROM cities where population > :pop", pop=10000)
+```
+
+- *sql* - The SQL statement to execute. Parameter placeholders appear as a `:` followed by the parameter name.
+- *stream* - For use with the PostgreSQL [COPY](http://www.postgresql.org/docs/current/static/sql-copy.html) command. The nature of the parameter depends on whether the SQL command is `COPY FROM` or `COPY TO`.
+  - `COPY FROM` - The stream parameter must be a readable file-like object or an iterable. If it's an
+    iterable then the items can be ``str`` or binary.
+  - `COPY TO` - The stream parameter must be a writable file-like object.
+- *types* - A dictionary of oids. A key corresponds to a parameter. 
+- *kwargs* - The parameters of the SQL statement.
+
+
+### pg8000.native.Connection.row\_count
+
+This read-only attribute contains the number of rows that the last `run()` method
+produced (for query statements like ``SELECT``) or affected (for modification statements
+like `UPDATE`.
+
+The value is -1 if:
+
+- No `run()` method has been performed yet.
+- There was no rowcount associated with the last `run()`.
+
+
+### pg8000.native.Connection.columns
+
+A list of column metadata. Each item in the list is a dictionary with the following
+keys:
+
+- name
+- table\_oid
+- column\_attrnum
+- type\_oid
+- type\_size
+- type\_modifier
+- format
+
+
+### pg8000.native.Connection.close()
+
+Closes the database connection.
+
+
+### pg8000.native.Connection.register\_out\_adapter(typ, out\_func)
+
+Register a type adapter for types going out from pg8000 to the server.
+
+- *typ* - The Python class that the adapter is for.
+- *out_func* - A function that takes the Python object and returns its string representation in the format that the server requires.
+
+
+### pg8000.native.Connection.register\_in\_adapter(oid, in\_func)
+
+Register a type adapter for types coming in from the server to pg8000.
+
+- *oid* - The PostgreSQL type identifier found in the [pg\_type system catalog](https://www.postgresql.org/docs/current/catalog-pg-type.html).
+- *in_func*  - A function that takes the PostgreSQL string representation and returns a corresponding
+  Python object.
+
+
+### pg8000.native.Connection.prepare(sql)
+
+Returns a `PreparedStatement` object which represents a [prepared statement
+](https://www.postgresql.org/docs/current/sql-prepare.html) on the server. It can
+subsequently be repeatedly executed.
+
+- *sql* - The SQL statement to prepare. Parameter placeholders appear as a `:` followed by the parameter name.
+
+
+### pg8000.native.PreparedStatement
+
+A prepared statement object is returned by the `pg8000.native.Connection.prepare()`
+method of a connection. It has the following methods:
+
+
+#### pg8000.native.PreparedStatement.run(\*\*kwargs)
+
+Executes the prepared statement, and returns the results as a `tuple`.
+
+- *kwargs* - The parameters of the prepared statement.
+
+
+#### pg8000.native.PreparedStatement.close()
+
+Closes the prepared statement, releasing the prepared statement held on the server.
+
+
+### pg8000.native.identifier(ident)
+
+Correctly quotes and escapes a string to be used as an [SQL identifier
+](https://www.postgresql.org/docs/current/sql-syntax-lexical.html#SQL-SYNTAX-IDENTIFIERS).
+- *ident* - The `str` to be used as an SQL identifier.
+
+
+### pg8000.native.literal(value)
+
+Correctly quotes and escapes a value to be used as an [SQL literal
+](https://www.postgresql.org/docs/current/sql-syntax-lexical.html#SQL-SYNTAX-CONSTANTS).
+- *value* - The value to be used as an SQL literal.
+
+
+## DB-API 2 Docs
+
+### Properties
+
+#### pg8000.dbapi.apilevel
+
+The DBAPI level supported, currently "2.0".
+
+
+#### pg8000.dbapi.threadsafety
+
+Integer constant stating the level of thread safety the DBAPI interface supports. For
+pg8000, the threadsafety value is 1, meaning that threads may share the module but not
+connections.
+
+
+#### pg8000.dbapi.paramstyle
+
+String property stating the type of parameter marker formatting expected by
+the interface.  This value defaults to "format", in which parameters are
+marked in this format: "WHERE name=%s".
+
+As an extension to the DBAPI specification, this value is not constant; it can be
+changed to any of the following values:
+
+- *qmark* - Question mark style, eg. `WHERE name=?`
+- *numeric* - Numeric positional style, eg. `WHERE name=:1`
+- *named* - Named style, eg. `WHERE name=:paramname`
+- *format* - printf format codes, eg. `WHERE name=%s`
+- *pyformat* - Python format codes, eg. `WHERE name=%(paramname)s`
+
+
+#### pg8000.dbapi.STRING
+
+String type oid.
+
+
+#### pg8000.dbapi.BINARY
+
+
+#### pg8000.dbapi.NUMBER
+
+Numeric type oid.
+
+
+#### pg8000.dbapi.DATETIME
+
+Timestamp type oid
+
+
+#### pg8000.dbapi.ROWID
+
+ROWID type oid
+
+
+### Functions
+
+#### pg8000.dbapi.connect(user, host='localhost', database=None, port=5432, password=None, source\_address=None, unix\_sock=None, ssl\_context=None, timeout=None, tcp\_keepalive=True, applicationa_name=None, replication=None, sock=None)
+
+Creates a connection to a PostgreSQL database.
+
+- *user*  - The username to connect to the PostgreSQL server with. If your server character encoding is not `ascii` or `utf8`, then you need to provide `user` as bytes, eg. `'my_name'.encode('EUC-JP')`.
+- *host* - The hostname of the PostgreSQL server to connect with. Providing this parameter is necessary for TCP/IP connections. One of either `host` or `unix_sock` must be provided. The default is `localhost`.
+- *database* - The name of the database instance to connect with. If `None` then the PostgreSQL server will assume the database name is the same as the username. If your server character encoding is not `ascii` or `utf8`, then you need to provide `database` as bytes, eg. `'my_db'.encode('EUC-JP')`.
+- *port* - The TCP/IP port of the PostgreSQL server instance.  This parameter defaults to `5432`, the registered common port of PostgreSQL TCP/IP servers.
+- *password* - The user password to connect to the server with. This parameter is optional; if omitted and the database server requests password-based authentication, the connection will fail to open. If this parameter is provided but not requested by the server, no error will occur. If your server character encoding is not `ascii` or `utf8`, then you need to provide `password` as bytes, eg.  `'my_password'.encode('EUC-JP')`.
+- *source_address* - The source IP address which initiates the connection to the PostgreSQL server. The default is `None` which means that the operating system will choose the source address.
+- *unix_sock* - The path to the UNIX socket to access the database through, for example, `'/tmp/.s.PGSQL.5432'`. One of either `host` or `unix_sock` must be provided.
+- *ssl_context* - This governs SSL encryption for TCP/IP sockets. It can have four values:
+  - `None`, the default, meaning that an attempt will be made to connect over SSL, but if this is rejected by the server then pg8000 will fall back to using a plain socket.
+  - `True`, means use SSL with an `ssl.SSLContext` with the minimum of checks.
+  - `False`, means to not attempt to create an SSL socket.
+  - An instance of `ssl.SSLContext` which will be used to create the SSL connection.
+- *timeout* - This is the time in seconds before the connection to the server will time out. The default is `None` which means no timeout.
+- *tcp_keepalive* - If `True` then use [TCP keepalive](https://en.wikipedia.org/wiki/Keepalive#TCP_keepalive). The default is `True`.
+- *application_name* - Sets the [application\_name](https://www.postgresql.org/docs/current/runtime-config-logging.html#GUC-APPLICATION-NAME). If your server character encoding is not `ascii` or `utf8`, then you need to provide values as bytes, eg. `'my_application_name'.encode('EUC-JP')`. The default is `None` which means that the server will set the application name.
+- *replication* - Used to run in [streaming replication mode](https://www.postgresql.org/docs/current/protocol-replication.html). If your server character encoding is not `ascii` or `utf8`, then you need to provide values as bytes, eg. `'database'.encode('EUC-JP')`.
+- *sock* - A socket-like object to use for the connection. For example, `sock` could be a plain `socket.socket`, or it could represent an SSH tunnel or perhaps an `ssl.SSLSocket` to an SSL proxy. If an `ssl.SSLContext` is provided, then it will be used to attempt to create an SSL socket from the provided socket. 
+
+
+#### pg8000.dbapi.Date(year, month, day)
+
+Construct an object holding a date value.
+
+This property is part of the `DBAPI 2.0 specification
+<http://www.python.org/dev/peps/pep-0249/>`_.
+
+Returns: `datetime.date`
+
+
+#### pg8000.dbapi.Time(hour, minute, second)
+
+Construct an object holding a time value.
+
+Returns: `datetime.time`
+
+
+#### pg8000.dbapi.Timestamp(year, month, day, hour, minute, second)
+
+Construct an object holding a timestamp value.
+
+Returns: `datetime.datetime`
+
+
+#### pg8000.dbapi.DateFromTicks(ticks)
+
+Construct an object holding a date value from the given ticks value (number of seconds
+since the epoch).
+
+Returns: `datetime.datetime`
+
+
+#### pg8000.dbapi.TimeFromTicks(ticks)
+
+Construct an object holding a time value from the given ticks value (number of seconds
+since the epoch).
+
+Returns: `datetime.time`
+
+
+#### pg8000.dbapi.TimestampFromTicks(ticks)
+
+Construct an object holding a timestamp value from the given ticks value (number of
+seconds since the epoch).
+
+Returns: `datetime.datetime`
+
+
+#### pg8000.dbapi.Binary(value)
+
+Construct an object holding binary data.
+
+Returns: `bytes`
+
+
+### Generic Exceptions
+
+Pg8000 uses the standard DBAPI 2.0 exception tree as "generic" exceptions. Generally,
+more specific exception types are raised; these specific exception types are derived
+from the generic exceptions.
+
+#### pg8000.dbapi.Warning
+
+Generic exception raised for important database warnings like data truncations. This
+exception is not currently used by pg8000.
+
+
+#### pg8000.dbapi.Error
+
+Generic exception that is the base exception of all other error exceptions.
+
+
+#### pg8000.dbapi.InterfaceError
+
+Generic exception raised for errors that are related to the database interface rather
+than the database itself. For example, if the interface attempts to use an SSL
+connection but the server refuses, an InterfaceError will be raised.
+
+
+#### pg8000.dbapi.DatabaseError
+
+Generic exception raised for errors that are related to the database. This exception is
+currently never raised by pg8000.
+
+
+#### pg8000.dbapi.DataError
+
+Generic exception raised for errors that are due to problems with the processed data.
+This exception is not currently raised by pg8000.
+
+
+#### pg8000.dbapi.OperationalError
+
+Generic exception raised for errors that are related to the database's operation and not
+necessarily under the control of the programmer. This exception is currently never
+raised by pg8000.
+
+
+#### pg8000.dbapi.IntegrityError
+
+Generic exception raised when the relational integrity of the database is affected. This
+exception is not currently raised by pg8000.
+
+
+#### pg8000.dbapi.InternalError
+
+Generic exception raised when the database encounters an internal error. This is
+currently only raised when unexpected state occurs in the pg8000 interface itself, and
+is typically the result of a interface bug.
+
+
+#### pg8000.dbapi.ProgrammingError
+
+Generic exception raised for programming errors. For example, this exception is raised
+if more parameter fields are in a query string than there are available parameters.
+
+
+#### pg8000.dbapi.NotSupportedError
+
+Generic exception raised in case a method or database API was used which is not
+supported by the database.
+
+
+### Classes
+
+
+#### pg8000.dbapi.Connection
+
+A connection object is returned by the `pg8000.dbapi.connect()` function. It represents a
+single physical connection to a PostgreSQL database.
+
+
+#### pg8000.dbapi.Connection.autocommit
+
+Following the DB-API specification, autocommit is off by default. It can be turned on by
+setting this boolean pg8000-specific autocommit property to ``True``.
+
+
+#### pg8000.dbapi.Connection.close()
+
+Closes the database connection.
+
+
+#### pg8000.dbapi.Connection.cursor()
+
+Creates a `pg8000.dbapi.Cursor` object bound to this connection.
+
+
+#### pg8000.dbapi.Connection.rollback()
+
+Rolls back the current database transaction.
+
+
+#### pg8000.dbapi.Connection.tpc_begin(xid)
+
+Begins a TPC transaction with the given transaction ID xid. This method should be
+called outside of a transaction (i.e. nothing may have executed since the last
+`commit()`  or `rollback()`. Furthermore, it is an error to call `commit()` or
+`rollback()` within the TPC transaction. A `ProgrammingError` is raised, if the
+application calls `commit()` or `rollback()` during an active TPC transaction.
+
+
+#### pg8000.dbapi.Connection.tpc_commit(xid=None)
+
+When called with no arguments, `tpc_commit()` commits a TPC transaction previously
+prepared with `tpc_prepare()`. If `tpc_commit()` is called prior to
+`tpc_prepare()`, a single phase commit is performed. A transaction manager may choose
+to do this if only a single resource is participating in the global transaction.
+
+When called with a transaction ID `xid`, the database commits the given transaction.
+If an invalid transaction ID is provided, a `ProgrammingError` will be raised. This
+form should be called outside of a transaction, and is intended for use in recovery.
+
+On return, the TPC transaction is ended.
+
+
+#### pg8000.dbapi.Connection.tpc_prepare()
+
+Performs the first phase of a transaction started with `.tpc_begin()`. A
+`ProgrammingError` is be raised if this method is called outside of a TPC transaction.
+
+After calling `tpc_prepare()`, no statements can be executed until `tpc_commit()` or
+`tpc_rollback()` have been called.
+
+
+#### pg8000.dbapi.Connection.tpc_recover()
+
+Returns a list of pending transaction IDs suitable for use with `tpc_commit(xid)` or
+`tpc_rollback(xid)`.
+
+
+#### pg8000.dbapi.Connection.tpc_rollback(xid=None)
+
+When called with no arguments, `tpc_rollback()` rolls back a TPC transaction. It may
+be called before or after `tpc_prepare()`.
+
+When called with a transaction ID xid, it rolls back the given transaction. If an
+invalid transaction ID is provided, a `ProgrammingError` is raised. This form should
+be called outside of a transaction, and is intended for use in recovery.
+
+On return, the TPC transaction is ended.
+
+
+#### pg8000.dbapi.Connection.xid(format_id, global_transaction_id, branch_qualifier)
+
+Create a Transaction IDs (only global_transaction_id is used in pg) format_id and
+branch_qualifier are not used in postgres global_transaction_id may be any string
+identifier supported by postgres returns a tuple (format_id, global_transaction_id,
+branch_qualifier)
+
+
+#### pg8000.dbapi.Cursor
+
+A cursor object is returned by the `pg8000.dbapi.Connection.cursor()` method of a
+connection. It has the following attributes and methods:
+
+##### pg8000.dbapi.Cursor.arraysize
+
+This read/write attribute specifies the number of rows to fetch at a time with
+`pg8000.dbapi.Cursor.fetchmany()`.  It defaults to 1.
+
+
+##### pg8000.dbapi.Cursor.connection
+
+This read-only attribute contains a reference to the connection object (an instance of
+`pg8000.dbapi.Connection`) on which the cursor was created.
+
+
+##### pg8000.dbapi.Cursor.rowcount
+
+This read-only attribute contains the number of rows that the last `execute()` or
+`executemany()` method produced (for query statements like `SELECT`) or affected
+(for modification statements like `UPDATE`.
+
+The value is -1 if:
+
+- No `execute()` or `executemany()` method has been performed yet on the cursor.
+- There was no rowcount associated with the last `execute()`.
+- At least one of the statements executed as part of an `executemany()` had no row
+  count associated with it.
+
+
+##### pg8000.dbapi.Cursor.description
+
+This read-only attribute is a sequence of 7-item sequences. Each value contains
+information describing one result column. The 7 items returned for each column are
+(name, type_code, display_size, internal_size, precision, scale, null_ok). Only the
+first two values are provided by the current implementation.
+
+
+##### pg8000.dbapi.Cursor.close()
+
+Closes the cursor.
+
+
+##### pg8000.dbapi.Cursor.execute(operation, args=None, stream=None)
+
+Executes a database operation. Parameters may be provided as a sequence, or as a
+mapping, depending upon the value of `pg8000.dbapi.paramstyle`. Returns the cursor,
+which may be iterated over.
+
+- *operation* - The SQL statement to execute.
+- *args* - If `pg8000.dbapi.paramstyle` is `qmark`, `numeric`, or `format`, this argument should be an array of parameters to bind into the statement. If `pg8000.dbapi.paramstyle` is `named`, the argument should be a `dict` mapping of parameters. If `pg8000.dbapi.paramstyle` is `pyformat`, the argument value may be either an array or a mapping.
+- *stream* - This is a pg8000 extension for use with the PostgreSQL [COPY](http://www.postgresql.org/docs/current/static/sql-copy.html) command. For a `COPY FROM` the parameter must be a readable file-like object, and for `COPY TO` it must be writable.
+
+
+##### pg8000.dbapi.Cursor.executemany(operation, param_sets)
+
+Prepare a database operation, and then execute it against all parameter sequences or
+mappings provided.
+
+- *operation* - The SQL statement to execute.
+- *parameter_sets* - A sequence of parameters to execute the statement with. The values in the sequence should be sequences or mappings of parameters, the same as the args argument of the `pg8000.dbapi.Cursor.execute()` method.
+
+
+##### pg8000.dbapi.Cursor.callproc(procname, parameters=None)
+
+Call a stored database procedure with the given name and optional parameters.
+
+- *procname* - The name of the procedure to call.
+- *parameters* - A list of parameters.
+
+
+##### pg8000.dbapi.Cursor.fetchall()
+
+Fetches all remaining rows of a query result.
+
+Returns: A sequence, each entry of which is a sequence of field values making up a row.
+
+
+##### pg8000.dbapi.Cursor.fetchmany(size=None)
+
+Fetches the next set of rows of a query result.
+
+- *size* - The number of rows to fetch when called.  If not provided, the `pg8000.dbapi.Cursor.arraysize` attribute value is used instead.
+
+Returns: A sequence, each entry of which is a sequence of field values making up a row.
+If no more rows are available, an empty sequence will be returned.
+
+
+##### pg8000.dbapi.Cursor.fetchone()
+
+Fetch the next row of a query result set.
+
+Returns: A row as a sequence of field values, or `None` if no more rows are available.
+
+
+##### pg8000.dbapi.Cursor.setinputsizes(\*sizes)
+
+Used to set the parameter types of the next query. This is useful if it's difficult for
+pg8000 to work out the types from the parameters themselves (eg. for parameters of type
+None).
+
+- *sizes* - Positional parameters that are either the Python type of the parameter to be sent, or the PostgreSQL oid. Common oids are available as constants such as `pg8000.STRING`, `pg8000.INTEGER`, `pg8000.TIME` etc.
+
+
+##### pg8000.dbapi.Cursor.setoutputsize(size, column=None)
+
+Not implemented by pg8000.
+
+
+#### pg8000.dbapi.Interval
+
+An Interval represents a measurement of time.  In PostgreSQL, an interval is defined in
+the measure of months, days, and microseconds; as such, the pg8000 interval type
+represents the same information.
+
+Note that values of the `pg8000.dbapi.Interval.microseconds`,
+`pg8000.dbapi.Interval.days`, and `pg8000.dbapi.Interval.months` properties are
+independently measured and cannot be converted to each other. A month may be 28, 29, 30,
+or 31 days, and a day may occasionally be lengthened slightly by a leap second.
+
+
+## Design Decisions
+
+For the `Range` type, the constructor follows the [PostgreSQL range constructor functions
+](https://www.postgresql.org/docs/current/rangetypes.html#RANGETYPES-CONSTRUCT)
+which makes [[closed, open)](https://fhur.me/posts/always-use-closed-open-intervals)
+the easiest to express:
+
+```python
+>>> from pg8000.types import Range
+>>>
+>>> pg_range = Range(2, 6)
+
+```
+
+
+## Tests
+
+- Install [tox](http://testrun.org/tox/latest/): `pip install tox`
+
+- Enable the PostgreSQL hstore extension by running the SQL command:
+  `create extension hstore;`
+
+- Add a line to `pg_hba.conf` for the various authentication options:
+
+```
+host    pg8000_md5           all        127.0.0.1/32            md5
+host    pg8000_gss           all        127.0.0.1/32            gss
+host    pg8000_password      all        127.0.0.1/32            password
+host    pg8000_scram_sha_256 all        127.0.0.1/32            scram-sha-256
+host    all                  all        127.0.0.1/32            trust
+```
+
+- Set password encryption to `scram-sha-256` in `postgresql.conf`:
+  `password_encryption = 'scram-sha-256'`
+
+- Set the password for the postgres user: `ALTER USER postgresql WITH PASSWORD 'pw';`
+
+- Run `tox` from the `pg8000` directory: `tox`
+
+This will run the tests against the Python version of the virtual environment, on the
+machine, and the installed PostgreSQL version listening on port 5432, or the `PGPORT`
+environment variable if set.
+
+Benchmarks are run as part of the test suite at `tests/test_benchmarks.py`.
+
+
+## Doing A Release Of pg8000
+
+Run `tox` to make sure all tests pass, then update the release notes, then do:
+
+
+```
+git tag -a x.y.z -m "version x.y.z"
+rm -r dist
+python -m build
+twine upload dist/*
+```
+
+
+## Release Notes
+
+### Version 1.31.0, 2024-03-31
+
+- Now the `ssl_context` connection parameter can have one of four values:
+  - None - The default, meaning it'll try and connect over SSL but fall back to a plain socket if not.
+  - True - Will try and connect over SSL and fail if not.
+  - False - It'll not try to connect over SSL.
+  - SSLContext object - It'll use this object to connect over SSL.
+
+
+### Version 1.30.5, 2024-02-22
+
+- Fix bug that now means the number of parameters cam be as high as an unsigned 16 bit
+  integer will go.
+
+
+### Version 1.30.4, 2024-01-03
+
+- Add support for more range and multirange types.
+- Make the `Connection.parameter_statuses` property a `dict` rather than a `dequeue`.
+
+
+### Version 1.30.3, 2023-10-31
+
+- Fix problem with PG date overflowing Python types. Now we return the `str` we got from the
+  server if we can't parse it. 
+
+
+### Version 1.30.2, 2023-09-17
+
+- Bug fix where dollar-quoted string constants weren't supported.
+
+
+### Version 1.30.1, 2023-07-29
+
+- There was a problem uploading the previous version (1.30.0) to PyPI because the markup of the README.rst was invalid. There's now a step in the automated tests to check for this.
+
+
+### Version 1.30.0, 2023-07-27
+
+- Remove support for Python 3.7
+- Add a `sock` keyword parameter for creating a connection from a pre-configured socket.
+
+
+### Version 1.29.8, 2023-06-16
+
+- Ranges don't work with legacy API.
+
+
+### Version 1.29.7, 2023-06-16
+
+- Add support for PostgreSQL `range` and `multirange` types. Previously pg8000 would just return them as strings, but now they're returned as `Range` and lists of `Range`.
+- The PostgreSQL `record` type is now returned as a `tuple` of strings, whereas before it was returned as one string.
+
+
+### Version 1.29.6, 2023-05-29
+
+- Fixed two bugs with composite types. Nulls should be represented by an empty string, and in an array of composite types, the elements should be surrounded by double quotes.
+
+
+### Version 1.29.5, 2023-05-09
+
+- Fixed bug where pg8000 didn't handle the case when the number of bytes received from a socket was fewer than requested. This was being interpreted as a network error, but in fact we just needed to wait until more bytes were available.
+- When using the `PGInterval` type, if a response from the server contained the period `millennium`, it wasn't recognised. This was caused by a spelling mistake where we had `millenium` rather than `millennium`.
+- Added support for sending PostgreSQL composite types. If a value is sent as a `tuple`, pg8000 will send it to the server as a `(` delimited composite string.
+
+
+### Version 1.29.4, 2022-12-14
+
+- Fixed bug in `pg8000.dbapi` in the `setinputsizes()` method where if a `size` was a recognized Python type, the method failed.
+
+
+### Version 1.29.3, 2022-10-26
+
+- Upgrade the SCRAM library to version 1.4.3. This adds support for the case where the client supports channel binding but the server doesn't.
+
+
+### Version 1.29.2, 2022-10-09
+
+- Fixed a bug where in a literal array, items such as `\n` and `\r` weren't escaped properly before being sent to the server.
+- Fixed a bug where if the PostgreSQL server has a half-hour time zone set, values of type `timestamp with time zone` failed. This has been fixed by using the `parse` function of the `dateutil` package if the `datetime` parser fails.
+
+
+### Version 1.29.1, 2022-05-23
+
+- In trying to determine if there's been a failed commit, check for `ROLLBACK TO SAVEPOINT`.
+
+
+### Version 1.29.0, 2022-05-21
+
+- Implement a workaround for the [silent failed commit](https://github.com/tlocke/pg8000/issues/36) bug.
+- Previously if an empty string was sent as the query an exception would be raised, but that isn't done now.
+
+
+### Version 1.28.3, 2022-05-18
+
+- Put back `__version__` attributes that were inadvertently removed.
+
+
+### Version 1.28.2, 2022-05-17
+
+- Use a build system that's compliant with PEP517.
+
+
+### Version 1.28.1, 2022-05-17
+
+- If when doing a `COPY FROM` the `stream` parameter is an iterator of `str`, pg8000 used to silently append a newline to the end. That no longer happens.
+
+
+### Version 1.28.0, 2022-05-17
+
+- When using the `COPY FROM` SQL statement, allow the `stream` parameter to be an iterable.
+
+
+### Version 1.27.1, 2022-05-16
+
+- The `seconds` attribute of `PGInterval` is now always a `float`, to cope with fractional seconds.
+- Updated the `interval` parsers for `iso_8601` and `sql_standard` to take account of fractional seconds.
+
+
+### Version 1.27.0, 2022-05-16
+
+- It used to be that by default, if pg8000 received an `interval` type from the server and it was too big to fit into a `datetime.timedelta` then an exception would be raised. Now if an interval is too big for `datetime.timedelta` a `PGInterval` is returned.
+- pg8000 now supports all the output formats for an `interval` (`postgres`, `postgres_verbose`, `iso_8601` and `sql_standard`).
+
+
+### Version 1.26.1, 2022-04-23
+
+- Make sure all tests are run by the GitHub Actions tests on commit.
+- Remove support for Python 3.6
+- Remove support for PostgreSQL 9.6
+
+
+### Version 1.26.0, 2022-04-18
+
+- When connecting, raise an `InterfaceError('network error')` rather than let the underlying `struct.error` float up.
+- Make licence text the same as that used by the OSI. Previously the licence wording differed slightly from the BSD 3 Clause licence at https://opensource.org/licenses/BSD-3-Clause. This meant that automated tools didn't pick it up as being Open Source. The changes are believed to not alter the meaning of the license at all.
+
+
+### Version 1.25.0, 2022-04-17
+
+- Fix more cases where a `ResourceWarning` would be raise because of a socket that had been left open.
+- We now have a single `InterfaceError` with the message 'network error' for all network errors, with the underlying exception held in the `cause` of the exception.
+
+
+### Version 1.24.2, 2022-04-15
+
+- To prevent a `ResourceWarning` close socket if a connection can't be created.
+
+
+### Version 1.24.1, 2022-03-02
+
+- Return pg +/-infinity dates as `str`. Previously +/-infinity pg values would cause an error when returned, but now we return +/-infinity as strings.
+
+
+### Version 1.24.0, 2022-02-06
+
+- Add SQL escape functions identifier() and literal() to the native API. For use when a query can't be parameterised and the SQL string has to be created using untrusted values.
+
+
+### Version 1.23.0, 2021-11-13
+
+- If a query has no parameters, then the query will no longer be parsed. Although there are performance benefits for doing this, the main reason is to avoid query rewriting, which can introduce errors.
+
+
+### Version 1.22.1, 2021-11-10
+
+- Fix bug in PGInterval type where `str()` failed for a millennia value.
+
+
+### Version 1.22.0, 2021-10-13
+
+- Rather than specifying the oids in the `Parse` step of the Postgres protocol, pg8000 now omits them, and so Postgres will use the oids it determines from the query. This makes the pg8000 code simpler and also it should also make the nuances of type matching more straightforward.
diff --git a/contrib/python/pg8000/README.rst b/contrib/python/pg8000/README.rst
deleted file mode 100644
index 55c26ddef3..0000000000
--- a/contrib/python/pg8000/README.rst
+++ /dev/null
@@ -1,1407 +0,0 @@
-======
-pg8000
-======
-
-.. |ssl.SSLContext| replace:: ``ssl.SSLContext``
-.. _ssl.SSLContext: https://docs.python.org/3/library/ssl.html#ssl.SSLContext
-
-.. |ssl.create_default_context()| replace:: ``ssl.create_default_context()``
-.. _ssl.create_default_context(): https://docs.python.org/3/library/ssl.html#ssl.create_default_context
-
-pg8000 is a pure-`Python <https://www.python.org/>`_
-`PostgreSQL <http://www.postgresql.org/>`_ driver that complies with
-`DB-API 2.0 <http://www.python.org/dev/peps/pep-0249/>`_. It is tested on Python
-versions 3.8+, on CPython and PyPy, and PostgreSQL versions 12+. pg8000's name comes
-from the belief that it is probably about the 8000th PostgreSQL interface for Python.
-pg8000 is distributed under the BSD 3-clause license.
-
-All bug reports, feature requests and contributions are welcome at
-`http://github.com/tlocke/pg8000/ <http://github.com/tlocke/pg8000/>`_.
-
-.. image:: https://github.com/tlocke/pg8000/workflows/pg8000/badge.svg
-   :alt: Build Status
-
-.. contents:: Table of Contents
-   :depth: 2
-   :local:
-
-Installation
-------------
-
-To install pg8000 using `pip` type:
-
-`pip install pg8000`
-
-
-Native API Interactive Examples
--------------------------------
-
-pg8000 comes with two APIs, the native pg8000 API and the DB-API 2.0 standard
-API. These are the examples for the native API, and the DB-API 2.0 examples
-follow in the next section.
-
-
-Basic Example
-`````````````
-
-Import pg8000, connect to the database, create a table, add some rows and then
-query the table:
-
->>> import pg8000.native
->>>
->>> # Connect to the database with user name postgres
->>>
->>> con = pg8000.native.Connection("postgres", password="cpsnow")
->>>
->>> # Create a temporary table
->>>
->>> con.run("CREATE TEMPORARY TABLE book (id SERIAL, title TEXT)")
->>>
->>> # Populate the table
->>>
->>> for title in ("Ender's Game", "The Magus"):
-...     con.run("INSERT INTO book (title) VALUES (:title)", title=title)
->>>
->>> # Print all the rows in the table
->>>
->>> for row in con.run("SELECT * FROM book"):
-...     print(row)
-[1, "Ender's Game"]
-[2, 'The Magus']
->>>
->>> con.close()
-
-
-Transactions
-````````````
-
-Here's how to run groups of SQL statements in a
-`transaction <https://www.postgresql.org/docs/current/tutorial-transactions.html>`_:
-
->>> import pg8000.native
->>>
->>> con = pg8000.native.Connection("postgres", password="cpsnow")
->>>
->>> con.run("START TRANSACTION")
->>>
->>> # Create a temporary table
->>> con.run("CREATE TEMPORARY TABLE book (id SERIAL, title TEXT)")
->>>
->>> for title in ("Ender's Game", "The Magus", "Phineas Finn"):
-...     con.run("INSERT INTO book (title) VALUES (:title)", title=title)
->>> con.run("COMMIT")
->>> for row in con.run("SELECT * FROM book"):
-...     print(row)
-[1, "Ender's Game"]
-[2, 'The Magus']
-[3, 'Phineas Finn']
->>>
->>> con.close()
-
-rolling back a transaction:
-
->>> import pg8000.native
->>>
->>> con = pg8000.native.Connection("postgres", password="cpsnow")
->>>
->>> # Create a temporary table
->>> con.run("CREATE TEMPORARY TABLE book (id SERIAL, title TEXT)")
->>>
->>> for title in ("Ender's Game", "The Magus", "Phineas Finn"):
-...     con.run("INSERT INTO book (title) VALUES (:title)", title=title)
->>>
->>> con.run("START TRANSACTION")
->>> con.run("DELETE FROM book WHERE title = :title", title="Phineas Finn") 
->>> con.run("ROLLBACK")
->>> for row in con.run("SELECT * FROM book"):
-...     print(row)
-[1, "Ender's Game"]
-[2, 'The Magus']
-[3, 'Phineas Finn']
->>>
->>> con.close()
-
-NB. There is `a longstanding bug <https://github.com/tlocke/pg8000/issues/36>`_
-in the PostgreSQL server whereby if a `COMMIT` is issued against a failed
-transaction, the transaction is silently rolled back, rather than an error being
-returned. pg8000 attempts to detect when this has happened and raise an
-`InterfaceError`.
-
-
-Query Using Functions
-`````````````````````
-
-Another query, using some PostgreSQL functions:
-
->>> import pg8000.native
->>>
->>> con = pg8000.native.Connection("postgres", password="cpsnow")
->>>
->>> con.run("SELECT TO_CHAR(TIMESTAMP '2021-10-10', 'YYYY BC')")
-[['2021 AD']]
->>>
->>> con.close()
-
-
-Interval Type
-`````````````
-
-A query that returns the PostgreSQL interval type:
-
->>> import pg8000.native
->>>
->>> con = pg8000.native.Connection("postgres", password="cpsnow")
->>>
->>> import datetime
->>>
->>> ts = datetime.date(1980, 4, 27)
->>> con.run("SELECT timestamp '2013-12-01 16:06' - :ts", ts=ts)
-[[datetime.timedelta(days=12271, seconds=57960)]]
->>>
->>> con.close()
-
-
-Point Type
-``````````
-
-A round-trip with a
-`PostgreSQL point <https://www.postgresql.org/docs/current/datatype-geometric.html>`_
-type:
-
->>> import pg8000.native
->>>
->>> con = pg8000.native.Connection("postgres", password="cpsnow")
->>>
->>> con.run("SELECT CAST(:pt as point)", pt=(2.3,1))
-[[(2.3, 1.0)]]
->>>
->>> con.close()
-
-
-Client Encoding
-```````````````
-
-When communicating with the server, pg8000 uses the character set that the server asks
-it to use (the client encoding). By default the client encoding is the database's
-character set (chosen when the database is created), but the client encoding can be
-changed in a number of ways (eg. setting ``CLIENT_ENCODING`` in ``postgresql.conf``).
-Another way of changing the client encoding is by using an SQL command. For example:
-
->>> import pg8000.native
->>>
->>> con = pg8000.native.Connection("postgres", password="cpsnow")
->>>
->>> con.run("SET CLIENT_ENCODING TO 'UTF8'")
->>> con.run("SHOW CLIENT_ENCODING")
-[['UTF8']]
->>>
->>> con.close()
-
-
-JSON
-````
-
-`JSON <https://www.postgresql.org/docs/current/datatype-json.html>`_ always comes back
-from the server de-serialized. If the JSON you want to send is a ``dict`` then you can
-just do:
-
->>> import pg8000.native
->>>
->>> con = pg8000.native.Connection("postgres", password="cpsnow")
->>>
->>> val = {'name': 'Apollo 11 Cave', 'zebra': True, 'age': 26.003}
->>> con.run("SELECT CAST(:apollo as jsonb)", apollo=val)
-[[{'age': 26.003, 'name': 'Apollo 11 Cave', 'zebra': True}]]
->>>
->>> con.close()
-
-JSON can always be sent in serialized form to the server:
-
->>> import json
->>> import pg8000.native
->>>
->>> con = pg8000.native.Connection("postgres", password="cpsnow")
->>>
->>>
->>> val = ['Apollo 11 Cave', True, 26.003]
->>> con.run("SELECT CAST(:apollo as jsonb)", apollo=json.dumps(val))
-[[['Apollo 11 Cave', True, 26.003]]]
->>>
->>> con.close()
-
-JSON queries can be have parameters:
-
->>> import pg8000.native
->>>
->>> with pg8000.native.Connection("postgres", password="cpsnow") as con:
-...     con.run(""" SELECT CAST('{"a":1, "b":2}' AS jsonb) @> :v """, v={"b": 2})
-[[True]]
-
-
-Retrieve Column Metadata From Results
-`````````````````````````````````````
-
-Find the column metadata returned from a query:
-
->>> import pg8000.native
->>>
->>> con = pg8000.native.Connection("postgres", password="cpsnow")
->>>
->>> con.run("create temporary table quark (id serial, name text)")
->>> for name in ('Up', 'Down'):
-...     con.run("INSERT INTO quark (name) VALUES (:name)", name=name)
->>> # Now execute the query
->>>
->>> con.run("SELECT * FROM quark")
-[[1, 'Up'], [2, 'Down']]
->>>
->>> # and retrieve the metadata
->>>
->>> con.columns
-[{'table_oid': ..., 'column_attrnum': 1, 'type_oid': 23, 'type_size': 4, 'type_modifier': -1, 'format': 0, 'name': 'id'}, {'table_oid': ..., 'column_attrnum': 2, 'type_oid': 25, 'type_size': -1, 'type_modifier': -1, 'format': 0, 'name': 'name'}]
->>>
->>> # Show just the column names
->>>
->>> [c['name'] for c in con.columns]
-['id', 'name']
->>>
->>> con.close()
-
-
-Notices And Notifications
-`````````````````````````
-
-PostgreSQL `notices
-<https://www.postgresql.org/docs/current/static/plpgsql-errors-and-messages.html>`_ are
-stored in a deque called ``Connection.notices`` and added using the ``append()``
-method. Similarly there are ``Connection.notifications`` for `notifications
-<https://www.postgresql.org/docs/current/static/sql-notify.html>`_. Here's an example:
-
->>> import pg8000.native
->>>
->>> con = pg8000.native.Connection("postgres", password="cpsnow")
->>>
->>> con.run("LISTEN aliens_landed")
->>> con.run("NOTIFY aliens_landed")
->>> # A notification is a tuple containing (backend_pid, channel, payload)
->>>
->>> con.notifications[0]
-(..., 'aliens_landed', '')
->>>
->>> con.close()
-
-
-Parameter Statuses
-``````````````````
-
-`Certain parameter values are reported by the server automatically at connection startup or whenever
-their values change
-<https://www.postgresql.org/docs/current/libpq-status.html#LIBPQ-PQPARAMETERSTATUS>`_ and pg8000
-stores the latest values in a dict called ``Connection.parameter_statuses``. Here's an example where
-we set the ``aplication_name`` parameter and then read it from the ``parameter_statuses``:
-
->>> import pg8000.native
->>>
->>> con = pg8000.native.Connection(
-...     "postgres", password="cpsnow", application_name='AGI')
->>>
->>> con.parameter_statuses['application_name']
-'AGI'
->>>
->>> con.close()
-
-
-LIMIT ALL
-`````````
-
-You might think that the following would work, but in fact it fails:
-
->>> import pg8000.native
->>>
->>> con = pg8000.native.Connection("postgres", password="cpsnow")
->>>
->>> con.run("SELECT 'silo 1' LIMIT :lim", lim='ALL')
-Traceback (most recent call last):
-pg8000.exceptions.DatabaseError: ...
->>>
->>> con.close()
-
-Instead the `docs say <https://www.postgresql.org/docs/current/sql-select.html>`_ that
-you can send ``null`` as an alternative to ``ALL``, which does work:
-
->>> import pg8000.native
->>>
->>> con = pg8000.native.Connection("postgres", password="cpsnow")
->>>
->>> con.run("SELECT 'silo 1' LIMIT :lim", lim=None)
-[['silo 1']]
->>>
->>> con.close()
-
-
-IN and NOT IN
-`````````````
-
-You might think that the following would work, but in fact the server doesn't like it:
-
->>> import pg8000.native
->>>
->>> con = pg8000.native.Connection("postgres", password="cpsnow")
->>>
->>> con.run("SELECT 'silo 1' WHERE 'a' IN :v", v=['a', 'b'])
-Traceback (most recent call last):
-pg8000.exceptions.DatabaseError: ...
->>>
->>> con.close()
-
-instead you can write it using the `unnest
-<https://www.postgresql.org/docs/current/functions-array.html>`_ function:
-
->>> import pg8000.native
->>>
->>> con = pg8000.native.Connection("postgres", password="cpsnow")
->>>
->>> con.run(
-...     "SELECT 'silo 1' WHERE 'a' IN (SELECT unnest(CAST(:v as varchar[])))",
-...     v=['a', 'b'])
-[['silo 1']]
->>> con.close()
-
-and you can do the same for ``NOT IN``.
-
-
-Many SQL Statements Can't Be Parameterized
-``````````````````````````````````````````
-
-In PostgreSQL parameters can only be used for `data values, not identifiers
-<https://www.postgresql.org/docs/current/xfunc-sql.html#XFUNC-SQL-FUNCTION-ARGUMENTS>`_.
-Sometimes this might not work as expected, for example the following fails:
-
->>> import pg8000.native
->>>
->>> con = pg8000.native.Connection("postgres", password="cpsnow")
->>>
->>> channel = 'top_secret'
->>>
->>> con.run("LISTEN :channel", channel=channel)
-Traceback (most recent call last):
-pg8000.exceptions.DatabaseError: ...
->>>
->>> con.close()
-
-It fails because the PostgreSQL server doesn't allow this statement to have any
-parameters. There are many SQL statements that one might think would have parameters,
-but don't. For these cases the SQL has to be created manually, being careful to use the
-``identifier()`` and ``literal()`` functions to escape the values to avoid `SQL
-injection attacks <https://en.wikipedia.org/wiki/SQL_injection>`_:
-
->>> from pg8000.native import Connection, identifier, literal
->>>
->>> con = Connection("postgres", password="cpsnow")
->>>
->>> channel = 'top_secret'
->>> payload = 'Aliens Landed!'
->>> con.run(f"LISTEN {identifier(channel)}")
->>> con.run(f"NOTIFY {identifier(channel)}, {literal(payload)}")
->>>
->>> con.notifications[0]
-(..., 'top_secret', 'Aliens Landed!')
->>>
->>> con.close()
-
-
-COPY FROM And TO A Stream
-`````````````````````````
-
-The SQL `COPY <https://www.postgresql.org/docs/current/sql-copy.html>`_ statement can be
-used to copy from and to a file or file-like object. Here' an example using the CSV
-format:
-
->>> import pg8000.native
->>> from io import StringIO
->>> import csv
->>>
->>> con = pg8000.native.Connection("postgres", password="cpsnow")
->>>
->>> # Create a CSV file in memory
->>>
->>> stream_in = StringIO()
->>> csv_writer = csv.writer(stream_in)
->>> csv_writer.writerow([1, "electron"])
-12
->>> csv_writer.writerow([2, "muon"])
-8
->>> csv_writer.writerow([3, "tau"])
-7
->>> stream_in.seek(0)
-0
->>>
->>> # Create a table and then copy the CSV into it
->>>
->>> con.run("CREATE TEMPORARY TABLE lepton (id SERIAL, name TEXT)")
->>> con.run("COPY lepton FROM STDIN WITH (FORMAT CSV)", stream=stream_in)
->>>
->>> # COPY from a table to a stream
->>>
->>> stream_out = StringIO()
->>> con.run("COPY lepton TO STDOUT WITH (FORMAT CSV)", stream=stream_out)
->>> stream_out.seek(0)
-0
->>> for row in csv.reader(stream_out):
-...     print(row)
-['1', 'electron']
-['2', 'muon']
-['3', 'tau']
->>>
->>> con.close()
-
-It's also possible to COPY FROM an iterable, which is useful if you're creating rows
-programmatically:
-
->>> import pg8000.native
->>>
->>> con = pg8000.native.Connection("postgres", password="cpsnow")
->>>
->>> # Generator function for creating rows
->>> def row_gen():
-...     for i, name in ((1, "electron"), (2, "muon"), (3, "tau")):
-...         yield f"{i},{name}\n"
->>>
->>> # Create a table and then copy the CSV into it
->>>
->>> con.run("CREATE TEMPORARY TABLE lepton (id SERIAL, name TEXT)")
->>> con.run("COPY lepton FROM STDIN WITH (FORMAT CSV)", stream=row_gen())
->>>
->>> # COPY from a table to a stream
->>>
->>> stream_out = StringIO()
->>> con.run("COPY lepton TO STDOUT WITH (FORMAT CSV)", stream=stream_out)
->>> stream_out.seek(0)
-0
->>> for row in csv.reader(stream_out):
-...     print(row)
-['1', 'electron']
-['2', 'muon']
-['3', 'tau']
->>>
->>> con.close()
-
-
-Execute Multiple SQL Statements
-```````````````````````````````
-
-If you want to execute a series of SQL statements (eg. an ``.sql`` file), you can run
-them as expected:
-
->>> import pg8000.native
->>>
->>> con = pg8000.native.Connection("postgres", password="cpsnow")
->>>
->>> statements = "SELECT 5; SELECT 'Erich Fromm';"
->>>
->>> con.run(statements)
-[[5], ['Erich Fromm']]
->>>
->>> con.close()
-
-The only caveat is that when executing multiple statements you can't have any
-parameters.
-
-
-Quoted Identifiers in SQL
-`````````````````````````
-
-Say you had a column called ``My Column``. Since it's case sensitive and contains a
-space, you'd have to `surround it by double quotes
-<https://www.postgresql.org/docs/current/sql-syntax-lexical.html#SQL-SYNTAX-IDENTIFIER>`_.
-But you can't do:
-
->>> import pg8000.native
->>>
->>> con = pg8000.native.Connection("postgres", password="cpsnow")
->>>
->>> con.run("select 'hello' as "My Column"")
-Traceback (most recent call last):
-SyntaxError: invalid syntax...
->>>
->>> con.close()
-
-since Python uses double quotes to delimit string literals, so one solution is
-to use Python's `triple quotes
-<https://docs.python.org/3/tutorial/introduction.html#strings>`_ to delimit the string
-instead:
-
->>> import pg8000.native
->>>
->>> con = pg8000.native.Connection("postgres", password="cpsnow")
->>>
->>> con.run('''SELECT 'hello' AS "My Column"''')
-[['hello']]
->>>
->>> con.close()
-
-another solution, that's especially useful if the identifier comes from an untrusted
-source, is to use the ``identifier()`` function, which correctly quotes and escapes the
-identifier as needed:
-
->>> from pg8000.native import Connection, identifier
->>>
->>> con = Connection("postgres", password="cpsnow")
->>>
->>> sql = f"SELECT 'hello' as {identifier('My Column')}"
->>> print(sql)
-SELECT 'hello' as "My Column"
->>>
->>> con.run(sql)
-[['hello']]
->>>
->>> con.close()
-
-this approach guards against `SQL injection attacks
-<https://en.wikipedia.org/wiki/SQL_injection>`_. One thing to note if you're using
-explicit schemas (eg. ``pg_catalog.pg_language``) is that the schema name and table name
-are both separate identifiers. So to escape them you'd do:
-
->>> from pg8000.native import Connection, identifier
->>>
->>> con = Connection("postgres", password="cpsnow")
->>>
->>> query = (
-...     f"SELECT lanname FROM {identifier('pg_catalog')}.{identifier('pg_language')} "
-...     f"WHERE lanname = 'sql'"
-... )
->>> print(query)
-SELECT lanname FROM pg_catalog.pg_language WHERE lanname = 'sql'
->>>
->>> con.run(query)
-[['sql']]
->>>
->>> con.close()
-
-
-Custom adapter from a Python type to a PostgreSQL type
-``````````````````````````````````````````````````````
-
-pg8000 has a mapping from Python types to PostgreSQL types for when it needs to send
-SQL parameters to the server. The default mapping that comes with pg8000 is designed to
-work well in most cases, but you might want to add or replace the default mapping.
-
-A Python ``datetime.timedelta`` object is sent to the server as a PostgreSQL
-``interval`` type,  which has the ``oid`` 1186. But let's say we wanted to create our
-own Python class to be sent as an ``interval`` type. Then we'd have to register an
-adapter:
-
->>> import pg8000.native
->>>
->>> con = pg8000.native.Connection("postgres", password="cpsnow")
->>>
->>> class MyInterval(str):
-...     pass
->>>
->>> def my_interval_out(my_interval):
-...     return my_interval  # Must return a str
->>>
->>> con.register_out_adapter(MyInterval, my_interval_out)
->>> con.run("SELECT CAST(:interval as interval)", interval=MyInterval("2 hours"))
-[[datetime.timedelta(seconds=7200)]]
->>>
->>> con.close()
-
-Note that it still came back as a ``datetime.timedelta`` object because we only changed
-the mapping from Python to PostgreSQL. See below for an example of how to change the
-mapping from PostgreSQL to Python.
-
-
-Custom adapter from a PostgreSQL type to a Python type
-``````````````````````````````````````````````````````
-
-pg8000 has a mapping from PostgreSQL types to Python types for when it receives SQL
-results from the server. The default mapping that comes with pg8000 is designed to work
-well in most cases, but you might want to add or replace the default mapping.
-
-If pg8000 receives PostgreSQL ``interval`` type, which has the ``oid`` 1186, it converts
-it into a Python ``datetime.timedelta`` object. But let's say we wanted to create our
-own Python class to be used instead of ``datetime.timedelta``. Then we'd have to
-register an adapter:
-
->>> import pg8000.native
->>>
->>> con = pg8000.native.Connection("postgres", password="cpsnow")
->>>
->>> class MyInterval(str):
-...     pass
->>>
->>> def my_interval_in(my_interval_str):  # The parameter is of type str
-...     return MyInterval(my_interval)
->>>
->>> con.register_in_adapter(1186, my_interval_in)
->>> con.run("SELECT \'2 years'")
-[['2 years']]
->>>
->>> con.close()
-
-Note that registering the 'in' adapter only afects the mapping from the PostgreSQL type
-to the Python type. See above for an example of how to change the mapping from
-PostgreSQL to Python.
-
-
-Could Not Determine Data Type Of Parameter
-``````````````````````````````````````````
-
-Sometimes you'll get the 'could not determine data type of parameter' error message from
-the server:
-
->>> import pg8000.native
->>>
->>> con = pg8000.native.Connection("postgres", password="cpsnow")
->>>
->>> con.run("SELECT :v IS NULL", v=None)
-Traceback (most recent call last):
-pg8000.exceptions.DatabaseError: {'S': 'ERROR', 'V': 'ERROR', 'C': '42P18', 'M': 'could not determine data type of parameter $1', 'F': 'postgres.c', 'L': '...', 'R': '...'}
->>>
->>> con.close()
-
-One way of solving it is to put a ``CAST`` in the SQL:
-
->>> import pg8000.native
->>>
->>> con = pg8000.native.Connection("postgres", password="cpsnow")
->>>
->>> con.run("SELECT cast(:v as TIMESTAMP) IS NULL", v=None)
-[[True]]
->>>
->>> con.close()
-
-Another way is to override the type that pg8000 sends along with each parameter:
-
->>> import pg8000.native
->>>
->>> con = pg8000.native.Connection("postgres", password="cpsnow")
->>>
->>> con.run("SELECT :v IS NULL", v=None, types={'v': pg8000.native.TIMESTAMP})
-[[True]]
->>>
->>> con.close()
-
-
-Prepared Statements
-```````````````````
-
-`Prepared statements <https://www.postgresql.org/docs/current/sql-prepare.html>`_
-can be useful in improving performance when you have a statement that's executed
-repeatedly. Here's an example:
-
->>> import pg8000.native
->>>
->>> con = pg8000.native.Connection("postgres", password="cpsnow")
->>>
->>> # Create the prepared statement
->>> ps = con.prepare("SELECT cast(:v as varchar)")
->>>
->>> # Execute the statement repeatedly
->>> ps.run(v="speedy")
-[['speedy']]
->>> ps.run(v="rapid")
-[['rapid']]
->>> ps.run(v="swift")
-[['swift']]
->>>
->>> # Close the prepared statement, releasing resources on the server
->>> ps.close()
->>>
->>> con.close()
-
-
-Use Environment Variables As Connection Defaults
-````````````````````````````````````````````````
-
-You might want to use the current user as the database username for example:
-
->>> import pg8000.native
->>> import getpass
->>>
->>> # Connect to the database with current user name
->>> username = getpass.getuser()
->>> connection = pg8000.native.Connection(username, password="cpsnow")
->>>
->>> connection.run("SELECT 'pilau'")
-[['pilau']]
->>>
->>> connection.close()
-
-or perhaps you may want to use some of the same `environment variables that libpg uses
-<https://www.postgresql.org/docs/current/libpq-envars.html>`_:
-
->>> import pg8000.native
->>> from os import environ
->>>
->>> username = environ.get('PGUSER', 'postgres')
->>> password = environ.get('PGPASSWORD', 'cpsnow')
->>> host = environ.get('PGHOST', 'localhost')
->>> port = environ.get('PGPORT', '5432')
->>> database = environ.get('PGDATABASE')
->>>
->>> connection = pg8000.native.Connection(
-...     username, password=password, host=host, port=port, database=database)
->>>
->>> connection.run("SELECT 'Mr Cairo'")
-[['Mr Cairo']]
->>>
->>> connection.close()
-
-It might be asked, why doesn't pg8000 have this behaviour built in? The thinking
-follows the second aphorism of `The Zen of Python
-<https://www.python.org/dev/peps/pep-0020/>`_:
-
-    Explicit is better than implicit.
-
-So we've taken the approach of only being able to set connection parameters using the
-``pg8000.native.Connection()`` constructor.
-
-
-Connect To PostgreSQL Over SSL
-``````````````````````````````
-
-To connect to the server using SSL defaults do::
-
-  import pg8000.native
-  connection = pg8000.native.Connection('postgres', password="cpsnow", ssl_context=True)
-  connection.run("SELECT 'The game is afoot!'")
-
-To connect over SSL with custom settings, set the ``ssl_context`` parameter to an
-|ssl.SSLContext|_ object:
-
-::
-
-  import pg8000.native
-  import ssl
-
-
-  ssl_context = ssl.create_default_context()
-  ssl_context.verify_mode = ssl.CERT_REQUIRED
-  ssl_context.load_verify_locations('root.pem')        
-  connection = pg8000.native.Connection(
-    'postgres', password="cpsnow", ssl_context=ssl_context)
-
-It may be that your PostgreSQL server is behind an SSL proxy server in which case you
-can set a pg8000-specific attribute ``ssl.SSLContext.request_ssl = False`` which tells
-pg8000 to connect using an SSL socket, but not to request SSL from the PostgreSQL
-server:
-
-::
-
-  import pg8000.native
-  import ssl
-
-  ssl_context = ssl.create_default_context()
-  ssl_context.request_ssl = False
-  connection = pg8000.native.Connection(
-      'postgres', password="cpsnow", ssl_context=ssl_context)
-
-
-Server-Side Cursors
-```````````````````
-
-You can use the SQL commands `DECLARE
-<https://www.postgresql.org/docs/current/sql-declare.html>`_,
-`FETCH <https://www.postgresql.org/docs/current/sql-fetch.html>`_,
-`MOVE <https://www.postgresql.org/docs/current/sql-move.html>`_ and
-`CLOSE <https://www.postgresql.org/docs/current/sql-close.html>`_ to manipulate
-server-side cursors. For example:
-
->>> import pg8000.native
->>>
->>> con = pg8000.native.Connection('postgres', password="cpsnow")
->>> con.run("START TRANSACTION")
->>> con.run("DECLARE c SCROLL CURSOR FOR SELECT * FROM generate_series(1, 100)")
->>> con.run("FETCH FORWARD 5 FROM c")
-[[1], [2], [3], [4], [5]]
->>> con.run("MOVE FORWARD 50 FROM c")
->>> con.run("FETCH BACKWARD 10 FROM c")
-[[54], [53], [52], [51], [50], [49], [48], [47], [46], [45]]
->>> con.run("CLOSE c")
->>> con.run("ROLLBACK")
->>>
->>> con.close()
-
-
-BLOBs (Binary Large Objects)
-````````````````````````````
-
-There's a set of `SQL functions
-<https://www.postgresql.org/docs/current/lo-funcs.html>`_ for manipulating BLOBs.
-Here's an example:
-
->>> import pg8000.native
->>>
->>> con = pg8000.native.Connection('postgres', password="cpsnow")
->>>
->>> # Create a BLOB and get its oid
->>> data = b'hello'
->>> res = con.run("SELECT lo_from_bytea(0, :data)", data=data)
->>> oid = res[0][0]
->>>
->>> # Create a table and store the oid of the BLOB
->>> con.run("CREATE TEMPORARY TABLE image (raster oid)")
->>>
->>> con.run("INSERT INTO image (raster) VALUES (:oid)", oid=oid)
->>> # Retrieve the data using the oid
->>> con.run("SELECT lo_get(:oid)", oid=oid)
-[[b'hello']]
->>>
->>> # Add some data to the end of the BLOB
->>> more_data = b' all'
->>> offset = len(data)
->>> con.run(
-...     "SELECT lo_put(:oid, :offset, :data)",
-...     oid=oid, offset=offset, data=more_data)
-[['']]
->>> con.run("SELECT lo_get(:oid)", oid=oid)
-[[b'hello all']]
->>>
->>> # Download a part of the data
->>> con.run("SELECT lo_get(:oid, 6, 3)", oid=oid)
-[[b'all']]
->>>
->>> con.close()
-
-
-Replication Protocol
-````````````````````
-
-The PostgreSQL `Replication Protocol
-<https://www.postgresql.org/docs/current/protocol-replication.html>`_ is supported using
-the ``replication`` keyword when creating a connection:
-
->>> import pg8000.native
->>>
->>> con = pg8000.native.Connection(
-...    'postgres', password="cpsnow", replication="database")
->>>
->>> con.run("IDENTIFY_SYSTEM")
-[['...', 1, '.../...', 'postgres']]
->>>
->>> con.close()
-
-
-DB-API 2 Interactive Examples
------------------------------
-
-These examples stick to the DB-API 2.0 standard.
-
-
-Basic Example
-`````````````
-
-Import pg8000, connect to the database, create a table, add some rows and then query the
-table:
-
->>> import pg8000.dbapi
->>>
->>> conn = pg8000.dbapi.connect(user="postgres", password="cpsnow")
->>> cursor = conn.cursor()
->>> cursor.execute("CREATE TEMPORARY TABLE book (id SERIAL, title TEXT)")
->>> cursor.execute(
-...     "INSERT INTO book (title) VALUES (%s), (%s) RETURNING id, title",
-...     ("Ender's Game", "Speaker for the Dead"))
->>> results = cursor.fetchall()
->>> for row in results:
-...     id, title = row
-...     print("id = %s, title = %s" % (id, title))
-id = 1, title = Ender's Game
-id = 2, title = Speaker for the Dead
->>> conn.commit()
->>>
->>> conn.close()
-
-
-Query Using Functions
-`````````````````````
-
-Another query, using some PostgreSQL functions:
-
->>> import pg8000.dbapi
->>>
->>> con = pg8000.dbapi.connect(user="postgres", password="cpsnow")
->>> cursor = con.cursor()
->>>
->>> cursor.execute("SELECT TO_CHAR(TIMESTAMP '2021-10-10', 'YYYY BC')")
->>> cursor.fetchone()
-['2021 AD']
->>>
->>> con.close()
-
-
-Interval Type
-`````````````
-
-A query that returns the PostgreSQL interval type:
-
->>> import datetime
->>> import pg8000.dbapi
->>>
->>> con = pg8000.dbapi.connect(user="postgres", password="cpsnow")
->>> cursor = con.cursor()
->>>
->>> cursor.execute("SELECT timestamp '2013-12-01 16:06' - %s",
-... (datetime.date(1980, 4, 27),))
->>> cursor.fetchone()
-[datetime.timedelta(days=12271, seconds=57960)]
->>>
->>> con.close()
-
-
-Point Type
-``````````
-
-A round-trip with a `PostgreSQL point
-<https://www.postgresql.org/docs/current/datatype-geometric.html>`_ type:
-
->>> import pg8000.dbapi
->>>
->>> con = pg8000.dbapi.connect(user="postgres", password="cpsnow")
->>> cursor = con.cursor()
->>>
->>> cursor.execute("SELECT cast(%s as point)", ((2.3,1),))
->>> cursor.fetchone()
-[(2.3, 1.0)]
->>>
->>> con.close()
-
-
-Numeric Parameter Style
-```````````````````````
-
-pg8000 supports all the DB-API parameter styles. Here's an example of using the
-'numeric' parameter style:
-
->>> import pg8000.dbapi
->>>
->>> pg8000.dbapi.paramstyle = "numeric"
->>> con = pg8000.dbapi.connect(user="postgres", password="cpsnow")
->>> cursor = con.cursor()
->>>
->>> cursor.execute("SELECT array_prepend(:1, CAST(:2 AS int[]))", (500, [1, 2, 3, 4],))
->>> cursor.fetchone()
-[[500, 1, 2, 3, 4]]
->>> pg8000.dbapi.paramstyle = "format"
->>>
->>> con.close()
-
-
-Autocommit
-``````````
-
-Following the DB-API specification, autocommit is off by default. It can be turned on by
-using the autocommit property of the connection:
-
->>> import pg8000.dbapi
->>>
->>> con = pg8000.dbapi.connect(user="postgres", password="cpsnow")
->>> con.autocommit = True
->>>
->>> cur = con.cursor()
->>> cur.execute("vacuum")
->>> conn.autocommit = False
->>> cur.close()
->>>
->>> con.close()
-
-
-Client Encoding
-```````````````
-
-When communicating with the server, pg8000 uses the character set that the server asks
-it to use (the client encoding). By default the client encoding is the database's
-character set (chosen when the database is created), but the client encoding can be
-changed in a number of ways (eg. setting ``CLIENT_ENCODING`` in ``postgresql.conf``).
-Another way of changing the client encoding is by using an SQL command. For example:
-
->>> import pg8000.dbapi
->>>
->>> con = pg8000.dbapi.connect(user="postgres", password="cpsnow")
->>> cur = con.cursor()
->>> cur.execute("SET CLIENT_ENCODING TO 'UTF8'")
->>> cur.execute("SHOW CLIENT_ENCODING")
->>> cur.fetchone()
-['UTF8']
->>> cur.close()
->>>
->>> con.close()
-
-
-JSON
-````
-
-JSON is sent to the server serialized, and returned de-serialized. Here's an example:
-
->>> import json
->>> import pg8000.dbapi
->>>
->>> con = pg8000.dbapi.connect(user="postgres", password="cpsnow")
->>> cur = con.cursor()
->>> val = ['Apollo 11 Cave', True, 26.003]
->>> cur.execute("SELECT cast(%s as json)", (json.dumps(val),))
->>> cur.fetchone()
-[['Apollo 11 Cave', True, 26.003]]
->>> cur.close()
->>>
->>> con.close()
-
-JSON queries can be have parameters:
-
->>> import pg8000.dbapi
->>>
->>> with pg8000.dbapi.connect("postgres", password="cpsnow") as con:
-...     cur = con.cursor()
-...     cur.execute(""" SELECT CAST('{"a":1, "b":2}' AS jsonb) @> %s """, ({"b": 2},))
-...     for row in cur.fetchall():
-...         print(row)
-[True]
-
-
-Retrieve Column Names From Results
-``````````````````````````````````
-
-Use the columns names retrieved from a query:
-
->>> import pg8000
->>> conn = pg8000.dbapi.connect(user="postgres", password="cpsnow")
->>> c = conn.cursor()
->>> c.execute("create temporary table quark (id serial, name text)")
->>> c.executemany("INSERT INTO quark (name) VALUES (%s)", (("Up",), ("Down",)))
->>> #
->>> # Now retrieve the results
->>> #
->>> c.execute("select * from quark")
->>> rows = c.fetchall()
->>> keys = [k[0] for k in c.description]
->>> results = [dict(zip(keys, row)) for row in rows]
->>> assert results == [{'id': 1, 'name': 'Up'}, {'id': 2, 'name': 'Down'}]
->>>
->>> conn.close()
-
-
-COPY from and to a file
-```````````````````````
-
-The SQL `COPY <https://www.postgresql.org/docs/current/sql-copy.html>`__ statement can
-be used to copy from and to a file or file-like object:
-
->>> from io import StringIO
->>> import pg8000.dbapi
->>>
->>> con = pg8000.dbapi.connect(user="postgres", password="cpsnow")
->>> cur = con.cursor()
->>> #
->>> # COPY from a stream to a table
->>> #
->>> stream_in = StringIO('1\telectron\n2\tmuon\n3\ttau\n')
->>> cur = con.cursor()
->>> cur.execute("create temporary table lepton (id serial, name text)")
->>> cur.execute("COPY lepton FROM stdin", stream=stream_in)
->>> #
->>> # Now COPY from a table to a stream
->>> #
->>> stream_out = StringIO()
->>> cur.execute("copy lepton to stdout", stream=stream_out)
->>> stream_out.getvalue()
-'1\telectron\n2\tmuon\n3\ttau\n'
->>>
->>> con.close()
-
-
-Server-Side Cursors
-```````````````````
-
-You can use the SQL commands `DECLARE
-<https://www.postgresql.org/docs/current/sql-declare.html>`_,
-`FETCH <https://www.postgresql.org/docs/current/sql-fetch.html>`_,
-`MOVE <https://www.postgresql.org/docs/current/sql-move.html>`_ and
-`CLOSE <https://www.postgresql.org/docs/current/sql-close.html>`_ to manipulate
-server-side cursors. For example:
-
->>> import pg8000.dbapi
->>>
->>> con = pg8000.dbapi.connect(user="postgres", password="cpsnow")
->>> cur = con.cursor()
->>> cur.execute("START TRANSACTION")
->>> cur.execute(
-...    "DECLARE c SCROLL CURSOR FOR SELECT * FROM generate_series(1, 100)")
->>> cur.execute("FETCH FORWARD 5 FROM c")
->>> cur.fetchall()
-([1], [2], [3], [4], [5])
->>> cur.execute("MOVE FORWARD 50 FROM c")
->>> cur.execute("FETCH BACKWARD 10 FROM c")
->>> cur.fetchall()
-([54], [53], [52], [51], [50], [49], [48], [47], [46], [45])
->>> cur.execute("CLOSE c")
->>> cur.execute("ROLLBACK")
->>>
->>> con.close()
-
-
-BLOBs (Binary Large Objects)
-````````````````````````````
-
-There's a set of `SQL functions
-<https://www.postgresql.org/docs/current/lo-funcs.html>`_ for manipulating BLOBs.
-Here's an example:
-
->>> import pg8000.dbapi
->>>
->>> con = pg8000.dbapi.connect(user="postgres", password="cpsnow")
->>> cur = con.cursor()
->>>
->>> # Create a BLOB and get its oid
->>> data = b'hello'
->>> cur = con.cursor()
->>> cur.execute("SELECT lo_from_bytea(0, %s)", [data])
->>> oid = cur.fetchone()[0]
->>>
->>> # Create a table and store the oid of the BLOB
->>> cur.execute("CREATE TEMPORARY TABLE image (raster oid)")
->>> cur.execute("INSERT INTO image (raster) VALUES (%s)", [oid])
->>>
->>> # Retrieve the data using the oid
->>> cur.execute("SELECT lo_get(%s)", [oid])
->>> cur.fetchall()
-([b'hello'],)
->>>
->>> # Add some data to the end of the BLOB
->>> more_data = b' all'
->>> offset = len(data)
->>> cur.execute("SELECT lo_put(%s, %s, %s)", [oid, offset, more_data])
->>> cur.execute("SELECT lo_get(%s)", [oid])
->>> cur.fetchall()
-([b'hello all'],)
->>>
->>> # Download a part of the data
->>> cur.execute("SELECT lo_get(%s, 6, 3)", [oid])
->>> cur.fetchall()
-([b'all'],)
->>>
->>> con.close()
-
-
-Type Mapping
-------------
-
-The following table shows the default mapping between Python types and PostgreSQL types,
-and vice versa.
-
-If pg8000 doesn't recognize a type that it receives from PostgreSQL, it will return it
-as a ``str`` type. This is how pg8000 handles PostgreSQL ``enum`` and XML types. It's
-possible to change the default mapping using adapters (see the examples).
-
-.. table:: Python to PostgreSQL Type Mapping
-
-   +-----------------------+-----------------+-----------------------------------------+
-   | Python Type           | PostgreSQL Type | Notes                                   |
-   +=======================+=================+=========================================+
-   | bool                  | bool            |                                         |
-   +-----------------------+-----------------+-----------------------------------------+
-   | int                   | int4            |                                         |
-   +-----------------------+-----------------+-----------------------------------------+
-   | str                   | text            |                                         |
-   +-----------------------+-----------------+-----------------------------------------+
-   | float                 | float8          |                                         |
-   +-----------------------+-----------------+-----------------------------------------+
-   | decimal.Decimal       | numeric         |                                         |
-   +-----------------------+-----------------+-----------------------------------------+
-   | bytes                 | bytea           |                                         |
-   +-----------------------+-----------------+-----------------------------------------+
-   | datetime.datetime     | timestamp       | +/-infinity PostgreSQL values are       |
-   | (without tzinfo)      | without         | represented as Python ``str`` values.   |
-   |                       | timezone        | If a ``timestamp`` is too big for       |
-   |                       |                 | ``datetime.datetime`` then a ``str`` is |
-   |                       |                 | used.                                   |
-   +-----------------------+-----------------+-----------------------------------------+
-   | datetime.datetime     | timestamp with  | +/-infinity PostgreSQL values are       |
-   | (with tzinfo)         | timezone        | represented as Python ``str`` values.   |
-   |                       |                 | If a ``timestamptz`` is too big for     |
-   |                       |                 | ``datetime.datetime`` then a ``str`` is |
-   |                       |                 | used.                                   |
-   +-----------------------+-----------------+-----------------------------------------+
-   | datetime.date         | date            | +/-infinity PostgreSQL values are       |
-   |                       |                 | represented as Python ``str`` values.   |
-   |                       |                 | If a ``date`` is too big for a          |
-   |                       |                 | ``datetime.date`` then a ``str`` is     |
-   |                       |                 | used.                                   |
-   +-----------------------+-----------------+-----------------------------------------+
-   | datetime.time         | time without    |                                         |
-   |                       | time zone       |                                         |
-   +-----------------------+-----------------+-----------------------------------------+
-   | datetime.timedelta    | interval        | If an ``interval`` is too big for       |
-   |                       |                 | ``datetime.timedelta`` then a           |
-   |                       |                 | ``PGInterval``  is used.                |
-   +-----------------------+-----------------+-----------------------------------------+
-   | None                  | NULL            |                                         |
-   +-----------------------+-----------------+-----------------------------------------+
-   | uuid.UUID             | uuid            |                                         |
-   +-----------------------+-----------------+-----------------------------------------+
-   | ipaddress.IPv4Address | inet            |                                         |
-   +-----------------------+-----------------+-----------------------------------------+
-   | ipaddress.IPv6Address | inet            |                                         |
-   +-----------------------+-----------------+-----------------------------------------+
-   | ipaddress.IPv4Network | inet            |                                         |
-   +-----------------------+-----------------+-----------------------------------------+
-   | ipaddress.IPv6Network | inet            |                                         |
-   +-----------------------+-----------------+-----------------------------------------+
-   | int                   | xid             |                                         |
-   +-----------------------+-----------------+-----------------------------------------+
-   | list of int           | INT4[]          |                                         |
-   +-----------------------+-----------------+-----------------------------------------+
-   | list of float         | FLOAT8[]        |                                         |
-   +-----------------------+-----------------+-----------------------------------------+
-   | list of bool          | BOOL[]          |                                         |
-   +-----------------------+-----------------+-----------------------------------------+
-   | list of str           | TEXT[]          |                                         |
-   +-----------------------+-----------------+-----------------------------------------+
-   | int                   | int2vector      | Only from PostgreSQL to Python          |
-   +-----------------------+-----------------+-----------------------------------------+
-   | JSON                  | json, jsonb     | The Python JSON is provided as a Python |
-   |                       |                 | serialized string. Results returned as  |
-   |                       |                 | de-serialized JSON.                     |
-   +-----------------------+-----------------+-----------------------------------------+
-   | pg8000.Range          | \*range         | PostgreSQL multirange types are         |
-   |                       |                 | represented in Python as a list of      |
-   |                       |                 | range types.                            |
-   +-----------------------+-----------------+-----------------------------------------+
-   | tuple                 | composite type  | Only from Python to PostgreSQL          |
-   +-----------------------+-----------------+-----------------------------------------+
-
-
-
-Theory Of Operation
--------------------
-
-  A concept is tolerated inside the microkernel only if moving it outside the kernel,
-  i.e., permitting competing implementations, would prevent the implementation of the
-  system's required functionality.
-
-  -- Jochen Liedtke, Liedtke's minimality principle
-
-pg8000 is designed to be used with one thread per connection.
-
-Pg8000 communicates with the database using the `PostgreSQL Frontend/Backend Protocol
-<https://www.postgresql.org/docs/current/protocol.html>`_ (FEBE). If a query has no
-parameters, pg8000 uses the 'simple query protocol'. If a query does have parameters,
-pg8000 uses the 'extended query protocol' with unnamed prepared statements. The steps
-for a query with parameters are:
-
-1. Query comes in.
-
-#. Send a PARSE message to the server to create an unnamed prepared statement.
-
-#. Send a BIND message to run against the unnamed prepared statement, resulting in an
-   unnamed portal on the server.
-
-#. Send an EXECUTE message to read all the results from the portal.
-
-It's also possible to use named prepared statements. In which case the prepared
-statement persists on the server, and represented in pg8000 using a
-``PreparedStatement`` object. This means that the PARSE step gets executed once up
-front, and then only the BIND and EXECUTE steps are repeated subsequently.
-
-There are a lot of PostgreSQL data types, but few primitive data types in Python. By
-default, pg8000 doesn't send PostgreSQL data type information in the PARSE step, in
-which case PostgreSQL assumes the types implied by the SQL statement. In some cases
-PostgreSQL can't work out a parameter type and so an `explicit cast
-<https://www.postgresql.org/docs/current/static/sql-expressions.html#SQL-SYNTAX-TYPE-CASTS>`_
-can be used in the SQL.
-
-In the FEBE protocol, each query parameter can be sent to the server either as binary
-or text according to the format code. In pg8000 the parameters are always sent as text.
-
-Occasionally, the network connection between pg8000 and the server may go down. If
-pg8000 encounters a network problem it'll raise an ``InterfaceError`` with the message
-``network error`` and with the original exception set as the `cause
-<https://docs.python.org/3/reference/simple_stmts.html#the-raise-statement>`_.
-
-
-Native API Docs
----------------
-
-`Native API Docs <docs/native_api_docs.rst>`_
-
-
-DB-API 2 Docs
--------------
-
-`DB-API 2 Docs <docs/dbapi2_docs.rst>`_
-
-
-Design Decisions
-----------------
-
-For the ``Range`` type, the constructor follows the `PostgreSQL range constructor functions <https://www.postgresql.org/docs/current/rangetypes.html#RANGETYPES-CONSTRUCT>`_
-which makes `[closed, open) <https://fhur.me/posts/always-use-closed-open-intervals>`_
-the easiest to express:
-
->>> from pg8000.types import Range
->>>
->>> pg_range = Range(2, 6)
-
-
-Tests
------
-
-- Install `tox <http://testrun.org/tox/latest/>`_: ``pip install tox``
-
-- Enable the PostgreSQL hstore extension by running the SQL command:
-  ``create extension hstore;``
-
-- Add a line to ``pg_hba.conf`` for the various authentication options:
-
-::
-
-  host    pg8000_md5           all        127.0.0.1/32            md5
-  host    pg8000_gss           all        127.0.0.1/32            gss
-  host    pg8000_password      all        127.0.0.1/32            password
-  host    pg8000_scram_sha_256 all        127.0.0.1/32            scram-sha-256
-  host    all                  all        127.0.0.1/32            trust
-
-- Set password encryption to ``scram-sha-256`` in ``postgresql.conf``:
-  ``password_encryption = 'scram-sha-256'``
-
-- Set the password for the postgres user: ``ALTER USER postgresql WITH PASSWORD 'pw';``
-
-- Run ``tox`` from the ``pg8000`` directory: ``tox``
-
-This will run the tests against the Python version of the virtual environment, on the
-machine, and the installed PostgreSQL version listening on port 5432, or the ``PGPORT``
-environment variable if set.
-
-Benchmarks are run as part of the test suite at ``tests/test_benchmarks.py``.
-
-
-README.rst
-----------
-
-This file is written in the `reStructuredText
-<https://docutils.sourceforge.io/docs/user/rst/quickref.html>`_ format. To generate an
-HTML page from it, do:
-
-- Activate the virtual environment: ``source venv/bin/activate``
-- Install ``Sphinx``: ``pip install Sphinx``
-- Run ``rst2html.py``: ``rst2html.py README.rst README.html``
-
-
-Doing A Release Of pg8000
--------------------------
-
-Run ``tox`` to make sure all tests pass, then update the release notes, then do:
-
-::
-
-  git tag -a x.y.z -m "version x.y.z"
-  rm -r dist
-  python -m build
-  twine upload dist/*
-
-
-Release Notes
--------------
-
-`Release Notes <docs/release_notes.rst>`_
diff --git a/contrib/python/pg8000/pg8000/core.py b/contrib/python/pg8000/pg8000/core.py
index 8375b95213..ce187baa54 100644
--- a/contrib/python/pg8000/pg8000/core.py
+++ b/contrib/python/pg8000/pg8000/core.py
@@ -170,10 +170,17 @@ def _write(sock, d):
 
 
 def _make_socket(
-    unix_sock, sock, host, port, timeout, source_address, tcp_keepalive, ssl_context
+    unix_sock,
+    orig_sock,
+    host,
+    port,
+    timeout,
+    source_address,
+    tcp_keepalive,
+    orig_ssl_context,
 ):
     if unix_sock is not None:
-        if sock is not None:
+        if orig_sock is not None:
             raise InterfaceError("If unix_sock is provided, sock must be None")
 
         try:
@@ -191,8 +198,8 @@ def _make_socket(
                 sock.close()
             raise InterfaceError("communication error") from e
 
-    elif sock is not None:
-        pass
+    elif orig_sock is not None:
+        sock = orig_sock
 
     elif host is not None:
         try:
@@ -210,29 +217,30 @@ def _make_socket(
         raise InterfaceError("one of host, sock or unix_sock must be provided")
 
     channel_binding = None
-    if ssl_context is not None:
+    if orig_ssl_context is not False:
         try:
             import ssl
 
-            if ssl_context is True:
+            if orig_ssl_context is True or orig_ssl_context is None:
                 ssl_context = ssl.create_default_context()
-
-            request_ssl = getattr(ssl_context, "request_ssl", True)
-
-            if request_ssl:
-                # Int32(8) - Message length, including self.
-                # Int32(80877103) - The SSL request code.
-                sock.sendall(ii_pack(8, 80877103))
-                resp = sock.recv(1)
-                if resp != b"S":
-                    raise InterfaceError("Server refuses SSL")
-
-            sock = ssl_context.wrap_socket(sock, server_hostname=host)
-
-            if request_ssl:
+                ssl_context.check_hostname = False
+                ssl_context.verify_mode = ssl.CERT_NONE
+            else:
+                ssl_context = orig_ssl_context
+
+            # Int32(8) - Message length, including self.
+            # Int32(80877103) - The SSL request code.
+            sock.sendall(ii_pack(8, 80877103))
+            resp = sock.recv(1).decode("ascii")
+            if resp == "S":
+                sock = ssl_context.wrap_socket(sock, server_hostname=host)
                 channel_binding = scramp.make_channel_binding(
                     "tls-server-end-point", sock
                 )
+            elif orig_ssl_context is not None:
+                if sock is not None:
+                    sock.close()
+                raise InterfaceError("Server refuses SSL")
 
         except ImportError:
             raise InterfaceError(
diff --git a/contrib/python/pg8000/ya.make b/contrib/python/pg8000/ya.make
index f04dfe2320..49f7c20bfe 100644
--- a/contrib/python/pg8000/ya.make
+++ b/contrib/python/pg8000/ya.make
@@ -2,7 +2,7 @@
 
 PY3_LIBRARY()
 
-VERSION(1.30.5)
+VERSION(1.31.0)
 
 LICENSE(BSD-3-Clause)
 
-- 
cgit v1.2.3


From bc1a3f28621db97f32a585ce4e3f86d06877cfeb Mon Sep 17 00:00:00 2001
From: robot-ya-builder <robot-ya-builder@yandex-team.com>
Date: Mon, 15 Apr 2024 08:08:47 +0300
Subject: Automatic release build for ymake, os_ymake

From hash: [796293a7d2437569d8a0847cfd197dcedacd280e](https://a.yandex-team.ru/arcadia/commit/796293a7d2437569d8a0847cfd197dcedacd280e)
From revision: [13845207](https://a.yandex-team.ru/arcadia/commit/rXXXXXX)
[CI flow](https://a.yandex-team.ru/projects/ya_make/ci/releases/flow?dir=devtools%2Fya&id=release-ymake&version=183)
Flow triggered by user: [robot-ci](https://staff.yandex-team.ru/robot-ci)

Update tools: ymake, os_ymake
1d39478e4a68843dd52056773c6ea3fc50820ad0
---
 build/external_resources/ymake/public.resources.json | 10 +++++-----
 build/external_resources/ymake/resources.json        | 10 +++++-----
 build/mapping.conf.json                              | 10 ++++++++++
 3 files changed, 20 insertions(+), 10 deletions(-)

diff --git a/build/external_resources/ymake/public.resources.json b/build/external_resources/ymake/public.resources.json
index 52aa3816c2..a6d65ea4df 100644
--- a/build/external_resources/ymake/public.resources.json
+++ b/build/external_resources/ymake/public.resources.json
@@ -1,19 +1,19 @@
 {
     "by_platform": {
         "darwin": {
-            "uri": "sbr:6137609839"
+            "uri": "sbr:6166545215"
         },
         "darwin-arm64": {
-            "uri": "sbr:6137609447"
+            "uri": "sbr:6166544602"
         },
         "linux": {
-            "uri": "sbr:6137610792"
+            "uri": "sbr:6166546323"
         },
         "linux-aarch64": {
-            "uri": "sbr:6137609077"
+            "uri": "sbr:6166544140"
         },
         "win32-clang-cl": {
-            "uri": "sbr:6137610326"
+            "uri": "sbr:6166545839"
         }
     }
 }
diff --git a/build/external_resources/ymake/resources.json b/build/external_resources/ymake/resources.json
index ba951bcf07..1681c7a5eb 100644
--- a/build/external_resources/ymake/resources.json
+++ b/build/external_resources/ymake/resources.json
@@ -1,19 +1,19 @@
 {
     "by_platform": {
         "darwin": {
-            "uri": "sbr:6137616406"
+            "uri": "sbr:6166543877"
         },
         "darwin-arm64": {
-            "uri": "sbr:6137615686"
+            "uri": "sbr:6166542806"
         },
         "linux": {
-            "uri": "sbr:6137618079"
+            "uri": "sbr:6166546120"
         },
         "linux-aarch64": {
-            "uri": "sbr:6137615044"
+            "uri": "sbr:6166541594"
         },
         "win32-clang-cl": {
-            "uri": "sbr:6137617218"
+            "uri": "sbr:6166544948"
         }
     }
 }
diff --git a/build/mapping.conf.json b/build/mapping.conf.json
index 9e0838bf14..a6d691927d 100644
--- a/build/mapping.conf.json
+++ b/build/mapping.conf.json
@@ -278,6 +278,7 @@
         "6058478017": "https://devtools-registry.s3.yandex.net/6058478017",
         "6083564572": "https://devtools-registry.s3.yandex.net/6083564572",
         "6137609839": "https://devtools-registry.s3.yandex.net/6137609839",
+        "6166545215": "https://devtools-registry.s3.yandex.net/6166545215",
         "5766171800": "https://devtools-registry.s3.yandex.net/5766171800",
         "5805430761": "https://devtools-registry.s3.yandex.net/5805430761",
         "5829025456": "https://devtools-registry.s3.yandex.net/5829025456",
@@ -292,6 +293,7 @@
         "6058474382": "https://devtools-registry.s3.yandex.net/6058474382",
         "6083563814": "https://devtools-registry.s3.yandex.net/6083563814",
         "6137609447": "https://devtools-registry.s3.yandex.net/6137609447",
+        "6166544602": "https://devtools-registry.s3.yandex.net/6166544602",
         "5766173070": "https://devtools-registry.s3.yandex.net/5766173070",
         "5805432830": "https://devtools-registry.s3.yandex.net/5805432830",
         "5829031598": "https://devtools-registry.s3.yandex.net/5829031598",
@@ -306,6 +308,7 @@
         "6058485428": "https://devtools-registry.s3.yandex.net/6058485428",
         "6083566146": "https://devtools-registry.s3.yandex.net/6083566146",
         "6137610792": "https://devtools-registry.s3.yandex.net/6137610792",
+        "6166546323": "https://devtools-registry.s3.yandex.net/6166546323",
         "5766171341": "https://devtools-registry.s3.yandex.net/5766171341",
         "5805430188": "https://devtools-registry.s3.yandex.net/5805430188",
         "5829023352": "https://devtools-registry.s3.yandex.net/5829023352",
@@ -320,6 +323,7 @@
         "6058468676": "https://devtools-registry.s3.yandex.net/6058468676",
         "6083563061": "https://devtools-registry.s3.yandex.net/6083563061",
         "6137609077": "https://devtools-registry.s3.yandex.net/6137609077",
+        "6166544140": "https://devtools-registry.s3.yandex.net/6166544140",
         "5766172695": "https://devtools-registry.s3.yandex.net/5766172695",
         "5805432230": "https://devtools-registry.s3.yandex.net/5805432230",
         "5829029743": "https://devtools-registry.s3.yandex.net/5829029743",
@@ -334,6 +338,7 @@
         "6058481335": "https://devtools-registry.s3.yandex.net/6058481335",
         "6083565386": "https://devtools-registry.s3.yandex.net/6083565386",
         "6137610326": "https://devtools-registry.s3.yandex.net/6137610326",
+        "6166545839": "https://devtools-registry.s3.yandex.net/6166545839",
         "4307890075": "https://devtools-registry.s3.yandex.net/4307890075",
         "5517245192": "https://devtools-registry.s3.yandex.net/5517245192",
         "4307901240": "https://devtools-registry.s3.yandex.net/4307901240",
@@ -723,6 +728,7 @@
         "6058478017": "devtools/ymake/bin/ymake for darwin",
         "6083564572": "devtools/ymake/bin/ymake for darwin",
         "6137609839": "devtools/ymake/bin/ymake for darwin",
+        "6166545215": "devtools/ymake/bin/ymake for darwin",
         "5766171800": "devtools/ymake/bin/ymake for darwin-arm64",
         "5805430761": "devtools/ymake/bin/ymake for darwin-arm64",
         "5829025456": "devtools/ymake/bin/ymake for darwin-arm64",
@@ -737,6 +743,7 @@
         "6058474382": "devtools/ymake/bin/ymake for darwin-arm64",
         "6083563814": "devtools/ymake/bin/ymake for darwin-arm64",
         "6137609447": "devtools/ymake/bin/ymake for darwin-arm64",
+        "6166544602": "devtools/ymake/bin/ymake for darwin-arm64",
         "5766173070": "devtools/ymake/bin/ymake for linux",
         "5805432830": "devtools/ymake/bin/ymake for linux",
         "5829031598": "devtools/ymake/bin/ymake for linux",
@@ -751,6 +758,7 @@
         "6058485428": "devtools/ymake/bin/ymake for linux",
         "6083566146": "devtools/ymake/bin/ymake for linux",
         "6137610792": "devtools/ymake/bin/ymake for linux",
+        "6166546323": "devtools/ymake/bin/ymake for linux",
         "5766171341": "devtools/ymake/bin/ymake for linux-aarch64",
         "5805430188": "devtools/ymake/bin/ymake for linux-aarch64",
         "5829023352": "devtools/ymake/bin/ymake for linux-aarch64",
@@ -765,6 +773,7 @@
         "6058468676": "devtools/ymake/bin/ymake for linux-aarch64",
         "6083563061": "devtools/ymake/bin/ymake for linux-aarch64",
         "6137609077": "devtools/ymake/bin/ymake for linux-aarch64",
+        "6166544140": "devtools/ymake/bin/ymake for linux-aarch64",
         "5766172695": "devtools/ymake/bin/ymake for win32-clang-cl",
         "5805432230": "devtools/ymake/bin/ymake for win32-clang-cl",
         "5829029743": "devtools/ymake/bin/ymake for win32-clang-cl",
@@ -779,6 +788,7 @@
         "6058481335": "devtools/ymake/bin/ymake for win32-clang-cl",
         "6083565386": "devtools/ymake/bin/ymake for win32-clang-cl",
         "6137610326": "devtools/ymake/bin/ymake for win32-clang-cl",
+        "6166545839": "devtools/ymake/bin/ymake for win32-clang-cl",
         "4307890075": "flake8_linter for linux",
         "5517245192": "flake8_linter for linux",
         "4307901240": "flake8_linter for linux-aarch64",
-- 
cgit v1.2.3


From 969a7065950f3f4c76d45c7bb813a3e27df8a466 Mon Sep 17 00:00:00 2001
From: miroslav2 <miroslav2@yandex-team.com>
Date: Mon, 15 Apr 2024 08:41:57 +0300
Subject: Remove JDK 8 from autocheck 98f6b93b520d3c28dfbd36b449bc23c9dcaae862

---
 build/conf/java.conf                  | 25 +------------------------
 build/platform/java/jdk/jdk8/jdk.json | 17 -----------------
 build/platform/java/jdk/jdk8/ya.make  | 10 ----------
 build/platform/java/jdk/ya.make       |  4 ----
 4 files changed, 1 insertion(+), 55 deletions(-)
 delete mode 100644 build/platform/java/jdk/jdk8/jdk.json
 delete mode 100644 build/platform/java/jdk/jdk8/ya.make

diff --git a/build/conf/java.conf b/build/conf/java.conf
index fed842aebe..f2cd6861b0 100644
--- a/build/conf/java.conf
+++ b/build/conf/java.conf
@@ -1216,9 +1216,6 @@ elsewhen ($JDK_VERSION == "15") {
 elsewhen ($JDK_VERSION == "11") {
     JDK_REAL_VERSION=11
 }
-elsewhen ($JDK_VERSION == "8") {
-    JDK_REAL_VERSION=8
-}
 elsewhen ($MAPSMOBI_BUILD_TARGET && $OS_ANDROID) {
     JDK_REAL_VERSION=11
 }
@@ -1254,9 +1251,6 @@ otherwise {
     when ($JDK_REAL_VERSION == "11") {
         JDK_RESOURCE_PEERDIR=build/platform/java/jdk/jdk11 build/platform/java/jdk/jdk17
     }
-    when ($JDK_REAL_VERSION == "8") {
-        JDK_RESOURCE_PEERDIR=build/platform/java/jdk/jdk8 build/platform/java/jdk/jdk17
-    }
 }
 
 # tag:java-specific
@@ -1281,9 +1275,6 @@ when ($JDK_REAL_VERSION == "15") {
 when ($JDK_REAL_VERSION == "11") {
     UBERJAR_RESOURCE_PEERDIR=build/platform/java/uberjar/uberjar11
 }
-when ($JDK_REAL_VERSION == "8") {
-    UBERJAR_RESOURCE_PEERDIR=build/platform/java/uberjar/uberjar8
-}
 
 # tag:java-specific
 JAVAC_OPTS=
@@ -1312,20 +1303,12 @@ otherwise {
     when ($JDK_REAL_VERSION == "11") {
         JDK_RESOURCE=$JDK11_RESOURCE_GLOBAL
     }
-    when ($JDK_REAL_VERSION == "8") {
-        JDK_RESOURCE=$JDK8_RESOURCE_GLOBAL
-    }
 }
 
 # tag:java-specific
 when (!$USE_SYSTEM_ERROR_PRONE) {
     # Still not done: DTCC-667
-    when ($JDK_REAL_VERSION == "8") {
-        ERROR_PRONE_VERSION=2.3.1
-        ERROR_PRONE_PEERDIR=build/platform/java/error_prone/2.3.1
-        ERROR_PRONE_RESOURCE=$ERROR_PRONE_2_3_1_RESOURCE_GLOBAL
-    }
-    elsewhen ($JDK_REAL_VERSION == "11" || $JDK_REAL_VERSION == "15") {
+    when ($JDK_REAL_VERSION == "11" || $JDK_REAL_VERSION == "15") {
         ERROR_PRONE_VERSION=2.7.1
         ERROR_PRONE_PEERDIR=build/platform/java/error_prone/2.7.1
         ERROR_PRONE_RESOURCE=$ERROR_PRONE_2_7_1_RESOURCE_GLOBAL
@@ -1393,9 +1376,6 @@ otherwise {
     when ($JDK_REAL_VERSION == "11") {
         UBERJAR_RESOURCE=$UBERJAR11_RESOURCE_GLOBAL
     }
-    when ($JDK_REAL_VERSION == "8") {
-        UBERJAR_RESOURCE=$UBERJAR8_RESOURCE_GLOBAL
-    }
 }
 
 # tag:java-specific
@@ -1420,9 +1400,6 @@ when ($JDK_REAL_VERSION == "15") {
 when ($JDK_REAL_VERSION == "11") {
     WITH_JDK_RESOURCE=$WITH_JDK11_RESOURCE_GLOBAL
 }
-when ($JDK_REAL_VERSION == "8") {
-    WITH_JDK_RESOURCE=$WITH_JDK8_RESOURCE_GLOBAL
-}
 
 # tag:java-specific
 EXTERNAL_JAVA_JDK_RESOURCE=
diff --git a/build/platform/java/jdk/jdk8/jdk.json b/build/platform/java/jdk/jdk8/jdk.json
deleted file mode 100644
index fc642004df..0000000000
--- a/build/platform/java/jdk/jdk8/jdk.json
+++ /dev/null
@@ -1,17 +0,0 @@
-{
-    "by_platform": {
-        "darwin-arm64": {
-            "uri": "sbr:1901326056"
-        },
-        "darwin-x86_64": {
-            "uri": "sbr:1901326056"
-        },
-        "linux-x86_64": {
-            "uri": "sbr:1901306329"
-        },
-        "win32-x86_64": {
-            "uri": "sbr:1901510679"
-        }
-    }
-}
-
diff --git a/build/platform/java/jdk/jdk8/ya.make b/build/platform/java/jdk/jdk8/ya.make
deleted file mode 100644
index dd8cdeffc9..0000000000
--- a/build/platform/java/jdk/jdk8/ya.make
+++ /dev/null
@@ -1,10 +0,0 @@
-RESOURCES_LIBRARY()
-
-DECLARE_EXTERNAL_HOST_RESOURCES_BUNDLE_BY_JSON(JDK8 jdk.json)
-SET_RESOURCE_URI_FROM_JSON(WITH_JDK8_URI jdk.json)
-
-IF (WITH_JDK8_URI)
-    DECLARE_EXTERNAL_RESOURCE(WITH_JDK8 ${WITH_JDK8_URI})
-ENDIF()
-
-END()
diff --git a/build/platform/java/jdk/ya.make b/build/platform/java/jdk/ya.make
index 17c55396a2..34094807c9 100644
--- a/build/platform/java/jdk/ya.make
+++ b/build/platform/java/jdk/ya.make
@@ -24,9 +24,6 @@ ELSEIF(JDK_REAL_VERSION == "15")
 ELSEIF(JDK_REAL_VERSION == "11")
     DECLARE_EXTERNAL_HOST_RESOURCES_BUNDLE_BY_JSON(JDK_DEFAULT jdk11/jdk.json)
     SET_RESOURCE_URI_FROM_JSON(WITH_JDK_URI jdk11/jdk.json)
-ELSEIF(JDK_REAL_VERSION == "8")
-    DECLARE_EXTERNAL_HOST_RESOURCES_BUNDLE_BY_JSON(JDK_DEFAULT jdk8/jdk.json)
-    SET_RESOURCE_URI_FROM_JSON(WITH_JDK_URI jdk8/jdk.json)
 ELSE()
     MESSAGE(FATAL_ERROR Unsupported JDK version ${JDK_REAL_VERSION})
 ENDIF()
@@ -38,7 +35,6 @@ ENDIF()
 END()
 
 RECURSE(
-    jdk8
     jdk11
     jdk15
     jdk17
-- 
cgit v1.2.3


From 7930380b354abe9969174901a4e8a730ab1d0906 Mon Sep 17 00:00:00 2001
From: robot-piglet <robot-piglet@yandex-team.com>
Date: Mon, 15 Apr 2024 10:18:44 +0300
Subject: Intermediate changes

---
 contrib/python/ipython/py3/.dist-info/METADATA     |   8 +-
 .../ipython/py3/IPython/core/guarded_eval.py       | 228 +++++++--
 .../ipython/py3/IPython/core/magics/basic.py       |   3 +
 .../ipython/py3/IPython/core/magics/execution.py   |   2 +-
 contrib/python/ipython/py3/IPython/core/release.py |   4 +-
 .../python/ipython/py3/IPython/utils/_sysinfo.py   |   2 +-
 contrib/python/ipython/py3/ya.make                 |   2 +-
 contrib/python/pycparser/py3/.dist-info/METADATA   |  25 +-
 contrib/python/pycparser/py3/LICENSE               |   4 +-
 contrib/python/pycparser/py3/README.rst            |  26 +-
 contrib/python/pycparser/py3/pycparser/__init__.py |   9 +-
 .../pycparser/py3/pycparser/_build_tables.py       |   3 +
 contrib/python/pycparser/py3/pycparser/c_lexer.py  |   1 +
 contrib/python/pycparser/py3/pycparser/c_parser.py |  22 +-
 contrib/python/pycparser/py3/pycparser/lextab.py   |  10 +-
 contrib/python/pycparser/py3/pycparser/ply/lex.py  |   2 +-
 contrib/python/pycparser/py3/pycparser/yacctab.py  | 543 +++++++++++----------
 contrib/python/pycparser/py3/ya.make               |   2 +-
 18 files changed, 520 insertions(+), 376 deletions(-)

diff --git a/contrib/python/ipython/py3/.dist-info/METADATA b/contrib/python/ipython/py3/.dist-info/METADATA
index 11836decd6..44c7fe3fa0 100644
--- a/contrib/python/ipython/py3/.dist-info/METADATA
+++ b/contrib/python/ipython/py3/.dist-info/METADATA
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: ipython
-Version: 8.22.2
+Version: 8.23.0
 Summary: IPython: Productive Interactive Computing
 Author: The IPython Development Team
 Author-email: ipython-dev@python.org
@@ -33,12 +33,12 @@ Requires-Dist: prompt-toolkit <3.1.0,>=3.0.41
 Requires-Dist: pygments >=2.4.0
 Requires-Dist: stack-data
 Requires-Dist: traitlets >=5.13.0
-Requires-Dist: typing-extensions ; python_version < "3.10"
 Requires-Dist: exceptiongroup ; python_version < "3.11"
+Requires-Dist: typing-extensions ; python_version < "3.12"
 Requires-Dist: pexpect >4.3 ; sys_platform != "win32" and sys_platform != "emscripten"
 Requires-Dist: colorama ; sys_platform == "win32"
 Provides-Extra: all
-Requires-Dist: ipython[black,doc,kernel,nbconvert,nbformat,notebook,parallel,qtconsole,terminal] ; extra == 'all'
+Requires-Dist: ipython[black,doc,kernel,matplotlib,nbconvert,nbformat,notebook,parallel,qtconsole] ; extra == 'all'
 Requires-Dist: ipython[test,test_extra] ; extra == 'all'
 Provides-Extra: black
 Requires-Dist: black ; extra == 'black'
@@ -56,6 +56,8 @@ Requires-Dist: exceptiongroup ; extra == 'doc'
 Requires-Dist: ipython[test] ; extra == 'doc'
 Provides-Extra: kernel
 Requires-Dist: ipykernel ; extra == 'kernel'
+Provides-Extra: matplotlib
+Requires-Dist: matplotlib ; extra == 'matplotlib'
 Provides-Extra: nbconvert
 Requires-Dist: nbconvert ; extra == 'nbconvert'
 Provides-Extra: nbformat
diff --git a/contrib/python/ipython/py3/IPython/core/guarded_eval.py b/contrib/python/ipython/py3/IPython/core/guarded_eval.py
index a304affc35..d8ac9928af 100644
--- a/contrib/python/ipython/py3/IPython/core/guarded_eval.py
+++ b/contrib/python/ipython/py3/IPython/core/guarded_eval.py
@@ -1,16 +1,23 @@
-from inspect import signature, Signature
+from inspect import isclass, signature, Signature
 from typing import (
-    Any,
+    Annotated,
+    AnyStr,
     Callable,
     Dict,
+    Literal,
+    NamedTuple,
+    NewType,
+    Optional,
+    Protocol,
     Set,
     Sequence,
     Tuple,
-    NamedTuple,
     Type,
-    Literal,
+    TypeGuard,
     Union,
-    TYPE_CHECKING,
+    get_args,
+    get_origin,
+    is_typeddict,
 )
 import ast
 import builtins
@@ -21,15 +28,18 @@ from functools import cached_property
 from dataclasses import dataclass, field
 from types import MethodDescriptorType, ModuleType
 
-from IPython.utils.docs import GENERATING_DOCUMENTATION
 from IPython.utils.decorators import undoc
 
 
-if TYPE_CHECKING or GENERATING_DOCUMENTATION:
-    from typing_extensions import Protocol
+if sys.version_info < (3, 11):
+    from typing_extensions import Self, LiteralString
+else:
+    from typing import Self, LiteralString
+
+if sys.version_info < (3, 12):
+    from typing_extensions import TypeAliasType
 else:
-    # do not require on runtime
-    Protocol = object  # requires Python >=3.8
+    from typing import TypeAliasType
 
 
 @undoc
@@ -337,6 +347,7 @@ class _IdentitySubscript:
 IDENTITY_SUBSCRIPT = _IdentitySubscript()
 SUBSCRIPT_MARKER = "__SUBSCRIPT_SENTINEL__"
 UNKNOWN_SIGNATURE = Signature()
+NOT_EVALUATED = object()
 
 
 class GuardRejection(Exception):
@@ -417,9 +428,37 @@ UNARY_OP_DUNDERS: Dict[Type[ast.unaryop], Tuple[str, ...]] = {
 }
 
 
-class Duck:
+class ImpersonatingDuck:
     """A dummy class used to create objects of other classes without calling their ``__init__``"""
 
+    # no-op: override __class__ to impersonate
+
+
+class _Duck:
+    """A dummy class used to create objects pretending to have given attributes"""
+
+    def __init__(self, attributes: Optional[dict] = None, items: Optional[dict] = None):
+        self.attributes = attributes or {}
+        self.items = items or {}
+
+    def __getattr__(self, attr: str):
+        return self.attributes[attr]
+
+    def __hasattr__(self, attr: str):
+        return attr in self.attributes
+
+    def __dir__(self):
+        return [*dir(super), *self.attributes]
+
+    def __getitem__(self, key: str):
+        return self.items[key]
+
+    def __hasitem__(self, key: str):
+        return self.items[key]
+
+    def _ipython_key_completions_(self):
+        return self.items.keys()
+
 
 def _find_dunder(node_op, dunders) -> Union[Tuple[str, ...], None]:
     dunder = None
@@ -557,19 +596,7 @@ def eval_node(node: Union[ast.AST, None], context: EvaluationContext):
             f" not allowed in {context.evaluation} mode",
         )
     if isinstance(node, ast.Name):
-        if policy.allow_locals_access and node.id in context.locals:
-            return context.locals[node.id]
-        if policy.allow_globals_access and node.id in context.globals:
-            return context.globals[node.id]
-        if policy.allow_builtins_access and hasattr(builtins, node.id):
-            # note: do not use __builtins__, it is implementation detail of cPython
-            return getattr(builtins, node.id)
-        if not policy.allow_globals_access and not policy.allow_locals_access:
-            raise GuardRejection(
-                f"Namespace access not allowed in {context.evaluation} mode"
-            )
-        else:
-            raise NameError(f"{node.id} not found in locals, globals, nor builtins")
+        return _eval_node_name(node.id, context)
     if isinstance(node, ast.Attribute):
         value = eval_node(node.value, context)
         if policy.can_get_attr(value, node.attr):
@@ -590,27 +617,19 @@ def eval_node(node: Union[ast.AST, None], context: EvaluationContext):
         if policy.can_call(func) and not node.keywords:
             args = [eval_node(arg, context) for arg in node.args]
             return func(*args)
-        try:
-            sig = signature(func)
-        except ValueError:
-            sig = UNKNOWN_SIGNATURE
-        # if annotation was not stringized, or it was stringized
-        # but resolved by signature call we know the return type
-        not_empty = sig.return_annotation is not Signature.empty
-        not_stringized = not isinstance(sig.return_annotation, str)
-        if not_empty and not_stringized:
-            duck = Duck()
-            # if allow-listed builtin is on type annotation, instantiate it
-            if policy.can_call(sig.return_annotation) and not node.keywords:
-                args = [eval_node(arg, context) for arg in node.args]
-                return sig.return_annotation(*args)
-            try:
-                # if custom class is in type annotation, mock it;
-                # this only works for heap types, not builtins
-                duck.__class__ = sig.return_annotation
-                return duck
-            except TypeError:
-                pass
+        if isclass(func):
+            # this code path gets entered when calling class e.g. `MyClass()`
+            # or `my_instance.__class__()` - in both cases `func` is `MyClass`.
+            # Should return `MyClass` if `__new__` is not overridden,
+            # otherwise whatever `__new__` return type is.
+            overridden_return_type = _eval_return_type(func.__new__, node, context)
+            if overridden_return_type is not NOT_EVALUATED:
+                return overridden_return_type
+            return _create_duck_for_heap_type(func)
+        else:
+            return_type = _eval_return_type(func, node, context)
+            if return_type is not NOT_EVALUATED:
+                return return_type
         raise GuardRejection(
             "Call for",
             func,  # not joined to avoid calling `repr`
@@ -619,6 +638,125 @@ def eval_node(node: Union[ast.AST, None], context: EvaluationContext):
     raise ValueError("Unhandled node", ast.dump(node))
 
 
+def _eval_return_type(func: Callable, node: ast.Call, context: EvaluationContext):
+    """Evaluate return type of a given callable function.
+
+    Returns the built-in type, a duck or NOT_EVALUATED sentinel.
+    """
+    try:
+        sig = signature(func)
+    except ValueError:
+        sig = UNKNOWN_SIGNATURE
+    # if annotation was not stringized, or it was stringized
+    # but resolved by signature call we know the return type
+    not_empty = sig.return_annotation is not Signature.empty
+    if not_empty:
+        return _resolve_annotation(sig.return_annotation, sig, func, node, context)
+    return NOT_EVALUATED
+
+
+def _resolve_annotation(
+    annotation,
+    sig: Signature,
+    func: Callable,
+    node: ast.Call,
+    context: EvaluationContext,
+):
+    """Resolve annotation created by user with `typing` module and custom objects."""
+    annotation = (
+        _eval_node_name(annotation, context)
+        if isinstance(annotation, str)
+        else annotation
+    )
+    origin = get_origin(annotation)
+    if annotation is Self and hasattr(func, "__self__"):
+        return func.__self__
+    elif origin is Literal:
+        type_args = get_args(annotation)
+        if len(type_args) == 1:
+            return type_args[0]
+    elif annotation is LiteralString:
+        return ""
+    elif annotation is AnyStr:
+        index = None
+        for i, (key, value) in enumerate(sig.parameters.items()):
+            if value.annotation is AnyStr:
+                index = i
+                break
+        if index is not None and index < len(node.args):
+            return eval_node(node.args[index], context)
+    elif origin is TypeGuard:
+        return bool()
+    elif origin is Union:
+        attributes = [
+            attr
+            for type_arg in get_args(annotation)
+            for attr in dir(_resolve_annotation(type_arg, sig, func, node, context))
+        ]
+        return _Duck(attributes=dict.fromkeys(attributes))
+    elif is_typeddict(annotation):
+        return _Duck(
+            attributes=dict.fromkeys(dir(dict())),
+            items={
+                k: _resolve_annotation(v, sig, func, node, context)
+                for k, v in annotation.__annotations__.items()
+            },
+        )
+    elif hasattr(annotation, "_is_protocol"):
+        return _Duck(attributes=dict.fromkeys(dir(annotation)))
+    elif origin is Annotated:
+        type_arg = get_args(annotation)[0]
+        return _resolve_annotation(type_arg, sig, func, node, context)
+    elif isinstance(annotation, NewType):
+        return _eval_or_create_duck(annotation.__supertype__, node, context)
+    elif isinstance(annotation, TypeAliasType):
+        return _eval_or_create_duck(annotation.__value__, node, context)
+    else:
+        return _eval_or_create_duck(annotation, node, context)
+
+
+def _eval_node_name(node_id: str, context: EvaluationContext):
+    policy = EVALUATION_POLICIES[context.evaluation]
+    if policy.allow_locals_access and node_id in context.locals:
+        return context.locals[node_id]
+    if policy.allow_globals_access and node_id in context.globals:
+        return context.globals[node_id]
+    if policy.allow_builtins_access and hasattr(builtins, node_id):
+        # note: do not use __builtins__, it is implementation detail of cPython
+        return getattr(builtins, node_id)
+    if not policy.allow_globals_access and not policy.allow_locals_access:
+        raise GuardRejection(
+            f"Namespace access not allowed in {context.evaluation} mode"
+        )
+    else:
+        raise NameError(f"{node_id} not found in locals, globals, nor builtins")
+
+
+def _eval_or_create_duck(duck_type, node: ast.Call, context: EvaluationContext):
+    policy = EVALUATION_POLICIES[context.evaluation]
+    # if allow-listed builtin is on type annotation, instantiate it
+    if policy.can_call(duck_type) and not node.keywords:
+        args = [eval_node(arg, context) for arg in node.args]
+        return duck_type(*args)
+    # if custom class is in type annotation, mock it
+    return _create_duck_for_heap_type(duck_type)
+
+
+def _create_duck_for_heap_type(duck_type):
+    """Create an imitation of an object of a given type (a duck).
+
+    Returns the duck or NOT_EVALUATED sentinel if duck could not be created.
+    """
+    duck = ImpersonatingDuck()
+    try:
+        # this only works for heap types, not builtins
+        duck.__class__ = duck_type
+        return duck
+    except TypeError:
+        pass
+    return NOT_EVALUATED
+
+
 SUPPORTED_EXTERNAL_GETITEM = {
     ("pandas", "core", "indexing", "_iLocIndexer"),
     ("pandas", "core", "indexing", "_LocIndexer"),
diff --git a/contrib/python/ipython/py3/IPython/core/magics/basic.py b/contrib/python/ipython/py3/IPython/core/magics/basic.py
index 3ac4049614..3e3eb2d3f8 100644
--- a/contrib/python/ipython/py3/IPython/core/magics/basic.py
+++ b/contrib/python/ipython/py3/IPython/core/magics/basic.py
@@ -40,6 +40,9 @@ class MagicsDisplay(object):
     def _repr_pretty_(self, p, cycle):
         p.text(self._lsmagic())
     
+    def __repr__(self):
+        return self.__str__()
+
     def __str__(self):
         return self._lsmagic()
     
diff --git a/contrib/python/ipython/py3/IPython/core/magics/execution.py b/contrib/python/ipython/py3/IPython/core/magics/execution.py
index 4147dac963..f3688f4eb0 100644
--- a/contrib/python/ipython/py3/IPython/core/magics/execution.py
+++ b/contrib/python/ipython/py3/IPython/core/magics/execution.py
@@ -1506,7 +1506,7 @@ class ExecutionMagics(Magics):
     @line_cell_magic
     def code_wrap(self, line, cell=None):
         """
-        Simple magic to quickly define a code transformer for all IPython's future imput.
+        Simple magic to quickly define a code transformer for all IPython's future input.
 
         ``__code__`` and ``__ret__`` are special variable that represent the code to run
         and the value of the last expression of ``__code__`` respectively.
diff --git a/contrib/python/ipython/py3/IPython/core/release.py b/contrib/python/ipython/py3/IPython/core/release.py
index f668902edf..6a22386858 100644
--- a/contrib/python/ipython/py3/IPython/core/release.py
+++ b/contrib/python/ipython/py3/IPython/core/release.py
@@ -16,8 +16,8 @@
 # release.  'dev' as a _version_extra string means this is a development
 # version
 _version_major = 8
-_version_minor = 22
-_version_patch = 2
+_version_minor = 23
+_version_patch = 0
 _version_extra = ".dev"
 # _version_extra = "rc1"
 _version_extra = ""  # Uncomment this for full releases
diff --git a/contrib/python/ipython/py3/IPython/utils/_sysinfo.py b/contrib/python/ipython/py3/IPython/utils/_sysinfo.py
index 22be56b84b..9cf8685be1 100644
--- a/contrib/python/ipython/py3/IPython/utils/_sysinfo.py
+++ b/contrib/python/ipython/py3/IPython/utils/_sysinfo.py
@@ -1,2 +1,2 @@
 # GENERATED BY setup.py
-commit = "d1804576b"
+commit = "5e7c4a991"
diff --git a/contrib/python/ipython/py3/ya.make b/contrib/python/ipython/py3/ya.make
index 76d52094de..3f4c418e00 100644
--- a/contrib/python/ipython/py3/ya.make
+++ b/contrib/python/ipython/py3/ya.make
@@ -2,7 +2,7 @@
 
 PY3_LIBRARY()
 
-VERSION(8.22.2)
+VERSION(8.23.0)
 
 LICENSE(BSD-3-Clause)
 
diff --git a/contrib/python/pycparser/py3/.dist-info/METADATA b/contrib/python/pycparser/py3/.dist-info/METADATA
index 1d0fbd6514..2c8038a3c2 100644
--- a/contrib/python/pycparser/py3/.dist-info/METADATA
+++ b/contrib/python/pycparser/py3/.dist-info/METADATA
@@ -1,31 +1,28 @@
 Metadata-Version: 2.1
 Name: pycparser
-Version: 2.21
+Version: 2.22
 Summary: C parser in Python
 Home-page: https://github.com/eliben/pycparser
 Author: Eli Bendersky
 Author-email: eliben@gmail.com
 Maintainer: Eli Bendersky
-License: BSD
+License: BSD-3-Clause
 Platform: Cross Platform
 Classifier: Development Status :: 5 - Production/Stable
 Classifier: License :: OSI Approved :: BSD License
-Classifier: Programming Language :: Python :: 2
-Classifier: Programming Language :: Python :: 2.7
 Classifier: Programming Language :: Python :: 3
-Classifier: Programming Language :: Python :: 3.4
-Classifier: Programming Language :: Python :: 3.5
-Classifier: Programming Language :: Python :: 3.6
-Classifier: Programming Language :: Python :: 3.7
 Classifier: Programming Language :: Python :: 3.8
 Classifier: Programming Language :: Python :: 3.9
 Classifier: Programming Language :: Python :: 3.10
-Requires-Python: >=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*
+Classifier: Programming Language :: Python :: 3.11
+Classifier: Programming Language :: Python :: 3.12
+Requires-Python: >=3.8
+License-File: LICENSE
 
 
-pycparser is a complete parser of the C language, written in
-pure Python using the PLY parsing library.
-It parses C code into an AST and can serve as a front-end for
-C compilers or analysis tools.
-
+        pycparser is a complete parser of the C language, written in
+        pure Python using the PLY parsing library.
+        It parses C code into an AST and can serve as a front-end for
+        C compilers or analysis tools.
+    
 
diff --git a/contrib/python/pycparser/py3/LICENSE b/contrib/python/pycparser/py3/LICENSE
index ea215f2dbb..bee14a47d2 100644
--- a/contrib/python/pycparser/py3/LICENSE
+++ b/contrib/python/pycparser/py3/LICENSE
@@ -1,6 +1,6 @@
 pycparser -- A C parser in Python
 
-Copyright (c) 2008-2020, Eli Bendersky
+Copyright (c) 2008-2022, Eli Bendersky
 All rights reserved.
 
 Redistribution and use in source and binary forms, with or without modification,
@@ -11,7 +11,7 @@ are permitted provided that the following conditions are met:
 * Redistributions in binary form must reproduce the above copyright notice, 
   this list of conditions and the following disclaimer in the documentation 
   and/or other materials provided with the distribution.
-* Neither the name of Eli Bendersky nor the names of its contributors may 
+* Neither the name of the copyright holder nor the names of its contributors may 
   be used to endorse or promote products derived from this software without 
   specific prior written permission.
 
diff --git a/contrib/python/pycparser/py3/README.rst b/contrib/python/pycparser/py3/README.rst
index e8ae8c1555..388a01e817 100644
--- a/contrib/python/pycparser/py3/README.rst
+++ b/contrib/python/pycparser/py3/README.rst
@@ -1,5 +1,5 @@
 ===============
-pycparser v2.21
+pycparser v2.22
 ===============
 
 
@@ -83,9 +83,7 @@ Installing
 Prerequisites
 -------------
 
-* **pycparser** was tested on Python 2.7, 3.4-3.6, on both Linux and
-  Windows. It should work on any later version (in both the 2.x and 3.x lines)
-  as well.
+* **pycparser** was tested with Python 3.8+ on Linux, macOS and Windows.
 
 * **pycparser** has no external dependencies. The only non-stdlib library it
   uses is PLY, which is bundled in ``pycparser/ply``. The current PLY version is
@@ -101,28 +99,10 @@ though.
 Installation process
 --------------------
 
-Installing **pycparser** is very simple. Once you download and unzip the
-package, you just have to execute the standard ``python setup.py install``. The
-setup script will then place the ``pycparser`` module into ``site-packages`` in
-your Python's installation library.
-
-Alternatively, since **pycparser** is listed in the `Python Package Index
-<https://pypi.org/project/pycparser/>`_ (PyPI), you can install it using your
-favorite Python packaging/distribution tool, for example with::
+The recommended way to install **pycparser** is with ``pip``::
 
     > pip install pycparser
 
-Known problems
---------------
-
-* Some users who've installed a new version of **pycparser** over an existing
-  version ran into a problem using the newly installed library. This has to do
-  with parse tables staying around as ``.pyc`` files from the older version. If
-  you see unexplained errors from **pycparser** after an upgrade, remove it (by
-  deleting the ``pycparser`` directory in your Python's ``site-packages``, or
-  wherever you installed it) and install again.
-
-
 Using
 =====
 
diff --git a/contrib/python/pycparser/py3/pycparser/__init__.py b/contrib/python/pycparser/py3/pycparser/__init__.py
index d82eb2d6fb..bf4b0d411d 100644
--- a/contrib/python/pycparser/py3/pycparser/__init__.py
+++ b/contrib/python/pycparser/py3/pycparser/__init__.py
@@ -8,7 +8,7 @@
 # License: BSD
 #-----------------------------------------------------------------
 __all__ = ['c_lexer', 'c_parser', 'c_ast']
-__version__ = '2.21'
+__version__ = '2.22'
 
 import io
 from subprocess import check_output
@@ -49,7 +49,7 @@ def preprocess_file(filename, cpp_path='cpp', cpp_args=''):
 
 
 def parse_file(filename, use_cpp=False, cpp_path='cpp', cpp_args='',
-               parser=None):
+               parser=None, encoding=None):
     """ Parse a C file using pycparser.
 
         filename:
@@ -71,6 +71,9 @@ def parse_file(filename, use_cpp=False, cpp_path='cpp', cpp_args='',
             r'-I../utils/fake_libc_include'
             If several arguments are required, pass a list of strings.
 
+        encoding:
+            Encoding to use for the file to parse
+
         parser:
             Optional parser object to be used instead of the default CParser
 
@@ -82,7 +85,7 @@ def parse_file(filename, use_cpp=False, cpp_path='cpp', cpp_args='',
     if use_cpp:
         text = preprocess_file(filename, cpp_path, cpp_args)
     else:
-        with io.open(filename) as f:
+        with io.open(filename, encoding=encoding) as f:
             text = f.read()
 
     if parser is None:
diff --git a/contrib/python/pycparser/py3/pycparser/_build_tables.py b/contrib/python/pycparser/py3/pycparser/_build_tables.py
index 958381ad0f..4f3710795c 100644
--- a/contrib/python/pycparser/py3/pycparser/_build_tables.py
+++ b/contrib/python/pycparser/py3/pycparser/_build_tables.py
@@ -13,6 +13,7 @@
 # Insert '.' and '..' as first entries to the search path for modules.
 # Restricted environments like embeddable python do not include the
 # current working directory on startup.
+import importlib
 import sys
 sys.path[0:0] = ['.', '..']
 
@@ -32,6 +33,8 @@ c_parser.CParser(
 
 # Load to compile into .pyc
 #
+importlib.invalidate_caches()
+
 import lextab
 import yacctab
 import c_ast
diff --git a/contrib/python/pycparser/py3/pycparser/c_lexer.py b/contrib/python/pycparser/py3/pycparser/c_lexer.py
index d68d8ebfa3..22c64bc761 100644
--- a/contrib/python/pycparser/py3/pycparser/c_lexer.py
+++ b/contrib/python/pycparser/py3/pycparser/c_lexer.py
@@ -112,6 +112,7 @@ class CLexer(object):
         '_BOOL', '_COMPLEX',
         '_NORETURN', '_THREAD_LOCAL', '_STATIC_ASSERT',
         '_ATOMIC', '_ALIGNOF', '_ALIGNAS',
+        '_PRAGMA',
         )
 
     keyword_map = {}
diff --git a/contrib/python/pycparser/py3/pycparser/c_parser.py b/contrib/python/pycparser/py3/pycparser/c_parser.py
index 640a759406..d31574a5a1 100644
--- a/contrib/python/pycparser/py3/pycparser/c_parser.py
+++ b/contrib/python/pycparser/py3/pycparser/c_parser.py
@@ -571,15 +571,29 @@ class CParser(PLYParser):
         self._parse_error('Directives not supported yet',
                           self._token_coord(p, 1))
 
+    # This encompasses two types of C99-compatible pragmas:
+    # - The #pragma directive:
+    #       # pragma character_sequence
+    # - The _Pragma unary operator:
+    #       _Pragma ( " string_literal " )
     def p_pppragma_directive(self, p):
         """ pppragma_directive      : PPPRAGMA
                                     | PPPRAGMA PPPRAGMASTR
+                                    | _PRAGMA LPAREN unified_string_literal RPAREN
         """
-        if len(p) == 3:
+        if len(p) == 5:
+            p[0] = c_ast.Pragma(p[3], self._token_coord(p, 2))
+        elif len(p) == 3:
             p[0] = c_ast.Pragma(p[2], self._token_coord(p, 2))
         else:
             p[0] = c_ast.Pragma("", self._token_coord(p, 1))
 
+    def p_pppragma_directive_list(self, p):
+        """ pppragma_directive_list : pppragma_directive
+                                    | pppragma_directive_list pppragma_directive
+        """
+        p[0] = [p[1]] if len(p) == 2 else p[1] + [p[2]]
+
     # In function definitions, the declarator can be followed by
     # a declaration list, for old "K&R style" function definitios.
     def p_function_definition_1(self, p):
@@ -671,12 +685,12 @@ class CParser(PLYParser):
     #       sum += 1;
     #   }
     def p_pragmacomp_or_statement(self, p):
-        """ pragmacomp_or_statement     : pppragma_directive statement
+        """ pragmacomp_or_statement     : pppragma_directive_list statement
                                         | statement
         """
-        if isinstance(p[1], c_ast.Pragma) and len(p) == 3:
+        if len(p) == 3:
             p[0] = c_ast.Compound(
-                block_items=[p[1], p[2]],
+                block_items=p[1]+[p[2]],
                 coord=self._token_coord(p, 1))
         else:
             p[0] = p[1]
diff --git a/contrib/python/pycparser/py3/pycparser/lextab.py b/contrib/python/pycparser/py3/pycparser/lextab.py
index 444b4656d5..aeb5c152d1 100644
--- a/contrib/python/pycparser/py3/pycparser/lextab.py
+++ b/contrib/python/pycparser/py3/pycparser/lextab.py
@@ -1,10 +1,10 @@
 # lextab.py. This file automatically created by PLY (version 3.10). Don't edit!
 _tabversion   = '3.10'
-_lextokens    = set(('INT_CONST_CHAR', 'VOID', 'LBRACKET', 'WCHAR_CONST', 'FLOAT_CONST', 'MINUS', 'RPAREN', 'STRUCT', 'LONG', 'PLUS', 'ELLIPSIS', 'U32STRING_LITERAL', 'GT', 'GOTO', 'ENUM', 'PERIOD', 'GE', 'INT_CONST_DEC', 'ARROW', '_STATIC_ASSERT', '__INT128', 'HEX_FLOAT_CONST', 'DOUBLE', 'MINUSEQUAL', 'INT_CONST_OCT', 'TIMESEQUAL', 'OR', 'SHORT', 'RETURN', 'RSHIFTEQUAL', '_ALIGNAS', 'RESTRICT', 'STATIC', 'SIZEOF', 'UNSIGNED', 'PLUSPLUS', 'COLON', 'WSTRING_LITERAL', 'DIVIDE', 'FOR', 'UNION', 'EQUALS', 'ELSE', 'ANDEQUAL', 'EQ', 'AND', 'TYPEID', 'LBRACE', 'PPHASH', 'INT', 'SIGNED', 'CONTINUE', 'NOT', 'OREQUAL', 'MOD', 'RSHIFT', 'DEFAULT', '_NORETURN', 'CHAR', 'WHILE', 'DIVEQUAL', '_ALIGNOF', 'EXTERN', 'LNOT', 'CASE', 'LAND', 'REGISTER', 'MODEQUAL', 'NE', 'SWITCH', 'INT_CONST_HEX', '_COMPLEX', 'PPPRAGMASTR', 'PLUSEQUAL', 'U32CHAR_CONST', 'CONDOP', 'U8STRING_LITERAL', 'BREAK', 'VOLATILE', 'PPPRAGMA', 'INLINE', 'INT_CONST_BIN', 'DO', 'U8CHAR_CONST', 'CONST', 'U16STRING_LITERAL', 'LOR', 'CHAR_CONST', 'LSHIFT', 'RBRACE', '_BOOL', 'LE', 'SEMI', '_THREAD_LOCAL', 'LT', 'COMMA', 'U16CHAR_CONST', 'OFFSETOF', '_ATOMIC', 'TYPEDEF', 'XOR', 'AUTO', 'TIMES', 'LPAREN', 'MINUSMINUS', 'ID', 'IF', 'STRING_LITERAL', 'FLOAT', 'XOREQUAL', 'LSHIFTEQUAL', 'RBRACKET'))
+_lextokens    = set(('AND', 'ANDEQUAL', 'ARROW', 'AUTO', 'BREAK', 'CASE', 'CHAR', 'CHAR_CONST', 'COLON', 'COMMA', 'CONDOP', 'CONST', 'CONTINUE', 'DEFAULT', 'DIVEQUAL', 'DIVIDE', 'DO', 'DOUBLE', 'ELLIPSIS', 'ELSE', 'ENUM', 'EQ', 'EQUALS', 'EXTERN', 'FLOAT', 'FLOAT_CONST', 'FOR', 'GE', 'GOTO', 'GT', 'HEX_FLOAT_CONST', 'ID', 'IF', 'INLINE', 'INT', 'INT_CONST_BIN', 'INT_CONST_CHAR', 'INT_CONST_DEC', 'INT_CONST_HEX', 'INT_CONST_OCT', 'LAND', 'LBRACE', 'LBRACKET', 'LE', 'LNOT', 'LONG', 'LOR', 'LPAREN', 'LSHIFT', 'LSHIFTEQUAL', 'LT', 'MINUS', 'MINUSEQUAL', 'MINUSMINUS', 'MOD', 'MODEQUAL', 'NE', 'NOT', 'OFFSETOF', 'OR', 'OREQUAL', 'PERIOD', 'PLUS', 'PLUSEQUAL', 'PLUSPLUS', 'PPHASH', 'PPPRAGMA', 'PPPRAGMASTR', 'RBRACE', 'RBRACKET', 'REGISTER', 'RESTRICT', 'RETURN', 'RPAREN', 'RSHIFT', 'RSHIFTEQUAL', 'SEMI', 'SHORT', 'SIGNED', 'SIZEOF', 'STATIC', 'STRING_LITERAL', 'STRUCT', 'SWITCH', 'TIMES', 'TIMESEQUAL', 'TYPEDEF', 'TYPEID', 'U16CHAR_CONST', 'U16STRING_LITERAL', 'U32CHAR_CONST', 'U32STRING_LITERAL', 'U8CHAR_CONST', 'U8STRING_LITERAL', 'UNION', 'UNSIGNED', 'VOID', 'VOLATILE', 'WCHAR_CONST', 'WHILE', 'WSTRING_LITERAL', 'XOR', 'XOREQUAL', '_ALIGNAS', '_ALIGNOF', '_ATOMIC', '_BOOL', '_COMPLEX', '_NORETURN', '_PRAGMA', '_STATIC_ASSERT', '_THREAD_LOCAL', '__INT128'))
 _lexreflags   = 64
 _lexliterals  = ''
-_lexstateinfo = {'ppline': 'exclusive', 'pppragma': 'exclusive', 'INITIAL': 'inclusive'}
-_lexstatere   = {'ppline': [('(?P<t_ppline_FILENAME>"([^"\\\\\\n]|(\\\\[0-9a-zA-Z._~!=&\\^\\-\\\\?\'"]))*")|(?P<t_ppline_LINE_NUMBER>(0(([uU]ll)|([uU]LL)|(ll[uU]?)|(LL[uU]?)|([uU][lL])|([lL][uU]?)|[uU])?)|([1-9][0-9]*(([uU]ll)|([uU]LL)|(ll[uU]?)|(LL[uU]?)|([uU][lL])|([lL][uU]?)|[uU])?))|(?P<t_ppline_NEWLINE>\\n)|(?P<t_ppline_PPLINE>line)', [None, ('t_ppline_FILENAME', 'FILENAME'), None, None, ('t_ppline_LINE_NUMBER', 'LINE_NUMBER'), None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, ('t_ppline_NEWLINE', 'NEWLINE'), ('t_ppline_PPLINE', 'PPLINE')])], 'pppragma': [('(?P<t_pppragma_NEWLINE>\\n)|(?P<t_pppragma_PPPRAGMA>pragma)|(?P<t_pppragma_STR>.+)', [None, ('t_pppragma_NEWLINE', 'NEWLINE'), ('t_pppragma_PPPRAGMA', 'PPPRAGMA'), ('t_pppragma_STR', 'STR')])], 'INITIAL': [('(?P<t_PPHASH>[ \\t]*\\#)|(?P<t_NEWLINE>\\n+)|(?P<t_LBRACE>\\{)|(?P<t_RBRACE>\\})|(?P<t_FLOAT_CONST>((((([0-9]*\\.[0-9]+)|([0-9]+\\.))([eE][-+]?[0-9]+)?)|([0-9]+([eE][-+]?[0-9]+)))[FfLl]?))|(?P<t_HEX_FLOAT_CONST>(0[xX]([0-9a-fA-F]+|((([0-9a-fA-F]+)?\\.[0-9a-fA-F]+)|([0-9a-fA-F]+\\.)))([pP][+-]?[0-9]+)[FfLl]?))|(?P<t_INT_CONST_HEX>0[xX][0-9a-fA-F]+(([uU]ll)|([uU]LL)|(ll[uU]?)|(LL[uU]?)|([uU][lL])|([lL][uU]?)|[uU])?)|(?P<t_INT_CONST_BIN>0[bB][01]+(([uU]ll)|([uU]LL)|(ll[uU]?)|(LL[uU]?)|([uU][lL])|([lL][uU]?)|[uU])?)', [None, ('t_PPHASH', 'PPHASH'), ('t_NEWLINE', 'NEWLINE'), ('t_LBRACE', 'LBRACE'), ('t_RBRACE', 'RBRACE'), ('t_FLOAT_CONST', 'FLOAT_CONST'), None, None, None, None, None, None, None, None, None, ('t_HEX_FLOAT_CONST', 'HEX_FLOAT_CONST'), None, None, None, None, None, None, None, ('t_INT_CONST_HEX', 'INT_CONST_HEX'), None, None, None, None, None, None, None, ('t_INT_CONST_BIN', 'INT_CONST_BIN')]), ('(?P<t_BAD_CONST_OCT>0[0-7]*[89])|(?P<t_INT_CONST_OCT>0[0-7]*(([uU]ll)|([uU]LL)|(ll[uU]?)|(LL[uU]?)|([uU][lL])|([lL][uU]?)|[uU])?)|(?P<t_INT_CONST_DEC>(0(([uU]ll)|([uU]LL)|(ll[uU]?)|(LL[uU]?)|([uU][lL])|([lL][uU]?)|[uU])?)|([1-9][0-9]*(([uU]ll)|([uU]LL)|(ll[uU]?)|(LL[uU]?)|([uU][lL])|([lL][uU]?)|[uU])?))|(?P<t_INT_CONST_CHAR>\'([^\'\\\\\\n]|(\\\\(([a-wyzA-Z._~!=&\\^\\-\\\\?\'"]|x(?![0-9a-fA-F]))|(\\d+)(?!\\d)|(x[0-9a-fA-F]+)(?![0-9a-fA-F])))){2,4}\')|(?P<t_CHAR_CONST>\'([^\'\\\\\\n]|(\\\\(([a-wyzA-Z._~!=&\\^\\-\\\\?\'"]|x(?![0-9a-fA-F]))|(\\d+)(?!\\d)|(x[0-9a-fA-F]+)(?![0-9a-fA-F]))))\')|(?P<t_WCHAR_CONST>L\'([^\'\\\\\\n]|(\\\\(([a-wyzA-Z._~!=&\\^\\-\\\\?\'"]|x(?![0-9a-fA-F]))|(\\d+)(?!\\d)|(x[0-9a-fA-F]+)(?![0-9a-fA-F]))))\')|(?P<t_U8CHAR_CONST>u8\'([^\'\\\\\\n]|(\\\\(([a-wyzA-Z._~!=&\\^\\-\\\\?\'"]|x(?![0-9a-fA-F]))|(\\d+)(?!\\d)|(x[0-9a-fA-F]+)(?![0-9a-fA-F]))))\')|(?P<t_U16CHAR_CONST>u\'([^\'\\\\\\n]|(\\\\(([a-wyzA-Z._~!=&\\^\\-\\\\?\'"]|x(?![0-9a-fA-F]))|(\\d+)(?!\\d)|(x[0-9a-fA-F]+)(?![0-9a-fA-F]))))\')|(?P<t_U32CHAR_CONST>U\'([^\'\\\\\\n]|(\\\\(([a-wyzA-Z._~!=&\\^\\-\\\\?\'"]|x(?![0-9a-fA-F]))|(\\d+)(?!\\d)|(x[0-9a-fA-F]+)(?![0-9a-fA-F]))))\')', [None, ('t_BAD_CONST_OCT', 'BAD_CONST_OCT'), ('t_INT_CONST_OCT', 'INT_CONST_OCT'), None, None, None, None, None, None, None, ('t_INT_CONST_DEC', 'INT_CONST_DEC'), None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, ('t_INT_CONST_CHAR', 'INT_CONST_CHAR'), None, None, None, None, None, None, ('t_CHAR_CONST', 'CHAR_CONST'), None, None, None, None, None, None, ('t_WCHAR_CONST', 'WCHAR_CONST'), None, None, None, None, None, None, ('t_U8CHAR_CONST', 'U8CHAR_CONST'), None, None, None, None, None, None, ('t_U16CHAR_CONST', 'U16CHAR_CONST'), None, None, None, None, None, None, ('t_U32CHAR_CONST', 'U32CHAR_CONST')]), ('(?P<t_UNMATCHED_QUOTE>(\'([^\'\\\\\\n]|(\\\\(([a-wyzA-Z._~!=&\\^\\-\\\\?\'"]|x(?![0-9a-fA-F]))|(\\d+)(?!\\d)|(x[0-9a-fA-F]+)(?![0-9a-fA-F]))))*\\n)|(\'([^\'\\\\\\n]|(\\\\(([a-wyzA-Z._~!=&\\^\\-\\\\?\'"]|x(?![0-9a-fA-F]))|(\\d+)(?!\\d)|(x[0-9a-fA-F]+)(?![0-9a-fA-F]))))*$))|(?P<t_BAD_CHAR_CONST>(\'([^\'\\\\\\n]|(\\\\(([a-wyzA-Z._~!=&\\^\\-\\\\?\'"]|x(?![0-9a-fA-F]))|(\\d+)(?!\\d)|(x[0-9a-fA-F]+)(?![0-9a-fA-F]))))[^\'\n]+\')|(\'\')|(\'([\\\\][^a-zA-Z._~^!=&\\^\\-\\\\?\'"x0-9])[^\'\\n]*\'))|(?P<t_WSTRING_LITERAL>L"([^"\\\\\\n]|(\\\\[0-9a-zA-Z._~!=&\\^\\-\\\\?\'"]))*")|(?P<t_U8STRING_LITERAL>u8"([^"\\\\\\n]|(\\\\[0-9a-zA-Z._~!=&\\^\\-\\\\?\'"]))*")|(?P<t_U16STRING_LITERAL>u"([^"\\\\\\n]|(\\\\[0-9a-zA-Z._~!=&\\^\\-\\\\?\'"]))*")|(?P<t_U32STRING_LITERAL>U"([^"\\\\\\n]|(\\\\[0-9a-zA-Z._~!=&\\^\\-\\\\?\'"]))*")|(?P<t_BAD_STRING_LITERAL>"([^"\\\\\\n]|(\\\\[0-9a-zA-Z._~!=&\\^\\-\\\\?\'"]))*([\\\\][^a-zA-Z._~^!=&\\^\\-\\\\?\'"x0-9])([^"\\\\\\n]|(\\\\[0-9a-zA-Z._~!=&\\^\\-\\\\?\'"]))*")|(?P<t_ID>[a-zA-Z_$][0-9a-zA-Z_$]*)|(?P<t_STRING_LITERAL>"([^"\\\\\\n]|(\\\\[0-9a-zA-Z._~!=&\\^\\-\\\\?\'"]))*")|(?P<t_ELLIPSIS>\\.\\.\\.)|(?P<t_PLUSPLUS>\\+\\+)|(?P<t_LOR>\\|\\|)|(?P<t_XOREQUAL>\\^=)|(?P<t_OREQUAL>\\|=)|(?P<t_LSHIFTEQUAL><<=)|(?P<t_RSHIFTEQUAL>>>=)|(?P<t_PLUSEQUAL>\\+=)|(?P<t_TIMESEQUAL>\\*=)', [None, ('t_UNMATCHED_QUOTE', 'UNMATCHED_QUOTE'), None, None, None, None, None, None, None, None, None, None, None, None, None, None, ('t_BAD_CHAR_CONST', 'BAD_CHAR_CONST'), None, None, None, None, None, None, None, None, None, None, ('t_WSTRING_LITERAL', 'WSTRING_LITERAL'), None, None, ('t_U8STRING_LITERAL', 'U8STRING_LITERAL'), None, None, ('t_U16STRING_LITERAL', 'U16STRING_LITERAL'), None, None, ('t_U32STRING_LITERAL', 'U32STRING_LITERAL'), None, None, ('t_BAD_STRING_LITERAL', 'BAD_STRING_LITERAL'), None, None, None, None, None, ('t_ID', 'ID'), (None, 'STRING_LITERAL'), None, None, (None, 'ELLIPSIS'), (None, 'PLUSPLUS'), (None, 'LOR'), (None, 'XOREQUAL'), (None, 'OREQUAL'), (None, 'LSHIFTEQUAL'), (None, 'RSHIFTEQUAL'), (None, 'PLUSEQUAL'), (None, 'TIMESEQUAL')]), ('(?P<t_PLUS>\\+)|(?P<t_MODEQUAL>%=)|(?P<t_DIVEQUAL>/=)|(?P<t_RBRACKET>\\])|(?P<t_CONDOP>\\?)|(?P<t_XOR>\\^)|(?P<t_LSHIFT><<)|(?P<t_LE><=)|(?P<t_LPAREN>\\()|(?P<t_ARROW>->)|(?P<t_EQ>==)|(?P<t_NE>!=)|(?P<t_MINUSMINUS>--)|(?P<t_OR>\\|)|(?P<t_TIMES>\\*)|(?P<t_LBRACKET>\\[)|(?P<t_GE>>=)|(?P<t_RPAREN>\\))|(?P<t_LAND>&&)|(?P<t_RSHIFT>>>)|(?P<t_MINUSEQUAL>-=)|(?P<t_PERIOD>\\.)|(?P<t_ANDEQUAL>&=)|(?P<t_EQUALS>=)|(?P<t_LT><)|(?P<t_COMMA>,)|(?P<t_DIVIDE>/)|(?P<t_AND>&)|(?P<t_MOD>%)|(?P<t_SEMI>;)|(?P<t_MINUS>-)|(?P<t_GT>>)|(?P<t_COLON>:)|(?P<t_NOT>~)|(?P<t_LNOT>!)', [None, (None, 'PLUS'), (None, 'MODEQUAL'), (None, 'DIVEQUAL'), (None, 'RBRACKET'), (None, 'CONDOP'), (None, 'XOR'), (None, 'LSHIFT'), (None, 'LE'), (None, 'LPAREN'), (None, 'ARROW'), (None, 'EQ'), (None, 'NE'), (None, 'MINUSMINUS'), (None, 'OR'), (None, 'TIMES'), (None, 'LBRACKET'), (None, 'GE'), (None, 'RPAREN'), (None, 'LAND'), (None, 'RSHIFT'), (None, 'MINUSEQUAL'), (None, 'PERIOD'), (None, 'ANDEQUAL'), (None, 'EQUALS'), (None, 'LT'), (None, 'COMMA'), (None, 'DIVIDE'), (None, 'AND'), (None, 'MOD'), (None, 'SEMI'), (None, 'MINUS'), (None, 'GT'), (None, 'COLON'), (None, 'NOT'), (None, 'LNOT')])]}
-_lexstateignore = {'ppline': ' \t', 'pppragma': ' \t', 'INITIAL': ' \t'}
-_lexstateerrorf = {'ppline': 't_ppline_error', 'pppragma': 't_pppragma_error', 'INITIAL': 't_error'}
+_lexstateinfo = {'INITIAL': 'inclusive', 'ppline': 'exclusive', 'pppragma': 'exclusive'}
+_lexstatere   = {'INITIAL': [('(?P<t_PPHASH>[ \\t]*\\#)|(?P<t_NEWLINE>\\n+)|(?P<t_LBRACE>\\{)|(?P<t_RBRACE>\\})|(?P<t_FLOAT_CONST>((((([0-9]*\\.[0-9]+)|([0-9]+\\.))([eE][-+]?[0-9]+)?)|([0-9]+([eE][-+]?[0-9]+)))[FfLl]?))|(?P<t_HEX_FLOAT_CONST>(0[xX]([0-9a-fA-F]+|((([0-9a-fA-F]+)?\\.[0-9a-fA-F]+)|([0-9a-fA-F]+\\.)))([pP][+-]?[0-9]+)[FfLl]?))|(?P<t_INT_CONST_HEX>0[xX][0-9a-fA-F]+(([uU]ll)|([uU]LL)|(ll[uU]?)|(LL[uU]?)|([uU][lL])|([lL][uU]?)|[uU])?)|(?P<t_INT_CONST_BIN>0[bB][01]+(([uU]ll)|([uU]LL)|(ll[uU]?)|(LL[uU]?)|([uU][lL])|([lL][uU]?)|[uU])?)|(?P<t_BAD_CONST_OCT>0[0-7]*[89])|(?P<t_INT_CONST_OCT>0[0-7]*(([uU]ll)|([uU]LL)|(ll[uU]?)|(LL[uU]?)|([uU][lL])|([lL][uU]?)|[uU])?)|(?P<t_INT_CONST_DEC>(0(([uU]ll)|([uU]LL)|(ll[uU]?)|(LL[uU]?)|([uU][lL])|([lL][uU]?)|[uU])?)|([1-9][0-9]*(([uU]ll)|([uU]LL)|(ll[uU]?)|(LL[uU]?)|([uU][lL])|([lL][uU]?)|[uU])?))|(?P<t_INT_CONST_CHAR>\'([^\'\\\\\\n]|(\\\\(([a-wyzA-Z._~!=&\\^\\-\\\\?\'"]|x(?![0-9a-fA-F]))|(\\d+)(?!\\d)|(x[0-9a-fA-F]+)(?![0-9a-fA-F])))){2,4}\')|(?P<t_CHAR_CONST>\'([^\'\\\\\\n]|(\\\\(([a-wyzA-Z._~!=&\\^\\-\\\\?\'"]|x(?![0-9a-fA-F]))|(\\d+)(?!\\d)|(x[0-9a-fA-F]+)(?![0-9a-fA-F]))))\')|(?P<t_WCHAR_CONST>L\'([^\'\\\\\\n]|(\\\\(([a-wyzA-Z._~!=&\\^\\-\\\\?\'"]|x(?![0-9a-fA-F]))|(\\d+)(?!\\d)|(x[0-9a-fA-F]+)(?![0-9a-fA-F]))))\')|(?P<t_U8CHAR_CONST>u8\'([^\'\\\\\\n]|(\\\\(([a-wyzA-Z._~!=&\\^\\-\\\\?\'"]|x(?![0-9a-fA-F]))|(\\d+)(?!\\d)|(x[0-9a-fA-F]+)(?![0-9a-fA-F]))))\')|(?P<t_U16CHAR_CONST>u\'([^\'\\\\\\n]|(\\\\(([a-wyzA-Z._~!=&\\^\\-\\\\?\'"]|x(?![0-9a-fA-F]))|(\\d+)(?!\\d)|(x[0-9a-fA-F]+)(?![0-9a-fA-F]))))\')|(?P<t_U32CHAR_CONST>U\'([^\'\\\\\\n]|(\\\\(([a-wyzA-Z._~!=&\\^\\-\\\\?\'"]|x(?![0-9a-fA-F]))|(\\d+)(?!\\d)|(x[0-9a-fA-F]+)(?![0-9a-fA-F]))))\')|(?P<t_UNMATCHED_QUOTE>(\'([^\'\\\\\\n]|(\\\\(([a-wyzA-Z._~!=&\\^\\-\\\\?\'"]|x(?![0-9a-fA-F]))|(\\d+)(?!\\d)|(x[0-9a-fA-F]+)(?![0-9a-fA-F]))))*\\n)|(\'([^\'\\\\\\n]|(\\\\(([a-wyzA-Z._~!=&\\^\\-\\\\?\'"]|x(?![0-9a-fA-F]))|(\\d+)(?!\\d)|(x[0-9a-fA-F]+)(?![0-9a-fA-F]))))*$))|(?P<t_BAD_CHAR_CONST>(\'([^\'\\\\\\n]|(\\\\(([a-wyzA-Z._~!=&\\^\\-\\\\?\'"]|x(?![0-9a-fA-F]))|(\\d+)(?!\\d)|(x[0-9a-fA-F]+)(?![0-9a-fA-F]))))[^\'\n]+\')|(\'\')|(\'([\\\\][^a-zA-Z._~^!=&\\^\\-\\\\?\'"x0-9])[^\'\\n]*\'))|(?P<t_WSTRING_LITERAL>L"([^"\\\\\\n]|(\\\\[0-9a-zA-Z._~!=&\\^\\-\\\\?\'"]))*")|(?P<t_U8STRING_LITERAL>u8"([^"\\\\\\n]|(\\\\[0-9a-zA-Z._~!=&\\^\\-\\\\?\'"]))*")|(?P<t_U16STRING_LITERAL>u"([^"\\\\\\n]|(\\\\[0-9a-zA-Z._~!=&\\^\\-\\\\?\'"]))*")|(?P<t_U32STRING_LITERAL>U"([^"\\\\\\n]|(\\\\[0-9a-zA-Z._~!=&\\^\\-\\\\?\'"]))*")|(?P<t_BAD_STRING_LITERAL>"([^"\\\\\\n]|(\\\\[0-9a-zA-Z._~!=&\\^\\-\\\\?\'"]))*([\\\\][^a-zA-Z._~^!=&\\^\\-\\\\?\'"x0-9])([^"\\\\\\n]|(\\\\[0-9a-zA-Z._~!=&\\^\\-\\\\?\'"]))*")|(?P<t_ID>[a-zA-Z_$][0-9a-zA-Z_$]*)|(?P<t_STRING_LITERAL>"([^"\\\\\\n]|(\\\\[0-9a-zA-Z._~!=&\\^\\-\\\\?\'"]))*")|(?P<t_ELLIPSIS>\\.\\.\\.)|(?P<t_LOR>\\|\\|)|(?P<t_PLUSPLUS>\\+\\+)|(?P<t_LSHIFTEQUAL><<=)|(?P<t_OREQUAL>\\|=)|(?P<t_PLUSEQUAL>\\+=)|(?P<t_RSHIFTEQUAL>>>=)|(?P<t_TIMESEQUAL>\\*=)|(?P<t_XOREQUAL>\\^=)|(?P<t_ANDEQUAL>&=)|(?P<t_ARROW>->)|(?P<t_CONDOP>\\?)|(?P<t_DIVEQUAL>/=)|(?P<t_EQ>==)|(?P<t_GE>>=)|(?P<t_LAND>&&)|(?P<t_LBRACKET>\\[)|(?P<t_LE><=)|(?P<t_LPAREN>\\()|(?P<t_LSHIFT><<)|(?P<t_MINUSEQUAL>-=)|(?P<t_MINUSMINUS>--)|(?P<t_MODEQUAL>%=)|(?P<t_NE>!=)|(?P<t_OR>\\|)|(?P<t_PERIOD>\\.)|(?P<t_PLUS>\\+)|(?P<t_RBRACKET>\\])|(?P<t_RPAREN>\\))|(?P<t_RSHIFT>>>)|(?P<t_TIMES>\\*)|(?P<t_XOR>\\^)|(?P<t_AND>&)|(?P<t_COLON>:)|(?P<t_COMMA>,)|(?P<t_DIVIDE>/)|(?P<t_EQUALS>=)|(?P<t_GT>>)|(?P<t_LNOT>!)|(?P<t_LT><)|(?P<t_MINUS>-)|(?P<t_MOD>%)|(?P<t_NOT>~)|(?P<t_SEMI>;)', [None, ('t_PPHASH', 'PPHASH'), ('t_NEWLINE', 'NEWLINE'), ('t_LBRACE', 'LBRACE'), ('t_RBRACE', 'RBRACE'), ('t_FLOAT_CONST', 'FLOAT_CONST'), None, None, None, None, None, None, None, None, None, ('t_HEX_FLOAT_CONST', 'HEX_FLOAT_CONST'), None, None, None, None, None, None, None, ('t_INT_CONST_HEX', 'INT_CONST_HEX'), None, None, None, None, None, None, None, ('t_INT_CONST_BIN', 'INT_CONST_BIN'), None, None, None, None, None, None, None, ('t_BAD_CONST_OCT', 'BAD_CONST_OCT'), ('t_INT_CONST_OCT', 'INT_CONST_OCT'), None, None, None, None, None, None, None, ('t_INT_CONST_DEC', 'INT_CONST_DEC'), None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, ('t_INT_CONST_CHAR', 'INT_CONST_CHAR'), None, None, None, None, None, None, ('t_CHAR_CONST', 'CHAR_CONST'), None, None, None, None, None, None, ('t_WCHAR_CONST', 'WCHAR_CONST'), None, None, None, None, None, None, ('t_U8CHAR_CONST', 'U8CHAR_CONST'), None, None, None, None, None, None, ('t_U16CHAR_CONST', 'U16CHAR_CONST'), None, None, None, None, None, None, ('t_U32CHAR_CONST', 'U32CHAR_CONST'), None, None, None, None, None, None, ('t_UNMATCHED_QUOTE', 'UNMATCHED_QUOTE'), None, None, None, None, None, None, None, None, None, None, None, None, None, None, ('t_BAD_CHAR_CONST', 'BAD_CHAR_CONST'), None, None, None, None, None, None, None, None, None, None, ('t_WSTRING_LITERAL', 'WSTRING_LITERAL'), None, None, ('t_U8STRING_LITERAL', 'U8STRING_LITERAL'), None, None, ('t_U16STRING_LITERAL', 'U16STRING_LITERAL'), None, None, ('t_U32STRING_LITERAL', 'U32STRING_LITERAL'), None, None, ('t_BAD_STRING_LITERAL', 'BAD_STRING_LITERAL'), None, None, None, None, None, ('t_ID', 'ID'), (None, 'STRING_LITERAL'), None, None, (None, 'ELLIPSIS'), (None, 'LOR'), (None, 'PLUSPLUS'), (None, 'LSHIFTEQUAL'), (None, 'OREQUAL'), (None, 'PLUSEQUAL'), (None, 'RSHIFTEQUAL'), (None, 'TIMESEQUAL'), (None, 'XOREQUAL'), (None, 'ANDEQUAL'), (None, 'ARROW'), (None, 'CONDOP'), (None, 'DIVEQUAL'), (None, 'EQ'), (None, 'GE'), (None, 'LAND'), (None, 'LBRACKET'), (None, 'LE'), (None, 'LPAREN'), (None, 'LSHIFT'), (None, 'MINUSEQUAL'), (None, 'MINUSMINUS'), (None, 'MODEQUAL'), (None, 'NE'), (None, 'OR'), (None, 'PERIOD'), (None, 'PLUS'), (None, 'RBRACKET'), (None, 'RPAREN'), (None, 'RSHIFT'), (None, 'TIMES'), (None, 'XOR'), (None, 'AND'), (None, 'COLON'), (None, 'COMMA'), (None, 'DIVIDE'), (None, 'EQUALS'), (None, 'GT'), (None, 'LNOT'), (None, 'LT'), (None, 'MINUS'), (None, 'MOD'), (None, 'NOT'), (None, 'SEMI')])], 'ppline': [('(?P<t_ppline_FILENAME>"([^"\\\\\\n]|(\\\\[0-9a-zA-Z._~!=&\\^\\-\\\\?\'"]))*")|(?P<t_ppline_LINE_NUMBER>(0(([uU]ll)|([uU]LL)|(ll[uU]?)|(LL[uU]?)|([uU][lL])|([lL][uU]?)|[uU])?)|([1-9][0-9]*(([uU]ll)|([uU]LL)|(ll[uU]?)|(LL[uU]?)|([uU][lL])|([lL][uU]?)|[uU])?))|(?P<t_ppline_NEWLINE>\\n)|(?P<t_ppline_PPLINE>line)', [None, ('t_ppline_FILENAME', 'FILENAME'), None, None, ('t_ppline_LINE_NUMBER', 'LINE_NUMBER'), None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, ('t_ppline_NEWLINE', 'NEWLINE'), ('t_ppline_PPLINE', 'PPLINE')])], 'pppragma': [('(?P<t_pppragma_NEWLINE>\\n)|(?P<t_pppragma_PPPRAGMA>pragma)|(?P<t_pppragma_STR>.+)', [None, ('t_pppragma_NEWLINE', 'NEWLINE'), ('t_pppragma_PPPRAGMA', 'PPPRAGMA'), ('t_pppragma_STR', 'STR')])]}
+_lexstateignore = {'INITIAL': ' \t', 'ppline': ' \t', 'pppragma': ' \t'}
+_lexstateerrorf = {'INITIAL': 't_error', 'ppline': 't_ppline_error', 'pppragma': 't_pppragma_error'}
 _lexstateeoff = {}
diff --git a/contrib/python/pycparser/py3/pycparser/ply/lex.py b/contrib/python/pycparser/py3/pycparser/ply/lex.py
index 4bdd76ca06..dfc5139486 100644
--- a/contrib/python/pycparser/py3/pycparser/ply/lex.py
+++ b/contrib/python/pycparser/py3/pycparser/ply/lex.py
@@ -179,7 +179,7 @@ class Lexer:
         with open(filename, 'w') as tf:
             tf.write('# %s.py. This file automatically created by PLY (version %s). Don\'t edit!\n' % (basetabmodule, __version__))
             tf.write('_tabversion   = %s\n' % repr(__tabversion__))
-            tf.write('_lextokens    = set(%s)\n' % repr(tuple(self.lextokens)))
+            tf.write('_lextokens    = set(%s)\n' % repr(tuple(sorted(self.lextokens))))
             tf.write('_lexreflags   = %s\n' % repr(self.lexreflags))
             tf.write('_lexliterals  = %s\n' % repr(self.lexliterals))
             tf.write('_lexstateinfo = %s\n' % repr(self.lexstateinfo))
diff --git a/contrib/python/pycparser/py3/pycparser/yacctab.py b/contrib/python/pycparser/py3/pycparser/yacctab.py
index 0622c36602..68b1466088 100644
--- a/contrib/python/pycparser/py3/pycparser/yacctab.py
+++ b/contrib/python/pycparser/py3/pycparser/yacctab.py
@@ -5,9 +5,9 @@ _tabversion = '3.10'
 
 _lr_method = 'LALR'
 
-_lr_signature = 'translation_unit_or_emptyleftLORleftLANDleftORleftXORleftANDleftEQNEleftGTGELTLEleftRSHIFTLSHIFTleftPLUSMINUSleftTIMESDIVIDEMODAUTO BREAK CASE CHAR CONST CONTINUE DEFAULT DO DOUBLE ELSE ENUM EXTERN FLOAT FOR GOTO IF INLINE INT LONG REGISTER OFFSETOF RESTRICT RETURN SHORT SIGNED SIZEOF STATIC STRUCT SWITCH TYPEDEF UNION UNSIGNED VOID VOLATILE WHILE __INT128 _BOOL _COMPLEX _NORETURN _THREAD_LOCAL _STATIC_ASSERT _ATOMIC _ALIGNOF _ALIGNAS ID TYPEID INT_CONST_DEC INT_CONST_OCT INT_CONST_HEX INT_CONST_BIN INT_CONST_CHAR FLOAT_CONST HEX_FLOAT_CONST CHAR_CONST WCHAR_CONST U8CHAR_CONST U16CHAR_CONST U32CHAR_CONST STRING_LITERAL WSTRING_LITERAL U8STRING_LITERAL U16STRING_LITERAL U32STRING_LITERAL PLUS MINUS TIMES DIVIDE MOD OR AND NOT XOR LSHIFT RSHIFT LOR LAND LNOT LT LE GT GE EQ NE EQUALS TIMESEQUAL DIVEQUAL MODEQUAL PLUSEQUAL MINUSEQUAL LSHIFTEQUAL RSHIFTEQUAL ANDEQUAL XOREQUAL OREQUAL PLUSPLUS MINUSMINUS ARROW CONDOP LPAREN RPAREN LBRACKET RBRACKET LBRACE RBRACE COMMA PERIOD SEMI COLON ELLIPSIS PPHASH PPPRAGMA PPPRAGMASTRabstract_declarator_opt : empty\n| abstract_declaratorassignment_expression_opt : empty\n| assignment_expressionblock_item_list_opt : empty\n| block_item_listdeclaration_list_opt : empty\n| declaration_listdeclaration_specifiers_no_type_opt : empty\n| declaration_specifiers_no_typedesignation_opt : empty\n| designationexpression_opt : empty\n| expressionid_init_declarator_list_opt : empty\n| id_init_declarator_listidentifier_list_opt : empty\n| identifier_listinit_declarator_list_opt : empty\n| init_declarator_listinitializer_list_opt : empty\n| initializer_listparameter_type_list_opt : empty\n| parameter_type_liststruct_declarator_list_opt : empty\n| struct_declarator_listtype_qualifier_list_opt : empty\n| type_qualifier_list direct_id_declarator   : ID\n         direct_id_declarator   : LPAREN id_declarator RPAREN\n         direct_id_declarator   : direct_id_declarator LBRACKET type_qualifier_list_opt assignment_expression_opt RBRACKET\n         direct_id_declarator   : direct_id_declarator LBRACKET STATIC type_qualifier_list_opt assignment_expression RBRACKET\n                                    | direct_id_declarator LBRACKET type_qualifier_list STATIC assignment_expression RBRACKET\n         direct_id_declarator   : direct_id_declarator LBRACKET type_qualifier_list_opt TIMES RBRACKET\n         direct_id_declarator   : direct_id_declarator LPAREN parameter_type_list RPAREN\n                                    | direct_id_declarator LPAREN identifier_list_opt RPAREN\n         direct_typeid_declarator   : TYPEID\n         direct_typeid_declarator   : LPAREN typeid_declarator RPAREN\n         direct_typeid_declarator   : direct_typeid_declarator LBRACKET type_qualifier_list_opt assignment_expression_opt RBRACKET\n         direct_typeid_declarator   : direct_typeid_declarator LBRACKET STATIC type_qualifier_list_opt assignment_expression RBRACKET\n                                    | direct_typeid_declarator LBRACKET type_qualifier_list STATIC assignment_expression RBRACKET\n         direct_typeid_declarator   : direct_typeid_declarator LBRACKET type_qualifier_list_opt TIMES RBRACKET\n         direct_typeid_declarator   : direct_typeid_declarator LPAREN parameter_type_list RPAREN\n                                    | direct_typeid_declarator LPAREN identifier_list_opt RPAREN\n         direct_typeid_noparen_declarator   : TYPEID\n         direct_typeid_noparen_declarator   : direct_typeid_noparen_declarator LBRACKET type_qualifier_list_opt assignment_expression_opt RBRACKET\n         direct_typeid_noparen_declarator   : direct_typeid_noparen_declarator LBRACKET STATIC type_qualifier_list_opt assignment_expression RBRACKET\n                                    | direct_typeid_noparen_declarator LBRACKET type_qualifier_list STATIC assignment_expression RBRACKET\n         direct_typeid_noparen_declarator   : direct_typeid_noparen_declarator LBRACKET type_qualifier_list_opt TIMES RBRACKET\n         direct_typeid_noparen_declarator   : direct_typeid_noparen_declarator LPAREN parameter_type_list RPAREN\n                                    | direct_typeid_noparen_declarator LPAREN identifier_list_opt RPAREN\n         id_declarator  : direct_id_declarator\n         id_declarator  : pointer direct_id_declarator\n         typeid_declarator  : direct_typeid_declarator\n         typeid_declarator  : pointer direct_typeid_declarator\n         typeid_noparen_declarator  : direct_typeid_noparen_declarator\n         typeid_noparen_declarator  : pointer direct_typeid_noparen_declarator\n         translation_unit_or_empty   : translation_unit\n                                        | empty\n         translation_unit    : external_declaration\n         translation_unit    : translation_unit external_declaration\n         external_declaration    : function_definition\n         external_declaration    : declaration\n         external_declaration    : pp_directive\n                                    | pppragma_directive\n         external_declaration    : SEMI\n         external_declaration    : static_assert\n         static_assert           : _STATIC_ASSERT LPAREN constant_expression COMMA unified_string_literal RPAREN\n                                    | _STATIC_ASSERT LPAREN constant_expression RPAREN\n         pp_directive  : PPHASH\n         pppragma_directive      : PPPRAGMA\n                                    | PPPRAGMA PPPRAGMASTR\n         function_definition : id_declarator declaration_list_opt compound_statement\n         function_definition : declaration_specifiers id_declarator declaration_list_opt compound_statement\n         statement   : labeled_statement\n                        | expression_statement\n                        | compound_statement\n                        | selection_statement\n                        | iteration_statement\n                        | jump_statement\n                        | pppragma_directive\n                        | static_assert\n         pragmacomp_or_statement     : pppragma_directive statement\n                                        | statement\n         decl_body : declaration_specifiers init_declarator_list_opt\n                      | declaration_specifiers_no_type id_init_declarator_list_opt\n         declaration : decl_body SEMI\n         declaration_list    : declaration\n                                | declaration_list declaration\n         declaration_specifiers_no_type  : type_qualifier declaration_specifiers_no_type_opt\n         declaration_specifiers_no_type  : storage_class_specifier declaration_specifiers_no_type_opt\n         declaration_specifiers_no_type  : function_specifier declaration_specifiers_no_type_opt\n         declaration_specifiers_no_type  : atomic_specifier declaration_specifiers_no_type_opt\n         declaration_specifiers_no_type  : alignment_specifier declaration_specifiers_no_type_opt\n         declaration_specifiers  : declaration_specifiers type_qualifier\n         declaration_specifiers  : declaration_specifiers storage_class_specifier\n         declaration_specifiers  : declaration_specifiers function_specifier\n         declaration_specifiers  : declaration_specifiers type_specifier_no_typeid\n         declaration_specifiers  : type_specifier\n         declaration_specifiers  : declaration_specifiers_no_type type_specifier\n         declaration_specifiers  : declaration_specifiers alignment_specifier\n         storage_class_specifier : AUTO\n                                    | REGISTER\n                                    | STATIC\n                                    | EXTERN\n                                    | TYPEDEF\n                                    | _THREAD_LOCAL\n         function_specifier  : INLINE\n                                | _NORETURN\n         type_specifier_no_typeid  : VOID\n                                      | _BOOL\n                                      | CHAR\n                                      | SHORT\n                                      | INT\n                                      | LONG\n                                      | FLOAT\n                                      | DOUBLE\n                                      | _COMPLEX\n                                      | SIGNED\n                                      | UNSIGNED\n                                      | __INT128\n         type_specifier  : typedef_name\n                            | enum_specifier\n                            | struct_or_union_specifier\n                            | type_specifier_no_typeid\n                            | atomic_specifier\n         atomic_specifier  : _ATOMIC LPAREN type_name RPAREN\n         type_qualifier  : CONST\n                            | RESTRICT\n                            | VOLATILE\n                            | _ATOMIC\n         init_declarator_list    : init_declarator\n                                    | init_declarator_list COMMA init_declarator\n         init_declarator : declarator\n                            | declarator EQUALS initializer\n         id_init_declarator_list    : id_init_declarator\n                                       | id_init_declarator_list COMMA init_declarator\n         id_init_declarator : id_declarator\n                               | id_declarator EQUALS initializer\n         specifier_qualifier_list    : specifier_qualifier_list type_specifier_no_typeid\n         specifier_qualifier_list    : specifier_qualifier_list type_qualifier\n         specifier_qualifier_list  : type_specifier\n         specifier_qualifier_list  : type_qualifier_list type_specifier\n         specifier_qualifier_list  : alignment_specifier\n         specifier_qualifier_list  : specifier_qualifier_list alignment_specifier\n         struct_or_union_specifier   : struct_or_union ID\n                                        | struct_or_union TYPEID\n         struct_or_union_specifier : struct_or_union brace_open struct_declaration_list brace_close\n                                      | struct_or_union brace_open brace_close\n         struct_or_union_specifier   : struct_or_union ID brace_open struct_declaration_list brace_close\n                                        | struct_or_union ID brace_open brace_close\n                                        | struct_or_union TYPEID brace_open struct_declaration_list brace_close\n                                        | struct_or_union TYPEID brace_open brace_close\n         struct_or_union : STRUCT\n                            | UNION\n         struct_declaration_list     : struct_declaration\n                                        | struct_declaration_list struct_declaration\n         struct_declaration : specifier_qualifier_list struct_declarator_list_opt SEMI\n         struct_declaration : SEMI\n         struct_declaration : pppragma_directive\n         struct_declarator_list  : struct_declarator\n                                    | struct_declarator_list COMMA struct_declarator\n         struct_declarator : declarator\n         struct_declarator   : declarator COLON constant_expression\n                                | COLON constant_expression\n         enum_specifier  : ENUM ID\n                            | ENUM TYPEID\n         enum_specifier  : ENUM brace_open enumerator_list brace_close\n         enum_specifier  : ENUM ID brace_open enumerator_list brace_close\n                            | ENUM TYPEID brace_open enumerator_list brace_close\n         enumerator_list : enumerator\n                            | enumerator_list COMMA\n                            | enumerator_list COMMA enumerator\n         alignment_specifier  : _ALIGNAS LPAREN type_name RPAREN\n                                 | _ALIGNAS LPAREN constant_expression RPAREN\n         enumerator  : ID\n                        | ID EQUALS constant_expression\n         declarator  : id_declarator\n                        | typeid_declarator\n         pointer : TIMES type_qualifier_list_opt\n                    | TIMES type_qualifier_list_opt pointer\n         type_qualifier_list : type_qualifier\n                                | type_qualifier_list type_qualifier\n         parameter_type_list : parameter_list\n                                | parameter_list COMMA ELLIPSIS\n         parameter_list  : parameter_declaration\n                            | parameter_list COMMA parameter_declaration\n         parameter_declaration   : declaration_specifiers id_declarator\n                                    | declaration_specifiers typeid_noparen_declarator\n         parameter_declaration   : declaration_specifiers abstract_declarator_opt\n         identifier_list : identifier\n                            | identifier_list COMMA identifier\n         initializer : assignment_expression\n         initializer : brace_open initializer_list_opt brace_close\n                        | brace_open initializer_list COMMA brace_close\n         initializer_list    : designation_opt initializer\n                                | initializer_list COMMA designation_opt initializer\n         designation : designator_list EQUALS\n         designator_list : designator\n                            | designator_list designator\n         designator  : LBRACKET constant_expression RBRACKET\n                        | PERIOD identifier\n         type_name   : specifier_qualifier_list abstract_declarator_opt\n         abstract_declarator     : pointer\n         abstract_declarator     : pointer direct_abstract_declarator\n         abstract_declarator     : direct_abstract_declarator\n         direct_abstract_declarator  : LPAREN abstract_declarator RPAREN  direct_abstract_declarator  : direct_abstract_declarator LBRACKET assignment_expression_opt RBRACKET\n         direct_abstract_declarator  : LBRACKET type_qualifier_list_opt assignment_expression_opt RBRACKET\n         direct_abstract_declarator  : direct_abstract_declarator LBRACKET TIMES RBRACKET\n         direct_abstract_declarator  : LBRACKET TIMES RBRACKET\n         direct_abstract_declarator  : direct_abstract_declarator LPAREN parameter_type_list_opt RPAREN\n         direct_abstract_declarator  : LPAREN parameter_type_list_opt RPAREN\n         block_item  : declaration\n                        | statement\n         block_item_list : block_item\n                            | block_item_list block_item\n         compound_statement : brace_open block_item_list_opt brace_close  labeled_statement : ID COLON pragmacomp_or_statement  labeled_statement : CASE constant_expression COLON pragmacomp_or_statement  labeled_statement : DEFAULT COLON pragmacomp_or_statement  selection_statement : IF LPAREN expression RPAREN pragmacomp_or_statement  selection_statement : IF LPAREN expression RPAREN statement ELSE pragmacomp_or_statement  selection_statement : SWITCH LPAREN expression RPAREN pragmacomp_or_statement  iteration_statement : WHILE LPAREN expression RPAREN pragmacomp_or_statement  iteration_statement : DO pragmacomp_or_statement WHILE LPAREN expression RPAREN SEMI  iteration_statement : FOR LPAREN expression_opt SEMI expression_opt SEMI expression_opt RPAREN pragmacomp_or_statement  iteration_statement : FOR LPAREN declaration expression_opt SEMI expression_opt RPAREN pragmacomp_or_statement  jump_statement  : GOTO ID SEMI  jump_statement  : BREAK SEMI  jump_statement  : CONTINUE SEMI  jump_statement  : RETURN expression SEMI\n                            | RETURN SEMI\n         expression_statement : expression_opt SEMI  expression  : assignment_expression\n                        | expression COMMA assignment_expression\n         assignment_expression : LPAREN compound_statement RPAREN  typedef_name : TYPEID  assignment_expression   : conditional_expression\n                                    | unary_expression assignment_operator assignment_expression\n         assignment_operator : EQUALS\n                                | XOREQUAL\n                                | TIMESEQUAL\n                                | DIVEQUAL\n                                | MODEQUAL\n                                | PLUSEQUAL\n                                | MINUSEQUAL\n                                | LSHIFTEQUAL\n                                | RSHIFTEQUAL\n                                | ANDEQUAL\n                                | OREQUAL\n         constant_expression : conditional_expression  conditional_expression  : binary_expression\n                                    | binary_expression CONDOP expression COLON conditional_expression\n         binary_expression   : cast_expression\n                                | binary_expression TIMES binary_expression\n                                | binary_expression DIVIDE binary_expression\n                                | binary_expression MOD binary_expression\n                                | binary_expression PLUS binary_expression\n                                | binary_expression MINUS binary_expression\n                                | binary_expression RSHIFT binary_expression\n                                | binary_expression LSHIFT binary_expression\n                                | binary_expression LT binary_expression\n                                | binary_expression LE binary_expression\n                                | binary_expression GE binary_expression\n                                | binary_expression GT binary_expression\n                                | binary_expression EQ binary_expression\n                                | binary_expression NE binary_expression\n                                | binary_expression AND binary_expression\n                                | binary_expression OR binary_expression\n                                | binary_expression XOR binary_expression\n                                | binary_expression LAND binary_expression\n                                | binary_expression LOR binary_expression\n         cast_expression : unary_expression  cast_expression : LPAREN type_name RPAREN cast_expression  unary_expression    : postfix_expression  unary_expression    : PLUSPLUS unary_expression\n                                | MINUSMINUS unary_expression\n                                | unary_operator cast_expression\n         unary_expression    : SIZEOF unary_expression\n                                | SIZEOF LPAREN type_name RPAREN\n                                | _ALIGNOF LPAREN type_name RPAREN\n         unary_operator  : AND\n                            | TIMES\n                            | PLUS\n                            | MINUS\n                            | NOT\n                            | LNOT\n         postfix_expression  : primary_expression  postfix_expression  : postfix_expression LBRACKET expression RBRACKET  postfix_expression  : postfix_expression LPAREN argument_expression_list RPAREN\n                                | postfix_expression LPAREN RPAREN\n         postfix_expression  : postfix_expression PERIOD ID\n                                | postfix_expression PERIOD TYPEID\n                                | postfix_expression ARROW ID\n                                | postfix_expression ARROW TYPEID\n         postfix_expression  : postfix_expression PLUSPLUS\n                                | postfix_expression MINUSMINUS\n         postfix_expression  : LPAREN type_name RPAREN brace_open initializer_list brace_close\n                                | LPAREN type_name RPAREN brace_open initializer_list COMMA brace_close\n         primary_expression  : identifier  primary_expression  : constant  primary_expression  : unified_string_literal\n                                | unified_wstring_literal\n         primary_expression  : LPAREN expression RPAREN  primary_expression  : OFFSETOF LPAREN type_name COMMA offsetof_member_designator RPAREN\n         offsetof_member_designator : identifier\n                                         | offsetof_member_designator PERIOD identifier\n                                         | offsetof_member_designator LBRACKET expression RBRACKET\n         argument_expression_list    : assignment_expression\n                                        | argument_expression_list COMMA assignment_expression\n         identifier  : ID  constant    : INT_CONST_DEC\n                        | INT_CONST_OCT\n                        | INT_CONST_HEX\n                        | INT_CONST_BIN\n                        | INT_CONST_CHAR\n         constant    : FLOAT_CONST\n                        | HEX_FLOAT_CONST\n         constant    : CHAR_CONST\n                        | WCHAR_CONST\n                        | U8CHAR_CONST\n                        | U16CHAR_CONST\n                        | U32CHAR_CONST\n         unified_string_literal  : STRING_LITERAL\n                                    | unified_string_literal STRING_LITERAL\n         unified_wstring_literal : WSTRING_LITERAL\n                                    | U8STRING_LITERAL\n                                    | U16STRING_LITERAL\n                                    | U32STRING_LITERAL\n                                    | unified_wstring_literal WSTRING_LITERAL\n                                    | unified_wstring_literal U8STRING_LITERAL\n                                    | unified_wstring_literal U16STRING_LITERAL\n                                    | unified_wstring_literal U32STRING_LITERAL\n         brace_open  :   LBRACE\n         brace_close :   RBRACE\n        empty : '
+_lr_signature = 'translation_unit_or_emptyleftLORleftLANDleftORleftXORleftANDleftEQNEleftGTGELTLEleftRSHIFTLSHIFTleftPLUSMINUSleftTIMESDIVIDEMODAUTO BREAK CASE CHAR CONST CONTINUE DEFAULT DO DOUBLE ELSE ENUM EXTERN FLOAT FOR GOTO IF INLINE INT LONG REGISTER OFFSETOF RESTRICT RETURN SHORT SIGNED SIZEOF STATIC STRUCT SWITCH TYPEDEF UNION UNSIGNED VOID VOLATILE WHILE __INT128 _BOOL _COMPLEX _NORETURN _THREAD_LOCAL _STATIC_ASSERT _ATOMIC _ALIGNOF _ALIGNAS _PRAGMA ID TYPEID INT_CONST_DEC INT_CONST_OCT INT_CONST_HEX INT_CONST_BIN INT_CONST_CHAR FLOAT_CONST HEX_FLOAT_CONST CHAR_CONST WCHAR_CONST U8CHAR_CONST U16CHAR_CONST U32CHAR_CONST STRING_LITERAL WSTRING_LITERAL U8STRING_LITERAL U16STRING_LITERAL U32STRING_LITERAL PLUS MINUS TIMES DIVIDE MOD OR AND NOT XOR LSHIFT RSHIFT LOR LAND LNOT LT LE GT GE EQ NE EQUALS TIMESEQUAL DIVEQUAL MODEQUAL PLUSEQUAL MINUSEQUAL LSHIFTEQUAL RSHIFTEQUAL ANDEQUAL XOREQUAL OREQUAL PLUSPLUS MINUSMINUS ARROW CONDOP LPAREN RPAREN LBRACKET RBRACKET LBRACE RBRACE COMMA PERIOD SEMI COLON ELLIPSIS PPHASH PPPRAGMA PPPRAGMASTRabstract_declarator_opt : empty\n| abstract_declaratorassignment_expression_opt : empty\n| assignment_expressionblock_item_list_opt : empty\n| block_item_listdeclaration_list_opt : empty\n| declaration_listdeclaration_specifiers_no_type_opt : empty\n| declaration_specifiers_no_typedesignation_opt : empty\n| designationexpression_opt : empty\n| expressionid_init_declarator_list_opt : empty\n| id_init_declarator_listidentifier_list_opt : empty\n| identifier_listinit_declarator_list_opt : empty\n| init_declarator_listinitializer_list_opt : empty\n| initializer_listparameter_type_list_opt : empty\n| parameter_type_liststruct_declarator_list_opt : empty\n| struct_declarator_listtype_qualifier_list_opt : empty\n| type_qualifier_list direct_id_declarator   : ID\n         direct_id_declarator   : LPAREN id_declarator RPAREN\n         direct_id_declarator   : direct_id_declarator LBRACKET type_qualifier_list_opt assignment_expression_opt RBRACKET\n         direct_id_declarator   : direct_id_declarator LBRACKET STATIC type_qualifier_list_opt assignment_expression RBRACKET\n                                    | direct_id_declarator LBRACKET type_qualifier_list STATIC assignment_expression RBRACKET\n         direct_id_declarator   : direct_id_declarator LBRACKET type_qualifier_list_opt TIMES RBRACKET\n         direct_id_declarator   : direct_id_declarator LPAREN parameter_type_list RPAREN\n                                    | direct_id_declarator LPAREN identifier_list_opt RPAREN\n         direct_typeid_declarator   : TYPEID\n         direct_typeid_declarator   : LPAREN typeid_declarator RPAREN\n         direct_typeid_declarator   : direct_typeid_declarator LBRACKET type_qualifier_list_opt assignment_expression_opt RBRACKET\n         direct_typeid_declarator   : direct_typeid_declarator LBRACKET STATIC type_qualifier_list_opt assignment_expression RBRACKET\n                                    | direct_typeid_declarator LBRACKET type_qualifier_list STATIC assignment_expression RBRACKET\n         direct_typeid_declarator   : direct_typeid_declarator LBRACKET type_qualifier_list_opt TIMES RBRACKET\n         direct_typeid_declarator   : direct_typeid_declarator LPAREN parameter_type_list RPAREN\n                                    | direct_typeid_declarator LPAREN identifier_list_opt RPAREN\n         direct_typeid_noparen_declarator   : TYPEID\n         direct_typeid_noparen_declarator   : direct_typeid_noparen_declarator LBRACKET type_qualifier_list_opt assignment_expression_opt RBRACKET\n         direct_typeid_noparen_declarator   : direct_typeid_noparen_declarator LBRACKET STATIC type_qualifier_list_opt assignment_expression RBRACKET\n                                    | direct_typeid_noparen_declarator LBRACKET type_qualifier_list STATIC assignment_expression RBRACKET\n         direct_typeid_noparen_declarator   : direct_typeid_noparen_declarator LBRACKET type_qualifier_list_opt TIMES RBRACKET\n         direct_typeid_noparen_declarator   : direct_typeid_noparen_declarator LPAREN parameter_type_list RPAREN\n                                    | direct_typeid_noparen_declarator LPAREN identifier_list_opt RPAREN\n         id_declarator  : direct_id_declarator\n         id_declarator  : pointer direct_id_declarator\n         typeid_declarator  : direct_typeid_declarator\n         typeid_declarator  : pointer direct_typeid_declarator\n         typeid_noparen_declarator  : direct_typeid_noparen_declarator\n         typeid_noparen_declarator  : pointer direct_typeid_noparen_declarator\n         translation_unit_or_empty   : translation_unit\n                                        | empty\n         translation_unit    : external_declaration\n         translation_unit    : translation_unit external_declaration\n         external_declaration    : function_definition\n         external_declaration    : declaration\n         external_declaration    : pp_directive\n                                    | pppragma_directive\n         external_declaration    : SEMI\n         external_declaration    : static_assert\n         static_assert           : _STATIC_ASSERT LPAREN constant_expression COMMA unified_string_literal RPAREN\n                                    | _STATIC_ASSERT LPAREN constant_expression RPAREN\n         pp_directive  : PPHASH\n         pppragma_directive      : PPPRAGMA\n                                    | PPPRAGMA PPPRAGMASTR\n                                    | _PRAGMA LPAREN unified_string_literal RPAREN\n         pppragma_directive_list : pppragma_directive\n                                    | pppragma_directive_list pppragma_directive\n         function_definition : id_declarator declaration_list_opt compound_statement\n         function_definition : declaration_specifiers id_declarator declaration_list_opt compound_statement\n         statement   : labeled_statement\n                        | expression_statement\n                        | compound_statement\n                        | selection_statement\n                        | iteration_statement\n                        | jump_statement\n                        | pppragma_directive\n                        | static_assert\n         pragmacomp_or_statement     : pppragma_directive_list statement\n                                        | statement\n         decl_body : declaration_specifiers init_declarator_list_opt\n                      | declaration_specifiers_no_type id_init_declarator_list_opt\n         declaration : decl_body SEMI\n         declaration_list    : declaration\n                                | declaration_list declaration\n         declaration_specifiers_no_type  : type_qualifier declaration_specifiers_no_type_opt\n         declaration_specifiers_no_type  : storage_class_specifier declaration_specifiers_no_type_opt\n         declaration_specifiers_no_type  : function_specifier declaration_specifiers_no_type_opt\n         declaration_specifiers_no_type  : atomic_specifier declaration_specifiers_no_type_opt\n         declaration_specifiers_no_type  : alignment_specifier declaration_specifiers_no_type_opt\n         declaration_specifiers  : declaration_specifiers type_qualifier\n         declaration_specifiers  : declaration_specifiers storage_class_specifier\n         declaration_specifiers  : declaration_specifiers function_specifier\n         declaration_specifiers  : declaration_specifiers type_specifier_no_typeid\n         declaration_specifiers  : type_specifier\n         declaration_specifiers  : declaration_specifiers_no_type type_specifier\n         declaration_specifiers  : declaration_specifiers alignment_specifier\n         storage_class_specifier : AUTO\n                                    | REGISTER\n                                    | STATIC\n                                    | EXTERN\n                                    | TYPEDEF\n                                    | _THREAD_LOCAL\n         function_specifier  : INLINE\n                                | _NORETURN\n         type_specifier_no_typeid  : VOID\n                                      | _BOOL\n                                      | CHAR\n                                      | SHORT\n                                      | INT\n                                      | LONG\n                                      | FLOAT\n                                      | DOUBLE\n                                      | _COMPLEX\n                                      | SIGNED\n                                      | UNSIGNED\n                                      | __INT128\n         type_specifier  : typedef_name\n                            | enum_specifier\n                            | struct_or_union_specifier\n                            | type_specifier_no_typeid\n                            | atomic_specifier\n         atomic_specifier  : _ATOMIC LPAREN type_name RPAREN\n         type_qualifier  : CONST\n                            | RESTRICT\n                            | VOLATILE\n                            | _ATOMIC\n         init_declarator_list    : init_declarator\n                                    | init_declarator_list COMMA init_declarator\n         init_declarator : declarator\n                            | declarator EQUALS initializer\n         id_init_declarator_list    : id_init_declarator\n                                       | id_init_declarator_list COMMA init_declarator\n         id_init_declarator : id_declarator\n                               | id_declarator EQUALS initializer\n         specifier_qualifier_list    : specifier_qualifier_list type_specifier_no_typeid\n         specifier_qualifier_list    : specifier_qualifier_list type_qualifier\n         specifier_qualifier_list  : type_specifier\n         specifier_qualifier_list  : type_qualifier_list type_specifier\n         specifier_qualifier_list  : alignment_specifier\n         specifier_qualifier_list  : specifier_qualifier_list alignment_specifier\n         struct_or_union_specifier   : struct_or_union ID\n                                        | struct_or_union TYPEID\n         struct_or_union_specifier : struct_or_union brace_open struct_declaration_list brace_close\n                                      | struct_or_union brace_open brace_close\n         struct_or_union_specifier   : struct_or_union ID brace_open struct_declaration_list brace_close\n                                        | struct_or_union ID brace_open brace_close\n                                        | struct_or_union TYPEID brace_open struct_declaration_list brace_close\n                                        | struct_or_union TYPEID brace_open brace_close\n         struct_or_union : STRUCT\n                            | UNION\n         struct_declaration_list     : struct_declaration\n                                        | struct_declaration_list struct_declaration\n         struct_declaration : specifier_qualifier_list struct_declarator_list_opt SEMI\n         struct_declaration : SEMI\n         struct_declaration : pppragma_directive\n         struct_declarator_list  : struct_declarator\n                                    | struct_declarator_list COMMA struct_declarator\n         struct_declarator : declarator\n         struct_declarator   : declarator COLON constant_expression\n                                | COLON constant_expression\n         enum_specifier  : ENUM ID\n                            | ENUM TYPEID\n         enum_specifier  : ENUM brace_open enumerator_list brace_close\n         enum_specifier  : ENUM ID brace_open enumerator_list brace_close\n                            | ENUM TYPEID brace_open enumerator_list brace_close\n         enumerator_list : enumerator\n                            | enumerator_list COMMA\n                            | enumerator_list COMMA enumerator\n         alignment_specifier  : _ALIGNAS LPAREN type_name RPAREN\n                                 | _ALIGNAS LPAREN constant_expression RPAREN\n         enumerator  : ID\n                        | ID EQUALS constant_expression\n         declarator  : id_declarator\n                        | typeid_declarator\n         pointer : TIMES type_qualifier_list_opt\n                    | TIMES type_qualifier_list_opt pointer\n         type_qualifier_list : type_qualifier\n                                | type_qualifier_list type_qualifier\n         parameter_type_list : parameter_list\n                                | parameter_list COMMA ELLIPSIS\n         parameter_list  : parameter_declaration\n                            | parameter_list COMMA parameter_declaration\n         parameter_declaration   : declaration_specifiers id_declarator\n                                    | declaration_specifiers typeid_noparen_declarator\n         parameter_declaration   : declaration_specifiers abstract_declarator_opt\n         identifier_list : identifier\n                            | identifier_list COMMA identifier\n         initializer : assignment_expression\n         initializer : brace_open initializer_list_opt brace_close\n                        | brace_open initializer_list COMMA brace_close\n         initializer_list    : designation_opt initializer\n                                | initializer_list COMMA designation_opt initializer\n         designation : designator_list EQUALS\n         designator_list : designator\n                            | designator_list designator\n         designator  : LBRACKET constant_expression RBRACKET\n                        | PERIOD identifier\n         type_name   : specifier_qualifier_list abstract_declarator_opt\n         abstract_declarator     : pointer\n         abstract_declarator     : pointer direct_abstract_declarator\n         abstract_declarator     : direct_abstract_declarator\n         direct_abstract_declarator  : LPAREN abstract_declarator RPAREN  direct_abstract_declarator  : direct_abstract_declarator LBRACKET assignment_expression_opt RBRACKET\n         direct_abstract_declarator  : LBRACKET type_qualifier_list_opt assignment_expression_opt RBRACKET\n         direct_abstract_declarator  : direct_abstract_declarator LBRACKET TIMES RBRACKET\n         direct_abstract_declarator  : LBRACKET TIMES RBRACKET\n         direct_abstract_declarator  : direct_abstract_declarator LPAREN parameter_type_list_opt RPAREN\n         direct_abstract_declarator  : LPAREN parameter_type_list_opt RPAREN\n         block_item  : declaration\n                        | statement\n         block_item_list : block_item\n                            | block_item_list block_item\n         compound_statement : brace_open block_item_list_opt brace_close  labeled_statement : ID COLON pragmacomp_or_statement  labeled_statement : CASE constant_expression COLON pragmacomp_or_statement  labeled_statement : DEFAULT COLON pragmacomp_or_statement  selection_statement : IF LPAREN expression RPAREN pragmacomp_or_statement  selection_statement : IF LPAREN expression RPAREN statement ELSE pragmacomp_or_statement  selection_statement : SWITCH LPAREN expression RPAREN pragmacomp_or_statement  iteration_statement : WHILE LPAREN expression RPAREN pragmacomp_or_statement  iteration_statement : DO pragmacomp_or_statement WHILE LPAREN expression RPAREN SEMI  iteration_statement : FOR LPAREN expression_opt SEMI expression_opt SEMI expression_opt RPAREN pragmacomp_or_statement  iteration_statement : FOR LPAREN declaration expression_opt SEMI expression_opt RPAREN pragmacomp_or_statement  jump_statement  : GOTO ID SEMI  jump_statement  : BREAK SEMI  jump_statement  : CONTINUE SEMI  jump_statement  : RETURN expression SEMI\n                            | RETURN SEMI\n         expression_statement : expression_opt SEMI  expression  : assignment_expression\n                        | expression COMMA assignment_expression\n         assignment_expression : LPAREN compound_statement RPAREN  typedef_name : TYPEID  assignment_expression   : conditional_expression\n                                    | unary_expression assignment_operator assignment_expression\n         assignment_operator : EQUALS\n                                | XOREQUAL\n                                | TIMESEQUAL\n                                | DIVEQUAL\n                                | MODEQUAL\n                                | PLUSEQUAL\n                                | MINUSEQUAL\n                                | LSHIFTEQUAL\n                                | RSHIFTEQUAL\n                                | ANDEQUAL\n                                | OREQUAL\n         constant_expression : conditional_expression  conditional_expression  : binary_expression\n                                    | binary_expression CONDOP expression COLON conditional_expression\n         binary_expression   : cast_expression\n                                | binary_expression TIMES binary_expression\n                                | binary_expression DIVIDE binary_expression\n                                | binary_expression MOD binary_expression\n                                | binary_expression PLUS binary_expression\n                                | binary_expression MINUS binary_expression\n                                | binary_expression RSHIFT binary_expression\n                                | binary_expression LSHIFT binary_expression\n                                | binary_expression LT binary_expression\n                                | binary_expression LE binary_expression\n                                | binary_expression GE binary_expression\n                                | binary_expression GT binary_expression\n                                | binary_expression EQ binary_expression\n                                | binary_expression NE binary_expression\n                                | binary_expression AND binary_expression\n                                | binary_expression OR binary_expression\n                                | binary_expression XOR binary_expression\n                                | binary_expression LAND binary_expression\n                                | binary_expression LOR binary_expression\n         cast_expression : unary_expression  cast_expression : LPAREN type_name RPAREN cast_expression  unary_expression    : postfix_expression  unary_expression    : PLUSPLUS unary_expression\n                                | MINUSMINUS unary_expression\n                                | unary_operator cast_expression\n         unary_expression    : SIZEOF unary_expression\n                                | SIZEOF LPAREN type_name RPAREN\n                                | _ALIGNOF LPAREN type_name RPAREN\n         unary_operator  : AND\n                            | TIMES\n                            | PLUS\n                            | MINUS\n                            | NOT\n                            | LNOT\n         postfix_expression  : primary_expression  postfix_expression  : postfix_expression LBRACKET expression RBRACKET  postfix_expression  : postfix_expression LPAREN argument_expression_list RPAREN\n                                | postfix_expression LPAREN RPAREN\n         postfix_expression  : postfix_expression PERIOD ID\n                                | postfix_expression PERIOD TYPEID\n                                | postfix_expression ARROW ID\n                                | postfix_expression ARROW TYPEID\n         postfix_expression  : postfix_expression PLUSPLUS\n                                | postfix_expression MINUSMINUS\n         postfix_expression  : LPAREN type_name RPAREN brace_open initializer_list brace_close\n                                | LPAREN type_name RPAREN brace_open initializer_list COMMA brace_close\n         primary_expression  : identifier  primary_expression  : constant  primary_expression  : unified_string_literal\n                                | unified_wstring_literal\n         primary_expression  : LPAREN expression RPAREN  primary_expression  : OFFSETOF LPAREN type_name COMMA offsetof_member_designator RPAREN\n         offsetof_member_designator : identifier\n                                         | offsetof_member_designator PERIOD identifier\n                                         | offsetof_member_designator LBRACKET expression RBRACKET\n         argument_expression_list    : assignment_expression\n                                        | argument_expression_list COMMA assignment_expression\n         identifier  : ID  constant    : INT_CONST_DEC\n                        | INT_CONST_OCT\n                        | INT_CONST_HEX\n                        | INT_CONST_BIN\n                        | INT_CONST_CHAR\n         constant    : FLOAT_CONST\n                        | HEX_FLOAT_CONST\n         constant    : CHAR_CONST\n                        | WCHAR_CONST\n                        | U8CHAR_CONST\n                        | U16CHAR_CONST\n                        | U32CHAR_CONST\n         unified_string_literal  : STRING_LITERAL\n                                    | unified_string_literal STRING_LITERAL\n         unified_wstring_literal : WSTRING_LITERAL\n                                    | U8STRING_LITERAL\n                                    | U16STRING_LITERAL\n                                    | U32STRING_LITERAL\n                                    | unified_wstring_literal WSTRING_LITERAL\n                                    | unified_wstring_literal U8STRING_LITERAL\n                                    | unified_wstring_literal U16STRING_LITERAL\n                                    | unified_wstring_literal U32STRING_LITERAL\n         brace_open  :   LBRACE\n         brace_close :   RBRACE\n        empty : '
     
-_lr_action_items = {'INT_CONST_CHAR':([3,39,58,61,76,85,97,103,105,106,116,117,119,124,128,131,135,137,146,149,150,151,165,171,173,174,175,181,191,198,201,204,205,206,218,219,220,227,229,231,233,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,265,266,282,284,285,286,289,290,291,297,298,300,301,302,303,305,307,308,319,329,332,336,338,339,352,353,354,357,358,359,360,361,362,363,364,365,366,367,368,369,373,375,377,412,413,419,421,424,425,427,428,429,430,432,434,435,437,438,439,440,441,447,459,472,475,477,481,484,488,494,496,497,499,500,502,505,506,510,513,514,515,521,522,533,535,536,537,538,539,541,542,543,549,550,553,554,555,557,558,566,569,574,575,576,577,578,579,],[-128,-129,-130,-71,-131,132,-335,-28,-182,-27,132,-337,-87,-72,-337,132,-286,-285,132,132,-283,-287,-288,132,-284,132,132,132,-336,-183,132,132,-28,-337,132,-28,-337,-337,132,132,132,132,132,132,132,132,132,132,132,132,132,132,132,132,132,132,132,132,132,132,132,132,-337,-76,-79,-82,-75,132,-77,132,132,-81,-215,-214,-80,-216,132,-78,132,132,-69,-284,132,132,-284,132,132,-244,-247,-245,-241,-242,-246,-248,132,-250,-251,-243,-249,-12,132,132,-11,132,132,132,132,-234,-233,132,-231,132,132,-217,132,-230,132,-84,-218,132,132,132,-337,-337,-198,132,132,132,-337,-284,-229,-232,132,-221,132,-83,-219,-68,132,-28,-337,132,-11,132,132,-220,132,132,132,-284,132,132,132,-337,132,-225,-224,-222,-84,132,132,132,-226,-223,132,-228,-227,]),'VOID':([0,1,2,3,4,5,6,7,10,11,12,13,14,16,17,18,19,20,21,22,23,25,26,27,29,30,33,34,36,38,39,40,42,43,44,45,46,47,48,49,50,52,53,54,55,56,58,59,60,61,62,63,64,65,66,67,68,71,75,76,80,81,82,85,86,87,89,90,91,93,94,95,96,97,98,99,100,101,105,109,111,118,119,120,121,122,123,124,129,142,147,172,174,177,180,181,182,184,185,186,187,188,189,190,191,192,198,200,211,214,223,229,231,233,239,240,241,267,269,275,278,279,280,284,285,286,289,291,298,300,301,302,303,305,308,312,313,314,315,316,317,318,328,332,340,341,342,350,422,424,425,427,428,432,435,437,438,439,442,443,446,448,449,453,454,460,496,497,500,505,506,510,511,512,536,554,555,557,558,575,576,578,579,],[6,-337,-113,-128,6,-124,-110,-106,-104,-107,-125,-105,-64,-60,-67,-99,-66,-109,6,-120,-115,-65,-102,-126,-131,-108,-238,-111,-122,-63,-129,6,-29,-121,-116,-62,-112,-70,-52,-123,-117,-337,-337,-119,-337,-114,-130,6,-118,-71,-103,-337,-9,-131,-91,-10,-96,-98,6,-131,-95,-101,-97,6,-53,-126,6,-88,6,6,-93,6,-147,-335,-146,6,-167,-166,-182,-100,-126,6,-87,-90,-94,-92,-61,-72,6,-144,-142,6,6,6,-73,6,-89,6,6,6,-149,-159,-160,-156,-336,6,-183,-30,6,6,-74,6,6,6,6,-174,-175,6,-143,-140,6,-141,-145,-76,-79,-82,-75,-77,6,-81,-215,-214,-80,-216,-78,-127,6,-153,6,-151,-148,-157,-168,-69,-36,-35,6,6,6,-234,-233,6,-231,-217,-230,-81,-84,-218,-152,-150,-158,-170,-169,-31,-34,6,-229,-232,-221,-83,-219,-68,-33,-32,-220,-225,-224,-222,-84,-226,-223,-228,-227,]),'LBRACKET':([2,3,5,6,7,10,11,12,13,18,20,22,23,26,27,30,33,34,35,36,39,42,43,44,46,48,49,50,54,56,58,60,62,68,71,73,76,77,80,81,82,86,96,97,98,100,101,103,104,105,106,109,111,127,132,133,134,136,138,139,140,141,142,143,145,147,148,152,153,154,156,160,161,163,164,166,167,168,169,176,177,187,191,198,199,200,211,216,227,230,235,236,237,238,240,241,261,263,269,275,276,278,279,280,283,310,312,314,316,317,328,340,341,342,344,345,347,355,356,371,376,402,403,404,405,407,411,414,442,443,448,449,453,454,457,458,464,465,470,472,474,482,483,488,489,490,492,511,512,518,519,520,526,527,529,530,531,532,544,545,547,550,551,559,560,563,565,570,571,572,],[-113,-128,-124,-110,-106,-104,-107,-125,-105,-99,-109,-120,-115,-102,-126,-108,-238,-111,-337,-122,-129,-29,-121,-116,-112,117,-123,-117,-119,-114,-130,-118,-103,-96,-98,128,-131,-37,-95,-101,-97,117,-147,-335,-146,-167,-166,-28,-180,-182,-27,-100,-126,128,-317,-321,-318,-303,-324,-330,-313,-319,-144,-301,-314,-142,-327,-325,-304,-322,-302,-315,-289,-328,-316,-329,-320,265,-323,-312,282,-149,-336,-183,-181,-30,282,-38,373,-326,-334,-332,-331,-333,-174,-175,-298,-297,-143,-140,282,282,-141,-145,421,-312,-127,-153,-151,-148,-168,-36,-35,282,282,459,-45,-44,-43,-199,373,-296,-295,-294,-293,-292,-305,421,-152,-150,-170,-169,-31,-34,282,459,-39,-42,-202,373,-200,-290,-291,373,-213,-207,-211,-33,-32,-41,-40,-201,549,-307,-209,-208,-210,-212,-51,-50,-306,373,-299,-46,-49,-308,-300,-48,-47,-309,]),'WCHAR_CONST':([3,39,58,61,76,85,97,103,105,106,116,117,119,124,128,131,135,137,146,149,150,151,165,171,173,174,175,181,191,198,201,204,205,206,218,219,220,227,229,231,233,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,265,266,282,284,285,286,289,290,291,297,298,300,301,302,303,305,307,308,319,329,332,336,338,339,352,353,354,357,358,359,360,361,362,363,364,365,366,367,368,369,373,375,377,412,413,419,421,424,425,427,428,429,430,432,434,435,437,438,439,440,441,447,459,472,475,477,481,484,488,494,496,497,499,500,502,505,506,510,513,514,515,521,522,533,535,536,537,538,539,541,542,543,549,550,553,554,555,557,558,566,569,574,575,576,577,578,579,],[-128,-129,-130,-71,-131,133,-335,-28,-182,-27,133,-337,-87,-72,-337,133,-286,-285,133,133,-283,-287,-288,133,-284,133,133,133,-336,-183,133,133,-28,-337,133,-28,-337,-337,133,133,133,133,133,133,133,133,133,133,133,133,133,133,133,133,133,133,133,133,133,133,133,133,-337,-76,-79,-82,-75,133,-77,133,133,-81,-215,-214,-80,-216,133,-78,133,133,-69,-284,133,133,-284,133,133,-244,-247,-245,-241,-242,-246,-248,133,-250,-251,-243,-249,-12,133,133,-11,133,133,133,133,-234,-233,133,-231,133,133,-217,133,-230,133,-84,-218,133,133,133,-337,-337,-198,133,133,133,-337,-284,-229,-232,133,-221,133,-83,-219,-68,133,-28,-337,133,-11,133,133,-220,133,133,133,-284,133,133,133,-337,133,-225,-224,-222,-84,133,133,133,-226,-223,133,-228,-227,]),'FLOAT_CONST':([3,39,58,61,76,85,97,103,105,106,116,117,119,124,128,131,135,137,146,149,150,151,165,171,173,174,175,181,191,198,201,204,205,206,218,219,220,227,229,231,233,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,265,266,282,284,285,286,289,290,291,297,298,300,301,302,303,305,307,308,319,329,332,336,338,339,352,353,354,357,358,359,360,361,362,363,364,365,366,367,368,369,373,375,377,412,413,419,421,424,425,427,428,429,430,432,434,435,437,438,439,440,441,447,459,472,475,477,481,484,488,494,496,497,499,500,502,505,506,510,513,514,515,521,522,533,535,536,537,538,539,541,542,543,549,550,553,554,555,557,558,566,569,574,575,576,577,578,579,],[-128,-129,-130,-71,-131,134,-335,-28,-182,-27,134,-337,-87,-72,-337,134,-286,-285,134,134,-283,-287,-288,134,-284,134,134,134,-336,-183,134,134,-28,-337,134,-28,-337,-337,134,134,134,134,134,134,134,134,134,134,134,134,134,134,134,134,134,134,134,134,134,134,134,134,-337,-76,-79,-82,-75,134,-77,134,134,-81,-215,-214,-80,-216,134,-78,134,134,-69,-284,134,134,-284,134,134,-244,-247,-245,-241,-242,-246,-248,134,-250,-251,-243,-249,-12,134,134,-11,134,134,134,134,-234,-233,134,-231,134,134,-217,134,-230,134,-84,-218,134,134,134,-337,-337,-198,134,134,134,-337,-284,-229,-232,134,-221,134,-83,-219,-68,134,-28,-337,134,-11,134,134,-220,134,134,134,-284,134,134,134,-337,134,-225,-224,-222,-84,134,134,134,-226,-223,134,-228,-227,]),'MINUS':([3,39,58,61,76,85,97,103,105,106,116,117,119,124,128,131,132,133,134,135,136,137,138,139,140,141,143,144,145,146,148,149,150,151,152,153,154,156,158,160,161,162,163,164,165,166,167,168,169,171,173,174,175,176,181,191,198,201,204,205,206,218,219,220,224,227,229,230,231,232,233,234,235,236,237,238,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,261,263,265,266,268,273,282,284,285,286,289,290,291,297,298,300,301,302,303,305,307,308,310,319,329,332,336,338,339,352,353,354,357,358,359,360,361,362,363,364,365,366,367,368,369,373,375,377,383,384,385,386,387,388,389,390,391,392,393,394,395,396,397,398,400,401,402,403,404,405,407,411,412,413,419,421,424,425,427,428,429,430,432,434,435,437,438,439,440,441,447,459,472,475,477,478,480,481,482,483,484,487,488,494,496,497,499,500,502,505,506,510,513,514,515,521,522,533,535,536,537,538,539,541,542,543,547,549,550,551,553,554,555,557,558,565,566,569,574,575,576,577,578,579,],[-128,-129,-130,-71,-131,135,-335,-28,-182,-27,135,-337,-87,-72,-337,135,-317,-321,-318,-286,-303,-285,-324,-330,-313,-319,-301,-274,-314,135,-327,135,-283,-287,-325,-304,-322,-302,-255,-315,-289,245,-328,-316,-288,-329,-320,-276,-323,135,-284,135,135,-312,135,-336,-183,135,135,-28,-337,135,-28,-337,-274,-337,135,-326,135,-280,135,-277,-334,-332,-331,-333,135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,-298,-297,135,135,-279,-278,-337,-76,-79,-82,-75,135,-77,135,135,-81,-215,-214,-80,-216,135,-78,-312,135,135,-69,-284,135,135,-284,135,135,-244,-247,-245,-241,-242,-246,-248,135,-250,-251,-243,-249,-12,135,135,-11,245,245,245,-260,245,245,245,-259,245,245,-257,-256,245,245,245,245,245,-258,-296,-295,-294,-293,-292,-305,135,135,135,135,-234,-233,135,-231,135,135,-217,135,-230,135,-84,-218,135,135,135,-337,-337,-198,135,-281,-282,135,-290,-291,135,-275,-337,-284,-229,-232,135,-221,135,-83,-219,-68,135,-28,-337,135,-11,135,135,-220,135,135,135,-284,135,135,-306,135,-337,-299,135,-225,-224,-222,-84,-300,135,135,135,-226,-223,135,-228,-227,]),'RPAREN':([2,3,5,6,7,10,11,12,13,18,20,22,23,26,27,30,33,34,35,36,39,42,43,44,46,48,49,50,54,56,58,60,62,68,71,73,76,77,80,81,82,86,96,98,100,101,103,104,105,106,107,109,111,118,125,127,129,132,133,134,136,138,139,140,141,142,143,144,145,147,148,152,153,154,156,157,158,159,160,161,162,163,164,166,167,168,169,176,177,178,183,187,191,198,199,200,203,207,208,209,210,211,212,213,215,216,221,222,224,225,230,232,234,235,236,237,238,240,241,261,263,266,268,269,270,271,272,273,274,275,276,277,278,279,280,281,283,294,312,314,316,317,328,340,341,342,343,344,345,346,347,348,355,356,378,379,380,381,382,383,384,385,386,387,388,389,390,391,392,393,394,395,396,397,398,400,401,402,403,404,405,407,408,409,411,414,415,416,417,418,422,433,439,442,443,448,449,452,453,454,457,458,460,461,462,463,464,465,468,476,478,480,482,483,486,487,489,490,492,495,501,503,507,511,512,516,517,518,519,524,525,526,527,529,530,531,532,544,545,547,551,553,556,559,560,563,565,566,567,570,571,572,573,],[-113,-128,-124,-110,-106,-104,-107,-125,-105,-99,-109,-120,-115,-102,-126,-108,-238,-111,-337,-122,-129,-29,-121,-116,-112,-52,-123,-117,-119,-114,-130,-118,-103,-96,-98,-54,-131,-37,-95,-101,-97,-53,-147,-146,-167,-166,-28,-180,-182,-27,200,-100,-126,-337,216,-55,-337,-317,-321,-318,-303,-324,-330,-313,-319,-144,-301,-274,-314,-142,-327,-325,-304,-322,-302,240,-255,241,-315,-289,-253,-328,-316,-329,-320,-276,-323,-312,-337,-252,312,-149,-336,-183,-181,-30,332,340,-17,341,-186,-337,-18,-184,-191,-38,355,356,-274,-239,-326,-280,-277,-334,-332,-331,-333,-174,-175,-298,-297,407,-279,-143,411,413,-235,-278,-203,-140,-204,-1,-337,-141,-145,-2,-206,-14,-127,-153,-151,-148,-168,-36,-35,-337,-190,-204,-56,-188,-45,-189,-44,-43,476,477,478,479,480,-261,-273,-262,-260,-264,-268,-263,-259,-266,-271,-257,-256,-265,-272,-267,-269,-270,-258,-296,-295,-294,-293,-292,-310,483,-305,-205,-23,-24,489,490,-337,-13,-218,-152,-150,-170,-169,510,-31,-34,-204,-57,-337,-192,-185,-187,-39,-42,-240,-237,-281,-282,-290,-291,-236,-275,-213,-207,-211,532,535,537,539,-33,-32,544,545,-41,-40,-254,-311,547,-307,-209,-208,-210,-212,-51,-50,-306,-299,-337,568,-46,-49,-308,-300,-337,574,-48,-47,-309,577,]),'STRUCT':([0,1,3,7,10,11,13,14,16,17,19,20,21,25,26,27,29,30,38,39,40,42,45,47,48,52,53,55,58,59,61,62,63,64,65,66,67,75,85,86,87,90,91,93,94,95,97,99,105,118,119,120,121,122,123,124,129,172,174,180,181,182,184,185,186,188,189,190,191,198,200,214,223,229,231,233,239,240,241,267,278,284,285,286,289,291,298,300,301,302,303,305,308,312,313,315,318,332,340,341,342,350,422,424,425,427,428,432,435,437,438,439,446,453,454,460,496,497,500,505,506,510,511,512,536,554,555,557,558,575,576,578,579,],[24,-337,-128,-106,-104,-107,-105,-64,-60,-67,-66,-109,24,-65,-102,-337,-131,-108,-63,-129,24,-29,-62,-70,-52,-337,-337,-337,-130,24,-71,-103,-337,-9,-131,-91,-10,24,24,-53,-337,-88,24,24,-93,24,-335,24,-182,24,-87,-90,-94,-92,-61,-72,24,24,24,-73,24,-89,24,24,24,-159,-160,-156,-336,-183,-30,24,-74,24,24,24,24,-174,-175,24,24,-76,-79,-82,-75,-77,24,-81,-215,-214,-80,-216,-78,-127,24,24,-157,-69,-36,-35,24,24,24,-234,-233,24,-231,-217,-230,-81,-84,-218,-158,-31,-34,24,-229,-232,-221,-83,-219,-68,-33,-32,-220,-225,-224,-222,-84,-226,-223,-228,-227,]),'LONG':([0,1,2,3,4,5,6,7,10,11,12,13,14,16,17,18,19,20,21,22,23,25,26,27,29,30,33,34,36,38,39,40,42,43,44,45,46,47,48,49,50,52,53,54,55,56,58,59,60,61,62,63,64,65,66,67,68,71,75,76,80,81,82,85,86,87,89,90,91,93,94,95,96,97,98,99,100,101,105,109,111,118,119,120,121,122,123,124,129,142,147,172,174,177,180,181,182,184,185,186,187,188,189,190,191,192,198,200,211,214,223,229,231,233,239,240,241,267,269,275,278,279,280,284,285,286,289,291,298,300,301,302,303,305,308,312,313,314,315,316,317,318,328,332,340,341,342,350,422,424,425,427,428,432,435,437,438,439,442,443,446,448,449,453,454,460,496,497,500,505,506,510,511,512,536,554,555,557,558,575,576,578,579,],[23,-337,-113,-128,23,-124,-110,-106,-104,-107,-125,-105,-64,-60,-67,-99,-66,-109,23,-120,-115,-65,-102,-126,-131,-108,-238,-111,-122,-63,-129,23,-29,-121,-116,-62,-112,-70,-52,-123,-117,-337,-337,-119,-337,-114,-130,23,-118,-71,-103,-337,-9,-131,-91,-10,-96,-98,23,-131,-95,-101,-97,23,-53,-126,23,-88,23,23,-93,23,-147,-335,-146,23,-167,-166,-182,-100,-126,23,-87,-90,-94,-92,-61,-72,23,-144,-142,23,23,23,-73,23,-89,23,23,23,-149,-159,-160,-156,-336,23,-183,-30,23,23,-74,23,23,23,23,-174,-175,23,-143,-140,23,-141,-145,-76,-79,-82,-75,-77,23,-81,-215,-214,-80,-216,-78,-127,23,-153,23,-151,-148,-157,-168,-69,-36,-35,23,23,23,-234,-233,23,-231,-217,-230,-81,-84,-218,-152,-150,-158,-170,-169,-31,-34,23,-229,-232,-221,-83,-219,-68,-33,-32,-220,-225,-224,-222,-84,-226,-223,-228,-227,]),'PLUS':([3,39,58,61,76,85,97,103,105,106,116,117,119,124,128,131,132,133,134,135,136,137,138,139,140,141,143,144,145,146,148,149,150,151,152,153,154,156,158,160,161,162,163,164,165,166,167,168,169,171,173,174,175,176,181,191,198,201,204,205,206,218,219,220,224,227,229,230,231,232,233,234,235,236,237,238,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,261,263,265,266,268,273,282,284,285,286,289,290,291,297,298,300,301,302,303,305,307,308,310,319,329,332,336,338,339,352,353,354,357,358,359,360,361,362,363,364,365,366,367,368,369,373,375,377,383,384,385,386,387,388,389,390,391,392,393,394,395,396,397,398,400,401,402,403,404,405,407,411,412,413,419,421,424,425,427,428,429,430,432,434,435,437,438,439,440,441,447,459,472,475,477,478,480,481,482,483,484,487,488,494,496,497,499,500,502,505,506,510,513,514,515,521,522,533,535,536,537,538,539,541,542,543,547,549,550,551,553,554,555,557,558,565,566,569,574,575,576,577,578,579,],[-128,-129,-130,-71,-131,137,-335,-28,-182,-27,137,-337,-87,-72,-337,137,-317,-321,-318,-286,-303,-285,-324,-330,-313,-319,-301,-274,-314,137,-327,137,-283,-287,-325,-304,-322,-302,-255,-315,-289,249,-328,-316,-288,-329,-320,-276,-323,137,-284,137,137,-312,137,-336,-183,137,137,-28,-337,137,-28,-337,-274,-337,137,-326,137,-280,137,-277,-334,-332,-331,-333,137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,137,-298,-297,137,137,-279,-278,-337,-76,-79,-82,-75,137,-77,137,137,-81,-215,-214,-80,-216,137,-78,-312,137,137,-69,-284,137,137,-284,137,137,-244,-247,-245,-241,-242,-246,-248,137,-250,-251,-243,-249,-12,137,137,-11,249,249,249,-260,249,249,249,-259,249,249,-257,-256,249,249,249,249,249,-258,-296,-295,-294,-293,-292,-305,137,137,137,137,-234,-233,137,-231,137,137,-217,137,-230,137,-84,-218,137,137,137,-337,-337,-198,137,-281,-282,137,-290,-291,137,-275,-337,-284,-229,-232,137,-221,137,-83,-219,-68,137,-28,-337,137,-11,137,137,-220,137,137,137,-284,137,137,-306,137,-337,-299,137,-225,-224,-222,-84,-300,137,137,137,-226,-223,137,-228,-227,]),'ELLIPSIS':([350,],[462,]),'U32STRING_LITERAL':([3,39,58,61,76,85,97,103,105,106,116,117,119,124,128,131,135,137,139,146,148,149,150,151,153,163,165,166,171,173,174,175,181,191,198,201,204,205,206,218,219,220,227,229,231,233,235,236,237,238,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,265,266,282,284,285,286,289,290,291,297,298,300,301,302,303,305,307,308,319,329,332,336,338,339,352,353,354,357,358,359,360,361,362,363,364,365,366,367,368,369,373,375,377,412,413,419,421,424,425,427,428,429,430,432,434,435,437,438,439,440,441,447,459,472,475,477,481,484,488,494,496,497,499,500,502,505,506,510,513,514,515,521,522,533,535,536,537,538,539,541,542,543,549,550,553,554,555,557,558,566,569,574,575,576,577,578,579,],[-128,-129,-130,-71,-131,139,-335,-28,-182,-27,139,-337,-87,-72,-337,139,-286,-285,-330,139,-327,139,-283,-287,235,-328,-288,-329,139,-284,139,139,139,-336,-183,139,139,-28,-337,139,-28,-337,-337,139,139,139,-334,-332,-331,-333,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,-337,-76,-79,-82,-75,139,-77,139,139,-81,-215,-214,-80,-216,139,-78,139,139,-69,-284,139,139,-284,139,139,-244,-247,-245,-241,-242,-246,-248,139,-250,-251,-243,-249,-12,139,139,-11,139,139,139,139,-234,-233,139,-231,139,139,-217,139,-230,139,-84,-218,139,139,139,-337,-337,-198,139,139,139,-337,-284,-229,-232,139,-221,139,-83,-219,-68,139,-28,-337,139,-11,139,139,-220,139,139,139,-284,139,139,139,-337,139,-225,-224,-222,-84,139,139,139,-226,-223,139,-228,-227,]),'GT':([132,133,134,136,138,139,140,141,143,144,145,148,152,153,154,156,158,160,161,162,163,164,166,167,168,169,176,191,224,230,232,234,235,236,237,238,261,263,268,273,310,383,384,385,386,387,388,389,390,391,392,393,394,395,396,397,398,400,401,402,403,404,405,407,411,478,480,482,483,487,547,551,565,],[-317,-321,-318,-303,-324,-330,-313,-319,-301,-274,-314,-327,-325,-304,-322,-302,-255,-315,-289,250,-328,-316,-329,-320,-276,-323,-312,-336,-274,-326,-280,-277,-334,-332,-331,-333,-298,-297,-279,-278,-312,-261,250,-262,-260,-264,250,-263,-259,-266,250,-257,-256,-265,250,250,250,250,-258,-296,-295,-294,-293,-292,-305,-281,-282,-290,-291,-275,-306,-299,-300,]),'GOTO':([61,97,119,124,181,191,284,285,286,289,291,298,300,301,302,303,305,307,308,332,424,425,428,429,432,435,437,438,439,440,496,497,500,502,505,506,510,535,536,537,539,554,555,557,558,569,574,575,576,577,578,579,],[-71,-335,-87,-72,287,-336,-76,-79,-82,-75,-77,287,-81,-215,-214,-80,-216,287,-78,-69,-234,-233,-231,287,-217,-230,287,-84,-218,287,-229,-232,-221,287,-83,-219,-68,287,-220,287,287,-225,-224,-222,-84,287,287,-226,-223,287,-228,-227,]),'ENUM':([0,1,3,7,10,11,13,14,16,17,19,20,21,25,26,27,29,30,38,39,40,42,45,47,48,52,53,55,58,59,61,62,63,64,65,66,67,75,85,86,87,90,91,93,94,95,97,99,105,118,119,120,121,122,123,124,129,172,174,180,181,182,184,185,186,188,189,190,191,198,200,214,223,229,231,233,239,240,241,267,278,284,285,286,289,291,298,300,301,302,303,305,308,312,313,315,318,332,340,341,342,350,422,424,425,427,428,432,435,437,438,439,446,453,454,460,496,497,500,505,506,510,511,512,536,554,555,557,558,575,576,578,579,],[32,-337,-128,-106,-104,-107,-105,-64,-60,-67,-66,-109,32,-65,-102,-337,-131,-108,-63,-129,32,-29,-62,-70,-52,-337,-337,-337,-130,32,-71,-103,-337,-9,-131,-91,-10,32,32,-53,-337,-88,32,32,-93,32,-335,32,-182,32,-87,-90,-94,-92,-61,-72,32,32,32,-73,32,-89,32,32,32,-159,-160,-156,-336,-183,-30,32,-74,32,32,32,32,-174,-175,32,32,-76,-79,-82,-75,-77,32,-81,-215,-214,-80,-216,-78,-127,32,32,-157,-69,-36,-35,32,32,32,-234,-233,32,-231,-217,-230,-81,-84,-218,-158,-31,-34,32,-229,-232,-221,-83,-219,-68,-33,-32,-220,-225,-224,-222,-84,-226,-223,-228,-227,]),'PERIOD':([97,132,133,134,136,138,139,140,141,143,145,148,152,153,154,156,160,161,163,164,166,167,168,169,176,191,227,230,235,236,237,238,261,263,310,371,376,402,403,404,405,407,411,470,472,474,482,483,488,520,526,527,547,550,551,563,565,572,],[-335,-317,-321,-318,-303,-324,-330,-313,-319,-301,-314,-327,-325,-304,-322,-302,-315,-289,-328,-316,-329,-320,264,-323,-312,-336,372,-326,-334,-332,-331,-333,-298,-297,-312,-199,372,-296,-295,-294,-293,-292,-305,-202,372,-200,-290,-291,372,-201,548,-307,-306,372,-299,-308,-300,-309,]),'GE':([132,133,134,136,138,139,140,141,143,144,145,148,152,153,154,156,158,160,161,162,163,164,166,167,168,169,176,191,224,230,232,234,235,236,237,238,261,263,268,273,310,383,384,385,386,387,388,389,390,391,392,393,394,395,396,397,398,400,401,402,403,404,405,407,411,478,480,482,483,487,547,551,565,],[-317,-321,-318,-303,-324,-330,-313,-319,-301,-274,-314,-327,-325,-304,-322,-302,-255,-315,-289,254,-328,-316,-329,-320,-276,-323,-312,-336,-274,-326,-280,-277,-334,-332,-331,-333,-298,-297,-279,-278,-312,-261,254,-262,-260,-264,254,-263,-259,-266,254,-257,-256,-265,254,254,254,254,-258,-296,-295,-294,-293,-292,-305,-281,-282,-290,-291,-275,-306,-299,-300,]),'INT_CONST_DEC':([3,39,58,61,76,85,97,103,105,106,116,117,119,124,128,131,135,137,146,149,150,151,165,171,173,174,175,181,191,198,201,204,205,206,218,219,220,227,229,231,233,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,265,266,282,284,285,286,289,290,291,297,298,300,301,302,303,305,307,308,319,329,332,336,338,339,352,353,354,357,358,359,360,361,362,363,364,365,366,367,368,369,373,375,377,412,413,419,421,424,425,427,428,429,430,432,434,435,437,438,439,440,441,447,459,472,475,477,481,484,488,494,496,497,499,500,502,505,506,510,513,514,515,521,522,533,535,536,537,538,539,541,542,543,549,550,553,554,555,557,558,566,569,574,575,576,577,578,579,],[-128,-129,-130,-71,-131,140,-335,-28,-182,-27,140,-337,-87,-72,-337,140,-286,-285,140,140,-283,-287,-288,140,-284,140,140,140,-336,-183,140,140,-28,-337,140,-28,-337,-337,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,140,-337,-76,-79,-82,-75,140,-77,140,140,-81,-215,-214,-80,-216,140,-78,140,140,-69,-284,140,140,-284,140,140,-244,-247,-245,-241,-242,-246,-248,140,-250,-251,-243,-249,-12,140,140,-11,140,140,140,140,-234,-233,140,-231,140,140,-217,140,-230,140,-84,-218,140,140,140,-337,-337,-198,140,140,140,-337,-284,-229,-232,140,-221,140,-83,-219,-68,140,-28,-337,140,-11,140,140,-220,140,140,140,-284,140,140,140,-337,140,-225,-224,-222,-84,140,140,140,-226,-223,140,-228,-227,]),'ARROW':([132,133,134,136,138,139,140,141,143,145,148,152,153,154,156,160,161,163,164,166,167,168,169,176,191,230,235,236,237,238,261,263,310,402,403,404,405,407,411,482,483,547,551,565,],[-317,-321,-318,-303,-324,-330,-313,-319,-301,-314,-327,-325,-304,-322,-302,-315,-289,-328,-316,-329,-320,262,-323,-312,-336,-326,-334,-332,-331,-333,-298,-297,-312,-296,-295,-294,-293,-292,-305,-290,-291,-306,-299,-300,]),'_STATIC_ASSERT':([0,14,16,17,19,25,38,45,47,59,61,97,119,123,124,180,181,191,223,284,285,286,289,291,298,300,301,302,303,305,307,308,332,424,425,428,429,432,435,437,438,439,440,496,497,500,502,505,506,510,535,536,537,539,554,555,557,558,569,574,575,576,577,578,579,],[41,-64,-60,-67,-66,-65,-63,-62,-70,41,-71,-335,-87,-61,-72,-73,41,-336,-74,-76,-79,-82,-75,-77,41,-81,-215,-214,-80,-216,41,-78,-69,-234,-233,-231,41,-217,-230,41,-84,-218,41,-229,-232,-221,41,-83,-219,-68,41,-220,41,41,-225,-224,-222,-84,41,41,-226,-223,41,-228,-227,]),'CHAR':([0,1,2,3,4,5,6,7,10,11,12,13,14,16,17,18,19,20,21,22,23,25,26,27,29,30,33,34,36,38,39,40,42,43,44,45,46,47,48,49,50,52,53,54,55,56,58,59,60,61,62,63,64,65,66,67,68,71,75,76,80,81,82,85,86,87,89,90,91,93,94,95,96,97,98,99,100,101,105,109,111,118,119,120,121,122,123,124,129,142,147,172,174,177,180,181,182,184,185,186,187,188,189,190,191,192,198,200,211,214,223,229,231,233,239,240,241,267,269,275,278,279,280,284,285,286,289,291,298,300,301,302,303,305,308,312,313,314,315,316,317,318,328,332,340,341,342,350,422,424,425,427,428,432,435,437,438,439,442,443,446,448,449,453,454,460,496,497,500,505,506,510,511,512,536,554,555,557,558,575,576,578,579,],[46,-337,-113,-128,46,-124,-110,-106,-104,-107,-125,-105,-64,-60,-67,-99,-66,-109,46,-120,-115,-65,-102,-126,-131,-108,-238,-111,-122,-63,-129,46,-29,-121,-116,-62,-112,-70,-52,-123,-117,-337,-337,-119,-337,-114,-130,46,-118,-71,-103,-337,-9,-131,-91,-10,-96,-98,46,-131,-95,-101,-97,46,-53,-126,46,-88,46,46,-93,46,-147,-335,-146,46,-167,-166,-182,-100,-126,46,-87,-90,-94,-92,-61,-72,46,-144,-142,46,46,46,-73,46,-89,46,46,46,-149,-159,-160,-156,-336,46,-183,-30,46,46,-74,46,46,46,46,-174,-175,46,-143,-140,46,-141,-145,-76,-79,-82,-75,-77,46,-81,-215,-214,-80,-216,-78,-127,46,-153,46,-151,-148,-157,-168,-69,-36,-35,46,46,46,-234,-233,46,-231,-217,-230,-81,-84,-218,-152,-150,-158,-170,-169,-31,-34,46,-229,-232,-221,-83,-219,-68,-33,-32,-220,-225,-224,-222,-84,-226,-223,-228,-227,]),'HEX_FLOAT_CONST':([3,39,58,61,76,85,97,103,105,106,116,117,119,124,128,131,135,137,146,149,150,151,165,171,173,174,175,181,191,198,201,204,205,206,218,219,220,227,229,231,233,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,265,266,282,284,285,286,289,290,291,297,298,300,301,302,303,305,307,308,319,329,332,336,338,339,352,353,354,357,358,359,360,361,362,363,364,365,366,367,368,369,373,375,377,412,413,419,421,424,425,427,428,429,430,432,434,435,437,438,439,440,441,447,459,472,475,477,481,484,488,494,496,497,499,500,502,505,506,510,513,514,515,521,522,533,535,536,537,538,539,541,542,543,549,550,553,554,555,557,558,566,569,574,575,576,577,578,579,],[-128,-129,-130,-71,-131,141,-335,-28,-182,-27,141,-337,-87,-72,-337,141,-286,-285,141,141,-283,-287,-288,141,-284,141,141,141,-336,-183,141,141,-28,-337,141,-28,-337,-337,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,-337,-76,-79,-82,-75,141,-77,141,141,-81,-215,-214,-80,-216,141,-78,141,141,-69,-284,141,141,-284,141,141,-244,-247,-245,-241,-242,-246,-248,141,-250,-251,-243,-249,-12,141,141,-11,141,141,141,141,-234,-233,141,-231,141,141,-217,141,-230,141,-84,-218,141,141,141,-337,-337,-198,141,141,141,-337,-284,-229,-232,141,-221,141,-83,-219,-68,141,-28,-337,141,-11,141,141,-220,141,141,141,-284,141,141,141,-337,141,-225,-224,-222,-84,141,141,141,-226,-223,141,-228,-227,]),'DOUBLE':([0,1,2,3,4,5,6,7,10,11,12,13,14,16,17,18,19,20,21,22,23,25,26,27,29,30,33,34,36,38,39,40,42,43,44,45,46,47,48,49,50,52,53,54,55,56,58,59,60,61,62,63,64,65,66,67,68,71,75,76,80,81,82,85,86,87,89,90,91,93,94,95,96,97,98,99,100,101,105,109,111,118,119,120,121,122,123,124,129,142,147,172,174,177,180,181,182,184,185,186,187,188,189,190,191,192,198,200,211,214,223,229,231,233,239,240,241,267,269,275,278,279,280,284,285,286,289,291,298,300,301,302,303,305,308,312,313,314,315,316,317,318,328,332,340,341,342,350,422,424,425,427,428,432,435,437,438,439,442,443,446,448,449,453,454,460,496,497,500,505,506,510,511,512,536,554,555,557,558,575,576,578,579,],[50,-337,-113,-128,50,-124,-110,-106,-104,-107,-125,-105,-64,-60,-67,-99,-66,-109,50,-120,-115,-65,-102,-126,-131,-108,-238,-111,-122,-63,-129,50,-29,-121,-116,-62,-112,-70,-52,-123,-117,-337,-337,-119,-337,-114,-130,50,-118,-71,-103,-337,-9,-131,-91,-10,-96,-98,50,-131,-95,-101,-97,50,-53,-126,50,-88,50,50,-93,50,-147,-335,-146,50,-167,-166,-182,-100,-126,50,-87,-90,-94,-92,-61,-72,50,-144,-142,50,50,50,-73,50,-89,50,50,50,-149,-159,-160,-156,-336,50,-183,-30,50,50,-74,50,50,50,50,-174,-175,50,-143,-140,50,-141,-145,-76,-79,-82,-75,-77,50,-81,-215,-214,-80,-216,-78,-127,50,-153,50,-151,-148,-157,-168,-69,-36,-35,50,50,50,-234,-233,50,-231,-217,-230,-81,-84,-218,-152,-150,-158,-170,-169,-31,-34,50,-229,-232,-221,-83,-219,-68,-33,-32,-220,-225,-224,-222,-84,-226,-223,-228,-227,]),'MINUSEQUAL':([132,133,134,136,138,139,140,141,143,144,145,148,152,153,154,156,160,161,163,164,166,167,168,169,176,191,224,230,232,234,235,236,237,238,261,263,268,273,310,402,403,404,405,407,411,478,480,482,483,487,547,551,565,],[-317,-321,-318,-303,-324,-330,-313,-319,-301,-274,-314,-327,-325,-304,-322,-302,-315,-289,-328,-316,-329,-320,-276,-323,-312,-336,358,-326,-280,-277,-334,-332,-331,-333,-298,-297,-279,-278,-312,-296,-295,-294,-293,-292,-305,-281,-282,-290,-291,-275,-306,-299,-300,]),'INT_CONST_OCT':([3,39,58,61,76,85,97,103,105,106,116,117,119,124,128,131,135,137,146,149,150,151,165,171,173,174,175,181,191,198,201,204,205,206,218,219,220,227,229,231,233,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,265,266,282,284,285,286,289,290,291,297,298,300,301,302,303,305,307,308,319,329,332,336,338,339,352,353,354,357,358,359,360,361,362,363,364,365,366,367,368,369,373,375,377,412,413,419,421,424,425,427,428,429,430,432,434,435,437,438,439,440,441,447,459,472,475,477,481,484,488,494,496,497,499,500,502,505,506,510,513,514,515,521,522,533,535,536,537,538,539,541,542,543,549,550,553,554,555,557,558,566,569,574,575,576,577,578,579,],[-128,-129,-130,-71,-131,145,-335,-28,-182,-27,145,-337,-87,-72,-337,145,-286,-285,145,145,-283,-287,-288,145,-284,145,145,145,-336,-183,145,145,-28,-337,145,-28,-337,-337,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,-337,-76,-79,-82,-75,145,-77,145,145,-81,-215,-214,-80,-216,145,-78,145,145,-69,-284,145,145,-284,145,145,-244,-247,-245,-241,-242,-246,-248,145,-250,-251,-243,-249,-12,145,145,-11,145,145,145,145,-234,-233,145,-231,145,145,-217,145,-230,145,-84,-218,145,145,145,-337,-337,-198,145,145,145,-337,-284,-229,-232,145,-221,145,-83,-219,-68,145,-28,-337,145,-11,145,145,-220,145,145,145,-284,145,145,145,-337,145,-225,-224,-222,-84,145,145,145,-226,-223,145,-228,-227,]),'TIMESEQUAL':([132,133,134,136,138,139,140,141,143,144,145,148,152,153,154,156,160,161,163,164,166,167,168,169,176,191,224,230,232,234,235,236,237,238,261,263,268,273,310,402,403,404,405,407,411,478,480,482,483,487,547,551,565,],[-317,-321,-318,-303,-324,-330,-313,-319,-301,-274,-314,-327,-325,-304,-322,-302,-315,-289,-328,-316,-329,-320,-276,-323,-312,-336,367,-326,-280,-277,-334,-332,-331,-333,-298,-297,-279,-278,-312,-296,-295,-294,-293,-292,-305,-281,-282,-290,-291,-275,-306,-299,-300,]),'OR':([132,133,134,136,138,139,140,141,143,144,145,148,152,153,154,156,158,160,161,162,163,164,166,167,168,169,176,191,224,230,232,234,235,236,237,238,261,263,268,273,310,383,384,385,386,387,388,389,390,391,392,393,394,395,396,397,398,400,401,402,403,404,405,407,411,478,480,482,483,487,547,551,565,],[-317,-321,-318,-303,-324,-330,-313,-319,-301,-274,-314,-327,-325,-304,-322,-302,-255,-315,-289,259,-328,-316,-329,-320,-276,-323,-312,-336,-274,-326,-280,-277,-334,-332,-331,-333,-298,-297,-279,-278,-312,-261,259,-262,-260,-264,-268,-263,-259,-266,-271,-257,-256,-265,259,-267,-269,-270,-258,-296,-295,-294,-293,-292,-305,-281,-282,-290,-291,-275,-306,-299,-300,]),'SHORT':([0,1,2,3,4,5,6,7,10,11,12,13,14,16,17,18,19,20,21,22,23,25,26,27,29,30,33,34,36,38,39,40,42,43,44,45,46,47,48,49,50,52,53,54,55,56,58,59,60,61,62,63,64,65,66,67,68,71,75,76,80,81,82,85,86,87,89,90,91,93,94,95,96,97,98,99,100,101,105,109,111,118,119,120,121,122,123,124,129,142,147,172,174,177,180,181,182,184,185,186,187,188,189,190,191,192,198,200,211,214,223,229,231,233,239,240,241,267,269,275,278,279,280,284,285,286,289,291,298,300,301,302,303,305,308,312,313,314,315,316,317,318,328,332,340,341,342,350,422,424,425,427,428,432,435,437,438,439,442,443,446,448,449,453,454,460,496,497,500,505,506,510,511,512,536,554,555,557,558,575,576,578,579,],[2,-337,-113,-128,2,-124,-110,-106,-104,-107,-125,-105,-64,-60,-67,-99,-66,-109,2,-120,-115,-65,-102,-126,-131,-108,-238,-111,-122,-63,-129,2,-29,-121,-116,-62,-112,-70,-52,-123,-117,-337,-337,-119,-337,-114,-130,2,-118,-71,-103,-337,-9,-131,-91,-10,-96,-98,2,-131,-95,-101,-97,2,-53,-126,2,-88,2,2,-93,2,-147,-335,-146,2,-167,-166,-182,-100,-126,2,-87,-90,-94,-92,-61,-72,2,-144,-142,2,2,2,-73,2,-89,2,2,2,-149,-159,-160,-156,-336,2,-183,-30,2,2,-74,2,2,2,2,-174,-175,2,-143,-140,2,-141,-145,-76,-79,-82,-75,-77,2,-81,-215,-214,-80,-216,-78,-127,2,-153,2,-151,-148,-157,-168,-69,-36,-35,2,2,2,-234,-233,2,-231,-217,-230,-81,-84,-218,-152,-150,-158,-170,-169,-31,-34,2,-229,-232,-221,-83,-219,-68,-33,-32,-220,-225,-224,-222,-84,-226,-223,-228,-227,]),'RETURN':([61,97,119,124,181,191,284,285,286,289,291,298,300,301,302,303,305,307,308,332,424,425,428,429,432,435,437,438,439,440,496,497,500,502,505,506,510,535,536,537,539,554,555,557,558,569,574,575,576,577,578,579,],[-71,-335,-87,-72,290,-336,-76,-79,-82,-75,-77,290,-81,-215,-214,-80,-216,290,-78,-69,-234,-233,-231,290,-217,-230,290,-84,-218,290,-229,-232,-221,290,-83,-219,-68,290,-220,290,290,-225,-224,-222,-84,290,290,-226,-223,290,-228,-227,]),'RSHIFTEQUAL':([132,133,134,136,138,139,140,141,143,144,145,148,152,153,154,156,160,161,163,164,166,167,168,169,176,191,224,230,232,234,235,236,237,238,261,263,268,273,310,402,403,404,405,407,411,478,480,482,483,487,547,551,565,],[-317,-321,-318,-303,-324,-330,-313,-319,-301,-274,-314,-327,-325,-304,-322,-302,-315,-289,-328,-316,-329,-320,-276,-323,-312,-336,368,-326,-280,-277,-334,-332,-331,-333,-298,-297,-279,-278,-312,-296,-295,-294,-293,-292,-305,-281,-282,-290,-291,-275,-306,-299,-300,]),'_ALIGNAS':([0,1,2,3,4,5,6,7,10,11,12,13,14,16,17,18,19,20,21,22,23,25,26,27,29,30,33,34,36,38,39,42,43,44,45,46,47,48,49,50,52,53,54,55,56,58,59,60,61,62,63,65,68,71,75,76,80,81,82,85,86,87,89,90,93,95,96,97,98,99,100,101,109,111,118,119,123,124,129,142,147,174,177,180,181,182,184,185,186,187,188,189,190,191,192,200,211,223,229,231,233,239,240,241,267,269,275,278,279,280,284,285,286,289,291,298,300,301,302,303,305,308,312,313,314,315,316,317,318,328,332,340,341,342,350,422,424,425,427,428,432,435,437,438,439,442,443,446,448,449,453,454,460,496,497,500,505,506,510,511,512,536,554,555,557,558,575,576,578,579,],[8,8,-113,-128,8,-124,-110,-106,-104,-107,-125,-105,-64,-60,-67,-99,-66,-109,8,-120,-115,-65,-102,8,-131,-108,-238,-111,-122,-63,-129,-29,-121,-116,-62,-112,-70,-52,-123,-117,8,8,-119,8,-114,-130,8,-118,-71,-103,8,-131,-96,-98,8,-131,-95,-101,-97,8,-53,8,8,-88,8,8,-147,-335,-146,8,-167,-166,-100,-126,8,-87,-61,-72,8,-144,-142,8,8,-73,8,-89,8,8,8,-149,-159,-160,-156,-336,8,-30,8,-74,8,8,8,8,-174,-175,8,-143,-140,8,-141,-145,-76,-79,-82,-75,-77,8,-81,-215,-214,-80,-216,-78,-127,8,-153,8,-151,-148,-157,-168,-69,-36,-35,8,8,8,-234,-233,8,-231,-217,-230,-81,-84,-218,-152,-150,-158,-170,-169,-31,-34,8,-229,-232,-221,-83,-219,-68,-33,-32,-220,-225,-224,-222,-84,-226,-223,-228,-227,]),'RESTRICT':([0,1,2,3,4,5,6,7,10,11,12,13,14,16,17,18,19,20,21,22,23,25,26,27,29,30,33,34,35,36,38,39,42,43,44,45,46,47,48,49,50,52,53,54,55,56,58,59,60,61,62,63,65,68,71,75,76,80,81,82,85,86,87,89,90,93,95,96,97,98,99,100,101,103,105,109,111,117,118,119,123,124,128,129,142,147,172,174,177,180,181,182,184,185,186,187,188,189,190,191,192,198,200,205,206,211,219,220,223,229,231,233,239,240,241,267,269,275,278,279,280,282,284,285,286,289,291,298,300,301,302,303,305,308,312,313,314,315,316,317,318,328,332,340,341,342,350,422,424,425,427,428,432,435,437,438,439,442,443,446,448,449,453,454,459,460,496,497,500,505,506,510,511,512,514,515,536,554,555,557,558,575,576,578,579,],[39,39,-113,-128,39,-124,-110,-106,-104,-107,-125,-105,-64,-60,-67,-99,-66,-109,39,-120,-115,-65,-102,39,-131,-108,-238,-111,39,-122,-63,-129,-29,-121,-116,-62,-112,-70,-52,-123,-117,39,39,-119,39,-114,-130,39,-118,-71,-103,39,-131,-96,-98,39,-131,-95,-101,-97,39,-53,39,39,-88,39,39,-147,-335,-146,39,-167,-166,39,-182,-100,-126,39,39,-87,-61,-72,39,39,-144,-142,39,39,39,-73,39,-89,39,39,39,-149,-159,-160,-156,-336,39,-183,-30,39,39,39,39,39,-74,39,39,39,39,-174,-175,39,-143,-140,39,-141,-145,39,-76,-79,-82,-75,-77,39,-81,-215,-214,-80,-216,-78,-127,39,-153,39,-151,-148,-157,-168,-69,-36,-35,39,39,39,-234,-233,39,-231,-217,-230,-81,-84,-218,-152,-150,-158,-170,-169,-31,-34,39,39,-229,-232,-221,-83,-219,-68,-33,-32,39,39,-220,-225,-224,-222,-84,-226,-223,-228,-227,]),'STATIC':([0,1,2,3,4,5,6,7,10,11,12,13,14,16,17,18,19,20,21,22,23,25,26,27,29,30,33,34,36,38,39,42,43,44,45,46,47,48,49,50,52,53,54,55,56,58,59,60,61,62,63,65,68,71,75,76,80,81,82,86,87,89,90,93,96,97,98,100,101,105,109,111,117,118,119,123,124,128,129,180,181,182,187,191,198,200,205,211,219,223,240,241,278,284,285,286,289,291,298,300,301,302,303,305,308,312,314,316,317,328,332,340,341,342,350,422,424,425,427,428,432,435,437,438,439,442,443,448,449,453,454,459,460,496,497,500,505,506,510,511,512,514,536,554,555,557,558,575,576,578,579,],[10,10,-113,-128,10,-124,-110,-106,-104,-107,-125,-105,-64,-60,-67,-99,-66,-109,10,-120,-115,-65,-102,10,-131,-108,-238,-111,-122,-63,-129,-29,-121,-116,-62,-112,-70,-52,-123,-117,10,10,-119,10,-114,-130,10,-118,-71,-103,10,-131,-96,-98,10,-131,-95,-101,-97,-53,10,10,-88,10,-147,-335,-146,-167,-166,-182,-100,-126,206,10,-87,-61,-72,220,10,-73,10,-89,-149,-336,-183,-30,338,10,353,-74,-174,-175,10,-76,-79,-82,-75,-77,10,-81,-215,-214,-80,-216,-78,-127,-153,-151,-148,-168,-69,-36,-35,10,10,10,-234,-233,10,-231,-217,-230,-81,-84,-218,-152,-150,-170,-169,-31,-34,515,10,-229,-232,-221,-83,-219,-68,-33,-32,542,-220,-225,-224,-222,-84,-226,-223,-228,-227,]),'SIZEOF':([3,39,58,61,76,85,97,103,105,106,116,117,119,124,128,131,135,137,146,149,150,151,165,171,173,174,175,181,191,198,201,204,205,206,218,219,220,227,229,231,233,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,265,266,282,284,285,286,289,290,291,297,298,300,301,302,303,305,307,308,319,329,332,336,338,339,352,353,354,357,358,359,360,361,362,363,364,365,366,367,368,369,373,375,377,412,413,419,421,424,425,427,428,429,430,432,434,435,437,438,439,440,441,447,459,472,475,477,481,484,488,494,496,497,499,500,502,505,506,510,513,514,515,521,522,533,535,536,537,538,539,541,542,543,549,550,553,554,555,557,558,566,569,574,575,576,577,578,579,],[-128,-129,-130,-71,-131,146,-335,-28,-182,-27,146,-337,-87,-72,-337,146,-286,-285,146,146,-283,-287,-288,146,-284,146,146,146,-336,-183,146,146,-28,-337,146,-28,-337,-337,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,-337,-76,-79,-82,-75,146,-77,146,146,-81,-215,-214,-80,-216,146,-78,146,146,-69,-284,146,146,-284,146,146,-244,-247,-245,-241,-242,-246,-248,146,-250,-251,-243,-249,-12,146,146,-11,146,146,146,146,-234,-233,146,-231,146,146,-217,146,-230,146,-84,-218,146,146,146,-337,-337,-198,146,146,146,-337,-284,-229,-232,146,-221,146,-83,-219,-68,146,-28,-337,146,-11,146,146,-220,146,146,146,-284,146,146,146,-337,146,-225,-224,-222,-84,146,146,146,-226,-223,146,-228,-227,]),'UNSIGNED':([0,1,2,3,4,5,6,7,10,11,12,13,14,16,17,18,19,20,21,22,23,25,26,27,29,30,33,34,36,38,39,40,42,43,44,45,46,47,48,49,50,52,53,54,55,56,58,59,60,61,62,63,64,65,66,67,68,71,75,76,80,81,82,85,86,87,89,90,91,93,94,95,96,97,98,99,100,101,105,109,111,118,119,120,121,122,123,124,129,142,147,172,174,177,180,181,182,184,185,186,187,188,189,190,191,192,198,200,211,214,223,229,231,233,239,240,241,267,269,275,278,279,280,284,285,286,289,291,298,300,301,302,303,305,308,312,313,314,315,316,317,318,328,332,340,341,342,350,422,424,425,427,428,432,435,437,438,439,442,443,446,448,449,453,454,460,496,497,500,505,506,510,511,512,536,554,555,557,558,575,576,578,579,],[22,-337,-113,-128,22,-124,-110,-106,-104,-107,-125,-105,-64,-60,-67,-99,-66,-109,22,-120,-115,-65,-102,-126,-131,-108,-238,-111,-122,-63,-129,22,-29,-121,-116,-62,-112,-70,-52,-123,-117,-337,-337,-119,-337,-114,-130,22,-118,-71,-103,-337,-9,-131,-91,-10,-96,-98,22,-131,-95,-101,-97,22,-53,-126,22,-88,22,22,-93,22,-147,-335,-146,22,-167,-166,-182,-100,-126,22,-87,-90,-94,-92,-61,-72,22,-144,-142,22,22,22,-73,22,-89,22,22,22,-149,-159,-160,-156,-336,22,-183,-30,22,22,-74,22,22,22,22,-174,-175,22,-143,-140,22,-141,-145,-76,-79,-82,-75,-77,22,-81,-215,-214,-80,-216,-78,-127,22,-153,22,-151,-148,-157,-168,-69,-36,-35,22,22,22,-234,-233,22,-231,-217,-230,-81,-84,-218,-152,-150,-158,-170,-169,-31,-34,22,-229,-232,-221,-83,-219,-68,-33,-32,-220,-225,-224,-222,-84,-226,-223,-228,-227,]),'UNION':([0,1,3,7,10,11,13,14,16,17,19,20,21,25,26,27,29,30,38,39,40,42,45,47,48,52,53,55,58,59,61,62,63,64,65,66,67,75,85,86,87,90,91,93,94,95,97,99,105,118,119,120,121,122,123,124,129,172,174,180,181,182,184,185,186,188,189,190,191,198,200,214,223,229,231,233,239,240,241,267,278,284,285,286,289,291,298,300,301,302,303,305,308,312,313,315,318,332,340,341,342,350,422,424,425,427,428,432,435,437,438,439,446,453,454,460,496,497,500,505,506,510,511,512,536,554,555,557,558,575,576,578,579,],[28,-337,-128,-106,-104,-107,-105,-64,-60,-67,-66,-109,28,-65,-102,-337,-131,-108,-63,-129,28,-29,-62,-70,-52,-337,-337,-337,-130,28,-71,-103,-337,-9,-131,-91,-10,28,28,-53,-337,-88,28,28,-93,28,-335,28,-182,28,-87,-90,-94,-92,-61,-72,28,28,28,-73,28,-89,28,28,28,-159,-160,-156,-336,-183,-30,28,-74,28,28,28,28,-174,-175,28,28,-76,-79,-82,-75,-77,28,-81,-215,-214,-80,-216,-78,-127,28,28,-157,-69,-36,-35,28,28,28,-234,-233,28,-231,-217,-230,-81,-84,-218,-158,-31,-34,28,-229,-232,-221,-83,-219,-68,-33,-32,-220,-225,-224,-222,-84,-226,-223,-228,-227,]),'COLON':([2,3,5,6,12,22,23,33,34,36,39,42,43,44,46,48,49,50,54,56,58,60,73,74,76,77,86,96,98,100,101,111,127,132,133,134,136,138,139,140,141,142,143,144,145,147,148,152,153,154,156,158,160,161,162,163,164,166,167,168,169,176,178,179,187,191,192,200,216,224,225,230,232,234,235,236,237,238,240,241,261,263,268,269,272,273,275,279,280,295,310,312,314,316,317,324,328,340,341,355,356,383,384,385,386,387,388,389,390,391,392,393,394,395,396,397,398,399,400,401,402,403,404,405,407,411,431,442,443,445,448,449,453,454,464,465,468,476,478,480,482,483,486,487,511,512,518,519,524,547,551,565,],[-113,-128,-124,-110,-125,-120,-115,-238,-111,-122,-129,-29,-121,-116,-112,-52,-123,-117,-119,-114,-130,-118,-54,-179,-131,-37,-53,-147,-146,-167,-166,-126,-55,-317,-321,-318,-303,-324,-330,-313,-319,-144,-301,-274,-314,-142,-327,-325,-304,-322,-302,-255,-315,-289,-253,-328,-316,-329,-320,-276,-323,-312,-252,-178,-149,-336,319,-30,-38,-274,-239,-326,-280,-277,-334,-332,-331,-333,-174,-175,-298,-297,-279,-143,-235,-278,-140,-141,-145,429,440,-127,-153,-151,-148,447,-168,-36,-35,-44,-43,-261,-273,-262,-260,-264,-268,-263,-259,-266,-271,-257,-256,-265,-272,-267,-269,481,-270,-258,-296,-295,-294,-293,-292,-305,502,-152,-150,319,-170,-169,-31,-34,-39,-42,-240,-237,-281,-282,-290,-291,-236,-275,-33,-32,-41,-40,-254,-306,-299,-300,]),'$end':([0,9,14,16,17,19,25,38,45,47,57,59,61,119,123,124,180,191,223,332,439,510,],[-337,0,-64,-60,-67,-66,-65,-63,-62,-70,-59,-58,-71,-87,-61,-72,-73,-336,-74,-69,-218,-68,]),'WSTRING_LITERAL':([3,39,58,61,76,85,97,103,105,106,116,117,119,124,128,131,135,137,139,146,148,149,150,151,153,163,165,166,171,173,174,175,181,191,198,201,204,205,206,218,219,220,227,229,231,233,235,236,237,238,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,265,266,282,284,285,286,289,290,291,297,298,300,301,302,303,305,307,308,319,329,332,336,338,339,352,353,354,357,358,359,360,361,362,363,364,365,366,367,368,369,373,375,377,412,413,419,421,424,425,427,428,429,430,432,434,435,437,438,439,440,441,447,459,472,475,477,481,484,488,494,496,497,499,500,502,505,506,510,513,514,515,521,522,533,535,536,537,538,539,541,542,543,549,550,553,554,555,557,558,566,569,574,575,576,577,578,579,],[-128,-129,-130,-71,-131,148,-335,-28,-182,-27,148,-337,-87,-72,-337,148,-286,-285,-330,148,-327,148,-283,-287,237,-328,-288,-329,148,-284,148,148,148,-336,-183,148,148,-28,-337,148,-28,-337,-337,148,148,148,-334,-332,-331,-333,148,148,148,148,148,148,148,148,148,148,148,148,148,148,148,148,148,148,148,148,148,-337,-76,-79,-82,-75,148,-77,148,148,-81,-215,-214,-80,-216,148,-78,148,148,-69,-284,148,148,-284,148,148,-244,-247,-245,-241,-242,-246,-248,148,-250,-251,-243,-249,-12,148,148,-11,148,148,148,148,-234,-233,148,-231,148,148,-217,148,-230,148,-84,-218,148,148,148,-337,-337,-198,148,148,148,-337,-284,-229,-232,148,-221,148,-83,-219,-68,148,-28,-337,148,-11,148,148,-220,148,148,148,-284,148,148,148,-337,148,-225,-224,-222,-84,148,148,148,-226,-223,148,-228,-227,]),'DIVIDE':([132,133,134,136,138,139,140,141,143,144,145,148,152,153,154,156,158,160,161,162,163,164,166,167,168,169,176,191,224,230,232,234,235,236,237,238,261,263,268,273,310,383,384,385,386,387,388,389,390,391,392,393,394,395,396,397,398,400,401,402,403,404,405,407,411,478,480,482,483,487,547,551,565,],[-317,-321,-318,-303,-324,-330,-313,-319,-301,-274,-314,-327,-325,-304,-322,-302,-255,-315,-289,252,-328,-316,-329,-320,-276,-323,-312,-336,-274,-326,-280,-277,-334,-332,-331,-333,-298,-297,-279,-278,-312,252,252,252,252,252,252,252,252,252,252,-257,-256,252,252,252,252,252,-258,-296,-295,-294,-293,-292,-305,-281,-282,-290,-291,-275,-306,-299,-300,]),'FOR':([61,97,119,124,181,191,284,285,286,289,291,298,300,301,302,303,305,307,308,332,424,425,428,429,432,435,437,438,439,440,496,497,500,502,505,506,510,535,536,537,539,554,555,557,558,569,574,575,576,577,578,579,],[-71,-335,-87,-72,292,-336,-76,-79,-82,-75,-77,292,-81,-215,-214,-80,-216,292,-78,-69,-234,-233,-231,292,-217,-230,292,-84,-218,292,-229,-232,-221,292,-83,-219,-68,292,-220,292,292,-225,-224,-222,-84,292,292,-226,-223,292,-228,-227,]),'PLUSPLUS':([3,39,58,61,76,85,97,103,105,106,116,117,119,124,128,131,132,133,134,135,136,137,138,139,140,141,143,145,146,148,149,150,151,152,153,154,156,160,161,163,164,165,166,167,168,169,171,173,174,175,176,181,191,198,201,204,205,206,218,219,220,227,229,230,231,233,235,236,237,238,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,261,263,265,266,282,284,285,286,289,290,291,297,298,300,301,302,303,305,307,308,310,319,329,332,336,338,339,352,353,354,357,358,359,360,361,362,363,364,365,366,367,368,369,373,375,377,402,403,404,405,407,411,412,413,419,421,424,425,427,428,429,430,432,434,435,437,438,439,440,441,447,459,472,475,477,481,482,483,484,488,494,496,497,499,500,502,505,506,510,513,514,515,521,522,533,535,536,537,538,539,541,542,543,547,549,550,551,553,554,555,557,558,565,566,569,574,575,576,577,578,579,],[-128,-129,-130,-71,-131,149,-335,-28,-182,-27,149,-337,-87,-72,-337,149,-317,-321,-318,-286,-303,-285,-324,-330,-313,-319,-301,-314,149,-327,149,-283,-287,-325,-304,-322,-302,-315,-289,-328,-316,-288,-329,-320,263,-323,149,-284,149,149,-312,149,-336,-183,149,149,-28,-337,149,-28,-337,-337,149,-326,149,149,-334,-332,-331,-333,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,-298,-297,149,149,-337,-76,-79,-82,-75,149,-77,149,149,-81,-215,-214,-80,-216,149,-78,-312,149,149,-69,-284,149,149,-284,149,149,-244,-247,-245,-241,-242,-246,-248,149,-250,-251,-243,-249,-12,149,149,-11,-296,-295,-294,-293,-292,-305,149,149,149,149,-234,-233,149,-231,149,149,-217,149,-230,149,-84,-218,149,149,149,-337,-337,-198,149,149,-290,-291,149,-337,-284,-229,-232,149,-221,149,-83,-219,-68,149,-28,-337,149,-11,149,149,-220,149,149,149,-284,149,149,-306,149,-337,-299,149,-225,-224,-222,-84,-300,149,149,149,-226,-223,149,-228,-227,]),'EQUALS':([42,48,73,74,75,77,78,86,110,127,132,133,134,136,138,139,140,141,143,144,145,148,152,153,154,156,160,161,163,164,166,167,168,169,176,179,191,197,200,216,224,230,232,234,235,236,237,238,261,263,268,273,310,340,341,355,356,371,376,402,403,404,405,407,411,453,454,464,465,470,474,478,480,482,483,487,511,512,518,519,520,547,551,565,],[-29,-52,-54,-179,-178,-37,131,-53,201,-55,-317,-321,-318,-303,-324,-330,-313,-319,-301,-274,-314,-327,-325,-304,-322,-302,-315,-289,-328,-316,-329,-320,-276,-323,-312,-178,-336,329,-30,-38,360,-326,-280,-277,-334,-332,-331,-333,-298,-297,-279,-278,-312,-36,-35,-44,-43,-199,475,-296,-295,-294,-293,-292,-305,-31,-34,-39,-42,-202,-200,-281,-282,-290,-291,-275,-33,-32,-41,-40,-201,-306,-299,-300,]),'ELSE':([61,124,191,284,285,286,289,291,300,303,308,332,424,425,428,435,437,438,439,496,497,500,505,506,510,536,554,555,557,558,575,576,578,579,],[-71,-72,-336,-76,-79,-82,-75,-77,-81,-80,-78,-69,-234,-233,-231,-230,-81,-84,-218,-229,-232,-221,-83,-219,-68,-220,-225,-224,-222,569,-226,-223,-228,-227,]),'ANDEQUAL':([132,133,134,136,138,139,140,141,143,144,145,148,152,153,154,156,160,161,163,164,166,167,168,169,176,191,224,230,232,234,235,236,237,238,261,263,268,273,310,402,403,404,405,407,411,478,480,482,483,487,547,551,565,],[-317,-321,-318,-303,-324,-330,-313,-319,-301,-274,-314,-327,-325,-304,-322,-302,-315,-289,-328,-316,-329,-320,-276,-323,-312,-336,365,-326,-280,-277,-334,-332,-331,-333,-298,-297,-279,-278,-312,-296,-295,-294,-293,-292,-305,-281,-282,-290,-291,-275,-306,-299,-300,]),'EQ':([132,133,134,136,138,139,140,141,143,144,145,148,152,153,154,156,158,160,161,162,163,164,166,167,168,169,176,191,224,230,232,234,235,236,237,238,261,263,268,273,310,383,384,385,386,387,388,389,390,391,392,393,394,395,396,397,398,400,401,402,403,404,405,407,411,478,480,482,483,487,547,551,565,],[-317,-321,-318,-303,-324,-330,-313,-319,-301,-274,-314,-327,-325,-304,-322,-302,-255,-315,-289,256,-328,-316,-329,-320,-276,-323,-312,-336,-274,-326,-280,-277,-334,-332,-331,-333,-298,-297,-279,-278,-312,-261,256,-262,-260,-264,-268,-263,-259,-266,256,-257,-256,-265,256,-267,256,256,-258,-296,-295,-294,-293,-292,-305,-281,-282,-290,-291,-275,-306,-299,-300,]),'AND':([3,39,58,61,76,85,97,103,105,106,116,117,119,124,128,131,132,133,134,135,136,137,138,139,140,141,143,144,145,146,148,149,150,151,152,153,154,156,158,160,161,162,163,164,165,166,167,168,169,171,173,174,175,176,181,191,198,201,204,205,206,218,219,220,224,227,229,230,231,232,233,234,235,236,237,238,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,261,263,265,266,268,273,282,284,285,286,289,290,291,297,298,300,301,302,303,305,307,308,310,319,329,332,336,338,339,352,353,354,357,358,359,360,361,362,363,364,365,366,367,368,369,373,375,377,383,384,385,386,387,388,389,390,391,392,393,394,395,396,397,398,400,401,402,403,404,405,407,411,412,413,419,421,424,425,427,428,429,430,432,434,435,437,438,439,440,441,447,459,472,475,477,478,480,481,482,483,484,487,488,494,496,497,499,500,502,505,506,510,513,514,515,521,522,533,535,536,537,538,539,541,542,543,547,549,550,551,553,554,555,557,558,565,566,569,574,575,576,577,578,579,],[-128,-129,-130,-71,-131,150,-335,-28,-182,-27,150,-337,-87,-72,-337,150,-317,-321,-318,-286,-303,-285,-324,-330,-313,-319,-301,-274,-314,150,-327,150,-283,-287,-325,-304,-322,-302,-255,-315,-289,257,-328,-316,-288,-329,-320,-276,-323,150,-284,150,150,-312,150,-336,-183,150,150,-28,-337,150,-28,-337,-274,-337,150,-326,150,-280,150,-277,-334,-332,-331,-333,150,150,150,150,150,150,150,150,150,150,150,150,150,150,150,150,150,150,150,-298,-297,150,150,-279,-278,-337,-76,-79,-82,-75,150,-77,150,150,-81,-215,-214,-80,-216,150,-78,-312,150,150,-69,-284,150,150,-284,150,150,-244,-247,-245,-241,-242,-246,-248,150,-250,-251,-243,-249,-12,150,150,-11,-261,257,-262,-260,-264,-268,-263,-259,-266,257,-257,-256,-265,257,-267,-269,257,-258,-296,-295,-294,-293,-292,-305,150,150,150,150,-234,-233,150,-231,150,150,-217,150,-230,150,-84,-218,150,150,150,-337,-337,-198,150,-281,-282,150,-290,-291,150,-275,-337,-284,-229,-232,150,-221,150,-83,-219,-68,150,-28,-337,150,-11,150,150,-220,150,150,150,-284,150,150,-306,150,-337,-299,150,-225,-224,-222,-84,-300,150,150,150,-226,-223,150,-228,-227,]),'TYPEID':([0,1,2,3,4,5,6,7,10,11,12,13,14,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,38,39,40,42,43,44,45,46,47,48,49,50,52,53,54,55,56,58,59,60,61,62,63,64,65,66,67,68,69,71,72,75,76,80,81,82,85,86,87,89,90,91,93,94,95,96,97,98,99,100,101,103,104,105,106,109,111,118,119,120,121,122,123,124,126,129,142,147,172,174,180,181,182,184,185,186,187,188,189,190,191,192,198,199,200,202,211,214,223,229,231,233,239,240,241,262,264,267,269,275,278,279,280,284,285,286,289,291,298,300,301,302,303,305,308,312,313,314,315,316,317,318,328,332,340,341,342,344,350,422,424,425,427,428,432,435,437,438,439,442,443,445,446,448,449,453,454,460,496,497,500,505,506,510,511,512,536,554,555,557,558,575,576,578,579,],[33,-337,-113,-128,77,-124,-110,-106,-104,-107,-125,-105,-64,-60,-67,-99,-66,-109,33,-120,-115,-154,-65,-102,-126,-155,-131,-108,96,100,-238,-111,-337,-122,-63,-129,33,-29,-121,-116,-62,-112,-70,-52,-123,-117,-337,-337,-119,-337,-114,-130,33,-118,-71,-103,-337,-9,-131,-91,-10,-96,77,-98,77,33,-131,-95,-101,-97,33,-53,-126,77,-88,33,33,-93,33,-147,-335,-146,33,-167,-166,-28,-180,-182,-27,-100,-126,33,-87,-90,-94,-92,-61,-72,77,33,-144,-142,33,33,-73,33,-89,33,33,33,-149,-159,-160,-156,-336,77,-183,-181,-30,77,347,33,-74,33,33,33,33,-174,-175,402,404,33,-143,-140,33,-141,-145,-76,-79,-82,-75,-77,33,-81,-215,-214,-80,-216,-78,-127,33,-153,33,-151,-148,-157,-168,-69,-36,-35,33,347,33,33,-234,-233,33,-231,-217,-230,-81,-84,-218,-152,-150,77,-158,-170,-169,-31,-34,33,-229,-232,-221,-83,-219,-68,-33,-32,-220,-225,-224,-222,-84,-226,-223,-228,-227,]),'LBRACE':([21,24,28,31,32,42,48,61,75,86,88,90,92,93,96,97,98,100,101,119,124,130,131,181,182,191,200,201,227,229,284,285,286,289,291,298,300,301,302,303,305,307,308,332,340,341,369,375,377,413,424,425,428,429,432,435,437,438,439,440,453,454,472,475,477,478,479,488,496,497,500,502,505,506,510,511,512,521,522,535,536,537,539,550,554,555,557,558,569,574,575,576,577,578,579,],[-337,-154,-155,97,97,-29,-52,-71,-337,-53,-7,-88,97,-8,97,-335,97,97,97,-87,-72,97,97,97,-89,-336,-30,97,-337,97,-76,-79,-82,-75,-77,97,-81,-215,-214,-80,-216,97,-78,-69,-36,-35,-12,97,-11,97,-234,-233,-231,97,-217,-230,97,-84,-218,97,-31,-34,-337,-198,97,97,97,-337,-229,-232,-221,97,-83,-219,-68,-33,-32,97,-11,97,-220,97,97,-337,-225,-224,-222,-84,97,97,-226,-223,97,-228,-227,]),'PPHASH':([0,14,16,17,19,25,38,45,47,59,61,119,123,124,180,191,223,332,439,510,],[47,-64,-60,-67,-66,-65,-63,-62,-70,47,-71,-87,-61,-72,-73,-336,-74,-69,-218,-68,]),'INT':([0,1,2,3,4,5,6,7,10,11,12,13,14,16,17,18,19,20,21,22,23,25,26,27,29,30,33,34,36,38,39,40,42,43,44,45,46,47,48,49,50,52,53,54,55,56,58,59,60,61,62,63,64,65,66,67,68,71,75,76,80,81,82,85,86,87,89,90,91,93,94,95,96,97,98,99,100,101,105,109,111,118,119,120,121,122,123,124,129,142,147,172,174,177,180,181,182,184,185,186,187,188,189,190,191,192,198,200,211,214,223,229,231,233,239,240,241,267,269,275,278,279,280,284,285,286,289,291,298,300,301,302,303,305,308,312,313,314,315,316,317,318,328,332,340,341,342,350,422,424,425,427,428,432,435,437,438,439,442,443,446,448,449,453,454,460,496,497,500,505,506,510,511,512,536,554,555,557,558,575,576,578,579,],[56,-337,-113,-128,56,-124,-110,-106,-104,-107,-125,-105,-64,-60,-67,-99,-66,-109,56,-120,-115,-65,-102,-126,-131,-108,-238,-111,-122,-63,-129,56,-29,-121,-116,-62,-112,-70,-52,-123,-117,-337,-337,-119,-337,-114,-130,56,-118,-71,-103,-337,-9,-131,-91,-10,-96,-98,56,-131,-95,-101,-97,56,-53,-126,56,-88,56,56,-93,56,-147,-335,-146,56,-167,-166,-182,-100,-126,56,-87,-90,-94,-92,-61,-72,56,-144,-142,56,56,56,-73,56,-89,56,56,56,-149,-159,-160,-156,-336,56,-183,-30,56,56,-74,56,56,56,56,-174,-175,56,-143,-140,56,-141,-145,-76,-79,-82,-75,-77,56,-81,-215,-214,-80,-216,-78,-127,56,-153,56,-151,-148,-157,-168,-69,-36,-35,56,56,56,-234,-233,56,-231,-217,-230,-81,-84,-218,-152,-150,-158,-170,-169,-31,-34,56,-229,-232,-221,-83,-219,-68,-33,-32,-220,-225,-224,-222,-84,-226,-223,-228,-227,]),'SIGNED':([0,1,2,3,4,5,6,7,10,11,12,13,14,16,17,18,19,20,21,22,23,25,26,27,29,30,33,34,36,38,39,40,42,43,44,45,46,47,48,49,50,52,53,54,55,56,58,59,60,61,62,63,64,65,66,67,68,71,75,76,80,81,82,85,86,87,89,90,91,93,94,95,96,97,98,99,100,101,105,109,111,118,119,120,121,122,123,124,129,142,147,172,174,177,180,181,182,184,185,186,187,188,189,190,191,192,198,200,211,214,223,229,231,233,239,240,241,267,269,275,278,279,280,284,285,286,289,291,298,300,301,302,303,305,308,312,313,314,315,316,317,318,328,332,340,341,342,350,422,424,425,427,428,432,435,437,438,439,442,443,446,448,449,453,454,460,496,497,500,505,506,510,511,512,536,554,555,557,558,575,576,578,579,],[54,-337,-113,-128,54,-124,-110,-106,-104,-107,-125,-105,-64,-60,-67,-99,-66,-109,54,-120,-115,-65,-102,-126,-131,-108,-238,-111,-122,-63,-129,54,-29,-121,-116,-62,-112,-70,-52,-123,-117,-337,-337,-119,-337,-114,-130,54,-118,-71,-103,-337,-9,-131,-91,-10,-96,-98,54,-131,-95,-101,-97,54,-53,-126,54,-88,54,54,-93,54,-147,-335,-146,54,-167,-166,-182,-100,-126,54,-87,-90,-94,-92,-61,-72,54,-144,-142,54,54,54,-73,54,-89,54,54,54,-149,-159,-160,-156,-336,54,-183,-30,54,54,-74,54,54,54,54,-174,-175,54,-143,-140,54,-141,-145,-76,-79,-82,-75,-77,54,-81,-215,-214,-80,-216,-78,-127,54,-153,54,-151,-148,-157,-168,-69,-36,-35,54,54,54,-234,-233,54,-231,-217,-230,-81,-84,-218,-152,-150,-158,-170,-169,-31,-34,54,-229,-232,-221,-83,-219,-68,-33,-32,-220,-225,-224,-222,-84,-226,-223,-228,-227,]),'CONTINUE':([61,97,119,124,181,191,284,285,286,289,291,298,300,301,302,303,305,307,308,332,424,425,428,429,432,435,437,438,439,440,496,497,500,502,505,506,510,535,536,537,539,554,555,557,558,569,574,575,576,577,578,579,],[-71,-335,-87,-72,293,-336,-76,-79,-82,-75,-77,293,-81,-215,-214,-80,-216,293,-78,-69,-234,-233,-231,293,-217,-230,293,-84,-218,293,-229,-232,-221,293,-83,-219,-68,293,-220,293,293,-225,-224,-222,-84,293,293,-226,-223,293,-228,-227,]),'NOT':([3,39,58,61,76,85,97,103,105,106,116,117,119,124,128,131,135,137,146,149,150,151,165,171,173,174,175,181,191,198,201,204,205,206,218,219,220,227,229,231,233,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,265,266,282,284,285,286,289,290,291,297,298,300,301,302,303,305,307,308,319,329,332,336,338,339,352,353,354,357,358,359,360,361,362,363,364,365,366,367,368,369,373,375,377,412,413,419,421,424,425,427,428,429,430,432,434,435,437,438,439,440,441,447,459,472,475,477,481,484,488,494,496,497,499,500,502,505,506,510,513,514,515,521,522,533,535,536,537,538,539,541,542,543,549,550,553,554,555,557,558,566,569,574,575,576,577,578,579,],[-128,-129,-130,-71,-131,151,-335,-28,-182,-27,151,-337,-87,-72,-337,151,-286,-285,151,151,-283,-287,-288,151,-284,151,151,151,-336,-183,151,151,-28,-337,151,-28,-337,-337,151,151,151,151,151,151,151,151,151,151,151,151,151,151,151,151,151,151,151,151,151,151,151,151,-337,-76,-79,-82,-75,151,-77,151,151,-81,-215,-214,-80,-216,151,-78,151,151,-69,-284,151,151,-284,151,151,-244,-247,-245,-241,-242,-246,-248,151,-250,-251,-243,-249,-12,151,151,-11,151,151,151,151,-234,-233,151,-231,151,151,-217,151,-230,151,-84,-218,151,151,151,-337,-337,-198,151,151,151,-337,-284,-229,-232,151,-221,151,-83,-219,-68,151,-28,-337,151,-11,151,151,-220,151,151,151,-284,151,151,151,-337,151,-225,-224,-222,-84,151,151,151,-226,-223,151,-228,-227,]),'OREQUAL':([132,133,134,136,138,139,140,141,143,144,145,148,152,153,154,156,160,161,163,164,166,167,168,169,176,191,224,230,232,234,235,236,237,238,261,263,268,273,310,402,403,404,405,407,411,478,480,482,483,487,547,551,565,],[-317,-321,-318,-303,-324,-330,-313,-319,-301,-274,-314,-327,-325,-304,-322,-302,-315,-289,-328,-316,-329,-320,-276,-323,-312,-336,366,-326,-280,-277,-334,-332,-331,-333,-298,-297,-279,-278,-312,-296,-295,-294,-293,-292,-305,-281,-282,-290,-291,-275,-306,-299,-300,]),'MOD':([132,133,134,136,138,139,140,141,143,144,145,148,152,153,154,156,158,160,161,162,163,164,166,167,168,169,176,191,224,230,232,234,235,236,237,238,261,263,268,273,310,383,384,385,386,387,388,389,390,391,392,393,394,395,396,397,398,400,401,402,403,404,405,407,411,478,480,482,483,487,547,551,565,],[-317,-321,-318,-303,-324,-330,-313,-319,-301,-274,-314,-327,-325,-304,-322,-302,-255,-315,-289,260,-328,-316,-329,-320,-276,-323,-312,-336,-274,-326,-280,-277,-334,-332,-331,-333,-298,-297,-279,-278,-312,260,260,260,260,260,260,260,260,260,260,-257,-256,260,260,260,260,260,-258,-296,-295,-294,-293,-292,-305,-281,-282,-290,-291,-275,-306,-299,-300,]),'RSHIFT':([132,133,134,136,138,139,140,141,143,144,145,148,152,153,154,156,158,160,161,162,163,164,166,167,168,169,176,191,224,230,232,234,235,236,237,238,261,263,268,273,310,383,384,385,386,387,388,389,390,391,392,393,394,395,396,397,398,400,401,402,403,404,405,407,411,478,480,482,483,487,547,551,565,],[-317,-321,-318,-303,-324,-330,-313,-319,-301,-274,-314,-327,-325,-304,-322,-302,-255,-315,-289,242,-328,-316,-329,-320,-276,-323,-312,-336,-274,-326,-280,-277,-334,-332,-331,-333,-298,-297,-279,-278,-312,-261,242,-262,-260,242,242,242,-259,242,242,-257,-256,242,242,242,242,242,-258,-296,-295,-294,-293,-292,-305,-281,-282,-290,-291,-275,-306,-299,-300,]),'DEFAULT':([61,97,119,124,181,191,284,285,286,289,291,298,300,301,302,303,305,307,308,332,424,425,428,429,432,435,437,438,439,440,496,497,500,502,505,506,510,535,536,537,539,554,555,557,558,569,574,575,576,577,578,579,],[-71,-335,-87,-72,295,-336,-76,-79,-82,-75,-77,295,-81,-215,-214,-80,-216,295,-78,-69,-234,-233,-231,295,-217,-230,295,-84,-218,295,-229,-232,-221,295,-83,-219,-68,295,-220,295,295,-225,-224,-222,-84,295,295,-226,-223,295,-228,-227,]),'_NORETURN':([0,1,2,3,4,5,6,7,10,11,12,13,14,16,17,18,19,20,21,22,23,25,26,27,29,30,33,34,36,38,39,42,43,44,45,46,47,48,49,50,52,53,54,55,56,58,59,60,61,62,63,65,68,71,75,76,80,81,82,86,87,89,90,93,96,97,98,100,101,109,111,118,119,123,124,129,180,181,182,187,191,200,211,223,240,241,278,284,285,286,289,291,298,300,301,302,303,305,308,312,314,316,317,328,332,340,341,342,350,422,424,425,427,428,432,435,437,438,439,442,443,448,449,453,454,460,496,497,500,505,506,510,511,512,536,554,555,557,558,575,576,578,579,],[20,20,-113,-128,20,-124,-110,-106,-104,-107,-125,-105,-64,-60,-67,-99,-66,-109,20,-120,-115,-65,-102,20,-131,-108,-238,-111,-122,-63,-129,-29,-121,-116,-62,-112,-70,-52,-123,-117,20,20,-119,20,-114,-130,20,-118,-71,-103,20,-131,-96,-98,20,-131,-95,-101,-97,-53,20,20,-88,20,-147,-335,-146,-167,-166,-100,-126,20,-87,-61,-72,20,-73,20,-89,-149,-336,-30,20,-74,-174,-175,20,-76,-79,-82,-75,-77,20,-81,-215,-214,-80,-216,-78,-127,-153,-151,-148,-168,-69,-36,-35,20,20,20,-234,-233,20,-231,-217,-230,-81,-84,-218,-152,-150,-170,-169,-31,-34,20,-229,-232,-221,-83,-219,-68,-33,-32,-220,-225,-224,-222,-84,-226,-223,-228,-227,]),'__INT128':([0,1,2,3,4,5,6,7,10,11,12,13,14,16,17,18,19,20,21,22,23,25,26,27,29,30,33,34,36,38,39,40,42,43,44,45,46,47,48,49,50,52,53,54,55,56,58,59,60,61,62,63,64,65,66,67,68,71,75,76,80,81,82,85,86,87,89,90,91,93,94,95,96,97,98,99,100,101,105,109,111,118,119,120,121,122,123,124,129,142,147,172,174,177,180,181,182,184,185,186,187,188,189,190,191,192,198,200,211,214,223,229,231,233,239,240,241,267,269,275,278,279,280,284,285,286,289,291,298,300,301,302,303,305,308,312,313,314,315,316,317,318,328,332,340,341,342,350,422,424,425,427,428,432,435,437,438,439,442,443,446,448,449,453,454,460,496,497,500,505,506,510,511,512,536,554,555,557,558,575,576,578,579,],[43,-337,-113,-128,43,-124,-110,-106,-104,-107,-125,-105,-64,-60,-67,-99,-66,-109,43,-120,-115,-65,-102,-126,-131,-108,-238,-111,-122,-63,-129,43,-29,-121,-116,-62,-112,-70,-52,-123,-117,-337,-337,-119,-337,-114,-130,43,-118,-71,-103,-337,-9,-131,-91,-10,-96,-98,43,-131,-95,-101,-97,43,-53,-126,43,-88,43,43,-93,43,-147,-335,-146,43,-167,-166,-182,-100,-126,43,-87,-90,-94,-92,-61,-72,43,-144,-142,43,43,43,-73,43,-89,43,43,43,-149,-159,-160,-156,-336,43,-183,-30,43,43,-74,43,43,43,43,-174,-175,43,-143,-140,43,-141,-145,-76,-79,-82,-75,-77,43,-81,-215,-214,-80,-216,-78,-127,43,-153,43,-151,-148,-157,-168,-69,-36,-35,43,43,43,-234,-233,43,-231,-217,-230,-81,-84,-218,-152,-150,-158,-170,-169,-31,-34,43,-229,-232,-221,-83,-219,-68,-33,-32,-220,-225,-224,-222,-84,-226,-223,-228,-227,]),'WHILE':([61,97,119,124,181,191,284,285,286,289,291,298,300,301,302,303,305,307,308,332,424,425,428,429,432,435,436,437,438,439,440,496,497,500,502,505,506,510,535,536,537,539,554,555,557,558,569,574,575,576,577,578,579,],[-71,-335,-87,-72,296,-336,-76,-79,-82,-75,-77,296,-81,-215,-214,-80,-216,296,-78,-69,-234,-233,-231,296,-217,-230,504,296,-84,-218,296,-229,-232,-221,296,-83,-219,-68,296,-220,296,296,-225,-224,-222,-84,296,296,-226,-223,296,-228,-227,]),'U8CHAR_CONST':([3,39,58,61,76,85,97,103,105,106,116,117,119,124,128,131,135,137,146,149,150,151,165,171,173,174,175,181,191,198,201,204,205,206,218,219,220,227,229,231,233,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,265,266,282,284,285,286,289,290,291,297,298,300,301,302,303,305,307,308,319,329,332,336,338,339,352,353,354,357,358,359,360,361,362,363,364,365,366,367,368,369,373,375,377,412,413,419,421,424,425,427,428,429,430,432,434,435,437,438,439,440,441,447,459,472,475,477,481,484,488,494,496,497,499,500,502,505,506,510,513,514,515,521,522,533,535,536,537,538,539,541,542,543,549,550,553,554,555,557,558,566,569,574,575,576,577,578,579,],[-128,-129,-130,-71,-131,154,-335,-28,-182,-27,154,-337,-87,-72,-337,154,-286,-285,154,154,-283,-287,-288,154,-284,154,154,154,-336,-183,154,154,-28,-337,154,-28,-337,-337,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,-337,-76,-79,-82,-75,154,-77,154,154,-81,-215,-214,-80,-216,154,-78,154,154,-69,-284,154,154,-284,154,154,-244,-247,-245,-241,-242,-246,-248,154,-250,-251,-243,-249,-12,154,154,-11,154,154,154,154,-234,-233,154,-231,154,154,-217,154,-230,154,-84,-218,154,154,154,-337,-337,-198,154,154,154,-337,-284,-229,-232,154,-221,154,-83,-219,-68,154,-28,-337,154,-11,154,154,-220,154,154,154,-284,154,154,154,-337,154,-225,-224,-222,-84,154,154,154,-226,-223,154,-228,-227,]),'_ALIGNOF':([3,39,58,61,76,85,97,103,105,106,116,117,119,124,128,131,135,137,146,149,150,151,165,171,173,174,175,181,191,198,201,204,205,206,218,219,220,227,229,231,233,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,265,266,282,284,285,286,289,290,291,297,298,300,301,302,303,305,307,308,319,329,332,336,338,339,352,353,354,357,358,359,360,361,362,363,364,365,366,367,368,369,373,375,377,412,413,419,421,424,425,427,428,429,430,432,434,435,437,438,439,440,441,447,459,472,475,477,481,484,488,494,496,497,499,500,502,505,506,510,513,514,515,521,522,533,535,536,537,538,539,541,542,543,549,550,553,554,555,557,558,566,569,574,575,576,577,578,579,],[-128,-129,-130,-71,-131,155,-335,-28,-182,-27,155,-337,-87,-72,-337,155,-286,-285,155,155,-283,-287,-288,155,-284,155,155,155,-336,-183,155,155,-28,-337,155,-28,-337,-337,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,-337,-76,-79,-82,-75,155,-77,155,155,-81,-215,-214,-80,-216,155,-78,155,155,-69,-284,155,155,-284,155,155,-244,-247,-245,-241,-242,-246,-248,155,-250,-251,-243,-249,-12,155,155,-11,155,155,155,155,-234,-233,155,-231,155,155,-217,155,-230,155,-84,-218,155,155,155,-337,-337,-198,155,155,155,-337,-284,-229,-232,155,-221,155,-83,-219,-68,155,-28,-337,155,-11,155,155,-220,155,155,155,-284,155,155,155,-337,155,-225,-224,-222,-84,155,155,155,-226,-223,155,-228,-227,]),'EXTERN':([0,1,2,3,4,5,6,7,10,11,12,13,14,16,17,18,19,20,21,22,23,25,26,27,29,30,33,34,36,38,39,42,43,44,45,46,47,48,49,50,52,53,54,55,56,58,59,60,61,62,63,65,68,71,75,76,80,81,82,86,87,89,90,93,96,97,98,100,101,109,111,118,119,123,124,129,180,181,182,187,191,200,211,223,240,241,278,284,285,286,289,291,298,300,301,302,303,305,308,312,314,316,317,328,332,340,341,342,350,422,424,425,427,428,432,435,437,438,439,442,443,448,449,453,454,460,496,497,500,505,506,510,511,512,536,554,555,557,558,575,576,578,579,],[13,13,-113,-128,13,-124,-110,-106,-104,-107,-125,-105,-64,-60,-67,-99,-66,-109,13,-120,-115,-65,-102,13,-131,-108,-238,-111,-122,-63,-129,-29,-121,-116,-62,-112,-70,-52,-123,-117,13,13,-119,13,-114,-130,13,-118,-71,-103,13,-131,-96,-98,13,-131,-95,-101,-97,-53,13,13,-88,13,-147,-335,-146,-167,-166,-100,-126,13,-87,-61,-72,13,-73,13,-89,-149,-336,-30,13,-74,-174,-175,13,-76,-79,-82,-75,-77,13,-81,-215,-214,-80,-216,-78,-127,-153,-151,-148,-168,-69,-36,-35,13,13,13,-234,-233,13,-231,-217,-230,-81,-84,-218,-152,-150,-170,-169,-31,-34,13,-229,-232,-221,-83,-219,-68,-33,-32,-220,-225,-224,-222,-84,-226,-223,-228,-227,]),'CASE':([61,97,119,124,181,191,284,285,286,289,291,298,300,301,302,303,305,307,308,332,424,425,428,429,432,435,437,438,439,440,496,497,500,502,505,506,510,535,536,537,539,554,555,557,558,569,574,575,576,577,578,579,],[-71,-335,-87,-72,297,-336,-76,-79,-82,-75,-77,297,-81,-215,-214,-80,-216,297,-78,-69,-234,-233,-231,297,-217,-230,297,-84,-218,297,-229,-232,-221,297,-83,-219,-68,297,-220,297,297,-225,-224,-222,-84,297,297,-226,-223,297,-228,-227,]),'LAND':([132,133,134,136,138,139,140,141,143,144,145,148,152,153,154,156,158,160,161,162,163,164,166,167,168,169,176,191,224,230,232,234,235,236,237,238,261,263,268,273,310,383,384,385,386,387,388,389,390,391,392,393,394,395,396,397,398,400,401,402,403,404,405,407,411,478,480,482,483,487,547,551,565,],[-317,-321,-318,-303,-324,-330,-313,-319,-301,-274,-314,-327,-325,-304,-322,-302,-255,-315,-289,255,-328,-316,-329,-320,-276,-323,-312,-336,-274,-326,-280,-277,-334,-332,-331,-333,-298,-297,-279,-278,-312,-261,255,-262,-260,-264,-268,-263,-259,-266,-271,-257,-256,-265,-272,-267,-269,-270,-258,-296,-295,-294,-293,-292,-305,-281,-282,-290,-291,-275,-306,-299,-300,]),'REGISTER':([0,1,2,3,4,5,6,7,10,11,12,13,14,16,17,18,19,20,21,22,23,25,26,27,29,30,33,34,36,38,39,42,43,44,45,46,47,48,49,50,52,53,54,55,56,58,59,60,61,62,63,65,68,71,75,76,80,81,82,86,87,89,90,93,96,97,98,100,101,109,111,118,119,123,124,129,180,181,182,187,191,200,211,223,240,241,278,284,285,286,289,291,298,300,301,302,303,305,308,312,314,316,317,328,332,340,341,342,350,422,424,425,427,428,432,435,437,438,439,442,443,448,449,453,454,460,496,497,500,505,506,510,511,512,536,554,555,557,558,575,576,578,579,],[62,62,-113,-128,62,-124,-110,-106,-104,-107,-125,-105,-64,-60,-67,-99,-66,-109,62,-120,-115,-65,-102,62,-131,-108,-238,-111,-122,-63,-129,-29,-121,-116,-62,-112,-70,-52,-123,-117,62,62,-119,62,-114,-130,62,-118,-71,-103,62,-131,-96,-98,62,-131,-95,-101,-97,-53,62,62,-88,62,-147,-335,-146,-167,-166,-100,-126,62,-87,-61,-72,62,-73,62,-89,-149,-336,-30,62,-74,-174,-175,62,-76,-79,-82,-75,-77,62,-81,-215,-214,-80,-216,-78,-127,-153,-151,-148,-168,-69,-36,-35,62,62,62,-234,-233,62,-231,-217,-230,-81,-84,-218,-152,-150,-170,-169,-31,-34,62,-229,-232,-221,-83,-219,-68,-33,-32,-220,-225,-224,-222,-84,-226,-223,-228,-227,]),'MODEQUAL':([132,133,134,136,138,139,140,141,143,144,145,148,152,153,154,156,160,161,163,164,166,167,168,169,176,191,224,230,232,234,235,236,237,238,261,263,268,273,310,402,403,404,405,407,411,478,480,482,483,487,547,551,565,],[-317,-321,-318,-303,-324,-330,-313,-319,-301,-274,-314,-327,-325,-304,-322,-302,-315,-289,-328,-316,-329,-320,-276,-323,-312,-336,359,-326,-280,-277,-334,-332,-331,-333,-298,-297,-279,-278,-312,-296,-295,-294,-293,-292,-305,-281,-282,-290,-291,-275,-306,-299,-300,]),'NE':([132,133,134,136,138,139,140,141,143,144,145,148,152,153,154,156,158,160,161,162,163,164,166,167,168,169,176,191,224,230,232,234,235,236,237,238,261,263,268,273,310,383,384,385,386,387,388,389,390,391,392,393,394,395,396,397,398,400,401,402,403,404,405,407,411,478,480,482,483,487,547,551,565,],[-317,-321,-318,-303,-324,-330,-313,-319,-301,-274,-314,-327,-325,-304,-322,-302,-255,-315,-289,247,-328,-316,-329,-320,-276,-323,-312,-336,-274,-326,-280,-277,-334,-332,-331,-333,-298,-297,-279,-278,-312,-261,247,-262,-260,-264,-268,-263,-259,-266,247,-257,-256,-265,247,-267,247,247,-258,-296,-295,-294,-293,-292,-305,-281,-282,-290,-291,-275,-306,-299,-300,]),'SWITCH':([61,97,119,124,181,191,284,285,286,289,291,298,300,301,302,303,305,307,308,332,424,425,428,429,432,435,437,438,439,440,496,497,500,502,505,506,510,535,536,537,539,554,555,557,558,569,574,575,576,577,578,579,],[-71,-335,-87,-72,299,-336,-76,-79,-82,-75,-77,299,-81,-215,-214,-80,-216,299,-78,-69,-234,-233,-231,299,-217,-230,299,-84,-218,299,-229,-232,-221,299,-83,-219,-68,299,-220,299,299,-225,-224,-222,-84,299,299,-226,-223,299,-228,-227,]),'INT_CONST_HEX':([3,39,58,61,76,85,97,103,105,106,116,117,119,124,128,131,135,137,146,149,150,151,165,171,173,174,175,181,191,198,201,204,205,206,218,219,220,227,229,231,233,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,265,266,282,284,285,286,289,290,291,297,298,300,301,302,303,305,307,308,319,329,332,336,338,339,352,353,354,357,358,359,360,361,362,363,364,365,366,367,368,369,373,375,377,412,413,419,421,424,425,427,428,429,430,432,434,435,437,438,439,440,441,447,459,472,475,477,481,484,488,494,496,497,499,500,502,505,506,510,513,514,515,521,522,533,535,536,537,538,539,541,542,543,549,550,553,554,555,557,558,566,569,574,575,576,577,578,579,],[-128,-129,-130,-71,-131,160,-335,-28,-182,-27,160,-337,-87,-72,-337,160,-286,-285,160,160,-283,-287,-288,160,-284,160,160,160,-336,-183,160,160,-28,-337,160,-28,-337,-337,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,-337,-76,-79,-82,-75,160,-77,160,160,-81,-215,-214,-80,-216,160,-78,160,160,-69,-284,160,160,-284,160,160,-244,-247,-245,-241,-242,-246,-248,160,-250,-251,-243,-249,-12,160,160,-11,160,160,160,160,-234,-233,160,-231,160,160,-217,160,-230,160,-84,-218,160,160,160,-337,-337,-198,160,160,160,-337,-284,-229,-232,160,-221,160,-83,-219,-68,160,-28,-337,160,-11,160,160,-220,160,160,160,-284,160,160,160,-337,160,-225,-224,-222,-84,160,160,160,-226,-223,160,-228,-227,]),'_COMPLEX':([0,1,2,3,4,5,6,7,10,11,12,13,14,16,17,18,19,20,21,22,23,25,26,27,29,30,33,34,36,38,39,40,42,43,44,45,46,47,48,49,50,52,53,54,55,56,58,59,60,61,62,63,64,65,66,67,68,71,75,76,80,81,82,85,86,87,89,90,91,93,94,95,96,97,98,99,100,101,105,109,111,118,119,120,121,122,123,124,129,142,147,172,174,177,180,181,182,184,185,186,187,188,189,190,191,192,198,200,211,214,223,229,231,233,239,240,241,267,269,275,278,279,280,284,285,286,289,291,298,300,301,302,303,305,308,312,313,314,315,316,317,318,328,332,340,341,342,350,422,424,425,427,428,432,435,437,438,439,442,443,446,448,449,453,454,460,496,497,500,505,506,510,511,512,536,554,555,557,558,575,576,578,579,],[60,-337,-113,-128,60,-124,-110,-106,-104,-107,-125,-105,-64,-60,-67,-99,-66,-109,60,-120,-115,-65,-102,-126,-131,-108,-238,-111,-122,-63,-129,60,-29,-121,-116,-62,-112,-70,-52,-123,-117,-337,-337,-119,-337,-114,-130,60,-118,-71,-103,-337,-9,-131,-91,-10,-96,-98,60,-131,-95,-101,-97,60,-53,-126,60,-88,60,60,-93,60,-147,-335,-146,60,-167,-166,-182,-100,-126,60,-87,-90,-94,-92,-61,-72,60,-144,-142,60,60,60,-73,60,-89,60,60,60,-149,-159,-160,-156,-336,60,-183,-30,60,60,-74,60,60,60,60,-174,-175,60,-143,-140,60,-141,-145,-76,-79,-82,-75,-77,60,-81,-215,-214,-80,-216,-78,-127,60,-153,60,-151,-148,-157,-168,-69,-36,-35,60,60,60,-234,-233,60,-231,-217,-230,-81,-84,-218,-152,-150,-158,-170,-169,-31,-34,60,-229,-232,-221,-83,-219,-68,-33,-32,-220,-225,-224,-222,-84,-226,-223,-228,-227,]),'PPPRAGMASTR':([61,],[124,]),'PLUSEQUAL':([132,133,134,136,138,139,140,141,143,144,145,148,152,153,154,156,160,161,163,164,166,167,168,169,176,191,224,230,232,234,235,236,237,238,261,263,268,273,310,402,403,404,405,407,411,478,480,482,483,487,547,551,565,],[-317,-321,-318,-303,-324,-330,-313,-319,-301,-274,-314,-327,-325,-304,-322,-302,-315,-289,-328,-316,-329,-320,-276,-323,-312,-336,362,-326,-280,-277,-334,-332,-331,-333,-298,-297,-279,-278,-312,-296,-295,-294,-293,-292,-305,-281,-282,-290,-291,-275,-306,-299,-300,]),'U32CHAR_CONST':([3,39,58,61,76,85,97,103,105,106,116,117,119,124,128,131,135,137,146,149,150,151,165,171,173,174,175,181,191,198,201,204,205,206,218,219,220,227,229,231,233,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,265,266,282,284,285,286,289,290,291,297,298,300,301,302,303,305,307,308,319,329,332,336,338,339,352,353,354,357,358,359,360,361,362,363,364,365,366,367,368,369,373,375,377,412,413,419,421,424,425,427,428,429,430,432,434,435,437,438,439,440,441,447,459,472,475,477,481,484,488,494,496,497,499,500,502,505,506,510,513,514,515,521,522,533,535,536,537,538,539,541,542,543,549,550,553,554,555,557,558,566,569,574,575,576,577,578,579,],[-128,-129,-130,-71,-131,138,-335,-28,-182,-27,138,-337,-87,-72,-337,138,-286,-285,138,138,-283,-287,-288,138,-284,138,138,138,-336,-183,138,138,-28,-337,138,-28,-337,-337,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,-337,-76,-79,-82,-75,138,-77,138,138,-81,-215,-214,-80,-216,138,-78,138,138,-69,-284,138,138,-284,138,138,-244,-247,-245,-241,-242,-246,-248,138,-250,-251,-243,-249,-12,138,138,-11,138,138,138,138,-234,-233,138,-231,138,138,-217,138,-230,138,-84,-218,138,138,138,-337,-337,-198,138,138,138,-337,-284,-229,-232,138,-221,138,-83,-219,-68,138,-28,-337,138,-11,138,138,-220,138,138,138,-284,138,138,138,-337,138,-225,-224,-222,-84,138,138,138,-226,-223,138,-228,-227,]),'CONDOP':([132,133,134,136,138,139,140,141,143,144,145,148,152,153,154,156,158,160,161,162,163,164,166,167,168,169,176,191,224,230,232,234,235,236,237,238,261,263,268,273,310,383,384,385,386,387,388,389,390,391,392,393,394,395,396,397,398,400,401,402,403,404,405,407,411,478,480,482,483,487,547,551,565,],[-317,-321,-318,-303,-324,-330,-313,-319,-301,-274,-314,-327,-325,-304,-322,-302,-255,-315,-289,258,-328,-316,-329,-320,-276,-323,-312,-336,-274,-326,-280,-277,-334,-332,-331,-333,-298,-297,-279,-278,-312,-261,-273,-262,-260,-264,-268,-263,-259,-266,-271,-257,-256,-265,-272,-267,-269,-270,-258,-296,-295,-294,-293,-292,-305,-281,-282,-290,-291,-275,-306,-299,-300,]),'U8STRING_LITERAL':([3,39,58,61,76,85,97,103,105,106,116,117,119,124,128,131,135,137,139,146,148,149,150,151,153,163,165,166,171,173,174,175,181,191,198,201,204,205,206,218,219,220,227,229,231,233,235,236,237,238,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,265,266,282,284,285,286,289,290,291,297,298,300,301,302,303,305,307,308,319,329,332,336,338,339,352,353,354,357,358,359,360,361,362,363,364,365,366,367,368,369,373,375,377,412,413,419,421,424,425,427,428,429,430,432,434,435,437,438,439,440,441,447,459,472,475,477,481,484,488,494,496,497,499,500,502,505,506,510,513,514,515,521,522,533,535,536,537,538,539,541,542,543,549,550,553,554,555,557,558,566,569,574,575,576,577,578,579,],[-128,-129,-130,-71,-131,163,-335,-28,-182,-27,163,-337,-87,-72,-337,163,-286,-285,-330,163,-327,163,-283,-287,236,-328,-288,-329,163,-284,163,163,163,-336,-183,163,163,-28,-337,163,-28,-337,-337,163,163,163,-334,-332,-331,-333,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,-337,-76,-79,-82,-75,163,-77,163,163,-81,-215,-214,-80,-216,163,-78,163,163,-69,-284,163,163,-284,163,163,-244,-247,-245,-241,-242,-246,-248,163,-250,-251,-243,-249,-12,163,163,-11,163,163,163,163,-234,-233,163,-231,163,163,-217,163,-230,163,-84,-218,163,163,163,-337,-337,-198,163,163,163,-337,-284,-229,-232,163,-221,163,-83,-219,-68,163,-28,-337,163,-11,163,163,-220,163,163,163,-284,163,163,163,-337,163,-225,-224,-222,-84,163,163,163,-226,-223,163,-228,-227,]),'BREAK':([61,97,119,124,181,191,284,285,286,289,291,298,300,301,302,303,305,307,308,332,424,425,428,429,432,435,437,438,439,440,496,497,500,502,505,506,510,535,536,537,539,554,555,557,558,569,574,575,576,577,578,579,],[-71,-335,-87,-72,304,-336,-76,-79,-82,-75,-77,304,-81,-215,-214,-80,-216,304,-78,-69,-234,-233,-231,304,-217,-230,304,-84,-218,304,-229,-232,-221,304,-83,-219,-68,304,-220,304,304,-225,-224,-222,-84,304,304,-226,-223,304,-228,-227,]),'VOLATILE':([0,1,2,3,4,5,6,7,10,11,12,13,14,16,17,18,19,20,21,22,23,25,26,27,29,30,33,34,35,36,38,39,42,43,44,45,46,47,48,49,50,52,53,54,55,56,58,59,60,61,62,63,65,68,71,75,76,80,81,82,85,86,87,89,90,93,95,96,97,98,99,100,101,103,105,109,111,117,118,119,123,124,128,129,142,147,172,174,177,180,181,182,184,185,186,187,188,189,190,191,192,198,200,205,206,211,219,220,223,229,231,233,239,240,241,267,269,275,278,279,280,282,284,285,286,289,291,298,300,301,302,303,305,308,312,313,314,315,316,317,318,328,332,340,341,342,350,422,424,425,427,428,432,435,437,438,439,442,443,446,448,449,453,454,459,460,496,497,500,505,506,510,511,512,514,515,536,554,555,557,558,575,576,578,579,],[58,58,-113,-128,58,-124,-110,-106,-104,-107,-125,-105,-64,-60,-67,-99,-66,-109,58,-120,-115,-65,-102,58,-131,-108,-238,-111,58,-122,-63,-129,-29,-121,-116,-62,-112,-70,-52,-123,-117,58,58,-119,58,-114,-130,58,-118,-71,-103,58,-131,-96,-98,58,-131,-95,-101,-97,58,-53,58,58,-88,58,58,-147,-335,-146,58,-167,-166,58,-182,-100,-126,58,58,-87,-61,-72,58,58,-144,-142,58,58,58,-73,58,-89,58,58,58,-149,-159,-160,-156,-336,58,-183,-30,58,58,58,58,58,-74,58,58,58,58,-174,-175,58,-143,-140,58,-141,-145,58,-76,-79,-82,-75,-77,58,-81,-215,-214,-80,-216,-78,-127,58,-153,58,-151,-148,-157,-168,-69,-36,-35,58,58,58,-234,-233,58,-231,-217,-230,-81,-84,-218,-152,-150,-158,-170,-169,-31,-34,58,58,-229,-232,-221,-83,-219,-68,-33,-32,58,58,-220,-225,-224,-222,-84,-226,-223,-228,-227,]),'PPPRAGMA':([0,14,16,17,19,25,38,45,47,59,61,97,99,119,123,124,180,181,184,185,186,188,189,190,191,223,284,285,286,289,291,298,300,301,302,303,305,307,308,313,315,318,332,424,425,428,429,432,435,437,438,439,440,446,496,497,500,502,505,506,510,535,536,537,539,554,555,557,558,569,574,575,576,577,578,579,],[61,-64,-60,-67,-66,-65,-63,-62,-70,61,-71,-335,61,-87,-61,-72,-73,61,61,61,61,-159,-160,-156,-336,-74,-76,-79,-82,-75,-77,61,-81,-215,-214,-80,-216,61,-78,61,61,-157,-69,-234,-233,-231,61,-217,-230,61,-84,-218,61,-158,-229,-232,-221,61,-83,-219,-68,61,-220,61,61,-225,-224,-222,-84,61,61,-226,-223,61,-228,-227,]),'INLINE':([0,1,2,3,4,5,6,7,10,11,12,13,14,16,17,18,19,20,21,22,23,25,26,27,29,30,33,34,36,38,39,42,43,44,45,46,47,48,49,50,52,53,54,55,56,58,59,60,61,62,63,65,68,71,75,76,80,81,82,86,87,89,90,93,96,97,98,100,101,109,111,118,119,123,124,129,180,181,182,187,191,200,211,223,240,241,278,284,285,286,289,291,298,300,301,302,303,305,308,312,314,316,317,328,332,340,341,342,350,422,424,425,427,428,432,435,437,438,439,442,443,448,449,453,454,460,496,497,500,505,506,510,511,512,536,554,555,557,558,575,576,578,579,],[30,30,-113,-128,30,-124,-110,-106,-104,-107,-125,-105,-64,-60,-67,-99,-66,-109,30,-120,-115,-65,-102,30,-131,-108,-238,-111,-122,-63,-129,-29,-121,-116,-62,-112,-70,-52,-123,-117,30,30,-119,30,-114,-130,30,-118,-71,-103,30,-131,-96,-98,30,-131,-95,-101,-97,-53,30,30,-88,30,-147,-335,-146,-167,-166,-100,-126,30,-87,-61,-72,30,-73,30,-89,-149,-336,-30,30,-74,-174,-175,30,-76,-79,-82,-75,-77,30,-81,-215,-214,-80,-216,-78,-127,-153,-151,-148,-168,-69,-36,-35,30,30,30,-234,-233,30,-231,-217,-230,-81,-84,-218,-152,-150,-170,-169,-31,-34,30,-229,-232,-221,-83,-219,-68,-33,-32,-220,-225,-224,-222,-84,-226,-223,-228,-227,]),'INT_CONST_BIN':([3,39,58,61,76,85,97,103,105,106,116,117,119,124,128,131,135,137,146,149,150,151,165,171,173,174,175,181,191,198,201,204,205,206,218,219,220,227,229,231,233,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,265,266,282,284,285,286,289,290,291,297,298,300,301,302,303,305,307,308,319,329,332,336,338,339,352,353,354,357,358,359,360,361,362,363,364,365,366,367,368,369,373,375,377,412,413,419,421,424,425,427,428,429,430,432,434,435,437,438,439,440,441,447,459,472,475,477,481,484,488,494,496,497,499,500,502,505,506,510,513,514,515,521,522,533,535,536,537,538,539,541,542,543,549,550,553,554,555,557,558,566,569,574,575,576,577,578,579,],[-128,-129,-130,-71,-131,164,-335,-28,-182,-27,164,-337,-87,-72,-337,164,-286,-285,164,164,-283,-287,-288,164,-284,164,164,164,-336,-183,164,164,-28,-337,164,-28,-337,-337,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,-337,-76,-79,-82,-75,164,-77,164,164,-81,-215,-214,-80,-216,164,-78,164,164,-69,-284,164,164,-284,164,164,-244,-247,-245,-241,-242,-246,-248,164,-250,-251,-243,-249,-12,164,164,-11,164,164,164,164,-234,-233,164,-231,164,164,-217,164,-230,164,-84,-218,164,164,164,-337,-337,-198,164,164,164,-337,-284,-229,-232,164,-221,164,-83,-219,-68,164,-28,-337,164,-11,164,164,-220,164,164,164,-284,164,164,164,-337,164,-225,-224,-222,-84,164,164,164,-226,-223,164,-228,-227,]),'DO':([61,97,119,124,181,191,284,285,286,289,291,298,300,301,302,303,305,307,308,332,424,425,428,429,432,435,437,438,439,440,496,497,500,502,505,506,510,535,536,537,539,554,555,557,558,569,574,575,576,577,578,579,],[-71,-335,-87,-72,307,-336,-76,-79,-82,-75,-77,307,-81,-215,-214,-80,-216,307,-78,-69,-234,-233,-231,307,-217,-230,307,-84,-218,307,-229,-232,-221,307,-83,-219,-68,307,-220,307,307,-225,-224,-222,-84,307,307,-226,-223,307,-228,-227,]),'LNOT':([3,39,58,61,76,85,97,103,105,106,116,117,119,124,128,131,135,137,146,149,150,151,165,171,173,174,175,181,191,198,201,204,205,206,218,219,220,227,229,231,233,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,265,266,282,284,285,286,289,290,291,297,298,300,301,302,303,305,307,308,319,329,332,336,338,339,352,353,354,357,358,359,360,361,362,363,364,365,366,367,368,369,373,375,377,412,413,419,421,424,425,427,428,429,430,432,434,435,437,438,439,440,441,447,459,472,475,477,481,484,488,494,496,497,499,500,502,505,506,510,513,514,515,521,522,533,535,536,537,538,539,541,542,543,549,550,553,554,555,557,558,566,569,574,575,576,577,578,579,],[-128,-129,-130,-71,-131,165,-335,-28,-182,-27,165,-337,-87,-72,-337,165,-286,-285,165,165,-283,-287,-288,165,-284,165,165,165,-336,-183,165,165,-28,-337,165,-28,-337,-337,165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,-337,-76,-79,-82,-75,165,-77,165,165,-81,-215,-214,-80,-216,165,-78,165,165,-69,-284,165,165,-284,165,165,-244,-247,-245,-241,-242,-246,-248,165,-250,-251,-243,-249,-12,165,165,-11,165,165,165,165,-234,-233,165,-231,165,165,-217,165,-230,165,-84,-218,165,165,165,-337,-337,-198,165,165,165,-337,-284,-229,-232,165,-221,165,-83,-219,-68,165,-28,-337,165,-11,165,165,-220,165,165,165,-284,165,165,165,-337,165,-225,-224,-222,-84,165,165,165,-226,-223,165,-228,-227,]),'CONST':([0,1,2,3,4,5,6,7,10,11,12,13,14,16,17,18,19,20,21,22,23,25,26,27,29,30,33,34,35,36,38,39,42,43,44,45,46,47,48,49,50,52,53,54,55,56,58,59,60,61,62,63,65,68,71,75,76,80,81,82,85,86,87,89,90,93,95,96,97,98,99,100,101,103,105,109,111,117,118,119,123,124,128,129,142,147,172,174,177,180,181,182,184,185,186,187,188,189,190,191,192,198,200,205,206,211,219,220,223,229,231,233,239,240,241,267,269,275,278,279,280,282,284,285,286,289,291,298,300,301,302,303,305,308,312,313,314,315,316,317,318,328,332,340,341,342,350,422,424,425,427,428,432,435,437,438,439,442,443,446,448,449,453,454,459,460,496,497,500,505,506,510,511,512,514,515,536,554,555,557,558,575,576,578,579,],[3,3,-113,-128,3,-124,-110,-106,-104,-107,-125,-105,-64,-60,-67,-99,-66,-109,3,-120,-115,-65,-102,3,-131,-108,-238,-111,3,-122,-63,-129,-29,-121,-116,-62,-112,-70,-52,-123,-117,3,3,-119,3,-114,-130,3,-118,-71,-103,3,-131,-96,-98,3,-131,-95,-101,-97,3,-53,3,3,-88,3,3,-147,-335,-146,3,-167,-166,3,-182,-100,-126,3,3,-87,-61,-72,3,3,-144,-142,3,3,3,-73,3,-89,3,3,3,-149,-159,-160,-156,-336,3,-183,-30,3,3,3,3,3,-74,3,3,3,3,-174,-175,3,-143,-140,3,-141,-145,3,-76,-79,-82,-75,-77,3,-81,-215,-214,-80,-216,-78,-127,3,-153,3,-151,-148,-157,-168,-69,-36,-35,3,3,3,-234,-233,3,-231,-217,-230,-81,-84,-218,-152,-150,-158,-170,-169,-31,-34,3,3,-229,-232,-221,-83,-219,-68,-33,-32,3,3,-220,-225,-224,-222,-84,-226,-223,-228,-227,]),'LSHIFT':([132,133,134,136,138,139,140,141,143,144,145,148,152,153,154,156,158,160,161,162,163,164,166,167,168,169,176,191,224,230,232,234,235,236,237,238,261,263,268,273,310,383,384,385,386,387,388,389,390,391,392,393,394,395,396,397,398,400,401,402,403,404,405,407,411,478,480,482,483,487,547,551,565,],[-317,-321,-318,-303,-324,-330,-313,-319,-301,-274,-314,-327,-325,-304,-322,-302,-255,-315,-289,244,-328,-316,-329,-320,-276,-323,-312,-336,-274,-326,-280,-277,-334,-332,-331,-333,-298,-297,-279,-278,-312,-261,244,-262,-260,244,244,244,-259,244,244,-257,-256,244,244,244,244,244,-258,-296,-295,-294,-293,-292,-305,-281,-282,-290,-291,-275,-306,-299,-300,]),'LOR':([132,133,134,136,138,139,140,141,143,144,145,148,152,153,154,156,158,160,161,162,163,164,166,167,168,169,176,191,224,230,232,234,235,236,237,238,261,263,268,273,310,383,384,385,386,387,388,389,390,391,392,393,394,395,396,397,398,400,401,402,403,404,405,407,411,478,480,482,483,487,547,551,565,],[-317,-321,-318,-303,-324,-330,-313,-319,-301,-274,-314,-327,-325,-304,-322,-302,-255,-315,-289,243,-328,-316,-329,-320,-276,-323,-312,-336,-274,-326,-280,-277,-334,-332,-331,-333,-298,-297,-279,-278,-312,-261,-273,-262,-260,-264,-268,-263,-259,-266,-271,-257,-256,-265,-272,-267,-269,-270,-258,-296,-295,-294,-293,-292,-305,-281,-282,-290,-291,-275,-306,-299,-300,]),'CHAR_CONST':([3,39,58,61,76,85,97,103,105,106,116,117,119,124,128,131,135,137,146,149,150,151,165,171,173,174,175,181,191,198,201,204,205,206,218,219,220,227,229,231,233,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,265,266,282,284,285,286,289,290,291,297,298,300,301,302,303,305,307,308,319,329,332,336,338,339,352,353,354,357,358,359,360,361,362,363,364,365,366,367,368,369,373,375,377,412,413,419,421,424,425,427,428,429,430,432,434,435,437,438,439,440,441,447,459,472,475,477,481,484,488,494,496,497,499,500,502,505,506,510,513,514,515,521,522,533,535,536,537,538,539,541,542,543,549,550,553,554,555,557,558,566,569,574,575,576,577,578,579,],[-128,-129,-130,-71,-131,167,-335,-28,-182,-27,167,-337,-87,-72,-337,167,-286,-285,167,167,-283,-287,-288,167,-284,167,167,167,-336,-183,167,167,-28,-337,167,-28,-337,-337,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,-337,-76,-79,-82,-75,167,-77,167,167,-81,-215,-214,-80,-216,167,-78,167,167,-69,-284,167,167,-284,167,167,-244,-247,-245,-241,-242,-246,-248,167,-250,-251,-243,-249,-12,167,167,-11,167,167,167,167,-234,-233,167,-231,167,167,-217,167,-230,167,-84,-218,167,167,167,-337,-337,-198,167,167,167,-337,-284,-229,-232,167,-221,167,-83,-219,-68,167,-28,-337,167,-11,167,167,-220,167,167,167,-284,167,167,167,-337,167,-225,-224,-222,-84,167,167,167,-226,-223,167,-228,-227,]),'U16STRING_LITERAL':([3,39,58,61,76,85,97,103,105,106,116,117,119,124,128,131,135,137,139,146,148,149,150,151,153,163,165,166,171,173,174,175,181,191,198,201,204,205,206,218,219,220,227,229,231,233,235,236,237,238,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,265,266,282,284,285,286,289,290,291,297,298,300,301,302,303,305,307,308,319,329,332,336,338,339,352,353,354,357,358,359,360,361,362,363,364,365,366,367,368,369,373,375,377,412,413,419,421,424,425,427,428,429,430,432,434,435,437,438,439,440,441,447,459,472,475,477,481,484,488,494,496,497,499,500,502,505,506,510,513,514,515,521,522,533,535,536,537,538,539,541,542,543,549,550,553,554,555,557,558,566,569,574,575,576,577,578,579,],[-128,-129,-130,-71,-131,166,-335,-28,-182,-27,166,-337,-87,-72,-337,166,-286,-285,-330,166,-327,166,-283,-287,238,-328,-288,-329,166,-284,166,166,166,-336,-183,166,166,-28,-337,166,-28,-337,-337,166,166,166,-334,-332,-331,-333,166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,-337,-76,-79,-82,-75,166,-77,166,166,-81,-215,-214,-80,-216,166,-78,166,166,-69,-284,166,166,-284,166,166,-244,-247,-245,-241,-242,-246,-248,166,-250,-251,-243,-249,-12,166,166,-11,166,166,166,166,-234,-233,166,-231,166,166,-217,166,-230,166,-84,-218,166,166,166,-337,-337,-198,166,166,166,-337,-284,-229,-232,166,-221,166,-83,-219,-68,166,-28,-337,166,-11,166,166,-220,166,166,166,-284,166,166,166,-337,166,-225,-224,-222,-84,166,166,166,-226,-223,166,-228,-227,]),'RBRACE':([61,97,99,119,124,132,133,134,136,138,139,140,141,143,144,145,148,152,153,154,156,158,160,161,162,163,164,166,167,168,169,176,178,181,184,185,186,188,189,190,191,195,196,197,224,225,227,228,230,232,234,235,236,237,238,261,263,268,273,284,285,286,289,291,298,300,301,302,303,305,306,308,309,313,315,318,325,326,327,332,370,374,377,383,384,385,386,387,388,389,390,391,392,393,394,395,396,397,398,400,401,402,403,404,405,407,411,424,425,428,432,435,437,438,439,446,450,451,468,469,472,473,476,478,480,482,483,487,496,497,500,505,506,510,523,524,528,536,546,547,550,551,554,555,557,558,565,575,576,578,579,],[-71,-335,191,-87,-72,-317,-321,-318,-303,-324,-330,-313,-319,-301,-274,-314,-327,-325,-304,-322,-302,-255,-315,-289,-253,-328,-316,-329,-320,-276,-323,-312,-252,-337,191,191,191,-159,-160,-156,-336,-171,191,-176,-274,-239,-337,-193,-326,-280,-277,-334,-332,-331,-333,-298,-297,-279,-278,-76,-79,-82,-75,-77,-6,-81,-215,-214,-80,-216,-5,-78,191,191,191,-157,191,191,-172,-69,191,-22,-21,-261,-273,-262,-260,-264,-268,-263,-259,-266,-271,-257,-256,-265,-272,-267,-269,-270,-258,-296,-295,-294,-293,-292,-305,-234,-233,-231,-217,-230,-81,-84,-218,-158,-173,-177,-240,-194,191,-196,-237,-281,-282,-290,-291,-275,-229,-232,-221,-83,-219,-68,-195,-254,191,-220,-197,-306,191,-299,-225,-224,-222,-84,-300,-226,-223,-228,-227,]),'_BOOL':([0,1,2,3,4,5,6,7,10,11,12,13,14,16,17,18,19,20,21,22,23,25,26,27,29,30,33,34,36,38,39,40,42,43,44,45,46,47,48,49,50,52,53,54,55,56,58,59,60,61,62,63,64,65,66,67,68,71,75,76,80,81,82,85,86,87,89,90,91,93,94,95,96,97,98,99,100,101,105,109,111,118,119,120,121,122,123,124,129,142,147,172,174,177,180,181,182,184,185,186,187,188,189,190,191,192,198,200,211,214,223,229,231,233,239,240,241,267,269,275,278,279,280,284,285,286,289,291,298,300,301,302,303,305,308,312,313,314,315,316,317,318,328,332,340,341,342,350,422,424,425,427,428,432,435,437,438,439,442,443,446,448,449,453,454,460,496,497,500,505,506,510,511,512,536,554,555,557,558,575,576,578,579,],[34,-337,-113,-128,34,-124,-110,-106,-104,-107,-125,-105,-64,-60,-67,-99,-66,-109,34,-120,-115,-65,-102,-126,-131,-108,-238,-111,-122,-63,-129,34,-29,-121,-116,-62,-112,-70,-52,-123,-117,-337,-337,-119,-337,-114,-130,34,-118,-71,-103,-337,-9,-131,-91,-10,-96,-98,34,-131,-95,-101,-97,34,-53,-126,34,-88,34,34,-93,34,-147,-335,-146,34,-167,-166,-182,-100,-126,34,-87,-90,-94,-92,-61,-72,34,-144,-142,34,34,34,-73,34,-89,34,34,34,-149,-159,-160,-156,-336,34,-183,-30,34,34,-74,34,34,34,34,-174,-175,34,-143,-140,34,-141,-145,-76,-79,-82,-75,-77,34,-81,-215,-214,-80,-216,-78,-127,34,-153,34,-151,-148,-157,-168,-69,-36,-35,34,34,34,-234,-233,34,-231,-217,-230,-81,-84,-218,-152,-150,-158,-170,-169,-31,-34,34,-229,-232,-221,-83,-219,-68,-33,-32,-220,-225,-224,-222,-84,-226,-223,-228,-227,]),'LE':([132,133,134,136,138,139,140,141,143,144,145,148,152,153,154,156,158,160,161,162,163,164,166,167,168,169,176,191,224,230,232,234,235,236,237,238,261,263,268,273,310,383,384,385,386,387,388,389,390,391,392,393,394,395,396,397,398,400,401,402,403,404,405,407,411,478,480,482,483,487,547,551,565,],[-317,-321,-318,-303,-324,-330,-313,-319,-301,-274,-314,-327,-325,-304,-322,-302,-255,-315,-289,246,-328,-316,-329,-320,-276,-323,-312,-336,-274,-326,-280,-277,-334,-332,-331,-333,-298,-297,-279,-278,-312,-261,246,-262,-260,-264,246,-263,-259,-266,246,-257,-256,-265,246,246,246,246,-258,-296,-295,-294,-293,-292,-305,-281,-282,-290,-291,-275,-306,-299,-300,]),'SEMI':([0,1,2,3,4,5,6,7,10,11,12,13,14,16,17,18,19,20,22,23,25,26,27,29,30,33,34,36,38,39,40,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,58,59,60,61,62,63,64,65,66,67,68,70,71,73,74,75,76,77,78,79,80,81,82,83,84,86,87,89,91,94,96,97,98,99,100,101,108,109,110,111,113,114,115,119,120,121,122,123,124,127,132,133,134,136,138,139,140,141,142,143,144,145,147,148,152,153,154,156,158,160,161,162,163,164,166,167,168,169,176,178,179,180,181,184,185,186,187,188,189,190,191,192,200,216,217,223,224,225,226,228,230,232,234,235,236,237,238,240,241,261,263,268,269,272,273,275,279,280,284,285,286,288,289,290,291,293,294,298,300,301,302,303,304,305,306,307,308,310,312,313,314,315,316,317,318,320,321,322,323,324,328,330,331,332,340,341,355,356,383,384,385,386,387,388,389,390,391,392,393,394,395,396,397,398,400,401,402,403,404,405,407,411,423,424,425,426,427,428,429,432,433,435,437,438,439,440,442,443,444,446,448,449,453,454,464,465,468,469,476,478,480,482,483,486,487,496,497,498,499,500,502,505,506,508,509,510,511,512,518,519,523,524,533,534,535,536,537,539,547,551,552,554,555,557,558,565,568,569,574,575,576,577,578,579,],[19,-337,-113,-128,-337,-124,-110,-106,-104,-107,-125,-105,-64,-60,-67,-99,-66,-109,-120,-115,-65,-102,-126,-131,-108,-238,-111,-122,-63,-129,-337,-29,-121,-116,-62,-112,-70,-52,-123,-117,119,-337,-337,-119,-337,-114,-130,19,-118,-71,-103,-337,-9,-131,-91,-10,-96,-20,-98,-54,-179,-178,-131,-37,-134,-85,-95,-101,-97,-19,-132,-53,-126,-337,-337,-93,-147,-335,-146,188,-167,-166,-136,-100,-138,-126,-16,-86,-15,-87,-90,-94,-92,-61,-72,-55,-317,-321,-318,-303,-324,-330,-313,-319,-144,-301,-274,-314,-142,-327,-325,-304,-322,-302,-255,-315,-289,-253,-328,-316,-329,-320,-276,-323,-312,-252,-178,-73,-337,188,188,188,-149,-159,-160,-156,-336,-337,-30,-38,-133,-74,-274,-239,-135,-193,-326,-280,-277,-334,-332,-331,-333,-174,-175,-298,-297,-279,-143,-235,-278,-140,-141,-145,-76,-79,-82,424,-75,425,-77,428,-14,-337,-81,-215,-214,-80,435,-216,-13,-337,-78,-312,-127,188,-153,188,-151,-148,-157,-26,-25,446,-161,-163,-168,-139,-137,-69,-36,-35,-44,-43,-261,-273,-262,-260,-264,-268,-263,-259,-266,-271,-257,-256,-265,-272,-267,-269,-270,-258,-296,-295,-294,-293,-292,-305,496,-234,-233,497,-337,-231,-337,-217,-13,-230,-81,-84,-218,-337,-152,-150,-165,-158,-170,-169,-31,-34,-39,-42,-240,-194,-237,-281,-282,-290,-291,-236,-275,-229,-232,533,-337,-221,-337,-83,-219,-162,-164,-68,-33,-32,-41,-40,-195,-254,-337,553,-337,-220,-337,-337,-306,-299,566,-225,-224,-222,-84,-300,575,-337,-337,-226,-223,-337,-228,-227,]),'_THREAD_LOCAL':([0,1,2,3,4,5,6,7,10,11,12,13,14,16,17,18,19,20,21,22,23,25,26,27,29,30,33,34,36,38,39,42,43,44,45,46,47,48,49,50,52,53,54,55,56,58,59,60,61,62,63,65,68,71,75,76,80,81,82,86,87,89,90,93,96,97,98,100,101,109,111,118,119,123,124,129,180,181,182,187,191,200,211,223,240,241,278,284,285,286,289,291,298,300,301,302,303,305,308,312,314,316,317,328,332,340,341,342,350,422,424,425,427,428,432,435,437,438,439,442,443,448,449,453,454,460,496,497,500,505,506,510,511,512,536,554,555,557,558,575,576,578,579,],[11,11,-113,-128,11,-124,-110,-106,-104,-107,-125,-105,-64,-60,-67,-99,-66,-109,11,-120,-115,-65,-102,11,-131,-108,-238,-111,-122,-63,-129,-29,-121,-116,-62,-112,-70,-52,-123,-117,11,11,-119,11,-114,-130,11,-118,-71,-103,11,-131,-96,-98,11,-131,-95,-101,-97,-53,11,11,-88,11,-147,-335,-146,-167,-166,-100,-126,11,-87,-61,-72,11,-73,11,-89,-149,-336,-30,11,-74,-174,-175,11,-76,-79,-82,-75,-77,11,-81,-215,-214,-80,-216,-78,-127,-153,-151,-148,-168,-69,-36,-35,11,11,11,-234,-233,11,-231,-217,-230,-81,-84,-218,-152,-150,-170,-169,-31,-34,11,-229,-232,-221,-83,-219,-68,-33,-32,-220,-225,-224,-222,-84,-226,-223,-228,-227,]),'LT':([132,133,134,136,138,139,140,141,143,144,145,148,152,153,154,156,158,160,161,162,163,164,166,167,168,169,176,191,224,230,232,234,235,236,237,238,261,263,268,273,310,383,384,385,386,387,388,389,390,391,392,393,394,395,396,397,398,400,401,402,403,404,405,407,411,478,480,482,483,487,547,551,565,],[-317,-321,-318,-303,-324,-330,-313,-319,-301,-274,-314,-327,-325,-304,-322,-302,-255,-315,-289,248,-328,-316,-329,-320,-276,-323,-312,-336,-274,-326,-280,-277,-334,-332,-331,-333,-298,-297,-279,-278,-312,-261,248,-262,-260,-264,248,-263,-259,-266,248,-257,-256,-265,248,248,248,248,-258,-296,-295,-294,-293,-292,-305,-281,-282,-290,-291,-275,-306,-299,-300,]),'COMMA':([2,3,5,6,7,10,11,12,13,18,20,22,23,26,27,30,33,34,35,36,39,42,43,44,46,48,49,50,54,56,58,60,62,68,70,71,73,74,75,76,77,78,80,81,82,84,86,96,98,100,101,103,104,105,106,108,109,110,111,113,127,132,133,134,136,138,139,140,141,142,143,144,145,147,148,152,153,154,156,158,160,161,162,163,164,166,167,168,169,176,177,178,179,187,191,195,196,197,198,199,200,203,210,211,212,213,215,216,217,224,225,226,228,230,232,234,235,236,237,238,240,241,261,263,268,269,270,272,273,274,275,276,277,279,280,281,283,294,310,312,314,316,317,320,323,324,325,326,327,328,330,331,340,341,343,344,345,346,347,348,355,356,374,383,384,385,386,387,388,389,390,391,392,393,394,395,396,397,398,399,400,401,402,403,404,405,406,407,408,409,410,411,414,426,442,443,444,448,449,450,451,453,454,458,461,463,464,465,468,469,473,476,478,480,482,483,486,487,489,490,492,501,503,507,508,509,511,512,518,519,523,524,525,528,529,530,531,532,544,545,546,547,551,556,559,560,564,565,570,571,],[-113,-128,-124,-110,-106,-104,-107,-125,-105,-99,-109,-120,-115,-102,-126,-108,-238,-111,-337,-122,-129,-29,-121,-116,-112,-52,-123,-117,-119,-114,-130,-118,-103,-96,126,-98,-54,-179,-178,-131,-37,-134,-95,-101,-97,-132,-53,-147,-146,-167,-166,-28,-180,-182,-27,-136,-100,-138,-126,202,-55,-317,-321,-318,-303,-324,-330,-313,-319,-144,-301,-274,-314,-142,-327,-325,-304,-322,-302,-255,-315,-289,-253,-328,-316,-329,-320,-276,-323,-312,-337,-252,-178,-149,-336,-171,327,-176,-183,-181,-30,333,-186,-337,349,350,-191,-38,-133,-274,-239,-135,-193,-326,-280,-277,-334,-332,-331,-333,-174,-175,-298,-297,-279,-143,412,-235,-278,-203,-140,-204,-1,-141,-145,-2,-206,412,-312,-127,-153,-151,-148,445,-161,-163,327,327,-172,-168,-139,-137,-36,-35,-190,-204,-56,-188,-45,-189,-44,-43,472,-261,-273,-262,-260,-264,-268,-263,-259,-266,-271,-257,-256,-265,-272,-267,-269,412,-270,-258,-296,-295,-294,-293,412,-292,-310,484,485,-305,-205,412,-152,-150,-165,-170,-169,-173,-177,-31,-34,-57,-192,-187,-39,-42,-240,-194,-196,-237,-281,-282,-290,-291,-236,-275,-213,-207,-211,412,412,412,-162,-164,-33,-32,-41,-40,-195,-254,-311,550,-209,-208,-210,-212,-51,-50,-197,-306,-299,412,-46,-49,412,-300,-48,-47,]),'U16CHAR_CONST':([3,39,58,61,76,85,97,103,105,106,116,117,119,124,128,131,135,137,146,149,150,151,165,171,173,174,175,181,191,198,201,204,205,206,218,219,220,227,229,231,233,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,265,266,282,284,285,286,289,290,291,297,298,300,301,302,303,305,307,308,319,329,332,336,338,339,352,353,354,357,358,359,360,361,362,363,364,365,366,367,368,369,373,375,377,412,413,419,421,424,425,427,428,429,430,432,434,435,437,438,439,440,441,447,459,472,475,477,481,484,488,494,496,497,499,500,502,505,506,510,513,514,515,521,522,533,535,536,537,538,539,541,542,543,549,550,553,554,555,557,558,566,569,574,575,576,577,578,579,],[-128,-129,-130,-71,-131,169,-335,-28,-182,-27,169,-337,-87,-72,-337,169,-286,-285,169,169,-283,-287,-288,169,-284,169,169,169,-336,-183,169,169,-28,-337,169,-28,-337,-337,169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,-337,-76,-79,-82,-75,169,-77,169,169,-81,-215,-214,-80,-216,169,-78,169,169,-69,-284,169,169,-284,169,169,-244,-247,-245,-241,-242,-246,-248,169,-250,-251,-243,-249,-12,169,169,-11,169,169,169,169,-234,-233,169,-231,169,169,-217,169,-230,169,-84,-218,169,169,169,-337,-337,-198,169,169,169,-337,-284,-229,-232,169,-221,169,-83,-219,-68,169,-28,-337,169,-11,169,169,-220,169,169,169,-284,169,169,169,-337,169,-225,-224,-222,-84,169,169,169,-226,-223,169,-228,-227,]),'OFFSETOF':([3,39,58,61,76,85,97,103,105,106,116,117,119,124,128,131,135,137,146,149,150,151,165,171,173,174,175,181,191,198,201,204,205,206,218,219,220,227,229,231,233,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,265,266,282,284,285,286,289,290,291,297,298,300,301,302,303,305,307,308,319,329,332,336,338,339,352,353,354,357,358,359,360,361,362,363,364,365,366,367,368,369,373,375,377,412,413,419,421,424,425,427,428,429,430,432,434,435,437,438,439,440,441,447,459,472,475,477,481,484,488,494,496,497,499,500,502,505,506,510,513,514,515,521,522,533,535,536,537,538,539,541,542,543,549,550,553,554,555,557,558,566,569,574,575,576,577,578,579,],[-128,-129,-130,-71,-131,170,-335,-28,-182,-27,170,-337,-87,-72,-337,170,-286,-285,170,170,-283,-287,-288,170,-284,170,170,170,-336,-183,170,170,-28,-337,170,-28,-337,-337,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,-337,-76,-79,-82,-75,170,-77,170,170,-81,-215,-214,-80,-216,170,-78,170,170,-69,-284,170,170,-284,170,170,-244,-247,-245,-241,-242,-246,-248,170,-250,-251,-243,-249,-12,170,170,-11,170,170,170,170,-234,-233,170,-231,170,170,-217,170,-230,170,-84,-218,170,170,170,-337,-337,-198,170,170,170,-337,-284,-229,-232,170,-221,170,-83,-219,-68,170,-28,-337,170,-11,170,170,-220,170,170,170,-284,170,170,170,-337,170,-225,-224,-222,-84,170,170,170,-226,-223,170,-228,-227,]),'_ATOMIC':([0,1,2,3,4,5,6,7,10,11,12,13,14,16,17,18,19,20,21,22,23,25,26,27,29,30,33,34,35,36,38,39,40,42,43,44,45,46,47,48,49,50,52,53,54,55,56,58,59,60,61,62,63,64,65,66,67,68,71,75,76,80,81,82,85,86,87,89,90,91,93,94,95,96,97,98,99,100,101,103,105,109,111,117,118,119,120,121,122,123,124,128,129,142,147,172,174,177,180,181,182,184,185,186,187,188,189,190,191,192,198,200,205,206,211,214,219,220,223,229,231,233,239,240,241,267,269,275,278,279,280,282,284,285,286,289,291,298,300,301,302,303,305,308,312,313,314,315,316,317,318,328,332,340,341,342,350,422,424,425,427,428,432,435,437,438,439,442,443,446,448,449,453,454,459,460,496,497,500,505,506,510,511,512,514,515,536,554,555,557,558,575,576,578,579,],[29,65,-113,-128,76,-124,-110,-106,-104,-107,-125,-105,-64,-60,-67,-99,-66,-109,65,-120,-115,-65,-102,65,-131,-108,-238,-111,76,-122,-63,-129,112,-29,-121,-116,-62,-112,-70,-52,-123,-117,65,65,-119,65,-114,-130,29,-118,-71,-103,65,-9,-131,-91,-10,-96,-98,65,-131,-95,-101,-97,29,-53,65,76,-88,112,65,-93,29,-147,-335,-146,29,-167,-166,76,-182,-100,-126,76,29,-87,-90,-94,-92,-61,-72,76,29,-144,-142,65,29,76,-73,65,-89,29,29,29,-149,-159,-160,-156,-336,76,-183,-30,76,76,76,112,76,76,-74,29,29,29,29,-174,-175,29,-143,-140,29,-141,-145,76,-76,-79,-82,-75,-77,65,-81,-215,-214,-80,-216,-78,-127,29,-153,29,-151,-148,-157,-168,-69,-36,-35,29,29,29,-234,-233,65,-231,-217,-230,-81,-84,-218,-152,-150,-158,-170,-169,-31,-34,76,29,-229,-232,-221,-83,-219,-68,-33,-32,76,76,-220,-225,-224,-222,-84,-226,-223,-228,-227,]),'TYPEDEF':([0,1,2,3,4,5,6,7,10,11,12,13,14,16,17,18,19,20,21,22,23,25,26,27,29,30,33,34,36,38,39,42,43,44,45,46,47,48,49,50,52,53,54,55,56,58,59,60,61,62,63,65,68,71,75,76,80,81,82,86,87,89,90,93,96,97,98,100,101,109,111,118,119,123,124,129,180,181,182,187,191,200,211,223,240,241,278,284,285,286,289,291,298,300,301,302,303,305,308,312,314,316,317,328,332,340,341,342,350,422,424,425,427,428,432,435,437,438,439,442,443,448,449,453,454,460,496,497,500,505,506,510,511,512,536,554,555,557,558,575,576,578,579,],[7,7,-113,-128,7,-124,-110,-106,-104,-107,-125,-105,-64,-60,-67,-99,-66,-109,7,-120,-115,-65,-102,7,-131,-108,-238,-111,-122,-63,-129,-29,-121,-116,-62,-112,-70,-52,-123,-117,7,7,-119,7,-114,-130,7,-118,-71,-103,7,-131,-96,-98,7,-131,-95,-101,-97,-53,7,7,-88,7,-147,-335,-146,-167,-166,-100,-126,7,-87,-61,-72,7,-73,7,-89,-149,-336,-30,7,-74,-174,-175,7,-76,-79,-82,-75,-77,7,-81,-215,-214,-80,-216,-78,-127,-153,-151,-148,-168,-69,-36,-35,7,7,7,-234,-233,7,-231,-217,-230,-81,-84,-218,-152,-150,-170,-169,-31,-34,7,-229,-232,-221,-83,-219,-68,-33,-32,-220,-225,-224,-222,-84,-226,-223,-228,-227,]),'XOR':([132,133,134,136,138,139,140,141,143,144,145,148,152,153,154,156,158,160,161,162,163,164,166,167,168,169,176,191,224,230,232,234,235,236,237,238,261,263,268,273,310,383,384,385,386,387,388,389,390,391,392,393,394,395,396,397,398,400,401,402,403,404,405,407,411,478,480,482,483,487,547,551,565,],[-317,-321,-318,-303,-324,-330,-313,-319,-301,-274,-314,-327,-325,-304,-322,-302,-255,-315,-289,251,-328,-316,-329,-320,-276,-323,-312,-336,-274,-326,-280,-277,-334,-332,-331,-333,-298,-297,-279,-278,-312,-261,251,-262,-260,-264,-268,-263,-259,-266,-271,-257,-256,-265,251,-267,-269,251,-258,-296,-295,-294,-293,-292,-305,-281,-282,-290,-291,-275,-306,-299,-300,]),'AUTO':([0,1,2,3,4,5,6,7,10,11,12,13,14,16,17,18,19,20,21,22,23,25,26,27,29,30,33,34,36,38,39,42,43,44,45,46,47,48,49,50,52,53,54,55,56,58,59,60,61,62,63,65,68,71,75,76,80,81,82,86,87,89,90,93,96,97,98,100,101,109,111,118,119,123,124,129,180,181,182,187,191,200,211,223,240,241,278,284,285,286,289,291,298,300,301,302,303,305,308,312,314,316,317,328,332,340,341,342,350,422,424,425,427,428,432,435,437,438,439,442,443,448,449,453,454,460,496,497,500,505,506,510,511,512,536,554,555,557,558,575,576,578,579,],[26,26,-113,-128,26,-124,-110,-106,-104,-107,-125,-105,-64,-60,-67,-99,-66,-109,26,-120,-115,-65,-102,26,-131,-108,-238,-111,-122,-63,-129,-29,-121,-116,-62,-112,-70,-52,-123,-117,26,26,-119,26,-114,-130,26,-118,-71,-103,26,-131,-96,-98,26,-131,-95,-101,-97,-53,26,26,-88,26,-147,-335,-146,-167,-166,-100,-126,26,-87,-61,-72,26,-73,26,-89,-149,-336,-30,26,-74,-174,-175,26,-76,-79,-82,-75,-77,26,-81,-215,-214,-80,-216,-78,-127,-153,-151,-148,-168,-69,-36,-35,26,26,26,-234,-233,26,-231,-217,-230,-81,-84,-218,-152,-150,-170,-169,-31,-34,26,-229,-232,-221,-83,-219,-68,-33,-32,-220,-225,-224,-222,-84,-226,-223,-228,-227,]),'DIVEQUAL':([132,133,134,136,138,139,140,141,143,144,145,148,152,153,154,156,160,161,163,164,166,167,168,169,176,191,224,230,232,234,235,236,237,238,261,263,268,273,310,402,403,404,405,407,411,478,480,482,483,487,547,551,565,],[-317,-321,-318,-303,-324,-330,-313,-319,-301,-274,-314,-327,-325,-304,-322,-302,-315,-289,-328,-316,-329,-320,-276,-323,-312,-336,357,-326,-280,-277,-334,-332,-331,-333,-298,-297,-279,-278,-312,-296,-295,-294,-293,-292,-305,-281,-282,-290,-291,-275,-306,-299,-300,]),'TIMES':([0,1,2,3,4,5,6,7,10,11,12,13,14,16,17,18,19,20,22,23,25,26,27,29,30,33,34,35,36,37,38,39,40,43,44,45,46,47,49,50,52,53,54,55,56,58,59,60,61,62,63,64,65,66,67,68,69,71,76,80,81,82,85,87,89,91,94,96,97,98,100,101,103,104,105,106,109,111,116,117,119,120,121,122,123,124,126,128,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,156,158,160,161,162,163,164,165,166,167,168,169,171,173,174,175,176,177,180,181,187,191,192,198,201,202,204,205,206,211,218,219,220,223,224,227,229,230,231,232,233,234,235,236,237,238,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,261,263,265,266,268,269,273,275,278,279,280,282,284,285,286,289,290,291,297,298,300,301,302,303,305,307,308,310,312,314,316,317,319,328,329,332,336,338,339,342,352,353,354,357,358,359,360,361,362,363,364,365,366,367,368,369,373,375,377,383,384,385,386,387,388,389,390,391,392,393,394,395,396,397,398,400,401,402,403,404,405,407,411,412,413,419,421,424,425,427,428,429,430,432,434,435,437,438,439,440,441,442,443,445,447,448,449,459,472,475,477,478,480,481,482,483,484,487,488,494,496,497,499,500,502,505,506,510,513,514,515,521,522,533,535,536,537,538,539,541,542,543,547,549,550,551,553,554,555,557,558,565,566,569,574,575,576,577,578,579,],[35,-337,-113,-128,35,-124,-110,-106,-104,-107,-125,-105,-64,-60,-67,-99,-66,-109,-120,-115,-65,-102,-126,-131,-108,-238,-111,-337,-122,35,-63,-129,35,-121,-116,-62,-112,-70,-123,-117,-337,-337,-119,-337,-114,-130,35,-118,-71,-103,-337,-9,-131,-91,-10,-96,35,-98,-131,-95,-101,-97,173,-126,35,35,-93,-147,-335,-146,-167,-166,-28,35,-182,-27,-100,-126,173,-337,-87,-90,-94,-92,-61,-72,35,-337,173,-317,-321,-318,-286,-303,-285,-324,-330,-313,-319,-144,-301,-274,-314,173,-142,-327,173,-283,-287,-325,-304,-322,-302,-255,-315,-289,253,-328,-316,-288,-329,-320,-276,-323,173,-284,173,173,-312,35,-73,173,-149,-336,35,-183,173,35,336,-28,-337,35,352,-28,-337,-74,-274,-337,173,-326,173,-280,173,-277,-334,-332,-331,-333,-174,-175,173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,-298,-297,173,173,-279,-143,-278,-140,35,-141,-145,420,-76,-79,-82,-75,173,-77,173,173,-81,-215,-214,-80,-216,173,-78,-312,-127,-153,-151,-148,173,-168,173,-69,-284,173,173,35,-284,173,173,-244,-247,-245,-241,-242,-246,-248,173,-250,-251,-243,-249,-12,173,173,-11,253,253,253,253,253,253,253,253,253,253,-257,-256,253,253,253,253,253,-258,-296,-295,-294,-293,-292,-305,173,173,173,494,-234,-233,173,-231,173,173,-217,173,-230,173,-84,-218,173,173,-152,-150,35,173,-170,-169,-337,-337,-198,173,-281,-282,173,-290,-291,173,-275,-337,-284,-229,-232,173,-221,173,-83,-219,-68,541,-28,-337,173,-11,173,173,-220,173,173,173,-284,173,173,-306,173,-337,-299,173,-225,-224,-222,-84,-300,173,173,173,-226,-223,173,-228,-227,]),'LPAREN':([0,1,2,3,4,5,6,7,8,10,11,12,13,14,15,16,17,18,19,20,22,23,25,26,27,29,30,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,52,53,54,55,56,58,59,60,61,62,63,64,65,66,67,68,69,71,72,73,76,77,80,81,82,85,86,87,89,91,94,96,97,98,100,101,103,104,105,106,109,111,112,116,117,119,120,121,122,123,124,126,127,128,131,132,133,134,135,136,137,138,139,140,141,142,143,145,146,147,148,149,150,151,152,153,154,155,156,160,161,163,164,165,166,167,168,169,170,171,173,174,175,176,177,180,181,187,191,192,198,199,200,201,202,204,205,206,211,216,218,219,220,223,227,229,230,231,233,235,236,237,238,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,261,263,265,266,269,275,276,278,279,280,282,283,284,285,286,289,290,291,292,296,297,298,299,300,301,302,303,305,307,308,310,311,312,314,316,317,319,328,329,332,336,338,339,340,341,342,344,345,347,352,353,354,355,356,357,358,359,360,361,362,363,364,365,366,367,368,369,373,375,377,402,403,404,405,407,411,412,413,414,419,421,424,425,427,428,429,430,432,434,435,437,438,439,440,441,442,443,445,447,448,449,453,454,457,458,459,464,465,472,475,477,481,482,483,484,488,489,490,492,494,496,497,499,500,502,504,505,506,510,511,512,513,514,515,518,519,521,522,529,530,531,532,533,535,536,537,538,539,541,542,543,544,545,547,549,550,551,553,554,555,557,558,559,560,565,566,569,570,571,574,575,576,577,578,579,],[37,-337,-113,-128,69,-124,-110,-106,85,-104,-107,-125,-105,-64,37,-60,-67,-99,-66,-109,-120,-115,-65,-102,-126,95,-108,-238,-111,-337,-122,37,-63,-129,37,116,-29,-121,-116,-62,-112,-70,118,-123,-117,-337,-337,-119,-337,-114,-130,37,-118,-71,-103,-337,-9,95,-91,-10,-96,69,-98,69,129,-131,-37,-95,-101,-97,174,118,-126,69,37,-93,-147,-335,-146,-167,-166,-28,-180,-182,-27,-100,-126,95,174,-337,-87,-90,-94,-92,-61,-72,69,129,-337,229,-317,-321,-318,-286,-303,-285,-324,-330,-313,-319,-144,-301,-314,231,-142,-327,233,-283,-287,-325,-304,-322,239,-302,-315,-289,-328,-316,-288,-329,-320,266,-323,267,174,-284,229,233,-312,278,-73,229,-149,-336,69,-183,-181,-30,229,69,229,-28,-337,342,-38,229,-28,-337,-74,-337,229,-326,229,229,-334,-332,-331,-333,-174,-175,174,174,174,174,174,174,174,174,174,174,174,174,174,174,174,174,229,174,174,-298,-297,229,229,-143,-140,278,278,-141,-145,-337,422,-76,-79,-82,-75,229,-77,427,430,174,229,434,-81,-215,-214,-80,-216,229,-78,-312,441,-127,-153,-151,-148,174,-168,174,-69,-284,229,229,-36,-35,342,342,460,-45,-284,229,229,-44,-43,-244,-247,-245,-241,-242,-246,-248,229,-250,-251,-243,-249,-12,174,229,-11,-296,-295,-294,-293,-292,-305,229,174,422,229,229,-234,-233,229,-231,229,229,-217,229,-230,229,-84,-218,229,229,-152,-150,69,174,-170,-169,-31,-34,342,460,-337,-39,-42,-337,-198,174,174,-290,-291,229,-337,-213,-207,-211,-284,-229,-232,229,-221,229,538,-83,-219,-68,-33,-32,229,-28,-337,-41,-40,229,-11,-209,-208,-210,-212,229,229,-220,229,229,229,-284,229,229,-51,-50,-306,229,-337,-299,229,-225,-224,-222,-84,-46,-49,-300,229,229,-48,-47,229,-226,-223,229,-228,-227,]),'MINUSMINUS':([3,39,58,61,76,85,97,103,105,106,116,117,119,124,128,131,132,133,134,135,136,137,138,139,140,141,143,145,146,148,149,150,151,152,153,154,156,160,161,163,164,165,166,167,168,169,171,173,174,175,176,181,191,198,201,204,205,206,218,219,220,227,229,230,231,233,235,236,237,238,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,261,263,265,266,282,284,285,286,289,290,291,297,298,300,301,302,303,305,307,308,310,319,329,332,336,338,339,352,353,354,357,358,359,360,361,362,363,364,365,366,367,368,369,373,375,377,402,403,404,405,407,411,412,413,419,421,424,425,427,428,429,430,432,434,435,437,438,439,440,441,447,459,472,475,477,481,482,483,484,488,494,496,497,499,500,502,505,506,510,513,514,515,521,522,533,535,536,537,538,539,541,542,543,547,549,550,551,553,554,555,557,558,565,566,569,574,575,576,577,578,579,],[-128,-129,-130,-71,-131,175,-335,-28,-182,-27,175,-337,-87,-72,-337,175,-317,-321,-318,-286,-303,-285,-324,-330,-313,-319,-301,-314,175,-327,175,-283,-287,-325,-304,-322,-302,-315,-289,-328,-316,-288,-329,-320,261,-323,175,-284,175,175,-312,175,-336,-183,175,175,-28,-337,175,-28,-337,-337,175,-326,175,175,-334,-332,-331,-333,175,175,175,175,175,175,175,175,175,175,175,175,175,175,175,175,175,175,175,-298,-297,175,175,-337,-76,-79,-82,-75,175,-77,175,175,-81,-215,-214,-80,-216,175,-78,-312,175,175,-69,-284,175,175,-284,175,175,-244,-247,-245,-241,-242,-246,-248,175,-250,-251,-243,-249,-12,175,175,-11,-296,-295,-294,-293,-292,-305,175,175,175,175,-234,-233,175,-231,175,175,-217,175,-230,175,-84,-218,175,175,175,-337,-337,-198,175,175,-290,-291,175,-337,-284,-229,-232,175,-221,175,-83,-219,-68,175,-28,-337,175,-11,175,175,-220,175,175,175,-284,175,175,-306,175,-337,-299,175,-225,-224,-222,-84,-300,175,175,175,-226,-223,175,-228,-227,]),'ID':([0,1,2,3,4,5,6,7,10,11,12,13,14,15,16,17,18,19,20,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,43,44,45,46,47,49,50,52,53,54,55,56,58,59,60,61,62,63,64,65,66,67,68,69,71,72,76,80,81,82,85,87,89,91,94,96,97,98,100,101,102,103,104,105,106,109,111,116,117,118,119,120,121,122,123,124,126,128,129,131,135,137,142,146,147,149,150,151,165,171,173,174,175,180,181,187,191,192,193,194,198,199,201,202,204,205,206,211,218,219,220,223,227,229,231,233,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,262,264,265,266,269,275,279,280,282,284,285,286,287,289,290,291,297,298,300,301,302,303,305,307,308,312,314,316,317,319,327,328,329,332,336,338,339,342,344,349,352,353,354,357,358,359,360,361,362,363,364,365,366,367,368,369,372,373,375,377,412,413,419,421,424,425,427,428,429,430,432,434,435,437,438,439,440,441,442,443,445,447,448,449,457,459,460,472,475,477,481,484,485,488,494,496,497,499,500,502,505,506,510,513,514,515,521,522,533,535,536,537,538,539,541,542,543,548,549,550,553,554,555,557,558,566,569,574,575,576,577,578,579,],[42,-337,-113,-128,42,-124,-110,-106,-104,-107,-125,-105,-64,42,-60,-67,-99,-66,-109,-120,-115,-154,-65,-102,-126,-155,-131,-108,98,101,-238,-111,-337,-122,42,-63,-129,42,-121,-116,-62,-112,-70,-123,-117,-337,-337,-119,-337,-114,-130,42,-118,-71,-103,-337,-9,-131,-91,-10,-96,42,-98,42,-131,-95,-101,-97,176,-126,42,42,-93,-147,-335,-146,-167,-166,197,-28,-180,-182,-27,-100,-126,176,-337,176,-87,-90,-94,-92,-61,-72,42,-337,176,176,-286,-285,-144,176,-142,176,-283,-287,-288,176,-284,176,176,-73,310,-149,-336,42,197,197,-183,-181,176,42,176,-28,-337,42,176,-28,-337,-74,-337,176,176,176,-174,-175,176,176,176,176,176,176,176,176,176,176,176,176,176,176,176,176,176,176,176,403,405,176,176,-143,-140,-141,-145,-337,-76,-79,-82,423,-75,176,-77,176,310,-81,-215,-214,-80,-216,310,-78,-127,-153,-151,-148,176,197,-168,176,-69,-284,176,176,42,42,176,-284,176,176,-244,-247,-245,-241,-242,-246,-248,176,-250,-251,-243,-249,-12,176,176,176,-11,176,176,176,176,-234,-233,176,-231,310,176,-217,176,-230,310,-84,-218,310,176,-152,-150,42,176,-170,-169,42,-337,176,-337,-198,176,176,176,176,-337,-284,-229,-232,176,-221,310,-83,-219,-68,176,-28,-337,176,-11,176,310,-220,310,176,310,-284,176,176,176,176,-337,176,-225,-224,-222,-84,176,310,310,-226,-223,310,-228,-227,]),'IF':([61,97,119,124,181,191,284,285,286,289,291,298,300,301,302,303,305,307,308,332,424,425,428,429,432,435,437,438,439,440,496,497,500,502,505,506,510,535,536,537,539,554,555,557,558,569,574,575,576,577,578,579,],[-71,-335,-87,-72,311,-336,-76,-79,-82,-75,-77,311,-81,-215,-214,-80,-216,311,-78,-69,-234,-233,-231,311,-217,-230,311,-84,-218,311,-229,-232,-221,311,-83,-219,-68,311,-220,311,311,-225,-224,-222,-84,311,311,-226,-223,311,-228,-227,]),'STRING_LITERAL':([3,39,58,61,76,85,97,103,105,106,116,117,119,124,128,131,135,136,137,146,149,150,151,152,165,171,173,174,175,181,191,198,201,204,205,206,218,219,220,227,229,230,231,233,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,265,266,282,284,285,286,289,290,291,297,298,300,301,302,303,305,307,308,319,329,332,333,336,338,339,352,353,354,357,358,359,360,361,362,363,364,365,366,367,368,369,373,375,377,412,413,419,421,424,425,427,428,429,430,432,434,435,437,438,439,440,441,447,452,459,472,475,477,481,484,488,494,496,497,499,500,502,505,506,510,513,514,515,521,522,533,535,536,537,538,539,541,542,543,549,550,553,554,555,557,558,566,569,574,575,576,577,578,579,],[-128,-129,-130,-71,-131,152,-335,-28,-182,-27,152,-337,-87,-72,-337,152,-286,230,-285,152,152,-283,-287,-325,-288,152,-284,152,152,152,-336,-183,152,152,-28,-337,152,-28,-337,-337,152,-326,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,-337,-76,-79,-82,-75,152,-77,152,152,-81,-215,-214,-80,-216,152,-78,152,152,-69,152,-284,152,152,-284,152,152,-244,-247,-245,-241,-242,-246,-248,152,-250,-251,-243,-249,-12,152,152,-11,152,152,152,152,-234,-233,152,-231,152,152,-217,152,-230,152,-84,-218,152,152,152,230,-337,-337,-198,152,152,152,-337,-284,-229,-232,152,-221,152,-83,-219,-68,152,-28,-337,152,-11,152,152,-220,152,152,152,-284,152,152,152,-337,152,-225,-224,-222,-84,152,152,152,-226,-223,152,-228,-227,]),'FLOAT':([0,1,2,3,4,5,6,7,10,11,12,13,14,16,17,18,19,20,21,22,23,25,26,27,29,30,33,34,36,38,39,40,42,43,44,45,46,47,48,49,50,52,53,54,55,56,58,59,60,61,62,63,64,65,66,67,68,71,75,76,80,81,82,85,86,87,89,90,91,93,94,95,96,97,98,99,100,101,105,109,111,118,119,120,121,122,123,124,129,142,147,172,174,177,180,181,182,184,185,186,187,188,189,190,191,192,198,200,211,214,223,229,231,233,239,240,241,267,269,275,278,279,280,284,285,286,289,291,298,300,301,302,303,305,308,312,313,314,315,316,317,318,328,332,340,341,342,350,422,424,425,427,428,432,435,437,438,439,442,443,446,448,449,453,454,460,496,497,500,505,506,510,511,512,536,554,555,557,558,575,576,578,579,],[44,-337,-113,-128,44,-124,-110,-106,-104,-107,-125,-105,-64,-60,-67,-99,-66,-109,44,-120,-115,-65,-102,-126,-131,-108,-238,-111,-122,-63,-129,44,-29,-121,-116,-62,-112,-70,-52,-123,-117,-337,-337,-119,-337,-114,-130,44,-118,-71,-103,-337,-9,-131,-91,-10,-96,-98,44,-131,-95,-101,-97,44,-53,-126,44,-88,44,44,-93,44,-147,-335,-146,44,-167,-166,-182,-100,-126,44,-87,-90,-94,-92,-61,-72,44,-144,-142,44,44,44,-73,44,-89,44,44,44,-149,-159,-160,-156,-336,44,-183,-30,44,44,-74,44,44,44,44,-174,-175,44,-143,-140,44,-141,-145,-76,-79,-82,-75,-77,44,-81,-215,-214,-80,-216,-78,-127,44,-153,44,-151,-148,-157,-168,-69,-36,-35,44,44,44,-234,-233,44,-231,-217,-230,-81,-84,-218,-152,-150,-158,-170,-169,-31,-34,44,-229,-232,-221,-83,-219,-68,-33,-32,-220,-225,-224,-222,-84,-226,-223,-228,-227,]),'XOREQUAL':([132,133,134,136,138,139,140,141,143,144,145,148,152,153,154,156,160,161,163,164,166,167,168,169,176,191,224,230,232,234,235,236,237,238,261,263,268,273,310,402,403,404,405,407,411,478,480,482,483,487,547,551,565,],[-317,-321,-318,-303,-324,-330,-313,-319,-301,-274,-314,-327,-325,-304,-322,-302,-315,-289,-328,-316,-329,-320,-276,-323,-312,-336,361,-326,-280,-277,-334,-332,-331,-333,-298,-297,-279,-278,-312,-296,-295,-294,-293,-292,-305,-281,-282,-290,-291,-275,-306,-299,-300,]),'LSHIFTEQUAL':([132,133,134,136,138,139,140,141,143,144,145,148,152,153,154,156,160,161,163,164,166,167,168,169,176,191,224,230,232,234,235,236,237,238,261,263,268,273,310,402,403,404,405,407,411,478,480,482,483,487,547,551,565,],[-317,-321,-318,-303,-324,-330,-313,-319,-301,-274,-314,-327,-325,-304,-322,-302,-315,-289,-328,-316,-329,-320,-276,-323,-312,-336,363,-326,-280,-277,-334,-332,-331,-333,-298,-297,-279,-278,-312,-296,-295,-294,-293,-292,-305,-281,-282,-290,-291,-275,-306,-299,-300,]),'RBRACKET':([3,39,58,76,103,105,106,117,128,132,133,134,136,138,139,140,141,143,144,145,148,152,153,154,156,158,160,161,162,163,164,166,167,168,169,176,178,191,198,204,205,218,219,224,225,230,232,234,235,236,237,238,261,263,268,272,273,282,334,335,336,337,351,352,383,384,385,386,387,388,389,390,391,392,393,394,395,396,397,398,400,401,402,403,404,405,406,407,411,419,420,421,455,456,459,466,467,468,471,476,478,480,482,483,486,487,491,493,494,513,514,524,540,541,547,551,561,562,564,565,],[-128,-129,-130,-131,-28,-182,-27,-337,-337,-317,-321,-318,-303,-324,-330,-313,-319,-301,-274,-314,-327,-325,-304,-322,-302,-255,-315,-289,-253,-328,-316,-329,-320,-276,-323,-312,-252,-336,-183,-337,-28,-337,-28,-274,-239,-326,-280,-277,-334,-332,-331,-333,-298,-297,-279,-235,-278,-337,453,-4,454,-3,464,465,-261,-273,-262,-260,-264,-268,-263,-259,-266,-271,-257,-256,-265,-272,-267,-269,-270,-258,-296,-295,-294,-293,482,-292,-305,-337,492,-337,511,512,-337,518,519,-240,520,-237,-281,-282,-290,-291,-236,-275,529,530,531,-337,-28,-254,559,560,-306,-299,570,571,572,-300,]),}
+_lr_action_items = {'$end':([0,1,2,3,4,5,6,7,8,9,10,14,15,64,90,91,127,208,251,262,267,355,499,],[-340,0,-58,-59,-60,-62,-63,-64,-65,-66,-67,-70,-71,-61,-90,-72,-76,-339,-77,-73,-69,-221,-68,]),'SEMI':([0,2,4,5,6,7,8,9,10,12,13,14,15,19,21,22,23,24,25,26,27,28,29,31,32,33,34,35,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,64,69,70,71,72,73,74,75,76,77,78,79,81,83,84,85,86,87,88,89,90,91,97,98,99,100,101,102,103,104,105,106,107,108,110,111,112,117,118,119,121,122,123,124,127,128,130,132,139,140,143,144,145,146,151,152,158,159,162,163,164,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,203,204,205,206,207,208,209,210,211,212,214,220,221,222,223,224,225,226,227,228,229,230,231,232,233,236,239,242,245,246,247,248,249,250,251,252,253,254,255,262,263,267,291,292,293,295,296,297,300,301,302,303,311,312,326,327,330,333,334,335,336,337,338,339,340,341,342,343,344,345,346,348,349,353,354,355,356,357,358,360,361,369,370,371,372,373,374,375,376,377,403,404,406,409,410,411,412,413,414,415,416,417,418,419,420,421,422,423,424,425,426,429,431,432,433,434,439,440,459,460,463,464,465,468,469,470,471,473,475,479,480,481,482,483,484,485,486,493,494,497,499,501,502,505,506,508,509,522,523,524,525,526,527,529,530,531,535,536,538,552,553,554,555,556,558,561,563,570,571,574,579,580,582,584,585,586,],[9,9,-60,-62,-63,-64,-65,-66,-67,-340,90,-70,-71,-52,-340,-340,-340,-128,-102,-340,-340,-29,-107,-125,-126,-127,-129,-241,-113,-114,-115,-116,-117,-118,-119,-120,-121,-122,-123,-124,-134,-131,-132,-133,-105,-106,-108,-109,-110,-111,-112,-61,-340,-340,-129,-134,-181,-98,-99,-100,-101,-104,-88,-134,-19,-20,-135,-137,-182,-54,-37,-90,-72,-53,-93,-9,-10,-340,-94,-95,-103,-89,-129,-15,-16,-139,-141,-97,-96,-169,-170,-338,-149,-150,210,-76,-340,-181,-55,-328,-30,-306,-255,-256,-258,-277,-279,-292,-315,-304,-305,-307,-316,-317,-318,-319,-320,-321,-322,-323,-324,-325,-326,-327,-330,-331,-332,-333,210,210,210,-152,-159,-339,-340,-162,-163,-145,-147,-13,-340,-219,-217,-218,-78,-79,-80,-81,-82,-83,-84,-85,-315,361,-14,-340,374,375,377,-238,-242,-277,-77,-38,-136,-138,-196,-73,-329,-69,-300,-301,-280,-281,-282,-283,-334,-335,-336,-337,-35,-36,-140,-142,-171,210,-154,210,-156,-151,-160,465,-143,-144,-148,-25,-26,-164,-166,-146,-130,-177,-178,-221,-220,-13,-340,-340,-237,-340,-87,-74,-340,483,-233,-234,484,-236,-43,-44,-308,-259,-260,-261,-262,-263,-264,-265,-266,-267,-268,-269,-270,-271,-272,-273,-274,-275,-276,-295,-296,-297,-298,-299,-31,-34,-172,-173,-153,-155,-161,-168,-222,-340,-224,-240,-239,-86,-75,529,-340,-232,-235,-243,-197,-39,-42,-278,-68,-293,-294,-284,-285,-32,-33,-165,-167,-223,-340,-340,-340,-340,559,-198,-40,-41,-257,-225,-87,-74,-227,-228,572,-302,-309,-340,580,-303,-226,-229,-340,-340,-231,-230,]),'PPHASH':([0,2,4,5,6,7,8,9,10,14,15,64,90,91,127,208,251,262,267,355,499,],[14,14,-60,-62,-63,-64,-65,-66,-67,-70,-71,-61,-90,-72,-76,-339,-77,-73,-69,-221,-68,]),'PPPRAGMA':([0,2,4,5,6,7,8,9,10,14,15,64,90,91,121,124,127,128,203,204,205,207,208,210,211,221,222,223,224,225,226,227,228,229,230,231,232,242,251,262,267,333,335,338,355,356,358,360,361,369,370,371,374,375,377,465,469,470,471,479,480,483,484,499,524,525,526,527,552,553,554,555,556,570,579,580,582,584,585,586,],[15,15,-60,-62,-63,-64,-65,-66,-67,-70,-71,-61,-90,-72,-338,15,-76,15,15,15,15,-159,-339,-162,-163,15,-219,-217,-218,-78,-79,-80,-81,-82,-83,-84,-85,15,-77,-73,-69,15,15,-160,-221,-220,15,15,-237,15,-87,-74,-233,-234,-236,-161,-222,15,-224,-86,-75,-232,-235,-68,-223,15,15,15,-225,-87,-74,-227,-228,15,-226,-229,15,15,-231,-230,]),'_PRAGMA':([0,2,4,5,6,7,8,9,10,14,15,64,90,91,121,124,127,128,203,204,205,207,208,210,211,221,222,223,224,225,226,227,228,229,230,231,232,242,251,262,267,333,335,338,355,356,358,360,361,369,370,371,374,375,377,465,469,470,471,479,480,483,484,499,524,525,526,527,552,553,554,555,556,570,579,580,582,584,585,586,],[16,16,-60,-62,-63,-64,-65,-66,-67,-70,-71,-61,-90,-72,-338,16,-76,16,16,16,16,-159,-339,-162,-163,16,-219,-217,-218,-78,-79,-80,-81,-82,-83,-84,-85,16,-77,-73,-69,16,16,-160,-221,-220,16,16,-237,16,-87,-74,-233,-234,-236,-161,-222,16,-224,-86,-75,-232,-235,-68,-223,16,16,16,-225,-87,-74,-227,-228,16,-226,-229,16,16,-231,-230,]),'_STATIC_ASSERT':([0,2,4,5,6,7,8,9,10,14,15,64,90,91,121,127,128,208,221,222,223,224,225,226,227,228,229,230,231,232,242,251,262,267,355,356,358,360,361,369,370,371,374,375,377,469,470,471,479,480,483,484,499,524,525,526,527,552,553,554,555,556,570,579,580,582,584,585,586,],[18,18,-60,-62,-63,-64,-65,-66,-67,-70,-71,-61,-90,-72,-338,-76,18,-339,18,-219,-217,-218,-78,-79,-80,-81,-82,-83,-84,-85,18,-77,-73,-69,-221,-220,18,18,-237,18,-87,-74,-233,-234,-236,-222,18,-224,-86,-75,-232,-235,-68,-223,18,18,18,-225,-87,-74,-227,-228,18,-226,-229,18,18,-231,-230,]),'ID':([0,2,4,5,6,7,8,9,10,12,14,15,17,20,21,22,23,24,25,26,27,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,62,63,64,69,70,71,72,74,75,76,77,78,80,81,82,90,91,94,95,96,98,99,100,101,102,103,104,106,112,113,114,115,116,117,118,119,120,121,122,123,126,127,128,134,135,136,137,141,147,148,149,150,153,154,155,156,160,161,182,183,184,192,194,195,196,197,198,199,206,208,209,212,214,221,222,223,224,225,226,227,228,229,230,231,232,234,238,242,244,247,251,256,257,258,259,262,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,289,290,294,298,306,309,310,314,318,322,323,330,331,332,334,336,337,340,341,342,347,348,349,353,354,355,356,358,360,361,362,365,366,367,369,370,371,372,374,375,377,378,379,380,381,382,383,384,385,386,387,388,389,392,393,394,397,398,400,401,402,405,448,449,452,455,457,459,460,463,464,466,467,469,470,471,474,479,480,482,483,484,487,489,498,499,500,503,507,510,511,512,520,524,525,526,527,528,529,532,533,543,544,545,552,553,554,555,556,559,562,564,565,570,572,579,580,582,584,585,586,],[28,28,-60,-62,-63,-64,-65,-66,-67,28,-70,-71,28,28,-340,-340,-340,-128,-102,28,-340,-107,-340,-125,-126,-127,-129,-241,118,122,-113,-114,-115,-116,-117,-118,-119,-120,-121,-122,-123,-124,-134,-131,-132,-133,-105,-106,-108,-109,-110,-111,-112,-157,-158,-61,28,28,-129,-134,-98,-99,-100,-101,-104,28,-134,28,-90,-72,159,-340,159,-93,-9,-10,-340,-94,-95,-103,-129,-97,-183,-27,-28,-185,-96,-169,-170,202,-338,-149,-150,159,-76,233,28,159,-340,159,159,-287,-288,-289,-286,159,159,159,159,-290,-291,159,-340,-28,28,28,159,-184,-186,202,202,-152,-339,28,-145,-147,233,-219,-217,-218,-78,-79,-80,-81,-82,-83,-84,-85,159,159,233,373,159,-77,-340,159,-340,-28,-73,-69,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,159,431,433,159,159,-287,159,159,159,28,28,-340,-171,202,159,-154,-156,-151,-143,-144,-148,159,-146,-130,-177,-178,-221,-220,233,233,-237,159,159,159,159,233,-87,-74,159,-233,-234,-236,159,-244,-245,-246,-247,-248,-249,-250,-251,-252,-253,-254,-11,159,-12,159,159,-287,159,159,159,-340,159,28,159,159,-172,-173,-153,-155,28,159,-222,233,-224,159,-86,-75,159,-232,-235,-340,-201,-340,-68,159,159,159,159,-340,-28,-287,-223,233,233,233,159,159,159,-11,-287,159,159,-225,-87,-74,-227,-228,159,-340,159,159,233,159,-226,-229,233,233,-231,-230,]),'LPAREN':([0,2,4,5,6,7,8,9,10,12,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,64,69,70,71,72,74,75,76,77,78,80,81,82,88,89,90,91,94,95,97,98,99,100,101,102,103,104,106,109,112,113,114,115,116,117,118,119,121,122,123,126,127,128,132,134,135,136,139,140,141,143,147,148,149,150,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,192,194,195,196,197,206,208,209,212,214,216,221,222,223,224,225,226,227,228,229,230,231,232,233,234,237,238,240,241,242,243,247,251,252,256,257,258,259,262,263,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,291,292,294,298,300,301,302,303,306,309,310,311,312,318,319,322,323,324,325,330,332,334,336,337,340,341,342,347,348,349,351,352,353,354,355,356,358,360,361,362,365,366,367,369,370,371,372,374,375,377,378,379,380,381,382,383,384,385,386,387,388,389,392,393,394,397,400,401,402,403,404,405,406,429,431,432,433,434,439,440,446,447,448,452,455,457,459,460,463,464,466,467,469,470,471,474,478,479,480,482,483,484,487,489,493,494,498,499,500,501,502,503,508,509,510,511,512,515,516,518,520,524,525,526,527,528,529,532,533,535,536,543,544,545,546,547,548,549,550,551,552,553,554,555,556,559,561,562,563,565,566,567,570,572,574,577,578,579,580,582,584,585,586,],[17,17,-60,-62,-63,-64,-65,-66,-67,82,-70,-71,92,17,94,96,17,-340,-340,-340,-128,-102,17,-340,-29,-107,-340,-125,-126,-127,-129,-241,-113,-114,-115,-116,-117,-118,-119,-120,-121,-122,-123,-124,125,-131,-132,-133,-105,-106,-108,-109,-110,-111,-112,126,-61,82,17,-129,125,-98,-99,-100,-101,-104,82,-134,82,137,-37,-90,-72,141,-340,96,-93,-9,-10,-340,-94,-95,-103,-129,125,-97,-183,-27,-28,-185,-96,-169,-170,-338,-149,-150,141,-76,238,137,82,238,-340,-328,-30,238,-306,-287,-288,-289,-286,288,294,294,141,298,299,-292,-315,-290,-291,-304,-305,-307,304,-316,-317,-318,-319,-320,-321,-322,-323,-324,-325,-326,-327,-330,-331,-332,-333,238,-340,-28,322,82,238,-184,-186,-152,-339,82,-145,-147,351,238,-219,-217,-218,-78,-79,-80,-81,-82,-83,-84,-85,-315,141,362,238,366,367,238,372,238,-77,-38,-340,238,-340,-28,-73,-329,-69,238,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,238,238,-300,-301,238,238,-334,-335,-336,-337,-287,238,238,-35,-36,322,449,322,-340,-45,458,-171,141,-154,-156,-151,-143,-144,-148,141,-146,-130,351,351,-177,-178,-221,-220,238,238,-237,238,238,238,238,238,-87,-74,238,-233,-234,-236,238,-244,-245,-246,-247,-248,-249,-250,-251,-252,-253,-254,-11,238,-12,141,-287,238,238,-43,-44,141,-308,-295,-296,-297,-298,-299,-31,-34,449,458,-340,322,238,238,-172,-173,-153,-155,82,141,-222,238,-224,141,528,-86,-75,238,-232,-235,-340,-201,-39,-42,-340,-68,141,-293,-294,238,-32,-33,238,-340,-28,-210,-216,-214,-287,-223,238,238,238,238,238,238,-11,-40,-41,-287,238,238,-50,-51,-212,-211,-213,-215,-225,-87,-74,-227,-228,238,-302,-340,-309,238,-46,-49,238,238,-303,-47,-48,-226,-229,238,238,-231,-230,]),'TIMES':([0,2,4,5,6,7,8,9,10,12,14,15,17,21,22,23,24,25,26,27,29,30,31,32,33,34,35,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,64,69,70,71,72,74,75,76,77,78,81,82,90,91,94,95,98,99,100,101,102,103,104,106,112,113,114,115,116,117,118,119,121,122,123,126,127,128,134,135,136,139,141,143,145,146,147,148,149,150,151,152,153,154,155,156,158,159,160,161,162,163,164,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,192,194,195,197,206,208,209,212,214,216,221,222,223,224,225,226,227,228,229,230,231,232,233,234,238,242,247,250,251,256,257,258,259,262,263,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,291,292,293,294,295,296,297,298,300,301,302,303,306,309,310,322,323,330,332,334,336,337,340,341,342,347,348,349,351,353,354,355,356,358,360,361,362,365,366,367,369,370,371,372,374,375,377,378,379,380,381,382,383,384,385,386,387,388,389,392,393,394,397,400,401,402,405,406,409,410,411,412,413,414,415,416,417,418,419,420,421,422,423,424,425,426,429,431,432,433,434,448,455,457,459,460,463,464,466,467,469,470,471,474,479,480,482,483,484,487,489,497,498,499,500,501,502,503,505,506,510,511,512,520,524,525,526,527,528,529,532,533,543,544,545,552,553,554,555,556,559,561,562,563,565,570,572,574,579,580,582,584,585,586,],[30,30,-60,-62,-63,-64,-65,-66,-67,30,-70,-71,30,-340,-340,-340,-128,-102,30,-340,-107,-340,-125,-126,-127,-129,-241,-113,-114,-115,-116,-117,-118,-119,-120,-121,-122,-123,-124,-134,-131,-132,-133,-105,-106,-108,-109,-110,-111,-112,-61,30,30,-129,-134,-98,-99,-100,-101,-104,-134,30,-90,-72,147,-340,-93,-9,-10,-340,-94,-95,-103,-129,-97,30,-27,-28,-185,-96,-169,-170,-338,-149,-150,147,-76,147,30,147,-340,-328,147,-306,269,-258,-287,-288,-289,-286,-277,-279,147,147,147,147,-292,-315,-290,-291,-304,-305,-307,-316,-317,-318,-319,-320,-321,-322,-323,-324,-325,-326,-327,-330,-331,-332,-333,306,-340,-28,30,30,147,-186,-152,-339,30,-145,-147,30,147,-219,-217,-218,-78,-79,-80,-81,-82,-83,-84,-85,-315,147,147,147,147,-277,-77,-340,400,-340,-28,-73,-329,-69,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,-300,-301,-280,147,-281,-282,-283,147,-334,-335,-336,-337,-287,147,147,30,456,-171,147,-154,-156,-151,-143,-144,-148,147,-146,-130,30,-177,-178,-221,-220,147,147,-237,147,147,147,147,147,-87,-74,147,-233,-234,-236,147,-244,-245,-246,-247,-248,-249,-250,-251,-252,-253,-254,-11,147,-12,147,-287,147,147,147,-308,-259,-260,-261,269,269,269,269,269,269,269,269,269,269,269,269,269,269,269,-295,-296,-297,-298,-299,-340,147,520,-172,-173,-153,-155,30,147,-222,147,-224,147,-86,-75,147,-232,-235,-340,-201,-278,-340,-68,147,-293,-294,147,-284,-285,543,-340,-28,-287,-223,147,147,147,147,147,147,-11,-287,147,147,-225,-87,-74,-227,-228,147,-302,-340,-309,147,147,147,-303,-226,-229,147,147,-231,-230,]),'TYPEID':([0,2,4,5,6,7,8,9,10,11,12,14,15,19,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,62,63,64,67,68,69,70,71,72,73,74,75,76,77,78,80,81,82,90,91,96,97,98,99,100,101,102,103,104,106,112,113,114,115,116,117,118,119,121,122,123,124,125,126,127,128,129,134,137,140,141,192,193,194,196,197,203,204,205,206,207,208,209,210,211,212,213,214,221,222,223,224,225,226,227,228,229,230,231,232,238,251,262,267,289,290,294,298,299,304,311,312,313,318,322,330,333,334,335,336,337,338,340,341,342,348,349,351,353,354,355,356,361,370,371,372,374,375,377,439,440,449,458,459,460,463,464,465,466,469,471,479,480,483,484,499,508,509,524,552,553,554,555,556,579,580,585,586,],[35,35,-60,-62,-63,-64,-65,-66,-67,35,89,-70,-71,-52,-340,-340,-340,-128,-102,35,-340,-29,-107,-340,-125,-126,-127,-129,-241,119,123,-113,-114,-115,-116,-117,-118,-119,-120,-121,-122,-123,-124,-134,-131,-132,-133,-105,-106,-108,-109,-110,-111,-112,-157,-158,-61,35,-91,89,35,-129,-134,35,-98,-99,-100,-101,-104,89,-134,89,-90,-72,35,-53,-93,-9,-10,-340,-94,-95,-103,-129,-97,-183,-27,-28,-185,-96,-169,-170,-338,-149,-150,35,35,35,-76,35,-92,89,35,-30,35,324,35,89,-184,-186,35,35,35,-152,-159,-339,89,-162,-163,-145,35,-147,35,-219,-217,-218,-78,-79,-80,-81,-82,-83,-84,-85,35,-77,-73,-69,432,434,35,35,35,35,-35,-36,35,324,35,-171,35,-154,35,-156,-151,-160,-143,-144,-148,-146,-130,35,-177,-178,-221,-220,-237,-87,-84,35,-233,-234,-236,-31,-34,35,35,-172,-173,-153,-155,-161,89,-222,-224,-86,-84,-232,-235,-68,-32,-33,-223,-225,-87,-84,-227,-228,-226,-229,-231,-230,]),'ENUM':([0,2,4,5,6,7,8,9,10,11,14,15,19,21,22,23,26,27,28,29,34,50,51,52,53,54,55,56,57,58,59,60,64,67,68,70,71,72,73,90,91,96,97,98,99,100,101,102,103,112,116,117,121,124,125,126,127,128,129,137,140,141,193,197,203,204,205,207,208,210,211,213,221,222,223,224,225,226,227,228,229,230,231,232,238,251,262,267,294,298,299,304,311,312,313,322,333,335,338,349,351,353,354,355,356,361,370,371,372,374,375,377,439,440,449,458,465,469,471,479,480,483,484,499,508,509,524,552,553,554,555,556,579,580,585,586,],[36,36,-60,-62,-63,-64,-65,-66,-67,36,-70,-71,-52,-340,-340,-340,36,-340,-29,-107,-340,-134,-131,-132,-133,-105,-106,-108,-109,-110,-111,-112,-61,36,-91,36,-340,-134,36,-90,-72,36,-53,-93,-9,-10,-340,-94,-95,-97,-185,-96,-338,36,36,36,-76,36,-92,36,-30,36,36,-186,36,36,36,-159,-339,-162,-163,36,36,-219,-217,-218,-78,-79,-80,-81,-82,-83,-84,-85,36,-77,-73,-69,36,36,36,36,-35,-36,36,36,36,36,-160,-130,36,-177,-178,-221,-220,-237,-87,-84,36,-233,-234,-236,-31,-34,36,36,-161,-222,-224,-86,-84,-232,-235,-68,-32,-33,-223,-225,-87,-84,-227,-228,-226,-229,-231,-230,]),'VOID':([0,2,4,5,6,7,8,9,10,11,12,14,15,19,21,22,23,24,25,26,27,28,29,31,32,33,34,35,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,64,67,68,69,70,71,72,73,74,75,76,77,78,81,90,91,96,97,98,99,100,101,102,103,104,106,112,116,117,118,119,121,122,123,124,125,126,127,128,129,137,140,141,192,193,197,203,204,205,206,207,208,209,210,211,212,213,214,216,221,222,223,224,225,226,227,228,229,230,231,232,238,251,262,267,294,298,299,304,311,312,313,322,330,333,334,335,336,337,338,340,341,342,348,349,351,353,354,355,356,361,370,371,372,374,375,377,439,440,449,458,459,460,463,464,465,469,471,479,480,483,484,499,508,509,524,552,553,554,555,556,579,580,585,586,],[38,38,-60,-62,-63,-64,-65,-66,-67,38,38,-70,-71,-52,-340,-340,-340,-128,-102,38,-340,-29,-107,-125,-126,-127,-129,-241,-113,-114,-115,-116,-117,-118,-119,-120,-121,-122,-123,-124,-134,-131,-132,-133,-105,-106,-108,-109,-110,-111,-112,-61,38,-91,38,38,-129,-134,38,-98,-99,-100,-101,-104,-134,-90,-72,38,-53,-93,-9,-10,-340,-94,-95,-103,-129,-97,-185,-96,-169,-170,-338,-149,-150,38,38,38,-76,38,-92,38,-30,38,38,38,-186,38,38,38,-152,-159,-339,38,-162,-163,-145,38,-147,38,38,-219,-217,-218,-78,-79,-80,-81,-82,-83,-84,-85,38,-77,-73,-69,38,38,38,38,-35,-36,38,38,-171,38,-154,38,-156,-151,-160,-143,-144,-148,-146,-130,38,-177,-178,-221,-220,-237,-87,-84,38,-233,-234,-236,-31,-34,38,38,-172,-173,-153,-155,-161,-222,-224,-86,-84,-232,-235,-68,-32,-33,-223,-225,-87,-84,-227,-228,-226,-229,-231,-230,]),'_BOOL':([0,2,4,5,6,7,8,9,10,11,12,14,15,19,21,22,23,24,25,26,27,28,29,31,32,33,34,35,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,64,67,68,69,70,71,72,73,74,75,76,77,78,81,90,91,96,97,98,99,100,101,102,103,104,106,112,116,117,118,119,121,122,123,124,125,126,127,128,129,137,140,141,192,193,197,203,204,205,206,207,208,209,210,211,212,213,214,216,221,222,223,224,225,226,227,228,229,230,231,232,238,251,262,267,294,298,299,304,311,312,313,322,330,333,334,335,336,337,338,340,341,342,348,349,351,353,354,355,356,361,370,371,372,374,375,377,439,440,449,458,459,460,463,464,465,469,471,479,480,483,484,499,508,509,524,552,553,554,555,556,579,580,585,586,],[39,39,-60,-62,-63,-64,-65,-66,-67,39,39,-70,-71,-52,-340,-340,-340,-128,-102,39,-340,-29,-107,-125,-126,-127,-129,-241,-113,-114,-115,-116,-117,-118,-119,-120,-121,-122,-123,-124,-134,-131,-132,-133,-105,-106,-108,-109,-110,-111,-112,-61,39,-91,39,39,-129,-134,39,-98,-99,-100,-101,-104,-134,-90,-72,39,-53,-93,-9,-10,-340,-94,-95,-103,-129,-97,-185,-96,-169,-170,-338,-149,-150,39,39,39,-76,39,-92,39,-30,39,39,39,-186,39,39,39,-152,-159,-339,39,-162,-163,-145,39,-147,39,39,-219,-217,-218,-78,-79,-80,-81,-82,-83,-84,-85,39,-77,-73,-69,39,39,39,39,-35,-36,39,39,-171,39,-154,39,-156,-151,-160,-143,-144,-148,-146,-130,39,-177,-178,-221,-220,-237,-87,-84,39,-233,-234,-236,-31,-34,39,39,-172,-173,-153,-155,-161,-222,-224,-86,-84,-232,-235,-68,-32,-33,-223,-225,-87,-84,-227,-228,-226,-229,-231,-230,]),'CHAR':([0,2,4,5,6,7,8,9,10,11,12,14,15,19,21,22,23,24,25,26,27,28,29,31,32,33,34,35,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,64,67,68,69,70,71,72,73,74,75,76,77,78,81,90,91,96,97,98,99,100,101,102,103,104,106,112,116,117,118,119,121,122,123,124,125,126,127,128,129,137,140,141,192,193,197,203,204,205,206,207,208,209,210,211,212,213,214,216,221,222,223,224,225,226,227,228,229,230,231,232,238,251,262,267,294,298,299,304,311,312,313,322,330,333,334,335,336,337,338,340,341,342,348,349,351,353,354,355,356,361,370,371,372,374,375,377,439,440,449,458,459,460,463,464,465,469,471,479,480,483,484,499,508,509,524,552,553,554,555,556,579,580,585,586,],[40,40,-60,-62,-63,-64,-65,-66,-67,40,40,-70,-71,-52,-340,-340,-340,-128,-102,40,-340,-29,-107,-125,-126,-127,-129,-241,-113,-114,-115,-116,-117,-118,-119,-120,-121,-122,-123,-124,-134,-131,-132,-133,-105,-106,-108,-109,-110,-111,-112,-61,40,-91,40,40,-129,-134,40,-98,-99,-100,-101,-104,-134,-90,-72,40,-53,-93,-9,-10,-340,-94,-95,-103,-129,-97,-185,-96,-169,-170,-338,-149,-150,40,40,40,-76,40,-92,40,-30,40,40,40,-186,40,40,40,-152,-159,-339,40,-162,-163,-145,40,-147,40,40,-219,-217,-218,-78,-79,-80,-81,-82,-83,-84,-85,40,-77,-73,-69,40,40,40,40,-35,-36,40,40,-171,40,-154,40,-156,-151,-160,-143,-144,-148,-146,-130,40,-177,-178,-221,-220,-237,-87,-84,40,-233,-234,-236,-31,-34,40,40,-172,-173,-153,-155,-161,-222,-224,-86,-84,-232,-235,-68,-32,-33,-223,-225,-87,-84,-227,-228,-226,-229,-231,-230,]),'SHORT':([0,2,4,5,6,7,8,9,10,11,12,14,15,19,21,22,23,24,25,26,27,28,29,31,32,33,34,35,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,64,67,68,69,70,71,72,73,74,75,76,77,78,81,90,91,96,97,98,99,100,101,102,103,104,106,112,116,117,118,119,121,122,123,124,125,126,127,128,129,137,140,141,192,193,197,203,204,205,206,207,208,209,210,211,212,213,214,216,221,222,223,224,225,226,227,228,229,230,231,232,238,251,262,267,294,298,299,304,311,312,313,322,330,333,334,335,336,337,338,340,341,342,348,349,351,353,354,355,356,361,370,371,372,374,375,377,439,440,449,458,459,460,463,464,465,469,471,479,480,483,484,499,508,509,524,552,553,554,555,556,579,580,585,586,],[41,41,-60,-62,-63,-64,-65,-66,-67,41,41,-70,-71,-52,-340,-340,-340,-128,-102,41,-340,-29,-107,-125,-126,-127,-129,-241,-113,-114,-115,-116,-117,-118,-119,-120,-121,-122,-123,-124,-134,-131,-132,-133,-105,-106,-108,-109,-110,-111,-112,-61,41,-91,41,41,-129,-134,41,-98,-99,-100,-101,-104,-134,-90,-72,41,-53,-93,-9,-10,-340,-94,-95,-103,-129,-97,-185,-96,-169,-170,-338,-149,-150,41,41,41,-76,41,-92,41,-30,41,41,41,-186,41,41,41,-152,-159,-339,41,-162,-163,-145,41,-147,41,41,-219,-217,-218,-78,-79,-80,-81,-82,-83,-84,-85,41,-77,-73,-69,41,41,41,41,-35,-36,41,41,-171,41,-154,41,-156,-151,-160,-143,-144,-148,-146,-130,41,-177,-178,-221,-220,-237,-87,-84,41,-233,-234,-236,-31,-34,41,41,-172,-173,-153,-155,-161,-222,-224,-86,-84,-232,-235,-68,-32,-33,-223,-225,-87,-84,-227,-228,-226,-229,-231,-230,]),'INT':([0,2,4,5,6,7,8,9,10,11,12,14,15,19,21,22,23,24,25,26,27,28,29,31,32,33,34,35,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,64,67,68,69,70,71,72,73,74,75,76,77,78,81,90,91,96,97,98,99,100,101,102,103,104,106,112,116,117,118,119,121,122,123,124,125,126,127,128,129,137,140,141,192,193,197,203,204,205,206,207,208,209,210,211,212,213,214,216,221,222,223,224,225,226,227,228,229,230,231,232,238,251,262,267,294,298,299,304,311,312,313,322,330,333,334,335,336,337,338,340,341,342,348,349,351,353,354,355,356,361,370,371,372,374,375,377,439,440,449,458,459,460,463,464,465,469,471,479,480,483,484,499,508,509,524,552,553,554,555,556,579,580,585,586,],[42,42,-60,-62,-63,-64,-65,-66,-67,42,42,-70,-71,-52,-340,-340,-340,-128,-102,42,-340,-29,-107,-125,-126,-127,-129,-241,-113,-114,-115,-116,-117,-118,-119,-120,-121,-122,-123,-124,-134,-131,-132,-133,-105,-106,-108,-109,-110,-111,-112,-61,42,-91,42,42,-129,-134,42,-98,-99,-100,-101,-104,-134,-90,-72,42,-53,-93,-9,-10,-340,-94,-95,-103,-129,-97,-185,-96,-169,-170,-338,-149,-150,42,42,42,-76,42,-92,42,-30,42,42,42,-186,42,42,42,-152,-159,-339,42,-162,-163,-145,42,-147,42,42,-219,-217,-218,-78,-79,-80,-81,-82,-83,-84,-85,42,-77,-73,-69,42,42,42,42,-35,-36,42,42,-171,42,-154,42,-156,-151,-160,-143,-144,-148,-146,-130,42,-177,-178,-221,-220,-237,-87,-84,42,-233,-234,-236,-31,-34,42,42,-172,-173,-153,-155,-161,-222,-224,-86,-84,-232,-235,-68,-32,-33,-223,-225,-87,-84,-227,-228,-226,-229,-231,-230,]),'LONG':([0,2,4,5,6,7,8,9,10,11,12,14,15,19,21,22,23,24,25,26,27,28,29,31,32,33,34,35,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,64,67,68,69,70,71,72,73,74,75,76,77,78,81,90,91,96,97,98,99,100,101,102,103,104,106,112,116,117,118,119,121,122,123,124,125,126,127,128,129,137,140,141,192,193,197,203,204,205,206,207,208,209,210,211,212,213,214,216,221,222,223,224,225,226,227,228,229,230,231,232,238,251,262,267,294,298,299,304,311,312,313,322,330,333,334,335,336,337,338,340,341,342,348,349,351,353,354,355,356,361,370,371,372,374,375,377,439,440,449,458,459,460,463,464,465,469,471,479,480,483,484,499,508,509,524,552,553,554,555,556,579,580,585,586,],[43,43,-60,-62,-63,-64,-65,-66,-67,43,43,-70,-71,-52,-340,-340,-340,-128,-102,43,-340,-29,-107,-125,-126,-127,-129,-241,-113,-114,-115,-116,-117,-118,-119,-120,-121,-122,-123,-124,-134,-131,-132,-133,-105,-106,-108,-109,-110,-111,-112,-61,43,-91,43,43,-129,-134,43,-98,-99,-100,-101,-104,-134,-90,-72,43,-53,-93,-9,-10,-340,-94,-95,-103,-129,-97,-185,-96,-169,-170,-338,-149,-150,43,43,43,-76,43,-92,43,-30,43,43,43,-186,43,43,43,-152,-159,-339,43,-162,-163,-145,43,-147,43,43,-219,-217,-218,-78,-79,-80,-81,-82,-83,-84,-85,43,-77,-73,-69,43,43,43,43,-35,-36,43,43,-171,43,-154,43,-156,-151,-160,-143,-144,-148,-146,-130,43,-177,-178,-221,-220,-237,-87,-84,43,-233,-234,-236,-31,-34,43,43,-172,-173,-153,-155,-161,-222,-224,-86,-84,-232,-235,-68,-32,-33,-223,-225,-87,-84,-227,-228,-226,-229,-231,-230,]),'FLOAT':([0,2,4,5,6,7,8,9,10,11,12,14,15,19,21,22,23,24,25,26,27,28,29,31,32,33,34,35,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,64,67,68,69,70,71,72,73,74,75,76,77,78,81,90,91,96,97,98,99,100,101,102,103,104,106,112,116,117,118,119,121,122,123,124,125,126,127,128,129,137,140,141,192,193,197,203,204,205,206,207,208,209,210,211,212,213,214,216,221,222,223,224,225,226,227,228,229,230,231,232,238,251,262,267,294,298,299,304,311,312,313,322,330,333,334,335,336,337,338,340,341,342,348,349,351,353,354,355,356,361,370,371,372,374,375,377,439,440,449,458,459,460,463,464,465,469,471,479,480,483,484,499,508,509,524,552,553,554,555,556,579,580,585,586,],[44,44,-60,-62,-63,-64,-65,-66,-67,44,44,-70,-71,-52,-340,-340,-340,-128,-102,44,-340,-29,-107,-125,-126,-127,-129,-241,-113,-114,-115,-116,-117,-118,-119,-120,-121,-122,-123,-124,-134,-131,-132,-133,-105,-106,-108,-109,-110,-111,-112,-61,44,-91,44,44,-129,-134,44,-98,-99,-100,-101,-104,-134,-90,-72,44,-53,-93,-9,-10,-340,-94,-95,-103,-129,-97,-185,-96,-169,-170,-338,-149,-150,44,44,44,-76,44,-92,44,-30,44,44,44,-186,44,44,44,-152,-159,-339,44,-162,-163,-145,44,-147,44,44,-219,-217,-218,-78,-79,-80,-81,-82,-83,-84,-85,44,-77,-73,-69,44,44,44,44,-35,-36,44,44,-171,44,-154,44,-156,-151,-160,-143,-144,-148,-146,-130,44,-177,-178,-221,-220,-237,-87,-84,44,-233,-234,-236,-31,-34,44,44,-172,-173,-153,-155,-161,-222,-224,-86,-84,-232,-235,-68,-32,-33,-223,-225,-87,-84,-227,-228,-226,-229,-231,-230,]),'DOUBLE':([0,2,4,5,6,7,8,9,10,11,12,14,15,19,21,22,23,24,25,26,27,28,29,31,32,33,34,35,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,64,67,68,69,70,71,72,73,74,75,76,77,78,81,90,91,96,97,98,99,100,101,102,103,104,106,112,116,117,118,119,121,122,123,124,125,126,127,128,129,137,140,141,192,193,197,203,204,205,206,207,208,209,210,211,212,213,214,216,221,222,223,224,225,226,227,228,229,230,231,232,238,251,262,267,294,298,299,304,311,312,313,322,330,333,334,335,336,337,338,340,341,342,348,349,351,353,354,355,356,361,370,371,372,374,375,377,439,440,449,458,459,460,463,464,465,469,471,479,480,483,484,499,508,509,524,552,553,554,555,556,579,580,585,586,],[45,45,-60,-62,-63,-64,-65,-66,-67,45,45,-70,-71,-52,-340,-340,-340,-128,-102,45,-340,-29,-107,-125,-126,-127,-129,-241,-113,-114,-115,-116,-117,-118,-119,-120,-121,-122,-123,-124,-134,-131,-132,-133,-105,-106,-108,-109,-110,-111,-112,-61,45,-91,45,45,-129,-134,45,-98,-99,-100,-101,-104,-134,-90,-72,45,-53,-93,-9,-10,-340,-94,-95,-103,-129,-97,-185,-96,-169,-170,-338,-149,-150,45,45,45,-76,45,-92,45,-30,45,45,45,-186,45,45,45,-152,-159,-339,45,-162,-163,-145,45,-147,45,45,-219,-217,-218,-78,-79,-80,-81,-82,-83,-84,-85,45,-77,-73,-69,45,45,45,45,-35,-36,45,45,-171,45,-154,45,-156,-151,-160,-143,-144,-148,-146,-130,45,-177,-178,-221,-220,-237,-87,-84,45,-233,-234,-236,-31,-34,45,45,-172,-173,-153,-155,-161,-222,-224,-86,-84,-232,-235,-68,-32,-33,-223,-225,-87,-84,-227,-228,-226,-229,-231,-230,]),'_COMPLEX':([0,2,4,5,6,7,8,9,10,11,12,14,15,19,21,22,23,24,25,26,27,28,29,31,32,33,34,35,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,64,67,68,69,70,71,72,73,74,75,76,77,78,81,90,91,96,97,98,99,100,101,102,103,104,106,112,116,117,118,119,121,122,123,124,125,126,127,128,129,137,140,141,192,193,197,203,204,205,206,207,208,209,210,211,212,213,214,216,221,222,223,224,225,226,227,228,229,230,231,232,238,251,262,267,294,298,299,304,311,312,313,322,330,333,334,335,336,337,338,340,341,342,348,349,351,353,354,355,356,361,370,371,372,374,375,377,439,440,449,458,459,460,463,464,465,469,471,479,480,483,484,499,508,509,524,552,553,554,555,556,579,580,585,586,],[46,46,-60,-62,-63,-64,-65,-66,-67,46,46,-70,-71,-52,-340,-340,-340,-128,-102,46,-340,-29,-107,-125,-126,-127,-129,-241,-113,-114,-115,-116,-117,-118,-119,-120,-121,-122,-123,-124,-134,-131,-132,-133,-105,-106,-108,-109,-110,-111,-112,-61,46,-91,46,46,-129,-134,46,-98,-99,-100,-101,-104,-134,-90,-72,46,-53,-93,-9,-10,-340,-94,-95,-103,-129,-97,-185,-96,-169,-170,-338,-149,-150,46,46,46,-76,46,-92,46,-30,46,46,46,-186,46,46,46,-152,-159,-339,46,-162,-163,-145,46,-147,46,46,-219,-217,-218,-78,-79,-80,-81,-82,-83,-84,-85,46,-77,-73,-69,46,46,46,46,-35,-36,46,46,-171,46,-154,46,-156,-151,-160,-143,-144,-148,-146,-130,46,-177,-178,-221,-220,-237,-87,-84,46,-233,-234,-236,-31,-34,46,46,-172,-173,-153,-155,-161,-222,-224,-86,-84,-232,-235,-68,-32,-33,-223,-225,-87,-84,-227,-228,-226,-229,-231,-230,]),'SIGNED':([0,2,4,5,6,7,8,9,10,11,12,14,15,19,21,22,23,24,25,26,27,28,29,31,32,33,34,35,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,64,67,68,69,70,71,72,73,74,75,76,77,78,81,90,91,96,97,98,99,100,101,102,103,104,106,112,116,117,118,119,121,122,123,124,125,126,127,128,129,137,140,141,192,193,197,203,204,205,206,207,208,209,210,211,212,213,214,216,221,222,223,224,225,226,227,228,229,230,231,232,238,251,262,267,294,298,299,304,311,312,313,322,330,333,334,335,336,337,338,340,341,342,348,349,351,353,354,355,356,361,370,371,372,374,375,377,439,440,449,458,459,460,463,464,465,469,471,479,480,483,484,499,508,509,524,552,553,554,555,556,579,580,585,586,],[47,47,-60,-62,-63,-64,-65,-66,-67,47,47,-70,-71,-52,-340,-340,-340,-128,-102,47,-340,-29,-107,-125,-126,-127,-129,-241,-113,-114,-115,-116,-117,-118,-119,-120,-121,-122,-123,-124,-134,-131,-132,-133,-105,-106,-108,-109,-110,-111,-112,-61,47,-91,47,47,-129,-134,47,-98,-99,-100,-101,-104,-134,-90,-72,47,-53,-93,-9,-10,-340,-94,-95,-103,-129,-97,-185,-96,-169,-170,-338,-149,-150,47,47,47,-76,47,-92,47,-30,47,47,47,-186,47,47,47,-152,-159,-339,47,-162,-163,-145,47,-147,47,47,-219,-217,-218,-78,-79,-80,-81,-82,-83,-84,-85,47,-77,-73,-69,47,47,47,47,-35,-36,47,47,-171,47,-154,47,-156,-151,-160,-143,-144,-148,-146,-130,47,-177,-178,-221,-220,-237,-87,-84,47,-233,-234,-236,-31,-34,47,47,-172,-173,-153,-155,-161,-222,-224,-86,-84,-232,-235,-68,-32,-33,-223,-225,-87,-84,-227,-228,-226,-229,-231,-230,]),'UNSIGNED':([0,2,4,5,6,7,8,9,10,11,12,14,15,19,21,22,23,24,25,26,27,28,29,31,32,33,34,35,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,64,67,68,69,70,71,72,73,74,75,76,77,78,81,90,91,96,97,98,99,100,101,102,103,104,106,112,116,117,118,119,121,122,123,124,125,126,127,128,129,137,140,141,192,193,197,203,204,205,206,207,208,209,210,211,212,213,214,216,221,222,223,224,225,226,227,228,229,230,231,232,238,251,262,267,294,298,299,304,311,312,313,322,330,333,334,335,336,337,338,340,341,342,348,349,351,353,354,355,356,361,370,371,372,374,375,377,439,440,449,458,459,460,463,464,465,469,471,479,480,483,484,499,508,509,524,552,553,554,555,556,579,580,585,586,],[48,48,-60,-62,-63,-64,-65,-66,-67,48,48,-70,-71,-52,-340,-340,-340,-128,-102,48,-340,-29,-107,-125,-126,-127,-129,-241,-113,-114,-115,-116,-117,-118,-119,-120,-121,-122,-123,-124,-134,-131,-132,-133,-105,-106,-108,-109,-110,-111,-112,-61,48,-91,48,48,-129,-134,48,-98,-99,-100,-101,-104,-134,-90,-72,48,-53,-93,-9,-10,-340,-94,-95,-103,-129,-97,-185,-96,-169,-170,-338,-149,-150,48,48,48,-76,48,-92,48,-30,48,48,48,-186,48,48,48,-152,-159,-339,48,-162,-163,-145,48,-147,48,48,-219,-217,-218,-78,-79,-80,-81,-82,-83,-84,-85,48,-77,-73,-69,48,48,48,48,-35,-36,48,48,-171,48,-154,48,-156,-151,-160,-143,-144,-148,-146,-130,48,-177,-178,-221,-220,-237,-87,-84,48,-233,-234,-236,-31,-34,48,48,-172,-173,-153,-155,-161,-222,-224,-86,-84,-232,-235,-68,-32,-33,-223,-225,-87,-84,-227,-228,-226,-229,-231,-230,]),'__INT128':([0,2,4,5,6,7,8,9,10,11,12,14,15,19,21,22,23,24,25,26,27,28,29,31,32,33,34,35,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,64,67,68,69,70,71,72,73,74,75,76,77,78,81,90,91,96,97,98,99,100,101,102,103,104,106,112,116,117,118,119,121,122,123,124,125,126,127,128,129,137,140,141,192,193,197,203,204,205,206,207,208,209,210,211,212,213,214,216,221,222,223,224,225,226,227,228,229,230,231,232,238,251,262,267,294,298,299,304,311,312,313,322,330,333,334,335,336,337,338,340,341,342,348,349,351,353,354,355,356,361,370,371,372,374,375,377,439,440,449,458,459,460,463,464,465,469,471,479,480,483,484,499,508,509,524,552,553,554,555,556,579,580,585,586,],[49,49,-60,-62,-63,-64,-65,-66,-67,49,49,-70,-71,-52,-340,-340,-340,-128,-102,49,-340,-29,-107,-125,-126,-127,-129,-241,-113,-114,-115,-116,-117,-118,-119,-120,-121,-122,-123,-124,-134,-131,-132,-133,-105,-106,-108,-109,-110,-111,-112,-61,49,-91,49,49,-129,-134,49,-98,-99,-100,-101,-104,-134,-90,-72,49,-53,-93,-9,-10,-340,-94,-95,-103,-129,-97,-185,-96,-169,-170,-338,-149,-150,49,49,49,-76,49,-92,49,-30,49,49,49,-186,49,49,49,-152,-159,-339,49,-162,-163,-145,49,-147,49,49,-219,-217,-218,-78,-79,-80,-81,-82,-83,-84,-85,49,-77,-73,-69,49,49,49,49,-35,-36,49,49,-171,49,-154,49,-156,-151,-160,-143,-144,-148,-146,-130,49,-177,-178,-221,-220,-237,-87,-84,49,-233,-234,-236,-31,-34,49,49,-172,-173,-153,-155,-161,-222,-224,-86,-84,-232,-235,-68,-32,-33,-223,-225,-87,-84,-227,-228,-226,-229,-231,-230,]),'_ATOMIC':([0,2,4,5,6,7,8,9,10,11,12,14,15,19,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,64,67,68,69,70,71,72,73,74,75,76,77,78,81,90,91,95,96,97,98,99,100,101,102,103,104,106,112,115,116,117,118,119,121,122,123,124,125,126,127,128,129,136,137,140,141,183,184,192,193,197,203,204,205,206,207,208,209,210,211,212,213,214,216,221,222,223,224,225,226,227,228,229,230,231,232,238,251,258,259,262,267,294,298,299,304,311,312,313,322,323,330,333,334,335,336,337,338,340,341,342,348,349,351,353,354,355,356,361,370,371,372,374,375,377,439,440,448,449,458,459,460,463,464,465,469,471,479,480,483,484,499,508,509,511,512,524,552,553,554,555,556,579,580,585,586,],[50,50,-60,-62,-63,-64,-65,-66,-67,72,81,-70,-71,-52,72,72,72,-128,-102,109,72,-29,-107,81,-125,-126,-127,72,-241,-113,-114,-115,-116,-117,-118,-119,-120,-121,-122,-123,-124,-134,-131,-132,-133,-105,-106,-108,-109,-110,-111,-112,-61,72,-91,81,109,72,-134,72,-98,-99,-100,-101,-104,-134,-90,-72,81,50,-53,-93,-9,-10,72,-94,-95,-103,-129,-97,81,-185,-96,-169,-170,-338,-149,-150,50,50,50,-76,72,-92,81,50,-30,50,81,81,81,109,-186,50,50,50,-152,-159,-339,81,-162,-163,-145,72,-147,81,72,-219,-217,-218,-78,-79,-80,-81,-82,-83,-84,-85,50,-77,81,81,-73,-69,50,50,50,50,-35,-36,50,50,81,-171,50,-154,50,-156,-151,-160,-143,-144,-148,-146,-130,50,-177,-178,-221,-220,-237,-87,-84,72,-233,-234,-236,-31,-34,81,50,50,-172,-173,-153,-155,-161,-222,-224,-86,-84,-232,-235,-68,-32,-33,81,81,-223,-225,-87,-84,-227,-228,-226,-229,-231,-230,]),'CONST':([0,2,4,5,6,7,8,9,10,11,12,14,15,19,21,22,23,24,25,27,28,29,30,31,32,33,34,35,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,64,67,68,69,71,72,73,74,75,76,77,78,81,90,91,95,96,97,101,104,106,115,116,118,119,121,122,123,124,125,126,127,128,129,136,137,140,141,183,184,192,197,203,204,205,206,207,208,209,210,211,212,213,214,216,221,222,223,224,225,226,227,228,229,230,231,232,238,251,258,259,262,267,294,298,299,304,311,312,313,322,323,330,333,334,335,336,337,338,340,341,342,348,349,351,353,354,355,356,361,370,371,372,374,375,377,439,440,448,449,458,459,460,463,464,465,469,471,479,480,483,484,499,508,509,511,512,524,552,553,554,555,556,579,580,585,586,],[51,51,-60,-62,-63,-64,-65,-66,-67,51,51,-70,-71,-52,51,51,51,-128,-102,51,-29,-107,51,-125,-126,-127,51,-241,-113,-114,-115,-116,-117,-118,-119,-120,-121,-122,-123,-124,-134,-131,-132,-133,-105,-106,-108,-109,-110,-111,-112,-61,51,-91,51,51,-134,51,-98,-99,-100,-101,-104,-134,-90,-72,51,51,-53,51,-103,-129,51,-185,-169,-170,-338,-149,-150,51,51,51,-76,51,-92,51,51,-30,51,51,51,51,-186,51,51,51,-152,-159,-339,51,-162,-163,-145,51,-147,51,51,-219,-217,-218,-78,-79,-80,-81,-82,-83,-84,-85,51,-77,51,51,-73,-69,51,51,51,51,-35,-36,51,51,51,-171,51,-154,51,-156,-151,-160,-143,-144,-148,-146,-130,51,-177,-178,-221,-220,-237,-87,-84,51,-233,-234,-236,-31,-34,51,51,51,-172,-173,-153,-155,-161,-222,-224,-86,-84,-232,-235,-68,-32,-33,51,51,-223,-225,-87,-84,-227,-228,-226,-229,-231,-230,]),'RESTRICT':([0,2,4,5,6,7,8,9,10,11,12,14,15,19,21,22,23,24,25,27,28,29,30,31,32,33,34,35,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,64,67,68,69,71,72,73,74,75,76,77,78,81,90,91,95,96,97,101,104,106,115,116,118,119,121,122,123,124,125,126,127,128,129,136,137,140,141,183,184,192,197,203,204,205,206,207,208,209,210,211,212,213,214,216,221,222,223,224,225,226,227,228,229,230,231,232,238,251,258,259,262,267,294,298,299,304,311,312,313,322,323,330,333,334,335,336,337,338,340,341,342,348,349,351,353,354,355,356,361,370,371,372,374,375,377,439,440,448,449,458,459,460,463,464,465,469,471,479,480,483,484,499,508,509,511,512,524,552,553,554,555,556,579,580,585,586,],[52,52,-60,-62,-63,-64,-65,-66,-67,52,52,-70,-71,-52,52,52,52,-128,-102,52,-29,-107,52,-125,-126,-127,52,-241,-113,-114,-115,-116,-117,-118,-119,-120,-121,-122,-123,-124,-134,-131,-132,-133,-105,-106,-108,-109,-110,-111,-112,-61,52,-91,52,52,-134,52,-98,-99,-100,-101,-104,-134,-90,-72,52,52,-53,52,-103,-129,52,-185,-169,-170,-338,-149,-150,52,52,52,-76,52,-92,52,52,-30,52,52,52,52,-186,52,52,52,-152,-159,-339,52,-162,-163,-145,52,-147,52,52,-219,-217,-218,-78,-79,-80,-81,-82,-83,-84,-85,52,-77,52,52,-73,-69,52,52,52,52,-35,-36,52,52,52,-171,52,-154,52,-156,-151,-160,-143,-144,-148,-146,-130,52,-177,-178,-221,-220,-237,-87,-84,52,-233,-234,-236,-31,-34,52,52,52,-172,-173,-153,-155,-161,-222,-224,-86,-84,-232,-235,-68,-32,-33,52,52,-223,-225,-87,-84,-227,-228,-226,-229,-231,-230,]),'VOLATILE':([0,2,4,5,6,7,8,9,10,11,12,14,15,19,21,22,23,24,25,27,28,29,30,31,32,33,34,35,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,64,67,68,69,71,72,73,74,75,76,77,78,81,90,91,95,96,97,101,104,106,115,116,118,119,121,122,123,124,125,126,127,128,129,136,137,140,141,183,184,192,197,203,204,205,206,207,208,209,210,211,212,213,214,216,221,222,223,224,225,226,227,228,229,230,231,232,238,251,258,259,262,267,294,298,299,304,311,312,313,322,323,330,333,334,335,336,337,338,340,341,342,348,349,351,353,354,355,356,361,370,371,372,374,375,377,439,440,448,449,458,459,460,463,464,465,469,471,479,480,483,484,499,508,509,511,512,524,552,553,554,555,556,579,580,585,586,],[53,53,-60,-62,-63,-64,-65,-66,-67,53,53,-70,-71,-52,53,53,53,-128,-102,53,-29,-107,53,-125,-126,-127,53,-241,-113,-114,-115,-116,-117,-118,-119,-120,-121,-122,-123,-124,-134,-131,-132,-133,-105,-106,-108,-109,-110,-111,-112,-61,53,-91,53,53,-134,53,-98,-99,-100,-101,-104,-134,-90,-72,53,53,-53,53,-103,-129,53,-185,-169,-170,-338,-149,-150,53,53,53,-76,53,-92,53,53,-30,53,53,53,53,-186,53,53,53,-152,-159,-339,53,-162,-163,-145,53,-147,53,53,-219,-217,-218,-78,-79,-80,-81,-82,-83,-84,-85,53,-77,53,53,-73,-69,53,53,53,53,-35,-36,53,53,53,-171,53,-154,53,-156,-151,-160,-143,-144,-148,-146,-130,53,-177,-178,-221,-220,-237,-87,-84,53,-233,-234,-236,-31,-34,53,53,53,-172,-173,-153,-155,-161,-222,-224,-86,-84,-232,-235,-68,-32,-33,53,53,-223,-225,-87,-84,-227,-228,-226,-229,-231,-230,]),'AUTO':([0,2,4,5,6,7,8,9,10,11,12,14,15,19,21,22,23,24,25,27,28,29,31,32,33,34,35,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,64,67,68,69,71,72,73,74,75,76,77,78,81,90,91,96,97,101,104,106,118,119,121,122,123,127,128,129,137,140,192,206,208,221,222,223,224,225,226,227,228,229,230,231,232,251,262,267,311,312,313,322,330,334,336,337,349,351,353,354,355,356,361,370,371,372,374,375,377,439,440,449,458,459,460,463,464,469,471,479,480,483,484,499,508,509,524,552,553,554,555,556,579,580,585,586,],[54,54,-60,-62,-63,-64,-65,-66,-67,54,54,-70,-71,-52,54,54,54,-128,-102,54,-29,-107,-125,-126,-127,54,-241,-113,-114,-115,-116,-117,-118,-119,-120,-121,-122,-123,-124,-134,-131,-132,-133,-105,-106,-108,-109,-110,-111,-112,-61,54,-91,54,54,-134,54,-98,-99,-100,-101,-104,-134,-90,-72,54,-53,54,-103,-129,-169,-170,-338,-149,-150,-76,54,-92,54,-30,54,-152,-339,54,-219,-217,-218,-78,-79,-80,-81,-82,-83,-84,-85,-77,-73,-69,-35,-36,54,54,-171,-154,-156,-151,-130,54,-177,-178,-221,-220,-237,-87,-84,54,-233,-234,-236,-31,-34,54,54,-172,-173,-153,-155,-222,-224,-86,-84,-232,-235,-68,-32,-33,-223,-225,-87,-84,-227,-228,-226,-229,-231,-230,]),'REGISTER':([0,2,4,5,6,7,8,9,10,11,12,14,15,19,21,22,23,24,25,27,28,29,31,32,33,34,35,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,64,67,68,69,71,72,73,74,75,76,77,78,81,90,91,96,97,101,104,106,118,119,121,122,123,127,128,129,137,140,192,206,208,221,222,223,224,225,226,227,228,229,230,231,232,251,262,267,311,312,313,322,330,334,336,337,349,351,353,354,355,356,361,370,371,372,374,375,377,439,440,449,458,459,460,463,464,469,471,479,480,483,484,499,508,509,524,552,553,554,555,556,579,580,585,586,],[55,55,-60,-62,-63,-64,-65,-66,-67,55,55,-70,-71,-52,55,55,55,-128,-102,55,-29,-107,-125,-126,-127,55,-241,-113,-114,-115,-116,-117,-118,-119,-120,-121,-122,-123,-124,-134,-131,-132,-133,-105,-106,-108,-109,-110,-111,-112,-61,55,-91,55,55,-134,55,-98,-99,-100,-101,-104,-134,-90,-72,55,-53,55,-103,-129,-169,-170,-338,-149,-150,-76,55,-92,55,-30,55,-152,-339,55,-219,-217,-218,-78,-79,-80,-81,-82,-83,-84,-85,-77,-73,-69,-35,-36,55,55,-171,-154,-156,-151,-130,55,-177,-178,-221,-220,-237,-87,-84,55,-233,-234,-236,-31,-34,55,55,-172,-173,-153,-155,-222,-224,-86,-84,-232,-235,-68,-32,-33,-223,-225,-87,-84,-227,-228,-226,-229,-231,-230,]),'STATIC':([0,2,4,5,6,7,8,9,10,11,12,14,15,19,21,22,23,24,25,27,28,29,31,32,33,34,35,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,64,67,68,69,71,72,73,74,75,76,77,78,81,90,91,95,96,97,101,104,106,116,118,119,121,122,123,127,128,129,136,137,140,184,192,197,206,208,221,222,223,224,225,226,227,228,229,230,231,232,251,259,262,267,311,312,313,322,330,334,336,337,349,351,353,354,355,356,361,370,371,372,374,375,377,439,440,448,449,458,459,460,463,464,469,471,479,480,483,484,499,508,509,512,524,552,553,554,555,556,579,580,585,586,],[29,29,-60,-62,-63,-64,-65,-66,-67,29,29,-70,-71,-52,29,29,29,-128,-102,29,-29,-107,-125,-126,-127,29,-241,-113,-114,-115,-116,-117,-118,-119,-120,-121,-122,-123,-124,-134,-131,-132,-133,-105,-106,-108,-109,-110,-111,-112,-61,29,-91,29,29,-134,29,-98,-99,-100,-101,-104,-134,-90,-72,183,29,-53,29,-103,-129,-185,-169,-170,-338,-149,-150,-76,29,-92,258,29,-30,310,29,-186,-152,-339,29,-219,-217,-218,-78,-79,-80,-81,-82,-83,-84,-85,-77,402,-73,-69,-35,-36,29,29,-171,-154,-156,-151,-130,29,-177,-178,-221,-220,-237,-87,-84,29,-233,-234,-236,-31,-34,511,29,29,-172,-173,-153,-155,-222,-224,-86,-84,-232,-235,-68,-32,-33,545,-223,-225,-87,-84,-227,-228,-226,-229,-231,-230,]),'EXTERN':([0,2,4,5,6,7,8,9,10,11,12,14,15,19,21,22,23,24,25,27,28,29,31,32,33,34,35,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,64,67,68,69,71,72,73,74,75,76,77,78,81,90,91,96,97,101,104,106,118,119,121,122,123,127,128,129,137,140,192,206,208,221,222,223,224,225,226,227,228,229,230,231,232,251,262,267,311,312,313,322,330,334,336,337,349,351,353,354,355,356,361,370,371,372,374,375,377,439,440,449,458,459,460,463,464,469,471,479,480,483,484,499,508,509,524,552,553,554,555,556,579,580,585,586,],[56,56,-60,-62,-63,-64,-65,-66,-67,56,56,-70,-71,-52,56,56,56,-128,-102,56,-29,-107,-125,-126,-127,56,-241,-113,-114,-115,-116,-117,-118,-119,-120,-121,-122,-123,-124,-134,-131,-132,-133,-105,-106,-108,-109,-110,-111,-112,-61,56,-91,56,56,-134,56,-98,-99,-100,-101,-104,-134,-90,-72,56,-53,56,-103,-129,-169,-170,-338,-149,-150,-76,56,-92,56,-30,56,-152,-339,56,-219,-217,-218,-78,-79,-80,-81,-82,-83,-84,-85,-77,-73,-69,-35,-36,56,56,-171,-154,-156,-151,-130,56,-177,-178,-221,-220,-237,-87,-84,56,-233,-234,-236,-31,-34,56,56,-172,-173,-153,-155,-222,-224,-86,-84,-232,-235,-68,-32,-33,-223,-225,-87,-84,-227,-228,-226,-229,-231,-230,]),'TYPEDEF':([0,2,4,5,6,7,8,9,10,11,12,14,15,19,21,22,23,24,25,27,28,29,31,32,33,34,35,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,64,67,68,69,71,72,73,74,75,76,77,78,81,90,91,96,97,101,104,106,118,119,121,122,123,127,128,129,137,140,192,206,208,221,222,223,224,225,226,227,228,229,230,231,232,251,262,267,311,312,313,322,330,334,336,337,349,351,353,354,355,356,361,370,371,372,374,375,377,439,440,449,458,459,460,463,464,469,471,479,480,483,484,499,508,509,524,552,553,554,555,556,579,580,585,586,],[57,57,-60,-62,-63,-64,-65,-66,-67,57,57,-70,-71,-52,57,57,57,-128,-102,57,-29,-107,-125,-126,-127,57,-241,-113,-114,-115,-116,-117,-118,-119,-120,-121,-122,-123,-124,-134,-131,-132,-133,-105,-106,-108,-109,-110,-111,-112,-61,57,-91,57,57,-134,57,-98,-99,-100,-101,-104,-134,-90,-72,57,-53,57,-103,-129,-169,-170,-338,-149,-150,-76,57,-92,57,-30,57,-152,-339,57,-219,-217,-218,-78,-79,-80,-81,-82,-83,-84,-85,-77,-73,-69,-35,-36,57,57,-171,-154,-156,-151,-130,57,-177,-178,-221,-220,-237,-87,-84,57,-233,-234,-236,-31,-34,57,57,-172,-173,-153,-155,-222,-224,-86,-84,-232,-235,-68,-32,-33,-223,-225,-87,-84,-227,-228,-226,-229,-231,-230,]),'_THREAD_LOCAL':([0,2,4,5,6,7,8,9,10,11,12,14,15,19,21,22,23,24,25,27,28,29,31,32,33,34,35,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,64,67,68,69,71,72,73,74,75,76,77,78,81,90,91,96,97,101,104,106,118,119,121,122,123,127,128,129,137,140,192,206,208,221,222,223,224,225,226,227,228,229,230,231,232,251,262,267,311,312,313,322,330,334,336,337,349,351,353,354,355,356,361,370,371,372,374,375,377,439,440,449,458,459,460,463,464,469,471,479,480,483,484,499,508,509,524,552,553,554,555,556,579,580,585,586,],[58,58,-60,-62,-63,-64,-65,-66,-67,58,58,-70,-71,-52,58,58,58,-128,-102,58,-29,-107,-125,-126,-127,58,-241,-113,-114,-115,-116,-117,-118,-119,-120,-121,-122,-123,-124,-134,-131,-132,-133,-105,-106,-108,-109,-110,-111,-112,-61,58,-91,58,58,-134,58,-98,-99,-100,-101,-104,-134,-90,-72,58,-53,58,-103,-129,-169,-170,-338,-149,-150,-76,58,-92,58,-30,58,-152,-339,58,-219,-217,-218,-78,-79,-80,-81,-82,-83,-84,-85,-77,-73,-69,-35,-36,58,58,-171,-154,-156,-151,-130,58,-177,-178,-221,-220,-237,-87,-84,58,-233,-234,-236,-31,-34,58,58,-172,-173,-153,-155,-222,-224,-86,-84,-232,-235,-68,-32,-33,-223,-225,-87,-84,-227,-228,-226,-229,-231,-230,]),'INLINE':([0,2,4,5,6,7,8,9,10,11,12,14,15,19,21,22,23,24,25,27,28,29,31,32,33,34,35,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,64,67,68,69,71,72,73,74,75,76,77,78,81,90,91,96,97,101,104,106,118,119,121,122,123,127,128,129,137,140,192,206,208,221,222,223,224,225,226,227,228,229,230,231,232,251,262,267,311,312,313,322,330,334,336,337,349,351,353,354,355,356,361,370,371,372,374,375,377,439,440,449,458,459,460,463,464,469,471,479,480,483,484,499,508,509,524,552,553,554,555,556,579,580,585,586,],[59,59,-60,-62,-63,-64,-65,-66,-67,59,59,-70,-71,-52,59,59,59,-128,-102,59,-29,-107,-125,-126,-127,59,-241,-113,-114,-115,-116,-117,-118,-119,-120,-121,-122,-123,-124,-134,-131,-132,-133,-105,-106,-108,-109,-110,-111,-112,-61,59,-91,59,59,-134,59,-98,-99,-100,-101,-104,-134,-90,-72,59,-53,59,-103,-129,-169,-170,-338,-149,-150,-76,59,-92,59,-30,59,-152,-339,59,-219,-217,-218,-78,-79,-80,-81,-82,-83,-84,-85,-77,-73,-69,-35,-36,59,59,-171,-154,-156,-151,-130,59,-177,-178,-221,-220,-237,-87,-84,59,-233,-234,-236,-31,-34,59,59,-172,-173,-153,-155,-222,-224,-86,-84,-232,-235,-68,-32,-33,-223,-225,-87,-84,-227,-228,-226,-229,-231,-230,]),'_NORETURN':([0,2,4,5,6,7,8,9,10,11,12,14,15,19,21,22,23,24,25,27,28,29,31,32,33,34,35,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,64,67,68,69,71,72,73,74,75,76,77,78,81,90,91,96,97,101,104,106,118,119,121,122,123,127,128,129,137,140,192,206,208,221,222,223,224,225,226,227,228,229,230,231,232,251,262,267,311,312,313,322,330,334,336,337,349,351,353,354,355,356,361,370,371,372,374,375,377,439,440,449,458,459,460,463,464,469,471,479,480,483,484,499,508,509,524,552,553,554,555,556,579,580,585,586,],[60,60,-60,-62,-63,-64,-65,-66,-67,60,60,-70,-71,-52,60,60,60,-128,-102,60,-29,-107,-125,-126,-127,60,-241,-113,-114,-115,-116,-117,-118,-119,-120,-121,-122,-123,-124,-134,-131,-132,-133,-105,-106,-108,-109,-110,-111,-112,-61,60,-91,60,60,-134,60,-98,-99,-100,-101,-104,-134,-90,-72,60,-53,60,-103,-129,-169,-170,-338,-149,-150,-76,60,-92,60,-30,60,-152,-339,60,-219,-217,-218,-78,-79,-80,-81,-82,-83,-84,-85,-77,-73,-69,-35,-36,60,60,-171,-154,-156,-151,-130,60,-177,-178,-221,-220,-237,-87,-84,60,-233,-234,-236,-31,-34,60,60,-172,-173,-153,-155,-222,-224,-86,-84,-232,-235,-68,-32,-33,-223,-225,-87,-84,-227,-228,-226,-229,-231,-230,]),'_ALIGNAS':([0,2,4,5,6,7,8,9,10,11,12,14,15,19,21,22,23,24,25,27,28,29,31,32,33,34,35,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,64,67,68,69,71,72,73,74,75,76,77,78,81,90,91,96,97,101,104,106,118,119,121,122,123,124,125,126,127,128,129,137,140,141,192,203,204,205,206,207,208,209,210,211,212,214,216,221,222,223,224,225,226,227,228,229,230,231,232,238,251,262,267,294,298,299,304,311,312,313,322,330,333,334,335,336,337,338,340,341,342,348,349,351,353,354,355,356,361,370,371,372,374,375,377,439,440,449,458,459,460,463,464,465,469,471,479,480,483,484,499,508,509,524,552,553,554,555,556,579,580,585,586,],[61,61,-60,-62,-63,-64,-65,-66,-67,61,61,-70,-71,-52,61,61,61,-128,-102,61,-29,-107,-125,-126,-127,61,-241,-113,-114,-115,-116,-117,-118,-119,-120,-121,-122,-123,-124,-134,-131,-132,-133,-105,-106,-108,-109,-110,-111,-112,-61,61,-91,61,61,-134,61,-98,-99,-100,-101,-104,-134,-90,-72,61,-53,61,-103,-129,-169,-170,-338,-149,-150,61,61,61,-76,61,-92,61,-30,61,61,61,61,61,-152,-159,-339,61,-162,-163,-145,-147,61,61,-219,-217,-218,-78,-79,-80,-81,-82,-83,-84,-85,61,-77,-73,-69,61,61,61,61,-35,-36,61,61,-171,61,-154,61,-156,-151,-160,-143,-144,-148,-146,-130,61,-177,-178,-221,-220,-237,-87,-84,61,-233,-234,-236,-31,-34,61,61,-172,-173,-153,-155,-161,-222,-224,-86,-84,-232,-235,-68,-32,-33,-223,-225,-87,-84,-227,-228,-226,-229,-231,-230,]),'STRUCT':([0,2,4,5,6,7,8,9,10,11,14,15,19,21,22,23,26,27,28,29,34,50,51,52,53,54,55,56,57,58,59,60,64,67,68,70,71,72,73,90,91,96,97,98,99,100,101,102,103,112,116,117,121,124,125,126,127,128,129,137,140,141,193,197,203,204,205,207,208,210,211,213,221,222,223,224,225,226,227,228,229,230,231,232,238,251,262,267,294,298,299,304,311,312,313,322,333,335,338,349,351,353,354,355,356,361,370,371,372,374,375,377,439,440,449,458,465,469,471,479,480,483,484,499,508,509,524,552,553,554,555,556,579,580,585,586,],[62,62,-60,-62,-63,-64,-65,-66,-67,62,-70,-71,-52,-340,-340,-340,62,-340,-29,-107,-340,-134,-131,-132,-133,-105,-106,-108,-109,-110,-111,-112,-61,62,-91,62,-340,-134,62,-90,-72,62,-53,-93,-9,-10,-340,-94,-95,-97,-185,-96,-338,62,62,62,-76,62,-92,62,-30,62,62,-186,62,62,62,-159,-339,-162,-163,62,62,-219,-217,-218,-78,-79,-80,-81,-82,-83,-84,-85,62,-77,-73,-69,62,62,62,62,-35,-36,62,62,62,62,-160,-130,62,-177,-178,-221,-220,-237,-87,-84,62,-233,-234,-236,-31,-34,62,62,-161,-222,-224,-86,-84,-232,-235,-68,-32,-33,-223,-225,-87,-84,-227,-228,-226,-229,-231,-230,]),'UNION':([0,2,4,5,6,7,8,9,10,11,14,15,19,21,22,23,26,27,28,29,34,50,51,52,53,54,55,56,57,58,59,60,64,67,68,70,71,72,73,90,91,96,97,98,99,100,101,102,103,112,116,117,121,124,125,126,127,128,129,137,140,141,193,197,203,204,205,207,208,210,211,213,221,222,223,224,225,226,227,228,229,230,231,232,238,251,262,267,294,298,299,304,311,312,313,322,333,335,338,349,351,353,354,355,356,361,370,371,372,374,375,377,439,440,449,458,465,469,471,479,480,483,484,499,508,509,524,552,553,554,555,556,579,580,585,586,],[63,63,-60,-62,-63,-64,-65,-66,-67,63,-70,-71,-52,-340,-340,-340,63,-340,-29,-107,-340,-134,-131,-132,-133,-105,-106,-108,-109,-110,-111,-112,-61,63,-91,63,-340,-134,63,-90,-72,63,-53,-93,-9,-10,-340,-94,-95,-97,-185,-96,-338,63,63,63,-76,63,-92,63,-30,63,63,-186,63,63,63,-159,-339,-162,-163,63,63,-219,-217,-218,-78,-79,-80,-81,-82,-83,-84,-85,63,-77,-73,-69,63,63,63,63,-35,-36,63,63,63,63,-160,-130,63,-177,-178,-221,-220,-237,-87,-84,63,-233,-234,-236,-31,-34,63,63,-161,-222,-224,-86,-84,-232,-235,-68,-32,-33,-223,-225,-87,-84,-227,-228,-226,-229,-231,-230,]),'LBRACE':([11,15,19,28,36,37,62,63,65,66,67,68,73,90,91,97,118,119,121,122,123,128,129,131,135,140,195,208,221,222,223,224,225,226,227,228,229,230,231,232,238,242,256,262,267,311,312,355,356,358,360,361,369,370,371,374,375,377,392,393,394,405,439,440,469,470,471,474,479,480,483,484,487,489,498,499,504,505,508,509,524,525,526,527,532,533,552,553,554,555,556,562,570,579,580,582,584,585,586,],[-340,-71,-52,-29,121,121,-157,-158,121,-7,-8,-91,-340,-90,-72,-53,121,121,-338,121,121,121,-92,121,121,-30,121,-339,121,-219,-217,-218,-78,-79,-80,-81,-82,-83,-84,-85,121,121,-340,-73,-69,-35,-36,-221,-220,121,121,-237,121,-87,-74,-233,-234,-236,-11,121,-12,121,-31,-34,-222,121,-224,121,-86,-75,-232,-235,-340,-201,-340,-68,121,121,-32,-33,-223,121,121,121,121,-11,-225,-87,-74,-227,-228,-340,121,-226,-229,121,121,-231,-230,]),'RBRACE':([15,90,91,121,124,128,139,143,144,145,146,151,152,158,159,162,163,164,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,200,201,202,203,204,205,207,208,210,211,219,220,221,222,223,224,225,226,227,228,229,230,231,232,249,250,255,256,262,263,267,291,292,293,295,296,297,300,301,302,303,328,329,331,333,335,338,355,356,361,370,371,374,375,377,390,391,392,406,409,410,411,412,413,414,415,416,417,418,419,420,421,422,423,424,425,426,429,431,432,433,434,461,462,465,469,471,473,479,480,483,484,485,486,487,488,497,499,501,502,505,506,524,531,537,538,552,553,554,555,556,560,561,562,563,574,579,580,585,586,],[-71,-90,-72,-338,208,-340,-328,-306,-255,-256,-258,-277,-279,-292,-315,-304,-305,-307,-316,-317,-318,-319,-320,-321,-322,-323,-324,-325,-326,-327,-330,-331,-332,-333,208,-174,-179,208,208,208,-159,-339,-162,-163,208,-5,-6,-219,-217,-218,-78,-79,-80,-81,-82,-83,-84,-85,-242,-277,-196,-340,-73,-329,-69,-300,-301,-280,-281,-282,-283,-334,-335,-336,-337,208,208,-175,208,208,-160,-221,-220,-237,-87,-84,-233,-234,-236,208,-22,-21,-308,-259,-260,-261,-262,-263,-264,-265,-266,-267,-268,-269,-270,-271,-272,-273,-274,-275,-276,-295,-296,-297,-298,-299,-176,-180,-161,-222,-224,-240,-86,-84,-232,-235,-243,-197,208,-199,-278,-68,-293,-294,-284,-285,-223,-198,208,-257,-225,-87,-84,-227,-228,-200,-302,208,-309,-303,-226,-229,-231,-230,]),'CASE':([15,90,91,121,128,208,221,222,223,224,225,226,227,228,229,230,231,232,242,262,267,355,356,358,360,361,369,370,371,374,375,377,469,470,471,479,480,483,484,499,524,525,526,527,552,553,554,555,556,570,579,580,582,584,585,586,],[-71,-90,-72,-338,234,-339,234,-219,-217,-218,-78,-79,-80,-81,-82,-83,-84,-85,234,-73,-69,-221,-220,234,234,-237,234,-87,-74,-233,-234,-236,-222,234,-224,-86,-75,-232,-235,-68,-223,234,234,234,-225,-87,-74,-227,-228,234,-226,-229,234,234,-231,-230,]),'DEFAULT':([15,90,91,121,128,208,221,222,223,224,225,226,227,228,229,230,231,232,242,262,267,355,356,358,360,361,369,370,371,374,375,377,469,470,471,479,480,483,484,499,524,525,526,527,552,553,554,555,556,570,579,580,582,584,585,586,],[-71,-90,-72,-338,235,-339,235,-219,-217,-218,-78,-79,-80,-81,-82,-83,-84,-85,235,-73,-69,-221,-220,235,235,-237,235,-87,-74,-233,-234,-236,-222,235,-224,-86,-75,-232,-235,-68,-223,235,235,235,-225,-87,-74,-227,-228,235,-226,-229,235,235,-231,-230,]),'IF':([15,90,91,121,128,208,221,222,223,224,225,226,227,228,229,230,231,232,242,262,267,355,356,358,360,361,369,370,371,374,375,377,469,470,471,479,480,483,484,499,524,525,526,527,552,553,554,555,556,570,579,580,582,584,585,586,],[-71,-90,-72,-338,237,-339,237,-219,-217,-218,-78,-79,-80,-81,-82,-83,-84,-85,237,-73,-69,-221,-220,237,237,-237,237,-87,-74,-233,-234,-236,-222,237,-224,-86,-75,-232,-235,-68,-223,237,237,237,-225,-87,-74,-227,-228,237,-226,-229,237,237,-231,-230,]),'SWITCH':([15,90,91,121,128,208,221,222,223,224,225,226,227,228,229,230,231,232,242,262,267,355,356,358,360,361,369,370,371,374,375,377,469,470,471,479,480,483,484,499,524,525,526,527,552,553,554,555,556,570,579,580,582,584,585,586,],[-71,-90,-72,-338,240,-339,240,-219,-217,-218,-78,-79,-80,-81,-82,-83,-84,-85,240,-73,-69,-221,-220,240,240,-237,240,-87,-74,-233,-234,-236,-222,240,-224,-86,-75,-232,-235,-68,-223,240,240,240,-225,-87,-74,-227,-228,240,-226,-229,240,240,-231,-230,]),'WHILE':([15,90,91,121,128,208,221,222,223,224,225,226,227,228,229,230,231,232,242,262,267,355,356,358,360,361,368,369,370,371,374,375,377,469,470,471,479,480,483,484,499,524,525,526,527,552,553,554,555,556,570,579,580,582,584,585,586,],[-71,-90,-72,-338,241,-339,241,-219,-217,-218,-78,-79,-80,-81,-82,-83,-84,-85,241,-73,-69,-221,-220,241,241,-237,478,241,-87,-74,-233,-234,-236,-222,241,-224,-86,-75,-232,-235,-68,-223,241,241,241,-225,-87,-74,-227,-228,241,-226,-229,241,241,-231,-230,]),'DO':([15,90,91,121,128,208,221,222,223,224,225,226,227,228,229,230,231,232,242,262,267,355,356,358,360,361,369,370,371,374,375,377,469,470,471,479,480,483,484,499,524,525,526,527,552,553,554,555,556,570,579,580,582,584,585,586,],[-71,-90,-72,-338,242,-339,242,-219,-217,-218,-78,-79,-80,-81,-82,-83,-84,-85,242,-73,-69,-221,-220,242,242,-237,242,-87,-74,-233,-234,-236,-222,242,-224,-86,-75,-232,-235,-68,-223,242,242,242,-225,-87,-74,-227,-228,242,-226,-229,242,242,-231,-230,]),'FOR':([15,90,91,121,128,208,221,222,223,224,225,226,227,228,229,230,231,232,242,262,267,355,356,358,360,361,369,370,371,374,375,377,469,470,471,479,480,483,484,499,524,525,526,527,552,553,554,555,556,570,579,580,582,584,585,586,],[-71,-90,-72,-338,243,-339,243,-219,-217,-218,-78,-79,-80,-81,-82,-83,-84,-85,243,-73,-69,-221,-220,243,243,-237,243,-87,-74,-233,-234,-236,-222,243,-224,-86,-75,-232,-235,-68,-223,243,243,243,-225,-87,-74,-227,-228,243,-226,-229,243,243,-231,-230,]),'GOTO':([15,90,91,121,128,208,221,222,223,224,225,226,227,228,229,230,231,232,242,262,267,355,356,358,360,361,369,370,371,374,375,377,469,470,471,479,480,483,484,499,524,525,526,527,552,553,554,555,556,570,579,580,582,584,585,586,],[-71,-90,-72,-338,244,-339,244,-219,-217,-218,-78,-79,-80,-81,-82,-83,-84,-85,244,-73,-69,-221,-220,244,244,-237,244,-87,-74,-233,-234,-236,-222,244,-224,-86,-75,-232,-235,-68,-223,244,244,244,-225,-87,-74,-227,-228,244,-226,-229,244,244,-231,-230,]),'BREAK':([15,90,91,121,128,208,221,222,223,224,225,226,227,228,229,230,231,232,242,262,267,355,356,358,360,361,369,370,371,374,375,377,469,470,471,479,480,483,484,499,524,525,526,527,552,553,554,555,556,570,579,580,582,584,585,586,],[-71,-90,-72,-338,245,-339,245,-219,-217,-218,-78,-79,-80,-81,-82,-83,-84,-85,245,-73,-69,-221,-220,245,245,-237,245,-87,-74,-233,-234,-236,-222,245,-224,-86,-75,-232,-235,-68,-223,245,245,245,-225,-87,-74,-227,-228,245,-226,-229,245,245,-231,-230,]),'CONTINUE':([15,90,91,121,128,208,221,222,223,224,225,226,227,228,229,230,231,232,242,262,267,355,356,358,360,361,369,370,371,374,375,377,469,470,471,479,480,483,484,499,524,525,526,527,552,553,554,555,556,570,579,580,582,584,585,586,],[-71,-90,-72,-338,246,-339,246,-219,-217,-218,-78,-79,-80,-81,-82,-83,-84,-85,246,-73,-69,-221,-220,246,246,-237,246,-87,-74,-233,-234,-236,-222,246,-224,-86,-75,-232,-235,-68,-223,246,246,246,-225,-87,-74,-227,-228,246,-226,-229,246,246,-231,-230,]),'RETURN':([15,90,91,121,128,208,221,222,223,224,225,226,227,228,229,230,231,232,242,262,267,355,356,358,360,361,369,370,371,374,375,377,469,470,471,479,480,483,484,499,524,525,526,527,552,553,554,555,556,570,579,580,582,584,585,586,],[-71,-90,-72,-338,247,-339,247,-219,-217,-218,-78,-79,-80,-81,-82,-83,-84,-85,247,-73,-69,-221,-220,247,247,-237,247,-87,-74,-233,-234,-236,-222,247,-224,-86,-75,-232,-235,-68,-223,247,247,247,-225,-87,-74,-227,-228,247,-226,-229,247,247,-231,-230,]),'PLUSPLUS':([15,51,52,53,81,90,91,94,95,114,115,116,121,126,128,135,136,139,141,143,147,148,149,150,152,153,154,155,156,158,159,160,161,162,163,164,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,195,197,208,221,222,223,224,225,226,227,228,229,230,231,232,233,234,238,242,247,256,257,258,259,262,263,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,291,292,294,298,300,301,302,303,306,309,310,323,332,347,355,356,358,360,361,362,365,366,367,369,370,371,372,374,375,377,378,379,380,381,382,383,384,385,386,387,388,389,392,393,394,397,400,401,402,405,406,429,431,432,433,434,448,455,457,467,469,470,471,474,479,480,482,483,484,487,489,498,499,500,501,502,503,510,511,512,520,524,525,526,527,528,529,532,533,543,544,545,552,553,554,555,556,559,561,562,563,565,570,572,574,579,580,582,584,585,586,],[-71,-131,-132,-133,-134,-90,-72,153,-340,-27,-28,-185,-338,153,153,153,-340,-328,153,-306,-287,-288,-289,-286,291,153,153,153,153,-292,-315,-290,-291,-304,-305,-307,-316,-317,-318,-319,-320,-321,-322,-323,-324,-325,-326,-327,-330,-331,-332,-333,153,-340,-28,153,-186,-339,153,-219,-217,-218,-78,-79,-80,-81,-82,-83,-84,-85,-315,153,153,153,153,-340,153,-340,-28,-73,-329,-69,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,-300,-301,153,153,-334,-335,-336,-337,-287,153,153,-340,153,153,-221,-220,153,153,-237,153,153,153,153,153,-87,-74,153,-233,-234,-236,153,-244,-245,-246,-247,-248,-249,-250,-251,-252,-253,-254,-11,153,-12,153,-287,153,153,153,-308,-295,-296,-297,-298,-299,-340,153,153,153,-222,153,-224,153,-86,-75,153,-232,-235,-340,-201,-340,-68,153,-293,-294,153,153,-340,-28,-287,-223,153,153,153,153,153,153,-11,-287,153,153,-225,-87,-74,-227,-228,153,-302,-340,-309,153,153,153,-303,-226,-229,153,153,-231,-230,]),'MINUSMINUS':([15,51,52,53,81,90,91,94,95,114,115,116,121,126,128,135,136,139,141,143,147,148,149,150,152,153,154,155,156,158,159,160,161,162,163,164,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,195,197,208,221,222,223,224,225,226,227,228,229,230,231,232,233,234,238,242,247,256,257,258,259,262,263,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,291,292,294,298,300,301,302,303,306,309,310,323,332,347,355,356,358,360,361,362,365,366,367,369,370,371,372,374,375,377,378,379,380,381,382,383,384,385,386,387,388,389,392,393,394,397,400,401,402,405,406,429,431,432,433,434,448,455,457,467,469,470,471,474,479,480,482,483,484,487,489,498,499,500,501,502,503,510,511,512,520,524,525,526,527,528,529,532,533,543,544,545,552,553,554,555,556,559,561,562,563,565,570,572,574,579,580,582,584,585,586,],[-71,-131,-132,-133,-134,-90,-72,154,-340,-27,-28,-185,-338,154,154,154,-340,-328,154,-306,-287,-288,-289,-286,292,154,154,154,154,-292,-315,-290,-291,-304,-305,-307,-316,-317,-318,-319,-320,-321,-322,-323,-324,-325,-326,-327,-330,-331,-332,-333,154,-340,-28,154,-186,-339,154,-219,-217,-218,-78,-79,-80,-81,-82,-83,-84,-85,-315,154,154,154,154,-340,154,-340,-28,-73,-329,-69,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,-300,-301,154,154,-334,-335,-336,-337,-287,154,154,-340,154,154,-221,-220,154,154,-237,154,154,154,154,154,-87,-74,154,-233,-234,-236,154,-244,-245,-246,-247,-248,-249,-250,-251,-252,-253,-254,-11,154,-12,154,-287,154,154,154,-308,-295,-296,-297,-298,-299,-340,154,154,154,-222,154,-224,154,-86,-75,154,-232,-235,-340,-201,-340,-68,154,-293,-294,154,154,-340,-28,-287,-223,154,154,154,154,154,154,-11,-287,154,154,-225,-87,-74,-227,-228,154,-302,-340,-309,154,154,154,-303,-226,-229,154,154,-231,-230,]),'SIZEOF':([15,51,52,53,81,90,91,94,95,114,115,116,121,126,128,135,136,141,147,148,149,150,153,154,155,156,160,161,182,183,184,195,197,208,221,222,223,224,225,226,227,228,229,230,231,232,234,238,242,247,256,257,258,259,262,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,294,298,306,309,310,323,332,347,355,356,358,360,361,362,365,366,367,369,370,371,372,374,375,377,378,379,380,381,382,383,384,385,386,387,388,389,392,393,394,397,400,401,402,405,448,455,457,467,469,470,471,474,479,480,482,483,484,487,489,498,499,500,503,510,511,512,520,524,525,526,527,528,529,532,533,543,544,545,552,553,554,555,556,559,562,565,570,572,579,580,582,584,585,586,],[-71,-131,-132,-133,-134,-90,-72,156,-340,-27,-28,-185,-338,156,156,156,-340,156,-287,-288,-289,-286,156,156,156,156,-290,-291,156,-340,-28,156,-186,-339,156,-219,-217,-218,-78,-79,-80,-81,-82,-83,-84,-85,156,156,156,156,-340,156,-340,-28,-73,-69,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,-287,156,156,-340,156,156,-221,-220,156,156,-237,156,156,156,156,156,-87,-74,156,-233,-234,-236,156,-244,-245,-246,-247,-248,-249,-250,-251,-252,-253,-254,-11,156,-12,156,-287,156,156,156,-340,156,156,156,-222,156,-224,156,-86,-75,156,-232,-235,-340,-201,-340,-68,156,156,156,-340,-28,-287,-223,156,156,156,156,156,156,-11,-287,156,156,-225,-87,-74,-227,-228,156,-340,156,156,156,-226,-229,156,156,-231,-230,]),'_ALIGNOF':([15,51,52,53,81,90,91,94,95,114,115,116,121,126,128,135,136,141,147,148,149,150,153,154,155,156,160,161,182,183,184,195,197,208,221,222,223,224,225,226,227,228,229,230,231,232,234,238,242,247,256,257,258,259,262,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,294,298,306,309,310,323,332,347,355,356,358,360,361,362,365,366,367,369,370,371,372,374,375,377,378,379,380,381,382,383,384,385,386,387,388,389,392,393,394,397,400,401,402,405,448,455,457,467,469,470,471,474,479,480,482,483,484,487,489,498,499,500,503,510,511,512,520,524,525,526,527,528,529,532,533,543,544,545,552,553,554,555,556,559,562,565,570,572,579,580,582,584,585,586,],[-71,-131,-132,-133,-134,-90,-72,157,-340,-27,-28,-185,-338,157,157,157,-340,157,-287,-288,-289,-286,157,157,157,157,-290,-291,157,-340,-28,157,-186,-339,157,-219,-217,-218,-78,-79,-80,-81,-82,-83,-84,-85,157,157,157,157,-340,157,-340,-28,-73,-69,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,157,-287,157,157,-340,157,157,-221,-220,157,157,-237,157,157,157,157,157,-87,-74,157,-233,-234,-236,157,-244,-245,-246,-247,-248,-249,-250,-251,-252,-253,-254,-11,157,-12,157,-287,157,157,157,-340,157,157,157,-222,157,-224,157,-86,-75,157,-232,-235,-340,-201,-340,-68,157,157,157,-340,-28,-287,-223,157,157,157,157,157,157,-11,-287,157,157,-225,-87,-74,-227,-228,157,-340,157,157,157,-226,-229,157,157,-231,-230,]),'AND':([15,51,52,53,81,90,91,94,95,114,115,116,121,126,128,135,136,139,141,143,145,146,147,148,149,150,151,152,153,154,155,156,158,159,160,161,162,163,164,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,195,197,208,221,222,223,224,225,226,227,228,229,230,231,232,233,234,238,242,247,250,256,257,258,259,262,263,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,291,292,293,294,295,296,297,298,300,301,302,303,306,309,310,323,332,347,355,356,358,360,361,362,365,366,367,369,370,371,372,374,375,377,378,379,380,381,382,383,384,385,386,387,388,389,392,393,394,397,400,401,402,405,406,409,410,411,412,413,414,415,416,417,418,419,420,421,422,423,424,425,426,429,431,432,433,434,448,455,457,467,469,470,471,474,479,480,482,483,484,487,489,497,498,499,500,501,502,503,505,506,510,511,512,520,524,525,526,527,528,529,532,533,543,544,545,552,553,554,555,556,559,561,562,563,565,570,572,574,579,580,582,584,585,586,],[-71,-131,-132,-133,-134,-90,-72,150,-340,-27,-28,-185,-338,150,150,150,-340,-328,150,-306,282,-258,-287,-288,-289,-286,-277,-279,150,150,150,150,-292,-315,-290,-291,-304,-305,-307,-316,-317,-318,-319,-320,-321,-322,-323,-324,-325,-326,-327,-330,-331,-332,-333,150,-340,-28,150,-186,-339,150,-219,-217,-218,-78,-79,-80,-81,-82,-83,-84,-85,-315,150,150,150,150,-277,-340,150,-340,-28,-73,-329,-69,150,150,150,150,150,150,150,150,150,150,150,150,150,150,150,150,150,150,150,150,150,-300,-301,-280,150,-281,-282,-283,150,-334,-335,-336,-337,-287,150,150,-340,150,150,-221,-220,150,150,-237,150,150,150,150,150,-87,-74,150,-233,-234,-236,150,-244,-245,-246,-247,-248,-249,-250,-251,-252,-253,-254,-11,150,-12,150,-287,150,150,150,-308,-259,-260,-261,-262,-263,-264,-265,-266,-267,-268,-269,-270,-271,-272,282,282,282,282,-295,-296,-297,-298,-299,-340,150,150,150,-222,150,-224,150,-86,-75,150,-232,-235,-340,-201,-278,-340,-68,150,-293,-294,150,-284,-285,150,-340,-28,-287,-223,150,150,150,150,150,150,-11,-287,150,150,-225,-87,-74,-227,-228,150,-302,-340,-309,150,150,150,-303,-226,-229,150,150,-231,-230,]),'PLUS':([15,51,52,53,81,90,91,94,95,114,115,116,121,126,128,135,136,139,141,143,145,146,147,148,149,150,151,152,153,154,155,156,158,159,160,161,162,163,164,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,195,197,208,221,222,223,224,225,226,227,228,229,230,231,232,233,234,238,242,247,250,256,257,258,259,262,263,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,291,292,293,294,295,296,297,298,300,301,302,303,306,309,310,323,332,347,355,356,358,360,361,362,365,366,367,369,370,371,372,374,375,377,378,379,380,381,382,383,384,385,386,387,388,389,392,393,394,397,400,401,402,405,406,409,410,411,412,413,414,415,416,417,418,419,420,421,422,423,424,425,426,429,431,432,433,434,448,455,457,467,469,470,471,474,479,480,482,483,484,487,489,497,498,499,500,501,502,503,505,506,510,511,512,520,524,525,526,527,528,529,532,533,543,544,545,552,553,554,555,556,559,561,562,563,565,570,572,574,579,580,582,584,585,586,],[-71,-131,-132,-133,-134,-90,-72,148,-340,-27,-28,-185,-338,148,148,148,-340,-328,148,-306,272,-258,-287,-288,-289,-286,-277,-279,148,148,148,148,-292,-315,-290,-291,-304,-305,-307,-316,-317,-318,-319,-320,-321,-322,-323,-324,-325,-326,-327,-330,-331,-332,-333,148,-340,-28,148,-186,-339,148,-219,-217,-218,-78,-79,-80,-81,-82,-83,-84,-85,-315,148,148,148,148,-277,-340,148,-340,-28,-73,-329,-69,148,148,148,148,148,148,148,148,148,148,148,148,148,148,148,148,148,148,148,148,148,-300,-301,-280,148,-281,-282,-283,148,-334,-335,-336,-337,-287,148,148,-340,148,148,-221,-220,148,148,-237,148,148,148,148,148,-87,-74,148,-233,-234,-236,148,-244,-245,-246,-247,-248,-249,-250,-251,-252,-253,-254,-11,148,-12,148,-287,148,148,148,-308,-259,-260,-261,-262,-263,272,272,272,272,272,272,272,272,272,272,272,272,272,-295,-296,-297,-298,-299,-340,148,148,148,-222,148,-224,148,-86,-75,148,-232,-235,-340,-201,-278,-340,-68,148,-293,-294,148,-284,-285,148,-340,-28,-287,-223,148,148,148,148,148,148,-11,-287,148,148,-225,-87,-74,-227,-228,148,-302,-340,-309,148,148,148,-303,-226,-229,148,148,-231,-230,]),'MINUS':([15,51,52,53,81,90,91,94,95,114,115,116,121,126,128,135,136,139,141,143,145,146,147,148,149,150,151,152,153,154,155,156,158,159,160,161,162,163,164,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,195,197,208,221,222,223,224,225,226,227,228,229,230,231,232,233,234,238,242,247,250,256,257,258,259,262,263,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,291,292,293,294,295,296,297,298,300,301,302,303,306,309,310,323,332,347,355,356,358,360,361,362,365,366,367,369,370,371,372,374,375,377,378,379,380,381,382,383,384,385,386,387,388,389,392,393,394,397,400,401,402,405,406,409,410,411,412,413,414,415,416,417,418,419,420,421,422,423,424,425,426,429,431,432,433,434,448,455,457,467,469,470,471,474,479,480,482,483,484,487,489,497,498,499,500,501,502,503,505,506,510,511,512,520,524,525,526,527,528,529,532,533,543,544,545,552,553,554,555,556,559,561,562,563,565,570,572,574,579,580,582,584,585,586,],[-71,-131,-132,-133,-134,-90,-72,149,-340,-27,-28,-185,-338,149,149,149,-340,-328,149,-306,273,-258,-287,-288,-289,-286,-277,-279,149,149,149,149,-292,-315,-290,-291,-304,-305,-307,-316,-317,-318,-319,-320,-321,-322,-323,-324,-325,-326,-327,-330,-331,-332,-333,149,-340,-28,149,-186,-339,149,-219,-217,-218,-78,-79,-80,-81,-82,-83,-84,-85,-315,149,149,149,149,-277,-340,149,-340,-28,-73,-329,-69,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,149,-300,-301,-280,149,-281,-282,-283,149,-334,-335,-336,-337,-287,149,149,-340,149,149,-221,-220,149,149,-237,149,149,149,149,149,-87,-74,149,-233,-234,-236,149,-244,-245,-246,-247,-248,-249,-250,-251,-252,-253,-254,-11,149,-12,149,-287,149,149,149,-308,-259,-260,-261,-262,-263,273,273,273,273,273,273,273,273,273,273,273,273,273,-295,-296,-297,-298,-299,-340,149,149,149,-222,149,-224,149,-86,-75,149,-232,-235,-340,-201,-278,-340,-68,149,-293,-294,149,-284,-285,149,-340,-28,-287,-223,149,149,149,149,149,149,-11,-287,149,149,-225,-87,-74,-227,-228,149,-302,-340,-309,149,149,149,-303,-226,-229,149,149,-231,-230,]),'NOT':([15,51,52,53,81,90,91,94,95,114,115,116,121,126,128,135,136,141,147,148,149,150,153,154,155,156,160,161,182,183,184,195,197,208,221,222,223,224,225,226,227,228,229,230,231,232,234,238,242,247,256,257,258,259,262,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,294,298,306,309,310,323,332,347,355,356,358,360,361,362,365,366,367,369,370,371,372,374,375,377,378,379,380,381,382,383,384,385,386,387,388,389,392,393,394,397,400,401,402,405,448,455,457,467,469,470,471,474,479,480,482,483,484,487,489,498,499,500,503,510,511,512,520,524,525,526,527,528,529,532,533,543,544,545,552,553,554,555,556,559,562,565,570,572,579,580,582,584,585,586,],[-71,-131,-132,-133,-134,-90,-72,160,-340,-27,-28,-185,-338,160,160,160,-340,160,-287,-288,-289,-286,160,160,160,160,-290,-291,160,-340,-28,160,-186,-339,160,-219,-217,-218,-78,-79,-80,-81,-82,-83,-84,-85,160,160,160,160,-340,160,-340,-28,-73,-69,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,-287,160,160,-340,160,160,-221,-220,160,160,-237,160,160,160,160,160,-87,-74,160,-233,-234,-236,160,-244,-245,-246,-247,-248,-249,-250,-251,-252,-253,-254,-11,160,-12,160,-287,160,160,160,-340,160,160,160,-222,160,-224,160,-86,-75,160,-232,-235,-340,-201,-340,-68,160,160,160,-340,-28,-287,-223,160,160,160,160,160,160,-11,-287,160,160,-225,-87,-74,-227,-228,160,-340,160,160,160,-226,-229,160,160,-231,-230,]),'LNOT':([15,51,52,53,81,90,91,94,95,114,115,116,121,126,128,135,136,141,147,148,149,150,153,154,155,156,160,161,182,183,184,195,197,208,221,222,223,224,225,226,227,228,229,230,231,232,234,238,242,247,256,257,258,259,262,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,294,298,306,309,310,323,332,347,355,356,358,360,361,362,365,366,367,369,370,371,372,374,375,377,378,379,380,381,382,383,384,385,386,387,388,389,392,393,394,397,400,401,402,405,448,455,457,467,469,470,471,474,479,480,482,483,484,487,489,498,499,500,503,510,511,512,520,524,525,526,527,528,529,532,533,543,544,545,552,553,554,555,556,559,562,565,570,572,579,580,582,584,585,586,],[-71,-131,-132,-133,-134,-90,-72,161,-340,-27,-28,-185,-338,161,161,161,-340,161,-287,-288,-289,-286,161,161,161,161,-290,-291,161,-340,-28,161,-186,-339,161,-219,-217,-218,-78,-79,-80,-81,-82,-83,-84,-85,161,161,161,161,-340,161,-340,-28,-73,-69,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,-287,161,161,-340,161,161,-221,-220,161,161,-237,161,161,161,161,161,-87,-74,161,-233,-234,-236,161,-244,-245,-246,-247,-248,-249,-250,-251,-252,-253,-254,-11,161,-12,161,-287,161,161,161,-340,161,161,161,-222,161,-224,161,-86,-75,161,-232,-235,-340,-201,-340,-68,161,161,161,-340,-28,-287,-223,161,161,161,161,161,161,-11,-287,161,161,-225,-87,-74,-227,-228,161,-340,161,161,161,-226,-229,161,161,-231,-230,]),'OFFSETOF':([15,51,52,53,81,90,91,94,95,114,115,116,121,126,128,135,136,141,147,148,149,150,153,154,155,156,160,161,182,183,184,195,197,208,221,222,223,224,225,226,227,228,229,230,231,232,234,238,242,247,256,257,258,259,262,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,294,298,306,309,310,323,332,347,355,356,358,360,361,362,365,366,367,369,370,371,372,374,375,377,378,379,380,381,382,383,384,385,386,387,388,389,392,393,394,397,400,401,402,405,448,455,457,467,469,470,471,474,479,480,482,483,484,487,489,498,499,500,503,510,511,512,520,524,525,526,527,528,529,532,533,543,544,545,552,553,554,555,556,559,562,565,570,572,579,580,582,584,585,586,],[-71,-131,-132,-133,-134,-90,-72,165,-340,-27,-28,-185,-338,165,165,165,-340,165,-287,-288,-289,-286,165,165,165,165,-290,-291,165,-340,-28,165,-186,-339,165,-219,-217,-218,-78,-79,-80,-81,-82,-83,-84,-85,165,165,165,165,-340,165,-340,-28,-73,-69,165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,165,-287,165,165,-340,165,165,-221,-220,165,165,-237,165,165,165,165,165,-87,-74,165,-233,-234,-236,165,-244,-245,-246,-247,-248,-249,-250,-251,-252,-253,-254,-11,165,-12,165,-287,165,165,165,-340,165,165,165,-222,165,-224,165,-86,-75,165,-232,-235,-340,-201,-340,-68,165,165,165,-340,-28,-287,-223,165,165,165,165,165,165,-11,-287,165,165,-225,-87,-74,-227,-228,165,-340,165,165,165,-226,-229,165,165,-231,-230,]),'INT_CONST_DEC':([15,51,52,53,81,90,91,94,95,114,115,116,121,126,128,135,136,141,147,148,149,150,153,154,155,156,160,161,182,183,184,195,197,208,221,222,223,224,225,226,227,228,229,230,231,232,234,238,242,247,256,257,258,259,262,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,294,298,306,309,310,323,332,347,355,356,358,360,361,362,365,366,367,369,370,371,372,374,375,377,378,379,380,381,382,383,384,385,386,387,388,389,392,393,394,397,400,401,402,405,448,455,457,467,469,470,471,474,479,480,482,483,484,487,489,498,499,500,503,510,511,512,520,524,525,526,527,528,529,532,533,543,544,545,552,553,554,555,556,559,562,565,570,572,579,580,582,584,585,586,],[-71,-131,-132,-133,-134,-90,-72,166,-340,-27,-28,-185,-338,166,166,166,-340,166,-287,-288,-289,-286,166,166,166,166,-290,-291,166,-340,-28,166,-186,-339,166,-219,-217,-218,-78,-79,-80,-81,-82,-83,-84,-85,166,166,166,166,-340,166,-340,-28,-73,-69,166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,166,-287,166,166,-340,166,166,-221,-220,166,166,-237,166,166,166,166,166,-87,-74,166,-233,-234,-236,166,-244,-245,-246,-247,-248,-249,-250,-251,-252,-253,-254,-11,166,-12,166,-287,166,166,166,-340,166,166,166,-222,166,-224,166,-86,-75,166,-232,-235,-340,-201,-340,-68,166,166,166,-340,-28,-287,-223,166,166,166,166,166,166,-11,-287,166,166,-225,-87,-74,-227,-228,166,-340,166,166,166,-226,-229,166,166,-231,-230,]),'INT_CONST_OCT':([15,51,52,53,81,90,91,94,95,114,115,116,121,126,128,135,136,141,147,148,149,150,153,154,155,156,160,161,182,183,184,195,197,208,221,222,223,224,225,226,227,228,229,230,231,232,234,238,242,247,256,257,258,259,262,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,294,298,306,309,310,323,332,347,355,356,358,360,361,362,365,366,367,369,370,371,372,374,375,377,378,379,380,381,382,383,384,385,386,387,388,389,392,393,394,397,400,401,402,405,448,455,457,467,469,470,471,474,479,480,482,483,484,487,489,498,499,500,503,510,511,512,520,524,525,526,527,528,529,532,533,543,544,545,552,553,554,555,556,559,562,565,570,572,579,580,582,584,585,586,],[-71,-131,-132,-133,-134,-90,-72,167,-340,-27,-28,-185,-338,167,167,167,-340,167,-287,-288,-289,-286,167,167,167,167,-290,-291,167,-340,-28,167,-186,-339,167,-219,-217,-218,-78,-79,-80,-81,-82,-83,-84,-85,167,167,167,167,-340,167,-340,-28,-73,-69,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,-287,167,167,-340,167,167,-221,-220,167,167,-237,167,167,167,167,167,-87,-74,167,-233,-234,-236,167,-244,-245,-246,-247,-248,-249,-250,-251,-252,-253,-254,-11,167,-12,167,-287,167,167,167,-340,167,167,167,-222,167,-224,167,-86,-75,167,-232,-235,-340,-201,-340,-68,167,167,167,-340,-28,-287,-223,167,167,167,167,167,167,-11,-287,167,167,-225,-87,-74,-227,-228,167,-340,167,167,167,-226,-229,167,167,-231,-230,]),'INT_CONST_HEX':([15,51,52,53,81,90,91,94,95,114,115,116,121,126,128,135,136,141,147,148,149,150,153,154,155,156,160,161,182,183,184,195,197,208,221,222,223,224,225,226,227,228,229,230,231,232,234,238,242,247,256,257,258,259,262,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,294,298,306,309,310,323,332,347,355,356,358,360,361,362,365,366,367,369,370,371,372,374,375,377,378,379,380,381,382,383,384,385,386,387,388,389,392,393,394,397,400,401,402,405,448,455,457,467,469,470,471,474,479,480,482,483,484,487,489,498,499,500,503,510,511,512,520,524,525,526,527,528,529,532,533,543,544,545,552,553,554,555,556,559,562,565,570,572,579,580,582,584,585,586,],[-71,-131,-132,-133,-134,-90,-72,168,-340,-27,-28,-185,-338,168,168,168,-340,168,-287,-288,-289,-286,168,168,168,168,-290,-291,168,-340,-28,168,-186,-339,168,-219,-217,-218,-78,-79,-80,-81,-82,-83,-84,-85,168,168,168,168,-340,168,-340,-28,-73,-69,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,-287,168,168,-340,168,168,-221,-220,168,168,-237,168,168,168,168,168,-87,-74,168,-233,-234,-236,168,-244,-245,-246,-247,-248,-249,-250,-251,-252,-253,-254,-11,168,-12,168,-287,168,168,168,-340,168,168,168,-222,168,-224,168,-86,-75,168,-232,-235,-340,-201,-340,-68,168,168,168,-340,-28,-287,-223,168,168,168,168,168,168,-11,-287,168,168,-225,-87,-74,-227,-228,168,-340,168,168,168,-226,-229,168,168,-231,-230,]),'INT_CONST_BIN':([15,51,52,53,81,90,91,94,95,114,115,116,121,126,128,135,136,141,147,148,149,150,153,154,155,156,160,161,182,183,184,195,197,208,221,222,223,224,225,226,227,228,229,230,231,232,234,238,242,247,256,257,258,259,262,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,294,298,306,309,310,323,332,347,355,356,358,360,361,362,365,366,367,369,370,371,372,374,375,377,378,379,380,381,382,383,384,385,386,387,388,389,392,393,394,397,400,401,402,405,448,455,457,467,469,470,471,474,479,480,482,483,484,487,489,498,499,500,503,510,511,512,520,524,525,526,527,528,529,532,533,543,544,545,552,553,554,555,556,559,562,565,570,572,579,580,582,584,585,586,],[-71,-131,-132,-133,-134,-90,-72,169,-340,-27,-28,-185,-338,169,169,169,-340,169,-287,-288,-289,-286,169,169,169,169,-290,-291,169,-340,-28,169,-186,-339,169,-219,-217,-218,-78,-79,-80,-81,-82,-83,-84,-85,169,169,169,169,-340,169,-340,-28,-73,-69,169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,-287,169,169,-340,169,169,-221,-220,169,169,-237,169,169,169,169,169,-87,-74,169,-233,-234,-236,169,-244,-245,-246,-247,-248,-249,-250,-251,-252,-253,-254,-11,169,-12,169,-287,169,169,169,-340,169,169,169,-222,169,-224,169,-86,-75,169,-232,-235,-340,-201,-340,-68,169,169,169,-340,-28,-287,-223,169,169,169,169,169,169,-11,-287,169,169,-225,-87,-74,-227,-228,169,-340,169,169,169,-226,-229,169,169,-231,-230,]),'INT_CONST_CHAR':([15,51,52,53,81,90,91,94,95,114,115,116,121,126,128,135,136,141,147,148,149,150,153,154,155,156,160,161,182,183,184,195,197,208,221,222,223,224,225,226,227,228,229,230,231,232,234,238,242,247,256,257,258,259,262,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,294,298,306,309,310,323,332,347,355,356,358,360,361,362,365,366,367,369,370,371,372,374,375,377,378,379,380,381,382,383,384,385,386,387,388,389,392,393,394,397,400,401,402,405,448,455,457,467,469,470,471,474,479,480,482,483,484,487,489,498,499,500,503,510,511,512,520,524,525,526,527,528,529,532,533,543,544,545,552,553,554,555,556,559,562,565,570,572,579,580,582,584,585,586,],[-71,-131,-132,-133,-134,-90,-72,170,-340,-27,-28,-185,-338,170,170,170,-340,170,-287,-288,-289,-286,170,170,170,170,-290,-291,170,-340,-28,170,-186,-339,170,-219,-217,-218,-78,-79,-80,-81,-82,-83,-84,-85,170,170,170,170,-340,170,-340,-28,-73,-69,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,-287,170,170,-340,170,170,-221,-220,170,170,-237,170,170,170,170,170,-87,-74,170,-233,-234,-236,170,-244,-245,-246,-247,-248,-249,-250,-251,-252,-253,-254,-11,170,-12,170,-287,170,170,170,-340,170,170,170,-222,170,-224,170,-86,-75,170,-232,-235,-340,-201,-340,-68,170,170,170,-340,-28,-287,-223,170,170,170,170,170,170,-11,-287,170,170,-225,-87,-74,-227,-228,170,-340,170,170,170,-226,-229,170,170,-231,-230,]),'FLOAT_CONST':([15,51,52,53,81,90,91,94,95,114,115,116,121,126,128,135,136,141,147,148,149,150,153,154,155,156,160,161,182,183,184,195,197,208,221,222,223,224,225,226,227,228,229,230,231,232,234,238,242,247,256,257,258,259,262,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,294,298,306,309,310,323,332,347,355,356,358,360,361,362,365,366,367,369,370,371,372,374,375,377,378,379,380,381,382,383,384,385,386,387,388,389,392,393,394,397,400,401,402,405,448,455,457,467,469,470,471,474,479,480,482,483,484,487,489,498,499,500,503,510,511,512,520,524,525,526,527,528,529,532,533,543,544,545,552,553,554,555,556,559,562,565,570,572,579,580,582,584,585,586,],[-71,-131,-132,-133,-134,-90,-72,171,-340,-27,-28,-185,-338,171,171,171,-340,171,-287,-288,-289,-286,171,171,171,171,-290,-291,171,-340,-28,171,-186,-339,171,-219,-217,-218,-78,-79,-80,-81,-82,-83,-84,-85,171,171,171,171,-340,171,-340,-28,-73,-69,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,-287,171,171,-340,171,171,-221,-220,171,171,-237,171,171,171,171,171,-87,-74,171,-233,-234,-236,171,-244,-245,-246,-247,-248,-249,-250,-251,-252,-253,-254,-11,171,-12,171,-287,171,171,171,-340,171,171,171,-222,171,-224,171,-86,-75,171,-232,-235,-340,-201,-340,-68,171,171,171,-340,-28,-287,-223,171,171,171,171,171,171,-11,-287,171,171,-225,-87,-74,-227,-228,171,-340,171,171,171,-226,-229,171,171,-231,-230,]),'HEX_FLOAT_CONST':([15,51,52,53,81,90,91,94,95,114,115,116,121,126,128,135,136,141,147,148,149,150,153,154,155,156,160,161,182,183,184,195,197,208,221,222,223,224,225,226,227,228,229,230,231,232,234,238,242,247,256,257,258,259,262,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,294,298,306,309,310,323,332,347,355,356,358,360,361,362,365,366,367,369,370,371,372,374,375,377,378,379,380,381,382,383,384,385,386,387,388,389,392,393,394,397,400,401,402,405,448,455,457,467,469,470,471,474,479,480,482,483,484,487,489,498,499,500,503,510,511,512,520,524,525,526,527,528,529,532,533,543,544,545,552,553,554,555,556,559,562,565,570,572,579,580,582,584,585,586,],[-71,-131,-132,-133,-134,-90,-72,172,-340,-27,-28,-185,-338,172,172,172,-340,172,-287,-288,-289,-286,172,172,172,172,-290,-291,172,-340,-28,172,-186,-339,172,-219,-217,-218,-78,-79,-80,-81,-82,-83,-84,-85,172,172,172,172,-340,172,-340,-28,-73,-69,172,172,172,172,172,172,172,172,172,172,172,172,172,172,172,172,172,172,172,172,172,172,172,-287,172,172,-340,172,172,-221,-220,172,172,-237,172,172,172,172,172,-87,-74,172,-233,-234,-236,172,-244,-245,-246,-247,-248,-249,-250,-251,-252,-253,-254,-11,172,-12,172,-287,172,172,172,-340,172,172,172,-222,172,-224,172,-86,-75,172,-232,-235,-340,-201,-340,-68,172,172,172,-340,-28,-287,-223,172,172,172,172,172,172,-11,-287,172,172,-225,-87,-74,-227,-228,172,-340,172,172,172,-226,-229,172,172,-231,-230,]),'CHAR_CONST':([15,51,52,53,81,90,91,94,95,114,115,116,121,126,128,135,136,141,147,148,149,150,153,154,155,156,160,161,182,183,184,195,197,208,221,222,223,224,225,226,227,228,229,230,231,232,234,238,242,247,256,257,258,259,262,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,294,298,306,309,310,323,332,347,355,356,358,360,361,362,365,366,367,369,370,371,372,374,375,377,378,379,380,381,382,383,384,385,386,387,388,389,392,393,394,397,400,401,402,405,448,455,457,467,469,470,471,474,479,480,482,483,484,487,489,498,499,500,503,510,511,512,520,524,525,526,527,528,529,532,533,543,544,545,552,553,554,555,556,559,562,565,570,572,579,580,582,584,585,586,],[-71,-131,-132,-133,-134,-90,-72,173,-340,-27,-28,-185,-338,173,173,173,-340,173,-287,-288,-289,-286,173,173,173,173,-290,-291,173,-340,-28,173,-186,-339,173,-219,-217,-218,-78,-79,-80,-81,-82,-83,-84,-85,173,173,173,173,-340,173,-340,-28,-73,-69,173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,173,-287,173,173,-340,173,173,-221,-220,173,173,-237,173,173,173,173,173,-87,-74,173,-233,-234,-236,173,-244,-245,-246,-247,-248,-249,-250,-251,-252,-253,-254,-11,173,-12,173,-287,173,173,173,-340,173,173,173,-222,173,-224,173,-86,-75,173,-232,-235,-340,-201,-340,-68,173,173,173,-340,-28,-287,-223,173,173,173,173,173,173,-11,-287,173,173,-225,-87,-74,-227,-228,173,-340,173,173,173,-226,-229,173,173,-231,-230,]),'WCHAR_CONST':([15,51,52,53,81,90,91,94,95,114,115,116,121,126,128,135,136,141,147,148,149,150,153,154,155,156,160,161,182,183,184,195,197,208,221,222,223,224,225,226,227,228,229,230,231,232,234,238,242,247,256,257,258,259,262,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,294,298,306,309,310,323,332,347,355,356,358,360,361,362,365,366,367,369,370,371,372,374,375,377,378,379,380,381,382,383,384,385,386,387,388,389,392,393,394,397,400,401,402,405,448,455,457,467,469,470,471,474,479,480,482,483,484,487,489,498,499,500,503,510,511,512,520,524,525,526,527,528,529,532,533,543,544,545,552,553,554,555,556,559,562,565,570,572,579,580,582,584,585,586,],[-71,-131,-132,-133,-134,-90,-72,174,-340,-27,-28,-185,-338,174,174,174,-340,174,-287,-288,-289,-286,174,174,174,174,-290,-291,174,-340,-28,174,-186,-339,174,-219,-217,-218,-78,-79,-80,-81,-82,-83,-84,-85,174,174,174,174,-340,174,-340,-28,-73,-69,174,174,174,174,174,174,174,174,174,174,174,174,174,174,174,174,174,174,174,174,174,174,174,-287,174,174,-340,174,174,-221,-220,174,174,-237,174,174,174,174,174,-87,-74,174,-233,-234,-236,174,-244,-245,-246,-247,-248,-249,-250,-251,-252,-253,-254,-11,174,-12,174,-287,174,174,174,-340,174,174,174,-222,174,-224,174,-86,-75,174,-232,-235,-340,-201,-340,-68,174,174,174,-340,-28,-287,-223,174,174,174,174,174,174,-11,-287,174,174,-225,-87,-74,-227,-228,174,-340,174,174,174,-226,-229,174,174,-231,-230,]),'U8CHAR_CONST':([15,51,52,53,81,90,91,94,95,114,115,116,121,126,128,135,136,141,147,148,149,150,153,154,155,156,160,161,182,183,184,195,197,208,221,222,223,224,225,226,227,228,229,230,231,232,234,238,242,247,256,257,258,259,262,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,294,298,306,309,310,323,332,347,355,356,358,360,361,362,365,366,367,369,370,371,372,374,375,377,378,379,380,381,382,383,384,385,386,387,388,389,392,393,394,397,400,401,402,405,448,455,457,467,469,470,471,474,479,480,482,483,484,487,489,498,499,500,503,510,511,512,520,524,525,526,527,528,529,532,533,543,544,545,552,553,554,555,556,559,562,565,570,572,579,580,582,584,585,586,],[-71,-131,-132,-133,-134,-90,-72,175,-340,-27,-28,-185,-338,175,175,175,-340,175,-287,-288,-289,-286,175,175,175,175,-290,-291,175,-340,-28,175,-186,-339,175,-219,-217,-218,-78,-79,-80,-81,-82,-83,-84,-85,175,175,175,175,-340,175,-340,-28,-73,-69,175,175,175,175,175,175,175,175,175,175,175,175,175,175,175,175,175,175,175,175,175,175,175,-287,175,175,-340,175,175,-221,-220,175,175,-237,175,175,175,175,175,-87,-74,175,-233,-234,-236,175,-244,-245,-246,-247,-248,-249,-250,-251,-252,-253,-254,-11,175,-12,175,-287,175,175,175,-340,175,175,175,-222,175,-224,175,-86,-75,175,-232,-235,-340,-201,-340,-68,175,175,175,-340,-28,-287,-223,175,175,175,175,175,175,-11,-287,175,175,-225,-87,-74,-227,-228,175,-340,175,175,175,-226,-229,175,175,-231,-230,]),'U16CHAR_CONST':([15,51,52,53,81,90,91,94,95,114,115,116,121,126,128,135,136,141,147,148,149,150,153,154,155,156,160,161,182,183,184,195,197,208,221,222,223,224,225,226,227,228,229,230,231,232,234,238,242,247,256,257,258,259,262,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,294,298,306,309,310,323,332,347,355,356,358,360,361,362,365,366,367,369,370,371,372,374,375,377,378,379,380,381,382,383,384,385,386,387,388,389,392,393,394,397,400,401,402,405,448,455,457,467,469,470,471,474,479,480,482,483,484,487,489,498,499,500,503,510,511,512,520,524,525,526,527,528,529,532,533,543,544,545,552,553,554,555,556,559,562,565,570,572,579,580,582,584,585,586,],[-71,-131,-132,-133,-134,-90,-72,176,-340,-27,-28,-185,-338,176,176,176,-340,176,-287,-288,-289,-286,176,176,176,176,-290,-291,176,-340,-28,176,-186,-339,176,-219,-217,-218,-78,-79,-80,-81,-82,-83,-84,-85,176,176,176,176,-340,176,-340,-28,-73,-69,176,176,176,176,176,176,176,176,176,176,176,176,176,176,176,176,176,176,176,176,176,176,176,-287,176,176,-340,176,176,-221,-220,176,176,-237,176,176,176,176,176,-87,-74,176,-233,-234,-236,176,-244,-245,-246,-247,-248,-249,-250,-251,-252,-253,-254,-11,176,-12,176,-287,176,176,176,-340,176,176,176,-222,176,-224,176,-86,-75,176,-232,-235,-340,-201,-340,-68,176,176,176,-340,-28,-287,-223,176,176,176,176,176,176,-11,-287,176,176,-225,-87,-74,-227,-228,176,-340,176,176,176,-226,-229,176,176,-231,-230,]),'U32CHAR_CONST':([15,51,52,53,81,90,91,94,95,114,115,116,121,126,128,135,136,141,147,148,149,150,153,154,155,156,160,161,182,183,184,195,197,208,221,222,223,224,225,226,227,228,229,230,231,232,234,238,242,247,256,257,258,259,262,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,294,298,306,309,310,323,332,347,355,356,358,360,361,362,365,366,367,369,370,371,372,374,375,377,378,379,380,381,382,383,384,385,386,387,388,389,392,393,394,397,400,401,402,405,448,455,457,467,469,470,471,474,479,480,482,483,484,487,489,498,499,500,503,510,511,512,520,524,525,526,527,528,529,532,533,543,544,545,552,553,554,555,556,559,562,565,570,572,579,580,582,584,585,586,],[-71,-131,-132,-133,-134,-90,-72,177,-340,-27,-28,-185,-338,177,177,177,-340,177,-287,-288,-289,-286,177,177,177,177,-290,-291,177,-340,-28,177,-186,-339,177,-219,-217,-218,-78,-79,-80,-81,-82,-83,-84,-85,177,177,177,177,-340,177,-340,-28,-73,-69,177,177,177,177,177,177,177,177,177,177,177,177,177,177,177,177,177,177,177,177,177,177,177,-287,177,177,-340,177,177,-221,-220,177,177,-237,177,177,177,177,177,-87,-74,177,-233,-234,-236,177,-244,-245,-246,-247,-248,-249,-250,-251,-252,-253,-254,-11,177,-12,177,-287,177,177,177,-340,177,177,177,-222,177,-224,177,-86,-75,177,-232,-235,-340,-201,-340,-68,177,177,177,-340,-28,-287,-223,177,177,177,177,177,177,-11,-287,177,177,-225,-87,-74,-227,-228,177,-340,177,177,177,-226,-229,177,177,-231,-230,]),'STRING_LITERAL':([15,51,52,53,81,90,91,92,94,95,114,115,116,121,126,128,135,136,138,139,141,143,147,148,149,150,153,154,155,156,160,161,182,183,184,195,197,208,221,222,223,224,225,226,227,228,229,230,231,232,234,238,242,247,256,257,258,259,262,263,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,294,298,306,309,310,323,332,347,355,356,358,360,361,362,365,366,367,369,370,371,372,374,375,377,378,379,380,381,382,383,384,385,386,387,388,389,392,393,394,397,400,401,402,405,407,448,455,457,467,469,470,471,474,479,480,482,483,484,487,489,498,499,500,503,510,511,512,520,524,525,526,527,528,529,532,533,543,544,545,552,553,554,555,556,559,562,565,570,572,579,580,582,584,585,586,],[-71,-131,-132,-133,-134,-90,-72,139,139,-340,-27,-28,-185,-338,139,139,139,-340,263,-328,139,263,-287,-288,-289,-286,139,139,139,139,-290,-291,139,-340,-28,139,-186,-339,139,-219,-217,-218,-78,-79,-80,-81,-82,-83,-84,-85,139,139,139,139,-340,139,-340,-28,-73,-329,139,-69,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,-287,139,139,-340,139,139,-221,-220,139,139,-237,139,139,139,139,139,-87,-74,139,-233,-234,-236,139,-244,-245,-246,-247,-248,-249,-250,-251,-252,-253,-254,-11,139,-12,139,-287,139,139,139,263,-340,139,139,139,-222,139,-224,139,-86,-75,139,-232,-235,-340,-201,-340,-68,139,139,139,-340,-28,-287,-223,139,139,139,139,139,139,-11,-287,139,139,-225,-87,-74,-227,-228,139,-340,139,139,139,-226,-229,139,139,-231,-230,]),'WSTRING_LITERAL':([15,51,52,53,81,90,91,94,95,114,115,116,121,126,128,135,136,141,147,148,149,150,153,154,155,156,160,161,164,178,179,180,181,182,183,184,195,197,208,221,222,223,224,225,226,227,228,229,230,231,232,234,238,242,247,256,257,258,259,262,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,294,298,300,301,302,303,306,309,310,323,332,347,355,356,358,360,361,362,365,366,367,369,370,371,372,374,375,377,378,379,380,381,382,383,384,385,386,387,388,389,392,393,394,397,400,401,402,405,448,455,457,467,469,470,471,474,479,480,482,483,484,487,489,498,499,500,503,510,511,512,520,524,525,526,527,528,529,532,533,543,544,545,552,553,554,555,556,559,562,565,570,572,579,580,582,584,585,586,],[-71,-131,-132,-133,-134,-90,-72,178,-340,-27,-28,-185,-338,178,178,178,-340,178,-287,-288,-289,-286,178,178,178,178,-290,-291,300,-330,-331,-332,-333,178,-340,-28,178,-186,-339,178,-219,-217,-218,-78,-79,-80,-81,-82,-83,-84,-85,178,178,178,178,-340,178,-340,-28,-73,-69,178,178,178,178,178,178,178,178,178,178,178,178,178,178,178,178,178,178,178,178,178,178,178,-334,-335,-336,-337,-287,178,178,-340,178,178,-221,-220,178,178,-237,178,178,178,178,178,-87,-74,178,-233,-234,-236,178,-244,-245,-246,-247,-248,-249,-250,-251,-252,-253,-254,-11,178,-12,178,-287,178,178,178,-340,178,178,178,-222,178,-224,178,-86,-75,178,-232,-235,-340,-201,-340,-68,178,178,178,-340,-28,-287,-223,178,178,178,178,178,178,-11,-287,178,178,-225,-87,-74,-227,-228,178,-340,178,178,178,-226,-229,178,178,-231,-230,]),'U8STRING_LITERAL':([15,51,52,53,81,90,91,94,95,114,115,116,121,126,128,135,136,141,147,148,149,150,153,154,155,156,160,161,164,178,179,180,181,182,183,184,195,197,208,221,222,223,224,225,226,227,228,229,230,231,232,234,238,242,247,256,257,258,259,262,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,294,298,300,301,302,303,306,309,310,323,332,347,355,356,358,360,361,362,365,366,367,369,370,371,372,374,375,377,378,379,380,381,382,383,384,385,386,387,388,389,392,393,394,397,400,401,402,405,448,455,457,467,469,470,471,474,479,480,482,483,484,487,489,498,499,500,503,510,511,512,520,524,525,526,527,528,529,532,533,543,544,545,552,553,554,555,556,559,562,565,570,572,579,580,582,584,585,586,],[-71,-131,-132,-133,-134,-90,-72,179,-340,-27,-28,-185,-338,179,179,179,-340,179,-287,-288,-289,-286,179,179,179,179,-290,-291,301,-330,-331,-332,-333,179,-340,-28,179,-186,-339,179,-219,-217,-218,-78,-79,-80,-81,-82,-83,-84,-85,179,179,179,179,-340,179,-340,-28,-73,-69,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,179,-334,-335,-336,-337,-287,179,179,-340,179,179,-221,-220,179,179,-237,179,179,179,179,179,-87,-74,179,-233,-234,-236,179,-244,-245,-246,-247,-248,-249,-250,-251,-252,-253,-254,-11,179,-12,179,-287,179,179,179,-340,179,179,179,-222,179,-224,179,-86,-75,179,-232,-235,-340,-201,-340,-68,179,179,179,-340,-28,-287,-223,179,179,179,179,179,179,-11,-287,179,179,-225,-87,-74,-227,-228,179,-340,179,179,179,-226,-229,179,179,-231,-230,]),'U16STRING_LITERAL':([15,51,52,53,81,90,91,94,95,114,115,116,121,126,128,135,136,141,147,148,149,150,153,154,155,156,160,161,164,178,179,180,181,182,183,184,195,197,208,221,222,223,224,225,226,227,228,229,230,231,232,234,238,242,247,256,257,258,259,262,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,294,298,300,301,302,303,306,309,310,323,332,347,355,356,358,360,361,362,365,366,367,369,370,371,372,374,375,377,378,379,380,381,382,383,384,385,386,387,388,389,392,393,394,397,400,401,402,405,448,455,457,467,469,470,471,474,479,480,482,483,484,487,489,498,499,500,503,510,511,512,520,524,525,526,527,528,529,532,533,543,544,545,552,553,554,555,556,559,562,565,570,572,579,580,582,584,585,586,],[-71,-131,-132,-133,-134,-90,-72,180,-340,-27,-28,-185,-338,180,180,180,-340,180,-287,-288,-289,-286,180,180,180,180,-290,-291,302,-330,-331,-332,-333,180,-340,-28,180,-186,-339,180,-219,-217,-218,-78,-79,-80,-81,-82,-83,-84,-85,180,180,180,180,-340,180,-340,-28,-73,-69,180,180,180,180,180,180,180,180,180,180,180,180,180,180,180,180,180,180,180,180,180,180,180,-334,-335,-336,-337,-287,180,180,-340,180,180,-221,-220,180,180,-237,180,180,180,180,180,-87,-74,180,-233,-234,-236,180,-244,-245,-246,-247,-248,-249,-250,-251,-252,-253,-254,-11,180,-12,180,-287,180,180,180,-340,180,180,180,-222,180,-224,180,-86,-75,180,-232,-235,-340,-201,-340,-68,180,180,180,-340,-28,-287,-223,180,180,180,180,180,180,-11,-287,180,180,-225,-87,-74,-227,-228,180,-340,180,180,180,-226,-229,180,180,-231,-230,]),'U32STRING_LITERAL':([15,51,52,53,81,90,91,94,95,114,115,116,121,126,128,135,136,141,147,148,149,150,153,154,155,156,160,161,164,178,179,180,181,182,183,184,195,197,208,221,222,223,224,225,226,227,228,229,230,231,232,234,238,242,247,256,257,258,259,262,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,294,298,300,301,302,303,306,309,310,323,332,347,355,356,358,360,361,362,365,366,367,369,370,371,372,374,375,377,378,379,380,381,382,383,384,385,386,387,388,389,392,393,394,397,400,401,402,405,448,455,457,467,469,470,471,474,479,480,482,483,484,487,489,498,499,500,503,510,511,512,520,524,525,526,527,528,529,532,533,543,544,545,552,553,554,555,556,559,562,565,570,572,579,580,582,584,585,586,],[-71,-131,-132,-133,-134,-90,-72,181,-340,-27,-28,-185,-338,181,181,181,-340,181,-287,-288,-289,-286,181,181,181,181,-290,-291,303,-330,-331,-332,-333,181,-340,-28,181,-186,-339,181,-219,-217,-218,-78,-79,-80,-81,-82,-83,-84,-85,181,181,181,181,-340,181,-340,-28,-73,-69,181,181,181,181,181,181,181,181,181,181,181,181,181,181,181,181,181,181,181,181,181,181,181,-334,-335,-336,-337,-287,181,181,-340,181,181,-221,-220,181,181,-237,181,181,181,181,181,-87,-74,181,-233,-234,-236,181,-244,-245,-246,-247,-248,-249,-250,-251,-252,-253,-254,-11,181,-12,181,-287,181,181,181,-340,181,181,181,-222,181,-224,181,-86,-75,181,-232,-235,-340,-201,-340,-68,181,181,181,-340,-28,-287,-223,181,181,181,181,181,181,-11,-287,181,181,-225,-87,-74,-227,-228,181,-340,181,181,181,-226,-229,181,181,-231,-230,]),'ELSE':([15,91,208,225,226,227,228,229,230,232,262,267,355,361,370,371,374,375,377,469,471,479,480,483,484,499,524,552,553,554,555,556,579,580,585,586,],[-71,-72,-339,-78,-79,-80,-81,-82,-83,-85,-73,-69,-221,-237,-87,-84,-233,-234,-236,-222,-224,-86,-84,-232,-235,-68,-223,-225,570,-84,-227,-228,-226,-229,-231,-230,]),'PPPRAGMASTR':([15,],[91,]),'EQUALS':([19,28,73,86,87,88,89,97,111,130,132,139,140,143,151,152,158,159,162,163,164,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,202,208,233,250,252,263,291,292,293,295,296,297,300,301,302,303,311,312,395,396,403,404,406,429,431,432,433,434,439,440,490,492,493,494,497,501,502,505,506,508,509,534,535,536,561,563,574,],[-52,-29,-181,135,-182,-54,-37,-53,195,-181,-55,-328,-30,-306,-277,-279,-292,-315,-304,-305,-307,-316,-317,-318,-319,-320,-321,-322,-323,-324,-325,-326,-327,-330,-331,-332,-333,332,-339,-315,379,-38,-329,-300,-301,-280,-281,-282,-283,-334,-335,-336,-337,-35,-36,489,-202,-43,-44,-308,-295,-296,-297,-298,-299,-31,-34,-203,-205,-39,-42,-278,-293,-294,-284,-285,-32,-33,-204,-40,-41,-302,-309,-303,]),'COMMA':([19,24,25,28,29,30,31,32,33,34,35,38,39,40,41,42,43,44,45,46,47,48,49,51,52,53,54,55,56,57,58,59,60,73,74,75,76,77,78,81,84,85,86,87,88,89,97,104,106,108,110,111,113,114,115,116,118,119,122,123,130,132,139,140,142,143,144,145,146,151,152,158,159,162,163,164,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,187,189,190,191,192,196,197,200,201,202,206,208,212,214,216,233,239,248,249,250,252,253,254,255,263,265,291,292,293,295,296,297,300,301,302,303,311,312,315,316,317,318,319,320,321,324,325,326,327,328,329,330,331,334,336,337,340,341,342,344,345,346,348,349,350,352,353,354,376,391,403,404,406,408,409,410,411,412,413,414,415,416,417,418,419,420,421,422,423,424,425,426,427,428,429,430,431,432,433,434,438,439,440,444,445,446,447,459,460,461,462,463,464,468,472,473,475,476,477,485,486,488,493,494,497,501,502,505,506,508,509,515,516,518,522,523,531,535,536,537,538,539,546,547,548,549,550,551,557,560,561,563,566,567,574,576,577,578,],[-52,-128,-102,-29,-107,-340,-125,-126,-127,-129,-241,-113,-114,-115,-116,-117,-118,-119,-120,-121,-122,-123,-124,-131,-132,-133,-105,-106,-108,-109,-110,-111,-112,-181,-98,-99,-100,-101,-104,-134,134,-135,-137,-182,-54,-37,-53,-103,-129,194,-139,-141,-183,-27,-28,-185,-169,-170,-149,-150,-181,-55,-328,-30,266,-306,-255,-256,-258,-277,-279,-292,-315,-304,-305,-307,-316,-317,-318,-319,-320,-321,-322,-323,-324,-325,-326,-327,-330,-331,-332,-333,313,314,-189,-194,-340,-184,-186,331,-174,-179,-152,-339,-145,-147,-340,-315,365,-238,-242,-277,-38,-136,-138,-196,-329,365,-300,-301,-280,-281,-282,-283,-334,-335,-336,-337,-35,-36,-191,-192,-193,-207,-56,-1,-2,-45,-209,-140,-142,331,331,-171,-175,-154,-156,-151,-143,-144,-148,466,-164,-166,-146,-130,-206,-207,-177,-178,365,487,-43,-44,-308,365,-259,-260,-261,-262,-263,-264,-265,-266,-267,-268,-269,-270,-271,-272,-273,-274,-275,-276,365,503,-295,-313,-296,-297,-298,-299,507,-31,-34,-190,-195,-57,-208,-172,-173,-176,-180,-153,-155,-168,365,-240,-239,365,365,-243,-197,-199,-39,-42,-278,-293,-294,-284,-285,-32,-33,-210,-216,-214,-165,-167,-198,-40,-41,562,-257,-314,-50,-51,-212,-211,-213,-215,365,-200,-302,-309,-46,-49,-303,365,-47,-48,]),'RPAREN':([19,24,25,28,29,30,31,32,33,34,35,38,39,40,41,42,43,44,45,46,47,48,49,51,52,53,54,55,56,57,58,59,60,74,75,76,77,78,81,88,89,93,96,97,104,106,113,114,115,116,118,119,122,123,132,133,137,138,139,140,142,143,144,145,146,151,152,158,159,162,163,164,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,185,186,187,188,189,190,191,192,196,197,206,208,212,214,215,216,217,218,239,248,249,250,252,260,261,263,264,265,288,291,292,293,295,296,297,300,301,302,303,311,312,315,316,317,318,319,320,321,322,324,325,330,334,336,337,340,341,342,348,349,350,351,352,353,354,355,357,363,364,403,404,406,407,409,410,411,412,413,414,415,416,417,418,419,420,421,422,423,424,425,426,428,429,430,431,432,433,434,435,436,437,439,440,443,444,445,446,447,449,450,451,452,453,454,458,459,460,463,464,472,473,475,476,477,485,493,494,497,501,502,505,506,508,509,513,514,515,516,518,521,535,536,538,539,540,541,546,547,548,549,550,551,557,559,561,563,566,567,572,573,574,575,577,578,581,583,],[-52,-128,-102,-29,-107,-340,-125,-126,-127,-129,-241,-113,-114,-115,-116,-117,-118,-119,-120,-121,-122,-123,-124,-131,-132,-133,-105,-106,-108,-109,-110,-111,-112,-98,-99,-100,-101,-104,-134,-54,-37,140,-340,-53,-103,-129,-183,-27,-28,-185,-169,-170,-149,-150,-55,252,-340,262,-328,-30,267,-306,-255,-256,-258,-277,-279,-292,-315,-304,-305,-307,-316,-317,-318,-319,-320,-321,-322,-323,-324,-325,-326,-327,-330,-331,-332,-333,311,312,-187,-17,-18,-189,-194,-340,-184,-186,-152,-339,-145,-147,349,-340,353,354,-14,-238,-242,-277,-38,403,404,-329,405,406,429,-300,-301,-280,-281,-282,-283,-334,-335,-336,-337,-35,-36,-191,-192,-193,-207,-56,-1,-2,-340,-45,-209,-171,-154,-156,-151,-143,-144,-148,-146,-130,-206,-340,-207,-177,-178,-221,-13,473,474,-43,-44,-308,499,-259,-260,-261,-262,-263,-264,-265,-266,-267,-268,-269,-270,-271,-272,-273,-274,-275,-276,502,-295,-313,-296,-297,-298,-299,504,505,506,-31,-34,-188,-190,-195,-57,-208,-340,515,516,-207,-23,-24,-340,-172,-173,-153,-155,525,-240,-239,526,527,-243,-39,-42,-278,-293,-294,-284,-285,-32,-33,546,547,-210,-216,-214,551,-40,-41,-257,-314,563,-310,-50,-51,-212,-211,-213,-215,571,-340,-302,-309,-46,-49,-340,582,-303,-311,-47,-48,584,-312,]),'COLON':([19,24,28,31,32,33,35,38,39,40,41,42,43,44,45,46,47,48,49,51,52,53,81,87,88,89,97,106,118,119,122,123,130,132,139,140,143,144,145,146,151,152,158,159,162,163,164,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,206,208,209,212,214,233,235,248,249,250,252,263,291,292,293,295,296,297,300,301,302,303,311,312,330,334,336,337,340,341,342,346,348,349,353,354,359,403,404,406,408,409,410,411,412,413,414,415,416,417,418,419,420,421,422,423,424,425,426,429,431,432,433,434,439,440,459,460,463,464,466,473,475,485,493,494,497,501,502,505,506,508,509,535,536,538,561,563,574,],[-52,-128,-29,-125,-126,-127,-241,-113,-114,-115,-116,-117,-118,-119,-120,-121,-122,-123,-124,-131,-132,-133,-134,-182,-54,-37,-53,-129,-169,-170,-149,-150,-181,-55,-328,-30,-306,-255,-256,-258,-277,-279,-292,-315,-304,-305,-307,-316,-317,-318,-319,-320,-321,-322,-323,-324,-325,-326,-327,-330,-331,-332,-333,-152,-339,347,-145,-147,358,360,-238,-242,-277,-38,-329,-300,-301,-280,-281,-282,-283,-334,-335,-336,-337,-35,-36,-171,-154,-156,-151,-143,-144,-148,467,-146,-130,-177,-178,470,-43,-44,-308,500,-259,-260,-261,-262,-263,-264,-265,-266,-267,-268,-269,-270,-271,-272,-273,-274,-275,-276,-295,-296,-297,-298,-299,-31,-34,-172,-173,-153,-155,347,-240,-239,-243,-39,-42,-278,-293,-294,-284,-285,-32,-33,-40,-41,-257,-302,-309,-303,]),'LBRACKET':([19,24,25,28,29,30,31,32,33,34,35,38,39,40,41,42,43,44,45,46,47,48,49,51,52,53,54,55,56,57,58,59,60,74,75,76,77,78,81,88,89,97,104,106,113,114,115,116,118,119,121,122,123,132,139,140,143,152,158,159,162,163,164,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,192,196,197,206,208,212,214,216,233,252,256,263,291,292,300,301,302,303,311,312,318,319,322,324,325,330,334,336,337,340,341,342,348,349,351,352,353,354,395,396,403,404,406,429,431,432,433,434,439,440,446,447,452,459,460,463,464,487,490,492,493,494,498,501,502,508,509,515,516,518,534,535,536,540,541,546,547,548,549,550,551,561,562,563,566,567,574,575,577,578,583,],[95,-128,-102,-29,-107,-340,-125,-126,-127,-129,-241,-113,-114,-115,-116,-117,-118,-119,-120,-121,-122,-123,-124,-131,-132,-133,-105,-106,-108,-109,-110,-111,-112,-98,-99,-100,-101,-104,-134,136,-37,95,-103,-129,-183,-27,-28,-185,-169,-170,-338,-149,-150,136,-328,-30,-306,287,-292,-315,-304,-305,-307,-316,-317,-318,-319,-320,-321,-322,-323,-324,-325,-326,-327,-330,-331,-332,-333,323,-184,-186,-152,-339,-145,-147,323,-315,-38,397,-329,-300,-301,-334,-335,-336,-337,-35,-36,323,448,323,-45,457,-171,-154,-156,-151,-143,-144,-148,-146,-130,323,323,-177,-178,397,-202,-43,-44,-308,-295,-296,-297,-298,-299,-31,-34,448,457,323,-172,-173,-153,-155,397,-203,-205,-39,-42,397,-293,-294,-32,-33,-210,-216,-214,-204,-40,-41,565,-310,-50,-51,-212,-211,-213,-215,-302,397,-309,-46,-49,-303,-311,-47,-48,-312,]),'RBRACKET':([51,52,53,81,95,114,115,116,136,139,143,144,145,146,151,152,158,159,162,163,164,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,184,197,208,248,249,250,257,259,263,291,292,293,295,296,297,300,301,302,303,305,306,307,308,323,399,400,406,409,410,411,412,413,414,415,416,417,418,419,420,421,422,423,424,425,426,427,429,431,432,433,434,441,442,448,455,456,457,473,475,485,491,495,496,497,501,502,505,506,510,512,517,519,520,538,542,543,561,563,568,569,574,576,],[-131,-132,-133,-134,-340,-27,-28,-185,-340,-328,-306,-255,-256,-258,-277,-279,-292,-315,-304,-305,-307,-316,-317,-318,-319,-320,-321,-322,-323,-324,-325,-326,-327,-330,-331,-332,-333,-340,-28,-186,-339,-238,-242,-277,-340,-28,-329,-300,-301,-280,-281,-282,-283,-334,-335,-336,-337,439,440,-3,-4,-340,493,494,-308,-259,-260,-261,-262,-263,-264,-265,-266,-267,-268,-269,-270,-271,-272,-273,-274,-275,-276,501,-295,-296,-297,-298,-299,508,509,-340,-340,518,-340,-240,-239,-243,534,535,536,-278,-293,-294,-284,-285,-340,-28,548,549,550,-257,566,567,-302,-309,577,578,-303,583,]),'PERIOD':([121,139,143,152,158,159,162,163,164,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,208,233,256,263,291,292,300,301,302,303,395,396,406,429,431,432,433,434,487,490,492,498,501,502,534,540,541,561,562,563,574,575,583,],[-338,-328,-306,289,-292,-315,-304,-305,-307,-316,-317,-318,-319,-320,-321,-322,-323,-324,-325,-326,-327,-330,-331,-332,-333,-339,-315,398,-329,-300,-301,-334,-335,-336,-337,398,-202,-308,-295,-296,-297,-298,-299,398,-203,-205,398,-293,-294,-204,564,-310,-302,398,-309,-303,-311,-312,]),'ARROW':([139,143,152,158,159,162,163,164,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,208,233,263,291,292,300,301,302,303,406,429,431,432,433,434,501,502,561,563,574,],[-328,-306,290,-292,-315,-304,-305,-307,-316,-317,-318,-319,-320,-321,-322,-323,-324,-325,-326,-327,-330,-331,-332,-333,-339,-315,-329,-300,-301,-334,-335,-336,-337,-308,-295,-296,-297,-298,-299,-293,-294,-302,-309,-303,]),'CONDOP':([139,143,145,146,151,152,158,159,162,163,164,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,208,233,250,263,291,292,293,295,296,297,300,301,302,303,406,409,410,411,412,413,414,415,416,417,418,419,420,421,422,423,424,425,426,429,431,432,433,434,497,501,502,505,506,561,563,574,],[-328,-306,268,-258,-277,-279,-292,-315,-304,-305,-307,-316,-317,-318,-319,-320,-321,-322,-323,-324,-325,-326,-327,-330,-331,-332,-333,-339,-315,-277,-329,-300,-301,-280,-281,-282,-283,-334,-335,-336,-337,-308,-259,-260,-261,-262,-263,-264,-265,-266,-267,-268,-269,-270,-271,-272,-273,-274,-275,-276,-295,-296,-297,-298,-299,-278,-293,-294,-284,-285,-302,-309,-303,]),'DIVIDE':([139,143,145,146,151,152,158,159,162,163,164,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,208,233,250,263,291,292,293,295,296,297,300,301,302,303,406,409,410,411,412,413,414,415,416,417,418,419,420,421,422,423,424,425,426,429,431,432,433,434,497,501,502,505,506,561,563,574,],[-328,-306,270,-258,-277,-279,-292,-315,-304,-305,-307,-316,-317,-318,-319,-320,-321,-322,-323,-324,-325,-326,-327,-330,-331,-332,-333,-339,-315,-277,-329,-300,-301,-280,-281,-282,-283,-334,-335,-336,-337,-308,-259,-260,-261,270,270,270,270,270,270,270,270,270,270,270,270,270,270,270,-295,-296,-297,-298,-299,-278,-293,-294,-284,-285,-302,-309,-303,]),'MOD':([139,143,145,146,151,152,158,159,162,163,164,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,208,233,250,263,291,292,293,295,296,297,300,301,302,303,406,409,410,411,412,413,414,415,416,417,418,419,420,421,422,423,424,425,426,429,431,432,433,434,497,501,502,505,506,561,563,574,],[-328,-306,271,-258,-277,-279,-292,-315,-304,-305,-307,-316,-317,-318,-319,-320,-321,-322,-323,-324,-325,-326,-327,-330,-331,-332,-333,-339,-315,-277,-329,-300,-301,-280,-281,-282,-283,-334,-335,-336,-337,-308,-259,-260,-261,271,271,271,271,271,271,271,271,271,271,271,271,271,271,271,-295,-296,-297,-298,-299,-278,-293,-294,-284,-285,-302,-309,-303,]),'RSHIFT':([139,143,145,146,151,152,158,159,162,163,164,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,208,233,250,263,291,292,293,295,296,297,300,301,302,303,406,409,410,411,412,413,414,415,416,417,418,419,420,421,422,423,424,425,426,429,431,432,433,434,497,501,502,505,506,561,563,574,],[-328,-306,274,-258,-277,-279,-292,-315,-304,-305,-307,-316,-317,-318,-319,-320,-321,-322,-323,-324,-325,-326,-327,-330,-331,-332,-333,-339,-315,-277,-329,-300,-301,-280,-281,-282,-283,-334,-335,-336,-337,-308,-259,-260,-261,-262,-263,-264,-265,274,274,274,274,274,274,274,274,274,274,274,-295,-296,-297,-298,-299,-278,-293,-294,-284,-285,-302,-309,-303,]),'LSHIFT':([139,143,145,146,151,152,158,159,162,163,164,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,208,233,250,263,291,292,293,295,296,297,300,301,302,303,406,409,410,411,412,413,414,415,416,417,418,419,420,421,422,423,424,425,426,429,431,432,433,434,497,501,502,505,506,561,563,574,],[-328,-306,275,-258,-277,-279,-292,-315,-304,-305,-307,-316,-317,-318,-319,-320,-321,-322,-323,-324,-325,-326,-327,-330,-331,-332,-333,-339,-315,-277,-329,-300,-301,-280,-281,-282,-283,-334,-335,-336,-337,-308,-259,-260,-261,-262,-263,-264,-265,275,275,275,275,275,275,275,275,275,275,275,-295,-296,-297,-298,-299,-278,-293,-294,-284,-285,-302,-309,-303,]),'LT':([139,143,145,146,151,152,158,159,162,163,164,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,208,233,250,263,291,292,293,295,296,297,300,301,302,303,406,409,410,411,412,413,414,415,416,417,418,419,420,421,422,423,424,425,426,429,431,432,433,434,497,501,502,505,506,561,563,574,],[-328,-306,276,-258,-277,-279,-292,-315,-304,-305,-307,-316,-317,-318,-319,-320,-321,-322,-323,-324,-325,-326,-327,-330,-331,-332,-333,-339,-315,-277,-329,-300,-301,-280,-281,-282,-283,-334,-335,-336,-337,-308,-259,-260,-261,-262,-263,-264,-265,-266,-267,-268,-269,276,276,276,276,276,276,276,-295,-296,-297,-298,-299,-278,-293,-294,-284,-285,-302,-309,-303,]),'LE':([139,143,145,146,151,152,158,159,162,163,164,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,208,233,250,263,291,292,293,295,296,297,300,301,302,303,406,409,410,411,412,413,414,415,416,417,418,419,420,421,422,423,424,425,426,429,431,432,433,434,497,501,502,505,506,561,563,574,],[-328,-306,277,-258,-277,-279,-292,-315,-304,-305,-307,-316,-317,-318,-319,-320,-321,-322,-323,-324,-325,-326,-327,-330,-331,-332,-333,-339,-315,-277,-329,-300,-301,-280,-281,-282,-283,-334,-335,-336,-337,-308,-259,-260,-261,-262,-263,-264,-265,-266,-267,-268,-269,277,277,277,277,277,277,277,-295,-296,-297,-298,-299,-278,-293,-294,-284,-285,-302,-309,-303,]),'GE':([139,143,145,146,151,152,158,159,162,163,164,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,208,233,250,263,291,292,293,295,296,297,300,301,302,303,406,409,410,411,412,413,414,415,416,417,418,419,420,421,422,423,424,425,426,429,431,432,433,434,497,501,502,505,506,561,563,574,],[-328,-306,278,-258,-277,-279,-292,-315,-304,-305,-307,-316,-317,-318,-319,-320,-321,-322,-323,-324,-325,-326,-327,-330,-331,-332,-333,-339,-315,-277,-329,-300,-301,-280,-281,-282,-283,-334,-335,-336,-337,-308,-259,-260,-261,-262,-263,-264,-265,-266,-267,-268,-269,278,278,278,278,278,278,278,-295,-296,-297,-298,-299,-278,-293,-294,-284,-285,-302,-309,-303,]),'GT':([139,143,145,146,151,152,158,159,162,163,164,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,208,233,250,263,291,292,293,295,296,297,300,301,302,303,406,409,410,411,412,413,414,415,416,417,418,419,420,421,422,423,424,425,426,429,431,432,433,434,497,501,502,505,506,561,563,574,],[-328,-306,279,-258,-277,-279,-292,-315,-304,-305,-307,-316,-317,-318,-319,-320,-321,-322,-323,-324,-325,-326,-327,-330,-331,-332,-333,-339,-315,-277,-329,-300,-301,-280,-281,-282,-283,-334,-335,-336,-337,-308,-259,-260,-261,-262,-263,-264,-265,-266,-267,-268,-269,279,279,279,279,279,279,279,-295,-296,-297,-298,-299,-278,-293,-294,-284,-285,-302,-309,-303,]),'EQ':([139,143,145,146,151,152,158,159,162,163,164,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,208,233,250,263,291,292,293,295,296,297,300,301,302,303,406,409,410,411,412,413,414,415,416,417,418,419,420,421,422,423,424,425,426,429,431,432,433,434,497,501,502,505,506,561,563,574,],[-328,-306,280,-258,-277,-279,-292,-315,-304,-305,-307,-316,-317,-318,-319,-320,-321,-322,-323,-324,-325,-326,-327,-330,-331,-332,-333,-339,-315,-277,-329,-300,-301,-280,-281,-282,-283,-334,-335,-336,-337,-308,-259,-260,-261,-262,-263,-264,-265,-266,-267,-268,-269,-270,-271,280,280,280,280,280,-295,-296,-297,-298,-299,-278,-293,-294,-284,-285,-302,-309,-303,]),'NE':([139,143,145,146,151,152,158,159,162,163,164,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,208,233,250,263,291,292,293,295,296,297,300,301,302,303,406,409,410,411,412,413,414,415,416,417,418,419,420,421,422,423,424,425,426,429,431,432,433,434,497,501,502,505,506,561,563,574,],[-328,-306,281,-258,-277,-279,-292,-315,-304,-305,-307,-316,-317,-318,-319,-320,-321,-322,-323,-324,-325,-326,-327,-330,-331,-332,-333,-339,-315,-277,-329,-300,-301,-280,-281,-282,-283,-334,-335,-336,-337,-308,-259,-260,-261,-262,-263,-264,-265,-266,-267,-268,-269,-270,-271,281,281,281,281,281,-295,-296,-297,-298,-299,-278,-293,-294,-284,-285,-302,-309,-303,]),'OR':([139,143,145,146,151,152,158,159,162,163,164,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,208,233,250,263,291,292,293,295,296,297,300,301,302,303,406,409,410,411,412,413,414,415,416,417,418,419,420,421,422,423,424,425,426,429,431,432,433,434,497,501,502,505,506,561,563,574,],[-328,-306,283,-258,-277,-279,-292,-315,-304,-305,-307,-316,-317,-318,-319,-320,-321,-322,-323,-324,-325,-326,-327,-330,-331,-332,-333,-339,-315,-277,-329,-300,-301,-280,-281,-282,-283,-334,-335,-336,-337,-308,-259,-260,-261,-262,-263,-264,-265,-266,-267,-268,-269,-270,-271,-272,-273,-274,283,283,-295,-296,-297,-298,-299,-278,-293,-294,-284,-285,-302,-309,-303,]),'XOR':([139,143,145,146,151,152,158,159,162,163,164,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,208,233,250,263,291,292,293,295,296,297,300,301,302,303,406,409,410,411,412,413,414,415,416,417,418,419,420,421,422,423,424,425,426,429,431,432,433,434,497,501,502,505,506,561,563,574,],[-328,-306,284,-258,-277,-279,-292,-315,-304,-305,-307,-316,-317,-318,-319,-320,-321,-322,-323,-324,-325,-326,-327,-330,-331,-332,-333,-339,-315,-277,-329,-300,-301,-280,-281,-282,-283,-334,-335,-336,-337,-308,-259,-260,-261,-262,-263,-264,-265,-266,-267,-268,-269,-270,-271,-272,284,-274,284,284,-295,-296,-297,-298,-299,-278,-293,-294,-284,-285,-302,-309,-303,]),'LAND':([139,143,145,146,151,152,158,159,162,163,164,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,208,233,250,263,291,292,293,295,296,297,300,301,302,303,406,409,410,411,412,413,414,415,416,417,418,419,420,421,422,423,424,425,426,429,431,432,433,434,497,501,502,505,506,561,563,574,],[-328,-306,285,-258,-277,-279,-292,-315,-304,-305,-307,-316,-317,-318,-319,-320,-321,-322,-323,-324,-325,-326,-327,-330,-331,-332,-333,-339,-315,-277,-329,-300,-301,-280,-281,-282,-283,-334,-335,-336,-337,-308,-259,-260,-261,-262,-263,-264,-265,-266,-267,-268,-269,-270,-271,-272,-273,-274,-275,285,-295,-296,-297,-298,-299,-278,-293,-294,-284,-285,-302,-309,-303,]),'LOR':([139,143,145,146,151,152,158,159,162,163,164,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,208,233,250,263,291,292,293,295,296,297,300,301,302,303,406,409,410,411,412,413,414,415,416,417,418,419,420,421,422,423,424,425,426,429,431,432,433,434,497,501,502,505,506,561,563,574,],[-328,-306,286,-258,-277,-279,-292,-315,-304,-305,-307,-316,-317,-318,-319,-320,-321,-322,-323,-324,-325,-326,-327,-330,-331,-332,-333,-339,-315,-277,-329,-300,-301,-280,-281,-282,-283,-334,-335,-336,-337,-308,-259,-260,-261,-262,-263,-264,-265,-266,-267,-268,-269,-270,-271,-272,-273,-274,-275,-276,-295,-296,-297,-298,-299,-278,-293,-294,-284,-285,-302,-309,-303,]),'XOREQUAL':([139,143,151,152,158,159,162,163,164,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,208,233,250,263,291,292,293,295,296,297,300,301,302,303,406,429,431,432,433,434,497,501,502,505,506,561,563,574,],[-328,-306,-277,-279,-292,-315,-304,-305,-307,-316,-317,-318,-319,-320,-321,-322,-323,-324,-325,-326,-327,-330,-331,-332,-333,-339,-315,380,-329,-300,-301,-280,-281,-282,-283,-334,-335,-336,-337,-308,-295,-296,-297,-298,-299,-278,-293,-294,-284,-285,-302,-309,-303,]),'TIMESEQUAL':([139,143,151,152,158,159,162,163,164,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,208,233,250,263,291,292,293,295,296,297,300,301,302,303,406,429,431,432,433,434,497,501,502,505,506,561,563,574,],[-328,-306,-277,-279,-292,-315,-304,-305,-307,-316,-317,-318,-319,-320,-321,-322,-323,-324,-325,-326,-327,-330,-331,-332,-333,-339,-315,381,-329,-300,-301,-280,-281,-282,-283,-334,-335,-336,-337,-308,-295,-296,-297,-298,-299,-278,-293,-294,-284,-285,-302,-309,-303,]),'DIVEQUAL':([139,143,151,152,158,159,162,163,164,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,208,233,250,263,291,292,293,295,296,297,300,301,302,303,406,429,431,432,433,434,497,501,502,505,506,561,563,574,],[-328,-306,-277,-279,-292,-315,-304,-305,-307,-316,-317,-318,-319,-320,-321,-322,-323,-324,-325,-326,-327,-330,-331,-332,-333,-339,-315,382,-329,-300,-301,-280,-281,-282,-283,-334,-335,-336,-337,-308,-295,-296,-297,-298,-299,-278,-293,-294,-284,-285,-302,-309,-303,]),'MODEQUAL':([139,143,151,152,158,159,162,163,164,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,208,233,250,263,291,292,293,295,296,297,300,301,302,303,406,429,431,432,433,434,497,501,502,505,506,561,563,574,],[-328,-306,-277,-279,-292,-315,-304,-305,-307,-316,-317,-318,-319,-320,-321,-322,-323,-324,-325,-326,-327,-330,-331,-332,-333,-339,-315,383,-329,-300,-301,-280,-281,-282,-283,-334,-335,-336,-337,-308,-295,-296,-297,-298,-299,-278,-293,-294,-284,-285,-302,-309,-303,]),'PLUSEQUAL':([139,143,151,152,158,159,162,163,164,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,208,233,250,263,291,292,293,295,296,297,300,301,302,303,406,429,431,432,433,434,497,501,502,505,506,561,563,574,],[-328,-306,-277,-279,-292,-315,-304,-305,-307,-316,-317,-318,-319,-320,-321,-322,-323,-324,-325,-326,-327,-330,-331,-332,-333,-339,-315,384,-329,-300,-301,-280,-281,-282,-283,-334,-335,-336,-337,-308,-295,-296,-297,-298,-299,-278,-293,-294,-284,-285,-302,-309,-303,]),'MINUSEQUAL':([139,143,151,152,158,159,162,163,164,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,208,233,250,263,291,292,293,295,296,297,300,301,302,303,406,429,431,432,433,434,497,501,502,505,506,561,563,574,],[-328,-306,-277,-279,-292,-315,-304,-305,-307,-316,-317,-318,-319,-320,-321,-322,-323,-324,-325,-326,-327,-330,-331,-332,-333,-339,-315,385,-329,-300,-301,-280,-281,-282,-283,-334,-335,-336,-337,-308,-295,-296,-297,-298,-299,-278,-293,-294,-284,-285,-302,-309,-303,]),'LSHIFTEQUAL':([139,143,151,152,158,159,162,163,164,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,208,233,250,263,291,292,293,295,296,297,300,301,302,303,406,429,431,432,433,434,497,501,502,505,506,561,563,574,],[-328,-306,-277,-279,-292,-315,-304,-305,-307,-316,-317,-318,-319,-320,-321,-322,-323,-324,-325,-326,-327,-330,-331,-332,-333,-339,-315,386,-329,-300,-301,-280,-281,-282,-283,-334,-335,-336,-337,-308,-295,-296,-297,-298,-299,-278,-293,-294,-284,-285,-302,-309,-303,]),'RSHIFTEQUAL':([139,143,151,152,158,159,162,163,164,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,208,233,250,263,291,292,293,295,296,297,300,301,302,303,406,429,431,432,433,434,497,501,502,505,506,561,563,574,],[-328,-306,-277,-279,-292,-315,-304,-305,-307,-316,-317,-318,-319,-320,-321,-322,-323,-324,-325,-326,-327,-330,-331,-332,-333,-339,-315,387,-329,-300,-301,-280,-281,-282,-283,-334,-335,-336,-337,-308,-295,-296,-297,-298,-299,-278,-293,-294,-284,-285,-302,-309,-303,]),'ANDEQUAL':([139,143,151,152,158,159,162,163,164,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,208,233,250,263,291,292,293,295,296,297,300,301,302,303,406,429,431,432,433,434,497,501,502,505,506,561,563,574,],[-328,-306,-277,-279,-292,-315,-304,-305,-307,-316,-317,-318,-319,-320,-321,-322,-323,-324,-325,-326,-327,-330,-331,-332,-333,-339,-315,388,-329,-300,-301,-280,-281,-282,-283,-334,-335,-336,-337,-308,-295,-296,-297,-298,-299,-278,-293,-294,-284,-285,-302,-309,-303,]),'OREQUAL':([139,143,151,152,158,159,162,163,164,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,208,233,250,263,291,292,293,295,296,297,300,301,302,303,406,429,431,432,433,434,497,501,502,505,506,561,563,574,],[-328,-306,-277,-279,-292,-315,-304,-305,-307,-316,-317,-318,-319,-320,-321,-322,-323,-324,-325,-326,-327,-330,-331,-332,-333,-339,-315,389,-329,-300,-301,-280,-281,-282,-283,-334,-335,-336,-337,-308,-295,-296,-297,-298,-299,-278,-293,-294,-284,-285,-302,-309,-303,]),'ELLIPSIS':([313,],[443,]),}
 
 _lr_action = {}
 for _k, _v in _lr_action_items.items():
@@ -16,7 +16,7 @@ for _k, _v in _lr_action_items.items():
       _lr_action[_x][_k] = _y
 del _lr_action_items
 
-_lr_goto_items = {'expression_statement':([181,298,307,429,437,440,502,535,537,539,569,574,577,],[284,284,284,284,284,284,284,284,284,284,284,284,284,]),'struct_or_union_specifier':([0,21,40,59,75,85,91,93,95,99,118,129,172,174,181,184,185,186,214,229,231,233,239,267,278,298,313,315,342,350,422,427,460,],[5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,]),'init_declarator_list':([4,89,],[70,70,]),'init_declarator_list_opt':([4,89,],[79,79,]),'iteration_statement':([181,298,307,429,437,440,502,535,537,539,569,574,577,],[285,285,285,285,285,285,285,285,285,285,285,285,285,]),'static_assert':([0,59,181,298,307,429,437,440,502,535,537,539,569,574,577,],[17,17,286,286,286,286,286,286,286,286,286,286,286,286,286,]),'unified_string_literal':([85,116,131,146,149,171,174,175,181,201,204,218,229,231,233,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,265,266,290,297,298,307,319,329,333,338,339,353,354,364,373,375,412,413,419,421,427,429,430,434,437,440,441,447,477,481,484,499,502,513,521,533,535,537,538,539,542,543,549,553,566,569,574,577,],[136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,452,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,]),'assignment_expression_opt':([204,218,419,421,513,],[334,351,491,493,540,]),'brace_open':([31,32,92,96,98,100,101,130,131,181,201,229,298,307,375,413,429,437,440,477,478,479,502,521,535,537,539,569,574,577,],[99,102,181,184,185,193,194,181,227,181,227,181,181,181,227,488,181,181,181,488,488,488,181,227,181,181,181,181,181,181,]),'enumerator':([102,193,194,327,],[195,195,195,450,]),'typeid_noparen_declarator':([211,],[348,]),'type_qualifier_list_opt':([35,117,128,206,220,282,459,515,],[104,204,218,339,354,419,513,543,]),'declaration_specifiers_no_type_opt':([1,27,52,53,55,63,87,],[66,94,120,121,122,94,94,]),'expression_opt':([181,298,307,427,429,437,440,499,502,533,535,537,539,553,566,569,574,577,],[288,288,288,498,288,288,288,534,288,552,288,288,288,567,573,288,288,288,]),'designation':([227,472,488,550,],[369,369,369,369,]),'parameter_list':([118,129,278,342,422,460,],[213,213,213,213,213,213,]),'alignment_specifier':([0,1,4,21,27,52,53,55,59,63,75,85,87,89,93,95,99,118,129,174,177,181,184,185,186,192,211,229,231,233,239,267,278,298,313,315,342,350,422,427,460,],[53,53,81,53,53,53,53,53,53,53,53,142,53,81,53,142,142,53,53,142,280,53,142,142,142,280,81,142,142,142,142,142,53,53,142,142,53,53,53,53,53,]),'labeled_statement':([181,298,307,429,437,440,502,535,537,539,569,574,577,],[289,289,289,289,289,289,289,289,289,289,289,289,289,]),'abstract_declarator':([177,211,278,342,],[281,281,418,418,]),'translation_unit':([0,],[59,]),'init_declarator':([4,89,126,202,],[84,84,217,331,]),'direct_abstract_declarator':([177,211,276,278,342,344,457,],[283,283,414,283,283,414,414,]),'designator_list':([227,472,488,550,],[376,376,376,376,]),'identifier':([85,116,118,129,131,146,149,171,174,175,181,201,204,218,229,231,233,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,265,266,290,297,298,307,319,329,338,339,349,353,354,364,372,373,375,412,413,419,421,427,429,430,434,437,440,441,447,460,477,481,484,485,499,502,513,521,533,535,537,538,539,542,543,548,549,553,566,569,574,577,],[143,143,215,215,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,461,143,143,143,470,143,143,143,143,143,143,143,143,143,143,143,143,143,143,215,143,143,143,527,143,143,143,143,143,143,143,143,143,143,143,563,143,143,143,143,143,143,]),'offsetof_member_designator':([485,],[526,]),'unary_expression':([85,116,131,146,149,171,174,175,181,201,204,218,229,231,233,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,265,266,290,297,298,307,319,329,338,339,353,354,364,373,375,412,413,419,421,427,429,430,434,437,440,441,447,477,481,484,499,502,513,521,533,535,537,538,539,542,543,549,553,566,569,574,577,],[144,144,224,232,234,144,224,273,224,224,224,224,224,224,224,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,144,224,144,144,224,224,224,144,224,224,144,144,224,224,224,224,224,144,224,224,144,224,224,224,224,224,224,224,224,224,144,144,144,224,224,224,224,224,224,224,224,224,224,224,224,224,224,224,224,224,224,]),'abstract_declarator_opt':([177,211,],[274,343,]),'initializer':([131,201,375,521,],[226,330,473,546,]),'direct_id_declarator':([0,4,15,37,40,59,69,72,89,91,126,192,202,211,342,344,445,457,],[48,48,86,48,48,48,48,86,48,48,48,48,48,48,48,86,48,86,]),'struct_declaration_list':([99,184,185,],[186,313,315,]),'pp_directive':([0,59,],[14,14,]),'declaration_list':([21,75,],[93,93,]),'id_init_declarator':([40,91,],[108,108,]),'type_specifier':([0,21,40,59,75,85,91,93,95,99,118,129,172,174,181,184,185,186,214,229,231,233,239,267,278,298,313,315,342,350,422,427,460,],[18,18,109,18,18,147,109,18,147,147,18,18,269,147,18,147,147,147,109,147,147,147,147,147,18,18,147,147,18,18,18,18,18,]),'compound_statement':([92,130,181,229,298,307,429,437,440,502,535,537,539,569,574,577,],[180,223,291,378,291,291,291,291,291,291,291,291,291,291,291,291,]),'pointer':([0,4,37,40,59,69,89,91,104,126,177,192,202,211,278,342,445,],[15,72,15,15,15,72,72,15,199,72,276,72,72,344,276,457,72,]),'typeid_declarator':([4,69,89,126,192,202,445,],[74,125,74,74,74,74,74,]),'id_init_declarator_list':([40,91,],[113,113,]),'declarator':([4,89,126,192,202,445,],[78,78,78,324,78,324,]),'argument_expression_list':([266,],[409,]),'struct_declarator_list_opt':([192,],[322,]),'block_item_list':([181,],[298,]),'parameter_type_list_opt':([278,342,422,],[417,417,495,]),'struct_declarator':([192,445,],[323,508,]),'type_qualifier':([0,1,4,21,27,35,52,53,55,59,63,75,85,87,89,93,95,99,103,117,118,128,129,172,174,177,181,184,185,186,192,205,206,211,219,220,229,231,233,239,267,278,282,298,313,315,342,350,422,427,459,460,514,515,],[52,52,80,52,52,105,52,52,52,52,52,52,105,52,80,52,105,105,198,105,52,105,52,198,105,279,52,105,105,105,279,198,105,80,198,105,105,105,105,105,105,52,105,52,105,105,52,52,52,52,105,52,198,105,]),'assignment_operator':([224,],[364,]),'expression':([174,181,229,231,233,258,265,290,298,307,427,429,430,434,437,440,441,499,502,533,535,537,538,539,549,553,566,569,574,577,],[270,294,270,270,270,399,406,426,294,294,294,294,501,503,294,294,507,294,294,294,294,294,556,294,564,294,294,294,294,294,]),'storage_class_specifier':([0,1,4,21,27,52,53,55,59,63,75,87,89,93,118,129,181,211,278,298,342,350,422,427,460,],[1,1,68,1,1,1,1,1,1,1,1,1,68,1,1,1,1,68,1,1,1,1,1,1,1,]),'unified_wstring_literal':([85,116,131,146,149,171,174,175,181,201,204,218,229,231,233,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,265,266,290,297,298,307,319,329,338,339,353,354,364,373,375,412,413,419,421,427,429,430,434,437,440,441,447,477,481,484,499,502,513,521,533,535,537,538,539,542,543,549,553,566,569,574,577,],[153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,]),'translation_unit_or_empty':([0,],[9,]),'initializer_list_opt':([227,],[370,]),'brace_close':([99,184,185,186,196,309,313,315,325,326,370,472,528,550,],[187,314,316,317,328,439,442,443,448,449,469,523,551,565,]),'direct_typeid_declarator':([4,69,72,89,126,192,202,445,],[73,73,127,73,73,73,73,73,]),'external_declaration':([0,59,],[16,123,]),'pragmacomp_or_statement':([307,429,440,502,535,537,539,569,574,577,],[436,500,506,536,554,555,557,576,578,579,]),'type_name':([85,95,174,229,231,233,239,267,],[157,183,271,379,380,381,382,410,]),'typedef_name':([0,21,40,59,75,85,91,93,95,99,118,129,172,174,181,184,185,186,214,229,231,233,239,267,278,298,313,315,342,350,422,427,460,],[36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,]),'pppragma_directive':([0,59,99,181,184,185,186,298,307,313,315,429,437,440,502,535,537,539,569,574,577,],[25,25,189,300,189,189,189,300,437,189,189,437,300,437,437,437,437,437,437,437,437,]),'statement':([181,298,307,429,437,440,502,535,537,539,569,574,577,],[301,301,438,438,505,438,438,438,438,558,438,438,438,]),'cast_expression':([85,116,131,171,174,181,201,204,218,229,231,233,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,265,266,290,297,298,307,319,329,338,339,353,354,364,373,375,412,413,419,421,427,429,430,434,437,440,441,447,477,481,484,499,502,513,521,533,535,537,538,539,542,543,549,553,566,569,574,577,],[158,158,158,268,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,487,158,158,158,158,158,158,158,158,158,158,487,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,]),'atomic_specifier':([0,1,21,27,40,52,53,55,59,63,75,85,87,91,93,95,99,118,129,172,174,181,184,185,186,214,229,231,233,239,267,278,298,313,315,342,350,422,427,460,],[27,63,87,63,111,63,63,63,27,63,87,111,63,111,87,111,111,27,27,111,111,87,111,111,111,111,111,111,111,111,111,27,87,111,111,27,27,27,87,27,]),'struct_declarator_list':([192,],[320,]),'empty':([0,1,4,21,27,35,40,52,53,55,63,75,87,89,91,117,118,128,129,177,181,192,204,206,211,218,220,227,278,282,298,307,342,419,421,422,427,429,437,440,459,460,472,488,499,502,513,515,533,535,537,539,550,553,566,569,574,577,],[57,64,83,88,64,106,115,64,64,64,64,88,64,83,115,106,208,106,208,277,306,321,337,106,277,337,106,377,415,106,433,433,415,337,337,415,433,433,433,433,106,208,522,522,433,433,337,106,433,433,433,433,522,433,433,433,433,433,]),'parameter_declaration':([118,129,278,342,350,422,460,],[210,210,210,210,463,210,210,]),'primary_expression':([85,116,131,146,149,171,174,175,181,201,204,218,229,231,233,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,265,266,290,297,298,307,319,329,338,339,353,354,364,373,375,412,413,419,421,427,429,430,434,437,440,441,447,477,481,484,499,502,513,521,533,535,537,538,539,542,543,549,553,566,569,574,577,],[161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,161,]),'declaration':([0,21,59,75,93,181,298,427,],[38,90,38,90,182,302,302,499,]),'declaration_specifiers_no_type':([0,1,21,27,52,53,55,59,63,75,87,93,118,129,181,278,298,342,350,422,427,460,],[40,67,91,67,67,67,67,40,67,91,67,91,214,214,91,214,91,214,214,214,91,214,]),'jump_statement':([181,298,307,429,437,440,502,535,537,539,569,574,577,],[303,303,303,303,303,303,303,303,303,303,303,303,303,]),'enumerator_list':([102,193,194,],[196,325,326,]),'block_item':([181,298,],[305,432,]),'constant_expression':([85,116,297,319,329,373,447,],[159,203,431,444,451,471,509,]),'identifier_list_opt':([118,129,460,],[207,221,516,]),'constant':([85,116,131,146,149,171,174,175,181,201,204,218,229,231,233,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,265,266,290,297,298,307,319,329,338,339,353,354,364,373,375,412,413,419,421,427,429,430,434,437,440,441,447,477,481,484,499,502,513,521,533,535,537,538,539,542,543,549,553,566,569,574,577,],[156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,]),'type_specifier_no_typeid':([0,4,21,40,59,75,85,89,91,93,95,99,118,129,172,174,177,181,184,185,186,192,211,214,229,231,233,239,267,278,298,313,315,342,350,422,427,460,],[12,71,12,12,12,12,12,71,12,12,12,12,12,12,12,12,275,12,12,12,12,275,71,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,]),'struct_declaration':([99,184,185,186,313,315,],[190,190,190,318,318,318,]),'direct_typeid_noparen_declarator':([211,344,],[345,458,]),'id_declarator':([0,4,37,40,59,69,89,91,126,192,202,211,342,445,],[21,75,107,110,21,107,179,110,179,179,179,346,107,179,]),'selection_statement':([181,298,307,429,437,440,502,535,537,539,569,574,577,],[308,308,308,308,308,308,308,308,308,308,308,308,308,]),'postfix_expression':([85,116,131,146,149,171,174,175,181,201,204,218,229,231,233,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,265,266,290,297,298,307,319,329,338,339,353,354,364,373,375,412,413,419,421,427,429,430,434,437,440,441,447,477,481,484,499,502,513,521,533,535,537,538,539,542,543,549,553,566,569,574,577,],[168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,168,]),'initializer_list':([227,488,],[374,528,]),'unary_operator':([85,116,131,146,149,171,174,175,181,201,204,218,229,231,233,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,265,266,290,297,298,307,319,329,338,339,353,354,364,373,375,412,413,419,421,427,429,430,434,437,440,441,447,477,481,484,499,502,513,521,533,535,537,538,539,542,543,549,553,566,569,574,577,],[171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,171,]),'struct_or_union':([0,21,40,59,75,85,91,93,95,99,118,129,172,174,181,184,185,186,214,229,231,233,239,267,278,298,313,315,342,350,422,427,460,],[31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,]),'block_item_list_opt':([181,],[309,]),'assignment_expression':([131,174,181,201,204,218,229,231,233,258,265,266,290,298,307,338,339,353,354,364,375,412,419,421,427,429,430,434,437,440,441,484,499,502,513,521,533,535,537,538,539,542,543,549,553,566,569,574,577,],[228,272,272,228,335,335,272,272,272,272,272,408,272,272,272,455,456,466,467,468,228,486,335,335,272,272,272,272,272,272,272,525,272,272,335,228,272,272,272,272,272,561,562,272,272,272,272,272,272,]),'designation_opt':([227,472,488,550,],[375,521,375,521,]),'parameter_type_list':([118,129,278,342,422,460,],[209,222,416,416,416,517,]),'type_qualifier_list':([35,85,95,99,117,128,174,184,185,186,206,220,229,231,233,239,267,282,313,315,459,515,],[103,172,172,172,205,219,172,172,172,172,103,103,172,172,172,172,172,103,172,172,514,103,]),'designator':([227,376,472,488,550,],[371,474,371,371,371,]),'id_init_declarator_list_opt':([40,91,],[114,114,]),'declaration_specifiers':([0,21,59,75,93,118,129,181,278,298,342,350,422,427,460,],[4,89,4,89,89,211,211,89,211,89,211,211,211,89,211,]),'identifier_list':([118,129,460,],[212,212,212,]),'declaration_list_opt':([21,75,],[92,130,]),'function_definition':([0,59,],[45,45,]),'binary_expression':([85,116,131,174,181,201,204,218,229,231,233,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,265,266,290,297,298,307,319,329,338,339,353,354,364,373,375,412,419,421,427,429,430,434,437,440,441,447,481,484,499,502,513,521,533,535,537,538,539,542,543,549,553,566,569,574,577,],[162,162,162,162,162,162,162,162,162,162,162,383,384,385,386,387,388,389,390,391,392,393,394,395,396,397,398,162,400,401,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,]),'enum_specifier':([0,21,40,59,75,85,91,93,95,99,118,129,172,174,181,184,185,186,214,229,231,233,239,267,278,298,313,315,342,350,422,427,460,],[49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,]),'decl_body':([0,21,59,75,93,181,298,427,],[51,51,51,51,51,51,51,51,]),'function_specifier':([0,1,4,21,27,52,53,55,59,63,75,87,89,93,118,129,181,211,278,298,342,350,422,427,460,],[55,55,82,55,55,55,55,55,55,55,55,55,82,55,55,55,55,82,55,55,55,55,55,55,55,]),'specifier_qualifier_list':([85,95,99,174,184,185,186,229,231,233,239,267,313,315,],[177,177,192,177,192,192,192,177,177,177,177,177,192,192,]),'conditional_expression':([85,116,131,174,181,201,204,218,229,231,233,258,265,266,290,297,298,307,319,329,338,339,353,354,364,373,375,412,419,421,427,429,430,434,437,440,441,447,481,484,499,502,513,521,533,535,537,538,539,542,543,549,553,566,569,574,577,],[178,178,225,225,225,225,225,225,225,225,225,225,225,225,225,178,225,225,178,178,225,225,225,225,225,178,225,225,225,225,225,225,225,225,225,225,225,178,524,225,225,225,225,225,225,225,225,225,225,225,225,225,225,225,225,225,225,]),}
+_lr_goto_items = {'translation_unit_or_empty':([0,],[1,]),'translation_unit':([0,],[2,]),'empty':([0,11,12,21,22,23,26,27,30,34,69,70,71,73,95,96,101,128,136,137,182,183,192,209,216,221,242,256,257,258,322,323,351,358,360,369,372,448,449,455,457,458,470,482,487,498,510,511,525,526,527,529,559,562,570,572,582,584,],[3,66,83,99,99,99,107,99,114,99,83,107,99,66,114,188,99,220,114,188,307,114,320,343,320,357,357,392,307,114,453,114,453,357,357,357,357,114,188,307,307,453,357,357,533,533,307,114,357,357,357,357,357,533,357,357,357,357,]),'external_declaration':([0,2,],[4,64,]),'function_definition':([0,2,],[5,5,]),'declaration':([0,2,11,67,73,128,221,372,],[6,6,68,129,68,223,223,482,]),'pp_directive':([0,2,],[7,7,]),'pppragma_directive':([0,2,124,128,203,204,205,221,242,333,335,358,360,369,470,525,526,527,570,582,584,],[8,8,211,231,211,211,211,231,371,211,211,371,371,480,371,554,371,371,371,371,371,]),'static_assert':([0,2,128,221,242,358,360,369,470,525,526,527,570,582,584,],[10,10,232,232,232,232,232,232,232,232,232,232,232,232,232,]),'id_declarator':([0,2,12,17,26,69,70,82,134,192,194,209,322,466,],[11,11,73,93,111,130,111,93,130,315,130,130,93,130,]),'declaration_specifiers':([0,2,11,67,73,96,128,137,221,313,322,351,372,449,458,],[12,12,69,69,69,192,69,192,69,192,192,192,69,192,192,]),'decl_body':([0,2,11,67,73,128,221,372,],[13,13,13,13,13,13,13,13,]),'direct_id_declarator':([0,2,12,17,20,26,69,70,80,82,134,192,194,209,318,322,452,466,],[19,19,19,19,97,19,19,19,97,19,19,19,19,19,97,19,97,19,]),'pointer':([0,2,12,17,26,69,70,82,113,134,192,194,209,216,322,351,466,],[20,20,80,20,20,80,20,80,196,80,318,80,80,352,452,352,80,]),'type_qualifier':([0,2,11,12,21,22,23,27,30,34,67,69,71,73,95,96,101,115,124,125,126,128,136,137,141,183,184,192,203,204,205,209,213,216,221,238,258,259,294,298,299,304,313,322,323,333,335,351,372,448,449,458,511,512,],[21,21,21,74,21,21,21,21,116,21,21,74,21,21,116,21,21,197,116,116,116,21,116,21,116,116,197,74,116,116,116,341,197,341,21,116,116,197,116,116,116,116,21,21,116,116,116,21,21,116,21,21,116,197,]),'storage_class_specifier':([0,2,11,12,21,22,23,27,34,67,69,71,73,96,101,128,137,192,221,313,322,351,372,449,458,],[22,22,22,75,22,22,22,22,22,22,75,22,22,22,22,22,22,75,22,22,22,22,22,22,22,]),'function_specifier':([0,2,11,12,21,22,23,27,34,67,69,71,73,96,101,128,137,192,221,313,322,351,372,449,458,],[23,23,23,76,23,23,23,23,23,23,76,23,23,23,23,23,23,76,23,23,23,23,23,23,23,]),'type_specifier_no_typeid':([0,2,11,12,26,67,69,70,73,96,124,125,126,128,137,141,192,193,203,204,205,209,213,216,221,238,294,298,299,304,313,322,333,335,351,372,449,458,],[24,24,24,77,24,24,77,24,24,24,24,24,24,24,24,24,77,24,24,24,24,340,24,340,24,24,24,24,24,24,24,24,24,24,24,24,24,24,]),'type_specifier':([0,2,11,26,67,70,73,96,124,125,126,128,137,141,193,203,204,205,213,221,238,294,298,299,304,313,322,333,335,351,372,449,458,],[25,25,25,104,25,104,25,25,212,212,212,25,25,212,104,212,212,212,348,25,212,212,212,212,212,25,25,212,212,25,25,25,25,]),'declaration_specifiers_no_type':([0,2,11,21,22,23,27,34,67,71,73,96,101,128,137,221,313,322,351,372,449,458,],[26,26,70,100,100,100,100,100,70,100,70,193,100,70,193,70,193,193,193,70,193,193,]),'alignment_specifier':([0,2,11,12,21,22,23,27,34,67,69,71,73,96,101,124,125,126,128,137,141,192,203,204,205,209,216,221,238,294,298,299,304,313,322,333,335,351,372,449,458,],[27,27,27,78,27,27,27,27,27,27,78,27,27,27,27,214,214,214,27,27,214,78,214,214,214,342,342,27,214,214,214,214,214,27,27,214,214,27,27,27,27,]),'typedef_name':([0,2,11,26,67,70,73,96,124,125,126,128,137,141,193,203,204,205,213,221,238,294,298,299,304,313,322,333,335,351,372,449,458,],[31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,]),'enum_specifier':([0,2,11,26,67,70,73,96,124,125,126,128,137,141,193,203,204,205,213,221,238,294,298,299,304,313,322,333,335,351,372,449,458,],[32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,]),'struct_or_union_specifier':([0,2,11,26,67,70,73,96,124,125,126,128,137,141,193,203,204,205,213,221,238,294,298,299,304,313,322,333,335,351,372,449,458,],[33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,]),'atomic_specifier':([0,2,11,21,22,23,26,27,34,67,70,71,73,96,101,124,125,126,128,137,141,193,203,204,205,213,221,238,294,298,299,304,313,322,333,335,351,372,449,458,],[34,34,71,101,101,101,106,101,101,71,106,101,71,34,101,106,106,106,71,34,106,106,106,106,106,106,71,106,106,106,106,106,34,34,106,106,34,71,34,34,]),'struct_or_union':([0,2,11,26,67,70,73,96,124,125,126,128,137,141,193,203,204,205,213,221,238,294,298,299,304,313,322,333,335,351,372,449,458,],[37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,]),'declaration_list_opt':([11,73,],[65,131,]),'declaration_list':([11,73,],[67,67,]),'init_declarator_list_opt':([12,69,],[79,79,]),'init_declarator_list':([12,69,],[84,84,]),'init_declarator':([12,69,134,194,],[85,85,253,326,]),'declarator':([12,69,134,194,209,466,],[86,86,86,86,346,346,]),'typeid_declarator':([12,69,82,134,194,209,466,],[87,87,133,87,87,87,87,]),'direct_typeid_declarator':([12,69,80,82,134,194,209,466,],[88,88,132,88,88,88,88,88,]),'declaration_specifiers_no_type_opt':([21,22,23,27,34,71,101,],[98,102,103,112,117,117,117,]),'id_init_declarator_list_opt':([26,70,],[105,105,]),'id_init_declarator_list':([26,70,],[108,108,]),'id_init_declarator':([26,70,],[110,110,]),'type_qualifier_list_opt':([30,95,136,183,258,323,448,511,],[113,182,257,309,401,455,510,544,]),'type_qualifier_list':([30,95,124,125,126,136,141,183,203,204,205,238,258,294,298,299,304,323,333,335,448,511,],[115,184,213,213,213,259,213,115,213,213,213,213,115,213,213,213,213,115,213,213,512,115,]),'brace_open':([36,37,65,118,119,122,123,128,131,135,195,221,238,242,358,360,369,393,405,470,474,504,505,525,526,527,532,570,582,584,],[120,124,128,198,199,203,204,128,128,256,256,128,128,128,128,128,128,256,498,128,498,498,498,128,128,128,256,128,128,128,]),'compound_statement':([65,128,131,221,238,242,358,360,369,470,525,526,527,570,582,584,],[127,227,251,227,363,227,227,227,227,227,227,227,227,227,227,227,]),'unified_string_literal':([92,94,126,128,135,141,153,154,155,156,182,195,221,234,238,242,247,257,266,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,294,298,309,310,332,347,358,360,362,365,366,367,369,372,378,393,397,401,402,405,455,457,467,470,474,482,500,503,510,525,526,527,528,529,532,544,545,559,565,570,572,582,584,],[138,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,407,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,143,]),'constant_expression':([94,126,234,332,347,397,467,],[142,218,359,462,468,491,523,]),'conditional_expression':([94,126,128,135,141,182,195,221,234,238,242,247,257,268,287,288,294,298,309,310,332,347,358,360,362,365,366,367,369,372,378,393,397,401,402,455,457,467,470,482,500,503,510,525,526,527,528,529,532,544,545,559,565,570,572,582,584,],[144,144,249,249,249,249,249,249,144,249,249,249,249,249,249,249,249,249,249,249,144,144,249,249,249,249,249,249,249,249,249,249,144,249,249,249,249,144,249,249,538,249,249,249,249,249,249,249,249,249,249,249,249,249,249,249,249,]),'binary_expression':([94,126,128,135,141,182,195,221,234,238,242,247,257,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,294,298,309,310,332,347,358,360,362,365,366,367,369,372,378,393,397,401,402,455,457,467,470,482,500,503,510,525,526,527,528,529,532,544,545,559,565,570,572,582,584,],[145,145,145,145,145,145,145,145,145,145,145,145,145,145,409,410,411,412,413,414,415,416,417,418,419,420,421,422,423,424,425,426,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,]),'cast_expression':([94,126,128,135,141,155,182,195,221,234,238,242,247,257,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,294,298,309,310,332,347,358,360,362,365,366,367,369,372,378,393,397,401,402,405,455,457,467,470,474,482,500,503,510,525,526,527,528,529,532,544,545,559,565,570,572,582,584,],[146,146,146,146,146,296,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,497,146,146,146,146,497,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,146,]),'unary_expression':([94,126,128,135,141,153,154,155,156,182,195,221,234,238,242,247,257,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,294,298,309,310,332,347,358,360,362,365,366,367,369,372,378,393,397,401,402,405,455,457,467,470,474,482,500,503,510,525,526,527,528,529,532,544,545,559,565,570,572,582,584,],[151,151,250,250,250,293,295,151,297,250,250,250,151,250,250,250,250,250,151,151,151,151,151,151,151,151,151,151,151,151,151,151,151,151,151,151,250,250,250,250,250,250,151,151,250,250,250,250,250,250,250,250,250,250,151,250,250,151,250,250,151,250,151,250,151,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,250,]),'postfix_expression':([94,126,128,135,141,153,154,155,156,182,195,221,234,238,242,247,257,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,294,298,309,310,332,347,358,360,362,365,366,367,369,372,378,393,397,401,402,405,455,457,467,470,474,482,500,503,510,525,526,527,528,529,532,544,545,559,565,570,572,582,584,],[152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,]),'unary_operator':([94,126,128,135,141,153,154,155,156,182,195,221,234,238,242,247,257,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,294,298,309,310,332,347,358,360,362,365,366,367,369,372,378,393,397,401,402,405,455,457,467,470,474,482,500,503,510,525,526,527,528,529,532,544,545,559,565,570,572,582,584,],[155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,]),'primary_expression':([94,126,128,135,141,153,154,155,156,182,195,221,234,238,242,247,257,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,294,298,309,310,332,347,358,360,362,365,366,367,369,372,378,393,397,401,402,405,455,457,467,470,474,482,500,503,510,525,526,527,528,529,532,544,545,559,565,570,572,582,584,],[158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,]),'identifier':([94,96,126,128,135,137,141,153,154,155,156,182,195,221,234,238,242,247,257,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,294,298,309,310,314,332,347,358,360,362,365,366,367,369,372,378,393,397,398,401,402,405,449,455,457,467,470,474,482,500,503,507,510,525,526,527,528,529,532,544,545,559,564,565,570,572,582,584,],[162,191,162,162,162,191,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,162,445,162,162,162,162,162,162,162,162,162,162,162,162,162,492,162,162,162,191,162,162,162,162,162,162,162,162,541,162,162,162,162,162,162,162,162,162,162,575,162,162,162,162,162,]),'constant':([94,126,128,135,141,153,154,155,156,182,195,221,234,238,242,247,257,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,294,298,309,310,332,347,358,360,362,365,366,367,369,372,378,393,397,401,402,405,455,457,467,470,474,482,500,503,510,525,526,527,528,529,532,544,545,559,565,570,572,582,584,],[163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,]),'unified_wstring_literal':([94,126,128,135,141,153,154,155,156,182,195,221,234,238,242,247,257,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,294,298,309,310,332,347,358,360,362,365,366,367,369,372,378,393,397,401,402,405,455,457,467,470,474,482,500,503,510,525,526,527,528,529,532,544,545,559,565,570,572,582,584,],[164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,164,]),'parameter_type_list':([96,137,322,351,449,458,],[185,260,454,454,513,454,]),'identifier_list_opt':([96,137,449,],[186,261,514,]),'parameter_list':([96,137,322,351,449,458,],[187,187,187,187,187,187,]),'identifier_list':([96,137,449,],[189,189,189,]),'parameter_declaration':([96,137,313,322,351,449,458,],[190,190,444,190,190,190,190,]),'enumerator_list':([120,198,199,],[200,328,329,]),'enumerator':([120,198,199,331,],[201,201,201,461,]),'struct_declaration_list':([124,203,204,],[205,333,335,]),'brace_close':([124,200,203,204,205,219,328,329,333,335,390,487,537,562,],[206,330,334,336,337,355,459,460,463,464,486,531,561,574,]),'struct_declaration':([124,203,204,205,333,335,],[207,207,207,338,338,338,]),'specifier_qualifier_list':([124,125,126,141,203,204,205,238,294,298,299,304,333,335,],[209,216,216,216,209,209,209,216,216,216,216,216,209,209,]),'type_name':([125,126,141,238,294,298,299,304,],[215,217,264,364,435,436,437,438,]),'block_item_list_opt':([128,],[219,]),'block_item_list':([128,],[221,]),'block_item':([128,221,],[222,356,]),'statement':([128,221,242,358,360,369,470,525,526,527,570,582,584,],[224,224,370,370,370,479,370,553,370,370,370,370,370,]),'labeled_statement':([128,221,242,358,360,369,470,525,526,527,570,582,584,],[225,225,225,225,225,225,225,225,225,225,225,225,225,]),'expression_statement':([128,221,242,358,360,369,470,525,526,527,570,582,584,],[226,226,226,226,226,226,226,226,226,226,226,226,226,]),'selection_statement':([128,221,242,358,360,369,470,525,526,527,570,582,584,],[228,228,228,228,228,228,228,228,228,228,228,228,228,]),'iteration_statement':([128,221,242,358,360,369,470,525,526,527,570,582,584,],[229,229,229,229,229,229,229,229,229,229,229,229,229,]),'jump_statement':([128,221,242,358,360,369,470,525,526,527,570,582,584,],[230,230,230,230,230,230,230,230,230,230,230,230,230,]),'expression_opt':([128,221,242,358,360,369,372,470,482,525,526,527,529,559,570,572,582,584,],[236,236,236,236,236,236,481,236,530,236,236,236,558,573,236,581,236,236,]),'expression':([128,141,221,238,242,247,268,287,294,298,358,360,362,366,367,369,372,470,482,525,526,527,528,529,559,565,570,572,582,584,],[239,265,239,265,239,376,408,427,265,265,239,239,472,476,477,239,239,239,239,239,239,239,557,239,239,576,239,239,239,239,]),'assignment_expression':([128,135,141,182,195,221,238,242,247,257,268,287,288,294,298,309,310,358,360,362,365,366,367,369,372,378,393,401,402,455,457,470,482,503,510,525,526,527,528,529,532,544,545,559,565,570,572,582,584,],[248,255,248,308,255,248,248,248,248,308,248,248,430,248,248,441,442,248,248,248,475,248,248,248,248,485,255,495,496,308,308,248,248,539,308,248,248,248,248,248,255,568,569,248,248,248,248,248,248,]),'initializer':([135,195,393,532,],[254,327,488,560,]),'assignment_expression_opt':([182,257,455,457,510,],[305,399,517,519,542,]),'typeid_noparen_declarator':([192,],[316,]),'abstract_declarator_opt':([192,216,],[317,350,]),'direct_typeid_noparen_declarator':([192,318,],[319,446,]),'abstract_declarator':([192,216,322,351,],[321,321,450,450,]),'direct_abstract_declarator':([192,216,318,322,351,352,452,],[325,325,447,325,325,447,447,]),'struct_declarator_list_opt':([209,],[339,]),'struct_declarator_list':([209,],[344,]),'struct_declarator':([209,466,],[345,522,]),'pragmacomp_or_statement':([242,358,360,470,525,526,527,570,582,584,],[368,469,471,524,552,555,556,579,585,586,]),'pppragma_directive_list':([242,358,360,470,525,526,527,570,582,584,],[369,369,369,369,369,369,369,369,369,369,]),'assignment_operator':([250,],[378,]),'initializer_list_opt':([256,],[390,]),'initializer_list':([256,498,],[391,537,]),'designation_opt':([256,487,498,562,],[393,532,393,532,]),'designation':([256,487,498,562,],[394,394,394,394,]),'designator_list':([256,487,498,562,],[395,395,395,395,]),'designator':([256,395,487,498,562,],[396,490,396,396,396,]),'argument_expression_list':([288,],[428,]),'parameter_type_list_opt':([322,351,458,],[451,451,521,]),'offsetof_member_designator':([507,],[540,]),}
 
 _lr_goto = {}
 for _k, _v in _lr_goto_items.items():
@@ -96,271 +96,274 @@ _lr_productions = [
   ('static_assert -> _STATIC_ASSERT LPAREN constant_expression COMMA unified_string_literal RPAREN','static_assert',6,'p_static_assert_declaration','c_parser.py',560),
   ('static_assert -> _STATIC_ASSERT LPAREN constant_expression RPAREN','static_assert',4,'p_static_assert_declaration','c_parser.py',561),
   ('pp_directive -> PPHASH','pp_directive',1,'p_pp_directive','c_parser.py',569),
-  ('pppragma_directive -> PPPRAGMA','pppragma_directive',1,'p_pppragma_directive','c_parser.py',575),
-  ('pppragma_directive -> PPPRAGMA PPPRAGMASTR','pppragma_directive',2,'p_pppragma_directive','c_parser.py',576),
-  ('function_definition -> id_declarator declaration_list_opt compound_statement','function_definition',3,'p_function_definition_1','c_parser.py',586),
-  ('function_definition -> declaration_specifiers id_declarator declaration_list_opt compound_statement','function_definition',4,'p_function_definition_2','c_parser.py',604),
-  ('statement -> labeled_statement','statement',1,'p_statement','c_parser.py',619),
-  ('statement -> expression_statement','statement',1,'p_statement','c_parser.py',620),
-  ('statement -> compound_statement','statement',1,'p_statement','c_parser.py',621),
-  ('statement -> selection_statement','statement',1,'p_statement','c_parser.py',622),
-  ('statement -> iteration_statement','statement',1,'p_statement','c_parser.py',623),
-  ('statement -> jump_statement','statement',1,'p_statement','c_parser.py',624),
-  ('statement -> pppragma_directive','statement',1,'p_statement','c_parser.py',625),
-  ('statement -> static_assert','statement',1,'p_statement','c_parser.py',626),
-  ('pragmacomp_or_statement -> pppragma_directive statement','pragmacomp_or_statement',2,'p_pragmacomp_or_statement','c_parser.py',674),
-  ('pragmacomp_or_statement -> statement','pragmacomp_or_statement',1,'p_pragmacomp_or_statement','c_parser.py',675),
-  ('decl_body -> declaration_specifiers init_declarator_list_opt','decl_body',2,'p_decl_body','c_parser.py',694),
-  ('decl_body -> declaration_specifiers_no_type id_init_declarator_list_opt','decl_body',2,'p_decl_body','c_parser.py',695),
-  ('declaration -> decl_body SEMI','declaration',2,'p_declaration','c_parser.py',755),
-  ('declaration_list -> declaration','declaration_list',1,'p_declaration_list','c_parser.py',764),
-  ('declaration_list -> declaration_list declaration','declaration_list',2,'p_declaration_list','c_parser.py',765),
-  ('declaration_specifiers_no_type -> type_qualifier declaration_specifiers_no_type_opt','declaration_specifiers_no_type',2,'p_declaration_specifiers_no_type_1','c_parser.py',775),
-  ('declaration_specifiers_no_type -> storage_class_specifier declaration_specifiers_no_type_opt','declaration_specifiers_no_type',2,'p_declaration_specifiers_no_type_2','c_parser.py',780),
-  ('declaration_specifiers_no_type -> function_specifier declaration_specifiers_no_type_opt','declaration_specifiers_no_type',2,'p_declaration_specifiers_no_type_3','c_parser.py',785),
-  ('declaration_specifiers_no_type -> atomic_specifier declaration_specifiers_no_type_opt','declaration_specifiers_no_type',2,'p_declaration_specifiers_no_type_4','c_parser.py',792),
-  ('declaration_specifiers_no_type -> alignment_specifier declaration_specifiers_no_type_opt','declaration_specifiers_no_type',2,'p_declaration_specifiers_no_type_5','c_parser.py',797),
-  ('declaration_specifiers -> declaration_specifiers type_qualifier','declaration_specifiers',2,'p_declaration_specifiers_1','c_parser.py',802),
-  ('declaration_specifiers -> declaration_specifiers storage_class_specifier','declaration_specifiers',2,'p_declaration_specifiers_2','c_parser.py',807),
-  ('declaration_specifiers -> declaration_specifiers function_specifier','declaration_specifiers',2,'p_declaration_specifiers_3','c_parser.py',812),
-  ('declaration_specifiers -> declaration_specifiers type_specifier_no_typeid','declaration_specifiers',2,'p_declaration_specifiers_4','c_parser.py',817),
-  ('declaration_specifiers -> type_specifier','declaration_specifiers',1,'p_declaration_specifiers_5','c_parser.py',822),
-  ('declaration_specifiers -> declaration_specifiers_no_type type_specifier','declaration_specifiers',2,'p_declaration_specifiers_6','c_parser.py',827),
-  ('declaration_specifiers -> declaration_specifiers alignment_specifier','declaration_specifiers',2,'p_declaration_specifiers_7','c_parser.py',832),
-  ('storage_class_specifier -> AUTO','storage_class_specifier',1,'p_storage_class_specifier','c_parser.py',837),
-  ('storage_class_specifier -> REGISTER','storage_class_specifier',1,'p_storage_class_specifier','c_parser.py',838),
-  ('storage_class_specifier -> STATIC','storage_class_specifier',1,'p_storage_class_specifier','c_parser.py',839),
-  ('storage_class_specifier -> EXTERN','storage_class_specifier',1,'p_storage_class_specifier','c_parser.py',840),
-  ('storage_class_specifier -> TYPEDEF','storage_class_specifier',1,'p_storage_class_specifier','c_parser.py',841),
-  ('storage_class_specifier -> _THREAD_LOCAL','storage_class_specifier',1,'p_storage_class_specifier','c_parser.py',842),
-  ('function_specifier -> INLINE','function_specifier',1,'p_function_specifier','c_parser.py',847),
-  ('function_specifier -> _NORETURN','function_specifier',1,'p_function_specifier','c_parser.py',848),
-  ('type_specifier_no_typeid -> VOID','type_specifier_no_typeid',1,'p_type_specifier_no_typeid','c_parser.py',853),
-  ('type_specifier_no_typeid -> _BOOL','type_specifier_no_typeid',1,'p_type_specifier_no_typeid','c_parser.py',854),
-  ('type_specifier_no_typeid -> CHAR','type_specifier_no_typeid',1,'p_type_specifier_no_typeid','c_parser.py',855),
-  ('type_specifier_no_typeid -> SHORT','type_specifier_no_typeid',1,'p_type_specifier_no_typeid','c_parser.py',856),
-  ('type_specifier_no_typeid -> INT','type_specifier_no_typeid',1,'p_type_specifier_no_typeid','c_parser.py',857),
-  ('type_specifier_no_typeid -> LONG','type_specifier_no_typeid',1,'p_type_specifier_no_typeid','c_parser.py',858),
-  ('type_specifier_no_typeid -> FLOAT','type_specifier_no_typeid',1,'p_type_specifier_no_typeid','c_parser.py',859),
-  ('type_specifier_no_typeid -> DOUBLE','type_specifier_no_typeid',1,'p_type_specifier_no_typeid','c_parser.py',860),
-  ('type_specifier_no_typeid -> _COMPLEX','type_specifier_no_typeid',1,'p_type_specifier_no_typeid','c_parser.py',861),
-  ('type_specifier_no_typeid -> SIGNED','type_specifier_no_typeid',1,'p_type_specifier_no_typeid','c_parser.py',862),
-  ('type_specifier_no_typeid -> UNSIGNED','type_specifier_no_typeid',1,'p_type_specifier_no_typeid','c_parser.py',863),
-  ('type_specifier_no_typeid -> __INT128','type_specifier_no_typeid',1,'p_type_specifier_no_typeid','c_parser.py',864),
-  ('type_specifier -> typedef_name','type_specifier',1,'p_type_specifier','c_parser.py',869),
-  ('type_specifier -> enum_specifier','type_specifier',1,'p_type_specifier','c_parser.py',870),
-  ('type_specifier -> struct_or_union_specifier','type_specifier',1,'p_type_specifier','c_parser.py',871),
-  ('type_specifier -> type_specifier_no_typeid','type_specifier',1,'p_type_specifier','c_parser.py',872),
-  ('type_specifier -> atomic_specifier','type_specifier',1,'p_type_specifier','c_parser.py',873),
-  ('atomic_specifier -> _ATOMIC LPAREN type_name RPAREN','atomic_specifier',4,'p_atomic_specifier','c_parser.py',879),
-  ('type_qualifier -> CONST','type_qualifier',1,'p_type_qualifier','c_parser.py',886),
-  ('type_qualifier -> RESTRICT','type_qualifier',1,'p_type_qualifier','c_parser.py',887),
-  ('type_qualifier -> VOLATILE','type_qualifier',1,'p_type_qualifier','c_parser.py',888),
-  ('type_qualifier -> _ATOMIC','type_qualifier',1,'p_type_qualifier','c_parser.py',889),
-  ('init_declarator_list -> init_declarator','init_declarator_list',1,'p_init_declarator_list','c_parser.py',894),
-  ('init_declarator_list -> init_declarator_list COMMA init_declarator','init_declarator_list',3,'p_init_declarator_list','c_parser.py',895),
-  ('init_declarator -> declarator','init_declarator',1,'p_init_declarator','c_parser.py',903),
-  ('init_declarator -> declarator EQUALS initializer','init_declarator',3,'p_init_declarator','c_parser.py',904),
-  ('id_init_declarator_list -> id_init_declarator','id_init_declarator_list',1,'p_id_init_declarator_list','c_parser.py',909),
-  ('id_init_declarator_list -> id_init_declarator_list COMMA init_declarator','id_init_declarator_list',3,'p_id_init_declarator_list','c_parser.py',910),
-  ('id_init_declarator -> id_declarator','id_init_declarator',1,'p_id_init_declarator','c_parser.py',915),
-  ('id_init_declarator -> id_declarator EQUALS initializer','id_init_declarator',3,'p_id_init_declarator','c_parser.py',916),
-  ('specifier_qualifier_list -> specifier_qualifier_list type_specifier_no_typeid','specifier_qualifier_list',2,'p_specifier_qualifier_list_1','c_parser.py',923),
-  ('specifier_qualifier_list -> specifier_qualifier_list type_qualifier','specifier_qualifier_list',2,'p_specifier_qualifier_list_2','c_parser.py',928),
-  ('specifier_qualifier_list -> type_specifier','specifier_qualifier_list',1,'p_specifier_qualifier_list_3','c_parser.py',933),
-  ('specifier_qualifier_list -> type_qualifier_list type_specifier','specifier_qualifier_list',2,'p_specifier_qualifier_list_4','c_parser.py',938),
-  ('specifier_qualifier_list -> alignment_specifier','specifier_qualifier_list',1,'p_specifier_qualifier_list_5','c_parser.py',943),
-  ('specifier_qualifier_list -> specifier_qualifier_list alignment_specifier','specifier_qualifier_list',2,'p_specifier_qualifier_list_6','c_parser.py',948),
-  ('struct_or_union_specifier -> struct_or_union ID','struct_or_union_specifier',2,'p_struct_or_union_specifier_1','c_parser.py',956),
-  ('struct_or_union_specifier -> struct_or_union TYPEID','struct_or_union_specifier',2,'p_struct_or_union_specifier_1','c_parser.py',957),
-  ('struct_or_union_specifier -> struct_or_union brace_open struct_declaration_list brace_close','struct_or_union_specifier',4,'p_struct_or_union_specifier_2','c_parser.py',967),
-  ('struct_or_union_specifier -> struct_or_union brace_open brace_close','struct_or_union_specifier',3,'p_struct_or_union_specifier_2','c_parser.py',968),
-  ('struct_or_union_specifier -> struct_or_union ID brace_open struct_declaration_list brace_close','struct_or_union_specifier',5,'p_struct_or_union_specifier_3','c_parser.py',985),
-  ('struct_or_union_specifier -> struct_or_union ID brace_open brace_close','struct_or_union_specifier',4,'p_struct_or_union_specifier_3','c_parser.py',986),
-  ('struct_or_union_specifier -> struct_or_union TYPEID brace_open struct_declaration_list brace_close','struct_or_union_specifier',5,'p_struct_or_union_specifier_3','c_parser.py',987),
-  ('struct_or_union_specifier -> struct_or_union TYPEID brace_open brace_close','struct_or_union_specifier',4,'p_struct_or_union_specifier_3','c_parser.py',988),
-  ('struct_or_union -> STRUCT','struct_or_union',1,'p_struct_or_union','c_parser.py',1004),
-  ('struct_or_union -> UNION','struct_or_union',1,'p_struct_or_union','c_parser.py',1005),
-  ('struct_declaration_list -> struct_declaration','struct_declaration_list',1,'p_struct_declaration_list','c_parser.py',1012),
-  ('struct_declaration_list -> struct_declaration_list struct_declaration','struct_declaration_list',2,'p_struct_declaration_list','c_parser.py',1013),
-  ('struct_declaration -> specifier_qualifier_list struct_declarator_list_opt SEMI','struct_declaration',3,'p_struct_declaration_1','c_parser.py',1021),
-  ('struct_declaration -> SEMI','struct_declaration',1,'p_struct_declaration_2','c_parser.py',1059),
-  ('struct_declaration -> pppragma_directive','struct_declaration',1,'p_struct_declaration_3','c_parser.py',1064),
-  ('struct_declarator_list -> struct_declarator','struct_declarator_list',1,'p_struct_declarator_list','c_parser.py',1069),
-  ('struct_declarator_list -> struct_declarator_list COMMA struct_declarator','struct_declarator_list',3,'p_struct_declarator_list','c_parser.py',1070),
-  ('struct_declarator -> declarator','struct_declarator',1,'p_struct_declarator_1','c_parser.py',1078),
-  ('struct_declarator -> declarator COLON constant_expression','struct_declarator',3,'p_struct_declarator_2','c_parser.py',1083),
-  ('struct_declarator -> COLON constant_expression','struct_declarator',2,'p_struct_declarator_2','c_parser.py',1084),
-  ('enum_specifier -> ENUM ID','enum_specifier',2,'p_enum_specifier_1','c_parser.py',1092),
-  ('enum_specifier -> ENUM TYPEID','enum_specifier',2,'p_enum_specifier_1','c_parser.py',1093),
-  ('enum_specifier -> ENUM brace_open enumerator_list brace_close','enum_specifier',4,'p_enum_specifier_2','c_parser.py',1098),
-  ('enum_specifier -> ENUM ID brace_open enumerator_list brace_close','enum_specifier',5,'p_enum_specifier_3','c_parser.py',1103),
-  ('enum_specifier -> ENUM TYPEID brace_open enumerator_list brace_close','enum_specifier',5,'p_enum_specifier_3','c_parser.py',1104),
-  ('enumerator_list -> enumerator','enumerator_list',1,'p_enumerator_list','c_parser.py',1109),
-  ('enumerator_list -> enumerator_list COMMA','enumerator_list',2,'p_enumerator_list','c_parser.py',1110),
-  ('enumerator_list -> enumerator_list COMMA enumerator','enumerator_list',3,'p_enumerator_list','c_parser.py',1111),
-  ('alignment_specifier -> _ALIGNAS LPAREN type_name RPAREN','alignment_specifier',4,'p_alignment_specifier','c_parser.py',1122),
-  ('alignment_specifier -> _ALIGNAS LPAREN constant_expression RPAREN','alignment_specifier',4,'p_alignment_specifier','c_parser.py',1123),
-  ('enumerator -> ID','enumerator',1,'p_enumerator','c_parser.py',1128),
-  ('enumerator -> ID EQUALS constant_expression','enumerator',3,'p_enumerator','c_parser.py',1129),
-  ('declarator -> id_declarator','declarator',1,'p_declarator','c_parser.py',1144),
-  ('declarator -> typeid_declarator','declarator',1,'p_declarator','c_parser.py',1145),
-  ('pointer -> TIMES type_qualifier_list_opt','pointer',2,'p_pointer','c_parser.py',1257),
-  ('pointer -> TIMES type_qualifier_list_opt pointer','pointer',3,'p_pointer','c_parser.py',1258),
-  ('type_qualifier_list -> type_qualifier','type_qualifier_list',1,'p_type_qualifier_list','c_parser.py',1287),
-  ('type_qualifier_list -> type_qualifier_list type_qualifier','type_qualifier_list',2,'p_type_qualifier_list','c_parser.py',1288),
-  ('parameter_type_list -> parameter_list','parameter_type_list',1,'p_parameter_type_list','c_parser.py',1293),
-  ('parameter_type_list -> parameter_list COMMA ELLIPSIS','parameter_type_list',3,'p_parameter_type_list','c_parser.py',1294),
-  ('parameter_list -> parameter_declaration','parameter_list',1,'p_parameter_list','c_parser.py',1302),
-  ('parameter_list -> parameter_list COMMA parameter_declaration','parameter_list',3,'p_parameter_list','c_parser.py',1303),
-  ('parameter_declaration -> declaration_specifiers id_declarator','parameter_declaration',2,'p_parameter_declaration_1','c_parser.py',1322),
-  ('parameter_declaration -> declaration_specifiers typeid_noparen_declarator','parameter_declaration',2,'p_parameter_declaration_1','c_parser.py',1323),
-  ('parameter_declaration -> declaration_specifiers abstract_declarator_opt','parameter_declaration',2,'p_parameter_declaration_2','c_parser.py',1334),
-  ('identifier_list -> identifier','identifier_list',1,'p_identifier_list','c_parser.py',1366),
-  ('identifier_list -> identifier_list COMMA identifier','identifier_list',3,'p_identifier_list','c_parser.py',1367),
-  ('initializer -> assignment_expression','initializer',1,'p_initializer_1','c_parser.py',1376),
-  ('initializer -> brace_open initializer_list_opt brace_close','initializer',3,'p_initializer_2','c_parser.py',1381),
-  ('initializer -> brace_open initializer_list COMMA brace_close','initializer',4,'p_initializer_2','c_parser.py',1382),
-  ('initializer_list -> designation_opt initializer','initializer_list',2,'p_initializer_list','c_parser.py',1390),
-  ('initializer_list -> initializer_list COMMA designation_opt initializer','initializer_list',4,'p_initializer_list','c_parser.py',1391),
-  ('designation -> designator_list EQUALS','designation',2,'p_designation','c_parser.py',1402),
-  ('designator_list -> designator','designator_list',1,'p_designator_list','c_parser.py',1410),
-  ('designator_list -> designator_list designator','designator_list',2,'p_designator_list','c_parser.py',1411),
-  ('designator -> LBRACKET constant_expression RBRACKET','designator',3,'p_designator','c_parser.py',1416),
-  ('designator -> PERIOD identifier','designator',2,'p_designator','c_parser.py',1417),
-  ('type_name -> specifier_qualifier_list abstract_declarator_opt','type_name',2,'p_type_name','c_parser.py',1422),
-  ('abstract_declarator -> pointer','abstract_declarator',1,'p_abstract_declarator_1','c_parser.py',1434),
-  ('abstract_declarator -> pointer direct_abstract_declarator','abstract_declarator',2,'p_abstract_declarator_2','c_parser.py',1442),
-  ('abstract_declarator -> direct_abstract_declarator','abstract_declarator',1,'p_abstract_declarator_3','c_parser.py',1447),
-  ('direct_abstract_declarator -> LPAREN abstract_declarator RPAREN','direct_abstract_declarator',3,'p_direct_abstract_declarator_1','c_parser.py',1457),
-  ('direct_abstract_declarator -> direct_abstract_declarator LBRACKET assignment_expression_opt RBRACKET','direct_abstract_declarator',4,'p_direct_abstract_declarator_2','c_parser.py',1461),
-  ('direct_abstract_declarator -> LBRACKET type_qualifier_list_opt assignment_expression_opt RBRACKET','direct_abstract_declarator',4,'p_direct_abstract_declarator_3','c_parser.py',1472),
-  ('direct_abstract_declarator -> direct_abstract_declarator LBRACKET TIMES RBRACKET','direct_abstract_declarator',4,'p_direct_abstract_declarator_4','c_parser.py',1482),
-  ('direct_abstract_declarator -> LBRACKET TIMES RBRACKET','direct_abstract_declarator',3,'p_direct_abstract_declarator_5','c_parser.py',1493),
-  ('direct_abstract_declarator -> direct_abstract_declarator LPAREN parameter_type_list_opt RPAREN','direct_abstract_declarator',4,'p_direct_abstract_declarator_6','c_parser.py',1502),
-  ('direct_abstract_declarator -> LPAREN parameter_type_list_opt RPAREN','direct_abstract_declarator',3,'p_direct_abstract_declarator_7','c_parser.py',1512),
-  ('block_item -> declaration','block_item',1,'p_block_item','c_parser.py',1523),
-  ('block_item -> statement','block_item',1,'p_block_item','c_parser.py',1524),
-  ('block_item_list -> block_item','block_item_list',1,'p_block_item_list','c_parser.py',1531),
-  ('block_item_list -> block_item_list block_item','block_item_list',2,'p_block_item_list','c_parser.py',1532),
-  ('compound_statement -> brace_open block_item_list_opt brace_close','compound_statement',3,'p_compound_statement_1','c_parser.py',1538),
-  ('labeled_statement -> ID COLON pragmacomp_or_statement','labeled_statement',3,'p_labeled_statement_1','c_parser.py',1544),
-  ('labeled_statement -> CASE constant_expression COLON pragmacomp_or_statement','labeled_statement',4,'p_labeled_statement_2','c_parser.py',1548),
-  ('labeled_statement -> DEFAULT COLON pragmacomp_or_statement','labeled_statement',3,'p_labeled_statement_3','c_parser.py',1552),
-  ('selection_statement -> IF LPAREN expression RPAREN pragmacomp_or_statement','selection_statement',5,'p_selection_statement_1','c_parser.py',1556),
-  ('selection_statement -> IF LPAREN expression RPAREN statement ELSE pragmacomp_or_statement','selection_statement',7,'p_selection_statement_2','c_parser.py',1560),
-  ('selection_statement -> SWITCH LPAREN expression RPAREN pragmacomp_or_statement','selection_statement',5,'p_selection_statement_3','c_parser.py',1564),
-  ('iteration_statement -> WHILE LPAREN expression RPAREN pragmacomp_or_statement','iteration_statement',5,'p_iteration_statement_1','c_parser.py',1569),
-  ('iteration_statement -> DO pragmacomp_or_statement WHILE LPAREN expression RPAREN SEMI','iteration_statement',7,'p_iteration_statement_2','c_parser.py',1573),
-  ('iteration_statement -> FOR LPAREN expression_opt SEMI expression_opt SEMI expression_opt RPAREN pragmacomp_or_statement','iteration_statement',9,'p_iteration_statement_3','c_parser.py',1577),
-  ('iteration_statement -> FOR LPAREN declaration expression_opt SEMI expression_opt RPAREN pragmacomp_or_statement','iteration_statement',8,'p_iteration_statement_4','c_parser.py',1581),
-  ('jump_statement -> GOTO ID SEMI','jump_statement',3,'p_jump_statement_1','c_parser.py',1586),
-  ('jump_statement -> BREAK SEMI','jump_statement',2,'p_jump_statement_2','c_parser.py',1590),
-  ('jump_statement -> CONTINUE SEMI','jump_statement',2,'p_jump_statement_3','c_parser.py',1594),
-  ('jump_statement -> RETURN expression SEMI','jump_statement',3,'p_jump_statement_4','c_parser.py',1598),
-  ('jump_statement -> RETURN SEMI','jump_statement',2,'p_jump_statement_4','c_parser.py',1599),
-  ('expression_statement -> expression_opt SEMI','expression_statement',2,'p_expression_statement','c_parser.py',1604),
-  ('expression -> assignment_expression','expression',1,'p_expression','c_parser.py',1611),
-  ('expression -> expression COMMA assignment_expression','expression',3,'p_expression','c_parser.py',1612),
-  ('assignment_expression -> LPAREN compound_statement RPAREN','assignment_expression',3,'p_parenthesized_compound_expression','c_parser.py',1624),
-  ('typedef_name -> TYPEID','typedef_name',1,'p_typedef_name','c_parser.py',1628),
-  ('assignment_expression -> conditional_expression','assignment_expression',1,'p_assignment_expression','c_parser.py',1632),
-  ('assignment_expression -> unary_expression assignment_operator assignment_expression','assignment_expression',3,'p_assignment_expression','c_parser.py',1633),
-  ('assignment_operator -> EQUALS','assignment_operator',1,'p_assignment_operator','c_parser.py',1646),
-  ('assignment_operator -> XOREQUAL','assignment_operator',1,'p_assignment_operator','c_parser.py',1647),
-  ('assignment_operator -> TIMESEQUAL','assignment_operator',1,'p_assignment_operator','c_parser.py',1648),
-  ('assignment_operator -> DIVEQUAL','assignment_operator',1,'p_assignment_operator','c_parser.py',1649),
-  ('assignment_operator -> MODEQUAL','assignment_operator',1,'p_assignment_operator','c_parser.py',1650),
-  ('assignment_operator -> PLUSEQUAL','assignment_operator',1,'p_assignment_operator','c_parser.py',1651),
-  ('assignment_operator -> MINUSEQUAL','assignment_operator',1,'p_assignment_operator','c_parser.py',1652),
-  ('assignment_operator -> LSHIFTEQUAL','assignment_operator',1,'p_assignment_operator','c_parser.py',1653),
-  ('assignment_operator -> RSHIFTEQUAL','assignment_operator',1,'p_assignment_operator','c_parser.py',1654),
-  ('assignment_operator -> ANDEQUAL','assignment_operator',1,'p_assignment_operator','c_parser.py',1655),
-  ('assignment_operator -> OREQUAL','assignment_operator',1,'p_assignment_operator','c_parser.py',1656),
-  ('constant_expression -> conditional_expression','constant_expression',1,'p_constant_expression','c_parser.py',1661),
-  ('conditional_expression -> binary_expression','conditional_expression',1,'p_conditional_expression','c_parser.py',1665),
-  ('conditional_expression -> binary_expression CONDOP expression COLON conditional_expression','conditional_expression',5,'p_conditional_expression','c_parser.py',1666),
-  ('binary_expression -> cast_expression','binary_expression',1,'p_binary_expression','c_parser.py',1674),
-  ('binary_expression -> binary_expression TIMES binary_expression','binary_expression',3,'p_binary_expression','c_parser.py',1675),
-  ('binary_expression -> binary_expression DIVIDE binary_expression','binary_expression',3,'p_binary_expression','c_parser.py',1676),
-  ('binary_expression -> binary_expression MOD binary_expression','binary_expression',3,'p_binary_expression','c_parser.py',1677),
-  ('binary_expression -> binary_expression PLUS binary_expression','binary_expression',3,'p_binary_expression','c_parser.py',1678),
-  ('binary_expression -> binary_expression MINUS binary_expression','binary_expression',3,'p_binary_expression','c_parser.py',1679),
-  ('binary_expression -> binary_expression RSHIFT binary_expression','binary_expression',3,'p_binary_expression','c_parser.py',1680),
-  ('binary_expression -> binary_expression LSHIFT binary_expression','binary_expression',3,'p_binary_expression','c_parser.py',1681),
-  ('binary_expression -> binary_expression LT binary_expression','binary_expression',3,'p_binary_expression','c_parser.py',1682),
-  ('binary_expression -> binary_expression LE binary_expression','binary_expression',3,'p_binary_expression','c_parser.py',1683),
-  ('binary_expression -> binary_expression GE binary_expression','binary_expression',3,'p_binary_expression','c_parser.py',1684),
-  ('binary_expression -> binary_expression GT binary_expression','binary_expression',3,'p_binary_expression','c_parser.py',1685),
-  ('binary_expression -> binary_expression EQ binary_expression','binary_expression',3,'p_binary_expression','c_parser.py',1686),
-  ('binary_expression -> binary_expression NE binary_expression','binary_expression',3,'p_binary_expression','c_parser.py',1687),
-  ('binary_expression -> binary_expression AND binary_expression','binary_expression',3,'p_binary_expression','c_parser.py',1688),
-  ('binary_expression -> binary_expression OR binary_expression','binary_expression',3,'p_binary_expression','c_parser.py',1689),
-  ('binary_expression -> binary_expression XOR binary_expression','binary_expression',3,'p_binary_expression','c_parser.py',1690),
-  ('binary_expression -> binary_expression LAND binary_expression','binary_expression',3,'p_binary_expression','c_parser.py',1691),
-  ('binary_expression -> binary_expression LOR binary_expression','binary_expression',3,'p_binary_expression','c_parser.py',1692),
-  ('cast_expression -> unary_expression','cast_expression',1,'p_cast_expression_1','c_parser.py',1700),
-  ('cast_expression -> LPAREN type_name RPAREN cast_expression','cast_expression',4,'p_cast_expression_2','c_parser.py',1704),
-  ('unary_expression -> postfix_expression','unary_expression',1,'p_unary_expression_1','c_parser.py',1708),
-  ('unary_expression -> PLUSPLUS unary_expression','unary_expression',2,'p_unary_expression_2','c_parser.py',1712),
-  ('unary_expression -> MINUSMINUS unary_expression','unary_expression',2,'p_unary_expression_2','c_parser.py',1713),
-  ('unary_expression -> unary_operator cast_expression','unary_expression',2,'p_unary_expression_2','c_parser.py',1714),
-  ('unary_expression -> SIZEOF unary_expression','unary_expression',2,'p_unary_expression_3','c_parser.py',1719),
-  ('unary_expression -> SIZEOF LPAREN type_name RPAREN','unary_expression',4,'p_unary_expression_3','c_parser.py',1720),
-  ('unary_expression -> _ALIGNOF LPAREN type_name RPAREN','unary_expression',4,'p_unary_expression_3','c_parser.py',1721),
-  ('unary_operator -> AND','unary_operator',1,'p_unary_operator','c_parser.py',1729),
-  ('unary_operator -> TIMES','unary_operator',1,'p_unary_operator','c_parser.py',1730),
-  ('unary_operator -> PLUS','unary_operator',1,'p_unary_operator','c_parser.py',1731),
-  ('unary_operator -> MINUS','unary_operator',1,'p_unary_operator','c_parser.py',1732),
-  ('unary_operator -> NOT','unary_operator',1,'p_unary_operator','c_parser.py',1733),
-  ('unary_operator -> LNOT','unary_operator',1,'p_unary_operator','c_parser.py',1734),
-  ('postfix_expression -> primary_expression','postfix_expression',1,'p_postfix_expression_1','c_parser.py',1739),
-  ('postfix_expression -> postfix_expression LBRACKET expression RBRACKET','postfix_expression',4,'p_postfix_expression_2','c_parser.py',1743),
-  ('postfix_expression -> postfix_expression LPAREN argument_expression_list RPAREN','postfix_expression',4,'p_postfix_expression_3','c_parser.py',1747),
-  ('postfix_expression -> postfix_expression LPAREN RPAREN','postfix_expression',3,'p_postfix_expression_3','c_parser.py',1748),
-  ('postfix_expression -> postfix_expression PERIOD ID','postfix_expression',3,'p_postfix_expression_4','c_parser.py',1753),
-  ('postfix_expression -> postfix_expression PERIOD TYPEID','postfix_expression',3,'p_postfix_expression_4','c_parser.py',1754),
-  ('postfix_expression -> postfix_expression ARROW ID','postfix_expression',3,'p_postfix_expression_4','c_parser.py',1755),
-  ('postfix_expression -> postfix_expression ARROW TYPEID','postfix_expression',3,'p_postfix_expression_4','c_parser.py',1756),
-  ('postfix_expression -> postfix_expression PLUSPLUS','postfix_expression',2,'p_postfix_expression_5','c_parser.py',1762),
-  ('postfix_expression -> postfix_expression MINUSMINUS','postfix_expression',2,'p_postfix_expression_5','c_parser.py',1763),
-  ('postfix_expression -> LPAREN type_name RPAREN brace_open initializer_list brace_close','postfix_expression',6,'p_postfix_expression_6','c_parser.py',1768),
-  ('postfix_expression -> LPAREN type_name RPAREN brace_open initializer_list COMMA brace_close','postfix_expression',7,'p_postfix_expression_6','c_parser.py',1769),
-  ('primary_expression -> identifier','primary_expression',1,'p_primary_expression_1','c_parser.py',1774),
-  ('primary_expression -> constant','primary_expression',1,'p_primary_expression_2','c_parser.py',1778),
-  ('primary_expression -> unified_string_literal','primary_expression',1,'p_primary_expression_3','c_parser.py',1782),
-  ('primary_expression -> unified_wstring_literal','primary_expression',1,'p_primary_expression_3','c_parser.py',1783),
-  ('primary_expression -> LPAREN expression RPAREN','primary_expression',3,'p_primary_expression_4','c_parser.py',1788),
-  ('primary_expression -> OFFSETOF LPAREN type_name COMMA offsetof_member_designator RPAREN','primary_expression',6,'p_primary_expression_5','c_parser.py',1792),
-  ('offsetof_member_designator -> identifier','offsetof_member_designator',1,'p_offsetof_member_designator','c_parser.py',1800),
-  ('offsetof_member_designator -> offsetof_member_designator PERIOD identifier','offsetof_member_designator',3,'p_offsetof_member_designator','c_parser.py',1801),
-  ('offsetof_member_designator -> offsetof_member_designator LBRACKET expression RBRACKET','offsetof_member_designator',4,'p_offsetof_member_designator','c_parser.py',1802),
-  ('argument_expression_list -> assignment_expression','argument_expression_list',1,'p_argument_expression_list','c_parser.py',1814),
-  ('argument_expression_list -> argument_expression_list COMMA assignment_expression','argument_expression_list',3,'p_argument_expression_list','c_parser.py',1815),
-  ('identifier -> ID','identifier',1,'p_identifier','c_parser.py',1824),
-  ('constant -> INT_CONST_DEC','constant',1,'p_constant_1','c_parser.py',1828),
-  ('constant -> INT_CONST_OCT','constant',1,'p_constant_1','c_parser.py',1829),
-  ('constant -> INT_CONST_HEX','constant',1,'p_constant_1','c_parser.py',1830),
-  ('constant -> INT_CONST_BIN','constant',1,'p_constant_1','c_parser.py',1831),
-  ('constant -> INT_CONST_CHAR','constant',1,'p_constant_1','c_parser.py',1832),
-  ('constant -> FLOAT_CONST','constant',1,'p_constant_2','c_parser.py',1851),
-  ('constant -> HEX_FLOAT_CONST','constant',1,'p_constant_2','c_parser.py',1852),
-  ('constant -> CHAR_CONST','constant',1,'p_constant_3','c_parser.py',1868),
-  ('constant -> WCHAR_CONST','constant',1,'p_constant_3','c_parser.py',1869),
-  ('constant -> U8CHAR_CONST','constant',1,'p_constant_3','c_parser.py',1870),
-  ('constant -> U16CHAR_CONST','constant',1,'p_constant_3','c_parser.py',1871),
-  ('constant -> U32CHAR_CONST','constant',1,'p_constant_3','c_parser.py',1872),
-  ('unified_string_literal -> STRING_LITERAL','unified_string_literal',1,'p_unified_string_literal','c_parser.py',1883),
-  ('unified_string_literal -> unified_string_literal STRING_LITERAL','unified_string_literal',2,'p_unified_string_literal','c_parser.py',1884),
-  ('unified_wstring_literal -> WSTRING_LITERAL','unified_wstring_literal',1,'p_unified_wstring_literal','c_parser.py',1894),
-  ('unified_wstring_literal -> U8STRING_LITERAL','unified_wstring_literal',1,'p_unified_wstring_literal','c_parser.py',1895),
-  ('unified_wstring_literal -> U16STRING_LITERAL','unified_wstring_literal',1,'p_unified_wstring_literal','c_parser.py',1896),
-  ('unified_wstring_literal -> U32STRING_LITERAL','unified_wstring_literal',1,'p_unified_wstring_literal','c_parser.py',1897),
-  ('unified_wstring_literal -> unified_wstring_literal WSTRING_LITERAL','unified_wstring_literal',2,'p_unified_wstring_literal','c_parser.py',1898),
-  ('unified_wstring_literal -> unified_wstring_literal U8STRING_LITERAL','unified_wstring_literal',2,'p_unified_wstring_literal','c_parser.py',1899),
-  ('unified_wstring_literal -> unified_wstring_literal U16STRING_LITERAL','unified_wstring_literal',2,'p_unified_wstring_literal','c_parser.py',1900),
-  ('unified_wstring_literal -> unified_wstring_literal U32STRING_LITERAL','unified_wstring_literal',2,'p_unified_wstring_literal','c_parser.py',1901),
-  ('brace_open -> LBRACE','brace_open',1,'p_brace_open','c_parser.py',1911),
-  ('brace_close -> RBRACE','brace_close',1,'p_brace_close','c_parser.py',1917),
-  ('empty -> <empty>','empty',0,'p_empty','c_parser.py',1923),
+  ('pppragma_directive -> PPPRAGMA','pppragma_directive',1,'p_pppragma_directive','c_parser.py',580),
+  ('pppragma_directive -> PPPRAGMA PPPRAGMASTR','pppragma_directive',2,'p_pppragma_directive','c_parser.py',581),
+  ('pppragma_directive -> _PRAGMA LPAREN unified_string_literal RPAREN','pppragma_directive',4,'p_pppragma_directive','c_parser.py',582),
+  ('pppragma_directive_list -> pppragma_directive','pppragma_directive_list',1,'p_pppragma_directive_list','c_parser.py',592),
+  ('pppragma_directive_list -> pppragma_directive_list pppragma_directive','pppragma_directive_list',2,'p_pppragma_directive_list','c_parser.py',593),
+  ('function_definition -> id_declarator declaration_list_opt compound_statement','function_definition',3,'p_function_definition_1','c_parser.py',600),
+  ('function_definition -> declaration_specifiers id_declarator declaration_list_opt compound_statement','function_definition',4,'p_function_definition_2','c_parser.py',618),
+  ('statement -> labeled_statement','statement',1,'p_statement','c_parser.py',633),
+  ('statement -> expression_statement','statement',1,'p_statement','c_parser.py',634),
+  ('statement -> compound_statement','statement',1,'p_statement','c_parser.py',635),
+  ('statement -> selection_statement','statement',1,'p_statement','c_parser.py',636),
+  ('statement -> iteration_statement','statement',1,'p_statement','c_parser.py',637),
+  ('statement -> jump_statement','statement',1,'p_statement','c_parser.py',638),
+  ('statement -> pppragma_directive','statement',1,'p_statement','c_parser.py',639),
+  ('statement -> static_assert','statement',1,'p_statement','c_parser.py',640),
+  ('pragmacomp_or_statement -> pppragma_directive_list statement','pragmacomp_or_statement',2,'p_pragmacomp_or_statement','c_parser.py',688),
+  ('pragmacomp_or_statement -> statement','pragmacomp_or_statement',1,'p_pragmacomp_or_statement','c_parser.py',689),
+  ('decl_body -> declaration_specifiers init_declarator_list_opt','decl_body',2,'p_decl_body','c_parser.py',708),
+  ('decl_body -> declaration_specifiers_no_type id_init_declarator_list_opt','decl_body',2,'p_decl_body','c_parser.py',709),
+  ('declaration -> decl_body SEMI','declaration',2,'p_declaration','c_parser.py',769),
+  ('declaration_list -> declaration','declaration_list',1,'p_declaration_list','c_parser.py',778),
+  ('declaration_list -> declaration_list declaration','declaration_list',2,'p_declaration_list','c_parser.py',779),
+  ('declaration_specifiers_no_type -> type_qualifier declaration_specifiers_no_type_opt','declaration_specifiers_no_type',2,'p_declaration_specifiers_no_type_1','c_parser.py',789),
+  ('declaration_specifiers_no_type -> storage_class_specifier declaration_specifiers_no_type_opt','declaration_specifiers_no_type',2,'p_declaration_specifiers_no_type_2','c_parser.py',794),
+  ('declaration_specifiers_no_type -> function_specifier declaration_specifiers_no_type_opt','declaration_specifiers_no_type',2,'p_declaration_specifiers_no_type_3','c_parser.py',799),
+  ('declaration_specifiers_no_type -> atomic_specifier declaration_specifiers_no_type_opt','declaration_specifiers_no_type',2,'p_declaration_specifiers_no_type_4','c_parser.py',806),
+  ('declaration_specifiers_no_type -> alignment_specifier declaration_specifiers_no_type_opt','declaration_specifiers_no_type',2,'p_declaration_specifiers_no_type_5','c_parser.py',811),
+  ('declaration_specifiers -> declaration_specifiers type_qualifier','declaration_specifiers',2,'p_declaration_specifiers_1','c_parser.py',816),
+  ('declaration_specifiers -> declaration_specifiers storage_class_specifier','declaration_specifiers',2,'p_declaration_specifiers_2','c_parser.py',821),
+  ('declaration_specifiers -> declaration_specifiers function_specifier','declaration_specifiers',2,'p_declaration_specifiers_3','c_parser.py',826),
+  ('declaration_specifiers -> declaration_specifiers type_specifier_no_typeid','declaration_specifiers',2,'p_declaration_specifiers_4','c_parser.py',831),
+  ('declaration_specifiers -> type_specifier','declaration_specifiers',1,'p_declaration_specifiers_5','c_parser.py',836),
+  ('declaration_specifiers -> declaration_specifiers_no_type type_specifier','declaration_specifiers',2,'p_declaration_specifiers_6','c_parser.py',841),
+  ('declaration_specifiers -> declaration_specifiers alignment_specifier','declaration_specifiers',2,'p_declaration_specifiers_7','c_parser.py',846),
+  ('storage_class_specifier -> AUTO','storage_class_specifier',1,'p_storage_class_specifier','c_parser.py',851),
+  ('storage_class_specifier -> REGISTER','storage_class_specifier',1,'p_storage_class_specifier','c_parser.py',852),
+  ('storage_class_specifier -> STATIC','storage_class_specifier',1,'p_storage_class_specifier','c_parser.py',853),
+  ('storage_class_specifier -> EXTERN','storage_class_specifier',1,'p_storage_class_specifier','c_parser.py',854),
+  ('storage_class_specifier -> TYPEDEF','storage_class_specifier',1,'p_storage_class_specifier','c_parser.py',855),
+  ('storage_class_specifier -> _THREAD_LOCAL','storage_class_specifier',1,'p_storage_class_specifier','c_parser.py',856),
+  ('function_specifier -> INLINE','function_specifier',1,'p_function_specifier','c_parser.py',861),
+  ('function_specifier -> _NORETURN','function_specifier',1,'p_function_specifier','c_parser.py',862),
+  ('type_specifier_no_typeid -> VOID','type_specifier_no_typeid',1,'p_type_specifier_no_typeid','c_parser.py',867),
+  ('type_specifier_no_typeid -> _BOOL','type_specifier_no_typeid',1,'p_type_specifier_no_typeid','c_parser.py',868),
+  ('type_specifier_no_typeid -> CHAR','type_specifier_no_typeid',1,'p_type_specifier_no_typeid','c_parser.py',869),
+  ('type_specifier_no_typeid -> SHORT','type_specifier_no_typeid',1,'p_type_specifier_no_typeid','c_parser.py',870),
+  ('type_specifier_no_typeid -> INT','type_specifier_no_typeid',1,'p_type_specifier_no_typeid','c_parser.py',871),
+  ('type_specifier_no_typeid -> LONG','type_specifier_no_typeid',1,'p_type_specifier_no_typeid','c_parser.py',872),
+  ('type_specifier_no_typeid -> FLOAT','type_specifier_no_typeid',1,'p_type_specifier_no_typeid','c_parser.py',873),
+  ('type_specifier_no_typeid -> DOUBLE','type_specifier_no_typeid',1,'p_type_specifier_no_typeid','c_parser.py',874),
+  ('type_specifier_no_typeid -> _COMPLEX','type_specifier_no_typeid',1,'p_type_specifier_no_typeid','c_parser.py',875),
+  ('type_specifier_no_typeid -> SIGNED','type_specifier_no_typeid',1,'p_type_specifier_no_typeid','c_parser.py',876),
+  ('type_specifier_no_typeid -> UNSIGNED','type_specifier_no_typeid',1,'p_type_specifier_no_typeid','c_parser.py',877),
+  ('type_specifier_no_typeid -> __INT128','type_specifier_no_typeid',1,'p_type_specifier_no_typeid','c_parser.py',878),
+  ('type_specifier -> typedef_name','type_specifier',1,'p_type_specifier','c_parser.py',883),
+  ('type_specifier -> enum_specifier','type_specifier',1,'p_type_specifier','c_parser.py',884),
+  ('type_specifier -> struct_or_union_specifier','type_specifier',1,'p_type_specifier','c_parser.py',885),
+  ('type_specifier -> type_specifier_no_typeid','type_specifier',1,'p_type_specifier','c_parser.py',886),
+  ('type_specifier -> atomic_specifier','type_specifier',1,'p_type_specifier','c_parser.py',887),
+  ('atomic_specifier -> _ATOMIC LPAREN type_name RPAREN','atomic_specifier',4,'p_atomic_specifier','c_parser.py',893),
+  ('type_qualifier -> CONST','type_qualifier',1,'p_type_qualifier','c_parser.py',900),
+  ('type_qualifier -> RESTRICT','type_qualifier',1,'p_type_qualifier','c_parser.py',901),
+  ('type_qualifier -> VOLATILE','type_qualifier',1,'p_type_qualifier','c_parser.py',902),
+  ('type_qualifier -> _ATOMIC','type_qualifier',1,'p_type_qualifier','c_parser.py',903),
+  ('init_declarator_list -> init_declarator','init_declarator_list',1,'p_init_declarator_list','c_parser.py',908),
+  ('init_declarator_list -> init_declarator_list COMMA init_declarator','init_declarator_list',3,'p_init_declarator_list','c_parser.py',909),
+  ('init_declarator -> declarator','init_declarator',1,'p_init_declarator','c_parser.py',917),
+  ('init_declarator -> declarator EQUALS initializer','init_declarator',3,'p_init_declarator','c_parser.py',918),
+  ('id_init_declarator_list -> id_init_declarator','id_init_declarator_list',1,'p_id_init_declarator_list','c_parser.py',923),
+  ('id_init_declarator_list -> id_init_declarator_list COMMA init_declarator','id_init_declarator_list',3,'p_id_init_declarator_list','c_parser.py',924),
+  ('id_init_declarator -> id_declarator','id_init_declarator',1,'p_id_init_declarator','c_parser.py',929),
+  ('id_init_declarator -> id_declarator EQUALS initializer','id_init_declarator',3,'p_id_init_declarator','c_parser.py',930),
+  ('specifier_qualifier_list -> specifier_qualifier_list type_specifier_no_typeid','specifier_qualifier_list',2,'p_specifier_qualifier_list_1','c_parser.py',937),
+  ('specifier_qualifier_list -> specifier_qualifier_list type_qualifier','specifier_qualifier_list',2,'p_specifier_qualifier_list_2','c_parser.py',942),
+  ('specifier_qualifier_list -> type_specifier','specifier_qualifier_list',1,'p_specifier_qualifier_list_3','c_parser.py',947),
+  ('specifier_qualifier_list -> type_qualifier_list type_specifier','specifier_qualifier_list',2,'p_specifier_qualifier_list_4','c_parser.py',952),
+  ('specifier_qualifier_list -> alignment_specifier','specifier_qualifier_list',1,'p_specifier_qualifier_list_5','c_parser.py',957),
+  ('specifier_qualifier_list -> specifier_qualifier_list alignment_specifier','specifier_qualifier_list',2,'p_specifier_qualifier_list_6','c_parser.py',962),
+  ('struct_or_union_specifier -> struct_or_union ID','struct_or_union_specifier',2,'p_struct_or_union_specifier_1','c_parser.py',970),
+  ('struct_or_union_specifier -> struct_or_union TYPEID','struct_or_union_specifier',2,'p_struct_or_union_specifier_1','c_parser.py',971),
+  ('struct_or_union_specifier -> struct_or_union brace_open struct_declaration_list brace_close','struct_or_union_specifier',4,'p_struct_or_union_specifier_2','c_parser.py',981),
+  ('struct_or_union_specifier -> struct_or_union brace_open brace_close','struct_or_union_specifier',3,'p_struct_or_union_specifier_2','c_parser.py',982),
+  ('struct_or_union_specifier -> struct_or_union ID brace_open struct_declaration_list brace_close','struct_or_union_specifier',5,'p_struct_or_union_specifier_3','c_parser.py',999),
+  ('struct_or_union_specifier -> struct_or_union ID brace_open brace_close','struct_or_union_specifier',4,'p_struct_or_union_specifier_3','c_parser.py',1000),
+  ('struct_or_union_specifier -> struct_or_union TYPEID brace_open struct_declaration_list brace_close','struct_or_union_specifier',5,'p_struct_or_union_specifier_3','c_parser.py',1001),
+  ('struct_or_union_specifier -> struct_or_union TYPEID brace_open brace_close','struct_or_union_specifier',4,'p_struct_or_union_specifier_3','c_parser.py',1002),
+  ('struct_or_union -> STRUCT','struct_or_union',1,'p_struct_or_union','c_parser.py',1018),
+  ('struct_or_union -> UNION','struct_or_union',1,'p_struct_or_union','c_parser.py',1019),
+  ('struct_declaration_list -> struct_declaration','struct_declaration_list',1,'p_struct_declaration_list','c_parser.py',1026),
+  ('struct_declaration_list -> struct_declaration_list struct_declaration','struct_declaration_list',2,'p_struct_declaration_list','c_parser.py',1027),
+  ('struct_declaration -> specifier_qualifier_list struct_declarator_list_opt SEMI','struct_declaration',3,'p_struct_declaration_1','c_parser.py',1035),
+  ('struct_declaration -> SEMI','struct_declaration',1,'p_struct_declaration_2','c_parser.py',1073),
+  ('struct_declaration -> pppragma_directive','struct_declaration',1,'p_struct_declaration_3','c_parser.py',1078),
+  ('struct_declarator_list -> struct_declarator','struct_declarator_list',1,'p_struct_declarator_list','c_parser.py',1083),
+  ('struct_declarator_list -> struct_declarator_list COMMA struct_declarator','struct_declarator_list',3,'p_struct_declarator_list','c_parser.py',1084),
+  ('struct_declarator -> declarator','struct_declarator',1,'p_struct_declarator_1','c_parser.py',1092),
+  ('struct_declarator -> declarator COLON constant_expression','struct_declarator',3,'p_struct_declarator_2','c_parser.py',1097),
+  ('struct_declarator -> COLON constant_expression','struct_declarator',2,'p_struct_declarator_2','c_parser.py',1098),
+  ('enum_specifier -> ENUM ID','enum_specifier',2,'p_enum_specifier_1','c_parser.py',1106),
+  ('enum_specifier -> ENUM TYPEID','enum_specifier',2,'p_enum_specifier_1','c_parser.py',1107),
+  ('enum_specifier -> ENUM brace_open enumerator_list brace_close','enum_specifier',4,'p_enum_specifier_2','c_parser.py',1112),
+  ('enum_specifier -> ENUM ID brace_open enumerator_list brace_close','enum_specifier',5,'p_enum_specifier_3','c_parser.py',1117),
+  ('enum_specifier -> ENUM TYPEID brace_open enumerator_list brace_close','enum_specifier',5,'p_enum_specifier_3','c_parser.py',1118),
+  ('enumerator_list -> enumerator','enumerator_list',1,'p_enumerator_list','c_parser.py',1123),
+  ('enumerator_list -> enumerator_list COMMA','enumerator_list',2,'p_enumerator_list','c_parser.py',1124),
+  ('enumerator_list -> enumerator_list COMMA enumerator','enumerator_list',3,'p_enumerator_list','c_parser.py',1125),
+  ('alignment_specifier -> _ALIGNAS LPAREN type_name RPAREN','alignment_specifier',4,'p_alignment_specifier','c_parser.py',1136),
+  ('alignment_specifier -> _ALIGNAS LPAREN constant_expression RPAREN','alignment_specifier',4,'p_alignment_specifier','c_parser.py',1137),
+  ('enumerator -> ID','enumerator',1,'p_enumerator','c_parser.py',1142),
+  ('enumerator -> ID EQUALS constant_expression','enumerator',3,'p_enumerator','c_parser.py',1143),
+  ('declarator -> id_declarator','declarator',1,'p_declarator','c_parser.py',1158),
+  ('declarator -> typeid_declarator','declarator',1,'p_declarator','c_parser.py',1159),
+  ('pointer -> TIMES type_qualifier_list_opt','pointer',2,'p_pointer','c_parser.py',1271),
+  ('pointer -> TIMES type_qualifier_list_opt pointer','pointer',3,'p_pointer','c_parser.py',1272),
+  ('type_qualifier_list -> type_qualifier','type_qualifier_list',1,'p_type_qualifier_list','c_parser.py',1301),
+  ('type_qualifier_list -> type_qualifier_list type_qualifier','type_qualifier_list',2,'p_type_qualifier_list','c_parser.py',1302),
+  ('parameter_type_list -> parameter_list','parameter_type_list',1,'p_parameter_type_list','c_parser.py',1307),
+  ('parameter_type_list -> parameter_list COMMA ELLIPSIS','parameter_type_list',3,'p_parameter_type_list','c_parser.py',1308),
+  ('parameter_list -> parameter_declaration','parameter_list',1,'p_parameter_list','c_parser.py',1316),
+  ('parameter_list -> parameter_list COMMA parameter_declaration','parameter_list',3,'p_parameter_list','c_parser.py',1317),
+  ('parameter_declaration -> declaration_specifiers id_declarator','parameter_declaration',2,'p_parameter_declaration_1','c_parser.py',1336),
+  ('parameter_declaration -> declaration_specifiers typeid_noparen_declarator','parameter_declaration',2,'p_parameter_declaration_1','c_parser.py',1337),
+  ('parameter_declaration -> declaration_specifiers abstract_declarator_opt','parameter_declaration',2,'p_parameter_declaration_2','c_parser.py',1348),
+  ('identifier_list -> identifier','identifier_list',1,'p_identifier_list','c_parser.py',1380),
+  ('identifier_list -> identifier_list COMMA identifier','identifier_list',3,'p_identifier_list','c_parser.py',1381),
+  ('initializer -> assignment_expression','initializer',1,'p_initializer_1','c_parser.py',1390),
+  ('initializer -> brace_open initializer_list_opt brace_close','initializer',3,'p_initializer_2','c_parser.py',1395),
+  ('initializer -> brace_open initializer_list COMMA brace_close','initializer',4,'p_initializer_2','c_parser.py',1396),
+  ('initializer_list -> designation_opt initializer','initializer_list',2,'p_initializer_list','c_parser.py',1404),
+  ('initializer_list -> initializer_list COMMA designation_opt initializer','initializer_list',4,'p_initializer_list','c_parser.py',1405),
+  ('designation -> designator_list EQUALS','designation',2,'p_designation','c_parser.py',1416),
+  ('designator_list -> designator','designator_list',1,'p_designator_list','c_parser.py',1424),
+  ('designator_list -> designator_list designator','designator_list',2,'p_designator_list','c_parser.py',1425),
+  ('designator -> LBRACKET constant_expression RBRACKET','designator',3,'p_designator','c_parser.py',1430),
+  ('designator -> PERIOD identifier','designator',2,'p_designator','c_parser.py',1431),
+  ('type_name -> specifier_qualifier_list abstract_declarator_opt','type_name',2,'p_type_name','c_parser.py',1436),
+  ('abstract_declarator -> pointer','abstract_declarator',1,'p_abstract_declarator_1','c_parser.py',1448),
+  ('abstract_declarator -> pointer direct_abstract_declarator','abstract_declarator',2,'p_abstract_declarator_2','c_parser.py',1456),
+  ('abstract_declarator -> direct_abstract_declarator','abstract_declarator',1,'p_abstract_declarator_3','c_parser.py',1461),
+  ('direct_abstract_declarator -> LPAREN abstract_declarator RPAREN','direct_abstract_declarator',3,'p_direct_abstract_declarator_1','c_parser.py',1471),
+  ('direct_abstract_declarator -> direct_abstract_declarator LBRACKET assignment_expression_opt RBRACKET','direct_abstract_declarator',4,'p_direct_abstract_declarator_2','c_parser.py',1475),
+  ('direct_abstract_declarator -> LBRACKET type_qualifier_list_opt assignment_expression_opt RBRACKET','direct_abstract_declarator',4,'p_direct_abstract_declarator_3','c_parser.py',1486),
+  ('direct_abstract_declarator -> direct_abstract_declarator LBRACKET TIMES RBRACKET','direct_abstract_declarator',4,'p_direct_abstract_declarator_4','c_parser.py',1496),
+  ('direct_abstract_declarator -> LBRACKET TIMES RBRACKET','direct_abstract_declarator',3,'p_direct_abstract_declarator_5','c_parser.py',1507),
+  ('direct_abstract_declarator -> direct_abstract_declarator LPAREN parameter_type_list_opt RPAREN','direct_abstract_declarator',4,'p_direct_abstract_declarator_6','c_parser.py',1516),
+  ('direct_abstract_declarator -> LPAREN parameter_type_list_opt RPAREN','direct_abstract_declarator',3,'p_direct_abstract_declarator_7','c_parser.py',1526),
+  ('block_item -> declaration','block_item',1,'p_block_item','c_parser.py',1537),
+  ('block_item -> statement','block_item',1,'p_block_item','c_parser.py',1538),
+  ('block_item_list -> block_item','block_item_list',1,'p_block_item_list','c_parser.py',1545),
+  ('block_item_list -> block_item_list block_item','block_item_list',2,'p_block_item_list','c_parser.py',1546),
+  ('compound_statement -> brace_open block_item_list_opt brace_close','compound_statement',3,'p_compound_statement_1','c_parser.py',1552),
+  ('labeled_statement -> ID COLON pragmacomp_or_statement','labeled_statement',3,'p_labeled_statement_1','c_parser.py',1558),
+  ('labeled_statement -> CASE constant_expression COLON pragmacomp_or_statement','labeled_statement',4,'p_labeled_statement_2','c_parser.py',1562),
+  ('labeled_statement -> DEFAULT COLON pragmacomp_or_statement','labeled_statement',3,'p_labeled_statement_3','c_parser.py',1566),
+  ('selection_statement -> IF LPAREN expression RPAREN pragmacomp_or_statement','selection_statement',5,'p_selection_statement_1','c_parser.py',1570),
+  ('selection_statement -> IF LPAREN expression RPAREN statement ELSE pragmacomp_or_statement','selection_statement',7,'p_selection_statement_2','c_parser.py',1574),
+  ('selection_statement -> SWITCH LPAREN expression RPAREN pragmacomp_or_statement','selection_statement',5,'p_selection_statement_3','c_parser.py',1578),
+  ('iteration_statement -> WHILE LPAREN expression RPAREN pragmacomp_or_statement','iteration_statement',5,'p_iteration_statement_1','c_parser.py',1583),
+  ('iteration_statement -> DO pragmacomp_or_statement WHILE LPAREN expression RPAREN SEMI','iteration_statement',7,'p_iteration_statement_2','c_parser.py',1587),
+  ('iteration_statement -> FOR LPAREN expression_opt SEMI expression_opt SEMI expression_opt RPAREN pragmacomp_or_statement','iteration_statement',9,'p_iteration_statement_3','c_parser.py',1591),
+  ('iteration_statement -> FOR LPAREN declaration expression_opt SEMI expression_opt RPAREN pragmacomp_or_statement','iteration_statement',8,'p_iteration_statement_4','c_parser.py',1595),
+  ('jump_statement -> GOTO ID SEMI','jump_statement',3,'p_jump_statement_1','c_parser.py',1600),
+  ('jump_statement -> BREAK SEMI','jump_statement',2,'p_jump_statement_2','c_parser.py',1604),
+  ('jump_statement -> CONTINUE SEMI','jump_statement',2,'p_jump_statement_3','c_parser.py',1608),
+  ('jump_statement -> RETURN expression SEMI','jump_statement',3,'p_jump_statement_4','c_parser.py',1612),
+  ('jump_statement -> RETURN SEMI','jump_statement',2,'p_jump_statement_4','c_parser.py',1613),
+  ('expression_statement -> expression_opt SEMI','expression_statement',2,'p_expression_statement','c_parser.py',1618),
+  ('expression -> assignment_expression','expression',1,'p_expression','c_parser.py',1625),
+  ('expression -> expression COMMA assignment_expression','expression',3,'p_expression','c_parser.py',1626),
+  ('assignment_expression -> LPAREN compound_statement RPAREN','assignment_expression',3,'p_parenthesized_compound_expression','c_parser.py',1638),
+  ('typedef_name -> TYPEID','typedef_name',1,'p_typedef_name','c_parser.py',1642),
+  ('assignment_expression -> conditional_expression','assignment_expression',1,'p_assignment_expression','c_parser.py',1646),
+  ('assignment_expression -> unary_expression assignment_operator assignment_expression','assignment_expression',3,'p_assignment_expression','c_parser.py',1647),
+  ('assignment_operator -> EQUALS','assignment_operator',1,'p_assignment_operator','c_parser.py',1660),
+  ('assignment_operator -> XOREQUAL','assignment_operator',1,'p_assignment_operator','c_parser.py',1661),
+  ('assignment_operator -> TIMESEQUAL','assignment_operator',1,'p_assignment_operator','c_parser.py',1662),
+  ('assignment_operator -> DIVEQUAL','assignment_operator',1,'p_assignment_operator','c_parser.py',1663),
+  ('assignment_operator -> MODEQUAL','assignment_operator',1,'p_assignment_operator','c_parser.py',1664),
+  ('assignment_operator -> PLUSEQUAL','assignment_operator',1,'p_assignment_operator','c_parser.py',1665),
+  ('assignment_operator -> MINUSEQUAL','assignment_operator',1,'p_assignment_operator','c_parser.py',1666),
+  ('assignment_operator -> LSHIFTEQUAL','assignment_operator',1,'p_assignment_operator','c_parser.py',1667),
+  ('assignment_operator -> RSHIFTEQUAL','assignment_operator',1,'p_assignment_operator','c_parser.py',1668),
+  ('assignment_operator -> ANDEQUAL','assignment_operator',1,'p_assignment_operator','c_parser.py',1669),
+  ('assignment_operator -> OREQUAL','assignment_operator',1,'p_assignment_operator','c_parser.py',1670),
+  ('constant_expression -> conditional_expression','constant_expression',1,'p_constant_expression','c_parser.py',1675),
+  ('conditional_expression -> binary_expression','conditional_expression',1,'p_conditional_expression','c_parser.py',1679),
+  ('conditional_expression -> binary_expression CONDOP expression COLON conditional_expression','conditional_expression',5,'p_conditional_expression','c_parser.py',1680),
+  ('binary_expression -> cast_expression','binary_expression',1,'p_binary_expression','c_parser.py',1688),
+  ('binary_expression -> binary_expression TIMES binary_expression','binary_expression',3,'p_binary_expression','c_parser.py',1689),
+  ('binary_expression -> binary_expression DIVIDE binary_expression','binary_expression',3,'p_binary_expression','c_parser.py',1690),
+  ('binary_expression -> binary_expression MOD binary_expression','binary_expression',3,'p_binary_expression','c_parser.py',1691),
+  ('binary_expression -> binary_expression PLUS binary_expression','binary_expression',3,'p_binary_expression','c_parser.py',1692),
+  ('binary_expression -> binary_expression MINUS binary_expression','binary_expression',3,'p_binary_expression','c_parser.py',1693),
+  ('binary_expression -> binary_expression RSHIFT binary_expression','binary_expression',3,'p_binary_expression','c_parser.py',1694),
+  ('binary_expression -> binary_expression LSHIFT binary_expression','binary_expression',3,'p_binary_expression','c_parser.py',1695),
+  ('binary_expression -> binary_expression LT binary_expression','binary_expression',3,'p_binary_expression','c_parser.py',1696),
+  ('binary_expression -> binary_expression LE binary_expression','binary_expression',3,'p_binary_expression','c_parser.py',1697),
+  ('binary_expression -> binary_expression GE binary_expression','binary_expression',3,'p_binary_expression','c_parser.py',1698),
+  ('binary_expression -> binary_expression GT binary_expression','binary_expression',3,'p_binary_expression','c_parser.py',1699),
+  ('binary_expression -> binary_expression EQ binary_expression','binary_expression',3,'p_binary_expression','c_parser.py',1700),
+  ('binary_expression -> binary_expression NE binary_expression','binary_expression',3,'p_binary_expression','c_parser.py',1701),
+  ('binary_expression -> binary_expression AND binary_expression','binary_expression',3,'p_binary_expression','c_parser.py',1702),
+  ('binary_expression -> binary_expression OR binary_expression','binary_expression',3,'p_binary_expression','c_parser.py',1703),
+  ('binary_expression -> binary_expression XOR binary_expression','binary_expression',3,'p_binary_expression','c_parser.py',1704),
+  ('binary_expression -> binary_expression LAND binary_expression','binary_expression',3,'p_binary_expression','c_parser.py',1705),
+  ('binary_expression -> binary_expression LOR binary_expression','binary_expression',3,'p_binary_expression','c_parser.py',1706),
+  ('cast_expression -> unary_expression','cast_expression',1,'p_cast_expression_1','c_parser.py',1714),
+  ('cast_expression -> LPAREN type_name RPAREN cast_expression','cast_expression',4,'p_cast_expression_2','c_parser.py',1718),
+  ('unary_expression -> postfix_expression','unary_expression',1,'p_unary_expression_1','c_parser.py',1722),
+  ('unary_expression -> PLUSPLUS unary_expression','unary_expression',2,'p_unary_expression_2','c_parser.py',1726),
+  ('unary_expression -> MINUSMINUS unary_expression','unary_expression',2,'p_unary_expression_2','c_parser.py',1727),
+  ('unary_expression -> unary_operator cast_expression','unary_expression',2,'p_unary_expression_2','c_parser.py',1728),
+  ('unary_expression -> SIZEOF unary_expression','unary_expression',2,'p_unary_expression_3','c_parser.py',1733),
+  ('unary_expression -> SIZEOF LPAREN type_name RPAREN','unary_expression',4,'p_unary_expression_3','c_parser.py',1734),
+  ('unary_expression -> _ALIGNOF LPAREN type_name RPAREN','unary_expression',4,'p_unary_expression_3','c_parser.py',1735),
+  ('unary_operator -> AND','unary_operator',1,'p_unary_operator','c_parser.py',1743),
+  ('unary_operator -> TIMES','unary_operator',1,'p_unary_operator','c_parser.py',1744),
+  ('unary_operator -> PLUS','unary_operator',1,'p_unary_operator','c_parser.py',1745),
+  ('unary_operator -> MINUS','unary_operator',1,'p_unary_operator','c_parser.py',1746),
+  ('unary_operator -> NOT','unary_operator',1,'p_unary_operator','c_parser.py',1747),
+  ('unary_operator -> LNOT','unary_operator',1,'p_unary_operator','c_parser.py',1748),
+  ('postfix_expression -> primary_expression','postfix_expression',1,'p_postfix_expression_1','c_parser.py',1753),
+  ('postfix_expression -> postfix_expression LBRACKET expression RBRACKET','postfix_expression',4,'p_postfix_expression_2','c_parser.py',1757),
+  ('postfix_expression -> postfix_expression LPAREN argument_expression_list RPAREN','postfix_expression',4,'p_postfix_expression_3','c_parser.py',1761),
+  ('postfix_expression -> postfix_expression LPAREN RPAREN','postfix_expression',3,'p_postfix_expression_3','c_parser.py',1762),
+  ('postfix_expression -> postfix_expression PERIOD ID','postfix_expression',3,'p_postfix_expression_4','c_parser.py',1767),
+  ('postfix_expression -> postfix_expression PERIOD TYPEID','postfix_expression',3,'p_postfix_expression_4','c_parser.py',1768),
+  ('postfix_expression -> postfix_expression ARROW ID','postfix_expression',3,'p_postfix_expression_4','c_parser.py',1769),
+  ('postfix_expression -> postfix_expression ARROW TYPEID','postfix_expression',3,'p_postfix_expression_4','c_parser.py',1770),
+  ('postfix_expression -> postfix_expression PLUSPLUS','postfix_expression',2,'p_postfix_expression_5','c_parser.py',1776),
+  ('postfix_expression -> postfix_expression MINUSMINUS','postfix_expression',2,'p_postfix_expression_5','c_parser.py',1777),
+  ('postfix_expression -> LPAREN type_name RPAREN brace_open initializer_list brace_close','postfix_expression',6,'p_postfix_expression_6','c_parser.py',1782),
+  ('postfix_expression -> LPAREN type_name RPAREN brace_open initializer_list COMMA brace_close','postfix_expression',7,'p_postfix_expression_6','c_parser.py',1783),
+  ('primary_expression -> identifier','primary_expression',1,'p_primary_expression_1','c_parser.py',1788),
+  ('primary_expression -> constant','primary_expression',1,'p_primary_expression_2','c_parser.py',1792),
+  ('primary_expression -> unified_string_literal','primary_expression',1,'p_primary_expression_3','c_parser.py',1796),
+  ('primary_expression -> unified_wstring_literal','primary_expression',1,'p_primary_expression_3','c_parser.py',1797),
+  ('primary_expression -> LPAREN expression RPAREN','primary_expression',3,'p_primary_expression_4','c_parser.py',1802),
+  ('primary_expression -> OFFSETOF LPAREN type_name COMMA offsetof_member_designator RPAREN','primary_expression',6,'p_primary_expression_5','c_parser.py',1806),
+  ('offsetof_member_designator -> identifier','offsetof_member_designator',1,'p_offsetof_member_designator','c_parser.py',1814),
+  ('offsetof_member_designator -> offsetof_member_designator PERIOD identifier','offsetof_member_designator',3,'p_offsetof_member_designator','c_parser.py',1815),
+  ('offsetof_member_designator -> offsetof_member_designator LBRACKET expression RBRACKET','offsetof_member_designator',4,'p_offsetof_member_designator','c_parser.py',1816),
+  ('argument_expression_list -> assignment_expression','argument_expression_list',1,'p_argument_expression_list','c_parser.py',1828),
+  ('argument_expression_list -> argument_expression_list COMMA assignment_expression','argument_expression_list',3,'p_argument_expression_list','c_parser.py',1829),
+  ('identifier -> ID','identifier',1,'p_identifier','c_parser.py',1838),
+  ('constant -> INT_CONST_DEC','constant',1,'p_constant_1','c_parser.py',1842),
+  ('constant -> INT_CONST_OCT','constant',1,'p_constant_1','c_parser.py',1843),
+  ('constant -> INT_CONST_HEX','constant',1,'p_constant_1','c_parser.py',1844),
+  ('constant -> INT_CONST_BIN','constant',1,'p_constant_1','c_parser.py',1845),
+  ('constant -> INT_CONST_CHAR','constant',1,'p_constant_1','c_parser.py',1846),
+  ('constant -> FLOAT_CONST','constant',1,'p_constant_2','c_parser.py',1865),
+  ('constant -> HEX_FLOAT_CONST','constant',1,'p_constant_2','c_parser.py',1866),
+  ('constant -> CHAR_CONST','constant',1,'p_constant_3','c_parser.py',1882),
+  ('constant -> WCHAR_CONST','constant',1,'p_constant_3','c_parser.py',1883),
+  ('constant -> U8CHAR_CONST','constant',1,'p_constant_3','c_parser.py',1884),
+  ('constant -> U16CHAR_CONST','constant',1,'p_constant_3','c_parser.py',1885),
+  ('constant -> U32CHAR_CONST','constant',1,'p_constant_3','c_parser.py',1886),
+  ('unified_string_literal -> STRING_LITERAL','unified_string_literal',1,'p_unified_string_literal','c_parser.py',1897),
+  ('unified_string_literal -> unified_string_literal STRING_LITERAL','unified_string_literal',2,'p_unified_string_literal','c_parser.py',1898),
+  ('unified_wstring_literal -> WSTRING_LITERAL','unified_wstring_literal',1,'p_unified_wstring_literal','c_parser.py',1908),
+  ('unified_wstring_literal -> U8STRING_LITERAL','unified_wstring_literal',1,'p_unified_wstring_literal','c_parser.py',1909),
+  ('unified_wstring_literal -> U16STRING_LITERAL','unified_wstring_literal',1,'p_unified_wstring_literal','c_parser.py',1910),
+  ('unified_wstring_literal -> U32STRING_LITERAL','unified_wstring_literal',1,'p_unified_wstring_literal','c_parser.py',1911),
+  ('unified_wstring_literal -> unified_wstring_literal WSTRING_LITERAL','unified_wstring_literal',2,'p_unified_wstring_literal','c_parser.py',1912),
+  ('unified_wstring_literal -> unified_wstring_literal U8STRING_LITERAL','unified_wstring_literal',2,'p_unified_wstring_literal','c_parser.py',1913),
+  ('unified_wstring_literal -> unified_wstring_literal U16STRING_LITERAL','unified_wstring_literal',2,'p_unified_wstring_literal','c_parser.py',1914),
+  ('unified_wstring_literal -> unified_wstring_literal U32STRING_LITERAL','unified_wstring_literal',2,'p_unified_wstring_literal','c_parser.py',1915),
+  ('brace_open -> LBRACE','brace_open',1,'p_brace_open','c_parser.py',1925),
+  ('brace_close -> RBRACE','brace_close',1,'p_brace_close','c_parser.py',1931),
+  ('empty -> <empty>','empty',0,'p_empty','c_parser.py',1937),
 ]
diff --git a/contrib/python/pycparser/py3/ya.make b/contrib/python/pycparser/py3/ya.make
index 15236f2b3f..c0f2ff12da 100644
--- a/contrib/python/pycparser/py3/ya.make
+++ b/contrib/python/pycparser/py3/ya.make
@@ -2,7 +2,7 @@
 
 PY3_LIBRARY()
 
-VERSION(2.21)
+VERSION(2.22)
 
 LICENSE(BSD-3-Clause)
 
-- 
cgit v1.2.3


From c015541a60f8d93070c53511daaff81db730d194 Mon Sep 17 00:00:00 2001
From: ionagamed <ionagamed@yandex-team.com>
Date: Mon, 15 Apr 2024 10:18:45 +0300
Subject: YT: Add NodeFromYsonStreamNonGreedy; use it in TNode::Load
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

В рамках
3547980204d51d6eba4c3b56989a916379526673
---
 library/cpp/yson/node/benchmark/saveload.cpp | 57 ++++++++++++++++++++++++++++
 library/cpp/yson/node/benchmark/ya.make      |  1 +
 library/cpp/yson/node/node.cpp               |  2 +-
 library/cpp/yson/node/node_io.cpp            | 33 +++++++++++++---
 library/cpp/yson/node/node_io.h              |  7 ++++
 library/cpp/yson/node/node_ut.cpp            | 31 +++++++++++++++
 library/cpp/yson/parser.cpp                  | 14 ++++++-
 library/cpp/yson/parser.h                    |  2 +
 library/cpp/yson/parser_detail.h             | 33 ++++++++++------
 9 files changed, 160 insertions(+), 20 deletions(-)
 create mode 100644 library/cpp/yson/node/benchmark/saveload.cpp

diff --git a/library/cpp/yson/node/benchmark/saveload.cpp b/library/cpp/yson/node/benchmark/saveload.cpp
new file mode 100644
index 0000000000..838075f2e4
--- /dev/null
+++ b/library/cpp/yson/node/benchmark/saveload.cpp
@@ -0,0 +1,57 @@
+#include <benchmark/benchmark.h>
+
+#include <library/cpp/yson/node/node_io.h>
+
+using namespace NYT;
+
+namespace {
+
+static NYT::TNode GenerateList(size_t size)
+{
+    NYT::TNode result = NYT::TNode::CreateList();
+
+    for (size_t i = 0; i < size; ++i) {
+        result.AsList().emplace_back(NYT::TNode("val"));
+    }
+
+    return result;
+}
+
+} // namespace
+
+static void BM_SaveLoadGreedy(benchmark::State& state, size_t size)
+{
+    auto list = GenerateList(size);
+
+    TString bytes;
+    TStringOutput outputStream{bytes};
+    NodeToYsonStream(list, &outputStream, ::NYson::EYsonFormat::Binary);
+
+    for (const auto& _ : state) {
+        TStringInput inputStream{bytes};
+        NodeFromYsonStream(&inputStream);
+    }
+}
+
+static void BM_SaveLoadNonGreedy(benchmark::State& state, size_t size)
+{
+    auto list = GenerateList(size);
+
+    TString bytes;
+    TStringOutput outputStream{bytes};
+    NodeToYsonStream(list, &outputStream, ::NYson::EYsonFormat::Binary);
+
+    for (const auto& _ : state) {
+        TStringInput inputStream{bytes};
+        NodeFromYsonStreamNonGreedy(&inputStream);
+    }
+}
+
+BENCHMARK_CAPTURE(BM_SaveLoadGreedy, greedy_10, 10ul);
+BENCHMARK_CAPTURE(BM_SaveLoadNonGreedy, non_greedy_10, 10ul);
+BENCHMARK_CAPTURE(BM_SaveLoadGreedy, greedy_100, 100ul);
+BENCHMARK_CAPTURE(BM_SaveLoadNonGreedy, non_greedy_100, 100ul);
+BENCHMARK_CAPTURE(BM_SaveLoadGreedy, greedy_1000, 1000ul);
+BENCHMARK_CAPTURE(BM_SaveLoadNonGreedy, non_greedy_1000, 1000ul);
+BENCHMARK_CAPTURE(BM_SaveLoadGreedy, greedy_10000, 10000ul);
+BENCHMARK_CAPTURE(BM_SaveLoadNonGreedy, non_greedy_10000, 10000ul);
diff --git a/library/cpp/yson/node/benchmark/ya.make b/library/cpp/yson/node/benchmark/ya.make
index dd2035b1fa..53a6e5f48c 100644
--- a/library/cpp/yson/node/benchmark/ya.make
+++ b/library/cpp/yson/node/benchmark/ya.make
@@ -2,6 +2,7 @@ G_BENCHMARK()
 
 SRCS(
     reserve.cpp
+    saveload.cpp
 )
 
 PEERDIR(
diff --git a/library/cpp/yson/node/node.cpp b/library/cpp/yson/node/node.cpp
index 5156033cfe..f142ae0f42 100644
--- a/library/cpp/yson/node/node.cpp
+++ b/library/cpp/yson/node/node.cpp
@@ -861,7 +861,7 @@ void TNode::Save(IOutputStream* out) const
 void TNode::Load(IInputStream* in)
 {
     Clear();
-    *this = NodeFromYsonStream(in, ::NYson::EYsonType::Node);
+    *this = NodeFromYsonStreamNonGreedy(in, ::NYson::EYsonType::Node);
 }
 
 ////////////////////////////////////////////////////////////////////////////////
diff --git a/library/cpp/yson/node/node_io.cpp b/library/cpp/yson/node/node_io.cpp
index 2e191d8d48..d8a05ec995 100644
--- a/library/cpp/yson/node/node_io.cpp
+++ b/library/cpp/yson/node/node_io.cpp
@@ -11,6 +11,7 @@
 #include <library/cpp/json/json_reader.h>
 #include <library/cpp/json/json_value.h>
 
+#include <util/generic/size_literals.h>
 #include <util/stream/input.h>
 #include <util/stream/output.h>
 #include <util/stream/str.h>
@@ -82,6 +83,28 @@ static TNode CreateEmptyNodeByType(::NYson::EYsonType type)
     return result;
 }
 
+static TNode NodeFromYsonStream(IInputStream* input, ::NYson::EYsonType type, bool consumeUntilEof)
+{
+    TNode result = CreateEmptyNodeByType(type);
+
+    ui64 bufferSizeLimit = 64_KB;
+    if (!consumeUntilEof) {
+        // Other values might be in the stream, so reading one symbol at a time.
+        bufferSizeLimit = 1;
+    }
+
+    TNodeBuilder builder(&result);
+    ::NYson::TYsonParser parser(
+        &builder,
+        input,
+        type,
+        /*enableLinePositionInfo*/ false,
+        bufferSizeLimit,
+        consumeUntilEof);
+    parser.Parse();
+    return result;
+}
+
 TNode NodeFromYsonString(const TStringBuf input, ::NYson::EYsonType type)
 {
     TMemoryInput stream(input);
@@ -104,12 +127,12 @@ TString NodeToCanonicalYsonString(const TNode& node, NYson::EYsonFormat format)
 
 TNode NodeFromYsonStream(IInputStream* input, ::NYson::EYsonType type)
 {
-    TNode result = CreateEmptyNodeByType(type);
+    return NodeFromYsonStream(input, type, /*consumeUntilEof*/ true);
+}
 
-    TNodeBuilder builder(&result);
-    ::NYson::TYsonParser parser(&builder, input, type);
-    parser.Parse();
-    return result;
+TNode NodeFromYsonStreamNonGreedy(IInputStream* input, ::NYson::EYsonType type)
+{
+    return NodeFromYsonStream(input, type, /*consumeUntilEof*/ false);
 }
 
 void NodeToYsonStream(const TNode& node, IOutputStream* output, NYson::EYsonFormat format)
diff --git a/library/cpp/yson/node/node_io.h b/library/cpp/yson/node/node_io.h
index 1348d88bbb..2db1318db4 100644
--- a/library/cpp/yson/node/node_io.h
+++ b/library/cpp/yson/node/node_io.h
@@ -23,6 +23,13 @@ TString NodeToCanonicalYsonString(const TNode& node, ::NYson::EYsonFormat format
 // Parse TNode from stream in YSON format
 TNode NodeFromYsonStream(IInputStream* input, ::NYson::EYsonType type = ::NYson::EYsonType::Node);
 
+// Parse TNode from stream in YSON format.
+// NB: This is substantially slower (1.5-2x using the benchmark from `./benchmark/saveload.cpp`) than using
+//     the original `NodeFromYsonStream`.
+// Stops reading from `input` as soon as some valid YSON was read, leaving the remainder of the stream unread.
+// Used in TNode::Load to support cases of saveloading multiple values after the TNode from/to the same stream.
+TNode NodeFromYsonStreamNonGreedy(IInputStream* input, ::NYson::EYsonType type = ::NYson::EYsonType::Node);
+
 // Serialize TNode to stream in one of YSON formats with random order of maps' keys (don't use in tests)
 void NodeToYsonStream(const TNode& node, IOutputStream* output, ::NYson::EYsonFormat format = ::NYson::EYsonFormat::Text);
 
diff --git a/library/cpp/yson/node/node_ut.cpp b/library/cpp/yson/node/node_ut.cpp
index 728a926283..80d231cd09 100644
--- a/library/cpp/yson/node/node_ut.cpp
+++ b/library/cpp/yson/node/node_ut.cpp
@@ -279,6 +279,37 @@ Y_UNIT_TEST_SUITE(YtNodeTest) {
         UNIT_ASSERT_VALUES_EQUAL(node, nodeCopy);
     }
 
+    Y_UNIT_TEST(TestSaveLoadWithNeighbours) {
+        TString stringBefore = "before";
+
+        TNode node = TNode()("foo", "bar")("baz", 42);
+        node.Attributes()["attr_name"] = "attr_value";
+
+        TString stringAfter = "after";
+
+        TString bytes;
+        {
+            TStringOutput s(bytes);
+            ::Save(&s, stringBefore);
+            ::Save(&s, node);
+            ::Save(&s, stringAfter);
+        }
+
+        TString deserializedStringBefore;
+        TString deserializedStringAfter;
+        TNode nodeCopy;
+        {
+            TStringInput s(bytes);
+            ::Load(&s, deserializedStringBefore);
+            ::Load(&s, nodeCopy);
+            ::Load(&s, deserializedStringAfter);
+        }
+
+        UNIT_ASSERT_VALUES_EQUAL(stringBefore, deserializedStringBefore);
+        UNIT_ASSERT_VALUES_EQUAL(node, nodeCopy);
+        UNIT_ASSERT_VALUES_EQUAL(stringAfter, deserializedStringAfter);
+    }
+
     Y_UNIT_TEST(TestIntCast) {
         TNode node = 1ull << 31;
         UNIT_ASSERT(node.IsUint64());
diff --git a/library/cpp/yson/parser.cpp b/library/cpp/yson/parser.cpp
index 783f9b9047..934a56ee21 100644
--- a/library/cpp/yson/parser.cpp
+++ b/library/cpp/yson/parser.cpp
@@ -16,22 +16,27 @@ namespace NYson {
             IInputStream* stream,
             EYsonType type,
             bool enableLinePositionInfo,
+            ui64 bufferSizeLimit,
+            bool consumeUntilEof,
             TMaybe<ui64> memoryLimit = Nothing())
             : Consumer_(consumer)
             , Stream_(stream)
             , Type_(type)
             , EnableLinePositionInfo_(enableLinePositionInfo)
+            , BufferSizeLimit_(bufferSizeLimit)
+            , ConsumeUntilEof_(consumeUntilEof)
             , MemoryLimit_(memoryLimit)
         {
         }
 
         void Parse() {
-            TBuffer buffer(64 << 10);
+            TBuffer buffer(BufferSizeLimit_);
             ParseYsonStreamImpl<NYT::NYson::IYsonConsumer, TStreamReader>(
                 TStreamReader(Stream_, buffer.Data(), buffer.Capacity()),
                 Consumer_,
                 Type_,
                 EnableLinePositionInfo_,
+                ConsumeUntilEof_,
                 MemoryLimit_);
         }
 
@@ -40,6 +45,8 @@ namespace NYson {
         IInputStream* Stream_;
         EYsonType Type_;
         bool EnableLinePositionInfo_;
+        ui64 BufferSizeLimit_;
+        bool ConsumeUntilEof_;
         TMaybe<ui64> MemoryLimit_;
     };
 
@@ -50,8 +57,10 @@ namespace NYson {
         IInputStream* stream,
         EYsonType type,
         bool enableLinePositionInfo,
+        ui64 bufferSizeLimit,
+        bool consumeUntilEof,
         TMaybe<ui64> memoryLimit)
-        : Impl(new TImpl(consumer, stream, type, enableLinePositionInfo, memoryLimit))
+        : Impl(new TImpl(consumer, stream, type, enableLinePositionInfo, bufferSizeLimit, consumeUntilEof, memoryLimit))
     {
     }
 
@@ -115,6 +124,7 @@ namespace NYson {
             consumer,
             type,
             enableLinePositionInfo,
+            true,
             memoryLimit);
     }
 
diff --git a/library/cpp/yson/parser.h b/library/cpp/yson/parser.h
index dce35a8cd4..b6d8b110a1 100644
--- a/library/cpp/yson/parser.h
+++ b/library/cpp/yson/parser.h
@@ -21,6 +21,8 @@ namespace NYson {
             IInputStream* stream,
             EYsonType type = ::NYson::EYsonType::Node,
             bool enableLinePositionInfo = false,
+            ui64 bufferSizeLimit = 64 << 10,
+            bool consumeUntilEof = true,
             TMaybe<ui64> memoryLimit = Nothing());
 
         ~TYsonParser();
diff --git a/library/cpp/yson/parser_detail.h b/library/cpp/yson/parser_detail.h
index 9d8315dd60..fb72affed5 100644
--- a/library/cpp/yson/parser_detail.h
+++ b/library/cpp/yson/parser_detail.h
@@ -12,11 +12,17 @@ namespace NYson {
         private:
             using TBase = TLexerBase<TBlockStream, EnableLinePositionInfo>;
             TConsumer* Consumer;
+            bool ConsumeUntilEof_;
 
         public:
-            TParser(const TBlockStream& blockStream, TConsumer* consumer, TMaybe<ui64> memoryLimit)
-                : TBase(blockStream, memoryLimit)
-                , Consumer(consumer)
+            TParser(
+                const TBlockStream& blockStream,
+                TConsumer* consumer,
+                bool consumeUntilEof,
+                TMaybe<ui64> memoryLimit)
+                    : TBase(blockStream, memoryLimit)
+                    , Consumer(consumer)
+                    , ConsumeUntilEof_(consumeUntilEof)
             {
             }
 
@@ -38,11 +44,13 @@ namespace NYson {
                         Y_ABORT("unreachable");
                 }
 
-                while (!(TBase::IsFinished() && TBase::IsEmpty())) {
-                    if (TBase::template SkipSpaceAndGetChar<true>() != EndSymbol) {
-                        ythrow TYsonException() << "Stray '" << (*TBase::Begin()) << "' found";
-                    } else if (!TBase::IsEmpty()) {
-                        TBase::Advance(1);
+                if (ConsumeUntilEof_) {
+                    while (!(TBase::IsFinished() && TBase::IsEmpty())) {
+                        if (TBase::template SkipSpaceAndGetChar<true>() != EndSymbol) {
+                            ythrow TYsonException() << "Stray '" << (*TBase::Begin()) << "' found";
+                        } else if (!TBase::IsEmpty()) {
+                            TBase::Advance(1);
+                        }
                     }
                 }
             }
@@ -308,14 +316,15 @@ namespace NYson {
         NYT::NYson::IYsonConsumer* consumer,
         EYsonType parsingMode,
         bool enableLinePositionInfo,
+        bool consumeUntilEof,
         TMaybe<ui64> memoryLimit) {
         if (enableLinePositionInfo) {
             using TImpl = NDetail::TParser<TConsumer, TBlockStream, true>;
-            TImpl impl(blockStream, consumer, memoryLimit);
+            TImpl impl(blockStream, consumer, consumeUntilEof, memoryLimit);
             impl.DoParse(parsingMode);
         } else {
             using TImpl = NDetail::TParser<TConsumer, TBlockStream, false>;
-            TImpl impl(blockStream, consumer, memoryLimit);
+            TImpl impl(blockStream, consumer, consumeUntilEof, memoryLimit);
             impl.DoParse(parsingMode);
         }
     }
@@ -337,7 +346,7 @@ namespace NYson {
 
     public:
         TStatelessYsonParserImpl(TConsumer* consumer, TMaybe<ui64> memoryLimit)
-            : Parser(TStringReader(), consumer, memoryLimit)
+            : Parser(TStringReader(), consumer, true, memoryLimit)
         {
         }
 
@@ -365,7 +374,7 @@ namespace NYson {
 
     public:
         TYsonListParserImpl(const TBlockStream& blockStream, TConsumer* consumer, TMaybe<ui64> memoryLimit)
-            : Parser(blockStream, consumer, memoryLimit)
+            : Parser(blockStream, consumer, true, memoryLimit)
         {
         }
 
-- 
cgit v1.2.3


From e6558ec33cb53027bbab8d213015113b7f15be4e Mon Sep 17 00:00:00 2001
From: danilalexeev <danilalexeev@yandex-team.com>
Date: Mon, 15 Apr 2024 11:23:05 +0300
Subject: Cosmetics f10145b8872b6c43c4808c82c377ca34feb7d015

---
 yt/yt/client/hive/public.h              | 2 +-
 yt/yt/core/rpc/dynamic_channel_pool.cpp | 4 ++--
 yt/yt/core/rpc/peer_discovery.cpp       | 2 +-
 yt/yt/core/rpc/peer_discovery.h         | 2 +-
 4 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/yt/yt/client/hive/public.h b/yt/yt/client/hive/public.h
index 5143ae3c79..0c8d010ecc 100644
--- a/yt/yt/client/hive/public.h
+++ b/yt/yt/client/hive/public.h
@@ -34,7 +34,7 @@ DECLARE_REFCOUNTED_STRUCT(ITransactionParticipant)
 YT_DEFINE_ERROR_ENUM(
     ((MailboxNotCreatedYet)    (2200))
     ((ParticipantUnregistered) (2201))
-    ((EntryNotFound)           (2202))
+    ((TimeEntryNotFound)           (2202))
 );
 
 ////////////////////////////////////////////////////////////////////////////////
diff --git a/yt/yt/core/rpc/dynamic_channel_pool.cpp b/yt/yt/core/rpc/dynamic_channel_pool.cpp
index cc404497a3..efe0fbb152 100644
--- a/yt/yt/core/rpc/dynamic_channel_pool.cpp
+++ b/yt/yt/core/rpc/dynamic_channel_pool.cpp
@@ -848,7 +848,7 @@ private:
         ViablePeerRegistry_->UnregisterPeer(address);
     }
 
-    TError MaybeTransformChannelError(TError error)
+    TError TransformChannelError(TError error)
     {
         auto guard = ReaderGuard(SpinLock_);
 
@@ -888,7 +888,7 @@ private:
             BIND(&IsChannelFailureError),
             BIND([this_ = MakeWeak(this)] (TError error) {
                 if (auto strongThis = this_.Lock()) {
-                    return strongThis->MaybeTransformChannelError(std::move(error));
+                    return strongThis->TransformChannelError(std::move(error));
                 } else {
                     return error;
                 }
diff --git a/yt/yt/core/rpc/peer_discovery.cpp b/yt/yt/core/rpc/peer_discovery.cpp
index 24595961e6..3b4ab1549d 100644
--- a/yt/yt/core/rpc/peer_discovery.cpp
+++ b/yt/yt/core/rpc/peer_discovery.cpp
@@ -43,7 +43,7 @@ private:
     TPeerDiscoveryResponse ConvertResponse(const TIntrusivePtr<TTypedClientResponse<NProto::TRspDiscover>>& rsp)
     {
         if (Hook_) {
-            Hook_->OnResponse(rsp.Get());
+            Hook_->HandleResponse(rsp.Get());
         }
 
         return TPeerDiscoveryResponse{
diff --git a/yt/yt/core/rpc/peer_discovery.h b/yt/yt/core/rpc/peer_discovery.h
index 091a31bd35..09a4149dc9 100644
--- a/yt/yt/core/rpc/peer_discovery.h
+++ b/yt/yt/core/rpc/peer_discovery.h
@@ -10,7 +10,7 @@ struct IDiscoverRequestHook
     : public TRefCounted
 {
     virtual void EnrichRequest(NProto::TReqDiscover* request) const = 0;
-    virtual void OnResponse(NProto::TRspDiscover* response) const = 0;
+    virtual void HandleResponse(NProto::TRspDiscover* response) const = 0;
 };
 
 DEFINE_REFCOUNTED_TYPE(IDiscoverRequestHook);
-- 
cgit v1.2.3


From 3920f7b2a13f36e695cbac980f817cc036c9f2c7 Mon Sep 17 00:00:00 2001
From: thegeorg <thegeorg@yandex-team.com>
Date: Mon, 15 Apr 2024 12:30:02 +0300
Subject: Update contrib/restricted/boost/asio to 1.72.0
 e5cceab5ed2f7b11cd8f2f777ab3be91910b28a0

---
 .../asio/include/boost/asio/detail/config.hpp      | 40 ++++++++++++++++++++++
 .../asio/include/boost/asio/detail/type_traits.hpp |  3 ++
 contrib/restricted/boost/asio/ya.make              |  4 +--
 3 files changed, 45 insertions(+), 2 deletions(-)

diff --git a/contrib/restricted/boost/asio/include/boost/asio/detail/config.hpp b/contrib/restricted/boost/asio/include/boost/asio/detail/config.hpp
index 9063429c96..7bda147cb8 100644
--- a/contrib/restricted/boost/asio/include/boost/asio/detail/config.hpp
+++ b/contrib/restricted/boost/asio/include/boost/asio/detail/config.hpp
@@ -314,6 +314,46 @@
 # endif // !defined(BOOST_ASIO_DISABLE_ALIAS_TEMPLATES)
 #endif // !defined(BOOST_ASIO_HAS_ALIAS_TEMPLATES)
 
+// Support return type deduction on compilers known to allow it.
+#if !defined(BOOST_ASIO_HAS_RETURN_TYPE_DEDUCTION)
+# if !defined(BOOST_ASIO_DISABLE_RETURN_TYPE_DEDUCTION)
+#  if defined(__clang__)
+#   if __has_feature(__cxx_return_type_deduction__)
+#    define BOOST_ASIO_HAS_RETURN_TYPE_DEDUCTION 1
+#   endif // __has_feature(__cxx_alias_templates__)
+#  elif (__cplusplus >= 201402)
+#   define BOOST_ASIO_HAS_RETURN_TYPE_DEDUCTION 1
+#  elif defined(__cpp_return_type_deduction)
+#   if (__cpp_return_type_deduction >= 201304)
+#    define BOOST_ASIO_HAS_RETURN_TYPE_DEDUCTION 1
+#   endif // (__cpp_return_type_deduction >= 201304)
+#  endif // defined(__cpp_return_type_deduction)
+# endif // !defined(BOOST_ASIO_DISABLE_RETURN_TYPE_DEDUCTION)
+#endif // !defined(BOOST_ASIO_HAS_RETURN_TYPE_DEDUCTION)
+
+// Support default function template arguments on compilers known to allow it.
+#if !defined(BOOST_ASIO_HAS_DEFAULT_FUNCTION_TEMPLATE_ARGUMENTS)
+# if !defined(BOOST_ASIO_DISABLE_DEFAULT_FUNCTION_TEMPLATE_ARGUMENTS)
+#  if (__cplusplus >= 201103)
+#   define BOOST_ASIO_HAS_DEFAULT_FUNCTION_TEMPLATE_ARGUMENTS 1
+#  endif // (__cplusplus >= 201103)
+# endif // !defined(BOOST_ASIO_DISABLE_DEFAULT_FUNCTION_TEMPLATE_ARGUMENTS)
+#endif // !defined(BOOST_ASIO_HAS_DEFAULT_FUNCTION_TEMPLATE_ARGUMENTS)
+
+// Support concepts on compilers known to allow them.
+#if !defined(BOOST_ASIO_HAS_CONCEPTS)
+# if !defined(BOOST_ASIO_DISABLE_CONCEPTS)
+#  if defined(__cpp_concepts)
+#   define BOOST_ASIO_HAS_CONCEPTS 1
+#   if (__cpp_concepts >= 201707)
+#    define BOOST_ASIO_CONCEPT concept
+#   else // (__cpp_concepts >= 201707)
+#    define BOOST_ASIO_CONCEPT concept bool
+#   endif // (__cpp_concepts >= 201707)
+#  endif // defined(__cpp_concepts)
+# endif // !defined(BOOST_ASIO_DISABLE_CONCEPTS)
+#endif // !defined(BOOST_ASIO_HAS_CONCEPTS)
+
 // Standard library support for system errors.
 # if !defined(BOOST_ASIO_DISABLE_STD_SYSTEM_ERROR)
 #  if defined(__clang__)
diff --git a/contrib/restricted/boost/asio/include/boost/asio/detail/type_traits.hpp b/contrib/restricted/boost/asio/include/boost/asio/detail/type_traits.hpp
index c53a7e745c..59106a2fd7 100644
--- a/contrib/restricted/boost/asio/include/boost/asio/detail/type_traits.hpp
+++ b/contrib/restricted/boost/asio/include/boost/asio/detail/type_traits.hpp
@@ -32,6 +32,7 @@
 # include <boost/type_traits/is_same.hpp>
 # include <boost/type_traits/remove_pointer.hpp>
 # include <boost/type_traits/remove_reference.hpp>
+# include <boost/utility/declval.hpp>
 # include <boost/utility/enable_if.hpp>
 # include <boost/utility/result_of.hpp>
 #endif // defined(BOOST_ASIO_HAS_TYPE_TRAITS)
@@ -43,6 +44,7 @@ namespace asio {
 using std::add_const;
 using std::conditional;
 using std::decay;
+using std::declval;
 using std::enable_if;
 using std::false_type;
 using std::integral_constant;
@@ -68,6 +70,7 @@ template <bool Condition, typename Type = void>
 struct enable_if : boost::enable_if_c<Condition, Type> {};
 using boost::conditional;
 using boost::decay;
+using boost::declval;
 using boost::false_type;
 using boost::integral_constant;
 using boost::is_base_of;
diff --git a/contrib/restricted/boost/asio/ya.make b/contrib/restricted/boost/asio/ya.make
index 00f126b4df..986e4275ae 100644
--- a/contrib/restricted/boost/asio/ya.make
+++ b/contrib/restricted/boost/asio/ya.make
@@ -9,9 +9,9 @@ LICENSE(
 
 LICENSE_TEXTS(.yandex_meta/licenses.list.txt)
 
-VERSION(1.71.0)
+VERSION(1.72.0)
 
-ORIGINAL_SOURCE(https://github.com/boostorg/asio/archive/boost-1.71.0.tar.gz)
+ORIGINAL_SOURCE(https://github.com/boostorg/asio/archive/boost-1.72.0.tar.gz)
 
 PEERDIR(
     contrib/libs/openssl
-- 
cgit v1.2.3


From 308a5871e2748bda7994119f19a90eb82aea851f Mon Sep 17 00:00:00 2001
From: arkady-e1ppa <arkady-e1ppa@yandex-team.com>
Date: Mon, 15 Apr 2024 13:35:00 +0300
Subject: Cosmetics from a bunch of issues
 a52f0a614608d50ea9a6bb53163a952002d8e473

---
 yt/yt/core/misc/error.cpp                  | 4 ++++
 yt/yt/core/misc/intrusive_mpsc_stack-inl.h | 2 +-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/yt/yt/core/misc/error.cpp b/yt/yt/core/misc/error.cpp
index e84b9da94b..0395a0166c 100644
--- a/yt/yt/core/misc/error.cpp
+++ b/yt/yt/core/misc/error.cpp
@@ -355,6 +355,8 @@ private:
 
 ////////////////////////////////////////////////////////////////////////////////
 
+namespace  {
+
 bool IsWhitelisted(const TError& error, const THashSet<TStringBuf>& attributeWhitelist)
 {
     for (const auto& key : error.Attributes().ListKeys()) {
@@ -398,6 +400,8 @@ std::vector<TError>& ApplyWhitelist(std::vector<TError>& errors, const THashSet<
     return errors;
 }
 
+} // namespace
+
 ////////////////////////////////////////////////////////////////////////////////
 
 TError::TErrorOr() = default;
diff --git a/yt/yt/core/misc/intrusive_mpsc_stack-inl.h b/yt/yt/core/misc/intrusive_mpsc_stack-inl.h
index e4c553587e..dcd5682784 100644
--- a/yt/yt/core/misc/intrusive_mpsc_stack-inl.h
+++ b/yt/yt/core/misc/intrusive_mpsc_stack-inl.h
@@ -37,7 +37,7 @@ TSimpleIntrusiveList<T, Tag> TIntrusiveMPSCStack<T, Tag>::PopAll() noexcept
 
     TSimpleIntrusiveList<T, Tag> list;
 
-    while (head != nullptr) {
+    while (head) {
         auto tmp = head;
         head = head->Next;
         tmp->Next = nullptr;
-- 
cgit v1.2.3


From 85399eab38133935d141ad698569062321fde369 Mon Sep 17 00:00:00 2001
From: robot-piglet <robot-piglet@yandex-team.com>
Date: Mon, 15 Apr 2024 17:28:00 +0300
Subject: Intermediate changes

---
 yt/yt/client/unittests/replication_progress_ut.cpp | 32 +++++++++++-----------
 1 file changed, 16 insertions(+), 16 deletions(-)

diff --git a/yt/yt/client/unittests/replication_progress_ut.cpp b/yt/yt/client/unittests/replication_progress_ut.cpp
index 8637c82884..5ef0cf5265 100644
--- a/yt/yt/client/unittests/replication_progress_ut.cpp
+++ b/yt/yt/client/unittests/replication_progress_ut.cpp
@@ -406,14 +406,14 @@ INSTANTIATE_TEST_SUITE_P(
 
 ////////////////////////////////////////////////////////////////////////////////
 
-class TReplicationProgressSerialization
+class TReplicationProgressSerializationTest
     : public ::testing::Test
     , public ::testing::WithParamInterface<std::tuple<
         const char*,
         const char*>>
 { };
 
-TEST_P(TReplicationProgressSerialization, Simple)
+TEST_P(TReplicationProgressSerializationTest, Simple)
 {
     const auto& params = GetParam();
     auto progress = ConvertTo<TReplicationProgress>(TYsonStringBuf(std::get<0>(params)));
@@ -428,8 +428,8 @@ TEST_P(TReplicationProgressSerialization, Simple)
 }
 
 INSTANTIATE_TEST_SUITE_P(
-    TReplicationProgressSerialization,
-    TReplicationProgressSerialization,
+    TReplicationProgressSerializationTest,
+    TReplicationProgressSerializationTest,
     ::testing::Values(
         std::tuple(
             "{segments=[{lower_key=[];timestamp=1}];upper_key=[<type=max>#]}",
@@ -448,7 +448,7 @@ INSTANTIATE_TEST_SUITE_P(
 
 ////////////////////////////////////////////////////////////////////////////////
 
-class TReplicationProgressProjectedSerialization
+class TReplicationProgressProjectedSerializationTest
     : public ::testing::Test
     , public ::testing::WithParamInterface<std::tuple<
         const char*,
@@ -457,7 +457,7 @@ class TReplicationProgressProjectedSerialization
         const char*>>
 { };
 
-TEST_P(TReplicationProgressProjectedSerialization, Simple)
+TEST_P(TReplicationProgressProjectedSerializationTest, Simple)
 {
     const auto& params = GetParam();
     auto progress = ConvertTo<TReplicationProgress>(TYsonStringBuf(std::get<0>(params)));
@@ -478,8 +478,8 @@ TEST_P(TReplicationProgressProjectedSerialization, Simple)
 }
 
 INSTANTIATE_TEST_SUITE_P(
-    TReplicationProgressProjectedSerialization,
-    TReplicationProgressProjectedSerialization,
+    TReplicationProgressProjectedSerializationTest,
+    TReplicationProgressProjectedSerializationTest,
     ::testing::Values(
         std::tuple(
             "{segments=[{lower_key=[];timestamp=1}];upper_key=[<type=max>#]}",
@@ -536,7 +536,7 @@ INSTANTIATE_TEST_SUITE_P(
 
 ////////////////////////////////////////////////////////////////////////////////
 
-class TReplicationProgressComputeReplicationProgressLag
+class TReplicationProgressComputeReplicationProgressLagTest
     : public ::testing::Test
     , public ::testing::WithParamInterface<std::tuple<
         const char*,
@@ -544,7 +544,7 @@ class TReplicationProgressComputeReplicationProgressLag
         TDuration>>
 { };
 
-TEST_P(TReplicationProgressComputeReplicationProgressLag, Simple)
+TEST_P(TReplicationProgressComputeReplicationProgressLagTest, Simple)
 {
     const auto& params = GetParam();
     auto maxProgress = ConvertTo<TReplicationProgress>(TYsonStringBuf(std::get<0>(params)));
@@ -560,8 +560,8 @@ TEST_P(TReplicationProgressComputeReplicationProgressLag, Simple)
 }
 
 INSTANTIATE_TEST_SUITE_P(
-    TReplicationProgressComputeReplicationProgressLag,
-    TReplicationProgressComputeReplicationProgressLag,
+    TReplicationProgressComputeReplicationProgressLagTest,
+    TReplicationProgressComputeReplicationProgressLagTest,
     ::testing::Values(
         std::tuple(
             "{segments=[{lower_key=[];timestamp=1}];upper_key=[<type=max>#]}",
@@ -635,7 +635,7 @@ INSTANTIATE_TEST_SUITE_P(
 
 ////////////////////////////////////////////////////////////////////////////////
 
-class TReplicationProgressBuildMax
+class TReplicationProgressBuildMaxTest
     : public ::testing::Test
     , public ::testing::WithParamInterface<std::tuple<
         const char*,
@@ -643,7 +643,7 @@ class TReplicationProgressBuildMax
         const char*>>
 { };
 
-TEST_P(TReplicationProgressBuildMax, Simple)
+TEST_P(TReplicationProgressBuildMaxTest, Simple)
 {
     const auto& params = GetParam();
     auto progress = ConvertTo<TReplicationProgress>(TYsonStringBuf(std::get<0>(params)));
@@ -666,8 +666,8 @@ TEST_P(TReplicationProgressBuildMax, Simple)
 }
 
 INSTANTIATE_TEST_SUITE_P(
-    TReplicationProgressBuildMax,
-    TReplicationProgressBuildMax,
+    TReplicationProgressBuildMaxTest,
+    TReplicationProgressBuildMaxTest,
     ::testing::Values(
         std::tuple(
             "{segments=[{lower_key=[];timestamp=1}];upper_key=[<type=max>#]}",
-- 
cgit v1.2.3


From d7698e9e5e08496fbd0059d8f9b2341c9b9461d6 Mon Sep 17 00:00:00 2001
From: don-dron <don-dron@yandex-team.com>
Date: Mon, 15 Apr 2024 17:28:02 +0300
Subject: YT-21472: Fixes after review 6645437824fbb78fd206abdf2a06f385ea541cc0

---
 yt/yt/core/misc/error.cpp           | 29 ++++++++++++-----------------
 yt/yt/core/misc/error.h             |  2 +-
 yt/yt/core/rpc/unittests/rpc_ut.cpp | 12 ++++++------
 3 files changed, 19 insertions(+), 24 deletions(-)

diff --git a/yt/yt/core/misc/error.cpp b/yt/yt/core/misc/error.cpp
index 0395a0166c..6aabbb1ecc 100644
--- a/yt/yt/core/misc/error.cpp
+++ b/yt/yt/core/misc/error.cpp
@@ -942,35 +942,30 @@ void TError::Load(TStreamLoadContext& context)
 
 std::optional<TError> TError::FindMatching(TErrorCode code) const
 {
-    if (!Impl_) {
-        return {};
-    }
-
-    if (GetCode() == code) {
-        return *this;
-    }
-
-    for (const auto& innerError : InnerErrors()) {
-        if (auto innerResult = innerError.FindMatching(code)) {
-            return innerResult;
-        }
-    }
-
-    return {};
+    return FindMatching([&] (TErrorCode errorCode) {
+        return code == errorCode;
+    });
 }
 
 std::optional<TError> TError::FindMatching(const THashSet<TErrorCode>& codes) const
+{
+    return FindMatching([&] (TErrorCode code) {
+        return codes.contains(code);
+    });
+}
+
+std::optional<TError> TError::FindMatching(std::function<bool(TErrorCode)> filter) const
 {
     if (!Impl_) {
         return {};
     }
 
-    if (codes.contains(GetCode())) {
+    if (filter(GetCode())) {
         return *this;
     }
 
     for (const auto& innerError : InnerErrors()) {
-        if (auto innerResult = innerError.FindMatching(codes)) {
+        if (auto innerResult = innerError.FindMatching(filter)) {
             return innerResult;
         }
     }
diff --git a/yt/yt/core/misc/error.h b/yt/yt/core/misc/error.h
index f3783aab7d..c04b2f0a9c 100644
--- a/yt/yt/core/misc/error.h
+++ b/yt/yt/core/misc/error.h
@@ -188,8 +188,8 @@ public:
 
     void ThrowOnError() const;
 
+    std::optional<TError> FindMatching(std::function<bool(TErrorCode)> filter) const;
     std::optional<TError> FindMatching(TErrorCode code) const;
-
     std::optional<TError> FindMatching(const THashSet<TErrorCode>& codes) const;
 
     template <class... TArgs>
diff --git a/yt/yt/core/rpc/unittests/rpc_ut.cpp b/yt/yt/core/rpc/unittests/rpc_ut.cpp
index bf4a23928c..c1525b0a8b 100644
--- a/yt/yt/core/rpc/unittests/rpc_ut.cpp
+++ b/yt/yt/core/rpc/unittests/rpc_ut.cpp
@@ -529,7 +529,7 @@ TYPED_TEST(TNotGrpcTest, TrackedRegularAttachments)
     // header + body = 110 bytes.
     // attachments = 22 bytes.
     // sum is 4228 bytes.
-    EXPECT_TRUE(4228 + 32768 <= memoryUsageTracker->GetTotalUsage());
+    EXPECT_GE(memoryUsageTracker->GetTotalUsage(), 4228 + 32768);
     EXPECT_EQ(3u, attachments.size());
     EXPECT_EQ("Hello_",     StringFromSharedRef(attachments[0]));
     EXPECT_EQ("from_",      StringFromSharedRef(attachments[1]));
@@ -595,9 +595,9 @@ TYPED_TEST(TNotGrpcTest, Compression)
     // attachmentStrings[1].size() = 36 * 2 bytes from decoder.
     // attachmentStrings[2].size() = 90 * 2 bytes from decoder.
     // sum is 4591 bytes.
-    EXPECT_TRUE(4591 + 32768 <= memoryUsageTracker->GetTotalUsage());
+    EXPECT_GE(memoryUsageTracker->GetTotalUsage(), 4591 + 32768);
     EXPECT_TRUE(rsp->message() == message);
-    EXPECT_TRUE(rsp->GetResponseMessage().Size() >= 2);
+    EXPECT_GE(rsp->GetResponseMessage().Size(), static_cast<size_t>(2));
     const auto& serializedResponseBody = SerializeProtoToRefWithCompression(*rsp, responseCodecId);
     const auto& compressedResponseBody = rsp->GetResponseMessage()[1];
     EXPECT_TRUE(TRef::AreBitwiseEqual(compressedResponseBody, serializedResponseBody));
@@ -846,7 +846,7 @@ TYPED_TEST(TNotGrpcTest, MemoryTracking)
 
         // 1261568 = 32768 + 1228800 = 32768 + 4096 * 300 + 300 * 110 (header + body).
         // 32768 - socket buffers, 4096 - default size per request.
-        EXPECT_TRUE(rpcUsage >= 1294568);
+        EXPECT_GE(rpcUsage, 1294568);
     }
 }
 
@@ -866,7 +866,7 @@ TYPED_TEST(TNotGrpcTest, MemoryTrackingMultipleConnections)
         // 11059200 / 300 = 36974 = 32768 + 4096 + 110 (header + body).
         // 4 KB - stub for request.
         // See NYT::NBus::TPacketDecoder::TChunkedMemoryTrackingAllocator::Allocate.
-        EXPECT_TRUE(11092200 <= memoryUsageTracker->GetTotalUsage());
+        EXPECT_GE(memoryUsageTracker->GetTotalUsage(), 11092200);
     }
 }
 
@@ -922,7 +922,7 @@ TYPED_TEST(TNotGrpcTest, MemoryOvercommit)
         // default stub = 4096.
         // header + body = 110 bytes.
         // attachments = 6_KB  kbytes.
-        EXPECT_TRUE(rpcUsage >= 32768 + 4096 + 6144 + 110);
+        EXPECT_GE(rpcUsage, 32768 + 4096 + 6144 + 110);
     }
 }
 
-- 
cgit v1.2.3


From 3c122523a62d9e7e6a1ce8e0fcd1282b373aca34 Mon Sep 17 00:00:00 2001
From: thegeorg <thegeorg@yandex-team.com>
Date: Mon, 15 Apr 2024 18:14:20 +0300
Subject: Update contrib/restricted/boost/asio to 1.73.0
 fca1c123b7c6a5499dee6160cdf500cc7a7a2188

---
 .../boost/asio/include/boost/asio/buffer.hpp       |   2 +-
 .../asio/include/boost/asio/detail/array_fwd.hpp   |   2 +-
 .../asio/include/boost/asio/detail/config.hpp      | 105 +++++++++++----------
 .../asio/include/boost/asio/detail/functional.hpp  |   2 +-
 .../boost/asio/detail/is_buffer_sequence.hpp       |   2 +-
 .../asio/include/boost/asio/detail/memory.hpp      |   2 +-
 .../asio/include/boost/asio/detail/pop_options.hpp |   8 +-
 .../include/boost/asio/detail/push_options.hpp     |   8 +-
 .../asio/include/boost/asio/detail/string_view.hpp |   2 +-
 .../include/boost/asio/detail/throw_exception.hpp  |   2 +-
 .../asio/include/boost/asio/detail/type_traits.hpp |   6 +-
 contrib/restricted/boost/asio/ya.make              |   4 +-
 12 files changed, 75 insertions(+), 70 deletions(-)

diff --git a/contrib/restricted/boost/asio/include/boost/asio/buffer.hpp b/contrib/restricted/boost/asio/include/boost/asio/buffer.hpp
index 1f12cac22d..90e10ed092 100644
--- a/contrib/restricted/boost/asio/include/boost/asio/buffer.hpp
+++ b/contrib/restricted/boost/asio/include/boost/asio/buffer.hpp
@@ -2,7 +2,7 @@
 // buffer.hpp
 // ~~~~~~~~~~
 //
-// Copyright (c) 2003-2019 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/contrib/restricted/boost/asio/include/boost/asio/detail/array_fwd.hpp b/contrib/restricted/boost/asio/include/boost/asio/detail/array_fwd.hpp
index 25a0c61496..ac2dd3ff7e 100644
--- a/contrib/restricted/boost/asio/include/boost/asio/detail/array_fwd.hpp
+++ b/contrib/restricted/boost/asio/include/boost/asio/detail/array_fwd.hpp
@@ -2,7 +2,7 @@
 // detail/array_fwd.hpp
 // ~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2019 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/contrib/restricted/boost/asio/include/boost/asio/detail/config.hpp b/contrib/restricted/boost/asio/include/boost/asio/detail/config.hpp
index 7bda147cb8..85a7023a2c 100644
--- a/contrib/restricted/boost/asio/include/boost/asio/detail/config.hpp
+++ b/contrib/restricted/boost/asio/include/boost/asio/detail/config.hpp
@@ -2,7 +2,7 @@
 // detail/config.hpp
 // ~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2019 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -98,9 +98,9 @@
 #  endif // defined(__clang__)
 #  if defined(__GNUC__)
 #   if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 5)) || (__GNUC__ > 4)
-#    if defined(__GXX_EXPERIMENTAL_CXX0X__)
+#    if (__cplusplus >= 201103) || defined(__GXX_EXPERIMENTAL_CXX0X__)
 #     define BOOST_ASIO_HAS_MOVE 1
-#    endif // defined(__GXX_EXPERIMENTAL_CXX0X__)
+#    endif // (__cplusplus >= 201103) || defined(__GXX_EXPERIMENTAL_CXX0X__)
 #   endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 5)) || (__GNUC__ > 4)
 #  endif // defined(__GNUC__)
 #  if defined(BOOST_ASIO_MSVC)
@@ -168,9 +168,9 @@
 #  endif // defined(__clang__)
 #  if defined(__GNUC__)
 #   if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 4)
-#    if defined(__GXX_EXPERIMENTAL_CXX0X__)
+#    if (__cplusplus >= 201103) || defined(__GXX_EXPERIMENTAL_CXX0X__)
 #     define BOOST_ASIO_HAS_VARIADIC_TEMPLATES 1
-#    endif // defined(__GXX_EXPERIMENTAL_CXX0X__)
+#    endif // (__cplusplus >= 201103) || defined(__GXX_EXPERIMENTAL_CXX0X__)
 #   endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 4)
 #  endif // defined(__GNUC__)
 #  if defined(BOOST_ASIO_MSVC)
@@ -185,9 +185,9 @@
 #if !defined(BOOST_ASIO_DELETED)
 # if defined(__GNUC__)
 #  if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)) || (__GNUC__ > 4)
-#   if defined(__GXX_EXPERIMENTAL_CXX0X__)
+#   if (__cplusplus >= 201103) || defined(__GXX_EXPERIMENTAL_CXX0X__)
 #    define BOOST_ASIO_DELETED = delete
-#   endif // defined(__GXX_EXPERIMENTAL_CXX0X__)
+#   endif // (__cplusplus >= 201103) || defined(__GXX_EXPERIMENTAL_CXX0X__)
 #  endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)) || (__GNUC__ > 4)
 # endif // defined(__GNUC__)
 # if defined(__clang__)
@@ -215,9 +215,9 @@
 #  endif // defined(__clang__)
 #  if defined(__GNUC__)
 #   if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 6)) || (__GNUC__ > 4)
-#    if defined(__GXX_EXPERIMENTAL_CXX0X__)
+#    if (__cplusplus >= 201103) || defined(__GXX_EXPERIMENTAL_CXX0X__)
 #     define BOOST_ASIO_HAS_CONSTEXPR 1
-#    endif // defined(__GXX_EXPERIMENTAL_CXX0X__)
+#    endif // (__cplusplus >= 201103) || defined(__GXX_EXPERIMENTAL_CXX0X__)
 #   endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 6)) || (__GNUC__ > 4)
 #  endif // defined(__GNUC__)
 #  if defined(BOOST_ASIO_MSVC)
@@ -248,10 +248,10 @@
 #   endif // __has_feature(__cxx_noexcept__)
 #  elif defined(__GNUC__)
 #   if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)) || (__GNUC__ > 4)
-#    if defined(__GXX_EXPERIMENTAL_CXX0X__)
+#    if (__cplusplus >= 201103) || defined(__GXX_EXPERIMENTAL_CXX0X__)
 #      define BOOST_ASIO_NOEXCEPT noexcept(true)
 #      define BOOST_ASIO_NOEXCEPT_OR_NOTHROW noexcept(true)
-#    endif // defined(__GXX_EXPERIMENTAL_CXX0X__)
+#    endif // (__cplusplus >= 201103) || defined(__GXX_EXPERIMENTAL_CXX0X__)
 #   endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)) || (__GNUC__ > 4)
 #  elif defined(BOOST_ASIO_MSVC)
 #   if (_MSC_VER >= 1900)
@@ -278,9 +278,9 @@
 #  endif // defined(__clang__)
 #  if defined(__GNUC__)
 #   if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 6)) || (__GNUC__ > 4)
-#    if defined(__GXX_EXPERIMENTAL_CXX0X__)
+#    if (__cplusplus >= 201103) || defined(__GXX_EXPERIMENTAL_CXX0X__)
 #     define BOOST_ASIO_HAS_DECLTYPE 1
-#    endif // defined(__GXX_EXPERIMENTAL_CXX0X__)
+#    endif // (__cplusplus >= 201103) || defined(__GXX_EXPERIMENTAL_CXX0X__)
 #   endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 6)) || (__GNUC__ > 4)
 #  endif // defined(__GNUC__)
 #  if defined(BOOST_ASIO_MSVC)
@@ -301,9 +301,9 @@
 #  endif // defined(__clang__)
 #  if defined(__GNUC__)
 #   if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)) || (__GNUC__ > 4)
-#    if defined(__GXX_EXPERIMENTAL_CXX0X__)
+#    if (__cplusplus >= 201103) || defined(__GXX_EXPERIMENTAL_CXX0X__)
 #     define BOOST_ASIO_HAS_ALIAS_TEMPLATES 1
-#    endif // defined(__GXX_EXPERIMENTAL_CXX0X__)
+#    endif // (__cplusplus >= 201103) || defined(__GXX_EXPERIMENTAL_CXX0X__)
 #   endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)) || (__GNUC__ > 4)
 #  endif // defined(__GNUC__)
 #  if defined(BOOST_ASIO_MSVC)
@@ -367,9 +367,9 @@
 #  endif // defined(__clang__)
 #  if defined(__GNUC__)
 #   if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 6)) || (__GNUC__ > 4)
-#    if defined(__GXX_EXPERIMENTAL_CXX0X__)
+#    if (__cplusplus >= 201103) || defined(__GXX_EXPERIMENTAL_CXX0X__)
 #     define BOOST_ASIO_HAS_STD_SYSTEM_ERROR 1
-#    endif // defined(__GXX_EXPERIMENTAL_CXX0X__)
+#    endif // (__cplusplus >= 201103) || defined(__GXX_EXPERIMENTAL_CXX0X__)
 #   endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 6)) || (__GNUC__ > 4)
 #  endif // defined(__GNUC__)
 #  if defined(BOOST_ASIO_MSVC)
@@ -389,9 +389,9 @@
 #  endif // __has_feature(__cxx_noexcept__)
 # elif defined(__GNUC__)
 #  if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)) || (__GNUC__ > 4)
-#   if defined(__GXX_EXPERIMENTAL_CXX0X__)
+#   if (__cplusplus >= 201103) || defined(__GXX_EXPERIMENTAL_CXX0X__)
 #     define BOOST_ASIO_ERROR_CATEGORY_NOEXCEPT noexcept(true)
-#   endif // defined(__GXX_EXPERIMENTAL_CXX0X__)
+#   endif // (__cplusplus >= 201103) || defined(__GXX_EXPERIMENTAL_CXX0X__)
 #  endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)) || (__GNUC__ > 4)
 # elif defined(BOOST_ASIO_MSVC)
 #  if (_MSC_VER >= 1900)
@@ -417,9 +417,9 @@
 #  endif // defined(__clang__)
 #  if defined(__GNUC__)
 #   if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 4)
-#    if defined(__GXX_EXPERIMENTAL_CXX0X__)
+#    if (__cplusplus >= 201103) || defined(__GXX_EXPERIMENTAL_CXX0X__)
 #     define BOOST_ASIO_HAS_STD_ARRAY 1
-#    endif // defined(__GXX_EXPERIMENTAL_CXX0X__)
+#    endif // (__cplusplus >= 201103) || defined(__GXX_EXPERIMENTAL_CXX0X__)
 #   endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 4)
 #  endif // defined(__GNUC__)
 #  if defined(BOOST_ASIO_MSVC)
@@ -442,9 +442,9 @@
 #  endif // defined(__clang__)
 #  if defined(__GNUC__)
 #   if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 4)
-#    if defined(__GXX_EXPERIMENTAL_CXX0X__)
+#    if (__cplusplus >= 201103) || defined(__GXX_EXPERIMENTAL_CXX0X__)
 #     define BOOST_ASIO_HAS_STD_SHARED_PTR 1
-#    endif // defined(__GXX_EXPERIMENTAL_CXX0X__)
+#    endif // (__cplusplus >= 201103) || defined(__GXX_EXPERIMENTAL_CXX0X__)
 #   endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 4)
 #  endif // defined(__GNUC__)
 #  if defined(BOOST_ASIO_MSVC)
@@ -467,9 +467,9 @@
 #  endif // defined(__clang__)
 #  if defined(__GNUC__)
 #   if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 6)) || (__GNUC__ > 4)
-#    if defined(__GXX_EXPERIMENTAL_CXX0X__)
+#    if (__cplusplus >= 201103) || defined(__GXX_EXPERIMENTAL_CXX0X__)
 #     define BOOST_ASIO_HAS_STD_ALLOCATOR_ARG 1
-#    endif // defined(__GXX_EXPERIMENTAL_CXX0X__)
+#    endif // (__cplusplus >= 201103) || defined(__GXX_EXPERIMENTAL_CXX0X__)
 #   endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 6)) || (__GNUC__ > 4)
 #  endif // defined(__GNUC__)
 #  if defined(BOOST_ASIO_MSVC)
@@ -500,9 +500,9 @@
 #  endif // defined(__clang__)
 #  if defined(__GNUC__)
 #   if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)) || (__GNUC__ > 4)
-#    if defined(__GXX_EXPERIMENTAL_CXX0X__)
+#    if (__cplusplus >= 201103) || defined(__GXX_EXPERIMENTAL_CXX0X__)
 #     define BOOST_ASIO_HAS_STD_ATOMIC 1
-#    endif // defined(__GXX_EXPERIMENTAL_CXX0X__)
+#    endif // (__cplusplus >= 201103) || defined(__GXX_EXPERIMENTAL_CXX0X__)
 #   endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)) || (__GNUC__ > 4)
 #  endif // defined(__GNUC__)
 #  if defined(BOOST_ASIO_MSVC)
@@ -529,12 +529,12 @@
 #  endif // defined(__clang__)
 #  if defined(__GNUC__)
 #   if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 6)) || (__GNUC__ > 4)
-#    if defined(__GXX_EXPERIMENTAL_CXX0X__)
+#    if (__cplusplus >= 201103) || defined(__GXX_EXPERIMENTAL_CXX0X__)
 #     define BOOST_ASIO_HAS_STD_CHRONO 1
 #     if ((__GNUC__ == 4) && (__GNUC_MINOR__ == 6))
 #      define BOOST_ASIO_HAS_STD_CHRONO_MONOTONIC_CLOCK 1
 #     endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ == 6))
-#    endif // defined(__GXX_EXPERIMENTAL_CXX0X__)
+#    endif // (__cplusplus >= 201103) || defined(__GXX_EXPERIMENTAL_CXX0X__)
 #   endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 6)) || (__GNUC__ > 4)
 #  endif // defined(__GNUC__)
 #  if defined(BOOST_ASIO_MSVC)
@@ -582,9 +582,9 @@
 #  endif // defined(__clang__)
 #  if defined(__GNUC__)
 #   if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 6)) || (__GNUC__ > 4)
-#    if defined(__GXX_EXPERIMENTAL_CXX0X__)
+#    if (__cplusplus >= 201103) || defined(__GXX_EXPERIMENTAL_CXX0X__)
 #     define BOOST_ASIO_HAS_STD_ADDRESSOF 1
-#    endif // defined(__GXX_EXPERIMENTAL_CXX0X__)
+#    endif // (__cplusplus >= 201103) || defined(__GXX_EXPERIMENTAL_CXX0X__)
 #   endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 6)) || (__GNUC__ > 4)
 #  endif // defined(__GNUC__)
 #  if defined(BOOST_ASIO_MSVC)
@@ -607,9 +607,9 @@
 #  endif // defined(__clang__)
 #  if defined(__GNUC__)
 #   if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 5)) || (__GNUC__ > 4)
-#    if defined(__GXX_EXPERIMENTAL_CXX0X__)
+#    if (__cplusplus >= 201103) || defined(__GXX_EXPERIMENTAL_CXX0X__)
 #     define BOOST_ASIO_HAS_STD_FUNCTION 1
-#    endif // defined(__GXX_EXPERIMENTAL_CXX0X__)
+#    endif // (__cplusplus >= 201103) || defined(__GXX_EXPERIMENTAL_CXX0X__)
 #   endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 5)) || (__GNUC__ > 4)
 #  endif // defined(__GNUC__)
 #  if defined(BOOST_ASIO_MSVC)
@@ -634,9 +634,9 @@
 #  endif // defined(__clang__)
 #  if defined(__GNUC__)
 #   if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 5)) || (__GNUC__ > 4)
-#    if defined(__GXX_EXPERIMENTAL_CXX0X__)
+#    if (__cplusplus >= 201103) || defined(__GXX_EXPERIMENTAL_CXX0X__)
 #     define BOOST_ASIO_HAS_STD_TYPE_TRAITS 1
-#    endif // defined(__GXX_EXPERIMENTAL_CXX0X__)
+#    endif // (__cplusplus >= 201103) || defined(__GXX_EXPERIMENTAL_CXX0X__)
 #   endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 5)) || (__GNUC__ > 4)
 #  endif // defined(__GNUC__)
 #  if defined(BOOST_ASIO_MSVC)
@@ -656,9 +656,9 @@
 #   endif // __has_feature(__cxx_rvalue_references__)
 #  elif defined(__GNUC__)
 #   if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 6)) || (__GNUC__ > 4)
-#    if defined(__GXX_EXPERIMENTAL_CXX0X__)
+#    if (__cplusplus >= 201103) || defined(__GXX_EXPERIMENTAL_CXX0X__)
 #     define BOOST_ASIO_HAS_NULLPTR 1
-#    endif // defined(__GXX_EXPERIMENTAL_CXX0X__)
+#    endif // (__cplusplus >= 201103) || defined(__GXX_EXPERIMENTAL_CXX0X__)
 #   endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 6)) || (__GNUC__ > 4)
 #  endif // defined(__GNUC__)
 #  if defined(BOOST_ASIO_MSVC)
@@ -680,9 +680,9 @@
 #   endif // (__cplusplus >= 201103)
 #  elif defined(__GNUC__)
 #   if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)) || (__GNUC__ > 4)
-#    if defined(__GXX_EXPERIMENTAL_CXX0X__)
+#    if (__cplusplus >= 201103) || defined(__GXX_EXPERIMENTAL_CXX0X__)
 #     define BOOST_ASIO_HAS_CXX11_ALLOCATORS 1
-#    endif // defined(__GXX_EXPERIMENTAL_CXX0X__)
+#    endif // (__cplusplus >= 201103) || defined(__GXX_EXPERIMENTAL_CXX0X__)
 #   endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)) || (__GNUC__ > 4)
 #  endif // defined(__GNUC__)
 #  if defined(BOOST_ASIO_MSVC)
@@ -705,9 +705,9 @@
 #  endif // defined(__clang__)
 #  if defined(__GNUC__)
 #   if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 5)) || (__GNUC__ > 4)
-#    if defined(__GXX_EXPERIMENTAL_CXX0X__)
+#    if (__cplusplus >= 201103) || defined(__GXX_EXPERIMENTAL_CXX0X__)
 #     define BOOST_ASIO_HAS_CSTDINT 1
-#    endif // defined(__GXX_EXPERIMENTAL_CXX0X__)
+#    endif // (__cplusplus >= 201103) || defined(__GXX_EXPERIMENTAL_CXX0X__)
 #   endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 5)) || (__GNUC__ > 4)
 #  endif // defined(__GNUC__)
 #  if defined(BOOST_ASIO_MSVC)
@@ -732,9 +732,9 @@
 #  endif // defined(__clang__)
 #  if defined(__GNUC__)
 #   if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)) || (__GNUC__ > 4)
-#    if defined(__GXX_EXPERIMENTAL_CXX0X__)
+#    if (__cplusplus >= 201103) || defined(__GXX_EXPERIMENTAL_CXX0X__)
 #     define BOOST_ASIO_HAS_STD_THREAD 1
-#    endif // defined(__GXX_EXPERIMENTAL_CXX0X__)
+#    endif // (__cplusplus >= 201103) || defined(__GXX_EXPERIMENTAL_CXX0X__)
 #   endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)) || (__GNUC__ > 4)
 #  endif // defined(__GNUC__)
 #  if defined(BOOST_ASIO_MSVC)
@@ -759,9 +759,9 @@
 #  endif // defined(__clang__)
 #  if defined(__GNUC__)
 #   if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)) || (__GNUC__ > 4)
-#    if defined(__GXX_EXPERIMENTAL_CXX0X__)
+#    if (__cplusplus >= 201103) || defined(__GXX_EXPERIMENTAL_CXX0X__)
 #     define BOOST_ASIO_HAS_STD_MUTEX_AND_CONDVAR 1
-#    endif // defined(__GXX_EXPERIMENTAL_CXX0X__)
+#    endif // (__cplusplus >= 201103) || defined(__GXX_EXPERIMENTAL_CXX0X__)
 #   endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)) || (__GNUC__ > 4)
 #  endif // defined(__GNUC__)
 #  if defined(BOOST_ASIO_MSVC)
@@ -786,9 +786,9 @@
 #  endif // defined(__clang__)
 #  if defined(__GNUC__)
 #   if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)) || (__GNUC__ > 4)
-#    if defined(__GXX_EXPERIMENTAL_CXX0X__)
+#    if (__cplusplus >= 201103) || defined(__GXX_EXPERIMENTAL_CXX0X__)
 #     define BOOST_ASIO_HAS_STD_CALL_ONCE 1
-#    endif // defined(__GXX_EXPERIMENTAL_CXX0X__)
+#    endif // (__cplusplus >= 201103) || defined(__GXX_EXPERIMENTAL_CXX0X__)
 #   endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)) || (__GNUC__ > 4)
 #  endif // defined(__GNUC__)
 #  if defined(BOOST_ASIO_MSVC)
@@ -813,9 +813,9 @@
 #  endif // defined(__clang__)
 #  if defined(__GNUC__)
 #   if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)) || (__GNUC__ > 4)
-#    if defined(__GXX_EXPERIMENTAL_CXX0X__)
+#    if (__cplusplus >= 201103) || defined(__GXX_EXPERIMENTAL_CXX0X__)
 #     define BOOST_ASIO_HAS_STD_FUTURE 1
-#    endif // defined(__GXX_EXPERIMENTAL_CXX0X__)
+#    endif // (__cplusplus >= 201103) || defined(__GXX_EXPERIMENTAL_CXX0X__)
 #   endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)) || (__GNUC__ > 4)
 #  endif // defined(__GNUC__)
 #  if defined(BOOST_ASIO_MSVC)
@@ -903,9 +903,9 @@
 # if !defined(BOOST_ASIO_DISABLE_STD_IOSTREAM_MOVE)
 #  if defined(__GNUC__)
 #   if (__GNUC__ > 4)
-#    if defined(__GXX_EXPERIMENTAL_CXX0X__)
+#    if (__cplusplus >= 201103) || defined(__GXX_EXPERIMENTAL_CXX0X__)
 #     define BOOST_ASIO_HAS_STD_IOSTREAM_MOVE 1
-#    endif // defined(__GXX_EXPERIMENTAL_CXX0X__)
+#    endif // (__cplusplus >= 201103) || defined(__GXX_EXPERIMENTAL_CXX0X__)
 #   endif // (__GNUC__ > 4)
 #  endif // defined(__GNUC__)
 #  if defined(BOOST_ASIO_MSVC)
@@ -938,7 +938,8 @@
 #if !defined(BOOST_ASIO_WINDOWS_APP)
 # if defined(_WIN32_WINNT) && (_WIN32_WINNT >= 0x0603)
 #  include <winapifamily.h>
-#  if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) \
+#  if (WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) \
+       || WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_TV_TITLE)) \
    && !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
 #   define BOOST_ASIO_WINDOWS_APP 1
 #  endif // WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)
diff --git a/contrib/restricted/boost/asio/include/boost/asio/detail/functional.hpp b/contrib/restricted/boost/asio/include/boost/asio/detail/functional.hpp
index 73f06ece21..55657d9bae 100644
--- a/contrib/restricted/boost/asio/include/boost/asio/detail/functional.hpp
+++ b/contrib/restricted/boost/asio/include/boost/asio/detail/functional.hpp
@@ -2,7 +2,7 @@
 // detail/functional.hpp
 // ~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2019 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/contrib/restricted/boost/asio/include/boost/asio/detail/is_buffer_sequence.hpp b/contrib/restricted/boost/asio/include/boost/asio/detail/is_buffer_sequence.hpp
index c52103206c..efe067baed 100644
--- a/contrib/restricted/boost/asio/include/boost/asio/detail/is_buffer_sequence.hpp
+++ b/contrib/restricted/boost/asio/include/boost/asio/detail/is_buffer_sequence.hpp
@@ -2,7 +2,7 @@
 // detail/is_buffer_sequence.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2019 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/contrib/restricted/boost/asio/include/boost/asio/detail/memory.hpp b/contrib/restricted/boost/asio/include/boost/asio/detail/memory.hpp
index a18b4d9acc..0f92263c42 100644
--- a/contrib/restricted/boost/asio/include/boost/asio/detail/memory.hpp
+++ b/contrib/restricted/boost/asio/include/boost/asio/detail/memory.hpp
@@ -2,7 +2,7 @@
 // detail/memory.hpp
 // ~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2019 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/contrib/restricted/boost/asio/include/boost/asio/detail/pop_options.hpp b/contrib/restricted/boost/asio/include/boost/asio/detail/pop_options.hpp
index 3346b96fa4..a2475b47cb 100644
--- a/contrib/restricted/boost/asio/include/boost/asio/detail/pop_options.hpp
+++ b/contrib/restricted/boost/asio/include/boost/asio/detail/pop_options.hpp
@@ -2,7 +2,7 @@
 // detail/pop_options.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2019 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -49,6 +49,8 @@
 #  endif // !defined(BOOST_ASIO_DISABLE_VISIBILITY)
 # endif // !defined(_WIN32) && !defined(__WIN32__) && !defined(WIN32)
 
+# pragma GCC diagnostic pop
+
 #elif defined(__GNUC__)
 
 // GNU C++
@@ -73,9 +75,7 @@
 #  endif // !defined(BOOST_ASIO_DISABLE_VISIBILITY)
 # endif // (__GNUC__ == 4 && __GNUC_MINOR__ >= 1) || (__GNUC__ > 4)
 
-# if (__GNUC__ >= 7)
-#  pragma GCC diagnostic pop
-# endif // (__GNUC__ >= 7)
+# pragma GCC diagnostic pop
 
 #elif defined(__KCC)
 
diff --git a/contrib/restricted/boost/asio/include/boost/asio/detail/push_options.hpp b/contrib/restricted/boost/asio/include/boost/asio/detail/push_options.hpp
index 679ac273c2..05856fd9b9 100644
--- a/contrib/restricted/boost/asio/include/boost/asio/detail/push_options.hpp
+++ b/contrib/restricted/boost/asio/include/boost/asio/detail/push_options.hpp
@@ -2,7 +2,7 @@
 // detail/push_options.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2019 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -51,6 +51,9 @@
 #  endif // !defined(BOOST_ASIO_DISABLE_VISIBILITY)
 # endif // !defined(_WIN32) && !defined(__WIN32__) && !defined(WIN32)
 
+# pragma GCC diagnostic push
+# pragma GCC diagnostic ignored "-Wnon-virtual-dtor"
+
 #elif defined(__GNUC__)
 
 // GNU C++
@@ -77,8 +80,9 @@
 #  endif // !defined(BOOST_ASIO_DISABLE_VISIBILITY)
 # endif // (__GNUC__ == 4 && __GNUC_MINOR__ >= 1) || (__GNUC__ > 4)
 
+# pragma GCC diagnostic push
+# pragma GCC diagnostic ignored "-Wnon-virtual-dtor"
 # if (__GNUC__ >= 7)
-#  pragma GCC diagnostic push
 #  pragma GCC diagnostic ignored "-Wimplicit-fallthrough"
 # endif // (__GNUC__ >= 7)
 
diff --git a/contrib/restricted/boost/asio/include/boost/asio/detail/string_view.hpp b/contrib/restricted/boost/asio/include/boost/asio/detail/string_view.hpp
index 42a405a4dc..0d107fd68e 100644
--- a/contrib/restricted/boost/asio/include/boost/asio/detail/string_view.hpp
+++ b/contrib/restricted/boost/asio/include/boost/asio/detail/string_view.hpp
@@ -2,7 +2,7 @@
 // detail/string_view.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2019 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/contrib/restricted/boost/asio/include/boost/asio/detail/throw_exception.hpp b/contrib/restricted/boost/asio/include/boost/asio/detail/throw_exception.hpp
index 6190419f55..df27ee685b 100644
--- a/contrib/restricted/boost/asio/include/boost/asio/detail/throw_exception.hpp
+++ b/contrib/restricted/boost/asio/include/boost/asio/detail/throw_exception.hpp
@@ -2,7 +2,7 @@
 // detail/throw_exception.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2019 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
diff --git a/contrib/restricted/boost/asio/include/boost/asio/detail/type_traits.hpp b/contrib/restricted/boost/asio/include/boost/asio/detail/type_traits.hpp
index 59106a2fd7..d5a8901c83 100644
--- a/contrib/restricted/boost/asio/include/boost/asio/detail/type_traits.hpp
+++ b/contrib/restricted/boost/asio/include/boost/asio/detail/type_traits.hpp
@@ -2,7 +2,7 @@
 // detail/type_traits.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2019 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -19,7 +19,7 @@
 
 #if defined(BOOST_ASIO_HAS_STD_TYPE_TRAITS)
 # include <type_traits>
-#else // defined(BOOST_ASIO_HAS_TYPE_TRAITS)
+#else // defined(BOOST_ASIO_HAS_STD_TYPE_TRAITS)
 # include <boost/type_traits/add_const.hpp>
 # include <boost/type_traits/conditional.hpp>
 # include <boost/type_traits/decay.hpp>
@@ -35,7 +35,7 @@
 # include <boost/utility/declval.hpp>
 # include <boost/utility/enable_if.hpp>
 # include <boost/utility/result_of.hpp>
-#endif // defined(BOOST_ASIO_HAS_TYPE_TRAITS)
+#endif // defined(BOOST_ASIO_HAS_STD_TYPE_TRAITS)
 
 namespace boost {
 namespace asio {
diff --git a/contrib/restricted/boost/asio/ya.make b/contrib/restricted/boost/asio/ya.make
index 986e4275ae..8f36ad969c 100644
--- a/contrib/restricted/boost/asio/ya.make
+++ b/contrib/restricted/boost/asio/ya.make
@@ -9,9 +9,9 @@ LICENSE(
 
 LICENSE_TEXTS(.yandex_meta/licenses.list.txt)
 
-VERSION(1.72.0)
+VERSION(1.73.0)
 
-ORIGINAL_SOURCE(https://github.com/boostorg/asio/archive/boost-1.72.0.tar.gz)
+ORIGINAL_SOURCE(https://github.com/boostorg/asio/archive/boost-1.73.0.tar.gz)
 
 PEERDIR(
     contrib/libs/openssl
-- 
cgit v1.2.3


From bbefdb67b85b033ec67fef5f5a6ecbc0fc09e53c Mon Sep 17 00:00:00 2001
From: arkady-e1ppa <arkady-e1ppa@yandex-team.com>
Date: Mon, 15 Apr 2024 19:08:59 +0300
Subject: Cosmetics in coroutine 2236dee26f1852bf0fc3f65cb60730e6c5bafe7a

---
 yt/yt/core/concurrency/coroutine.h | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/yt/yt/core/concurrency/coroutine.h b/yt/yt/core/concurrency/coroutine.h
index 275870456b..ab827b2266 100644
--- a/yt/yt/core/concurrency/coroutine.h
+++ b/yt/yt/core/concurrency/coroutine.h
@@ -20,12 +20,6 @@ namespace NYT::NConcurrency {
 
 namespace NDetail {
 
-DEFINE_ENUM(ECoroState,
-    ((Running)               (0))
-    ((Abandoned)             (1))
-    ((Completed)             (2))
-);
-
 ////////////////////////////////////////////////////////////////////////////////
 
 class TCoroutineBase
@@ -46,6 +40,12 @@ protected:
     void Suspend();
 
 private:
+    enum class ECoroState {
+        Running,
+        Abandoned,
+        Completed,
+    };
+
     std::shared_ptr<TExecutionStack> CoroutineStack_;
 
     TExceptionSafeContext CallerContext_;
-- 
cgit v1.2.3


From 2a00aa371a6061ce6f5cb034a1f6c430a469a6f3 Mon Sep 17 00:00:00 2001
From: robot-piglet <robot-piglet@yandex-team.com>
Date: Mon, 15 Apr 2024 22:29:19 +0300
Subject: Intermediate changes

---
 yt/yt/core/rpc/unittests/rpc_ut.cpp | 22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)

diff --git a/yt/yt/core/rpc/unittests/rpc_ut.cpp b/yt/yt/core/rpc/unittests/rpc_ut.cpp
index c1525b0a8b..7bd52df717 100644
--- a/yt/yt/core/rpc/unittests/rpc_ut.cpp
+++ b/yt/yt/core/rpc/unittests/rpc_ut.cpp
@@ -526,10 +526,10 @@ TYPED_TEST(TNotGrpcTest, TrackedRegularAttachments)
     // Attachment allocator proactively allocate slice of 4 KB.
     // See NYT::NBus::TPacketDecoder::TChunkedMemoryTrackingAllocator::Allocate.
     // default stub = 4096.
-    // header + body = 110 bytes.
+    // header + body = 103 bytes.
     // attachments = 22 bytes.
-    // sum is 4228 bytes.
-    EXPECT_GE(memoryUsageTracker->GetTotalUsage(), 4228 + 32768);
+    // sum is 4221 bytes.
+    EXPECT_GE(memoryUsageTracker->GetTotalUsage(), 4221 + 32768);
     EXPECT_EQ(3u, attachments.size());
     EXPECT_EQ("Hello_",     StringFromSharedRef(attachments[0]));
     EXPECT_EQ("from_",      StringFromSharedRef(attachments[1]));
@@ -594,8 +594,8 @@ TYPED_TEST(TNotGrpcTest, Compression)
     // attachmentStrings[0].size() = 29 * 2 bytes from decoder.
     // attachmentStrings[1].size() = 36 * 2 bytes from decoder.
     // attachmentStrings[2].size() = 90 * 2 bytes from decoder.
-    // sum is 4591 bytes.
-    EXPECT_GE(memoryUsageTracker->GetTotalUsage(), 4591 + 32768);
+    // sum is 4584 bytes.
+    EXPECT_GE(memoryUsageTracker->GetTotalUsage(), 4584 + 32768);
     EXPECT_TRUE(rsp->message() == message);
     EXPECT_GE(rsp->GetResponseMessage().Size(), static_cast<size_t>(2));
     const auto& serializedResponseBody = SerializeProtoToRefWithCompression(*rsp, responseCodecId);
@@ -844,9 +844,9 @@ TYPED_TEST(TNotGrpcTest, MemoryTracking)
     {
         auto rpcUsage = memoryUsageTracker->GetTotalUsage();
 
-        // 1261568 = 32768 + 1228800 = 32768 + 4096 * 300 + 300 * 110 (header + body).
+        // 1292468 = 32768 + 1228800 = 32768 + 4096 * 300 + 300 * 103 (header + body).
         // 32768 - socket buffers, 4096 - default size per request.
-        EXPECT_GE(rpcUsage, 1294568);
+        EXPECT_GE(rpcUsage, 1292468);
     }
 }
 
@@ -863,10 +863,10 @@ TYPED_TEST(TNotGrpcTest, MemoryTrackingMultipleConnections)
     }
 
     {
-        // 11059200 / 300 = 36974 = 32768 + 4096 + 110 (header + body).
+        // 11059200 / 300 = 36974 = 32768 + 4096 + 103 (header + body).
         // 4 KB - stub for request.
         // See NYT::NBus::TPacketDecoder::TChunkedMemoryTrackingAllocator::Allocate.
-        EXPECT_GE(memoryUsageTracker->GetTotalUsage(), 11092200);
+        EXPECT_GE(memoryUsageTracker->GetTotalUsage(), 11090100);
     }
 }
 
@@ -920,9 +920,9 @@ TYPED_TEST(TNotGrpcTest, MemoryOvercommit)
         // Attachment allocator proactively allocate slice of 4 KB.
         // See NYT::NBus::TPacketDecoder::TChunkedMemoryTrackingAllocator::Allocate.
         // default stub = 4096.
-        // header + body = 110 bytes.
+        // header + body = 103 bytes.
         // attachments = 6_KB  kbytes.
-        EXPECT_GE(rpcUsage, 32768 + 4096 + 6144 + 110);
+        EXPECT_GE(rpcUsage, 32768 + 4096 + 6144 + 103);
     }
 }
 
-- 
cgit v1.2.3


From 522b983401ad0e6aec915a0be5d69685e9ed188a Mon Sep 17 00:00:00 2001
From: arkady-e1ppa <arkady-e1ppa@yandex-team.com>
Date: Mon, 15 Apr 2024 22:29:34 +0300
Subject: Move FunctionView to library/cpp/yt/memory and add unit tests
 0f22987a2824410add2233f4434e26c9e1903da1

---
 library/cpp/yt/memory/function_view-inl.h          |  71 ++++++++
 library/cpp/yt/memory/function_view.h              | 139 +++++++++++++++
 .../cpp/yt/memory/unittests/function_view_ut.cpp   | 194 +++++++++++++++++++++
 library/cpp/yt/memory/unittests/ya.make            |   1 +
 library/cpp/yt/misc/function_view-inl.h            |  71 --------
 library/cpp/yt/misc/function_view.h                | 139 ---------------
 yt/yt/core/concurrency/fiber.h                     |   2 +-
 yt/yt/core/concurrency/fiber_scheduler_thread.cpp  |   2 +-
 8 files changed, 407 insertions(+), 212 deletions(-)
 create mode 100644 library/cpp/yt/memory/function_view-inl.h
 create mode 100644 library/cpp/yt/memory/function_view.h
 create mode 100644 library/cpp/yt/memory/unittests/function_view_ut.cpp
 delete mode 100644 library/cpp/yt/misc/function_view-inl.h
 delete mode 100644 library/cpp/yt/misc/function_view.h

diff --git a/library/cpp/yt/memory/function_view-inl.h b/library/cpp/yt/memory/function_view-inl.h
new file mode 100644
index 0000000000..ececfdf335
--- /dev/null
+++ b/library/cpp/yt/memory/function_view-inl.h
@@ -0,0 +1,71 @@
+#pragma once
+#ifndef FUNCTION_VIEW_INL_H_
+#error "Direct inclusion of this file is not allowed, include function_view.h"
+// For the sake of sane code completion.
+#include "function_view.h"
+#endif
+
+#include <library/cpp/yt/assert/assert.h>
+
+namespace NYT {
+
+////////////////////////////////////////////////////////////////////////////////
+
+template <class TResult, bool NoExcept, class... TArgs>
+template <CTypeErasable<TResult(TArgs...) noexcept(NoExcept)> TConcrete>
+TFunctionView<TResult(TArgs...) noexcept(NoExcept)>::TFunctionView(TConcrete& concreteRef) noexcept
+    : TFunctionView(&concreteRef)
+{ }
+
+template <class TResult, bool NoExcept, class... TArgs>
+template <CTypeErasable<TResult(TArgs...) noexcept(NoExcept)> TConcrete>
+TFunctionView<TResult(TArgs...) noexcept(NoExcept)>::TFunctionView(TConcrete* concretePtr) noexcept
+{
+    Ptr_ = reinterpret_cast<void*>(concretePtr);
+    Invoke_ = &TFunctionView::ConcreteInvoke<TConcrete>;
+}
+
+template <class TResult, bool NoExcept, class... TArgs>
+TFunctionView<TResult(TArgs...) noexcept(NoExcept)>
+TFunctionView<TResult(TArgs...) noexcept(NoExcept)>::Release() noexcept
+{
+    auto copy = *this;
+    Reset();
+    return copy;
+}
+
+template <class TResult, bool NoExcept, class... TArgs>
+TResult TFunctionView<TResult(TArgs...) noexcept(NoExcept)>::operator()(TArgs... args) noexcept(NoExcept)
+{
+    YT_VERIFY(Ptr_);
+    return Invoke_(std::forward<TArgs>(args)..., Ptr_);
+}
+
+template <class TResult, bool NoExcept, class... TArgs>
+template <class TConcrete>
+TResult TFunctionView<TResult(TArgs...) noexcept(NoExcept)>::ConcreteInvoke(TArgs... args, TErasedPtr ptr) noexcept(NoExcept)
+{
+    return (*reinterpret_cast<TConcrete*>(ptr))(std::forward<TArgs>(args)...);
+}
+
+template <class TResult, bool NoExcept, class... TArgs>
+TFunctionView<TResult(TArgs...) noexcept(NoExcept)>::operator bool() const noexcept
+{
+    return IsValid();
+}
+
+template <class TResult, bool NoExcept, class... TArgs>
+bool TFunctionView<TResult(TArgs...) noexcept(NoExcept)>::IsValid() const noexcept
+{
+    return Ptr_ != nullptr;
+}
+
+template <class TResult, bool NoExcept, class... TArgs>
+void TFunctionView<TResult(TArgs...) noexcept(NoExcept)>::Reset() noexcept
+{
+    Ptr_ = nullptr;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+
+} // namespace NYT
diff --git a/library/cpp/yt/memory/function_view.h b/library/cpp/yt/memory/function_view.h
new file mode 100644
index 0000000000..259238521f
--- /dev/null
+++ b/library/cpp/yt/memory/function_view.h
@@ -0,0 +1,139 @@
+#pragma once
+
+#include <concepts>
+
+namespace NYT {
+
+////////////////////////////////////////////////////////////////////////////////
+
+namespace NDetail {
+
+template <class TSignature>
+struct TTypeErasureTraits;
+
+template <class TResult, bool NoExcept, class... TArgs>
+struct TTypeErasureTraits<TResult(TArgs...) noexcept(NoExcept)>
+{
+    using TSignature = TResult(TArgs...) noexcept(NoExcept);
+
+    // TODO(arkady-e1ppa): Support pointer-to-member-function?
+    template <class T>
+    static constexpr bool IsInvocable = NoExcept
+        ? requires (T obj, TArgs... args) {
+            { obj(std::forward<TArgs>(args)...) } noexcept -> std::same_as<TResult>;
+        }
+        : requires (T obj, TArgs... args) {
+            { obj(std::forward<TArgs>(args)...) } -> std::same_as<TResult>;
+        };
+};
+
+} // namespace NDetail
+
+////////////////////////////////////////////////////////////////////////////////
+
+// Non-owning type-erasure container.
+/*
+    Example:
+
+    template <class T>
+    class TSerializedObject
+    {
+    public:
+        explicit TSerializedObject(T value)
+            : Object_(value)
+        { }
+
+        void Lock(TFunctionView<void(const T&)> callback)
+        {
+            auto guard = Guard(SpinLock_);
+            callback(Object_);
+        }
+
+    private:
+        TSpinLock SpinLock_;
+        T Object_;
+    };
+
+    int main()
+    {
+        TSerializedObject<int> object(42);
+
+        // object.Lock([] (const int& value) {
+        //     fmt::println("Value is {}", value);
+        // });
+        // ^ CE -- cannot pass rvalue.
+
+        auto callback = [] (const int& value) {
+            fmt::println("Value is {}", value);
+        };
+
+        object.Lock(callback); // <- prints "Value is 42".
+    }
+*/
+template <class TSignature>
+class TFunctionView;
+
+////////////////////////////////////////////////////////////////////////////////
+
+template <class T, class TSignature>
+concept CTypeErasable =
+    NDetail::TTypeErasureTraits<TSignature>::template IsInvocable<T> &&
+    (!std::same_as<T, TFunctionView<TSignature>>);
+
+////////////////////////////////////////////////////////////////////////////////
+
+template <class TResult, bool NoExcept, class... TArgs>
+class TFunctionView<TResult(TArgs...) noexcept(NoExcept)>
+{
+public:
+    using TSignature = TResult(TArgs...) noexcept(NoExcept);
+
+    TFunctionView() = default;
+
+    template <CTypeErasable<TSignature> TConcrete>
+    TFunctionView(TConcrete& concreteRef) noexcept;
+
+    template <CTypeErasable<TSignature> TConcrete>
+    TFunctionView(TConcrete* concretePtr) noexcept;
+
+    TResult operator()(TArgs... args) noexcept(NoExcept);
+
+    explicit operator bool() const noexcept;
+
+    TFunctionView Release() noexcept;
+
+    bool IsValid() const noexcept;
+    void Reset() noexcept;
+
+    // bool operator==(const TFunctionView& other) const & = default;
+
+private:
+    // NB: Technically, this is UB according to C standard, which
+    // was not changed for C++ standard.
+    // This is so because it is allowed to have
+    // function pointers to be modelled by entities
+    // different from object pointers.
+    // No reasonable system architecture (e.g. x86 or ARM
+    // or any other POSIX compliant one) does this.
+    // No reasonable compiler (clang/gcc) does anything with this.
+    // Accounting for such requirement would cause this class
+    // to have std::variant-like storage which would make this class
+    // weight more. Thus, we have decided to keep it this way,
+    // since we are safe on x86 or ARM + clang.
+    using TErasedPtr = void*;
+    using TErasedInvoke = TResult(*)(TArgs..., TErasedPtr);
+
+    TErasedPtr Ptr_ = nullptr;
+    TErasedInvoke Invoke_ = nullptr;
+
+    template <class TConcrete>
+    static TResult ConcreteInvoke(TArgs... args, TErasedPtr ptr) noexcept(NoExcept);
+};
+
+////////////////////////////////////////////////////////////////////////////////
+
+} // namespace NYT
+
+#define FUNCTION_VIEW_INL_H_
+#include "function_view-inl.h"
+#undef FUNCTION_VIEW_INL_H_
diff --git a/library/cpp/yt/memory/unittests/function_view_ut.cpp b/library/cpp/yt/memory/unittests/function_view_ut.cpp
new file mode 100644
index 0000000000..99af41793c
--- /dev/null
+++ b/library/cpp/yt/memory/unittests/function_view_ut.cpp
@@ -0,0 +1,194 @@
+#include <library/cpp/testing/gtest/gtest.h>
+
+#include <library/cpp/yt/memory/function_view.h>
+
+#include <util/generic/string.h>
+#include <util/string/cast.h>
+
+namespace NYT {
+namespace {
+
+////////////////////////////////////////////////////////////////////////////////
+
+struct TNoCopy
+{
+    int Value = 42;
+
+    TNoCopy() = default;
+
+    TNoCopy(const TNoCopy&) = delete;
+
+    TNoCopy(TNoCopy&&)
+    { }
+};
+
+int Foo()
+{
+    return 42;
+}
+
+int& Bar()
+{
+    static int bar = 0;
+    return bar;
+}
+
+const TNoCopy& ImmutBar()
+{
+    static TNoCopy bar = {};
+    return bar;
+}
+
+TString Baz(const int& x)
+{
+    return ToString(x);
+}
+
+void NoExFoo() noexcept
+{ }
+
+struct TCallable
+{
+    int InvocationCount = 0;
+    mutable int ConstInvocationCount = 0;
+
+    void operator()() &
+    {
+        ++InvocationCount;
+    }
+
+    void operator()() const &
+    {
+        ++ConstInvocationCount;
+    }
+};
+
+////////////////////////////////////////////////////////////////////////////////
+
+TEST(TFunctionViewTest, JustWorks)
+{
+    auto stackLambda = [] (int val) {
+        return val + 1;
+    };
+
+    {
+        TFunctionView<int(int)> view(stackLambda);
+
+        EXPECT_EQ(view(42), 43);
+    }
+}
+
+TEST(TFunctionViewTest, FreeFunction)
+{
+    TFunctionView<int()> view(Foo);
+    EXPECT_EQ(view(), 42);
+}
+
+TEST(TFunctionViewTest, RefReturn)
+{
+    TFunctionView<int&()> view(Bar);
+    ++view();
+    EXPECT_EQ(view(), 1);
+
+    TFunctionView<const TNoCopy&()> immut_view(ImmutBar);
+    EXPECT_EQ(immut_view().Value, 42);
+}
+
+TEST(TFunctionViewTest, RefArgument)
+{
+    TFunctionView<TString(const int&)> view(Baz);
+    EXPECT_EQ(view(77), TString("77"));
+}
+
+TEST(TFunctionViewTest, NoExcept)
+{
+    TFunctionView<void() noexcept> view(NoExFoo);
+    static_assert(std::is_nothrow_invocable_r_v<void, decltype(view)>);
+
+    view();
+}
+
+TEST(TFunctionViewTest, CVOverloads)
+{
+    TCallable callable;
+
+    TFunctionView<void()> view(callable);
+    // NB: & overload overshadows every other overload.
+    // const auto& viewRef = view;
+    // viewRef();
+
+    view();
+    EXPECT_EQ(callable.InvocationCount, 1);
+    EXPECT_EQ(callable.ConstInvocationCount, 0);
+}
+
+TEST(TFunctionViewTest, CopyView)
+{
+    int counter = 0;
+    auto lambda = [&counter] {
+        ++counter;
+    };
+
+    TFunctionView<void()> view1(lambda);
+    TFunctionView<void()> view2 = view1;
+
+    view1();
+    EXPECT_EQ(counter, 1);
+    view2();
+    EXPECT_EQ(counter, 2);
+    view1();
+    EXPECT_EQ(counter, 3);
+}
+
+TEST(TFunctionViewTest, AssignView)
+{
+    int counter = 0;
+    auto lambda = [&counter] {
+        ++counter;
+    };
+
+    TFunctionView<void()> view(lambda);
+    view();
+    EXPECT_EQ(counter, 1);
+
+    {
+        auto innerCounter = 0;
+        auto lambda = [&innerCounter] {
+            ++innerCounter;
+        };
+
+        view = lambda;
+        view();
+        EXPECT_EQ(counter, 1);
+        EXPECT_EQ(innerCounter, 1);
+    }
+
+    // NB: Even though object is dead view will remain "valid".
+    // Be careful with lifetimes!
+    EXPECT_TRUE(view.IsValid());
+}
+
+TEST(TFunctionViewTest, ReleaseSemantics)
+{
+    int counter = 0;
+    auto lambda = [&counter] {
+        ++counter;
+    };
+
+    TFunctionView<void()> view1(lambda);
+    view1();
+    EXPECT_EQ(counter, 1);
+
+    TFunctionView view2 = view1.Release();
+    EXPECT_FALSE(view1.IsValid());
+
+    EXPECT_TRUE(view2.IsValid());
+
+    view2();
+    EXPECT_EQ(counter, 2);
+}
+
+////////////////////////////////////////////////////////////////////////////////
+
+} // namespace
+} // namespace NYT
diff --git a/library/cpp/yt/memory/unittests/ya.make b/library/cpp/yt/memory/unittests/ya.make
index 3658eefce1..4c3e4d5303 100644
--- a/library/cpp/yt/memory/unittests/ya.make
+++ b/library/cpp/yt/memory/unittests/ya.make
@@ -12,6 +12,7 @@ SRCS(
     chunked_memory_pool_allocator_ut.cpp
     chunked_memory_pool_output_ut.cpp
     free_list_ut.cpp
+    function_view_ut.cpp
     intrusive_ptr_ut.cpp
     shared_range_ut.cpp
     weak_ptr_ut.cpp
diff --git a/library/cpp/yt/misc/function_view-inl.h b/library/cpp/yt/misc/function_view-inl.h
deleted file mode 100644
index ececfdf335..0000000000
--- a/library/cpp/yt/misc/function_view-inl.h
+++ /dev/null
@@ -1,71 +0,0 @@
-#pragma once
-#ifndef FUNCTION_VIEW_INL_H_
-#error "Direct inclusion of this file is not allowed, include function_view.h"
-// For the sake of sane code completion.
-#include "function_view.h"
-#endif
-
-#include <library/cpp/yt/assert/assert.h>
-
-namespace NYT {
-
-////////////////////////////////////////////////////////////////////////////////
-
-template <class TResult, bool NoExcept, class... TArgs>
-template <CTypeErasable<TResult(TArgs...) noexcept(NoExcept)> TConcrete>
-TFunctionView<TResult(TArgs...) noexcept(NoExcept)>::TFunctionView(TConcrete& concreteRef) noexcept
-    : TFunctionView(&concreteRef)
-{ }
-
-template <class TResult, bool NoExcept, class... TArgs>
-template <CTypeErasable<TResult(TArgs...) noexcept(NoExcept)> TConcrete>
-TFunctionView<TResult(TArgs...) noexcept(NoExcept)>::TFunctionView(TConcrete* concretePtr) noexcept
-{
-    Ptr_ = reinterpret_cast<void*>(concretePtr);
-    Invoke_ = &TFunctionView::ConcreteInvoke<TConcrete>;
-}
-
-template <class TResult, bool NoExcept, class... TArgs>
-TFunctionView<TResult(TArgs...) noexcept(NoExcept)>
-TFunctionView<TResult(TArgs...) noexcept(NoExcept)>::Release() noexcept
-{
-    auto copy = *this;
-    Reset();
-    return copy;
-}
-
-template <class TResult, bool NoExcept, class... TArgs>
-TResult TFunctionView<TResult(TArgs...) noexcept(NoExcept)>::operator()(TArgs... args) noexcept(NoExcept)
-{
-    YT_VERIFY(Ptr_);
-    return Invoke_(std::forward<TArgs>(args)..., Ptr_);
-}
-
-template <class TResult, bool NoExcept, class... TArgs>
-template <class TConcrete>
-TResult TFunctionView<TResult(TArgs...) noexcept(NoExcept)>::ConcreteInvoke(TArgs... args, TErasedPtr ptr) noexcept(NoExcept)
-{
-    return (*reinterpret_cast<TConcrete*>(ptr))(std::forward<TArgs>(args)...);
-}
-
-template <class TResult, bool NoExcept, class... TArgs>
-TFunctionView<TResult(TArgs...) noexcept(NoExcept)>::operator bool() const noexcept
-{
-    return IsValid();
-}
-
-template <class TResult, bool NoExcept, class... TArgs>
-bool TFunctionView<TResult(TArgs...) noexcept(NoExcept)>::IsValid() const noexcept
-{
-    return Ptr_ != nullptr;
-}
-
-template <class TResult, bool NoExcept, class... TArgs>
-void TFunctionView<TResult(TArgs...) noexcept(NoExcept)>::Reset() noexcept
-{
-    Ptr_ = nullptr;
-}
-
-////////////////////////////////////////////////////////////////////////////////
-
-} // namespace NYT
diff --git a/library/cpp/yt/misc/function_view.h b/library/cpp/yt/misc/function_view.h
deleted file mode 100644
index 259238521f..0000000000
--- a/library/cpp/yt/misc/function_view.h
+++ /dev/null
@@ -1,139 +0,0 @@
-#pragma once
-
-#include <concepts>
-
-namespace NYT {
-
-////////////////////////////////////////////////////////////////////////////////
-
-namespace NDetail {
-
-template <class TSignature>
-struct TTypeErasureTraits;
-
-template <class TResult, bool NoExcept, class... TArgs>
-struct TTypeErasureTraits<TResult(TArgs...) noexcept(NoExcept)>
-{
-    using TSignature = TResult(TArgs...) noexcept(NoExcept);
-
-    // TODO(arkady-e1ppa): Support pointer-to-member-function?
-    template <class T>
-    static constexpr bool IsInvocable = NoExcept
-        ? requires (T obj, TArgs... args) {
-            { obj(std::forward<TArgs>(args)...) } noexcept -> std::same_as<TResult>;
-        }
-        : requires (T obj, TArgs... args) {
-            { obj(std::forward<TArgs>(args)...) } -> std::same_as<TResult>;
-        };
-};
-
-} // namespace NDetail
-
-////////////////////////////////////////////////////////////////////////////////
-
-// Non-owning type-erasure container.
-/*
-    Example:
-
-    template <class T>
-    class TSerializedObject
-    {
-    public:
-        explicit TSerializedObject(T value)
-            : Object_(value)
-        { }
-
-        void Lock(TFunctionView<void(const T&)> callback)
-        {
-            auto guard = Guard(SpinLock_);
-            callback(Object_);
-        }
-
-    private:
-        TSpinLock SpinLock_;
-        T Object_;
-    };
-
-    int main()
-    {
-        TSerializedObject<int> object(42);
-
-        // object.Lock([] (const int& value) {
-        //     fmt::println("Value is {}", value);
-        // });
-        // ^ CE -- cannot pass rvalue.
-
-        auto callback = [] (const int& value) {
-            fmt::println("Value is {}", value);
-        };
-
-        object.Lock(callback); // <- prints "Value is 42".
-    }
-*/
-template <class TSignature>
-class TFunctionView;
-
-////////////////////////////////////////////////////////////////////////////////
-
-template <class T, class TSignature>
-concept CTypeErasable =
-    NDetail::TTypeErasureTraits<TSignature>::template IsInvocable<T> &&
-    (!std::same_as<T, TFunctionView<TSignature>>);
-
-////////////////////////////////////////////////////////////////////////////////
-
-template <class TResult, bool NoExcept, class... TArgs>
-class TFunctionView<TResult(TArgs...) noexcept(NoExcept)>
-{
-public:
-    using TSignature = TResult(TArgs...) noexcept(NoExcept);
-
-    TFunctionView() = default;
-
-    template <CTypeErasable<TSignature> TConcrete>
-    TFunctionView(TConcrete& concreteRef) noexcept;
-
-    template <CTypeErasable<TSignature> TConcrete>
-    TFunctionView(TConcrete* concretePtr) noexcept;
-
-    TResult operator()(TArgs... args) noexcept(NoExcept);
-
-    explicit operator bool() const noexcept;
-
-    TFunctionView Release() noexcept;
-
-    bool IsValid() const noexcept;
-    void Reset() noexcept;
-
-    // bool operator==(const TFunctionView& other) const & = default;
-
-private:
-    // NB: Technically, this is UB according to C standard, which
-    // was not changed for C++ standard.
-    // This is so because it is allowed to have
-    // function pointers to be modelled by entities
-    // different from object pointers.
-    // No reasonable system architecture (e.g. x86 or ARM
-    // or any other POSIX compliant one) does this.
-    // No reasonable compiler (clang/gcc) does anything with this.
-    // Accounting for such requirement would cause this class
-    // to have std::variant-like storage which would make this class
-    // weight more. Thus, we have decided to keep it this way,
-    // since we are safe on x86 or ARM + clang.
-    using TErasedPtr = void*;
-    using TErasedInvoke = TResult(*)(TArgs..., TErasedPtr);
-
-    TErasedPtr Ptr_ = nullptr;
-    TErasedInvoke Invoke_ = nullptr;
-
-    template <class TConcrete>
-    static TResult ConcreteInvoke(TArgs... args, TErasedPtr ptr) noexcept(NoExcept);
-};
-
-////////////////////////////////////////////////////////////////////////////////
-
-} // namespace NYT
-
-#define FUNCTION_VIEW_INL_H_
-#include "function_view-inl.h"
-#undef FUNCTION_VIEW_INL_H_
diff --git a/yt/yt/core/concurrency/fiber.h b/yt/yt/core/concurrency/fiber.h
index e42510b26a..e08d72601c 100644
--- a/yt/yt/core/concurrency/fiber.h
+++ b/yt/yt/core/concurrency/fiber.h
@@ -6,7 +6,7 @@
 
 #include <yt/yt/core/misc/intrusive_mpsc_stack.h>
 
-#include <library/cpp/yt/misc/function_view.h>
+#include <library/cpp/yt/memory/function_view.h>
 
 #include <util/system/context.h>
 
diff --git a/yt/yt/core/concurrency/fiber_scheduler_thread.cpp b/yt/yt/core/concurrency/fiber_scheduler_thread.cpp
index 62f8afd79a..25e380d4a9 100644
--- a/yt/yt/core/concurrency/fiber_scheduler_thread.cpp
+++ b/yt/yt/core/concurrency/fiber_scheduler_thread.cpp
@@ -17,7 +17,7 @@
 
 #include <library/cpp/yt/memory/memory_tag.h>
 
-#include <library/cpp/yt/misc/function_view.h>
+#include <library/cpp/yt/memory/function_view.h>
 
 #include <library/cpp/yt/threading/fork_aware_spin_lock.h>
 
-- 
cgit v1.2.3


From a124ba45ea6873bedcd2c81515ee399c8de92363 Mon Sep 17 00:00:00 2001
From: whatsername <whatsername@yandex-team.com>
Date: Mon, 15 Apr 2024 23:09:20 +0300
Subject: YT-21169: Compare any types ea6fc0df4ca824207ae49ffb843b090a6cf66f1d

---
 yt/yt/client/table_client/composite_compare.cpp | 48 +++++++++++++++------
 yt/yt/client/table_client/composite_compare.h   |  2 +-
 yt/yt/client/table_client/helpers.cpp           |  8 ++--
 yt/yt/client/table_client/row_base.cpp          |  1 +
 yt/yt/client/table_client/unversioned_row.cpp   | 51 +++++++++++++++++++---
 yt/yt/client/unittests/composite_compare_ut.cpp |  6 +--
 yt/yt/client/unittests/row_ut.cpp               | 57 +++++++++++++++++++++++--
 7 files changed, 145 insertions(+), 28 deletions(-)

diff --git a/yt/yt/client/table_client/composite_compare.cpp b/yt/yt/client/table_client/composite_compare.cpp
index b2ddd498ec..0031bef401 100644
--- a/yt/yt/client/table_client/composite_compare.cpp
+++ b/yt/yt/client/table_client/composite_compare.cpp
@@ -1,5 +1,6 @@
 #include "composite_compare.h"
 
+#include <yt/yt/client/table_client/row_base.h>
 #include <yt/yt/core/yson/pull_parser.h>
 #include <yt/yt/core/yson/token_writer.h>
 
@@ -16,27 +17,28 @@ using namespace NYson;
 
 ////////////////////////////////////////////////////////////////////////////////
 
-static const auto Logger = NLogging::TLogger{"YsonCompositveCompare"};
+static const auto Logger = NLogging::TLogger{"YsonCompositeCompare"};
 
 ////////////////////////////////////////////////////////////////////////////////
 
 namespace {
 
-// This file implements comparison for composite values.
+// This file implements comparison for composite and any values.
 // Composite types that supports comparison are:
 //   1. Optional
 //   2. List
 //   3. Tuple
 //   4. Variant
 //
-// When we compare composite values we assume that they are well-formed yson representations of same type supporting comparison.
+// When we compare composite or any values we assume that they are well-formed yson representations of same type supporting comparison.
 // And we compare them in following manner:
 //   1. We scan two values simultaneously and look at their yson tokens and find first mismatching token.
 //   2. If one of the token is EndList (this only can happen if we parsing values of list type
 //      and one list is shorter than another) that means that value containing EndList is less that other.
 //   3. Otherwise if one of the values is Entity (other value have to be non null value) that means
 //      that value containing Entity is less than other.
-//   4. Otherwise it's 2 values of the same type and we can easily compare them.
+//   4. Otherwise if values have different types we compare them using EValueType order (via MapItemTypeToValueType)
+//   5. Otherwise it's values of the same type and we can easily compare them.
 DEFINE_ENUM_WITH_UNDERLYING_TYPE(ECompareClass, ui32,
     ((Incomparable)(0))
     ((EndList)(1))
@@ -108,6 +110,30 @@ Y_FORCE_INLINE static int GetSign(int x)
     return static_cast<int>(0 < x) - static_cast<int>(0 > x);
 }
 
+Y_FORCE_INLINE static EValueType MapItemTypeToValueType(EYsonItemType itemType)
+{
+    static const TEnumIndexedArray<EYsonItemType, EValueType> mapping = {
+        {EYsonItemType::EndOfStream, EValueType::Min},
+        {EYsonItemType::BeginMap, EValueType::Min},
+        {EYsonItemType::EndMap, EValueType::Min},
+        {EYsonItemType::BeginAttributes, EValueType::Min},
+        {EYsonItemType::EndAttributes, EValueType::Min},
+        {EYsonItemType::BeginList, EValueType::Any},
+        {EYsonItemType::EndList, EValueType::Min},
+        {EYsonItemType::EntityValue, EValueType::Min},
+        {EYsonItemType::BooleanValue, EValueType::Boolean},
+        {EYsonItemType::Int64Value, EValueType::Int64},
+        {EYsonItemType::Uint64Value, EValueType::Uint64},
+        {EYsonItemType::DoubleValue, EValueType::Double},
+        {EYsonItemType::StringValue, EValueType::String},
+    };
+    auto valueType = mapping[itemType];
+    if (valueType == EValueType::Min) {
+        ThrowIncomparableYsonToken(itemType);
+    }
+    return valueType;
+}
+
 Y_FORCE_INLINE static int CompareYsonItems(const TYsonItem& lhs, const TYsonItem& rhs)
 {
     if (lhs.GetType() == rhs.GetType()) {
@@ -148,9 +174,7 @@ Y_FORCE_INLINE static int CompareYsonItems(const TYsonItem& lhs, const TYsonItem
     }
 
     if (lhsClass == ECompareClass::BeginValue && rhsClass == ECompareClass::BeginValue) {
-        THROW_ERROR_EXCEPTION("Incomparable scalar types %Qlv and %Qlv in YSON representation",
-            lhs.GetType(),
-            rhs.GetType());
+        return static_cast<int>(MapItemTypeToValueType(lhs.GetType())) - static_cast<int>(MapItemTypeToValueType(rhs.GetType()));
     }
     return ComparePrimitive(static_cast<ui32>(lhsClass), static_cast<ui32>(rhsClass));
 }
@@ -314,21 +338,21 @@ TFingerprint CompositeFarmHash(TYsonStringBuf value)
 
 ////////////////////////////////////////////////////////////////////////////////
 
-std::optional<TYsonString> TruncateCompositeValue(TYsonStringBuf value, i64 size)
+std::optional<TYsonString> TruncateYsonValue(TYsonStringBuf originalYson, i64 size)
 {
-    YT_VERIFY(value.GetType() == EYsonType::Node);
+    YT_VERIFY(originalYson.GetType() == EYsonType::Node);
 
     YT_VERIFY(size >= 0);
     if (!size) {
         return {};
     }
 
-    TMemoryInput valueIn(value.AsStringBuf());
+    TMemoryInput valueIn(originalYson.AsStringBuf());
     TYsonPullParser valueParser(&valueIn, EYsonType::Node);
 
     TString truncatedYson;
     TStringOutput output(truncatedYson);
-    output.Reserve(std::min(size, std::ssize(value.AsStringBuf())));
+    output.Reserve(std::min(size, std::ssize(originalYson.AsStringBuf())));
     TCheckedInDebugYsonTokenWriter writer(&output);
 
     i64 unclosedListCount = 0;
@@ -421,7 +445,7 @@ std::optional<TYsonString> TruncateCompositeValue(TYsonStringBuf value, i64 size
     YT_LOG_ALERT_IF(
         std::ssize(truncatedYson) > size,
         "Composite YSON truncation increased the value's binary size (OriginalValue: %v, TruncatedValue: %v)",
-        value.AsStringBuf(),
+        originalYson.AsStringBuf(),
         truncatedYson);
 
     return TYsonString(std::move(truncatedYson));
diff --git a/yt/yt/client/table_client/composite_compare.h b/yt/yt/client/table_client/composite_compare.h
index 04737d8b7b..aa64c01f25 100644
--- a/yt/yt/client/table_client/composite_compare.h
+++ b/yt/yt/client/table_client/composite_compare.h
@@ -22,7 +22,7 @@ TFingerprint CompositeFarmHash(NYson::TYsonStringBuf compositeValue);
 //!
 //! NB: The current implementation guarantees that the size of the returned string is not larger then the provided limit. However,
 //! this might be hard to maintain and is not something one should rely on. It is better to think of this function as an approximate one.
-std::optional<NYson::TYsonString> TruncateCompositeValue(NYson::TYsonStringBuf value, i64 size);
+std::optional<NYson::TYsonString> TruncateYsonValue(NYson::TYsonStringBuf value, i64 size);
 
 ////////////////////////////////////////////////////////////////////////////////
 
diff --git a/yt/yt/client/table_client/helpers.cpp b/yt/yt/client/table_client/helpers.cpp
index 54733a18b4..38c55c933d 100644
--- a/yt/yt/client/table_client/helpers.cpp
+++ b/yt/yt/client/table_client/helpers.cpp
@@ -1596,11 +1596,11 @@ TUnversionedValueRangeTruncationResult TruncateUnversionedValues(
         truncatedValues.push_back(value);
         auto& truncatedValue = truncatedValues.back();
 
-        if (clipped || value.Type == EValueType::Any) {
+        if (clipped) {
             truncatedValue = MakeUnversionedNullValue(value.Id, value.Flags);
-        } else if (value.Type == EValueType::Composite) {
-            if (auto truncatedCompositeValue = TruncateCompositeValue(TYsonStringBuf(value.AsStringBuf()), maxSizePerValue)) {
-                truncatedValue = rowBuffer->CaptureValue(MakeUnversionedCompositeValue(truncatedCompositeValue->AsStringBuf(), value.Id, value.Flags));
+        } else if (value.Type == EValueType::Any || value.Type == EValueType::Composite) {
+            if (auto truncatedYsonValue = TruncateYsonValue(TYsonStringBuf(value.AsStringBuf()), maxSizePerValue)) {
+                truncatedValue = rowBuffer->CaptureValue(MakeUnversionedStringLikeValue(value.Type, truncatedYsonValue->AsStringBuf(), value.Id, value.Flags));
             } else {
                 truncatedValue = MakeUnversionedNullValue(value.Id, value.Flags);
             }
diff --git a/yt/yt/client/table_client/row_base.cpp b/yt/yt/client/table_client/row_base.cpp
index 2eb15d37fd..b2970d58d6 100644
--- a/yt/yt/client/table_client/row_base.cpp
+++ b/yt/yt/client/table_client/row_base.cpp
@@ -118,6 +118,7 @@ void ValidateKeyValueType(EValueType type)
         type != EValueType::Double &&
         type != EValueType::Boolean &&
         type != EValueType::String &&
+        type != EValueType::Any &&
         type != EValueType::Composite &&
         type != EValueType::Null &&
         type != EValueType::Min &&
diff --git a/yt/yt/client/table_client/unversioned_row.cpp b/yt/yt/client/table_client/unversioned_row.cpp
index 6211bffdb5..18cfd89d7e 100644
--- a/yt/yt/client/table_client/unversioned_row.cpp
+++ b/yt/yt/client/table_client/unversioned_row.cpp
@@ -320,9 +320,23 @@ int CompareRowValues(const TUnversionedValue& lhs, const TUnversionedValue& rhs)
     // TODO(babenko): check flags; forbid comparing hunks and aggregates.
 
     if (lhs.Type == EValueType::Any || rhs.Type == EValueType::Any) {
-        if (!IsSentinel(lhs.Type) && !IsSentinel(rhs.Type)) {
-            // Never compare composite values with non-sentinels.
-            ThrowIncomparableTypes(lhs, rhs);
+        if (lhs.Type != rhs.Type) {
+            if (lhs.Type == EValueType::Composite || rhs.Type == EValueType::Composite) {
+                ThrowIncomparableTypes(lhs, rhs);
+            }
+            return static_cast<int>(lhs.Type) - static_cast<int>(rhs.Type);
+        }
+        try {
+            auto lhsData = TYsonStringBuf(lhs.AsStringBuf());
+            auto rhsData = TYsonStringBuf(rhs.AsStringBuf());
+            return CompareCompositeValues(lhsData, rhsData);
+        } catch (const std::exception& ex) {
+            THROW_ERROR_EXCEPTION(
+                NTableClient::EErrorCode::IncomparableComplexValues,
+                "Cannot compare complex values")
+                << TErrorAttribute("lhs_value", lhs)
+                << TErrorAttribute("rhs_value", rhs)
+                << ex;
         }
     }
 
@@ -649,6 +663,7 @@ public:
     void OnBeginMap() override
     {
         ++Depth_;
+        MapFound_ = true;
     }
 
     void OnKeyedItem(TStringBuf /*key*/) override
@@ -664,6 +679,7 @@ public:
         if (Depth_ == 0) {
             THROW_ERROR_EXCEPTION("Table values cannot have top-level attributes");
         }
+        AttributesFound_ = true;
     }
 
     void OnEndAttributes() override
@@ -672,8 +688,15 @@ public:
     void OnRaw(TStringBuf /*yson*/, EYsonType /*type*/) override
     { }
 
+    bool CanBeSorted() const
+    {
+        return !MapFound_ && !AttributesFound_;
+    }
+
 private:
     int Depth_ = 0;
+    bool MapFound_ = false;
+    bool AttributesFound_ = false;
 };
 
 void ValidateAnyValue(TStringBuf yson)
@@ -682,6 +705,14 @@ void ValidateAnyValue(TStringBuf yson)
     ParseYsonStringBuffer(yson, EYsonType::Node, &validator);
 }
 
+bool ValidateSortedAnyValue(TStringBuf yson)
+{
+    TYsonAnyValidator validator;
+    ParseYsonStringBuffer(yson, EYsonType::Node, &validator);
+
+    return validator.CanBeSorted();
+}
+
 void ValidateDynamicValue(const TUnversionedValue& value, bool isKey)
 {
     switch (value.Type) {
@@ -1036,8 +1067,18 @@ void ValidateValueType(
                             "Cannot write value of type %Qlv into type any column",
                             value.Type);
                     }
-                    if (IsAnyOrComposite(value.Type) && validateAnyIsValidYson) {
-                        ValidateAnyValue(value.AsStringBuf());
+                    if (IsAnyOrComposite(value.Type)) {
+                        if (columnSchema.SortOrder()) {
+                            bool canBeSorted = ValidateSortedAnyValue(value.AsStringBuf());
+                            if (!canBeSorted) {
+                                THROW_ERROR_EXCEPTION(
+                                    NTableClient::EErrorCode::SchemaViolation,
+                                    "Cannot write value of type %Qlv, which contains a YSON map, into type any sorted column",
+                                    value.Type);
+                            }
+                        } else if (validateAnyIsValidYson) {
+                            ValidateAnyValue(value.AsStringBuf());
+                        }
                     }
                 } else {
                     ValidateColumnType(EValueType::Composite, value);
diff --git a/yt/yt/client/unittests/composite_compare_ut.cpp b/yt/yt/client/unittests/composite_compare_ut.cpp
index 5e792919fa..8f59fab630 100644
--- a/yt/yt/client/unittests/composite_compare_ut.cpp
+++ b/yt/yt/client/unittests/composite_compare_ut.cpp
@@ -72,15 +72,15 @@ TEST(TCompositeCompare, CompositeFingerprint)
     EXPECT_EQ(getFarmHash("#"), GetFarmFingerprint(MakeUnversionedNullValue()));
 }
 
-TEST(TCompositeCompare, TruncateCompositeValue)
+TEST(TCompositeCompare, TruncateYsonValue)
 {
     auto normalizeYson = [] (TStringBuf yson) {
         return yson.empty() ? TString(yson) : ConvertToYsonString(TYsonString(yson), EYsonFormat::Binary).ToString();
     };
 
     auto getTruncatedYson = [&] (TStringBuf original, i64 size) {
-        auto truncatedCompositeValue = TruncateCompositeValue(TYsonString(original), size);
-        return truncatedCompositeValue ? truncatedCompositeValue->ToString() : "";
+        auto truncatedValue = TruncateYsonValue(TYsonString(original), size);
+        return truncatedValue ? truncatedValue->ToString() : "";
     };
 
     // When we rebuild the whole string during truncation, we should produce the correct normalized binary YSON version of the string as output.
diff --git a/yt/yt/client/unittests/row_ut.cpp b/yt/yt/client/unittests/row_ut.cpp
index 2eacf5e19c..91a2e67ab4 100644
--- a/yt/yt/client/unittests/row_ut.cpp
+++ b/yt/yt/client/unittests/row_ut.cpp
@@ -1,9 +1,9 @@
-#include <yt/yt/core/test_framework/framework.h>
-
+#include <yt/yt/client/table_client/public.h>
+#include <yt/yt/client/table_client/row_buffer.h>
 #include <yt/yt/client/table_client/unversioned_row.h>
 #include <yt/yt/client/table_client/versioned_row.h>
-#include <yt/yt/client/table_client/row_buffer.h>
 
+#include <yt/yt/core/test_framework/framework.h>
 #include <yt/yt/core/misc/protobuf_helpers.h>
 
 #include <limits>
@@ -96,6 +96,57 @@ TEST(TUnversionedValueTest, CompareComposite)
     EXPECT_TRUE(CompareRowValues(nullValue, compositeValue) < 0);
 }
 
+TEST(TUnversionedValueTest, CompareAny)
+{
+    auto intListValue = MakeUnversionedAnyValue("[123]");
+    auto stringListValue = MakeUnversionedAnyValue("[\"0\"]");
+    auto emptyListValue = MakeUnversionedAnyValue("[]");
+    auto listListValue = MakeUnversionedAnyValue("[[abc]]");
+    auto stringValue = MakeUnversionedStringValue("foo");
+    auto intValue = MakeUnversionedInt64Value(123);
+    auto nullValue = MakeUnversionedSentinelValue(EValueType::Null);
+
+    // Any vs just value
+    EXPECT_TRUE(CompareRowValues(stringValue, intListValue) < 0);
+    EXPECT_TRUE(CompareRowValues(intListValue, stringValue) > 0);
+
+    // String vs int as any & just value
+    EXPECT_TRUE(CompareRowValues(stringValue, intValue) > 0);
+    EXPECT_TRUE(CompareRowValues(intValue, stringValue) < 0);
+
+    EXPECT_TRUE(CompareRowValues(stringListValue, intListValue) > 0);
+    EXPECT_TRUE(CompareRowValues(intListValue, stringListValue) < 0);
+
+    // Null, empty list
+    EXPECT_TRUE(CompareRowValues(emptyListValue, intListValue) < 0);
+    EXPECT_TRUE(CompareRowValues(intListValue, emptyListValue) > 0);
+
+    EXPECT_TRUE(CompareRowValues(intListValue, nullValue) > 0);
+    EXPECT_TRUE(CompareRowValues(nullValue, intListValue) < 0);
+
+    EXPECT_TRUE(CompareRowValues(emptyListValue, nullValue) > 0);
+    EXPECT_TRUE(CompareRowValues(nullValue, emptyListValue) < 0);
+
+    // List vs int as any & just value
+    EXPECT_TRUE(CompareRowValues(intValue, intListValue) < 0);
+    EXPECT_TRUE(CompareRowValues(intListValue, intValue) > 0);
+
+    EXPECT_TRUE(CompareRowValues(intListValue, listListValue) < 0);
+    EXPECT_TRUE(CompareRowValues(listListValue, intListValue) > 0);
+
+    // Any map & attrs
+    auto mapValue = MakeUnversionedAnyValue("{a=123}");
+    EXPECT_THROW_WITH_ERROR_CODE(CompareRowValues(intListValue, mapValue), EErrorCode::IncomparableComplexValues);
+
+    auto annotatedValue = MakeUnversionedAnyValue("[<a=10>123]");
+    EXPECT_THROW_WITH_ERROR_CODE(CompareRowValues(intListValue, annotatedValue), EErrorCode::IncomparableComplexValues);
+
+    // Lazy comparison: we assume that such values are filtered before write to sorted column
+    auto listWithMapValue = MakeUnversionedAnyValue("[122, {a=123}]");
+    EXPECT_TRUE(CompareRowValues(intListValue, listWithMapValue) > 0);
+    EXPECT_TRUE(CompareRowValues(listWithMapValue, intListValue) < 0);
+}
+
 ////////////////////////////////////////////////////////////////////////////////
 
 TEST(TFormatTest, UnversionedValue)
-- 
cgit v1.2.3


From c56359b9090f00a5a3c40c739daf6848cfc40689 Mon Sep 17 00:00:00 2001
From: robot-piglet <robot-piglet@yandex-team.com>
Date: Tue, 16 Apr 2024 09:37:33 +0300
Subject: Intermediate changes

---
 contrib/python/pg8000/.dist-info/METADATA | 21 +++++++++++++--------
 contrib/python/pg8000/README.md           |  5 +++++
 contrib/python/pg8000/ya.make             |  2 +-
 3 files changed, 19 insertions(+), 9 deletions(-)

diff --git a/contrib/python/pg8000/.dist-info/METADATA b/contrib/python/pg8000/.dist-info/METADATA
index 54299a8c78..ba1c9b0727 100644
--- a/contrib/python/pg8000/.dist-info/METADATA
+++ b/contrib/python/pg8000/.dist-info/METADATA
@@ -1,13 +1,15 @@
-Metadata-Version: 2.1
+Metadata-Version: 2.3
 Name: pg8000
-Version: 1.31.0
+Version: 1.31.1
 Summary: PostgreSQL interface library
-License: BSD 3-Clause License
 Project-URL: Homepage, https://github.com/tlocke/pg8000
-Keywords: postgresql,dbapi
+License: BSD 3-Clause License
+License-File: LICENSE
+Keywords: dbapi,postgresql
 Classifier: Development Status :: 5 - Production/Stable
 Classifier: Intended Audience :: Developers
 Classifier: License :: OSI Approved :: BSD License
+Classifier: Operating System :: OS Independent
 Classifier: Programming Language :: Python
 Classifier: Programming Language :: Python :: 3
 Classifier: Programming Language :: Python :: 3.8
@@ -17,14 +19,12 @@ Classifier: Programming Language :: Python :: 3.11
 Classifier: Programming Language :: Python :: Implementation
 Classifier: Programming Language :: Python :: Implementation :: CPython
 Classifier: Programming Language :: Python :: Implementation :: PyPy
-Classifier: Operating System :: OS Independent
 Classifier: Topic :: Database :: Front-Ends
 Classifier: Topic :: Software Development :: Libraries :: Python Modules
 Requires-Python: >=3.8
+Requires-Dist: python-dateutil>=2.8.2
+Requires-Dist: scramp>=1.4.4
 Description-Content-Type: text/markdown
-License-File: LICENSE
-Requires-Dist: scramp >=1.4.4
-Requires-Dist: python-dateutil >=2.8.2
 
 # pg8000
 
@@ -2068,6 +2068,11 @@ twine upload dist/*
 
 ## Release Notes
 
+### Version 1.31.1, 2024-04-01
+
+- Move to src style layout, and also for packaging use Hatch rather than setuptools. This means that if the source distribution has a directory added to it (as is needed for packaging for OS distributions) the package can still be built.
+
+
 ### Version 1.31.0, 2024-03-31
 
 - Now the `ssl_context` connection parameter can have one of four values:
diff --git a/contrib/python/pg8000/README.md b/contrib/python/pg8000/README.md
index 2583174426..306734221a 100644
--- a/contrib/python/pg8000/README.md
+++ b/contrib/python/pg8000/README.md
@@ -2040,6 +2040,11 @@ twine upload dist/*
 
 ## Release Notes
 
+### Version 1.31.1, 2024-04-01
+
+- Move to src style layout, and also for packaging use Hatch rather than setuptools. This means that if the source distribution has a directory added to it (as is needed for packaging for OS distributions) the package can still be built.
+
+
 ### Version 1.31.0, 2024-03-31
 
 - Now the `ssl_context` connection parameter can have one of four values:
diff --git a/contrib/python/pg8000/ya.make b/contrib/python/pg8000/ya.make
index 49f7c20bfe..33a1150199 100644
--- a/contrib/python/pg8000/ya.make
+++ b/contrib/python/pg8000/ya.make
@@ -2,7 +2,7 @@
 
 PY3_LIBRARY()
 
-VERSION(1.31.0)
+VERSION(1.31.1)
 
 LICENSE(BSD-3-Clause)
 
-- 
cgit v1.2.3


From ea11c4b61ef4e491c701847533ff93d3de81f127 Mon Sep 17 00:00:00 2001
From: vadim-xd <vadim-xd@yandex-team.com>
Date: Tue, 16 Apr 2024 09:38:35 +0300
Subject: Add THttpHeaders constructor from TArrayRef
 351519c01d45a22beceb491029a8f516619673a0

---
 library/cpp/http/io/compression.h    |  1 +
 library/cpp/http/io/headers.cpp      |  7 +++++++
 library/cpp/http/io/headers.h        |  9 +++++++--
 library/cpp/http/io/headers_ut.cpp   | 22 ++++++++++++++++++++++
 library/cpp/http/server/response.cpp |  1 +
 5 files changed, 38 insertions(+), 2 deletions(-)

diff --git a/library/cpp/http/io/compression.h b/library/cpp/http/io/compression.h
index f16c4a18eb..038ac47629 100644
--- a/library/cpp/http/io/compression.h
+++ b/library/cpp/http/io/compression.h
@@ -4,6 +4,7 @@
 
 #include <util/generic/deque.h>
 #include <util/generic/hash.h>
+#include <util/generic/vector.h>
 
 class TCompressionCodecFactory {
 public:
diff --git a/library/cpp/http/io/headers.cpp b/library/cpp/http/io/headers.cpp
index f2baf64021..3f3a5a2d07 100644
--- a/library/cpp/http/io/headers.cpp
+++ b/library/cpp/http/io/headers.cpp
@@ -66,6 +66,13 @@ THttpHeaders::THttpHeaders(IInputStream* stream) {
     }
 }
 
+THttpHeaders::THttpHeaders(TArrayRef<const THttpInputHeader> headers) {
+    for (const auto& header : headers) {
+        AddHeader(header);
+    }
+}
+
+
 bool THttpHeaders::HasHeader(const TStringBuf header) const {
     return FindHeader(header);
 }
diff --git a/library/cpp/http/io/headers.h b/library/cpp/http/io/headers.h
index cfb4a9c054..3ae40683e2 100644
--- a/library/cpp/http/io/headers.h
+++ b/library/cpp/http/io/headers.h
@@ -1,9 +1,10 @@
 #pragma once
 
+#include <util/generic/array_ref.h>
+#include <util/generic/deque.h>
 #include <util/generic/string.h>
 #include <util/generic/strbuf.h>
-#include <util/generic/deque.h>
-#include <util/generic/vector.h>
+#include <util/generic/vector.h>  // XXX unused - remove after fixing transitive includes.
 #include <util/string/cast.h>
 
 class IInputStream;
@@ -65,6 +66,10 @@ public:
     /// Добавляет каждую строку из потока в контейнер, считая ее правильным заголовком.
     THttpHeaders(IInputStream* stream);
 
+    /// Создаёт контейнер из initializer-list'а или массива/вектора хедеров.
+    /// Пример: `THttpHeaders headers({{"Host", "example.com"}});`
+    THttpHeaders(TArrayRef<const THttpInputHeader> headers);
+
     /// Стандартный итератор.
     inline TConstIterator Begin() const noexcept {
         return Headers_.begin();
diff --git a/library/cpp/http/io/headers_ut.cpp b/library/cpp/http/io/headers_ut.cpp
index 1d23ef8fdc..6205efb154 100644
--- a/library/cpp/http/io/headers_ut.cpp
+++ b/library/cpp/http/io/headers_ut.cpp
@@ -44,6 +44,7 @@ bool operator==(const THttpHeaders& lhs, const THeadersExistence& rhs) {
 
 class THttpHeadersTest: public TTestBase {
     UNIT_TEST_SUITE(THttpHeadersTest);
+    UNIT_TEST(TestConstructorFromArrayRef);
     UNIT_TEST(TestAddOperation1Arg);
     UNIT_TEST(TestAddOperation2Args);
     UNIT_TEST(TestAddOrReplaceOperation1Arg);
@@ -57,6 +58,7 @@ private:
     typedef void (*TAddOrReplaceHeaderFunction)(THttpHeaders&, TStringBuf name, TStringBuf value);
 
 public:
+    void TestConstructorFromArrayRef();
     void TestAddOperation1Arg();
     void TestAddOperation2Args();
     void TestAddOrReplaceOperation1Arg();
@@ -87,6 +89,26 @@ private:
 
 UNIT_TEST_SUITE_REGISTRATION(THttpHeadersTest);
 
+void THttpHeadersTest::TestConstructorFromArrayRef() {
+    THeadersExistence expected;
+    expected.Add("h1", "v1");
+    expected.Add("h2", "v2");
+
+    // Construct from vector
+    TVector<THttpInputHeader> headerVec{
+        {"h1", "v1"},
+        {"h2", "v2"}
+    };
+    THttpHeaders h1(headerVec);
+    UNIT_ASSERT(expected == h1);
+
+    // Construct from initializer list
+    THttpHeaders h2({
+        {"h1", "v1"},
+        {"h2", "v2"}
+    });
+    UNIT_ASSERT(expected == h2);
+}
 void THttpHeadersTest::TestAddOperation1Arg() {
     DoTestAddOperation(AddHeaderImpl1Arg);
 }
diff --git a/library/cpp/http/server/response.cpp b/library/cpp/http/server/response.cpp
index 52d64c91ce..ff4d3e07f3 100644
--- a/library/cpp/http/server/response.cpp
+++ b/library/cpp/http/server/response.cpp
@@ -1,5 +1,6 @@
 #include "response.h"
 
+#include <util/generic/vector.h>
 #include <util/stream/output.h>
 #include <util/stream/mem.h>
 #include <util/string/cast.h>
-- 
cgit v1.2.3


From 809381bd6192d163943c29afc83eb767f9d47816 Mon Sep 17 00:00:00 2001
From: don-dron <don-dron@yandex-team.com>
Date: Tue, 16 Apr 2024 10:37:46 +0300
Subject: YT-21547: Correct merge jobs memory tracking
 6b9345b8c85297ce584b5635b932d54d256fb136

---
 yt/yt/core/bus/tcp/packet.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/yt/yt/core/bus/tcp/packet.cpp b/yt/yt/core/bus/tcp/packet.cpp
index 1ed6f6f6c5..3ec57dc9c4 100644
--- a/yt/yt/core/bus/tcp/packet.cpp
+++ b/yt/yt/core/bus/tcp/packet.cpp
@@ -343,7 +343,7 @@ private:
             } else if (partSize == 0) {
                 Parts_.push_back(TSharedRef::MakeEmpty());
             } else {
-                TSharedMutableRef part = TSharedMutableRef::Allocate(partSize);
+                TSharedMutableRef part = TSharedMutableRef::Allocate<TPacketDecoderTag>(partSize);
                 BeginPhase(EPacketPhase::MessagePart, part.Begin(), part.Size());
                 Parts_.push_back(std::move(part));
                 break;
-- 
cgit v1.2.3


From 1ba89ae2ee4685aba10cbfcfad9d4046df032dc6 Mon Sep 17 00:00:00 2001
From: robot-ya-builder <robot-ya-builder@yandex-team.com>
Date: Tue, 16 Apr 2024 10:58:09 +0300
Subject: Automatic release build for ya_bin3, ya_bin, os_ya, test_tool,
 os_test_tool

From hash: [77678436baec7010c81bc8e061c8cc4897095a53](https://a.yandex-team.ru/arcadia/commit/77678436baec7010c81bc8e061c8cc4897095a53)
From revision: [13856583](https://a.yandex-team.ru/arcadia/commit/rXXXXXX)
[CI flow](https://a.yandex-team.ru/projects/ya_make/ci/releases/flow?dir=devtools%2Fya&id=release-ya-bin2-ya-bin3-tts&version=384)
Flow triggered by user: [robot-ci](https://staff.yandex-team.ru/robot-ci)

Update tools: ya_bin3, ya_bin, os_ya, test_tool, os_test_tool
e28f1834c8581ec67a59e055e4ef16fdbb9861f4
---
 build/mapping.conf.json                      |  4 ++++
 build/platform/test_tool/host.ya.make.inc    | 10 +++++-----
 build/platform/test_tool/host_os.ya.make.inc | 10 +++++-----
 ya                                           | 20 ++++++++++----------
 4 files changed, 24 insertions(+), 20 deletions(-)

diff --git a/build/mapping.conf.json b/build/mapping.conf.json
index a6d691927d..0c003b8220 100644
--- a/build/mapping.conf.json
+++ b/build/mapping.conf.json
@@ -196,6 +196,8 @@
         "6095438622": "https://devtools-registry.s3.yandex.net/6095438622",
         "6101882623": "https://devtools-registry.s3.yandex.net/6101882623",
         "6101888639": "https://devtools-registry.s3.yandex.net/6101888639",
+        "6178087411": "https://devtools-registry.s3.yandex.net/6178087411",
+        "6178098368": "https://devtools-registry.s3.yandex.net/6178098368",
         "5486731632": "https://devtools-registry.s3.yandex.net/5486731632",
         "5514350352": "https://devtools-registry.s3.yandex.net/5514350352",
         "5514360398": "https://devtools-registry.s3.yandex.net/5514360398",
@@ -646,6 +648,8 @@
         "6095438622": "devtools/ya/test/programs/test_tool/bin/test_tool for linux",
         "6101882623": "devtools/ya/test/programs/test_tool/bin/test_tool for linux",
         "6101888639": "devtools/ya/test/programs/test_tool/bin/test_tool for linux",
+        "6178087411": "devtools/ya/test/programs/test_tool/bin/test_tool for linux",
+        "6178098368": "devtools/ya/test/programs/test_tool/bin/test_tool for linux",
         "5486731632": "devtools/ya/test/programs/test_tool/bin3/test_tool3 for linux",
         "5514350352": "devtools/ya/test/programs/test_tool/bin3/test_tool3 for linux",
         "5514360398": "devtools/ya/test/programs/test_tool/bin3/test_tool3 for linux",
diff --git a/build/platform/test_tool/host.ya.make.inc b/build/platform/test_tool/host.ya.make.inc
index 5c08a611c7..fbf208b66b 100644
--- a/build/platform/test_tool/host.ya.make.inc
+++ b/build/platform/test_tool/host.ya.make.inc
@@ -1,12 +1,12 @@
 IF (HOST_OS_DARWIN AND HOST_ARCH_X86_64)
-    DECLARE_EXTERNAL_RESOURCE(TEST_TOOL_HOST sbr:6101880269)
+    DECLARE_EXTERNAL_RESOURCE(TEST_TOOL_HOST sbr:6178086204)
 ELSEIF (HOST_OS_DARWIN AND HOST_ARCH_ARM64)
-    DECLARE_EXTERNAL_RESOURCE(TEST_TOOL_HOST sbr:6101879402)
+    DECLARE_EXTERNAL_RESOURCE(TEST_TOOL_HOST sbr:6178085688)
 ELSEIF (HOST_OS_LINUX AND HOST_ARCH_X86_64)
-    DECLARE_EXTERNAL_RESOURCE(TEST_TOOL_HOST sbr:6101882623)
+    DECLARE_EXTERNAL_RESOURCE(TEST_TOOL_HOST sbr:6178087411)
 ELSEIF (HOST_OS_LINUX AND HOST_ARCH_AARCH64)
-    DECLARE_EXTERNAL_RESOURCE(TEST_TOOL_HOST sbr:6101878379)
+    DECLARE_EXTERNAL_RESOURCE(TEST_TOOL_HOST sbr:6178084953)
 ELSEIF (HOST_OS_WINDOWS AND HOST_ARCH_X86_64)
-    DECLARE_EXTERNAL_RESOURCE(TEST_TOOL_HOST sbr:6101881365)
+    DECLARE_EXTERNAL_RESOURCE(TEST_TOOL_HOST sbr:6178086753)
 
 ENDIF()
diff --git a/build/platform/test_tool/host_os.ya.make.inc b/build/platform/test_tool/host_os.ya.make.inc
index 53ed9b91a7..58078b1f70 100644
--- a/build/platform/test_tool/host_os.ya.make.inc
+++ b/build/platform/test_tool/host_os.ya.make.inc
@@ -1,12 +1,12 @@
 IF (HOST_OS_DARWIN AND HOST_ARCH_X86_64)
-    DECLARE_EXTERNAL_RESOURCE(TEST_TOOL_HOST sbr:6101887681)
+    DECLARE_EXTERNAL_RESOURCE(TEST_TOOL_HOST sbr:6178096241)
 ELSEIF (HOST_OS_DARWIN AND HOST_ARCH_ARM64)
-    DECLARE_EXTERNAL_RESOURCE(TEST_TOOL_HOST sbr:6101887336)
+    DECLARE_EXTERNAL_RESOURCE(TEST_TOOL_HOST sbr:6178095381)
 ELSEIF (HOST_OS_LINUX AND HOST_ARCH_X86_64)
-    DECLARE_EXTERNAL_RESOURCE(TEST_TOOL_HOST sbr:6101888639)
+    DECLARE_EXTERNAL_RESOURCE(TEST_TOOL_HOST sbr:6178098368)
 ELSEIF (HOST_OS_LINUX AND HOST_ARCH_AARCH64)
-    DECLARE_EXTERNAL_RESOURCE(TEST_TOOL_HOST sbr:6101887021)
+    DECLARE_EXTERNAL_RESOURCE(TEST_TOOL_HOST sbr:6178093908)
 ELSEIF (HOST_OS_WINDOWS AND HOST_ARCH_X86_64)
-    DECLARE_EXTERNAL_RESOURCE(TEST_TOOL_HOST sbr:6101888065)
+    DECLARE_EXTERNAL_RESOURCE(TEST_TOOL_HOST sbr:6178097157)
 
 ENDIF()
diff --git a/ya b/ya
index 1e157c67d9..fb1608e7a2 100755
--- a/ya
+++ b/ya
@@ -39,33 +39,33 @@ REGISTRY_ENDPOINT = os.environ.get("YA_REGISTRY_ENDPOINT", "https://devtools-reg
 PLATFORM_MAP = {
     "data": {
         "darwin": {
-            "md5": "6f762e13da34828f7fd4a4672be7e981",
+            "md5": "45c63c225f789d33a465ae3d5b64f7ef",
             "urls": [
-                f"{REGISTRY_ENDPOINT}/6101898819"
+                f"{REGISTRY_ENDPOINT}/6178064410"
             ]
         },
         "darwin-arm64": {
-            "md5": "8152e31860aad91e6c9e92067eb0b6d5",
+            "md5": "e6f6dbc072ff1872a9d5fb9324ea1d31",
             "urls": [
-                f"{REGISTRY_ENDPOINT}/6101898133"
+                f"{REGISTRY_ENDPOINT}/6178063973"
             ]
         },
         "linux-aarch64": {
-            "md5": "ddf207204081fd69480988f22380cc54",
+            "md5": "ad86306e4e3658cd8cfc95292d7b5a10",
             "urls": [
-                f"{REGISTRY_ENDPOINT}/6101897244"
+                f"{REGISTRY_ENDPOINT}/6178063478"
             ]
         },
         "win32-clang-cl": {
-            "md5": "566b84ccf82f6e218b2895a6fa2c9a36",
+            "md5": "f4df6cde99415f82f3ec5827918b65e4",
             "urls": [
-                f"{REGISTRY_ENDPOINT}/6101899455"
+                f"{REGISTRY_ENDPOINT}/6178065184"
             ]
         },
         "linux": {
-            "md5": "eb5dc578dc89cda0a4c5a5578cfc6dbf",
+            "md5": "38099bfe05628c5a677631730558333a",
             "urls": [
-                f"{REGISTRY_ENDPOINT}/6101900200"
+                f"{REGISTRY_ENDPOINT}/6178066131"
             ]
         }
     }
-- 
cgit v1.2.3


From 0a63d9ddc516f206f2b8745ce5e5dfa60190d755 Mon Sep 17 00:00:00 2001
From: hiddenpath <hiddenpath@yandex-team.com>
Date: Tue, 16 Apr 2024 11:32:14 +0300
Subject: Fix trace output on libcxxrt c0b42ab5c88a5672e8030ef0f9145453c938462b

---
 contrib/libs/cxxsupp/libcxxrt/atomic.h | 2 +-
 contrib/libs/cxxsupp/libcxxrt/ya.make  | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/contrib/libs/cxxsupp/libcxxrt/atomic.h b/contrib/libs/cxxsupp/libcxxrt/atomic.h
index 701d05337c..0768c08038 100644
--- a/contrib/libs/cxxsupp/libcxxrt/atomic.h
+++ b/contrib/libs/cxxsupp/libcxxrt/atomic.h
@@ -56,7 +56,7 @@ namespace
 		/**
 		 * Constructor, takes a value.
 		 */
-		atomic(T init) : val(init) {}
+		constexpr atomic(T init) : val(init) {}
 
 		/**
 		 * Atomically load with the specified memory order.
diff --git a/contrib/libs/cxxsupp/libcxxrt/ya.make b/contrib/libs/cxxsupp/libcxxrt/ya.make
index 61ba8cd058..5efd7d01d9 100644
--- a/contrib/libs/cxxsupp/libcxxrt/ya.make
+++ b/contrib/libs/cxxsupp/libcxxrt/ya.make
@@ -11,9 +11,9 @@ LICENSE(
 
 LICENSE_TEXTS(.yandex_meta/licenses.list.txt)
 
-VERSION(2024-02-06)
+VERSION(2024-04-15)
 
-ORIGINAL_SOURCE(https://github.com/libcxxrt/libcxxrt/archive/bd4fa85d7f772f2ad32146d5681c91612fc93842.tar.gz)
+ORIGINAL_SOURCE(https://github.com/libcxxrt/libcxxrt/archive/25541e312f7094e9c90895000d435af520d42418.tar.gz)
 
 ADDINCL(
     contrib/libs/cxxsupp/libcxxrt
-- 
cgit v1.2.3