PostGIS 3.7.0dev-r@@SVN_REVISION@@
Loading...
Searching...
No Matches

◆ 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 546 of file postgis/lwgeom_transform.c.

547{
548 Datum result;
549 struct srs_entry entry;
550 text* auth_name = PG_GETARG_TEXT_P(0);
551 text* auth_code = PG_GETARG_TEXT_P(1);
552 TupleDesc tuple_desc;
553
554 if (get_call_result_type(fcinfo, 0, &tuple_desc) != TYPEFUNC_COMPOSITE)
555 {
556 ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
557 errmsg("%s called with incompatible return type", __func__)));
558 }
559 BlessTupleDesc(tuple_desc);
560
561 entry.auth_name = auth_name;
562 entry.auth_code = auth_code;
563 result = srs_tuple_from_entry(&entry, tuple_desc);
564
565 if (result)
566 PG_RETURN_DATUM(srs_tuple_from_entry(&entry, tuple_desc));
567 else
568 PG_RETURN_NULL();
569}
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: