Skip site navigation (1) Skip section navigation (2)

executing a dml within a utility

From: "Ehab Galal" <ehabgalal123(at)hotmail(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: executing a dml within a utility
Date: 2006-12-21 20:47:39
Message-ID: BAY24-F2817B6A3DD0CBD8085838A96CE0@phx.gbl (view raw or flat)
Thread:
Lists: pgsql-hackers
I created a CMD_UTILITY, which upon being executed by the user should do the 
following atomically:
1- drops a table
2- deletes from another table all rows with a certain criterion: "DELETE 
FROM pg_t1 WHERE att = val"
3- deletes from a third table all rows with a certain criterion: "DELETE 
FROM pg_t2 WHERE att = val"

I do the first step using ProcessUtility(). How can i do the 2nd/3rd steps? 
Any suggestions?

I tried calling exec_simple_query() but this didn't work. I am getting an 
error "cannot drop active portal"


Thanks a lot,
ehab

_________________________________________________________________
Find sales, coupons, and free shipping, all in one place! MSN Shopping 
Sales & Deals 
http://shopping.msn.com/content/shp/?ctid=198,ptnrid=176,ptnrdata=200639


Responses

pgsql-hackers by date

Next:From: Alvaro HerreraDate: 2006-12-21 21:13:32
Subject: Re: executing a dml within a utility
Previous:From: Peter EisentrautDate: 2006-12-21 19:26:22
Subject: Re: [COMMITTERS] pgsql: Initial SQL/XML support: xml data type and initial set of

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group