Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
postgres-lambda-diff
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jakob Huber
postgres-lambda-diff
Commits
d84c584e
Commit
d84c584e
authored
11 years ago
by
Bruce Momjian
Browse files
Options
Downloads
Patches
Plain Diff
Revert
fd2ace80
Seems we want to document '=' plpgsql assignment instead.
parent
62865262
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
doc/src/sgml/plpgsql.sgml
+15
-15
15 additions, 15 deletions
doc/src/sgml/plpgsql.sgml
with
15 additions
and
15 deletions
doc/src/sgml/plpgsql.sgml
+
15
−
15
View file @
d84c584e
...
@@ -3932,20 +3932,20 @@ CREATE OR REPLACE FUNCTION update_emp_view() RETURNS TRIGGER AS $$
...
@@ -3932,20 +3932,20 @@ CREATE OR REPLACE FUNCTION update_emp_view() RETURNS TRIGGER AS $$
DELETE FROM emp WHERE empname = OLD.empname;
DELETE FROM emp WHERE empname = OLD.empname;
IF NOT FOUND THEN RETURN NULL; END IF;
IF NOT FOUND THEN RETURN NULL; END IF;
OLD.last_updated
:
= now();
OLD.last_updated = now();
INSERT INTO emp_audit VALUES('D', user, OLD.*);
INSERT INTO emp_audit VALUES('D', user, OLD.*);
RETURN OLD;
RETURN OLD;
ELSIF (TG_OP = 'UPDATE') THEN
ELSIF (TG_OP = 'UPDATE') THEN
UPDATE emp SET salary = NEW.salary WHERE empname = OLD.empname;
UPDATE emp SET salary = NEW.salary WHERE empname = OLD.empname;
IF NOT FOUND THEN RETURN NULL; END IF;
IF NOT FOUND THEN RETURN NULL; END IF;
NEW.last_updated
:
= now();
NEW.last_updated = now();
INSERT INTO emp_audit VALUES('U', user, NEW.*);
INSERT INTO emp_audit VALUES('U', user, NEW.*);
RETURN NEW;
RETURN NEW;
ELSIF (TG_OP = 'INSERT') THEN
ELSIF (TG_OP = 'INSERT') THEN
INSERT INTO emp VALUES(NEW.empname, NEW.salary);
INSERT INTO emp VALUES(NEW.empname, NEW.salary);
NEW.last_updated
:
= now();
NEW.last_updated = now();
INSERT INTO emp_audit VALUES('I', user, NEW.*);
INSERT INTO emp_audit VALUES('I', user, NEW.*);
RETURN NEW;
RETURN NEW;
END IF;
END IF;
...
@@ -4030,10 +4030,10 @@ AS $maint_sales_summary_bytime$
...
@@ -4030,10 +4030,10 @@ AS $maint_sales_summary_bytime$
-- Work out the increment/decrement amount(s).
-- Work out the increment/decrement amount(s).
IF (TG_OP = 'DELETE') THEN
IF (TG_OP = 'DELETE') THEN
delta_time_key
:
= OLD.time_key;
delta_time_key = OLD.time_key;
delta_amount_sold
:
= -1 * OLD.amount_sold;
delta_amount_sold = -1 * OLD.amount_sold;
delta_units_sold
:
= -1 * OLD.units_sold;
delta_units_sold = -1 * OLD.units_sold;
delta_amount_cost
:
= -1 * OLD.amount_cost;
delta_amount_cost = -1 * OLD.amount_cost;
ELSIF (TG_OP = 'UPDATE') THEN
ELSIF (TG_OP = 'UPDATE') THEN
...
@@ -4045,17 +4045,17 @@ AS $maint_sales_summary_bytime$
...
@@ -4045,17 +4045,17 @@ AS $maint_sales_summary_bytime$
OLD.time_key, NEW.time_key;
OLD.time_key, NEW.time_key;
END IF;
END IF;
delta_time_key
:
= OLD.time_key;
delta_time_key = OLD.time_key;
delta_amount_sold
:
= NEW.amount_sold - OLD.amount_sold;
delta_amount_sold = NEW.amount_sold - OLD.amount_sold;
delta_units_sold
:
= NEW.units_sold - OLD.units_sold;
delta_units_sold = NEW.units_sold - OLD.units_sold;
delta_amount_cost
:
= NEW.amount_cost - OLD.amount_cost;
delta_amount_cost = NEW.amount_cost - OLD.amount_cost;
ELSIF (TG_OP = 'INSERT') THEN
ELSIF (TG_OP = 'INSERT') THEN
delta_time_key
:
= NEW.time_key;
delta_time_key = NEW.time_key;
delta_amount_sold
:
= NEW.amount_sold;
delta_amount_sold = NEW.amount_sold;
delta_units_sold
:
= NEW.units_sold;
delta_units_sold = NEW.units_sold;
delta_amount_cost
:
= NEW.amount_cost;
delta_amount_cost = NEW.amount_cost;
END IF;
END IF;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment