Re: PL/PGSQL function problem - Mailing list pgsql-novice

From Josh Berkus
Subject Re: PL/PGSQL function problem
Date
Msg-id web-622486@davinci.ethosmedia.com
Whole thread Raw
In response to PL/PGSQL function problem  (Mark Hesketh <renmark@iprimus.com.au>)
List pgsql-novice
Mark,

Whoa!  Based on this, you are ready to join the pgsql-sql list.  This is not a
 novice question!

> Can someone tell me if there's a fairly obvious reason why when I run a
>  function I've written it runs twice?
>
> Here's the code (replete with debug - sorry). The basic structure has a
>  number of nested 'for' loops. The trace debug
> reveals that it's running twice through yet I'm only issueing "select
>  generateshiftcandidatedata();" x 1.

Um ... how are you calling the function?  From psql?  And when you say "it runs
 twice", what do you mean, exactly?  Myabe you could paste the relevant portion
 of the debug output?

-Josh

______AGLIO DATABASE SOLUTIONS___________________________
                                       Josh Berkus
  Complete information technology      josh@agliodbs.com
   and data management solutions       (415) 565-7293
  for law firms, small businesses        fax 621-2533
    and non-profit organizations.      San Francisco

pgsql-novice by date:

Previous
From: Tom Lane
Date:
Subject: Re: backend closed the channel unexpectedly
Next
From: Bud Rogers
Date:
Subject: Re: Sending Email