Re: Parse error help needed...

Поиск
Список
Период
Сортировка
От Richard Huxton
Тема Re: Parse error help needed...
Дата
Msg-id 200401131142.44354.dev@archonet.com
обсуждение исходный текст
Ответ на Re: Parse error help needed...  ("Thapliyal, Deepak" <dthapliyal@soe.sony.com>)
Ответы Re: Parse error help needed...  (Anton.Nikiforov@loteco.ru)
Список pgsql-general
On Tuesday 13 January 2004 01:39, Thapliyal, Deepak wrote:
> Now my function is created ... Thanks guys ..
>
> Now getting error while trying to execute it
>
> postgres=# select loadme();
> WARNING:  Error occurred while executing PL/pgSQL function loadme
> WARNING:  line 7 at SQL statement
> ERROR:  SPI_prepare() failed on "commit"

Remove the "commit" line - functions cannot define their own transactions
anyway. I guess you're being misled by the "begin" line - it's matched by the
"end" and defines the function body rather than any transaction.

--
  Richard Huxton
  Archonet Ltd

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

Предыдущее
От: Richard Huxton
Дата:
Сообщение: Re: sql insert function
Следующее
От: Anton.Nikiforov@loteco.ru
Дата:
Сообщение: Re: insertion with trigger failed unexpectedly