Re: any way for a transaction to "see" inserts done earlier in the transaction?

Поиск
Список
Период
Сортировка
Искать
От
Rajeev rastogi
Тема
Re: any way for a transaction to "see" inserts done earlier in the transaction?
Дата
Msg-id
BF2827DCCE55594C8D7A8F7FFD3AB7713DDE29AA@SZXEML508-MBX.china.huawei.com
Ответ на
Список
Дерево обсуждения
any way for a transaction to "see" inserts done earlier in the transaction? Susan Cassidy <susan.cassidy@decisionsciencescorp.com>
Re: any way for a transaction to "see" inserts done earlier in the transaction? Tom Lane <tgl@sss.pgh.pa.us>
Re: any way for a transaction to "see" inserts done earlier in the transaction? Susan Cassidy <susan.cassidy@decisionsciencescorp.com>
Re: any way for a transaction to "see" inserts done earlier in the transaction? Steven Schlansker <steven@likeness.com>
Re: any way for a transaction to "see" inserts done earlier in the transaction? Susan Cassidy <susan.cassidy@decisionsciencescorp.com>
Re: any way for a transaction to "see" inserts done earlier in the transaction? David G Johnston <david.g.johnston@gmail.com>
Re: Re: any way for a transaction to "see" inserts done earlier in the transaction? Robert DiFalco <robert.difalco@gmail.com>
Re: any way for a transaction to "see" inserts done earlier in the transaction? David G Johnston <david.g.johnston@gmail.com>
Re: Re: any way for a transaction to "see" inserts done earlier in the transaction? Alban Hertroys <haramrae@gmail.com>
Re: Re: any way for a transaction to "see" inserts done earlier in the transaction? Susan Cassidy <susan.cassidy@decisionsciencescorp.com>
Re: Re: any way for a transaction to "see" inserts done earlier in the transaction? Susan Cassidy <susan.cassidy@decisionsciencescorp.com>
Re: Re: any way for a transaction to "see" inserts done earlier in the transaction? Robert DiFalco <robert.difalco@gmail.com>
Re: Re: any way for a transaction to "see" inserts done earlier in the transaction? Scott Marlowe <scott.marlowe@gmail.com>
Re: Re: any way for a transaction to "see" inserts done earlier in the transaction? Susan Cassidy <susan.cassidy@decisionsciencescorp.com>
Re: Re: any way for a transaction to "see" inserts done earlier in the transaction? Vincent Veyron <vincent.veyron@libremen.org>
Re: Re: any way for a transaction to "see" inserts done earlier in the transaction? Vincent Veyron <vincent.veyron@libremen.org>
Re: Re: any way for a transaction to "see" inserts done earlier in the transaction? Susan Cassidy <susan.cassidy@decisionsciencescorp.com>
Re: Re: any way for a transaction to "see" inserts done earlier in the transaction? Vincent Veyron <vv.lists@wanadoo.fr>
Re: Re: any way for a transaction to "see" inserts done earlier in the transaction? "Greg Sabino Mullane" <greg@turnstep.com>
Re: Re: any way for a transaction to "see" inserts done earlier in the transaction? Susan Cassidy <susan.cassidy@decisionsciencescorp.com>
Re: Re: any way for a transaction to "see" inserts done earlier in the transaction? Susan Cassidy <susan.cassidy@decisionsciencescorp.com>
Re: any way for a transaction to "see" inserts done earlier in the transaction? Tom Lane <tgl@sss.pgh.pa.us>
Re: any way for a transaction to "see" inserts done earlier in the transaction? Susan Cassidy <susan.cassidy@decisionsciencescorp.com>
Re: any way for a transaction to "see" inserts done earlier in the transaction? Susan Cassidy <susan.cassidy@decisionsciencescorp.com>
Re: any way for a transaction to "see" inserts done earlier in the transaction? David G Johnston <david.g.johnston@gmail.com>
Re: Re: any way for a transaction to "see" inserts done earlier in the transaction? Susan Cassidy <susan.cassidy@decisionsciencescorp.com>
Re: any way for a transaction to "see" inserts done earlier in the transaction? David G Johnston <david.g.johnston@gmail.com>
Re: any way for a transaction to "see" inserts done earlier in the transaction? Adrian Klaver <adrian.klaver@aklaver.com>
Re: any way for a transaction to "see" inserts done earlier in the transaction? Adrian Klaver <adrian.klaver@aklaver.com>
Re: any way for a transaction to "see" inserts done earlier in the transaction? Susan Cassidy <susan.cassidy@decisionsciencescorp.com>
Re: any way for a transaction to "see" inserts done earlier in the transaction? Rajeev rastogi <rajeev.rastogi@huawei.com>
Re: any way for a transaction to "see" inserts done earlier in the transaction? Susan Cassidy <susan.cassidy@decisionsciencescorp.com>
Re: any way for a transaction to "see" inserts done earlier in the transaction? Rob Sargent <robjsargent@gmail.com>
Re: any way for a transaction to "see" inserts done earlier in the transaction? Bosco Rama <postgres@boscorama.com>
Re: any way for a transaction to "see" inserts done earlier in the transaction? "Greg Sabino Mullane" <greg@turnstep.com>
Re: any way for a transaction to "see" inserts done earlier in the transaction? Susan Cassidy <susan.cassidy@decisionsciencescorp.com>
Re: any way for a transaction to "see" inserts done earlier in the transaction? John R Pierce <pierce@hogranch.com>
Re: any way for a transaction to "see" inserts done earlier in the transaction? Susan Cassidy <susan.cassidy@decisionsciencescorp.com>
Re: any way for a transaction to "see" inserts done earlier in the transaction? Andy Colson <andy@squeakycode.net>
Re: any way for a transaction to "see" inserts done earlier in the transaction? Susan Cassidy <susan.cassidy@decisionsciencescorp.com>
Re: any way for a transaction to "see" inserts done earlier in the transaction? Steven Schlansker <steven@likeness.com>

