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

CURRENT_TIMESTAMP still quoted in default #85

Open
robintheander opened this issue Mar 12, 2017 · 0 comments
Open

CURRENT_TIMESTAMP still quoted in default #85

robintheander opened this issue Mar 12, 2017 · 0 comments

Comments

@robintheander
Copy link

SQL/Translator/Producer/PostgreSQL.pm has this line:

'CURRENT_TIMESTAMP' => 'CURRENT_TIMESTAMP',

It causes the string to be quoted regardless of a ref or string is passed to default_value. A reference must be generated by the _apply_default_value function, so the line should be changed to:

'CURRENT_TIMESTAMP' => \'CURRENT_TIMESTAMP',

In fact, the 'now()' replacement should also be a ref and the replacement should add the other Pg datetime variants: CURRENT_TIME, CURRENT_DATE, LOCALTIME, LOCALSTAMP. There might even be other Pg magic functions that should be added.

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

No branches or pull requests

1 participant