Re: Need for advice and direction (again)

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Gevik Babakhani" <pgdev(at)xs4all(dot)nl>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Need for advice and direction (again)
Date: 2007-11-10 01:53:03
Message-ID: 7320.1194659583@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

"Gevik Babakhani" <pgdev(at)xs4all(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2007-11-10 03:19:44 Re: [BUGS] Nasty tsvector can make dumps unrestorable
Previous Message Tom Lane 2007-11-10 01:51:17 Re: autovacuum_freeze_max_age