Re: sql insert function

Поиск
Список
Период
Сортировка
От Richard Huxton
Тема Re: sql insert function
Дата
Msg-id 200401131853.31515.dev@archonet.com
обсуждение исходный текст
Ответ на Re: sql insert function  ("Chris Ochs" <chris@paymentonline.com>)
Список pgsql-general
On Tuesday 13 January 2004 17:46, Chris Ochs wrote:
> Yes it was in my function.  I thought the docs said that BEGIN and END had
> no effect on transactions though?  Plus wouldn't there have to be a
> transaction active since I was not using autocommit and the inserts did in
> fact commit?
>
> I suspect it is the end statement doing this though, I'll take it out and
> see what happens.

I think you're right - I looked back at your earlier posts and you are mixing
up plpgsql and sql function syntax (easy enough to do).

BEGIN...END bracket the body of a plpgsql function, but control a transaction
in the SQL function. The BEGIN would have been ignored, the END would have
committed the current transaction.

--
  Richard Huxton
  Archonet Ltd

В списке pgsql-general по дате отправления:

Предыдущее
От: "Keith G. Murphy"
Дата:
Сообщение: Re: Best practice? Web application: single PostgreSQL
Следующее
От: "scott.marlowe"
Дата:
Сообщение: Re: Nested transaction - I am a bank ??