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

Fix for regular expressions in value checks #1

Closed
wants to merge 1 commit into from
Closed

Fix for regular expressions in value checks #1

wants to merge 1 commit into from

Conversation

nyalldawson
Copy link
Contributor

I've tried to use these scripts on both PostGis 1.5.4 (windows based) and Postgis 2.0.0 (linux based) (both using the default configuration option standard_conforming_strings=on) and on both setups the make script fails in 03-create-asgs-csv-schema.sql when the checks are created. For my setups, I had to escape the slashes within the regular expressions to get this file to run correctly.

@andrewharvey
Copy link
Owner

Thanks for reporting this and creating the patch/pull request.

However I would like to understand why you need to do this on your setup and/or why I don't need to on mine before I make any changes.

I'm using PostgreSQL 9.1 with a mostly stock configuration and for me both my existing format and your suggested format load without any warnings or errors. However both are reported through pgAdmin III as the CHECK ((VALUE ~ '^\d$'::text)); format.

What PostgreSQL version are you using?

@andrewharvey
Copy link
Owner

Sorry, I've found the answer http://www.postgresql.org/docs/9.1/static/runtime-config-compatible.html

I will merge your commit. Thanks.

@andrewharvey
Copy link
Owner

Oh. One more thing. For the add_code you've modified it to [D\d]\d{2}. As per the ASGS specification the ADD code will always be D then two digits. There was an error in one of the ADD files originally published by the ABS but I reported this and they have since fixed it, grab it here, note the release date 04/05/2012.

I can either recreate this and commit it under my name without this change to ADD or let you modify your branch and send another pull request, let me know if you have a preference.

@nyalldawson
Copy link
Contributor Author

Thanks for the comments and taking time to review this (and more importantly, creating these scripts in the first place. They've certainly saved me a lot of time!) I'll fix up this request and send it through again, it'll be good git practice for me.

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 this pull request may close these issues.

2 participants