summaryrefslogtreecommitdiffstats
path: root/contrib/isn/isn.h
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-16 19:46:48 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-16 19:46:48 +0000
commit311bcfc6b3acdd6fd152798c7f287ddf74fa2a98 (patch)
tree0ec307299b1dada3701e42f4ca6eda57d708261e /contrib/isn/isn.h
parentInitial commit. (diff)
downloadpostgresql-15-upstream.tar.xz
postgresql-15-upstream.zip
Adding upstream version 15.4.upstream/15.4upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--contrib/isn/isn.h35
1 files changed, 35 insertions, 0 deletions
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 */