PostGIS  3.4.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 534 of file postgis/lwgeom_transform.c.

535 {
536 #if POSTGIS_PROJ_VERSION < 60
537  elog(ERROR, "%s is not supported with Proj < 6.0", __func__);
538 #else
539  Datum result;
540  struct srs_entry entry;
541  text* auth_name = PG_GETARG_TEXT_P(0);
542  text* auth_code = PG_GETARG_TEXT_P(1);
543  TupleDesc tuple_desc;
544 
545  if (get_call_result_type(fcinfo, 0, &tuple_desc) != TYPEFUNC_COMPOSITE)
546  {
547  ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
548  errmsg("%s called with incompatible return type", __func__)));
549  }
550  BlessTupleDesc(tuple_desc);
551 
552  entry.auth_name = auth_name;
553  entry.auth_code = auth_code;
554  result = srs_tuple_from_entry(&entry, tuple_desc);
555 
556  if (result)
557  PG_RETURN_DATUM(srs_tuple_from_entry(&entry, tuple_desc));
558  else
559  PG_RETURN_NULL();
560 #endif
561 }
char result[OUT_DOUBLE_BUFFER_SIZE]
Definition: cu_print.c:262
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: