Skip to content
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

Postgresql 8.4 error when running paster db init #542

Closed
thriuin opened this issue Mar 1, 2013 · 3 comments · Fixed by #561
Closed

Postgresql 8.4 error when running paster db init #542

thriuin opened this issue Mar 1, 2013 · 3 comments · Fixed by #561
Assignees

Comments

@thriuin
Copy link
Contributor

thriuin commented Mar 1, 2013

When running the paster db init command with the CKAN 2.0 beta, there is an error encountered that appears to be related to use of the left() string function in ckan/migration/versions/067_turn_extras_to_strings.py. According to the documentation and my own simple test, this function is not support in Postgresql 8.4. For a stack trace, see: https://gist.github.com/thriuin/5067819.

Is there a new minimum version of Postgresql required -- documentation still says 8.4 which unfortunately is what comes with RedHat Enterprise.

@ghost ghost assigned vitorbaptista Mar 1, 2013
@vitorbaptista
Copy link
Contributor

Hi @thriuin,

This is related to #514. I've added a patch in the comments, at #514 (comment), that solves this issue. @domoritz created a patch of an issue that you will have down the line.

Could you apply both patches and try to run the tests under Postgres 8.4?

Cheers!

@thriuin
Copy link
Contributor Author

thriuin commented Mar 2, 2013

Thanks! I will test the patches on Monday morning when I have access to the RHEL environment again,

@thriuin
Copy link
Contributor Author

thriuin commented Mar 4, 2013

Hi @vitorbaptista,

I have tested and can confirm these patches allow the paster db init to work on Postgres 8.4

Thanks!

vitorbaptista added a commit that referenced this issue Mar 5, 2013
…left

[#542] Remove usage of postgres' function that's not available in < 9.1
vitorbaptista added a commit that referenced this issue Mar 12, 2013
The function left() was only added in Postgres 9.1, but we can easily use
substr() to achieve the same effect.

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

Successfully merging a pull request may close this issue.

2 participants