DB_Table and Oracle Support

I want to make DB_Table work with everything, everywhere, all the time, the same way, so that you don’t have to use extra function t0 massage your SQL queries and the data you use in them; that way, you can make your DB_Table-based application completely portable without having to think about it too much. This is necessarily a lowest-common-denominator approach, and so far it seems to have worked passably well. The biggest problem, until yesterday, was that PostgreSQL won’t allow you to have a table with indentical field names and index names (easy solution: append index names with “_index” automatically).

However, Alex Höbart informs me (among other things) that Oracle has a strict limit on the length of table, field, index, and sequence names: 30 characters, maximum. This is a problem, becuase many other databases seem to allow at least twice that length (e.g.: MySQL allows 64 chars, Microsoft SQL allows 128, and SQLite has no limitation).

If it turns out that at least one other RDBMS has a similar limitation, then I can in good conscience make that limitation universal in DB_Table. If not, I will be faced with the hard choice of either dropping Oracle support (awful!) or at least adding a “strict check” flag so that DB_Table classes will know to use the 30-character limit (not as awful, but still bad, and not really what I want to do).

Anybody out there know if the Frontbase and PostgreSQL have 30-character (or similar) length limits for names of tables, indexes, fields, and sequences?

Update (11:01): It appears PostgreSQL has a default limit of 31 chars.

Are you stuck with a legacy PHP application? You should buy my book because it gives you a step-by-step guide to improving your codebase, all while keeping it running the whole time.
Share This!Share on Google+Share on FacebookTweet about this on TwitterShare on RedditShare on LinkedIn

One thought on “DB_Table and Oracle Support

  1. Please can you put the full content of your items into the RSS feed? I do most of my blog reading through various planets, and it’s annoying to have to click through to the rest of the item when it’s not really that long.

Leave a Reply

Your email address will not be published. Required fields are marked *