Обсуждение: ALTER DATABASE SET not working as expected?
This seems simple enough but it's not working. alter database dbname set "blah.blah" = 'test_value' ; The above statement returns with no errors. select current_setting('blah.blah') The above statement returns a record with null Also how long does the "ALTER DATABASE SET" last? Will it survive a shutdown and restart?
2021年9月9日(木) 16:53 Tim Uckun <timuckun@gmail.com>: > > This seems simple enough but it's not working. > > alter database dbname set "blah.blah" = 'test_value' ; > > The above statement returns with no errors. > > select current_setting('blah.blah') > > The above statement returns a record with null Open a new database session and you should see the setting. > Also how long does the "ALTER DATABASE SET" last? Will it survive a > shutdown and restart? Yes. Regards Ian Barwick -- EnterpriseDB: https://www.enterprisedb.com
Ok thanks. On Thu, Sep 9, 2021 at 9:06 PM Ian Lawrence Barwick <barwick@gmail.com> wrote: > > 2021年9月9日(木) 16:53 Tim Uckun <timuckun@gmail.com>: > > > > This seems simple enough but it's not working. > > > > alter database dbname set "blah.blah" = 'test_value' ; > > > > The above statement returns with no errors. > > > > select current_setting('blah.blah') > > > > The above statement returns a record with null > > Open a new database session and you should see the setting. > > > Also how long does the "ALTER DATABASE SET" last? Will it survive a > > shutdown and restart? > > Yes. > > > Regards > > Ian Barwick > > -- > EnterpriseDB: https://www.enterprisedb.com