Hey,
PostgreSQL 7.3 on i686-pc-linux-gnu, compiled by GCC 2.96
But, I am getting error when I am using the alias key word.
And also when I try to create a C function for the same and excute I am getting the following error
ERROR: Memory exhausted in AllocSetAlloc(677865842)
And, I am allocating memory using the "palloc"
----- Warm Regards Shÿam Peri II Floor, Punja Building, M.G.Road, Ballalbagh, Mangalore-575003 Ph : 91-824-2451001/5 Fax : 91-824-2451050
> Hey, > create or replace function sample(varchar,int) returns varchar as' > declare > data alias for $1; > size alias for $2; > begin > return substr(data,(length(data)-size)+1,length(data)); > end; > ' language 'plpgsql'; > ____________________________ > WARNING: plpgsql: ERROR during compile of sample near line 2 > ERROR: parse error at or near ";" > > Can any body tell me why is this error coming Really? I got no error and select sample('nothing',3) gave mi 'ing' What is your postgresql version? Regards, Tomasz Myrta