insert two tables taking serial from table1

Поиск
Список
Период
Сортировка
Искать
От
Jim (s/nosp@m/@/ to reply)
Тема
insert two tables taking serial from table1
Дата
Msg-id
rq7l9.472105$_91.685798@rwcrnsc51.ops.asp.att.net
Список
Дерево обсуждения
insert two tables taking serial from table1 "Jim (s/nosp@m/@/ to reply)" <user725nosp@marpadeck.com>
Re: insert two tables taking serial from table1 Tino Wildenhain <tino@wildenhain.de>
I've been looking around for a way to set up an insert to table 1 then take
the serial from table 1 that autoincrimented and add it to table 2. I've
seen ways people have done it by grabbing last row of the table but I am
concerned about a connection that doesn't need to add to table 2 inserting
into the last table  before table 1 can be queried. and thus getting the
relation to the wrong row. Is there a way to get the oid from the insert?
using php incase that helps.


thought about doing an exact search on what was just inserted but table has
possibility of users adding exactly the same data. have thought about
combining the tables but don't want an overgrown table with more rows then I
can maneuver through.

thanks in advance for any help.
Jim


В списке pgsql-general по дате отправления
От: Mikael Paul
Дата:
Сообщение: list of error code
От: Peter Kovacs
Дата:
FAQ