From edfaf671d016f675a3a3b87d58d615a92e84148b Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Tue, 30 Sep 2025 00:51:54 +0100 Subject: Switch to PostgreSQL's oid type for entity ids oid is an "unsigned 4 byte integer", which matches our crc32 approach perfectly, and is half the storage cost of bigint. --- test/test-ingest.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'test') diff --git a/test/test-ingest.cpp b/test/test-ingest.cpp index f86dd25..73a37c6 100644 --- a/test/test-ingest.cpp +++ b/test/test-ingest.cpp @@ -278,11 +278,11 @@ BOOST_AUTO_TEST_CASE(DiscardUnparsable) { BOOST_REQUIRE_NO_THROW(ingestLogLine("does not parse")); auto dbconn = dbpool->get(); - auto select = dbconn->select("SELECT id, value FROM entities WHERE type = 'unparsable_line'"); - constexpr std::array, 1> EXPECTED {{ + auto select = dbconn->select("SELECT id::bigint, value FROM entities WHERE type = 'unparsable_line'"); + constexpr std::array, 1> EXPECTED {{ {1664299262, "does not parse"}, }}; - auto rows = select->as(); + auto rows = select->as(); BOOST_CHECK_EQUAL_COLLECTIONS(rows.begin(), rows.end(), EXPECTED.begin(), EXPECTED.end()); } -- cgit v1.2.3