New issue

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

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

Already on GitHub? Sign in to your account

Scaffolded PostgreSQL configuration #982

Closed
j-a-m-l opened this Issue Apr 28, 2015 · 5 comments

Comments

Projects
None yet
3 participants
@j-a-m-l

j-a-m-l commented Apr 28, 2015

The scaffolded settings.yml has capitalized user and database names (at least with a project name like "Example").
As PG converts them to lower case, it fails to start with yesod devel.

I have check that it works creating the db and user with lower case, and adapting the settings.yml to that, and I have also verified that it is possible to use capitalized or upper case names inside quotes on both places.

Source: http://stackoverflow.com/questions/9538668/postgresql-forces-lowercase-names

So I think that Yesod should generate lower case names or wrap them with quotes.

@snoyberg

This comment has been minimized.

Show comment
Hide comment
@snoyberg
Member

snoyberg commented Apr 28, 2015

@MaxGabriel

This comment has been minimized.

Show comment
Hide comment
@MaxGabriel

MaxGabriel Apr 28, 2015

Member

Making the database name/username all lowercase seems like a good default; it doesn't seem to have much downside to me.

I think having a database name that requires quoting in psql will throw people off (google around for ERROR: syntax error at or near "user" or user reserved word postgresql for examples of the trouble that causes).

Member

MaxGabriel commented Apr 28, 2015

Making the database name/username all lowercase seems like a good default; it doesn't seem to have much downside to me.

I think having a database name that requires quoting in psql will throw people off (google around for ERROR: syntax error at or near "user" or user reserved word postgresql for examples of the trouble that causes).

@j-a-m-l

This comment has been minimized.

Show comment
Hide comment
@j-a-m-l

j-a-m-l Apr 28, 2015

I second the lower case because It is a usual practice, but I'm just a Yesod newbie, so I don't know if it incurs on the project conventions.

j-a-m-l commented Apr 28, 2015

I second the lower case because It is a usual practice, but I'm just a Yesod newbie, so I don't know if it incurs on the project conventions.

snoyberg added a commit that referenced this issue Apr 29, 2015

snoyberg added a commit to yesodweb/yesod-scaffold that referenced this issue Apr 29, 2015

@snoyberg

This comment has been minimized.

Show comment
Hide comment
@snoyberg

snoyberg Apr 29, 2015

Member

I've pushed some commits which should address this. Can you test before I release to Hackage?

Member

snoyberg commented Apr 29, 2015

I've pushed some commits which should address this. Can you test before I release to Hackage?

@snoyberg

This comment has been minimized.

Show comment
Hide comment
@snoyberg

snoyberg May 1, 2015

Member

I've released to Hackage. Please reopen if there are still problems.

Member

snoyberg commented May 1, 2015

I've released to Hackage. Please reopen if there are still problems.

@snoyberg snoyberg closed this May 1, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment