mirror of
https://github.com/postgres/postgres.git
synced 2025-08-30 06:01:21 +03:00
Add a bunch of new error location reports to parse-analysis error messages.
There are still some weak spots around JOIN USING and relation alias lists, but most errors reported within backend/parser/ now have locations.
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
* Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
|
||||
* Portions Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* $PostgreSQL: pgsql/src/include/parser/parse_node.h,v 1.55 2008/08/28 23:09:48 tgl Exp $
|
||||
* $PostgreSQL: pgsql/src/include/parser/parse_node.h,v 1.56 2008/09/01 20:42:45 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -82,10 +82,23 @@ typedef struct ParseState
|
||||
RangeTblEntry *p_target_rangetblentry;
|
||||
} ParseState;
|
||||
|
||||
/* Support for parser_errposition_callback function */
|
||||
typedef struct ParseCallbackState
|
||||
{
|
||||
ParseState *pstate;
|
||||
int location;
|
||||
ErrorContextCallback errcontext;
|
||||
} ParseCallbackState;
|
||||
|
||||
|
||||
extern ParseState *make_parsestate(ParseState *parentParseState);
|
||||
extern void free_parsestate(ParseState *pstate);
|
||||
extern int parser_errposition(ParseState *pstate, int location);
|
||||
|
||||
extern void setup_parser_errposition_callback(ParseCallbackState *pcbstate,
|
||||
ParseState *pstate, int location);
|
||||
extern void cancel_parser_errposition_callback(ParseCallbackState *pcbstate);
|
||||
|
||||
extern Var *make_var(ParseState *pstate, RangeTblEntry *rte, int attrno,
|
||||
int location);
|
||||
extern Oid transformArrayType(Oid arrayType);
|
||||
@@ -96,6 +109,6 @@ extern ArrayRef *transformArraySubscripts(ParseState *pstate,
|
||||
int32 elementTypMod,
|
||||
List *indirection,
|
||||
Node *assignFrom);
|
||||
extern Const *make_const(Value *value, int location);
|
||||
extern Const *make_const(ParseState *pstate, Value *value, int location);
|
||||
|
||||
#endif /* PARSE_NODE_H */
|
||||
|
Reference in New Issue
Block a user