Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit514b319

Browse files
committed
Correct comment of pgbench "filler" columns.
Pavan Deolasee
1 parent42bf7fc commit514b319

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

‎contrib/pgbench/pgbench.c

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1537,11 +1537,13 @@ init(bool is_no_vacuum)
15371537
/*
15381538
* Note: TPC-B requires at least 100 bytes per row, and the "filler"
15391539
* fields in these table declarations were intended to comply with that.
1540-
* But because they default to NULLs, they don't actually take any space.
1541-
* We could fix that by giving them non-null default values. However, that
1542-
* would completely break comparability of pgbench results with prior
1543-
* versions. Since pgbench has never pretended to be fully TPC-B
1544-
* compliant anyway, we stick with the historical behavior.
1540+
* The pgbench_accounts table complies with that because the "filler"
1541+
* column is set to blank-padded empty string. But for all other tables the
1542+
* column defaults to NULL and so don't actually take any space. We could
1543+
* fix that by giving them non-null default values. However, that would
1544+
* completely break comparability of pgbench results with prior versions.
1545+
* Since pgbench has never pretended to be fully TPC-B compliant anyway, we
1546+
* stick with the historical behavior.
15451547
*/
15461548
structddlinfo
15471549
{
@@ -1640,12 +1642,14 @@ init(bool is_no_vacuum)
16401642

16411643
for (i=0;i<nbranches*scale;i++)
16421644
{
1645+
/* "filler" column defaults to NULL */
16431646
snprintf(sql,256,"insert into pgbench_branches(bid,bbalance) values(%d,0)",i+1);
16441647
executeStatement(con,sql);
16451648
}
16461649

16471650
for (i=0;i<ntellers*scale;i++)
16481651
{
1652+
/* "filler" column defaults to NULL */
16491653
snprintf(sql,256,"insert into pgbench_tellers(tid,bid,tbalance) values (%d,%d,0)",
16501654
i+1,i /ntellers+1);
16511655
executeStatement(con,sql);
@@ -1675,6 +1679,7 @@ init(bool is_no_vacuum)
16751679
{
16761680
int64j=k+1;
16771681

1682+
/* "filler" column defaults to blank padded empty string */
16781683
snprintf(sql,256,INT64_FORMAT"\t"INT64_FORMAT"\t%d\t\n",j,k /naccounts+1,0);
16791684
if (PQputline(con,sql))
16801685
{

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp