Re: [HACKERS] Missing importing option of postgres_fdw

2015-05-25 Thread Etsuro Fujita
On 2015/05/26 3:15, Tom Lane wrote: Etsuro Fujita writes: On 2015/05/22 23:50, Tom Lane wrote: So I think worrying about convalidated is pretty pointless. Really, it is up to the user to determine what constraints should be attached to the foreign table, and IMPORT FOREIGN SCHEMA can't help m

Re: [HACKERS] Missing importing option of postgres_fdw

2015-05-25 Thread Tom Lane
Etsuro Fujita writes: > On 2015/05/22 23:50, Tom Lane wrote: >> So I think worrying about convalidated is pretty pointless. Really, >> it is up to the user to determine what constraints should be attached >> to the foreign table, and IMPORT FOREIGN SCHEMA can't help much. > Agreed. So, I'd like

Re: [HACKERS] Missing importing option of postgres_fdw

2015-05-25 Thread Etsuro Fujita
On 2015/05/22 23:50, Tom Lane wrote: > Etsuro Fujita writes: >> I agree with you on that point. And I think one option for that is that >> IMPORT FOREIGN SCHEMA only imports CHECK constraints of remote tables >> from a remote server that have convalidated = true. (If doing so, we >> wouldn't nee

Re: [HACKERS] Missing importing option of postgres_fdw

2015-05-22 Thread Tom Lane
Etsuro Fujita writes: > I agree with you on that point. And I think one option for that is that > IMPORT FOREIGN SCHEMA only imports CHECK constraints of remote tables > from a remote server that have convalidated = true. (If doing so, we > wouldn't need to allow IMPORT FOREIGN SCHEMA to retu

Re: [HACKERS] Missing importing option of postgres_fdw

2015-05-21 Thread Etsuro Fujita
On 2015/05/22 1:36, Robert Haas wrote: On Mon, May 18, 2015 at 4:03 AM, Etsuro Fujita wrote: On 2015/05/16 3:32, Robert Haas wrote: On Thu, May 14, 2015 at 6:37 AM, Etsuro Fujita wrote: On second thought, I noticed that as for this option, we cannot live without allowing IMPORT FOREIGN SCHE

Re: [HACKERS] Missing importing option of postgres_fdw

2015-05-21 Thread Robert Haas
On Mon, May 18, 2015 at 4:03 AM, Etsuro Fujita wrote: > On 2015/05/16 3:32, Robert Haas wrote: >> On Thu, May 14, 2015 at 6:37 AM, Etsuro Fujita >> wrote: >>> >>> On second thought, I noticed that as for this option, we cannot live >>> without >>> allowing IMPORT FOREIGN SCHEMA to return ALTER FO

Re: [HACKERS] Missing importing option of postgres_fdw

2015-05-18 Thread Amit Langote
On 2015-05-18 PM 06:45, Etsuro Fujita wrote: > On 2015/05/18 17:44, Amit Langote wrote: >> On 2015-05-18 PM 05:03, Etsuro Fujita wrote: >>> Let me explain. I think that convalidated would be *essential* for >>> accurately >>> performing relation_excluded_by_constraints for foreign tables like pla

Re: [HACKERS] Missing importing option of postgres_fdw

2015-05-18 Thread Etsuro Fujita
On 2015/05/18 17:44, Amit Langote wrote: On 2015-05-18 PM 05:03, Etsuro Fujita wrote: On 2015/05/16 3:32, Robert Haas wrote: On Thu, May 14, 2015 at 6:37 AM, Etsuro Fujita wrote: On second thought, I noticed that as for this option, we cannot live without allowing IMPORT FOREIGN SCHEMA to ret

Re: [HACKERS] Missing importing option of postgres_fdw

2015-05-18 Thread Amit Langote
On 2015-05-18 PM 05:03, Etsuro Fujita wrote: > On 2015/05/16 3:32, Robert Haas wrote: >> On Thu, May 14, 2015 at 6:37 AM, Etsuro Fujita >> wrote: >>> On second thought, I noticed that as for this option, we cannot live without >>> allowing IMPORT FOREIGN SCHEMA to return ALTER FOREIGN TABLE statem

Re: [HACKERS] Missing importing option of postgres_fdw

2015-05-18 Thread Etsuro Fujita
On 2015/05/16 3:32, Robert Haas wrote: On Thu, May 14, 2015 at 6:37 AM, Etsuro Fujita wrote: On second thought, I noticed that as for this option, we cannot live without allowing IMPORT FOREIGN SCHEMA to return ALTER FOREIGN TABLE statements because we cannot declare the convalidated informatio

Re: [HACKERS] Missing importing option of postgres_fdw

2015-05-15 Thread Robert Haas
On Thu, May 14, 2015 at 6:37 AM, Etsuro Fujita wrote: > On second thought, I noticed that as for this option, we cannot live without > allowing IMPORT FOREIGN SCHEMA to return ALTER FOREIGN TABLE statements > because we cannot declare the convalidated information in the CREATE FOREIGN > TABLE stat

Re: [HACKERS] Missing importing option of postgres_fdw

2015-05-14 Thread Etsuro Fujita
On 2015/04/30 2:10, Robert Haas wrote: On Mon, Apr 27, 2015 at 7:47 AM, Michael Paquier wrote: Authorizing ALTER FOREIGN TABLE as query string that a FDW can use with IMPORT FOREIGN SCHEMA is a different feature than what is proposed in this patch, aka an option for postgres_fdw and meritates a

Re: [HACKERS] Missing importing option of postgres_fdw

2015-05-01 Thread Etsuro Fujita
On 2015/04/30 17:15, Etsuro Fujita wrote: On 2015/04/30 2:10, Robert Haas wrote: On Mon, Apr 27, 2015 at 7:47 AM, Michael Paquier wrote: Authorizing ALTER FOREIGN TABLE as query string that a FDW can use with IMPORT FOREIGN SCHEMA is a different feature than what is proposed in this patch, aka

Re: [HACKERS] Missing importing option of postgres_fdw

2015-04-30 Thread Etsuro Fujita
On 2015/04/30 2:10, Robert Haas wrote: On Mon, Apr 27, 2015 at 7:47 AM, Michael Paquier wrote: Authorizing ALTER FOREIGN TABLE as query string that a FDW can use with IMPORT FOREIGN SCHEMA is a different feature than what is proposed in this patch, aka an option for postgres_fdw and meritates a

Re: [HACKERS] Missing importing option of postgres_fdw

2015-04-29 Thread Robert Haas
On Mon, Apr 27, 2015 at 7:47 AM, Michael Paquier wrote: > Authorizing ALTER FOREIGN TABLE as query string that a FDW can use > with IMPORT FOREIGN SCHEMA is a different feature than what is > proposed in this patch, aka an option for postgres_fdw and meritates a > discussion on its own because it

Re: [HACKERS] Missing importing option of postgres_fdw

2015-04-27 Thread Michael Paquier
On Mon, Apr 27, 2015 at 4:20 PM, Etsuro Fujita wrote: > On 2015/04/27 15:51, Michael Paquier wrote: >> >> On Mon, Apr 27, 2015 at 3:15 PM, Etsuro Fujita >> wrote: >>> >>> I noticed that there is no postgres_fdw option to control whether check >>> constraints on remote tables are included in the d

Re: [HACKERS] Missing importing option of postgres_fdw

2015-04-27 Thread Etsuro Fujita
On 2015/04/27 15:51, Michael Paquier wrote: On Mon, Apr 27, 2015 at 3:15 PM, Etsuro Fujita wrote: I noticed that there is no postgres_fdw option to control whether check constraints on remote tables are included in the definitions of foreign tables imported from a remote PG server when performi

Re: [HACKERS] Missing importing option of postgres_fdw

2015-04-26 Thread Michael Paquier
On Mon, Apr 27, 2015 at 3:15 PM, Etsuro Fujita wrote: > Hi, > > I noticed that there is no postgres_fdw option to control whether check > constraints on remote tables are included in the definitions of foreign > tables imported from a remote PG server when performing IMPORT FOREIGN > SCHEMA, while

[HACKERS] Missing importing option of postgres_fdw

2015-04-26 Thread Etsuro Fujita
Hi, I noticed that there is no postgres_fdw option to control whether check constraints on remote tables are included in the definitions of foreign tables imported from a remote PG server when performing IMPORT FOREIGN SCHEMA, while we now allow check constraints on foreign tables. Attached is a