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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T22:50:46+00:00 2026-06-14T22:50:46+00:00

I ran a SQL query using the dataclips feature on Heroku. It works great

  • 0

I ran a SQL query using the dataclips feature on Heroku. It works great – the results I get are in the correct order, because part of my clause specifies “ORDER BY …”.

I just pulled a copy of my database from Heroku. I then run ActiveRecord::Base.connection.execute “”

The data I get is correct, but the PGResult object has the data ordered in a completely random way — i.e. my “order by” clause is totally ignored.

I am wondering why that is happening and if there is anyway to prevent that.

  • 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-06-14T22:50:47+00:00Added an answer on June 14, 2026 at 10:50 pm

    We are now using the same version of Postgres as Heroku and we get the same dataset. It is, however, not correctly ordered still. The order by clause is still not working properly so we are just forcing a sort using rails (since we limit the result by 10, its not a lot of work for Rails).

    I’m posting this because no one seems to have a good answer and we haven’t found anything that works either. Might as well let other folks know that for some reason, there seems to be an issue. Going to dig around a bit and potentially report a bug to postgresql folks.

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

Sidebar

Related Questions

I ran a query on a MS SQL database using SQL Server Management Studio,
I ran this sql query in my database: update payments set method = 'paysafecard'
I just ran into a SQL query with about 5 different columns in the
When using Dapper-dot-net, if your querying to a strongly typed results, and your SQL
I'm just started using SQL and ran into a problem. In my database, I
I ran a MySQL query from command line using the following: nohup mysql --user=root
We ran into strange sql / linq behaviour today: We used to use a
I ran across a problem with a SQL statement today that I was able
I ran into a problem using Springsource Tool Suite when writing some groovy scripts
When i ran the below queries it's failing in the second query becuase prev_test_ref1

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.