Re: writting a large store procedure

From: Bob <luckyratfoot(at)gmail(dot)com>
To: Rodríguez Rodríguez, Pere <prr(at)hosppal(dot)es>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: writting a large store procedure
Date: 2005-06-03 21:34:26
Message-ID: 762e5c0506031434308808d9@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Well first off can you break those 700 lines out into more stored functions?

Maybe you have logic that would be best in its own function and than call
one function from another. Makes testing many times easier. I always think
in small chuncks when I write code.
Once code gets to be more than a few pages it can become hell to debug and
work with. Plus breaking it out might allow you to use that same logic in
other parts of your system because it will be stand alone piece of
logic/code.

On 6/2/05, "Rodríguez Rodríguez, Pere" <prr(at)hosppal(dot)es> wrote:
>
> Hello,
>
> I'm writing a large store procedures (more than 700 lines) and I have much
> problems to debug it. How can I debug it easily?
>
> I use pgAdmin, is there another editor (free software) that permit write
> large store procedure more easily?
>
> Thanks in advance.
>
> pere
>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Bob 2005-06-03 22:00:39 Re: writting a large store procedure
Previous Message Bob 2005-06-03 21:23:03 Re: postgresql books