From: Bert T. <bt...@br...> - 2014-02-24 12:58:16
|
> At some point I think this might break on older versions, either > without inout params and that field is missing (maybe?) or the lack of > array_agg built in, which iirc is pre 8.4. So, I pushed the existing > getFunction code back to Postgres83.php before making your > modifications in Postgres.php Sounds good to me! > this is a little weird, because afaict OUT parameters never get > display (they are just dumped to the returns box), although INOUT are. I don't understand you. It is not dumped to the returns box, but in the "Arguments" box. > This make me wonder what we would see with v or t style functions > (didn't have any handy to test on, do you have any?) I think this > could probably use more work to make RETURNS section display OUT with > param name. (Not a show stopper, but you should look into it). I cannot think of a reason why it wouldn't work for v or t style functions, but we didn't try. VARIADIC functions are rare IMO and I had never heard of functions with TABLE parameters before. > > Also, if you have functions with multiple variables, but no named > parameters, you end up with things like > Notice: Undefined offset: 1 in > /Users/robert/devel/phppgadmin/phppgadmin/functions.php on line 267 > > So I wrapped the switch in an isset call. That sounds good! BTW, we never use unnamed arguments anymore, so I simply didn't check that. The patch is intended to scratch a nasty itch for ourselves, not to fix any bugs that may exist in other situations. > You can view the current version of the patch on my gtihub at > https://github.com/xzilla/phppgadmin/commit/8ebf7562291f7018dedfa1ebb47290bb77b86087 > > Feel free to check out from my repo if you want to test it. It'd be > nice to fix up the named parameters on OUT/returns stuff, but > otherwise I think it's pretty much ready (although if anyone has pre > 9.3 versions of postgres handy for testing, it'd be nice to verify > this works there as well) How do I check out from your repo? There is an error in the patch I suggested. In doProperties the variable is named funcdata instead of fndata. This is wrong on the new line number 256 based on the webpage you refer above. Effect is that the properties show the wrong (number of) parameters. Simply changing fndata to funcdata solves this. Regards, Bert |