From: | Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr> |
---|---|
To: | Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com> |
Cc: | pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: some more error location support |
Date: | 2018-08-27 08:41:21 |
Message-ID: | alpine.DEB.2.21.1808271031310.11066@lancre |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hello Peter,
> Here are three patches to add more detailed error location support to
> some parts of CREATE TABLE (defaults, check constraints, partition
> specifications) as well as the COPY command. Examples can be seen in
> the regression test output.
>
> The first two are low-hanging fruit, since all the information was
> already collected and just needed to be passed through one last hop.
> The third one is a bit more invasive; it adds location information to
> the Value node, which is used in a variety of commands, so COPY is just
> a start here.
Patch 1 applies cleanly, compiles, "make check" is okay.
I noticed that you provide NULL from "ALTER TABLE" which is calling the
create table machinery:
postgres=# CREATE TABLE foo(id SERIAL CHECK (x = 0));
ERROR: column "x" does not exist
LINE 1: CREATE TABLE foo(id SERIAL CHECK (x = 0));
^
postgres=# CREATE TABLE foo();
CREATE TABLE
postgres=# ALTER TABLE foo ADD COLUMN id SERIAL CHECK (x = 0);
ERROR: column "x" does not exist
<no location>
Would it be easily possible to provide the query in that case as well?
--
Fabien.
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Eisentraut | 2018-08-27 08:44:14 | Re: some more error location support |
Previous Message | Tatsuo Ishii | 2018-08-27 07:37:29 | Re: Adding a note to protocol.sgml regarding CopyData |