[DBIx-Class-Devel] [dbsrgits/sql-translator] CURRENT_TIMESTAMP still quoted in default (#85)

robintheander notifications at github.com
Sun Mar 12 09:45:55 GMT 2017


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.


-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/dbsrgits/sql-translator/issues/85
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.scsys.co.uk/pipermail/dbix-class-devel/attachments/20170312/646377d2/attachment.htm>


More information about the DBIx-Class-Devel mailing list