Re: writting a large store procedure

From: "Rodríguez Rodríguez, Pere" <prr(at)hosppal(dot)es>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: writting a large store procedure
Date: 2005-06-06 07:50:07
Message-ID: B35596C2EFF3D2118EE100A0C94B2A60014BFBD8@palamos_nt
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

-----Mensaje original-----
De: Bob [mailto:luckyratfoot(at)gmail(dot)com]
Enviado el: viernes 3 de junio de 2005 23:34
Para: Rodríguez Rodríguez, Pere
CC: pgsql-general(at)postgresql(dot)org
Asunto: Re: [GENERAL] writting a large store procedure

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

No, I can't. Is a stored procedure with a lot of particularities.


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
<mailto: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

Browse pgsql-general by date

  From Date Subject
Next Message Russ Brown 2005-06-06 09:07:30 Re: PG Lightning Admin running on Linux via WINE 2005524
Previous Message John Sidney-Woollett 2005-06-06 07:13:10 Download mirrors not found?