From: | Susan Cassidy <susan(dot)cassidy(at)decisionsciencescorp(dot)com> |
---|---|
To: | Vincent Veyron <vincent(dot)veyron(at)libremen(dot)org> |
Cc: | Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com>, Alban Hertroys <haramrae(at)gmail(dot)com>, David G Johnston <david(dot)g(dot)johnston(at)gmail(dot)com>, "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Re: any way for a transaction to "see" inserts done earlier in the transaction? |
Date: | 2014-04-17 18:00:41 |
Message-ID: | CAE3Q8on0C-hvecXgUsJgWVaZ2LszT+uPYkvgjoVYVVYPzcNbaw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
I found the problem, and it is all my fault. I was calling the insert
function with the wrong combination of parameters, so naturally it didn't
find the item. It is working fine now, although I do think I needed to
mark the function as VOLATILE, which I think helped.
Thanks to all for the help.
Susan
On Thu, Apr 17, 2014 at 10:33 AM, Vincent Veyron <
vincent(dot)veyron(at)libremen(dot)org> wrote:
> On Thu, 17 Apr 2014 10:02:00 -0700
> Susan Cassidy <susan(dot)cassidy(at)decisionsciencescorp(dot)com> wrote:
>
> > I moved the code in the function inline into the code, and I still cannot
> > find the newly inserted id the next time through the loop.
>
> I suppose you use DBD::Pg, whose current default isolation transaction
> level is ``Serializable''
>
> Don't know if it applies, but the Postgresql's documentation says this :
>
> SERIALIZABLE
>
> All statements of the current transaction can only see rows committed
> before the first query or data-modification statement was executed in this
> transaction. If a pattern of reads and writes among concurrent serializable
> transactions would create a situation which could not have occurred for any
> serial (one-at-a-time) execution of those transactions, one of them will be
> rolled back with a serialization_failure SQLSTATE.
>
> --
> Regards, Vincent Veyron
>
> http://libremen.com/
> Legal case, contract and insurance claim management software
>
From | Date | Subject | |
---|---|---|---|
Next Message | Joseph Kregloh | 2014-04-17 18:45:59 | Re: pg_upgrade & tablespaces |
Previous Message | Steve Spence | 2014-04-17 17:43:43 | Re: Arduino SQL Connector |