Thread

  1. BUG #5295: Function OUT parameters names and data types skewed with IN parameters

    Bruce Patin <bpatin@magloclen.riss.net> — 2010-01-22T15:26:55Z

    The following bug has been logged online:
    
    Bug reference:      5295
    Logged by:          Bruce Patin
    Email address:      bpatin@magloclen.riss.net
    PostgreSQL version: 8.3.8-2
    Operating system:   Fedora 10 Linux 64-bit
    Description:        Function OUT parameters names and data types skewed with
    IN parameters
    Details: 
    
    Create a function with some OUT parameters at the beginning of the parameter
    list, then some IN parameters. The result is that the function signature
    starts with the names of the OUT parameters, but are associated with the
    data types of the IN parameters.
    Example:
    
    CREATE FUNCTION TestParms
    (
    	OUT TestKey integer,
    	OUT TestStatus varchar(100),
    	IN EntryDate timestamp,
    	IN Description text,
    	IN FeePaid money,
    	IN FirstName varchar(30),
    	IN LastName varchar(50)
    )
    AS $$
    BEGIN
    	
    	TestKey := 0;
    	TestStatus := 'OK';
    
    END;
    $$ LANGUAGE plpgsql;
    
    Yields the following arguments, as displayed in phpPgAdmin when editing the
    function:
    
    "testkey" timestamp without time zone,
    "teststatus" text,
    "entrydate" money,
    "description" character varying,
    "feepaid" character varying
    
    As you can see, the first OUT parameter name "testkey", originally specified
    as integer, is now associated with the data type of the first IN parameter,
    and second OUT parameter name "teststatus", originally specified as
    varchar(100), is now associated with the data type of the second IN
    parameter.
    
    
  2. Re: BUG #5295: Function OUT parameters names and data types skewed with IN parameters

    Euler Taveira <euler@timbira.com> — 2010-01-24T01:26:08Z

    Bruce Patin escreveu:
    > Yields the following arguments, as displayed in phpPgAdmin when editing the
    > function:
    > 
    This is not a PostgreSQL bug. Don't know if the phpPgAdmin developers read
    this list but, in any case, try to report it in the right place [1].
    
    [1] http://phppgadmin.sourceforge.net/?page=support
    
    
    -- 
      Euler Taveira de Oliveira
      http://www.timbira.com/