| От | Tony Grant |
|---|---|
| Тема | inserting data into multiple tables |
| Дата | |
| Msg-id | 1003154293.4911.62.camel@tonux обсуждение исходный текст |
| Ответы |
Re: inserting data into multiple tables
|
| Список | pgsql-general |
Hello,
I have a table "refers_to"
individual_id int4
book_id int4
and another "individual"
individual_id int4 nextval('individual_serial')
name varchar
forename varchar
If the individual exists then get his id. If he doesn't allready exist
write his names to the table and get the newly created individual_id.
Then I though of using a function to write the book_id and the
individual_id to refers_to.
QUESTIONS
I am using JSP so the ideal seems to be stored functions in pl/pgsql?
What is the best order to do this in order to prevent a performance hit?
TIA
Tony Grant
--
RedHat Linux on Sony Vaio C1XD/S
http://www.animaproductions.com/linux2.html
Macromedia UltraDev with PostgreSQL
http://www.animaproductions.com/ultra.html
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера