child/parent creation
От | Dennis Gearon |
---|---|
Тема | child/parent creation |
Дата | |
Msg-id | 42422.64675.qm@web82105.mail.mud.yahoo.com обсуждение исходный текст |
Ответы |
Re: child/parent creation
Re: child/parent creation |
Список | pgsql-general |
Is it possible to create a complex schema object in one transaction, using prepared statements to protect(somewaht) againstSQL injection? Example: A 'family tree object' (having obvious relationships) consisting of: Table grandparent Table parent table childA table childB If I have all the information for each 'sub-object' in the 'family tree object', but of course, the primary, integer, sequencekeys. So, using a script language, the procedure I'm doing now is creating one node, getting the id with another query (becauseof a (reported and actual) bug in the Doctrine ORM), and then creating the next level down. My application has nothing to do with family trees, actually, just an example. each of the (relevant) primary keys is a BIGSERIL, sequence backed, BIGINT. Can the whole three level, 4 member hierarchy be created in one, prepared statement(to avoid SQL injection), transactionwithout shuttling any information back and forth between the database and the calling script? Thanks in advance. Dennis Gearon Signature Warning ---------------- EARTH has a Right To Life, otherwise we all die. Read 'Hot, Flat, and Crowded' Laugh at http://www.yert.com/film.php
В списке pgsql-general по дате отправления: