Transactions and Savepoints

Transactions and Savepoints

am 08.02.2005 14:32:26 von Stefan Sturm

Hello,

I have a problem with savepoints.

I have a function which does some DB changed. This changes have to be in
a single Transaction. This function is now called in two different
ways. Once within a transaction and once not in a transaction. But how
can i check if I am within a transaction, so I can start a new
transaction or set a savepoint.

Is there a way to check this?

Thanks and Greetings,

Stefan Sturm


---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faq

Re: Transactions and Savepoints

am 08.02.2005 15:33:39 von Tommy Phillips

Stefan-

We will need more information:

What DBMS are you using, what version and what version
of PHP, for starters.

--- Stefan Sturm wrote:

> Hello,
>
> I have a problem with savepoints.
>
> I have a function which does some DB changed. This
> changes have to be in
> a single Transaction. This function is now called
> in two different
> ways. Once within a transaction and once not in a
> transaction. But how
> can i check if I am within a transaction, so I can
> start a new
> transaction or set a savepoint.
>
> Is there a way to check this?
>
> Thanks and Greetings,
>
> Stefan Sturm
>
>
> ---------------------------(end of
> broadcast)---------------------------
> TIP 5: Have you checked our extensive FAQ?
>
> http://www.postgresql.org/docs/faq
>


=====
---------------------------
Tommy Phillips
303-427-8456 (Home)
303-981-4310 (Cell)
tommyp@acm.org

---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
joining column's datatypes do not match

Re: Transactions and Savepoints

am 08.02.2005 20:19:55 von Stefan Sturm

Oh Sorry, my fault.
PostgreSQL 8.0
php 5.0.3

Hope this helps.

Thanks,
Stefan Sturm

Tommy Phillips schrieb:
> Stefan-
>
> We will need more information:
>
> What DBMS are you using, what version and what version
> of PHP, for starters.
>
> --- Stefan Sturm wrote:
>
>
>>Hello,
>>
>>I have a problem with savepoints.
>>
>>I have a function which does some DB changed. This
>>changes have to be in
>> a single Transaction. This function is now called
>>in two different
>>ways. Once within a transaction and once not in a
>>transaction. But how
>>can i check if I am within a transaction, so I can
>>start a new
>>transaction or set a savepoint.
>>
>>Is there a way to check this?
>>
>>Thanks and Greetings,
>>
>>Stefan Sturm
>>
>>
>>---------------------------(end of
>>broadcast)---------------------------
>>TIP 5: Have you checked our extensive FAQ?
>>
>> http://www.postgresql.org/docs/faq
>>
>
>
>
> =====
> ---------------------------
> Tommy Phillips
> 303-427-8456 (Home)
> 303-981-4310 (Cell)
> tommyp@acm.org
>
> ---------------------------(end of broadcast)---------------------------
> TIP 9: the planner will ignore your desire to choose an index scan if your
> joining column's datatypes do not match
>
>
>


---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org