From 5e45211a64149b3c659b90ff2de6fa982a5a93ed Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 4 May 2024 14:17:33 +0200 Subject: Adding upstream version 15.5. Signed-off-by: Daniel Baumann --- contrib/isn/isn.h | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 contrib/isn/isn.h (limited to 'contrib/isn/isn.h') diff --git a/contrib/isn/isn.h b/contrib/isn/isn.h new file mode 100644 index 0000000..e78caff --- /dev/null +++ b/contrib/isn/isn.h @@ -0,0 +1,35 @@ +/*------------------------------------------------------------------------- + * + * isn.h + * PostgreSQL type definitions for ISNs (ISBN, ISMN, ISSN, EAN13, UPC) + * + * Author: German Mendez Bravo (Kronuz) + * Portions Copyright (c) 1996-2022, PostgreSQL Global Development Group + * + * IDENTIFICATION + * contrib/isn/isn.h + * + *------------------------------------------------------------------------- + */ + +#ifndef ISN_H +#define ISN_H + +#include "fmgr.h" + +#undef ISN_DEBUG +#define ISN_WEAK_MODE + +/* + * uint64 is the internal storage format for ISNs. + */ +typedef uint64 ean13; + +#define EAN13_FORMAT UINT64_FORMAT + +#define PG_GETARG_EAN13(n) PG_GETARG_INT64(n) +#define PG_RETURN_EAN13(x) PG_RETURN_INT64(x) + +extern void initialize(void); + +#endif /* ISN_H */ -- cgit v1.2.3