diff --git a/AUTHORS b/AUTHORS index aef249cef..4af9adf66 100644 --- a/AUTHORS +++ b/AUTHORS @@ -148,6 +148,7 @@ Contributors: * Charalampos Stratakis * Laszlo Bimba (bimlas) * Anjanna + * Shayan Golshani (shgol) Creator: -------- diff --git a/changelog.rst b/changelog.rst index 4d2f529b2..5875bff01 100644 --- a/changelog.rst +++ b/changelog.rst @@ -20,6 +20,7 @@ Bug fixes: * Fix trailing SQL comments preventing query submission and execution. * ``SELECT 1; -- note`` now submits correctly in multiline mode * ``rstrip(";")`` in ``pgexecute.py`` now handles comments after the semicolon +* Fix completion crash when tables are created during refresh. 4.4.0 (2025-12-24) ================== diff --git a/pgcli/pgcompleter.py b/pgcli/pgcompleter.py index ced0f1687..7430be3c4 100644 --- a/pgcli/pgcompleter.py +++ b/pgcli/pgcompleter.py @@ -229,6 +229,8 @@ def extend_columns(self, column_data, kind): has_default=has_default, default=default, ) + metadata.setdefault(schema, {}) + metadata[schema].setdefault(relname, OrderedDict()) metadata[schema][relname][colname] = column self.all_completions.add(colname)