Search Postgresql Archives

Re: Strange behavior of "=" as assignment operator

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Chris Travers-5 wrote
> My  preference would be that at some point we start adding warnings when =
> is used as an assignment.  Such warnings could be turned off.  Then at
> some
> later point we can decide whether to change the behavior.  A decision to
> changing the language would be different if such behavior had given
> warnings for several years prior.

We can play the "let's pretend we have already been warning people for the
past 5 years about this: would we, today, turn off the behavior without a
recourse to turn it back on?" game.  We need to make a decision with the
information we have right now - not at "some later point".  The decision is
independent of whether we have been warning people or not - the warning is
simply part of the "how to go about affecting the decision that has already
been made".

A bogus warning is nearly as bad as simply disallowing the syntax in the
first place and I do not like turning one on unless there is the decision to
disallow the syntax in the future.

My preference would be to document the currently allowable usage of both
":=" and "=" (including within GET DIAGNOSTICS).  Address in the
documentation compatibility concerns.  And add configurations to the "check
function" implementation that allow the programmer to decide which usages
are allowable and which are not.  The default would be to allow either
symbol in either situation - i.e., the current behavior.

The status-quo, from the lack of discussion surrounding this recently,
doesn't seem to be that bad.  My sample and exposure to other's code,
though, is quite minimal and not everything makes it to the lists (or is
read if it does) so maybe there is some underlying significant risk that I
am simply missing.

David J.




--
View this message in context: http://postgresql.1045698.n5.nabble.com/Strange-behavior-of-as-assignment-operator-tp5757205p5757670.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.


-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux