What is the purpose of _field_sql_storage_columnname()? While reviewing a patch, I came across an interesting function, _field_sql_storage_columnname(). And I couldn't help but wondering, why on earth do we have this function?

git blame unfortunately wasn't helpful, as it only lead me to a commit that cleanup up windows line-endings.
I think it's clear what the function is doing, the question was more why a function is required for that.

My guess is that the function was there from very first day field API existed where it might have made sense to change it. Nowadays, it's not going to be as easy as "just" changing that function, because it will obviously completely break all existing field tables.

I think the function is still useful for consistency reasons as there is one for the table name as well and I think it's also easier to read because it implies the string is the column name, which might not be that obvious if you e.g have a line like this:

$sql_field = "$table_alias." . _field_sql_storage_columnname($field['field_name'], $specifier['column']);
// vs.
$sql_field = "$table_alias." . $field['field_name'] . '_' . $specifier['column'];