pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Paesold <mpaesold@gmx.at>
To: pgsql-sql@postgresql.org
Subject: Assignments in PL/pgSQL
Date: Fri, 13 Sep 2002 12:43:10 +0200
Message-ID: <007301c25b12$5b8d96e0$4201a8c0@beeblebrox> (raw)
References: <GNELIHDDFBOCMGBFGEFOMEDICEAA.chriskl@familyhealth.com.au>

Hi all,

although this is not really SQL, but PL/pgSQL, I hope this is the right
place to ask.

I have written a complex triggers. It works very well. Just now I have
realized that I have used the = operater for variable assignments, instead
of the := operater. To my suprise, there was no error or warning, and the
store procedure works very well!

e.g.
NEW.someval = rec.someother;
works as well as
NEW.someval := rec.someother;

Can you confirm that both are valid? Can someone explain this?
And is it safe to use the former syntax?

Best Regards,
Michael Paesold






view thread (5+ messages)  latest in thread

Message-ID: <007301c25b12$5b8d96e0$4201a8c0@beeblebrox>
Permalink:  ../007301c25b12$5b8d96e0$4201a8c0@beeblebrox/
Also on:    postgresql.org/message-id/007301c25b12$5b8d96e0$4201a8c0@beeblebrox

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: mpaesold@gmx.at
  Subject: Re: Assignments in PL/pgSQL
  In-Reply-To: <007301c25b12$5b8d96e0$4201a8c0@beeblebrox>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox