I'm working on a QGIS project where I have few shapefile layers with text fields. I would like to add whole paragraphs as descriptions to the text fields, however the fields are limited by their maximum allowed length which is 255 characters.

How should I accomplish adding longer texts? I'm sure there must be a way which I'm not considering.

I read somewhere that I should try PostGIS. The final goal of the project is to be uploaded to a web server for online viewing. Therefore, I'm not sure how can the PostGIS relation to the much bigger text files be uploaded or saved on the web as well?

  • What file format are the layers you are using? Mar 25, 2018 at 13:22
  • @MatthiasKuhn They are shapefiles Mar 25, 2018 at 13:23

1 Answer 1


Shapefiles have a limitation of maximum 254 characters per field (See switchfromshapefile.org).

If you need more than that you will need to switch to a different format. If you don't know which file format you want to choose, go for Geopackage, which is an OGC standard (and in newer versions of QGIS and other GIS packages the default file format).

PostGIS is a database which runs as a service on a server and is great if you want to run an infrastructure where different users can work at the same time, as in organizations or web platforms. If it's just you editing the data and you publish it once and don't have experience with infrastructure management, you should consider to go for file based approaches first. You can still migrate to a database server if you run into limitations.

  • Concise and helpful answers such as this is why I like the SE community. Thanks, worked like charm! Mar 25, 2018 at 13:46
  • Very complete answer. But I want to mention that there are even other reasons for not using .shp files any more, e.g. a limit of 10 characters in field names, and that .shp can't store Null (a.k.a NaN) values. The .shp files have served us well, for many years. But it's time to change...
    – Martin
    Mar 28, 2018 at 6:25
  • .shp can store Null, but .dbf may not be able to. Just saying, Martin! Mar 28, 2018 at 6:49
  • Furthermore, shapefiles (or at least the.dbf files that are a shapefile component) cannot natively store a time field, such as hours:minutes:seconds.
    – Stu Smith
    Mar 29, 2018 at 1:44
  • For more good reasons not to use shapefile (and for some why stick to it), see the link on the first line. Mar 29, 2018 at 7:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.