Web pgadmin.org
 Home 
 ·  ·  ·  ·  ·  ·  · 
Re: Patch to add parameters' value to a function

Re: Patch to add parameters' value to a function



Guillaume Lelarge wrote:
Hi all,

Here is another patch to support this new PostgreSQL 8.3 feature : the
possibility to set/reset parameter value from a function (ALTER FUNCTION
x SET y=z ; ALTER FUNCTION x RESET y).

Once again, this patch would love to be on Dave's "shiny new unapplied
patches folder"  :)

Well it's not actually that shiny any more - but in this case the change was made in PostgreSQL for security reasons so I'm including it in 1.8.

I've made a couple of additional changes to the patch before committing:

1) You missed the changes to pgFunction::GetSQL() and pgFunction::ShowTreeDetail() so I've added those to ensure we include the params on the reverse engineered SQL and the properties list.

2) I noticed that for unknown reasons we only allow variables to be set on existing objects. After a quick chat with Magnus we could see no reason for that, so I modified functions, users, roles and databases to allow changes at creation time as well.

As a result of 2, we also found that CREATE DATABASE is no longer allowed to be in a multi-statement query string any more which means actually that change won't work for 8.3, and in fact setting a comment of privileges at create time is broken as well :-(. I'll work on that...

Please test what I've committed seeing as we're so close to release.

Thanks, Dave.



Home | Main Index | Thread Index

top