Skip to content

Commit 65e7d51

Browse files
authored
Fix issue with Postgres 10 (#138)
* 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
1 parent afc61ee commit 65e7d51

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

django_sql_dashboard/views.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ def _dashboard_index(
159159
)
160160
select
161161
information_schema.columns.table_name,
162-
array_to_json(array_agg(column_name order by ordinal_position)) as columns
162+
array_to_json(array_agg(cast(column_name as text) order by ordinal_position)) as columns
163163
from
164164
information_schema.columns
165165
join

docs/contributing.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
To contribute to this library, first checkout the code. Then create a new virtual environment:
44

55
cd django-sql-dashboard
6-
python -mvenv venv
6+
python -m venv venv
77
source venv/bin/activate
88

99
Or if you are using `pipenv`:

0 commit comments

Comments
 (0)