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

String length constraints-postgis #7301

Closed
wants to merge 1 commit into from
Closed

String length constraints-postgis #7301

wants to merge 1 commit into from

Conversation

shivareddyiirs
Copy link
Contributor

@shivareddyiirs shivareddyiirs commented Jun 22, 2018

Bug fixes #19213
PostGIS error while adding features: ERROR: value too long for type character varying(50)

Description

Since in the DB Manager Plugin there is no GUI option to set this option , I have updated the option dict to remove string length constraint.
Bug fixes #19213

Checklist

Reviewing is a process done by project maintainers, mostly on a volunteer basis. We try to keep the overhead as small as possible and appreciate if you help us to do so by completing the following items. Feel free to ask in a comment if you have troubles with any of them.

  • Commit messages are descriptive and explain the rationale for changes
  • Commits which fix bugs include fixes #11111 in the commit message next to the description
  • I have read the QGIS Coding Standards and this PR complies with them
  • This PR passes all existing unit tests (test results will be reported by travis-ci after opening this PR)
  • I have run the scripts/prepare-commit.sh script before each commit

fixes #19213
PostGIS error while adding features: ERROR: value too long for type character varying(50)
@nyalldawson
Copy link
Collaborator

Thanks for sending this fix!

I'm curious though as to how this situation arises. My understanding is that the field length here is taken direct from the source layer. So this would hint that somehow your layer has an incorrect length for this field. This would point to a deeper underlying issue.

What data format is your layer? Can you identify if indeed there is an incorrect string field length here?

@nyalldawson nyalldawson added Bugfix Feedback Waiting on the submitter for answers labels Jun 22, 2018
@shivareddyiirs
Copy link
Contributor Author

shivareddyiirs commented Jun 23, 2018 via email

@shivareddyiirs
Copy link
Contributor Author

I checked with varying field length, But whenever there is entry in the field which is longer than 50 , it gives same error.

@shivareddyiirs
Copy link
Contributor Author

@nyalldawson
I request to fix this bug in 3.2 release iteself. I would be able to use it in the course starting in july

@shivareddyiirs
Copy link
Contributor Author

Sorry for inconvenience. But I think there was some problem in my data itself.
I checked and its working fine now. Since I created attribute using pyqgis library and set length as 50 but my plugin while adding attribute value stored longer values.

I am closing this pull request and and also the issue I reported.
@nyalldawson Now I can comprehend, there is deeper underlying issue (may be in pyqgis layer editing API)

Once Again Thanks

@nyalldawson
Copy link
Collaborator

No problem! This was on my TODO to investigate, so thanks for crossing an item off that list 👍

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

Successfully merging this pull request may close these issues.

None yet

2 participants