S
S
sqldeveloperjunior2022-01-24 10:32:20
PostgreSQL
sqldeveloperjunior, 2022-01-24 10:32:20

How to watch procedures by request?

I can, for example, through dbeaver, find the procedures folder in databases -> schemas-> and then manually find the desired procedure by name and select SQL generation -> DDL .
I would like to speed up this process through a query in which I would insert the name of the procedure and give me a response of the properties that are inside this procedure ...
Is it possible to view through a query to the database what the procedure consists of, if so, what query to write in order to do this look.
Interested in query syntax for MS SQL and postgreSQL

Example
61ee55dbb2428023718922.png
61ee55e48b6b4695151211.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Melkij, 2022-01-24
@sqldeveloperjunior

postgresql

SELECT pg_catalog.pg_get_functiondef(pg_proc.oid)
FROM pg_proc
/* любые where по вкусу */

Also known as \sf in psql.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question