|
From: Javier H. <jhe...@ce...> - 2013-10-09 11:28:26
|
Hi Ashutosh,
The current code (v1.1) is:
case T_ArrayRef:
/*
* When multiple values of of an array are updated at once
* FQS planner cannot yet handle SQL representation correctly.
* So disable FQS in this case and let standard planner
manage it.
*/
case T_FieldStore:
/*
* PostgreSQL deparsing logic does not handle the FieldStore
* for more than one fields (see processIndirection()). So,
let's
* handle it through standard planner, where whole row will be
* constructed.
*/
case T_SetToDefault:
/*
* PGXCTODO: we should actually check whether the default
value to
* be substituted is shippable to the Datanode. Some cases like
* nextval() of a sequence can not be shipped to the
Datanode, hence
* for now default values can not be shipped to the Datanodes
*/
pgxc_set_shippability_reason(sc_context, SS_UNSUPPORTED_EXPR);
pgxc_set_exprtype_shippability(exprType(node), sc_context);
break;
Sorry, next time I will send a patch.
On 09/10/13 13:24, Ashutosh Bapat wrote:
> Hi Javier,
> What's your change? Can you please provide a patch?
>
>
> On Wed, Oct 9, 2013 at 4:53 PM, Javier Hernandez <jhe...@ce...
> <mailto:jhe...@ce...>> wrote:
>
> Hello,
>
> I am not sure if this is the right mailing list for sending
> Feature request, if not, sorry for the inconvenience.
>
> I know you are working on improvements to the planner (Feature
> Request #95). One important for my project is the ability to use
> FQS for queries that reference elements in an array column. One
> example:
>
> CREATE TABLE TestArray (id SERIAL, flux FLOAT4*[]*, error
> FLOAT*[]*);
>
> SELECT flux, error FROM TestArray WHERE id = 12; -- Planner
> uses FQS
> SELECT flux[1], error[1] FROM TestArray WHERE id = 12; --
> Planner uses Remote query and completes in coordinator
>
> I am beginning to dig in the code and I think I have a
> temporary solution:
>
>
> src/backend/optimizer/util/pgxcship.c:709
>
> case T_ArrayRef:
> /*
> * When multiple values of of an array are updated at once
> * FQS planner cannot yet handle SQL representation
> correctly.
> * So disable FQS in this case and let standard
> planner manage it.
> */
> if (sc_context->sc_query != NULL &&
> sc_context->sc_query->commandType == CMD_SELECT) {
> pgxc_set_exprtype_shippability(exprType(node), sc_context);
> } else {
> pgxc_set_shippability_reason(sc_context, SS_UNSUPPORTED_EXPR);
> pgxc_set_exprtype_shippability(exprType(node), sc_context);
> }
> break;
>
>
> The original code is always marking the query as
> SS_UNSUPPORTED_EXPR, but according to the existing comment I think
> my change is safe for Select. Isn't it?
>
>
> Thank you very much,
>
> --
> Javier Hernández
> Ingeniero de Bases de Datos
> Centro de Estudios de Fisica del Cosmos de Aragon (ceFca)
> http://www.cefca.es
> Plza San Juan Nº 1, Planta 2ª
> E-44001 Teruel (Spain)
> Phone: +34 978 221266 Ext.1105
> Fax: +34 978 611801
>
>
> ------------------------------------------------------------------------------
> October Webinars: Code for Performance
> Free Intel webinars can help you accelerate application performance.
> Explore tips for MPI, OpenMP, advanced profiling, and more. Get
> the most from
> the latest Intel processors and coprocessors. See abstracts and
> register >
> http://pubads.g.doubleclick.net/gampad/clk?id=60134071&iu=/4140/ostg.clktrk
> _______________________________________________
> Postgres-xc-general mailing list
> Pos...@li...
> <mailto:Pos...@li...>
> https://lists.sourceforge.net/lists/listinfo/postgres-xc-general
>
>
>
>
> --
> Best Wishes,
> Ashutosh Bapat
> EnterpriseDB Corporation
> The Postgres Database Company
|