MCPcopy Index your code
hub / github.com/pathwaycom/pathway / _augment_postgres_settings

Function _augment_postgres_settings

python/pathway/io/postgres/__init__.py:131–142  ·  view source on GitHub ↗

Return a copy of ``settings`` with the Pathway Live Data Framework-managed defaults (``application_name`` and TCP-keepalive tuning) injected for any key the user did not provide. The user's explicit values always win — :py:meth:`dict.setdefault` is the explicit Python idiom for "set

(settings: dict, unique_name: str | None)

Source from the content-addressed store, hash-verified

129
130
131def _augment_postgres_settings(settings: dict, unique_name: str | None) -> dict:
132 """Return a copy of ``settings`` with the Pathway Live Data Framework-managed defaults
133 (``application_name`` and TCP-keepalive tuning) injected for any
134 key the user did not provide. The user's explicit values always
135 win — :py:meth:`dict.setdefault` is the explicit Python idiom for
136 "set if absent" and is what we rely on here.
137 """
138 augmented = dict(settings)
139 augmented.setdefault("application_name", _build_application_name(unique_name))
140 for key, value in _LIBPQ_TIMEOUT_DEFAULTS.items():
141 augmented.setdefault(key, value)
142 return augmented
143
144
145def _connection_string_from_settings(settings: dict):

Callers 4

readFunction · 0.85
writeFunction · 0.85
write_snapshotFunction · 0.85

Calls 2

_build_application_nameFunction · 0.85
itemsMethod · 0.80