Re: Strange behavior of "=" as assignment operator - Mailing list pgsql-general

From Stephen Frost
Subject Re: Strange behavior of "=" as assignment operator
Date
Msg-id 20130528200639.GI8597@tamriel.snowman.net
Whole thread Raw
In response to Strange behavior of "=" as assignment operator  (Moshe Jacobson <moshe@neadwerx.com>)
Responses Re: Strange behavior of "=" as assignment operator  (Pavel Stehule <pavel.stehule@gmail.com>)
Re: Strange behavior of "=" as assignment operator  (Moshe Jacobson <moshe@neadwerx.com>)
Re: Strange behavior of "=" as assignment operator  (Steve Crawford <scrawford@pinpointresearch.com>)
List pgsql-general
* Moshe Jacobson (moshe@neadwerx.com) wrote:
> It seems that the comparison operator "=" is functioning as the assignment
> operator ":=" in this plpgsql trigger script I wrote. I was under the
> impression that "=" is only for comparison and not assignment. If this is
> true, please explain the transcript below. If it's not true, where is this
> documented? I'm using PostgreSQL 9.1.4.

Both are supported.  It's not really documented as using '=' is
considered 'legacy' but it's also extensively used and removing it would
break quite a bit of code for people.

My general feeling is that we should either document it *as* legacy
or add it to the "list-of-things-to-break-in-10.0". :)

    Thanks,

        Stephen

Attachment

pgsql-general by date:

Previous
From: Moshe Jacobson
Date:
Subject: Strange behavior of "=" as assignment operator
Next
From: Pavel Stehule
Date:
Subject: Re: Strange behavior of "=" as assignment operator