Skip to content
Advertisement

Tag: triggers

Trigger Not Running Check Whether it is correct or not? [closed]

Closed. This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed last year. Improve this question This is my trigger and its running perfectly with the help of stackoverflow.com I edit my question because of blocking. Answer There are two issues with

Postgres trigger to update counter in another table not working

There is users table and places table. The users table has column id(primary key), username, place_count. The places table has column id(primary key), name, user_id (user_id foreign key) Each user can post multiple photos and so I want the column”place_count” to keep the count of user-specific places from places table (eg, user with id 1 having place_count = 150, user

Using NEW and COPY in a Postgres Trigger

I’m trying to copy the last inserted row from a table into a csv file using a trigger. I’ve tried this in various incarnations, with or without EXECUTE but I’m still getting the error. Just cannot get it to access the NEW data. Where am I going wrong ? Answer Adrian’s answer inspired me to experiment more with the NEW

Replacing a subquery in a PL/SQL trigger

I have 2 tables. One called Employee and the other Employee_jobs. One of the fields in the Employee table is job_name. The Employee_jobs table contains 2 fields, job_name, and Emp_count (number of employees per job). What i’m trying to do is whenever i perform an operation on the Employee table then it would automatically adjust the Employee_jobs table. This basically

Advertisement