Re: [HACKERS] Macros bundling RELKIND_* conditions

2019-02-05 Thread Alvaro Herrera
On 2018-Dec-19, Tom Lane wrote: > Alvaro Herrera writes: > > I support this idea. Here's a proof-of-concept patch that corresponds > > to one of the cases that Ashutosh was on about (specifically, the one > > that uses the RELKIND_CAN_HAVE_STORAGE macro I just added). If there > > are no objec

Re: [HACKERS] Macros bundling RELKIND_* conditions

2018-12-20 Thread Kyotaro HORIGUCHI
Mmm. My mail on this topic seems to have sent to nowhere.. At Fri, 21 Dec 2018 07:50:04 +0530, Ashutosh Bapat wrote in > On Wed, Dec 19, 2018 at 11:37 PM Alvaro Herrera > wrote: > > > On 2017-Aug-02, Tom Lane wrote: > > > > > I think Peter's got the error and the detail backwards. It should

Re: [HACKERS] Macros bundling RELKIND_* conditions

2018-12-20 Thread Ashutosh Bapat
On Wed, Dec 19, 2018 at 11:37 PM Alvaro Herrera wrote: > On 2017-Aug-02, Tom Lane wrote: > > > I think Peter's got the error and the detail backwards. It should be > > more like > > > > ERROR: "someview" cannot have constraints > > DETAIL: "someview" is a view. > > > > If we do it like that, we

Re: [HACKERS] Macros bundling RELKIND_* conditions

2018-12-19 Thread Michael Paquier
On Wed, Dec 19, 2018 at 01:29:48PM -0500, Tom Lane wrote: > Alvaro Herrera writes: >> I put the new function at the bottom of heapam.c but I think it probably >> needs a better place. > > catalog/catalog.c contains some functions with roughly this kind of > knowledge, so maybe there? +1 for the

Re: [HACKERS] Macros bundling RELKIND_* conditions

2018-12-19 Thread Tom Lane
Alvaro Herrera writes: > On 2017-Aug-02, Tom Lane wrote: >> I think Peter's got the error and the detail backwards. It should be >> more like >> ERROR: "someview" cannot have constraints >> DETAIL: "someview" is a view. >> If we do it like that, we need one ERROR message per error reason, >> and

Re: [HACKERS] Macros bundling RELKIND_* conditions

2018-12-19 Thread Alvaro Herrera
On 2017-Aug-02, Tom Lane wrote: > I think Peter's got the error and the detail backwards. It should be > more like > > ERROR: "someview" cannot have constraints > DETAIL: "someview" is a view. > > If we do it like that, we need one ERROR message per error reason, > and one DETAIL per relkind, w