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 6216921
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T07:20:05+00:00 2026-05-24T07:20:05+00:00

In MySQL it is possible to include MySQL-specific SQL-statements within generic/standard SQL by using

  • 0

In MySQL it is possible to include MySQL-specific SQL-statements within generic/standard SQL by using a specific comment syntax such as follows:

INSERT /*! DELAYED */ INTO foo VALUES (1, 2, 3);

This is described at http://dev.mysql.com/doc/refman/5.1/en/comments.html.

Is there any equivalent syntax or hack which could be used with PostgreSQL to embed PostgreSQL-specific statements in the same file?

I would like to make my application portable on both platforms but in some cases I can not find a generic way of doing things and need to do DB specific things. For example putting an automagically incremented column in a table is completely different on these DB engines but most other parts of the DB schema are exactly the same and can be shared. Thus I would rather include just a single create-the-database.sql file in the distribution as it is easier to maintain and feels neater.

  • 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-24T07:20:06+00:00Added an answer on May 24, 2026 at 7:20 am

    My first thought is that I would include a preprocessing step when compiling your code which could then generate a middle tier for each database separately. You could then distribute whichever one was to be used or alternatively have a setting in the application to allow it to switch between the two.

    You would need to have separate testing for each platform, but I would expect that anyway.

    The preprocessor could be as simple as an intelligent search and replace or it could be more complex.

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

Sidebar

Related Questions

Is it possible to INCLUDE other mysql scripts in a composite script? Ideally I
I left this question as generic as possible, but I do have a specific
Possible Duplicate: Editing MySQL recode using a HTML form Like to know how to
The MySQL documents state in section 11.5.3 that, despite what the SQL standard may
Is it possible to create a MySQL select statement that uses an expression as
Is it possible to directly access MySql databases through an Adobe AIR/Flex application? If
Is it possible to restore a MySQL database from the physical database files. I
Is it possible to check if a (MySQL) database exists after having made a
Is it possible to let MySQL LIMIT have an offset of the total number
Is it possible to rename a MySQL table? If so, how?

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.