1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-21 16:02:15 +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:
Tom Lane
2008-09-01 20:42:46 +00:00
parent 9ac4299163
commit b153c09209
103 changed files with 1877 additions and 485 deletions

View File

@ -9,7 +9,7 @@
*
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/bootstrap/bootparse.y,v 1.92 2008/05/09 23:32:04 tgl Exp $
* $PostgreSQL: pgsql/src/backend/bootstrap/bootparse.y,v 1.93 2008/09/01 20:42:43 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@ -247,7 +247,7 @@ Boot_DeclareIndexStmt:
{
do_start();
DefineIndex(makeRangeVar(NULL, LexIDStr($6)),
DefineIndex(makeRangeVar(NULL, LexIDStr($6), -1),
LexIDStr($3),
$4,
LexIDStr($8),
@ -265,7 +265,7 @@ Boot_DeclareUniqueIndexStmt:
{
do_start();
DefineIndex(makeRangeVar(NULL, LexIDStr($7)),
DefineIndex(makeRangeVar(NULL, LexIDStr($7), -1),
LexIDStr($4),
$5,
LexIDStr($9),

View File

@ -8,7 +8,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/bootstrap/bootstrap.c,v 1.244 2008/06/24 17:58:27 tgl Exp $
* $PostgreSQL: pgsql/src/backend/bootstrap/bootstrap.c,v 1.245 2008/09/01 20:42:43 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@ -637,7 +637,7 @@ boot_openrel(char *relname)
elog(DEBUG4, "open relation %s, attrsize %d",
relname, (int) ATTRIBUTE_TUPLE_SIZE);
boot_reldesc = heap_openrv(makeRangeVar(NULL, relname), NoLock);
boot_reldesc = heap_openrv(makeRangeVar(NULL, relname, -1), NoLock);
numattr = boot_reldesc->rd_rel->relnatts;
for (i = 0; i < numattr; i++)
{