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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T11:03:38+00:00 2026-05-26T11:03:38+00:00

I have this MySQL query, and it works on a MySQL database, but not

  • 0

I have this MySQL query, and it works on a MySQL database, but not on a PostgreSQL one:

select setype from _entity where id='72@78|' 

Now, what exactly is '72@78|' trying to do? id is an integer field, so when the query is run on a Postgressql DB, it gives an invalid input syntax for integer: "72@78|" error.

I know that | is a bitwise OR operator, but what exactly is being ORED here? And, just as importantly, what is the @ for? I tried to look for it in the MySQL manual, but due to sub-par searching skills, I couldn’t find it.

When I run the above query on a MySQL DB, it finds data with an id value of 72,somehow, the expression evaluates to the first number.

So, what is the above query trying to do, and how do I convert it into a PostgreSQL equivalent?

Thanks for all your help, have a good day.

  • 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-26T11:03:39+00:00Added an answer on May 26, 2026 at 11:03 am

    MySQL is converting the text string to a numeric, and ignoring anything after the first non-numeric character, therefore, it is just comparing id = 72, which is what you are getting from the output.

    My guess is that PostgreSQL is trying to convert the whole string to an integer and failing because it isn’t a valid integer value.

    To do the equivalent in PostgreSQL, you would need to convert the 72@78| to a simple integer before running your query.

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

Sidebar

Related Questions

I have this simple query that works on all other database systems, but fails
I have this query which works correctly in MySQL. More background on it here
I have a feeling I am completely borking this MySQL query but I'll ask
I have a MySQL query like this: SELECT *, SUM(...some SQL removed for brevety)
I have a MySQL query like this: SELECT DAYNAME(CreatedAt) AS TheDay, SUM(Amount) AS TheSum
Background: I have this with rollup query defined in MySQL: SELECT case TRIM(company) when
I need to have MySQL query like this one: UPDATE table_name SET 1 =
say I have this $result = mysql_query('SELECT views FROM post ORDER BY views ASC');
So i have this script: <?php $query = mysql_query( SELECT meetup AS text, id
I have a query like this (Mysql 5.X, PHP - formatted for legibility) $query

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.