@@ -1537,11 +1537,13 @@ init(bool is_no_vacuum)
1537
1537
/*
1538
1538
* Note: TPC-B requires at least 100 bytes per row, and the "filler"
1539
1539
* 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.
1545
1547
*/
1546
1548
struct ddlinfo
1547
1549
{
@@ -1640,12 +1642,14 @@ init(bool is_no_vacuum)
1640
1642
1641
1643
for (i = 0 ; i < nbranches * scale ; i ++ )
1642
1644
{
1645
+ /* "filler" column defaults to NULL */
1643
1646
snprintf (sql , 256 , "insert into pgbench_branches(bid,bbalance) values(%d,0)" , i + 1 );
1644
1647
executeStatement (con , sql );
1645
1648
}
1646
1649
1647
1650
for (i = 0 ; i < ntellers * scale ; i ++ )
1648
1651
{
1652
+ /* "filler" column defaults to NULL */
1649
1653
snprintf (sql , 256 , "insert into pgbench_tellers(tid,bid,tbalance) values (%d,%d,0)" ,
1650
1654
i + 1 , i / ntellers + 1 );
1651
1655
executeStatement (con , sql );
@@ -1675,6 +1679,7 @@ init(bool is_no_vacuum)
1675
1679
{
1676
1680
int64 j = k + 1 ;
1677
1681
1682
+ /* "filler" column defaults to blank padded empty string */
1678
1683
snprintf (sql , 256 , INT64_FORMAT "\t" INT64_FORMAT "\t%d\t\n" , j , k / naccounts + 1 , 0 );
1679
1684
if (PQputline (con , sql ))
1680
1685
{
0 commit comments