From: Stephan Szabo <sszabo@megazone.bigpanda.com>
To: Rhaoni Chiu Pereira <rhaoni@sistemica.info>
Cc: Lista PostgreSQL <pgsql-admin@postgresql.org>
Subject: Re: Explicit Cast
Date: Wed, 20 Aug 2003 08:45:46 -0700 (PDT)
Message-ID: <20030820084251.T7072-100000@megazone.bigpanda.com> (raw)
In-Reply-To: <1061382268.3f43687cc3565@sistemica.info>
On Wed, 20 Aug 2003, Rhaoni Chiu Pereira wrote:
> Hi List,
>
> As I already said .. I'm porting an Oracle DB to PostgreSQL and I must
> rewrite most of the functions . So I have a problem to do something like this:
>
> ... atual_fatura in(''+'',''-'') ...
>
> It gives me the following error:
>
> Unable to identify an operator '-' for types 'numeric' and 'character varying'
> You will have to retype this query using an explicit castenciosamente,
>
> atual_fatura is a varchar field.
>
> I read howto create an explicit cast but I didn't understand what I must do in
> this case.
Can you send the actual function you're having problems with and version
information? I don't seem to get an error with a simple function that
uses such a construct on 7.3.4, but I expect the real example is more
complicated.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-admin@postgresql.org
Cc: sszabo@megazone.bigpanda.com, rhaoni@sistemica.info
Subject: Re: Explicit Cast
In-Reply-To: <20030820084251.T7072-100000@megazone.bigpanda.com>
References: <1061382268.3f43687cc3565@sistemica.info> <20030820084251.T7072-100000@megazone.bigpanda.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox