Hello, pgsql-hackers

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.

-------------------------------------------------------
CREATE FUNCTION users_select_by_id(@id int4)
RETURNS SETOF users_set
AS '

declare rec record;

begin

	for rec in
		select * from users where id = @id
	loop
		return next rec;
	end loop;
	return;

end; 'LANGUAGE plpgsql;
-------------------------------------------------------


Thanks & Regards

Arnold.Zhu
2000-11-23





Thu, 23 Nov 2000 11:59:58 +0800
"Arnold.Zhu" <joint@shaucon.com>
How to make @id or $id as parameter name in plpgsql, is it available?
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/

Tue, 23 Nov 2004 22:46:54 -0700
Michael Fuhr <mike@fuhr.org>
Re: How to make @id or $id as parameter name in plpgsql,
	is it available?
On Tue, Nov 23, 2004 at 10:46:54PM -0700, Michael Fuhr wrote:

> On Thu, Nov 23, 2000 at 11:59:58AM +0800, Arnold.Zhu wrote:
                  ^^^^
Ummm...did you know your clock was four years behind?

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

Tue, 23 Nov 2004 22:52:05 -0700
Michael Fuhr <mike@fuhr.org>
Re: How to make @id or $id as parameter name in plpgsql,
	is it available?