Skip to content

Cannot analyze/select queries with Postgres arrays in params #747

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

Open
frgtn opened this issue Sep 4, 2015 · 3 comments
Open

Cannot analyze/select queries with Postgres arrays in params #747

frgtn opened this issue Sep 4, 2015 · 3 comments
Labels

Comments

@frgtn
Copy link

frgtn commented Sep 4, 2015

DjDT currently doesn't support PostgreSQL Array syntax and returns 500 when trying to analyze or reselect queries that contain Postgres arrays in params.

From the looks of it DjDT query tracker assumes no nested values when serializing query params. The error occurs when these incorrectly serialized params are fed into the cursor.

@tim-schilling
Copy link
Member

The toolbar also doesn't support queries with contains or contained_by on a HStoreField and any of the RangeFields.

@tim-schilling
Copy link
Member

@aaugustin Do you know if there was a reason why we chose to create our own _decode rather than pickling the params? I'm thinking we may want to convert to pickling the params since the range fields need to have the actual class instance passed as the parameter.

Right now the toolbar is decoding a parameter of (NumericRange(0, 999999, '[)'),) to be '["NumericRange(0, 999999, \'[)\')"]' which when the form cleans and outputs the parameters it becomes "NumericRange(0, 999999, \'[)\')"

@aaugustin
Copy link
Contributor

I don't know. If you have an idea to fix the problem, please go ahead :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants