mirror of
https://github.com/postgres/postgres.git
synced 2025-11-21 00:42:43 +03:00
Improve parser so that we can show an error cursor position for errors
during parse analysis, not only errors detected in the flex/bison stages. This is per my earlier proposal. This commit includes all the basic infrastructure, but locations are only tracked and reported for errors involving column references, function calls, and operators. More could be done later but this seems like a good set to start with. I've also moved the ReportSyntaxErrorPosition logic out of psql and into libpq, which should make it available to more people --- even within psql this is an improvement because warnings weren't handled by ReportSyntaxErrorPosition.
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
* Portions Copyright (c) 1996-2006, PostgreSQL Global Development Group
|
||||
* Portions Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* $PostgreSQL: pgsql/src/interfaces/libpq/libpq-int.h,v 1.111 2006/03/05 15:59:10 momjian Exp $
|
||||
* $PostgreSQL: pgsql/src/interfaces/libpq/libpq-int.h,v 1.112 2006/03/14 22:48:23 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -278,6 +278,7 @@ struct pg_conn
|
||||
PGAsyncStatusType asyncStatus;
|
||||
PGTransactionStatusType xactStatus; /* never changes to ACTIVE */
|
||||
PGQueryClass queryclass;
|
||||
char *last_query; /* last SQL command, or NULL if unknown */
|
||||
bool options_valid; /* true if OK to attempt connection */
|
||||
bool nonblocking; /* whether this connection is using nonblock
|
||||
* sending semantics */
|
||||
|
||||
Reference in New Issue
Block a user