As I proposed on wp-hackers, it would be great to have a general meta table.
There are at least a couple of benefits to such a table:
- We could have meta-data for comments and categories.
Others have proposed meta tables for the comments (e.g. #5153 and #2659); rather than
adding meta tables seriatim, a general meta-data table would meet that
need and offer the possibility of actually reducing the total number
of tables.
- It would provide a better place for plugins to store data.
Currently, most plugins---when they don't have enough data to justify
creating their own table---store data in the options table. I think
there are disadvantages to bloating the options table, one of which is
that WP loads almost all options into the object cache.
My attached patch includes the code necessary get such a table working in WP (aside from decrementing the db_version), and I've tested each of the get_general_meta, update_general_meta, and delete_general_meta functions successfully.
By the way, update_meta and delete_meta would have been cleaner names, but they're already taken for admin post meta stuff.