PostgreSQL Source Code git master
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
pg_crc.c File Reference
#include "postgres.h"
#include "port/pg_crc32c.h"
#include "utils/fmgrprotos.h"
#include "utils/pg_crc.h"
#include "varatt.h"
Include dependency graph for pg_crc.c:

Go to the source code of this file.

Functions

Datum crc32_bytea (PG_FUNCTION_ARGS)
 
Datum crc32c_bytea (PG_FUNCTION_ARGS)
 

Variables

const uint32 pg_crc32_table [256]
 

Function Documentation

◆ crc32_bytea()

Datum crc32_bytea ( PG_FUNCTION_ARGS  )

Definition at line 107 of file pg_crc.c.

108{
109 bytea *in = PG_GETARG_BYTEA_PP(0);
111
115
117}
#define PG_GETARG_BYTEA_PP(n)
Definition: fmgr.h:308
#define PG_RETURN_INT64(x)
Definition: fmgr.h:368
return crc
uint32 pg_crc32
Definition: pg_crc.h:37
#define FIN_TRADITIONAL_CRC32(crc)
Definition: pg_crc.h:47
#define INIT_TRADITIONAL_CRC32(crc)
Definition: pg_crc.h:46
#define COMP_TRADITIONAL_CRC32(crc, data, len)
Definition: pg_crc.h:48
Definition: c.h:641
#define VARDATA_ANY(PTR)
Definition: varatt.h:324
#define VARSIZE_ANY_EXHDR(PTR)
Definition: varatt.h:317

References COMP_TRADITIONAL_CRC32, crc, FIN_TRADITIONAL_CRC32, INIT_TRADITIONAL_CRC32, PG_GETARG_BYTEA_PP, PG_RETURN_INT64, VARDATA_ANY, and VARSIZE_ANY_EXHDR.

◆ crc32c_bytea()

Datum crc32c_bytea ( PG_FUNCTION_ARGS  )

Definition at line 120 of file pg_crc.c.

121{
122 bytea *in = PG_GETARG_BYTEA_PP(0);
124
128
130}
uint32 pg_crc32c
Definition: pg_crc32c.h:38
#define COMP_CRC32C(crc, data, len)
Definition: pg_crc32c.h:98
#define INIT_CRC32C(crc)
Definition: pg_crc32c.h:41
#define FIN_CRC32C(crc)
Definition: pg_crc32c.h:103

References COMP_CRC32C, crc, FIN_CRC32C, INIT_CRC32C, PG_GETARG_BYTEA_PP, PG_RETURN_INT64, VARDATA_ANY, and VARSIZE_ANY_EXHDR.

Variable Documentation

◆ pg_crc32_table

const uint32 pg_crc32_table[256]

Definition at line 35 of file pg_crc.c.