in this context implies a SQL trigger, (aka database trigger), which is a type of stored procedure that is called automatically in response to a specified event in the database.

learn more… | top users | synonyms

2
votes
1answer
52 views

How to set a python code to trigger on any update on a feature class

For example, when I have a geometry change on a point, I would like to update the X and Y fields to the new current location, I understand how to make the code, but not where do I set or put it to be ...
1
vote
1answer
70 views

Geometry type and create trigger for that in postgresql

I want to create a trigger (before inserting trigger), to check the geometry type weather it is point, polygon, line, or multi-polygon. After that, I want to set the color property. How can I do this ...
0
votes
0answers
166 views

ArcSDE 10.1 Insert/Update Trigger on Adds (A) Table (Oracle 11g) and Feature Services on ArcGIS Server

I'm trying to use a trigger to update a versioned dataset in an SDE environment. Basically, I wanted to implement a system of unique ids called GISID. Initially, when a feature is created (inserted), ...
1
vote
0answers
45 views

QGIS crashes when using PostgreSQL/PostGIS triggers

When using PostgreSQL/PostGIS triggers saving layer edits gets slower and slower every time when saving a layer edit. This issue occurs after a few up to a few dozen saved layer edits. Finally QGIS ...
4
votes
1answer
120 views

How to create trigger to check geometry validity?

