├── .git-blame-ignore-revs ├── .github └── workflows │ ├── dependency-review.yml │ ├── publish.yml │ ├── test.yml │ └── timescaledb.yml ├── .gitignore ├── CHANGELOG.md ├── CODEOWNERS ├── CONTRIBUTING.md ├── LICENSE ├── README.md ├── REFERENCE.md ├── SECURITY.md ├── gendoc ├── pylintrc ├── pyproject.toml ├── renovate.json ├── requirements-dev.txt ├── requirements.txt ├── setup.cfg ├── setup.py ├── shell.nix ├── src └── pgspot │ ├── __init__.py │ ├── __main__.py │ ├── cli.py │ ├── codes.py │ ├── formatters.py │ ├── path.py │ ├── pg_catalog │ ├── __init__.py │ └── format.py │ ├── plpgsql.py │ ├── state.py │ └── visitors.py ├── testdata ├── aggregate_tracking.sql ├── cast.sql ├── created_schema.sql ├── createfunc.sql ├── do.sql ├── dyn_foreach.sql ├── exists.sql ├── expected │ ├── aggregate_tracking.out │ ├── cast.out │ ├── created_schema.out │ ├── createfunc.out │ ├── do.out │ ├── dyn_foreach.out │ ├── exists.out │ ├── foreach_array.out │ ├── loop.out │ ├── nested_searchpath.out │ ├── operator.out │ ├── plpgsql_function.out │ ├── ps009-simplified-case.out │ ├── range_function.out │ ├── replace.out │ ├── return_query.out │ ├── search_path.out │ ├── security_definer.out │ ├── set_local.out │ ├── sql_function.out │ ├── unqualified_cte.out │ └── while.out ├── foreach_array.sql ├── loop.sql ├── nested_searchpath.sql ├── operator.sql ├── plpgsql_function.sql ├── ps009-simplified-case.sql ├── range_function.sql ├── replace.sql ├── return_query.sql ├── search_path.sql ├── security_definer.sql ├── set_local.sql ├── sql_function.sql ├── unqualified_cte.sql └── while.sql ├── tests ├── create_aggregate_test.py ├── format_string_test.py ├── global_ignore_test.py ├── ignore_lang_test.py ├── plpgsql_path_if_test.py ├── plpgsql_path_loop_test.py ├── plpgsql_paths_test.py ├── search_path_test.py ├── snapshot_test.py ├── sql_accepting_function_test.py └── util.py └── tox.ini /.git-blame-ignore-revs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/timescale/pgspot/HEAD/.git-blame-ignore-revs -------------------------------------------------------------------------------- /.github/workflows/dependency-review.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/timescale/pgspot/HEAD/.github/workflows/dependency-review.yml -------------------------------------------------------------------------------- /.github/workflows/publish.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/timescale/pgspot/HEAD/.github/workflows/publish.yml -------------------------------------------------------------------------------- /.github/workflows/test.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/timescale/pgspot/HEAD/.github/workflows/test.yml -------------------------------------------------------------------------------- /.github/workflows/timescaledb.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/timescale/pgspot/HEAD/.github/workflows/timescaledb.yml -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/timescale/pgspot/HEAD/.gitignore -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/timescale/pgspot/HEAD/CHANGELOG.md -------------------------------------------------------------------------------- /CODEOWNERS: -------------------------------------------------------------------------------- 1 | 2 | * @svenklemm 3 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/timescale/pgspot/HEAD/CONTRIBUTING.md -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/timescale/pgspot/HEAD/LICENSE -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/timescale/pgspot/HEAD/README.md -------------------------------------------------------------------------------- /REFERENCE.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/timescale/pgspot/HEAD/REFERENCE.md -------------------------------------------------------------------------------- /SECURITY.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/timescale/pgspot/HEAD/SECURITY.md -------------------------------------------------------------------------------- /gendoc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/timescale/pgspot/HEAD/gendoc -------------------------------------------------------------------------------- /pylintrc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/timescale/pgspot/HEAD/pylintrc -------------------------------------------------------------------------------- /pyproject.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/timescale/pgspot/HEAD/pyproject.toml -------------------------------------------------------------------------------- /renovate.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/timescale/pgspot/HEAD/renovate.json -------------------------------------------------------------------------------- /requirements-dev.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/timescale/pgspot/HEAD/requirements-dev.txt -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | pglast==7.10 2 | -------------------------------------------------------------------------------- /setup.cfg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/timescale/pgspot/HEAD/setup.cfg -------------------------------------------------------------------------------- /setup.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/timescale/pgspot/HEAD/setup.py -------------------------------------------------------------------------------- /shell.nix: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/timescale/pgspot/HEAD/shell.nix -------------------------------------------------------------------------------- /src/pgspot/__init__.py: -------------------------------------------------------------------------------- 1 | __version__ = "0.9.1" 2 | -------------------------------------------------------------------------------- /src/pgspot/__main__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/timescale/pgspot/HEAD/src/pgspot/__main__.py -------------------------------------------------------------------------------- /src/pgspot/cli.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/timescale/pgspot/HEAD/src/pgspot/cli.py -------------------------------------------------------------------------------- /src/pgspot/codes.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/timescale/pgspot/HEAD/src/pgspot/codes.py -------------------------------------------------------------------------------- /src/pgspot/formatters.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/timescale/pgspot/HEAD/src/pgspot/formatters.py -------------------------------------------------------------------------------- /src/pgspot/path.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/timescale/pgspot/HEAD/src/pgspot/path.py -------------------------------------------------------------------------------- /src/pgspot/pg_catalog/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/pgspot/pg_catalog/format.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/timescale/pgspot/HEAD/src/pgspot/pg_catalog/format.py -------------------------------------------------------------------------------- /src/pgspot/plpgsql.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/timescale/pgspot/HEAD/src/pgspot/plpgsql.py -------------------------------------------------------------------------------- /src/pgspot/state.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/timescale/pgspot/HEAD/src/pgspot/state.py -------------------------------------------------------------------------------- /src/pgspot/visitors.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/timescale/pgspot/HEAD/src/pgspot/visitors.py -------------------------------------------------------------------------------- /testdata/aggregate_tracking.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/timescale/pgspot/HEAD/testdata/aggregate_tracking.sql -------------------------------------------------------------------------------- /testdata/cast.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/timescale/pgspot/HEAD/testdata/cast.sql -------------------------------------------------------------------------------- /testdata/created_schema.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/timescale/pgspot/HEAD/testdata/created_schema.sql -------------------------------------------------------------------------------- /testdata/createfunc.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/timescale/pgspot/HEAD/testdata/createfunc.sql -------------------------------------------------------------------------------- /testdata/do.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/timescale/pgspot/HEAD/testdata/do.sql -------------------------------------------------------------------------------- /testdata/dyn_foreach.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/timescale/pgspot/HEAD/testdata/dyn_foreach.sql -------------------------------------------------------------------------------- /testdata/exists.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/timescale/pgspot/HEAD/testdata/exists.sql -------------------------------------------------------------------------------- /testdata/expected/aggregate_tracking.out: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/timescale/pgspot/HEAD/testdata/expected/aggregate_tracking.out -------------------------------------------------------------------------------- /testdata/expected/cast.out: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/timescale/pgspot/HEAD/testdata/expected/cast.out -------------------------------------------------------------------------------- /testdata/expected/created_schema.out: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/timescale/pgspot/HEAD/testdata/expected/created_schema.out -------------------------------------------------------------------------------- /testdata/expected/createfunc.out: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/timescale/pgspot/HEAD/testdata/expected/createfunc.out -------------------------------------------------------------------------------- /testdata/expected/do.out: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/timescale/pgspot/HEAD/testdata/expected/do.out -------------------------------------------------------------------------------- /testdata/expected/dyn_foreach.out: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/timescale/pgspot/HEAD/testdata/expected/dyn_foreach.out -------------------------------------------------------------------------------- /testdata/expected/exists.out: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/timescale/pgspot/HEAD/testdata/expected/exists.out -------------------------------------------------------------------------------- /testdata/expected/foreach_array.out: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/timescale/pgspot/HEAD/testdata/expected/foreach_array.out -------------------------------------------------------------------------------- /testdata/expected/loop.out: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/timescale/pgspot/HEAD/testdata/expected/loop.out -------------------------------------------------------------------------------- /testdata/expected/nested_searchpath.out: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/timescale/pgspot/HEAD/testdata/expected/nested_searchpath.out -------------------------------------------------------------------------------- /testdata/expected/operator.out: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/timescale/pgspot/HEAD/testdata/expected/operator.out -------------------------------------------------------------------------------- /testdata/expected/plpgsql_function.out: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/timescale/pgspot/HEAD/testdata/expected/plpgsql_function.out -------------------------------------------------------------------------------- /testdata/expected/ps009-simplified-case.out: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/timescale/pgspot/HEAD/testdata/expected/ps009-simplified-case.out -------------------------------------------------------------------------------- /testdata/expected/range_function.out: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/timescale/pgspot/HEAD/testdata/expected/range_function.out -------------------------------------------------------------------------------- /testdata/expected/replace.out: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/timescale/pgspot/HEAD/testdata/expected/replace.out -------------------------------------------------------------------------------- /testdata/expected/return_query.out: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/timescale/pgspot/HEAD/testdata/expected/return_query.out -------------------------------------------------------------------------------- /testdata/expected/search_path.out: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/timescale/pgspot/HEAD/testdata/expected/search_path.out -------------------------------------------------------------------------------- /testdata/expected/security_definer.out: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/timescale/pgspot/HEAD/testdata/expected/security_definer.out -------------------------------------------------------------------------------- /testdata/expected/set_local.out: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/timescale/pgspot/HEAD/testdata/expected/set_local.out -------------------------------------------------------------------------------- /testdata/expected/sql_function.out: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/timescale/pgspot/HEAD/testdata/expected/sql_function.out -------------------------------------------------------------------------------- /testdata/expected/unqualified_cte.out: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/timescale/pgspot/HEAD/testdata/expected/unqualified_cte.out -------------------------------------------------------------------------------- /testdata/expected/while.out: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/timescale/pgspot/HEAD/testdata/expected/while.out -------------------------------------------------------------------------------- /testdata/foreach_array.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/timescale/pgspot/HEAD/testdata/foreach_array.sql -------------------------------------------------------------------------------- /testdata/loop.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/timescale/pgspot/HEAD/testdata/loop.sql -------------------------------------------------------------------------------- /testdata/nested_searchpath.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/timescale/pgspot/HEAD/testdata/nested_searchpath.sql -------------------------------------------------------------------------------- /testdata/operator.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/timescale/pgspot/HEAD/testdata/operator.sql -------------------------------------------------------------------------------- /testdata/plpgsql_function.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/timescale/pgspot/HEAD/testdata/plpgsql_function.sql -------------------------------------------------------------------------------- /testdata/ps009-simplified-case.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/timescale/pgspot/HEAD/testdata/ps009-simplified-case.sql -------------------------------------------------------------------------------- /testdata/range_function.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/timescale/pgspot/HEAD/testdata/range_function.sql -------------------------------------------------------------------------------- /testdata/replace.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/timescale/pgspot/HEAD/testdata/replace.sql -------------------------------------------------------------------------------- /testdata/return_query.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/timescale/pgspot/HEAD/testdata/return_query.sql -------------------------------------------------------------------------------- /testdata/search_path.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/timescale/pgspot/HEAD/testdata/search_path.sql -------------------------------------------------------------------------------- /testdata/security_definer.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/timescale/pgspot/HEAD/testdata/security_definer.sql -------------------------------------------------------------------------------- /testdata/set_local.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/timescale/pgspot/HEAD/testdata/set_local.sql -------------------------------------------------------------------------------- /testdata/sql_function.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/timescale/pgspot/HEAD/testdata/sql_function.sql -------------------------------------------------------------------------------- /testdata/unqualified_cte.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/timescale/pgspot/HEAD/testdata/unqualified_cte.sql -------------------------------------------------------------------------------- /testdata/while.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/timescale/pgspot/HEAD/testdata/while.sql -------------------------------------------------------------------------------- /tests/create_aggregate_test.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/timescale/pgspot/HEAD/tests/create_aggregate_test.py -------------------------------------------------------------------------------- /tests/format_string_test.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/timescale/pgspot/HEAD/tests/format_string_test.py -------------------------------------------------------------------------------- /tests/global_ignore_test.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/timescale/pgspot/HEAD/tests/global_ignore_test.py -------------------------------------------------------------------------------- /tests/ignore_lang_test.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/timescale/pgspot/HEAD/tests/ignore_lang_test.py -------------------------------------------------------------------------------- /tests/plpgsql_path_if_test.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/timescale/pgspot/HEAD/tests/plpgsql_path_if_test.py -------------------------------------------------------------------------------- /tests/plpgsql_path_loop_test.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/timescale/pgspot/HEAD/tests/plpgsql_path_loop_test.py -------------------------------------------------------------------------------- /tests/plpgsql_paths_test.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/timescale/pgspot/HEAD/tests/plpgsql_paths_test.py -------------------------------------------------------------------------------- /tests/search_path_test.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/timescale/pgspot/HEAD/tests/search_path_test.py -------------------------------------------------------------------------------- /tests/snapshot_test.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/timescale/pgspot/HEAD/tests/snapshot_test.py -------------------------------------------------------------------------------- /tests/sql_accepting_function_test.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/timescale/pgspot/HEAD/tests/sql_accepting_function_test.py -------------------------------------------------------------------------------- /tests/util.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/timescale/pgspot/HEAD/tests/util.py -------------------------------------------------------------------------------- /tox.ini: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/timescale/pgspot/HEAD/tox.ini --------------------------------------------------------------------------------