Re: How to define + operator for strings

From: "Andrus" <eetasoft(at)online(dot)ee>
To: <pgsql-general(at)postgresql(dot)org>
Subject: Re: How to define + operator for strings
Date: 2006-05-01 16:25:34
Message-ID: 000c01c66d3c$3e434860$8314eb50@acer
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

> You can't really. There are 27 meanings for a binary '+' operator and
it's not always easy to work out whats is going to if the underlying
types are not numeric in some sense.

So is the best way to create function CONCAT(s1, s2, ... s10) which returns
concatenation in its arguments in both DBMS.
So I can use CONCAT() instead of plus operator.

> Given you're using a system that's not standards compliant, it would
> surprise me if you used date+integer at all.

I'm using Microsoft Visual FoxPro.
It allows date+integer and timestamp+integer arithmetics.
In first case integer means number of days and in second case number of
seconds.

> Does it not support the SQL standard way of string concatination?

SELECT DB||CR FROM OPER

causes error message

Command contains unrecognized phrase/keyword.

> You should be planning a transition because text+text will cause problems
down the line...

There was never problems in date+integer arithmetics in Visual FoxPro.

Visual FoxPro has powerful embedded GUI report designer and grid control.
I haven't found any comparable which works with Postgres.

So I select data from Postgres, store it in FoxPro local data engine and
create reports from it.

Andrus.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tony Lausin 2006-05-01 16:41:57 Re: Is PostgreSQL an easy choice for a large CMS?
Previous Message Ragnar 2006-05-01 16:22:11 Re: How would I write this query...