Subject Re: [firebird-support] Prevent overlaping dates in concurent environment
Author Tomasz Tyrakowski
On 12.09.2018 at 14:40, Omacht AndrĂ¡s aomacht@... [firebird-support]
wrote:
> [...]
> while (curr_date <= new.date_to) do
>
> begin
>
> insert into reserved_date (res_date) values (:curr_date);
>
> curr_date = dateadd(1 day to curr_date);
>
> end
>
> end

On a second thought, I don't like this idea after all. What if instead
of dates you wanted to process timestamps (date + time)? Would you
insert all possible timestamps from the interval with a 1 second step?
Or a millisecond?
There has to be a more elegant solution.

Tomasz

--
__--==============================--__
__--== Tomasz Tyrakowski ==--__
__--== SOL-SYSTEM ==--__
__--== http://www.sol-system.pl ==--__
__--==============================--__