How to define + operator for strings

From: "Andrus" <eetasoft(at)online(dot)ee>
To: pgsql-general(at)postgresql(dot)org
Subject: How to define + operator for strings
Date: 2006-04-28 09:59:25
Message-ID: e2spis$30tr$1@news.hub.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I want to create portable code which runs in other dbms without
modification.

Unfortunately this other dbms uses + for string concatenation and has no way
to define operators.

How to define + operator as alias of || operator for strings so I can use

SELECT firstname+ ' '+ lastname
...

in Postgres

Andrus.

Responses

Browse pgsql-general by date

  From Date Subject
Next Message A. Kretschmer 2006-04-28 10:27:40 Re: How to define + operator for strings
Previous Message Terry Lee Tucker 2006-04-28 07:54:46 Re: For vim users: Syntax highlighting for PostgreSQL