Please could a kind soul help me with this.
I can't find _any_ - however cryptic - docs about plpgsql.
create function nice_date(date) returns varchar as 'declaret alias for $1;d text;m text;y text;begin day :=
rtrim(to_char(\'t\'::timestamp,\'Day\')); month := rtrim(to_char(\'t\'::timestamp, \'DD Month\')); year :=
rtrim(to_char(\'t\'::timestamp,\'YYYY\' )); nd := d || m || y;end;return nd;
end;' language 'plpgsql';
It seems to load ok, but on exection I get this message.
chris=# select nice_date(date('today'));
NOTICE: plpgsql: ERROR during compile of nice_date near line 12
ERROR: parse error at or near "return"
Please, what am I doing wrong?
--
Sincerely etc.,
NAME Christopher SawtellCELL PHONE 021 257 4451ICQ UIN 45863470EMAIL csawtell @ xtra . co . nzCNOTES
ftp://ftp.funet.fi/pub/languages/C/tutorials/sawtell_C.tar.gz
-->> Please refrain from using HTML or WORD attachments in e-mails to me
<<--