On 2/15/21 9:55 AM, Marc Millas wrote:
Hi Tom,
I do read the doc, and understand the caching behaviour of plpgsql.
This is not about plpgsql caching. It is about EXECUTE in plpgsql
meaning something different then the PREPARE/EXECUTE combination in SQL.
You are trying to run EXECUTE moninse
Hi Tom,
I do read the doc, and understand the caching behaviour of plpgsql.
if in psql I write begin;execute moninsert(randname()); execute
moninsert(randname());end;
it does work. And if I put this (begin execute end) inside a do loop it
doesnt anymore.
ok the begin execute end is ""pure"" SQL,
Marc Millas writes:
> in psql, with a postgres 12.5 db on a centos 7 intel:
> I do create a function named randname() returning a varchar, and a table
> matable with a column prenom varchar(50). then
> postgres=# prepare moninsert(varchar) as
> postgres-# insert into matable(prenoms) values($1);
>
On Mon, Feb 15, 2021 at 9:19 AM Marc Millas wrote:
>
> postgres=# prepare moninsert(varchar) as
>
> do $$ begin for counter in 1..100 loop execute
> moninsert(randname());end loop;end;$$;
> ERREUR: la fonction moninsert(character varying) n'existe pas
> someone can explain ?
>
>
>From the pl
On 2/15/21 8:18 AM, Marc Millas wrote:
Hi,
in psql, with a postgres 12.5 db on a centos 7 intel:
I do create a function named randname() returning a varchar, and a table
matable with a column prenom varchar(50). then
postgres=# prepare moninsert(varchar) as
postgres-# insert into matable(preno