I want to create trigger to check geometry validity in spatial table. I have a table: CREATE TABLE vec_geometry ( id bigserial is_valid boolean, invalid_reason character(128), geom ...
6
votes
2answers
586 views

How to use interacting PostgreSQL/PostGIS triggers in QGIS to create multiple labels on polygons?

EDIT: The trigger functions posted are well done but there are still a few issues. I've uploaded two screen recordings: http://workupload.com/file/ygRnYtp9 http://workupload.com/file/OBY7i9Fh I ...
2
votes
1answer
123 views

How to set/update columns by using a trigger?

I want to set/update attributes (alignment_horizontal, alignment_vertical) of a PostGIS geometry (point) by using a trigger. CREATE TABLE point ( gid serial NOT NULL, geom geometry(point, SRID), ...
2
votes
0answers
29 views

Creat point count trigger in PostgreSQL?

I wish to create a trigger in PostgreSQL for counting points in a polygon. The tweak is that the count should automatically get updated whenever the polygon is edited. Can anyone please help me on ...
3
votes
1answer
251 views

How to create a trigger for multiple schemas?

One of my PostgreSQL databases contains different schemas which share the same structure. -- schema region_a CREATE TABLE region_a.point ( gid serial NOT NULL, geom geometry(point, SRID), ...
1
vote
1answer
85 views

trigger postgis and dump qgis 2.8.2

I created a trigger that checks if geometry is valid on insert and update. create or replace function check_geom() returns trigger as $$ begin --insert a polygon IF st_isvalid(new.geom) = 'f' ...
2
votes
0answers
24 views

Add individual fields to delete-log-trigger when deleting PostGis-Objects via QGis

I am using a PostGres Database with PostGis extension (on Windows). QGis serves as a client to access (visualize and edit) certain database-tables. I need to create a delete-log-table that saves all ...
2
votes
1answer
1k views

Adding SQL Trigger to update field on INSERT (multiple rows)

I have an address point Feature Class that has an addressID field. I am trying to write a trigger that will in effect auto increment this field when a new address is added to the map. I cannot alter ...
1
vote
2answers
58 views

GIS and Geodatabase with Reminder Function

a friend of mine, a landscape gardener, asked me wether it is possible to represent his garden (mainly big trees and a few flower fields) in a GIS so he could administrate these on his computer by ...
0
votes
2answers
448 views

Problem with a PostGIS trigger

I'm trying to update a lat and lon columns each time I insert a point with a trigger, but I don't know why I get an error. This is the syntax I'm writing: CREATE OR REPLACE FUNCTION update_tg2() ...
1
vote
2answers
1k views

Postgresql trigger on a table that update a field

Depending on values on 2 fields A and B, I would like a field C to be updated or filled with a specific value. For example : create or replace function periode() returns trigger as $BODY$ begin IF A ...
2
votes
1answer
68 views

How do I catch PostgreSQL/ PostGIS RAISE messages in OpenLayers?

Is it possible to catch Raise Warning, Raise Notice and Raise Exception in OpenLayers while using a WFS-T-Layer (stored in a PostGIS-Database) to save edits? Example: A trigger is used to check values ...
3
votes
1answer
194 views

Show “Raise Notice” and “Raise Warning” in QGIS

Is there a way to catch "Raise Warning" and "Raise Notice" (while editing PostGIS-Layers) from a PostgreSQL/PostGIS-Trigger-Function within QGIS? One example: I have a trigger that reacts to insert or ...
1
vote
1answer
98 views

Postgres: plpgsql combine ST_Overlaps and ST_Intersects

I have a question regarding creating a trigger function in postgres with 2 conditions: when creating a linestring in QGIS their must either overlap nor intersect. So i wrote 2 function, each working ...
0
votes
0answers
81 views

QGIS linked to camera for GPS based triggering?

Has anybody done this yet? I'm new to QGIS and have just started exploring. I'd like to integrate flight lines and camera triggering if anybody can direct me to the right forum or area. Thanks!
1
vote
1answer
427 views

How to create postgresql triggers to calculate geometry from x,y and vice versa at the same time

I have a postgis table with point geometry which looks like this CREATE TABLE mypoints ( gid serial NOT NULL, coordid integer, geom geometry(Point,4326) ); And a table with coordinates ...
1
vote
0answers
241 views

how to automatically update column based on the second layer, trigger, postgreSQL

I am newbie in postgreSQL. I have 2 tables, observation and landcover, i want to create a trigger which would allowed to update the column observation.land based on the spatial information according ...
1
vote
2answers
111 views

postgresql rule to trigger

I have two spatial tables and I am mirroring the data between the two table with a postgres rule: CREATE OR REPLACE RULE create_centroid AS ON INSERT TO csg.client_area_request DO INSERT INTO csg....
1
vote
1answer
289 views

Aggregate functions not allowed in trigger

I need help with a postgres/postgis trigger. I have a table of retaining walls, each of which is associated with the adjacent road, except where the wall abuts a junction, where it will be split and ...
2
votes
2answers
183 views

How to setup a SQL trigger in CartoDB

I need to setup 2 SQL triggers in CartoDB that will update my inland and coastal tables each time my obs table is updated. I have never setup a SQL trigger but I have looked at the documentation and ...
2
votes
1answer
77 views

How can a column in a feature class be automatically updated as soon as another column is changed?

I have a feature class in a file geodatabase and it contains a field called [curing] in short integer type and another field called [IsPopulated] in short integer as well. What I want to achieve is ...
0
votes
1answer
132 views

PostgreSQL Trigger on inherited tables [closed]

In my PostgreSQL I have a parent table and a number of child tables (inherited from the parent table). How to create a trigger which will be bind to all the current and future child tables derived ...
2
votes
0answers
113 views

How to simulate events from Openlayers 2?

I am working on a GIS API that uses OpenLayers. I am testing it using QUnit. The problem is I need to simulate clicks and trigger some events to be able to test the whole code. For example, I have a ...
0
votes
0answers
203 views

Add primary key to all tables in PostgreSQL automatically

I have a database with 10 schema and every schema has 10 tables which could be points, lines, etc.). I have created a folder called data and sub-folder with the same name of schema.. I use FME to ...
1
vote
0answers
138 views

Spatialite android trigger problem

I am developing an android application that uses the database spatialite, I use this project to integrate the database on android https://code.google.com/p/spatialite-android/ It works normally, ...
2
votes
1answer
457 views

plpgsql | before update trigger: insert the new pseudo-record in another record and leave the old one as it was

I've got the following table: CREATE TABLE alumbrado_puntos_luz ( id numeric(8,0), "GEOMETRY" geometry, revision_actual numeric(10,0), revision_expirada numeric(10,0), CONSTRAINT ...
1
vote
1answer
107 views

Trigger custom geoprocessing tool outside ModelBuilder?

I have created a model in a custom toolbox with ModelBuilder in ArcMap 10.1. Is it possible to trigger the model outside ModelBuilder and ArcMap? For example, use a Python script to trigger the ...
1
vote
1answer
3k views

Postgresql Trigger to insert records in my table from another one

I spent few days trying to resolve this question but it was impossible. I have two tables: Table1. CREATE TABLE point ( id_point integer NOT NULL DEFAULT, layer text, elevation numeric, ...
3
votes
1answer
437 views

Triggers for delta tables

I have been facing an issue to capture the delta updates on SDE. We have written triggers on A and D tables to capture the delta updates(to capture the version name based on state id's), however I ...
2
votes
2answers
155 views

How to hand over polygon attribute to new point while digitizing?

My task is to work with bird observation data in an area, that is divided into zones as different polygons (A1, A2, etc.). I have the hand-written lists of observations and want to bring all entries ...
1
vote
1answer
2k views

Trigger a python script to run after a row is added to the feature class

I have a Python script which runs on a SDE feature class daily (as a scheduled task). I would actually like this script to run whenever a new row is added to the feature class (data is captured in the ...
1
vote
2answers
1k views

Trigger to fill attributes (data, client ip) in table for each new objects, PostGIS

In PostgreSQL/PostGIS database stores shapefiles. Client users software - QGIS. Please help me write PostgreSQL/PostGIS trigger, which for each newly added/updated feature in layer added 'time create' ...
3
votes
1answer
294 views

PostGIS Trigger doesn't work

The trigger below don't works and I need that when a new pipeline (adutoras) is inserted or updated, the procedure check what are the municipalities (municipios) that intersects the pipes and put the ...
5
votes
3answers
523 views

Updates to ArcSDE via Oracle trigger

Is it possible and/or feasible for an Oracle trigger to periodically update ArcSDE via a REST geoprocessing service? Does anyone have any experience with such a thing? The reason for this is that I ...
0
votes
1answer
186 views

Trigger on link length and filling attribute table

I create linear geometry in QGIS 1.8.0 (geometry stored in PostGIS 2.0). Help create trigger functions: in database should not be a lines less than 2 meters (linear geometry with length <2 meters ...
5
votes
3answers
8k views

Automatically update field value in one column based on change to another column in same table?

When editing I want to be able to change the attributes of one field and upon doing this allow for the automatic update of another field in the same attribute table. Essentially I have one layer ...
3
votes
1answer
386 views

Using multiversion view trigger to maintain unique ID in ArcSDE for Oracle?

I'm trying to identify the best way to automatically maintain a unique id column in Oracle ArcSDE. I don't want to use a class extension, since I've multiple third party users of the data and it's ...
4
votes
3answers
2k views

Trigger on SQL Server 2008 ArcSDE 10 and ArcGIS Server 10

I need to build a sql server db trigger to update a date field with the current date when a record is inserted or updated, I think. I will be using the date field as a way to recognize updates/...
2
votes
2answers
285 views

.NET Components triggering ITools on ArcEngine/Objects

I'm building a simple map interface on a .net component that I need to redistribute around. Well, my initial thoughts was to create the tools just the way I'm used to do it in ArcMap, inheriting ...