Simplify backtrace_functions GUC code

Started by Bharath Rupireddyover 2 years ago2 messageshackers

Thread notes

1 note#refactor
hackorum-bot#refactor
hackorum-bot
1 day ago

@global #refactor

#refactor
Jump to latest
#1Bharath Rupireddy
bharath.rupireddyforpostgres@gmail.com

Hi,

While working on [1]/messages/by-id/CALj2ACXG1wzrb8+5HPNd8Qjr1h8GYkW-ijWhMYr2Y8_DzOB-=g@mail.gmail.com, I noticed that the backtrace_functions GUC code
does its own string parsing and uses another extra variable
backtrace_function_list to store the processed form of
backtrace_functions GUC.

I think the code can be simplified a bit by using
SplitIdentifierString like in the attached patch. With this,
backtrace_function_list variable and assign_backtrace_functions() will
go away.

Thoughts?

[1]: /messages/by-id/CALj2ACXG1wzrb8+5HPNd8Qjr1h8GYkW-ijWhMYr2Y8_DzOB-=g@mail.gmail.com

--
Bharath Rupireddy
PostgreSQL Contributors Team
RDS Open Source Databases
Amazon Web Services: https://aws.amazon.com

Attachments:

t49329_1
v1-0001-Simplify-backtrace_functions-GUC-code.patchapplication/x-patch; name=v1-0001-Simplify-backtrace_functions-GUC-code.patchDownload+65-65
#2Alvaro Herrera
alvherre@alvh.no-ip.org
In reply to: Bharath Rupireddy (#1)
Re: Simplify backtrace_functions GUC code

On 2024-Mar-17, Bharath Rupireddy wrote:

I think the code can be simplified a bit by using
SplitIdentifierString like in the attached patch. With this,
backtrace_function_list variable and assign_backtrace_functions() will
go away.

Did you read the discussion that led to the current coding? What part
of it is no longer valid, in such a way that you want to make the code
look like an approach that was rejected back then?

/messages/by-id/35beac83-bf15-9d79-05c4-2dccd0834993@2ndquadrant.com

--
Álvaro Herrera PostgreSQL Developer — https://www.EnterpriseDB.com/