Re: srtext 2048 length limit

Paul Ramsey <[email protected]> Wed, 21 May 2025 07:37:18 -0700
Newsgroups gmane.comp.gis.postgis
Message-ID <[email protected]>

> On May 21, 2025, at 2:08 AM, Denis Rykov <[email protected]> wrote:
> 
> 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?

This is a direct copy from the OGC spec, I am pretty sure, and I don’t think there’s any reason we could not use the PgSQL ’text’ type instead.

That said, we haven’t had any issues with running out of space so far, 24 years in.

P.