Re: How to make @id or $id as parameter name in plpgsql, is it available?

From: Michael Fuhr <mike(at)fuhr(dot)org>
To: "Arnold(dot)Zhu" <joint(at)shaucon(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: How to make @id or $id as parameter name in plpgsql, is it available?
Date: 2004-11-24 05:46:54
Message-ID: 20041124054654.GA36782@winnie.fuhr.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Nov 23, 2000 at 11:59:58AM +0800, Arnold.Zhu wrote:

> Can I change postgresql's source to make the following plpgsql works ?
> If could, would you please tell me where can i change the source?
> I want to try it.

No need -- PostgreSQL 8.0 (currently in beta) already supports
argument names in a function's argument list, although I think
only PL/pgSQL currently does anything with them.

> CREATE FUNCTION users_select_by_id(@id int4)

Change @id to be a valid identifier name and it should work.
You can keep using @id if you double-quote it as "@id".

If that's not what you meant then please be more specific.

--
Michael Fuhr
http://www.fuhr.org/~mfuhr/

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Fuhr 2004-11-24 05:52:05 Re: How to make @id or $id as parameter name in plpgsql, is it available?
Previous Message Tom Lane 2004-11-24 05:32:42 Re: Big number of schemas (3500) into a single database