Tom Lane wrote:
Andrew Dunstan <[EMAIL PROTECTED]> writes:
We can and possibly should change the GETARG call, but the varlena types are structurally equivalent, so it's not a mortal sin being committed here.

We *definitely* should change it --- the reason for having all those
variant macros in the first place was to help document the argument
types of V1 functions.  It's too bad the compiler doesn't warn about
the type mismatch here ...


I have changed it. The thing is, though, that this function not only performs the convert() function but acts as the engine for convert_to() and convert_from(). Those functions do some silent transformations, in one case passing a text Datum as the first argument and in the other case the returning the result as text. If there's a better way to do this I'll be happy to learn, but it seems to me it would involve some duplication - I tried to avoid that where possible.

Maybe I should just put a note in the code saying what we're doing, and why it's OK.



---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?


Reply via email to