Re: MERGE bug report
Alvaro Herrera <alvherre@alvh.no-ip.org>
From: Alvaro Herrera <alvherre@alvh.no-ip.org>
To: Richard Guo <guofenglinux@gmail.com>
Cc: Joe Wildish <joe@lateraljoin.com>, Pg Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2022-04-12T07:47:47Z
Lists: pgsql-hackers
On 2022-Apr-11, Richard Guo wrote: > At first I was wondering whether we need to also include vars used in > each action's targetlist, just as what we did for each action's qual. > Then later I realized parse_merge.c already did that. But now it looks > much better to process them two in preprocess_targetlist. Yeah. I pushed that. However, now EXPLAIN VERBOSE doesn't show the columns from the source relation in the Output line --- I think only those that are used as join quals are shown, thanks to distribute_quals_to_rels. I think it would be better to fix this. Maybe expanding the source target list earlier is called for, after all. I looked at transformUpdateStmt and siblings for inspiration, but came out blank. > A minor comment is that we can use list_concat_copy(list1, list2) > instead of list_concat(list_copy(list1), list2) for better efficiency. Thanks for that tip. -- Álvaro Herrera 48°01'N 7°57'E — https://www.EnterpriseDB.com/ "La vida es para el que se aventura"
Commits
-
Change mechanism to set up source targetlist in MERGE
- ce4f46fdc814 15.0 landed
-
Fix compilerwarning in logging size_t
- 75edb919613e 15.0 cited