Re: Allow default \watch interval in psql to be configured

Поиск
Список
Период
Сортировка
От Pavel Stehule
Тема Re: Allow default \watch interval in psql to be configured
Дата
Msg-id CAFj8pRDKORZ=4oxtvuB=GdFUzuTwunZS7jOxdd-qCGbMGH-jkA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Allow default \watch interval in psql to be configured  (Daniel Gustafsson <daniel@yesql.se>)
Ответы Re: Allow default \watch interval in psql to be configured
Список pgsql-hackers


st 26. 3. 2025 v 9:05 odesílatel Daniel Gustafsson <daniel@yesql.se> napsal:
> On 26 Mar 2025, at 08:42, Pavel Stehule <pavel.stehule@gmail.com> wrote:

> The reason is probably my LANG=cs_CZ.UTF8. When I switched to LANG=C, then tests passed.
>
> The main problem is in numeric format. Czech uses the comma instead of the dot.

Thanks for investigating!  The main value of the test is to test setting value
and unsetting it again, so we could just as well use an integer value like the
diff below.  Does it pass for you with that instead?

diff --git a/src/bin/psql/t/001_basic.pl b/src/bin/psql/t/001_basic.pl
index 7192d96049d..739cb439708 100644
--- a/src/bin/psql/t/001_basic.pl
+++ b/src/bin/psql/t/001_basic.pl
@@ -436,12 +436,12 @@ psql_fails_like(
 psql_like(
        $node,
        '\echo :WATCH_INTERVAL
-\set WATCH_INTERVAL 0.001
+\set WATCH_INTERVAL 10
 \echo :WATCH_INTERVAL
 \unset WATCH_INTERVAL
 \echo :WATCH_INTERVAL',
        qr/^2$
-^0.001$
+^10$
 ^2$/m,
        'WATCH_INTERVAL variable is set and updated');
 psql_fails_like(

--
Daniel Gustafsson

yes, it is ok after this change

Pavel

В списке pgsql-hackers по дате отправления: