Are PostgreSQL column names case-sensitive?

I have a db table say, persons in Postgres handed down by another team that has a column name say, “first_Name”. Now am trying to use PG commander to query this table on this column-name. select * from persons where first_Name=”xyz”; And it just returns ERROR: column “first_Name” does not exist Not sure if I … Read more

Case-insensitive search in Rails model

My product model contains some items Product.first => #<Product id: 10, name: “Blue jeans” > I’m now importing some product parameters from another dataset, but there are inconsistencies in the spelling of the names. For instance, in the other dataset, Blue jeans could be spelled Blue Jeans. I wanted to Product.find_or_create_by_name(“Blue Jeans”), but this will … Read more

How can I do a case insensitive string comparison?

How can I make the line below case insensitive? drUser[“Enrolled”] = (enrolledUsers.FindIndex(x => x.Username == (string)drUser[“Username”]) != -1); I was given some advice earlier today that suggested I use: x.Username.Equals((string)drUser[“Username”], StringComparison.OrdinalIgnoreCase))); the trouble is I can’t get this to work, I’ve tried the line below, this compiles but returns the wrong results, it returns enrolled … Read more

Case-insensitive search

I’m trying to get a case-insensitive search with two strings in JavaScript working. Normally it would be like this: var string=”Stackoverflow is the BEST”; var result= string.search(/best/i); alert(result); The /i flag would be for case-insensitive. But I need to search for a second string; without the flag it works perfect: var string=”Stackoverflow is the BEST”; … Read more