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

Consider colons as a token separator #23

Merged
merged 1 commit into from May 24, 2013
Merged

Conversation

pmalouin
Copy link
Contributor

I bumped into tokenization problems on PostgreSQL with statements of the form:
CREATE TABLE base_table (
base_table_id integer DEFAULT nextval('base_table_seq'::regclass) NOT NULL
);
The parser considers "'base_table_seq'::regclass" to be a full token, but it should be considered as 2 tokens:
"'base_catalog_table_seq'" and "regclass"

Now I haven't tested this with other rdbms and I'm not sure this should be applied to all of them.

I bumped into tokenization problems on PostgreSQL with statements of the form:
CREATE TABLE base_table (
    base_table_id integer DEFAULT nextval('base_table_seq'::regclass) NOT NULL
);
The parser considers "'base_table_seq'::regclass" to be a full token, but it should be considered as 2 tokens:
"'base_catalog_table_seq'" and "regclass"

Now I haven't tested this with other rdbms and I'm not sure this should be applied to all of them.
axelfontaine pushed a commit that referenced this pull request May 24, 2013
Consider colons as a token separator
@axelfontaine axelfontaine merged commit 3e9dec0 into flyway:master May 24, 2013
@axelfontaine
Copy link
Contributor

Hi Patrick,

thanks for contributing this! One small thing: could you also include a test case in future pull requests? It makes it so much easier to validate things.

I've added you to the hall of fame: http://flywaydb.org/contribute/hallOfFame.html

Cheers
Axel

@pmalouin pmalouin deleted the patch-1 branch May 24, 2013 17:15
@pmalouin
Copy link
Contributor Author

Hi Axel,
Thanks! I will add tests next time!
Patrick

@pmalouin
Copy link
Contributor Author

Hi Axel,
We're planning on migrating a big PostgreSQL project to Flyway, and this fix is necessary for us (100s of scripts with that syntax). I'd prefer not building from source and have an official release before we begin our work.
When do you expect to have a new official build for Flyway?
Thanks!

@axelfontaine
Copy link
Contributor

Hi Patrick,

I am aiming for a 2.2 release by the end of next week, give or take a few days.

Cheers
Axel

@pmalouin
Copy link
Contributor Author

That's great!
Patrick

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.

None yet

2 participants