-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Conversation
fixes #19213 PostGIS error while adding features: ERROR: value too long for type character varying(50)
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? |
Yes it is taken from source layer but there is upper limit i.e. 50 by default.
But in my case I storing file address in the field.
I have attached sample data in the raised issue. It is shapefile.
‘Import to PostGIS’processing tool gives user to check/ uncheck this option.
But in DB manager UI has no such option and that’s why I set this option by default.
I don’t suggest any change in the GUI of DB Manager now.
Why this restriction is there in first place, I also don’t know?
…Sent from my iPhone
On 23-Jun-2018, at 12:46 AM, Nyall Dawson ***@***.***> wrote:
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?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
I checked with varying field length, But whenever there is entry in the field which is longer than 50 , it gives same error. |
@nyalldawson |
Sorry for inconvenience. But I think there was some problem in my data itself. I am closing this pull request and and also the issue I reported. Once Again Thanks |
No problem! This was on my TODO to investigate, so thanks for crossing an item off that list 👍 |
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
fixes #11111
in the commit message next to the descriptionscripts/prepare-commit.sh
script before each commit