>List, > I'm creating a PHP/pgSQL web site...I need to execute queries with a >cursor and get their result set into my PHP script. How can I make a >pgSQL procedure with logic that also returns a result set? I've >searched and searched but cannot find the answer. Does anyone got it?
Any old select will return a result set that works with a query... But if you need your PostgreSQL FUNCTION to return a result set, I *think* you need to use: 'set of XXX' for the 'rettype' (return type) and I *THINK* you can figure out what to use for XXX if you start digging to find the name/oid of the "complex type" that represents a row in your table here: http://www.postgresql.org/idocs/index.php?catalog-pg-type.html I've never done this, I just did a little digging right now, and this is where I would keep digging if I was working on this... But it sounds to me like PostgreSQL already *has* a "complex type" to represent the tuples in your table, and you just need to find out what the name of that "complex type" might be. It may even turn out to be just the table name or something... -- Like Music? http://l-i-e.com/artists.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php