srtext 2048 length limit

Regina Obe lr at pcorp.us
Wed May 21 07:43:55 PDT 2025


I’m guessing that limit might have come from our source early on.  In the early years we only used proj4text field.

The general advice is if you want to make changes, you should make it in your proj.db database since that is the first source of truth for PostGIS these days.

 

The spatial_ref_sys aside from the srid and auth (maybe, can’t remember) is ignored if the record is in proj.db.

 

That said, I see no issue with upping the limit of srtext.  The only danger would be if some users have views bound to it.  In that case, it will cause an upgrade failure.

 

Are you running into obstacles with the 2048 size or are you just thinking of aligning it with the CRS WKT standard?  This is the first I’m hearing of anyone complaining about the size of the field.

 

From: Denis Rykov <rykovd at gmail.com> 
Sent: Wednesday, May 21, 2025 5:08 AM
To: PostGIS Users Discussion <postgis-users at lists.osgeo.org>
Subject: srtext 2048 length limit

 

I noticed that the srtext column in the spatial_ref_sys table has a length limit of 2048 characters. This seems quite restrictive, especially considering the WKT standard does not prescribe a specific maximum length. In fact, it recommends a maximum of 4096 characters for CRS WKT strings. The current limit is therefore only half of what the standard suggests as a recommended maximum.

Could you please explain the rationale behind this strict limit, and could its extension be considered?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20250521/70e35f28/attachment.htm>


More information about the postgis-users mailing list