you guy know how to create a function first()
in posgresql,
can you help me out,
this function does is get the fisrt record in table
example:
we have table student
name ssn
tony 123
jonh 256
then if we select first(name) from student;
then give us :
name
tony
but in postgresql they dont implement this function yet, so i have to implement it ,but i dont know how ..
can you help me if you guy can,
i think i do like this but dont work right,
create function first(text)
returns text
as 'declare ret text;
begin
return $1;
end;'
language 'plpgsql';
but this is dont do what i want..
if any guy know it please help me implement this function .
thank.