Maximum MIME type length when storing the type in a database

According to RFC 4288 “Media Type Specifications and Registration Procedures”, type (eg. “application”) and subtype (eg “vnd…”) both can be max 127 characters. So including the slash, the maximum length is 255. Edit: Meanwhile, that document has been obsoleted by RFC 6838, which does not alter the maximum size but adds a remark: Also note … Read more

SQL Server Automated Backups [closed]

If you are using SQL Server Express, you won’t find a UI to run periodic backups. In this case you have to run a batch using Windows Scheduled Tasks or something similar. Don’t forget to use a user with enough privileges to access SQL Server. In the batch file “C:\Program Files\Microsoft SQL Server\100\Tools\Binn\SQLCMD.EXE” -S (local)\SQLExpress … Read more

Core Data: Error, “Can’t Merge Models With Two Different Entities Named ‘foo’ “

For those who come across this question after trying to use core data lightweight migrations: I was having this issue even after following the instructions for creating a new version of my data model. I noticed that there were two “.mom” files in my application bundle, one “.mom” and one “.momd” directory that contained “.mom” … Read more

single fixed table with multiple columns vs flexible abstract tables

Certain issues need to be clarified and resolved before we can enter into a reasonable discussion. Pre-requisite Resolution Labels In a profession that demands precision, it is important that we use precise labels, to avoid confusion, and so that we can communicate without having to use long-winded descriptions and qualifiers. What you have posted as … Read more

Sqlite and Python — return a dictionary using fetchone()?

There is actually an option for this in sqlite3. Change the row_factory member of the connection object to sqlite3.Row: conn = sqlite3.connect(‘db’, row_factory=sqlite3.Row) or conn.row_factory = sqlite3.Row This will allow you to access row elements by name–dictionary-style–or by index. This is much more efficient than creating your own work-around.

LISTEN/NOTIFY using pg_notify(text, text) in PostgreSQL

I have discussed this on the PostgreSQL mailing list ( and was informed on the reasoning for the behavior. Their answer is that “ have to double quote relnames (listen “Test”). if you want the server not to case fold them. pg_notify takes a string, not a relname, which uses different rules.” (Thanks Merlin and … Read more