|From:||Ashutosh Bapat <ashutosh(dot)bapat(at)enterprisedb(dot)com>|
|To:||Etsuro Fujita <fujita(dot)etsuro(at)lab(dot)ntt(dot)co(dot)jp>|
|Cc:||Rajkumar Raghuwanshi <rajkumar(dot)raghuwanshi(at)enterprisedb(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>|
|Subject:||Re: Expression errors with "FOR UPDATE" and postgres_fdw with partition wise join enabled.|
|Views:||Raw Message | Whole Thread | Download mbox|
On Tue, May 1, 2018 at 5:00 PM, Etsuro Fujita
> (2018/04/27 14:40), Ashutosh Bapat wrote:
>> Here's updated patch set.
> Thanks for updating the patch! Here are my review comments on patch
> * This assertion in deparseConvertRowtypeExpr wouldn't always be true
> because of cases like ALTER FOREIGN TABLE DROP COLUMN plus ALTER FOREIGN
> TABLE ADD COLUMN:
> + Assert(parent_desc->natts == child_desc->natts);
> Here is such an example:
> I think we should remove that assertion.
> * But I don't think that change is enough. Here is another oddity with that
> assertion removed.
> To fix this, I think we should skip the deparseColumnRef processing for
> dropped columns in the parent table.
I have changed the test file a bit to test these scenarios.
Thanks for testing.
> * I think it would be better to do EXPLAIN with the VERBOSE option to the
> queries this patch added to the regression tests, to see if
> ConvertRowtypeExprs are correctly deparsed in the remote queries.
The reason VERBOSE option was omitted for partition-wise join was to
avoid repeated and excessive output for every child-join. I think that
PFA patch-set with the fixes.
I also noticed that the new function deparseConvertRowtypeExpr is not
quite following the naming convention of the other deparseFoo
functions. Foo is usually the type of the node the parser would
produced when the SQL string produced by that function is parsed. That
doesn't hold for the SQL string produced by ConvertRowtypeExpr but
then naming it as generic deparseRowExpr() wouldn't be correct either.
And then there are functions like deparseColumnRef which may produce a
variety of SQL strings which get parsed into different node types e.g.
a whole-row reference would produce ROW(...) which gets parsed as a
RowExpr. Please let me know if you have any suggestions for the name.
The Postgres Database Company
|Next Message||Oleksandr Shulgin||2018-05-08 08:15:47||Setting libpq TCP keepalive parameters from environment|
|Previous Message||Amit Langote||2018-05-08 07:07:41||Re: [Suspect SPAM] Re: [HACKERS] path toward faster partition pruning|