0

I have 2 PostgreSQL databases. The first one is version 9.1, and the second is version 9.3. They are configured the same way (including setting standard_conforming_strings=off). The following query returns one result on the version 9.1 database but returns nothing when run on the 9.3 database. Why?

select 'WORKS' where 'test.123' < 'test/';

Kristján
  • 18,165
  • 5
  • 50
  • 62
Mark.ewd
  • 694
  • 1
  • 8
  • 22

1 Answers1

1

Your databases may have different collation settings, which affects sort order. Check your collation with:

select datname, datcollate from pg_database;

If that's the case, you'll need to drop and recreate your 9.3 database with a collation matching your 9.1 copy.

Kristján
  • 18,165
  • 5
  • 50
  • 62
  • Thanks. IT creates databases with a scripted install so I was assuming that this couldn't be the case. Well, thanks again. – Mark.ewd Jan 05 '16 at 01:06