Re: [GENERAL] PostgreSQL FDW + Trigger on Remote DB = WARNING: there is no transaction in progress

2016-07-12 Thread Tom Lane
Peter Olivier writes: > I create a foreign table F1 on Database local which points to Remote.R1 > When updating F1 the trigger on Remote.R1 fires but gives the following > warning: > WARNING: there is no transaction in progress Seems odd, but I think you'll have to give a complete example for a

Re: [GENERAL] PostgreSQL FDW + Trigger on Remote DB = WARNING: there is no transaction in progress

2016-07-12 Thread Adrian Klaver
On 07/12/2016 02:39 AM, Peter Olivier wrote: Hi, I have the following setup: Database Local has a table L1 Database Remote has a table R1 and a table R2. Table Remote.R1 has a trigger. This trigger updates Remote.R2 I create a foreign table F1 on Database local which points to Remote.R

[GENERAL] PostgreSQL FDW + Trigger on Remote DB = WARNING: there is no transaction in progress

2016-07-12 Thread Peter Olivier
Hi, I have the following setup: Database Local has a table L1 Database Remote has a table R1 and a table R2. Table Remote.R1 has a trigger. This trigger updates Remote.R2 I create a foreign table F1 on Database local which points to Remote.R1 When updating F1 the trigger on Remote.R1

Re: [GENERAL] Postgresql-fdw

2016-05-23 Thread Rader, David
On Mon, May 23, 2016 at 1:52 AM, aluka raju wrote: I have data storage in flat files (structured and unstructured) . I want to run sql queries on that , so i am looking in to postgresql how to use fdw on the data that i have. You could use the file_fdw to "attach" the files as foreign tables. At

Re: [GENERAL] Postgresql-fdw

2016-05-23 Thread Bruno Wolff III
On Sun, May 22, 2016 at 23:38:43 -0700, John R Pierce wrote: If you want to use postgres to query this data efficiently, you really should import this data into postgres tables, properly indexed for the sorts of queries you wish to do. And it isn't that hard to script this kind of thing. P

Re: [GENERAL] Postgresql-fdw

2016-05-22 Thread John R Pierce
On 5/22/2016 10:52 PM, aluka raju wrote: I have data storage in flat files (structured and unstructured) . I want to run sql queries on that , so i am looking in to postgresql how to use fdw on the data that i have. I want to prepare an api for running sql queries for the data in files,so i am

Re: [GENERAL] Postgresql-fdw

2016-05-22 Thread Arthur Silva
You can build a multicorn fdw http://multicorn.org/ Regards On May 23, 2016 7:54 AM, "aluka raju" wrote: > > I have data storage in flat files (structured and unstructured) . I want to run sql queries on that , so i am looking in to postgresql how to use fdw on the data that i have. I want to pr

[GENERAL] Postgresql-fdw

2016-05-22 Thread aluka raju
I have data storage in flat files (structured and unstructured) . I want to run sql queries on that , so i am looking in to postgresql how to use fdw on the data that i have. I want to prepare an api for running sql queries for the data in files,so i am trying to have separate postgresql engine and

Re: [GENERAL] Postgresql - FDW, ForeignScanState and subqueries

2011-10-21 Thread Ronan Dunklau
So, according to your advice, I've looked at the IndexScan implementation and here is what I came up with. At execution time, if I find an operation expression involving a Param, the param expression is evaluated with ExecEvalExpr (after being "initted" on the fly), and then considered exactly the

Re: [GENERAL] Postgresql - FDW, ForeignScanState and subqueries

2011-10-20 Thread Tom Lane
Ronan Dunklau writes: > Now, if I query my table like this (a subquery, joined on the outer query), > what info should I be able to parse from the PlanState ? > select name, (select max(value) from test t2 where t2.name = t1.name) as max > from test t1; > I don't really know much about postgresq

[GENERAL] Postgresql - FDW, ForeignScanState and subqueries

2011-10-20 Thread Ronan Dunklau
Hello. Sorry if this is not the appropriate mailing list, but I understood that I needed to post here first. Warning: I'm not a native english speaker ;) I'm implementing a Foreign Data Wrapper, and I'm trying to "optimize" it by parsing the required columns and simple "quals" from the foreignsc