gpt4 book ai didi

postgresql - 间隔的翻译

转载 作者:行者123 更新时间:2023-11-29 13:56:22 25 4
gpt4 key购买 nike

也许有一种方法可以将 postgresql 显示的时间间隔(例如“1330 天 10:54:54.266684”)自动翻译成其他语言?例如使用语言环境或其他设置,或者我必须使用替换,例如regexp_replace((now()-t.another_date)::text, 'day','dzień')?

最佳答案

我认为没有。对不起。日、月等是类型间隔中的字段。它将是英文的。就像你不希望使用“vybrac”而不是 select :)但是你可以有 locale在时间值(value)上,是的。

td=# set lc_time TO pl_PL;
SET
td=# SELECT to_char(to_timestamp (4::text, 'MM'), 'TMmon');
to_char
---------
kwi
(1 row)

所以可能唯一的选择是用波兰语名称替换时间戳 filealds 值

关于postgresql - 间隔的翻译,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30999576/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com