Re: [COMMITTERS] pgsql: Allow a partitioned table to have a default partition.

2017-09-08 Thread Robert Haas
On Fri, Sep 8, 2017 at 6:50 PM, Tom Lane  wrote:
> But it ain't.  It's failing on empty partition expressions, and there's
> a short-circuit exit from map_partition_varattnos.
>
> Will fix.

Thanks.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


Re: [COMMITTERS] pgsql: Allow a partitioned table to have a default partition.

2017-09-08 Thread Tom Lane
Thomas Munro  writes:
> On Sat, Sep 9, 2017 at 10:23 AM, Thomas Munro
>  wrote:
>> map_partition_varattnos() doesn't always write to *found_whole_row, so
>> it's uninitialised here in generate_partition_qual():

That was the first thing I thought of ...

> Hmm, no.  I take that back.

... and I looked at map_variable_attnos and decided it was fine, too.

But it ain't.  It's failing on empty partition expressions, and there's
a short-circuit exit from map_partition_varattnos.

Will fix.

regards, tom lane


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


Re: [COMMITTERS] pgsql: Allow a partitioned table to have a default partition.

2017-09-08 Thread Thomas Munro
On Sat, Sep 9, 2017 at 10:23 AM, Thomas Munro
 wrote:
> On Sat, Sep 9, 2017 at 9:49 AM, Tom Lane  wrote:
>> Robert Haas  writes:
>>> Allow a partitioned table to have a default partition.
>>
>> Early buildfarm returns not good.
>>
>> It passes here, so the problem isn't obvious.
>
> map_partition_varattnos() doesn't always write to *found_whole_row, so
> it's uninitialised here in generate_partition_qual():
>
> result = map_partition_varattnos(result, 1, rel, parent,
>  _whole_row);
> /* There can never be a whole-row reference here */
> if (found_whole_row)
> elog(ERROR, "unexpected whole-row reference found in partition key");

Hmm, no.  I take that back.

-- 
Thomas Munro
http://www.enterprisedb.com


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


Re: [COMMITTERS] pgsql: Allow a partitioned table to have a default partition.

2017-09-08 Thread Thomas Munro
On Sat, Sep 9, 2017 at 9:49 AM, Tom Lane  wrote:
> Robert Haas  writes:
>> Allow a partitioned table to have a default partition.
>
> Early buildfarm returns not good.
>
> It passes here, so the problem isn't obvious.

map_partition_varattnos() doesn't always write to *found_whole_row, so
it's uninitialised here in generate_partition_qual():

result = map_partition_varattnos(result, 1, rel, parent,
 _whole_row);
/* There can never be a whole-row reference here */
if (found_whole_row)
elog(ERROR, "unexpected whole-row reference found in partition key");

-- 
Thomas Munro
http://www.enterprisedb.com


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


Re: [COMMITTERS] pgsql: Allow a partitioned table to have a default partition.

2017-09-08 Thread Tom Lane
Robert Haas  writes:
> Allow a partitioned table to have a default partition.

Early buildfarm returns not good.

It passes here, so the problem isn't obvious.

regards, tom lane


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers