From: Peter Eisentraut <peter_e@gmx.net>
To: Thomas SMETS <tsmets@altern.org>
Cc: psql novice <pgsql-novice@postgresql.org>
Cc: psql sql <pgsql-sql@postgresql.org>
Subject: Re: [SQL] Casting
Date: Fri, 5 Jan 2001 19:42:38 +0100 (CET)
Message-ID: <Pine.LNX.4.30.0101051940280.979-100000@peter.localdomain> (raw)
In-Reply-To: <3A5515DE.52F2DB7B@altern.org>
Thomas SMETS writes:
> I'm removing charaters from a String which should be numbers.
> I then want to make calculations on these numbers (calculate the ISBN
> number).
(You might want to look into contrib/isbn_issn for an isbn type.)
> Do I have to cast the char into int's before I can do the calulations.
Depends on the calculation. I'd just try to see if it works. When in
doubt add casts.
> Also I looked in the User manual but could not find the modulo function
> where is it ?
5 % 4
mod(5, 4)
--
Peter Eisentraut peter_e@gmx.net http://yi.org/peter-e/
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-sql@postgresql.org
Cc: peter_e@gmx.net, tsmets@altern.org, pgsql-novice@postgresql.org
Subject: Re: [SQL] Casting
In-Reply-To: <Pine.LNX.4.30.0101051940280.979-100000@peter.localdomain>
References: <3A5515DE.52F2DB7B@altern.org> <Pine.LNX.4.30.0101051940280.979-100000@peter.localdomain>
* 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