5

I'm using pgAdmin III 1.8.4 and finding it a harsh mistress.

When writing stored procedures (functions), there's no query compilation. So I have no idea if my function will work until I call it.

How do other people work around this deficiency? (Other than getting it right first time :p)

1
  • 1
    You might try changing the title to be more clear that you're trying to debug stored procedures Commented Feb 20, 2009 at 19:56

2 Answers 2

3

EnterpriceDB includes PL/PGSQL Debugger which you can use to step through the code.

Sign up to request clarification or add additional context in comments.

2 Comments

Thanks, will have a look. I was thinking more process than a software solution.
Any way to see the values of temp tables while debugging?
2

Write a unit test for it. Granted this won't give you debugging capability, but you should ideally have a unit test suite (and an integration test suite) that you run against your code that proves that it works... and that lets you know when something breaks.

2 Comments

Fair point, but waiting until the data access code is up and running before knowing if the pgsql is even valid is more the issue here.
My thinking was along the lines of Test Driven Development & how loosely typed language writers deal with making sure stuff works. Since most errors won't show up until run-time, they write a test suite to exercise their code.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.