On Monday 06 July 2009 23:00:18 Tom Lane wrote:
It seems to me that the right fix here is not so much to tweak the
message wording as to put in an error location cursor. In more
complicated cases (eg, multiple FOREIGN KEY clauses) the suggested
wording change wouldn't help much anyway.
It
Peter Eisentraut pete...@gmx.net writes:
On Monday 06 July 2009 23:00:18 Tom Lane wrote:
It seems to me that the right fix here is not so much to tweak the
message wording as to put in an error location cursor. In more
complicated cases (eg, multiple FOREIGN KEY clauses) the suggested
I recently had a puzzler, which involved this sort of accidental parser error:
CREATE TABLE foo (a int, b text, PRIMARY KEY (a, b));
CREATE TABLE bar (x int, y text, FOREIGN KEY (q, r) REFERENCES foo (m, n));
ERROR: column q referenced in foreign key constraint does not exist
versus
CREATE
Peter Eisentraut pete...@gmx.net writes:
I recently had a puzzler, which involved this sort of accidental parser error:
CREATE TABLE foo (a int, b text, PRIMARY KEY (a, b));
CREATE TABLE bar (x int, y text, FOREIGN KEY (q, r) REFERENCES foo (m, n));
ERROR: column q referenced in foreign key