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

Broken short C-style cast for literal 'NOW' [CORE6191] #6436

Closed
firebird-automations opened this issue Nov 18, 2019 · 6 comments
Closed

Broken short C-style cast for literal 'NOW' [CORE6191] #6436

firebird-automations opened this issue Nov 18, 2019 · 6 comments

Comments

@firebird-automations
Copy link
Collaborator

Submitted by: @sim1984

Votes: 1

select
current_timestamp as t1,
timestamp 'now' as t2,
cast('now' as timestamp) as t3
from rdb$database

Overflow occurred during data type conversion.
conversion error from string "now".

If you comment out the column t2, then it works.

select
current_timestamp as t1,
-- timestamp 'now' as t2,
cast('now' as timestamp) as t3
from rdb$database

@firebird-automations
Copy link
Collaborator Author

Modified by: @sim1984

summary: Broken short C-style cast for literary 'NOW' => Broken short C-style cast for literal 'NOW'

@firebird-automations
Copy link
Collaborator Author

Commented by: @dyemanov

It's intended. 'now' is a runtime expression, while timestamp 'dd.mm.yyyy' is a compile-time literal. timestamp 'now' is something in the middle and doesn't make much sense. See CORE5717.

@firebird-automations
Copy link
Collaborator Author

Commented by: @sim1984

Thanks. Something I missed this moment.

@firebird-automations
Copy link
Collaborator Author

Commented by: @sim1984

Please, close this ticket.

@firebird-automations
Copy link
Collaborator Author

Modified by: @dyemanov

status: Open [ 1 ] => Resolved [ 5 ]

resolution: Won't Fix [ 2 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @pcisar

status: Resolved [ 5 ] => Closed [ 6 ]

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

No branches or pull requests

1 participant