Re: Executing a Function with an INSERT INTO command fails

Поиск
Список
Период
Сортировка
Искать
От
Charles Clavadetscher
Тема
Re: Executing a Function with an INSERT INTO command fails
Дата
Msg-id
B4F6DB1B-856B-4510-91CC-BAE354F700B7@swisspug.org
Ответ на
Список
Дерево обсуждения
Executing a Function with an INSERT INTO command fails TalGloz <glozmantal@gmail.com>
RE: Executing a Function with an INSERT INTO command fails "Charles Clavadetscher" <clavadetscher@swisspug.org>
RE: Executing a Function with an INSERT INTO command fails TalGloz <glozmantal@gmail.com>
RE: Executing a Function with an INSERT INTO command fails "Charles Clavadetscher" <clavadetscher@swisspug.org>
RE: Executing a Function with an INSERT INTO command fails TalGloz <glozmantal@gmail.com>
RE: Executing a Function with an INSERT INTO command fails TalGloz <glozmantal@gmail.com>
Re: Executing a Function with an INSERT INTO command fails Charles Clavadetscher <clavadetscher@swisspug.org>
Re: Executing a Function with an INSERT INTO command fails TalGloz <glozmantal@gmail.com>
Re: Executing a Function with an INSERT INTO command fails Tom Lane <tgl@sss.pgh.pa.us>
Re: Executing a Function with an INSERT INTO command fails TalGloz <glozmantal@gmail.com>
Re: Executing a Function with an INSERT INTO command fails "David G. Johnston" <david.g.johnston@gmail.com>
Re: Executing a Function with an INSERT INTO command fails TalGloz <glozmantal@gmail.com>
Re: Executing a Function with an INSERT INTO command fails "David G. Johnston" <david.g.johnston@gmail.com>
Re: Executing a Function with an INSERT INTO command fails TalGloz <glozmantal@gmail.com>
Hi

> On 29.08.2018, at 19:45, TalGloz  wrote:
> 
> 
>> This is very strange, even if I comment all the loops in the function and
>> leave only the INSERT INTO command the insert still doesn't happen.
> 
> Now If I execute the function locally in a query window like this: 
> 
> SELECT public.seal_diff_benchmark_pgsql('YW55IGNhcm5hbCBwbGVhc3VyZQ==')
> 
> Then the INSERT INTO command fires and values are being inserted into the
> public.runtime_benchmark table. But when I execute the command form a Client
> code (C++) on a different pc using the libpqxx library, then everything else
> in the function works except the  INSERT INTO command. I use the right
> credentials since everything else in the function works perfectly.
> 
> So why is this happening?
> 
> Tal
> 

Tom's assumption is possibly correct. If the client does not have autocommit set then you need to explicitly commit the transaction.

> 
> 
> --
> Sent from: http://www.postgresql-archive.org/PostgreSQL-general-f1843780.html
> 


В списке pgsql-general по дате отправления
От: TalGloz
Дата:
От: Gunnlaugur Thor Briem
Дата:
FAQ