Re: Finding every use of a built-in function - Mailing list pgsql-hackers

From Pavel Stehule
Subject Re: Finding every use of a built-in function
Date
Msg-id CAFj8pRAqOw5iWJkCCi+2Pbt-SLM-tdzqowU_+NQb0yK5BgVqFA@mail.gmail.com
Whole thread Raw
In response to Finding every use of a built-in function  (Kurlaev Jaroslav <j.kurlaev@cft.ru>)
Responses RE: Finding every use of a built-in function
List pgsql-hackers
Hi

pá 26. 1. 2024 v 11:39 odesílatel Kurlaev Jaroslav <j.kurlaev@cft.ru> napsal:
Hi hackers,

I'm not sure if it's the best list for my question but I have a following problem.

I have an existing DB with lots of data and I need to modify the behavior of one specific
built-in function. I can of course create my own function and redefine the behavior but
now I need to find every single instance of the old function being used. There is
dependency tracking with pg_depend but it doesn't work for built-in functions.

I also tried a different approach and tried to create a C-language hook for function
call but hooks also don't work for built-in functions.

Do you have some advice for me?

 plpgsq_check can show dependencies https://github.com/okbob/plpgsql_check#dependency-list

or you can write query SELECT * FROM pg_proc WHERE proname ilike '%name of your function %'

Regards

Pavel


Thanks.

pgsql-hackers by date:

Previous
From: Richard Guo
Date:
Subject: Re: Reordering DISTINCT keys to match input path's pathkeys
Next
From: Alvaro Herrera
Date:
Subject: Re: [EXTERNAL] Re: Add non-blocking version of PQcancel