Discussion:
Loading functions
(too old to reply)
Kieran McCusker
2004-08-26 13:28:17 UTC
Permalink
Hi

My biggest bugbear with Postgresql is the double quoting when writing
functions. Has anyone suggested a possible syntax such as :-

create or replace function sp_AddContact(varchar)
returns integer from '<filename>' LANGUAGE 'plpgsql';

This would remove the issue with parsing for begin...ends (or whatever the
language was using)

Just a thought

Kieran


---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to ***@postgresql.org
Gaetano Mendola
2004-08-27 23:37:00 UTC
Permalink
Post by Kieran McCusker
Hi
My biggest bugbear with Postgresql is the double quoting when writing
functions. Has anyone suggested a possible syntax such as :-
create or replace function sp_AddContact(varchar)
returns integer from '<filename>' LANGUAGE 'plpgsql';
No, but in the near future with 8.0 version you can:

create or replace function sp_AddContact(varchar)
returns integer AS $$
DECLARE
a ALIAS FOR $1;
BEGIN
RAISE NOTICE 'look at this string';
return 0;
END;
$$ LANGUAGE 'plpgsql';


Regards
Gaetano Mendola

Loading...