Re: partitioning using dblink

From: Scara Maccai <m_lists(at)yahoo(dot)it>
To: Marko Kreen <markokr(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: partitioning using dblink
Date: 2008-02-29 16:57:11
Message-ID: 351565.6593.qm@web28103.mail.ukl.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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(at)gmail(dot)com>
A: Scara Maccai <m_lists(at)yahoo(dot)it>
Cc: pgsql-general(at)postgresql(dot)org
Inviato: Venerdì 29 febbraio 2008, 10:46:09
Oggetto: Re: [GENERAL] partitioning using dblink

On 2/29/08, Scara Maccai <m_lists(at)yahoo(dot)it> 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

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Karl O. Pinc 2008-02-29 17:02:21 Babase, a PostgreSQL database and an example Foxpro conversion
Previous Message Kaloyan Iliev 2008-02-29 16:56:51 Re: Insert vs Update syntax