Was the function doing INSERT operation was successful? I suspect may be INSERT function has failed and hence INSERT got ABORTED.

Also you can try to commit whole transaction and see if you are able to find the new id (This will prove that whether really new id was inserted or not).

 

Thanks and Regards,

Kumar Rajeev Rastogi

From: pgsql-general-owner@postgresql.org [mailto:pgsql-general-owner@postgresql.org] On Behalf Of Susan Cassidy
Sent: 17 April 2014 05:36
To: Steven Schlansker
Cc: Tom Lane; pgsql-general@postgresql.org
Subject: Re: [GENERAL] any way for a transaction to "see" inserts done earlier in the transaction?

 

It is a fairly large and complex Perl program, so no, not really.

I do an insert via a function, which returns the new id, then later I try to SELECT on that id, and it doesn't find it.

Could it be because the insert is done inside a function?

Susan

 

On Wed, Apr 16, 2014 at 4:58 PM, Steven Schlansker <steven@likeness.com> wrote:



>> On Wed, Apr 16, 2014 at 4:31 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> Susan Cassidy <susan.cassidy@decisionsciencescorp.com> writes:
>> > Is there any way to let a transaction "see" the inserts that were done
>> > earlier in the transaction?
>>
>> It works that way automatically, as long as you're talking about separate
>> statements within one transaction.
>>
>>                         regards, tom lane

> On Apr 16, 2014, at 4:53 PM, Susan Cassidy <susan.cassidy@decisionsciencescorp.com> wrote:
> Well, it isn't working for me right now.  It can't "see" a row that was inserted earlier in the transaction.  It is a new primary key, and when I SELECT it, it isn't found.
>

Can you share the code that does not work with us?  Preferably as a small self-contained example.

 

В списке pgsql-general по дате отправления
От: Rajeev rastogi
Дата:
От: Torsten Förtsch
Дата:
FAQ