> 4) Create a mechanism for specifying default TRANSFORMs for a PL, and > essentially "solve" these issues by supplying a built-in transform. > > I think default transforms (4) are worth doing no matter what. Having to > manually remember to add potentially multiple TRANSFORMs is a PITA. But I'm > not sure TRANSFORMS would actually fix all issues. For example, you can't > specify a transform for an array type, so this probably wouldn't work for > one of the plpython problems. > > > yesterday, I wrote some doc about TRANSFORMS - and it is not possible. The transformation cannot be transparent for PL function - because you have to have information, what is your parameters inside function, and if these parameters are original or transformed. This is not a issue for "smart" object types, but generally it should not be ensured for basic types. So default transformation is not a good idea. You can have a transform for C language and it is really different from Python.
Maybe concept of TRANSFORMs too general and some specific PL extension's can be better. It needs some concept of persistent options, that can be used in these extension. CREATE OR REPLACE FUNCTION .... LANGUAGE plpython WITH OPTIONS ('transform_dictionary', ...) The execution should be stopped if any option will not be processed. With these extensions you can do anything and It can works (I hope). But the complexity of our PL will be significantly higher. And then Tom's proposal can be better. It can help with faster adoption of new features and it is relative simple solution. Regards Pavel