1 /*-------------------------------------------------------------------------
4 * PostgreSQL type definitions for ISNs (ISBN, ISMN, ISSN, EAN13, UPC)
6 * Copyright (c) 2004-2006, Germán Méndez Bravo (Kronuz)
7 * Portions Copyright (c) 1996-2009, PostgreSQL Global Development Group
12 *-------------------------------------------------------------------------
24 * uint64 is the internal storage format for ISNs.
28 #define EAN13_FORMAT UINT64_FORMAT
30 #define PG_GETARG_EAN13(n) PG_GETARG_INT64(n)
31 #define PG_RETURN_EAN13(x) PG_RETURN_INT64(x)
33 extern Datum
isn_out(PG_FUNCTION_ARGS
);
34 extern Datum
ean13_out(PG_FUNCTION_ARGS
);
35 extern Datum
ean13_in(PG_FUNCTION_ARGS
);
36 extern Datum
isbn_in(PG_FUNCTION_ARGS
);
37 extern Datum
ismn_in(PG_FUNCTION_ARGS
);
38 extern Datum
issn_in(PG_FUNCTION_ARGS
);
39 extern Datum
upc_in(PG_FUNCTION_ARGS
);
41 extern Datum
isbn_cast_from_ean13(PG_FUNCTION_ARGS
);
42 extern Datum
ismn_cast_from_ean13(PG_FUNCTION_ARGS
);
43 extern Datum
issn_cast_from_ean13(PG_FUNCTION_ARGS
);
44 extern Datum
upc_cast_from_ean13(PG_FUNCTION_ARGS
);
46 extern Datum
is_valid(PG_FUNCTION_ARGS
);
47 extern Datum
make_valid(PG_FUNCTION_ARGS
);
49 extern Datum
accept_weak_input(PG_FUNCTION_ARGS
);
50 extern Datum
weak_input_status(PG_FUNCTION_ARGS
);
52 extern void initialize(void);