On 05.06.25 17:57, David G. Johnston wrote:
- "if set to a number" seems to indicate that something else happens
if it's not a number. But it doesn't say what. And it's also not
true. And we don't phrase things like that for other numeric settings.
If not set to a number (data type indicator) it doesn’t override. I
suppose “to a number” could be removed since mention of seconds implies
that you better enter a number for the value.
If you don't set it to a number, you get an error, so this case can't
even happen:
postgres=# \set WATCH_INTERVAL foo
invalid value "foo" for "WATCH_INTERVAL"
- The way this is phrased now seems to say that the variable is
unset by default, and only if it is set does it override the
default. But that is not what happens. The variable has a value by
default, and that is what gets used.
Can you demonstrate this claim? It’s basically an environment variable
- which are conventionally unset in the environment, and when set their
value overrides some other externally defined value. In this case a define.
$ psql -X
postgres=# \echo :WATCH_INTERVAL
2