Subject Firebird 2.1.x and SUBSTRING
Author sboydlns
I ran into an interesting problem this morning. I upgraded a database from 1.5.x to 2.1.x and the SUBSTRING started returning a different result. I was using SUBSTRING to convert a blob to a VARCHAR like this:

SUBSTRING(blob from 1 for 1000)

In 1.5.x and 2.0.x this returns a VARCHAR(1000). In 2.1.x this returns another BLOB, which broke my application. I now have to do this:

CAST(SUBSTRING(blob from 1 for 1000) AS VARCHAR(1000))

One wonders why this was changed????