Hello fellow monks,
I'm trying to append some text to a column in a database table, in a way that's straightforward and atomic. Basically I want to say:
UPDATE table SET item = append(item,'new text\r\n')
The database is currently Microsoft SQL Server, and the data type of this column is Text (basically a BLOB of text, as compared to a string). Ideally I'd like something portable, but I'll take what I can get.
We're writing into a database used by a proprietary application, so I can't make any changes to the table structure.
Currently I'm reading the column, appending the text, then writing it back out. This works, but is ugly, and prone to race conditions.