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
Fix issue with Postgres 10 #138
Conversation
When using Postgres 10 the `information_schema.columns.column_name` needs to be cast as text. Otherwise, an error is generated which states: ``` could not find array type for data type information_schema.sql_identifier ```
Fixed issue with Postgres 10
There was a missing space between the -m and venv that could lead to confusion for new contributors
Thanks for figuring this out! |
It would be great to have the GitHub Actions workflow run tests against multiple PostgreSQL versions to catch this kind of thing in the future https://github.com/simonw/django-sql-dashboard/blob/main/.github/workflows/test.yml |
@simonw no problem! Sorry if the commit history looks wonky. As I was working through the contribution guidelines I found a typo which I fixed, but had messed up all of the branches on my local version and was trying to undo and redo and ... well, it's a holiday Sunday and I think it's time I go enjoy time with my family! Cheers! |
* Fixed issue with Postgres 10 When using Postgres 10 the `information_schema.columns.column_name` needs to be cast as text. Otherwise, an error is generated which states: ``` could not find array type for data type information_schema.sql_identifier ``` * Fixed typo There was a missing space between the -m and venv that could lead to confusion for new contributors
Ryan wrote about this fix here: https://www.ryancheley.com/2021/07/09/contributing-to-django-sql-dashboard/ |
When using version 1.0 on Ubuntu 18.04 with Postgres 10.17 an Internal Server (500) error is generated.
I traced this back to the change made for version 1.0 on line 162 (see compared diff here)
The
array_agg
will throw the errorcasting the
column_name
field to text resolves this issue for Postgres 10.I did run the tests locally and 88 passed with 2 warnings. The warnings were: