Thanks!
makes it clearer :-)
its not that obvious to guess the consequences of the "volatile" behaviour.
regards,
Marc MILLAS
Senior Architect
+33607850334
www.mokadb.com
On Wed, Jul 15, 2020 at 1:53 AM David Rowley wrote:
> On Wed, 15 Jul 2020 at 04:01, Marc Millas wrote:
> > your answer h
On Wed, 15 Jul 2020 at 04:01, Marc Millas wrote:
> your answer helps me understand my first problem.
> so, I rewrote a simple loop so as to avoid the "volatile" behaviour.
Not sure what you're trying to do with the plpgsql, but you can just
escape the multiple evaluations by putting the volatile
On 7/14/20 9:01 AM, Marc Millas wrote:
Hi,
your answer helps me understand my first problem.
so, I rewrote a simple loop so as to avoid the "volatile" behaviour.
(at least I was thinking I did... looks like I was wrong !)
step by step loop:
DO $$
BEGIN
FOR counter IN 1..1000 LOOP
begin
declare
Please don't top-post. Inline (with trim) is better but at minimum
bottom-post.
On Tue, Jul 14, 2020 at 9:01 AM Marc Millas wrote:
> Hi,
> your answer helps me understand my first problem.
> so, I rewrote a simple loop so as to avoid the "volatile" behaviour.
> (at least I was thinking I did...
Hi,
your answer helps me understand my first problem.
so, I rewrote a simple loop so as to avoid the "volatile" behaviour.
(at least I was thinking I did... looks like I was wrong !)
step by step loop:
DO $$
BEGIN
FOR counter IN 1..1000 LOOP
begin
declare
id1 integer =ceiling(random()*2582);
id3
Ok, thanks for the clarification.
Marc MILLAS
Senior Architect
+33607850334
www.mokadb.com
On Tue, Jul 14, 2020 at 5:24 PM David G. Johnston <
david.g.johns...@gmail.com> wrote:
> On Tue, Jul 14, 2020 at 8:15 AM Marc Millas
> wrote:
>
>> select id, prenom from prenoms where id=ceiling(random(
On Tue, Jul 14, 2020 at 8:15 AM Marc Millas wrote:
> select id, prenom from prenoms where id=ceiling(random()*2582);
>
> expecting to get, allways, one line.
> But its not the case.
> around 15% of time I get 0 lines which is already quite strange to me.
> but 10% of time, I get a random number o