]> granicus.if.org Git - postgis/commitdiff
Added postgis_proj_version()
authorSandro Santilli <strk@keybit.net>
Fri, 23 Jul 2004 21:24:33 +0000 (21:24 +0000)
committerSandro Santilli <strk@keybit.net>
Fri, 23 Jul 2004 21:24:33 +0000 (21:24 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@648 b70326c6-7e19-0410-871a-916f4a2858ee

postgis.h
postgis.sql.in
postgis_transform.c

index ab90cd97ee76746abedb53aad184366d178b6b03..6981023c114ea8181a60bec91b57ee9d6907c9cc 100644 (file)
--- a/postgis.h
+++ b/postgis.h
@@ -11,6 +11,9 @@
  *
  **********************************************************************
  * $Log$
+ * Revision 1.48  2004/07/23 21:24:33  strk
+ * Added postgis_proj_version()
+ *
  * Revision 1.47  2004/07/22 16:20:09  strk
  * Added postgis_lib_version() and postgis_geos_version()
  *
@@ -674,6 +677,7 @@ Datum line_interpolate_point(PG_FUNCTION_ARGS);
 Datum fluffType(PG_FUNCTION_ARGS);
 Datum postgis_lib_version(PG_FUNCTION_ARGS);
 Datum postgis_geos_version(PG_FUNCTION_ARGS);
+Datum postgis_proj_version(PG_FUNCTION_ARGS);
 
 /*--------------------------------------------------------------------
  * Useful floating point utilities and constants.
index 2a5ae660850a7aea93a1fbe623c245857edbd6c7..0ceefcea003a5345b35e811f2aa88f878d7d8dc9 100644 (file)
@@ -303,6 +303,10 @@ CREATEFUNCTION postgis_geos_version() RETURNS cstring
        AS '@MODULE_FILENAME@'
        LANGUAGE 'C';
 
+CREATEFUNCTION postgis_proj_version() RETURNS cstring
+       AS '@MODULE_FILENAME@'
+       LANGUAGE 'C';
+
 CREATEFUNCTION postgis_version() RETURNS text
 AS 'SELECT \'@POSTGIS_VERSION@\'::text AS version'
 LANGUAGE 'sql';
index 1983a7fdc46fba75554961f069dec219e0bfecd6..e372635c220adbc2109d9ef3923b682d18ae6b0c 100644 (file)
@@ -11,6 +11,9 @@
  *
  **********************************************************************
  * $Log$
+ * Revision 1.18  2004/07/23 21:24:33  strk
+ * Added postgis_proj_version()
+ *
  * Revision 1.17  2004/07/22 16:20:10  strk
  * Added postgis_lib_version() and postgis_geos_version()
  *
@@ -458,6 +461,13 @@ Datum transform_geom(PG_FUNCTION_ARGS)
        PG_RETURN_POINTER(result); // new geometry
 }
 
+PG_FUNCTION_INFO_V1(postgis_proj_version);
+Datum postgis_proj_version(PG_FUNCTION_ARGS)
+{
+       char *result = pstrdup(pj_get_release());
+       PG_RETURN_CSTRING(result);
+}
+
 
 #else // ! defined USE_PROJ
 
@@ -477,4 +487,10 @@ Datum transform_geom(PG_FUNCTION_ARGS)
        //PG_RETURN_POINTER(result);
        PG_RETURN_NULL();
 }
+
+PG_FUNCTION_INFO_V1(postgis_proj_version);
+Datum postgis_proj_version(PG_FUNCTION_ARGS)
+{
+       PG_RETURN_NULL();
+}
 #endif