I'm sorry, I didn't understand you post... 1) Why does my current implementation is not working? Hierarchy doesn't work with views in general, not only with dblink 2) Why am I supposed to use unions in the view? 3) I know that I am doing select * from tbl in the remote db; that is something I can work on later. At least I would like to see it working, since there is nothing in the docs that says it shouldn't be working... 4) I am not able to rewrite my queries. ----- Messaggio originale ----- Da: Marko Kreen <markokr@xxxxxxxxx> A: Scara Maccai <m_lists@xxxxxxxx> Cc: pgsql-general@xxxxxxxxxxxxxx Inviato: Venerdì 29 febbraio 2008, 10:46:09 Oggetto: Re: partitioning using dblink On 2/29/08, Scara Maccai <m_lists@xxxxxxxx> wrote: > I can't get views to participate in the hierarchy... The partition exclusion _may_ work if you do something like: create view as select * from dblink/plproxy-from-part1 where part1 constraint union all select * from dblink/plproxy-from-part2 where part2 constraint So if you do 'select * from view where constraint;' the postgres will skip partitions which do not match. You may need to define the setof function immutable or something... i'm not sure. But any contraint exclusion wont change the fact you are doing select * from tbl; in remote db, which makes the exercise quite pointess IMHO. I obviously would recommend pl/proxy for such task, but that would expect you are able to write your queries. If you are in situation where you don't control the queries, then plproxy quite likely is not use. -- marko ___________________________________ L'email della prossima generazione? Puoi averla con la nuova Yahoo! Mail: http://it.docs.yahoo.com/nowyoucan.html ---------------------------(end of broadcast)--------------------------- TIP 5: don't forget to increase your free space map settings