Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6116895
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T15:15:31+00:00 2026-05-23T15:15:31+00:00

Well now at my company we are switching from MySQL 5 to PostgreSQL 8.4

  • 0

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.

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:

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

While I use PHP PDO in the frontend, there are lots of queries that go like this SELECT * FROM Posts which worked fine in MySQL but in PostgreSQL they have to be eighter SELECT * FROM "Posts" or the tables after the migration should become with low case in PostgreSQL (then it would care for the double-quotes).

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).

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T15:15:32+00:00Added an answer on May 23, 2026 at 3:15 pm

    In the long run you’ll have a lot less frustration if you go to all lower case and underscores. The SQL spec says that if you don’t quote an identifier it gets folded to upper case. PostgreSQL does this but goes to lower case instead for readability. However, once you start quoting mixed case identifiers you have to keep on doing it.

    Note that you CAN use unquoted mixed case identifiers in your statements to hit all lowercase identifiers in the db. I.e. a db with table_name in it can be hit with select * from Table_Name which will fold to all lower case.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm a Java programmer, but knows PHP as well. Now I'm trying to enhance
Well, i took a break from RoR for studies, now I am back, I
I'm getting a little bit crazy right now. My company switched from VS2008 to
my company has recently upgraded from VS2005 to VS2010. We have a huge project
I have a PHP project is essentially an order processing website for a company.
The code below works well right now; however, it's serially executed. I'd like to
Well, now that I've finally got my stupid ODBC stuff configured, I took a
Well i have a web page hosted in a IIS 7.0 now the problem
Well I have been writing in the same style for awhile now and all
Well, i've walking around this for a couples of days now... I think is

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.