Opened 3 months ago

#5819 new defect

ST_EstimatedExtent fails for long table names

Reported by: martins Owned by: pramsey
Priority: blocker Milestone:
Component: postgis Version: 3.5.x
Keywords: Cc:

Description

For create table t23456789012345678901234567890123456789012345678901234567890(g geometry); this ST_EstimatedExtent('public','t23456789012345678901234567890123456789012345678901234567890','g') fails with error 'invalid name syntax'.

It happens in PostGIS 3.5 only. It is fine in 3.4.x.

I think the reason is a change in gserialized_estimated_extent():

char nsp_tbl[NAMEDATALEN]; … snprintf(nsp_tbl, NAMEDATALEN, "\"%s\".\"%s\"", nsp, tbl);

I think nsp_tbl should at least be NAMEDATALEN*2+6 characters long?

Change History (0)

Note: See TracTickets for help on using tickets.