GLHI Database HTML Dump
Previous topic Chapter index Next topic

Function: mk_the_geom

 

 

Schema

public

 

Owner

glosdb

 

Descriptions

There is no description for function mk_the_geom

 

Options

Option

Value

Returns

trigger

Language

plpgsql

Parameters

There are no parameters for function mk_the_geom

 

Definition


CREATE OR REPLACE FUNCTION "public"."mk_the_geom" () RETURNS trigger AS
$body$
begin
         if (new.the_geom is null) then
          EXECUTE 'update tbl_geography_test2 set the_geom = PolygonFromText(''POLYGON(( ' || new.extent || ' ))'',4326) where row_id = ' || new.row_id;
         end if;
         
         return new;
       end
$body$
LANGUAGE 'plpgsql' VOLATILE CALLED ON NULL INPUT SECURITY INVOKER;

Pete Giencke
pgiencke@glc.org
Previous topic Chapter index Next topic