On Friday 16. May 2008, ${spencer} wrote: >is there a way to write a function without installing a specific >language? all i need to do is write a function that can take 3 text's >and put them into a list format (eg. "text1, text2 and text3" ) > >can anyone help?
sandbox=> create function foo(text,text,text) returns text as $$ sandbox$> select $1 || ', ' || $2 || ', and ' || $3 sandbox$> $$ language sql stable; CREATE FUNCTION sandbox=> select foo('x','y','z'); foo ------------- x, y, and z (1 row) sandbox=> -- Leif Biberg Kristensen | Registered Linux User #338009 http://solumslekt.org/ | Cruising with Gentoo/KDE My Jazz Jukebox: http://www.last.fm/user/leifbk/ -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general