title: MySQL 5 to PostgreSQL 8.4, case sensitive convention, should I keep it with PostgreSQL
body: <p>Well now at my company we are switching from MySQL 5 to PostgreSQL 8.4 because the front-end of the project is PHP but the server part is LISP which has problems with MySQL prepared statements. </p>
  
  <p>This was just one of the reasons, and is out of my control so long story short currently we have a db with just about a dozen of tables that have to be migrated. The thing is in MySQL we used a case-sensitive sql convention like this:</p>
  
  <p>All tables are plural, all the columns are prefixed with the table name (not plural) and words are separated by upper-case like this:
  Table Posts, columns PostID, UserID, PostTitle, PostContent, PostUpdated, PostCreated etc</p>
  
  <p>While I use PHP PDO in the frontend, there are lots of queries that go like this <code>SELECT * FROM Posts</code> which worked fine in MySQL but in PostgreSQL they have to be eighter <code>SELECT * FROM "Posts"</code> or the tables after the migration should become with low case in PostgreSQL (then it would care for the double-quotes). </p>
  
  <p>Both solutions suck so I would be happy with a third one (like finding a way to be able to keep quering the tables like before and it still work in PostgreSQL) or something else. But if that is not possible I would appreciate an advice how to do it from here - eg keep creating tables to be case sensitive and the query the db with double quotes around table and column names and change the current queries or change the naming convention to lower case and start using underscore as a separator between words like post_title, post_content and modify all the current queries. Its most important to be the better thing to do in the long run as this will be last such change (the project grows). </p>