0

I'm looking for a way to get the return schema of a procedure in Postgresql. So for example, if the procedure returns a select from a table, it would be that particular result. So similar to the information schema to see the table columns, I need to see the columns returned in a procedure.

1 Answer 1

2

That information is in the proallargtypes and proargmodes columns of the pg_proc catalog table.

The output parameters (which are the result columns) will have an o or b in proargmodes.

If it is a function that is not declared with output parameters, then the result type is found in the prorettype column. If that is a composite type, its columns will be found in pg_attribute.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.