暂无图片
暂无图片
暂无图片
暂无图片
暂无图片

PostgreSQL 14 preview - pgbench 支持冒号常量, 例如时间,timestamp常量

digoal 2021-01-01
239

作者

digoal

日期

2021-01-16

标签

PostgreSQL , pgbench


背景

《PostgreSQL pgbench : 冒号处理》

看上文, 以前我们需要使用-D 变量来设置. PG 14已经不需要-D来支持时间戳常量.

```
Disallow a digit as the first character of a variable name in pgbench.
author Tom Lane tgl@sss.pgh.pa.us
Wed, 13 Jan 2021 19:52:49 +0000 (14:52 -0500)
committer Tom Lane tgl@sss.pgh.pa.us
Wed, 13 Jan 2021 19:52:59 +0000 (14:52 -0500)
commit c21ea4d53e9404279273da800daa49b7b9a5e81e
tree 7880d8a335ed970459d48064deac74f30b29184f tree | snapshot
parent 5abca4b1cd7193d6a5c8235c97eb240312190bcb commit | diff
Disallow a digit as the first character of a variable name in pgbench.

The point of this restriction is to avoid trying to substitute variables
into timestamp literal values, which may contain strings like '12:34'.

There is a good deal more that should be done to reduce pgbench's
tendency to substitute where it shouldn't. But this is sufficient to
solve the case complained of by Jaime Soler, and it's simple enough
to back-patch.

Back-patch to v11; before commit 9d36a3866, pgbench had a slightly
different definition of what a variable name is, and anyway it seems
unwise to change long-stable branches for this.

Fabien Coelho

Discussion: https://postgr.es/m/alpine.DEB.2.22.394.2006291740420.805678@pseudo
```

PostgreSQL 许愿链接

您的愿望将传达给PG kernel hacker、数据库厂商等, 帮助提高数据库产品质量和功能, 说不定下一个PG版本就有您提出的功能点. 针对非常好的提议,奖励限量版PG文化衫、纪念品、贴纸、PG热门书籍等,奖品丰富,快来许愿。开不开森.

9.9元购买3个月阿里云RDS PostgreSQL实例

PostgreSQL 解决方案集合

德哥 / digoal's github - 公益是一辈子的事.

digoal's wechat

文章转载自digoal,如果涉嫌侵权,请发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。

评论