#! /bin/sh

DB=${1:-geo}

monitor $DB << EOF

/*=============================================================*/
/* loadgeo-aux                                                 */
/*                                                             */
/* Define some forgotten functions for Postgres standard types */
/*=============================================================*/

define function GetMyOid ( language = "c", returntype = oid)
   as "$GEOHOME/geo-ext/geo-aux.o"
\g

define function int4float8 ( language = "c", returntype = int4)
   arg is (float8)
   as "$GEOHOME/geo-ext/geo-aux.o"
\g

define function float8int4 ( language = "c", returntype = float8)
   arg is (int4)
   as "$GEOHOME/geo-ext/geo-aux.o"
\g

define function int4float4 ( language = "c", returntype = int4)
   arg is (float4)
   as "$GEOHOME/geo-ext/geo-aux.o"
\g

define function float4int4 ( language = "c", returntype = float4)
   arg is (int4)
   as "$GEOHOME/geo-ext/geo-aux.o"
\g
