Albe Laurenz writes:
> I believe that a column of a foreign table should be NOT NULL only if
> it is guaranteed that it cannot contain NULL values. Doesn't the planner
> rely on that?
The planner does expect that constraints tell the truth. I don't remember
how significant a false NOT NULL cons
Rushabh Lathia wrote:
> I found constraints on foreign table is very useful for the application when
> the multiple
> user accessing same remote table using fdw and both user want to enforce
> different
> constraint on particular table or different user want to enforce different
> DEFAULT
> expr
On Mon, Jan 20, 2014 at 8:52 PM, Tom Lane wrote:
> Rushabh Lathia writes:
> > As per the PG documentation it says that foreign table do support the
> > NOT NULL, NULL and DEFAULT.
>
> There has been a great deal of debate about what constraints on foreign
> tables ought to mean. Right now, at l
On Tue, Jan 21, 2014 at 9:32 AM, Tom Lane wrote:
> Amit Kapila writes:
>> On Mon, Jan 20, 2014 at 8:52 PM, Tom Lane wrote:
>>> There has been a great deal of debate about what constraints on foreign
>>> tables ought to mean.
>
>> What is the reason for keeping DEFAULT behaviour different than
>>
Amit Kapila writes:
> On Mon, Jan 20, 2014 at 8:52 PM, Tom Lane wrote:
>> There has been a great deal of debate about what constraints on foreign
>> tables ought to mean.
> What is the reason for keeping DEFAULT behaviour different than
> constraints. Right now the behaviour for DEFAULT is if it
On Mon, Jan 20, 2014 at 8:52 PM, Tom Lane wrote:
> Rushabh Lathia writes:
>> As per the PG documentation it says that foreign table do support the
>> NOT NULL, NULL and DEFAULT.
>
> There has been a great deal of debate about what constraints on foreign
> tables ought to mean. Right now, at leas
Rushabh Lathia writes:
> As per the PG documentation it says that foreign table do support the
> NOT NULL, NULL and DEFAULT.
There has been a great deal of debate about what constraints on foreign
tables ought to mean. Right now, at least for postgres_fdw, they're just
taken as documentation of
Please consider attached patch here as earlier attached wrong patch.
Sorry for the inconvenience.
On Mon, Jan 20, 2014 at 1:21 PM, Rushabh Lathia wrote:
> Hello,
>
> Please consider the following test:
>
> create database foo;
> \c foo
>
> create table foo_test ( a int );
>
> \c postgres
>
> cr
Hello,
Please consider the following test:
create database foo;
\c foo
create table foo_test ( a int );
\c postgres
create extension if not exists postgres_fdw;
create server foo_server foreign data wrapper postgres_fdw options ( dbname
'foo' );
create user mapping for current_user server foo