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

Поиск
Список
Период
Сортировка
От Bruce Patin
Тема BUG #5295: Function OUT parameters names and data types skewed with IN parameters
Дата
Msg-id 201001221526.o0MFQtpY025397@wwwmaster.postgresql.org
обсуждение исходный текст
Ответы Re: BUG #5295: Function OUT parameters names and data types skewed with IN parameters  (Euler Taveira de Oliveira <euler@timbira.com>)
Список pgsql-bugs
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.

В списке pgsql-bugs по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: BUG #5294: Sorts on more than just the order-by clause
Следующее
От: Euler Taveira de Oliveira
Дата:
Сообщение: Re: BUG #5295: Function OUT parameters names and data types skewed with IN parameters