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

dblink + rule on select

From: f g <fg0fg1(at)yahoo(dot)fr>
To: pgsql-novice(at)postgresql(dot)org
Subject: dblink + rule on select
Date: 2006-03-04 17:30:17
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-novice
hi, i'd like to write sth like:

create rule MYRULE as on select to MYTABLE do instead

where querystring would be a special keyword, as new
and old, but containing the full query which the rule
is invoked, so if i do

insert into TOTO select * from MYTABLE where ... ;

it will act as

insert into TOTO dblink('dbname=ANOTHERDB','select *
from MYTABLE where ...') ;

is there any way to do such, i mean to hide the
dblink, so MYTABLE is the real MYTABLE on ANOTHERDB,
but looks like a normal local table...


Nouveau : téléphonez moins cher avec Yahoo! Messenger ! Découvez les tarifs exceptionnels pour appeler la France et l'international.
Téléchargez sur

pgsql-novice by date

Next:From: Zouari FouratDate: 2006-03-04 22:26:19
Subject: encoding problem
Previous:From: f.gDate: 2006-03-04 17:26:21
Subject: dblink + rule on select

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