Search Postgresql Archives

child/parent creation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Is it possible to create a complex schema object in one transaction, using prepared statements to protect(somewaht) against SQL 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, sequence keys.

So, using a script language, the procedure I'm doing now is creating one node, getting the id with another query (because of 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), transaction without 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


-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux