Re: [SQL] instead of trigger in pg

2005-12-28 Thread Jaime Casanova
On 12/28/05, J Crypter <[EMAIL PROTECTED]> wrote: > Hi, > > I would like to implement a 1:n relation between two > tables. > An auto-generated number should be used as primary key > which connects both tables. > Example: > > table 1: > name | number (prim_key) > > table 2: > country | number_table1

[SQL] instead of trigger in pg

2005-12-28 Thread J Crypter
Hi, I would like to implement a 1:n relation between two tables. An auto-generated number should be used as primary key which connects both tables. Example: table 1: name | number (prim_key) table 2: country | number_table1 (foreign key) View: number_table1 | name | country I would like to