From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Robert Haas <robertmhaas(at)gmail(dot)com> |
Cc: | Neil Conway <neil(dot)conway(at)gmail(dot)com>, Postgres-Bugs <pgsql-bugs(at)postgresql(dot)org> |
Subject: | Re: row_to_json(), NULL values, and AS |
Date: | 2018-06-19 15:11:30 |
Message-ID: | 20877.1529421090@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs pgsql-hackers |
Robert Haas <robertmhaas(at)gmail(dot)com> writes:
> On Fri, Jun 15, 2018 at 10:53 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>> I'm a bit hesitant to muck with this behavior, given that it's stood
>> for ~20 years. However, if we did want to touch it, maybe the right
>> thing would be to give up the absolutist position that f(x) and x.f
>> are exactly interchangeable. We could say instead that we prefer the
>> function interpretation if function syntax is used, and the column
>> interpretation if column syntax is used. I don't know how likely
>> that is to break existing apps ... perhaps not very, but I wouldn't
>> risk back-patching it in any case.
> For the record, I fear that this change (committed as
> b97a3465d73bfc2a9f5bcf5def1983dbaa0a26f8) is going to break more
> things than have been foreseen in this thread. I do not have a
> specific theory about how that's going to happen, just vague unease.
Yeah, that's why I wouldn't back-patch it. But certainly the behavior
Neil complained of is pretty bad as well, and it's only going to get
worse as we invent more functions taking record. I think the new
behavior is a clear improvement. If it breaks any apps that were
relying on interpreting f(x) as a column, they can fix it by writing
x.f instead. We inflict worse upgrade pain than that on a regular
basis.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2018-06-19 19:17:52 | Re: BUG #15248: pg_upgrade fails when a function with an empty search_path is encountered |
Previous Message | Robert Haas | 2018-06-19 14:34:49 | Re: row_to_json(), NULL values, and AS |
From | Date | Subject | |
---|---|---|---|
Next Message | Daniel Gustafsson | 2018-06-19 15:18:16 | Re: Postgres 11 release notes |
Previous Message | Tomas Vondra | 2018-06-19 15:06:22 | Re: WAL prefetch |