Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/Postgres/contrib/sepgsql/expected/   (Postgres Database Version 18.4©)  Datei vom 11.4.2026 mit Größe 24 kB image not shown  

Quelle  checksum.sql

  Sprache: SQL
 

--
-- Verify correct calculation of checksums
--
-- Postgres' checksum algorithm produces different answers on little-endian
-- and big-endian machines.  The results of this test also vary depending
-- on the configured block size.  This test has several different expected
-- results files to handle the following possibilities:
--
-- BLCKSZ end file
-- 8K LE checksum.out
-- 8K BE checksum_1.out
--
-- In future we might provide additional expected-results files for other
-- block sizes, but there seems little point as long as so many other
-- test scripts also show false failures for non-default block sizes.
--

-- This is to label the results files with blocksize:
SHOW block_size;

SHOW block_size \gset

-- Apply page_checksum() to some different data patterns and block numbers
SELECT blkno,
    page_checksum(decode(repeat('01', :block_size), 'hex'), blkno) AS checksum_01,
    page_checksum(decode(repeat('04', :block_size), 'hex'), blkno) AS checksum_04,
    page_checksum(decode(repeat('ff', :block_size), 'hex'), blkno) AS checksum_ff,
    page_checksum(decode(repeat('abcd', :block_size / 2), 'hex'), blkno) AS checksum_abcd,
    page_checksum(decode(repeat('e6d6', :block_size / 2), 'hex'), blkno) AS checksum_e6d6,
    page_checksum(decode(repeat('4a5e', :block_size / 2), 'hex'), blkno) AS checksum_4a5e
  FROM generate_series(010050AS a (blkno);

Messung V0.5 in Prozent
C=91 H=92 G=91

¤ Dauer der Verarbeitung: 0.10 Sekunden  (vorverarbeitet am  2026-08-08) ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

PVS Prover

Isabelle Prover

NIST Cobol Testsuite

Cephes Mathematical Library

Vienna Development Method

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.