Skip site navigation (1) Skip section navigation (2)

partitioning using dblink

From: Scara Maccai <m_lists(at)yahoo(dot)it>
To: pgsql-general(at)postgresql(dot)org
Subject: partitioning using dblink
Date: 2008-02-28 20:19:46
Message-ID: 970698.82251.qm@web28104.mail.ukl.yahoo.com (view raw or flat)
Thread:
Lists: pgsql-general
Hi,

I started thinking that using dblink I could "easily" get some kind of read only multi-server partitioning, if only VIEWs could be declared with "INHERITS"...

That way I think I could 

1) add as many views as the number of DBs as

CREATE VIEW mytable_part_n AS
<SELECT using dblink on remote server_n>
INHERITS mytable

to every DB I have

2) A select on the DB that asks for data on multiple DBs (because it uses data from different partition) would ask the proper data to the proper server...


I think that it would be very nice... 
But, since VIEWs can't be declared using INHERITS, that won't work...

Am I wrong?



I know that putting INHERITS and CHECKs on the VIEWs are not a good idea, but I think some method to declare a TABLE as being "remote" would be very cool... I don't know, maybe using a new "storage_parameter"...








      ___________________________________ 
L'email della prossima generazione? Puoi averla con la nuova Yahoo! Mail: http://it.docs.yahoo.com/nowyoucan.html

Responses

pgsql-general by date

Next:From: Steven De VriendtDate: 2008-02-28 20:42:00
Subject: syntax errors at "line 1" when executing every command
Previous:From: Alan HodgsonDate: 2008-02-28 19:58:19
Subject: Re: WAL Log Size

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group