At 3:28 AM +0100 1/7/08, Zbigniew Baniewski wrote:
I think, that it sometimes could be useful as secondary protection: a
feature (perhaps another "pragma"?), which will cause stripping the spaces
from beginning and end of every inserted string. But perhaps even not just
only as "secondary"?

Yes, usually it's done at application level; I was wondering lately, why not
"from the other end"? Seems to not be that difficult to implement. In fact,
almost always we want to insert into database the strings with no spaces at
beginning, neither at the end - so perhaps adding a possibility to set such
behaviour (using "pragma") as "default" seems to be logical?

What do you think?

I think that this would be a horrible thing if it were the default behaviour. A database needs to by default store and retrieve data pristine , so that people get out what they put in, not something else. Leading/trailing spaces *are* significant for character strings, eg, 'foo ' is not supposed to equal 'foo'. Better for for any changes to the data in the DBMS to be explicit, like by using an explicit trim() function at the appropriate times, or implementing a trigger routine or stored procedure that handles it. Or if you really have to have the pragma, it needs to be off by default. -- Darren Duncan

-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------

Reply via email to