Skip to content

Commit

Permalink
Fix function call
Browse files Browse the repository at this point in the history
  • Loading branch information
mkgrgis committed Oct 28, 2024
1 parent 27eb087 commit cc5f643
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions deparse.c
Original file line number Diff line number Diff line change
Expand Up @@ -2908,11 +2908,11 @@ sqlite_deparse_const(Const *node, deparse_expr_cxt *context, int showtype)
}
default:
{
extval = OidOutputFunctionCall(typoutput, node->constvalue);
if (listed_datatype_oid(node->consttype, -1, postGisSQLiteCompatibleTypes))
{
/* common branch of PostGIS constants, deparsable as a text data */
elog(DEBUG1, "sqlite_fdw : %s deparse PostGIS constant", __func__);
elog(DEBUG2, "sqlite_fdw : %s deparse PostGIS constant", __func__);
extval = OidOutputFunctionCall(typoutput, node->constvalue);
#ifdef SQLITE_FDW_GIS_ENABLE
sqlite_deparse_PostGIS_value(buf, extval);
#else
Expand Down
2 changes: 1 addition & 1 deletion sqlite_fdw.h
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,7 @@ extern const char *postGisSQLiteCompatibleTypes[];
#ifdef SQLITE_FDW_GIS_ENABLE
char* SpatiaLiteAsPostGISgeom (blobOutput spatiaLiteBlob, Form_pg_attribute att);
blobOutput PostGISgeomAsSpatiaLite (Datum value, Form_pg_attribute att);
void sqlite_deparse_PostGIS_value(char *extval, StringInfo buf);
void sqlite_deparse_PostGIS_value(StringInfo buf, char *extval);
#endif

#endif /* SQLITE_FDW_H */
2 changes: 1 addition & 1 deletion sqlite_gis.c
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ common_EWKB_error (Form_pg_attribute att, int len, const char* data, bool direct
* text input converted to EWKB and than EWKB converted to hex code.
*/
void
sqlite_deparse_PostGIS_value(char *extval, StringInfo buf)
sqlite_deparse_PostGIS_value(StringInfo buf, char *extval)
{
blobOutput bO = EWKB2SpatiaLiteBlobImage (extval, NULL);
char* hexform = getHexFormOfBlob(bO);
Expand Down

0 comments on commit cc5f643

Please sign in to comment.