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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T09:46:08+00:00 2026-05-19T09:46:08+00:00

I am getting this error, but I’m not entirely sure how to write this

  • 0

I am getting this error, but I’m not entirely sure how to write this so that it satisfies postgresql ..

ActionView::Template::Error (PGError: ERROR:  operator does not exist: character varying == unknown
LINE 1: ...ed_at > '2011-01-19 16:05:18.738413' AND category == 'humor'...
                                                             ^
HINT:  No operator matches the given name and argument type(s). You might need to add explicit type casts.
: SELECT     "posts".* FROM       "posts"  WHERE     (created_at > '2011-01-19 16:05:18.738413' AND category == 'humor')):
    77:             - for category in @categories
    78:               %li
    79:                 .new_posts
    80:                   - if current_user && !current_user.last_logins.select{|ll|ll.category_id == category.id}.empty? && Post.find(:all, :conditions => ["created_at > ? AND category == ?", current_user.last_logins.find_by_category_id(category).updated_at, category.name]).size > 0

I apologize if this is vague, but I’m not sure I understand it myself.

I think what’s happening is its comparing a varchar to an integer? Being that I can’t reasonably chance my sql tables around, is there a way to bypass this?

  • 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-19T09:46:09+00:00Added an answer on May 19, 2026 at 9:46 am

    You probably wanted to use a single equals (=). Unfortunately in SQL land, = is the test for equality, not ==.

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

Sidebar

Related Questions

I'm getting this error on Heroku but not locally (using PostgreSQL on both).. error
I keep getting this error on Heroku but not locally. any idea why that
I'm not sure why I'm getting this error, but shouldn't this code compile, since
I've been getting this error on my MediaWiki installation, but I'm not sure it's
I am getting this error, but it isn't very helpful in that it doesn't
I am getting this error in all of my classes but I am not
I'm following the provided instructions but is not working. I'm getting this error: INFO:
I am getting this error mysql is not running but lock exist when I
I am trying to install websvn but I am getting this error. Warning: proc_open()
I'm doing a Firefox addon but I'm currently getting this error in the Error

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.