Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Wrong string escape format for PostgrrSQL #40

Open
tuscland opened this issue Jan 7, 2015 · 3 comments
Open

Wrong string escape format for PostgrrSQL #40

tuscland opened this issue Jan 7, 2015 · 3 comments

Comments

@tuscland
Copy link

tuscland commented Jan 7, 2015

Hello,

I am using the country.postgresql.sql file located at https://raw.githubusercontent.com/umpirsky/country-list/master/country/cldr/en/country.postgresql.sql.

Doing psql -f country.postgresql.sql does not work because of the way "People's Democratic Republic of Yemen" is escaped. The escape sequence should be doubling the single-quote character ''.

I wonder if this is expected, just thought I'd let you know.

Thanks!
Cam

@umpirsky
Copy link
Owner

umpirsky commented Jan 8, 2015

@tuscland Oh, this is a bug in deed. Thanks for reposting! 👍

@EvanCarroll
Copy link

Also, Postgresql should not use VARCHAR(64), but text. This is the convention in PG. VARCHAR is imposing a restriction that isn't needed.

@EvanCarroll
Copy link

EvanCarroll commented May 22, 2016

If I could advise one more thing... In postgresql this is much better done as with a schema..

CREATE SCHEMA country_code;
CREATE TABLE country_code.en_US (country_code, country_name)...

Actually, the whole thing is much better done in one table... umprisky.country_codes(locale, abbreviation, expanded_name).. and so on, I'd rather one file, and get everything in a sane prebuilt setup

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants