Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Favorites infavorites:mine
infavorites:1234
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with Search options user 69796

Procedural code automatically executed in response to a database event.

2
votes
1answer
I am wondering if it is at all possible to create trigger that populates the X and Y of a created point into 2 separate fields called 'easting' and 'northing'? It is an update trigger on a table … to double precision. I now need to get these fields to update with the x/y on update. See below for my code so far: CREATE OR REPLACE FUNCTION tf_xy_27700() RETURNS trigger AS $BODY$ BEGIN …
asked Jul 20 '15 by daniel franklin
1
vote
its okay, and sorry for the bad explanation. i got it to work as shown below: CREATE OR REPLACE FUNCTION tf_xy_point() RETURNS trigger AS $BODY$BEGIN IF TG_OP = 'UPDATE' OR TG_OP = 'INSERT' THEN … postgres; GRANT EXECUTE ON FUNCTION tf_xy_point() TO public; GRANT EXECUTE ON FUNCTION tf_xy_point() TO postgres; This now allows for the trigger to used as generic for any other table wishing to find the eastings and northings on UPDATE. …
answered Jul 22 '15 by daniel franklin