Routine (function) changes return type to SETOF record

When I click on a function, it always changes the return type to “RETURNS SETOF record” which is a change that breaks my c# code. Is this normal/expected/supposed to discourage other return types or an oversight? I am new to postgres and datagrip.

3 comments
Comment actions Permalink

Hello,

You could check original DDL of a function by qerying the database like shown here http://stackoverflow.com/a/12149166/2000323 :

 
select pg_get_functiondef(oid)
from pg_proc
where proname = 'your_routine_name';


and compare the results with what DataGrip is displaying. If they are different please report at https://youtrack.jetbrains.com/issues/DBE providing the details and output from Test Connection button in the data source Settings.

0
Comment actions Permalink

https://youtrack.jetbrains.com/issue/DBE-2101 There was already a bug with this same issue created, but I didn't find it until now.

If I right click the function and copy DDL, the return type is a table, which is what I want. 

When I double click a function to edit it, the routine editor displays RETURNS SETOF record.

If I make any change to the routine, it will overwrite the routine return type, which breaks my C# code.

After any changes made in the routine editor, copying the routine's DDL shows "RETURNS SETOF record"

0

Please sign in to leave a comment.