From: | Amit Langote <Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp> |
---|---|
To: | Pg Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | map_partition_varattnos() and whole-row vars |
Date: | 2017-07-26 07:58:08 |
Message-ID: | 9a39df80-871e-6212-0684-f93c83be4097@lab.ntt.co.jp |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Rajkumar Raghuwanshi reported [1] on the "UPDATE partition key" thread
that whole-row vars don't play nicely with partitioned table operations.
For example, when used to convert WITH CHECK OPTION constraint expressions
and RETURNING target list expressions, it will error out if the
expressions contained whole-row vars. That's a bug, because whole-row
vars are legal in those expressions. I think the decision to output error
upon encountering a whole-row in the input expression was based on the
assumption that it will only ever be used to convert partition constraint
expressions, which cannot contain those. So, we can relax that
requirement so that its other users are not bitten by it.
Attached fixes that.
Adding this to the PG 10 open items list.
Thanks,
Amit
[1]
https://postgr.es/m/CAKcux6%3Dz38gH4K6YAFi%2BYvo5tHTwBL4tam4VM33CAPZ5dDMk1Q%40mail.gmail.com
Attachment | Content-Type | Size |
---|---|---|
0001-Fix-map_partition_varattnos-to-sometimes-accept-whol.patch | text/plain | 8.4 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Amit Langote | 2017-07-26 07:59:46 | Re: UPDATE of partition key |
Previous Message | Albe Laurenz | 2017-07-26 07:46:36 | Re: On Complex Source Code Reading Strategy |