Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: support (ignore) show and set search_path #288

Merged
merged 10 commits into from
Jul 24, 2022

Conversation

olavloite
Copy link
Collaborator

@olavloite olavloite commented Jul 19, 2022

Adds support for show search_path. The statement is executed locally and returns the static value "$user", <current_schema>. set search_path is also supported for a very limited set of statements. This feature will be removed when the Connection API supports search_path.

This statement is known to be used by Liquibase.

@codecov
Copy link

codecov bot commented Jul 19, 2022

Codecov Report

Merging #288 (5d62530) into postgresql-dialect (6d90366) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@                  Coverage Diff                  @@
##             postgresql-dialect     #288   +/-   ##
=====================================================
  Coverage                 82.69%   82.70%           
- Complexity                 1315     1320    +5     
=====================================================
  Files                       107      109    +2     
  Lines                      4554     4568   +14     
  Branches                    568      568           
=====================================================
+ Hits                       3766     3778   +12     
- Misses                      601      602    +1     
- Partials                    187      188    +1     
Flag Coverage Δ
all_tests 82.70% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...ud/spanner/pgadapter/utils/ClientAutoDetector.java 92.68% <ø> (ø)
...spanner/pgadapter/wireprotocol/ControlMessage.java 87.11% <ø> (-1.04%) ⬇️
...panner/pgadapter/statements/BackendConnection.java 90.93% <100.00%> (ø)
...apter/statements/local/SetSearchPathStatement.java 100.00% <100.00%> (ø)
...pter/statements/local/ShowSearchPathStatement.java 100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us.

@olavloite olavloite changed the title feat: support show search_path feat: support show and set search_path Jul 23, 2022
@olavloite olavloite changed the title feat: support show and set search_path feat: support (ignore) show and set search_path Jul 23, 2022
@olavloite olavloite merged commit 93d8c14 into postgresql-dialect Jul 24, 2022
@olavloite olavloite deleted the show-search-path branch July 24, 2022 10:26
pratickchokhani pushed a commit that referenced this pull request Jul 25, 2022
* feat: support show search_path

* fix: only include public in search path

* feat: add support for set search_path

* feat: add support for set search_path

* fix: remove special handling of UNKNOWN

We can safely remove the special handling of UNKNOWN statements, as the case where
there is no command tag is already handled at the beginning of the method.

* docs: add todo to remove later
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant