PostgreSQL Source Code git master
Loading...
Searching...
No Matches
parser.h
Go to the documentation of this file.
1/*-------------------------------------------------------------------------
2 *
3 * parser.h
4 * Definitions for the "raw" parser (flex and bison phases only)
5 *
6 * This is the external API for the raw lexing/parsing functions.
7 *
8 * Portions Copyright (c) 1996-2026, PostgreSQL Global Development Group
9 * Portions Copyright (c) 1994, Regents of the University of California
10 *
11 * src/include/parser/parser.h
12 *
13 *-------------------------------------------------------------------------
14 */
15#ifndef PARSER_H
16#define PARSER_H
17
18#include "nodes/parsenodes.h"
19
20
21/*
22 * RawParseMode determines the form of the string that raw_parser() accepts:
23 *
24 * RAW_PARSE_DEFAULT: parse a semicolon-separated list of SQL commands,
25 * and return a List of RawStmt nodes.
26 *
27 * RAW_PARSE_TYPE_NAME: parse a type name, and return a one-element List
28 * containing a TypeName node.
29 *
30 * RAW_PARSE_PLPGSQL_EXPR: parse a PL/pgSQL expression, and return
31 * a one-element List containing a RawStmt node.
32 *
33 * RAW_PARSE_PLPGSQL_ASSIGNn: parse a PL/pgSQL assignment statement,
34 * and return a one-element List containing a RawStmt node. "n"
35 * gives the number of dotted names comprising the target ColumnRef.
36 */
46
47/* Values for the backslash_quote GUC */
54
55/* GUC variable in scan.l */
57
58
59/* Primary entry point for the raw parsing functions */
60extern List *raw_parser(const char *str, RawParseMode mode);
61
62/* Utility functions exported by gram.y (perhaps these should be elsewhere) */
63extern List *SystemFuncName(char *name);
65
66#endif /* PARSER_H */
#define PGDLLIMPORT
Definition c.h:1334
const char * str
RawParseMode
Definition parser.h:38
@ RAW_PARSE_PLPGSQL_EXPR
Definition parser.h:41
@ RAW_PARSE_PLPGSQL_ASSIGN2
Definition parser.h:43
@ RAW_PARSE_PLPGSQL_ASSIGN1
Definition parser.h:42
@ RAW_PARSE_TYPE_NAME
Definition parser.h:40
@ RAW_PARSE_PLPGSQL_ASSIGN3
Definition parser.h:44
@ RAW_PARSE_DEFAULT
Definition parser.h:39
List * SystemFuncName(char *name)
TypeName * SystemTypeName(char *name)
BackslashQuoteType
Definition parser.h:49
@ BACKSLASH_QUOTE_ON
Definition parser.h:51
@ BACKSLASH_QUOTE_SAFE_ENCODING
Definition parser.h:52
@ BACKSLASH_QUOTE_OFF
Definition parser.h:50
List * raw_parser(const char *str, RawParseMode mode)
Definition parser.c:42
PGDLLIMPORT int backslash_quote
Definition scan.l:69
static PgChecksumMode mode
Definition pg_list.h:54
const char * name