Re: distibuted transactions, SQL+XPath+XTree - Mailing list pgsql-hackers

From Dmitry Turin
Subject Re: distibuted transactions, SQL+XPath+XTree
Date
Msg-id 17624598812.20080220142853@narod.ru
Whole thread Raw
In response to Re: distibuted transactions, SQL+XPath+XTree  (Richard Huxton <dev@archonet.com>)
List pgsql-hackers
Richard,

>> I see the following business opportunity for Postgres:
>> I) Simple man can't program middleware to connect XML-client and
>> Postgres.
RH> Aha! still trying to push an XML command system and http server into the
RH> backend.

Yes.

>> II) Request into several databases does not exist.
RH> what you do with cross-database dependencies

As i understand, you are saying about inter-database FK

connect         address www.default.bz;
create nick db1 address www.site.com;
create nick db2 address www.data.net;

connect addr=“www.data.net” user=“Smith” pwd=“qxuwb”;
create table b ( b1 xml, b2 number, b3 xml
);

connect addr=“www.site.com” user=“Tomson” pwd=“ncwhif”;
create table a ( a1 number                          references db1:b(@b1/k/m/@m1), a2 xml,  foreign key (@a2/p/q/@q1)
referencesdb1:b(@b2), a3 xml,  foreign key (@a3/p/q/@q1) references db1:b(@b3/k/m/@m1)
 
);

e.g. slides #75-76 in http://sql50.euro.ru/sql5.11.3.ppt ?
There are two case, which i'm naming 'set' ( a<= b, slide #93-94) and 'relay-rece' ( a => b , slide #95-98).
I propose to not try all "second" database, i.e. to not use
reference from "second" database to "first" database (case of 'set').
Case 'relay-race' works clearly.

Of course, i raise question about designation of interbase FK in
modellers (slide #105).

>> III) Notebooks need several switching-on and switching-off during
>> transaction.
RH> How are you dealing with the locking issues?

I propose to freeze transaction (#118):

create user u identified by p waited 1.0/0; -- yy.mm.dd/hh.mm.ss;
freeze; -- like disconnect
-----
<?res code=0 frozen=7482 ?> <!-- from ‘default.edu’ -->
<?res code=0 frozen=8726 ?> <!-- from ‘site.com’ -->
<?res code=0 frozen=9278 ?> <!-- from ‘data.net’ -->
<?res code=0 frozen=3825 ?> <!-- from ‘data.net’: second transaction -->
<?res code=0 frozen=6384 ?> <!-- from ‘store.org’ -->
<?res code=6 ?>             <!-- from ‘place.ws’: database is broken -->

unfreeze addr=site.com user=Tomson pwd=ncwhif safe=8726; -- like ‘connect’
unfreeze addr=data.net user=Smith  pwd=qxuwb  safe=9278;

P.S.
Of course, i propose possibility to freeze failed commit (#120).

>> IV) Distance between strings are not supported, that makes
>> aproximate searching impossible.
RH> Would that be "not supported" in the sense of "contrib/fuzzystrmatch"?

I propose
1) to use Levenshtein distance recursively:
for letters in words, for words in phrases (separated by marks of
punctuation), for phrases (e.g. sentances) in string
2) to count convolutions (several words into abbreviation, and back)

>> V) There is no possibility to hide some (not all) records of table,
>> granted to other users, from these users
RH> Apart from views

depending of user, which look in view

RH> or the veil pgfoundry project of course.

I'm not understanding, clarify, please.

>> I ask you to implement these solutions, that Postgres get
>> advantage before other DBMS-es. I have prepered several drawing
>> http://sql50.euro.ru/sql5.11.3.ppt to explain ideas.
>> More details are described below.
RH> Were you looking to hire developers, or do you have customers who are
RH> looking to hire developers?

Neither this, nor that.
I'm looking for volunteers.

P.S.
I'm also seggesting to implement

1) restricted table for stream processing:

create table a ( a1 number, a2 number
) size 5;
create table aa (…);
-- resize a to 10;
-- resize a to infinity;
-- redirect a to aa;

create table a ( a1 number, a2 number
) size 5 direct aa;

2) timer:

create timer TimerName start         yy.mm.dd/hh.mm.ss end          yy.mm.dd/hh.mm.ss schedule (yy.mm.dd/hh.mm.ss,
yy.mm.dd/hh.mm.ss,…) per           yy.mm.dd/hh.mm.ss as begin … end;
 
create timer t1 schedule (01/0, 03/0, 10/0) per 01.00/0 as … ; -- 1-st, 3-rd, 10-th day of each month
create timer t2 schedule (0/0.05, 0/0.10, 0/0.20) per 0/01 as … ; -- 5-, 10-, 20-th minutes of each hour
create timer t3 schedule (0) per 1/0 as … ;  -- each day 


Dmitry Turin
SQL5      (5.11.3)  http://sql50.euro.ru
HTML6     (6. 5.4)  http://html60.euro.ru
Unicode7  (7. 2.1)  http://unicode70.euro.ru
Computer2 (2. 0.2)  http://computer20.euro.ru



pgsql-hackers by date:

Previous
From: Gregory Stark
Date:
Subject: More char()/ascii()
Next
From: Alvaro Herrera
Date:
Subject: Re: Permanent settings