~ubuntu-branches/ubuntu/hardy/postgresql-8.4/hardy-backports

« back to all changes in this revision

Viewing changes to contrib/isn/isn.h

  • Committer: Bazaar Package Importer
  • Author(s): Martin Pitt
  • Date: 2009-03-20 12:00:13 UTC
  • Revision ID: james.westby@ubuntu.com-20090320120013-hogj7egc5mjncc5g
Tags: upstream-8.4~0cvs20090328
Import upstream version 8.4~0cvs20090328

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*-------------------------------------------------------------------------
 
2
 *
 
3
 * isn.h
 
4
 *        PostgreSQL type definitions for ISNs (ISBN, ISMN, ISSN, EAN13, UPC)
 
5
 *
 
6
 * Copyright (c) 2004-2006, Germ�n M�ndez Bravo (Kronuz)
 
7
 * Portions Copyright (c) 1996-2009, PostgreSQL Global Development Group
 
8
 *
 
9
 * IDENTIFICATION
 
10
 *        $PostgreSQL$
 
11
 *
 
12
 *-------------------------------------------------------------------------
 
13
 */
 
14
 
 
15
#ifndef ISN_H
 
16
#define ISN_H
 
17
 
 
18
#include "fmgr.h"
 
19
 
 
20
#undef ISN_DEBUG
 
21
#define ISN_WEAK_MODE
 
22
 
 
23
/*
 
24
 *      uint64 is the internal storage format for ISNs.
 
25
 */
 
26
typedef uint64 ean13;
 
27
 
 
28
#define EAN13_FORMAT UINT64_FORMAT
 
29
 
 
30
#define PG_GETARG_EAN13(n) PG_GETARG_INT64(n)
 
31
#define PG_RETURN_EAN13(x) PG_RETURN_INT64(x)
 
32
 
 
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);
 
40
 
 
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);
 
45
 
 
46
extern Datum is_valid(PG_FUNCTION_ARGS);
 
47
extern Datum make_valid(PG_FUNCTION_ARGS);
 
48
 
 
49
extern Datum accept_weak_input(PG_FUNCTION_ARGS);
 
50
extern Datum weak_input_status(PG_FUNCTION_ARGS);
 
51
 
 
52
extern void initialize(void);
 
53
 
 
54
#endif   /* ISN_H */