Search Postgresql Archives

Re: Writing a user defined function

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 18/07/2008 17:07, Suresh_ wrote:
CREATE OR REPLACE FUNCTION udf() RETURNS integer AS $$
BEGIN
for i in 1..2000 loop
  for j in 1...10000 loop
  end loop;
  begin work;

    ^^^^^^----- Here's your problem!

You can't have a transaction inside a function - the function is already executed inside a transaction.

Ray.

------------------------------------------------------------------
Raymond O'Donnell, Director of Music, Galway Cathedral, Ireland
rod@xxxxxx
Galway Cathedral Recitals: http://www.galwaycathedral.org/recitals
------------------------------------------------------------------


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux