Hello.
Before SERIAL type appeared I used INTEGER, so it was easy
to add instance which is stored not in one table. Now when I
have a primary key of SERIAL type I do not know how to add
data to multiple tables (and even to one table too :)
For instance I have:
create table companies(
id serial primary key,
...
);
create table ccats(
cid integer not null references companies(id),
catid integer not null references categories(id)
);
What do I have to put instead of ??:
insert into companies values (??, ...);
insert into ccats (??, 5);
...
insert into ccats (??, 7);
Andrey.