10.08.2020 19:28, Alex Peshkoff via Firebird-devel wrote:
On 2020-08-10 18:57, Mark Rotteveel wrote:
On 10-08-2020 17:17, Vlad Khorsun wrote:
   Same function returning different types depending on input argument - very 
bad idea,
I think.

Not always. For example - ENCRYPT/DECRYPT may return blob or string value depending upon input datatype and I see nothing bad with this.

  To be honest - I don't like it too. I see some rationale in it, however.
But... how ENCRYPT(:param ...) is prepared ?  I.e. what datatype is assigned
to the "param" and why ?

But what about particular HASH() - here return type will depend not upon input type but upon additional parameter, and I agree - that's rather artificial.

  Exactly !

...

To summarize - I withdraw my initial agreement to add CRC32 calculation to function HASH(). The only argument for this is same name in plain english for different purpose things.

  Very good, thanks.

Regards,
Vlad



Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to