RE: [HACKERS] FOREIGN KEY and shift/reduce

Поиск
Список
Период
Сортировка
Искать
От
Hiroshi Inoue
Тема
RE: [HACKERS] FOREIGN KEY and shift/reduce
Дата
Msg-id
001701bf4068$04aebc40$2801007e@cadzone.tpf.co.jp
Ответ на
FOREIGN KEY and shift/reduce (wieck@debis.com (Jan Wieck))
Список
Дерево обсуждения
FOREIGN KEY and shift/reduce wieck@debis.com (Jan Wieck)
RE: [HACKERS] FOREIGN KEY and shift/reduce "Hiroshi Inoue" <Inoue@tpf.co.jp>
Re: [HACKERS] FOREIGN KEY and shift/reduce wieck@debis.com (Jan Wieck)
Re: [HACKERS] FOREIGN KEY and shift/reduce wieck@debis.com (Jan Wieck)
Parallel regress tests (was Re: FOREIGN KEY and shift/reduce) Tom Lane <tgl@sss.pgh.pa.us>
Re: [HACKERS] Parallel regress tests (was Re: FOREIGN KEY and shift/reduce) Peter Eisentraut <e99re41@DoCS.UU.SE>
Re: [HACKERS] Parallel regress tests (was Re: FOREIGN KEY and shift/reduce) Tom Lane <tgl@sss.pgh.pa.us>
Re: [HACKERS] Parallel regress tests (was Re: FOREIGN KEY and shift/reduce) Vince Vielhaber <vev@michvhf.com>
Re: [HACKERS] Parallel regress tests (was Re: FOREIGN KEY and shift/reduce) Peter Eisentraut <e99re41@DoCS.UU.SE>
Re: [HACKERS] Parallel regress tests (was Re: FOREIGN KEY and wieck@debis.com (Jan Wieck)
Re: [HACKERS] Parallel regress tests (was Re: FOREIGN KEY and Peter Eisentraut <e99re41@DoCS.UU.SE>
Re: [HACKERS] Parallel regress tests (was Re: FOREIGN KEY and Tom Lane <tgl@sss.pgh.pa.us>
Re: [HACKERS] FOREIGN KEY and shift/reduce Tom Lane <tgl@sss.pgh.pa.us>
Re: [HACKERS] FOREIGN KEY and shift/reduce Bruce Momjian <pgman@candle.pha.pa.us>
Re: [HACKERS] FOREIGN KEY and shift/reduce Bruce Momjian <pgman@candle.pha.pa.us>
Re: [HACKERS] FOREIGN KEY and shift/reduce Tom Lane <tgl@sss.pgh.pa.us>
A view just stopped working out of the blue... Don Baccus <dhogaza@pacifier.com>
Re: [HACKERS] A view just stopped working out of the blue... wieck@debis.com (Jan Wieck)
Re: [HACKERS] FOREIGN KEY and shift/reduce Karel Zak - Zakkr <zakkr@zf.jcu.cz>
> -----Original Message-----
> From: owner-pgsql-hackers@postgreSQL.org
> [mailto:owner-pgsql-hackers@postgreSQL.org]On Behalf Of Jan Wieck
> 
> Hi,
> 
>     I  just  committed  a  patch that turns on FOREIGN KEY. Thus,
>     REFERENCES used in CREATE TABLE now automatically creates the
>     appropriate  constraint  triggers.  The  implementation  also
>     supports  omitting  the  PK   column   definition,   if   the
>     corresponding  columns  should  be  the  PRIMARY  KEY  of the
>     referenced table.
> 
>     Also I completed some more of the generic trigger procs.  For
>     MATCH  FULL,  the  key  existence check in PK table and these
>     actions are completed:
> 
>         ON DELETE RESTRICT
>         ON DELETE CASCADE
>         ON UPDATE RESTRICT
>         ON UPDATE CASCADE
>

Nice.
I tried a little.

< session 1 >
=> create table ri1 (id int4 primary key);NOTICE:  CREATE TABLE/PRIMARY KEY will create implicitindex 'ri1_pkey' for table 'ri1'CREATE
=> insert into ri1 values (1);INSERT 92940 1
=>create table ri2 (id int4 references ri1 match full on delete restrict); NOTICE:  CREATE TABLE will create implicit trigger(s) forFOREIGN KEY check(s)CREATE
=> begin;BEGIN
=> delete from ri1 where id=1;DELETE 1 

< session 2 >
=> insert into ri2 values (1);INSERT 92960 1

< session 1 >
=> commit;END
=> select * from ri1;id--(0 rows)
=> select * from ri2;id-- 1(1 row)

Is this a temporary behavior ?

Regards.

Hiroshi Inoue
Inoue@tpf.co.jp

В списке pgsql-hackers по дате отправления
От: Chris Ian Capon Fiel
Дата:
Сообщение: Postgresql in win9x
От: wieck@debis.com (Jan Wieck)
Дата:
FAQ