Create Locales or change Template1 locale

385 views
Skip to first unread message

Oscar Serrano

unread,
Mar 20, 2017, 11:54:45 AM3/20/17
to Google Cloud SQL discuss
Hi,
I'm trying to create a new postgresql database, but I cannot use the spanish Location. I've tried this:
create database mydb with ENCODING = 'UTF-8' LC_CTYPE = 'es_ES' LC_COLLATE = 'es_ES';

But I get an error: invalid Locale Name es_ES
How do I create it?
I've tried this:

postgres=> create collation es (locale="es_ES.utf8");ERROR: could not create locale "es_ES.utf8": Success
As you can say, it says Success, but also I get the error.How should I proceed?
Thank you.

paynen

unread,
Mar 27, 2017, 5:22:12 PM3/27/17
to Google Cloud SQL discuss
Hey Oscar,

Thanks for this report. I've replicated your findings. I'm unsure at the moment what solution to offer. Could you explain more about your use-case, and why you can't just store UTF-8 data without setting any locale?

Cheers,

Nick
Cloud Platform Community Support

Oscar Serrano

unread,
Mar 28, 2017, 8:14:20 AM3/28/17
to google-cloud...@googlegroups.com
Hi Nick,
well, of course I pretend to use UTF8, but when sorting results (collation), it's not the same sorting in English than in Spanish.
For example, this set: Óscar, Peter, Angel, in english get sorted like this: Angel, Peter, Óscar. But in Spanish, the order would be: Angel, Óscar, Peter.
There are many languages which letters allow tildes, special accents, etc, that would need special locales?
Is it too complex to implement?

Thank you very much.

--
You received this message because you are subscribed to a topic in the Google Groups "Google Cloud SQL discuss" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-cloud-sql-discuss/mISMIL3PNFY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-cloud-sql-discuss+unsub...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-sql-discuss/396f11c6-1349-4510-83c8-a82f9dae81cf%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Vladimir Rusinov

unread,
Mar 28, 2017, 8:51:22 AM3/28/17
to google-cloud...@googlegroups.com
Unfortunately current release of CloudSQL for PostgreSQL does not include extra locales.
This is something we aware of. We should be able to include more locales in one of the next releases.

--
Vladimir Rusinov
PostgreSQL SRE, Google Ireland

Google Ireland Ltd.,Gordon House, Barrow Street, Dublin 4, Ireland
Registered in Dublin, Ireland
Registration Number: 368047

On Tue, Mar 28, 2017 at 1:13 PM, Oscar Serrano <oscar.serra...@gmail.com> wrote:
Hi Nick,
well, of course I pretend to use UTF8, but when sorting results (collation), it's not the same sorting in English than in Spanish.
For example, this set: Óscar, Peter, Angel, in english get sorted like this: Angel, Peter, Óscar. But in Spanish, the order would be: Angel, Óscar, Peter.
There are many languages which letters allow tildes, special accents, etc, that would need special locales?
Is it too complex to implement?

Thank you very much.
2017-03-27 23:22 GMT+02:00 'paynen' via Google Cloud SQL discuss <google-cloud-sql-discuss@googlegroups.com>:
Hey Oscar,

Thanks for this report. I've replicated your findings. I'm unsure at the moment what solution to offer. Could you explain more about your use-case, and why you can't just store UTF-8 data without setting any locale?

Cheers,

Nick
Cloud Platform Community Support

On Monday, March 20, 2017 at 11:54:45 AM UTC-4, Oscar Serrano wrote:
Hi,
I'm trying to create a new postgresql database, but I cannot use the spanish Location. I've tried this:
create database mydb with ENCODING = 'UTF-8' LC_CTYPE = 'es_ES' LC_COLLATE = 'es_ES';

But I get an error: invalid Locale Name es_ES
How do I create it?
I've tried this:

postgres=> create collation es (locale="es_ES.utf8");ERROR: could not create locale "es_ES.utf8": Success
As you can say, it says Success, but also I get the error.How should I proceed?
Thank you.

--
You received this message because you are subscribed to a topic in the Google Groups "Google Cloud SQL discuss" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-cloud-sql-discuss/mISMIL3PNFY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-cloud-sql-discuss+unsubscr...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Google Cloud SQL discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-sql-discuss+unsub...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-sql-discuss/CANX%3DucTm-QQMs-bmEohvwDtTgrM%2B%3D%2B4iX%3DW6dpqBPvPZPuCv%2Bg%40mail.gmail.com.

Ankush Agarwal

unread,
Mar 28, 2017, 9:10:20 AM3/28/17
to google-cloud...@googlegroups.com
Hey Oscar,

We are aware of the issue. We are planning to include support for a large set of collations soon. Release notes will be published here: https://cloud.google.com/sql/docs/postgres/release-notes

--
You received this message because you are subscribed to the Google Groups "Google Cloud SQL discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-sql-discuss+unsub...@googlegroups.com.



--
Ankush Agarwal

Software Engineer, Cloud SQL
 
There are 10 types of people in this world - those who understand binary and those who don't

Peter Müller

unread,
Dec 6, 2019, 8:47:42 AM12/6/19
to Google Cloud SQL discuss
Dear Team,

this issue is over 2 years old and I got still the equivalent error, when trying to create Databases with the gcloud CLI-Tool. In Docs is written, that one can use the Collation and Encoding options mentioned in postgres Docs. You even support the CLI Options for collation and enconding. (see here https://cloud.google.com/sql/docs/postgres/create-manage-databases#create)

Do I miss something? If not, is there a workaround?

Kind regards

Peter

Elliott (Google Cloud Platform Support)

unread,
Dec 6, 2019, 6:27:36 PM12/6/19
to Google Cloud SQL discuss
Hello Peter,

Although this forum is for discussing Google products and sharing opinions, I’ll do my best to assist you. 

What gcloud command with options are you using? I will need this to reproduce and confirm the behavior.

Reply all
Reply to author
Forward
0 new messages