Re: Differences in Unicode handling on Mac vs Linux?

From: Matt Daw <matt(at)shotgunsoftware(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Differences in Unicode handling on Mac vs Linux?
Date: 2013-06-02 20:48:24
Message-ID: CAA2LLOGGsVc9r3TDKsnhJ36nh+ChCmr2JEdBOkrHYDKDnXnB5g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

> Hm ... what does "\d shots" say about the spelling of the column name?

\d shots is the same on both systems:

sg_poznÁmka | text
|

> OS X's Unicode locales are pretty crummy. I'm suspicious that there's
> some sort of case-folding inconsistency here, but it's hard to say more
> (especially since you didn't actually tell us *which* locales you've
> selected on each machine). If it is that, as a short-term fix it might
> help to double-quote the column name.

The locales are set to "en_US.UTF-8" and encodings to "UTF8". Double
quoting does solve the column case, but it's not helping with the
Rails generated:

SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull
FROM pg_attribute a LEFT JOIN pg_attrdef d
ON a.attrelid = d.adrelid AND a.attnum = d.adnum
WHERE a.attrelid =
'asset_sg_kdo_dělá____assigned_to__connections'::regclass
AND a.attnum > 0 AND NOT a.attisdropped
ORDER BY a.attnum

... that produces:

ERROR: relation "asset_sg_kdo_d�l�____assigned_to__connections" does not exist

\d produces:

public | asset_sg_kdo_dělá____assigned_to__connections
| table | matt

For the short term, I think I'll boot up a Linux VM to troubleshoot my
production bug... but I'll submit a bug report with repro steps.

Thanks Tom!

Matt

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Ian Lawrence Barwick 2013-06-02 21:05:05 Re: Differences in Unicode handling on Mac vs Linux?
Previous Message Tom Lane 2013-06-02 20:22:48 Re: Differences in Unicode handling on Mac vs Linux?