[PostGIS] #5965: PG19 compile is spitting out warnings about PG_GSERIALIZED_DATUM_NEEDS_DETOAST
PostGIS
trac at osgeo.org
Fri Aug 15 22:17:09 PDT 2025
#5965: PG19 compile is spitting out warnings about
PG_GSERIALIZED_DATUM_NEEDS_DETOAST
---------------------+---------------------------
Reporter: robe | Owner: robe
Type: defect | Status: assigned
Priority: blocker | Milestone: PostGIS 3.7.0
Component: postgis | Version: master
Keywords: |
---------------------+---------------------------
GHA latest/latest is set to throw errors on warnings. latest/garden is
regressing fine since it just compiles and runs garden test, but
latest/latest is complaining since August 8th about
{{{
../libpgcommon/lwgeom_pg.h:93:30: note: in definition of macro
'PG_GSERIALIZED_DATUM_NEEDS_DETOAST'
93 | (VARATT_IS_EXTENDED((datum)) ||
VARATT_IS_EXTERNAL((datum)) || VARATT_IS_COMPRESSED((datum)))
| ^~~~~
../libpgcommon/lwgeom_pg.h:95:44: note: in expansion of macro
'PG_GETARG_DATUM'
95 | PG_GSERIALIZED_DATUM_NEEDS_DETOAST(PG_GETARG_DATUM(varno))
\
| ^~~~~~~~~~~~~~~
lwgeom_ogc.c:103:29: note: in expansion of macro
'PG_GETARG_GSERIALIZED_HEADER'
103 | GSERIALIZED *geom = PG_GETARG_GSERIALIZED_HEADER(0);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ../libpgcommon/lwgeom_pg.h:30:
/usr/local/pgsql/include/server/varatt.h:410:32: note: expected 'const
void *' but argument is of type 'Datum' {aka 'long unsigned int'}
410 | VARATT_IS_EXTENDED(const void *PTR)
| ~~~~~~~~~~~~^~~
/usr/local/pgsql/include/server/fmgr.h:268:50: error: passing argument 1
of 'VARATT_IS_EXTERNAL' makes pointer from integer without a cast [-Werror
=int-conversion]
268 | #define PG_GETARG_DATUM(n) (fcinfo->args[n].value)
../libpgcommon/lwgeom_pg.h:93:61: note: in definition of macro
'PG_GSERIALIZED_DATUM_NEEDS_DETOAST'
93 | (VARATT_IS_EXTENDED((datum)) ||
VARATT_IS_EXTERNAL((datum)) || VARATT_IS_COMPRESSED((datum)))
| ^~~~~
../libpgcommon/lwgeom_pg.h:95:44: note: in expansion of macro
'PG_GETARG_DATUM'
95 | PG_GSERIALIZED_DATUM_NEEDS_DETOAST(PG_GETARG_DATUM(varno))
\
| ^~~~~~~~~~~~~~~
lwgeom_ogc.c:103:29: note: in expansion of macro
'PG_GETARG_GSERIALIZED_HEADER'
103 | GSERIALIZED *geom = PG_GETARG_GSERIALIZED_HEADER(0);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/pgsql/include/server/varatt.h:354:32: note: expected 'const
void *' but argument is of type 'Datum' {aka 'long unsigned int'}
354 | VARATT_IS_EXTERNAL(const void *PTR)
| ~~~~~~~~~~~~^~~
/usr/local/pgsql/include/server/fmgr.h:268:50: error: passing argument 1
of 'VARATT_IS_COMPRESSED' makes pointer from integer without a cast
[-Werror=int-conversion]
268 | #define PG_GETARG_DATUM(n) (fcinfo->args[n].value)
../libpgcommon/lwgeom_pg.h:93:94: note: in definition of macro
'PG_GSERIALIZED_DATUM_NEEDS_DETOAST'
93 | (VARATT_IS_EXTENDED((datum)) ||
VARATT_IS_EXTERNAL((datum)) || VARATT_IS_COMPRESSED((datum)))
|
^~~~~
../libpgcommon/lwgeom_pg.h:95:44: note: in expansion of macro
'PG_GETARG_DATUM'
95 | PG_GSERIALIZED_DATUM_NEEDS_DETOAST(PG_GETARG_DATUM(varno))
\
| ^~~~~~~~~~~~~~~
lwgeom_ogc.c:103:29: note: in expansion of macro
'PG_GETARG_GSERIALIZED_HEADER'
103 | GSERIALIZED *geom = PG_GETARG_GSERIALIZED_HEADER(0);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/pgsql/include/server/varatt.h:347:34: note: expected 'const
void *' but argument is of type 'Datum' {aka 'long unsigned int'}
347 | VARATT_IS_COMPRESSED(const void *PTR)
| ~~~~~~~~~~~~^~~
lwgeom_ogc.c: In function 'LWGEOM_getTYPE':
/usr/local/pgsql/include/server/fmgr.h:268:50: error: passing argument 1
of 'VARATT_IS_EXTENDED' makes pointer from integer without a cast [-Werror
=int-conversion]
268 | #define PG_GETARG_DATUM(n) (fcinfo->args[n].value)
../libpgcommon/lwgeom_pg.h:93:30: note: in definition of macro
'PG_GSERIALIZED_DATUM_NEEDS_DETOAST'
93 | (VARATT_IS_EXTENDED((datum)) ||
VARATT_IS_EXTERNAL((datum)) || VARATT_IS_COMPRESSED((datum)))
| ^~~~~
../libpgcommon/lwgeom_pg.h:95:44: note: in expansion of macro
'PG_GETARG_DATUM'
95 | PG_GSERIALIZED_DATUM_NEEDS_DETOAST(PG_GETARG_DATUM(varno))
\
| ^~~~~~~~~~~~~~~
lwgeom_ogc.c:129:16: note: in expansion of macro
'PG_GETARG_GSERIALIZED_HEADER'
129 | gser = PG_GETARG_GSERIALIZED_HEADER(0);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/pgsql/include/server/varatt.h:410:32: note: expected 'const
void *' but argument is of type 'Datum' {aka 'long unsigned int'}
410 | VARATT_IS_EXTENDED(const void *PTR)
| ~~~~~~~~~~~~^~~
/usr/local/pgsql/include/server/fmgr.h:268:50: error: passing argument 1
of 'VARATT_IS_EXTERNAL' makes pointer from integer without a cast [-Werror
=int-conversion]
268 | #define PG_GETARG_DATUM(n) (fcinfo->args[n].value)
../libpgcommon/lwgeom_pg.h:93:61: note: in definition of macro
'PG_GSERIALIZED_DATUM_NEEDS_DETOAST'
93 | (VARATT_IS_EXTENDED((datum)) ||
VARATT_IS_EXTERNAL((datum)) || VARATT_IS_COMPRESSED((datum)))
| ^~~~~
../libpgcommon/lwgeom_pg.h:95:44: note: in expansion of macro
'PG_GETARG_DATUM'
95 | PG_GSERIALIZED_DATUM_NEEDS_DETOAST(PG_GETARG_DATUM(varno))
\
| ^~~~~~~~~~~~~~~
lwgeom_ogc.c:129:16: note: in expansion of macro
'PG_GETARG_GSERIALIZED_HEADER'
129 | gser = PG_GETARG_GSERIALIZED_HEADER(0);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/pgsql/include/server/varatt.h:354:32: note: expected 'const
void *' but argument is of type 'Datum' {aka 'long unsigned int'}
354 | VARATT_IS_EXTERNAL(const void *PTR)
| ~~~~~~~~~~~~^~~
/usr/local/pgsql/include/server/fmgr.h:268:50: error: passing argument 1
of 'VARATT_IS_COMPRESSED' makes pointer from integer without a cast
[-Werror=int-conversion]
268 | #define PG_GETARG_DATUM(n) (fcinfo->args[n].value)
../libpgcommon/lwgeom_pg.h:93:94: note: in definition of macro
'PG_GSERIALIZED_DATUM_NEEDS_DETOAST'
93 | (VARATT_IS_EXTENDED((datum)) ||
VARATT_IS_EXTERNAL((datum)) || VARATT_IS_COMPRESSED((datum)))
|
^~~~~
../libpgcommon/lwgeom_pg.h:95:44: note: in expansion of macro
'PG_GETARG_DATUM'
95 | PG_GSERIALIZED_DATUM_NEEDS_DETOAST(PG_GETARG_DATUM(varno))
\
| ^~~~~~~~~~~~~~~
lwgeom_ogc.c:129:16: note: in expansion of macro
'PG_GETARG_GSERIALIZED_HEADER'
129 | gser = PG_GETARG_GSERIALIZED_HEADER(0);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/pgsql/include/server/varatt.h:347:34: note: expected 'const
void *' but argument is of type 'Datum' {aka 'long unsigned int'}
347 | VARATT_IS_COMPRESSED(const void *PTR)
| ~~~~~~~~~~~~^~~
lwgeom_ogc.c: In function 'geometry_geometrytype':
/usr/local/pgsql/include/server/fmgr.h:268:50: error: passing argument 1
of 'VARATT_IS_EXTENDED' makes pointer from integer without a cast [-Werror
=int-conversion]
268 | #define PG_GETARG_DATUM(n) (fcinfo->args[n].value)
../libpgcommon/lwgeom_pg.h:93:30: note: in definition of macro
'PG_GSERIALIZED_DATUM_NEEDS_DETOAST'
93 | (VARATT_IS_EXTENDED((datum)) ||
VARATT_IS_EXTERNAL((datum)) || VARATT_IS_COMPRESSED((datum)))
| ^~~~~
../libpgcommon/lwgeom_pg.h:95:44: note: in expansion of macro
'PG_GETARG_DATUM'
95 | PG_GSERIALIZED_DATUM_NEEDS_DETOAST(PG_GETARG_DATUM(varno))
\
| ^~~~~~~~~~~~~~~
lwgeom_ogc.c:204:16: note: in expansion of macro
'PG_GETARG_GSERIALIZED_HEADER'
204 | gser = PG_GETARG_GSERIALIZED_HEADER(0);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/pgsql/include/server/varatt.h:410:32: note: expected 'const
void *' but argument is of type 'Datum' {aka 'long unsigned int'}
410 | VARATT_IS_EXTENDED(const void *PTR)
| ~~~~~~~~~~~~^~~
/usr/local/pgsql/include/server/fmgr.h:268:50: error: passing argument 1
of 'VARATT_IS_EXTERNAL' makes pointer from integer without a cast [-Werror
=int-conversion]
268 | #define PG_GETARG_DATUM(n) (fcinfo->args[n].value)
../libpgcommon/lwgeom_pg.h:93:61: note: in definition of macro
'PG_GSERIALIZED_DATUM_NEEDS_DETOAST'
93 | (VARATT_IS_EXTENDED((datum)) ||
VARATT_IS_EXTERNAL((datum)) || VARATT_IS_COMPRESSED((datum)))
| ^~~~~
../libpgcommon/lwgeom_pg.h:95:44: note: in expansion of macro
'PG_GETARG_DATUM'
95 | PG_GSERIALIZED_DATUM_NEEDS_DETOAST(PG_GETARG_DATUM(varno))
\
| ^~~~~~~~~~~~~~~
lwgeom_ogc.c:204:16: note: in expansion of macro
'PG_GETARG_GSERIALIZED_HEADER'
204 | gser = PG_GETARG_GSERIALIZED_HEADER(0);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/pgsql/include/server/varatt.h:354:32: note: expected 'const
void *' but argument is of type 'Datum' {aka 'long unsigned int'}
354 | VARATT_IS_EXTERNAL(const void *PTR)
| ~~~~~~~~~~~~^~~
/usr/local/pgsql/include/server/fmgr.h:268:50: error: passing argument 1
of 'VARATT_IS_COMPRESSED' makes pointer from integer without a cast
[-Werror=int-conversion]
268 | #define PG_GETARG_DATUM(n) (fcinfo->args[n].value)
../libpgcommon/lwgeom_pg.h:93:94: note: in definition of macro
'PG_GSERIALIZED_DATUM_NEEDS_DETOAST'
93 | (VARATT_IS_EXTENDED((datum)) ||
VARATT_IS_EXTERNAL((datum)) || VARATT_IS_COMPRESSED((datum)))
|
^~~~~
../libpgcommon/lwgeom_pg.h:95:44: note: in expansion of macro
'PG_GETARG_DATUM'
95 | PG_GSERIALIZED_DATUM_NEEDS_DETOAST(PG_GETARG_DATUM(varno))
\
| ^~~~~~~~~~~~~~~
lwgeom_ogc.c:204:16: note: in expansion of macro
'PG_GETARG_GSERIALIZED_HEADER'
204 | gser = PG_GETARG_GSERIALIZED_HEADER(0);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/pgsql/include/server/varatt.h:347:34: note: expected 'const
void *' but argument is of type 'Datum' {aka 'long unsigned int'}
347 | VARATT_IS_COMPRESSED(const void *PTR)
| ~~~~~~~~~~~~^~~
echo "COMMIT;" >> postgis_upgrade.sql
In file included from lwgeom_functions_basic.c:36:
lwgeom_functions_basic.c: In function 'LWGEOM_zmflag':
/usr/local/pgsql/include/server/fmgr.h:268:50: error: passing argument 1
of 'VARATT_IS_EXTENDED' makes pointer from integer without a cast [-Werror
=int-conversion]
268 | #define PG_GETARG_DATUM(n) (fcinfo->args[n].value)
../libpgcommon/lwgeom_pg.h:93:30: note: in definition of macro
'PG_GSERIALIZED_DATUM_NEEDS_DETOAST'
93 | (VARATT_IS_EXTENDED((datum)) ||
VARATT_IS_EXTERNAL((datum)) || VARATT_IS_COMPRESSED((datum)))
| ^~~~~
../libpgcommon/lwgeom_pg.h:95:44: note: in expansion of macro
'PG_GETARG_DATUM'
95 | PG_GSERIALIZED_DATUM_NEEDS_DETOAST(PG_GETARG_DATUM(varno))
\
| ^~~~~~~~~~~~~~~
lwgeom_functions_basic.c:1981:27: note: in expansion of macro
'PG_GETARG_GSERIALIZED_HEADER'
1981 | GSERIALIZED *in = PG_GETARG_GSERIALIZED_HEADER(0);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from
/usr/local/pgsql/include/server/utils/expandeddatum.h:47,
from /usr/local/pgsql/include/server/utils/array.h:65,
from lwgeom_functions_basic.c:28:
/usr/local/pgsql/include/server/varatt.h:410:32: note: expected 'const
void *' but argument is of type 'Datum' {aka 'long unsigned int'}
410 | VARATT_IS_EXTENDED(const void *PTR)
| ~~~~~~~~~~~~^~~
/usr/local/pgsql/include/server/fmgr.h:268:50: error: passing argument 1
of 'VARATT_IS_EXTERNAL' makes pointer from integer without a cast [-Werror
=int-conversion]
268 | #define PG_GETARG_DATUM(n) (fcinfo->args[n].value)
../libpgcommon/lwgeom_pg.h:93:61: note: in definition of macro
'PG_GSERIALIZED_DATUM_NEEDS_DETOAST'
93 | (VARATT_IS_EXTENDED((datum)) ||
VARATT_IS_EXTERNAL((datum)) || VARATT_IS_COMPRESSED((datum)))
| ^~~~~
../libpgcommon/lwgeom_pg.h:95:44: note: in expansion of macro
'PG_GETARG_DATUM'
95 | PG_GSERIALIZED_DATUM_NEEDS_DETOAST(PG_GETARG_DATUM(varno))
\
| ^~~~~~~~~~~~~~~
lwgeom_functions_basic.c:1981:27: note: in expansion of macro
'PG_GETARG_GSERIALIZED_HEADER'
1981 | GSERIALIZED *in = PG_GETARG_GSERIALIZED_HEADER(0);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/pgsql/include/server/varatt.h:354:32: note: expected 'const
void *' but argument is of type 'Datum' {aka 'long unsigned int'}
354 | VARATT_IS_EXTERNAL(const void *PTR)
| ~~~~~~~~~~~~^~~
/usr/local/pgsql/include/server/fmgr.h:268:50: error: passing argument 1
of 'VARATT_IS_COMPRESSED' makes pointer from integer without a cast
[-Werror=int-conversion]
268 | #define PG_GETARG_DATUM(n) (fcinfo->args[n].value)
../libpgcommon/lwgeom_pg.h:93:94: note: in definition of macro
'PG_GSERIALIZED_DATUM_NEEDS_DETOAST'
93 | (VARATT_IS_EXTENDED((datum)) ||
VARATT_IS_EXTERNAL((datum)) || VARATT_IS_COMPRESSED((datum)))
|
^~~~~
../libpgcommon/lwgeom_pg.h:95:44: note: in expansion of macro
'PG_GETARG_DATUM'
95 | PG_GSERIALIZED_DATUM_NEEDS_DETOAST(PG_GETARG_DATUM(varno))
\
| ^~~~~~~~~~~~~~~
lwgeom_functions_basic.c:1981:27: note: in expansion of macro
'PG_GETARG_GSERIALIZED_HEADER'
1981 | GSERIALIZED *in = PG_GETARG_GSERIALIZED_HEADER(0);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/pgsql/include/server/varatt.h:347:34: note: expected 'const
void *' but argument is of type 'Datum' {aka 'long unsigned int'}
347 | VARATT_IS_COMPRESSED(const void *PTR)
| ~~~~~~~~~~~~^~~
lwgeom_functions_basic.c: In function 'LWGEOM_hasz':
/usr/local/pgsql/include/server/fmgr.h:268:50: error: passing argument 1
of 'VARATT_IS_EXTENDED' makes pointer from integer without a cast [-Werror
=int-conversion]
268 | #define PG_GETARG_DATUM(n) (fcinfo->args[n].value)
../libpgcommon/lwgeom_pg.h:93:30: note: in definition of macro
'PG_GSERIALIZED_DATUM_NEEDS_DETOAST'
93 | (VARATT_IS_EXTENDED((datum)) ||
VARATT_IS_EXTERNAL((datum)) || VARATT_IS_COMPRESSED((datum)))
| ^~~~~
../libpgcommon/lwgeom_pg.h:95:44: note: in expansion of macro
'PG_GETARG_DATUM'
95 | PG_GSERIALIZED_DATUM_NEEDS_DETOAST(PG_GETARG_DATUM(varno))
\
| ^~~~~~~~~~~~~~~
lwgeom_functions_basic.c:1995:27: note: in expansion of macro
'PG_GETARG_GSERIALIZED_HEADER'
1995 | GSERIALIZED *in = PG_GETARG_GSERIALIZED_HEADER(0);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/pgsql/include/server/varatt.h:410:32: note: expected 'const
void *' but argument is of type 'Datum' {aka 'long unsigned int'}
410 | VARATT_IS_EXTENDED(const void *PTR)
| ~~~~~~~~~~~~^~~
/usr/local/pgsql/include/server/fmgr.h:268:50: error: passing argument 1
of 'VARATT_IS_EXTERNAL' makes pointer from integer without a cast [-Werror
=int-conversion]
268 | #define PG_GETARG_DATUM(n) (fcinfo->args[n].value)
../libpgcommon/lwgeom_pg.h:93:61: note: in definition of macro
'PG_GSERIALIZED_DATUM_NEEDS_DETOAST'
93 | (VARATT_IS_EXTENDED((datum)) ||
VARATT_IS_EXTERNAL((datum)) || VARATT_IS_COMPRESSED((datum)))
| ^~~~~
../libpgcommon/lwgeom_pg.h:95:44: note: in expansion of macro
'PG_GETARG_DATUM'
95 | PG_GSERIALIZED_DATUM_NEEDS_DETOAST(PG_GETARG_DATUM(varno))
\
| ^~~~~~~~~~~~~~~
lwgeom_functions_basic.c:1995:27: note: in expansion of macro
'PG_GETARG_GSERIALIZED_HEADER'
1995 | GSERIALIZED *in = PG_GETARG_GSERIALIZED_HEADER(0);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/pgsql/include/server/varatt.h:354:32: note: expected 'const
void *' but argument is of type 'Datum' {aka 'long unsigned int'}
354 | VARATT_IS_EXTERNAL(const void *PTR)
| ~~~~~~~~~~~~^~~
/usr/local/pgsql/include/server/fmgr.h:268:50: error: passing argument 1
of 'VARATT_IS_COMPRESSED' makes pointer from integer without a cast
[-Werror=int-conversion]
268 | #define PG_GETARG_DATUM(n) (fcinfo->args[n].value)
../libpgcommon/lwgeom_pg.h:93:94: note: in definition of macro
'PG_GSERIALIZED_DATUM_NEEDS_DETOAST'
93 | (VARATT_IS_EXTENDED((datum)) ||
VARATT_IS_EXTERNAL((datum)) || VARATT_IS_COMPRESSED((datum)))
|
^~~~~
../libpgcommon/lwgeom_pg.h:95:44: note: in expansion of macro
'PG_GETARG_DATUM'
95 | PG_GSERIALIZED_DATUM_NEEDS_DETOAST(PG_GETARG_DATUM(varno))
\
| ^~~~~~~~~~~~~~~
lwgeom_functions_basic.c:1995:27: note: in expansion of macro
'PG_GETARG_GSERIALIZED_HEADER'
1995 | GSERIALIZED *in = PG_GETARG_GSERIALIZED_HEADER(0);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/pgsql/include/server/varatt.h:347:34: note: expected 'const
void *' but argument is of type 'Datum' {aka 'long unsigned int'}
347 | VARATT_IS_COMPRESSED(const void *PTR)
| ~~~~~~~~~~~~^~~
lwgeom_functions_basic.c: In function 'LWGEOM_hasm':
/usr/local/pgsql/include/server/fmgr.h:268:50: error: passing argument 1
of 'VARATT_IS_EXTENDED' makes pointer from integer without a cast [-Werror
=int-conversion]
268 | #define PG_GETARG_DATUM(n) (fcinfo->args[n].value)
../libpgcommon/lwgeom_pg.h:93:30: note: in definition of macro
'PG_GSERIALIZED_DATUM_NEEDS_DETOAST'
93 | (VARATT_IS_EXTENDED((datum)) ||
VARATT_IS_EXTERNAL((datum)) || VARATT_IS_COMPRESSED((datum)))
| ^~~~~
../libpgcommon/lwgeom_pg.h:95:44: note: in expansion of macro
'PG_GETARG_DATUM'
95 | PG_GSERIALIZED_DATUM_NEEDS_DETOAST(PG_GETARG_DATUM(varno))
\
| ^~~~~~~~~~~~~~~
lwgeom_functions_basic.c:2002:27: note: in expansion of macro
'PG_GETARG_GSERIALIZED_HEADER'
2002 | GSERIALIZED *in = PG_GETARG_GSERIALIZED_HEADER(0);
}}}
I'm going to take latest/latest out of running since we are already
testing PG18. I think it's a little too early to start worrying about
PG19. We can worry about PG19 after we release PostGIS 3.6.0
--
Ticket URL: <https://trac.osgeo.org/postgis/ticket/5965>
PostGIS <http://trac.osgeo.org/postgis/>
The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project.
More information about the postgis-tickets
mailing list