[HACKERS] map_partition_varattnos() and whole-row vars - Mailing list pgsql-hackers

From Amit Langote
Subject [HACKERS] map_partition_varattnos() and whole-row vars
Date
Msg-id 9a39df80-871e-6212-0684-f93c83be4097@lab.ntt.co.jp
Whole thread Raw
Responses Re: [HACKERS] map_partition_varattnos() and whole-row vars
Re: [HACKERS] map_partition_varattnos() and whole-row vars
List 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

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

Attachment

pgsql-hackers by date:

Previous
From: Albe Laurenz
Date:
Subject: Re: [HACKERS] On Complex Source Code Reading Strategy
Next
From: Amit Langote
Date:
Subject: Re: [HACKERS] UPDATE of partition key