History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: DBM-10
Type: Improvement Improvement
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Filip Neven
Reporter: Sean Laurent
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
DbMaintain

PATCH: Support Stored Procedures in PostgreSQL

Created: 30/Dec/08 04:44 PM   Updated: 27/Apr/10 07:48 AM
Component/s: None
Affects Version/s: 1.1
Fix Version/s: 1.1

File Attachments: 1. Text File pgsql-stored-procs-2.patch (17 kb)
2. Text File pgsql-stored-procs.patch (17 kb)

Environment: PostgreSQL 8.3.5


 Description  « Hide
Update Unitils/DbMaintain to support using stored procedures in PostgreSQL. Should work almost exactly the same way as it does for Oracle.

 All   Comments   Change History      Sort Order:
Sean Laurent - 30/Dec/08 04:47 PM
Patch against the 2.0 release at r1089 (unitils/tags/releases/unitils-2.0).

Sean Laurent - 04/Jul/09 04:38 PM
Hopefully the patch is still useful. Let me know if you need me to adjust it and resubmit, I would be happy to do so.

Filip Neven - 04/Jul/09 10:39 PM
Thanks but it's not needed. The patch still works after a little bit of hassling, but I won't just apply it anyway since I'm currently busy refactoring the scriptparser. Since the stored procedure support is very similar for most dbms-es I will try to come to as few as possible dbms-specific code. Your patch is useful anyway: I can take over the method that recognizes the start of a PostgreSQL stored procedure and use the test to make sure it still works.

Filip Neven - 20/Jul/09 08:48 AM - edited
There was a bug in your patch: the regular expression that you're using: CREATE (OR REPLACE)? FUNCTION expects 2 whitespaces between 'CREATE' and 'FUNCTION' if you're not using 'OR REPLACE'. It should be CREATE (OR REPLACE )?FUNCTION.

Sean Laurent - 03/Sep/09 04:28 PM
Sorry about the delay in responding. Doesn't sound like you really need an updated patch, but I fixed the regexp mistake and attached a new version of the patch. Let me know if there is anything else I can do to help.

Filip Neven - 20/Oct/09 10:10 PM
Fixed in revision 183 (along with a thorough refactoring of the script parser)