mirror of
https://github.com/postgres/postgres.git
synced 2025-09-02 04:21:28 +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:
@@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $PostgreSQL: pgsql/src/backend/commands/tablecmds.c,v 1.264 2008/08/28 23:09:45 tgl Exp $
|
||||
* $PostgreSQL: pgsql/src/backend/commands/tablecmds.c,v 1.265 2008/09/01 20:42:44 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -5112,7 +5112,8 @@ createForeignKeyTriggers(Relation rel, FkConstraint *fkconstraint,
|
||||
* Reconstruct a RangeVar for my relation (not passed in, unfortunately).
|
||||
*/
|
||||
myRel = makeRangeVar(get_namespace_name(RelationGetNamespace(rel)),
|
||||
pstrdup(RelationGetRelationName(rel)));
|
||||
pstrdup(RelationGetRelationName(rel)),
|
||||
-1);
|
||||
|
||||
/* Make changes-so-far visible */
|
||||
CommandCounterIncrement();
|
||||
|
@@ -7,7 +7,7 @@
|
||||
* Portions Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $PostgreSQL: pgsql/src/backend/commands/trigger.c,v 1.236 2008/07/18 20:26:06 tgl Exp $
|
||||
* $PostgreSQL: pgsql/src/backend/commands/trigger.c,v 1.237 2008/09/01 20:42:44 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -655,7 +655,7 @@ ConvertTriggerToFK(CreateTrigStmt *stmt, Oid funcoid)
|
||||
else
|
||||
{
|
||||
/* Work around ancient pg_dump bug that omitted constrrel */
|
||||
fkcon->pktable = makeRangeVar(NULL, pk_table_name);
|
||||
fkcon->pktable = makeRangeVar(NULL, pk_table_name, -1);
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -667,7 +667,7 @@ ConvertTriggerToFK(CreateTrigStmt *stmt, Oid funcoid)
|
||||
else
|
||||
{
|
||||
/* Work around ancient pg_dump bug that omitted constrrel */
|
||||
atstmt->relation = makeRangeVar(NULL, fk_table_name);
|
||||
atstmt->relation = makeRangeVar(NULL, fk_table_name, -1);
|
||||
}
|
||||
}
|
||||
atstmt->cmds = list_make1(atcmd);
|
||||
|
Reference in New Issue
Block a user