Start a new topic

Postgres Create/Edit Function Problems

[This topic is migrated from our old forums. The original author name has been removed]

Hello, I just installed the trial for DbVis 9.0.5 to work with Postgresql 9.2 (I'm looking to replace Navicat). I'm having a few problems mainly related to creating or editing functions: 1. Creating a new function return type cannot be changed from INTEGER and cannot change the lanuage from sql to plpggsql. Am I missing a setting somewhere this does not seem right? 2. When I edit an existing function that RETURN TABLE(col1 type, col2 type) it will rewrite this to RETURNS SETOF record (which breaks the function). What am I doing wrong? Did I miss something? Thanks for any help! Matt

[This reply is migrated from our old forums.]

Re: Postgres Create/Edit Function Problems
Hi Matt, Just to let you know that support for RETURNS TABLE will be added in the next maintenance release. Best Regards, Hans
[This reply is migrated from our old forums. The original author name has been removed]

Re: Postgres Create/Edit Function Problems
Thanks Hans, I was just about to get an example together to illustrate the issue.
[This reply is migrated from our old forums.]

Re: Postgres Create/Edit Function Problems
Hi again Matt, I can reproduce the problem with RETURS TABLE. I'll have a look at it. Best Regards, Hans
[This reply is migrated from our old forums.]

Re: Postgres Create/Edit Function Problems
Hi Matt, Thanks for your interest in DbVisualizer. The Create Function action only creates a template for the function. In order to get the database to accept it, the return type is hardcoded to match the template body for some databases. The intention is that you create the template with the Create Function action and then change the parameters, return type and body as needed using the Function Editor. We have not heard of the problem you describe with RETURN TABLE before. Please post (or email) code to reproduce this problem. Best Regards, Hans