#5421 closed defect (fixed)

PG17 bot testing broken on JSON

Reported by: robe Owned by: strk
Priority: blocker Milestone: PostGIS 3.3.4
Component: build Version: master
Keywords: Cc:

Description

Getting the below errors on debbie's PG16 run and berrie64 which are both running fairl recent PG16 builds

07:06:09 lwgeom_out_geojson.c:54:7: error: unknown type name ‘JsonTypeCategory’
07:06:09    54 |       JsonTypeCategory tcategory, Oid outfuncoid,
07:06:09       |       ^~~~~~~~~~~~~~~~
07:06:09 lwgeom_out_geojson.c:69:9: error: unknown type name ‘JsonTypeCategory’
07:06:09    69 |         JsonTypeCategory tcategory, Oid outfuncoid,
07:06:09       |         ^~~~~~~~~~~~~~~~
07:06:09 lwgeom_out_geojson.c: In function ‘composite_to_geojson’:
07:06:09 lwgeom_out_geojson.c:160:3: error: unknown type name ‘JsonTypeCategory’
07:06:09   160 |   JsonTypeCategory tcategory;
07:06:09       |   ^~~~~~~~~~~~~~~~
07:06:09 lwgeom_out_geojson.c:210:17: error: ‘JSONTYPE_NULL’ undeclared (first use in this function); did you mean ‘JSON_TOKEN_NULL’?
07:06:09   210 |     tcategory = JSONTYPE_NULL;
07:06:09       |                 ^~~~~~~~~~~~~
07:06:09       |                 JSON_TOKEN_NULL
07:06:09 lwgeom_out_geojson.c:210:17: note: each undeclared identifier is reported only once for each function it appears in
07:06:09 lwgeom_out_geojson.c:214:5: warning: implicit declaration of function ‘json_categorize_type’ [-Wimplicit-function-declaration]
07:06:09   214 |     json_categorize_type(att->atttypid, &tcategory, &outfuncoid);
07:06:09       |     ^~~~~~~~~~~~~~~~~~~~
07:06:09 lwgeom_out_geojson.c:216:4: warning: implicit declaration of function ‘datum_to_json’; did you mean ‘row_to_json’? [-Wimplicit-function-declaration]
07:06:09   216 |    datum_to_json(val, isnull, props, tcategory, outfuncoid, false);
07:06:09       |    ^~~~~~~~~~~~~
07:06:09       |    row_to_json
07:06:09 lwgeom_out_geojson.c: At top level:
07:06:09 lwgeom_out_geojson.c:352:6: error: unknown type name ‘JsonTypeCategory’
07:06:09   352 |      JsonTypeCategory tcategory, Oid outfuncoid,
07:06:09       |      ^~~~~~~~~~~~~~~~
07:06:09 lwgeom_out_geojson.c: In function ‘array_to_json_internal’:
07:06:09 lwgeom_out_geojson.c:469:2: error: unknown type name ‘JsonTypeCategory’
07:06:09   469 |  JsonTypeCategory tcategory;
07:06:09       |  ^~~~~~~~~~~~~~~~
07:06:09 lwgeom_out_geojson.c:492:2: warning: implicit declaration of function ‘array_dim_to_json’; did you mean ‘array_to_json’? [-Wimplicit-function-declaration]
07:06:09   492 |  array_dim_to_json(result, 0, ndim, dim, elements, nulls, &count, tcategory,
07:06:09       |  ^~~~~~~~~~~~~~~~~
07:06:09       |  array_to_json
07:06:09 lwgeom_out_geojson.c: In function ‘composite_to_json’:
07:06:09 lwgeom_out_geojson.c:536:3: error: unknown type name ‘JsonTypeCategory’
07:06:09   536 |   JsonTypeCategory tcategory;
07:06:09       |   ^~~~~~~~~~~~~~~~
07:06:09 lwgeom_out_geojson.c:555:16: error: ‘JSONTYPE_NULL’ undeclared (first use in this function); did you mean ‘JSON_TOKEN_NULL’?
07:06:09   555 |    tcategory = JSONTYPE_NULL;
07:06:09       |                ^~~~~~~~~~~~~
07:06:09       |                JSON_TOKEN_NULL
07:06:09 lwgeom_out_geojson.c: At top level:
07:06:09 lwgeom_out_geojson.c:575:35: error: unknown type name ‘JsonTypeCategory’
07:06:09   575 |       bool *nulls, int *valcount, JsonTypeCategory tcategory,
07:06:09       |                                   ^~~~~~~~~~~~~~~~
07:06:09 lwgeom_out_geojson.c:644:1: warning: ‘postgis_JsonEncodeDateTime’ defined but not used [-Wunused-function]
07:06:09   644 | postgis_JsonEncodeDateTime(char *buf, Datum value, Oid typid)
07:06:09       | ^~~~~~~~~~~~~~~~~~~~~~~~~~
07:06:09 lwgeom_out_geojson.c:503:1: warning: ‘composite_to_json’ defined but not used [-Wunused-function]
07:06:09   503 | composite_to_json(Datum composite, StringInfo result, bool use_line_feeds)
07:06:09       | ^~~~~~~~~~~~~~~~~
07:06:09 lwgeom_out_geojson.c:456:1: warning: ‘array_to_json_internal’ defined but not used [-Wunused-function]
07:06:09   456 | array_to_json_internal(Datum array, StringInfo result, bool use_line_feeds)
07:06:09       | ^~~~~~~~~~~~~~~~~~~~~~
07:06:09 make[1]: *** [<builtin>: lwgeom_out_geojson.o] Error 1

They are reading PG17 so I think it's because they flipped the switch on master and I didn't notice.

need to branch out a PG16

Change History (4)

comment:1 by robe, 10 months ago

Looks like head was stamped as PG17 17 hrs ago by Tom. I think the issue is because the change that was supposed to happen in PG15 for JSON, I had kept in, but stamped to not use until PG17 and PG17 is still essentially PG16, so I need to set that > 18 for now.

comment:2 by robe, 10 months ago

Component: buildbotsbuild/upgrade/install
Milestone: Website Management, BotsPostGIS 3.3.4
Owner: changed from robe to strk

comment:3 by Regina Obe <lr@…>, 10 months ago

In 7e62e02/git:

PG17 is now master and
still doesn't have the new json api exposed
Flip the json api to PG18 for now
May need to flip back later.

References #5421 for PostGIS 3.4.0

comment:4 by Regina Obe <lr@…>, 10 months ago

Resolution: fixed
Status: newclosed

In c8dd8b3/git:

PG17 is now master and
still doesn't have the new json api exposed
Flip the json api to PG18 for now
May need to flip back later.

Closes #5421 for PostGIS 3.3.4

Note: See TracTickets for help on using tickets.