Re[2]: BUG #15724: Can't create foreign table as partition - Mailing list pgsql-bugs

From Stepan Yankevych
Subject Re[2]: BUG #15724: Can't create foreign table as partition
Date
Msg-id 1553876622.668408412.24u6zti5@frv53.fwdcdn.com
Whole thread Raw
In response to Re: BUG #15724: Can't create foreign table as partition  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: BUG #15724: Can't create foreign table as partition  (Etsuro Fujita <fujita.etsuro@lab.ntt.co.jp>)
List pgsql-bugs
>> I'm not sure that just forcing the case to be a no-op is wise.
>> What if the index is supposed to be UNIQUE?
Anyway it would be better to have no-op in 11.3 than having it not working. 
We just can put comment in the doc like. 
Foreign Server should take care about indexing foreign table as partition. 


--- Original message ---
From: "Tom Lane" <tgl@sss.pgh.pa.us>
Date: 29 March 2019, 16:01:41

Alvaro Herrera <alvherre@2ndquadrant.com> writes:
> On 2019-Mar-29, PG Bug reporting form wrote:
>> SQL Error [42809]: ERROR: cannot create index on foreign table "msg_json"

> Ah, this is because we try to propagate the index to the partition,
> which appears to be less than desirable.  Maybe this patch fixes it?  I
> have not tested it, only verified that it compiles.

Really, what *ought* to happen in such a case is that the FDW gets
told about the command and has the opportunity to try to do something
corresponding to making an index.  But that smells like a new feature
rather than a bug fix.

I'm not sure that just forcing the case to be a no-op is wise.
What if the index is supposed to be UNIQUE?
		regards, tom lane

pgsql-bugs by date:

Previous
From: Stepan Yankevych
Date:
Subject: Re[2]: BUG #15724: Can't create foreign table as partition
Next
From: Erik Rijkers
Date:
Subject: test - please ignore