What's the version of pgsql?

postgres=# show server_version;
 server_version
----------------
 8.1.0
(1 row)

postgres=# CREATE OR REPLACE FUNCTION foo (v_s1 varchar, v_s2 varchar)
postgres-# RETURNS varchar AS $$
postgres$# BEGIN
postgres$#     RETURN v_s1 || '\\' || v_s2;
postgres$# END;
postgres$# $$ LANGUAGE plpgsql;
CREATE FUNCTION

postgres=# SELECT foo ('pgsql', 'hackers');
      foo
---------------
 pgsql\hackers
(1 row)

Regards,
William ZHANG



---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend

Reply via email to