A little cosmetic to convert_VALUES_to_ANY() - Mailing list pgsql-hackers

From Tender Wang
Subject A little cosmetic to convert_VALUES_to_ANY()
Date
Msg-id CAHewXNmKVEXge0QD4-FyUEvDk95MUVvTzOrkMWFiBM=RQCP-tw@mail.gmail.com
Whole thread Raw
Responses Re: A little cosmetic to convert_VALUES_to_ANY()
List pgsql-hackers
Hi,

While debugging the pull-up sublink codes, I noticed the convert_VALUES_to_ANY().
The function is to convert "where colX in VALUES(xxx)" into SAOP. It firstly scans the values_list to
make sure no volatile function is in this list, then it scans this values_list again to check that it
only includes Const items. 

We can merge the two scans into one. This can reduce the time complexity from 2O(n) to O(n).

Also, add a brace for better/more consistent style in the attached patch.

--
Thanks,
Tender Wang
Attachment

pgsql-hackers by date:

Previous
From: Fujii Masao
Date:
Subject: Re: Tab completion for large objects
Next
From: Michael Paquier
Date:
Subject: Re: IndexAmRoutine aminsertcleanup function can be NULL?