From a8b7a0b872fccdf23f63208f144ecd523ac16e0c Mon Sep 17 00:00:00 2001 From: Jonathan Hefner Date: Wed, 8 Jan 2025 13:27:36 -0600 Subject: [PATCH] Quote `randomNumber` column in PostgreSQL schema The [test specs][] say that the `World` table has an `id` column and `randomNumber` column (note the camelCasing). Indeed, the [PostgreSQL schema][] uses `randomNumber` in its `CREATE TABLE` statement. However, the `CREATE TABLE` statement does not quote the column name, so PostgreSQL treats the name as if it were lowercase. Also note that the PostgreSQL schema has `CREATE TABLE World` _and_ `CREATE TABLE "World"` statements. Presumably, this is because the former actually creates a `world` table because it too is not quoted. (Whereas the latter actually creates a `World` table.) This commit modifies the `CREATE TABLE "World"` statement to quote the `randomNumber` column so that its camel case is preserved. [test specs]: https://github.com/TechEmpower/FrameworkBenchmarks/wiki/Project-Information-Framework-Tests-Overview [PostgreSQL schema]: https://github.com/TechEmpower/FrameworkBenchmarks/blob/ddd09520c10926c0e2c73a005b1f79f5a68142a8/toolset/databases/postgres/create-postgres.sql --- toolset/databases/postgres/create-postgres.sql | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/toolset/databases/postgres/create-postgres.sql b/toolset/databases/postgres/create-postgres.sql index d72be177191..ded2cef94a9 100644 --- a/toolset/databases/postgres/create-postgres.sql +++ b/toolset/databases/postgres/create-postgres.sql @@ -34,12 +34,12 @@ INSERT INTO Fortune (id, message) VALUES (12, 'フレームワークのベンチ CREATE TABLE "World" ( id integer NOT NULL, - randomNumber integer NOT NULL default 0, + "randomNumber" integer NOT NULL default 0, PRIMARY KEY (id) ); GRANT ALL PRIVILEGES ON "World" to benchmarkdbuser; -INSERT INTO "World" (id, randomnumber) +INSERT INTO "World" (id, "randomNumber") SELECT x.id, least(floor(random() * 10000 + 1), 10000) FROM generate_series(1,10000) as x(id); CREATE TABLE "Fortune" (