Re: Need for advice and direction (again)

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Need for advice and direction (again)
Дата
Msg-id 7320.1194659583@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Need for advice and direction (again)  ("Gevik Babakhani" <pgdev@xs4all.nl>)
Список pgsql-hackers
"Gevik Babakhani" <pgdev@xs4all.nl> writes:
> How should we refer to emp in the following example.

> CREATE FUNCTION double_salary(PARAM1 emp) RETURNS numeric AS $$

>     -- At this moment PARAM1.salary will fail because PARAM1
>       -- is compared to the name of this function  
>     SELECT PARAM1.salary * 2 AS salary;

It'd need to be
SELECT (PARAM1).salary * 2 AS salary;

This is already the case in other usages of composite types.
        regards, tom lane


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: autovacuum_freeze_max_age
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: [BUGS] Nasty tsvector can make dumps unrestorable