From: Tom Lane <tgl@sss.pgh.pa.us>
To: RafaĆ Rzepecki <divided.mind@gmail.com>
Cc: pgsql-bugs@postgresql.org
Cc: Amit Kapila <amit.kapila@huawei.com>
Subject: Re: BUG #8198: ROW() literals not supported in an IN clause
Date: Sun, 09 Jun 2013 18:44:08 -0400
Message-ID: <15015.1370817848@sss.pgh.pa.us> (raw)
In-Reply-To: <CAJu-ZiwPJCz1OkQ_Jx7PwLn_Hmdavk3KF=7JWULyLj5r-kEnzg@mail.gmail.com>
References: <E1UioKD-0007wM-Ta@wrigleys.postgresql.org>
<51adc2f4.65cc440a.3921.ffffdd76SMTPIN_ADDED_BROKEN@mx.google.com>
<CAJu-ZiwPJCz1OkQ_Jx7PwLn_Hmdavk3KF=7JWULyLj5r-kEnzg@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>
=?UTF-8?Q?Rafa=C5=82_Rzepecki?= <divided.mind@gmail.com> writes:
> I'm pretty sure the original intent was to afford some extra checks so
> that conditions such as "ROW(1, 2) IN ((ROW(3, 4), ROW(5, 6, 7))"
> would get rejected at parsing time (CCing the original author; please
> confirm).
No; the reason it was like that was that when that code was written,
make_row_comparison_op was the only way to compare two row values at
all. We didn't have record_eq and friends; nor did we have arrays
of composites.
> Since the restriction seems a rather arbitrary (at least I fail to see
> any reason for it), it can be removed altogether (patch 0002, not
> tested as well):
This is reasonable as far as it goes, but I think it doesn't go far
enough --- there's really no reason anymore to reject RowExprs as
components of ScalarArrayOpExpr either. I've extended this patch
some and committed it. Thanks for the report!
regards, tom lane
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: tgl@sss.pgh.pa.us, divided.mind@gmail.com, amit.kapila@huawei.com
Subject: Re: BUG #8198: ROW() literals not supported in an IN clause
In-Reply-To: <15015.1370817848@sss.pgh.pa.us>
References: <E1UioKD-0007wM-Ta@wrigleys.postgresql.org> <51adc2f4.65cc440a.3921.ffffdd76SMTPIN_ADDED_BROKEN@mx.google.com> <CAJu-ZiwPJCz1OkQ_Jx7PwLn_Hmdavk3KF=7JWULyLj5r-kEnzg@mail.gmail.com> <15015.1370817848@sss.pgh.pa.us>
* 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