<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=utf-8"><meta name=Generator content="Microsoft Word 15 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Aptos;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
@font-face
        {font-family:"Source Code Pro";}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        font-size:12.0pt;
        font-family:"Aptos",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Preformatted Char";
        margin:0in;
        font-size:10.0pt;
        font-family:"Courier New";}
span.HTMLPreformattedChar
        {mso-style-name:"HTML Preformatted Char";
        mso-style-priority:99;
        mso-style-link:"HTML Preformatted";
        font-family:"Consolas",serif;
        mso-ligatures:none;}
span.EmailStyle21
        {mso-style-type:personal-reply;
        font-family:"Aptos",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style></head><body lang=EN-US link=blue vlink=purple style='word-wrap:break-word'><div class=WordSection1><p class=MsoNormal>Bo,<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>FWIW I’m in the middle of packaging windows PostGIS 3.6.1 Bundle package ofr PG13-18.  I should have that done this week.<o:p></o:p></p><p class=MsoNormal>I’ll send an update to the mailing list once I have that ready.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>I confirm that in PostGIS 3.6.1 I can’t replicate this error, but I can in <o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>POSTGIS="3.5.2 3.5.2" [EXTENSION] PGSQL="150" GEOS="3.13.0-CAPI-1.19.0" PROJ="8.2.1 ..”<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><o:p> </o:p></p><div style='border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt'><div><div style='border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in'><p class=MsoNormal><b><span style='font-size:11.0pt;font-family:"Calibri",sans-serif'>From:</span></b><span style='font-size:11.0pt;font-family:"Calibri",sans-serif'> Paul Ramsey via postgis-users <postgis-users@lists.osgeo.org> <br><b>Sent:</b> Wednesday, November 19, 2025 1:36 PM<br><b>To:</b> Bo Victor Thomsen <bo.victor.thomsen@gmail.com><br><b>Cc:</b> postgis-users@lists.osgeo.org<br><b>Subject:</b> Re: Issue with st_estimatedextent function ??<o:p></o:p></span></p></div></div><p class=MsoNormal><o:p> </o:p></p><div><p class=MsoNormal>I cannot replicate this bug on my PostGIS 3.5.5dev environment, probably because the issue is already fixed as of 3.5.3<o:p></o:p></p><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal><a href="https://github.com/postgis/postgis/blob/stable-3.5/NEWS#L66">https://github.com/postgis/postgis/blob/stable-3.5/NEWS#L66</a><o:p></o:p></p></div><div><p class=MsoNormal><a href="https://trac.osgeo.org/postgis/ticket/5819">https://trac.osgeo.org/postgis/ticket/5819</a><o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>I think you probably need a maintenance upgrade.<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>ATB,<o:p></o:p></p></div><div><p class=MsoNormal>P<o:p></o:p></p></div></div><p class=MsoNormal><o:p> </o:p></p><div><div><p class=MsoNormal>On Wed, Nov 19, 2025 at 9:21<span style='font-family:"Arial",sans-serif'> </span>AM Bo Victor Thomsen <<a href="mailto:bo.victor.thomsen@gmail.com">bo.victor.thomsen@gmail.com</a>> wrote:<o:p></o:p></p></div><blockquote style='border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in'><div><p>Hi list - <o:p></o:p></p><p>I'm using Postgres/Postgis as a data repository for QGIS - and it normally just works.. However I'm getting errors with tables having long names, for example: <br><b><i><br>fdc_results.bygningskade_stormflod_rcp85_2100_t100_ssp3_7_0_20251119164 <br></i></b><br>(Schema-name length: 11, table-name length: 59)<o:p></o:p></p><p>I have tracked the issue using the log facility in QGIS. It shows, that QGIS intermittently executes a SQL command: <o:p></o:p></p><p><b><i>SELECT st_estimatedextent('fdc_results','bygningskade_stormflod_rcp85_2100_t100_ssp3_7_0_20251119164','geom')</i></b><o:p></o:p></p><p>which results in an error: <b><span style='font-size:9.0pt;font-family:"Source Code Pro";color:#222222;letter-spacing:.1pt;background:white'>ERROR: invalid name syntax</span></b><o:p></o:p></p><p>If I change the table name to:<o:p></o:p></p><p><b><i>fdc_results.bygningskade_stormflod_rcp85_2100_t100_ssp3_7_0   </i></b>(Schema-name length: 11, table-name length: 47) <o:p></o:p></p><p>the error disappears. <o:p></o:p></p><p>I've done some testing and could replicate the error (and non-error) situation in PGAdmin<o:p></o:p></p><p>Further testing shows that if the sum of the character lengths of the schema- and table-name is larger than 58 the function will stop with an error. Otherwise it returns a result like:<o:p></o:p></p><p>"BOX(716701.25 6167151,720533.9375 6174220)"<o:p></o:p></p><p>It's my understanding, that the maximum length of a tablename in PostgreSQL is 63. This same limit applies for every type of identifier in Postgres. Am I wrong to assume this? Or is there an issue with name lengths in the PostGIS st_estimatedextent<b><i> </i></b> function?? <o:p></o:p></p><p>(It might be a coincidence but if you express the tablename like this : <b><i>"fdc_results"."bygningskade_stormflod_rcp85_2100_t100_ssp3_7_0", </i></b>the total length is 63) <o:p></o:p></p><p>PostgreSQL version: "PostgreSQL 17.4 on x86_64-windows, compiled by msvc-19.42.34436, 64-bit"<o:p></o:p></p><p>PostGIS version: "3.5 USE_GEOS=1 USE_PROJ=1 USE_STATS=1"<o:p></o:p></p><pre>-- <o:p></o:p></pre><pre>Med venlig hilsen / Best regards<o:p></o:p></pre><pre><o:p> </o:p></pre><pre>Bo Victor Thomsen<o:p></o:p></pre></div></blockquote></div></div></div></body></html>