Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 8C4814765BB for ; Fri, 13 Sep 2002 13:51:12 -0400 (EDT) Received: from davinci.ethosmedia.com (davinci.ethosmedia.com [209.10.40.250]) by postgresql.org (Postfix) with ESMTP id E74DF476397 for ; Fri, 13 Sep 2002 13:51:11 -0400 (EDT) Received: from [66.219.92.2] (HELO chocolate-mousse) by davinci.ethosmedia.com (CommuniGate Pro SMTP 3.5.9) with ESMTP id 1647223; Fri, 13 Sep 2002 10:51:09 -0700 Content-Type: text/plain; charset="iso-8859-1" From: Josh Berkus Reply-To: josh@agliodbs.com Organization: Aglio Database Solutions To: "Michael Paesold" , Subject: Re: Assignments in PL/pgSQL Date: Fri, 13 Sep 2002 10:51:41 -0700 X-Mailer: KMail [version 1.4] References: <007301c25b12$5b8d96e0$4201a8c0@beeblebrox> In-Reply-To: <007301c25b12$5b8d96e0$4201a8c0@beeblebrox> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Message-Id: <200209131051.41556.josh@agliodbs.com> X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200209/140 X-Sequence-Number: 9417 Michael, > although this is not really SQL, but PL/pgSQL, I hope this is the right > place to ask. This is the right place. > I have written a complex triggers. It works very well. Just now I have > realized that I have used the =3D operater for variable assignments, inst= ead > of the :=3D operater. To my suprise, there was no error or warning, and t= he > store procedure works very well! >=20 > e.g. > NEW.someval =3D rec.someother; > works as well as > NEW.someval :=3D rec.someother; >=20 > Can you confirm that both are valid? Can someone explain this? > And is it safe to use the former syntax? I'm very surprised, too. The "=3D" syntax is not per spec; my guess is,= =20 somebody coded in compatibility for DB conversion purposes and left it ther= e.=20=20 Jan? Tom? --=20 -Josh Berkus Aglio Database Solutions San Francisco