Re: How to define + operator for strings - Mailing list pgsql-general

From Andrus
Subject Re: How to define + operator for strings
Date
Msg-id 000c01c66d3c$3e434860$8314eb50@acer
Whole thread Raw
In response to How to define + operator for strings  ("Andrus" <eetasoft@online.ee>)
List 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.

pgsql-general by date:

Previous
From: Ragnar
Date:
Subject: Re: How would I write this query...
Next
From: "Don Walker"
Date:
Subject: Re: Use of ISpell dictionaries with tsearch2 - what is the point?