Re: [Firebird-devel] Weird date/time literals

2018-01-18 Thread liviuslivius
Oryginalna wiadomość Od: Dimitry Sibiryakov <s...@ibphoenix.com> Data: 18.01.2018 11:44 (GMT+01:00) Do: firebird-devel@lists.sourceforge.net Temat: Re: [Firebird-devel] Weird date/time literals 18.01.2018 11:39, Adriano dos Santos Fernandes wrote: > On 18/01/2018 07:37, Dmitr

Re: [Firebird-devel] Weird date/time literals

2018-01-18 Thread Vlad Khorsun via Firebird-devel
18.01.2018 13:10, Dimitry Sibiryakov wrote: 18.01.2018 11:57, Dmitry Yemanov wrote: IMO, no sane person would rely on that intentionally.   Why? This is the only method to get procedure compilation time, AFAIR. Time of CREATE and last ALTER of SP\Trigger\etc should be stored in system

Re: [Firebird-devel] Weird date/time literals

2018-01-18 Thread Michal Kubecek
On Thu, Jan 18, 2018 at 12:10:19PM +0100, Dimitry Sibiryakov wrote: > 18.01.2018 11:57, Dmitry Yemanov wrote: > >IMO, no sane person would rely on that intentionally. > > Why? This is the only method to get procedure compilation time, AFAIR. While I hate abusing it in general, in this case I

Re: [Firebird-devel] Weird date/time literals

2018-01-18 Thread Dimitry Sibiryakov
18.01.2018 11:57, Dmitry Yemanov wrote: IMO, no sane person would rely on that intentionally. Why? This is the only method to get procedure compilation time, AFAIR. -- WBR, SD. -- Check out the vibrant tech

Re: [Firebird-devel] Weird date/time literals

2018-01-18 Thread Dmitry Yemanov
18.01.2018 13:44, Dimitry Sibiryakov wrote:   Is this "issue" bad enough for breaking of backward compatibility?   AFAIK, this behavior is documented, so cannot be called "bug". IMO, no sane person would rely on that intentionally. And AFAIU old databases will still work, error will be

Re: [Firebird-devel] Weird date/time literals

2018-01-18 Thread Dimitry Sibiryakov
18.01.2018 11:39, Adriano dos Santos Fernandes wrote: On 18/01/2018 07:37, Dmitry Yemanov wrote: By design, these hardcoded strings are expressions, but date/time/timestamp prefixes imply literals (by standard). I'd rather suggest to validate the string at compile time and throw a misuse error.

Re: [Firebird-devel] Weird date/time literals

2018-01-18 Thread Adriano dos Santos Fernandes
On 18/01/2018 07:37, Dmitry Yemanov wrote: > > By design, these hardcoded strings are expressions, but > date/time/timestamp prefixes imply literals (by standard). I'd rather > suggest to validate the string at compile time and throw a misuse error. This is ok for me too. Adriano

[Firebird-devel] Weird date/time literals

2018-01-17 Thread Adriano dos Santos Fernandes
Hi! I don't known a reason, but I feel that very few people uses date/time (and timestamp) literals. In Firebird generally people use casts to transform a string to these types. In Oracle, they use TO_DATE. It's much better to use DATE '2018-01-01', TIME '10:00:00' and TIMESTAMP '2018-01-01