Skip to content

Instantly share code, notes, and snippets.

View mmohiudd's full-sized avatar

Muntasir Mohiuddin mmohiudd

View GitHub Profile
@mmohiudd
mmohiudd / geo_update_trigger.sql
Created September 30, 2015 17:03
Update geometry and geography data with a trigger for PostgreSQL(PostGIS)
DROP TABLE IF EXISTS test_table;
CREATE TABLE test_table(
id bigserial NOT NULL,
latitude double precision,
longitude double precision,
geom geometry,
geog geography,
updated_ts double precision,
CONSTRAINT test_table_unique_key UNIQUE (id)
);