The following bug has been logged online:

Bug reference:      4759
Logged by:          Frank Heikens
Email address:      fr...@jakaree.com
PostgreSQL version: 8.4beta1
Operating system:   Windows XP
Description:        RETURNS TABLE not supported in pgAdmin
Details: 

pgAdmin 1.10.0 Beta 1 (and older) doesn't support the new returning TABLE
and translates the returning columns to IN-parameters. 

It's not a bug in the database, just a missing feature in pgAdmin. But a
real PITA, functions are impossible to maintain using pgAdmin.

SQL-input:
create or replace function new_user(name TEXT, salary DECIMAL) RETURNS table
(id int, name text, salary decimal) AS


pg_proc gives me a nice proargmodes[] with table-parameters:
"{i,i,t,t,t}"

Result in pgAdmin:
CREATE OR REPLACE FUNCTION new_user(IN "name" text, IN salary numeric, IN id
integer, IN "name" text, IN salary numeric)
  RETURNS SETOF record AS

Now it looks like the function has 5 IN-parameters instead of just 2
IN-parameters and 3 TABLE-columns.

Kind regard,
Frank

-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs

Reply via email to