mirror of
https://github.com/postgres/postgres.git
synced 2025-11-07 19:06:32 +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:
@@ -13,7 +13,7 @@
|
||||
* Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
|
||||
* Portions Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* $PostgreSQL: pgsql/src/include/nodes/parsenodes.h,v 1.373 2008/08/30 01:39:14 tgl Exp $
|
||||
* $PostgreSQL: pgsql/src/include/nodes/parsenodes.h,v 1.374 2008/09/01 20:42:45 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -358,10 +358,11 @@ typedef struct ResTarget
|
||||
typedef struct SortBy
|
||||
{
|
||||
NodeTag type;
|
||||
SortByDir sortby_dir; /* ASC/DESC/USING */
|
||||
Node *node; /* expression to sort on */
|
||||
SortByDir sortby_dir; /* ASC/DESC/USING/default */
|
||||
SortByNulls sortby_nulls; /* NULLS FIRST/LAST */
|
||||
List *useOp; /* name of op to use, if SORTBY_USING */
|
||||
Node *node; /* expression to sort on */
|
||||
int location; /* operator location, or -1 if none/unknown */
|
||||
} SortBy;
|
||||
|
||||
/*
|
||||
@@ -466,7 +467,9 @@ typedef struct DefElem
|
||||
* LockingClause - raw representation of FOR UPDATE/SHARE options
|
||||
*
|
||||
* Note: lockedRels == NIL means "all relations in query". Otherwise it
|
||||
* is a list of String nodes giving relation eref names.
|
||||
* is a list of RangeVar nodes. (We use RangeVar mainly because it carries
|
||||
* a location field --- currently, parse analysis insists on unqualified
|
||||
* names in LockingClause.)
|
||||
*/
|
||||
typedef struct LockingClause
|
||||
{
|
||||
@@ -1742,7 +1745,7 @@ typedef struct RuleStmt
|
||||
typedef struct NotifyStmt
|
||||
{
|
||||
NodeTag type;
|
||||
RangeVar *relation; /* qualified name to notify */
|
||||
char *conditionname; /* condition name to notify */
|
||||
} NotifyStmt;
|
||||
|
||||
/* ----------------------
|
||||
@@ -1752,7 +1755,7 @@ typedef struct NotifyStmt
|
||||
typedef struct ListenStmt
|
||||
{
|
||||
NodeTag type;
|
||||
RangeVar *relation; /* name to listen on */
|
||||
char *conditionname; /* condition name to listen on */
|
||||
} ListenStmt;
|
||||
|
||||
/* ----------------------
|
||||
@@ -1762,7 +1765,7 @@ typedef struct ListenStmt
|
||||
typedef struct UnlistenStmt
|
||||
{
|
||||
NodeTag type;
|
||||
RangeVar *relation; /* name to unlisten on, or NULL for all */
|
||||
char *conditionname; /* name to unlisten on, or NULL for all */
|
||||
} UnlistenStmt;
|
||||
|
||||
/* ----------------------
|
||||
|
||||
Reference in New Issue
Block a user