Skip to content

Commit

Permalink
[agroal#334] Throw an error when config-get refers to a non existin…
Browse files Browse the repository at this point in the history
…g key

This commit fixes the problem that arise when the user specifies
a global key (i.e., one that does not exist in the section
[pgagroal]) to the subcommand `config-get`.
If the key is not known, an error is thrown.

Close agroal#334
  • Loading branch information
fluca1978 committed Dec 13, 2022
1 parent 07b79cc commit b5516c8
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/libpgagroal/configuration.c
Original file line number Diff line number Diff line change
Expand Up @@ -3513,6 +3513,11 @@ pgagroal_write_config_value(char* buffer, char* config_key)
{
return to_bool(buffer, config->track_prepared_statements);
}
else
{
goto error;
}

} // end of global configuration settings
else
{
Expand Down

0 comments on commit b5516c8

Please sign in to comment.