-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
postgres: current_schema: converting NULL to string is unsupported (empty search_path is NULL) #696
Comments
Same as #692 which was closed |
Hi @disq I am stucked in this issue..What may be the causes for this issue? Cant find any solution.. |
soyayaos
added a commit
to soyayaos/migrate
that referenced
this issue
Apr 6, 2023
fixed in #914 |
dhui
added a commit
that referenced
this issue
Apr 7, 2023
fix: postgresql search_path can be empty (#696)
Thanks @soyayaos for the fix! Closing this issue for now. Please reopen this if it's still not fixed |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the Bug
If the search_path is empty,
CURRENT_SCHEMA()
returnsNULL
but the reader tries to read a string so it fails with:Steps to Reproduce
Steps to reproduce the behavior:
Expected Behavior
Fail better returning
ErrNoSchema
, inmigrate/database/postgres/postgres.go
Line 99 in 14f6d3a
Migrate Version
v4.15.0
Loaded Database Drivers
postgres
Go Version
go version go1.17.2 darwin/arm64
Additional context
Should just scan into
*string
allowing nulls to work.The text was updated successfully, but these errors were encountered: