Skip to content
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

JSON column from a Postgresql Database is working to read information, but when editing the column and saving it, an error occurs #29128

Closed
qgib opened this issue Feb 19, 2019 · 5 comments
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Data Provider Related to specific vector, raster or mesh data providers

Comments

@qgib
Copy link
Contributor

qgib commented Feb 19, 2019

Author Name: Felipe Souza (@felkis)
Original Redmine Issue: 21310
Affected QGIS version: 3.4.4
Redmine category:data_provider/postgis


The error seems to occur when saving from qgis back to Postgresql.

I´m connecting to a Postgresql Database, opening a table that has a json field. I see the data, and I´m trying to add an extra letter to a field. (attachment print).

The way I see, it seems that QGIS is sending back data as "hstore", but the column from my table is json.

ERROR ALERT:
Error PostGIS when changing attributes: ERROR: column "info" is of type jsonb but expression is of type hstore
LINE 1: ...TE "geometria"."plan_perimetro_urbano" SET "info"=E'"bike"=>...
^
HINT: You will need to rewrite or cast the expression.



Related issue(s): #29133 (copied_to)
Redmine related issue(s): 21315


@qgib
Copy link
Contributor Author

qgib commented Feb 19, 2019

Author Name: Giovanni Manghi (@gioman)


I guess there is no support for this datatype, if confirmed then this would be a feature request (in the meantime please also check on 3.4.4/master so we can adjust the affected version to a recent one).


  • status_id was changed from Open to Feedback

@qgib
Copy link
Contributor Author

qgib commented Feb 19, 2019

Author Name: Felipe Souza (@felkis)


Giovanni Manghi wrote:

I guess there is no support for this datatype, if confirmed then this would be a feature request (in the meantime please also check on 3.4.4/master so we can adjust the affected version to a recent one).

OK. I have just checked it with 3.4.4 and I got the same error!

@qgib
Copy link
Contributor Author

qgib commented Feb 19, 2019

Author Name: Giovanni Manghi (@gioman)


OK. I have just checked it with 3.4.4 and I got the same error!

that is not surprising. You should ask in the dev mailing list about the support for this data type, as said if this is not supported this must be changed to feature request.


  • version was changed from 3.4.1 to 3.4.4

@qgib
Copy link
Contributor Author

qgib commented Feb 19, 2019

Author Name: Felipe Souza (@felkis)


@qgib
Copy link
Contributor Author

qgib commented Feb 19, 2019

Author Name: Giovanni Manghi (@gioman)


  • resolution was changed from to duplicate
  • status_id was changed from Feedback to Closed

@qgib qgib closed this as completed Feb 19, 2019
@qgib qgib added Bug Either a bug report, or a bug fix. Let's hope for the latter! Data Provider Related to specific vector, raster or mesh data providers labels May 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Data Provider Related to specific vector, raster or mesh data providers
Projects
None yet
Development

No branches or pull requests

1 participant