pg.ddx.io pgsql-sql@postgresql.org mailing list archive
help / color / mirror / Atom feedask for help !!! (emergency case)
2+ messages / 2 participants
[nested] [flat]
* ask for help !!! (emergency case)
@ 2001-02-23 11:14 Jaruwan Laongmal <jaruwan@gits.net.th>
2001-02-25 16:29 ` Re: ask for help !!! (emergency case) J.H.M. Dassen (Ray) <jdassen@cistron.nl>
0 siblings, 1 reply; 2+ messages in thread
From: Jaruwan Laongmal @ 2001-02-23 11:14 UTC (permalink / raw)
To: pgsql-hackers@postgresql.org; pgsql-sql
dear all
I hava 2 problems about view
1. i can't insert into view
2. i can't create view with union
I try to insert into view as following
create table t1 (id int,name varchar(12) check(id<=10));
create table t2 (id int,name varchar(12) check(id>10));
create view v1 as select * from t1,t2;
insert into v1 values(1,'wan1');
insert into v1 values(12,'wan12');
it does not show any problem but it doen't have data in table t1 and table
t2
------------------------------
if i want to distribute database into 2 database servers
and i want to insert into database1.table1 when database1.table1.id <=100
and i want to insert into database2.table2 when database2.table2.id >100
How can i do that with create view .........as .......union all ............
and insert into view ,afterthat view is check condition and distrubute data
into diferent database
up on condition
and How to configure the postgres sql server?
If you have idea or example for solving this problem , pls help me
thank you so much , i'm looking forward to seeing your response.
Regards,
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: ask for help !!! (emergency case)
2001-02-23 11:14 ask for help !!! (emergency case) Jaruwan Laongmal <jaruwan@gits.net.th>
@ 2001-02-25 16:29 ` J.H.M. Dassen (Ray) <jdassen@cistron.nl>
0 siblings, 0 replies; 2+ messages in thread
From: jdassen@cistron.nl @ 2001-02-25 16:29 UTC (permalink / raw)
To: pgsql-sql
Jaruwan Laongmal <jaruwan@gits.net.th> wrote:
>create view v1 as select * from t1,t2;
>insert into v1 values(1,'wan1');
Quoting http://www.postgresql.org/docs/aw_pgsql_book/node149.html:
: Because views are not ordinary tables, INSERTs , UPDATEs , and DELETEs on
: views have no effect. The next section shows how rules can correct this
: problem.
HTH,
Ray
--
Pinky, Are You Pondering What I'm Pondering?
Ewww, I think so Brain, but I think I'd rather eat the Macarena.
Pinky and the Brain in "Plan Brain From Outer Space"
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2001-02-25 16:29 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2001-02-23 11:14 ask for help !!! (emergency case) Jaruwan Laongmal <jaruwan@gits.net.th>
2001-02-25 16:29 ` J.H.M. Dassen (Ray) <jdassen@cistron.nl>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox