List, I read the documentation on postgres site (http://techdocs.postgres.sql) and then also the Google search and came up with this:
The way PostgreSQL usees stored procedures is like this: "A stored procedure is really a function" It just does more...like INSERT/UPDATE/DELETE, multiple DELETE or whatever. So to write them use a function but just call it "stored procedure" fancy... Heres some code that I've never tested or run before: CREATE FUNCTION putData (char, varchar, varchar) RETURNS int AS ' DECLARE x ALIAS FOR $1; y ALIAS FOR $2; z ALIAS FOR $3; BEGIN INSERT INTO tableA (colX, colY, colZ) VALUES (x, y, z); RETURN 1; END ' LANGUAGE 'plpgsql'; Good Luck David Busby wrote: > List, > I'm using a postgres datbase for my PHP project, how do I make > stored procedures? Or if no SPs then what would be recomendation for > building simple/reuseable "Put" and "Get" procedures for my data? > > /B > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php