[HACKERS] Implementing delete in columnar store fdw

2017-03-21 Thread sri harsha
Hello,

   I want to implement delete functionality for a column store fdw in
postgres. It is similar to file_fdw. I want to use the
“AddForeignUpdateTargets” function to implement this , but the junk filter
shouldn’t be a column present in the table . Is it possible to add a
Expr/Var to the junk filter that is not present in the schema of the table
, that i will generate on the fly ??

If yes, how can i do that ?? Thanks in advance.

Regards,
Sri Harsha


[HACKERS] Change in order of criteria - reg

2016-05-31 Thread sri harsha
Hi,

In PostgreSQL , does the order in which the criteria is given matter ??
For example

Query 1 : Select * from TABLE where a > 5 and b < 10;

Query 2 : Select * from TABLE where b <10 and a > 5;

Are query 1 and query 2 the same in PostgreSQL or different ?? If its
different , WHY ??



Thanks,

Harsha


Re: [HACKERS] UNION ALL - Var attno

2016-04-28 Thread sri harsha
Its not an OpExpr . It is a VAR , got it from "reltargetlist" in base
relation ( RelOptInfo) . Can you shed some light on where the conversion
from 141 to "original" attribute number takes place ??


Regards,
Harsha

On Fri, Apr 29, 2016 at 10:03 AM, Tom Lane <t...@sss.pgh.pa.us> wrote:

> sri harsha <sriharsha9...@gmail.com> writes:
> >Assume the following query ,
> > (SELECT a * 1 , b FROM TABLE_1) UNION ALL (SELECT a *1 , b FROM TABLE_2);
>
> > In this query , attribute number of the VARs are 141 and 2 respectively
> !!
>
> I doubt it.
>
> Maybe you're looking at something that's not a Var, possibly an OpExpr,
> but assuming it's a Var?  The fact that 141 is the pg_proc OID of int4mul
> lends considerable weight to this suspicion ...
>
> regards, tom lane
>


[HACKERS] UNION ALL - Var attno

2016-04-28 Thread sri harsha
Hi,

   Assume the following query ,

(SELECT a * 1 , b FROM TABLE_1) UNION ALL (SELECT a *1 , b FROM TABLE_2);

In this query , attribute number of the VARs are 141 and 2 respectively !!
What is the reason for this ??

I am trying to implement a FDW , so i need attribute numbers to fetch the
respective columns from my data store . Due to this change in attribute
numbers in the case of UNION ALL , this query doesn't provide the necessary
output .

But in the plan its given as 1 and 2 respectively . So is there a mapping
which PG maintains to convert from 141 to the original attribute number ??


Thanks,
Harsha


[HACKERS] Threads in PostgreSQL

2015-12-20 Thread sri harsha
Hi,

   Is it possible to use threads in Postgresql ?? I am using threads in my
foreign data wrapper and i get the following error when i use the threads .

*ERROR:  stack depth limit exceeded*
*HINT:  Increase the configuration parameter "max_stack_depth" (currently
2048kB), after ensuring the platform's stack depth limit is adequate.*

No matter how much i increase the stack size , the error keeps occurring .
How do i solve this problem ??


Thanks,
Harsha


[HACKERS] Multiple Update queries

2015-09-15 Thread sri harsha
Hello,

 I am using a foreign data wrapper where i get a portion of my data
pre-loaded , i.e I get a set of rows before hand . So now i want to run
multiple update queries on this loaded data , write the changes to file ,
load the next set and continue with updates again.

 How should i try to achieve my requirement ??  At what point in
postgres should i use the hook and change my execution ??

Thanks,
Harsha