Re: back slash separated values

From: "William ZHANG" <uniware(at)zedware(dot)org>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: back slash separated values
Date: 2006-03-22 10:29:38
Message-ID: dvrai6$2ugi$1@news.hub.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Alban Hertroys 2006-03-22 10:41:43 Re: Enforcing serial uniqueness?
Previous Message Martijn van Oosterhout 2006-03-22 09:28:44 Re: Enforcing serial uniqueness?