pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Kitter Georgiy <sql4-en@narod.ru>
To: pgsql-sql@postgresql.org
Subject: Request into several DBMS simultaneously on DDL and DML
Date: Tue, 28 Aug 2007 08:44:49 +0400
Message-ID: <195471188276289@webmail10.yandex.ru> (raw)

(1)Let's allow to __connect into several DBMS__ at once,
last of them becomes DBMS 'by default'.
User assign any nickname to each database at connection,
except nickname 'all' and 'local', e.g.
  connect ra=database.remote.com username=Smith   password=pwds nickname=db1;
  connect ra=db.distination.com  username=Tomson  password=pwdt nickname=db2;
  connect ra=database.remote.com username=Johnson password=pwdj nickname=db3;
And user can change DBMS by default, e.g.
  local db2;
Each time, when __name of 
datatype, table, view, sequence, index,
trigger, function, procedure, user, role__
is used, it's implied, that object is in database by default, e.g.
  create  type      NAME ...
  alter   table     NAME ...
  drop    sequence  NAME ...
  create  index     NAME ...
  replace trigger   NAME ...
  drop    function  NAME ...
  insert  into      NAME ...
  select  ...  from NAME ...
  create  user      NAME ...
  create  role      NAME ...
  grant             NAME to NAME
 
(2)Let's allow to specify __location of object by prefix__,
which is before name through colon. Prefix can be
(2.1) nickname of concrete database, e.g.
  select  ...  from db1:NAME ...
  insert  into      db3:NAME ...
(2.2) predicate "all:" (which designates all databases),
"local:" (which designate database by default), e.g.
  insert  into        all:NAME ...
  select  ...  from local:NAME ...
  select  ...  where fld > any (select ... from all:NAME ...
(2.3) marker - word, meaning all databases consecutively
(__any two markers never simultaneously mean the same database__).
Sign "%" is put before marker, e.g.
  insert  into %db1:NAME select * from %db2:NAME;

(3) As result, __new type of system information__ appears:
field, refering to other field by foreign key,
has additional bit except own value -
bit specifies, whether record, to which it refers,
is in the same or in other database.
It's necessary to not signalize about break of foreign key,
if remote database will not connected in next time.

(4) After all said, __replication__ of databases
by branded programs loss all sense -
always it's possible to make it
by extension of SQL, described above.


Document is stated on
  http://sql40.chat.ru/site/sql40/en/author/mc_eng.htm
Related ideas are on:
  http://sql40.chat.ru/site/sql40/en/author/mc2_eng.htm


Dmitry Turin
SQL4      (4.2.0)  http://sql40.chat.ru
HTML6     (6.4.0)  http://html60.chat.ru
Unicode2  (2.0.1)  http://unicode2.chat.ru
Computer2 (2.0.3)  http://computer20.chat.ru



view thread (4+ messages)  latest in thread

Message-ID: <195471188276289@webmail10.yandex.ru>
Permalink:  ../195471188276289@webmail10.yandex.ru/
Also on:    postgresql.org/message-id/195471188276289@webmail10.yandex.ru

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: sql4-en@narod.ru
  Subject: Re: Request into several DBMS simultaneously on DDL and DML
  In-Reply-To: <195471188276289@webmail10.yandex.ru>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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