Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1W23Ue-0006K7-7t for pgsql-docs@arkaria.postgresql.org; Sat, 11 Jan 2014 18:41:12 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1W23Ud-0007h4-MG for pgsql-docs@arkaria.postgresql.org; Sat, 11 Jan 2014 18:41:11 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1W23Uc-0007fw-J6 for pgsql-docs@postgresql.org; Sat, 11 Jan 2014 18:41:10 +0000 Received: from momjian.us ([72.94.173.45]) by magus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1W23UZ-0008R9-LL for pgsql-docs@postgresql.org; Sat, 11 Jan 2014 18:41:10 +0000 Received: from bruce by momjian.us with local (Exim 4.72) (envelope-from ) id 1W23UY-0006Rm-OG; Sat, 11 Jan 2014 13:41:06 -0500 Date: Sat, 11 Jan 2014 13:41:06 -0500 From: Bruce Momjian To: Pavel Stehule Cc: pgsql-docs Subject: Re: remove undocumented assign syntax from plpgsql doc Message-ID: <20140111184106.GF28089@momjian.us> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.20 (2009-06-14) X-Pg-Spam-Score: -2.0 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-docs Precedence: bulk Sender: pgsql-docs-owner@postgresql.org Applied. --------------------------------------------------------------------------- On Wed, May 29, 2013 at 10:02:20AM +0200, Pavel Stehule wrote: > Hello > > remove undocumented syntax for assign statements in plpgsql doc examples > > related to http://www.postgresql.org/message-id/CAJ4CxLkBFNAAsWdz=CsDkU1nC0De60WO15de=aUf6Q1W9DSj7w@mail.gmail.com > thread > > Regards > > Pavel Stehule > diff --git a/doc/src/sgml/plpgsql.sgml b/doc/src/sgml/plpgsql.sgml > index 19498c6..1817c9d 100644 > --- a/doc/src/sgml/plpgsql.sgml > +++ b/doc/src/sgml/plpgsql.sgml > @@ -3815,20 +3815,20 @@ CREATE OR REPLACE FUNCTION update_emp_view() RETURNS TRIGGER AS $$ > DELETE FROM emp WHERE empname = OLD.empname; > IF NOT FOUND THEN RETURN NULL; END IF; > > - OLD.last_updated = now(); > + OLD.last_updated := now(); > INSERT INTO emp_audit VALUES('D', user, OLD.*); > RETURN OLD; > ELSIF (TG_OP = 'UPDATE') THEN > UPDATE emp SET salary = NEW.salary WHERE empname = OLD.empname; > IF NOT FOUND THEN RETURN NULL; END IF; > > - NEW.last_updated = now(); > + NEW.last_updated := now(); > INSERT INTO emp_audit VALUES('U', user, NEW.*); > RETURN NEW; > ELSIF (TG_OP = 'INSERT') THEN > INSERT INTO emp VALUES(NEW.empname, NEW.salary); > > - NEW.last_updated = now(); > + NEW.last_updated := now(); > INSERT INTO emp_audit VALUES('I', user, NEW.*); > RETURN NEW; > END IF; > @@ -3913,10 +3913,10 @@ AS $maint_sales_summary_bytime$ > -- Work out the increment/decrement amount(s). > IF (TG_OP = 'DELETE') THEN > > - delta_time_key = OLD.time_key; > - delta_amount_sold = -1 * OLD.amount_sold; > - delta_units_sold = -1 * OLD.units_sold; > - delta_amount_cost = -1 * OLD.amount_cost; > + delta_time_key := OLD.time_key; > + delta_amount_sold := -1 * OLD.amount_sold; > + delta_units_sold := -1 * OLD.units_sold; > + delta_amount_cost := -1 * OLD.amount_cost; > > ELSIF (TG_OP = 'UPDATE') THEN > > @@ -3928,17 +3928,17 @@ AS $maint_sales_summary_bytime$ > OLD.time_key, NEW.time_key; > END IF; > > - delta_time_key = OLD.time_key; > - delta_amount_sold = NEW.amount_sold - OLD.amount_sold; > - delta_units_sold = NEW.units_sold - OLD.units_sold; > - delta_amount_cost = NEW.amount_cost - OLD.amount_cost; > + delta_time_key := OLD.time_key; > + delta_amount_sold := NEW.amount_sold - OLD.amount_sold; > + delta_units_sold := NEW.units_sold - OLD.units_sold; > + delta_amount_cost := NEW.amount_cost - OLD.amount_cost; > > ELSIF (TG_OP = 'INSERT') THEN > > - delta_time_key = NEW.time_key; > - delta_amount_sold = NEW.amount_sold; > - delta_units_sold = NEW.units_sold; > - delta_amount_cost = NEW.amount_cost; > + delta_time_key := NEW.time_key; > + delta_amount_sold := NEW.amount_sold; > + delta_units_sold := NEW.units_sold; > + delta_amount_cost := NEW.amount_cost; > > END IF; > > > -- > Sent via pgsql-docs mailing list (pgsql-docs@postgresql.org) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgsql-docs -- Bruce Momjian http://momjian.us EnterpriseDB http://enterprisedb.com + Everyone has their own god. + -- Sent via pgsql-docs mailing list (pgsql-docs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-docs