Re: JSON objects merge using || operator

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Mickaël Le Baillif <mickael(dot)le(dot)baillif(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: JSON objects merge using || operator
Date: 2016-12-21 17:57:28
Message-ID: 799.1482343048@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

=?UTF-8?Q?Micka=C3=ABl_Le_Baillif?= <mickael(dot)le(dot)baillif(at)gmail(dot)com> writes:
> Do you have any reason for giving the same precedence on those operators ?
> A small survey among my colleagues and friends tends to believe that our
> human brain implicitly gives a greater priority to the '->' operator.

PG's operator precedence rules were set long before the JSON types ever
existed. Even if we wanted to treat -> specially, we couldn't for fear
of breaking existing queries that used custom operators named that.

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom DalPozzo 2016-12-21 18:06:16 Re: error updating a tuple after promoting a standby
Previous Message Tom Lane 2016-12-21 17:52:59 Re: pg_restore to a port where nobody is listening?