Merge pull request #813 from pnomolos/issue_453_pg_json_equality_note
Add a note about DISTINCT and PostgreSQL json columns.
This commit is contained in:
commit
3a155bcfb5
|
@ -492,6 +492,14 @@ def index
|
|||
end
|
||||
```
|
||||
|
||||
#### `PG::UndefinedFunction: ERROR: could not identify an equality operator for type json`
|
||||
|
||||
If you get the above error while using `distinct: true` that means that
|
||||
one of the columns that Ransack is selecting is a `json` column.
|
||||
PostgreSQL does not provide comparison operators for the `json` type. While
|
||||
it is possible to work around this, in practice it's much better to convert those
|
||||
to `jsonb`, as [recommended by the PostgreSQL documentation](https://www.postgresql.org/docs/9.6/static/datatype-json.html).
|
||||
|
||||
### Authorization (whitelisting/blacklisting)
|
||||
|
||||
By default, searching and sorting are authorized on any column of your model
|
||||
|
|
Loading…
Reference in New Issue