Skip to content

Commit

Permalink
Added Code Comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Mohit Raj committed Feb 12, 2025
1 parent d4e999d commit 6d9b945
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions contrib/babelfishpg_common/src/spatialtypes.c
Original file line number Diff line number Diff line change
Expand Up @@ -150,12 +150,14 @@ geography_in(PG_FUNCTION_ARGS)

fcinfo_local->args[0].value = geom_datum;
geom_type = geometry_type_p(fcinfo_local);
/*Set SRID to 4326 in case of non-binary strings */
if(!isBinary){

/*For type: '0101000000000000000000F03F000000000000004', predefined SRID is set by default*/
/*For type: 'POINT(0 0)', set default SRID to be 4326 for geography datatype*/
if(!isBinary)
{
fcinfo_local->args[0].value = geom_datum;
fcinfo_local->args[1].value = Int32GetDatum(4326);

/* Setting deafault SRID for geography datatype = 4326 */
geom_datum = gserialized_set_srid_p(fcinfo_local);
}
geometry_name = text_to_cstring(PG_DETOAST_DATUM(geom_type));
Expand Down

0 comments on commit 6d9b945

Please sign in to comment.