Skip to content

Commit

Permalink
Merge pull request #1 from OpenPathView/upstream_fixes
Browse files Browse the repository at this point in the history
Follow upstream updates
  • Loading branch information
Benvii authored Apr 30, 2018
2 parents ba1c44b + e426160 commit f69dd48
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,4 @@ pg-dump-filtered "postgres://user:pwd@host/db" "tableA,tableB" --debug --filters

For [Open Path View](https://openpathview.fr) whe needed to export small set a data depending on their geolocalisation and list some row of the exported datas (files UUID as files where saved in the database).

```python
TODO
```
You can see how to use if in the [main CLI entry point](pg_dump_filtered/__main__.py).
2 changes: 1 addition & 1 deletion pg_dump_filtered/helpers/request_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ def generate_select_statement(self, from_table_name: str, displayed_fields_table
"""
where = "" if where_filter == "" or where_filter is None else " WHERE " + where_filter

req = """SELECT {displayed_fields_table_name}.* FROM {from_table_name} {join_statements} {where} """.format(
req = """SELECT DISTINCT {displayed_fields_table_name}.* FROM {from_table_name} {join_statements} {where} """.format(
displayed_fields_table_name=displayed_fields_table_name,
from_table_name=from_table_name,
join_statements=join_statements,
Expand Down

0 comments on commit f69dd48

Please sign in to comment.