Re: Unexpected behavior of DROP VIEW/TABLE IF EXISTS

2018-07-02 Thread Robert Haas
On Mon, Jul 2, 2018 at 5:25 PM, Tom Lane wrote: > Robert Haas writes: >> On Tue, Jun 26, 2018 at 1:06 PM, Tom Lane wrote: >>> Certainly we *could* change it, but it's not at all clear that it's a good >>> idea. The current behavior seemed sensible when it was implemented, and >>> it has stood f

Re: Unexpected behavior of DROP VIEW/TABLE IF EXISTS

2018-07-02 Thread Robert Haas
On Mon, Jul 2, 2018 at 10:33 PM, Robert Haas wrote: > Yes, the original proposal was that we should be relaxed about it. ...in both directions i.e. DROP TABLE would work on a VIEW and DROP VIEW on a table. That definitely seems like it's going too far. > Another possibility that would also seem

Re: Remove mention in docs that foreign keys on partitioned tables are not supported

2018-07-02 Thread Robert Haas
On Mon, Jul 2, 2018 at 1:46 AM, Ashutosh Bapat wrote: > This constraint was added to the partitioned table and inherited from > there. If user wants to drop that constraint for some reason, this > error message doesn't help. The error message tells why he can't drop > it, but doesn't tell, directl

Re: Remove mention in docs that foreign keys on partitioned tables are not supported

2018-07-02 Thread Amit Langote
On 2018/07/03 11:49, Robert Haas wrote: > On Mon, Jul 2, 2018 at 1:46 AM, Ashutosh Bapat > wrote: >> This constraint was added to the partitioned table and inherited from >> there. If user wants to drop that constraint for some reason, this >> error message doesn't help. The error message tells wh

Re: Copy function for logical replication slots

2018-07-02 Thread Michael Paquier
On Mon, Jul 02, 2018 at 04:31:32PM +0900, Masahiko Sawada wrote: > Attached an updated patch including copy function support for logical > slots as well as physical slots. Please review it. I had a look at this patch. As the output plugin can be changed for logical slots, having two functions is

Re: Possible bug in logical replication.

2018-07-02 Thread Michael Paquier
On Thu, Jun 21, 2018 at 07:31:20PM +0900, Michael Paquier wrote: > Could it be possible to get a patch from all the feedback and exchange > gathered here? Petr, I think that it would not hurt if you use the set > of words and comments you think is most adapted as the primary author of > the featur

Re: Remove mention in docs that foreign keys on partitioned tables are not supported

2018-07-02 Thread Ashutosh Bapat
On Tue, Jul 3, 2018 at 8:19 AM, Robert Haas wrote: > On Mon, Jul 2, 2018 at 1:46 AM, Ashutosh Bapat > wrote: >> This constraint was added to the partitioned table and inherited from >> there. If user wants to drop that constraint for some reason, this >> error message doesn't help. The error mess

Re: Should contrib modules install .h files?

2018-07-02 Thread Craig Ringer
On 2 July 2018 at 02:23, Andrew Gierth wrote: > So I have this immediate problem: a PGXS build of a module, specifically > an hstore transform for a non-core PL, is much harder than it should be > because it has no way to get at hstore.h since that file is never > installed anywhere. > > Should t

Re: pgsql: Clarify use of temporary tables within partition trees

2018-07-02 Thread Michael Paquier
On Tue, Jul 03, 2018 at 12:59:33PM +1200, David Rowley wrote: > On 3 July 2018 at 10:16, Michael Paquier wrote: >> On Mon, Jul 02, 2018 at 02:07:37PM -0400, Robert Haas wrote: >>> I'd rather keep an elog(ERROR) than completely remove the check. >> >> +1. > > Attached Okay, the patch looks logical

Re: Possible bug in logical replication.

2018-07-02 Thread Alvaro Herrera
On 2018-Jul-03, Michael Paquier wrote: > On Thu, Jun 21, 2018 at 07:31:20PM +0900, Michael Paquier wrote: > > Could it be possible to get a patch from all the feedback and exchange > > gathered here? Petr, I think that it would not hurt if you use the set > > of words and comments you think is mo

Re: pgsql: Clarify use of temporary tables within partition trees

2018-07-02 Thread David Rowley
On 3 July 2018 at 16:55, Michael Paquier wrote: > Okay, the patch looks logically correct to me, I just tweaked the > comments as per the attached. I would also back-patch that down to v11 > to keep the code consistent with HEAD.. What do you think? Thanks for fixing it up. It looks fine apart

Re: Should contrib modules install .h files?

2018-07-02 Thread Pavel Stehule
2018-07-03 6:43 GMT+02:00 Craig Ringer : > On 2 July 2018 at 02:23, Andrew Gierth > wrote: > >> So I have this immediate problem: a PGXS build of a module, specifically >> an hstore transform for a non-core PL, is much harder than it should be >> because it has no way to get at hstore.h since tha

Re: pgsql: Clarify use of temporary tables within partition trees

2018-07-02 Thread Michael Paquier
On Tue, Jul 03, 2018 at 06:00:46PM +1200, David Rowley wrote: > Thanks for fixing it up. It looks fine apart from "Temporation" should > be "Temporary". Of course, thanks. > I think it should be backpatched to v11 and v10. Your original commit > went there too. I don't see any reason to do any di

Re: pgsql: Clarify use of temporary tables within partition trees

2018-07-02 Thread David Rowley
On 3 July 2018 at 18:11, Michael Paquier wrote: > On Tue, Jul 03, 2018 at 06:00:46PM +1200, David Rowley wrote: >> I think it should be backpatched to v11 and v10. Your original commit >> went there too. I don't see any reason to do any different here than >> what you did with the original commit.

Re: Possible bug in logical replication.

2018-07-02 Thread Arseny Sher
Michael Paquier writes: > On Thu, Jun 21, 2018 at 07:31:20PM +0900, Michael Paquier wrote: >> Could it be possible to get a patch from all the feedback and exchange >> gathered here? Petr, I think that it would not hurt if you use the set >> of words and comments you think is most adapted as t

Re: pgsql: Clarify use of temporary tables within partition trees

2018-07-02 Thread Amit Langote
On 2018/07/03 15:16, David Rowley wrote: > On 3 July 2018 at 18:11, Michael Paquier wrote: >> On Tue, Jul 03, 2018 at 06:00:46PM +1200, David Rowley wrote: >>> I think it should be backpatched to v11 and v10. Your original commit >>> went there too. I don't see any reason to do any different here

Re: pgsql: Clarify use of temporary tables within partition trees

2018-07-02 Thread Michael Paquier
On Tue, Jul 03, 2018 at 03:29:36PM +0900, Amit Langote wrote: > Why is this not near the beginning of expand_partitioned_rtentry()? > > Also, ISTM, this code would be unreachable because > expand_inherited_rtentry would not call here if the above if statement is > true, no? FWIW, I understood tha

Re: pgsql: Clarify use of temporary tables within partition trees

2018-07-02 Thread Amit Langote
Just realized something... On 2018/07/03 15:29, Amit Langote wrote: > Sorry for jumping in late here. I have a comment on the patch. > > + /* if there are no partitions then treat this as non-inheritance case. > */ > + if (partdesc->nparts == 0) > + { > + parentrte->inh

<    1   2