PostGIS  3.7.0dev-r@@SVN_REVISION@@

◆ postgis_srs_entry()

Datum postgis_srs_entry ( PG_FUNCTION_ARGS  )

Search for srtext and proj4text given auth_name and auth_srid, returns TABLE(auth_name text, auth_srid text, srtext text, proj4text text)

Definition at line 543 of file postgis/lwgeom_transform.c.

544 {
545  Datum result;
546  struct srs_entry entry;
547  text* auth_name = PG_GETARG_TEXT_P(0);
548  text* auth_code = PG_GETARG_TEXT_P(1);
549  TupleDesc tuple_desc;
550 
551  if (get_call_result_type(fcinfo, 0, &tuple_desc) != TYPEFUNC_COMPOSITE)
552  {
553  ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
554  errmsg("%s called with incompatible return type", __func__)));
555  }
556  BlessTupleDesc(tuple_desc);
557 
558  entry.auth_name = auth_name;
559  entry.auth_code = auth_code;
560  result = srs_tuple_from_entry(&entry, tuple_desc);
561 
562  if (result)
563  PG_RETURN_DATUM(srs_tuple_from_entry(&entry, tuple_desc));
564  else
565  PG_RETURN_NULL();
566 }
char result[OUT_DOUBLE_BUFFER_SIZE]
Definition: cu_print.c:267
static Datum srs_tuple_from_entry(const struct srs_entry *entry, TupleDesc tuple_desc)
text * auth_name
text * auth_code

References srs_entry::auth_code, srs_entry::auth_name, result, and srs_tuple_from_entry().

Here is the call graph for this function: