1

Is there any possibility to get a configuration value with a select in Postgres? For example smthng like this?

SELECT max_locks_per_transaction from config_table

2 Answers 2

2

Use current_setting()

select current_setting('max_locks_per_transaction');

Or select from pg_settings

select *
from pg_settings
where name = 'max_locks_per_transaction'
Sign up to request clarification or add additional context in comments.

Comments

1

Even simpler - just use SHOW:

> SHOW max_locks_per_transaction
64

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.