Re: Custom Domain; migration from 8.4 to 9.1 and COLLATE - Mailing list pgsql-general

From Evan Carroll
Subject Re: Custom Domain; migration from 8.4 to 9.1 and COLLATE
Date
Msg-id CAAiePB7HSQKi38mKSb83nzf8QgWFySFGysrM87KPcQiCiWG4Tg@mail.gmail.com
Whole thread Raw
In response to Re: Custom Domain; migration from 8.4 to 9.1 and COLLATE  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Custom Domain; migration from 8.4 to 9.1 and COLLATE
List pgsql-general
> Could we see the complete context for this?

Sure.
dealermade=# CREATE OR REPLACE TEMP VIEW chrome_vinmatch_best_match AS
dealermade-#         SELECT DISTINCT ON (v.vin) v.vin, vd.*
dealermade-#         FROM inventory.view_in_stock_vehicles AS v
dealermade-#         JOIN chrome_vinmatch.view_vin_decode AS vd
dealermade-#                 ON substring(v.vin FROM 0 FOR 9) =
substring(vd.pattern FROM 0 FOR 9)
dealermade-#                 AND v.vin LIKE vd.pattern
dealermade-#         ORDER BY vin, length(pattern) DESC
dealermade-# ;
ERROR:  no collation was derived for column "vin" with collatable type citext
HINT:  Use the COLLATE clause to set the collation explicitly.

v.vin is the column with the custom DOMAIN.

--
Evan Carroll - me@evancarroll.com
System Lord of the Internets
web: http://www.evancarroll.com
ph: 281.901.0011

pgsql-general by date:

Previous
From: Andy Colson
Date:
Subject: Re: Multiple COPY statements
Next
From: Tom Lane
Date:
Subject: Re: Custom Domain; migration from 8.4 to 9.1 and COLLATE