Re: some more error location support

2018-08-30 Thread Peter Eisentraut
On 29/08/2018 16:39, Fabien COELHO wrote: > >>> The majority rule (34 make & 22 free) suggest that it is more often use >>> than not. I'd suggest to stick to that for consistency & homogeneity. >> >> But it's consistently not used in DDL command implementations, only in >> normal query parsing. >

Re: some more error location support

2018-08-29 Thread Fabien COELHO
The majority rule (34 make & 22 free) suggest that it is more often use than not. I'd suggest to stick to that for consistency & homogeneity. But it's consistently not used in DDL command implementations, only in normal query parsing. I try to avoid complicated (context-sensitive) rules

Re: some more error location support

2018-08-29 Thread Peter Eisentraut
On 27/08/2018 11:17, Fabien COELHO wrote: > About patch 3: applies cleanly independently of the 2 others, compiles, > "make check" is okay. > > A few comments: > > There seems to be several somehow unrelated changes: one about copy, > one about trigger and one about constraints? The two later

Re: some more error location support

2018-08-29 Thread Peter Eisentraut
On 28/08/2018 08:58, Fabien COELHO wrote: > >>> Even if there is some under-the-hood garbage collection, I'd suggest to >>> add a free after the call to ComputePartitionAttrs. >> >> Hmm, I didn't know about free_parsestate(). It doesn't seem to be used >> consistently. I suppose you'll want to

Re: some more error location support

2018-08-28 Thread Fabien COELHO
Even if there is some under-the-hood garbage collection, I'd suggest to add a free after the call to ComputePartitionAttrs. Hmm, I didn't know about free_parsestate(). It doesn't seem to be used consistently. I suppose you'll want to use it when you have a target relation that will be

Re: some more error location support

2018-08-27 Thread Peter Eisentraut
On 27/08/2018 10:53, Fabien COELHO wrote: > There is a "make_parsestate", but no corresponding free. The usual > pattern, although there seems to be a few exception, is to "make" and > "free". > > Even if there is some under-the-hood garbage collection, I'd suggest to > add a free after the

Re: some more error location support

2018-08-27 Thread Fabien COELHO
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

Re: some more error location support

2018-08-27 Thread Fabien COELHO
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

Re: some more error location support

2018-08-27 Thread Fabien COELHO
I noticed that you provide NULL from "ALTER TABLE" which is calling the create table machinery: The structure of the ALTER TABLE code is such that it would be quite complicated to pass through the required state. It's doable, but would be a bigger and independent project. Ok, so no "easy"

Re: some more error location support

2018-08-27 Thread Peter Eisentraut
On 27/08/2018 10:41, Fabien COELHO wrote: > I noticed that you provide NULL from "ALTER TABLE" which is calling the > create table machinery: The structure of the ALTER TABLE code is such that it would be quite complicated to pass through the required state. It's doable, but would be a bigger

Re: some more error location support

2018-08-27 Thread Fabien COELHO
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

some more error location support

2018-08-27 Thread Peter Eisentraut
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