00001 /*------------------------------------------------------------------------- 00002 * 00003 * pg_ts_parser.h 00004 * definition of parsers for tsearch 00005 * 00006 * 00007 * Portions Copyright (c) 1996-2013, PostgreSQL Global Development Group 00008 * Portions Copyright (c) 1994, Regents of the University of California 00009 * 00010 * src/include/catalog/pg_ts_parser.h 00011 * 00012 * NOTES 00013 * the genbki.pl script reads this file and generates .bki 00014 * information from the DATA() statements. 00015 * 00016 * XXX do NOT break up DATA() statements into multiple lines! 00017 * the scripts are not as smart as you might think... 00018 * 00019 *------------------------------------------------------------------------- 00020 */ 00021 #ifndef PG_TS_PARSER_H 00022 #define PG_TS_PARSER_H 00023 00024 #include "catalog/genbki.h" 00025 00026 /* ---------------- 00027 * pg_ts_parser definition. cpp turns this into 00028 * typedef struct FormData_pg_ts_parser 00029 * ---------------- 00030 */ 00031 #define TSParserRelationId 3601 00032 00033 CATALOG(pg_ts_parser,3601) 00034 { 00035 NameData prsname; /* parser's name */ 00036 Oid prsnamespace; /* name space */ 00037 regproc prsstart; /* init parsing session */ 00038 regproc prstoken; /* return next token */ 00039 regproc prsend; /* finalize parsing session */ 00040 regproc prsheadline; /* return data for headline creation */ 00041 regproc prslextype; /* return descriptions of lexeme's types */ 00042 } FormData_pg_ts_parser; 00043 00044 typedef FormData_pg_ts_parser *Form_pg_ts_parser; 00045 00046 /* ---------------- 00047 * compiler constants for pg_ts_parser 00048 * ---------------- 00049 */ 00050 #define Natts_pg_ts_parser 7 00051 #define Anum_pg_ts_parser_prsname 1 00052 #define Anum_pg_ts_parser_prsnamespace 2 00053 #define Anum_pg_ts_parser_prsstart 3 00054 #define Anum_pg_ts_parser_prstoken 4 00055 #define Anum_pg_ts_parser_prsend 5 00056 #define Anum_pg_ts_parser_prsheadline 6 00057 #define Anum_pg_ts_parser_prslextype 7 00058 00059 /* ---------------- 00060 * initial contents of pg_ts_parser 00061 * ---------------- 00062 */ 00063 00064 DATA(insert OID = 3722 ( "default" PGNSP prsd_start prsd_nexttoken prsd_end prsd_headline prsd_lextype )); 00065 DESCR("default word parser"); 00066 00067 #endif /* PG_TS_PARSER_H */